@formant/data-sdk 0.0.73 → 0.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,44 @@
1
- var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__publicField=(e,t,r)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,r),r);!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).FormantDataSDK={})}(this,(function(exports){"use strict";var dist={exports:{}};
2
- /*! For license information please see index.js.LICENSE.txt */(function(module,exports){var t;window,t=function(){return function(e){function t(t){for(var r,o,i=t[0],s=t[1],a=0,u=[];a<i.length;a++)o=i[a],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&u.push(n[o][0]),n[o]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);u.length;)u.shift()()}var r={},n={0:0};function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.e=function(){return Promise.resolve()},o.m=e,o.c=r,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var i=window.webpackJsonpFormantRealtimeSDK=window.webpackJsonpFormantRealtimeSDK||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var a=0;a<i.length;a++)t(i[a]);var l=s;return o(o.s=228)}([function(e,t,r){r.d(t,"a",(function(){return T}));const n=Math.pow(2,20);var o=r(54),i=r(15),s=r(53),a="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),l=new Uint8Array(16);function u(){if(!a)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(l)}for(var g=[],c=0;c<256;++c)g[c]=(c+256).toString(16).substr(1);var f=r(16),p=r(7),h=r(21),d=r(30);function y(e,t={}){const r=e=>!1!==t.redacted?Object(d.a)(e):e;if(!e.stack)return{message:h(r(e),{cycles:!0})};const{name:n,message:o,stack:i}=e,s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["name","message","stack"]);return{name:n,message:void 0!==o?o:h(r(e),{cycles:!0}),stack:i,meta:s&&0===Object.keys(s).length?void 0:r(s)}}function m(e,t={}){const{message:r,stack:n,meta:o}=y(e,t);return`${n||r||""}${o&&Object.keys(o).length>0?` -- ${h(o,{cycles:!0})}`:""}`}var b=r(99),v=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))},_=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};const S={app:p.a,namespace:p.i,buildTag:p.b,instanceId:function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||u)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[n+i]=o[i];return t||function(e,t){var r=t||0,n=g;return[n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")}(o)}()};let w={};const E=p.e?f.format.printf((e=>{var{timestamp:t,level:r,message:n,error:i}=e,s=_(e,["timestamp","level","message","error"]);const a=Object.assign(Object.assign({timestamp:t?new Date(t).getTime():(new Date).getTime(),level:r.toUpperCase(),message:n},i?{error:y(i)}:{}),{meta:Object.assign(Object.assign(Object.assign({},S),w),s)});try{return JSON.stringify(a)}catch(l){return o(a)}})):f.format.printf((e=>{var{timestamp:t,level:r,message:n,error:i}=e,s=_(e,["timestamp","level","message","error"]);let a=`${t||(new Date).toISOString()} ${r.toUpperCase()}: ${n} `;if(Object.keys(s).length>0)try{a+=JSON.stringify(s)}catch(l){a+=o(s)}return i&&(a+=`\n${m(i)}`),a})),T=Object(f.createLogger)({level:p.f});if(p.g&&T.add(new f.transports.Console({format:E,level:"debug"})),p.d&&T.add(new class extends b{constructor(e,t){super(),this.endpoint=e,this.meta=t,this.logClient=this.getLogClient()}getLogClient(){return v(this,void 0,void 0,(function*(){const{LogClient:e}=yield Promise.resolve().then(r.bind(null,230));return new e(this.endpoint)}))}log(e,t){return v(this,void 0,void 0,(function*(){const{level:r,message:n,error:o}=e,i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["level","message","error"]);this.emit("logged");try{yield(yield this.logClient).log([{timestamp:(new Date).toISOString(),level:r,message:n.substring(0,1e3),error:void 0!==o?y(o):void 0,meta:Object.assign(Object.assign({},i),this.meta())}])}catch(s){console.error(`Failed to log to log-api: ${m(s)}`)}t()}))}}(p.d,(()=>Object.assign(Object.assign(Object.assign({},S),w),{level:"debug"})))),p.h){const e=s.resolve(i.tmpdir(),`silly-${p.a}.log`);T.debug("Logging silly logs to file",{filename:e}),T.add(new f.transports.File({filename:e,maxsize:1*n,maxFiles:10,format:f.format.combine(Object(f.format)((e=>"silly"===e.level&&e))(),E),level:"silly"}))}},function(e,t,r){r.d(t,"a",(function(){return n}));const n={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(n){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var l,u=[],g=!1,c=-1;function f(){g&&l&&(g=!1,l.length?u=l.concat(u):c=-1,u.length&&p())}function p(){if(!g){var e=a(f);g=!0;for(var t=u.length;t;){for(l=u,u=[];++c<t;)l&&l[c].run();c=-1,t=u.length}l=null,g=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(r){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new h(e,t)),1!==u.length||g||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(t,"configs",{value:r(117)})},function(e,t,r){(function(e){var n=r(125),o=r(126),i=r(38);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,r){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return u(this,e,t,r)}function u(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=f(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!l.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|h(t,r),o=(e=a(e,n)).write(t,r);return o!==n&&(e=e.slice(0,o)),e}(e,t,r):function(e,t){if(l.isBuffer(t)){var r=0|p(t.length);return 0===(e=a(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?a(e,0):f(e,t);if("Buffer"===t.type&&i(t.data))return f(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function g(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function c(e,t){if(g(t),e=a(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function f(e,t){var r=t.length<0?0:0|p(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function d(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){var i,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var g=-1;for(i=r;i<a;i++)if(u(e,i)===u(t,-1===g?0:i-g)){if(-1===g&&(g=i),i-g+1===l)return g*s}else-1!==g&&(i-=i-g),g=-1}else for(r+l>a&&(r=a-l),i=r;i>=0;i--){for(var c=!0,f=0;f<l;f++)if(u(e,i+f)!==u(t,f)){c=!1;break}if(c)return i}return-1}function v(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function _(e,t,r,n){return V(F(t,e.length-r),e,r,n)}function S(e,t,r,n){return V(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function w(e,t,r,n){return S(e,t,r,n)}function E(e,t,r,n){return V(W(t),e,r,n)}function T(e,t,r,n){return V(function(e,t){for(var r,n,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function R(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,l,u=e[o],g=null,c=u>239?4:u>223?3:u>191?2:1;if(o+c<=r)switch(c){case 1:u<128&&(g=u);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&u)<<6|63&i)>127&&(g=l);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(l=(15&u)<<12|(63&i)<<6|63&s)>2047&&(l<55296||l>57343)&&(g=l);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(g=l)}null===g?(g=65533,c=1):g>65535&&(g-=65536,n.push(g>>>10&1023|55296),g=56320|1023&g),n.push(g),o+=c}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function O(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function j(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function I(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=k(e[i]);return o}function C(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function M(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,o,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o<i;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function x(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o<i;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function L(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,i){return i||L(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,i){return i||L(e,0,r,8),o.write(e,t,r,n,52,8),r+8}t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),t.kMaxLength=s(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,r){return u(null,e,t,r)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,r){return n=null,i=t,s=r,g(o=e),o<=0?a(n,o):void 0!==i?"string"==typeof s?a(n,o).fill(i,s):a(n,o).fill(i):a(n,o);var n,o,i,s},l.allocUnsafe=function(e){return c(null,e)},l.allocUnsafeSlow=function(e){return c(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=l.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var s=e[r];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n},l.byteLength=h,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?R(this,0,e):d.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,r,n,o){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(n,o),g=e.slice(t,r),c=0;c<a;++c)if(u[c]!==g[c]){i=u[c],s=g[c];break}return i<s?-1:s<i?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=l.prototype;else{var o=t-e;r=new l(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+e]}return r},l.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},l.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},l.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||P(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);P(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o,i=n-r;if(this===e&&r<t&&t<n)for(o=i-1;o>=0;--o)e[o+t]=this[o+r];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},l.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=l.isBuffer(e)?e:F(new l(e,n).toString()),a=s.length;for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function k(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function W(e){return n.toByteArray(function(e){if((e=(t=e,t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(D,"")).length<2)return"";for(var t;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}}).call(this,r(5))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){(function(e){r.d(t,"a",(function(){return o})),r.d(t,"i",(function(){return i})),r.d(t,"j",(function(){return s})),r.d(t,"b",(function(){return a})),r.d(t,"f",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"g",(function(){return g})),r.d(t,"d",(function(){return c})),r.d(t,"c",(function(){return f})),r.d(t,"h",(function(){return p}));const n=r(98).from(Object.assign(Object.assign({},e.env),{ENVIRONMENT:e.env.ENV,APP:"realtime-sdk",NAMESPACE:"production",VERSION:e.env.VERSION,BUILD_TAG:e.env.BUILD_TAG,GIT_COMMIT:e.env.GIT_COMMIT,LOG_LEVEL:e.env.LOG_LEVEL,LOG_JSON:"false",LOG_API_ENDPOINT:e.env.LOG_API_ENDPOINT,JEST_WORKER_ID:e.env.JEST_WORKER_ID,ENABLE_SENTRY:e.env.ENABLE_SENTRY,SENTRY_DSN:e.env.SENTRY_DSN,STABLE_AGENT_VERSION:e.env.STABLE_AGENT_VERSION})),o=(n.get("ENVIRONMENT").default("").asString(),n.get("APP").default("").asString()),i=(n.get("APP_PATH").default("").asString(),n.get("API_ENDPOINT").default("").asString(),n.get("NAMESPACE").default("").asString()),s=n.get("VERSION").default("").asString(),a=n.get("BUILD_TAG").default("").asString(),l=(n.get("GIT_COMMIT").default("").asString(),n.get("ENABLE_SENTRY").default("false").asBool(),n.get("SENTRY_DSN").default("").asString(),n.get("LOG_LEVEL").default("debug").asString()),u=n.get("LOG_JSON").default("true").asBool(),g=n.get("LOG_TO_CONSOLE").default("true").asBool(),c=(n.get("STABLE_AGENT_VERSION").default("").asString(),n.get("LOG_API_ENDPOINT").asString()),f=n.get("JEST_WORKER_ID").asString(),p=(n.get("SHEET_EXPORT_MAX_ROW_COUNT").default("10000").asIntPositive(),n.get("LOG_TO_FILE").default("false").asBoolStrict())}).call(this,r(2))},function(e,t,r){var n=r(95),o=n,i=Function("return this")(),s=r(94);o.object.extend(proto,s),o.exportSymbol("proto.v1.signaling.api.CreatePeerRequest",null,i),o.exportSymbol("proto.v1.signaling.api.CreatePeerResponse",null,i),o.exportSymbol("proto.v1.signaling.api.DeletePeerRequest",null,i),o.exportSymbol("proto.v1.signaling.api.DeletePeerResponse",null,i),o.exportSymbol("proto.v1.signaling.api.GetIceServersRequest",null,i),o.exportSymbol("proto.v1.signaling.api.GetIceServersResponse",null,i),o.exportSymbol("proto.v1.signaling.api.GetPeersRequest",null,i),o.exportSymbol("proto.v1.signaling.api.GetPeersResponse",null,i),o.exportSymbol("proto.v1.signaling.api.Peer",null,i),o.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamRequest",null,i),o.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamResponse",null,i),o.exportSymbol("proto.v1.signaling.api.RefreshPeerRequest",null,i),o.exportSymbol("proto.v1.signaling.api.RefreshPeerResponse",null,i),o.exportSymbol("proto.v1.signaling.api.SendSignalRequest",null,i),o.exportSymbol("proto.v1.signaling.api.SendSignalResponse",null,i),o.exportSymbol("proto.v1.signaling.api.SessionType",null,i),o.exportSymbol("proto.v1.signaling.api.Signal",null,i),proto.v1.signaling.api.Peer=function(e){n.Message.initialize(this,e,0,-1,proto.v1.signaling.api.Peer.repeatedFields_,null)},o.inherits(proto.v1.signaling.api.Peer,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Peer.displayName="proto.v1.signaling.api.Peer"),proto.v1.signaling.api.Signal=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.Signal,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Signal.displayName="proto.v1.signaling.api.Signal"),proto.v1.signaling.api.CreatePeerRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.CreatePeerRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerRequest.displayName="proto.v1.signaling.api.CreatePeerRequest"),proto.v1.signaling.api.CreatePeerResponse=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.CreatePeerResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerResponse.displayName="proto.v1.signaling.api.CreatePeerResponse"),proto.v1.signaling.api.DeletePeerRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.DeletePeerRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerRequest.displayName="proto.v1.signaling.api.DeletePeerRequest"),proto.v1.signaling.api.DeletePeerResponse=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.DeletePeerResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerResponse.displayName="proto.v1.signaling.api.DeletePeerResponse"),proto.v1.signaling.api.RefreshPeerRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.RefreshPeerRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerRequest.displayName="proto.v1.signaling.api.RefreshPeerRequest"),proto.v1.signaling.api.RefreshPeerResponse=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.RefreshPeerResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerResponse.displayName="proto.v1.signaling.api.RefreshPeerResponse"),proto.v1.signaling.api.GetPeersRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetPeersRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersRequest.displayName="proto.v1.signaling.api.GetPeersRequest"),proto.v1.signaling.api.GetPeersResponse=function(e){n.Message.initialize(this,e,0,-1,proto.v1.signaling.api.GetPeersResponse.repeatedFields_,null)},o.inherits(proto.v1.signaling.api.GetPeersResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersResponse.displayName="proto.v1.signaling.api.GetPeersResponse"),proto.v1.signaling.api.GetIceServersRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetIceServersRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersRequest.displayName="proto.v1.signaling.api.GetIceServersRequest"),proto.v1.signaling.api.GetIceServersResponse=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetIceServersResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersResponse.displayName="proto.v1.signaling.api.GetIceServersResponse"),proto.v1.signaling.api.SendSignalRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.SendSignalRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalRequest.displayName="proto.v1.signaling.api.SendSignalRequest"),proto.v1.signaling.api.SendSignalResponse=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.SendSignalResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalResponse.displayName="proto.v1.signaling.api.SendSignalResponse"),proto.v1.signaling.api.ReceiveSignalStreamRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.ReceiveSignalStreamRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.displayName="proto.v1.signaling.api.ReceiveSignalStreamRequest"),proto.v1.signaling.api.ReceiveSignalStreamResponse=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.v1.signaling.api.ReceiveSignalStreamResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.displayName="proto.v1.signaling.api.ReceiveSignalStreamResponse"),proto.v1.signaling.api.Peer.repeatedFields_=[5],n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Peer.prototype.toObject=function(e){return proto.v1.signaling.api.Peer.toObject(e,this)},proto.v1.signaling.api.Peer.toObject=function(e,t){var r,o={peerId:n.Message.getFieldWithDefault(t,1,""),organizationId:n.Message.getFieldWithDefault(t,2,""),userId:(r=t.getUserId())&&s.StringValue.toObject(e,r),deviceId:(r=t.getDeviceId())&&s.StringValue.toObject(e,r),sessionIdsList:null==(r=n.Message.getRepeatedField(t,5))?void 0:r,peerCreatedTimestamp:(r=t.getPeerCreatedTimestamp())&&s.Int64Value.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),proto.v1.signaling.api.Peer.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.Peer;return proto.v1.signaling.api.Peer.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.Peer.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setPeerId(r);break;case 2:r=t.readString(),e.setOrganizationId(r);break;case 3:r=new s.StringValue,t.readMessage(r,s.StringValue.deserializeBinaryFromReader),e.setUserId(r);break;case 4:r=new s.StringValue,t.readMessage(r,s.StringValue.deserializeBinaryFromReader),e.setDeviceId(r);break;case 5:r=t.readString(),e.addSessionIds(r);break;case 6:r=new s.Int64Value,t.readMessage(r,s.Int64Value.deserializeBinaryFromReader),e.setPeerCreatedTimestamp(r);break;default:t.skipField()}return e},proto.v1.signaling.api.Peer.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.Peer.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.Peer.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getPeerId()).length>0&&t.writeString(1,r),(r=e.getOrganizationId()).length>0&&t.writeString(2,r),null!=(r=e.getUserId())&&t.writeMessage(3,r,s.StringValue.serializeBinaryToWriter),null!=(r=e.getDeviceId())&&t.writeMessage(4,r,s.StringValue.serializeBinaryToWriter),(r=e.getSessionIdsList()).length>0&&t.writeRepeatedString(5,r),null!=(r=e.getPeerCreatedTimestamp())&&t.writeMessage(6,r,s.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.Peer.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.Peer.prototype.setPeerId=function(e){return n.Message.setProto3StringField(this,1,e)},proto.v1.signaling.api.Peer.prototype.getOrganizationId=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.v1.signaling.api.Peer.prototype.setOrganizationId=function(e){return n.Message.setProto3StringField(this,2,e)},proto.v1.signaling.api.Peer.prototype.getUserId=function(){return n.Message.getWrapperField(this,s.StringValue,3)},proto.v1.signaling.api.Peer.prototype.setUserId=function(e){return n.Message.setWrapperField(this,3,e)},proto.v1.signaling.api.Peer.prototype.clearUserId=function(){return this.setUserId(void 0)},proto.v1.signaling.api.Peer.prototype.hasUserId=function(){return null!=n.Message.getField(this,3)},proto.v1.signaling.api.Peer.prototype.getDeviceId=function(){return n.Message.getWrapperField(this,s.StringValue,4)},proto.v1.signaling.api.Peer.prototype.setDeviceId=function(e){return n.Message.setWrapperField(this,4,e)},proto.v1.signaling.api.Peer.prototype.clearDeviceId=function(){return this.setDeviceId(void 0)},proto.v1.signaling.api.Peer.prototype.hasDeviceId=function(){return null!=n.Message.getField(this,4)},proto.v1.signaling.api.Peer.prototype.getSessionIdsList=function(){return n.Message.getRepeatedField(this,5)},proto.v1.signaling.api.Peer.prototype.setSessionIdsList=function(e){return n.Message.setField(this,5,e||[])},proto.v1.signaling.api.Peer.prototype.addSessionIds=function(e,t){return n.Message.addToRepeatedField(this,5,e,t)},proto.v1.signaling.api.Peer.prototype.clearSessionIdsList=function(){return this.setSessionIdsList([])},proto.v1.signaling.api.Peer.prototype.getPeerCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,6)},proto.v1.signaling.api.Peer.prototype.setPeerCreatedTimestamp=function(e){return n.Message.setWrapperField(this,6,e)},proto.v1.signaling.api.Peer.prototype.clearPeerCreatedTimestamp=function(){return this.setPeerCreatedTimestamp(void 0)},proto.v1.signaling.api.Peer.prototype.hasPeerCreatedTimestamp=function(){return null!=n.Message.getField(this,6)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Signal.prototype.toObject=function(e){return proto.v1.signaling.api.Signal.toObject(e,this)},proto.v1.signaling.api.Signal.toObject=function(e,t){var r,o={sessionId:(r=t.getSessionId())&&s.StringValue.toObject(e,r),sessionCreatedTimestamp:(r=t.getSessionCreatedTimestamp())&&s.Int64Value.toObject(e,r),senderId:n.Message.getFieldWithDefault(t,3,""),receiverId:n.Message.getFieldWithDefault(t,4,""),payload:n.Message.getFieldWithDefault(t,5,""),iceServers:n.Message.getFieldWithDefault(t,6,""),iceTransportPolicy:n.Message.getFieldWithDefault(t,7,""),sessionType:n.Message.getFieldWithDefault(t,8,0)};return e&&(o.$jspbMessageInstance=t),o}),proto.v1.signaling.api.Signal.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.Signal;return proto.v1.signaling.api.Signal.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.Signal.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new s.StringValue;t.readMessage(r,s.StringValue.deserializeBinaryFromReader),e.setSessionId(r);break;case 2:r=new s.Int64Value,t.readMessage(r,s.Int64Value.deserializeBinaryFromReader),e.setSessionCreatedTimestamp(r);break;case 3:r=t.readString(),e.setSenderId(r);break;case 4:r=t.readString(),e.setReceiverId(r);break;case 5:r=t.readString(),e.setPayload(r);break;case 6:r=t.readString(),e.setIceServers(r);break;case 7:r=t.readString(),e.setIceTransportPolicy(r);break;case 8:r=t.readEnum(),e.setSessionType(r);break;default:t.skipField()}return e},proto.v1.signaling.api.Signal.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.Signal.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.Signal.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getSessionId())&&t.writeMessage(1,r,s.StringValue.serializeBinaryToWriter),null!=(r=e.getSessionCreatedTimestamp())&&t.writeMessage(2,r,s.Int64Value.serializeBinaryToWriter),(r=e.getSenderId()).length>0&&t.writeString(3,r),(r=e.getReceiverId()).length>0&&t.writeString(4,r),(r=e.getPayload()).length>0&&t.writeString(5,r),(r=e.getIceServers()).length>0&&t.writeString(6,r),(r=e.getIceTransportPolicy()).length>0&&t.writeString(7,r),0!==(r=e.getSessionType())&&t.writeEnum(8,r)},proto.v1.signaling.api.Signal.prototype.getSessionId=function(){return n.Message.getWrapperField(this,s.StringValue,1)},proto.v1.signaling.api.Signal.prototype.setSessionId=function(e){return n.Message.setWrapperField(this,1,e)},proto.v1.signaling.api.Signal.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionId=function(){return null!=n.Message.getField(this,1)},proto.v1.signaling.api.Signal.prototype.getSessionCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,2)},proto.v1.signaling.api.Signal.prototype.setSessionCreatedTimestamp=function(e){return n.Message.setWrapperField(this,2,e)},proto.v1.signaling.api.Signal.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionCreatedTimestamp=function(){return null!=n.Message.getField(this,2)},proto.v1.signaling.api.Signal.prototype.getSenderId=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.v1.signaling.api.Signal.prototype.setSenderId=function(e){return n.Message.setProto3StringField(this,3,e)},proto.v1.signaling.api.Signal.prototype.getReceiverId=function(){return n.Message.getFieldWithDefault(this,4,"")},proto.v1.signaling.api.Signal.prototype.setReceiverId=function(e){return n.Message.setProto3StringField(this,4,e)},proto.v1.signaling.api.Signal.prototype.getPayload=function(){return n.Message.getFieldWithDefault(this,5,"")},proto.v1.signaling.api.Signal.prototype.setPayload=function(e){return n.Message.setProto3StringField(this,5,e)},proto.v1.signaling.api.Signal.prototype.getIceServers=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.v1.signaling.api.Signal.prototype.setIceServers=function(e){return n.Message.setProto3StringField(this,6,e)},proto.v1.signaling.api.Signal.prototype.getIceTransportPolicy=function(){return n.Message.getFieldWithDefault(this,7,"")},proto.v1.signaling.api.Signal.prototype.setIceTransportPolicy=function(e){return n.Message.setProto3StringField(this,7,e)},proto.v1.signaling.api.Signal.prototype.getSessionType=function(){return n.Message.getFieldWithDefault(this,8,0)},proto.v1.signaling.api.Signal.prototype.setSessionType=function(e){return n.Message.setProto3EnumField(this,8,e)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerRequest.prototype.toObject=function(e){return proto.v1.signaling.api.CreatePeerRequest.toObject(e,this)},proto.v1.signaling.api.CreatePeerRequest.toObject=function(e,t){var r={};return e&&(r.$jspbMessageInstance=t),r}),proto.v1.signaling.api.CreatePeerRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.CreatePeerRequest;return proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)t.getFieldNumber(),t.skipField();return e},proto.v1.signaling.api.CreatePeerRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter=function(e,t){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerResponse.prototype.toObject=function(e){return proto.v1.signaling.api.CreatePeerResponse.toObject(e,this)},proto.v1.signaling.api.CreatePeerResponse.toObject=function(e,t){var r,n={peer:(r=t.getPeer())&&proto.v1.signaling.api.Peer.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.v1.signaling.api.CreatePeerResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.CreatePeerResponse;return proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new proto.v1.signaling.api.Peer;t.readMessage(r,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),e.setPeer(r);break;default:t.skipField()}return e},proto.v1.signaling.api.CreatePeerResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter=function(e,t){var r;null!=(r=e.getPeer())&&t.writeMessage(1,r,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.CreatePeerResponse.prototype.getPeer=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.CreatePeerResponse.prototype.setPeer=function(e){return n.Message.setWrapperField(this,1,e)},proto.v1.signaling.api.CreatePeerResponse.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.CreatePeerResponse.prototype.hasPeer=function(){return null!=n.Message.getField(this,1)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerRequest.prototype.toObject=function(e){return proto.v1.signaling.api.DeletePeerRequest.toObject(e,this)},proto.v1.signaling.api.DeletePeerRequest.toObject=function(e,t){var r={peerId:n.Message.getFieldWithDefault(t,1,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.v1.signaling.api.DeletePeerRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.DeletePeerRequest;return proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setPeerId(r);break;default:t.skipField()}return e},proto.v1.signaling.api.DeletePeerRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter=function(e,t){var r;(r=e.getPeerId()).length>0&&t.writeString(1,r)},proto.v1.signaling.api.DeletePeerRequest.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.DeletePeerRequest.prototype.setPeerId=function(e){return n.Message.setProto3StringField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerResponse.prototype.toObject=function(e){return proto.v1.signaling.api.DeletePeerResponse.toObject(e,this)},proto.v1.signaling.api.DeletePeerResponse.toObject=function(e,t){var r={};return e&&(r.$jspbMessageInstance=t),r}),proto.v1.signaling.api.DeletePeerResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.DeletePeerResponse;return proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)t.getFieldNumber(),t.skipField();return e},proto.v1.signaling.api.DeletePeerResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter=function(e,t){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerRequest.prototype.toObject=function(e){return proto.v1.signaling.api.RefreshPeerRequest.toObject(e,this)},proto.v1.signaling.api.RefreshPeerRequest.toObject=function(e,t){var r,n={peer:(r=t.getPeer())&&proto.v1.signaling.api.Peer.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.v1.signaling.api.RefreshPeerRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.RefreshPeerRequest;return proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new proto.v1.signaling.api.Peer;t.readMessage(r,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),e.setPeer(r);break;default:t.skipField()}return e},proto.v1.signaling.api.RefreshPeerRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter=function(e,t){var r;null!=(r=e.getPeer())&&t.writeMessage(1,r,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.RefreshPeerRequest.prototype.getPeer=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.RefreshPeerRequest.prototype.setPeer=function(e){return n.Message.setWrapperField(this,1,e)},proto.v1.signaling.api.RefreshPeerRequest.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.RefreshPeerRequest.prototype.hasPeer=function(){return null!=n.Message.getField(this,1)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerResponse.prototype.toObject=function(e){return proto.v1.signaling.api.RefreshPeerResponse.toObject(e,this)},proto.v1.signaling.api.RefreshPeerResponse.toObject=function(e,t){var r={};return e&&(r.$jspbMessageInstance=t),r}),proto.v1.signaling.api.RefreshPeerResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.RefreshPeerResponse;return proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)t.getFieldNumber(),t.skipField();return e},proto.v1.signaling.api.RefreshPeerResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter=function(e,t){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersRequest.prototype.toObject=function(e){return proto.v1.signaling.api.GetPeersRequest.toObject(e,this)},proto.v1.signaling.api.GetPeersRequest.toObject=function(e,t){var r={};return e&&(r.$jspbMessageInstance=t),r}),proto.v1.signaling.api.GetPeersRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.GetPeersRequest;return proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)t.getFieldNumber(),t.skipField();return e},proto.v1.signaling.api.GetPeersRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter=function(e,t){},proto.v1.signaling.api.GetPeersResponse.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersResponse.prototype.toObject=function(e){return proto.v1.signaling.api.GetPeersResponse.toObject(e,this)},proto.v1.signaling.api.GetPeersResponse.toObject=function(e,t){var r={peersList:n.Message.toObjectList(t.getPeersList(),proto.v1.signaling.api.Peer.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),proto.v1.signaling.api.GetPeersResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.GetPeersResponse;return proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new proto.v1.signaling.api.Peer;t.readMessage(r,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),e.addPeers(r);break;default:t.skipField()}return e},proto.v1.signaling.api.GetPeersResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter=function(e,t){var r;(r=e.getPeersList()).length>0&&t.writeRepeatedMessage(1,r,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.GetPeersResponse.prototype.getPeersList=function(){return n.Message.getRepeatedWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.GetPeersResponse.prototype.setPeersList=function(e){return n.Message.setRepeatedWrapperField(this,1,e)},proto.v1.signaling.api.GetPeersResponse.prototype.addPeers=function(e,t){return n.Message.addToRepeatedWrapperField(this,1,e,proto.v1.signaling.api.Peer,t)},proto.v1.signaling.api.GetPeersResponse.prototype.clearPeersList=function(){return this.setPeersList([])},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersRequest.prototype.toObject=function(e){return proto.v1.signaling.api.GetIceServersRequest.toObject(e,this)},proto.v1.signaling.api.GetIceServersRequest.toObject=function(e,t){var r={};return e&&(r.$jspbMessageInstance=t),r}),proto.v1.signaling.api.GetIceServersRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.GetIceServersRequest;return proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)t.getFieldNumber(),t.skipField();return e},proto.v1.signaling.api.GetIceServersRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter=function(e,t){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersResponse.prototype.toObject=function(e){return proto.v1.signaling.api.GetIceServersResponse.toObject(e,this)},proto.v1.signaling.api.GetIceServersResponse.toObject=function(e,t){var r={iceServers:n.Message.getFieldWithDefault(t,1,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.v1.signaling.api.GetIceServersResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.GetIceServersResponse;return proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setIceServers(r);break;default:t.skipField()}return e},proto.v1.signaling.api.GetIceServersResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter=function(e,t){var r;(r=e.getIceServers()).length>0&&t.writeString(1,r)},proto.v1.signaling.api.GetIceServersResponse.prototype.getIceServers=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.GetIceServersResponse.prototype.setIceServers=function(e){return n.Message.setProto3StringField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalRequest.prototype.toObject=function(e){return proto.v1.signaling.api.SendSignalRequest.toObject(e,this)},proto.v1.signaling.api.SendSignalRequest.toObject=function(e,t){var r,n={signal:(r=t.getSignal())&&proto.v1.signaling.api.Signal.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.v1.signaling.api.SendSignalRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.SendSignalRequest;return proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new proto.v1.signaling.api.Signal;t.readMessage(r,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),e.setSignal(r);break;default:t.skipField()}return e},proto.v1.signaling.api.SendSignalRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter=function(e,t){var r;null!=(r=e.getSignal())&&t.writeMessage(1,r,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalRequest.prototype.getSignal=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.SendSignalRequest.prototype.setSignal=function(e){return n.Message.setWrapperField(this,1,e)},proto.v1.signaling.api.SendSignalRequest.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.SendSignalRequest.prototype.hasSignal=function(){return null!=n.Message.getField(this,1)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalResponse.prototype.toObject=function(e){return proto.v1.signaling.api.SendSignalResponse.toObject(e,this)},proto.v1.signaling.api.SendSignalResponse.toObject=function(e,t){var r,n={sessionId:(r=t.getSessionId())&&s.StringValue.toObject(e,r),sessionCreatedTimestamp:(r=t.getSessionCreatedTimestamp())&&s.Int64Value.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.v1.signaling.api.SendSignalResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.SendSignalResponse;return proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new s.StringValue;t.readMessage(r,s.StringValue.deserializeBinaryFromReader),e.setSessionId(r);break;case 2:r=new s.Int64Value,t.readMessage(r,s.Int64Value.deserializeBinaryFromReader),e.setSessionCreatedTimestamp(r);break;default:t.skipField()}return e},proto.v1.signaling.api.SendSignalResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getSessionId())&&t.writeMessage(1,r,s.StringValue.serializeBinaryToWriter),null!=(r=e.getSessionCreatedTimestamp())&&t.writeMessage(2,r,s.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionId=function(){return n.Message.getWrapperField(this,s.StringValue,1)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionId=function(e){return n.Message.setWrapperField(this,1,e)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionId=function(){return null!=n.Message.getField(this,1)},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,2)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionCreatedTimestamp=function(e){return n.Message.setWrapperField(this,2,e)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionCreatedTimestamp=function(){return null!=n.Message.getField(this,2)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.toObject=function(e){return proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject(e,this)},proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject=function(e,t){var r={peerId:n.Message.getFieldWithDefault(t,1,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.ReceiveSignalStreamRequest;return proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setPeerId(r);break;default:t.skipField()}return e},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter=function(e,t){var r;(r=e.getPeerId()).length>0&&t.writeString(1,r)},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.setPeerId=function(e){return n.Message.setProto3StringField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.toObject=function(e){return proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject(e,this)},proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject=function(e,t){var r,n={signal:(r=t.getSignal())&&proto.v1.signaling.api.Signal.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.v1.signaling.api.ReceiveSignalStreamResponse;return proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader(r,t)},proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new proto.v1.signaling.api.Signal;t.readMessage(r,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),e.setSignal(r);break;default:t.skipField()}return e},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter=function(e,t){var r;null!=(r=e.getSignal())&&t.writeMessage(1,r,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.getSignal=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.setSignal=function(e){return n.Message.setWrapperField(this,1,e)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.hasSignal=function(){return null!=n.Message.getField(this,1)},proto.v1.signaling.api.SessionType={UNKNOWN:0,TELEOP:1,PORT_FORWARD:2},o.object.extend(t,proto.v1.signaling.api)},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?i(e):t}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return a(e,arguments,g(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)})(e)}function a(e,t,r){return(a=l()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(s,e);var t,r,n=(t=s,r=l(),function(){var e,n=g(t);if(r){var i=g(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return o(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),t=n.call(this,"Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ".concat(e.toString().split("\n")[0],"\n")),Error.captureStackTrace(i(t),s),t}return s}(s(Error));e.exports=function(e){if(e.length>2)throw new c(e);function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e}function r(e){return new t(e)}return t.prototype.transform=e,r.Format=t,r}},function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(a(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}})),l=n[r];r<i;l=n[++r])d(l)||!_(l)?s+=" "+l:s+=" "+a(l);return s},t.deprecate=function(r,n){if(void 0!==e&&!0===e.noDeprecation)return r;if(void 0===e)return function(){return t.deprecate(r,n).apply(this,arguments)};var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(n);e.traceDeprecation?console.trace(n):console.error(n),o=!0}return r.apply(this,arguments)}};var i,s={};function a(e,r){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),h(r)?n.showHidden=r:r&&t._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),g(n,e,n.depth)}function l(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function u(e,t){return e}function g(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return m(o)||(o=g(e,o,n)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var s,a=Object.keys(r),l=(s={},a.forEach((function(e,t){s[e]=!0})),s);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),w(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(r);if(0===a.length){if(E(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(v(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(w(r))return c(r)}var _,T="",A=!1,R=["{","}"];return p(r)&&(A=!0,R=["[","]"]),E(r)&&(T=" [Function"+(r.name?": "+r.name:"")+"]"),v(r)&&(T=" "+RegExp.prototype.toString.call(r)),S(r)&&(T=" "+Date.prototype.toUTCString.call(r)),w(r)&&(T=" "+c(r)),0!==a.length||A&&0!=r.length?n<0?v(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),_=A?function(e,t,r,n,o){for(var i=[],s=0,a=t.length;s<a;++s)j(t,String(s))?i.push(f(e,t,r,n,String(s),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(f(e,t,r,n,o,!0))})),i}(e,r,n,l,a):a.map((function(t){return f(e,r,n,l,t,A)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(_,T,R)):R[0]+T+R[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,o,i){var s,a,l;if((l=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),j(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(l.value)<0?(a=d(r)?g(e,l.value,null):g(e,l.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function d(e){return null===e}function y(e){return"number"==typeof e}function m(e){return"string"==typeof e}function b(e){return void 0===e}function v(e){return _(e)&&"[object RegExp]"===T(e)}function _(e){return"object"==typeof e&&null!==e}function S(e){return _(e)&&"[object Date]"===T(e)}function w(e){return _(e)&&("[object Error]"===T(e)||e instanceof Error)}function E(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(b(i)&&(i=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=e.pid;s[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else s[r]=function(){};return s[r]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=h,t.isNull=d,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=v,t.isObject=_,t.isDate=S,t.isError=w,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(106);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))},t.inherits=r(107),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var I="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(I&&e[I]){var t;if("function"!=typeof(t=e[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(s){r(s)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),I&&Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=I,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var o=r.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,s=function(){return o.apply(i,arguments)};t.apply(this,r).then((function(t){e.nextTick(s,null,t)}),(function(t){e.nextTick(C,t,s)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.defineProperties(r,n(t)),r}}).call(this,r(2))},function(e,t,r){r.d(t,"a",(function(){return n}));const n=e=>new Promise((t=>setTimeout(t,e||0)))},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(140),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(5))},function(e,t,r){(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,r)}));case 3:return t.nextTick((function(){e.call(null,r,n)}));case 4:return t.nextTick((function(){e.call(null,r,n,o)}));default:for(i=new Array(a-1),s=0;s<i.length;)i[s++]=arguments[s];return t.nextTick((function(){e.apply(null,i)}))}}}:e.exports=t}).call(this,r(2))},function(e,t,r){(function(e){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,r(4).Buffer)},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,r){var n=r(56),o=r(59).warn,i=t;i.version=r(137).version,i.transports=r(138),i.config=r(47),i.addColors=n.levels,i.format=n.format,i.createLogger=r(85),i.ExceptionHandler=r(86),i.RejectionHandler=r(90),i.Container=r(209),i.Transport=r(17),i.loggers=new i.Container;var s=i.createLogger();Object.keys(i.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((function(e){return i[e]=function(){return s[e].apply(s,arguments)}})),Object.defineProperty(i,"level",{get:function(){return s.level},set:function(e){s.level=e}}),Object.defineProperty(i,"exceptions",{get:function(){return s.exceptions}}),["exitOnError"].forEach((function(e){Object.defineProperty(i,e,{get:function(){return s[e]},set:function(t){s[e]=t}})})),Object.defineProperty(i,"default",{get:function(){return{exceptionHandlers:s.exceptionHandlers,rejectionHandlers:s.rejectionHandlers,transports:s.transports}}}),o.deprecated(i,"setLevels"),o.forFunctions(i,"useFormat",["cli"]),o.forProperties(i,"useFormat",["padLevels","stripColors"]),o.forFunctions(i,"deprecated",["addRewriter","addFilter","clone","extend"]),o.forProperties(i,"deprecated",["emitErrs","levelLength"]),o.moved(i,"createLogger","Logger")},function(e,t,r){var n=r(10),o=r(141),i=r(3).LEVEL,s=e.exports=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o.call(this,{objectMode:!0,highWaterMark:t.highWaterMark}),this.format=t.format,this.level=t.level,this.handleExceptions=t.handleExceptions,this.handleRejections=t.handleRejections,this.silent=t.silent,t.log&&(this.log=t.log),t.logv&&(this.logv=t.logv),t.close&&(this.close=t.close),this.once("pipe",(function(t){e.levels=t.levels,e.parent=t})),this.once("unpipe",(function(t){t===e.parent&&(e.parent=null,e.close&&e.close())}))};n.inherits(s,o),s.prototype._write=function(e,t,r){if(this.silent||!0===e.exception&&!this.handleExceptions)return r(null);var n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[i]]){if(e&&!this.format)return this.log(e,r);var o=void 0,s=void 0;try{s=this.format.transform(Object.assign({},e),this.format.options)}catch(a){o=a}if(o||!s){if(r(),o)throw o;return}return this.log(s,r)}return r(null)},s.prototype._writev=function(e,t){if(this.logv){var r=e.filter(this._accept,this);return r.length?this.logv(r,t):t(null)}for(var n=0;n<e.length;n++)if(this._accept(e[n]))if(!e[n].chunk||this.format){var o=void 0,i=void 0;try{i=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(s){o=s}if(o||!i){if(e[n].callback(),o)throw t(null),o}else this.log(i,e[n].callback)}else this.log(e[n].chunk,e[n].callback);return t(null)},s.prototype._accept=function(e){var t=e.chunk;if(this.silent)return!1;var r=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&r&&!(this.levels[r]>=this.levels[t[i]])||!this.handleExceptions&&!0===t.exception)},s.prototype._nop=function(){},e.exports.LegacyTransportStream=r(147)},function(e,t,r){var n,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function g(e,t,r,n){var o,i,s,a;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=u(e))>0&&s.length>o&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function c(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,i(this.listener,this.target,e))}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=c.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):d(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function d(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var u=l.length,g=d(l,u);for(r=0;r<u;++r)i(g[r],this,t)}return!0},a.prototype.addListener=function(e,t){return g(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return g(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,o,i,s;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){var n=r(146).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=g,this.end=c,t=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function g(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=s(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||-2===o?0:(o=s(t[n]))>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||-2===o?0:(o=s(t[n]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){var n=r(13),o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=r(14);i.inherits=r(6);var s=r(67),a=r(44);i.inherits(c,s);for(var l=o(a.prototype),u=0;u<l.length;u++){var g=l[u];c.prototype[g]||(c.prototype[g]=a.prototype[g])}function c(e){if(!(this instanceof c))return new c(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},function(e,t,r){e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,o=t.cmp&&(r=t.cmp,function(e){return function(t,n){var o={key:t,value:e[t]},i={key:n,value:e[n]};return r(o,i)}}),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,s;if(Array.isArray(t)){for(s="[",r=0;r<t.length;r++)r&&(s+=","),s+=e(t[r])||"null";return s+"]"}if(null===t)return"null";if(-1!==i.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=i.push(t)-1,l=Object.keys(t).sort(o&&o(t));for(s="",r=0;r<l.length;r++){var u=l[r],g=e(t[u]);g&&(s&&(s+=","),s+=JSON.stringify(u)+":"+g)}return i.splice(a,1),"{"+s+"}"}}(e)}},function(e,t,r){(function(t){function r(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var n="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},o=function(e){e=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof t&&t,e];for(var r=0;r<e.length;++r){var n=e[r];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);function i(e,t){if(t){var r=o;e=e.split(".");for(var i=0;i<e.length-1;i++){var s=e[i];s in r||(r[s]={}),r=r[s]}(t=t(i=r[e=e[e.length-1]]))!=i&&null!=t&&n(r,e,{configurable:!0,writable:!0,value:t})}}function s(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:r(e)}}i("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),i("Array.prototype.includes",(function(e){return e||function(e,t){var r=this;r instanceof String&&(r=String(r));var n=r.length;for(0>(t=t||0)&&(t=Math.max(t+n,0));t<n;t++){var o=r[t];if(o===e||Object.is(o,e))return!0}return!1}})),i("Promise",(function(e){function t(e){this.b=0,this.c=void 0,this.a=[];var t=this.f();try{e(t.resolve,t.reject)}catch(r){t.reject(r)}}function r(){this.a=null}function n(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;r.prototype.b=function(e){if(null==this.a){this.a=[];var t=this;this.c((function(){t.g()}))}this.a.push(e)};var i=o.setTimeout;r.prototype.c=function(e){i(e,0)},r.prototype.g=function(){for(;this.a&&this.a.length;){var e=this.a;this.a=[];for(var t=0;t<e.length;++t){var r=e[t];e[t]=null;try{r()}catch(n){this.f(n)}}}this.a=null},r.prototype.f=function(e){this.c((function(){throw e}))},t.prototype.f=function(){function e(e){return function(n){r||(r=!0,e.call(t,n))}}var t=this,r=!1;return{resolve:e(this.m),reject:e(this.g)}},t.prototype.m=function(e){if(e===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.o(e);else{e:switch(typeof e){case"object":var r=null!=e;break e;case"function":r=!0;break e;default:r=!1}r?this.l(e):this.h(e)}},t.prototype.l=function(e){var t=void 0;try{t=e.then}catch(r){return void this.g(r)}"function"==typeof t?this.u(t,e):this.h(e)},t.prototype.g=function(e){this.i(2,e)},t.prototype.h=function(e){this.i(1,e)},t.prototype.i=function(e,t){if(0!=this.b)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.b);this.b=e,this.c=t,this.j()},t.prototype.j=function(){if(null!=this.a){for(var e=0;e<this.a.length;++e)a.b(this.a[e]);this.a=null}};var a=new r;return t.prototype.o=function(e){var t=this.f();e.w(t.resolve,t.reject)},t.prototype.u=function(e,t){var r=this.f();try{e.call(t,r.resolve,r.reject)}catch(n){r.reject(n)}},t.prototype.then=function(e,r){function n(e,t){return"function"==typeof e?function(t){try{o(e(t))}catch(r){i(r)}}:t}var o,i,s=new t((function(e,t){o=e,i=t}));return this.w(n(e,o),n(r,i)),s},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.w=function(e,t){function r(){switch(n.b){case 1:e(n.c);break;case 2:t(n.c);break;default:throw Error("Unexpected state: "+n.b)}}var n=this;null==this.a?a.b(r):this.a.push(r)},t.resolve=n,t.reject=function(e){return new t((function(t,r){r(e)}))},t.race=function(e){return new t((function(t,r){for(var o=s(e),i=o.next();!i.done;i=o.next())n(i.value).w(t,r)}))},t.all=function(e){var r=s(e),o=r.next();return o.done?n([]):new t((function(e,t){function i(t){return function(r){s[t]=r,0==--a&&e(s)}}var s=[],a=0;do{s.push(void 0),a++,n(o.value).w(i(s.length-1),t),o=r.next()}while(!o.done)}))},t}));var a=a||{},l=this||self;function u(e,t){e=e.split("."),t=t||l;for(var r=0;r<e.length;r++)if(null==(t=t[e[r]]))return null;return t}function g(){}function c(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var r=Object.prototype.toString.call(e);if("[object Window]"==r)return"object";if("[object Array]"==r||"number"==typeof e.length&&void 0!==e.splice&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==r||void 0!==e.call&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&void 0===e.call)return"object";return t}function f(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function p(e,t,r){return e.call.apply(e.bind,arguments)}function h(e,t,r){if(!e)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var r=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(r,n),e.apply(t,r)}}return function(){return e.apply(t,arguments)}}function d(e,t,r){return(d=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?p:h).apply(null,arguments)}function y(e,t){function r(){}r.prototype=t.prototype,e.S=t.prototype,e.prototype=new r,e.prototype.constructor=e}function m(){this.a={}}function b(e,t,r,n){this.f=e,this.c=t,this.b=r,this.a=n}function v(e,t,r,n){r=void 0===r?{}:r,this.c=e,this.a=r,this.b=t,this.f=void 0===n?null:n}function _(e,t,r,n,o,i){this.name=e,this.a=o,this.b=i}function S(e,t,r){r=void 0===r?{}:r;var n=void 0===n?new m:n;return new b(t,e,r,n)}function w(e,t,r,n){return n instanceof _?n:new _(e,r,n.b||t.constructor,n.f,n.a,n.c)}function E(e){this.a=e}function T(e){switch(e){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code"}}function A(e){if(Error.captureStackTrace)Error.captureStackTrace(this,A);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e))}function R(e,t){for(var r="",n=(e=e.split("%s")).length-1,o=0;o<n;o++)r+=e[o]+(o<t.length?t[o]:"%s");A.call(this,r+e[n])}function O(){this.j=null,this.i=[],this.l=0,this.b=j,this.f=this.a=this.h=0,this.c=null,this.g=0}m.prototype.get=function(e){return this.a[e]},m.prototype.f=function(){return Object.keys(this.a)},b.prototype.getRequestMessage=function(){return this.f},b.prototype.getMethodDescriptor=function(){return this.c},b.prototype.getMetadata=function(){return this.b},b.prototype.getCallOptions=function(){return this.a},v.prototype.getResponseMessage=function(){return this.c},v.prototype.getMetadata=function(){return this.a},v.prototype.getMethodDescriptor=function(){return this.b},v.prototype.getStatus=function(){return this.f},E.prototype.on=function(e,t){return"data"==e||"error"==e?this:this.a.on(e,t)},E.prototype.removeListener=function(e,t){return this.a.removeListener(e,t)},E.prototype.cancel=function(){this.a.cancel()},y(A,Error),A.prototype.name="CustomError",y(R,A),R.prototype.name="AssertionError";var j=0,I=128;function C(e,t,r,n){throw e.b=3,e.j="The stream is broken @"+e.l+"/"+r+". Error: "+n+". With input:\n"+t,Error(e.j)}var M,P=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(var r=0;r<e.length;r++)if(r in e&&e[r]===t)return r;return-1},N=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function x(e,t){return-1!=e.indexOf(t)}function L(e,t){return e<t?-1:e>t?1:0}e:{var U=l.navigator;if(U){var B=U.userAgent;if(B){M=B;break e}}M=""}var D="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function k(e){var t=1;e=e.split(":");for(var r=[];0<t&&e.length;)r.push(e.shift()),t--;return e.length&&r.push(e.join(":")),r}function F(e){return F[" "](e),e}F[" "]=g;var W,V,H=x(M,"Opera"),z=x(M,"Trident")||x(M,"MSIE"),G=x(M,"Edge"),q=x(M,"Gecko")&&!(x(M.toLowerCase(),"webkit")&&!x(M,"Edge"))&&!(x(M,"Trident")||x(M,"MSIE"))&&!x(M,"Edge"),Y=x(M.toLowerCase(),"webkit")&&!x(M,"Edge");function $(){var e=l.document;return e?e.documentMode:void 0}e:{var Z="",K=(V=M,q?/rv:([^\);]+)(\)|;)/.exec(V):G?/Edge\/([\d\.]+)/.exec(V):z?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(V):Y?/WebKit\/(\S+)/.exec(V):H?/(?:Version)[ \/]?(\S+)/.exec(V):void 0);if(K&&(Z=K?K[1]:""),z){var J=$();if(null!=J&&J>parseFloat(Z)){W=String(J);break e}}W=Z}var X={};function Q(e){return t=e,r=X,Object.prototype.hasOwnProperty.call(r,t)?r[t]:r[t]=function(){for(var t=0,r=N(String(W)).split("."),n=N(String(e)).split("."),o=Math.max(r.length,n.length),i=0;0==t&&i<o;i++){var s=r[i]||"",a=n[i]||"";do{if(s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],0==s[0].length&&0==a[0].length)break;t=L(0==s[1].length?0:parseInt(s[1],10),0==a[1].length?0:parseInt(a[1],10))||L(0==s[2].length,0==a[2].length)||L(s[2],a[2]),s=s[3],a=a[3]}while(0==t)}return 0<=t}();var t,r}var ee=l.document&&z&&($()||parseInt(W,10))||void 0;function te(){this.F=this.F}te.prototype.F=!1;var re,ne=Object.freeze||function(e){return e};(re=!z)||(re=9<=Number(ee));var oe=re,ie=z&&!Q("9"),se=function(){if(!l.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{l.addEventListener("test",g,t),l.removeEventListener("test",g,t)}catch(r){}return e}();function ae(e,t){this.type=e,this.a=this.target=t,this.defaultPrevented=!1}function le(e,t){if(ae.call(this,e?e.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,e){var r=this.type=e.type,n=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.a=t,t=e.relatedTarget){if(q){e:{try{F(t.nodeName);var o=!0;break e}catch(i){}o=!1}o||(t=null)}}else"mouseover"==r?t=e.fromElement:"mouseout"==r&&(t=e.toElement);this.relatedTarget=t,n?(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:ue[e.pointerType]||"",this.c=e,e.defaultPrevented&&this.b()}}ae.prototype.b=function(){this.defaultPrevented=!0},y(le,ae);var ue=ne({2:"touch",3:"pen",4:"mouse"});le.prototype.b=function(){le.S.b.call(this);var e=this.c;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,ie)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(t){}};var ge="closure_listenable_"+(1e6*Math.random()|0),ce=0;function fe(e,t,r,n,o){this.listener=e,this.proxy=null,this.src=t,this.type=r,this.capture=!!n,this.A=o,this.key=++ce,this.s=this.v=!1}function pe(e){e.s=!0,e.listener=null,e.proxy=null,e.src=null,e.A=null}function he(e){this.src=e,this.a={},this.b=0}function de(e,t){var r=t.type;if(r in e.a){var n,o=e.a[r],i=P(o,t);(n=0<=i)&&Array.prototype.splice.call(o,i,1),n&&(pe(t),0==e.a[r].length&&(delete e.a[r],e.b--))}}function ye(e,t,r,n){for(var o=0;o<e.length;++o){var i=e[o];if(!i.s&&i.listener==t&&i.capture==!!r&&i.A==n)return o}return-1}he.prototype.add=function(e,t,r,n,o){var i=e.toString();(e=this.a[i])||(e=this.a[i]=[],this.b++);var s=ye(e,t,n,o);return-1<s?(t=e[s],r||(t.v=!1)):((t=new fe(t,this.src,i,!!n,o)).v=r,e.push(t)),t};var me="closure_lm_"+(1e6*Math.random()|0),be={};function ve(e,t,r,n,o){if(n&&n.once)!function e(t,r,n,o,i){if(Array.isArray(r))for(var s=0;s<r.length;s++)e(t,r[s],n,o,i);else n=je(n),t&&t[ge]?t.f.add(String(r),n,!0,f(o)?!!o.capture:!!o,i):_e(t,r,n,!0,o,i)}(e,t,r,n,o);else if(Array.isArray(t))for(var i=0;i<t.length;i++)ve(e,t[i],r,n,o);else r=je(r),e&&e[ge]?e.f.add(String(t),r,!1,f(n)?!!n.capture:!!n,o):_e(e,t,r,!1,n,o)}function _e(e,t,r,n,o,i){if(!t)throw Error("Invalid event type");var s,a,l=f(o)?!!o.capture:!!o,u=Re(e);if(u||(e[me]=u=new he(e)),!(r=u.add(t,r,n,l,i)).proxy)if(s=Ae,n=a=oe?function(e){return s.call(a.src,a.listener,e)}:function(e){if(!(e=s.call(a.src,a.listener,e)))return e},r.proxy=n,n.src=e,n.listener=r,e.addEventListener)se||(o=l),void 0===o&&(o=!1),e.addEventListener(t.toString(),n,o);else if(e.attachEvent)e.attachEvent(we(t.toString()),n);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(n)}}function Se(e){if("number"!=typeof e&&e&&!e.s){var t=e.src;if(t&&t[ge])de(t.f,e);else{var r=e.type,n=e.proxy;t.removeEventListener?t.removeEventListener(r,n,e.capture):t.detachEvent?t.detachEvent(we(r),n):t.addListener&&t.removeListener&&t.removeListener(n),(r=Re(t))?(de(r,e),0==r.b&&(r.src=null,t[me]=null)):pe(e)}}}function we(e){return e in be?be[e]:be[e]="on"+e}function Ee(e,t,r,n){var o=!0;if((e=Re(e))&&(t=e.a[t.toString()]))for(t=t.concat(),e=0;e<t.length;e++){var i=t[e];i&&i.capture==r&&!i.s&&(i=Te(i,n),o=o&&!1!==i)}return o}function Te(e,t){var r=e.listener,n=e.A||e.src;return e.v&&Se(e),r.call(n,t)}function Ae(e,t){if(e.s)return!0;if(!oe){var r=t||u("window.event");t=new le(r,this);var n=!0;if(!(0>r.keyCode||null!=r.returnValue)){e:{var o=!1;if(0==r.keyCode)try{r.keyCode=-1;break e}catch(s){o=!0}(o||null==r.returnValue)&&(r.returnValue=!0)}for(r=[],o=t.a;o;o=o.parentNode)r.push(o);for(e=e.type,o=r.length-1;0<=o;o--){t.a=r[o];var i=Ee(r[o],e,!0,t);n=n&&i}for(o=0;o<r.length;o++)t.a=r[o],i=Ee(r[o],e,!1,t),n=n&&i}return n}return Te(e,new le(t,this))}function Re(e){return(e=e[me])instanceof he?e:null}var Oe="__closure_events_fn_"+(1e9*Math.random()>>>0);function je(e){return"function"==c(e)?e:(e[Oe]||(e[Oe]=function(t){return e.handleEvent(t)}),e[Oe])}function Ie(){te.call(this),this.f=new he(this),this.N=this}function Ce(e,t){e=e.N;var r=t.type||t;if("string"==typeof t)t=new ae(t,e);else if(t instanceof ae)t.target=t.target||e;else{var n=t;!function(e,t){for(var r,n,o=1;o<arguments.length;o++){for(r in n=arguments[o])e[r]=n[r];for(var i=0;i<D.length;i++)r=D[i],Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}}(t=new ae(r,e),n)}Me(e=t.a=e,r,!0,t),Me(e,r,!1,t)}function Me(e,t,r,n){if(t=e.f.a[String(t)]){t=t.concat();for(var o=!0,i=0;i<t.length;++i){var s=t[i];if(s&&!s.s&&s.capture==r){var a=s.listener,l=s.A||s.src;s.v&&de(e.f,s),o=!1!==a.call(l,n)&&o}}}}function Pe(e,t,r){if("function"==c(e))r&&(e=d(e,r));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=d(e.handleEvent,e)}return 2147483647<Number(t)?-1:l.setTimeout(e,t||0)}function Ne(e,t,r){this.reset(e,t,r,void 0,void 0)}function xe(e){this.f=e,this.b=this.c=this.a=null}function Le(e,t){this.name=e,this.value=t}y(Ie,te),Ie.prototype[ge]=!0,Ie.prototype.addEventListener=function(e,t,r,n){ve(this,e,t,r,n)},Ie.prototype.removeEventListener=function(e,t,r,n){!function e(t,r,n,o,i){if(Array.isArray(r))for(var s=0;s<r.length;s++)e(t,r[s],n,o,i);else o=f(o)?!!o.capture:!!o,n=je(n),t&&t[ge]?(t=t.f,(r=String(r).toString())in t.a&&-1<(n=ye(s=t.a[r],n,o,i))&&(pe(s[n]),Array.prototype.splice.call(s,n,1),0==s.length&&(delete t.a[r],t.b--))):t&&(t=Re(t))&&(r=t.a[r.toString()],t=-1,r&&(t=ye(r,n,o,i)),(n=-1<t?r[t]:null)&&Se(n))}(this,e,t,r,n)},Ne.prototype.a=null,Ne.prototype.reset=function(e,t,r,n,o){delete this.a},Le.prototype.toString=function(){return this.name};var Ue=new Le("SEVERE",1e3),Be=new Le("CONFIG",700),De=new Le("FINE",500);function ke(e){return e.c?e.c:e.a?ke(e.a):(function(e,t){throw new R("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}("Root logger has no level set."),null)}xe.prototype.log=function(e,t,r){if(e.value>=ke(this).value)for("function"==c(t)&&(t=t()),e=new Ne(e,String(t),this.f),r&&(e.a=r),r=this;r;)r=r.a};var Fe,We={},Ve=null;function He(e,t){e&&e.log(De,t,void 0)}function ze(){}function Ge(e){var t;return(t=e.a)||(t={},$e(e)&&(t[0]=!0,t[1]=!0),t=e.a=t),t}function qe(){}function Ye(e){return(e=$e(e))?new ActiveXObject(e):new XMLHttpRequest}function $e(e){if(!e.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],r=0;r<t.length;r++){var n=t[r];try{return new ActiveXObject(n),e.b=n}catch(o){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return e.b}function Ze(e,t){this.b={},this.a=[],this.c=0;var r=arguments.length;if(1<r){if(r%2)throw Error("Uneven number of arguments");for(var n=0;n<r;n+=2)this.set(arguments[n],arguments[n+1])}else e&&Je(this,e)}function Ke(e){if(e.c!=e.a.length){for(var t=0,r=0;t<e.a.length;){var n=e.a[t];Xe(e.b,n)&&(e.a[r++]=n),t++}e.a.length=r}if(e.c!=e.a.length){var o={};for(r=t=0;t<e.a.length;)Xe(o,n=e.a[t])||(e.a[r++]=n,o[n]=1),t++;e.a.length=r}}function Je(e,t){if(t instanceof Ze)for(var r=t.f(),n=0;n<r.length;n++)e.set(r[n],t.get(r[n]));else for(r in t)e.set(r,t[r])}function Xe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}ze.prototype.a=null,y(qe,ze),Fe=new qe,Ze.prototype.f=function(){return Ke(this),this.a.concat()},Ze.prototype.get=function(e,t){return Xe(this.b,e)?this.b[e]:t},Ze.prototype.set=function(e,t){Xe(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},Ze.prototype.forEach=function(e,t){for(var r=this.f(),n=0;n<r.length;n++){var o=r[n],i=this.get(o);e.call(t,i,o,this)}};var Qe=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function et(e){Ie.call(this),this.headers=new Ze,this.D=e||null,this.c=!1,this.C=this.a=null,this.J=this.o="",this.g=0,this.i="",this.h=this.I=this.m=this.G=!1,this.l=0,this.u=null,this.j=tt,this.B=this.H=!1}y(et,Ie);var tt="",rt=et.prototype,nt=function e(t){var r;if(Ve||(Ve=new xe(""),We[""]=Ve,Ve.c=Be),!(r=We[t])){r=new xe(t);var n=t.lastIndexOf("."),o=t.substr(n+1);(n=e(t.substr(0,n))).b||(n.b={}),n.b[o]=r,r.a=n,We[t]=r}return r}("goog.net.XhrIo");rt.b=nt;var ot=/^https?$/i,it=["POST","PUT"];function st(e){return"content-type"==e.toLowerCase()}function at(e,t){e.c=!1,e.a&&(e.h=!0,e.a.abort(),e.h=!1),e.i=t,e.g=5,lt(e),gt(e)}function lt(e){e.G||(e.G=!0,Ce(e,"complete"),Ce(e,"error"))}function ut(e){if(e.c&&void 0!==a)if(e.C[1]&&4==ft(e)&&2==e.getStatus())He(e.b,ht(e,"Local request error detected and ignored"));else if(e.m&&4==ft(e))Pe(e.K,0,e);else if(Ce(e,"readystatechange"),4==ft(e)){He(e.b,ht(e,"Request complete")),e.c=!1;try{var t,r=e.getStatus();e:switch(r){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var n=!0;break e;default:n=!1}if(!(t=n)){var o;if(o=0===r){var i=String(e.o).match(Qe)[1]||null;if(!i&&l.self&&l.self.location){var s=l.self.location.protocol;i=s.substr(0,s.length-1)}o=!ot.test(i?i.toLowerCase():"")}t=o}if(t)Ce(e,"complete"),Ce(e,"success");else{e.g=6;try{var u=2<ft(e)?e.a.statusText:""}catch(g){He(e.b,"Can not get status: "+g.message),u=""}e.i=u+" ["+e.getStatus()+"]",lt(e)}}finally{gt(e)}}}function gt(e){if(e.a){ct(e);var t=e.a,r=e.C[0]?g:null;e.a=null,e.C=null,Ce(e,"ready");try{t.onreadystatechange=r}catch(n){(e=e.b)&&e.log(Ue,"Problem encountered resetting onreadystatechange: "+n.message,void 0)}}}function ct(e){e.a&&e.B&&(e.a.ontimeout=null),e.u&&(l.clearTimeout(e.u),e.u=null)}function ft(e){return e.a?e.a.readyState:0}function pt(e,t){if(e.a&&4==ft(e))return null===(e=e.a.getResponseHeader(t))?void 0:e}function ht(e,t){return t+" ["+e.J+" "+e.o+" "+e.getStatus()+"]"}et.prototype.L=function(){void 0!==a&&this.a&&(this.i="Timed out after "+this.l+"ms, aborting",this.g=8,He(this.b,ht(this,this.i)),Ce(this,"timeout"),this.abort(8))},et.prototype.abort=function(e){this.a&&this.c&&(He(this.b,ht(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.g=e||7,Ce(this,"complete"),Ce(this,"abort"),gt(this))},et.prototype.K=function(){this.F||(this.I||this.m||this.h?ut(this):this.O())},et.prototype.O=function(){ut(this)},et.prototype.getStatus=function(){try{return 2<ft(this)?this.a.status:-1}catch(e){return-1}};var dt={},yt=null;function mt(){if(!yt){yt={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));dt[r]=n;for(var o=0;o<n.length;o++){var i=n[o];void 0===yt[i]&&(yt[i]=o)}}}}var bt=["content-type","grpc-status","grpc-message"];function vt(e){this.a=e.T,this.l=null,this.b=[],this.h=[],this.g=[],this.f=[],this.c=[],this.j=!1,this.i=0,this.m=new O;var t=this;ve(this.a,"readystatechange",(function(){var e=t.a;if(e=e.a?e.a.getResponseHeader("Content-Type"):null){if(0==(e=e.toLowerCase()).lastIndexOf("application/grpc-web-text",0)){e=t.a;try{var r=e.a?e.a.responseText:""}catch(l){He(e.b,"Can not get responseText: "+l.message),r=""}if(r=(e=r||"").length-e.length%4,0==(e=e.substr(t.i,r-t.i)).length)return;t.i=r,e=function(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):x("=.",e[t-1])&&(r=x("=.",e[t-2])?r-2:r-1);var n=new Uint8Array(r),o=0;return function(e,t){function r(t){for(;n<e.length;){var r=e.charAt(n++),o=yt[r];if(null!=o)return o;if(!/^[\s\xa0]*$/.test(r))throw Error("Unknown base64 encoding at char: "+r)}return t}mt();for(var n=0;;){var o=r(-1),i=r(0),s=r(64),a=r(64);if(64===a&&-1===o)break;t(o<<2|i>>4),64!=s&&(t(i<<4&240|s>>2),64!=a&&t(s<<6&192|a))}}(e,(function(e){n[o++]=e})),n.subarray(0,o)}(e)}else{if(0!=e.lastIndexOf("application/grpc",0))return void St(t,{code:2,message:"Unknown Content-type received.",metadata:{}});e=new Uint8Array(function(e){try{if(!e.a)return null;if("response"in e.a)return e.a.response;switch(e.j){case tt:case"text":return e.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.a)return e.a.mozResponseArrayBuffer}var t=e.b;return t&&t.log(Ue,"Response type "+e.j+" is not supported on this browser",void 0),null}catch(r){return He(e.b,"Can not get response: "+r.message),null}}(t.a))}r=null;try{r=function(e,t){function r(e){a.c[a.g++]=e,a.g==a.a&&n()}function n(){var e={};e[a.h]=a.c,a.i.push(e),a.b=j}var o,i,s,a=e,l=0;for(o=t instanceof Uint8Array||t instanceof Array?t:new Uint8Array(t);l<o.length;){switch(a.b){case 3:C(a,o,l,"stream already broken");break;case j:0==(i=o[l])||i==I?a.h=i:C(a,o,l,"invalid frame byte"),a.b=1,a.a=0,a.f=0;break;case 1:s=o[l],a.f++,a.a=(a.a<<8)+s,4==a.f&&(a.b=2,a.g=0,"undefined"!=typeof Uint8Array?a.c=new Uint8Array(a.a):a.c=Array(a.a),0==a.a&&n());break;case 2:r(o[l]);break;default:throw Error("unexpected parser state: "+a.b)}a.l++,l++}return e=a.i,a.i=[],0<e.length?e:null}(t.m,e)}catch(u){St(t,{code:2,message:"Error in parsing response body",metadata:{}})}if(r)for(e=0;e<r.length;e++){if(0 in r[e]){var n=r[e][0];if(n)try{var o=t.l(n);if(o){n=t;for(var i=o,s=0;s<n.b.length;s++)n.b[s](i)}}catch(u){St(t,{code:2,message:"Error in response deserializer function.",metadata:{}})}}if(I in r[e]&&0<r[e][I].length){for(n="",i=0;i<r[e][I].length;i++)n+=String.fromCharCode(r[e][I][i]);for(n=n.trim().split("\r\n"),i={},s=0;s<n.length;s++){var a=n[s].indexOf(":");i[n[s].substring(0,a).trim()]=n[s].substring(a+1).trim()}n=i,i=0,s="","grpc-status"in n&&(i=n["grpc-status"],delete n["grpc-status"]),"grpc-message"in n&&(s=n["grpc-message"],delete n["grpc-message"]),St(t,{code:Number(i),message:s,metadata:n})}}}})),ve(this.a,"complete",(function(){var e=t.a.g,r="",n={},o=function(e){var t={};e=(e.a&&4==ft(e)&&e.a.getAllResponseHeaders()||"").split("\r\n");for(var r=0;r<e.length;r++)if(!/^[\s\xa0]*$/.test(e[r])){var n=k(e[r]),o=n[0];if("string"==typeof(n=n[1])){n=n.trim();var i=t[o]||[];t[o]=i,i.push(n)}}return function(e,t){var r,n={};for(r in e)n[r]=t.call(void 0,e[r],r,e);return n}(t,(function(e){return e.join(", ")}))}(t.a);if(Object.keys(o).forEach((function(e){bt.includes(e)||(n[e]=o[e])})),function(e,t){for(var r=0;r<e.g.length;r++)e.g[r](t)}(t,n),0!=e){switch(e){case 7:var i=10;break;case 8:i=4;break;case 6:i=function(e){switch(e){case 200:return 0;case 400:return 3;case 401:return 16;case 403:return 7;case 404:return 5;case 409:return 10;case 412:return 9;case 429:return 8;case 499:return 1;case 500:return 2;case 501:return 12;case 503:return 14;case 504:return 4;default:return 2}}(t.a.getStatus());break;default:i=14}10==i&&t.j||St(t,{code:i,message:T(e),metadata:{}})}else e=!1,"grpc-status"in o&&(i=pt(t.a,"grpc-status"),"grpc-message"in o&&(r=pt(t.a,"grpc-message")),0!=Number(i)&&(St(t,{code:Number(i),message:r,metadata:o}),e=!0)),e||function(e){for(var t=0;t<e.c.length;t++)e.c[t]()}(t)}))}function _t(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function St(e,t){if(0!=t.code)for(var r={code:t.code,message:decodeURIComponent(t.message||""),metadata:t.metadata},n=0;n<e.f.length;n++)e.f[n](r);for(t={code:t.code,details:decodeURIComponent(t.message||""),metadata:t.metadata},r=0;r<e.h.length;r++)e.h[r](t)}function wt(e){this.a=u("format",e)||"text",this.f=u("suppressCorsPreflight",e)||!1,this.c=u("withCredentials",e)||!1,this.b=u("streamInterceptors",e)||[],this.g=u("unaryInterceptors",e)||[]}function Et(e,t,r){var n=t.getMethodDescriptor(),o=r+n.name;(r=new et).H=e.c;var i,s=new vt({T:r});if(s.l=n.b,Je(r.headers,t.getMetadata()),"text"==e.a?(r.headers.set("Content-Type","application/grpc-web-text"),r.headers.set("Accept","application/grpc-web-text")):r.headers.set("Content-Type","application/grpc-web+proto"),r.headers.set("X-User-Agent","grpc-web-javascript/0.1"),r.headers.set("X-Grpc-Web","1"),Xe(r.headers.b,"deadline")){var a=r.headers.get("deadline");a=Math.round(a-(new Date).getTime());var u=r.headers;Xe(u.b,"deadline")&&(delete u.b.deadline,u.c--,u.a.length>2*u.c&&Ke(u)),1/0===a&&(a=0),0<a&&r.headers.set("grpc-timeout",a+"m")}if(e.f){Ke(u=r.headers),a={};for(var g=0;g<u.a.length;g++){var c=u.a[g];a[c]=u.b[c]}(u=r.headers).b={},u.a.length=0,u.c=0;e:{for(f in a){var f=!1;break e}f=!0}f||(i="",function(e,t){for(var r in e)t.call(void 0,e[r],r,e)}(a,(function(e,t){i+=t,i+=":",i+=e,i+="\r\n"})),a=i,"string"==typeof o?(f=encodeURIComponent("$httpHeaders"),(f+=a=null!=a?"="+encodeURIComponent(String(a)):"")&&(0>(a=o.indexOf("#"))&&(a=o.length),0>(u=o.indexOf("?"))||u>a?(u=a,g=""):g=o.substring(u+1,a),a=(o=[o.substr(0,u),g,o.substr(a)])[1],o[1]=f?a?a+"&"+f:f:a,o=o[0]+(o[1]?"?"+o[1]:"")+o[2])):o.a("$httpHeaders",a))}for(n=(t=(0,n.a)(t.getRequestMessage())).length,f=[0,0,0,0],a=new Uint8Array(5+n),u=3;0<=u;u--)f[u]=n%256,n>>>=8;if(a.set(new Uint8Array(f),1),a.set(t,5),t=a,"text"==e.a){var p;for(e=t,void 0===p&&(p=0),mt(),p=dt[p],t=[],n=0;n<e.length;n+=3){c=e[n];var h=(f=n+1<e.length)?e[n+1]:0;u=c>>2,c=(3&c)<<4|h>>4,h=(15&h)<<2|(g=(a=n+2<e.length)?e[n+2]:0)>>6,g&=63,a||(g=64,f||(h=64)),t.push(p[u],p[c],p[h]||"",p[g]||"")}t=t.join("")}else"binary"==e.a&&(r.j="arraybuffer");return function(e,t,r){if(e.a)throw Error("[goog.net.XhrIo] Object is active with another request="+e.o+"; newUri="+t);e.o=t,e.i="",e.g=0,e.J="POST",e.G=!1,e.c=!0,e.a=e.D?Ye(e.D):Ye(Fe),e.C=e.D?Ge(e.D):Ge(Fe),e.a.onreadystatechange=d(e.K,e);try{He(e.b,ht(e,"Opening Xhr")),e.I=!0,e.a.open("POST",String(t),!0),e.I=!1}catch(i){return He(e.b,ht(e,"Error opening Xhr: "+i.message)),void at(e,i)}t=r||"";var n,o=function(e){e:{for(var t=st,r=e.length,n="string"==typeof e?e.split(""):e,o=0;o<r;o++)if(o in n&&t.call(void 0,n[o],o,e)){t=o;break e}t=-1}return 0>t?null:"string"==typeof e?e.charAt(t):e[t]}((r=new Ze(e.headers)).f()),s=l.FormData&&t instanceof l.FormData;!(0<=P(it,"POST"))||o||s||r.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),r.forEach((function(e,t){this.a.setRequestHeader(t,e)}),e),e.j&&(e.a.responseType=e.j),"withCredentials"in e.a&&e.a.withCredentials!==e.H&&(e.a.withCredentials=e.H);try{ct(e),0<e.l&&(e.B=(n=e.a,z&&Q(9)&&"number"==typeof n.timeout&&void 0!==n.ontimeout),He(e.b,ht(e,"Will abort after "+e.l+"ms if incomplete, xhr2 "+e.B)),e.B?(e.a.timeout=e.l,e.a.ontimeout=d(e.L,e)):e.u=Pe(e.L,e.l,e)),He(e.b,ht(e,"Sending request")),e.m=!0,e.a.send(t),e.m=!1}catch(i){He(e.b,ht(e,"Send error: "+i.message)),at(e,i)}}(r,o,t),s}function Tt(e,t,r){var n=null,o=!1;e.on("data",(function(e){n=e})),e.on("error",(function(e){0==e.code||o||(o=!0,t(e,null))})),e.on("status",(function(e){0==e.code||o?r&&t(null,null,e):(o=!0,t({code:e.code,message:e.details,metadata:e.metadata},null))})),r&&e.on("metadata",(function(e){t(null,null,null,e)})),e.on("end",(function(){o||(null==n?t({code:2,message:"Incomplete response"}):t(null,n)),r&&t(null,null)}))}function At(e,t){var r=e;return t.forEach((function(e){var t=r;r=function(r){return e.intercept(r,t)}})),r}vt.prototype.on=function(e,t){return"data"==e?this.b.push(t):"status"==e?this.h.push(t):"metadata"==e?this.g.push(t):"end"==e?this.c.push(t):"error"==e&&this.f.push(t),this},vt.prototype.removeListener=function(e,t){return"data"==e?_t(this.b,t):"status"==e?_t(this.h,t):"metadata"==e?_t(this.g,t):"end"==e?_t(this.c,t):"error"==e&&_t(this.f,t),this},vt.prototype.cancel=function(){this.j=!0,this.a.abort()},vt.prototype.cancel=vt.prototype.cancel,vt.prototype.removeListener=vt.prototype.removeListener,vt.prototype.on=vt.prototype.on,wt.prototype.P=function(e,t,r,n,o){var i=this;n=w(e,t,"unary",n);var s=e.substr(0,e.length-n.name.length);return Tt(e=At((function(e){return Et(i,e,s)}),this.b).call(this,S(n,t,r)),o,!1),new E(e)},wt.prototype.M=function(e,t,r,n){var o=this;n=w(e,t,"unary",n);var i=e.substr(0,e.length-n.name.length);return At((function(e){return new Promise((function(t,r){var n,s,a;Tt(Et(o,e,i),(function(o,i,l,u){o?r(o):i?a=i:l?s=l:u?n=u:(o=e.getMethodDescriptor(),t(new v(a,o,i=void 0===(i=n)?{}:i,void 0===s?null:s)))}),!0)}))}),this.g).call(this,S(n,t,r)).then((function(e){return e.getResponseMessage()}))},wt.prototype.unaryCall=function(e,t,r,n){return this.M(e,t,r,n)},wt.prototype.R=function(e,t,r,n){var o=this;n=w(e,t,"server_streaming",n);var i=e.substr(0,e.length-n.name.length);return At((function(e){return Et(o,e,i)}),this.b).call(this,S(n,t,r))},wt.prototype.serverStreaming=wt.prototype.R,wt.prototype.unaryCall=wt.prototype.unaryCall,wt.prototype.thenableCall=wt.prototype.M,wt.prototype.rpcCall=wt.prototype.P,e.exports.AbstractClientBase={MethodInfo:function(e,t,r,n,o){this.name=n,this.b=o,this.f=e,this.a=t,this.c=r}},e.exports.GrpcWebClientBase=wt,e.exports.StatusCode={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,UNAUTHENTICATED:16,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15},e.exports.MethodDescriptor=_,e.exports.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming"}}).call(this,r(5))},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=t.isAsyncGenerator=t.isAsync=void 0;var n,o=(n=r(151))&&n.__esModule?n:{default:n};function i(e){return"AsyncFunction"===e[Symbol.toStringTag]}t.default=function(e){if("function"!=typeof e)throw new Error("expected a function");return i(e)?(0,o.default)(e):e},t.isAsync=i,t.isAsyncGenerator=function(e){return"AsyncGenerator"===e[Symbol.toStringTag]},t.isAsyncIterable=function(e){return"function"==typeof e[Symbol.asyncIterator]}},function(e,t,r){var n={};function o(e,t,r){r||(r=Error);var o=function(e){var r,n;function o(r,n,o){return e.call(this,(i=r,s=n,a=o,"string"==typeof t?t:t(i,s,a)))||this;var i,s,a}return n=e,(r=o).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,o}(r);o.prototype.name=r.name,o.prototype.code=e,n[e]=o}function i(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,o,s,a,l,u;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(n="must not be",t=t.replace(/^not /,"")):n="must be",a=e,l=" argument",(void 0===u||u>a.length)&&(u=a.length),a.substring(u-l.length,u)===l)s="The ".concat(e," ").concat(n," ").concat(i(t,"type"));else{var g=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";s='The "'.concat(e,'" ').concat(g," ").concat(n," ").concat(i(t,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},function(e,t,r){(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var o=r(75),i=r(79);r(6)(u,o);for(var s=n(i.prototype),a=0;a<s.length;a++){var l=s[a];u.prototype[l]||(u.prototype[l]=i.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);o.call(this,e),i.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",g)))}function g(){this._writableState.ended||t.nextTick(c,this)}function c(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,r(2))},function(e,t,r){r.d(t,"a",(function(){return s}));var n=r(36),o=r(7);const i={"app-id":["app-id must match formant/*"]};class s extends n.a{constructor(e,t={}){super(e,Object.assign({validateHeaders:e=>`${e.get("app-id")}`.startsWith("formant/")?{}:i,headers:Object.assign(Object.assign({},s.headers),{"App-ID":`formant/${o.a}`,"App-Version":o.j})},t)),this.endpoint=e}}s.headers={}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[t-1]?e.apply(this,r):new Promise(((n,o)=>{r[t-1]=(e,...t)=>{if(e)return o(e);n(t.length>1?t:t[0])},e.apply(this,r)}))}},e.exports=t.default},function(e,t,r){(t=e.exports=r(67)).Stream=t,t.Readable=t,t.Writable=r(44),t.Duplex=r(20),t.Transform=r(70),t.PassThrough=r(164)},function(e,t,r){(t=e.exports=r(75)).Stream=t,t.Readable=t,t.Writable=r(79),t.Duplex=r(25),t.Transform=r(80),t.PassThrough=r(183),t.finished=r(45),t.pipeline=r(184)},function(e,t,r){r.d(t,"a",(function(){return o}));const n=["password","secret","token","key","buffer"];function o(e,t=new Set){return t.has(e)?"[ RECURSIVE ]":!(r=e)||"object"!=typeof r&&"function"!=typeof r?e:(t.add(e),Object.keys(e).reduce(((r,i)=>(r[i]=n.some((e=>i.toLowerCase().includes(e.toLowerCase())))?"[ REDACTED ]":o(e[i],t),r)),{}));var r}},function(e,t){e.exports=n,n.default=n,n.stable=i,n.stableStringify=i;var r=[];function n(e,t,n){!function e(t,n,o,i){var s;if("object"==typeof t&&null!==t){for(s=0;s<o.length;s++)if(o[s]===t)return i[n]="[Circular]",void r.push([i,n,t]);if(o.push(t),Array.isArray(t))for(s=0;s<t.length;s++)e(t[s],s,o,t);else{var a=Object.keys(t);for(s=0;s<a.length;s++){var l=a[s];e(t[l],l,o,t)}}o.pop()}}(e,"",[],void 0);for(var o=JSON.stringify(e,t,n);0!==r.length;){var i=r.pop();i[0][i[1]]=i[2]}return o}function o(e,t){return e<t?-1:e>t?1:0}function i(e,t,n){for(var i=function e(t,n,i,s){var a;if("object"==typeof t&&null!==t){for(a=0;a<i.length;a++)if(i[a]===t)return s[n]="[Circular]",void r.push([s,n,t]);if("function"==typeof t.toJSON)return;if(i.push(t),Array.isArray(t))for(a=0;a<t.length;a++)e(t[a],a,i,t);else{var l={},u=Object.keys(t).sort(o);for(a=0;a<u.length;a++){var g=u[a];e(t[g],g,i,t),l[g]=t[g]}if(void 0===s)return l;r.push([s,n,t]),s[n]=l}i.pop()}}(e,"",[],void 0)||e,s=JSON.stringify(i,t,n);0!==r.length;){var a=r.pop();a[0][a[1]]=a[2]}return s}},function(e,t,r){var n=r(13),o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=Object.create(r(14));i.inherits=r(6);var s=r(142),a=r(60);i.inherits(c,s);for(var l=o(a.prototype),u=0;u<l.length;u++){var g=l[u];c.prototype[g]||(c.prototype[g]=a.prototype[g])}function c(e){if(!(this instanceof c))return new c(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)o(r,n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),o);else for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){var t,r,n,o,i,s;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),o=0,t=0,r=e.length;t<r;t++)i=e[t],s.set(i,o),o+=i.length;return s}},s={arraySet:function(e,t,r,n,o){for(var i=0;i<n;i++)e[o+i]=t[r+i]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(n)},function(e,t,r){e.exports=r(185)},function(e,t,r){e.exports=function(e){return e}},function(e,t,r){r.d(t,"a",(function(){return y}));var n=r(11),o=r(0);function i(e,t,r=(()=>!0)){if(e instanceof t&&r(e))return e;throw e}var s=r(1),a=r(100),l=r.n(a),u=r(101),g=r.n(u);class c extends Error{constructor(e,t,r){super(`Connection failure: ${e.message}`),this.cause=e,this.url=t,this.retryable=r}}var f=r(30);class p extends Error{constructor(e,t,r,n,o={},i){super(`Unexpected response (${r}) for ${e} ${t}: ${JSON.stringify(i?Object(f.a)([...i.entries()].reduce(((e,[t,r])=>(e[t]=r,e)),{})):{})} -- ${JSON.stringify(Object(f.a)(n))}`),this.method=e,this.url=t,this.statusCode=r,this.body=n,this.validationErrors=o,this.headers=i}}class h extends Error{constructor(e,t){super(`Invalid headers (${JSON.stringify(e)}) for response: ${t.message}`),this.validationErrors=e,this.responseError=t}}var d=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class y{constructor(e,t={}){if(this.endpoint=e,this.validateHeaders=e=>t.validateHeaders?t.validateHeaders(e):{},this.verbose=!1!==t.verbose,this.retries=void 0!==t.retries?t.retries:y.retries,this.headers=t.headers||{},this.timeoutMs=t.timeoutMs,!(this.retries>=0))throw new Error("retries must be positive or zero");if(void 0!==this.timeoutMs&&!(this.timeoutMs>0))throw new Error("timeoutMs must be positive")}fetch(e,t={}){return d(this,void 0,void 0,(function*(){return(yield this.fetchVerbose(e,t)).body}))}fetchVerbose(e,t={}){return d(this,void 0,void 0,(function*(){let r=100*s.a.millisecond,a=0;const l=void 0!==this.timeoutMs?(new Date).getTime()+this.timeoutMs:void 0,u=l?()=>Math.max(l-(new Date).getTime(),0):void 0;for(;;)try{return yield this.doFetch(e,t,u)}catch(g){const e=i(g,c);if(0===(null==u?void 0:u())||a===this.retries||!e.retryable&&!t.allowUnsafeRetries)throw e;a++,r*=2+.1*(Math.random()-.5),yield Object(n.a)(u?Math.min(r,u()):r),this.verbose&&o.a.warn(`Connection failure, retrying. Error: ${g.cause.message}`,{url:g.url,error:g.cause})}}))}doFetch(e,t,r){return d(this,void 0,void 0,(function*(){const{token:n,json:a}=t,u=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["token","json"]),f=(u.method||"GET").toUpperCase(),d="POST"!==f&&"PATCH"!==f,m=void 0!==this.endpoint?`${this.endpoint}${e?`/${e}`:""}`:e,b=new l.a;let v;if(r){const e=r();e>0?v=setTimeout((()=>{b.abort()}),e):b.abort()}try{let e;yield Promise.race([y.waitForConnectivity(),new Promise((t=>{e=setTimeout(t,r?Math.min(s.a.minute,r()):s.a.minute)}))]),e&&clearTimeout(e);const t=yield g()(m,Object.assign(Object.assign({},u),{headers:Object.assign(Object.assign(Object.assign(Object.assign({},!1!==a?{"Content-Type":"application/json"}:{}),this.headers),u.headers||{}),void 0!==n?{Authorization:`Bearer ${n}`}:{}),signal:b.signal})),i=t.headers.get("content-type")||"",l=i&&i.startsWith("application/json"),c=l?yield t.json():yield t.text(),d=()=>new p(f,m,t.status,c,c&&c.validationErrors||{},t.headers);if(!t.ok)throw this.verbose&&o.a[t.status>=500?"warn":"info"]("Response error",{method:f,url:m,statusCode:t.status}),d();const _=this.validateHeaders(t.headers);if(0!==Object.keys(_).length)throw new h(_,d());if(204===t.status)return{body:void 0,headers:t.headers};if(a&&!l)throw new Error(`Response is not JSON: ${JSON.stringify(c)}`);return{body:c,headers:t.headers}}catch(_){if("Network request failed"===_.message)throw new c(_,m,d);if("system"===_.type&&["EAI_AGAIN","ECONNREFUSED","EHOSTUNREACH","ENOTFOUND"].find((e=>e===_.code)))throw new c(_,m,!0);if("system"===_.type&&["ETIMEDOUT","ECONNRESET","ESOCKETTIMEDOUT","EPIPE"].find((e=>e===_.code)))throw new c(_,m,d);if("AbortError"===_.name)throw new c(_,m,d);const e=i(_,p),{statusCode:t}=e;if(408===t||429===t||502===t||503===t||504===t)throw this.verbose&&!d&&o.a.warn("Potentially unsafe retry"),new c(_,m,!0);const r=this.validateHeaders(e.headers);if(0!==Object.keys(r).length)throw new h(r,e);throw yield y.onResponseError(e),_}finally{v&&clearTimeout(v)}}))}}y.retries=8,y.waitForConnectivity=()=>d(void 0,void 0,void 0,(function*(){})),y.onResponseError=()=>d(void 0,void 0,void 0,(function*(){}))},function(e,t,r){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=r(57),s=r(3),a=s.LEVEL,l=s.MESSAGE;i.enabled=!0;var u=/\s+/,g=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),t.colors&&this.addColors(t.colors),this.options=t}var t,r,s;return t=e,s=[{key:"addColors",value:function(t){var r=Object.keys(t).reduce((function(e,r){return e[r]=u.test(t[r])?t[r].split(u):t[r],e}),{});return e.allColors=Object.assign({},e.allColors||{},r),e.allColors}}],(r=[{key:"addColors",value:function(t){return e.addColors(t)}},{key:"colorize",value:function(t,r,n){if(void 0===n&&(n=r),!Array.isArray(e.allColors[t]))return i[e.allColors[t]](n);for(var o=0,s=e.allColors[t].length;o<s;o++)n=i[e.allColors[t][o]](n);return n}},{key:"transform",value:function(e,t){return t.all&&"string"==typeof e[l]&&(e[l]=this.colorize(e[a],e.level,e[l])),(t.level||t.all||!t.message)&&(e.level=this.colorize(e[a],e.level)),(t.all||t.message)&&(e.message=this.colorize(e[a],e.level,e.message)),e}}])&&o(t.prototype,r),s&&o(t,s),e}();e.exports=function(e){return new g(e)},e.exports.Colorizer=e.exports.Format=g},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(n){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(5))},function(e,t,r){var n=r(4),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},function(e,t,r){var n=r(4),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){(function(t,n,o){var i=r(13);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(void 0),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var a,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:i.nextTick;b.WritableState=m;var u=r(14);u.inherits=r(6);var g,c={deprecate:r(39)},f=r(68),p=r(43).Buffer,h=o.Uint8Array||function(){},d=r(69);function y(){}function m(e,t){a=a||r(20),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,g=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(u||0===u)?u:g,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r,n=e._writableState,o=n.sync,s=n.writecb;if((r=n).writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),T(e,t))}(e,n,o,t,s);else{var a=w(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||S(e,n),o?l(_,e,n,a,s):_(e,n,a,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(e){if(a=a||r(20),!(g.call(b,this)||this instanceof a))return new b(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function v(e,t,r,n,o,i,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function _(e,t,r,n){var o,i;r||(o=e,0===(i=t).length&&i.needDrain&&(i.needDrain=!1,o.emit("drain"))),t.pendingcb--,n(),T(e,t)}function S(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),i=t.corkedRequestsFree;i.entry=r;for(var a=0,l=!0;r;)o[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;o.allBuffers=l,v(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,g=r.encoding,c=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,g,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var r,n,o=w(t);return o&&(r=e,(n=t).prefinished||n.finalCalled||("function"==typeof r._final?(n.pendingcb++,n.finalCalled=!0,i.nextTick(E,r,n)):(n.prefinished=!0,r.emit("prefinish"))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),o}u.inherits(b,f),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(g=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!g.call(this,e)||this===b&&e&&e._writableState instanceof m}})):g=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,o,s=this._writableState,a=!1,l=!s.objectMode&&(n=e,p.isBuffer(n)||n instanceof h);return l&&!p.isBuffer(e)&&(o=e,e=p.from(o)),"function"==typeof t&&(r=t,t=null),l?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=y),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(l||function(e,t,r,n){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(n,s),o=!1),o}(this,s,e,r))&&(s.pendingcb++,a=function(e,t,r,n,o,i){if(!r){var s=(l=n,u=o,(a=t).objectMode||!1===a.decodeStrings||"string"!=typeof l||(l=p.from(l,u)),l);n!==s&&(r=!0,o="buffer",n=s)}var a,l,u,g=t.objectMode?1:n.length;t.length+=g;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:i,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else v(e,t,!1,g,n,o,i);return c}(this,s,l,e,t,r)),a},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||S(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n,o,s,a=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||a.finished||(n=this,s=r,(o=a).ending=!0,T(n,o),s&&(o.finished?i.nextTick(s):n.once("finish",s)),o.ended=!0,n.writable=!1)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=d.destroy,b.prototype._undestroy=d.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(2),r(12).setImmediate,r(5))},function(e,t,r){var n=r(24).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);var s,a;r||(r={}),s=i||o,a=!1,i=function(){if(!a){a=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];s.apply(this,t)}};var l=r.readable||!1!==r.readable&&t.readable,u=r.writable||!1!==r.writable&&t.writable,g=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){u=!1,c=!0,l||i.call(t)},p=t._readableState&&t._readableState.endEmitted,h=function(){l=!1,p=!0,u||i.call(t)},d=function(e){i.call(t,e)},y=function(){var e;return l&&!p?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):u&&!c?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},m=function(){t.req.on("finish",f)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",f),t.on("abort",y),t.req?m():t.on("request",m)):u&&!t._writableState&&(t.on("end",g),t.on("close",g)),t.on("end",h),t.on("finish",f),!1!==r.error&&t.on("error",d),t.on("close",y),function(){t.removeListener("complete",f),t.removeListener("abort",y),t.removeListener("request",m),t.req&&t.req.removeListener("finish",f),t.removeListener("end",g),t.removeListener("close",g),t.removeListener("finish",f),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",y)}}},function(e,t,r){var n=r(193),o=r(195);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return o.isString(e)&&(e=v(e)),e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),g=["'"].concat(u),c=["%","/","?",";","#"].concat(g),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(196);function v(e,t,r){if(e&&o.isObject(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),a=-1!==i&&i<e.indexOf("#")?"?":"#",u=e.split(a);u[0]=u[0].replace(/\\/g,"/");var v=e=u.join(a);if(v=v.trim(),!r&&1===e.split("#").length){var _=l.exec(v);if(_)return this.path=v,this.href=v,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var S=s.exec(v);if(S){var w=(S=S[0]).toLowerCase();this.protocol=w,v=v.substr(S.length)}if(r||S||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===v.substr(0,2);!E||S&&y[S]||(v=v.substr(2),this.slashes=!0)}if(!y[S]&&(E||S&&!m[S])){for(var T,A,R=-1,O=0;O<f.length;O++)-1!==(j=v.indexOf(f[O]))&&(-1===R||j<R)&&(R=j);for(-1!==(A=-1===R?v.lastIndexOf("@"):v.lastIndexOf("@",R))&&(T=v.slice(0,A),v=v.slice(A+1),this.auth=decodeURIComponent(T)),R=-1,O=0;O<c.length;O++){var j;-1!==(j=v.indexOf(c[O]))&&(-1===R||j<R)&&(R=j)}-1===R&&(R=v.length),this.host=v.slice(0,R),v=v.slice(R),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var C=this.hostname.split(/\./),M=(O=0,C.length);O<M;O++){var P=C[O];if(P&&!P.match(p)){for(var N="",x=0,L=P.length;x<L;x++)P.charCodeAt(x)>127?N+="x":N+=P[x];if(!N.match(p)){var U=C.slice(0,O),B=C.slice(O+1),D=P.match(h);D&&(U.push(D[1]),B.unshift(D[2])),B.length&&(v="/"+B.join(".")+v),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=n.toASCII(this.hostname));var k=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+k,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!d[w])for(O=0,M=g.length;O<M;O++){var W=g[O];if(-1!==v.indexOf(W)){var V=encodeURIComponent(W);V===W&&(V=escape(W)),v=v.split(W).join(V)}}var H=v.indexOf("#");-1!==H&&(this.hash=v.substr(H),v=v.slice(0,H));var z=v.indexOf("?");if(-1!==z?(this.search=v.substr(z),this.query=v.substr(z+1),t&&(this.query=b.parse(this.query)),v=v.slice(0,z)):t&&(this.search="",this.query={}),v&&(this.pathname=v),m[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var G=this.search||"";this.path=k+G}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,s="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(s=b.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var r=new i,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),u=0;u<l.length;u++){var g=l[u];"protocol"!==g&&(r[g]=e[g])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var c=Object.keys(e),f=0;f<c.length;f++){var p=c[f];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||y[e.protocol])r.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),r.pathname=h.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var d=r.pathname||"",b=r.search||"";r.path=d+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),S=_||v||r.host&&e.pathname,w=S,E=r.pathname&&r.pathname.split("/")||[],T=(h=e.pathname&&e.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(T&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),S=S&&(""===h[0]||""===E[0])),_)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,E=h;else if(h.length)E||(E=[]),E.pop(),E=E.concat(h),r.search=e.search,r.query=e.query;else if(!o.isNullOrUndefined(e.search))return T&&(r.hostname=r.host=E.shift(),(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=E.slice(-1)[0],R=(r.host||e.host||E.length>1)&&("."===A||".."===A)||""===A,O=0,j=E.length;j>=0;j--)"."===(A=E[j])?E.splice(j,1):".."===A?(E.splice(j,1),O++):O&&(E.splice(j,1),O--);if(!S&&!w)for(;O--;O)E.unshift("..");!S||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),R&&"/"!==E.join("/").substr(-1)&&E.push("");var I,C=""===E[0]||E[0]&&"/"===E[0].charAt(0);return T&&(r.hostname=r.host=C?"":E.length?E.shift():"",(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),(S=S||r.host&&E.length)&&!C&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){var n=r(56),o=r(3).configs;t.cli=n.levels(o.cli),t.npm=n.levels(o.npm),t.syslog=n.levels(o.syslog),t.addColors=n.levels},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(202)),o=a(r(203)),i=a(r(23)),s=a(r(27));function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.default)((function(e,t,r){return(0,n.default)(e,(0,o.default)((0,i.default)(t)),r)}),3),e.exports=t.default},function(e,t,r){function n(e){Error.captureStackTrace(this,this.constructor),this.name="EnvVarError",this.message=`env-var: ${e}`}(0,r(10).inherits)(n,Error),e.exports=n},function(e,t,r){e.exports=function(e){const t=parseInt(e,10);if(isNaN(t)||-1!==e.toString().indexOf("."))throw new Error("should be a valid integer");return t}},function(e,t,r){e.exports=function(e){const t=parseFloat(e);if(isNaN(t))throw new Error("should be a valid float");return t}},function(e,t,r){e.exports=function(e){try{return JSON.parse(e)}catch(t){throw new Error("should be valid (parseable) JSON")}}},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}t.resolve=function(){for(var t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,o="/"===s.charAt(0))}return(o?"/":"")+(t=r(n(t.split("/"),(function(e){return!!e})),!o).join("/"))||"."},t.normalize=function(e){var i=t.isAbsolute(e),s="/"===o(e,-1);return(e=r(n(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var o=n(e.split("/")),i=n(r.split("/")),s=Math.min(o.length,i.length),a=s,l=0;l<s;l++)if(o[l]!==i[l]){a=l;break}var u=[];for(l=a;l<o.length;l++)u.push("..");return(u=u.concat(i.slice(a))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){n=i;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){r=t+1;break}}else-1===n&&(o=!1,n=t+1);return-1===n?"":e.slice(r,n)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,o=!0,i=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(o=!1,n=s+1),46===a?-1===t?t=s:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){r=s+1;break}}return-1===t||-1===n||0===i||1===i&&t===n-1&&t===r+1?"":e.slice(t,n)};var o="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,r(2))},function(e,t){function r(e,t){var r=[],n=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]"}),function(o,i){if(r.length>0){var s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?n.splice(s,1/0,o):n.push(o),~r.indexOf(i)&&(i=t.call(this,o,i))}else r.push(i);return null==e?i:e.call(this,o,i)}}(e.exports=function(e,t,n,o){return JSON.stringify(e,r(t,o),n)}).getSerialize=r},function(e,t,r){r(227),e.exports={encode:e=>(new TextEncoder).encode(e),decode:e=>(new TextDecoder).decode(e)}},function(e,t,r){var n=t.format=r(9);t.levels=r(104),Object.defineProperty(n,"align",{value:r(121)}),Object.defineProperty(n,"cli",{value:r(122)}),Object.defineProperty(n,"combine",{value:r(123)}),Object.defineProperty(n,"colorize",{value:r(37)}),Object.defineProperty(n,"json",{value:r(124)}),Object.defineProperty(n,"label",{value:r(127)}),Object.defineProperty(n,"logstash",{value:r(128)}),Object.defineProperty(n,"metadata",{value:r(129)}),Object.defineProperty(n,"padLevels",{value:r(58)}),Object.defineProperty(n,"prettyPrint",{value:r(130)}),Object.defineProperty(n,"printf",{value:r(131)}),Object.defineProperty(n,"simple",{value:r(132)}),Object.defineProperty(n,"splat",{value:r(133)}),Object.defineProperty(n,"timestamp",{value:r(134)}),Object.defineProperty(n,"uncolorize",{value:r(136)})},function(e,t,r){var n=r(105);e.exports=n},function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=r(3),a=s.configs,l=s.LEVEL,u=s.MESSAGE,g=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{levels:a.npm.levels};o(this,e),this.paddings=e.paddingForLevels(t.levels,t.filler),this.options=t}var t,r,s;return t=e,s=[{key:"getLongestLevel",value:function(e){var t=Object.keys(e).map((function(e){return e.length}));return Math.max.apply(Math,function(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t))}},{key:"paddingForLevel",value:function(e,t,r){var n=r+1-e.length,o=Math.floor(n/t.length);return"".concat(t).concat(t.repeat(o)).slice(0,n)}},{key:"paddingForLevels",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",n=e.getLongestLevel(t);return Object.keys(t).reduce((function(t,o){return t[o]=e.paddingForLevel(o,r,n),t}),{})}}],(r=[{key:"transform",value:function(e,t){return e.message="".concat(this.paddings[e[l]]).concat(e.message),e[u]&&(e[u]="".concat(this.paddings[e[l]]).concat(e[u])),e}}])&&i(t.prototype,r),s&&i(t,s),e}();e.exports=function(e){return new g(e)},e.exports.Padder=e.exports.Format=g},function(e,t,r){var n=r(10).format;t.warn={deprecated:function(e){return function(){throw new Error(n("{ %s } was removed in winston@3.0.0.",e))}},useFormat:function(e){return function(){throw new Error([n("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join("\n"))}},forFunctions:function(e,r,n){n.forEach((function(n){e[n]=t.warn[r](n)}))},moved:function(e,t,r){function o(){return function(){throw new Error([n("winston.%s was moved in winston@3.0.0.",r),n("Use a winston.%s instead.",t)].join("\n"))}}Object.defineProperty(e,r,{get:o,set:o})},forProperties:function(e,r,n){n.forEach((function(n){var o=t.warn[r](n);Object.defineProperty(e,n,{get:o,set:o})}))}}},function(e,t,r){(function(t,n,o){var i=r(13);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(void 0),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var a,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:i.nextTick;b.WritableState=m;var u=Object.create(r(14));u.inherits=r(6);var g,c={deprecate:r(39)},f=r(61),p=r(40).Buffer,h=o.Uint8Array||function(){},d=r(62);function y(){}function m(e,t){a=a||r(32),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,g=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(u||0===u)?u:g,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r,n=e._writableState,o=n.sync,s=n.writecb;if((r=n).writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),T(e,t))}(e,n,o,t,s);else{var a=w(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||S(e,n),o?l(_,e,n,a,s):_(e,n,a,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(e){if(a=a||r(32),!(g.call(b,this)||this instanceof a))return new b(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function v(e,t,r,n,o,i,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function _(e,t,r,n){var o,i;r||(o=e,0===(i=t).length&&i.needDrain&&(i.needDrain=!1,o.emit("drain"))),t.pendingcb--,n(),T(e,t)}function S(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),i=t.corkedRequestsFree;i.entry=r;for(var a=0,l=!0;r;)o[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;o.allBuffers=l,v(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,g=r.encoding,c=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,g,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var r,n,o=w(t);return o&&(r=e,(n=t).prefinished||n.finalCalled||("function"==typeof r._final?(n.pendingcb++,n.finalCalled=!0,i.nextTick(E,r,n)):(n.prefinished=!0,r.emit("prefinish"))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),o}u.inherits(b,f),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(g=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!g.call(this,e)||this===b&&e&&e._writableState instanceof m}})):g=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,o,s=this._writableState,a=!1,l=!s.objectMode&&(n=e,p.isBuffer(n)||n instanceof h);return l&&!p.isBuffer(e)&&(o=e,e=p.from(o)),"function"==typeof t&&(r=t,t=null),l?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=y),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(l||function(e,t,r,n){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(n,s),o=!1),o}(this,s,e,r))&&(s.pendingcb++,a=function(e,t,r,n,o,i){if(!r){var s=(l=n,u=o,(a=t).objectMode||!1===a.decodeStrings||"string"!=typeof l||(l=p.from(l,u)),l);n!==s&&(r=!0,o="buffer",n=s)}var a,l,u,g=t.objectMode?1:n.length;t.length+=g;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:i,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else v(e,t,!1,g,n,o,i);return c}(this,s,l,e,t,r)),a},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||S(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n,o,s,a=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||a.finished||(n=this,s=r,(o=a).ending=!0,T(n,o),s&&(o.finished?i.nextTick(s):n.once("finish",s)),o.ended=!0,n.writable=!1)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=d.destroy,b.prototype._undestroy=d.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(2),r(12).setImmediate,r(5))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){var n=r(13);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(o,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t){},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(155)),o=s(r(23)),i=s(r(27));function s(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((function(e,t,r,i){return(0,n.default)(t)(e,(0,o.default)(r),i)}),4),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(...t){if(null!==e){var r=e;e=null,r.apply(this,t)}}return Object.assign(t,e),t},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}},e.exports=t.default},function(e,t,r){(function(t,n){var o=r(13);e.exports=v;var i,s=r(38);v.ReadableState=b,r(18).EventEmitter;var a=function(e,t){return e.listeners(t).length},l=r(68),u=r(43).Buffer,g=t.Uint8Array||function(){},c=r(14);c.inherits=r(6);var f=r(161),p=void 0;p=f&&f.debuglog?f.debuglog("stream"):function(){};var h,d=r(162),y=r(69);c.inherits(v,l);var m=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var n=t instanceof(i=i||r(20));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=r(19).StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function v(e){if(i=i||r(20),!(this instanceof v))return new v(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function _(e,t,r,n,o){var i,s,a,l,c,f=e._readableState;return null===t?(f.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}}(e,f)):(o||(s=f,c=a=t,u.isBuffer(c)||c instanceof g||"string"==typeof a||void 0===a||s.objectMode||(l=new TypeError("Invalid non-string/buffer chunk")),i=l),i?e.emit("error",i):f.objectMode||t&&t.length>0?("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?f.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):S(e,f,t,!0):f.ended?e.emit("error",new Error("stream.push() after EOF")):(f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?S(e,f,t,!1):A(e,f)):S(e,f,t,!1))):n||(f.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(f)}function S(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&E(e)),A(e,t)}function w(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=((r=e)>=8388608?r=8388608:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(T,e):T(e))}function T(e){p("emit readable"),e.emit("readable"),I(e)}function A(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(R,e,t))}function R(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function O(e){p("readable nexttick read 0"),e.read(0)}function j(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?s=t.buffer.shift():!e||e>=t.length?(s=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):(r=e,n=t.buffer,o=t.decoder,r<n.head.data.length?(i=n.head.data.slice(0,r),n.head.data=n.head.data.slice(r)):i=r===n.head.data.length?n.shift():o?function(e,t){var r=t.head,n=1,o=r.data;for(e-=o.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(s===i.length?o+=i:o+=i.slice(0,e),0==(e-=s)){s===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(s));break}++n}return t.length-=n,o}(r,n):function(e,t){var r=u.allocUnsafe(e),n=t.head,o=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,s),0==(e-=s)){s===i.length?(++o,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(s));break}++o}return t.length-=o,r}(r,n),s=i),s);var r,n,o,i,s}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(P,t,e))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function N(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},v.prototype.unshift=function(e){return _(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return h||(h=r(19).StringDecoder),this._readableState.decoder=new h(e),this._readableState.encoding=e,this},v.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):E(this),null;if(0===(e=w(e,t))&&t.ended)return 0===t.length&&M(this),null;var n,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",o=!0),t.ended||t.reading?p("reading or ended",o=!1):o&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=w(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&M(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var l=t&&!1===t.end||e===n.stdout||e===n.stderr?v:u;function u(){p("onend"),e.end()}i.endEmitted?o.nextTick(l):r.once("end",l),e.on("unpipe",(function t(n,o){p("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",y),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",v),r.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var g,c=(g=r,function(){var e=g._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(g,"data")&&(e.flowing=!0,I(g))});e.on("drain",c);var f=!1,h=!1;function d(t){p("ondata"),h=!1,!1!==e.write(t)||h||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==N(i.pipes,e))&&!f&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,h=!0),r.pause())}function y(t){p("onerror",t),v(),e.removeListener("error",y),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",b),v()}function b(){p("onfinish"),e.removeListener("close",m),v()}function v(){p("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",m),e.once("finish",b),e.emit("pipe",r),i.flowing||(p("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,r);return this}var s=N(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},v.prototype.on=function(e,t){var r=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&E(this):o.nextTick(O,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(p("resume"),r.flowing=!0,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,o.nextTick(j,e,t))),this},v.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(p("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){p("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<m.length;i++)e.on(m[i],this.emit.bind(this,m[i]));return this._read=function(t){p("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=C}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){var n=r(13);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(o,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,r){e.exports=s;var n=r(20),o=r(14);function i(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);n.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){l(e,t,r)})):l(this,null,null)}function l(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}o.inherits=r(6),o.inherits(s,n),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},function(e,t,r){e.exports=r(44)},function(e,t,r){(function(t){var n=r(169);function o(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}function i(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var s=r(10),a=Object.prototype.hasOwnProperty,l=Array.prototype.slice,u="foo"===function(){}.name;function g(e){return Object.prototype.toString.call(e)}function c(e){return!i(e)&&"function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var f=e.exports=b,p=/\s*function\s+([^\(\s]*)\s*/;function h(e){if(s.isFunction(e)){if(u)return e.name;var t=e.toString().match(p);return t&&t[1]}}function d(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function y(e){if(u||!s.isFunction(e))return s.inspect(e);var t=h(e);return"[Function"+(t?": "+t:"")+"]"}function m(e,t,r,n,o){throw new f.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:o})}function b(e,t){e||m(e,!0,t,"==",f.ok)}function v(e,t,r,n){if(e===t)return!0;if(i(e)&&i(t))return 0===o(e,t);if(s.isDate(e)&&s.isDate(t))return e.getTime()===t.getTime();if(s.isRegExp(e)&&s.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(c(e)&&c(t)&&g(e)===g(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===o(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==a&&a===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(s.isPrimitive(e)||s.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=_(e),i=_(t);if(o&&!i||!o&&i)return!1;if(o)return v(e=l.call(e),t=l.call(t),r);var a,u,g=E(e),c=E(t);if(g.length!==c.length)return!1;for(g.sort(),c.sort(),u=g.length-1;u>=0;u--)if(g[u]!==c[u])return!1;for(u=g.length-1;u>=0;u--)if(!v(e[a=g[u]],t[a],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function S(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(r){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,r,n){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),o=function(e){var t;try{e()}catch(r){t=r}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!o&&m(o,r,"Missing expected exception"+n);var i="string"==typeof n,a=!e&&o&&!r;if((!e&&s.isError(o)&&i&&S(o,r)||a)&&m(o,r,"Got unwanted exception"+n),e&&o&&r&&!S(o,r)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(y((t=this).actual),128)+" "+t.operator+" "+d(y(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var o=n.stack,i=h(r),s=o.indexOf("\n"+i);if(s>=0){var a=o.indexOf("\n",s+1);o=o.substring(a+1)}this.stack=o}}},s.inherits(f.AssertionError,Error),f.fail=m,f.ok=b,f.equal=function(e,t,r){e!=t&&m(e,t,r,"==",f.equal)},f.notEqual=function(e,t,r){e==t&&m(e,t,r,"!=",f.notEqual)},f.deepEqual=function(e,t,r){v(e,t,!1)||m(e,t,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,r){v(e,t,!0)||m(e,t,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,r){v(e,t,!1)&&m(e,t,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,r,n){v(t,r,!0)&&m(t,r,n,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,r){e!==t&&m(e,t,r,"===",f.strictEqual)},f.notStrictEqual=function(e,t,r){e===t&&m(e,t,r,"!==",f.notStrictEqual)},f.throws=function(e,t,r){w(!0,e,t,r)},f.doesNotThrow=function(e,t,r){w(!1,e,t,r)},f.ifError=function(e){if(e)throw e},f.strict=n((function e(t,r){t||m(t,!0,r,"==",e)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var E=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}}).call(this,r(5))},function(e,t,r){e.exports=function(e,t,r,n){for(var o=65535&e|0,i=e>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{i=i+(o=o+t[n++]|0)|0}while(--s);o%=65521,i%=65521}return o|i<<16|0}},function(e,t,r){var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t,r,o){var i=n,s=o+r;e^=-1;for(var a=o;a<s;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}},function(e,t,r){(function(t,n){var o;e.exports=A,A.ReadableState=T,r(18).EventEmitter;var i,s=function(e,t){return e.listeners(t).length},a=r(76),l=r(4).Buffer,u=t.Uint8Array||function(){},g=r(178);i=g&&g.debuglog?g.debuglog("stream"):function(){};var c,f,p,h=r(179),d=r(77),y=r(78).getHighWaterMark,m=r(24).codes,b=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,_=m.ERR_METHOD_NOT_IMPLEMENTED,S=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(6)(A,a);var w=d.errorOrDestroy,E=["error","close","destroy","pause","resume"];function T(e,t,n){o=o||r(25),e=e||{},"boolean"!=typeof n&&(n=t instanceof o),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",n),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(c||(c=r(19).StringDecoder),this.decoder=new c(e.encoding),this.encoding=e.encoding)}function A(e){if(o=o||r(25),!(this instanceof A))return new A(e);var t=this instanceof o;this._readableState=new T(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function R(e,t,r,n,o){i("readableAddChunk",t);var s,a,g,c,f,p=e._readableState;if(null===t)p.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?I(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,C(e)))}}(e,p);else if(o||(a=p,f=g=t,l.isBuffer(f)||f instanceof u||"string"==typeof g||void 0===g||a.objectMode||(c=new b("chunk",["string","Buffer","Uint8Array"],g)),s=c),s)w(e,s);else if(p.objectMode||t&&t.length>0)if("string"==typeof t||p.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),n)p.endEmitted?w(e,new S):O(e,p,t,!0);else if(p.ended)w(e,new v);else{if(p.destroyed)return!1;p.reading=!1,p.decoder&&!r?(t=p.decoder.write(t),p.objectMode||0!==t.length?O(e,p,t,!1):M(e,p)):O(e,p,t,!1)}else n||(p.reading=!1,M(e,p));return!p.ended&&(p.length<p.highWaterMark||0===p.length)}function O(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&I(e)),M(e,t)}function j(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=((r=e)>=1073741824?r=1073741824:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function I(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(C,e))}function C(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function N(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function x(e){i("readable nexttick read 0"),e.read(0)}function L(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(k,t,e))}function k(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function F(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=d.destroy,A.prototype._undestroy=d.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=l.from(e,t),t=""),r=!0),R(this,e,t,!1,r)},A.prototype.unshift=function(e){return R(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){c||(c=r(19).StringDecoder);var t=new c(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,o="";null!==n;)o+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==o&&this._readableState.buffer.push(o),this._readableState.length=o.length,this},A.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):I(this),null;if(0===(e=j(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=j(r,t))),null===(n=e>0?B(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){w(this,new _("_read()"))},A.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,i("pipe count=%d opts=%j",o.pipesCount,t);var a=t&&!1===t.end||e===n.stdout||e===n.stderr?y:l;function l(){i("onend"),e.end()}o.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",(function t(n,s){i("onunpipe"),n===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,i("cleanup"),e.removeListener("close",h),e.removeListener("finish",d),e.removeListener("drain",g),e.removeListener("error",p),e.removeListener("unpipe",t),r.removeListener("end",l),r.removeListener("end",y),r.removeListener("data",f),c=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||g())}));var u,g=(u=r,function(){var e=u._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(u,"data")&&(e.flowing=!0,U(u))});e.on("drain",g);var c=!1;function f(t){i("ondata");var n=e.write(t);i("dest.write",n),!1===n&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==F(o.pipes,e))&&!c&&(i("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause())}function p(t){i("onerror",t),y(),e.removeListener("error",p),0===s(e,"error")&&w(e,t)}function h(){e.removeListener("finish",d),y()}function d(){i("onfinish"),e.removeListener("close",h),y()}function y(){i("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",h),e.once("finish",d),e.emit("pipe",r),o.flowing||(i("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},A.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,i("on readable",o.length,o.reading),o.length?I(this):o.reading||n.nextTick(x,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(N,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(N,this),t},A.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(i("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,n.nextTick(L,e,t))),r.paused=!1,this},A.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s<E.length;s++)e.on(E[s],this.emit.bind(this,E[s]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(181)),f(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=B,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===p&&(p=r(182)),p(A,e,t)})}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){(function(t){function r(e,t){o(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var s=this,a=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return a||l?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(o,this,e)):t.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?s._writableState?s._writableState.errorEmitted?t.nextTick(n,s):(s._writableState.errorEmitted=!0,t.nextTick(r,s,e)):t.nextTick(r,s,e):i?(t.nextTick(n,s),i(e)):t.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,r(2))},function(e,t,r){var n=r(24).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var i,s,a,l=(s=o,a=r,null!=(i=t).highWaterMark?i.highWaterMark:s?i[a]:null);if(null!=l){if(!isFinite(l)||Math.floor(l)!==l||l<0)throw new n(o?r:"highWaterMark",l);return Math.floor(l)}return e.objectMode?16:16384}}},function(e,t,r){(function(t,n){function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(void 0),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=A,A.WritableState=T;var s,a={deprecate:r(39)},l=r(76),u=r(4).Buffer,g=t.Uint8Array||function(){},c=r(77),f=r(78).getHighWaterMark,p=r(24).codes,h=p.ERR_INVALID_ARG_TYPE,d=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,m=p.ERR_STREAM_CANNOT_PIPE,b=p.ERR_STREAM_DESTROYED,v=p.ERR_STREAM_NULL_VALUES,_=p.ERR_STREAM_WRITE_AFTER_END,S=p.ERR_UNKNOWN_ENCODING,w=c.errorOrDestroy;function E(){}function T(e,t,s){i=i||r(25),e=e||{},"boolean"!=typeof s&&(s=t instanceof i),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r,o=e._writableState,i=o.sync,s=o.writecb;if("function"!=typeof s)throw new y;if((r=o).writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)!function(e,t,r,o,i){--t.pendingcb,r?(n.nextTick(i,o),n.nextTick(M,e,t),e._writableState.errorEmitted=!0,w(e,o)):(i(o),e._writableState.errorEmitted=!0,w(e,o),M(e,t))}(e,o,i,t,s);else{var a=I(o)||e.destroyed;a||o.corked||o.bufferProcessing||!o.bufferedRequest||j(e,o),i?n.nextTick(O,e,o,a,s):O(e,o,a,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function A(e){var t=this instanceof(i=i||r(25));if(!t&&!s.call(A,this))return new A(e);this._writableState=new T(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function R(e,t,r,n,o,i,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function O(e,t,r,n){var o,i;r||(o=e,0===(i=t).length&&i.needDrain&&(i.needDrain=!1,o.emit("drain"))),t.pendingcb--,n(),M(e,t)}function j(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0,l=!0;r;)i[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;i.allBuffers=l,R(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,g=r.encoding,c=r.callback;if(R(e,t,!1,t.objectMode?1:u.length,u,g,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(r){t.pendingcb--,r&&w(e,r),t.prefinished=!0,e.emit("prefinish"),M(e,t)}))}function M(e,t){var r,o,i=I(t);if(i&&(r=e,(o=t).prefinished||o.finalCalled||("function"!=typeof r._final||o.destroyed?(o.prefinished=!0,r.emit("prefinish")):(o.pendingcb++,o.finalCalled=!0,n.nextTick(C,r,o))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var s=e._readableState;(!s||s.autoDestroy&&s.endEmitted)&&e.destroy()}return i}r(6)(A,l),T.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(T.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===A&&e&&e._writableState instanceof T}})):s=function(e){return e instanceof this},A.prototype.pipe=function(){w(this,new m)},A.prototype.write=function(e,t,r){var o,i,s=this._writableState,a=!1,l=!s.objectMode&&(o=e,u.isBuffer(o)||o instanceof g);return l&&!u.isBuffer(e)&&(i=e,e=u.from(i)),"function"==typeof t&&(r=t,t=null),l?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=E),s.ending?function(e,t){var r=new _;w(e,r),n.nextTick(t,r)}(this,r):(l||function(e,t,r,o){var i;return null===r?i=new v:"string"==typeof r||t.objectMode||(i=new h("chunk",["string","Buffer"],r)),!i||(w(e,i),n.nextTick(o,i),!1)}(this,s,e,r))&&(s.pendingcb++,a=function(e,t,r,n,o,i){if(!r){var s=(l=n,g=o,(a=t).objectMode||!1===a.decodeStrings||"string"!=typeof l||(l=u.from(l,g)),l);n!==s&&(r=!0,o="buffer",n=s)}var a,l,g,c=t.objectMode?1:n.length;t.length+=c;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var p=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:i,next:null},p?p.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,c,n,o,i);return f}(this,s,l,e,t,r)),a},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||j(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new d("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var o,i,s,a=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||(o=this,s=r,(i=a).ending=!0,M(o,i),s&&(i.finished?n.nextTick(s):o.once("finish",s)),i.ended=!0,o.writable=!1),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=c.destroy,A.prototype._undestroy=c.undestroy,A.prototype._destroy=function(e,t){t(e)}}).call(this,r(5),r(2))},function(e,t,r){e.exports=g;var n=r(24).codes,o=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=r(25);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function g(e){if(!(this instanceof g))return new g(e);l.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,r){f(e,t,r)}))}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(6)(g,l),g.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},g.prototype._transform=function(e,t,r){r(new o("_transform()"))},g.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},g.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},g.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,r){(function(e){var n=r(189),o=r(83),i=r(191),s=r(192),a=r(46),l=t;l.request=function(t,r){t="string"==typeof t?a.parse(t):i(t);var o=-1===e.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||o,l=t.hostname||t.host,u=t.port,g=t.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),t.url=(l?s+"//"+l:"")+(u?":"+u:"")+g,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var c=new n(t);return r&&c.on("response",r),c},l.get=function(e,t){var r=l.request(e,t);return r.end(),r},l.ClientRequest=n,l.IncomingMessage=o.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=s,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(5))},function(e,t,r){(function(e){t.fetch=a(e.fetch)&&a(e.ReadableStream),t.writableStream=a(e.WritableStream),t.abortController=a(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(l){}var r;function n(){if(void 0!==r)return r;if(e.XMLHttpRequest){r=new e.XMLHttpRequest;try{r.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(l){r=null}}else r=null;return r}function o(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(r){}return!1}var i=void 0!==e.ArrayBuffer,s=i&&a(e.ArrayBuffer.prototype.slice);function a(e){return"function"==typeof e}t.arraybuffer=t.fetch||i&&o("arraybuffer"),t.msstream=!t.fetch&&s&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!n()&&a(n().overrideMimeType),t.vbArray=a(e.VBArray),r=null}).call(this,r(5))},function(e,t,r){(function(e,n,o){var i=r(82),s=r(6),a=r(28),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=t.IncomingMessage=function(t,r,s,l){var u=this;if(a.Readable.call(u),u._mode=s,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){e.nextTick((function(){u.emit("close")}))})),"fetch"===s){if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),i.writableStream){var g=new WritableStream({write:function(e){return new Promise((function(t,r){u._destroyed?r():u.push(new n(e))?t():u._resumeFetch=t}))},close:function(){o.clearTimeout(l),u._destroyed||u.push(null)},abort:function(e){u._destroyed||u.emit("error",e)}});try{return void r.body.pipeTo(g).catch((function(e){o.clearTimeout(l),u._destroyed||u.emit("error",e)}))}catch(h){}}var c=r.body.getReader();!function e(){c.read().then((function(t){if(!u._destroyed){if(t.done)return o.clearTimeout(l),void u.push(null);u.push(new n(t.value)),e()}})).catch((function(e){o.clearTimeout(l),u._destroyed||u.emit("error",e)}))}()}else if(u._xhr=t,u._pos=0,u.url=t.responseURL,u.statusCode=t.status,u.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!i.overrideMimeType){var f=u.rawHeaders["mime-type"];if(f){var p=f.match(/;\s*charset=([^;])(;|$)/);p&&(u._charset=p[1].toLowerCase())}u._charset||(u._charset="utf-8")}};s(u,a.Readable),u.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},u.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==l.DONE)break;try{r=new o.VBArray(t.responseBody).toArray()}catch(g){}if(null!==r){e.push(new n(r));break}case"text":try{r=t.responseText}catch(c){e._mode="text:vbarray";break}if(r.length>e._pos){var i=r.substr(e._pos);if("x-user-defined"===e._charset){for(var s=new n(i.length),a=0;a<i.length;a++)s[a]=255&i.charCodeAt(a);e.push(s)}else e.push(i,e._charset);e._pos=r.length}break;case"arraybuffer":if(t.readyState!==l.DONE||!t.response)break;r=t.response,e.push(new n(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==l.LOADING||!r)break;e.push(new n(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==l.LOADING)break;var u=new o.MSStreamReader;u.onprogress=function(){u.result.byteLength>e._pos&&(e.push(new n(new Uint8Array(u.result.slice(e._pos)))),e._pos=u.result.byteLength)},u.onload=function(){e.push(null)},u.readAsArrayBuffer(r)}e._xhr.readyState===l.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,r(2),r(4).Buffer,r(5))},function(e,t,r){const n=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;n.writable=e=>n(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,n.readable=e=>n(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&"function"==typeof e._transform&&"object"==typeof e._transformState,e.exports=n},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var o=u(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function l(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=r(3).LEVEL,c=r(47),f=r(201),p=r(34)("winston:create-logger");function h(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.levels=e.levels||c.npm.levels;var t=function(e){i(r,e);var t=a(r);function r(e){return o(this,r),t.call(this,e)}return r}(f),r=new t(e);return Object.keys(e.levels).forEach((function(e){p('Define prototype method for "%s"',e),"log"!==e?(t.prototype[e]=function(){for(var t=this||r,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];if(1===o.length){var s=o[0],a=s&&s.message&&s||{message:s};return a.level=a[g]=e,t._addDefaultMeta(a),t.write(a),this||r}return 0===o.length?(t.log(e,""),t):t.log.apply(t,[e].concat(o))},t.prototype[h(e)]=function(){return(this||r).isLevelEnabled(e)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')})),r}},function(e,t,r){(function(t){var n=r(15),o=r(48),i=r(34)("winston:exception"),s=r(87),a=r(88),l=r(89);e.exports=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required to handle exceptions");this.logger=t,this.handlers=new Map}var r;return(r=[{key:"handle",value:function(){for(var e=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];n.forEach((function(t){if(Array.isArray(t))return t.forEach((function(t){return e._addHandler(t)}));e._addHandler(t)})),this.catcher||(this.catcher=this._uncaughtException.bind(this),t.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var e=this;this.catcher&&(t.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(t){return e.logger.unpipe(t)})))}},{key:"getAllInfo",value:function(e){var t=e.message;return t||"string"!=typeof e||(t=e),{error:e,level:"error",message:["uncaughtException: ".concat(t||"(no error message)"),e.stack||" No stack trace"].join("\n"),stack:e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}},{key:"getProcessInfo",value:function(){return{pid:t.pid,uid:t.getuid?t.getuid():null,gid:t.getgid?t.getgid():null,cwd:t.cwd(),execPath:t.execPath,version:t.version,argv:t.argv,memoryUsage:t.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:n.loadavg(),uptime:n.uptime()}}},{key:"getTrace",value:function(e){return(e?a.parse(e):a.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(e){if(!this.handlers.has(e)){e.handleExceptions=!0;var t=new l(e);this.handlers.set(e,t),this.logger.pipe(t)}}},{key:"_uncaughtException",value:function(e){var r,n=this.getAllInfo(e),a=this._getExceptionHandlers(),l="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function u(){i("doExit",l),i("process._exiting",t._exiting),l&&!t._exiting&&(r&&clearTimeout(r),t.exit(1))}if(!a.length&&l&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),l=!1),!a||0===a.length)return t.nextTick(u);o(a,(function(e,t){var r=s(t),n=e.transport||e;function o(e){return function(){i(e),r()}}n._ending=!0,n.once("finish",o("finished")),n.once("error",o("error"))}),(function(){return l&&u()})),this.logger.log(n),l&&(r=setTimeout(u,3e3))}},{key:"_getExceptionHandlers",value:function(){return this.logger.transports.filter((function(e){return(e.transport||e).handleExceptions}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,r),e}()}).call(this,r(2))},function(e,t,r){var n=r(204);e.exports=function(e){var t,r=0;function o(){return r||(r=1,t=e.apply(this,arguments),e=null),t}return o.displayName=n(e),o}},function(e,t){function r(e){for(var t in e)this[t]=e[t]}t.get=function(e){var r=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var n={},o=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t},Error.captureStackTrace(n,e||t.get);var i=n.stack;return Error.prepareStackTrace=o,Error.stackTraceLimit=r,i},t.parse=function(e){if(!e.stack)return[];var t=this;return e.stack.split("\n").slice(1).map((function(e){if(e.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:e,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var r=e.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(r){var n=null,o=null,i=null,s=null,a=null,l="native"===r[5];if(r[1]){var u=(i=r[1]).lastIndexOf(".");if("."==i[u-1]&&u--,u>0){n=i.substr(0,u),o=i.substr(u+1);var g=n.indexOf(".Module");g>0&&(i=i.substr(g+1),n=n.substr(0,g))}s=null}o&&(s=n,a=o),"<anonymous>"===o&&(a=null,i=null);var c={fileName:r[2]||null,lineNumber:parseInt(r[3],10)||null,functionName:i,typeName:s,methodName:a,columnNumber:parseInt(r[4],10)||null,native:l};return t._createParsedCallSite(c)}})).filter((function(e){return!!e}))},["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach((function(e){r.prototype[e]=null,r.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),["topLevel","eval","native","constructor"].forEach((function(e){r.prototype[e]=!1,r.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),t._createParsedCallSite=function(e){return new r(e)}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=r(29).Writable;e.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(n,e);var t,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=s(e);if(t){var o=s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return i(this,r)}}(n);function n(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=r.call(this,{objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");return t.handleExceptions=!0,t.transport=e,t}return(t=[{key:"_write",value:function(e,t,r){return e.exception?this.transport.log(e,r):(r(),!0)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(n.prototype,t),n}(a)},function(e,t,r){(function(t){var n=r(15),o=r(48),i=r(34)("winston:rejection"),s=r(87),a=r(88),l=r(89);e.exports=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required to handle rejections");this.logger=t,this.handlers=new Map}var r;return(r=[{key:"handle",value:function(){for(var e=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];n.forEach((function(t){if(Array.isArray(t))return t.forEach((function(t){return e._addHandler(t)}));e._addHandler(t)})),this.catcher||(this.catcher=this._unhandledRejection.bind(this),t.on("unhandledRejection",this.catcher))}},{key:"unhandle",value:function(){var e=this;this.catcher&&(t.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(t){return e.logger.unpipe(t)})))}},{key:"getAllInfo",value:function(e){var t=e.message;return t||"string"!=typeof e||(t=e),{error:e,level:"error",message:["unhandledRejection: ".concat(t||"(no error message)"),e.stack||" No stack trace"].join("\n"),stack:e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}},{key:"getProcessInfo",value:function(){return{pid:t.pid,uid:t.getuid?t.getuid():null,gid:t.getgid?t.getgid():null,cwd:t.cwd(),execPath:t.execPath,version:t.version,argv:t.argv,memoryUsage:t.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:n.loadavg(),uptime:n.uptime()}}},{key:"getTrace",value:function(e){return(e?a.parse(e):a.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(e){if(!this.handlers.has(e)){e.handleRejections=!0;var t=new l(e);this.handlers.set(e,t),this.logger.pipe(t)}}},{key:"_unhandledRejection",value:function(e){var r,n=this.getAllInfo(e),a=this._getRejectionHandlers(),l="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function u(){i("doExit",l),i("process._exiting",t._exiting),l&&!t._exiting&&(r&&clearTimeout(r),t.exit(1))}if(!a.length&&l&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),l=!1),!a||0===a.length)return t.nextTick(u);o(a,(function(e,t){var r=s(t),n=e.transport||e;function o(e){return function(){i(e),r()}}n._ending=!0,n.once("finish",o("finished")),n.once("error",o("error"))}),(function(){return l&&u()})),this.logger.log(n),l&&(r=setTimeout(u,3e3))}},{key:"_getRejectionHandlers",value:function(){return this.logger.transports.filter((function(e){return(e.transport||e).handleRejections}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,r),e}()}).call(this,r(2))},function(e,t,r){const n=r(50);e.exports=function(e){const t=n(e);if(t<0)throw new Error("should be a positive integer");return t}},function(e,t,r){const n=r(46).URL,o=r(35);e.exports=function(e){const t=o(e);try{return new n(t)}catch(r){throw new Error("should be a valid URL")}}},function(e,t,r){const n={};n.web=r(22),r(94);const o={v1:{}};o.v1.signaling={},o.v1.signaling.api=r(8),o.v1.signaling.api.SignalingClient=function(e,t,r){r||(r={}),r.format="text",this.client_=new n.web.GrpcWebClientBase(r),this.hostname_=e},o.v1.signaling.api.SignalingPromiseClient=function(e,t,r){r||(r={}),r.format="text",this.client_=new n.web.GrpcWebClientBase(r),this.hostname_=e};const i=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/CreatePeer",n.web.MethodType.UNARY,o.v1.signaling.api.CreatePeerRequest,o.v1.signaling.api.CreatePeerResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.CreatePeerResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.CreatePeerResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.CreatePeerResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.createPeer=function(e,t,r){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/CreatePeer",e,t||{},i,r)},o.v1.signaling.api.SignalingPromiseClient.prototype.createPeer=function(e,t){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/CreatePeer",e,t||{},i)};const s=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/DeletePeer",n.web.MethodType.UNARY,o.v1.signaling.api.DeletePeerRequest,o.v1.signaling.api.DeletePeerResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.DeletePeerResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.DeletePeerResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.DeletePeerResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.deletePeer=function(e,t,r){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/DeletePeer",e,t||{},s,r)},o.v1.signaling.api.SignalingPromiseClient.prototype.deletePeer=function(e,t){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/DeletePeer",e,t||{},s)};const a=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/RefreshPeer",n.web.MethodType.UNARY,o.v1.signaling.api.RefreshPeerRequest,o.v1.signaling.api.RefreshPeerResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.RefreshPeerResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.RefreshPeerResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.RefreshPeerResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.refreshPeer=function(e,t,r){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/RefreshPeer",e,t||{},a,r)},o.v1.signaling.api.SignalingPromiseClient.prototype.refreshPeer=function(e,t){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/RefreshPeer",e,t||{},a)};const l=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/GetPeers",n.web.MethodType.UNARY,o.v1.signaling.api.GetPeersRequest,o.v1.signaling.api.GetPeersResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.GetPeersResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.GetPeersResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.GetPeersResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.getPeers=function(e,t,r){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetPeers",e,t||{},l,r)},o.v1.signaling.api.SignalingPromiseClient.prototype.getPeers=function(e,t){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetPeers",e,t||{},l)};const u=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/GetIceServers",n.web.MethodType.UNARY,o.v1.signaling.api.GetIceServersRequest,o.v1.signaling.api.GetIceServersResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.GetIceServersResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.GetIceServersResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.GetIceServersResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.getIceServers=function(e,t,r){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetIceServers",e,t||{},u,r)},o.v1.signaling.api.SignalingPromiseClient.prototype.getIceServers=function(e,t){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetIceServers",e,t||{},u)};const g=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/SendSignal",n.web.MethodType.UNARY,o.v1.signaling.api.SendSignalRequest,o.v1.signaling.api.SendSignalResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.SendSignalResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.SendSignalResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.SendSignalResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.sendSignal=function(e,t,r){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/SendSignal",e,t||{},g,r)},o.v1.signaling.api.SignalingPromiseClient.prototype.sendSignal=function(e,t){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/SendSignal",e,t||{},g)};const c=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/ReceiveSignalStream",n.web.MethodType.SERVER_STREAMING,o.v1.signaling.api.ReceiveSignalStreamRequest,o.v1.signaling.api.ReceiveSignalStreamResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.ReceiveSignalStreamResponse,(function(e){return e.serializeBinary()}),o.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.receiveSignalStream=function(e,t){return this.client_.serverStreaming(this.hostname_+"/v1.signaling.api.Signaling/ReceiveSignalStream",e,t||{},c)},o.v1.signaling.api.SignalingPromiseClient.prototype.receiveSignalStream=function(e,t){return this.client_.serverStreaming(this.hostname_+"/v1.signaling.api.Signaling/ReceiveSignalStream",e,t||{},c)},e.exports=o.v1.signaling.api},function(e,t,r){var n=r(95),o=n,i=Function("return this")();o.exportSymbol("proto.google.protobuf.BoolValue",null,i),o.exportSymbol("proto.google.protobuf.BytesValue",null,i),o.exportSymbol("proto.google.protobuf.DoubleValue",null,i),o.exportSymbol("proto.google.protobuf.FloatValue",null,i),o.exportSymbol("proto.google.protobuf.Int32Value",null,i),o.exportSymbol("proto.google.protobuf.Int64Value",null,i),o.exportSymbol("proto.google.protobuf.StringValue",null,i),o.exportSymbol("proto.google.protobuf.UInt32Value",null,i),o.exportSymbol("proto.google.protobuf.UInt64Value",null,i),proto.google.protobuf.DoubleValue=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.DoubleValue,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.DoubleValue.displayName="proto.google.protobuf.DoubleValue"),proto.google.protobuf.FloatValue=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.FloatValue,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.FloatValue.displayName="proto.google.protobuf.FloatValue"),proto.google.protobuf.Int64Value=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.Int64Value,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.Int64Value.displayName="proto.google.protobuf.Int64Value"),proto.google.protobuf.UInt64Value=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.UInt64Value,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.UInt64Value.displayName="proto.google.protobuf.UInt64Value"),proto.google.protobuf.Int32Value=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.Int32Value,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.Int32Value.displayName="proto.google.protobuf.Int32Value"),proto.google.protobuf.UInt32Value=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.UInt32Value,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.UInt32Value.displayName="proto.google.protobuf.UInt32Value"),proto.google.protobuf.BoolValue=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.BoolValue,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.BoolValue.displayName="proto.google.protobuf.BoolValue"),proto.google.protobuf.StringValue=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.StringValue,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.StringValue.displayName="proto.google.protobuf.StringValue"),proto.google.protobuf.BytesValue=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.BytesValue,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.BytesValue.displayName="proto.google.protobuf.BytesValue"),n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.DoubleValue.prototype.toObject=function(e){return proto.google.protobuf.DoubleValue.toObject(e,this)},proto.google.protobuf.DoubleValue.toObject=function(e,t){var r={value:n.Message.getFloatingPointFieldWithDefault(t,1,0)};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.DoubleValue.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.DoubleValue;return proto.google.protobuf.DoubleValue.deserializeBinaryFromReader(r,t)},proto.google.protobuf.DoubleValue.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readDouble();e.setValue(r);break;default:t.skipField()}return e},proto.google.protobuf.DoubleValue.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.DoubleValue.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.DoubleValue.serializeBinaryToWriter=function(e,t){var r;0!==(r=e.getValue())&&t.writeDouble(1,r)},proto.google.protobuf.DoubleValue.prototype.getValue=function(){return n.Message.getFloatingPointFieldWithDefault(this,1,0)},proto.google.protobuf.DoubleValue.prototype.setValue=function(e){return n.Message.setProto3FloatField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FloatValue.prototype.toObject=function(e){return proto.google.protobuf.FloatValue.toObject(e,this)},proto.google.protobuf.FloatValue.toObject=function(e,t){var r={value:n.Message.getFloatingPointFieldWithDefault(t,1,0)};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.FloatValue.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.FloatValue;return proto.google.protobuf.FloatValue.deserializeBinaryFromReader(r,t)},proto.google.protobuf.FloatValue.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readFloat();e.setValue(r);break;default:t.skipField()}return e},proto.google.protobuf.FloatValue.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.FloatValue.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.FloatValue.serializeBinaryToWriter=function(e,t){var r;0!==(r=e.getValue())&&t.writeFloat(1,r)},proto.google.protobuf.FloatValue.prototype.getValue=function(){return n.Message.getFloatingPointFieldWithDefault(this,1,0)},proto.google.protobuf.FloatValue.prototype.setValue=function(e){return n.Message.setProto3FloatField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Int64Value.prototype.toObject=function(e){return proto.google.protobuf.Int64Value.toObject(e,this)},proto.google.protobuf.Int64Value.toObject=function(e,t){var r={value:n.Message.getFieldWithDefault(t,1,0)};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.Int64Value.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.Int64Value;return proto.google.protobuf.Int64Value.deserializeBinaryFromReader(r,t)},proto.google.protobuf.Int64Value.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setValue(r);break;default:t.skipField()}return e},proto.google.protobuf.Int64Value.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.Int64Value.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.Int64Value.serializeBinaryToWriter=function(e,t){var r;0!==(r=e.getValue())&&t.writeInt64(1,r)},proto.google.protobuf.Int64Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.Int64Value.prototype.setValue=function(e){return n.Message.setProto3IntField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UInt64Value.prototype.toObject=function(e){return proto.google.protobuf.UInt64Value.toObject(e,this)},proto.google.protobuf.UInt64Value.toObject=function(e,t){var r={value:n.Message.getFieldWithDefault(t,1,0)};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.UInt64Value.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.UInt64Value;return proto.google.protobuf.UInt64Value.deserializeBinaryFromReader(r,t)},proto.google.protobuf.UInt64Value.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readUint64();e.setValue(r);break;default:t.skipField()}return e},proto.google.protobuf.UInt64Value.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.UInt64Value.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.UInt64Value.serializeBinaryToWriter=function(e,t){var r;0!==(r=e.getValue())&&t.writeUint64(1,r)},proto.google.protobuf.UInt64Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.UInt64Value.prototype.setValue=function(e){return n.Message.setProto3IntField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Int32Value.prototype.toObject=function(e){return proto.google.protobuf.Int32Value.toObject(e,this)},proto.google.protobuf.Int32Value.toObject=function(e,t){var r={value:n.Message.getFieldWithDefault(t,1,0)};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.Int32Value.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.Int32Value;return proto.google.protobuf.Int32Value.deserializeBinaryFromReader(r,t)},proto.google.protobuf.Int32Value.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt32();e.setValue(r);break;default:t.skipField()}return e},proto.google.protobuf.Int32Value.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.Int32Value.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.Int32Value.serializeBinaryToWriter=function(e,t){var r;0!==(r=e.getValue())&&t.writeInt32(1,r)},proto.google.protobuf.Int32Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.Int32Value.prototype.setValue=function(e){return n.Message.setProto3IntField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UInt32Value.prototype.toObject=function(e){return proto.google.protobuf.UInt32Value.toObject(e,this)},proto.google.protobuf.UInt32Value.toObject=function(e,t){var r={value:n.Message.getFieldWithDefault(t,1,0)};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.UInt32Value.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.UInt32Value;return proto.google.protobuf.UInt32Value.deserializeBinaryFromReader(r,t)},proto.google.protobuf.UInt32Value.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readUint32();e.setValue(r);break;default:t.skipField()}return e},proto.google.protobuf.UInt32Value.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.UInt32Value.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.UInt32Value.serializeBinaryToWriter=function(e,t){var r;0!==(r=e.getValue())&&t.writeUint32(1,r)},proto.google.protobuf.UInt32Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.UInt32Value.prototype.setValue=function(e){return n.Message.setProto3IntField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.BoolValue.prototype.toObject=function(e){return proto.google.protobuf.BoolValue.toObject(e,this)},proto.google.protobuf.BoolValue.toObject=function(e,t){var r={value:n.Message.getBooleanFieldWithDefault(t,1,!1)};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.BoolValue.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.BoolValue;return proto.google.protobuf.BoolValue.deserializeBinaryFromReader(r,t)},proto.google.protobuf.BoolValue.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setValue(r);break;default:t.skipField()}return e},proto.google.protobuf.BoolValue.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.BoolValue.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.BoolValue.serializeBinaryToWriter=function(e,t){var r;(r=e.getValue())&&t.writeBool(1,r)},proto.google.protobuf.BoolValue.prototype.getValue=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},proto.google.protobuf.BoolValue.prototype.setValue=function(e){return n.Message.setProto3BooleanField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.StringValue.prototype.toObject=function(e){return proto.google.protobuf.StringValue.toObject(e,this)},proto.google.protobuf.StringValue.toObject=function(e,t){var r={value:n.Message.getFieldWithDefault(t,1,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.StringValue.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.StringValue;return proto.google.protobuf.StringValue.deserializeBinaryFromReader(r,t)},proto.google.protobuf.StringValue.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setValue(r);break;default:t.skipField()}return e},proto.google.protobuf.StringValue.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.StringValue.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.StringValue.serializeBinaryToWriter=function(e,t){var r;(r=e.getValue()).length>0&&t.writeString(1,r)},proto.google.protobuf.StringValue.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.StringValue.prototype.setValue=function(e){return n.Message.setProto3StringField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.BytesValue.prototype.toObject=function(e){return proto.google.protobuf.BytesValue.toObject(e,this)},proto.google.protobuf.BytesValue.toObject=function(e,t){var r={value:t.getValue_asB64()};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.BytesValue.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.BytesValue;return proto.google.protobuf.BytesValue.deserializeBinaryFromReader(r,t)},proto.google.protobuf.BytesValue.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setValue(r);break;default:t.skipField()}return e},proto.google.protobuf.BytesValue.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.BytesValue.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.BytesValue.serializeBinaryToWriter=function(e,t){var r;(r=e.getValue_asU8()).length>0&&t.writeBytes(1,r)},proto.google.protobuf.BytesValue.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.BytesValue.prototype.getValue_asB64=function(){return n.Message.bytesAsB64(this.getValue())},proto.google.protobuf.BytesValue.prototype.getValue_asU8=function(){return n.Message.bytesAsU8(this.getValue())},proto.google.protobuf.BytesValue.prototype.setValue=function(e){return n.Message.setProto3BytesField(this,1,e)},o.object.extend(t,proto.google.protobuf)},function(module,exports,__webpack_require__){(function(global,Buffer){var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(e,t,r){e instanceof String&&(e=String(e));for(var n=e.length,o=0;o<n;o++){var i=e[o];if(t.call(r,i,o,e))return{i:o,v:i}}return{i:-1,v:void 0}},$jscomp.ASSUME_ES5=!1,$jscomp.ASSUME_NO_NATIVE_MAP=!1,$jscomp.ASSUME_NO_NATIVE_SET=!1,$jscomp.SIMPLE_FROUND_POLYFILL=!1,$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:void 0!==global&&null!=global?global:e},$jscomp.global=$jscomp.getGlobal(this),$jscomp.polyfill=function(e,t,r,n){if(t){for(r=$jscomp.global,e=e.split("."),n=0;n<e.length-1;n++){var o=e[n];o in r||(r[o]={}),r=r[o]}(t=t(n=r[e=e[e.length-1]]))!=n&&null!=t&&$jscomp.defineProperty(r,e,{configurable:!0,writable:!0,value:t})}},$jscomp.polyfill("Array.prototype.findIndex",(function(e){return e||function(e,t){return $jscomp.findInternal(this,e,t).i}}),"es6","es3"),$jscomp.checkStringArgs=function(e,t,r){if(null==e)throw new TypeError("The 'this' value for String.prototype."+r+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+r+" must not be a regular expression");return e+""},$jscomp.polyfill("String.prototype.endsWith",(function(e){return e||function(e,t){var r=$jscomp.checkStringArgs(this,e,"endsWith");e+="",void 0===t&&(t=r.length),t=Math.max(0,Math.min(0|t,r.length));for(var n=e.length;0<n&&0<t;)if(r[--t]!=e[--n])return!1;return 0>=n}}),"es6","es3"),$jscomp.polyfill("Array.prototype.find",(function(e){return e||function(e,t){return $jscomp.findInternal(this,e,t).v}}),"es6","es3"),$jscomp.polyfill("String.prototype.startsWith",(function(e){return e||function(e,t){var r=$jscomp.checkStringArgs(this,e,"startsWith");e+="";var n=r.length,o=e.length;t=Math.max(0,Math.min(0|t,r.length));for(var i=0;i<o&&t<n;)if(r[t++]!=e[i++])return!1;return i>=o}}),"es6","es3"),$jscomp.polyfill("String.prototype.repeat",(function(e){return e||function(e){var t=$jscomp.checkStringArgs(this,null,"repeat");if(0>e||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var r="";e;)1&e&&(r+=t),(e>>>=1)&&(t+=t);return r}}),"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self,goog.isDef=function(e){return void 0!==e},goog.isString=function(e){return"string"==typeof e},goog.isBoolean=function(e){return"boolean"==typeof e},goog.isNumber=function(e){return"number"==typeof e},goog.exportPath_=function(e,t,r){e=e.split("."),r=r||goog.global,e[0]in r||void 0===r.execScript||r.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)!e.length&&goog.isDef(t)?r[n]=t:r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}},goog.define=function(e,t){return t},goog.FEATURESET_YEAR=2012,goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){goog.exportPath_(e,t)},goog.getScriptNonce=function(e){return e&&e!=goog.global?goog.getScriptNonce_(e.document):(null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(e)?e:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=e},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var e=goog.global.$jscomp;return!!e&&"function"==typeof e.getCurrentModulePath&&!!e.getCurrentModulePath()},goog.module.declareLegacyNamespace=function(){goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(e){if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=e;else{var t=goog.global.$jscomp;if(!t||"function"!=typeof t.getCurrentModulePath)throw Error('Module with namespace "'+e+'" has been loaded incorrectly.');t=t.require(t.getCurrentModulePath()),goog.loadedModules_[e]={exports:t,type:goog.ModuleType.ES6,moduleId:e}}},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},goog.getObjectByName=function(e,t){e=e.split("."),t=t||goog.global;for(var r=0;r<e.length;r++)if(t=t[e[r]],!goog.isDefAndNotNull(t))return null;return t},goog.globalize=function(e,t){for(var r in t=t||goog.global,e)t[r]=e[r]},goog.addDependency=function(e,t,r,n){},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(e){goog.global.console&&goog.global.console.error(e)},goog.require=function(e){},goog.requireType=function(e){return{}},goog.basePath="",goog.nullFunction=function(){},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(e){e.instance_=void 0,e.getInstance=function(){return e.instance_?e.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=e),e.instance_=new e)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!COMPILED,goog.TRANSPILE="detect",goog.ASSUME_ES_MODULES_TRANSPILED=!1,goog.TRANSPILE_TO_LANGUAGE="",goog.TRANSPILER="transpile.js",goog.hasBadLetScoping=null,goog.useSafari10Workaround=function(){if(null==goog.hasBadLetScoping){try{var a=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(e){a=!1}goog.hasBadLetScoping=a}return goog.hasBadLetScoping},goog.workaroundSafari10EvalBug=function(e){return"(function(){"+e+"\n;})();\n"},goog.loadModule=function(e){var t=goog.moduleLoaderState_;try{if(goog.moduleLoaderState_={moduleName:"",declareLegacyNamespace:!1,type:goog.ModuleType.GOOG},goog.isFunction(e))var r=e.call(void 0,{});else{if(!goog.isString(e))throw Error("Invalid module definition");goog.useSafari10Workaround()&&(e=goog.workaroundSafari10EvalBug(e)),r=goog.loadModuleFromSource_.call(void 0,e)}var n=goog.moduleLoaderState_.moduleName;if(!goog.isString(n)||!n)throw Error('Invalid module name "'+n+'"');goog.moduleLoaderState_.declareLegacyNamespace?goog.constructNamespace_(n,r):goog.SEAL_MODULE_EXPORTS&&Object.seal&&"object"==typeof r&&null!=r&&Object.seal(r),goog.loadedModules_[n]={exports:r,type:goog.ModuleType.GOOG,moduleId:goog.moduleLoaderState_.moduleName}}finally{goog.moduleLoaderState_=t}},goog.loadModuleFromSource_=function(a){return eval(a),{}},goog.normalizePath_=function(e){e=e.split("/");for(var t=0;t<e.length;)"."==e[t]?e.splice(t,1):t&&".."==e[t]&&e[t-1]&&".."!=e[t-1]?e.splice(--t,2):t++;return e.join("/")},goog.loadFileSync_=function(e){if(goog.global.CLOSURE_LOAD_FILE_SYNC)return goog.global.CLOSURE_LOAD_FILE_SYNC(e);try{var t=new goog.global.XMLHttpRequest;return t.open("get",e,!1),t.send(),0==t.status||200==t.status?t.responseText:null}catch(r){return null}},goog.transpile_=function(e,t,r){var n=goog.global.$jscomp;n||(goog.global.$jscomp=n={});var o=n.transpile;if(!o){var i=goog.basePath+goog.TRANSPILER,s=goog.loadFileSync_(i);if(s){if(function(){(0,eval)(s+"\n//# sourceURL="+i)}.call(goog.global),goog.global.$gwtExport&&goog.global.$gwtExport.$jscomp&&!goog.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(goog.global.$gwtExport));goog.global.$jscomp.transpile=goog.global.$gwtExport.$jscomp.transpile,o=(n=goog.global.$jscomp).transpile}}return o||(o=n.transpile=function(e,t){return goog.logToConsole_(t+" requires transpilation but no transpiler was found."),e}),o(e,t,r)},goog.typeOf=function(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var r=Object.prototype.toString.call(e);if("[object Window]"==r)return"object";if("[object Array]"==r||"number"==typeof e.length&&void 0!==e.splice&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==r||void 0!==e.call&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&void 0===e.call)return"object";return t},goog.isNull=function(e){return null===e},goog.isDefAndNotNull=function(e){return null!=e},goog.isArray=function(e){return"array"==goog.typeOf(e)},goog.isArrayLike=function(e){var t=goog.typeOf(e);return"array"==t||"object"==t&&"number"==typeof e.length},goog.isDateLike=function(e){return goog.isObject(e)&&"function"==typeof e.getFullYear},goog.isFunction=function(e){return"function"==goog.typeOf(e)},goog.isObject=function(e){var t=typeof e;return"object"==t&&null!=e||"function"==t},goog.getUid=function(e){return e[goog.UID_PROPERTY_]||(e[goog.UID_PROPERTY_]=++goog.uidCounter_)},goog.hasUid=function(e){return!!e[goog.UID_PROPERTY_]},goog.removeUid=function(e){null!==e&&"removeAttribute"in e&&e.removeAttribute(goog.UID_PROPERTY_);try{delete e[goog.UID_PROPERTY_]}catch(t){}},goog.UID_PROPERTY_="closure_uid_"+(1e9*Math.random()>>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if("function"==typeof e.clone)return e.clone();for(var r in t="array"==t?[]:{},e)t[r]=goog.cloneObject(e[r]);return t}return e},goog.bindNative_=function(e,t,r){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,r){if(!e)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var r=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(r,n),e.apply(t,r)}}return function(){return e.apply(t,arguments)}},goog.bind=function(e,t,r){return Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_,goog.bind.apply(null,arguments)},goog.partial=function(e,t){var r=Array.prototype.slice.call(arguments,1);return function(){var t=r.slice();return t.push.apply(t,arguments),e.apply(this,t)}},goog.mixin=function(e,t){for(var r in t)e[r]=t[r]},goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date},goog.globalEval=function(e){if(goog.global.execScript)goog.global.execScript(e,"JavaScript");else{if(!goog.global.eval)throw Error("goog.globalEval not available");if(null==goog.evalWorksForGlobals_){try{goog.global.eval("var _evalTest_ = 1;")}catch(n){}if(void 0!==goog.global._evalTest_){try{delete goog.global._evalTest_}catch(n){}goog.evalWorksForGlobals_=!0}else goog.evalWorksForGlobals_=!1}if(goog.evalWorksForGlobals_)goog.global.eval(e);else{var t=goog.global.document,r=t.createElement("SCRIPT");r.type="text/javascript",r.defer=!1,r.appendChild(t.createTextNode(e)),t.head.appendChild(r),t.head.removeChild(r)}}},goog.evalWorksForGlobals_=null,goog.getCssName=function(e,t){if("."==String(e).charAt(0))throw Error('className passed in goog.getCssName must not start with ".". You passed: '+e);var r=function(e){return goog.cssNameMapping_[e]||e},n=function(e){e=e.split("-");for(var t=[],n=0;n<e.length;n++)t.push(r(e[n]));return t.join("-")};return n=goog.cssNameMapping_?"BY_WHOLE"==goog.cssNameMappingStyle_?r:n:function(e){return e},e=t?e+"-"+n(t):n(e),goog.global.CLOSURE_CSS_NAME_MAP_FN?goog.global.CLOSURE_CSS_NAME_MAP_FN(e):e},goog.setCssNameMapping=function(e,t){goog.cssNameMapping_=e,goog.cssNameMappingStyle_=t},goog.getMsg=function(e,t,r){return r&&r.html&&(e=e.replace(/</g,"&lt;")),t&&(e=e.replace(/\{\$([^}]+)}/g,(function(e,r){return null!=t&&r in t?t[r]:e}))),e},goog.getMsgWithFallback=function(e,t){return e},goog.exportSymbol=function(e,t,r){goog.exportPath_(e,t,r)},goog.exportProperty=function(e,t,r){e[t]=r},goog.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.base=function(e,r,n){for(var o=Array(arguments.length-2),i=2;i<arguments.length;i++)o[i-2]=arguments[i];return t.prototype[r].apply(e,o)}},goog.base=function(e,t,r){var n=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!n)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(void 0!==n.superClass_){for(var o=Array(arguments.length-1),i=1;i<arguments.length;i++)o[i-1]=arguments[i];return n.superClass_.constructor.apply(e,o)}if("string"!=typeof t&&"symbol"!=typeof t)throw Error("method names provided to goog.base must be a string or a symbol");for(o=Array(arguments.length-2),i=2;i<arguments.length;i++)o[i-2]=arguments[i];i=!1;for(var s=e.constructor.prototype;s;s=Object.getPrototypeOf(s))if(s[t]===n)i=!0;else if(i)return s[t].apply(e,o);if(e[t]===n)return e.constructor.prototype[t].apply(e,o);throw Error("goog.base called from a method of one name to a method of a different name")},goog.scope=function(e){if(goog.isInModuleLoader_())throw Error("goog.scope is not supported within a module.");e.call(goog.global)},goog.defineClass=function(e,t){var r=t.constructor,n=t.statics;return r&&r!=Object.prototype.constructor||(r=function(){throw Error("cannot instantiate an interface (no constructor defined).")}),r=goog.defineClass.createSealingConstructor_(r,e),e&&goog.inherits(r,e),delete t.constructor,delete t.statics,goog.defineClass.applyProperties_(r.prototype,t),null!=n&&(n instanceof Function?n(r):goog.defineClass.applyProperties_(r,n)),r},goog.defineClass.SEAL_CLASS_INSTANCES=goog.DEBUG,goog.defineClass.createSealingConstructor_=function(e,t){if(!goog.defineClass.SEAL_CLASS_INSTANCES)return e;var r=!goog.defineClass.isUnsealable_(t),n=function(){var t=e.apply(this,arguments)||this;return t[goog.UID_PROPERTY_]=t[goog.UID_PROPERTY_],this.constructor===n&&r&&Object.seal instanceof Function&&Object.seal(t),t};return n},goog.defineClass.isUnsealable_=function(e){return e&&e.prototype&&e.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]},goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.defineClass.applyProperties_=function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);for(var n=0;n<goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;n++)r=goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[n],Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},goog.tagUnsealableClass=function(e){},goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable",goog.TRUSTED_TYPES_POLICY_NAME="",goog.identity_=function(e){return e},goog.createTrustedTypesPolicy=function(e){var t=null;if("undefined"==typeof TrustedTypes||!TrustedTypes.createPolicy)return t;try{t=TrustedTypes.createPolicy(e,{createHTML:goog.identity_,createScript:goog.identity_,createScriptURL:goog.identity_,createURL:goog.identity_})}catch(r){goog.logToConsole_(r.message)}return t},goog.TRUSTED_TYPES_POLICY_=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#base"):null;var jspb={BinaryConstants:{},ConstBinaryMessage:function(){},BinaryMessage:function(){}};jspb.BinaryConstants.FieldType={INVALID:-1,DOUBLE:1,FLOAT:2,INT64:3,UINT64:4,INT32:5,FIXED64:6,FIXED32:7,BOOL:8,STRING:9,GROUP:10,MESSAGE:11,BYTES:12,UINT32:13,ENUM:14,SFIXED32:15,SFIXED64:16,SINT32:17,SINT64:18,FHASH64:30,VHASH64:31},jspb.BinaryConstants.WireType={INVALID:-1,VARINT:0,FIXED64:1,DELIMITED:2,START_GROUP:3,END_GROUP:4,FIXED32:5},jspb.BinaryConstants.FieldTypeToWireType=function(e){var t=jspb.BinaryConstants.FieldType,r=jspb.BinaryConstants.WireType;switch(e){case t.INT32:case t.INT64:case t.UINT32:case t.UINT64:case t.SINT32:case t.SINT64:case t.BOOL:case t.ENUM:case t.VHASH64:return r.VARINT;case t.DOUBLE:case t.FIXED64:case t.SFIXED64:case t.FHASH64:return r.FIXED64;case t.STRING:case t.MESSAGE:case t.BYTES:return r.DELIMITED;case t.FLOAT:case t.FIXED32:case t.SFIXED32:return r.FIXED32;default:return r.INVALID}},jspb.BinaryConstants.INVALID_FIELD_NUMBER=-1,jspb.BinaryConstants.FLOAT32_EPS=1401298464324817e-60,jspb.BinaryConstants.FLOAT32_MIN=11754943508222875e-54,jspb.BinaryConstants.FLOAT32_MAX=34028234663852886e22,jspb.BinaryConstants.FLOAT64_EPS=5e-324,jspb.BinaryConstants.FLOAT64_MIN=22250738585072014e-324,jspb.BinaryConstants.FLOAT64_MAX=17976931348623157e292,jspb.BinaryConstants.TWO_TO_20=1048576,jspb.BinaryConstants.TWO_TO_23=8388608,jspb.BinaryConstants.TWO_TO_31=2147483648,jspb.BinaryConstants.TWO_TO_32=4294967296,jspb.BinaryConstants.TWO_TO_52=4503599627370496,jspb.BinaryConstants.TWO_TO_63=0x8000000000000000,jspb.BinaryConstants.TWO_TO_64=0x10000000000000000,jspb.BinaryConstants.ZERO_HASH="\0\0\0\0\0\0\0\0",goog.dom={},goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},goog.debug={},goog.debug.Error=function(e){if(Error.captureStackTrace)Error.captureStackTrace(this,goog.debug.Error);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e)),this.reportErrorToServer=!0},goog.inherits(goog.debug.Error,Error),goog.debug.Error.prototype.name="CustomError",goog.asserts={},goog.asserts.ENABLE_ASSERTS=goog.DEBUG,goog.asserts.AssertionError=function(e,t){goog.debug.Error.call(this,goog.asserts.subs_(e,t)),this.messagePattern=e},goog.inherits(goog.asserts.AssertionError,goog.debug.Error),goog.asserts.AssertionError.prototype.name="AssertionError",goog.asserts.DEFAULT_ERROR_HANDLER=function(e){throw e},goog.asserts.errorHandler_=goog.asserts.DEFAULT_ERROR_HANDLER,goog.asserts.subs_=function(e,t){for(var r="",n=(e=e.split("%s")).length-1,o=0;o<n;o++)r+=e[o]+(o<t.length?t[o]:"%s");return r+e[n]},goog.asserts.doAssertFailure_=function(e,t,r,n){var o="Assertion failed";if(r){o+=": "+r;var i=n}else e&&(o+=": "+e,i=t);e=new goog.asserts.AssertionError(""+o,i||[]),goog.asserts.errorHandler_(e)},goog.asserts.setErrorHandler=function(e){goog.asserts.ENABLE_ASSERTS&&(goog.asserts.errorHandler_=e)},goog.asserts.assert=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!e&&goog.asserts.doAssertFailure_("",null,t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertExists=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&null==e&&goog.asserts.doAssertFailure_("Expected to exist: %s.",[e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.fail=function(e,t){goog.asserts.ENABLE_ASSERTS&&goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1)))},goog.asserts.assertNumber=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isNumber(e)&&goog.asserts.doAssertFailure_("Expected number but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertString=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isString(e)&&goog.asserts.doAssertFailure_("Expected string but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertFunction=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isFunction(e)&&goog.asserts.doAssertFailure_("Expected function but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObject=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isObject(e)&&goog.asserts.doAssertFailure_("Expected object but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertArray=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isArray(e)&&goog.asserts.doAssertFailure_("Expected array but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertBoolean=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isBoolean(e)&&goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertElement=function(e,t,r){return!goog.asserts.ENABLE_ASSERTS||goog.isObject(e)&&e.nodeType==goog.dom.NodeType.ELEMENT||goog.asserts.doAssertFailure_("Expected Element but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertInstanceof=function(e,t,r,n){return!goog.asserts.ENABLE_ASSERTS||e instanceof t||goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[goog.asserts.getType_(t),goog.asserts.getType_(e)],r,Array.prototype.slice.call(arguments,3)),e},goog.asserts.assertFinite=function(e,t,r){return!goog.asserts.ENABLE_ASSERTS||"number"==typeof e&&isFinite(e)||goog.asserts.doAssertFailure_("Expected %s to be a finite number but it is not.",[e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObjectPrototypeIsIntact=function(){for(var e in Object.prototype)goog.asserts.fail(e+" should not be enumerable in Object.prototype.")},goog.asserts.getType_=function(e){return e instanceof Function?e.displayName||e.name||"unknown type name":e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):null===e?"null":typeof e},goog.array={},goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE,goog.array.ASSUME_NATIVE_FUNCTIONS=2012<goog.FEATURESET_YEAR,goog.array.peek=function(e){return e[e.length-1]},goog.array.last=goog.array.peek,goog.array.indexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(e,t,r){return goog.asserts.assert(null!=e.length),Array.prototype.indexOf.call(e,t,r)}:function(e,t,r){if(r=null==r?0:0>r?Math.max(0,e.length+r):r,goog.isString(e))return goog.isString(t)&&1==t.length?e.indexOf(t,r):-1;for(;r<e.length;r++)if(r in e&&e[r]===t)return r;return-1},goog.array.lastIndexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(e,t,r){return goog.asserts.assert(null!=e.length),Array.prototype.lastIndexOf.call(e,t,null==r?e.length-1:r)}:function(e,t,r){if(0>(r=null==r?e.length-1:r)&&(r=Math.max(0,e.length+r)),goog.isString(e))return goog.isString(t)&&1==t.length?e.lastIndexOf(t,r):-1;for(;0<=r;r--)if(r in e&&e[r]===t)return r;return-1},goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(e,t,r){goog.asserts.assert(null!=e.length),Array.prototype.forEach.call(e,t,r)}:function(e,t,r){for(var n=e.length,o=goog.isString(e)?e.split(""):e,i=0;i<n;i++)i in o&&t.call(r,o[i],i,e)},goog.array.forEachRight=function(e,t,r){var n=e.length,o=goog.isString(e)?e.split(""):e;for(--n;0<=n;--n)n in o&&t.call(r,o[n],n,e)},goog.array.filter=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(e,t,r){return goog.asserts.assert(null!=e.length),Array.prototype.filter.call(e,t,r)}:function(e,t,r){for(var n=e.length,o=[],i=0,s=goog.isString(e)?e.split(""):e,a=0;a<n;a++)if(a in s){var l=s[a];t.call(r,l,a,e)&&(o[i++]=l)}return o},goog.array.map=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(e,t,r){return goog.asserts.assert(null!=e.length),Array.prototype.map.call(e,t,r)}:function(e,t,r){for(var n=e.length,o=Array(n),i=goog.isString(e)?e.split(""):e,s=0;s<n;s++)s in i&&(o[s]=t.call(r,i[s],s,e));return o},goog.array.reduce=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(e,t,r,n){return goog.asserts.assert(null!=e.length),n&&(t=goog.bind(t,n)),Array.prototype.reduce.call(e,t,r)}:function(e,t,r,n){var o=r;return goog.array.forEach(e,(function(r,i){o=t.call(n,o,r,i,e)})),o},goog.array.reduceRight=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(e,t,r,n){return goog.asserts.assert(null!=e.length),goog.asserts.assert(null!=t),n&&(t=goog.bind(t,n)),Array.prototype.reduceRight.call(e,t,r)}:function(e,t,r,n){var o=r;return goog.array.forEachRight(e,(function(r,i){o=t.call(n,o,r,i,e)})),o},goog.array.some=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(e,t,r){return goog.asserts.assert(null!=e.length),Array.prototype.some.call(e,t,r)}:function(e,t,r){for(var n=e.length,o=goog.isString(e)?e.split(""):e,i=0;i<n;i++)if(i in o&&t.call(r,o[i],i,e))return!0;return!1},goog.array.every=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(e,t,r){return goog.asserts.assert(null!=e.length),Array.prototype.every.call(e,t,r)}:function(e,t,r){for(var n=e.length,o=goog.isString(e)?e.split(""):e,i=0;i<n;i++)if(i in o&&!t.call(r,o[i],i,e))return!1;return!0},goog.array.count=function(e,t,r){var n=0;return goog.array.forEach(e,(function(e,o,i){t.call(r,e,o,i)&&++n}),r),n},goog.array.find=function(e,t,r){return 0>(t=goog.array.findIndex(e,t,r))?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndex=function(e,t,r){for(var n=e.length,o=goog.isString(e)?e.split(""):e,i=0;i<n;i++)if(i in o&&t.call(r,o[i],i,e))return i;return-1},goog.array.findRight=function(e,t,r){return 0>(t=goog.array.findIndexRight(e,t,r))?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndexRight=function(e,t,r){var n=e.length,o=goog.isString(e)?e.split(""):e;for(--n;0<=n;n--)if(n in o&&t.call(r,o[n],n,e))return n;return-1},goog.array.contains=function(e,t){return 0<=goog.array.indexOf(e,t)},goog.array.isEmpty=function(e){return 0==e.length},goog.array.clear=function(e){if(!goog.isArray(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0},goog.array.insert=function(e,t){goog.array.contains(e,t)||e.push(t)},goog.array.insertAt=function(e,t,r){goog.array.splice(e,r,0,t)},goog.array.insertArrayAt=function(e,t,r){goog.partial(goog.array.splice,e,r,0).apply(null,t)},goog.array.insertBefore=function(e,t,r){var n;2==arguments.length||0>(n=goog.array.indexOf(e,r))?e.push(t):goog.array.insertAt(e,t,n)},goog.array.remove=function(e,t){var r;return(r=0<=(t=goog.array.indexOf(e,t)))&&goog.array.removeAt(e,t),r},goog.array.removeLast=function(e,t){return 0<=(t=goog.array.lastIndexOf(e,t))&&(goog.array.removeAt(e,t),!0)},goog.array.removeAt=function(e,t){return goog.asserts.assert(null!=e.length),1==Array.prototype.splice.call(e,t,1).length},goog.array.removeIf=function(e,t,r){return 0<=(t=goog.array.findIndex(e,t,r))&&(goog.array.removeAt(e,t),!0)},goog.array.removeAllIf=function(e,t,r){var n=0;return goog.array.forEachRight(e,(function(o,i){t.call(r,o,i,e)&&goog.array.removeAt(e,i)&&n++})),n},goog.array.concat=function(e){return Array.prototype.concat.apply([],arguments)},goog.array.join=function(e){return Array.prototype.concat.apply([],arguments)},goog.array.toArray=function(e){var t=e.length;if(0<t){for(var r=Array(t),n=0;n<t;n++)r[n]=e[n];return r}return[]},goog.array.clone=goog.array.toArray,goog.array.extend=function(e,t){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(goog.isArrayLike(n)){var o=e.length||0,i=n.length||0;e.length=o+i;for(var s=0;s<i;s++)e[o+s]=n[s]}else e.push(n)}},goog.array.splice=function(e,t,r,n){return goog.asserts.assert(null!=e.length),Array.prototype.splice.apply(e,goog.array.slice(arguments,1))},goog.array.slice=function(e,t,r){return goog.asserts.assert(null!=e.length),2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,r)},goog.array.removeDuplicates=function(e,t,r){t=t||e;var n=function(e){return goog.isObject(e)?"o"+goog.getUid(e):(typeof e).charAt(0)+e};r=r||n,n={};for(var o=0,i=0;i<e.length;){var s=e[i++],a=r(s);Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,t[o++]=s)}t.length=o},goog.array.binarySearch=function(e,t,r){return goog.array.binarySearch_(e,r||goog.array.defaultCompare,!1,t)},goog.array.binarySelect=function(e,t,r){return goog.array.binarySearch_(e,t,!0,void 0,r)},goog.array.binarySearch_=function(e,t,r,n,o){for(var i,s=0,a=e.length;s<a;){var l=s+a>>1,u=r?t.call(o,e[l],l,e):t(n,e[l]);0<u?s=l+1:(a=l,i=!u)}return i?s:~s},goog.array.sort=function(e,t){e.sort(t||goog.array.defaultCompare)},goog.array.stableSort=function(e,t){for(var r=Array(e.length),n=0;n<e.length;n++)r[n]={index:n,value:e[n]};var o=t||goog.array.defaultCompare;for(goog.array.sort(r,(function(e,t){return o(e.value,t.value)||e.index-t.index})),n=0;n<e.length;n++)e[n]=r[n].value},goog.array.sortByKey=function(e,t,r){var n=r||goog.array.defaultCompare;goog.array.sort(e,(function(e,r){return n(t(e),t(r))}))},goog.array.sortObjectsByKey=function(e,t,r){goog.array.sortByKey(e,(function(e){return e[t]}),r)},goog.array.isSorted=function(e,t,r){t=t||goog.array.defaultCompare;for(var n=1;n<e.length;n++){var o=t(e[n-1],e[n]);if(0<o||0==o&&r)return!1}return!0},goog.array.equals=function(e,t,r){if(!goog.isArrayLike(e)||!goog.isArrayLike(t)||e.length!=t.length)return!1;var n=e.length;r=r||goog.array.defaultCompareEquality;for(var o=0;o<n;o++)if(!r(e[o],t[o]))return!1;return!0},goog.array.compare3=function(e,t,r){r=r||goog.array.defaultCompare;for(var n=Math.min(e.length,t.length),o=0;o<n;o++){var i=r(e[o],t[o]);if(0!=i)return i}return goog.array.defaultCompare(e.length,t.length)},goog.array.defaultCompare=function(e,t){return e>t?1:e<t?-1:0},goog.array.inverseDefaultCompare=function(e,t){return-goog.array.defaultCompare(e,t)},goog.array.defaultCompareEquality=function(e,t){return e===t},goog.array.binaryInsert=function(e,t,r){return 0>(r=goog.array.binarySearch(e,t,r))&&(goog.array.insertAt(e,t,-(r+1)),!0)},goog.array.binaryRemove=function(e,t,r){return 0<=(t=goog.array.binarySearch(e,t,r))&&goog.array.removeAt(e,t)},goog.array.bucket=function(e,t,r){for(var n={},o=0;o<e.length;o++){var i=e[o],s=t.call(r,i,o,e);goog.isDef(s)&&(n[s]||(n[s]=[])).push(i)}return n},goog.array.toObject=function(e,t,r){var n={};return goog.array.forEach(e,(function(o,i){n[t.call(r,o,i,e)]=o})),n},goog.array.range=function(e,t,r){var n=[],o=0,i=e;if(void 0!==t&&(o=e,i=t),0>(r=r||1)*(i-o))return[];if(0<r)for(e=o;e<i;e+=r)n.push(e);else for(e=o;e>i;e+=r)n.push(e);return n},goog.array.repeat=function(e,t){for(var r=[],n=0;n<t;n++)r[n]=e;return r},goog.array.flatten=function(e){for(var t=[],r=0;r<arguments.length;r++){var n=arguments[r];if(goog.isArray(n))for(var o=0;o<n.length;o+=8192){var i=goog.array.slice(n,o,o+8192);i=goog.array.flatten.apply(null,i);for(var s=0;s<i.length;s++)t.push(i[s])}else t.push(n)}return t},goog.array.rotate=function(e,t){return goog.asserts.assert(null!=e.length),e.length&&(0<(t%=e.length)?Array.prototype.unshift.apply(e,e.splice(-t,t)):0>t&&Array.prototype.push.apply(e,e.splice(0,-t))),e},goog.array.moveItem=function(e,t,r){goog.asserts.assert(0<=t&&t<e.length),goog.asserts.assert(0<=r&&r<e.length),t=Array.prototype.splice.call(e,t,1),Array.prototype.splice.call(e,r,0,t[0])},goog.array.zip=function(e){if(!arguments.length)return[];for(var t=[],r=arguments[0].length,n=1;n<arguments.length;n++)arguments[n].length<r&&(r=arguments[n].length);for(n=0;n<r;n++){for(var o=[],i=0;i<arguments.length;i++)o.push(arguments[i][n]);t.push(o)}return t},goog.array.shuffle=function(e,t){t=t||Math.random;for(var r=e.length-1;0<r;r--){var n=Math.floor(t()*(r+1)),o=e[r];e[r]=e[n],e[n]=o}},goog.array.copyByIndex=function(e,t){var r=[];return goog.array.forEach(t,(function(t){r.push(e[t])})),r},goog.array.concatMap=function(e,t,r){return goog.array.concat.apply([],goog.array.map(e,t,r))},goog.crypt={},goog.crypt.stringToByteArray=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);255<o&&(t[r++]=255&o,o>>=8),t[r++]=o}return t},goog.crypt.byteArrayToString=function(e){if(8192>=e.length)return String.fromCharCode.apply(null,e);for(var t="",r=0;r<e.length;r+=8192){var n=goog.array.slice(e,r,r+8192);t+=String.fromCharCode.apply(null,n)}return t},goog.crypt.byteArrayToHex=function(e,t){return goog.array.map(e,(function(e){return 1<(e=e.toString(16)).length?e:"0"+e})).join(t||"")},goog.crypt.hexToByteArray=function(e){goog.asserts.assert(e.length%2==0,"Key string length must be multiple of 2");for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substring(r,r+2),16));return t},goog.crypt.stringToUtf8ByteArray=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);128>o?t[r++]=o:(2048>o?t[r++]=o>>6|192:(55296==(64512&o)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n)),t[r++]=o>>18|240,t[r++]=o>>12&63|128):t[r++]=o>>12|224,t[r++]=o>>6&63|128),t[r++]=63&o|128)}return t},goog.crypt.utf8ByteArrayToString=function(e){for(var t=[],r=0,n=0;r<e.length;){var o=e[r++];if(128>o)t[n++]=String.fromCharCode(o);else if(191<o&&224>o){var i=e[r++];t[n++]=String.fromCharCode((31&o)<<6|63&i)}else if(239<o&&365>o){i=e[r++];var s=e[r++];o=((7&o)<<18|(63&i)<<12|(63&s)<<6|63&e[r++])-65536,t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))}else i=e[r++],s=e[r++],t[n++]=String.fromCharCode((15&o)<<12|(63&i)<<6|63&s)}return t.join("")},goog.crypt.xorByteArray=function(e,t){goog.asserts.assert(e.length==t.length,"XOR array lengths must match");for(var r=[],n=0;n<e.length;n++)r.push(e[n]^t[n]);return r},goog.string={},goog.string.internal={},goog.string.internal.startsWith=function(e,t){return 0==e.lastIndexOf(t,0)},goog.string.internal.endsWith=function(e,t){var r=e.length-t.length;return 0<=r&&e.indexOf(t,r)==r},goog.string.internal.caseInsensitiveStartsWith=function(e,t){return 0==goog.string.internal.caseInsensitiveCompare(t,e.substr(0,t.length))},goog.string.internal.caseInsensitiveEndsWith=function(e,t){return 0==goog.string.internal.caseInsensitiveCompare(t,e.substr(e.length-t.length,t.length))},goog.string.internal.caseInsensitiveEquals=function(e,t){return e.toLowerCase()==t.toLowerCase()},goog.string.internal.isEmptyOrWhitespace=function(e){return/^[\s\xa0]*$/.test(e)},goog.string.internal.trim=goog.TRUSTED_SITE&&String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},goog.string.internal.caseInsensitiveCompare=function(e,t){return(e=String(e).toLowerCase())<(t=String(t).toLowerCase())?-1:e==t?0:1},goog.string.internal.newLineToBr=function(e,t){return e.replace(/(\r\n|\r|\n)/g,t?"<br />":"<br>")},goog.string.internal.htmlEscape=function(e,t){if(t)e=e.replace(goog.string.internal.AMP_RE_,"&amp;").replace(goog.string.internal.LT_RE_,"&lt;").replace(goog.string.internal.GT_RE_,"&gt;").replace(goog.string.internal.QUOT_RE_,"&quot;").replace(goog.string.internal.SINGLE_QUOTE_RE_,"&#39;").replace(goog.string.internal.NULL_RE_,"&#0;");else{if(!goog.string.internal.ALL_RE_.test(e))return e;-1!=e.indexOf("&")&&(e=e.replace(goog.string.internal.AMP_RE_,"&amp;")),-1!=e.indexOf("<")&&(e=e.replace(goog.string.internal.LT_RE_,"&lt;")),-1!=e.indexOf(">")&&(e=e.replace(goog.string.internal.GT_RE_,"&gt;")),-1!=e.indexOf('"')&&(e=e.replace(goog.string.internal.QUOT_RE_,"&quot;")),-1!=e.indexOf("'")&&(e=e.replace(goog.string.internal.SINGLE_QUOTE_RE_,"&#39;")),-1!=e.indexOf("\0")&&(e=e.replace(goog.string.internal.NULL_RE_,"&#0;"))}return e},goog.string.internal.AMP_RE_=/&/g,goog.string.internal.LT_RE_=/</g,goog.string.internal.GT_RE_=/>/g,goog.string.internal.QUOT_RE_=/"/g,goog.string.internal.SINGLE_QUOTE_RE_=/'/g,goog.string.internal.NULL_RE_=/\x00/g,goog.string.internal.ALL_RE_=/[\x00&<>"']/,goog.string.internal.whitespaceEscape=function(e,t){return goog.string.internal.newLineToBr(e.replace(/ /g," &#160;"),t)},goog.string.internal.contains=function(e,t){return-1!=e.indexOf(t)},goog.string.internal.caseInsensitiveContains=function(e,t){return goog.string.internal.contains(e.toLowerCase(),t.toLowerCase())},goog.string.internal.compareVersions=function(e,t){var r=0;e=goog.string.internal.trim(String(e)).split("."),t=goog.string.internal.trim(String(t)).split(".");for(var n=Math.max(e.length,t.length),o=0;0==r&&o<n;o++){var i=e[o]||"",s=t[o]||"";do{if(i=/(\d*)(\D*)(.*)/.exec(i)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==i[0].length&&0==s[0].length)break;r=0==i[1].length?0:parseInt(i[1],10);var a=0==s[1].length?0:parseInt(s[1],10);r=goog.string.internal.compareElements_(r,a)||goog.string.internal.compareElements_(0==i[2].length,0==s[2].length)||goog.string.internal.compareElements_(i[2],s[2]),i=i[3],s=s[3]}while(0==r)}return r},goog.string.internal.compareElements_=function(e,t){return e<t?-1:e>t?1:0},goog.string.TypedString=function(){},goog.string.Const=function(e,t){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_=e===goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_&&t||"",this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=goog.string.Const.TYPE_MARKER_},goog.string.Const.prototype.implementsGoogStringTypedString=!0,goog.string.Const.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_},goog.string.Const.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"},goog.string.Const.unwrap=function(e){return e instanceof goog.string.Const&&e.constructor===goog.string.Const&&e.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===goog.string.Const.TYPE_MARKER_?e.stringConstValueWithSecurityContract__googStringSecurityPrivate_:(goog.asserts.fail("expected object of type Const, got '"+e+"'"),"type_error:Const")},goog.string.Const.from=function(e){return new goog.string.Const(goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_,e)},goog.string.Const.TYPE_MARKER_={},goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_={},goog.string.Const.EMPTY=goog.string.Const.from(""),goog.fs={},goog.fs.url={},goog.fs.url.createObjectUrl=function(e){return goog.fs.url.getUrlObject_().createObjectURL(e)},goog.fs.url.revokeObjectUrl=function(e){goog.fs.url.getUrlObject_().revokeObjectURL(e)},goog.fs.url.getUrlObject_=function(){var e=goog.fs.url.findUrlObject_();if(null!=e)return e;throw Error("This browser doesn't seem to support blob URLs")},goog.fs.url.findUrlObject_=function(){return goog.isDef(goog.global.URL)&&goog.isDef(goog.global.URL.createObjectURL)?goog.global.URL:goog.isDef(goog.global.webkitURL)&&goog.isDef(goog.global.webkitURL.createObjectURL)?goog.global.webkitURL:goog.isDef(goog.global.createObjectURL)?goog.global:null},goog.fs.url.browserSupportsObjectUrls=function(){return null!=goog.fs.url.findUrlObject_()},goog.html={},goog.html.trustedtypes={},goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#html"):null,goog.i18n={},goog.i18n.bidi={},goog.i18n.bidi.FORCE_RTL=!1,goog.i18n.bidi.IS_RTL=goog.i18n.bidi.FORCE_RTL||("ar"==goog.LOCALE.substring(0,2).toLowerCase()||"fa"==goog.LOCALE.substring(0,2).toLowerCase()||"he"==goog.LOCALE.substring(0,2).toLowerCase()||"iw"==goog.LOCALE.substring(0,2).toLowerCase()||"ps"==goog.LOCALE.substring(0,2).toLowerCase()||"sd"==goog.LOCALE.substring(0,2).toLowerCase()||"ug"==goog.LOCALE.substring(0,2).toLowerCase()||"ur"==goog.LOCALE.substring(0,2).toLowerCase()||"yi"==goog.LOCALE.substring(0,2).toLowerCase())&&(2==goog.LOCALE.length||"-"==goog.LOCALE.substring(2,3)||"_"==goog.LOCALE.substring(2,3))||3<=goog.LOCALE.length&&"ckb"==goog.LOCALE.substring(0,3).toLowerCase()&&(3==goog.LOCALE.length||"-"==goog.LOCALE.substring(3,4)||"_"==goog.LOCALE.substring(3,4))||7<=goog.LOCALE.length&&("-"==goog.LOCALE.substring(2,3)||"_"==goog.LOCALE.substring(2,3))&&("adlm"==goog.LOCALE.substring(3,7).toLowerCase()||"arab"==goog.LOCALE.substring(3,7).toLowerCase()||"hebr"==goog.LOCALE.substring(3,7).toLowerCase()||"nkoo"==goog.LOCALE.substring(3,7).toLowerCase()||"rohg"==goog.LOCALE.substring(3,7).toLowerCase()||"thaa"==goog.LOCALE.substring(3,7).toLowerCase())||8<=goog.LOCALE.length&&("-"==goog.LOCALE.substring(3,4)||"_"==goog.LOCALE.substring(3,4))&&("adlm"==goog.LOCALE.substring(4,8).toLowerCase()||"arab"==goog.LOCALE.substring(4,8).toLowerCase()||"hebr"==goog.LOCALE.substring(4,8).toLowerCase()||"nkoo"==goog.LOCALE.substring(4,8).toLowerCase()||"rohg"==goog.LOCALE.substring(4,8).toLowerCase()||"thaa"==goog.LOCALE.substring(4,8).toLowerCase()),goog.i18n.bidi.Format={LRE:"‪",RLE:"‫",PDF:"‬",LRM:"‎",RLM:"‏"},goog.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0},goog.i18n.bidi.RIGHT="right",goog.i18n.bidi.LEFT="left",goog.i18n.bidi.I18N_RIGHT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.LEFT:goog.i18n.bidi.RIGHT,goog.i18n.bidi.I18N_LEFT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,goog.i18n.bidi.toDir=function(e,t){return"number"==typeof e?0<e?goog.i18n.bidi.Dir.LTR:0>e?goog.i18n.bidi.Dir.RTL:t?null:goog.i18n.bidi.Dir.NEUTRAL:null==e?null:e?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.ltrChars_="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ऀ-῿‎Ⰰ-\ud801\ud804-\ud839\ud83c-\udbff豈-﬜︀-﹯﻽-￿",goog.i18n.bidi.rtlChars_="֑-ۯۺ-ࣿ‏\ud802-\ud803\ud83a-\ud83bיִ-﷿ﹰ-ﻼ",goog.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g,goog.i18n.bidi.stripHtmlIfNeeded_=function(e,t){return t?e.replace(goog.i18n.bidi.htmlSkipReg_,""):e},goog.i18n.bidi.rtlCharReg_=new RegExp("["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.ltrCharReg_=new RegExp("["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.hasAnyRtl=function(e,t){return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.hasRtlChar=goog.i18n.bidi.hasAnyRtl,goog.i18n.bidi.hasAnyLtr=function(e,t){return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.ltrRe_=new RegExp("^["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlRe_=new RegExp("^["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.isRtlChar=function(e){return goog.i18n.bidi.rtlRe_.test(e)},goog.i18n.bidi.isLtrChar=function(e){return goog.i18n.bidi.ltrRe_.test(e)},goog.i18n.bidi.isNeutralChar=function(e){return!goog.i18n.bidi.isLtrChar(e)&&!goog.i18n.bidi.isRtlChar(e)},goog.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.rtlChars_+"]*["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.ltrChars_+"]*["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.startsWithRtl=function(e,t){return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlText=goog.i18n.bidi.startsWithRtl,goog.i18n.bidi.startsWithLtr=function(e,t){return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrText=goog.i18n.bidi.startsWithLtr,goog.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/,goog.i18n.bidi.isNeutralText=function(e,t){return e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t),goog.i18n.bidi.isRequiredLtrRe_.test(e)||!goog.i18n.bidi.hasAnyLtr(e)&&!goog.i18n.bidi.hasAnyRtl(e)},goog.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.ltrChars_+"][^"+goog.i18n.bidi.rtlChars_+"]*$"),goog.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.rtlChars_+"][^"+goog.i18n.bidi.ltrChars_+"]*$"),goog.i18n.bidi.endsWithLtr=function(e,t){return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrExitText=goog.i18n.bidi.endsWithLtr,goog.i18n.bidi.endsWithRtl=function(e,t){return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlExitText=goog.i18n.bidi.endsWithRtl,goog.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,goog.i18n.bidi.isRtlLanguage=function(e){return goog.i18n.bidi.rtlLocalesRe_.test(e)},goog.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g,goog.i18n.bidi.guardBracketInText=function(e,t){return t=(void 0===t?goog.i18n.bidi.hasAnyRtl(e):t)?goog.i18n.bidi.Format.RLM:goog.i18n.bidi.Format.LRM,e.replace(goog.i18n.bidi.bracketGuardTextRe_,t+"$&"+t)},goog.i18n.bidi.enforceRtlInHtml=function(e){return"<"==e.charAt(0)?e.replace(/<\w+/,"$& dir=rtl"):"\n<span dir=rtl>"+e+"</span>"},goog.i18n.bidi.enforceRtlInText=function(e){return goog.i18n.bidi.Format.RLE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.enforceLtrInHtml=function(e){return"<"==e.charAt(0)?e.replace(/<\w+/,"$& dir=ltr"):"\n<span dir=ltr>"+e+"</span>"},goog.i18n.bidi.enforceLtrInText=function(e){return goog.i18n.bidi.Format.LRE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g,goog.i18n.bidi.leftRe_=/left/gi,goog.i18n.bidi.rightRe_=/right/gi,goog.i18n.bidi.tempRe_=/%%%%/g,goog.i18n.bidi.mirrorCSS=function(e){return e.replace(goog.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_,"%%%%").replace(goog.i18n.bidi.rightRe_,goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_,goog.i18n.bidi.RIGHT)},goog.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g,goog.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g,goog.i18n.bidi.normalizeHebrewQuote=function(e){return e.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_,"$1״").replace(goog.i18n.bidi.singleQuoteSubstituteRe_,"$1׳")},goog.i18n.bidi.wordSeparatorRe_=/\s+/,goog.i18n.bidi.hasNumeralsRe_=/[\d\u06f0-\u06f9]/,goog.i18n.bidi.rtlDetectionThreshold_=.4,goog.i18n.bidi.estimateDirection=function(e,t){var r=0,n=0,o=!1;for(e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t).split(goog.i18n.bidi.wordSeparatorRe_),t=0;t<e.length;t++){var i=e[t];goog.i18n.bidi.startsWithRtl(i)?(r++,n++):goog.i18n.bidi.isRequiredLtrRe_.test(i)?o=!0:goog.i18n.bidi.hasAnyLtr(i)?n++:goog.i18n.bidi.hasNumeralsRe_.test(i)&&(o=!0)}return 0==n?o?goog.i18n.bidi.Dir.LTR:goog.i18n.bidi.Dir.NEUTRAL:r/n>goog.i18n.bidi.rtlDetectionThreshold_?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.detectRtlDirectionality=function(e,t){return goog.i18n.bidi.estimateDirection(e,t)==goog.i18n.bidi.Dir.RTL},goog.i18n.bidi.setElementDirAndAlign=function(e,t){e&&(t=goog.i18n.bidi.toDir(t))&&(e.style.textAlign=t==goog.i18n.bidi.Dir.RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,e.dir=t==goog.i18n.bidi.Dir.RTL?"rtl":"ltr")},goog.i18n.bidi.setElementDirByTextDirectionality=function(e,t){switch(goog.i18n.bidi.estimateDirection(t)){case goog.i18n.bidi.Dir.LTR:e.dir="ltr";break;case goog.i18n.bidi.Dir.RTL:e.dir="rtl";break;default:e.removeAttribute("dir")}},goog.i18n.bidi.DirectionalString=function(){},goog.html.TrustedResourceUrl=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="",this.trustedURL_=null,this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString=!0,goog.html.TrustedResourceUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()},goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.TrustedResourceUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.html.TrustedResourceUrl.prototype.cloneWithParams=function(e,t){var r=goog.html.TrustedResourceUrl.unwrap(this),n=(r=goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(r))[3]||"";return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(r[1]+goog.html.TrustedResourceUrl.stringifyParams_("?",r[2]||"",e)+goog.html.TrustedResourceUrl.stringifyParams_("#",n,t))},goog.DEBUG&&(goog.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"}),goog.html.TrustedResourceUrl.unwrap=function(e){return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(e).toString()},goog.html.TrustedResourceUrl.unwrapTrustedScriptURL=function(e){return e instanceof goog.html.TrustedResourceUrl&&e.constructor===goog.html.TrustedResourceUrl&&e.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_:(goog.asserts.fail("expected object of type TrustedResourceUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:TrustedResourceUrl")},goog.html.TrustedResourceUrl.unwrapTrustedURL=function(e){return e.trustedURL_?e.trustedURL_:goog.html.TrustedResourceUrl.unwrap(e)},goog.html.TrustedResourceUrl.format=function(e,t){var r=goog.string.Const.unwrap(e);if(!goog.html.TrustedResourceUrl.BASE_URL_.test(r))throw Error("Invalid TrustedResourceUrl format: "+r);return e=r.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_,(function(e,n){if(!Object.prototype.hasOwnProperty.call(t,n))throw Error('Found marker, "'+n+'", in format string, "'+r+'", but no valid label mapping found in args: '+JSON.stringify(t));return(e=t[n])instanceof goog.string.Const?goog.string.Const.unwrap(e):encodeURIComponent(String(e))})),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.TrustedResourceUrl.FORMAT_MARKER_=/%{(\w+)}/g,goog.html.TrustedResourceUrl.BASE_URL_=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,goog.html.TrustedResourceUrl.URL_PARAM_PARSER_=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/,goog.html.TrustedResourceUrl.formatWithParams=function(e,t,r,n){return goog.html.TrustedResourceUrl.format(e,t).cloneWithParams(r,n)},goog.html.TrustedResourceUrl.fromConstant=function(e){return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.TrustedResourceUrl.fromConstants=function(e){for(var t="",r=0;r<e.length;r++)t+=goog.string.Const.unwrap(e[r]);return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.TrustedResourceUrl;return t.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScriptURL(e):e,goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY&&(t.trustedURL_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(e)),t},goog.html.TrustedResourceUrl.stringifyParams_=function(e,t,r){if(null==r)return t;if(goog.isString(r))return r?e+encodeURIComponent(r):"";for(var n in r){var o=r[n];o=goog.isArray(o)?o:[o];for(var i=0;i<o.length;i++){var s=o[i];null!=s&&(t||(t=e),t+=(t.length>e.length?"&":"")+encodeURIComponent(n)+"="+encodeURIComponent(String(s)))}}return t},goog.html.SafeUrl=function(){this.privateDoNotAccessOrElseSafeUrlWrappedValue_="",this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez",goog.html.SafeUrl.prototype.implementsGoogStringTypedString=!0,goog.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()},goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.DEBUG&&(goog.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeUrlWrappedValue_+"}"}),goog.html.SafeUrl.unwrap=function(e){return goog.html.SafeUrl.unwrapTrustedURL(e).toString()},goog.html.SafeUrl.unwrapTrustedURL=function(e){return e instanceof goog.html.SafeUrl&&e.constructor===goog.html.SafeUrl&&e.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeUrlWrappedValue_:(goog.asserts.fail("expected object of type SafeUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeUrl")},goog.html.SafeUrl.fromConstant=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.SAFE_MIME_TYPE_PATTERN_=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))(?:;\w+=(?:\w+|"[\w;=]+"))*$/i,goog.html.SafeUrl.isSafeMimeType=function(e){return goog.html.SAFE_MIME_TYPE_PATTERN_.test(e)},goog.html.SafeUrl.fromBlob=function(e){return e=goog.html.SAFE_MIME_TYPE_PATTERN_.test(e.type)?goog.fs.url.createObjectUrl(e):goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.DATA_URL_PATTERN_=/^data:([^,]*);base64,[a-z0-9+\/]+=*$/i,goog.html.SafeUrl.fromDataUrl=function(e){var t=(e=e.replace(/(%0A|%0D)/g,"")).match(goog.html.DATA_URL_PATTERN_);return t=t&&goog.html.SAFE_MIME_TYPE_PATTERN_.test(t[1]),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t?e:goog.html.SafeUrl.INNOCUOUS_STRING)},goog.html.SafeUrl.fromTelUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"tel:")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SIP_URL_PATTERN_=/^sip[s]?:[+a-z0-9_.!$%&'*\/=^`{|}~-]+@([a-z0-9-]+\.)+[a-z0-9]{2,63}$/i,goog.html.SafeUrl.fromSipUrl=function(e){return goog.html.SIP_URL_PATTERN_.test(decodeURIComponent(e))||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromFacebookMessengerUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"fb-messenger://share")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromWhatsAppUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"whatsapp://send")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromSmsUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"sms:")&&goog.html.SafeUrl.isSmsUrlBodyValid_(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.isSmsUrlBodyValid_=function(e){var t=e.indexOf("#");if(0<t&&(e=e.substring(0,t)),!(t=e.match(/[?&]body=/gi)))return!0;if(1<t.length)return!1;if(!(e=e.match(/[?&]body=([^&]*)/)[1]))return!0;try{decodeURIComponent(e)}catch(r){return!1}return/^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(e)},goog.html.SafeUrl.fromSshUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"ssh://")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.sanitizeChromeExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^chrome-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeFirefoxExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^moz-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeEdgeExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^ms-browser-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeExtensionUrl_=function(e,t,r){return(e=e.exec(t))?(e=e[1],-1==(r instanceof goog.string.Const?[goog.string.Const.unwrap(r)]:r.map((function(e){return goog.string.Const.unwrap(e)}))).indexOf(e)&&(t=goog.html.SafeUrl.INNOCUOUS_STRING)):t=goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.SafeUrl.fromTrustedResourceUrl=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.html.TrustedResourceUrl.unwrap(e))},goog.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,goog.html.SafeUrl.SAFE_URL_PATTERN=goog.html.SAFE_URL_PATTERN_,goog.html.SafeUrl.sanitize=function(e){return e instanceof goog.html.SafeUrl?e:(e="object"==typeof e&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SAFE_URL_PATTERN_.test(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeUrl.sanitizeAssertUnchanged=function(e,t){return e instanceof goog.html.SafeUrl?e:(e="object"==typeof e&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),t&&/^data:/i.test(e)&&(t=goog.html.SafeUrl.fromDataUrl(e)).getTypedStringValue()==e?t:(goog.asserts.assert(goog.html.SAFE_URL_PATTERN_.test(e),"%s does not match the safe URL pattern",e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)))},goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.SafeUrl;return t.privateDoNotAccessOrElseSafeUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(e):e,t},goog.html.SafeUrl.ABOUT_BLANK=goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank"),goog.html.SafeStyle=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="",this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyle.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyle.fromConstant=function(e){return 0===(e=goog.string.Const.unwrap(e)).length?goog.html.SafeStyle.EMPTY:(goog.asserts.assert(goog.string.internal.endsWith(e,";"),"Last character of style string is not ';': "+e),goog.asserts.assert(goog.string.internal.contains(e,":"),"Style string must contain at least one ':', to specify a \"name: value\" pair: "+e),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_},goog.DEBUG&&(goog.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"}),goog.html.SafeStyle.unwrap=function(e){return e instanceof goog.html.SafeStyle&&e.constructor===goog.html.SafeStyle&&e.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleWrappedValue_:(goog.asserts.fail("expected object of type SafeStyle, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyle")},goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(e){return(new goog.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_=e,this},goog.html.SafeStyle.EMPTY=goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(""),goog.html.SafeStyle.INNOCUOUS_STRING="zClosurez",goog.html.SafeStyle.create=function(e){var t,r="";for(t in e){if(!/^[-_a-zA-Z0-9]+$/.test(t))throw Error("Name allows only [-_a-zA-Z0-9], got: "+t);var n=e[t];null!=n&&(r+=t+":"+(n=goog.isArray(n)?goog.array.map(n,goog.html.SafeStyle.sanitizePropertyValue_).join(" "):goog.html.SafeStyle.sanitizePropertyValue_(n))+";")}return r?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(r):goog.html.SafeStyle.EMPTY},goog.html.SafeStyle.sanitizePropertyValue_=function(e){if(e instanceof goog.html.SafeUrl)return'url("'+goog.html.SafeUrl.unwrap(e).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';if(e=e instanceof goog.string.Const?goog.string.Const.unwrap(e):goog.html.SafeStyle.sanitizePropertyValueString_(String(e)),/[{;}]/.test(e))throw new goog.asserts.AssertionError("Value does not allow [{;}], got: %s.",[e]);return e},goog.html.SafeStyle.sanitizePropertyValueString_=function(e){var t=e.replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.URL_RE_,"url");return goog.html.SafeStyle.VALUE_RE_.test(t)?goog.html.SafeStyle.COMMENT_RE_.test(e)?(goog.asserts.fail("String value disallows comments, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):goog.html.SafeStyle.hasBalancedQuotes_(e)?goog.html.SafeStyle.hasBalancedSquareBrackets_(e)?goog.html.SafeStyle.sanitizeUrl_(e):(goog.asserts.fail("String value requires balanced square brackets and one identifier per pair of brackets, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value requires balanced quotes, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value allows only "+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+" and simple functions, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING)},goog.html.SafeStyle.hasBalancedQuotes_=function(e){for(var t=!0,r=!0,n=0;n<e.length;n++){var o=e.charAt(n);"'"==o&&r?t=!t:'"'==o&&t&&(r=!r)}return t&&r},goog.html.SafeStyle.hasBalancedSquareBrackets_=function(e){for(var t=!0,r=/^[-_a-zA-Z0-9]$/,n=0;n<e.length;n++){var o=e.charAt(n);if("]"==o){if(t)return!1;t=!0}else if("["==o){if(!t)return!1;t=!1}else if(!t&&!r.test(o))return!1}return t},goog.html.SafeStyle.VALUE_ALLOWED_CHARS_="[-,.\"'%_!# a-zA-Z0-9\\[\\]]",goog.html.SafeStyle.VALUE_RE_=new RegExp("^"+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+"+$"),goog.html.SafeStyle.URL_RE_=/\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g,goog.html.SafeStyle.FUNCTIONS_RE_=/\b(hsl|hsla|rgb|rgba|matrix|calc|minmax|fit-content|repeat|(rotate|scale|translate)(X|Y|Z|3d)?)\([-+*/0-9a-z.%\[\], ]+\)/g,goog.html.SafeStyle.COMMENT_RE_=/\/\*/,goog.html.SafeStyle.sanitizeUrl_=function(e){return e.replace(goog.html.SafeStyle.URL_RE_,(function(e,t,r,n){var o="";return r=r.replace(/^(['"])(.*)\1$/,(function(e,t,r){return o=t,r})),e=goog.html.SafeUrl.sanitize(r).getTypedStringValue(),t+o+e+o+n}))},goog.html.SafeStyle.concat=function(e){var t="",r=function(e){goog.isArray(e)?goog.array.forEach(e,r):t+=goog.html.SafeStyle.unwrap(e)};return goog.array.forEach(arguments,r),t?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t):goog.html.SafeStyle.EMPTY},goog.html.SafeScript=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="",this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeScript.prototype.implementsGoogStringTypedString=!0,goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeScript.fromConstant=function(e){return 0===(e=goog.string.Const.unwrap(e)).length?goog.html.SafeScript.EMPTY:goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeScript.fromConstantAndArgs=function(e,t){for(var r=[],n=1;n<arguments.length;n++)r.push(goog.html.SafeScript.stringify_(arguments[n]));return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("("+goog.string.Const.unwrap(e)+")("+r.join(", ")+");")},goog.html.SafeScript.fromJson=function(e){return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(goog.html.SafeScript.stringify_(e))},goog.html.SafeScript.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()},goog.DEBUG&&(goog.html.SafeScript.prototype.toString=function(){return"SafeScript{"+this.privateDoNotAccessOrElseSafeScriptWrappedValue_+"}"}),goog.html.SafeScript.unwrap=function(e){return goog.html.SafeScript.unwrapTrustedScript(e).toString()},goog.html.SafeScript.unwrapTrustedScript=function(e){return e instanceof goog.html.SafeScript&&e.constructor===goog.html.SafeScript&&e.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeScriptWrappedValue_:(goog.asserts.fail("expected object of type SafeScript, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeScript")},goog.html.SafeScript.stringify_=function(e){return JSON.stringify(e).replace(/</g,"\\x3c")},goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse=function(e){return(new goog.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScript(e):e,this},goog.html.SafeScript.EMPTY=goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(""),goog.object={},goog.object.is=function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},goog.object.forEach=function(e,t,r){for(var n in e)t.call(r,e[n],n,e)},goog.object.filter=function(e,t,r){var n,o={};for(n in e)t.call(r,e[n],n,e)&&(o[n]=e[n]);return o},goog.object.map=function(e,t,r){var n,o={};for(n in e)o[n]=t.call(r,e[n],n,e);return o},goog.object.some=function(e,t,r){for(var n in e)if(t.call(r,e[n],n,e))return!0;return!1},goog.object.every=function(e,t,r){for(var n in e)if(!t.call(r,e[n],n,e))return!1;return!0},goog.object.getCount=function(e){var t,r=0;for(t in e)r++;return r},goog.object.getAnyKey=function(e){for(var t in e)return t},goog.object.getAnyValue=function(e){for(var t in e)return e[t]},goog.object.contains=function(e,t){return goog.object.containsValue(e,t)},goog.object.getValues=function(e){var t,r=[],n=0;for(t in e)r[n++]=e[t];return r},goog.object.getKeys=function(e){var t,r=[],n=0;for(t in e)r[n++]=t;return r},goog.object.getValueByKeys=function(e,t){var r=goog.isArrayLike(t),n=r?t:arguments;for(r=r?0:1;r<n.length;r++){if(null==e)return;e=e[n[r]]}return e},goog.object.containsKey=function(e,t){return null!==e&&t in e},goog.object.containsValue=function(e,t){for(var r in e)if(e[r]==t)return!0;return!1},goog.object.findKey=function(e,t,r){for(var n in e)if(t.call(r,e[n],n,e))return n},goog.object.findValue=function(e,t,r){return(t=goog.object.findKey(e,t,r))&&e[t]},goog.object.isEmpty=function(e){for(var t in e)return!1;return!0},goog.object.clear=function(e){for(var t in e)delete e[t]},goog.object.remove=function(e,t){var r;return(r=t in e)&&delete e[t],r},goog.object.add=function(e,t,r){if(null!==e&&t in e)throw Error('The object already contains the key "'+t+'"');goog.object.set(e,t,r)},goog.object.get=function(e,t,r){return null!==e&&t in e?e[t]:r},goog.object.set=function(e,t,r){e[t]=r},goog.object.setIfUndefined=function(e,t,r){return t in e?e[t]:e[t]=r},goog.object.setWithReturnValueIfNotSet=function(e,t,r){return t in e?e[t]:(r=r(),e[t]=r)},goog.object.equals=function(e,t){for(var r in e)if(!(r in t)||e[r]!==t[r])return!1;for(var n in t)if(!(n in e))return!1;return!0},goog.object.clone=function(e){var t,r={};for(t in e)r[t]=e[t];return r},goog.object.unsafeClone=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if(goog.isFunction(e.clone))return e.clone();for(var r in t="array"==t?[]:{},e)t[r]=goog.object.unsafeClone(e[r]);return t}return e},goog.object.transpose=function(e){var t,r={};for(t in e)r[e[t]]=t;return r},goog.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.object.extend=function(e,t){for(var r,n,o=1;o<arguments.length;o++){for(r in n=arguments[o])e[r]=n[r];for(var i=0;i<goog.object.PROTOTYPE_FIELDS_.length;i++)r=goog.object.PROTOTYPE_FIELDS_[i],Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}},goog.object.create=function(e){var t=arguments.length;if(1==t&&goog.isArray(arguments[0]))return goog.object.create.apply(null,arguments[0]);if(t%2)throw Error("Uneven number of arguments");for(var r={},n=0;n<t;n+=2)r[arguments[n]]=arguments[n+1];return r},goog.object.createSet=function(e){var t=arguments.length;if(1==t&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);for(var r={},n=0;n<t;n++)r[arguments[n]]=!0;return r},goog.object.createImmutableView=function(e){var t=e;return Object.isFrozen&&!Object.isFrozen(e)&&(t=Object.create(e),Object.freeze(t)),t},goog.object.isImmutableView=function(e){return!!Object.isFrozen&&Object.isFrozen(e)},goog.object.getAllPropertyNames=function(e,t,r){if(!e)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return goog.object.getKeys(e);for(var n={};e&&(e!==Object.prototype||t)&&(e!==Function.prototype||r);){for(var o=Object.getOwnPropertyNames(e),i=0;i<o.length;i++)n[o[i]]=!0;e=Object.getPrototypeOf(e)}return goog.object.getKeys(n)},goog.object.getSuperClass=function(e){return(e=Object.getPrototypeOf(e.prototype))&&e.constructor},goog.html.SafeStyleSheet=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="",this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyleSheet.createRule=function(e,t){if(goog.string.internal.contains(e,"<"))throw Error("Selector does not allow '<', got: "+e);var r=e.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g,"");if(!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(r))throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: "+e);if(!goog.html.SafeStyleSheet.hasBalancedBrackets_(r))throw Error("() and [] in selector must be balanced, got: "+e);return t instanceof goog.html.SafeStyle||(t=goog.html.SafeStyle.create(t)),e=e+"{"+goog.html.SafeStyle.unwrap(t).replace(/</g,"\\3C ")+"}",goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeStyleSheet.hasBalancedBrackets_=function(e){for(var t={"(":")","[":"]"},r=[],n=0;n<e.length;n++){var o=e[n];if(t[o])r.push(t[o]);else if(goog.object.contains(t,o)&&r.pop()!=o)return!1}return 0==r.length},goog.html.SafeStyleSheet.concat=function(e){var t="",r=function(e){goog.isArray(e)?goog.array.forEach(e,r):t+=goog.html.SafeStyleSheet.unwrap(e)};return goog.array.forEach(arguments,r),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(t)},goog.html.SafeStyleSheet.fromConstant=function(e){return 0===(e=goog.string.Const.unwrap(e)).length?goog.html.SafeStyleSheet.EMPTY:(goog.asserts.assert(!goog.string.internal.contains(e,"<"),"Forbidden '<' character in style sheet string: "+e),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyleSheet.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_},goog.DEBUG&&(goog.html.SafeStyleSheet.prototype.toString=function(){return"SafeStyleSheet{"+this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_+"}"}),goog.html.SafeStyleSheet.unwrap=function(e){return e instanceof goog.html.SafeStyleSheet&&e.constructor===goog.html.SafeStyleSheet&&e.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_:(goog.asserts.fail("expected object of type SafeStyleSheet, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyleSheet")},goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse=function(e){return(new goog.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=e,this},goog.html.SafeStyleSheet.EMPTY=goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(""),goog.dom.tags={},goog.dom.tags.VOID_TAGS_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},goog.dom.tags.isVoidTag=function(e){return!0===goog.dom.tags.VOID_TAGS_[e]},goog.dom.HtmlElement=function(){},goog.dom.TagName=function(e){this.tagName_=e},goog.dom.TagName.prototype.toString=function(){return this.tagName_},goog.dom.TagName.A=new goog.dom.TagName("A"),goog.dom.TagName.ABBR=new goog.dom.TagName("ABBR"),goog.dom.TagName.ACRONYM=new goog.dom.TagName("ACRONYM"),goog.dom.TagName.ADDRESS=new goog.dom.TagName("ADDRESS"),goog.dom.TagName.APPLET=new goog.dom.TagName("APPLET"),goog.dom.TagName.AREA=new goog.dom.TagName("AREA"),goog.dom.TagName.ARTICLE=new goog.dom.TagName("ARTICLE"),goog.dom.TagName.ASIDE=new goog.dom.TagName("ASIDE"),goog.dom.TagName.AUDIO=new goog.dom.TagName("AUDIO"),goog.dom.TagName.B=new goog.dom.TagName("B"),goog.dom.TagName.BASE=new goog.dom.TagName("BASE"),goog.dom.TagName.BASEFONT=new goog.dom.TagName("BASEFONT"),goog.dom.TagName.BDI=new goog.dom.TagName("BDI"),goog.dom.TagName.BDO=new goog.dom.TagName("BDO"),goog.dom.TagName.BIG=new goog.dom.TagName("BIG"),goog.dom.TagName.BLOCKQUOTE=new goog.dom.TagName("BLOCKQUOTE"),goog.dom.TagName.BODY=new goog.dom.TagName("BODY"),goog.dom.TagName.BR=new goog.dom.TagName("BR"),goog.dom.TagName.BUTTON=new goog.dom.TagName("BUTTON"),goog.dom.TagName.CANVAS=new goog.dom.TagName("CANVAS"),goog.dom.TagName.CAPTION=new goog.dom.TagName("CAPTION"),goog.dom.TagName.CENTER=new goog.dom.TagName("CENTER"),goog.dom.TagName.CITE=new goog.dom.TagName("CITE"),goog.dom.TagName.CODE=new goog.dom.TagName("CODE"),goog.dom.TagName.COL=new goog.dom.TagName("COL"),goog.dom.TagName.COLGROUP=new goog.dom.TagName("COLGROUP"),goog.dom.TagName.COMMAND=new goog.dom.TagName("COMMAND"),goog.dom.TagName.DATA=new goog.dom.TagName("DATA"),goog.dom.TagName.DATALIST=new goog.dom.TagName("DATALIST"),goog.dom.TagName.DD=new goog.dom.TagName("DD"),goog.dom.TagName.DEL=new goog.dom.TagName("DEL"),goog.dom.TagName.DETAILS=new goog.dom.TagName("DETAILS"),goog.dom.TagName.DFN=new goog.dom.TagName("DFN"),goog.dom.TagName.DIALOG=new goog.dom.TagName("DIALOG"),goog.dom.TagName.DIR=new goog.dom.TagName("DIR"),goog.dom.TagName.DIV=new goog.dom.TagName("DIV"),goog.dom.TagName.DL=new goog.dom.TagName("DL"),goog.dom.TagName.DT=new goog.dom.TagName("DT"),goog.dom.TagName.EM=new goog.dom.TagName("EM"),goog.dom.TagName.EMBED=new goog.dom.TagName("EMBED"),goog.dom.TagName.FIELDSET=new goog.dom.TagName("FIELDSET"),goog.dom.TagName.FIGCAPTION=new goog.dom.TagName("FIGCAPTION"),goog.dom.TagName.FIGURE=new goog.dom.TagName("FIGURE"),goog.dom.TagName.FONT=new goog.dom.TagName("FONT"),goog.dom.TagName.FOOTER=new goog.dom.TagName("FOOTER"),goog.dom.TagName.FORM=new goog.dom.TagName("FORM"),goog.dom.TagName.FRAME=new goog.dom.TagName("FRAME"),goog.dom.TagName.FRAMESET=new goog.dom.TagName("FRAMESET"),goog.dom.TagName.H1=new goog.dom.TagName("H1"),goog.dom.TagName.H2=new goog.dom.TagName("H2"),goog.dom.TagName.H3=new goog.dom.TagName("H3"),goog.dom.TagName.H4=new goog.dom.TagName("H4"),goog.dom.TagName.H5=new goog.dom.TagName("H5"),goog.dom.TagName.H6=new goog.dom.TagName("H6"),goog.dom.TagName.HEAD=new goog.dom.TagName("HEAD"),goog.dom.TagName.HEADER=new goog.dom.TagName("HEADER"),goog.dom.TagName.HGROUP=new goog.dom.TagName("HGROUP"),goog.dom.TagName.HR=new goog.dom.TagName("HR"),goog.dom.TagName.HTML=new goog.dom.TagName("HTML"),goog.dom.TagName.I=new goog.dom.TagName("I"),goog.dom.TagName.IFRAME=new goog.dom.TagName("IFRAME"),goog.dom.TagName.IMG=new goog.dom.TagName("IMG"),goog.dom.TagName.INPUT=new goog.dom.TagName("INPUT"),goog.dom.TagName.INS=new goog.dom.TagName("INS"),goog.dom.TagName.ISINDEX=new goog.dom.TagName("ISINDEX"),goog.dom.TagName.KBD=new goog.dom.TagName("KBD"),goog.dom.TagName.KEYGEN=new goog.dom.TagName("KEYGEN"),goog.dom.TagName.LABEL=new goog.dom.TagName("LABEL"),goog.dom.TagName.LEGEND=new goog.dom.TagName("LEGEND"),goog.dom.TagName.LI=new goog.dom.TagName("LI"),goog.dom.TagName.LINK=new goog.dom.TagName("LINK"),goog.dom.TagName.MAIN=new goog.dom.TagName("MAIN"),goog.dom.TagName.MAP=new goog.dom.TagName("MAP"),goog.dom.TagName.MARK=new goog.dom.TagName("MARK"),goog.dom.TagName.MATH=new goog.dom.TagName("MATH"),goog.dom.TagName.MENU=new goog.dom.TagName("MENU"),goog.dom.TagName.MENUITEM=new goog.dom.TagName("MENUITEM"),goog.dom.TagName.META=new goog.dom.TagName("META"),goog.dom.TagName.METER=new goog.dom.TagName("METER"),goog.dom.TagName.NAV=new goog.dom.TagName("NAV"),goog.dom.TagName.NOFRAMES=new goog.dom.TagName("NOFRAMES"),goog.dom.TagName.NOSCRIPT=new goog.dom.TagName("NOSCRIPT"),goog.dom.TagName.OBJECT=new goog.dom.TagName("OBJECT"),goog.dom.TagName.OL=new goog.dom.TagName("OL"),goog.dom.TagName.OPTGROUP=new goog.dom.TagName("OPTGROUP"),goog.dom.TagName.OPTION=new goog.dom.TagName("OPTION"),goog.dom.TagName.OUTPUT=new goog.dom.TagName("OUTPUT"),goog.dom.TagName.P=new goog.dom.TagName("P"),goog.dom.TagName.PARAM=new goog.dom.TagName("PARAM"),goog.dom.TagName.PICTURE=new goog.dom.TagName("PICTURE"),goog.dom.TagName.PRE=new goog.dom.TagName("PRE"),goog.dom.TagName.PROGRESS=new goog.dom.TagName("PROGRESS"),goog.dom.TagName.Q=new goog.dom.TagName("Q"),goog.dom.TagName.RP=new goog.dom.TagName("RP"),goog.dom.TagName.RT=new goog.dom.TagName("RT"),goog.dom.TagName.RTC=new goog.dom.TagName("RTC"),goog.dom.TagName.RUBY=new goog.dom.TagName("RUBY"),goog.dom.TagName.S=new goog.dom.TagName("S"),goog.dom.TagName.SAMP=new goog.dom.TagName("SAMP"),goog.dom.TagName.SCRIPT=new goog.dom.TagName("SCRIPT"),goog.dom.TagName.SECTION=new goog.dom.TagName("SECTION"),goog.dom.TagName.SELECT=new goog.dom.TagName("SELECT"),goog.dom.TagName.SMALL=new goog.dom.TagName("SMALL"),goog.dom.TagName.SOURCE=new goog.dom.TagName("SOURCE"),goog.dom.TagName.SPAN=new goog.dom.TagName("SPAN"),goog.dom.TagName.STRIKE=new goog.dom.TagName("STRIKE"),goog.dom.TagName.STRONG=new goog.dom.TagName("STRONG"),goog.dom.TagName.STYLE=new goog.dom.TagName("STYLE"),goog.dom.TagName.SUB=new goog.dom.TagName("SUB"),goog.dom.TagName.SUMMARY=new goog.dom.TagName("SUMMARY"),goog.dom.TagName.SUP=new goog.dom.TagName("SUP"),goog.dom.TagName.SVG=new goog.dom.TagName("SVG"),goog.dom.TagName.TABLE=new goog.dom.TagName("TABLE"),goog.dom.TagName.TBODY=new goog.dom.TagName("TBODY"),goog.dom.TagName.TD=new goog.dom.TagName("TD"),goog.dom.TagName.TEMPLATE=new goog.dom.TagName("TEMPLATE"),goog.dom.TagName.TEXTAREA=new goog.dom.TagName("TEXTAREA"),goog.dom.TagName.TFOOT=new goog.dom.TagName("TFOOT"),goog.dom.TagName.TH=new goog.dom.TagName("TH"),goog.dom.TagName.THEAD=new goog.dom.TagName("THEAD"),goog.dom.TagName.TIME=new goog.dom.TagName("TIME"),goog.dom.TagName.TITLE=new goog.dom.TagName("TITLE"),goog.dom.TagName.TR=new goog.dom.TagName("TR"),goog.dom.TagName.TRACK=new goog.dom.TagName("TRACK"),goog.dom.TagName.TT=new goog.dom.TagName("TT"),goog.dom.TagName.U=new goog.dom.TagName("U"),goog.dom.TagName.UL=new goog.dom.TagName("UL"),goog.dom.TagName.VAR=new goog.dom.TagName("VAR"),goog.dom.TagName.VIDEO=new goog.dom.TagName("VIDEO"),goog.dom.TagName.WBR=new goog.dom.TagName("WBR"),goog.labs={},goog.labs.userAgent={},goog.labs.userAgent.util={},goog.labs.userAgent.util.getNativeUserAgentString_=function(){var e=goog.labs.userAgent.util.getNavigator_();return e&&(e=e.userAgent)?e:""},goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator},goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_(),goog.labs.userAgent.util.setUserAgent=function(e){goog.labs.userAgent.util.userAgent_=e||goog.labs.userAgent.util.getNativeUserAgentString_()},goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_},goog.labs.userAgent.util.matchUserAgent=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.contains(t,e)},goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.caseInsensitiveContains(t,e)},goog.labs.userAgent.util.extractVersionTuples=function(e){for(var t,r=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,n=[];t=r.exec(e);)n.push([t[1],t[2],t[3]||void 0]);return n},goog.labs.userAgent.browser={},goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")},goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.browser.matchEdgeHtml_=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.browser.matchEdgeChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("Edg/")},goog.labs.userAgent.browser.matchOperaChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("OPR")},goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")||goog.labs.userAgent.util.matchUserAgent("FxiOS")},goog.labs.userAgent.browser.matchSafari_=function(){return goog.labs.userAgent.util.matchUserAgent("Safari")&&!(goog.labs.userAgent.browser.matchChrome_()||goog.labs.userAgent.browser.matchCoast_()||goog.labs.userAgent.browser.matchOpera_()||goog.labs.userAgent.browser.matchEdgeHtml_()||goog.labs.userAgent.browser.matchEdgeChromium_()||goog.labs.userAgent.browser.matchOperaChromium_()||goog.labs.userAgent.browser.matchFirefox_()||goog.labs.userAgent.browser.isSilk()||goog.labs.userAgent.util.matchUserAgent("Android"))},goog.labs.userAgent.browser.matchCoast_=function(){return goog.labs.userAgent.util.matchUserAgent("Coast")},goog.labs.userAgent.browser.matchIosWebview_=function(){return(goog.labs.userAgent.util.matchUserAgent("iPad")||goog.labs.userAgent.util.matchUserAgent("iPhone"))&&!goog.labs.userAgent.browser.matchSafari_()&&!goog.labs.userAgent.browser.matchChrome_()&&!goog.labs.userAgent.browser.matchCoast_()&&!goog.labs.userAgent.browser.matchFirefox_()&&goog.labs.userAgent.util.matchUserAgent("AppleWebKit")},goog.labs.userAgent.browser.matchChrome_=function(){return(goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS"))&&!goog.labs.userAgent.browser.matchEdgeHtml_()},goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return goog.labs.userAgent.util.matchUserAgent("Android")&&!(goog.labs.userAgent.browser.isChrome()||goog.labs.userAgent.browser.isFirefox()||goog.labs.userAgent.browser.isOpera()||goog.labs.userAgent.browser.isSilk())},goog.labs.userAgent.browser.isOpera=goog.labs.userAgent.browser.matchOpera_,goog.labs.userAgent.browser.isIE=goog.labs.userAgent.browser.matchIE_,goog.labs.userAgent.browser.isEdge=goog.labs.userAgent.browser.matchEdgeHtml_,goog.labs.userAgent.browser.isEdgeChromium=goog.labs.userAgent.browser.matchEdgeChromium_,goog.labs.userAgent.browser.isOperaChromium=goog.labs.userAgent.browser.matchOperaChromium_,goog.labs.userAgent.browser.isFirefox=goog.labs.userAgent.browser.matchFirefox_,goog.labs.userAgent.browser.isSafari=goog.labs.userAgent.browser.matchSafari_,goog.labs.userAgent.browser.isCoast=goog.labs.userAgent.browser.matchCoast_,goog.labs.userAgent.browser.isIosWebview=goog.labs.userAgent.browser.matchIosWebview_,goog.labs.userAgent.browser.isChrome=goog.labs.userAgent.browser.matchChrome_,goog.labs.userAgent.browser.isAndroidBrowser=goog.labs.userAgent.browser.matchAndroidBrowser_,goog.labs.userAgent.browser.isSilk=function(){return goog.labs.userAgent.util.matchUserAgent("Silk")},goog.labs.userAgent.browser.getVersion=function(){function e(e){return e=goog.array.find(e,n),r[e]||""}var t=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(t);t=goog.labs.userAgent.util.extractVersionTuples(t);var r={};goog.array.forEach(t,(function(e){r[e[0]]=e[1]}));var n=goog.partial(goog.object.containsKey,r);return goog.labs.userAgent.browser.isOpera()?e(["Version","Opera"]):goog.labs.userAgent.browser.isEdge()?e(["Edge"]):goog.labs.userAgent.browser.isEdgeChromium()?e(["Edg"]):goog.labs.userAgent.browser.isChrome()?e(["Chrome","CriOS"]):(t=t[2])&&t[1]||""},goog.labs.userAgent.browser.isVersionOrHigher=function(e){return 0<=goog.string.internal.compareVersions(goog.labs.userAgent.browser.getVersion(),e)},goog.labs.userAgent.browser.getIEVersion_=function(e){var t=/rv: *([\d\.]*)/.exec(e);if(t&&t[1])return t[1];t="";var r=/MSIE +([\d\.]+)/.exec(e);if(r&&r[1])if(e=/Trident\/(\d.\d)/.exec(e),"7.0"==r[1])if(e&&e[1])switch(e[1]){case"4.0":t="8.0";break;case"5.0":t="9.0";break;case"6.0":t="10.0";break;case"7.0":t="11.0"}else t="7.0";else t=r[1];return t},goog.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="",this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_,this.dir_=null},goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeHtml.prototype.getDirection=function(){return this.dir_},goog.html.SafeHtml.prototype.implementsGoogStringTypedString=!0,goog.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()},goog.DEBUG&&(goog.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"}),goog.html.SafeHtml.unwrap=function(e){return goog.html.SafeHtml.unwrapTrustedHTML(e).toString()},goog.html.SafeHtml.unwrapTrustedHTML=function(e){return e instanceof goog.html.SafeHtml&&e.constructor===goog.html.SafeHtml&&e.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeHtmlWrappedValue_:(goog.asserts.fail("expected object of type SafeHtml, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeHtml")},goog.html.SafeHtml.htmlEscape=function(e){if(e instanceof goog.html.SafeHtml)return e;var t="object"==typeof e,r=null;return t&&e.implementsGoogI18nBidiDirectionalString&&(r=e.getDirection()),e=t&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.htmlEscape(e),r)},goog.html.SafeHtml.htmlEscapePreservingNewlines=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.newLineToBr(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.whitespaceEscape(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.from=goog.html.SafeHtml.htmlEscape,goog.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/,goog.html.SafeHtml.URL_ATTRIBUTES_={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0},goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.html.SafeHtml.create=function(e,t,r){return goog.html.SafeHtml.verifyTagName(String(e)),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(e),t,r)},goog.html.SafeHtml.verifyTagName=function(e){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(e))throw Error("Invalid tag name <"+e+">.");if(e.toUpperCase()in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error("Tag name <"+e+"> is not allowed for SafeHtml.")},goog.html.SafeHtml.createIframe=function(e,t,r,n){e&&goog.html.TrustedResourceUrl.unwrap(e);var o={};return o.src=e||null,o.srcdoc=t&&goog.html.SafeHtml.unwrap(t),e=goog.html.SafeHtml.combineAttributes(o,{sandbox:""},r),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,n)},goog.html.SafeHtml.createSandboxIframe=function(e,t,r,n){if(!goog.html.SafeHtml.canUseSandboxIframe())throw Error("The browser does not support sandboxed iframes.");var o={};return o.src=e?goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)):null,o.srcdoc=t||null,o.sandbox="",e=goog.html.SafeHtml.combineAttributes(o,{},r),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,n)},goog.html.SafeHtml.canUseSandboxIframe=function(){return goog.global.HTMLIFrameElement&&"sandbox"in goog.global.HTMLIFrameElement.prototype},goog.html.SafeHtml.createScriptSrc=function(e,t){return goog.html.TrustedResourceUrl.unwrap(e),e=goog.html.SafeHtml.combineAttributes({src:e},{},t),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",e)},goog.html.SafeHtml.createScript=function(e,t){for(var r in t){var n=r.toLowerCase();if("language"==n||"src"==n||"text"==n||"type"==n)throw Error('Cannot set "'+n+'" attribute')}for(r="",e=goog.array.concat(e),n=0;n<e.length;n++)r+=goog.html.SafeScript.unwrap(e[n]);return e=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(r,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",t,e)},goog.html.SafeHtml.createStyle=function(e,t){t=goog.html.SafeHtml.combineAttributes({type:"text/css"},{},t);var r="";e=goog.array.concat(e);for(var n=0;n<e.length;n++)r+=goog.html.SafeStyleSheet.unwrap(e[n]);return e=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(r,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style",t,e)},goog.html.SafeHtml.createMetaRefresh=function(e,t){return e=goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)),(goog.labs.userAgent.browser.isIE()||goog.labs.userAgent.browser.isEdge())&&goog.string.internal.contains(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta",{"http-equiv":"refresh",content:(t||0)+"; url="+e})},goog.html.SafeHtml.getAttrNameAndValue_=function(e,t,r){if(r instanceof goog.string.Const)r=goog.string.Const.unwrap(r);else if("style"==t.toLowerCase())r=goog.html.SafeHtml.getStyleValue_(r);else{if(/^on/i.test(t))throw Error('Attribute "'+t+'" requires goog.string.Const value, "'+r+'" given.');if(t.toLowerCase()in goog.html.SafeHtml.URL_ATTRIBUTES_)if(r instanceof goog.html.TrustedResourceUrl)r=goog.html.TrustedResourceUrl.unwrap(r);else if(r instanceof goog.html.SafeUrl)r=goog.html.SafeUrl.unwrap(r);else{if(!goog.isString(r))throw Error('Attribute "'+t+'" on tag "'+e+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+r+'" given.');r=goog.html.SafeUrl.sanitize(r).getTypedStringValue()}}return r.implementsGoogStringTypedString&&(r=r.getTypedStringValue()),goog.asserts.assert(goog.isString(r)||goog.isNumber(r),"String or number value expected, got "+typeof r+" with value: "+r),t+'="'+goog.string.internal.htmlEscape(String(r))+'"'},goog.html.SafeHtml.getStyleValue_=function(e){if(!goog.isObject(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof e+" given: "+e);return e instanceof goog.html.SafeStyle||(e=goog.html.SafeStyle.create(e)),goog.html.SafeStyle.unwrap(e)},goog.html.SafeHtml.createWithDir=function(e,t,r,n){return(t=goog.html.SafeHtml.create(t,r,n)).dir_=e,t},goog.html.SafeHtml.join=function(e,t){var r=(e=goog.html.SafeHtml.htmlEscape(e)).getDirection(),n=[],o=function(e){goog.isArray(e)?goog.array.forEach(e,o):(e=goog.html.SafeHtml.htmlEscape(e),n.push(goog.html.SafeHtml.unwrap(e)),e=e.getDirection(),r==goog.i18n.bidi.Dir.NEUTRAL?r=e:e!=goog.i18n.bidi.Dir.NEUTRAL&&r!=e&&(r=null))};return goog.array.forEach(t,o),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n.join(goog.html.SafeHtml.unwrap(e)),r)},goog.html.SafeHtml.concat=function(e){return goog.html.SafeHtml.join(goog.html.SafeHtml.EMPTY,Array.prototype.slice.call(arguments))},goog.html.SafeHtml.concatWithDir=function(e,t){var r=goog.html.SafeHtml.concat(goog.array.slice(arguments,1));return r.dir_=e,r},goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(e,t){return(new goog.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(e,t)},goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e,t){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createHTML(e):e,this.dir_=t,this},goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(e,t,r){var n=null,o="<"+e+goog.html.SafeHtml.stringifyAttributes(e,t);return goog.isDefAndNotNull(r)?goog.isArray(r)||(r=[r]):r=[],goog.dom.tags.isVoidTag(e.toLowerCase())?(goog.asserts.assert(!r.length,"Void tag <"+e+"> does not allow content."),o+=">"):(n=goog.html.SafeHtml.concat(r),o+=">"+goog.html.SafeHtml.unwrap(n)+"</"+e+">",n=n.getDirection()),(e=t&&t.dir)&&(n=/^(ltr|rtl|auto)$/i.test(e)?goog.i18n.bidi.Dir.NEUTRAL:null),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(o,n)},goog.html.SafeHtml.stringifyAttributes=function(e,t){var r="";if(t)for(var n in t){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(n))throw Error('Invalid attribute name "'+n+'".');var o=t[n];goog.isDefAndNotNull(o)&&(r+=" "+goog.html.SafeHtml.getAttrNameAndValue_(e,n,o))}return r},goog.html.SafeHtml.combineAttributes=function(e,t,r){var n,o={};for(n in e)goog.asserts.assert(n.toLowerCase()==n,"Must be lower case"),o[n]=e[n];for(n in t)goog.asserts.assert(n.toLowerCase()==n,"Must be lower case"),o[n]=t[n];for(n in r){var i=n.toLowerCase();if(i in e)throw Error('Cannot override "'+i+'" attribute, got "'+n+'" with value "'+r[n]+'"');i in t&&delete o[i],o[n]=r[n]}return o},goog.html.SafeHtml.DOCTYPE_HTML=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.EMPTY=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.BR=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.uncheckedconversions={},goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(e,t,r){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(t,r||null)},goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(t)},goog.dom.asserts={},goog.dom.asserts.assertIsLocation=function(e){if(goog.asserts.ENABLE_ASSERTS){var t=goog.dom.asserts.getWindow_(e);t&&(!e||!(e instanceof t.Location)&&e instanceof t.Element)&&goog.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s",goog.dom.asserts.debugStringForType_(e))}return e},goog.dom.asserts.assertIsElementType_=function(e,t){if(goog.asserts.ENABLE_ASSERTS){var r=goog.dom.asserts.getWindow_(e);r&&void 0!==r[t]&&(e&&(e instanceof r[t]||!(e instanceof r.Location||e instanceof r.Element))||goog.asserts.fail("Argument is not a %s (or a non-Element, non-Location mock); got: %s",t,goog.dom.asserts.debugStringForType_(e)))}return e},goog.dom.asserts.assertIsHTMLAnchorElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLAnchorElement")},goog.dom.asserts.assertIsHTMLButtonElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLButtonElement")},goog.dom.asserts.assertIsHTMLLinkElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLLinkElement")},goog.dom.asserts.assertIsHTMLImageElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLImageElement")},goog.dom.asserts.assertIsHTMLAudioElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLAudioElement")},goog.dom.asserts.assertIsHTMLVideoElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLVideoElement")},goog.dom.asserts.assertIsHTMLInputElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLInputElement")},goog.dom.asserts.assertIsHTMLTextAreaElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLTextAreaElement")},goog.dom.asserts.assertIsHTMLCanvasElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLCanvasElement")},goog.dom.asserts.assertIsHTMLEmbedElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLEmbedElement")},goog.dom.asserts.assertIsHTMLFormElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLFormElement")},goog.dom.asserts.assertIsHTMLFrameElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLFrameElement")},goog.dom.asserts.assertIsHTMLIFrameElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLIFrameElement")},goog.dom.asserts.assertIsHTMLObjectElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLObjectElement")},goog.dom.asserts.assertIsHTMLScriptElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLScriptElement")},goog.dom.asserts.debugStringForType_=function(e){if(!goog.isObject(e))return void 0===e?"undefined":null===e?"null":typeof e;try{return e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e)}catch(t){return"<object could not be stringified>"}},goog.dom.asserts.getWindow_=function(e){try{var t=e&&e.ownerDocument,r=t&&(t.defaultView||t.parentWindow);if((r=r||goog.global).Element&&r.Location)return r}catch(n){}return null},goog.functions={},goog.functions.constant=function(e){return function(){return e}},goog.functions.FALSE=function(){return!1},goog.functions.TRUE=function(){return!0},goog.functions.NULL=function(){return null},goog.functions.identity=function(e,t){return e},goog.functions.error=function(e){return function(){throw Error(e)}},goog.functions.fail=function(e){return function(){throw e}},goog.functions.lock=function(e,t){return t=t||0,function(){return e.apply(this,Array.prototype.slice.call(arguments,0,t))}},goog.functions.nth=function(e){return function(){return arguments[e]}},goog.functions.partialRight=function(e,t){var r=Array.prototype.slice.call(arguments,1);return function(){var t=Array.prototype.slice.call(arguments);return t.push.apply(t,r),e.apply(this,t)}},goog.functions.withReturnValue=function(e,t){return goog.functions.sequence(e,goog.functions.constant(t))},goog.functions.equalTo=function(e,t){return function(r){return t?e==r:e===r}},goog.functions.compose=function(e,t){var r=arguments,n=r.length;return function(){var e;n&&(e=r[n-1].apply(this,arguments));for(var t=n-2;0<=t;t--)e=r[t].call(this,e);return e}},goog.functions.sequence=function(e){var t=arguments,r=t.length;return function(){for(var e,n=0;n<r;n++)e=t[n].apply(this,arguments);return e}},goog.functions.and=function(e){var t=arguments,r=t.length;return function(){for(var e=0;e<r;e++)if(!t[e].apply(this,arguments))return!1;return!0}},goog.functions.or=function(e){var t=arguments,r=t.length;return function(){for(var e=0;e<r;e++)if(t[e].apply(this,arguments))return!0;return!1}},goog.functions.not=function(e){return function(){return!e.apply(this,arguments)}},goog.functions.create=function(e,t){var r=function(){};return r.prototype=e.prototype,r=new r,e.apply(r,Array.prototype.slice.call(arguments,1)),r},goog.functions.CACHE_RETURN_VALUE=!0,goog.functions.cacheReturnValue=function(e){var t,r=!1;return function(){return goog.functions.CACHE_RETURN_VALUE?(r||(t=e(),r=!0),t):e()}},goog.functions.once=function(e){var t=e;return function(){if(t){var e=t;t=null,e()}}},goog.functions.debounce=function(e,t,r){var n=0;return function(o){goog.global.clearTimeout(n);var i=arguments;n=goog.global.setTimeout((function(){e.apply(r,i)}),t)}},goog.functions.throttle=function(e,t,r){var n=0,o=!1,i=[],s=function(){n=0,o&&(o=!1,a())},a=function(){n=goog.global.setTimeout(s,t),e.apply(r,i)};return function(e){i=arguments,n?o=!0:a()}},goog.functions.rateLimit=function(e,t,r){var n=0,o=function(){n=0};return function(i){n||(n=goog.global.setTimeout(o,t),e.apply(r,arguments))}},goog.dom.safe={},goog.dom.safe.InsertAdjacentHtmlPosition={AFTERBEGIN:"afterbegin",AFTEREND:"afterend",BEFOREBEGIN:"beforebegin",BEFOREEND:"beforeend"},goog.dom.safe.insertAdjacentHtml=function(e,t,r){e.insertAdjacentHTML(t,goog.html.SafeHtml.unwrapTrustedHTML(r))},goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.dom.safe.isInnerHtmlCleanupRecursive_=goog.functions.cacheReturnValue((function(){if(goog.DEBUG&&"undefined"==typeof document)return!1;var e=document.createElement("div"),t=document.createElement("div");return t.appendChild(document.createElement("div")),e.appendChild(t),!(goog.DEBUG&&!e.firstChild||(t=e.firstChild.firstChild,e.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY),t.parentElement))})),goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse=function(e,t){if(goog.dom.safe.isInnerHtmlCleanupRecursive_())for(;e.lastChild;)e.removeChild(e.lastChild);e.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setInnerHtml=function(e,t){if(goog.asserts.ENABLE_ASSERTS){var r=e.tagName.toUpperCase();if(goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[r])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+e.tagName+".")}goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(e,t)},goog.dom.safe.setOuterHtml=function(e,t){e.outerHTML=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setFormElementAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLFormElement(e).action=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setButtonFormAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLButtonElement(e).formAction=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setInputFormAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLInputElement(e).formAction=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setStyle=function(e,t){e.style.cssText=goog.html.SafeStyle.unwrap(t)},goog.dom.safe.documentWrite=function(e,t){e.write(goog.html.SafeHtml.unwrapTrustedHTML(t))},goog.dom.safe.setAnchorHref=function(e,t){goog.dom.asserts.assertIsHTMLAnchorElement(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.href=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setImageSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLImageElement(e),!(t instanceof goog.html.SafeUrl)){var r=/^data:image\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,r)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setAudioSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLAudioElement(e),!(t instanceof goog.html.SafeUrl)){var r=/^data:audio\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,r)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setVideoSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLVideoElement(e),!(t instanceof goog.html.SafeUrl)){var r=/^data:video\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,r)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setEmbedSrc=function(e,t){goog.dom.asserts.assertIsHTMLEmbedElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t)},goog.dom.safe.setFrameSrc=function(e,t){goog.dom.asserts.assertIsHTMLFrameElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)},goog.dom.safe.setIframeSrc=function(e,t){goog.dom.asserts.assertIsHTMLIFrameElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)},goog.dom.safe.setIframeSrcdoc=function(e,t){goog.dom.asserts.assertIsHTMLIFrameElement(e),e.srcdoc=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setLinkHrefAndRel=function(e,t,r){goog.dom.asserts.assertIsHTMLLinkElement(e),e.rel=r,goog.string.internal.caseInsensitiveContains(r,"stylesheet")?(goog.asserts.assert(t instanceof goog.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),e.href=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)):e.href=t instanceof goog.html.TrustedResourceUrl?goog.html.TrustedResourceUrl.unwrapTrustedURL(t):t instanceof goog.html.SafeUrl?goog.html.SafeUrl.unwrapTrustedURL(t):goog.html.SafeUrl.unwrapTrustedURL(goog.html.SafeUrl.sanitizeAssertUnchanged(t))},goog.dom.safe.setObjectData=function(e,t){goog.dom.asserts.assertIsHTMLObjectElement(e),e.data=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t)},goog.dom.safe.setScriptSrc=function(e,t){goog.dom.asserts.assertIsHTMLScriptElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t),(t=goog.getScriptNonce())&&e.setAttribute("nonce",t)},goog.dom.safe.setScriptContent=function(e,t){goog.dom.asserts.assertIsHTMLScriptElement(e),e.text=goog.html.SafeScript.unwrapTrustedScript(t),(t=goog.getScriptNonce())&&e.setAttribute("nonce",t)},goog.dom.safe.setLocationHref=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.href=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.assignLocation=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.assign(goog.html.SafeUrl.unwrapTrustedURL(t))},goog.dom.safe.replaceLocation=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.replace(goog.html.SafeUrl.unwrapTrustedURL(t))},goog.dom.safe.openInWindow=function(e,t,r,n,o){return e=e instanceof goog.html.SafeUrl?e:goog.html.SafeUrl.sanitizeAssertUnchanged(e),(t||goog.global).open(goog.html.SafeUrl.unwrapTrustedURL(e),r?goog.string.Const.unwrap(r):"",n,o)},goog.dom.safe.parseFromStringHtml=function(e,t){return goog.dom.safe.parseFromString(e,t,"text/html")},goog.dom.safe.parseFromString=function(e,t,r){return e.parseFromString(goog.html.SafeHtml.unwrapTrustedHTML(t),r)},goog.dom.safe.createImageFromBlob=function(e){if(!/^image\/.*/g.test(e.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var t=goog.global.URL.createObjectURL(e);return(e=new goog.global.Image).onload=function(){goog.global.URL.revokeObjectURL(t)},goog.dom.safe.setImageSrc(e,goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Image blob URL."),t)),e},goog.string.DETECT_DOUBLE_ESCAPING=!1,goog.string.FORCE_NON_DOM_HTML_UNESCAPING=!1,goog.string.Unicode={NBSP:" "},goog.string.startsWith=goog.string.internal.startsWith,goog.string.endsWith=goog.string.internal.endsWith,goog.string.caseInsensitiveStartsWith=goog.string.internal.caseInsensitiveStartsWith,goog.string.caseInsensitiveEndsWith=goog.string.internal.caseInsensitiveEndsWith,goog.string.caseInsensitiveEquals=goog.string.internal.caseInsensitiveEquals,goog.string.subs=function(e,t){for(var r=e.split("%s"),n="",o=Array.prototype.slice.call(arguments,1);o.length&&1<r.length;)n+=r.shift()+o.shift();return n+r.join("%s")},goog.string.collapseWhitespace=function(e){return e.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},goog.string.isEmptyOrWhitespace=goog.string.internal.isEmptyOrWhitespace,goog.string.isEmptyString=function(e){return 0==e.length},goog.string.isEmpty=goog.string.isEmptyOrWhitespace,goog.string.isEmptyOrWhitespaceSafe=function(e){return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(e))},goog.string.isEmptySafe=goog.string.isEmptyOrWhitespaceSafe,goog.string.isBreakingWhitespace=function(e){return!/[^\t\n\r ]/.test(e)},goog.string.isAlpha=function(e){return!/[^a-zA-Z]/.test(e)},goog.string.isNumeric=function(e){return!/[^0-9]/.test(e)},goog.string.isAlphaNumeric=function(e){return!/[^a-zA-Z0-9]/.test(e)},goog.string.isSpace=function(e){return" "==e},goog.string.isUnicodeChar=function(e){return 1==e.length&&" "<=e&&"~">=e||"€"<=e&&"�">=e},goog.string.stripNewlines=function(e){return e.replace(/(\r\n|\r|\n)+/g," ")},goog.string.canonicalizeNewlines=function(e){return e.replace(/(\r\n|\r|\n)/g,"\n")},goog.string.normalizeWhitespace=function(e){return e.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(e){return e.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.string.internal.trim,goog.string.trimLeft=function(e){return e.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(e){return e.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=goog.string.internal.caseInsensitiveCompare,goog.string.numberAwareCompare_=function(e,t,r){if(e==t)return 0;if(!e)return-1;if(!t)return 1;for(var n=e.toLowerCase().match(r),o=t.toLowerCase().match(r),i=Math.min(n.length,o.length),s=0;s<i;s++){r=n[s];var a=o[s];if(r!=a)return e=parseInt(r,10),!isNaN(e)&&(t=parseInt(a,10),!isNaN(t)&&e-t)?e-t:r<a?-1:1}return n.length!=o.length?n.length-o.length:e<t?-1:1},goog.string.intAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\D+/g)},goog.string.floatAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\.\d+|\D+/g)},goog.string.numerateCompare=goog.string.floatAwareCompare,goog.string.urlEncode=function(e){return encodeURIComponent(String(e))},goog.string.urlDecode=function(e){return decodeURIComponent(e.replace(/\+/g," "))},goog.string.newLineToBr=goog.string.internal.newLineToBr,goog.string.htmlEscape=function(e,t){return e=goog.string.internal.htmlEscape(e,t),goog.string.DETECT_DOUBLE_ESCAPING&&(e=e.replace(goog.string.E_RE_,"&#101;")),e},goog.string.E_RE_=/e/g,goog.string.unescapeEntities=function(e){return goog.string.contains(e,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(e):goog.string.unescapePureXmlEntities_(e):e},goog.string.unescapeEntitiesWithDocument=function(e,t){return goog.string.contains(e,"&")?goog.string.unescapeEntitiesUsingDom_(e,t):e},goog.string.unescapeEntitiesUsingDom_=function(e,t){var r={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},n=t?t.createElement("div"):goog.global.document.createElement("div");return e.replace(goog.string.HTML_ENTITY_PATTERN_,(function(e,t){var o=r[e];return o||("#"==t.charAt(0)&&(t=Number("0"+t.substr(1)),isNaN(t)||(o=String.fromCharCode(t))),o||(goog.dom.safe.setInnerHtml(n,goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Single HTML entity."),e+" ")),o=n.firstChild.nodeValue.slice(0,-1)),r[e]=o)}))},goog.string.unescapePureXmlEntities_=function(e){return e.replace(/&([^;]+);/g,(function(e,t){switch(t){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';default:return"#"!=t.charAt(0)||(t=Number("0"+t.substr(1)),isNaN(t))?e:String.fromCharCode(t)}}))},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(e,t){return goog.string.newLineToBr(e.replace(/ /g," &#160;"),t)},goog.string.preserveSpaces=function(e){return e.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(e,t){for(var r=t.length,n=0;n<r;n++){var o=1==r?t:t.charAt(n);if(e.charAt(0)==o&&e.charAt(e.length-1)==o)return e.substring(1,e.length-1)}return e},goog.string.truncate=function(e,t,r){return r&&(e=goog.string.unescapeEntities(e)),e.length>t&&(e=e.substring(0,t-3)+"..."),r&&(e=goog.string.htmlEscape(e)),e},goog.string.truncateMiddle=function(e,t,r,n){if(r&&(e=goog.string.unescapeEntities(e)),n&&e.length>t){n>t&&(n=t);var o=e.length-n;e=e.substring(0,t-n)+"..."+e.substring(o)}else e.length>t&&(n=Math.floor(t/2),o=e.length-n,e=e.substring(0,n+t%2)+"..."+e.substring(o));return r&&(e=goog.string.htmlEscape(e)),e},goog.string.specialEscapeChars_={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(e){e=String(e);for(var t=['"'],r=0;r<e.length;r++){var n=e.charAt(r),o=n.charCodeAt(0);t[r+1]=goog.string.specialEscapeChars_[n]||(31<o&&127>o?n:goog.string.escapeChar(n))}return t.push('"'),t.join("")},goog.string.escapeString=function(e){for(var t=[],r=0;r<e.length;r++)t[r]=goog.string.escapeChar(e.charAt(r));return t.join("")},goog.string.escapeChar=function(e){if(e in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[e];if(e in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[e]=goog.string.specialEscapeChars_[e];var t=e.charCodeAt(0);if(31<t&&127>t)var r=e;else 256>t?(r="\\x",(16>t||256<t)&&(r+="0")):(r="\\u",4096>t&&(r+="0")),r+=t.toString(16).toUpperCase();return goog.string.jsEscapeCache_[e]=r},goog.string.contains=goog.string.internal.contains,goog.string.caseInsensitiveContains=goog.string.internal.caseInsensitiveContains,goog.string.countOf=function(e,t){return e&&t?e.split(t).length-1:0},goog.string.removeAt=function(e,t,r){var n=e;return 0<=t&&t<e.length&&0<r&&(n=e.substr(0,t)+e.substr(t+r,e.length-t-r)),n},goog.string.remove=function(e,t){return e.replace(t,"")},goog.string.removeAll=function(e,t){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,"")},goog.string.replaceAll=function(e,t,r){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,r.replace(/\$/g,"$$$$"))},goog.string.regExpEscape=function(e){return String(e).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},goog.string.repeat=String.prototype.repeat?function(e,t){return e.repeat(t)}:function(e,t){return Array(t+1).join(e)},goog.string.padNumber=function(e,t,r){return-1==(r=(e=goog.isDef(r)?e.toFixed(r):String(e)).indexOf("."))&&(r=e.length),goog.string.repeat("0",Math.max(0,t-r))+e},goog.string.makeSafe=function(e){return null==e?"":String(e)},goog.string.buildString=function(e){return Array.prototype.join.call(arguments,"")},goog.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^goog.now()).toString(36)},goog.string.compareVersions=goog.string.internal.compareVersions,goog.string.hashCode=function(e){for(var t=0,r=0;r<e.length;++r)t=31*t+e.charCodeAt(r)>>>0;return t},goog.string.uniqueStringCounter_=2147483648*Math.random()|0,goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++},goog.string.toNumber=function(e){var t=Number(e);return 0==t&&goog.string.isEmptyOrWhitespace(e)?NaN:t},goog.string.isLowerCamelCase=function(e){return/^[a-z]+([A-Z][a-z]*)*$/.test(e)},goog.string.isUpperCamelCase=function(e){return/^([A-Z][a-z]*)+$/.test(e)},goog.string.toCamelCase=function(e){return String(e).replace(/\-([a-z])/g,(function(e,t){return t.toUpperCase()}))},goog.string.toSelectorCase=function(e){return String(e).replace(/([A-Z])/g,"-$1").toLowerCase()},goog.string.toTitleCase=function(e,t){return t=goog.isString(t)?goog.string.regExpEscape(t):"\\s",e.replace(new RegExp("(^"+(t?"|["+t+"]+":"")+")([a-z])","g"),(function(e,t,r){return t+r.toUpperCase()}))},goog.string.capitalize=function(e){return String(e.charAt(0)).toUpperCase()+String(e.substr(1)).toLowerCase()},goog.string.parseInt=function(e){return isFinite(e)&&(e=String(e)),goog.isString(e)?/^\s*-?0x/i.test(e)?parseInt(e,16):parseInt(e,10):NaN},goog.string.splitLimit=function(e,t,r){e=e.split(t);for(var n=[];0<r&&e.length;)n.push(e.shift()),r--;return e.length&&n.push(e.join(t)),n},goog.string.lastComponent=function(e,t){if(!t)return e;"string"==typeof t&&(t=[t]);for(var r=-1,n=0;n<t.length;n++)if(""!=t[n]){var o=e.lastIndexOf(t[n]);o>r&&(r=o)}return-1==r?e:e.slice(r+1)},goog.string.editDistance=function(e,t){var r=[],n=[];if(e==t)return 0;if(!e.length||!t.length)return Math.max(e.length,t.length);for(var o=0;o<t.length+1;o++)r[o]=o;for(o=0;o<e.length;o++){n[0]=o+1;for(var i=0;i<t.length;i++)n[i+1]=Math.min(n[i]+1,r[i+1]+1,r[i]+Number(e[o]!=t[i]));for(i=0;i<r.length;i++)r[i]=n[i]}return n[t.length]},goog.labs.userAgent.platform={},goog.labs.userAgent.platform.isAndroid=function(){return goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.platform.isIpod=function(){return goog.labs.userAgent.util.matchUserAgent("iPod")},goog.labs.userAgent.platform.isIphone=function(){return goog.labs.userAgent.util.matchUserAgent("iPhone")&&!goog.labs.userAgent.util.matchUserAgent("iPod")&&!goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIpad=function(){return goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIos=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpad()||goog.labs.userAgent.platform.isIpod()},goog.labs.userAgent.platform.isMacintosh=function(){return goog.labs.userAgent.util.matchUserAgent("Macintosh")},goog.labs.userAgent.platform.isLinux=function(){return goog.labs.userAgent.util.matchUserAgent("Linux")},goog.labs.userAgent.platform.isWindows=function(){return goog.labs.userAgent.util.matchUserAgent("Windows")},goog.labs.userAgent.platform.isChromeOS=function(){return goog.labs.userAgent.util.matchUserAgent("CrOS")},goog.labs.userAgent.platform.isChromecast=function(){return goog.labs.userAgent.util.matchUserAgent("CrKey")},goog.labs.userAgent.platform.isKaiOS=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("KaiOS")},goog.labs.userAgent.platform.isGo2Phone=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("GAFP")},goog.labs.userAgent.platform.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent(),t="";return goog.labs.userAgent.platform.isWindows()?t=(e=(t=/Windows (?:NT|Phone) ([0-9.]+)/).exec(e))?e[1]:"0.0":goog.labs.userAgent.platform.isIos()?t=(e=(t=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/).exec(e))&&e[1].replace(/_/g,"."):goog.labs.userAgent.platform.isMacintosh()?t=(e=(t=/Mac OS X ([0-9_.]+)/).exec(e))?e[1].replace(/_/g,"."):"10":goog.labs.userAgent.platform.isKaiOS()?t=(e=(t=/(?:KaiOS)\/(\S+)/i).exec(e))&&e[1]:goog.labs.userAgent.platform.isAndroid()?t=(e=(t=/Android\s+([^\);]+)(\)|;)/).exec(e))&&e[1]:goog.labs.userAgent.platform.isChromeOS()&&(t=(e=(t=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/).exec(e))&&e[1]),t||""},goog.labs.userAgent.platform.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),e)},goog.reflect={},goog.reflect.object=function(e,t){return t},goog.reflect.objectProperty=function(e,t){return e},goog.reflect.sinkValue=function(e){return goog.reflect.sinkValue[" "](e),e},goog.reflect.sinkValue[" "]=goog.nullFunction,goog.reflect.canAccessProperty=function(e,t){try{return goog.reflect.sinkValue(e[t]),!0}catch(r){}return!1},goog.reflect.cache=function(e,t,r,n){return n=n?n(t):t,Object.prototype.hasOwnProperty.call(e,n)?e[n]:e[n]=r(t)},goog.labs.userAgent.engine={},goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")},goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.engine.isEdge=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent();if(e){e=goog.labs.userAgent.util.extractVersionTuples(e);var t,r=goog.labs.userAgent.engine.getEngineTuple_(e);if(r)return"Gecko"==r[0]?goog.labs.userAgent.engine.getVersionForKey_(e,"Firefox"):r[1];if((e=e[0])&&(t=e[2])&&(t=/Trident\/([^\s;]+)/.exec(t)))return t[1]}return""},goog.labs.userAgent.engine.getEngineTuple_=function(e){if(!goog.labs.userAgent.engine.isEdge())return e[1];for(var t=0;t<e.length;t++){var r=e[t];if("Edge"==r[0])return r}},goog.labs.userAgent.engine.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(),e)},goog.labs.userAgent.engine.getVersionForKey_=function(e,t){return(e=goog.array.find(e,(function(e){return t==e[0]})))&&e[1]||""},goog.userAgent={},goog.userAgent.ASSUME_IE=!1,goog.userAgent.ASSUME_EDGE=!1,goog.userAgent.ASSUME_GECKO=!1,goog.userAgent.ASSUME_WEBKIT=!1,goog.userAgent.ASSUME_MOBILE_WEBKIT=!1,goog.userAgent.ASSUME_OPERA=!1,goog.userAgent.ASSUME_ANY_VERSION=!1,goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA,goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()},goog.userAgent.getNavigatorTyped=function(){return goog.global.navigator||null},goog.userAgent.getNavigator=function(){return goog.userAgent.getNavigatorTyped()},goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera(),goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE(),goog.userAgent.EDGE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_EDGE:goog.labs.userAgent.engine.isEdge(),goog.userAgent.EDGE_OR_IE=goog.userAgent.EDGE||goog.userAgent.IE,goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko();goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit(),goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")},goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_(),goog.userAgent.SAFARI=goog.userAgent.WEBKIT,goog.userAgent.determinePlatform_=function(){var e=goog.userAgent.getNavigatorTyped();return e&&e.platform||""},goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_(),goog.userAgent.ASSUME_MAC=!1,goog.userAgent.ASSUME_WINDOWS=!1,goog.userAgent.ASSUME_LINUX=!1,goog.userAgent.ASSUME_X11=!1,goog.userAgent.ASSUME_ANDROID=!1,goog.userAgent.ASSUME_IPHONE=!1,goog.userAgent.ASSUME_IPAD=!1,goog.userAgent.ASSUME_IPOD=!1,goog.userAgent.ASSUME_KAIOS=!1,goog.userAgent.ASSUME_GO2PHONE=!1,goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD,goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh(),goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows(),goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()},goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_(),goog.userAgent.isX11_=function(){var e=goog.userAgent.getNavigatorTyped();return!!e&&goog.string.contains(e.appVersion||"","X11")},goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_(),goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid(),goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone(),goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.IPOD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIpod(),goog.userAgent.IOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIos(),goog.userAgent.KAIOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_KAIOS:goog.labs.userAgent.platform.isKaiOS(),goog.userAgent.GO2PHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_GO2PHONE:goog.labs.userAgent.platform.isGo2Phone(),goog.userAgent.determineVersion_=function(){var e="",t=goog.userAgent.getVersionRegexResult_();return t&&(e=t?t[1]:""),goog.userAgent.IE&&null!=(t=goog.userAgent.getDocumentMode_())&&t>parseFloat(e)?String(t):e},goog.userAgent.getVersionRegexResult_=function(){var e=goog.userAgent.getUserAgentString();return goog.userAgent.GECKO?/rv:([^\);]+)(\)|;)/.exec(e):goog.userAgent.EDGE?/Edge\/([\d\.]+)/.exec(e):goog.userAgent.IE?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):goog.userAgent.WEBKIT?/WebKit\/(\S+)/.exec(e):goog.userAgent.OPERA?/(?:Version)[ \/]?(\S+)/.exec(e):void 0},goog.userAgent.getDocumentMode_=function(){var e=goog.global.document;return e?e.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(e,t){return goog.string.compareVersions(e,t)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(e){return goog.userAgent.ASSUME_ANY_VERSION||goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_,e,(function(){return 0<=goog.string.compareVersions(goog.userAgent.VERSION,e)}))},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(e){return Number(goog.userAgent.DOCUMENT_MODE)>=e},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=function(){if(goog.global.document&&goog.userAgent.IE)return goog.userAgent.getDocumentMode_()}(),goog.userAgent.product={},goog.userAgent.product.ASSUME_FIREFOX=!1,goog.userAgent.product.ASSUME_IPHONE=!1,goog.userAgent.product.ASSUME_IPAD=!1,goog.userAgent.product.ASSUME_ANDROID=!1,goog.userAgent.product.ASSUME_CHROME=!1,goog.userAgent.product.ASSUME_SAFARI=!1,goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_IPAD||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI,goog.userAgent.product.OPERA=goog.userAgent.OPERA,goog.userAgent.product.IE=goog.userAgent.IE,goog.userAgent.product.EDGE=goog.userAgent.EDGE,goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.labs.userAgent.browser.isFirefox(),goog.userAgent.product.isIphoneOrIpod_=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpod()},goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.isIphoneOrIpod_(),goog.userAgent.product.IPAD=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.labs.userAgent.browser.isAndroidBrowser(),goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.labs.userAgent.browser.isChrome(),goog.userAgent.product.isSafariDesktop_=function(){return goog.labs.userAgent.browser.isSafari()&&!goog.labs.userAgent.platform.isIos()},goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.isSafariDesktop_(),goog.crypt.base64={},goog.crypt.base64.DEFAULT_ALPHABET_COMMON_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",goog.crypt.base64.ENCODED_VALS=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"+/=",goog.crypt.base64.ENCODED_VALS_WEBSAFE=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"-_.",goog.crypt.base64.Alphabet={DEFAULT:0,NO_PADDING:1,WEBSAFE:2,WEBSAFE_DOT_PADDING:3,WEBSAFE_NO_PADDING:4},goog.crypt.base64.paddingChars_="=.",goog.crypt.base64.isPadding_=function(e){return goog.string.contains(goog.crypt.base64.paddingChars_,e)},goog.crypt.base64.byteToCharMaps_={},goog.crypt.base64.charToByteMap_=null,goog.crypt.base64.ASSUME_NATIVE_SUPPORT_=goog.userAgent.GECKO||goog.userAgent.WEBKIT&&!goog.userAgent.product.SAFARI||goog.userAgent.OPERA,goog.crypt.base64.HAS_NATIVE_ENCODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||"function"==typeof goog.global.btoa,goog.crypt.base64.HAS_NATIVE_DECODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||!goog.userAgent.product.SAFARI&&!goog.userAgent.IE&&"function"==typeof goog.global.atob,goog.crypt.base64.encodeByteArray=function(e,t){goog.asserts.assert(goog.isArrayLike(e),"encodeByteArray takes an array as a parameter"),void 0===t&&(t=goog.crypt.base64.Alphabet.DEFAULT),goog.crypt.base64.init_(),t=goog.crypt.base64.byteToCharMaps_[t];for(var r=[],n=0;n<e.length;n+=3){var o=e[n],i=n+1<e.length,s=i?e[n+1]:0,a=n+2<e.length,l=a?e[n+2]:0,u=o>>2;o=(3&o)<<4|s>>4,s=(15&s)<<2|l>>6,l&=63,a||(l=64,i||(s=64)),r.push(t[u],t[o],t[s]||"",t[l]||"")}return r.join("")},goog.crypt.base64.encodeString=function(e,t){return goog.crypt.base64.HAS_NATIVE_ENCODE_&&!t?goog.global.btoa(e):goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(e),t)},goog.crypt.base64.decodeString=function(e,t){if(goog.crypt.base64.HAS_NATIVE_DECODE_&&!t)return goog.global.atob(e);var r="";return goog.crypt.base64.decodeStringInternal_(e,(function(e){r+=String.fromCharCode(e)})),r},goog.crypt.base64.decodeStringToByteArray=function(e,t){var r=[];return goog.crypt.base64.decodeStringInternal_(e,(function(e){r.push(e)})),r},goog.crypt.base64.decodeStringToUint8Array=function(e){goog.asserts.assert(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10"),"Browser does not support typed arrays");var t=e.length,r=3*t/4;r%3?r=Math.floor(r):goog.crypt.base64.isPadding_(e[t-1])&&(r=goog.crypt.base64.isPadding_(e[t-2])?r-2:r-1);var n=new Uint8Array(r),o=0;return goog.crypt.base64.decodeStringInternal_(e,(function(e){n[o++]=e})),n.subarray(0,o)},goog.crypt.base64.decodeStringInternal_=function(e,t){function r(t){for(;n<e.length;){var r=e.charAt(n++),o=goog.crypt.base64.charToByteMap_[r];if(null!=o)return o;if(!goog.string.isEmptyOrWhitespace(r))throw Error("Unknown base64 encoding at char: "+r)}return t}goog.crypt.base64.init_();for(var n=0;;){var o=r(-1),i=r(0),s=r(64),a=r(64);if(64===a&&-1===o)break;t(o<<2|i>>4),64!=s&&(t(i<<4&240|s>>2),64!=a&&t(s<<6&192|a))}},goog.crypt.base64.init_=function(){if(!goog.crypt.base64.charToByteMap_){goog.crypt.base64.charToByteMap_={};for(var e=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));goog.crypt.base64.byteToCharMaps_[r]=n;for(var o=0;o<n.length;o++){var i=n[o],s=goog.crypt.base64.charToByteMap_[i];void 0===s?goog.crypt.base64.charToByteMap_[i]=o:goog.asserts.assert(s===o)}}}},jspb.utils={},jspb.utils.split64Low=0,jspb.utils.split64High=0,jspb.utils.splitUint64=function(e){var t=e>>>0;e=Math.floor((e-t)/jspb.BinaryConstants.TWO_TO_32)>>>0,jspb.utils.split64Low=t,jspb.utils.split64High=e},jspb.utils.splitInt64=function(e){var t=0>e,r=(e=Math.abs(e))>>>0;e=Math.floor((e-r)/jspb.BinaryConstants.TWO_TO_32),e>>>=0,t&&(e=~e>>>0,4294967295<(r=1+(~r>>>0))&&(r=0,4294967295<++e&&(e=0))),jspb.utils.split64Low=r,jspb.utils.split64High=e},jspb.utils.splitZigzag64=function(e){var t=0>e;e=2*Math.abs(e),jspb.utils.splitUint64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;t&&(0==e?0==r?r=e=4294967295:(r--,e=4294967295):e--),jspb.utils.split64Low=e,jspb.utils.split64High=r},jspb.utils.splitFloat32=function(e){var t=0>e?1:0;if(0===(e=t?-e:e))0<1/e?(jspb.utils.split64High=0,jspb.utils.split64Low=0):(jspb.utils.split64High=0,jspb.utils.split64Low=2147483648);else if(isNaN(e))jspb.utils.split64High=0,jspb.utils.split64Low=2147483647;else if(e>jspb.BinaryConstants.FLOAT32_MAX)jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|2139095040)>>>0;else if(e<jspb.BinaryConstants.FLOAT32_MIN)e=Math.round(e/Math.pow(2,-149)),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|e)>>>0;else{var r=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-r),e=8388607&Math.round(e*jspb.BinaryConstants.TWO_TO_23),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|r+127<<23|e)>>>0}},jspb.utils.splitFloat64=function(e){var t=0>e?1:0;if(0===(e=t?-e:e))jspb.utils.split64High=0<1/e?0:2147483648,jspb.utils.split64Low=0;else if(isNaN(e))jspb.utils.split64High=2147483647,jspb.utils.split64Low=4294967295;else if(e>jspb.BinaryConstants.FLOAT64_MAX)jspb.utils.split64High=(t<<31|2146435072)>>>0,jspb.utils.split64Low=0;else if(e<jspb.BinaryConstants.FLOAT64_MIN){var r=e/Math.pow(2,-1074);e=r/jspb.BinaryConstants.TWO_TO_32,jspb.utils.split64High=(t<<31|e)>>>0,jspb.utils.split64Low=r>>>0}else{var n=0;if(2<=(r=e))for(;2<=r&&1023>n;)n++,r/=2;else for(;1>r&&-1022<n;)r*=2,n--;e=(r=e*Math.pow(2,-n))*jspb.BinaryConstants.TWO_TO_20&1048575,r=r*jspb.BinaryConstants.TWO_TO_52>>>0,jspb.utils.split64High=(t<<31|n+1023<<20|e)>>>0,jspb.utils.split64Low=r}},jspb.utils.splitHash64=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),i=e.charCodeAt(4),s=e.charCodeAt(5),a=e.charCodeAt(6);e=e.charCodeAt(7),jspb.utils.split64Low=t+(r<<8)+(n<<16)+(o<<24)>>>0,jspb.utils.split64High=i+(s<<8)+(a<<16)+(e<<24)>>>0},jspb.utils.joinUint64=function(e,t){return t*jspb.BinaryConstants.TWO_TO_32+(e>>>0)},jspb.utils.joinInt64=function(e,t){var r=2147483648&t;return r&&(t=~t>>>0,0==(e=1+~e>>>0)&&(t=t+1>>>0)),e=jspb.utils.joinUint64(e,t),r?-e:e},jspb.utils.toZigzag64=function(e,t,r){var n=t>>31;return r(e<<1^n,(t<<1|e>>>31)^n)},jspb.utils.joinZigzag64=function(e,t){return jspb.utils.fromZigzag64(e,t,jspb.utils.joinInt64)},jspb.utils.fromZigzag64=function(e,t,r){var n=-(1&e);return r((e>>>1|t<<31)^n,t>>>1^n)},jspb.utils.joinFloat32=function(e,t){t=2*(e>>31)+1;var r=e>>>23&255;return e&=8388607,255==r?e?NaN:1/0*t:0==r?t*Math.pow(2,-149)*e:t*Math.pow(2,r-150)*(e+Math.pow(2,23))},jspb.utils.joinFloat64=function(e,t){var r=2*(t>>31)+1,n=t>>>20&2047;return e=jspb.BinaryConstants.TWO_TO_32*(1048575&t)+e,2047==n?e?NaN:1/0*r:0==n?r*Math.pow(2,-1074)*e:r*Math.pow(2,n-1075)*(e+jspb.BinaryConstants.TWO_TO_52)},jspb.utils.joinHash64=function(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)},jspb.utils.DIGITS="0123456789abcdef".split(""),jspb.utils.ZERO_CHAR_CODE_=48,jspb.utils.A_CHAR_CODE_=97,jspb.utils.joinUnsignedDecimalString=function(e,t){function r(e,t){return e=e?String(e):"",t?"0000000".slice(e.length)+e:e}if(2097151>=t)return""+(jspb.BinaryConstants.TWO_TO_32*t+e);var n=(e>>>24|t<<8)>>>0&16777215;return e=(16777215&e)+6777216*n+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,1e7<=e&&(n+=Math.floor(e/1e7),e%=1e7),1e7<=n&&(t+=Math.floor(n/1e7),n%=1e7),r(t,0)+r(n,t)+r(e,1)},jspb.utils.joinSignedDecimalString=function(e,t){var r=2147483648&t;return r&&(t=~t+(0==(e=1+~e>>>0)?1:0)>>>0),e=jspb.utils.joinUnsignedDecimalString(e,t),r?"-"+e:e},jspb.utils.hash64ToDecimalString=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;return t?jspb.utils.joinSignedDecimalString(e,r):jspb.utils.joinUnsignedDecimalString(e,r)},jspb.utils.hash64ArrayToDecimalStrings=function(e,t){for(var r=Array(e.length),n=0;n<e.length;n++)r[n]=jspb.utils.hash64ToDecimalString(e[n],t);return r},jspb.utils.decimalStringToHash64=function(e){function t(e,t){for(var r=0;8>r&&(1!==e||0<t);r++)t=e*n[r]+t,n[r]=255&t,t>>>=8}goog.asserts.assert(0<e.length);var r=!1;"-"===e[0]&&(r=!0,e=e.slice(1));for(var n=[0,0,0,0,0,0,0,0],o=0;o<e.length;o++)t(10,e.charCodeAt(o)-jspb.utils.ZERO_CHAR_CODE_);return r&&(function(){for(var e=0;8>e;e++)n[e]=255&~n[e]}(),t(1,1)),goog.crypt.byteArrayToString(n)},jspb.utils.splitDecimalString=function(e){jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e))},jspb.utils.toHexDigit_=function(e){return String.fromCharCode(10>e?jspb.utils.ZERO_CHAR_CODE_+e:jspb.utils.A_CHAR_CODE_-10+e)},jspb.utils.fromHexCharCode_=function(e){return e>=jspb.utils.A_CHAR_CODE_?e-jspb.utils.A_CHAR_CODE_+10:e-jspb.utils.ZERO_CHAR_CODE_},jspb.utils.hash64ToHexString=function(e){var t=Array(18);t[0]="0",t[1]="x";for(var r=0;8>r;r++){var n=e.charCodeAt(7-r);t[2*r+2]=jspb.utils.toHexDigit_(n>>4),t[2*r+3]=jspb.utils.toHexDigit_(15&n)}return t.join("")},jspb.utils.hexStringToHash64=function(e){e=e.toLowerCase(),goog.asserts.assert(18==e.length),goog.asserts.assert("0"==e[0]),goog.asserts.assert("x"==e[1]);for(var t="",r=0;8>r;r++){var n=jspb.utils.fromHexCharCode_(e.charCodeAt(2*r+2)),o=jspb.utils.fromHexCharCode_(e.charCodeAt(2*r+3));t=String.fromCharCode(16*n+o)+t}return t},jspb.utils.hash64ToNumber=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;return t?jspb.utils.joinInt64(e,r):jspb.utils.joinUint64(e,r)},jspb.utils.numberToHash64=function(e){return jspb.utils.splitInt64(e),jspb.utils.joinHash64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.utils.countVarints=function(e,t,r){for(var n=0,o=t;o<r;o++)n+=e[o]>>7;return r-t-n},jspb.utils.countVarintFields=function(e,t,r,n){var o=0;if(128>(n=8*n+jspb.BinaryConstants.WireType.VARINT))for(;t<r&&e[t++]==n;)for(o++;;){var i=e[t++];if(0==(128&i))break}else for(;t<r;){for(i=n;128<i;){if(e[t]!=(127&i|128))return o;t++,i>>=7}if(e[t++]!=i)break;for(o++;0!=(128&(i=e[t++])););}return o},jspb.utils.countFixedFields_=function(e,t,r,n,o){var i=0;if(128>n)for(;t<r&&e[t++]==n;)i++,t+=o;else for(;t<r;){for(var s=n;128<s;){if(e[t++]!=(127&s|128))return i;s>>=7}if(e[t++]!=s)break;i++,t+=o}return i},jspb.utils.countFixed32Fields=function(e,t,r,n){return jspb.utils.countFixedFields_(e,t,r,8*n+jspb.BinaryConstants.WireType.FIXED32,4)},jspb.utils.countFixed64Fields=function(e,t,r,n){return jspb.utils.countFixedFields_(e,t,r,8*n+jspb.BinaryConstants.WireType.FIXED64,8)},jspb.utils.countDelimitedFields=function(e,t,r,n){var o=0;for(n=8*n+jspb.BinaryConstants.WireType.DELIMITED;t<r;){for(var i=n;128<i;){if(e[t++]!=(127&i|128))return o;i>>=7}if(e[t++]!=i)break;o++;for(var s=0,a=1;s+=(127&(i=e[t++]))*a,a*=128,0!=(128&i););t+=s}return o},jspb.utils.debugBytesToTextFormat=function(e){var t='"';if(e){e=jspb.utils.byteSourceToUint8Array(e);for(var r=0;r<e.length;r++)t+="\\x",16>e[r]&&(t+="0"),t+=e[r].toString(16)}return t+'"'},jspb.utils.debugScalarToTextFormat=function(e){return"string"==typeof e?goog.string.quote(e):e.toString()},jspb.utils.stringToByteArray=function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++){var n=e.charCodeAt(r);if(255<n)throw Error("Conversion error: string contains codepoint outside of byte range");t[r]=n}return t},jspb.utils.byteSourceToUint8Array=function(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||void 0!==Buffer&&e.constructor===Buffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Type not convertible to Uint8Array."),new Uint8Array(0))},jspb.BinaryDecoder=function(e,t,r){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1,e&&this.setBlock(e,t,r)},jspb.BinaryDecoder.instanceCache_=[],jspb.BinaryDecoder.alloc=function(e,t,r){if(jspb.BinaryDecoder.instanceCache_.length){var n=jspb.BinaryDecoder.instanceCache_.pop();return e&&n.setBlock(e,t,r),n}return new jspb.BinaryDecoder(e,t,r)},jspb.BinaryDecoder.prototype.free=function(){this.clear(),100>jspb.BinaryDecoder.instanceCache_.length&&jspb.BinaryDecoder.instanceCache_.push(this)},jspb.BinaryDecoder.prototype.clone=function(){return jspb.BinaryDecoder.alloc(this.bytes_,this.start_,this.end_-this.start_)},jspb.BinaryDecoder.prototype.clear=function(){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1},jspb.BinaryDecoder.prototype.getBuffer=function(){return this.bytes_},jspb.BinaryDecoder.prototype.setBlock=function(e,t,r){this.bytes_=jspb.utils.byteSourceToUint8Array(e),this.start_=void 0!==t?t:0,this.end_=void 0!==r?this.start_+r:this.bytes_.length,this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getEnd=function(){return this.end_},jspb.BinaryDecoder.prototype.setEnd=function(e){this.end_=e},jspb.BinaryDecoder.prototype.reset=function(){this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getCursor=function(){return this.cursor_},jspb.BinaryDecoder.prototype.setCursor=function(e){this.cursor_=e},jspb.BinaryDecoder.prototype.advance=function(e){this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_)},jspb.BinaryDecoder.prototype.atEnd=function(){return this.cursor_==this.end_},jspb.BinaryDecoder.prototype.pastEnd=function(){return this.cursor_>this.end_},jspb.BinaryDecoder.prototype.getError=function(){return this.error_||0>this.cursor_||this.cursor_>this.end_},jspb.BinaryDecoder.prototype.readSplitVarint64=function(e){for(var t=128,r=0,n=0,o=0;4>o&&128<=t;o++)r|=(127&(t=this.bytes_[this.cursor_++]))<<7*o;if(128<=t&&(r|=(127&(t=this.bytes_[this.cursor_++]))<<28,n|=(127&t)>>4),128<=t)for(o=0;5>o&&128<=t;o++)n|=(127&(t=this.bytes_[this.cursor_++]))<<7*o+3;if(128>t)return e(r>>>0,n>>>0);goog.asserts.fail("Failed to read varint, encoding is invalid."),this.error_=!0},jspb.BinaryDecoder.prototype.readSplitZigzagVarint64=function(e){return this.readSplitVarint64((function(t,r){return jspb.utils.fromZigzag64(t,r,e)}))},jspb.BinaryDecoder.prototype.readSplitFixed64=function(e){var t=this.bytes_,r=this.cursor_;this.cursor_+=8;for(var n=0,o=0,i=r+7;i>=r;i--)n=n<<8|t[i],o=o<<8|t[i+4];return e(n,o)},jspb.BinaryDecoder.prototype.skipVarint=function(){for(;128&this.bytes_[this.cursor_];)this.cursor_++;this.cursor_++},jspb.BinaryDecoder.prototype.unskipVarint=function(e){for(;128<e;)this.cursor_--,e>>>=7;this.cursor_--},jspb.BinaryDecoder.prototype.readUnsignedVarint32=function(){var e=this.bytes_,t=e[this.cursor_+0],r=127&t;return 128>t?(this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+1]))<<7,128>t?(this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+2]))<<14,128>t?(this.cursor_+=3,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+3]))<<21,128>t?(this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(15&(t=e[this.cursor_+4]))<<28,128>t?(this.cursor_+=5,goog.asserts.assert(this.cursor_<=this.end_),r>>>0):(this.cursor_+=5,128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&goog.asserts.assert(!1),goog.asserts.assert(this.cursor_<=this.end_),r)))))},jspb.BinaryDecoder.prototype.readSignedVarint32=jspb.BinaryDecoder.prototype.readUnsignedVarint32,jspb.BinaryDecoder.prototype.readUnsignedVarint32String=function(){return this.readUnsignedVarint32().toString()},jspb.BinaryDecoder.prototype.readSignedVarint32String=function(){return this.readSignedVarint32().toString()},jspb.BinaryDecoder.prototype.readZigzagVarint32=function(){var e=this.readUnsignedVarint32();return e>>>1^-(1&e)},jspb.BinaryDecoder.prototype.readUnsignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinUint64)},jspb.BinaryDecoder.prototype.readUnsignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinUnsignedDecimalString)},jspb.BinaryDecoder.prototype.readSignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinInt64)},jspb.BinaryDecoder.prototype.readSignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readZigzagVarint64=function(){return this.readSplitVarint64(jspb.utils.joinZigzag64)},jspb.BinaryDecoder.prototype.readZigzagVarintHash64=function(){return this.readSplitZigzagVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readZigzagVarint64String=function(){return this.readSplitZigzagVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readUint8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e},jspb.BinaryDecoder.prototype.readUint16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8},jspb.BinaryDecoder.prototype.readUint32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],n=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8|r<<16|n<<24)>>>0},jspb.BinaryDecoder.prototype.readUint64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUint64(e,t)},jspb.BinaryDecoder.prototype.readUint64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUnsignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readInt8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e<<24>>24},jspb.BinaryDecoder.prototype.readInt16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8)<<16>>16},jspb.BinaryDecoder.prototype.readInt32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],n=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8|r<<16|n<<24},jspb.BinaryDecoder.prototype.readInt64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinInt64(e,t)},jspb.BinaryDecoder.prototype.readInt64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinSignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readFloat=function(){var e=this.readUint32();return jspb.utils.joinFloat32(e,0)},jspb.BinaryDecoder.prototype.readDouble=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinFloat64(e,t)},jspb.BinaryDecoder.prototype.readBool=function(){return!!this.bytes_[this.cursor_++]},jspb.BinaryDecoder.prototype.readEnum=function(){return this.readSignedVarint32()},jspb.BinaryDecoder.prototype.readString=function(e){var t=this.bytes_,r=this.cursor_;e=r+e;for(var n=[],o="";r<e;){var i=t[r++];if(128>i)n.push(i);else{if(192>i)continue;if(224>i){var s=t[r++];n.push((31&i)<<6|63&s)}else if(240>i){s=t[r++];var a=t[r++];n.push((15&i)<<12|(63&s)<<6|63&a)}else 248>i&&(i=(7&i)<<18|(63&(s=t[r++]))<<12|(63&(a=t[r++]))<<6|63&t[r++],i-=65536,n.push(55296+(i>>10&1023),56320+(1023&i)))}8192<=n.length&&(o+=String.fromCharCode.apply(null,n),n.length=0)}return o+=goog.crypt.byteArrayToString(n),this.cursor_=r,o},jspb.BinaryDecoder.prototype.readStringWithLength=function(){var e=this.readUnsignedVarint32();return this.readString(e)},jspb.BinaryDecoder.prototype.readBytes=function(e){if(0>e||this.cursor_+e>this.bytes_.length)return this.error_=!0,goog.asserts.fail("Invalid byte length!"),new Uint8Array(0);var t=this.bytes_.subarray(this.cursor_,this.cursor_+e);return this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_),t},jspb.BinaryDecoder.prototype.readVarintHash64=function(){return this.readSplitVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readFixedHash64=function(){var e=this.bytes_,t=this.cursor_,r=e[t+0],n=e[t+1],o=e[t+2],i=e[t+3],s=e[t+4],a=e[t+5],l=e[t+6];return e=e[t+7],this.cursor_+=8,String.fromCharCode(r,n,o,i,s,a,l,e)},jspb.BinaryReader=function(e,t,r){this.decoder_=jspb.BinaryDecoder.alloc(e,t,r),this.fieldCursor_=this.decoder_.getCursor(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null},jspb.BinaryReader.instanceCache_=[],jspb.BinaryReader.alloc=function(e,t,r){if(jspb.BinaryReader.instanceCache_.length){var n=jspb.BinaryReader.instanceCache_.pop();return e&&n.decoder_.setBlock(e,t,r),n}return new jspb.BinaryReader(e,t,r)},jspb.BinaryReader.prototype.alloc=jspb.BinaryReader.alloc,jspb.BinaryReader.prototype.free=function(){this.decoder_.clear(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null,100>jspb.BinaryReader.instanceCache_.length&&jspb.BinaryReader.instanceCache_.push(this)},jspb.BinaryReader.prototype.getFieldCursor=function(){return this.fieldCursor_},jspb.BinaryReader.prototype.getCursor=function(){return this.decoder_.getCursor()},jspb.BinaryReader.prototype.getBuffer=function(){return this.decoder_.getBuffer()},jspb.BinaryReader.prototype.getFieldNumber=function(){return this.nextField_},jspb.BinaryReader.prototype.getWireType=function(){return this.nextWireType_},jspb.BinaryReader.prototype.isDelimited=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED},jspb.BinaryReader.prototype.isEndGroup=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP},jspb.BinaryReader.prototype.getError=function(){return this.error_||this.decoder_.getError()},jspb.BinaryReader.prototype.setBlock=function(e,t,r){this.decoder_.setBlock(e,t,r),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.reset=function(){this.decoder_.reset(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.advance=function(e){this.decoder_.advance(e)},jspb.BinaryReader.prototype.nextField=function(){if(this.decoder_.atEnd())return!1;if(this.getError())return goog.asserts.fail("Decoder hit an error"),!1;this.fieldCursor_=this.decoder_.getCursor();var e=this.decoder_.readUnsignedVarint32(),t=e>>>3;return(e&=7)!=jspb.BinaryConstants.WireType.VARINT&&e!=jspb.BinaryConstants.WireType.FIXED32&&e!=jspb.BinaryConstants.WireType.FIXED64&&e!=jspb.BinaryConstants.WireType.DELIMITED&&e!=jspb.BinaryConstants.WireType.START_GROUP&&e!=jspb.BinaryConstants.WireType.END_GROUP?(goog.asserts.fail("Invalid wire type: %s (at position %s)",e,this.fieldCursor_),this.error_=!0,!1):(this.nextField_=t,this.nextWireType_=e,!0)},jspb.BinaryReader.prototype.unskipHeader=function(){this.decoder_.unskipVarint(this.nextField_<<3|this.nextWireType_)},jspb.BinaryReader.prototype.skipMatchingFields=function(){var e=this.nextField_;for(this.unskipHeader();this.nextField()&&this.getFieldNumber()==e;)this.skipField();this.decoder_.atEnd()||this.unskipHeader()},jspb.BinaryReader.prototype.skipVarintField=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.VARINT?(goog.asserts.fail("Invalid wire type for skipVarintField"),this.skipField()):this.decoder_.skipVarint()},jspb.BinaryReader.prototype.skipDelimitedField=function(){if(this.nextWireType_!=jspb.BinaryConstants.WireType.DELIMITED)goog.asserts.fail("Invalid wire type for skipDelimitedField"),this.skipField();else{var e=this.decoder_.readUnsignedVarint32();this.decoder_.advance(e)}},jspb.BinaryReader.prototype.skipFixed32Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED32?(goog.asserts.fail("Invalid wire type for skipFixed32Field"),this.skipField()):this.decoder_.advance(4)},jspb.BinaryReader.prototype.skipFixed64Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED64?(goog.asserts.fail("Invalid wire type for skipFixed64Field"),this.skipField()):this.decoder_.advance(8)},jspb.BinaryReader.prototype.skipGroup=function(){for(var e=this.nextField_;;){if(!this.nextField()){goog.asserts.fail("Unmatched start-group tag: stream EOF"),this.error_=!0;break}if(this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP){this.nextField_!=e&&(goog.asserts.fail("Unmatched end-group tag"),this.error_=!0);break}this.skipField()}},jspb.BinaryReader.prototype.skipField=function(){switch(this.nextWireType_){case jspb.BinaryConstants.WireType.VARINT:this.skipVarintField();break;case jspb.BinaryConstants.WireType.FIXED64:this.skipFixed64Field();break;case jspb.BinaryConstants.WireType.DELIMITED:this.skipDelimitedField();break;case jspb.BinaryConstants.WireType.FIXED32:this.skipFixed32Field();break;case jspb.BinaryConstants.WireType.START_GROUP:this.skipGroup();break;default:goog.asserts.fail("Invalid wire encoding for field.")}},jspb.BinaryReader.prototype.registerReadCallback=function(e,t){null===this.readCallbacks_&&(this.readCallbacks_={}),goog.asserts.assert(!this.readCallbacks_[e]),this.readCallbacks_[e]=t},jspb.BinaryReader.prototype.runReadCallback=function(e){return goog.asserts.assert(null!==this.readCallbacks_),e=this.readCallbacks_[e],goog.asserts.assert(e),e(this)},jspb.BinaryReader.prototype.readAny=function(e){this.nextWireType_=jspb.BinaryConstants.FieldTypeToWireType(e);var t=jspb.BinaryConstants.FieldType;switch(e){case t.DOUBLE:return this.readDouble();case t.FLOAT:return this.readFloat();case t.INT64:return this.readInt64();case t.UINT64:return this.readUint64();case t.INT32:return this.readInt32();case t.FIXED64:return this.readFixed64();case t.FIXED32:return this.readFixed32();case t.BOOL:return this.readBool();case t.STRING:return this.readString();case t.GROUP:goog.asserts.fail("Group field type not supported in readAny()");case t.MESSAGE:goog.asserts.fail("Message field type not supported in readAny()");case t.BYTES:return this.readBytes();case t.UINT32:return this.readUint32();case t.ENUM:return this.readEnum();case t.SFIXED32:return this.readSfixed32();case t.SFIXED64:return this.readSfixed64();case t.SINT32:return this.readSint32();case t.SINT64:return this.readSint64();case t.FHASH64:return this.readFixedHash64();case t.VHASH64:return this.readVarintHash64();default:goog.asserts.fail("Invalid field type in readAny()")}return 0},jspb.BinaryReader.prototype.readMessage=function(e,t){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var r=this.decoder_.getEnd(),n=this.decoder_.readUnsignedVarint32();n=this.decoder_.getCursor()+n,this.decoder_.setEnd(n),t(e,this),this.decoder_.setCursor(n),this.decoder_.setEnd(r)},jspb.BinaryReader.prototype.readGroup=function(e,t,r){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP),goog.asserts.assert(this.nextField_==e),r(t,this),this.error_||this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP||(goog.asserts.fail("Group submessage did not end with an END_GROUP tag"),this.error_=!0)},jspb.BinaryReader.prototype.getFieldDecoder=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32(),t=this.decoder_.getCursor(),r=t+e;return e=jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(),t,e),this.decoder_.setCursor(r),e},jspb.BinaryReader.prototype.readInt32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32()},jspb.BinaryReader.prototype.readInt32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32String()},jspb.BinaryReader.prototype.readInt64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readInt64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64String()},jspb.BinaryReader.prototype.readUint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readUint32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32String()},jspb.BinaryReader.prototype.readUint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64()},jspb.BinaryReader.prototype.readUint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64String()},jspb.BinaryReader.prototype.readSint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint32()},jspb.BinaryReader.prototype.readSint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64()},jspb.BinaryReader.prototype.readSint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64String()},jspb.BinaryReader.prototype.readFixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readUint32()},jspb.BinaryReader.prototype.readFixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64()},jspb.BinaryReader.prototype.readFixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64String()},jspb.BinaryReader.prototype.readSfixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32()},jspb.BinaryReader.prototype.readSfixed32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32().toString()},jspb.BinaryReader.prototype.readSfixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64()},jspb.BinaryReader.prototype.readSfixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64String()},jspb.BinaryReader.prototype.readFloat=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readFloat()},jspb.BinaryReader.prototype.readDouble=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readDouble()},jspb.BinaryReader.prototype.readBool=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),!!this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readEnum=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readString=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readString(e)},jspb.BinaryReader.prototype.readBytes=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readBytes(e)},jspb.BinaryReader.prototype.readVarintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readVarintHash64()},jspb.BinaryReader.prototype.readSintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarintHash64()},jspb.BinaryReader.prototype.readSplitVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(e)},jspb.BinaryReader.prototype.readSplitZigzagVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64((function(t,r){return jspb.utils.fromZigzag64(t,r,e)}))},jspb.BinaryReader.prototype.readFixedHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readFixedHash64()},jspb.BinaryReader.prototype.readSplitFixed64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readSplitFixed64(e)},jspb.BinaryReader.prototype.readPackedField_=function(e){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var t=this.decoder_.readUnsignedVarint32();t=this.decoder_.getCursor()+t;for(var r=[];this.decoder_.getCursor()<t;)r.push(e.call(this.decoder_));return r},jspb.BinaryReader.prototype.readPackedInt32=function(){return this.readPackedField_(this.decoder_.readSignedVarint32)},jspb.BinaryReader.prototype.readPackedInt32String=function(){return this.readPackedField_(this.decoder_.readSignedVarint32String)},jspb.BinaryReader.prototype.readPackedInt64=function(){return this.readPackedField_(this.decoder_.readSignedVarint64)},jspb.BinaryReader.prototype.readPackedInt64String=function(){return this.readPackedField_(this.decoder_.readSignedVarint64String)},jspb.BinaryReader.prototype.readPackedUint32=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32)},jspb.BinaryReader.prototype.readPackedUint32String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32String)},jspb.BinaryReader.prototype.readPackedUint64=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64)},jspb.BinaryReader.prototype.readPackedUint64String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64String)},jspb.BinaryReader.prototype.readPackedSint32=function(){return this.readPackedField_(this.decoder_.readZigzagVarint32)},jspb.BinaryReader.prototype.readPackedSint64=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64)},jspb.BinaryReader.prototype.readPackedSint64String=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64String)},jspb.BinaryReader.prototype.readPackedFixed32=function(){return this.readPackedField_(this.decoder_.readUint32)},jspb.BinaryReader.prototype.readPackedFixed64=function(){return this.readPackedField_(this.decoder_.readUint64)},jspb.BinaryReader.prototype.readPackedFixed64String=function(){return this.readPackedField_(this.decoder_.readUint64String)},jspb.BinaryReader.prototype.readPackedSfixed32=function(){return this.readPackedField_(this.decoder_.readInt32)},jspb.BinaryReader.prototype.readPackedSfixed64=function(){return this.readPackedField_(this.decoder_.readInt64)},jspb.BinaryReader.prototype.readPackedSfixed64String=function(){return this.readPackedField_(this.decoder_.readInt64String)},jspb.BinaryReader.prototype.readPackedFloat=function(){return this.readPackedField_(this.decoder_.readFloat)},jspb.BinaryReader.prototype.readPackedDouble=function(){return this.readPackedField_(this.decoder_.readDouble)},jspb.BinaryReader.prototype.readPackedBool=function(){return this.readPackedField_(this.decoder_.readBool)},jspb.BinaryReader.prototype.readPackedEnum=function(){return this.readPackedField_(this.decoder_.readEnum)},jspb.BinaryReader.prototype.readPackedVarintHash64=function(){return this.readPackedField_(this.decoder_.readVarintHash64)},jspb.BinaryReader.prototype.readPackedFixedHash64=function(){return this.readPackedField_(this.decoder_.readFixedHash64)},jspb.Map=function(e,t){this.arr_=e,this.valueCtor_=t,this.map_={},this.arrClean=!0,0<this.arr_.length&&this.loadFromArray_()},jspb.Map.prototype.loadFromArray_=function(){for(var e=0;e<this.arr_.length;e++){var t=this.arr_[e],r=t[0];this.map_[r.toString()]=new jspb.Map.Entry_(r,t[1])}this.arrClean=!0},jspb.Map.prototype.toArray=function(){if(this.arrClean){if(this.valueCtor_){var e,t=this.map_;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=t[e].valueWrapper;r&&r.toArray()}}}else{for(this.arr_.length=0,(t=this.stringKeys_()).sort(),e=0;e<t.length;e++){var n=this.map_[t[e]];(r=n.valueWrapper)&&r.toArray(),this.arr_.push([n.key,n.value])}this.arrClean=!0}return this.arr_},jspb.Map.prototype.toObject=function(e,t){for(var r=this.toArray(),n=[],o=0;o<r.length;o++){var i=this.map_[r[o][0].toString()];this.wrapEntry_(i);var s=i.valueWrapper;s?(goog.asserts.assert(t),n.push([i.key,t(e,s)])):n.push([i.key,i.value])}return n},jspb.Map.fromObject=function(e,t,r){t=new jspb.Map([],t);for(var n=0;n<e.length;n++){var o=e[n][0],i=r(e[n][1]);t.set(o,i)}return t},jspb.Map.ArrayIteratorIterable_=function(e){this.idx_=0,this.arr_=e},jspb.Map.ArrayIteratorIterable_.prototype.next=function(){return this.idx_<this.arr_.length?{done:!1,value:this.arr_[this.idx_++]}:{done:!0,value:void 0}},"undefined"!=typeof Symbol&&(jspb.Map.ArrayIteratorIterable_.prototype[Symbol.iterator]=function(){return this}),jspb.Map.prototype.getLength=function(){return this.stringKeys_().length},jspb.Map.prototype.clear=function(){this.map_={},this.arrClean=!1},jspb.Map.prototype.del=function(e){e=e.toString();var t=this.map_.hasOwnProperty(e);return delete this.map_[e],this.arrClean=!1,t},jspb.Map.prototype.getEntryList=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++){var n=this.map_[t[r]];e.push([n.key,n.value])}return e},jspb.Map.prototype.entries=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++){var n=this.map_[t[r]];e.push([n.key,this.wrapEntry_(n)])}return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.keys=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++)e.push(this.map_[t[r]].key);return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.values=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++)e.push(this.wrapEntry_(this.map_[t[r]]));return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.forEach=function(e,t){var r=this.stringKeys_();r.sort();for(var n=0;n<r.length;n++){var o=this.map_[r[n]];e.call(t,this.wrapEntry_(o),o.key,this)}},jspb.Map.prototype.set=function(e,t){var r=new jspb.Map.Entry_(e);return this.valueCtor_?(r.valueWrapper=t,r.value=t.toArray()):r.value=t,this.map_[e.toString()]=r,this.arrClean=!1,this},jspb.Map.prototype.wrapEntry_=function(e){return this.valueCtor_?(e.valueWrapper||(e.valueWrapper=new this.valueCtor_(e.value)),e.valueWrapper):e.value},jspb.Map.prototype.get=function(e){if(e=this.map_[e.toString()])return this.wrapEntry_(e)},jspb.Map.prototype.has=function(e){return e.toString()in this.map_},jspb.Map.prototype.serializeBinary=function(e,t,r,n,o){var i=this.stringKeys_();i.sort();for(var s=0;s<i.length;s++){var a=this.map_[i[s]];t.beginSubMessage(e),r.call(t,1,a.key),this.valueCtor_?n.call(t,2,this.wrapEntry_(a),o):n.call(t,2,a.value),t.endSubMessage()}},jspb.Map.deserializeBinary=function(e,t,r,n,o,i,s){for(;t.nextField()&&!t.isEndGroup();){var a=t.getFieldNumber();1==a?i=r.call(t):2==a&&(e.valueCtor_?(goog.asserts.assert(o),s||(s=new e.valueCtor_),n.call(t,s,o)):s=n.call(t))}goog.asserts.assert(null!=i),goog.asserts.assert(null!=s),e.set(i,s)},jspb.Map.prototype.stringKeys_=function(){var e,t=this.map_,r=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.push(e);return r},jspb.Map.Entry_=function(e,t){this.key=e,this.value=t,this.valueWrapper=void 0},jspb.ExtensionFieldInfo=function(e,t,r,n,o){this.fieldIndex=e,this.fieldName=t,this.ctor=r,this.toObjectFn=n,this.isRepeated=o},jspb.ExtensionFieldBinaryInfo=function(e,t,r,n,o,i){this.fieldInfo=e,this.binaryReaderFn=t,this.binaryWriterFn=r,this.binaryMessageSerializeFn=n,this.binaryMessageDeserializeFn=o,this.isPacked=i},jspb.ExtensionFieldInfo.prototype.isMessageType=function(){return!!this.ctor},jspb.Message=function(){},jspb.Message.GENERATE_TO_OBJECT=!0,jspb.Message.GENERATE_FROM_OBJECT=!goog.DISALLOW_TEST_ONLY_CODE,jspb.Message.GENERATE_TO_STRING=!0,jspb.Message.ASSUME_LOCAL_ARRAYS=!1,jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=!0,jspb.Message.SUPPORTS_UINT8ARRAY_="function"==typeof Uint8Array,jspb.Message.prototype.getJsPbMessageId=function(){return this.messageId_},jspb.Message.getIndex_=function(e,t){return t+e.arrayIndexOffset_},jspb.Message.hiddenES6Property_=function(){},jspb.Message.getFieldNumber_=function(e,t){return t-e.arrayIndexOffset_},jspb.Message.initialize=function(e,t,r,n,o,i){if(e.wrappers_=null,t||(t=r?[r]:[]),e.messageId_=r?String(r):void 0,e.arrayIndexOffset_=0===r?-1:0,e.array=t,jspb.Message.initPivotAndExtensionObject_(e,n),e.convertedPrimitiveFields_={},jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS||(e.repeatedFields=o),o)for(t=0;t<o.length;t++)(r=o[t])<e.pivot_?(r=jspb.Message.getIndex_(e,r),e.array[r]=e.array[r]||jspb.Message.EMPTY_LIST_SENTINEL_):(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[r]=e.extensionObject_[r]||jspb.Message.EMPTY_LIST_SENTINEL_);if(i&&i.length)for(t=0;t<i.length;t++)jspb.Message.computeOneofCase(e,i[t])},jspb.Message.EMPTY_LIST_SENTINEL_=goog.DEBUG&&Object.freeze?Object.freeze([]):[],jspb.Message.isArray_=function(e){return jspb.Message.ASSUME_LOCAL_ARRAYS?e instanceof Array:Array.isArray(e)},jspb.Message.isExtensionObject_=function(e){return!(null===e||"object"!=typeof e||jspb.Message.isArray_(e)||jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)},jspb.Message.initPivotAndExtensionObject_=function(e,t){var r=e.array.length,n=-1;if(r&&(n=r-1,r=e.array[n],jspb.Message.isExtensionObject_(r)))return e.pivot_=jspb.Message.getFieldNumber_(e,n),void(e.extensionObject_=r);-1<t?(e.pivot_=Math.max(t,jspb.Message.getFieldNumber_(e,n+1)),e.extensionObject_=null):e.pivot_=Number.MAX_VALUE},jspb.Message.maybeInitEmptyExtensionObject_=function(e){var t=jspb.Message.getIndex_(e,e.pivot_);e.array[t]||(e.extensionObject_=e.array[t]={})},jspb.Message.toObjectList=function(e,t,r){for(var n=[],o=0;o<e.length;o++)n[o]=t.call(e[o],r,e[o]);return n},jspb.Message.toObjectExtension=function(e,t,r,n,o){for(var i in r){var s=r[i],a=n.call(e,s);if(null!=a){for(var l in s.fieldName)if(s.fieldName.hasOwnProperty(l))break;t[l]=s.toObjectFn?s.isRepeated?jspb.Message.toObjectList(a,s.toObjectFn,o):s.toObjectFn(o,a):a}}},jspb.Message.serializeBinaryExtensions=function(e,t,r,n){for(var o in r){var i=r[o],s=i.fieldInfo;if(!i.binaryWriterFn)throw Error("Message extension present that was generated without binary serialization support");var a=n.call(e,s);if(null!=a)if(s.isMessageType()){if(!i.binaryMessageSerializeFn)throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");i.binaryWriterFn.call(t,s.fieldIndex,a,i.binaryMessageSerializeFn)}else i.binaryWriterFn.call(t,s.fieldIndex,a)}},jspb.Message.readBinaryExtension=function(e,t,r,n,o){var i=r[t.getFieldNumber()];if(i){if(r=i.fieldInfo,!i.binaryReaderFn)throw Error("Deserializing extension whose generated code does not support binary format");if(r.isMessageType()){var s=new r.ctor;i.binaryReaderFn.call(t,s,i.binaryMessageDeserializeFn)}else s=i.binaryReaderFn.call(t);r.isRepeated&&!i.isPacked?(t=n.call(e,r))?t.push(s):o.call(e,r,[s]):o.call(e,r,s)}else t.skipField()},jspb.Message.getField=function(e,t){if(t<e.pivot_){t=jspb.Message.getIndex_(e,t);var r=e.array[t];return r===jspb.Message.EMPTY_LIST_SENTINEL_?e.array[t]=[]:r}if(e.extensionObject_)return(r=e.extensionObject_[t])===jspb.Message.EMPTY_LIST_SENTINEL_?e.extensionObject_[t]=[]:r},jspb.Message.getRepeatedField=function(e,t){return jspb.Message.getField(e,t)},jspb.Message.getOptionalFloatingPointField=function(e,t){return null==(e=jspb.Message.getField(e,t))?e:+e},jspb.Message.getBooleanField=function(e,t){return null==(e=jspb.Message.getField(e,t))?e:!!e},jspb.Message.getRepeatedFloatingPointField=function(e,t){var r=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var n=0;n<r.length;n++)r[n]=+r[n];e.convertedPrimitiveFields_[t]=!0}return r},jspb.Message.getRepeatedBooleanField=function(e,t){var r=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var n=0;n<r.length;n++)r[n]=!!r[n];e.convertedPrimitiveFields_[t]=!0}return r},jspb.Message.bytesAsB64=function(e){return null==e||"string"==typeof e?e:jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array?goog.crypt.base64.encodeByteArray(e):(goog.asserts.fail("Cannot coerce to b64 string: "+goog.typeOf(e)),null)},jspb.Message.bytesAsU8=function(e){return null==e||e instanceof Uint8Array?e:"string"==typeof e?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Cannot coerce to Uint8Array: "+goog.typeOf(e)),null)},jspb.Message.bytesListAsB64=function(e){return jspb.Message.assertConsistentTypes_(e),e.length&&"string"!=typeof e[0]?goog.array.map(e,jspb.Message.bytesAsB64):e},jspb.Message.bytesListAsU8=function(e){return jspb.Message.assertConsistentTypes_(e),!e.length||e[0]instanceof Uint8Array?e:goog.array.map(e,jspb.Message.bytesAsU8)},jspb.Message.assertConsistentTypes_=function(e){if(goog.DEBUG&&e&&1<e.length){var t=goog.typeOf(e[0]);goog.array.forEach(e,(function(e){goog.typeOf(e)!=t&&goog.asserts.fail("Inconsistent type in JSPB repeated field array. Got "+goog.typeOf(e)+" expected "+t)}))}},jspb.Message.getFieldWithDefault=function(e,t,r){return null==(e=jspb.Message.getField(e,t))?r:e},jspb.Message.getBooleanFieldWithDefault=function(e,t,r){return null==(e=jspb.Message.getBooleanField(e,t))?r:e},jspb.Message.getFloatingPointFieldWithDefault=function(e,t,r){return null==(e=jspb.Message.getOptionalFloatingPointField(e,t))?r:e},jspb.Message.getFieldProto3=jspb.Message.getFieldWithDefault,jspb.Message.getMapField=function(e,t,r,n){if(e.wrappers_||(e.wrappers_={}),t in e.wrappers_)return e.wrappers_[t];var o=jspb.Message.getField(e,t);if(!o){if(r)return;o=[],jspb.Message.setField(e,t,o)}return e.wrappers_[t]=new jspb.Map(o,n)},jspb.Message.setField=function(e,t,r){return goog.asserts.assertInstanceof(e,jspb.Message),t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=r:(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[t]=r),e},jspb.Message.setProto3IntField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3FloatField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3BooleanField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,!1)},jspb.Message.setProto3StringField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"")},jspb.Message.setProto3BytesField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"")},jspb.Message.setProto3EnumField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3StringIntField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"0")},jspb.Message.setFieldIgnoringDefault_=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),r!==n?jspb.Message.setField(e,t,r):t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=null:(jspb.Message.maybeInitEmptyExtensionObject_(e),delete e.extensionObject_[t]),e},jspb.Message.addToRepeatedField=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),t=jspb.Message.getRepeatedField(e,t),null!=n?t.splice(n,0,r):t.push(r),e},jspb.Message.setOneofField=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),(r=jspb.Message.computeOneofCase(e,r))&&r!==t&&void 0!==n&&(e.wrappers_&&r in e.wrappers_&&(e.wrappers_[r]=void 0),jspb.Message.setField(e,r,void 0)),jspb.Message.setField(e,t,n)},jspb.Message.computeOneofCase=function(e,t){for(var r,n,o=0;o<t.length;o++){var i=t[o],s=jspb.Message.getField(e,i);null!=s&&(r=i,n=s,jspb.Message.setField(e,i,void 0))}return r?(jspb.Message.setField(e,r,n),r):0},jspb.Message.getWrapperField=function(e,t,r,n){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[r]){var o=jspb.Message.getField(e,r);(n||o)&&(e.wrappers_[r]=new t(o))}return e.wrappers_[r]},jspb.Message.getRepeatedWrapperField=function(e,t,r){return jspb.Message.wrapRepeatedField_(e,t,r),(t=e.wrappers_[r])==jspb.Message.EMPTY_LIST_SENTINEL_&&(t=e.wrappers_[r]=[]),t},jspb.Message.wrapRepeatedField_=function(e,t,r){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[r]){for(var n=jspb.Message.getRepeatedField(e,r),o=[],i=0;i<n.length;i++)o[i]=new t(n[i]);e.wrappers_[r]=o}},jspb.Message.setWrapperField=function(e,t,r){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var n=r?r.toArray():r;return e.wrappers_[t]=r,jspb.Message.setField(e,t,n)},jspb.Message.setOneofWrapperField=function(e,t,r,n){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var o=n?n.toArray():n;return e.wrappers_[t]=n,jspb.Message.setOneofField(e,t,r,o)},jspb.Message.setRepeatedWrapperField=function(e,t,r){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={}),r=r||[];for(var n=[],o=0;o<r.length;o++)n[o]=r[o].toArray();return e.wrappers_[t]=r,jspb.Message.setField(e,t,n)},jspb.Message.addToRepeatedWrapperField=function(e,t,r,n,o){jspb.Message.wrapRepeatedField_(e,n,t);var i=e.wrappers_[t];return i||(i=e.wrappers_[t]=[]),r=r||new n,e=jspb.Message.getRepeatedField(e,t),null!=o?(i.splice(o,0,r),e.splice(o,0,r.toArray())):(i.push(r),e.push(r.toArray())),r},jspb.Message.toMap=function(e,t,r,n){for(var o={},i=0;i<e.length;i++)o[t.call(e[i])]=r?r.call(e[i],n,e[i]):e[i];return o},jspb.Message.prototype.syncMapFields_=function(){if(this.wrappers_)for(var e in this.wrappers_){var t=this.wrappers_[e];if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&t[r].toArray();else t&&t.toArray()}},jspb.Message.prototype.toArray=function(){return this.syncMapFields_(),this.array},jspb.Message.GENERATE_TO_STRING&&(jspb.Message.prototype.toString=function(){return this.syncMapFields_(),this.array.toString()}),jspb.Message.prototype.getExtension=function(e){if(this.extensionObject_){this.wrappers_||(this.wrappers_={});var t=e.fieldIndex;if(e.isRepeated){if(e.isMessageType())return this.wrappers_[t]||(this.wrappers_[t]=goog.array.map(this.extensionObject_[t]||[],(function(t){return new e.ctor(t)}))),this.wrappers_[t]}else if(e.isMessageType())return!this.wrappers_[t]&&this.extensionObject_[t]&&(this.wrappers_[t]=new e.ctor(this.extensionObject_[t])),this.wrappers_[t];return this.extensionObject_[t]}},jspb.Message.prototype.setExtension=function(e,t){this.wrappers_||(this.wrappers_={}),jspb.Message.maybeInitEmptyExtensionObject_(this);var r=e.fieldIndex;return e.isRepeated?(t=t||[],e.isMessageType()?(this.wrappers_[r]=t,this.extensionObject_[r]=goog.array.map(t,(function(e){return e.toArray()}))):this.extensionObject_[r]=t):e.isMessageType()?(this.wrappers_[r]=t,this.extensionObject_[r]=t?t.toArray():t):this.extensionObject_[r]=t,this},jspb.Message.difference=function(e,t){if(!(e instanceof t.constructor))throw Error("Messages have different types.");var r=e.toArray();t=t.toArray();var n=[],o=0,i=r.length>t.length?r.length:t.length;for(e.getJsPbMessageId()&&(n[0]=e.getJsPbMessageId(),o=1);o<i;o++)jspb.Message.compareFields(r[o],t[o])||(n[o]=t[o]);return new e.constructor(n)},jspb.Message.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&jspb.Message.compareFields(e.toArray(),t.toArray())},jspb.Message.compareExtensions=function(e,t){e=e||{},t=t||{};var r,n={};for(r in e)n[r]=0;for(r in t)n[r]=0;for(r in n)if(!jspb.Message.compareFields(e[r],t[r]))return!1;return!0},jspb.Message.compareFields=function(e,t){if(e==t)return!0;if(!goog.isObject(e)||!goog.isObject(t))return!!("number"==typeof e&&isNaN(e)||"number"==typeof t&&isNaN(t))&&String(e)==String(t);if(e.constructor!=t.constructor)return!1;if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e.constructor===Uint8Array){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}if(e.constructor===Array){var n=void 0,o=void 0,i=Math.max(e.length,t.length);for(r=0;r<i;r++){var s=e[r],a=t[r];if(s&&s.constructor==Object&&(goog.asserts.assert(void 0===n),goog.asserts.assert(r===e.length-1),n=s,s=void 0),a&&a.constructor==Object&&(goog.asserts.assert(void 0===o),goog.asserts.assert(r===t.length-1),o=a,a=void 0),!jspb.Message.compareFields(s,a))return!1}return!n&&!o||(n=n||{},o=o||{},jspb.Message.compareExtensions(n,o))}if(e.constructor===Object)return jspb.Message.compareExtensions(e,t);throw Error("Invalid type in JSPB array")},jspb.Message.prototype.cloneMessage=function(){return jspb.Message.cloneMessage(this)},jspb.Message.prototype.clone=function(){return jspb.Message.cloneMessage(this)},jspb.Message.clone=function(e){return jspb.Message.cloneMessage(e)},jspb.Message.cloneMessage=function(e){return new e.constructor(jspb.Message.clone_(e.toArray()))},jspb.Message.copyInto=function(e,t){goog.asserts.assertInstanceof(e,jspb.Message),goog.asserts.assertInstanceof(t,jspb.Message),goog.asserts.assert(e.constructor==t.constructor,"Copy source and target message should have the same type."),e=jspb.Message.clone(e);for(var r=t.toArray(),n=e.toArray(),o=r.length=0;o<n.length;o++)r[o]=n[o];t.wrappers_=e.wrappers_,t.extensionObject_=e.extensionObject_},jspb.Message.clone_=function(e){if(Array.isArray(e)){for(var t=Array(e.length),r=0;r<e.length;r++){var n=e[r];null!=n&&(t[r]="object"==typeof n?jspb.Message.clone_(goog.asserts.assert(n)):n)}return t}if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)return new Uint8Array(e);for(r in t={},e)null!=(n=e[r])&&(t[r]="object"==typeof n?jspb.Message.clone_(goog.asserts.assert(n)):n);return t},jspb.Message.registerMessageType=function(e,t){t.messageId=e},jspb.Message.messageSetExtensions={},jspb.Message.messageSetExtensionsBinary={},jspb.arith={},jspb.arith.UInt64=function(e,t){this.lo=e,this.hi=t},jspb.arith.UInt64.prototype.cmp=function(e){return this.hi<e.hi||this.hi==e.hi&&this.lo<e.lo?-1:this.hi==e.hi&&this.lo==e.lo?0:1},jspb.arith.UInt64.prototype.rightShift=function(){return new jspb.arith.UInt64((this.lo>>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},jspb.arith.UInt64.prototype.leftShift=function(){return new jspb.arith.UInt64(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},jspb.arith.UInt64.prototype.msb=function(){return!!(2147483648&this.hi)},jspb.arith.UInt64.prototype.lsb=function(){return!!(1&this.lo)},jspb.arith.UInt64.prototype.zero=function(){return 0==this.lo&&0==this.hi},jspb.arith.UInt64.prototype.add=function(e){return new jspb.arith.UInt64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.UInt64.prototype.sub=function(e){return new jspb.arith.UInt64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.UInt64.mul32x32=function(e,t){var r=65535&e,n=65535&t,o=t>>>16;for(t=r*n+65536*(r*o&65535)+65536*((e>>>=16)*n&65535),r=e*o+(r*o>>>16)+(e*n>>>16);4294967296<=t;)t-=4294967296,r+=1;return new jspb.arith.UInt64(t>>>0,r>>>0)},jspb.arith.UInt64.prototype.mul=function(e){var t=jspb.arith.UInt64.mul32x32(this.lo,e);return(e=jspb.arith.UInt64.mul32x32(this.hi,e)).hi=e.lo,e.lo=0,t.add(e)},jspb.arith.UInt64.prototype.div=function(e){if(0==e)return[];var t=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(this.lo,this.hi);e=new jspb.arith.UInt64(e,0);for(var n=new jspb.arith.UInt64(1,0);!e.msb();)e=e.leftShift(),n=n.leftShift();for(;!n.zero();)0>=e.cmp(r)&&(t=t.add(n),r=r.sub(e)),e=e.rightShift(),n=n.rightShift();return[t,r]},jspb.arith.UInt64.prototype.toString=function(){for(var e="",t=this;!t.zero();){var r=(t=t.div(10))[0];e=t[1].lo+e,t=r}return""==e&&(e="0"),e},jspb.arith.UInt64.fromString=function(e){for(var t=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(0,0),n=0;n<e.length;n++){if("0">e[n]||"9"<e[n])return null;var o=parseInt(e[n],10);r.lo=o,t=t.mul(10).add(r)}return t},jspb.arith.UInt64.prototype.clone=function(){return new jspb.arith.UInt64(this.lo,this.hi)},jspb.arith.Int64=function(e,t){this.lo=e,this.hi=t},jspb.arith.Int64.prototype.add=function(e){return new jspb.arith.Int64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.sub=function(e){return new jspb.arith.Int64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.clone=function(){return new jspb.arith.Int64(this.lo,this.hi)},jspb.arith.Int64.prototype.toString=function(){var e=0!=(2147483648&this.hi),t=new jspb.arith.UInt64(this.lo,this.hi);return e&&(t=new jspb.arith.UInt64(0,0).sub(t)),(e?"-":"")+t.toString()},jspb.arith.Int64.fromString=function(e){var t=0<e.length&&"-"==e[0];return t&&(e=e.substring(1)),null===(e=jspb.arith.UInt64.fromString(e))?null:(t&&(e=new jspb.arith.UInt64(0,0).sub(e)),new jspb.arith.Int64(e.lo,e.hi))},jspb.BinaryEncoder=function(){this.buffer_=[]},jspb.BinaryEncoder.prototype.length=function(){return this.buffer_.length},jspb.BinaryEncoder.prototype.end=function(){var e=this.buffer_;return this.buffer_=[],e},jspb.BinaryEncoder.prototype.writeSplitVarint64=function(e,t){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32);0<t||127<e;)this.buffer_.push(127&e|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSplitFixed64=function(e,t){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUint32(e),this.writeUint32(t)},jspb.BinaryEncoder.prototype.writeUnsignedVarint32=function(e){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32);127<e;)this.buffer_.push(127&e|128),e>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSignedVarint32=function(e){if(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),0<=e)this.writeUnsignedVarint32(e);else{for(var t=0;9>t;t++)this.buffer_.push(127&e|128),e>>=7;this.buffer_.push(1)}},jspb.BinaryEncoder.prototype.writeUnsignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeSignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeUnsignedVarint32((e<<1^e>>31)>>>0)},jspb.BinaryEncoder.prototype.writeZigzagVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitZigzag64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint64String=function(e){this.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(e))},jspb.BinaryEncoder.prototype.writeZigzagVarintHash64=function(e){var t=this;jspb.utils.splitHash64(e),jspb.utils.toZigzag64(jspb.utils.split64Low,jspb.utils.split64High,(function(e,r){t.writeSplitVarint64(e>>>0,r>>>0)}))},jspb.BinaryEncoder.prototype.writeUint8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&256>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeUint16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&65536>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeUint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeUint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitUint64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-128<=e&&128>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeInt16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-32768<=e&&32768>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeInt32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeInt64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt64String=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(+e>=-jspb.BinaryConstants.TWO_TO_63&&+e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e)),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFloat=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT32_MAX&&e<=jspb.BinaryConstants.FLOAT32_MAX),jspb.utils.splitFloat32(e),this.writeUint32(jspb.utils.split64Low)},jspb.BinaryEncoder.prototype.writeDouble=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT64_MAX&&e<=jspb.BinaryConstants.FLOAT64_MAX),jspb.utils.splitFloat64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeBool=function(e){goog.asserts.assert("boolean"==typeof e||"number"==typeof e),this.buffer_.push(e?1:0)},jspb.BinaryEncoder.prototype.writeEnum=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32(e)},jspb.BinaryEncoder.prototype.writeBytes=function(e){this.buffer_.push.apply(this.buffer_,e)},jspb.BinaryEncoder.prototype.writeVarintHash64=function(e){jspb.utils.splitHash64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFixedHash64=function(e){jspb.utils.splitHash64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeString=function(e){for(var t=this.buffer_.length,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(128>n)this.buffer_.push(n);else if(2048>n)this.buffer_.push(n>>6|192),this.buffer_.push(63&n|128);else if(65536>n)if(55296<=n&&56319>=n&&r+1<e.length){var o=e.charCodeAt(r+1);56320<=o&&57343>=o&&(n=1024*(n-55296)+o-56320+65536,this.buffer_.push(n>>18|240),this.buffer_.push(n>>12&63|128),this.buffer_.push(n>>6&63|128),this.buffer_.push(63&n|128),r++)}else this.buffer_.push(n>>12|224),this.buffer_.push(n>>6&63|128),this.buffer_.push(63&n|128)}return this.buffer_.length-t},jspb.BinaryWriter=function(){this.blocks_=[],this.totalLength_=0,this.encoder_=new jspb.BinaryEncoder,this.bookmarks_=[]},jspb.BinaryWriter.prototype.appendUint8Array_=function(e){var t=this.encoder_.end();this.blocks_.push(t),this.blocks_.push(e),this.totalLength_+=t.length+e.length},jspb.BinaryWriter.prototype.beginDelimited_=function(e){return this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),e=this.encoder_.end(),this.blocks_.push(e),this.totalLength_+=e.length,e.push(this.totalLength_),e},jspb.BinaryWriter.prototype.endDelimited_=function(e){var t=e.pop();for(t=this.totalLength_+this.encoder_.length()-t,goog.asserts.assert(0<=t);127<t;)e.push(127&t|128),t>>>=7,this.totalLength_++;e.push(t),this.totalLength_++},jspb.BinaryWriter.prototype.writeSerializedMessage=function(e,t,r){this.appendUint8Array_(e.subarray(t,r))},jspb.BinaryWriter.prototype.maybeWriteSerializedMessage=function(e,t,r){null!=e&&null!=t&&null!=r&&this.writeSerializedMessage(e,t,r)},jspb.BinaryWriter.prototype.reset=function(){this.blocks_=[],this.encoder_.end(),this.totalLength_=0,this.bookmarks_=[]},jspb.BinaryWriter.prototype.getResultBuffer=function(){goog.asserts.assert(0==this.bookmarks_.length);for(var e=new Uint8Array(this.totalLength_+this.encoder_.length()),t=this.blocks_,r=t.length,n=0,o=0;o<r;o++){var i=t[o];e.set(i,n),n+=i.length}return t=this.encoder_.end(),e.set(t,n),n+=t.length,goog.asserts.assert(n==e.length),this.blocks_=[e],e},jspb.BinaryWriter.prototype.getResultBase64String=function(e){return goog.crypt.base64.encodeByteArray(this.getResultBuffer(),e)},jspb.BinaryWriter.prototype.beginSubMessage=function(e){this.bookmarks_.push(this.beginDelimited_(e))},jspb.BinaryWriter.prototype.endSubMessage=function(){goog.asserts.assert(0<=this.bookmarks_.length),this.endDelimited_(this.bookmarks_.pop())},jspb.BinaryWriter.prototype.writeFieldHeader_=function(e,t){goog.asserts.assert(1<=e&&e==Math.floor(e)),this.encoder_.writeUnsignedVarint32(8*e+t)},jspb.BinaryWriter.prototype.writeAny=function(e,t,r){var n=jspb.BinaryConstants.FieldType;switch(e){case n.DOUBLE:this.writeDouble(t,r);break;case n.FLOAT:this.writeFloat(t,r);break;case n.INT64:this.writeInt64(t,r);break;case n.UINT64:this.writeUint64(t,r);break;case n.INT32:this.writeInt32(t,r);break;case n.FIXED64:this.writeFixed64(t,r);break;case n.FIXED32:this.writeFixed32(t,r);break;case n.BOOL:this.writeBool(t,r);break;case n.STRING:this.writeString(t,r);break;case n.GROUP:goog.asserts.fail("Group field type not supported in writeAny()");break;case n.MESSAGE:goog.asserts.fail("Message field type not supported in writeAny()");break;case n.BYTES:this.writeBytes(t,r);break;case n.UINT32:this.writeUint32(t,r);break;case n.ENUM:this.writeEnum(t,r);break;case n.SFIXED32:this.writeSfixed32(t,r);break;case n.SFIXED64:this.writeSfixed64(t,r);break;case n.SINT32:this.writeSint32(t,r);break;case n.SINT64:this.writeSint64(t,r);break;case n.FHASH64:this.writeFixedHash64(t,r);break;case n.VHASH64:this.writeVarintHash64(t,r);break;default:goog.asserts.fail("Invalid field type in writeAny()")}},jspb.BinaryWriter.prototype.writeUnsignedVarint32_=function(e,t){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint32(t))},jspb.BinaryWriter.prototype.writeSignedVarint32_=function(e,t){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeUnsignedVarint64_=function(e,t){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint64(t))},jspb.BinaryWriter.prototype.writeSignedVarint64_=function(e,t){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint32_=function(e,t){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint32(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64_=function(e,t){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64String_=function(e,t){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64String(t))},jspb.BinaryWriter.prototype.writeZigzagVarintHash64_=function(e,t){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarintHash64(t))},jspb.BinaryWriter.prototype.writeInt32=function(e,t){null!=t&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt32String=function(e,t){null!=t&&(t=parseInt(t,10),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt64=function(e,t){null!=t&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeSignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeInt64String=function(e,t){null!=t&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeUint32=function(e,t){null!=t&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint32String=function(e,t){null!=t&&(t=parseInt(t,10),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint64=function(e,t){null!=t&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeUnsignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeUint64String=function(e,t){null!=t&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSint32=function(e,t){null!=t&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeZigzagVarint32_(e,t))},jspb.BinaryWriter.prototype.writeSint64=function(e,t){null!=t&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeZigzagVarint64_(e,t))},jspb.BinaryWriter.prototype.writeSintHash64=function(e,t){null!=t&&this.writeZigzagVarintHash64_(e,t)},jspb.BinaryWriter.prototype.writeSint64String=function(e,t){null!=t&&this.writeZigzagVarint64String_(e,t)},jspb.BinaryWriter.prototype.writeFixed32=function(e,t){null!=t&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeUint32(t))},jspb.BinaryWriter.prototype.writeFixed64=function(e,t){null!=t&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeUint64(t))},jspb.BinaryWriter.prototype.writeFixed64String=function(e,t){null!=t&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSfixed32=function(e,t){null!=t&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeInt32(t))},jspb.BinaryWriter.prototype.writeSfixed64=function(e,t){null!=t&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeInt64(t))},jspb.BinaryWriter.prototype.writeSfixed64String=function(e,t){null!=t&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeFloat=function(e,t){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeFloat(t))},jspb.BinaryWriter.prototype.writeDouble=function(e,t){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeDouble(t))},jspb.BinaryWriter.prototype.writeBool=function(e,t){null!=t&&(goog.asserts.assert("boolean"==typeof t||"number"==typeof t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeBool(t))},jspb.BinaryWriter.prototype.writeEnum=function(e,t){null!=t&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeString=function(e,t){null!=t&&(e=this.beginDelimited_(e),this.encoder_.writeString(t),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeBytes=function(e,t){null!=t&&(t=jspb.utils.byteSourceToUint8Array(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),this.appendUint8Array_(t))},jspb.BinaryWriter.prototype.writeMessage=function(e,t,r){null!=t&&(e=this.beginDelimited_(e),r(t,this),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeMessageSet=function(e,t,r){null!=t&&(this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.START_GROUP),this.writeFieldHeader_(2,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(e),e=this.beginDelimited_(3),r(t,this),this.endDelimited_(e),this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeGroup=function(e,t,r){null!=t&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),r(t,this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeFixedHash64=function(e,t){null!=t&&(goog.asserts.assert(8==t.length),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeFixedHash64(t))},jspb.BinaryWriter.prototype.writeVarintHash64=function(e,t){null!=t&&(goog.asserts.assert(8==t.length),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeVarintHash64(t))},jspb.BinaryWriter.prototype.writeSplitFixed64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t,r)},jspb.BinaryWriter.prototype.writeSplitVarint64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t,r)},jspb.BinaryWriter.prototype.writeSplitZigzagVarint64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT);var n=this.encoder_;jspb.utils.toZigzag64(t,r,(function(e,t){n.writeSplitVarint64(e>>>0,t>>>0)}))},jspb.BinaryWriter.prototype.writeRepeatedInt32=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeSignedVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedInt32String=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeInt32String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedInt64=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeSignedVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSplitFixed64=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.writeSplitFixed64(e,r(t[o]),n(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedSplitVarint64=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.writeSplitVarint64(e,r(t[o]),n(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.writeSplitZigzagVarint64(e,r(t[o]),n(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedInt64String=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeInt64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint32=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeUnsignedVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint32String=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeUint32String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint64=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeUnsignedVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint64String=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeUint64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint32=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeZigzagVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint64=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeZigzagVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint64String=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeZigzagVarint64String_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSintHash64=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeZigzagVarintHash64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed32=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeFixed32(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed64=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeFixed64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed64String=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeFixed64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed32=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeSfixed32(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeSfixed64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64String=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeSfixed64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFloat=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeFloat(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedDouble=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeDouble(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedBool=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeBool(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedEnum=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeEnum(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedString=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeString(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedBytes=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeBytes(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedMessage=function(e,t,r){if(null!=t)for(var n=0;n<t.length;n++){var o=this.beginDelimited_(e);r(t[n],this),this.endDelimited_(o)}},jspb.BinaryWriter.prototype.writeRepeatedGroup=function(e,t,r){if(null!=t)for(var n=0;n<t.length;n++)this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),r(t[n],this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP)},jspb.BinaryWriter.prototype.writeRepeatedFixedHash64=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeFixedHash64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedVarintHash64=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.writeVarintHash64(e,t[r])},jspb.BinaryWriter.prototype.writePackedInt32=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt32String=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint32(parseInt(t[r],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitFixed64=function(e,t,r,n){if(null!=t){e=this.beginDelimited_(e);for(var o=0;o<t.length;o++)this.encoder_.writeSplitFixed64(r(t[o]),n(t[o]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitVarint64=function(e,t,r,n){if(null!=t){e=this.beginDelimited_(e);for(var o=0;o<t.length;o++)this.encoder_.writeSplitVarint64(r(t[o]),n(t[o]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitZigzagVarint64=function(e,t,r,n){if(null!=t){e=this.beginDelimited_(e);for(var o=this.encoder_,i=0;i<t.length;i++)jspb.utils.toZigzag64(r(t[i]),n(t[i]),(function(e,t){o.writeSplitVarint64(e>>>0,t>>>0)}));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64String=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++){var n=jspb.arith.Int64.fromString(t[r]);this.encoder_.writeSplitVarint64(n.lo,n.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32String=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint32(parseInt(t[r],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64String=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++){var n=jspb.arith.UInt64.fromString(t[r]);this.encoder_.writeSplitVarint64(n.lo,n.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint32=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64String=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(t[r]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSintHash64=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarintHash64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixed32=function(e,t){if(null!=t&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeUint32(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64=function(e,t){if(null!=t&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeUint64(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64String=function(e,t){if(null!=t&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++){var r=jspb.arith.UInt64.fromString(t[e]);this.encoder_.writeSplitFixed64(r.lo,r.hi)}},jspb.BinaryWriter.prototype.writePackedSfixed32=function(e,t){if(null!=t&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeInt32(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64=function(e,t){if(null!=t&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64String=function(e,t){if(null!=t&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64String(t[e])},jspb.BinaryWriter.prototype.writePackedFloat=function(e,t){if(null!=t&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeFloat(t[e])},jspb.BinaryWriter.prototype.writePackedDouble=function(e,t){if(null!=t&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeDouble(t[e])},jspb.BinaryWriter.prototype.writePackedBool=function(e,t){if(null!=t&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),e=0;e<t.length;e++)this.encoder_.writeBool(t[e])},jspb.BinaryWriter.prototype.writePackedEnum=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeEnum(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixedHash64=function(e,t){if(null!=t&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeFixedHash64(t[e])},jspb.BinaryWriter.prototype.writePackedVarintHash64=function(e,t){if(null!=t&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeVarintHash64(t[r]);this.endDelimited_(e)}},jspb.Export={},exports.Map=jspb.Map,exports.Message=jspb.Message,exports.BinaryReader=jspb.BinaryReader,exports.BinaryWriter=jspb.BinaryWriter,exports.ExtensionFieldInfo=jspb.ExtensionFieldInfo,exports.ExtensionFieldBinaryInfo=jspb.ExtensionFieldBinaryInfo,exports.exportSymbol=goog.exportSymbol,exports.inherits=goog.inherits,exports.object={extend:goog.object.extend},exports.typeOf=goog.typeOf}).call(this,__webpack_require__(5),__webpack_require__(4).Buffer)},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=r;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}},function(e,t,r){(function(t){const n=r(210),o=r(49),i=(e,t)=>({from:i,EnvVarError:r(49),get:function(r){if(!r)return e;if(arguments.length>1)throw new o("It looks like you passed more than one argument to env.get(). Since env-var@6.0.0 this is no longer supported. To set a default value use env.get(TARGET).default(DEFAULT)");return n(e,r,t||{})}});e.exports=i(t.env)}).call(this,r(2))},function(e,t,r){var n=r(10),o=r(71),i=r(3).LEVEL,s=e.exports=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o.call(this,{objectMode:!0,highWaterMark:t.highWaterMark}),this.format=t.format,this.level=t.level,this.handleExceptions=t.handleExceptions,this.silent=t.silent,t.log&&(this.log=t.log),t.logv&&(this.logv=t.logv),t.close&&(this.close=t.close),this.once("pipe",(function(t){e.levels=t.levels,e.parent=t})),this.once("unpipe",(function(t){t===e.parent&&(e.parent=null,e.close&&e.close())}))};n.inherits(s,o),s.prototype._write=function(e,t,r){if(this.silent||!0===e.exception&&!this.handleExceptions)return r(null);var n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[i]]){if(e&&!this.format)return this.log(e,r);var o=void 0,s=void 0;try{s=this.format.transform(Object.assign({},e),this.format.options)}catch(a){o=a}if(o||!s){if(r(),o)throw o;return}return this.log(s,r)}return r(null)},s.prototype._writev=function(e,t){if(this.logv){var r=e.filter(this._accept,this);return r.length?this.logv(r,t):t(null)}for(var n=0;n<e.length;n++)if(this._accept(e[n]))if(!e[n].chunk||this.format){var o=void 0,i=void 0;try{i=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(s){o=s}if(o||!i){if(e[n].callback(),o)throw t(null),o}else this.log(i,e[n].callback)}else this.log(e[n].chunk,e[n].callback);return t(null)},s.prototype._accept=function(e){var t=e.chunk;if(this.silent)return!1;var r=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&r&&!(this.levels[r]>=this.levels[t[i]])||!this.handleExceptions&&!0===t.exception)},s.prototype._nop=function(){}},function(e,t,r){const{AbortController:n,AbortSignal:o}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=n,e.exports.AbortSignal=o,e.exports.default=n},function(e,t){var r,n=function(e){function t(){this.fetch=!1,this.DOMException=e.DOMException}return t.prototype=e,new t}("undefined"!=typeof self?self:this);r=n,function(e){var t="URLSearchParams"in r,n="Symbol"in r&&"iterator"in Symbol,o="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in r,s="ArrayBuffer"in r;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function g(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function d(e){var t=new FileReader,r=h(t);return t.readAsArrayBuffer(e),r}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var r;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&(r=e)&&DataView.prototype.isPrototypeOf(r)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=h(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=u(e),t=g(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},f.prototype.delete=function(e){delete this.map[u(e)]},f.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},f.prototype.set=function(e,t){this.map[u(e)]=g(t)},f.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},f.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),c(e)},f.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),c(e)},f.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),c(e)},n&&(f.prototype[Symbol.iterator]=f.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(e,t){var r,n,o=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),b.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}})),t}function S(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];S.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch(T){e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function E(t,r){return new Promise((function(n,i){var s=new v(t,r);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();t.append(n,o)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new S(o,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&o&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",l),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",l)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}E.polyfill=!0,r.fetch||(r.fetch=E,r.Headers=f,r.Request=v,r.Response=S),e.Headers=f,e.Request=v,e.Response=S,e.fetch=E}({}),delete n.fetch.polyfill,(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t},function(e,t,r){const n=r(222),o=Symbol("max"),i=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),u=Symbol("dispose"),g=Symbol("noDisposeOnSet"),c=Symbol("lruList"),f=Symbol("cache"),p=Symbol("updateAgeOnGet"),h=()=>1,d=(e,t,r)=>{const n=e[f].get(t);if(n){const t=n.value;if(y(e,t)){if(b(e,n),!e[a])return}else r&&(e[p]&&(n.value.now=Date.now()),e[c].unshiftNode(n));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]},m=e=>{if(e[i]>e[o])for(let t=e[c].tail;e[i]>e[o]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[u]&&e[u](r.key,r.value),e[i]-=r.length,e[f].delete(r.key),e[c].removeNode(t)}};class v{constructor(e,t,r,n,o){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=o||0}}const _=(e,t,r,n)=>{let o=r.value;y(e,o)&&(b(e,r),e[a]||(o=void 0)),o&&t.call(n,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[s]="function"!=typeof t?h:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[u]=e.dispose,this[g]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,m(this)}get max(){return this[o]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,m(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[s]&&(this[s]=e,this[i]=0,this[c].forEach((e=>{e.length=this[s](e.value,e.key),this[i]+=e.length}))),m(this)}get lengthCalculator(){return this[s]}get length(){return this[i]}get itemCount(){return this[c].length}rforEach(e,t){t=t||this;for(let r=this[c].tail;null!==r;){const n=r.prev;_(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[c].head;null!==r;){const n=r.next;_(this,e,r,t),r=n}}keys(){return this[c].toArray().map((e=>e.key))}values(){return this[c].toArray().map((e=>e.value))}reset(){this[u]&&this[c]&&this[c].length&&this[c].forEach((e=>this[u](e.key,e.value))),this[f]=new Map,this[c]=new n,this[i]=0}dump(){return this[c].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[c]}set(e,t,r){if((r=r||this[l])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[s](t,e);if(this[f].has(e)){if(a>this[o])return b(this,this[f].get(e)),!1;const s=this[f].get(e).value;return this[u]&&(this[g]||this[u](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[i]+=a-s.length,s.length=a,this.get(e),m(this),!0}const p=new v(e,t,a,n,r);return p.length>this[o]?(this[u]&&this[u](e,t),!1):(this[i]+=p.length,this[c].unshift(p),this[f].set(e,this[c].head),m(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!y(this,t)}get(e){return d(this,e,!0)}peek(e){return d(this,e,!1)}pop(){const e=this[c].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],o=n.e||0;if(0===o)this.set(n.k,n.v);else{const e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[f].forEach(((e,t)=>d(this,t,!1)))}}},function(e,t,r){var n=r(225),o=r(226),i=o;i.v1=n,i.v4=o,e.exports=i},function(e,t,r){var n=r(37).Colorizer;e.exports=function(e){return n.addColors(e.colors||e),e}},function(e,t,r){var n={};e.exports=n,n.themes={};var o=r(10),i=n.styles=r(108),s=Object.defineProperties,a=new RegExp(/[\r\n]+/g);n.supportsColor=r(109).supportsColor,void 0===n.enabled&&(n.enabled=!1!==n.supportsColor()),n.enable=function(){n.enabled=!0},n.disable=function(){n.enabled=!1},n.stripColors=n.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")},n.stylize=function(e,t){return n.enabled?i[t].open+e+i[t].close:e+""};var l=/[|\\{}()[\]^$+*?.]/g;function u(e){var t=function e(){return p.apply(e,arguments)};return t._styles=e,t.__proto__=f,t}var g,c=(g={},i.grey=i.gray,Object.keys(i).forEach((function(e){i[e].closeRe=new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(l,"\\$&")}(i[e].close),"g"),g[e]={get:function(){return u(this._styles.concat(e))}}})),g),f=s((function(){}),c);function p(){var e=Array.prototype.slice.call(arguments),t=e.map((function(e){return void 0!==e&&e.constructor===String?e:o.inspect(e)})).join(" ");if(!n.enabled||!t)return t;for(var r=-1!=t.indexOf("\n"),s=this._styles,l=s.length;l--;){var u=i[s[l]];t=u.open+t.replace(u.closeRe,u.open)+u.close,r&&(t=t.replace(a,(function(e){return u.close+e+u.open})))}return t}n.setTheme=function(e){if("string"!=typeof e)for(var t in e)!function(t){n[t]=function(r){if("object"==typeof e[t]){var o=r;for(var i in e[t])o=n[e[t][i]](o);return o}return n[e[t]](r)}}(t);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var h,d=function(e,t){var r=t.split("");return(r=r.map(e)).join("")};for(var y in n.trap=r(111),n.zalgo=r(112),n.maps={},n.maps.america=r(113)(n),n.maps.zebra=r(114)(n),n.maps.rainbow=r(115)(n),n.maps.random=r(116)(n),n.maps)!function(e){n[e]=function(t){return d(n.maps[e],t)}}(y);s(n,(h={},Object.keys(c).forEach((function(e){h[e]={get:function(){return u([e])}}})),h))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t){var r={};e.exports=r;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach((function(e){var t=n[e],o=r[e]=[];o.open="["+t[0]+"m",o.close="["+t[1]+"m"}))},function(e,t,r){(function(t){var n=r(15),o=r(110),i=t.env,s=void 0;function a(e){return 0!==(r=function(e){if(!1===s)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!e.isTTY&&!0!==s)return 0;var r=s?1:0;if("win32"===t.platform){var a=n.release().split(".");return Number(t.versions.node.split(".")[0])>=8&&Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in i}))||"codeship"===i.CI_NAME?1:r;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in i){var l=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test("xterm-256color")?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test("xterm-256color")||"COLORTERM"in i?1:r}(e))&&{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3};var r}o("no-color")||o("no-colors")||o("color=false")?s=!1:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(s=!0),"FORCE_COLOR"in i&&(s=0===i.FORCE_COLOR.length||0!==parseInt(i.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(t.stdout),stderr:a(t.stderr)}}).call(this,r(2))},function(e,t,r){(function(t){e.exports=function(e,r){var n=(r=r||t.argv).indexOf("--"),o=/^-{1,2}/.test(e)?"":"--",i=r.indexOf(o+e);return-1!==i&&(-1===n||i<n)}}).call(this,r(2))},function(e,t){e.exports=function(e,t){var r="";e=(e=e||"Run the trap, drop the bass").split("");var n={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return e.forEach((function(e){e=e.toLowerCase();var t=n[e]||[" "],o=Math.floor(Math.random()*t.length);r+=void 0!==n[e]?n[e][o]:e})),r}},function(e,t){e.exports=function(e,t){e=e||" he is here ";var r={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},n=[].concat(r.up,r.down,r.mid);function o(e){return Math.floor(Math.random()*e)}function i(e){var t=!1;return n.filter((function(r){t=r===e})),t}return function(e,t){var n,s,a="";for(s in(t=t||{}).up=void 0===t.up||t.up,t.mid=void 0===t.mid||t.mid,t.down=void 0===t.down||t.down,t.size=void 0!==t.size?t.size:"maxi",e=e.split(""))if(!i(s)){switch(a+=e[s],n={up:0,down:0,mid:0},t.size){case"mini":n.up=o(8),n.mid=o(2),n.down=o(8);break;case"maxi":n.up=o(16)+3,n.mid=o(4)+1,n.down=o(64)+3;break;default:n.up=o(8)+1,n.mid=o(6)/2,n.down=o(8)+1}var l=["up","mid","down"];for(var u in l)for(var g=l[u],c=0;c<=n[g];c++)t[g]&&(a+=r[g][o(r[g].length)])}return a}(e,t)}},function(e,t){e.exports=function(e){return function(t,r,n){if(" "===t)return t;switch(r%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}},function(e,t){e.exports=function(e){return function(t,r,n){return r%2==0?t:e.inverse(t)}}},function(e,t){e.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(r,n,o){return" "===r?r:e[t[n++%t.length]](r)}}},function(e,t){e.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(r,n,o){return" "===r?r:e[t[Math.round(Math.random()*(t.length-2))]](r)}}},function(e,t,r){Object.defineProperty(t,"cli",{value:r(118)}),Object.defineProperty(t,"npm",{value:r(119)}),Object.defineProperty(t,"syslog",{value:r(120)})},function(e,t,r){t.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},t.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}},function(e,t,r){t.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},t.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}},function(e,t,r){t.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},t.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}},function(e,t,r){var n=r(9);e.exports=n((function(e){return e.message="\t".concat(e.message),e}))},function(e,t,r){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=r(37).Colorizer,i=r(58).Padder,s=r(3),a=s.configs,l=s.MESSAGE,u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),t.levels||(t.levels=a.npm.levels),this.colorizer=new o(t),this.padder=new i(t),this.options=t}var t;return(t=[{key:"transform",value:function(e,t){return this.colorizer.transform(this.padder.transform(e,t),t),e[l]="".concat(e.level,":").concat(e.message),e}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();e.exports=function(e){return new u(e)},e.exports.Format=u},function(e,t,r){var n=r(9);function o(e){if(e.every(i))return function(t){for(var r=t,n=0;n<e.length;n++)if(!(r=e[n].transform(r,e[n].options)))return!1;return r}}function i(e){if("function"!=typeof e.transform)throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join("\n"));return!0}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=n(o(t)),s=i();return s.Format=i.Format,s},e.exports.cascade=o},function(e,t,r){(function(t){var n=r(9),o=r(3).MESSAGE,i=r(31);function s(e,r){return r instanceof t?r.toString("base64"):"bigint"==typeof r?r.toString():r}e.exports=n((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e[o]=(t.stable?i.stableStringify:i)(e,t.replacer||s,t.space),e}))}).call(this,r(4).Buffer)},function(e,t,r){t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=u(e),n=r[0],s=r[1],a=new i(3*(n+(f=s))/4-f),l=0,g=s>0?n-4:n,c=0;c<g;c+=4)t=o[e.charCodeAt(c)]<<18|o[e.charCodeAt(c+1)]<<12|o[e.charCodeAt(c+2)]<<6|o[e.charCodeAt(c+3)],a[l++]=t>>16&255,a[l++]=t>>8&255,a[l++]=255&t;var f;return 2===s&&(t=o[e.charCodeAt(c)]<<2|o[e.charCodeAt(c+1)]>>4,a[l++]=255&t),1===s&&(t=o[e.charCodeAt(c)]<<10|o[e.charCodeAt(c+1)]<<4|o[e.charCodeAt(c+2)]>>2,a[l++]=t>>8&255,a[l++]=255&t),a},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],s=0,a=r-o;s<a;s+=16383)i.push(g(e,s,s+16383>a?a:s+16383));return 1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)n[a]=s[a],o[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function g(e,t,r){for(var o,i,s=[],a=t;a<r;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,l=(1<<a)-1,u=l>>1,g=-7,c=r?o-1:0,f=r?-1:1,p=e[t+c];for(c+=f,i=p&(1<<-g)-1,p>>=-g,g+=a;g>0;i=256*i+e[t+c],c+=f,g-=8);for(s=i&(1<<-g)-1,i>>=-g,g+=n;g>0;s=256*s+e[t+c],c+=f,g-=8);if(0===i)i=1-u;else{if(i===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=u}return(p?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,l,u=8*i-o-1,g=(1<<u)-1,c=g>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=g):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+c>=1?f/l:f*Math.pow(2,1-c))*l>=2&&(s++,l/=2),s+c>=g?(a=0,s=g):s+c>=1?(a=(t*l-1)*Math.pow(2,o),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,o),s=0));o>=8;e[r+p]=255&a,p+=h,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;e[r+p]=255&s,p+=h,s/=256,u-=8);e[r+p-h]|=128*d}},function(e,t,r){var n=r(9);e.exports=n((function(e,t){return t.message?(e.message="[".concat(t.label,"] ").concat(e.message),e):(e.label=t.label,e)}))},function(e,t,r){var n=r(9),o=r(3).MESSAGE,i=r(31);e.exports=n((function(e){var t={};return e.message&&(t["@message"]=e.message,delete e.message),e.timestamp&&(t["@timestamp"]=e.timestamp,delete e.timestamp),t["@fields"]=e,e[o]=i(t),e}))},function(e,t,r){var n=r(9);function o(e,t,r){var n,o,i,s=t.reduce((function(t,r){return t[r]=e[r],delete e[r],t}),{}),a=Object.keys(e).reduce((function(t,r){return t[r]=e[r],delete e[r],t}),{});return Object.assign(e,s,(i=a,(o=r)in(n={})?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,n)),e}function i(e,t,r){return e[r]=t.reduce((function(t,r){return t[r]=e[r],delete e[r],t}),{}),e}e.exports=n((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="metadata";t.key&&(r=t.key);var n=[];return t.fillExcept||t.fillWith||(n.push("level"),n.push("message")),t.fillExcept&&(n=t.fillExcept),n.length>0?o(e,n,r):t.fillWith?i(e,t.fillWith,r):e}))},function(e,t,r){var n=r(10).inspect,o=r(9),i=r(3),s=i.LEVEL,a=i.MESSAGE,l=i.SPLAT;e.exports=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign({},e);return delete r[s],delete r[a],delete r[l],e[a]=n(r,!1,t.depth||null,t.colorize),e}))},function(e,t,r){var n=r(3).MESSAGE,o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.template=t}var t;return(t=[{key:"transform",value:function(e){return e[n]=this.template(e),e}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();e.exports=function(e){return new o(e)},e.exports.Printf=e.exports.Format=o},function(e,t,r){var n=r(9),o=r(3).MESSAGE,i=r(31);e.exports=n((function(e){var t=i(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";return e[o]="{}"!==t?"".concat(e.level,":").concat(r," ").concat(e.message," ").concat(t):"".concat(e.level,":").concat(r," ").concat(e.message),e}))},function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var o=r(10),i=r(3).SPLAT,s=/%[scdjifoO%]/g,a=/%%/g,l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t}var t;return(t=[{key:"_splat",value:function(e,t){var r=e.message,s=e[i]||e.splat||[],l=r.match(a),u=l&&l.length||0,g=t.length-u-s.length,c=g<0?s.splice(g,-1*g):[],f=c.length;if(f)for(var p=0;p<f;p++)Object.assign(e,c[p]);return e.message=o.format.apply(o,[r].concat(function(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(s))),e}},{key:"transform",value:function(e){var t=e.message,r=e[i]||e.splat;if(!r||!r.length)return e;var n=t&&t.match&&t.match(s);if(!n&&(r||r.length)){var o=r.length>1?r.splice(0):r,a=o.length;if(a)for(var l=0;l<a;l++)Object.assign(e,o[l]);return e}return n?this._splat(e,n):e}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();e.exports=function(e){return new l(e)}},function(e,t,r){var n=r(135),o=r(9);e.exports=o((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.format&&(e.timestamp="function"==typeof t.format?t.format():n.format(new Date,t.format)),e.timestamp||(e.timestamp=(new Date).toISOString()),t.alias&&(e[t.alias]=e.timestamp),e}))},function(e,t,r){r.r(t),r.d(t,"assign",(function(){return l})),r.d(t,"format",(function(){return R})),r.d(t,"parse",(function(){return O})),r.d(t,"defaultI18n",(function(){return f})),r.d(t,"setGlobalDateI18n",(function(){return h})),r.d(t,"setGlobalDateMasks",(function(){return A}));var n=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="[^\\s]+",i=/\[([^]*?)\]/gm;function s(e,t){for(var r=[],n=0,o=e.length;n<o;n++)r.push(e[n].substr(0,t));return r}var a=function(e){return function(t,r){var n=r[e].map((function(e){return e.toLowerCase()})).indexOf(t.toLowerCase());return n>-1?n:null}};function l(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++){var i=o[n];for(var s in i)e[s]=i[s]}return e}var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["January","February","March","April","May","June","July","August","September","October","November","December"],c=s(g,3),f={dayNamesShort:s(u,3),dayNames:u,monthNamesShort:c,monthNames:g,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!=10?1:0)*e%10]}},p=l({},f),h=function(e){return p=l(p,e)},d=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},y=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length<t;)e="0"+e;return e},m={D:function(e){return String(e.getDate())},DD:function(e){return y(e.getDate())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return y(e.getDay())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return y(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},YY:function(e){return y(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return y(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return y(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return y(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return y(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return y(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return y(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return y(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+y(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+y(Math.floor(Math.abs(t)/60),2)+":"+y(Math.abs(t)%60,2)}},b=function(e){return+e-1},v=[null,"[1-9]\\d?"],_=[null,o],S=["isPm",o,function(e,t){var r=e.toLowerCase();return r===t.amPm[0]?0:r===t.amPm[1]?1:null}],w=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var r=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?r:-r}return 0}],E={D:["day","[1-9]\\d?"],DD:["day","\\d\\d"],Do:["day","[1-9]\\d?"+o,function(e){return parseInt(e,10)}],M:["month","[1-9]\\d?",b],MM:["month","\\d\\d",b],YY:["year","\\d\\d",function(e){var t=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour","[1-9]\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","[1-9]\\d?"],HH:["hour","\\d\\d"],m:["minute","[1-9]\\d?"],mm:["minute","\\d\\d"],s:["second","[1-9]\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(e){return 100*+e}],SS:["millisecond","\\d\\d",function(e){return 10*+e}],SSS:["millisecond","\\d{3}"],d:v,dd:v,ddd:_,dddd:_,MMM:["month",o,a("monthNamesShort")],MMMM:["month",o,a("monthNames")],a:S,A:S,ZZ:w,Z:w},T={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},A=function(e){return l(T,e)},R=function(e,t,r){if(void 0===t&&(t=T.default),void 0===r&&(r={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var o=[];t=(t=T[t]||t).replace(i,(function(e,t){return o.push(t),"@@@"}));var s=l(l({},p),r);return(t=t.replace(n,(function(t){return m[t](e,s)}))).replace(/@@@/g,(function(){return o.shift()}))};function O(e,t,r){if(void 0===r&&(r={}),"string"!=typeof t)throw new Error("Invalid format in fecha parse");if(t=T[t]||t,e.length>1e3)return null;var o={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},s=[],a=[],u=t.replace(i,(function(e,t){return a.push(d(t)),"@@@"})),g={},c={};u=d(u).replace(n,(function(e){var t=E[e],r=t[0],n=t[1],o=t[3];if(g[r])throw new Error("Invalid format. "+r+" specified twice in format");return g[r]=!0,o&&(c[o]=!0),s.push(t),"("+n+")"})),Object.keys(c).forEach((function(e){if(!g[e])throw new Error("Invalid format. "+e+" is required in specified format")})),u=u.replace(/@@@/g,(function(){return a.shift()}));var f=e.match(new RegExp(u,"i"));if(!f)return null;for(var h=l(l({},p),r),y=1;y<f.length;y++){var m=s[y-1],b=m[0],v=m[2],_=v?v(f[y],h):+f[y];if(null==_)return null;o[b]=_}1===o.isPm&&null!=o.hour&&12!=+o.hour?o.hour=+o.hour+12:0===o.isPm&&12==+o.hour&&(o.hour=0);for(var S=new Date(o.year,o.month,o.day,o.hour,o.minute,o.second,o.millisecond),w=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],A=(y=0,w.length);y<A;y++)if(g[w[y][0]]&&o[w[y][0]]!==S[w[y][1]]())return null;return null==o.timezoneOffset?S:new Date(Date.UTC(o.year,o.month,o.day,o.hour,o.minute-o.timezoneOffset,o.second,o.millisecond))}var j={format:R,parse:O,defaultI18n:f,setGlobalDateI18n:h,setGlobalDateMasks:A};t.default=j},function(e,t,r){var n=r(57),o=r(9),i=r(3).MESSAGE;e.exports=o((function(e,t){return!1!==t.level&&(e.level=n.strip(e.level)),!1!==t.message&&(e.message=n.strip(e.message)),!1!==t.raw&&e[i]&&(e[i]=n.strip(e[i])),e}))},function(e){e.exports=JSON.parse('{"name":"winston","description":"A logger for just about everything.","version":"3.3.3","author":"Charlie Robbins <charlie.robbins@gmail.com>","maintainers":["Jarrett Cruger <jcrugzz@gmail.com>","Chris Alderson <chrisalderson@protonmail.com>","David Hyde <dabh@stanford.edu>"],"repository":{"type":"git","url":"https://github.com/winstonjs/winston.git"},"keywords":["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"dependencies":{"async":"^3.1.0","@dabh/diagnostics":"^2.0.2","is-stream":"^2.0.0","logform":"^2.2.0","one-time":"^1.0.0","readable-stream":"^3.4.0","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.4.0"},"devDependencies":{"@babel/cli":"^7.10.3","@babel/core":"^7.10.3","@babel/preset-env":"^7.10.3","@types/node":"^14.0.13","abstract-winston-transport":"^0.5.1","assume":"^2.2.0","colors":"^1.4.0","cross-spawn-async":"^2.2.5","eslint-config-populist":"^4.2.0","hock":"^1.4.1","mocha":"^8.0.1","nyc":"^15.1.0","rimraf":"^3.0.2","split2":"^3.1.1","std-mocks":"^1.0.1","through2":"^3.0.1","winston-compat":"^0.1.5"},"main":"./lib/winston","browser":"./dist/winston","types":"./index.d.ts","scripts":{"lint":"populist lib/*.js lib/winston/*.js lib/winston/**/*.js","pretest":"npm run lint","test":"nyc --reporter=text --reporter lcov npm run test:mocha","test:mocha":"mocha test/*.test.js test/**/*.test.js --exit","build":"./node_modules/.bin/rimraf dist && babel lib -d dist","prepublishOnly":"npm run build"},"engines":{"node":">= 6.4.0"},"license":"MIT"}')},function(e,t,r){Object.defineProperty(t,"Console",{configurable:!0,enumerable:!0,get:function(){return r(139)}}),Object.defineProperty(t,"File",{configurable:!0,enumerable:!0,get:function(){return r(148)}}),Object.defineProperty(t,"Http",{configurable:!0,enumerable:!0,get:function(){return r(188)}}),Object.defineProperty(t,"Stream",{configurable:!0,enumerable:!0,get:function(){return r(200)}})},function(e,t,r){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=r(15),u=r(3),g=u.LEVEL,c=u.MESSAGE,f=r(17);e.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(u,e);var r,n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}(u);function u(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,u),(e=n.call(this,t)).name=t.name||"console",e.stderrLevels=e._stringArrayToSet(t.stderrLevels),e.consoleWarnLevels=e._stringArrayToSet(t.consoleWarnLevels),e.eol=t.eol||l.EOL,e.setMaxListeners(30),e}return(r=[{key:"log",value:function(e,r){var n=this;return t((function(){return n.emit("logged",e)})),this.stderrLevels[e[g]]?(console._stderr?console._stderr.write("".concat(e[c]).concat(this.eol)):console.error(e[c]),void(r&&r())):this.consoleWarnLevels[e[g]]?(console._stderr?console._stderr.write("".concat(e[c]).concat(this.eol)):console.warn(e[c]),void(r&&r())):(console._stdout?console._stdout.write("".concat(e[c]).concat(this.eol)):console.log(e[c]),void(r&&r()))}},{key:"_stringArrayToSet",value:function(e,t){if(!e)return{};if(t=t||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(t);return e.reduce((function(e,r){if("string"!=typeof r)throw new Error(t);return e[r]=!0,e}),{})}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(u.prototype,r),u}(f)}).call(this,r(12).setImmediate)},function(e,t,r){(function(e,t){!function(e,r){if(!e.setImmediate){var n,o,i,s,a,l=1,u={},g=!1,c=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){h(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&h(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},n=function(e){i.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(o=c.documentElement,n=function(e){var t=c.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):n=function(e){setTimeout(h,0,e)},f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var o={callback:e,args:t};return u[l]=o,n(l),l++},f.clearImmediate=p}function p(e){delete u[e]}function h(e){if(g)setTimeout(h,0,e);else{var t=u[e];if(t){g=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{p(e),g=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(60)},function(e,t,r){(function(t,n){var o=r(13);e.exports=v;var i,s=r(38);v.ReadableState=b,r(18).EventEmitter;var a=function(e,t){return e.listeners(t).length},l=r(61),u=r(40).Buffer,g=t.Uint8Array||function(){},c=Object.create(r(14));c.inherits=r(6);var f=r(143),p=void 0;p=f&&f.debuglog?f.debuglog("stream"):function(){};var h,d=r(144),y=r(62);c.inherits(v,l);var m=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var n=t instanceof(i=i||r(32));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=r(19).StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function v(e){if(i=i||r(32),!(this instanceof v))return new v(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function _(e,t,r,n,o){var i,s,a,l,c,f=e._readableState;return null===t?(f.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}}(e,f)):(o||(s=f,c=a=t,u.isBuffer(c)||c instanceof g||"string"==typeof a||void 0===a||s.objectMode||(l=new TypeError("Invalid non-string/buffer chunk")),i=l),i?e.emit("error",i):f.objectMode||t&&t.length>0?("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?f.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):S(e,f,t,!0):f.ended?e.emit("error",new Error("stream.push() after EOF")):(f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?S(e,f,t,!1):A(e,f)):S(e,f,t,!1))):n||(f.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(f)}function S(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&E(e)),A(e,t)}function w(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=((r=e)>=8388608?r=8388608:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(T,e):T(e))}function T(e){p("emit readable"),e.emit("readable"),I(e)}function A(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(R,e,t))}function R(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function O(e){p("readable nexttick read 0"),e.read(0)}function j(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?s=t.buffer.shift():!e||e>=t.length?(s=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):(r=e,n=t.buffer,o=t.decoder,r<n.head.data.length?(i=n.head.data.slice(0,r),n.head.data=n.head.data.slice(r)):i=r===n.head.data.length?n.shift():o?function(e,t){var r=t.head,n=1,o=r.data;for(e-=o.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(s===i.length?o+=i:o+=i.slice(0,e),0==(e-=s)){s===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(s));break}++n}return t.length-=n,o}(r,n):function(e,t){var r=u.allocUnsafe(e),n=t.head,o=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,s),0==(e-=s)){s===i.length?(++o,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(s));break}++o}return t.length-=o,r}(r,n),s=i),s);var r,n,o,i,s}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(P,t,e))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function N(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},v.prototype.unshift=function(e){return _(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return h||(h=r(19).StringDecoder),this._readableState.decoder=new h(e),this._readableState.encoding=e,this},v.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):E(this),null;if(0===(e=w(e,t))&&t.ended)return 0===t.length&&M(this),null;var n,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",o=!0),t.ended||t.reading?p("reading or ended",o=!1):o&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=w(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&M(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var l=t&&!1===t.end||e===n.stdout||e===n.stderr?v:u;function u(){p("onend"),e.end()}i.endEmitted?o.nextTick(l):r.once("end",l),e.on("unpipe",(function t(n,o){p("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",y),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",v),r.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var g,c=(g=r,function(){var e=g._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(g,"data")&&(e.flowing=!0,I(g))});e.on("drain",c);var f=!1,h=!1;function d(t){p("ondata"),h=!1,!1!==e.write(t)||h||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==N(i.pipes,e))&&!f&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,h=!0),r.pause())}function y(t){p("onerror",t),v(),e.removeListener("error",y),0===a(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",b),v()}function b(){p("onfinish"),e.removeListener("close",m),v()}function v(){p("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",m),e.once("finish",b),e.emit("pipe",r),i.flowing||(p("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,r);return this}var s=N(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},v.prototype.on=function(e,t){var r=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&E(this):o.nextTick(O,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(p("resume"),r.flowing=!0,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,o.nextTick(j,e,t))),this},v.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(p("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){p("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<m.length;i++)e.on(m[i],this.emit.bind(this,m[i]));return this._read=function(t){p("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=C}).call(this,r(5),r(2))},function(e,t){},function(e,t,r){var n=r(40).Buffer,o=r(145);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,o=n.allocUnsafe(e>>>0),i=this.head,s=0;i;)t=o,r=s,i.data.copy(t,r),s+=i.data.length,i=i.next;return o},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){var n=r(4),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){var n=r(10),o=r(3).LEVEL,i=r(17),s=e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");function t(e){this.emit("error",e,this.transport)}this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=t.bind(this),this.transport.on("error",this.transport.__winstonError))};n.inherits(s,i),s.prototype._write=function(e,t,r){if(this.silent||!0===e.exception&&!this.handleExceptions)return r(null);(!this.level||this.levels[this.level]>=this.levels[e[o]])&&this.transport.log(e[o],e.message,e,this._nop),r(null)},s.prototype._writev=function(e,t){for(var r=0;r<e.length;r++)this._accept(e[r])&&(this.transport.log(e[r].chunk[o],e[r].chunk.message,e[r].chunk,this._nop),e[r].callback());return t(null)},s.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},s.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,r){(function(t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=r(63),c=r(53),f=r(149),p=r(159),h=r(3).MESSAGE,d=r(29),y=d.Stream,m=d.PassThrough,b=r(17),v=r(34)("winston:file"),_=r(15),S=r(187);e.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(b,e);var r,d=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var o=u(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return a(this,r)}}(b);function b(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function r(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];n.slice(1).forEach((function(r){if(t[r])throw new Error("Cannot set ".concat(r," and ").concat(e," together"))}))}if(i(this,b),(e=d.call(this,t)).name=t.name||"file",e._stream=new m,e._stream.setMaxListeners(30),e._onError=e._onError.bind(l(e)),t.filename||t.dirname)r("filename or dirname","stream"),e._basename=e.filename=t.filename?c.basename(t.filename):"winston.log",e.dirname=t.dirname||c.dirname(t.filename),e.options=t.options||{flags:"a"};else{if(!t.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),e._dest=e._stream.pipe(e._setupStream(t.stream)),e.dirname=c.dirname(e._dest.path)}return e.maxsize=t.maxsize||null,e.rotationFormat=t.rotationFormat||!1,e.zippedArchive=t.zippedArchive||!1,e.maxFiles=t.maxFiles||null,e.eol=t.eol||_.EOL,e.tailable=t.tailable||!1,e._size=0,e._pendingSize=0,e._created=0,e._drain=!1,e._opening=!1,e._ending=!1,e.dirname&&e._createLogDirIfNotExist(e.dirname),e.open(),e}return(r=[{key:"finishIfEnding",value:function(){var e=this;this._ending&&(this._opening?this.once("open",(function(){e._stream.once("finish",(function(){return e.emit("finish")})),t((function(){return e._stream.end()}))})):(this._stream.once("finish",(function(){return e.emit("finish")})),t((function(){return e._stream.end()}))))}},{key:"log",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(this.silent)return r(),!0;if(this._drain)this._stream.once("drain",(function(){t._drain=!1,t.log(e,r)}));else{if(!this._rotate){var o="".concat(e[h]).concat(this.eol),i=n.byteLength(o);this._pendingSize+=i,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var s=this._stream.write(o,a.bind(this));return s?r():(this._drain=!0,this._stream.once("drain",(function(){t._drain=!1,r()}))),v("written",s,this._drain),this.finishIfEnding(),s}this._stream.once("rotate",(function(){t._rotate=!1,t.log(e,r)}))}function a(){var t=this;this._size+=i,this._pendingSize-=i,v("logged %s %s",this._size,o),this.emit("logged",e),this._opening||this._needsNewFile()&&(this._rotate=!0,this._endStream((function(){return t._rotateFile()})))}}},{key:"query",value:function(e,t){var r;"function"==typeof e&&(t=e,e={}),(r=(r=e)||{}).rows=r.rows||r.limit||10,r.start=r.start||0,r.until=r.until||new Date,"object"!==o(r.until)&&(r.until=new Date(r.until)),r.from=r.from||r.until-864e5,"object"!==o(r.from)&&(r.from=new Date(r.from)),r.order=r.order||"desc",e=r;var n=c.join(this.dirname,this.filename),i="",s=[],a=0,l=g.createReadStream(n,{encoding:"utf8"});function u(t,n){try{var i=JSON.parse(t);(function(t){if(t&&"object"===o(t)){var r=new Date(t.timestamp);if(!(e.from&&r<e.from||e.until&&r>e.until||e.level&&e.level!==t.level))return!0}})(i)&&(a=i,e.rows&&s.length>=e.rows&&"desc"!==e.order?l.readable&&l.destroy():(e.fields&&(a=e.fields.reduce((function(e,t){return e[t]=a[t],e}),{})),"desc"===e.order&&s.length>=e.rows&&s.shift(),s.push(a)))}catch(r){n||l.emit("error",r)}var a}l.on("error",(function(e){if(l.readable&&l.destroy(),t)return"ENOENT"!==e.code?t(e):t(null,s)})),l.on("data",(function(t){for(var r=(t=(i+t).split(/\n+/)).length-1,n=0;n<r;n++)(!e.start||a>=e.start)&&u(t[n]),a++;i=t[r]})),l.on("close",(function(){i&&u(i,!0),"desc"===e.order&&(s=s.reverse()),t&&t(null,s)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c.join(this.dirname,this.filename),r=new y,n={file:t,start:e.start};return r.destroy=S(n,(function(e,t){if(e)return r.emit("error",e);try{r.emit("data",t),t=JSON.parse(t),r.emit("log",t)}catch(n){r.emit("error",n)}})),r}},{key:"open",value:function(){var e=this;this.filename&&(this._opening||(this._opening=!0,this.stat((function(t,r){if(t)return e.emit("error",t);v("stat done: %s { size: %s }",e.filename,r),e._size=r,e._dest=e._createStream(e._stream),e._opening=!1,e.once("open",(function(){e._stream.eventNames().includes("rotate")?e._stream.emit("rotate"):e._rotate=!1}))}))))}},{key:"stat",value:function(e){var t=this,r=this._getFile(),n=c.join(this.dirname,r);g.stat(n,(function(o,i){return o&&"ENOENT"===o.code?(v("ENOENT ok",n),t.filename=r,e(null,0)):o?(v("err ".concat(o.code," ").concat(n)),e(o)):!i||t._needsNewFile(i.size)?t._incFile((function(){return t.stat(e)})):(t.filename=r,void e(null,i.size))}))}},{key:"close",value:function(e){var t=this;this._stream&&this._stream.end((function(){e&&e(),t.emit("flush"),t.emit("closed")}))}},{key:"_needsNewFile",value:function(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}},{key:"_onError",value:function(e){this.emit("error",e)}},{key:"_setupStream",value:function(e){return e.on("error",this._onError),e}},{key:"_cleanupStream",value:function(e){return e.removeListener("error",this._onError),e}},{key:"_rotateFile",value:function(){var e=this;this._incFile((function(){return e.open()}))}},{key:"_endStream",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end((function(){e._cleanupStream(e._dest),t()}))):t()}},{key:"_createStream",value:function(e){var t=this,r=c.join(this.dirname,this.filename);v("create stream start",r,this.options);var n=g.createWriteStream(r,this.options).on("error",(function(e){return v(e)})).on("close",(function(){return v("close",n.path,n.bytesWritten)})).on("open",(function(){v("file open ok",r),t.emit("open",r),e.pipe(n),t.rotatedWhileOpening&&(t._stream=new m,t._stream.setMaxListeners(30),t._rotateFile(),t.rotatedWhileOpening=!1,t._cleanupStream(n),e.end())}));if(v("create stream ok",r),this.zippedArchive){var o=p.createGzip();return o.pipe(n),o}return n}},{key:"_incFile",value:function(e){v("_incFile",this.filename);var t=c.extname(this._basename),r=c.basename(this._basename,t);this.tailable?this._checkMaxFilesTailable(t,r,e):(this._created+=1,this._checkMaxFilesIncrementing(t,r,e))}},{key:"_getFile",value:function(){var e=c.extname(this._basename),t=c.basename(this._basename,e),r=this.rotationFormat?this.rotationFormat():this._created,n=!this.tailable&&this._created?"".concat(t).concat(r).concat(e):"".concat(t).concat(e);return this.zippedArchive&&!this.tailable?"".concat(n,".gz"):n}},{key:"_checkMaxFilesIncrementing",value:function(e,r,n){if(!this.maxFiles||this._created<this.maxFiles)return t(n);var o=this._created-this.maxFiles,i=0!==o?o:"",s=this.zippedArchive?".gz":"",a="".concat(r).concat(i).concat(e).concat(s),l=c.join(this.dirname,a);g.unlink(l,n)}},{key:"_checkMaxFilesTailable",value:function(e,t,r){var n=this,o=[];if(this.maxFiles){for(var i=this.zippedArchive?".gz":"",s=this.maxFiles-1;s>1;s--)o.push(function(r,n){var o=this,s="".concat(t).concat(r-1).concat(e).concat(i),a=c.join(this.dirname,s);g.exists(a,(function(l){if(!l)return n(null);s="".concat(t).concat(r).concat(e).concat(i),g.rename(a,c.join(o.dirname,s),n)}))}.bind(this,s));f(o,(function(){g.rename(c.join(n.dirname,"".concat(t).concat(e)),c.join(n.dirname,"".concat(t,"1").concat(e).concat(i)),r)}))}}},{key:"_createLogDirIfNotExist",value:function(e){g.existsSync(e)||g.mkdirSync(e,{recursive:!0})}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(b.prototype,r),b}(b)}).call(this,r(12).setImmediate,r(4).Buffer)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(o.default,e,t)};var n=i(r(150)),o=i(r(154));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(41)),o=s(r(23)),i=s(r(27));function s(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(((e,t,r)=>{var i=(0,n.default)(t)?[]:{};e(t,((e,t,r)=>{(0,o.default)(e)(((e,...n)=>{n.length<2&&([n]=n),i[t]=n,r(e)}))}),(e=>r(e,i)))}),3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.isAsync)(e)?function(...t){const r=t.pop();return a(e.apply(this,t),r)}:(0,n.default)((function(t,r){var n;try{n=e.apply(this,t)}catch(o){return r(o)}if(n&&"function"==typeof n.then)return a(n,r);r(null,n)}))};var n=s(r(152)),o=s(r(153)),i=r(23);function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return e.then((e=>{l(t,null,e)}),(e=>{l(t,e&&e.message?e:new Error(e))}))}function l(e,t,r){try{e(t,r)}catch(n){(0,o.default)((e=>{throw e}),n)}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){var r=t.pop();return e.call(this,t,r)}},e.exports=t.default},function(e,t,r){(function(e,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=s,t.wrap=a;var n,o=t.hasSetImmediate="function"==typeof e&&e,i=t.hasNextTick="object"==typeof r&&"function"==typeof r.nextTick;function s(e){setTimeout(e,0)}function a(e){return(t,...r)=>e((()=>t(...r)))}n=o?e:i?r.nextTick:s,t.default=a(n)}).call(this,r(12).setImmediate,r(2))},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(64)),o=i(r(27));function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,o.default)((function(e,t,r){return(0,n.default)(e,1,t,r)}),3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(65)),o=u(r(156)),i=u(r(66)),s=r(23),a=u(r(158)),l=u(r(42));function u(e){return e&&e.__esModule?e:{default:e}}t.default=e=>(t,r,u)=>{if(u=(0,n.default)(u),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return u(null);if((0,s.isAsyncGenerator)(t))return(0,a.default)(t,e,r,u);if((0,s.isAsyncIterable)(t))return(0,a.default)(t[Symbol.asyncIterator](),e,r,u);var g=(0,o.default)(t),c=!1,f=!1,p=0,h=!1;function d(e,t){if(!f)if(p-=1,e)c=!0,u(e);else if(!1===e)c=!0,f=!0;else{if(t===l.default||c&&p<=0)return c=!0,u(null);h||y()}}function y(){for(h=!0;p<e&&!c;){var t=g();if(null===t)return c=!0,void(p<=0&&u(null));p+=1,r(t.value,t.key,(0,i.default)(d))}h=!1}y()},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e))return r=-1,i=(t=e).length,function(){return++r<i?{value:t[r],key:r}:null};var t,r,i,s,a,l,u,g=(0,o.default)(e);return g?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(g):(a=(s=e)?Object.keys(s):[],l=-1,u=a.length,function(){var e=a[++l];return l<u?{value:s[e],key:e}:null})};var n=i(r(41)),o=i(r(157));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){let i=!1,s=!1,a=!1,l=0,u=0;function g(){l>=t||a||i||(a=!0,e.next().then((({value:e,done:t})=>{if(!s&&!i){if(a=!1,t)return i=!0,void(l<=0&&n(null));l++,r(e,u,c),u++,g()}})).catch(f))}function c(e,t){if(l-=1,!s)return e?f(e):!1===e?(i=!0,void(s=!0)):t===o.default||i&&l<=0?(i=!0,n(null)):void g()}function f(e){s||(a=!1,i=!0,n(e))}g()};var n,o=(n=r(42))&&n.__esModule?n:{default:n};e.exports=t.default},function(e,t,r){(function(e){var n=r(4).Buffer,o=r(160).Transform,i=r(168),s=r(10),a=r(72).ok,l=r(4).kMaxLength,u="Cannot create final Buffer. It would be larger than 0x"+l.toString(16)+" bytes";i.Z_MIN_WINDOWBITS=8,i.Z_MAX_WINDOWBITS=15,i.Z_DEFAULT_WINDOWBITS=15,i.Z_MIN_CHUNK=64,i.Z_MAX_CHUNK=1/0,i.Z_DEFAULT_CHUNK=16384,i.Z_MIN_MEMLEVEL=1,i.Z_MAX_MEMLEVEL=9,i.Z_DEFAULT_MEMLEVEL=8,i.Z_MIN_LEVEL=-1,i.Z_MAX_LEVEL=9,i.Z_DEFAULT_LEVEL=i.Z_DEFAULT_COMPRESSION;for(var g=Object.keys(i),c=0;c<g.length;c++){var f=g[c];f.match(/^Z/)&&Object.defineProperty(t,f,{enumerable:!0,value:i[f],writable:!1})}for(var p={Z_OK:i.Z_OK,Z_STREAM_END:i.Z_STREAM_END,Z_NEED_DICT:i.Z_NEED_DICT,Z_ERRNO:i.Z_ERRNO,Z_STREAM_ERROR:i.Z_STREAM_ERROR,Z_DATA_ERROR:i.Z_DATA_ERROR,Z_MEM_ERROR:i.Z_MEM_ERROR,Z_BUF_ERROR:i.Z_BUF_ERROR,Z_VERSION_ERROR:i.Z_VERSION_ERROR},h=Object.keys(p),d=0;d<h.length;d++){var y=h[d];p[p[y]]=y}function m(e,t,r){var o=[],i=0;function s(){for(var t;null!==(t=e.read());)o.push(t),i+=t.length;e.once("readable",s)}function a(){var t,s=null;i>=l?s=new RangeError(u):t=n.concat(o,i),o=[],e.close(),r(s,t)}e.on("error",(function(t){e.removeListener("end",a),e.removeListener("readable",s),r(t)})),e.on("end",a),e.end(t),s()}function b(e,t){if("string"==typeof t&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function v(e){if(!(this instanceof v))return new v(e);O.call(this,e,i.DEFLATE)}function _(e){if(!(this instanceof _))return new _(e);O.call(this,e,i.INFLATE)}function S(e){if(!(this instanceof S))return new S(e);O.call(this,e,i.GZIP)}function w(e){if(!(this instanceof w))return new w(e);O.call(this,e,i.GUNZIP)}function E(e){if(!(this instanceof E))return new E(e);O.call(this,e,i.DEFLATERAW)}function T(e){if(!(this instanceof T))return new T(e);O.call(this,e,i.INFLATERAW)}function A(e){if(!(this instanceof A))return new A(e);O.call(this,e,i.UNZIP)}function R(e){return e===i.Z_NO_FLUSH||e===i.Z_PARTIAL_FLUSH||e===i.Z_SYNC_FLUSH||e===i.Z_FULL_FLUSH||e===i.Z_FINISH||e===i.Z_BLOCK}function O(e,r){var s=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,o.call(this,e),e.flush&&!R(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!R(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||i.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:i.Z_FINISH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!n.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new i.Zlib(r);var a=this;this._hadError=!1,this._handle.onerror=function(e,r){j(a),a._hadError=!0;var n=new Error(e);n.errno=r,n.code=t.codes[r],a.emit("error",n)};var l=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(l=e.level);var u=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(u=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,l,e.memLevel||t.Z_DEFAULT_MEMLEVEL,u,e.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=l,this._strategy=u,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!s._handle},configurable:!0,enumerable:!0})}function j(t,r){r&&e.nextTick(r),t._handle&&(t._handle.close(),t._handle=null)}function I(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=v,t.Inflate=_,t.Gzip=S,t.Gunzip=w,t.DeflateRaw=E,t.InflateRaw=T,t.Unzip=A,t.createDeflate=function(e){return new v(e)},t.createInflate=function(e){return new _(e)},t.createDeflateRaw=function(e){return new E(e)},t.createInflateRaw=function(e){return new T(e)},t.createGzip=function(e){return new S(e)},t.createGunzip=function(e){return new w(e)},t.createUnzip=function(e){return new A(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new v(t),e,r)},t.deflateSync=function(e,t){return b(new v(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new S(t),e,r)},t.gzipSync=function(e,t){return b(new S(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new E(t),e,r)},t.deflateRawSync=function(e,t){return b(new E(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new A(t),e,r)},t.unzipSync=function(e,t){return b(new A(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new _(t),e,r)},t.inflateSync=function(e,t){return b(new _(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new w(t),e,r)},t.gunzipSync=function(e,t){return b(new w(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),m(new T(t),e,r)},t.inflateRawSync=function(e,t){return b(new T(t),e)},s.inherits(O,o),O.prototype.params=function(r,n,o){if(r<t.Z_MIN_LEVEL||r>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(n!=t.Z_FILTERED&&n!=t.Z_HUFFMAN_ONLY&&n!=t.Z_RLE&&n!=t.Z_FIXED&&n!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==r||this._strategy!==n){var s=this;this.flush(i.Z_SYNC_FLUSH,(function(){a(s._handle,"zlib binding closed"),s._handle.params(r,n),s._hadError||(s._level=r,s._strategy=n,o&&o())}))}else e.nextTick(o)},O.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},O.prototype._flush=function(e){this._transform(n.alloc(0),"",e)},O.prototype.flush=function(t,r){var o=this,s=this._writableState;("function"==typeof t||void 0===t&&!r)&&(r=t,t=i.Z_FULL_FLUSH),s.ended?r&&e.nextTick(r):s.ending?r&&this.once("end",r):s.needDrain?r&&this.once("drain",(function(){return o.flush(t,r)})):(this._flushFlag=t,this.write(n.alloc(0),"",r))},O.prototype.close=function(t){j(this,t),e.nextTick(I,this)},O.prototype._transform=function(e,t,r){var o,s=this._writableState,a=(s.ending||s.ended)&&(!e||s.length===e.length);return null===e||n.isBuffer(e)?this._handle?(a?o=this._finishFlushFlag:(o=this._flushFlag,e.length>=s.length&&(this._flushFlag=this._opts.flush||i.Z_NO_FLUSH)),void this._processChunk(e,o,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},O.prototype._processChunk=function(e,t,r){var o=e&&e.length,i=this._chunkSize-this._offset,s=0,g=this,c="function"==typeof r;if(!c){var f,p=[],h=0;this.on("error",(function(e){f=e})),a(this._handle,"zlib binding closed");do{var d=this._handle.writeSync(t,e,s,o,this._buffer,this._offset,i)}while(!this._hadError&&b(d[0],d[1]));if(this._hadError)throw f;if(h>=l)throw j(this),new RangeError(u);var y=n.concat(p,h);return j(this),y}a(this._handle,"zlib binding closed");var m=this._handle.write(t,e,s,o,this._buffer,this._offset,i);function b(l,u){if(this&&(this.buffer=null,this.callback=null),!g._hadError){var f=i-u;if(a(f>=0,"have should not go down"),f>0){var d=g._buffer.slice(g._offset,g._offset+f);g._offset+=f,c?g.push(d):(p.push(d),h+=d.length)}if((0===u||g._offset>=g._chunkSize)&&(i=g._chunkSize,g._offset=0,g._buffer=n.allocUnsafe(g._chunkSize)),0===u){if(s+=o-l,o=l,!c)return!0;var y=g._handle.write(t,e,s,o,g._buffer,g._offset,g._chunkSize);return y.callback=b,void(y.buffer=e)}if(!c)return!1;r()}}m.buffer=e,m.callback=b},s.inherits(v,O),s.inherits(_,O),s.inherits(S,O),s.inherits(w,O),s.inherits(E,O),s.inherits(T,O),s.inherits(A,O)}).call(this,r(2))},function(e,t,r){e.exports=o;var n=r(18).EventEmitter;function o(){n.call(this)}r(6)(o,n),o.Readable=r(28),o.Writable=r(71),o.Duplex=r(165),o.Transform=r(166),o.PassThrough=r(167),o.Stream=o,o.prototype.pipe=function(e,t){var r=this;function o(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",o),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(g(),0===n.listenerCount(this,"error"))throw e}function g(){r.removeListener("data",o),e.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",g),r.removeListener("close",g),e.removeListener("close",g)}return r.on("error",u),e.on("error",u),r.on("end",g),r.on("close",g),e.on("close",g),e.emit("pipe",r),e}},function(e,t){},function(e,t,r){var n=r(43).Buffer,o=r(163);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,o=n.allocUnsafe(e>>>0),i=this.head,s=0;i;)t=o,r=s,i.data.copy(t,r),s+=i.data.length,i=i.next;return o},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){e.exports=i;var n=r(70),o=r(14);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}o.inherits=r(6),o.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(20)},function(e,t,r){e.exports=r(28).Transform},function(e,t,r){e.exports=r(28).PassThrough},function(e,t,r){(function(e,n){var o=r(72),i=r(170),s=r(171),a=r(174),l=r(177);for(var u in l)t[u]=l[u];function g(e){if("number"!=typeof e||e<t.DEFLATE||e>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,g.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?s.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||a.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},g.prototype.write=function(e,t,r,n,o,i,s){return this._write(!0,e,t,r,n,o,i,s)},g.prototype.writeSync=function(e,t,r,n,o,i,s){return this._write(!1,e,t,r,n,o,i,s)},g.prototype._write=function(r,i,s,a,l,u,g,c){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==t.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===i,"must provide flush value"),this.write_in_progress=!0,i!==t.Z_NO_FLUSH&&i!==t.Z_PARTIAL_FLUSH&&i!==t.Z_SYNC_FLUSH&&i!==t.Z_FULL_FLUSH&&i!==t.Z_FINISH&&i!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=e.alloc(0),l=0,a=0),this.strm.avail_in=l,this.strm.input=s,this.strm.next_in=a,this.strm.avail_out=c,this.strm.output=u,this.strm.next_out=g,this.flush=i,!r)return this._process(),this._checkError()?this._afterSync():void 0;var f=this;return n.nextTick((function(){f._process(),f._after()})),this},g.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},g.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=a.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=a.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=a.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=a.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},g.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},g.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},g.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},g.prototype.init=function(e,r,n,i,s){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(e>=8&&e<=15,"invalid windowBits"),o(r>=-1&&r<=9,"invalid compression level"),o(n>=1&&n<=9,"invalid memlevel"),o(i===t.Z_FILTERED||i===t.Z_HUFFMAN_ONLY||i===t.Z_RLE||i===t.Z_FIXED||i===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,n,i,s),this._setDictionary()},g.prototype.params=function(){throw new Error("deflateParams Not supported")},g.prototype.reset=function(){this._reset(),this._setDictionary()},g.prototype._init=function(e,r,n,o,l){switch(this.level=e,this.windowBits=r,this.memLevel=n,this.strategy=o,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new i,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=a.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=l,this.write_in_progress=!1,this.init_done=!0},g.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},g.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=s.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=a.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=g}).call(this,r(4).Buffer,r(2))},function(e,t,r){var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var r,a,l=s(e),u=1;u<arguments.length;u++){for(var g in r=Object(arguments[u]))o.call(r,g)&&(l[g]=r[g]);if(n){a=n(r);for(var c=0;c<a.length;c++)i.call(r,a[c])&&(l[a[c]]=r[a[c]])}}return l}},function(e,t,r){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,r){var n,o=r(33),i=r(172),s=r(73),a=r(74),l=r(173);function u(e,t){return e.msg=l[t],t}function g(e){return(e<<1)-(e>4?9:0)}function c(e){for(var t=e.length;--t>=0;)e[t]=0}function f(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(o.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function p(e,t){i._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,f(e.strm)}function h(e,t){e.pending_buf[e.pending++]=t}function d(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function y(e,t){var r,n,o=e.max_chain_length,i=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,u=e.window,g=e.w_mask,c=e.prev,f=e.strstart+258,p=u[i+s-1],h=u[i+s];e.prev_length>=e.good_match&&(o>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(r=t)+s]===h&&u[r+s-1]===p&&u[r]===u[i]&&u[++r]===u[i+1]){i+=2,r++;do{}while(u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&i<f);if(n=258-(f-i),i=f-258,n>s){if(e.match_start=t,s=n,n>=a)break;p=u[i+s-1],h=u[i+s]}}}while((t=c[t&g])>l&&0!=--o);return s<=e.lookahead?s:e.lookahead}function m(e){var t,r,n,i,l,u,g,c,f,p,h=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-262)){o.arraySet(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=h?n-h:0}while(--r);t=r=h;do{n=e.prev[--t],e.prev[t]=n>=h?n-h:0}while(--r);i+=h}if(0===e.strm.avail_in)break;if(u=e.strm,g=e.window,c=e.strstart+e.lookahead,f=i,p=void 0,(p=u.avail_in)>f&&(p=f),r=0===p?0:(u.avail_in-=p,o.arraySet(g,u.input,u.next_in,p,c),1===u.state.wrap?u.adler=s(u.adler,g,p,c):2===u.state.wrap&&(u.adler=a(u.adler,g,p,c)),u.next_in+=p,u.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function b(e,t){for(var r,n;;){if(e.lookahead<262){if(m(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-262&&(e.match_length=y(e,r)),e.match_length>=3)if(n=i._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}function v(e,t){for(var r,n,o;;){if(e.lookahead<262){if(m(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-262&&(e.match_length=y(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,n=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(p(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=i._tr_tally(e,0,e.window[e.strstart-1]))&&p(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}function _(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}function S(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),c(this.dyn_ltree),c(this.dyn_dtree),c(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),c(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),c(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function w(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,i._tr_init(t),0):u(e,-2)}function E(e){var t,r=w(e);return 0===r&&((t=e.state).window_size=2*t.w_size,c(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function T(e,t,r,n,i,s){if(!e)return-2;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||8!==r||n<8||n>15||t<0||t>9||s<0||s>4)return u(e,-2);8===n&&(n=9);var l=new S;return e.state=l,l.strm=e,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=i+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new o.Buf8(2*l.w_size),l.head=new o.Buf16(l.hash_size),l.prev=new o.Buf16(l.w_size),l.lit_bufsize=1<<i+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new o.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=s,l.method=r,E(e)}n=[new _(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(m(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,p(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(p(e,!1),e.strm.avail_out),1)})),new _(4,4,8,4,b),new _(4,5,16,8,b),new _(4,6,32,32,b),new _(4,4,16,16,v),new _(8,16,32,32,v),new _(8,16,128,128,v),new _(8,32,128,256,v),new _(32,128,258,1024,v),new _(32,258,258,4096,v)],t.deflateInit=function(e,t){return T(e,t,8,15,8,0)},t.deflateInit2=T,t.deflateReset=E,t.deflateResetKeep=w,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},t.deflate=function(e,t){var r,o,s,l;if(!e||!e.state||t>5||t<0)return e?u(e,-2):-2;if(o=e.state,!e.output||!e.input&&0!==e.avail_in||666===o.status&&4!==t)return u(e,0===e.avail_out?-5:-2);if(o.strm=e,r=o.last_flush,o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,h(o,31),h(o,139),h(o,8),o.gzhead?(h(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),h(o,255&o.gzhead.time),h(o,o.gzhead.time>>8&255),h(o,o.gzhead.time>>16&255),h(o,o.gzhead.time>>24&255),h(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),h(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(h(o,255&o.gzhead.extra.length),h(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=a(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(h(o,0),h(o,0),h(o,0),h(o,0),h(o,0),h(o,9===o.level?2:o.strategy>=2||o.level<2?4:0),h(o,3),o.status=113);else{var y=8+(o.w_bits-8<<4)<<8;y|=(o.strategy>=2||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(y|=32),y+=31-y%31,o.status=113,d(o,y),0!==o.strstart&&(d(o,e.adler>>>16),d(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(s=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),f(e),s=o.pending,o.pending!==o.pending_buf_size));)h(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),f(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,h(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){s=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),f(e),s=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,h(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>s&&(e.adler=a(e.adler,o.pending_buf,o.pending-s,s)),0===l&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&f(e),o.pending+2<=o.pending_buf_size&&(h(o,255&e.adler),h(o,e.adler>>8&255),e.adler=0,o.status=113)):o.status=113),0!==o.pending){if(f(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(r)&&4!==t)return u(e,-5);if(666===o.status&&0!==e.avail_in)return u(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&666!==o.status){var b=2===o.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(m(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var r,n,o,s,a=e.window;;){if(e.lookahead<=258){if(m(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=a[o=e.strstart-1])===a[++o]&&n===a[++o]&&n===a[++o]){s=e.strstart+258;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&o<s);e.match_length=258-(s-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=i._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(o,t):n[o.level].func(o,t);if(3!==b&&4!==b||(o.status=666),1===b||3===b)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===b&&(1===t?i._tr_align(o):5!==t&&(i._tr_stored_block(o,0,0,!1),3===t&&(c(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),f(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(h(o,255&e.adler),h(o,e.adler>>8&255),h(o,e.adler>>16&255),h(o,e.adler>>24&255),h(o,255&e.total_in),h(o,e.total_in>>8&255),h(o,e.total_in>>16&255),h(o,e.total_in>>24&255)):(d(o,e.adler>>>16),d(o,65535&e.adler)),f(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?u(e,-2):(e.state=null,113===t?u(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var r,n,i,a,l,u,g,f,p=t.length;if(!e||!e.state)return-2;if(2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return-2;for(1===a&&(e.adler=s(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(c(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new o.Buf8(r.w_size),o.arraySet(f,t,p-r.w_size,r.w_size,0),t=f,p=r.w_size),l=e.avail_in,u=e.next_in,g=e.input,e.avail_in=p,e.next_in=0,e.input=t,m(r);r.lookahead>=3;){n=r.strstart,i=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--i);r.strstart=n,r.lookahead=2,m(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=u,e.input=g,e.avail_in=l,r.wrap=a,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,r){var n=r(33);function o(e){for(var t=e.length;--t>=0;)e[t]=0}var i=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);o(u);var g=new Array(60);o(g);var c=new Array(512);o(c);var f=new Array(256);o(f);var p=new Array(29);o(p);var h,d,y,m=new Array(30);function b(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function v(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function _(e){return e<256?c[e]:c[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function w(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function E(e,t,r){w(e,r[2*t],r[2*t+1])}function T(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function A(e,t,r){var n,o,i=new Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+r[n-1]<<1;for(o=0;o<=t;o++){var a=e[2*o+1];0!==a&&(e[2*o]=T(i[a]++,a))}}function R(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function O(e){e.bi_valid>8?S(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function j(e,t,r,n){var o=2*t,i=2*r;return e[o]<e[i]||e[o]===e[i]&&n[t]<=n[r]}function I(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&j(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!j(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function C(e,t,r){var n,o,a,l,u=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],o=e.pending_buf[e.l_buf+u],u++,0===n?E(e,o,t):(E(e,(a=f[o])+256+1,t),0!==(l=i[a])&&w(e,o-=p[a],l),E(e,a=_(--n),r),0!==(l=s[a])&&w(e,n-=m[a],l))}while(u<e.last_lit);E(e,256,t)}function M(e,t){var r,n,o,i=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<l;r++)0!==i[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):i[2*r+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[o]=0,e.opt_len--,a&&(e.static_len-=s[2*o+1]);for(t.max_code=u,r=e.heap_len>>1;r>=1;r--)I(e,i,r);o=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],I(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*o]=i[2*r]+i[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=o,e.heap[1]=o++,I(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,o,i,s,a,l=t.dyn_tree,u=t.max_code,g=t.stat_desc.static_tree,c=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,h=t.stat_desc.max_length,d=0;for(i=0;i<=15;i++)e.bl_count[i]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(i=l[2*l[2*(n=e.heap[r])+1]+1]+1)>h&&(i=h,d++),l[2*n+1]=i,n>u||(e.bl_count[i]++,s=0,n>=p&&(s=f[n-p]),a=l[2*n],e.opt_len+=a*(i+s),c&&(e.static_len+=a*(g[2*n+1]+s)));if(0!==d){do{for(i=h-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[h]--,d-=2}while(d>0);for(i=h;0!==i;i--)for(n=e.bl_count[i];0!==n;)(o=e.heap[--r])>u||(l[2*o+1]!==i&&(e.opt_len+=(i-l[2*o+1])*l[2*o],l[2*o+1]=i),n--)}}(e,t),A(i,u,e.bl_count)}function P(e,t,r){var n,o,i=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=s,s=t[2*(n+1)+1],++a<l&&o===s||(a<u?e.bl_tree[2*o]+=a:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,i=o,0===s?(l=138,u=3):o===s?(l=6,u=3):(l=7,u=4))}function N(e,t,r){var n,o,i=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),n=0;n<=r;n++)if(o=s,s=t[2*(n+1)+1],!(++a<l&&o===s)){if(a<u)do{E(e,o,e.bl_tree)}while(0!=--a);else 0!==o?(o!==i&&(E(e,o,e.bl_tree),a--),E(e,16,e.bl_tree),w(e,a-3,2)):a<=10?(E(e,17,e.bl_tree),w(e,a-3,3)):(E(e,18,e.bl_tree),w(e,a-11,7));a=0,i=o,0===s?(l=138,u=3):o===s?(l=6,u=3):(l=7,u=4)}}o(m);var x=!1;function L(e,t,r,o){var i,s,a;w(e,0+(o?1:0),3),s=t,a=r,O(i=e),S(i,a),S(i,~a),n.arraySet(i.pending_buf,i.window,s,a,i.pending),i.pending+=a}t._tr_init=function(e){x||(function(){var e,t,r,n,o,l=new Array(16);for(r=0,n=0;n<28;n++)for(p[n]=r,e=0;e<1<<i[n];e++)f[r++]=n;for(f[r-1]=n,o=0,n=0;n<16;n++)for(m[n]=o,e=0;e<1<<s[n];e++)c[o++]=n;for(o>>=7;n<30;n++)for(m[n]=o<<7,e=0;e<1<<s[n]-7;e++)c[256+o++]=n;for(t=0;t<=15;t++)l[t]=0;for(e=0;e<=143;)u[2*e+1]=8,e++,l[8]++;for(;e<=255;)u[2*e+1]=9,e++,l[9]++;for(;e<=279;)u[2*e+1]=7,e++,l[7]++;for(;e<=287;)u[2*e+1]=8,e++,l[8]++;for(A(u,287,l),e=0;e<30;e++)g[2*e+1]=5,g[2*e]=T(e,5);h=new b(u,i,257,286,15),d=new b(g,s,0,30,15),y=new b(new Array(0),a,0,19,7)}(),x=!0),e.l_desc=new v(e.dyn_ltree,h),e.d_desc=new v(e.dyn_dtree,d),e.bl_desc=new v(e.bl_tree,y),e.bi_buf=0,e.bi_valid=0,R(e)},t._tr_stored_block=L,t._tr_flush_block=function(e,t,r,n){var o,i,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),M(e,e.l_desc),M(e,e.d_desc),s=function(e){var t;for(P(e,e.dyn_ltree,e.l_desc.max_code),P(e,e.dyn_dtree,e.d_desc.max_code),M(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==t?L(e,t,r,n):4===e.strategy||i===o?(w(e,2+(n?1:0),3),C(e,u,g)):(w(e,4+(n?1:0),3),function(e,t,r,n){var o;for(w(e,t-257,5),w(e,r-1,5),w(e,n-4,4),o=0;o<n;o++)w(e,e.bl_tree[2*l[o]+1],3);N(e,e.dyn_ltree,t-1),N(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),C(e,e.dyn_ltree,e.dyn_dtree)),R(e),n&&O(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(f[r]+256+1)]++,e.dyn_dtree[2*_(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){var t;w(e,2,3),E(e,256,u),16===(t=e).bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},function(e,t,r){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,r){var n=r(33),o=r(73),i=r(74),s=r(175),a=r(176);function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function g(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):-2}function c(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,g(e)):-2}function f(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,c(e))):-2}function p(e,t){var r,n;return e?(n=new u,e.state=n,n.window=null,0!==(r=f(e,t))&&(e.state=null),r):-2}var h,d,y=!0;function m(e){if(y){var t;for(h=new n.Buf32(512),d=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,h,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,d,0,e.work,{bits:5}),y=!1}e.lencode=h,e.lenbits=9,e.distcode=d,e.distbits=5}function b(e,t,r,o){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),o>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((i=s.wsize-s.wnext)>o&&(i=o),n.arraySet(s.window,t,r-o,i,s.wnext),(o-=i)?(n.arraySet(s.window,t,r-o,o,0),s.wnext=o,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}t.inflateReset=c,t.inflateReset2=f,t.inflateResetKeep=g,t.inflateInit=function(e){return p(e,15)},t.inflateInit2=p,t.inflate=function(e,t){var r,u,g,c,f,p,h,d,y,v,_,S,w,E,T,A,R,O,j,I,C,M,P,N,x=0,L=new n.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(r=e.state).mode&&(r.mode=13),f=e.next_out,g=e.output,h=e.avail_out,c=e.next_in,u=e.input,p=e.avail_in,d=r.hold,y=r.bits,v=p,_=h,M=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;y<16;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}if(2&r.wrap&&35615===d){r.check=0,L[0]=255&d,L[1]=d>>>8&255,r.check=i(r.check,L,2,0),d=0,y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&d)<<8)+(d>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&d)){e.msg="unknown compression method",r.mode=30;break}if(y-=4,C=8+(15&(d>>>=4)),0===r.wbits)r.wbits=C;else if(C>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<C,e.adler=r.check=1,r.mode=512&d?10:12,d=0,y=0;break;case 2:for(;y<16;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}if(r.flags=d,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=d>>8&1),512&r.flags&&(L[0]=255&d,L[1]=d>>>8&255,r.check=i(r.check,L,2,0)),d=0,y=0,r.mode=3;case 3:for(;y<32;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}r.head&&(r.head.time=d),512&r.flags&&(L[0]=255&d,L[1]=d>>>8&255,L[2]=d>>>16&255,L[3]=d>>>24&255,r.check=i(r.check,L,4,0)),d=0,y=0,r.mode=4;case 4:for(;y<16;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}r.head&&(r.head.xflags=255&d,r.head.os=d>>8),512&r.flags&&(L[0]=255&d,L[1]=d>>>8&255,r.check=i(r.check,L,2,0)),d=0,y=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}r.length=d,r.head&&(r.head.extra_len=d),512&r.flags&&(L[0]=255&d,L[1]=d>>>8&255,r.check=i(r.check,L,2,0)),d=0,y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((S=r.length)>p&&(S=p),S&&(r.head&&(C=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,u,c,S,C)),512&r.flags&&(r.check=i(r.check,u,S,c)),p-=S,c+=S,r.length-=S),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break e;S=0;do{C=u[c+S++],r.head&&C&&r.length<65536&&(r.head.name+=String.fromCharCode(C))}while(C&&S<p);if(512&r.flags&&(r.check=i(r.check,u,S,c)),p-=S,c+=S,C)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===p)break e;S=0;do{C=u[c+S++],r.head&&C&&r.length<65536&&(r.head.comment+=String.fromCharCode(C))}while(C&&S<p);if(512&r.flags&&(r.check=i(r.check,u,S,c)),p-=S,c+=S,C)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;y<16;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}if(d!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}d=0,y=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}e.adler=r.check=l(d),d=0,y=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=f,e.avail_out=h,e.next_in=c,e.avail_in=p,r.hold=d,r.bits=y,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){d>>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}switch(r.last=1&d,y-=1,3&(d>>>=1)){case 0:r.mode=14;break;case 1:if(m(r),r.mode=20,6===t){d>>>=2,y-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}d>>>=2,y-=2;break;case 14:for(d>>>=7&y,y-=7&y;y<32;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}if((65535&d)!=(d>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&d,d=0,y=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(S=r.length){if(S>p&&(S=p),S>h&&(S=h),0===S)break e;n.arraySet(g,u,c,S,f),p-=S,c+=S,h-=S,f+=S,r.length-=S;break}r.mode=12;break;case 17:for(;y<14;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}if(r.nlen=257+(31&d),d>>>=5,y-=5,r.ndist=1+(31&d),d>>>=5,y-=5,r.ncode=4+(15&d),d>>>=4,y-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;y<3;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}r.lens[U[r.have++]]=7&d,d>>>=3,y-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},M=a(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,M){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;A=(x=r.lencode[d&(1<<r.lenbits)-1])>>>16&255,R=65535&x,!((T=x>>>24)<=y);){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}if(R<16)d>>>=T,y-=T,r.lens[r.have++]=R;else{if(16===R){for(N=T+2;y<N;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}if(d>>>=T,y-=T,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}C=r.lens[r.have-1],S=3+(3&d),d>>>=2,y-=2}else if(17===R){for(N=T+3;y<N;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}y-=T,C=0,S=3+(7&(d>>>=T)),d>>>=3,y-=3}else{for(N=T+7;y<N;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}y-=T,C=0,S=11+(127&(d>>>=T)),d>>>=7,y-=7}if(r.have+S>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;S--;)r.lens[r.have++]=C}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,P={bits:r.lenbits},M=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,M){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},M=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,M){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(p>=6&&h>=258){e.next_out=f,e.avail_out=h,e.next_in=c,e.avail_in=p,r.hold=d,r.bits=y,s(e,_),f=e.next_out,g=e.output,h=e.avail_out,c=e.next_in,u=e.input,p=e.avail_in,d=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;A=(x=r.lencode[d&(1<<r.lenbits)-1])>>>16&255,R=65535&x,!((T=x>>>24)<=y);){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}if(A&&0==(240&A)){for(O=T,j=A,I=R;A=(x=r.lencode[I+((d&(1<<O+j)-1)>>O)])>>>16&255,R=65535&x,!(O+(T=x>>>24)<=y);){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}d>>>=O,y-=O,r.back+=O}if(d>>>=T,y-=T,r.back+=T,r.length=R,0===A){r.mode=26;break}if(32&A){r.back=-1,r.mode=12;break}if(64&A){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&A,r.mode=22;case 22:if(r.extra){for(N=r.extra;y<N;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}r.length+=d&(1<<r.extra)-1,d>>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;A=(x=r.distcode[d&(1<<r.distbits)-1])>>>16&255,R=65535&x,!((T=x>>>24)<=y);){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}if(0==(240&A)){for(O=T,j=A,I=R;A=(x=r.distcode[I+((d&(1<<O+j)-1)>>O)])>>>16&255,R=65535&x,!(O+(T=x>>>24)<=y);){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}d>>>=O,y-=O,r.back+=O}if(d>>>=T,y-=T,r.back+=T,64&A){e.msg="invalid distance code",r.mode=30;break}r.offset=R,r.extra=15&A,r.mode=24;case 24:if(r.extra){for(N=r.extra;y<N;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}r.offset+=d&(1<<r.extra)-1,d>>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(S=_-h,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}S>r.wnext?(S-=r.wnext,w=r.wsize-S):w=r.wnext-S,S>r.length&&(S=r.length),E=r.window}else E=g,w=f-r.offset,S=r.length;S>h&&(S=h),h-=S,r.length-=S;do{g[f++]=E[w++]}while(--S);0===r.length&&(r.mode=21);break;case 26:if(0===h)break e;g[f++]=r.length,h--,r.mode=21;break;case 27:if(r.wrap){for(;y<32;){if(0===p)break e;p--,d|=u[c++]<<y,y+=8}if(_-=h,e.total_out+=_,r.total+=_,_&&(e.adler=r.check=r.flags?i(r.check,g,_,f-_):o(r.check,g,_,f-_)),_=h,(r.flags?d:l(d))!==r.check){e.msg="incorrect data check",r.mode=30;break}d=0,y=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;y<32;){if(0===p)break e;p--,d+=u[c++]<<y,y+=8}if(d!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}d=0,y=0}r.mode=29;case 29:M=1;break e;case 30:M=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=f,e.avail_out=h,e.next_in=c,e.avail_in=p,r.hold=d,r.bits=y,(r.wsize||_!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&b(e,e.output,e.next_out,_-e.avail_out)?(r.mode=31,-4):(v-=e.avail_in,_-=e.avail_out,e.total_in+=v,e.total_out+=_,r.total+=_,r.wrap&&_&&(e.adler=r.check=r.flags?i(r.check,g,_,e.next_out-_):o(r.check,g,_,e.next_out-_)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===v&&0===_||4===t)&&0===M&&(M=-5),M)},t.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?-2:(r.head=t,t.done=!1,0):-2},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?-2:11===r.mode&&o(1,t,n,0)!==r.check?-3:b(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,r){e.exports=function(e,t){var r,n,o,i,s,a,l,u,g,c,f,p,h,d,y,m,b,v,_,S,w,E,T,A,R;r=e.state,n=e.next_in,A=e.input,o=n+(e.avail_in-5),i=e.next_out,R=e.output,s=i-(t-e.avail_out),a=i+(e.avail_out-257),l=r.dmax,u=r.wsize,g=r.whave,c=r.wnext,f=r.window,p=r.hold,h=r.bits,d=r.lencode,y=r.distcode,m=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{h<15&&(p+=A[n++]<<h,h+=8,p+=A[n++]<<h,h+=8),v=d[p&m];t:for(;;){if(p>>>=_=v>>>24,h-=_,0==(_=v>>>16&255))R[i++]=65535&v;else{if(!(16&_)){if(0==(64&_)){v=d[(65535&v)+(p&(1<<_)-1)];continue t}if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}S=65535&v,(_&=15)&&(h<_&&(p+=A[n++]<<h,h+=8),S+=p&(1<<_)-1,p>>>=_,h-=_),h<15&&(p+=A[n++]<<h,h+=8,p+=A[n++]<<h,h+=8),v=y[p&b];r:for(;;){if(p>>>=_=v>>>24,h-=_,!(16&(_=v>>>16&255))){if(0==(64&_)){v=y[(65535&v)+(p&(1<<_)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(w=65535&v,h<(_&=15)&&(p+=A[n++]<<h,(h+=8)<_&&(p+=A[n++]<<h,h+=8)),(w+=p&(1<<_)-1)>l){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=_,h-=_,w>(_=i-s)){if((_=w-_)>g&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(E=0,T=f,0===c){if(E+=u-_,_<S){S-=_;do{R[i++]=f[E++]}while(--_);E=i-w,T=R}}else if(c<_){if(E+=u+c-_,(_-=c)<S){S-=_;do{R[i++]=f[E++]}while(--_);if(E=0,c<S){S-=_=c;do{R[i++]=f[E++]}while(--_);E=i-w,T=R}}}else if(E+=c-_,_<S){S-=_;do{R[i++]=f[E++]}while(--_);E=i-w,T=R}for(;S>2;)R[i++]=T[E++],R[i++]=T[E++],R[i++]=T[E++],S-=3;S&&(R[i++]=T[E++],S>1&&(R[i++]=T[E++]))}else{E=i-w;do{R[i++]=R[E++],R[i++]=R[E++],R[i++]=R[E++],S-=3}while(S>2);S&&(R[i++]=R[E++],S>1&&(R[i++]=R[E++]))}break}}break}}while(n<o&&i<a);n-=S=h>>3,p&=(1<<(h-=S<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=i<a?a-i+257:257-(i-a),r.hold=p,r.bits=h}},function(e,t,r){var n=r(33),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,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,29,29,64,64];e.exports=function(e,t,r,l,u,g,c,f){var p,h,d,y,m,b,v,_,S,w=f.bits,E=0,T=0,A=0,R=0,O=0,j=0,I=0,C=0,M=0,P=0,N=null,x=0,L=new n.Buf16(16),U=new n.Buf16(16),B=null,D=0;for(E=0;E<=15;E++)L[E]=0;for(T=0;T<l;T++)L[t[r+T]]++;for(O=w,R=15;R>=1&&0===L[R];R--);if(O>R&&(O=R),0===R)return u[g++]=20971520,u[g++]=20971520,f.bits=1,0;for(A=1;A<R&&0===L[A];A++);for(O<A&&(O=A),C=1,E=1;E<=15;E++)if(C<<=1,(C-=L[E])<0)return-1;if(C>0&&(0===e||1!==R))return-1;for(U[1]=0,E=1;E<15;E++)U[E+1]=U[E]+L[E];for(T=0;T<l;T++)0!==t[r+T]&&(c[U[t[r+T]]++]=T);if(0===e?(N=B=c,b=19):1===e?(N=o,x-=257,B=i,D-=257,b=256):(N=s,B=a,b=-1),P=0,T=0,E=A,m=g,j=O,I=0,d=-1,y=(M=1<<O)-1,1===e&&M>852||2===e&&M>592)return 1;for(;;){v=E-I,c[T]<b?(_=0,S=c[T]):c[T]>b?(_=B[D+c[T]],S=N[x+c[T]]):(_=96,S=0),p=1<<E-I,A=h=1<<j;do{u[m+(P>>I)+(h-=p)]=v<<24|_<<16|S|0}while(0!==h);for(p=1<<E-1;P&p;)p>>=1;if(0!==p?(P&=p-1,P+=p):P=0,T++,0==--L[E]){if(E===R)break;E=t[r+c[T]]}if(E>O&&(P&y)!==d){for(0===I&&(I=O),m+=A,C=1<<(j=E-I);j+I<R&&!((C-=L[j+I])<=0);)j++,C<<=1;if(M+=1<<j,1===e&&M>852||2===e&&M>592)return 1;u[d=P&y]=O<<24|j<<16|m-g|0}}return 0!==P&&(u[m+P]=E-I<<24|64<<16|0),f.bits=O,0}},function(e,t,r){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t){},function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=r(4).Buffer,s=r(180).inspect,a=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t;return(t=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var t,r,n,o=i.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=o,n=a,i.prototype.copy.call(t,r,n),a+=s.data.length,s=s.next;return o}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),0==(e-=i)){i===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=i.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,s),0==(e-=s)){s===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(s));break}++n}return this.length-=n,t}},{key:a,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}()},function(e,t){},function(e,t,r){(function(t){var n;function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=r(45),s=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),g=Symbol("lastPromise"),c=Symbol("handlePromise"),f=Symbol("stream");function p(e,t){return{value:e,done:t}}function h(e){var t=e[s];if(null!==t){var r=e[f].read();null!==r&&(e[g]=null,e[s]=null,e[a]=null,t(p(r,!1)))}}function d(e){t.nextTick(h,e)}var y=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((o(n={get stream(){return this[f]},next:function(){var e=this,r=this[l];if(null!==r)return Promise.reject(r);if(this[u])return Promise.resolve(p(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){t.nextTick((function(){e[l]?n(e[l]):r(p(void 0,!0))}))}));var n,o,i,s=this[g];if(s)n=new Promise((o=s,i=this,function(e,t){o.then((function(){i[u]?e(p(void 0,!0)):i[c](e,t)}),t)}));else{var a=this[f].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[c])}return this[g]=n,n}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,r=Object.create(m,(o(t={},f,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,a,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,u,{value:e._readableState.endEmitted,writable:!0}),o(t,c,{value:function(e,t){var n=r[f].read();n?(r[g]=null,r[s]=null,r[a]=null,e(p(n,!1))):(r[s]=e,r[a]=t)},writable:!0}),t));return r[g]=null,i(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[g]=null,r[s]=null,r[a]=null,t(e)),void(r[l]=e)}var n=r[s];null!==n&&(r[g]=null,r[s]=null,r[a]=null,n(p(void 0,!0))),r[u]=!0})),e.on("readable",d.bind(null,r)),r}}).call(this,r(2))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,r){e.exports=o;var n=r(80);function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}r(6)(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){var n,o=r(24).codes,i=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e,t,o,i){var a,l;a=i,l=!1,i=function(){l||(l=!0,a.apply(void 0,arguments))};var u=!1;e.on("close",(function(){u=!0})),void 0===n&&(n=r(45)),n(e,{readable:t,writable:o},(function(e){if(e)return i(e);u=!0,i()}));var g=!1;return function(t){if(!u&&!g)return g=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void i(t||new s("pipe"))}}function u(e){e()}function g(e,t){return e.pipe(t)}function c(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o=c(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new i("streams");var s=t.map((function(e,r){var i=r<t.length-1;return l(e,i,r>0,(function(e){n||(n=e),e&&s.forEach(u),i||(s.forEach(u),o(n))}))}));return t.reduce(g)}},function(e,t,r){var n=r(186)((function e(t,r){return(r=r||{}).namespace=t,r.prod=!0,r.dev=!1,r.force||e.force?e.yep(r):e.nope(r)}));e.exports=n},function(e,t){var r=[],n=[],o=function(){};function i(e){return!~r.indexOf(e)&&(r.push(e),!0)}function s(e){o=e}function a(e){for(var t=[],n=0;n<r.length;n++)if(r[n].async)t.push(r[n]);else if(r[n](e))return!0;return!!t.length&&new Promise((function(r){Promise.all(t.map((function(t){return t(e)}))).then((function(e){r(e.some(Boolean))}))}))}function l(e){return!~n.indexOf(e)&&(n.push(e),!0)}function u(){o.apply(o,arguments)}function g(e){for(var t=0;t<n.length;t++)e=n[t].apply(n[t],arguments);return e}function c(e,t){var r=Object.prototype.hasOwnProperty;for(var n in t)r.call(t,n)&&(e[n]=t[n]);return e}function f(e){return e.enabled=!1,e.modify=l,e.set=s,e.use=i,c((function(){return!1}),e)}function p(e){return e.enabled=!0,e.modify=l,e.set=s,e.use=i,c((function(){var t=Array.prototype.slice.call(arguments,0);return u.call(u,e,g(t,e)),!0}),e)}e.exports=function(e){return e.introduce=c,e.enabled=a,e.process=g,e.modify=l,e.write=u,e.nope=f,e.yep=p,e.set=s,e.use=i,e}},function(e,t,r){(function(t){var n=r(63),o=r(19).StringDecoder,i=r(29).Stream;function s(){}e.exports=function(e,r){var a=t.alloc(65536),l=new o("utf8"),u=new i,g="",c=0,f=0;return-1===e.start&&delete e.start,u.readable=!0,u.destroy=function(){u.destroyed=!0,u.emit("end"),u.emit("close")},n.open(e.file,"a+","0644",(function(t,o){if(t)return r?r(t):u.emit("error",t),void u.destroy();!function t(){if(!u.destroyed)return n.read(o,a,0,a.length,c,(function(n,o){if(n)return r?r(n):u.emit("error",n),void u.destroy();if(!o)return g&&((null==e.start||f>e.start)&&(r?r(null,g):u.emit("line",g)),f++,g=""),setTimeout(t,1e3);var i=l.write(a.slice(0,o));r||u.emit("data",i);for(var s=(i=(g+i).split(/\n+/)).length-1,p=0;p<s;p++)(null==e.start||f>e.start)&&(r?r(null,i[p]):u.emit("line",i[p])),f++;return g=i[s],c+=o,t()}));n.close(o,s)}()})),r?u.destroy:u}}).call(this,r(4).Buffer)},function(e,t,r){(function(t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=r(81),p=r(199),h=r(29).Stream,d=r(17);e.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(i,e);var r,o=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=c(e);if(t){var o=c(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return g(this,r)}}(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(this,i),(e=o.call(this,t)).options=t,e.name=t.name||"http",e.ssl=!!t.ssl,e.host=t.host||"localhost",e.port=t.port,e.auth=t.auth,e.path=t.path||"",e.agent=t.agent,e.headers=t.headers||{},e.headers["content-type"]="application/json",e.port||(e.port=e.ssl?443:80),e}return(r=[{key:"log",value:function(e,r){var n=this;this._request(e,(function(t,r){r&&200!==r.statusCode&&(t=new Error("Invalid HTTP Status Code: ".concat(r.statusCode))),t?n.emit("warn",t):n.emit("logged",e)})),r&&t(r)}},{key:"query",value:function(e,t){"function"==typeof e&&(t=e,e={}),(e={method:"query",params:this.normalizeQuery(e)}).params.path&&(e.path=e.params.path,delete e.params.path),e.params.auth&&(e.auth=e.params.auth,delete e.params.auth),this._request(e,(function(e,r,n){if(r&&200!==r.statusCode&&(e=new Error("Invalid HTTP Status Code: ".concat(r.statusCode))),e)return t(e);if("string"==typeof n)try{n=JSON.parse(n)}catch(o){return t(o)}t(null,n)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new h;(e={method:"stream",params:e}).params.path&&(e.path=e.params.path,delete e.params.path),e.params.auth&&(e.auth=e.params.auth,delete e.params.auth);var r="",n=this._request(e);return t.destroy=function(){return n.destroy()},n.on("data",(function(e){for(var n=(e=(r+e).split(/\n+/)).length-1,o=0;o<n;o++)try{t.emit("log",JSON.parse(e[o]))}catch(i){t.emit("error",i)}r=e[n]})),n.on("error",(function(e){return t.emit("error",e)})),t}},{key:"_request",value:function(e,t){var r=(e=e||{}).auth||this.auth,o=e.path||this.path||"";delete e.auth,delete e.path;var i=Object.assign({},this.headers);r&&r.bearer&&(i.Authorization="Bearer ".concat(r.bearer));var a=(this.ssl?p:f).request(s(s({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(o.replace(/^\//,"")),headers:i,auth:r&&r.username&&r.password?"".concat(r.username,":").concat(r.password):"",agent:this.agent}));a.on("error",t),a.on("response",(function(e){return e.on("end",(function(){return t(null,e)})).resume()})),a.end(n.from(JSON.stringify(e),"utf8"))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(i.prototype,r),i}(d)}).call(this,r(12).setImmediate,r(4).Buffer)},function(e,t,r){(function(t,n,o){var i=r(82),s=r(6),a=r(83),l=r(28),u=r(190),g=a.IncomingMessage,c=a.readyStates,f=e.exports=function(e){var r,n=this;l.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new t(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var o,s,a=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)a=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=(o=r,s=a,i.fetch&&s?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&o?"arraybuffer":i.vbArray&&o?"text:vbarray":"text"),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};s(f,l.Writable),f.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.prototype._onFinish=function(){var e=this;if(!e._destroyed){var r=e._opts,s=e._headers,a=null;"GET"!==r.method&&"HEAD"!==r.method&&(a=i.arraybuffer?u(t.concat(e._body)):i.blobConstructor?new n.Blob(e._body.map((function(e){return u(e)})),{type:(s["content-type"]||{}).value||""}):t.concat(e._body).toString());var l=[];if(Object.keys(s).forEach((function(e){var t=s[e].name,r=s[e].value;Array.isArray(r)?r.forEach((function(e){l.push([t,e])})):l.push([t,r])})),"fetch"===e._mode){var g=null;if(i.abortController){var f=new AbortController;g=f.signal,e._fetchAbortController=f,"requestTimeout"in r&&0!==r.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),r.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:l,body:a||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:g}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){n.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var p=e._xhr=new n.XMLHttpRequest;try{p.open(e._opts.method,e._opts.url,!0)}catch(h){return void o.nextTick((function(){e.emit("error",h)}))}"responseType"in p&&(p.responseType=e._mode.split(":")[0]),"withCredentials"in p&&(p.withCredentials=!!r.withCredentials),"text"===e._mode&&"overrideMimeType"in p&&p.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(p.timeout=r.requestTimeout,p.ontimeout=function(){e.emit("requestTimeout")}),l.forEach((function(e){p.setRequestHeader(e[0],e[1])})),e._response=null,p.onreadystatechange=function(){switch(p.readyState){case c.LOADING:case c.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(p.onprogress=function(){e._onXHRProgress()}),p.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{p.send(a)}catch(h){return void o.nextTick((function(){e.emit("error",h)}))}}}},f.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(r){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new g(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},f.prototype._write=function(e,t,r){this._body.push(e),r()},f.prototype.abort=f.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},f.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),l.Writable.prototype.end.call(this,e,t,r)},f.prototype.flushHeaders=function(){},f.prototype.setTimeout=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(4).Buffer,r(5),r(2))},function(e,t,r){var n=r(4).Buffer;e.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,o=0;o<r;o++)t[o]=e[o];return t.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)r.call(n,o)&&(e[o]=n[o])}return e};var r=Object.prototype.hasOwnProperty},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,r){(function(e,n){var o;!function(i){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,l=2147483647,u=/^xn--/,g=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,h=String.fromCharCode;function d(e){throw new RangeError(f[e])}function y(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function m(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+y((e=e.replace(c,".")).split("."),t).join(".")}function b(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function v(e){return y(e,(function(e){var t="";return e>65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+h(e)})).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function S(e,t,r){var n=0;for(e=r?p(e/700):e>>1,e+=p(e/t);e>455;n+=36)e=p(e/35);return p(n+36*e/(e+38))}function w(e){var t,r,n,o,i,s,a,u,g,c,f,h=[],y=e.length,m=0,b=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&d("not-basic"),h.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<y;){for(i=m,s=1,a=36;o>=y&&d("invalid-input"),((u=(f=e.charCodeAt(o++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||u>p((l-m)/s))&&d("overflow"),m+=u*s,!(u<(g=a<=_?1:a>=_+26?26:a-_));a+=36)s>p(l/(c=36-g))&&d("overflow"),s*=c;_=S(m-i,t=h.length+1,0==i),p(m/t)>l-b&&d("overflow"),b+=p(m/t),m%=t,h.splice(m++,0,b)}return v(h)}function E(e){var t,r,n,o,i,s,a,u,g,c,f,y,m,v,w,E=[];for(y=(e=b(e)).length,t=128,r=0,i=72,s=0;s<y;++s)(f=e[s])<128&&E.push(h(f));for(n=o=E.length,o&&E.push("-");n<y;){for(a=l,s=0;s<y;++s)(f=e[s])>=t&&f<a&&(a=f);for(a-t>p((l-r)/(m=n+1))&&d("overflow"),r+=(a-t)*m,t=a,s=0;s<y;++s)if((f=e[s])<t&&++r>l&&d("overflow"),f==t){for(u=r,g=36;!(u<(c=g<=i?1:g>=i+26?26:g-i));g+=36)w=u-c,v=36-c,E.push(h(_(c+w%v,0))),u=p(w/v);E.push(h(_(u,0))),i=S(r,m,n==o),r=0,++n}++r,++t}return E.join("")}a={version:"1.4.1",ucs2:{decode:b,encode:v},decode:w,encode:E,toASCII:function(e){return m(e,(function(e){return g.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return m(e,(function(e){return u.test(e)?w(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return a}.call(t,r,t,e))||(e.exports=o)}()}).call(this,r(194)(e),r(5))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){t.decode=t.parse=r(197),t.encode=t.stringify=r(198)},function(e,t,r){function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var l=1e3;i&&"number"==typeof i.maxKeys&&(l=i.maxKeys);var u=e.length;l>0&&u>l&&(u=l);for(var g=0;g<u;++g){var c,f,p,h,d=e[g].replace(a,"%20"),y=d.indexOf(r);y>=0?(c=d.substr(0,y),f=d.substr(y+1)):(c=d,f=""),p=decodeURIComponent(c),h=decodeURIComponent(f),n(s,p)?o(s[p])?s[p].push(h):s[p]=[s[p],h]:s[p]=h}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(s(e),(function(s){var a=encodeURIComponent(n(s))+r;return o(e[s])?i(e[s],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[s]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var s=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},function(e,t,r){var n=r(81),o=r(46),i=e.exports;for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);function a(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,t){return e=a(e),n.request.call(this,e,t)},i.get=function(e,t){return e=a(e),n.get.call(this,e,t)}},function(e,t,r){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=r(84),u=r(3).MESSAGE,g=r(15),c=r(17);e.exports=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(c,e);var r,n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}(c);function c(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,c),e=n.call(this,t),!t.stream||!l(t.stream))throw new Error("options.stream is required.");return e._stream=t.stream,e._stream.setMaxListeners(1/0),e.isObjectMode=t.stream._writableState.objectMode,e.eol=t.eol||g.EOL,e}return(r=[{key:"log",value:function(e,r){var n=this;if(t((function(){return n.emit("logged",e)})),this.isObjectMode)return this._stream.write(e),void(r&&r());this._stream.write("".concat(e[u]).concat(this.eol)),r&&r()}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(c.prototype,r),c}(c)}).call(this,r(12).setImmediate)},function(e,t,r){(function(t){function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l=r(29),u=l.Stream,g=l.Transform,c=r(48),f=r(3),p=f.LEVEL,h=f.SPLAT,d=r(84),y=r(86),m=r(90),b=r(205),v=r(206),_=r(59).warn,S=r(47),w=/%[scdjifoO%]/g,E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(f,e);var l,g=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=g.call(this,{objectMode:!0})).configure(e),t}return(l=[{key:"child",value:function(e){var t=this;return Object.create(t,{write:{value:function(r){var n=Object.assign({},e,r);r instanceof Error&&(n.stack=r.stack,n.message=r.message),t.write(n)}}})}},{key:"configure",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.silent,o=t.format,i=t.defaultMeta,s=t.levels,a=t.level,l=void 0===a?"info":a,u=t.exitOnError,g=void 0===u||u,c=t.transports,f=t.colors,p=t.emitErrs,h=t.formatters,d=t.padLevels,b=t.rewriters,v=t.stripColors,_=t.exceptionHandlers,w=t.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=n,this.format=o||this.format||r(207)(),this.defaultMeta=i||null,this.levels=s||this.levels||S.npm.levels,this.level=l,this.exceptions=new y(this),this.rejections=new m(this),this.profilers={},this.exitOnError=g,c&&(c=Array.isArray(c)?c:[c]).forEach((function(t){return e.add(t)})),f||p||h||d||b||v)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"));_&&this.exceptions.handle(_),w&&this.rejections.handle(w)}},{key:"isLevelEnabled",value:function(e){var t=this,r=T(this.levels,e);if(null===r)return!1;var n=T(this.levels,this.level);return null!==n&&(this.transports&&0!==this.transports.length?-1!==this.transports.findIndex((function(e){var o=T(t.levels,e.level);return null===o&&(o=n),o>=r})):n>=r)}},{key:"log",value:function(e,t){for(var r,i,s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];if(1===arguments.length)return e[p]=e.level,this._addDefaultMeta(e),this.write(e),this;if(2===arguments.length)return t&&"object"===o(t)?(t[p]=t.level=e,this._addDefaultMeta(t),this.write(t),this):(this.write((n(i={},p,e),n(i,"level",e),n(i,"message",t),i)),this);var u=a[0];if("object"===o(u)&&null!==u){var g=t&&t.match&&t.match(w);if(!g){var c,f=Object.assign({},this.defaultMeta,u,(n(c={},p,e),n(c,h,a),n(c,"level",e),n(c,"message",t),c));return u.message&&(f.message="".concat(f.message," ").concat(u.message)),u.stack&&(f.stack=u.stack),this.write(f),this}}return this.write(Object.assign({},this.defaultMeta,(n(r={},p,e),n(r,h,a),n(r,"level",e),n(r,"message",t),r))),this}},{key:"_transform",value:function(e,t,r){if(this.silent)return r();e[p]||(e[p]=e.level),this.levels[e[p]]||0===this.levels[e[p]]||console.error("[winston] Unknown logger level: %s",e[p]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports %j",e);try{this.push(this.format.transform(e,this.format.options))}catch(n){throw n}finally{r()}}},{key:"_final",value:function(e){var r=this.transports.slice();c(r,(function(e,r){if(!e||e.finished)return t(r);e.once("finish",r),e.end()}),e)}},{key:"add",value:function(e){var t=!d(e)||e.log.length>2?new b({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}},{key:"remove",value:function(e){if(!e)return this;var t=e;return(!d(e)||e.log.length>2)&&(t=this.transports.filter((function(t){return t.transport===e}))[0]),t&&this.unpipe(t),this}},{key:"clear",value:function(){return this.unpipe(),this}},{key:"close",value:function(){return this.clear(),this.emit("close"),this}},{key:"setLevels",value:function(){_.deprecated("setLevels")}},{key:"query",value:function(e,t){"function"==typeof e&&(t=e,e={}),e=e||{};var r={},n=Object.assign({},e.query||{});c(this.transports.filter((function(e){return!!e.query})),(function(t,o){var i,s;i=t,s=function(e,n){o&&((n=e||n)&&(r[t.name]=n),o()),o=null},e.query&&"function"==typeof i.formatQuery&&(e.query=i.formatQuery(n)),i.query(e,(function(t,r){if(t)return s(t);"function"==typeof i.formatResults&&(r=i.formatResults(r,e.format)),s(null,r)}))}),(function(){return t(null,r)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new u,r=[];return t._streams=r,t.destroy=function(){for(var e=r.length;e--;)r[e].destroy()},this.transports.filter((function(e){return!!e.stream})).forEach((function(n){var o=n.stream(e);o&&(r.push(o),o.on("log",(function(e){e.transport=e.transport||[],e.transport.push(n.name),t.emit("log",e)})),o.on("error",(function(e){e.transport=e.transport||[],e.transport.push(n.name),t.emit("error",e)})))})),t}},{key:"startTimer",value:function(){return new v(this)}},{key:"profile",value:function(e){var t=Date.now();if(this.profilers[e]){var r=this.profilers[e];delete this.profilers[e];for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];"function"==typeof i[i.length-2]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),i.pop());var a="object"===o(i[i.length-1])?i.pop():{};return a.level=a.level||"info",a.durationMs=t-r,a.message=a.message||e,this.write(a)}return this.profilers[e]=t,this}},{key:"handleExceptions",value:function(){var e;console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),(e=this.exceptions).handle.apply(e,arguments)}},{key:"unhandleExceptions",value:function(){var e;console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),(e=this.exceptions).unhandle.apply(e,arguments)}},{key:"cli",value:function(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"))}},{key:"_onEvent",value:function(e,t){t["__winston"+e]||(t["__winston"+e]=function(r){"error"!==e||this.transports.includes(t)||this.add(t),this.emit(e,r,t)}.bind(this),t.on(e,t["__winston"+e]))}},{key:"_addDefaultMeta",value:function(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(f.prototype,l),f}(g);function T(e,t){var r=e[t];return r||0===r?r:null}Object.defineProperty(E.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var e=this._readableState.pipes;return Array.isArray(e)?e:[e].filter(Boolean)}}),e.exports=E}).call(this,r(12).setImmediate)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=g(r(41)),o=g(r(42)),i=g(r(64)),s=g(r(65)),a=g(r(66)),l=g(r(23)),u=g(r(27));function g(e){return e&&e.__esModule?e:{default:e}}function c(e,t,r){r=(0,s.default)(r);var n=0,i=0,{length:l}=e,u=!1;function g(e,t){!1===e&&(u=!0),!0!==u&&(e?r(e):++i!==l&&t!==o.default||r(null))}for(0===l&&r(null);n<l;n++)t(e[n],n,(0,a.default)(g))}function f(e,t,r){return(0,i.default)(e,1/0,t,r)}t.default=(0,u.default)((function(e,t,r){return((0,n.default)(e)?c:f)(e,(0,l.default)(t),r)}),3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(t,r,n)=>e(t,n)},e.exports=t.default},function(e,t,r){var n=Object.prototype.toString;e.exports=function(e){if("string"==typeof e.displayName&&e.constructor.name)return e.displayName;if("string"==typeof e.name&&e.name)return e.name;if("object"==typeof e&&e.constructor&&"string"==typeof e.constructor.name)return e.constructor.name;var t=e.toString(),r=n.call(e).slice(8,-1);return(t="Function"===r?t.substring(t.indexOf("(")+1,t.indexOf(")")):r)||"anonymous"}},function(e,t,r){const n=r(10),{LEVEL:o}=r(3),i=r(17),s=e.exports=function(e={}){if(i.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};n.inherits(s,i),s.prototype._write=function(e,t,r){if(this.silent||!0===e.exception&&!this.handleExceptions)return r(null);(!this.level||this.levels[this.level]>=this.levels[e[o]])&&this.transport.log(e[o],e.message,e,this._nop),r(null)},s.prototype._writev=function(e,t){for(let r=0;r<e.length;r++)this._accept(e[r])&&(this.transport.log(e[r].chunk[o],e[r].chunk.message,e[r].chunk,this._nop),e[r].callback());return t(null)},s.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},s.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required for profiling.");this.logger=t,this.start=Date.now()}var t;return(t=[{key:"done",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];"function"==typeof t[t.length-1]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),t.pop());var o="object"===n(t[t.length-1])?t.pop():{};return o.level=o.level||"info",o.durationMs=Date.now()-this.start,this.logger.write(o)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}()},function(e,t,r){(function(t){const n=r(208),{MESSAGE:o}=r(3),i=r(31);function s(e,r){return r instanceof t?r.toString("base64"):"bigint"==typeof r?r.toString():r}e.exports=n(((e,t={})=>(e[o]=(t.stable?i.stableStringify:i)(e,t.replacer||s,t.space),e)))}).call(this,r(4).Buffer)},function(e,t,r){class n extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${e.toString().split("\n")[0]}\n`),Error.captureStackTrace(this,n)}}e.exports=e=>{if(e.length>2)throw new n(e);function t(e={}){this.options=e}function r(e){return new t(e)}return t.prototype.transform=e,r.Format=t,r}},function(e,t,r){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=r(85);e.exports=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this.loggers=new Map,this.options=t}var t;return(t=[{key:"add",value:function(e,t){var r=this;if(!this.loggers.has(e)){var n=(t=Object.assign({},t||this.options)).transports||this.options.transports;t.transports=n?n.slice():[];var i=o(t);i.on("close",(function(){return r._delete(e)})),this.loggers.set(e,i)}return this.loggers.get(e)}},{key:"get",value:function(e,t){return this.add(e,t)}},{key:"has",value:function(e){return!!this.loggers.has(e)}},{key:"close",value:function(e){var t=this;if(e)return this._removeLogger(e);this.loggers.forEach((function(e,r){return t._removeLogger(r)}))}},{key:"_removeLogger",value:function(e){this.loggers.has(e)&&(this.loggers.get(e).close(),this._delete(e))}},{key:"_delete",value:function(e){this.loggers.delete(e)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}()},function(e,t,r){(function(t){const n=r(49),o=/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/;e.exports=function(e,i,s){let a,l,u=!1,g=!1;function c(e,t){let r=`"${i}" ${t}`;throw e&&(r=`${r}, but is set to "${e}"`),l&&(r=`${r}. An example of a valid value would be: ${l}`),new n(r)}function f(r){return function(){let n=e[i];if(void 0===n)if(void 0===a&&g)c(void 0,"is a required variable, but it was not set");else{if(void 0===a)return;n=a}g&&0===n.trim().length&&c(void 0,"is a required variable, but its value was empty"),u&&(n.match(o)||c(n,"should be a valid base64 string if using convertFromBase64"),n=t.from(n,"base64").toString());const s=[n].concat(Array.prototype.slice.call(arguments));try{return r.apply(r,s)}catch(l){c(n,l.message)}}}const p={asArray:f(r(211)),asBoolStrict:f(r(212)),asBool:f(r(213)),asPortNumber:f(r(214)),asEnum:f(r(215)),asFloatNegative:f(r(216)),asFloatPositive:f(r(217)),asFloat:f(r(51)),asIntNegative:f(r(218)),asIntPositive:f(r(91)),asInt:f(r(50)),asJsonArray:f(r(219)),asJsonObject:f(r(220)),asJson:f(r(52)),asString:f(r(35)),asUrlObject:f(r(92)),asUrlString:f(r(221)),convertFromBase64:function(){return u=!0,p},default:function(e){if("number"==typeof e)a=e.toString();else if(Array.isArray(e)||"object"==typeof e&&null!==e)a=JSON.stringify(e);else{if("string"!=typeof e)throw new n("values passed to default() must be of Number, String, Array, or Object type");a=e}return p},required:function(e){return g=void 0===e||e,p},example:function(e){return l=e,p}};return Object.entries(s).forEach((([e,t])=>{p[e]=f(t)})),p}}).call(this,r(4).Buffer)},function(e,t,r){const n=r(35);e.exports=function(e,t){return t=t||",",e.length?n(e).split(t).filter(Boolean):[]}},function(e,t,r){e.exports=function(e){const t=e.toLowerCase();if("false"!==t&&"true"!==t)throw new Error('should be either "true", "false", "TRUE", or "FALSE"');return"false"!==t}},function(e,t,r){e.exports=function(e){const t=e.toLowerCase();if(-1===["false","0","true","1"].indexOf(t))throw new Error('should be either "true", "false", "TRUE", "FALSE", 1, or 0');return!("0"===t||"false"===t)}},function(e,t,r){const n=r(91);e.exports=function(e){var t=n(e);if(t>65535)throw new Error("cannot assign a port number greater than 65535");return t}},function(e,t,r){const n=r(35);e.exports=function(e,t){const r=n(e);if(t.indexOf(r)<0)throw new Error(`should be one of [${t.join(", ")}]`);return r}},function(e,t,r){const n=r(51);e.exports=function(e){const t=n(e);if(t>0)throw new Error("should be a negative float");return t}},function(e,t,r){const n=r(51);e.exports=function(e){const t=n(e);if(t<0)throw new Error("should be a positive float");return t}},function(e,t,r){const n=r(50);e.exports=function(e){const t=n(e);if(t>0)throw new Error("should be a negative integer");return t}},function(e,t,r){const n=r(52);e.exports=function(e){var t=n(e);if(!Array.isArray(t))throw new Error("should be a parseable JSON Array");return t}},function(e,t,r){const n=r(52);e.exports=function(e){var t=n(e);if(Array.isArray(t))throw new Error("should be a parseable JSON Object");return t}},function(e,t,r){const n=r(92);e.exports=function(e){return n(e).toString()}},function(e,t,r){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,o=arguments.length;r<o;r++)t.push(arguments[r]);return t}function o(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function i(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,r,n){if(!(this instanceof s))return new s(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=s,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,o=this.head;null!==o;)r.push(e.call(t,o.value,this)),o=o.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,o=this.tail;null!==o;)r.push(e.call(t,o.value,this)),o=o.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var o=0;null!==n;o++)r=e(r,n.value,o),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var o=this.length-1;null!==n;o--)r=e(r,n.value,o),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)r.push(i.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)r.push(i.value);return r},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(223)(n)}catch(a){}},function(e,t,r){e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},function(e,t,r){(function(t){(function(){var r,n,o,i,s,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(r()-s)/1e6},n=t.hrtime,i=(r=function(){var e;return 1e9*(e=n())[0]+e[1]})(),a=1e9*t.uptime(),s=i-a):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,r(2))},function(e,t,r){var n,o,i=r(96),s=r(97),a=0,l=0;e.exports=function(e,t,r){var u=t&&r||0,g=t||[],c=(e=e||{}).node||n,f=void 0!==e.clockseq?e.clockseq:o;if(null==c||null==f){var p=i();null==c&&(c=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),d=void 0!==e.nsecs?e.nsecs:l+1,y=h-a+(d-l)/1e4;if(y<0&&void 0===e.clockseq&&(f=f+1&16383),(y<0||h>a)&&void 0===e.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=h,l=d,o=f;var m=(1e4*(268435455&(h+=122192928e5))+d)%4294967296;g[u++]=m>>>24&255,g[u++]=m>>>16&255,g[u++]=m>>>8&255,g[u++]=255&m;var b=h/4294967296*1e4&268435455;g[u++]=b>>>8&255,g[u++]=255&b,g[u++]=b>>>24&15|16,g[u++]=b>>>16&255,g[u++]=f>>>8|128,g[u++]=255&f;for(var v=0;v<6;++v)g[u+v]=c[v];return t||s(g)}},function(e,t,r){var n=r(96),o=r(97);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[i+a]=s[a];return t||o(s)}},function(e,t,r){(function(e){!function(e){function t(e){if("utf-8"!==(e=void 0===e?"utf-8":e))throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+e+"') is invalid.")}function r(e,t){if(t=void 0===t?{fatal:!1}:t,"utf-8"!==(e=void 0===e?"utf-8":e))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+e+"') is invalid.");if(t.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(e.TextEncoder&&e.TextDecoder)return!1;Object.defineProperty(t.prototype,"encoding",{value:"utf-8"}),t.prototype.encode=function(e,t){if((t=void 0===t?{stream:!1}:t).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");t=0;for(var r=e.length,n=0,o=Math.max(32,r+(r>>1)+7),i=new Uint8Array(o>>3<<3);t<r;){var s=e.charCodeAt(t++);if(55296<=s&&56319>=s){if(t<r){var a=e.charCodeAt(t);56320==(64512&a)&&(++t,s=((1023&s)<<10)+(1023&a)+65536)}if(55296<=s&&56319>=s)continue}if(n+4>i.length&&(o+=8,o=(o*=1+t/e.length*2)>>3<<3,(a=new Uint8Array(o)).set(i),i=a),0==(4294967168&s))i[n++]=s;else{if(0==(4294965248&s))i[n++]=s>>6&31|192;else if(0==(4294901760&s))i[n++]=s>>12&15|224,i[n++]=s>>6&63|128;else{if(0!=(4292870144&s))continue;i[n++]=s>>18&7|240,i[n++]=s>>12&63|128,i[n++]=s>>6&63|128}i[n++]=63&s|128}}return i.slice(0,n)},Object.defineProperty(r.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(r.prototype,"fatal",{value:!1}),Object.defineProperty(r.prototype,"ignoreBOM",{value:!1}),r.prototype.decode=function(e,t){if((t=void 0===t?{stream:!1}:t).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");t=0;for(var r=(e=new Uint8Array(e)).length,n=[];t<r;){var o=e[t++];if(0===o)break;if(0==(128&o))n.push(o);else if(192==(224&o)){var i=63&e[t++];n.push((31&o)<<6|i)}else if(224==(240&o)){i=63&e[t++];var s=63&e[t++];n.push((31&o)<<12|i<<6|s)}else 240==(248&o)&&(65535<(o=(7&o)<<18|(i=63&e[t++])<<12|(s=63&e[t++])<<6|63&e[t++])&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o))}return String.fromCharCode.apply(null,n)},e.TextEncoder=t,e.TextDecoder=r}("undefined"!=typeof window?window:void 0!==e?e:this)}).call(this,r(5))},function(e,t,r){r.r(t),r.d(t,"AuthClient",(function(){return i})),r.d(t,"RtcSignalingClient",(function(){return a})),r.d(t,"Credentials",(function(){return h})),r.d(t,"SignalingPromiseClient",(function(){return d.SignalingPromiseClient})),r.d(t,"IRtcClientConfiguration",(function(){})),r.d(t,"IRtcConnectConfiguration",(function(){})),r.d(t,"IRtcConnectionStatsInfo",(function(){})),r.d(t,"IRtcSendConfiguration",(function(){})),r.d(t,"IRtcSessionMetricsMessageCounts",(function(){})),r.d(t,"IRtcStreamMessage",(function(){})),r.d(t,"IStreamControl",(function(){})),r.d(t,"RtcClient",(function(){return z}));var n=r(26),o=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class i extends n.a{adminSignup(e,t){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/admin-signup",{token:t,method:"POST",body:JSON.stringify(e)})}))}login(e){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/login",{method:"POST",body:JSON.stringify(e),allowUnsafeRetries:!0})}))}loginWithGoogleToken(e){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/login-google",{method:"POST",body:JSON.stringify(e),allowUnsafeRetries:!0})}))}refresh(e,t){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/refresh",{method:"POST",body:JSON.stringify({refreshToken:e,tokenExpirationSeconds:t}),allowUnsafeRetries:!0})}))}respondToNewPasswordRequiredChallenge(e){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/respond-to-new-password-required-challenge",{method:"POST",body:JSON.stringify(e)})}))}forgotPassword(e){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/forgot-password",{method:"POST",body:JSON.stringify({email:e})})}))}confirmForgotPassword(e){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/confirm-forgot-password",{method:"POST",body:JSON.stringify(e)})}))}resendInvitation(e){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/resend-invitation",{method:"POST",body:JSON.stringify({email:e})})}))}changePassword({token:e,refreshToken:t,currentPassword:r,newPassword:n}){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/change-password",{token:e,method:"POST",body:JSON.stringify({refreshToken:t,currentPassword:r,newPassword:n})})}))}getDeviceCredentials(e){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/device-credentials",{token:e,method:"POST",allowUnsafeRetries:!0})}))}impersonate(e,t){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/impersonate",{token:e,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({userId:t})})}))}createServiceAccount(e,t,r){return o(this,void 0,void 0,(function*(){return yield this.fetch("auth/service-account",{token:e,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({name:t,roleId:r})})}))}getFeatures(e){return o(this,void 0,void 0,(function*(){return(yield this.fetch("auth/features",{token:e})).features}))}}var s=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class a extends n.a{createPeer(e,t){return s(this,void 0,void 0,(function*(){return yield this.fetch("peers",{token:e,method:"POST",body:JSON.stringify(t)})}))}getPeers(e){return s(this,void 0,void 0,(function*(){return(yield this.fetch("peers",{token:e})).items}))}refreshPeer(e,t){return s(this,void 0,void 0,(function*(){yield this.fetch(`peers/${t}/refresh`,{token:e,method:"POST",allowUnsafeRetries:!0})}))}createSession(e,t){return s(this,void 0,void 0,(function*(){return yield this.fetch("sessions",{token:e,method:"POST",body:JSON.stringify(t)})}))}refreshSession(e,t){return s(this,void 0,void 0,(function*(){yield this.fetch(`sessions/${t}/refresh`,{token:e,method:"POST",allowUnsafeRetries:!0})}))}deleteSession(e,t){return s(this,void 0,void 0,(function*(){yield this.fetch(`sessions/${t}`,{token:e,method:"DELETE",allowUnsafeRetries:!0})}))}getSessions(e){return s(this,void 0,void 0,(function*(){return(yield this.fetch("sessions",{token:e})).items}))}getIceServers(e){return s(this,void 0,void 0,(function*(){return(yield this.fetch("ice-servers",{token:e})).items}))}addSignals(e,t,r){return s(this,void 0,void 0,(function*(){yield this.fetch(`sessions/${t}/add-signals`,{token:e,method:"POST",body:JSON.stringify(r)})}))}takeSignals(e,t){return s(this,void 0,void 0,(function*(){return(yield this.fetch(`sessions/${t}/take-signals`,{token:e,method:"POST"})).items}))}}var l=r(1),u=r(11),g=r(21),c=r(102);class f extends class{constructor(e={}){this.cache=new c(e),this.stringify=e.fastStringify?JSON.stringify:g}set(e,t,r){if(!this.cache.set(this.stringify(e),t,r))throw Error(`Value too large (${this.cache.lengthCalculator(t)} > ${this.cache.max})`)}get(e){return this.cache.get(this.stringify(e))}del(e){this.cache.del(this.stringify(e))}length(){return this.cache.length}reset(){this.cache.reset()}prune(){return this.cache.prune()}forEach(e){return this.cache.forEach(e)}}{constructor(e={}){if(super(e),this.expireRejectedPromiseValues=void 0===e.expireRejectedPromiseValues||e.expireRejectedPromiseValues,this.rejectedPromiseValueTtl=void 0!==e.rejectedPromiseValueTtl?e.rejectedPromiseValueTtl:l.a.second,this.rejectedPromiseValueTtl<0)throw new Error("rejectedPromiseValueTtl must not be negative")}set(e,t,r){const n=this.stringify(e);this.cache.set(n,t,r),this.expireRejectedPromiseValues&&Promise.resolve(t).catch((()=>function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){yield Object(u.a)(this.rejectedPromiseValueTtl),this.cache.peek(n)===t&&this.cache.del(n)}))))}}var p=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class h{constructor(e,t,r){this.authClient=e,this.email=t,this.password=r,this.tokenTtlMs=1*l.a.hour,this.tokenCache=new f({max:100,maxAge:this.tokenTtlMs-5*l.a.minute,fastStringify:!0})}getToken(){return p(this,void 0,void 0,(function*(){let e=this.tokenCache.get(this.email);return e||(e=(()=>p(this,void 0,void 0,(function*(){const{authentication:e}=yield this.authClient.login({email:this.email,password:this.password,tokenExpirationSeconds:this.tokenTtlMs/l.a.second});if(!e)throw new Error("User account not verified.");return e.accessToken})))(),this.tokenCache.set(this.email,e)),e}))}}var d=r(93);function y(e){return function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){return(yield Promise.all(e.map((e=>e.catch((e=>e)))))).filter((e=>e instanceof Error))}))}function m(e){if(void 0!==e)return e;throw new Error("Value is undefined")}var b=r(0),v=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function _({func:e,delay:t,immediate:r}){let n=!1,o=setTimeout((function r(){return v(this,void 0,void 0,(function*(){if(n)return;const s=(new Date).getTime();try{i=e(),yield i}finally{if(!n){const e=(new Date).getTime();o=setTimeout(r,Math.max(t-(e-s),0))}}}))}),r?0:t),i=Promise.resolve();return{stop(){return v(this,void 0,void 0,(function*(){n=!0,clearTimeout(o),yield i}))}}}function S(e,t){return Object.keys(e).reduce(((r,n)=>Object.assign(Object.assign({},r),{[n]:t(e[n])})),{})}var w=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const E=r(224),T=!!r(7).c,A=new class{constructor(e=60){this.buffer={},this.metrics={},this.reporters=[],this.flushInterval=_({func:()=>this.flushStats(),delay:e*l.a.second})}shutdown(){return w(this,void 0,void 0,(function*(){yield this.flushInterval.stop(),yield this.flushStats(),yield Object(u.a)(2*l.a.second)}))}aggregate(e,t){if(this.buffer[e]){const{min:r,max:n,sum:o,count:i}=this.buffer[e];this.buffer[e]={min:Math.min(r,t),max:Math.max(n,t),sum:o+t,count:i+1}}else this.buffer[e]={min:t,max:t,sum:t,count:1}}increment(e){this.aggregate(e,1)}timer(e,t){return w(this,void 0,void 0,(function*(){const r=E(),n=yield t(),o=E();return this.aggregate(e,o-r),n}))}metric(e,t){this.metrics[e]=t}registerStatsReporter(e){this.reporters.push(e)}write(e){return w(this,void 0,void 0,(function*(){if(0===Object.values(e).length)return;const t=yield y(this.reporters.map((t=>t.send(e))));for(const e of t)b.a.warn("Failed to write stats",{error:e})}))}flushStats(){return w(this,void 0,void 0,(function*(){const e=Object.assign(Object.assign({},this.buffer),S(this.metrics,(e=>{const t=e();return{min:t,max:t,sum:t,count:1}})));Object.keys(e).length>0&&(yield this.write(e),this.buffer={})}))}};T||A.registerStatsReporter(new class{constructor(e){this.message=e}send(e){return function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){b.a.info(this.message,S(e,(e=>{const{sum:t,count:r}=e,n=t/r;return Object.assign(Object.assign({},e),{average:n})})))}))}}("stats"));var R=r(8),O=r(22),j=r(103),I=r(36);class C extends I.a{constructor(e){super(e)}postLanRtcOffer(e){return function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){return yield this.fetch("v1/lan-rtc-offer",{method:"POST",body:JSON.stringify(e)})}))}}var M=r(55);const P={ordered:!1,maxPacketLifeTime:300*l.a.millisecond},N={ordered:!0},x={ordered:!0},L={ordered:!1,maxRetransmits:0},U={ordered:!1,maxRetransmits:0};function B({entityId:e,streamName:t,streamType:r}){return`${e}.${t}.${r}`}class D{constructor(e,t){this.sessionId=e,this.connection=t,this.counts={localSent:new Map,localReceived:new Map,remoteSent:new Map,remoteReceived:new Map},this.sessionId=e,this.connection=t}updateRemoteMessagesCounts(e){if(e.payload.streamsInfo){this.counts.remoteSent=new Map,this.counts.remoteReceived=new Map;for(const t of e.payload.streamsInfo.items)this.counts.remoteSent.set(t.streamId,t.sentCount),this.counts.remoteReceived.set(t.streamId,t.receivedCount)}}getLocalStreamsInfo(e){const{localSent:t,localReceived:r}=this.counts;return{items:[...new Set([...t.keys(),...r.keys()])].map((e=>{var n,o;return{streamId:e,sentCount:null!==(n=t.get(e))&&void 0!==n?n:0,receivedCount:null!==(o=r.get(e))&&void 0!==o?o:0}})),timestamp:e}}incrementLocalSent(e){const{localSent:t}=this.counts,r=B(e.header.stream);t.set(r,(t.get(r)||0)+1)}incrementLocalReceived(e){const{localReceived:t}=this.counts,r=B(e.header.stream),n=t.get(r)||0;if(0===n){const{streamName:t,streamType:r}=e.header.stream;b.a.debug("RTC client received first message for stream",{streamName:t,streamType:r})}t.set(r,n+1)}uploadMetrics(){return e=this,t=void 0,n=function*(){const{sessionId:e}=this,t=yield this.connection.peerConnection.getStats(),r={};t.forEach((e=>r[e.id]=e)),b.a.debug("rtc-stats",Object.assign(Object.assign({},r),{sessionId:e}));const{localSent:n,localReceived:o,remoteSent:i,remoteReceived:s}=this.counts,a=[...new Set([...n.keys(),...o.keys()])].reduce(((e,t)=>{const r=n.get(t),a=o.get(t),l=i.get(t),u=s.get(t);return Object.assign(Object.assign({},e),{[`local-${t}-sent`]:r,[`local-${t}-received`]:a,[`remote-${t}-sent`]:l,[`remote-${t}-received`]:u})}),{sessionId:e});b.a.debug("rtc-message-report",Object.assign({deviceId:this.connection.getRemoteDeviceId()},a))},new((r=void 0)||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,r,n}}function k(e){return new Set(["disconnected","failed","closed"]).has(e.iceConnectionState)}var F=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class W{constructor(e,t,r){this.peerConnection=e,this.config=t,this.dataChannelNotifier=r,this.connectTimeoutMs=20*l.a.second,this.iceGatheringTimeoutMs=15*l.a.second,this.pingUpdateTimeoutMs=1*l.a.second,this.streamsInfoUpdateTimeoutMs=2*l.a.second,this.reassemblyTimeoutMs=500*l.a.millisecond,this.reassemblyTableCleanupMs=1*l.a.second,this.heartbeatTimeoutMs=20*l.a.millisecond,this.streamLatestTimestamp=new Map,this.reassemblyTable=new Map,this.reassemblyTableLastTimestamp=new Map,this.closeCalled=!1,this.gotOffer=!1,this.hasIceCandidate=!1;const{isOffer:n}=t.baseConfig;n?this.initializeChannels(e):e.ondatachannel=e=>{switch(e.channel.label){case"stream.latest-ttl":this.latestTtlStreamChannel=e.channel;break;case"stream.reliable":this.reliableStreamChannel=e.channel;break;case"stream.latest-reliable":this.latestReliableStreamChannel=e.channel;break;case"stream.latest-try-once":this.latestTryOnceStreamChannel=e.channel;break;case"heartbeat":return void(this.heartbeatChannel=e.channel);default:return void this.dataChannelNotifier(e.channel)}this.setupChannel(e.channel)},this.pingUpdateTimeout=setInterval((()=>{const{reliableStreamChannel:e}=this;e&&this.sendSystemMessage(e,{type:"ping"})}),this.pingUpdateTimeoutMs),this.streamsInfoUpdateTimeout=setInterval((()=>{const{latestTtlStreamChannel:e}=this;e&&this.sendSystemMessage(e,{type:"streams-info"})}),this.streamsInfoUpdateTimeoutMs),this.reassemblyTableCleanupTimeout=setInterval((()=>{const e=(new Date).getTime();this.reassemblyTableLastTimestamp.forEach(((t,r,n)=>{e>r+this.reassemblyTimeoutMs&&this.reassemblyTable.delete(t)}))}),this.reassemblyTableCleanupMs),this.heartbeatTimeout=setInterval((()=>{const{heartbeatChannel:e}=this;e&&"open"===e.readyState&&e.send(new Uint8Array([1]))}),this.heartbeatTimeoutMs)}handleSignal(e){return F(this,void 0,void 0,(function*(){const{peerConnection:t}=this,{track:r}=this.config.baseConfig,n=(()=>{try{return JSON.parse(e.getPayload())}catch(t){return}})();if(!n)return void b.a.error("Received unparseable signal.");b.a.debug("Handling signal",{description:n});const{sdp:o,type:i}=n;if(!o||!i)return void b.a.warn("Received non-SDP signal");const{signalingState:s,connectionState:a}=t;if("stable"!==s||"connected"!==a)if(t.remoteDescription)b.a.warn(`Received SDP after remote description was set: ${o}`);else{if("offer"===i){if("stable"!==s)return void b.a.warn("Received offer SDP when signaling is ongoing.");yield t.setRemoteDescription(n);const o=yield t.createAnswer();yield t.setLocalDescription(o);const i=e.clone();return null==r||r("Answer Received",i),i.setPayload(JSON.stringify(o)),i.setReceiverId(e.getSenderId()),i.setSenderId(e.getReceiverId()),i}if("answer"===i){if("stable"===s)return void b.a.warn("Received answer SDP when signaling hasn't started.");yield t.setRemoteDescription(n)}}else b.a.warn(`Received SDP when already connected: ${o}`)}))}send(e,t){const r=this.getChannelFromLabel(t.channelLabel);r?this.sendOnChannel(r,e):b.a.warn("Send called with unexpected channel label",{channelLabel:t.channelLabel})}controlRemoteStream(e){this.sendSystemMessage(m(this.reliableStreamChannel),{type:"stream-control",streamControl:e})}isActive(){return new Set(["new","checking","connected","completed"]).has(this.peerConnection.iceConnectionState)||this.isReady()}isReady(){const{reliableStreamChannel:e,latestTtlStreamChannel:t,latestTryOnceStreamChannel:r,latestReliableStreamChannel:n}=this;return"open"===(null==e?void 0:e.readyState)&&"open"===(null==t?void 0:t.readyState)&&"open"===(null==r?void 0:r.readyState)&&"open"===(null==n?void 0:n.readyState)}close(){return F(this,void 0,void 0,(function*(){if(this.closeCalled)return;this.closeCalled=!0,this.sessionMetrics&&(yield this.sessionMetrics.uploadMetrics()),this.pingUpdateTimeout&&clearInterval(this.pingUpdateTimeout),this.reassemblyTableCleanupTimeout&&clearInterval(this.reassemblyTableCleanupTimeout),this.streamsInfoUpdateTimeout&&clearInterval(this.streamsInfoUpdateTimeout),this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout);const{peerConnection:e,reliableStreamChannel:t,latestTtlStreamChannel:r,latestTryOnceStreamChannel:n,latestReliableStreamChannel:o}=this;e.close(),null==t||t.close(),null==r||r.close(),null==n||n.close(),null==o||o.close()}))}getPing(){return this.pingTimeMs}getLastMessageTimestamp(){return this.lastMessageTimestamp}getSessionCreatedTimestamp(){var e;return null===(e=this.config.remoteConfig)||void 0===e?void 0:e.sessionCreatedTimestamp}setSessionCreatedTimestamp(e){this.config.remoteConfig&&(this.config.remoteConfig.sessionCreatedTimestamp=e)}getSessionId(){var e;return null===(e=this.config.remoteConfig)||void 0===e?void 0:e.sessionId}setSessionId(e){this.config.remoteConfig&&(this.config.remoteConfig.sessionId=e,this.sessionMetrics=new D(e,this))}getRemotePeerId(){return this.config.baseConfig.remotePeerId}getRemoteDeviceId(){var e;return null===(e=this.config.baseConfig)||void 0===e?void 0:e.remoteDeviceId}setRemoteDeviceId(e){this.config.baseConfig.remoteDeviceId=e}getSessionMetricsMessageCounts(){var e;return null===(e=this.sessionMetrics)||void 0===e?void 0:e.counts}getConnectionStatsInfo(){return F(this,void 0,void 0,(function*(){const{peerConnection:e}=this;if(!e)return;const t=yield e.getStats(null),r=[];t.forEach((e=>{r.push(e)}));const n=r.find((e=>"transport"===e.type));if(!n)return;const o=r.find((e=>("candidate-pair"===e.type||"candidatepair"===e.type)&&e.id===n.selectedCandidatePairId));if(!o)return;const i=r.find((e=>e.id===o.localCandidateId)),s=r.find((e=>e.id===o.remoteCandidateId));return i&&s&&(i.address=i.address||i.ip,s.address=s.address||s.ip,void 0!==i.address&&void 0!==s.address)?{transport:n,localCandidate:i,remoteCandidate:s}:void 0}))}initializeChannels(e){this.heartbeatChannel=e.createDataChannel("heartbeat",U),this.heartbeatChannel.binaryType="arraybuffer",this.latestTtlStreamChannel=e.createDataChannel("stream.latest-ttl",P),this.latestTtlStreamChannel.binaryType="arraybuffer",this.reliableStreamChannel=e.createDataChannel("stream.reliable",N),this.reliableStreamChannel.binaryType="arraybuffer",this.latestReliableStreamChannel=e.createDataChannel("stream.latest-reliable",x),this.latestReliableStreamChannel.binaryType="arraybuffer",this.latestTryOnceStreamChannel=e.createDataChannel("stream.latest-try-once",L),this.latestTryOnceStreamChannel.binaryType="arraybuffer",this.setupChannel(this.latestTtlStreamChannel),this.setupChannel(this.reliableStreamChannel),this.setupChannel(this.latestReliableStreamChannel),this.setupChannel(this.latestTryOnceStreamChannel)}getOffer(){var e,t,r;return F(this,void 0,void 0,(function*(){const{gotOffer:n}=this,{peerConnection:o,config:i}=this;if(this.config.baseConfig.isLan)throw new Error('"getOffer" method can only be called with internet connections. LAN connections should call the "getLanOffer" method.');const s=null===(e=this.config.remoteConfig)||void 0===e?void 0:e.sessionId;if(n)return void b.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,k(this.peerConnection))return void b.a.debug("Failed to generate offer because the peer connection was inactive.");const a=i.baseConfig.track;o.onicecandidate=()=>{this.hasIceCandidate=!0},o.oniceconnectionstatechange=()=>F(this,void 0,void 0,(function*(){const e=o.iceConnectionState;if("connected"===e||"completed"===e){const t=yield this.getConnectionStatsInfo(),r=t?function(e){const t=e.localCandidate.candidateType,r=e.remoteCandidate.candidateType;return"host"===t&&"host"===r?"local":"relay"===t||"relay"===r?"TURN":"STUN"}(t):void 0;b.a.info(`ICE connection state changed to ${e}`,{sessionId:s,connectionStatsInfo:t,iceMode:r}),null==a||a("ICE connection state change",{iceConnectionState:e,sessionId:s,connectionStatsInfo:t,iceMode:r})}})),yield o.setLocalDescription(yield o.createOffer());const g=(new Date).getTime();for(;;){const e=(new Date).getTime()-g;if(e>this.connectTimeoutMs)return void b.a.debug("Failed to generate offer because ICE gathering timed out.");if(e>this.iceGatheringTimeoutMs&&this.hasIceCandidate){b.a.debug("ICE gathering partially completed; proceeding",{iceTransportPolicy:o.getConfiguration().iceTransportPolicy,waitTime:e}),null==a||a("ICE gathering partially completed",{sessionId:s,iceTransportPolicy:o.getConfiguration().iceTransportPolicy,waitTime:e});break}if("complete"===o.iceGatheringState){b.a.debug("ICE gathering complete",{iceTransportPolicy:o.getConfiguration().iceTransportPolicy,waitTime:e}),null==a||a("ICE gathering completed",{sessionId:s,iceTransportPolicy:o.getConfiguration().iceTransportPolicy,waitTime:e});break}yield Object(u.a)(.1*l.a.second)}const c=null!==(t=this.peerConnection.getConfiguration().iceServers)&&void 0!==t?t:[];for(const e of c)e.credentialType=void 0;const f=JSON.stringify(c),p=new R.Signal;return p.setPayload(JSON.stringify(o.localDescription)),p.setSenderId(this.config.baseConfig.localPeerId),p.setReceiverId(this.config.baseConfig.remotePeerId),p.setIceServers(f),p.setIceTransportPolicy(null!==(r=this.peerConnection.getConfiguration().iceTransportPolicy)&&void 0!==r?r:"all"),p.setSessionType(R.SessionType.TELEOP),b.a.debug("Sending offer signal with description",{description:p.getPayload()}),p}))}getLanOffer(){return F(this,void 0,void 0,(function*(){const{peerConnection:e,gotOffer:t}=this;if(!this.config.baseConfig.isLan)throw new Error('"getLanOffer" method can only be used with LAN connections. Internet connections should call the "getOffer" method.');if(t)return void b.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,k(this.peerConnection))return void b.a.debug("Failed to generate offer because the peer connection was inactive.");yield e.setLocalDescription(yield e.createOffer());const r=(new Date).getTime();for(;;){if((new Date).getTime()-r>this.iceGatheringTimeoutMs)return void b.a.debug("Failed to generate offer because ICE gathering timed out.");if("complete"===e.iceGatheringState)break;yield Object(u.a)(.1*l.a.second)}const n=e.localDescription;if(n)return b.a.debug("Sending LAN offer signal with description",{description:n}),n;b.a.error("Failed to generate LAN offer description")}))}handleLanAnswer(e){return F(this,void 0,void 0,(function*(){const{peerConnection:t}=this;if(!this.config.baseConfig.isLan)throw new Error('"handleLanAnswer" method can only be used with LAN connections. Internet connections should call the "handleSignal" method.');yield t.setRemoteDescription(e)}))}getChannelFromLabel(e){switch(e){case"stream.latest-ttl":return this.latestTtlStreamChannel;case"stream.reliable":return this.reliableStreamChannel;case"stream.latest-reliable":return this.latestReliableStreamChannel;case"stream.latest-try-once":return this.latestTryOnceStreamChannel}}sendOnChannel(e,t){let r;try{r=Object(M.encode)(JSON.stringify(t))}catch(n){return void b.a.warn("Failed to encode RTC message",{error:n})}try{e.send(r),this.sessionMetrics&&this.sessionMetrics.incrementLocalSent(t)}catch(o){b.a.warn("Failed to send message to channel",{error:o,channel:e.label})}}channelNotRecognized(e){return e!==this.latestTtlStreamChannel&&e!==this.latestReliableStreamChannel&&e!==this.latestTryOnceStreamChannel&&e!==this.reliableStreamChannel}setupChannel(e){e.onmessage=t=>{if(this.channelNotRecognized(e))return void b.a.warn("Received message on unrecognized data channel.");let r;try{r=JSON.parse(Object(M.decode)(t.data))}catch(n){return void b.a.warn("Received unparseable message on RTC stream data channel",{error:n,channel:e.label})}"message-chunk"===r.communicationType?this.receiveChannelMessageChunk(e,r):this.receiveChannelMessage(e,r)},e.onerror=t=>{b.a.warn(`Channel error: ${t.error}`,{error:t.error,sessionId:this.getSessionId(),channelLabel:e.label})},e.onopen=()=>{b.a.debug("Channel opened",{sessionId:this.getSessionId(),channelLabel:e.label})},e.onclose=()=>{const t={bufferedAmount:e.bufferedAmount,sessionId:this.getSessionId(),channelLabel:e.label};!1===this.closeCalled?b.a.debug("Unexpected channel closed",t):b.a.debug("Channel closed",t)}}receiveChannelMessage(e,t){const{config:r}=this,{remotePeerId:n}=this.config.baseConfig;this.lastMessageTimestamp=(new Date).getTime(),t=function(e){switch(e.header.stream.streamType){case"twist":const{twist:t}=e.payload;if(!t)throw Error("twist not in payload of RTC message with type twist");return{header:e.header,payload:{twist:{linear:Object.assign({x:0,y:0,z:0},t.linear),angular:Object.assign({x:0,y:0,z:0},t.angular)}}};case"pose":const{pose:r}=e.payload;if(!r)throw Error("pose not in payload of RTC message with type pose");return{header:e.header,payload:{pose:{translation:Object.assign({x:0,y:0,z:0},r.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},r.rotation)}}};case"pose-with-covariance":const{poseWithCovariance:n}=e.payload;if(!n)throw Error("poseWithCovariance not in payload of RTC message with type pose-with-covariance");const o=new Array(36).fill(0);return n.covariance.forEach(((e,t)=>{if(t>=36)throw Error("covariance contains more than 36 elements");o[t]=e})),{header:e.header,payload:{poseWithCovariance:{pose:{translation:Object.assign({x:0,y:0,z:0},n.pose.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},n.pose.rotation)},covariance:o}}};case"point":const{point:i}=e.payload;if(!i)throw Error("point not in payload of RTC message with type point");return{header:e.header,payload:{point:Object.assign({x:0,y:0,z:0},i)}};default:return e}}(t),this.sessionMetrics&&this.sessionMetrics.incrementLocalReceived(t),this.handleSystemMessage(e,t)||(e===this.latestTryOnceStreamChannel||e===this.latestTtlStreamChannel||e===this.latestReliableStreamChannel)&&!this.isLatestMessage(t)||r.baseConfig.receive(n,t)}receiveChannelMessageChunk(e,t){const r=this.reassemblyTable.get(t.id)||[];if(r.push(t),r.length===t.total){const n=function(e){const t=e.sort(((e,t)=>e.seq<t.seq?-1:1)).map((e=>e.part)).reduce(((e,t)=>e+t));try{return JSON.parse(t)}catch(r){return void b.a.warn("Could not reassemble RTC message chunks")}}(r);return n&&this.receiveChannelMessage(e,n),void this.reassemblyTable.delete(t.id)}this.reassemblyTable.set(t.id,r),this.reassemblyTableLastTimestamp.set(t.id,(new Date).getTime())}handleSystemMessage(e,t){var r,n;const{config:o}=this,{baseConfig:i}=o,{remotePeerId:s}=i;switch(t.header.stream.streamType){case"ping":return this.sendSystemMessage(e,{type:"pong",timestamp:m(t.payload.ping)}),!0;case"pong":const o=(new Date).getTime()-m(t.payload.pong);return this.pingTimeMs=o,A.aggregate("rtc-ping-time",o),!0;case"streams-info":const{sessionMetrics:a}=this,l=null===(r=t.payload.streamsInfo)||void 0===r?void 0:r.timestamp;return!!l&&(null==a||a.updateRemoteMessagesCounts(t),null===(n=i.onStreamsInfoUpdate)||void 0===n||n.call(i,s,l),!0);case"stream-control":return!0;default:return!1}}sendSystemMessage(e,t){var r;const{localUserId:n,localPeerId:o}=this.config.baseConfig;if("open"!==e.readyState)return;const i={entityId:null!=n?n:o,streamName:`$.${t.type}`,streamType:t.type};let s;switch(t.type){case"ping":s={ping:(new Date).getTime()};break;case"pong":s={pong:t.timestamp};break;case"stream-control":s={streamControl:t.streamControl};break;case"streams-info":s={streamsInfo:null===(r=this.sessionMetrics)||void 0===r?void 0:r.getLocalStreamsInfo((new Date).getTime())}}var a;this.sendOnChannel(e,(a=s,{header:{stream:i,created:Date.now(),frameId:""},payload:a}))}isLatestMessage(e){const t=B(e.header.stream),r=(this.streamLatestTimestamp.get(t)||0)<=e.header.created;return r&&this.streamLatestTimestamp.set(t,e.header.created),r}}function V(e){var t,r;return{userId:null===(t=e.getUserId())||void 0===t?void 0:t.getValue(),deviceId:null===(r=e.getDeviceId())||void 0===r?void 0:r.getValue(),organizationId:e.getOrganizationId(),id:e.getPeerId(),capabilities:[],capabilitySet:{}}}var H=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class z{constructor(e){this.config=e,this.grpcCallDeadline=5*l.a.second,this.refreshIntervalDelayMs=2*l.a.second,this.iceServersTtl=30*l.a.minute,this.connections=[],this.localConnections=[],this.isConnectionInitiator=new Map,this.isOutgoingConnection=new Map,this.peerDataChannelListeners=[];const{refreshIntervalDelayMs:t}=this;this.refreshInterval=_({func:()=>H(this,void 0,void 0,(function*(){try{yield this.update()}catch(e){b.a.warn("RTC refresh failed",{error:e})}})),delay:t,immediate:!0})}send(e,t,r){const n=this.getActiveConnection(e);n?n.isReady()?n.send(t,r):b.a.warn("Send called with unready connection."):b.a.warn("Send called with no connection.")}controlRemoteStream(e,t){const r=this.getActiveConnection(e);r?r.isReady()?r.controlRemoteStream(t):b.a.warn("controlRemoteStream called with unready connection."):b.a.warn("controlRemoteStream called with no connection.")}getLocalPeer(){return H(this,void 0,void 0,(function*(){for(;!this.localPeer;)yield Object(u.a)(.1*l.a.second);return V(this.localPeer)}))}connect(e,t){var r,n,o;return H(this,void 0,void 0,(function*(){if(!0===this.config.lanOnlyMode)throw new Error("connect method called in local only mode.");const{track:i,signalingClient:s}=this.config,{localPeer:a,receiveSignalStream:l,iceServers:u}=this;if(!a||!l||!u)return void b.a.warn("Connect called prior to local peer, receiveSignalStream, and ICE servers ready");if(this.getActiveConnection(e))return void b.a.warn("Connect called for peer with existing connection.");if(this.isOutgoingConnection.get(e))return void b.a.warn("Connect called for peer with an existing outgoing connection offer.");this.isOutgoingConnection.set(e,!0);const g=new W(yield this.createRTCPeerConnection(u,t),{baseConfig:{isOffer:!0,isLan:!1,receive:(e,t)=>this.config.receive(e,t),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(e,t)=>{var r,n;return null===(n=(r=this.config).onStreamsInfoUpdate)||void 0===n?void 0:n.call(r,e,t)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:null===(r=a.getUserId())||void 0===r?void 0:r.getValue(),localPeerId:a.getPeerId(),remotePeerId:e},remoteConfig:{}},(t=>this.onCustomDataChannel(e,t))),c=yield g.getOffer();if(!c)return b.a.error("Failed to generate offer."),void this.isOutgoingConnection.delete(e);b.a.debug("Sending offer."),null==i||i("Sending offer",c);const f=new R.SendSignalRequest;f.setSignal(c);const p=yield(()=>H(this,void 0,void 0,(function*(){try{return yield s.sendSignal(f,yield this.getMetadata({}))}catch(e){b.a.warn("Error when sending signal",{error:e})}})))();if(!this.isOutgoingConnection.get(e))return void b.a.debug("No offer set after receiving offer signal response.");b.a.debug("Offer sent.");const h=null===(n=null==p?void 0:p.getSessionId())||void 0===n?void 0:n.getValue(),d=null===(o=null==p?void 0:p.getSessionCreatedTimestamp())||void 0===o?void 0:o.getValue();return h&&d?(g.setSessionId(h),g.setSessionCreatedTimestamp(d),this.isOutgoingConnection.delete(e),this.connections.push(g),this.isConnectionInitiator.set(g,!0),this.setupHandlers(g),h):(b.a.warn("No session ID or no session created timestamp on send signal response."),void this.isOutgoingConnection.delete(e))}))}connectLan(e){var t,r;return H(this,void 0,void 0,(function*(){const n=new C(e),o=new W(yield this.createRTCPeerConnection([]),{baseConfig:{isOffer:!0,isLan:!0,receive:(e,t)=>this.config.receive(e,t),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(e,t)=>{var r,n;return null===(n=(r=this.config).onStreamsInfoUpdate)||void 0===n?void 0:n.call(r,e,t)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:null===(r=null===(t=this.localPeer)||void 0===t?void 0:t.getUserId())||void 0===r?void 0:r.getValue(),localPeerId:"lan_client",remotePeerId:e}},(t=>this.onCustomDataChannel(e,t))),i=yield o.getLanOffer();if(!i)return b.a.warn("Could not generate LAN offer"),!1;const s=yield n.postLanRtcOffer({offer:JSON.stringify(i)}),a=new RTCSessionDescription(JSON.parse(s.answer));return yield o.handleLanAnswer(a),this.localConnections.push(o),Object(j.v4)()}))}getConnections(){return[...this.connections,...this.localConnections]}createCustomDataChannel(e,t,r,n,o){const i=this.getActiveConnection(e);if(i&&this.isConnectionInitiator.has(i)){const s=i.peerConnection.createDataChannel("custom."+t,r);return n&&(s.binaryType="arraybuffer"),o(e,s),()=>{}}const s=(r,n)=>{e===r&&n.label==="custom."+t&&o(e,n)};return this.peerDataChannelListeners.push(s),()=>{this.peerDataChannelListeners=this.peerDataChannelListeners.filter((e=>e!==s))}}onCustomDataChannel(e,t){this.peerDataChannelListeners.forEach((r=>r(e,t)))}getConnectionStatus(e){if(this.isOutgoingConnection.get(e))return"connecting";const t=this.getActiveConnection(e);return t?t.isReady()?"connected":"connecting":"disconnected"}getConnectionStatsInfo(e){return H(this,void 0,void 0,(function*(){const t=this.getActiveConnection(e);if(t)return yield t.getConnectionStatsInfo()}))}disconnect(e){return H(this,void 0,void 0,(function*(){const t=this.getActiveConnection(e);t&&(yield t.close())}))}getPeers(){return H(this,void 0,void 0,(function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:e}=this.config,t=yield(()=>H(this,void 0,void 0,(function*(){try{return yield e.getPeers(new R.GetPeersRequest,yield this.getMetadata({}))}catch(t){b.a.warn("Error when getting peers",{error:t})}})))();if(!t)return[];const r=t.getPeersList();if(!r)return[];const n=e=>{var t,r;return null!==(r=null===(t=e.getPeerCreatedTimestamp())||void 0===t?void 0:t.getValue())&&void 0!==r?r:0};return r.sort(((e,t)=>n(t)-n(e))).map((e=>V(e)))}))}getSessions(){return H(this,void 0,void 0,(function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:e}=this.config,t=yield(()=>H(this,void 0,void 0,(function*(){try{return yield e.getPeers(new R.GetPeersRequest,yield this.getMetadata({}))}catch(t){b.a.warn("Error when getting peers",{error:t})}})))();if(!t)return{};const r=t.getPeersList(),n={};for(const o of r)n[o.getPeerId()]=o.getSessionIdsList();return n}))}getPing(e){const t=this.getActiveConnection(e);if(t)return t.getPing();b.a.warn("Attempted to get ping time from inactive peer.")}getLastMessageTimestamp(e){const t=this.getActiveConnection(e);if(t)return t.getLastMessageTimestamp();b.a.warn("Attempted to get last message time from inactive peer.")}getSessionMetricsMessageCounts(e){const t=this.getActiveConnection(e);if(t)return t.getSessionMetricsMessageCounts();b.a.warn("Attempted to get session metrics counts from inactive peer.")}isReady(){if(this.config.lanOnlyMode)return!0;const{localPeer:e,receiveSignalStream:t,iceServers:r}=this;return!!(e&&t&&r)}shutdown(){return H(this,void 0,void 0,(function*(){b.a.info("Shutdown called on RTC client"),yield this.refreshInterval.stop(),this.receiveSignalStream&&this.receiveSignalStream.cancel();const e=this.connections;this.connections=[],yield this.closeConnections(e);const{localPeer:t}=this;if(!t)return;if(this.config.lanOnlyMode)return;const{signalingClient:r}=this.config;yield(()=>H(this,void 0,void 0,(function*(){try{const e=new R.DeletePeerRequest;e.setPeerId(t.getPeerId()),yield r.deletePeer(e,yield this.getMetadata({}))}catch(e){return void b.a.warn("Error deleting local peer",{error:e})}})))()}))}createPeer(){return H(this,void 0,void 0,(function*(){if(this.config.lanOnlyMode)throw new Error("createPeer method cannot be used in local-only mode.");const{signalingClient:e}=this.config,t=yield(()=>H(this,void 0,void 0,(function*(){try{return yield e.createPeer(new R.CreatePeerRequest,yield this.getMetadata({}))}catch(t){throw new Error(`Was not able to create peer: ${JSON.stringify(t)}`)}})))(),r=null==t?void 0:t.getPeer();if(!r)throw new Error("Response did not provide peer.");return this.localPeer=r}))}createReceiveSignalStream(){return H(this,void 0,void 0,(function*(){if(this.config.lanOnlyMode)throw new Error("createReceiveSignalStream method cannot be used in local-only mode.");const{signalingClient:e}=this.config,{localPeer:t,iceServers:r}=this;if(!t||!r)return;const{receiveSignalStream:n}=this;n&&n.cancel();const o=new R.ReceiveSignalStreamRequest;o.setPeerId(t.getPeerId());const i=yield(()=>H(this,void 0,void 0,(function*(){try{return e.receiveSignalStream(o,yield this.getMetadata({hasDeadline:!1}))}catch(t){throw new Error(`Unable to create receive signal stream: ${JSON.stringify(t)}`)}})))();if(!i)throw new Error("Response did not provide stream.");return i.on("data",(e=>H(this,void 0,void 0,(function*(){var n,o,i,s;const a=e.getSignal(),l=null===(n=null==a?void 0:a.getSessionId())||void 0===n?void 0:n.getValue(),u=null==a?void 0:a.getSenderId(),g=null==a?void 0:a.getReceiverId(),c=null===(o=null==a?void 0:a.getSessionCreatedTimestamp())||void 0===o?void 0:o.getValue();if(!(a&&l&&u&&g&&c))return void b.a.warn("Received signal with missing information.");const f=this.getActiveConnection(u);if(f)if(f.getSessionId()!==l){if(b.a.debug("Received signal: different session for a peer we're already connected to."),(f.getSessionCreatedTimestamp()||0)>c)return;const e=new W(yield this.createRTCPeerConnection(r),{baseConfig:{isOffer:!1,isLan:!1,receive:(e,t)=>this.config.receive(e,t),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(e,t)=>{var r,n;return null===(n=(r=this.config).onStreamsInfoUpdate)||void 0===n?void 0:n.call(r,e,t)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:t.getPeerId(),localUserId:null===(s=t.getUserId())||void 0===s?void 0:s.getValue(),remotePeerId:u},remoteConfig:{sessionId:l,sessionCreatedTimestamp:c}},(e=>this.onCustomDataChannel(u,e)));yield e.handleSignal(a),this.connections.push(e)}else b.a.debug("Received signal: for an existing connection."),yield f.handleSignal(a);else{b.a.debug("Received signal: new connection.");const e=new W(yield this.createRTCPeerConnection(r),{baseConfig:{isOffer:!1,isLan:!1,receive:(e,t)=>this.config.receive(e,t),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(e,t)=>{var r,n;return null===(n=(r=this.config).onStreamsInfoUpdate)||void 0===n?void 0:n.call(r,e,t)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:t.getPeerId(),localUserId:null===(i=t.getUserId())||void 0===i?void 0:i.getValue(),remotePeerId:u},remoteConfig:{sessionId:l,sessionCreatedTimestamp:c}},(e=>this.onCustomDataChannel(u,e)));yield e.handleSignal(a),this.connections.push(e)}})))),i.on("end",(()=>{i.cancel(),this.receiveSignalStream=void 0})),i.on("error",(e=>{switch(e.code){case O.StatusCode.CANCELLED:case O.StatusCode.UNAVAILABLE:case O.StatusCode.UNKNOWN:b.a.debug("Receive signal stream error",{error:e});break;case O.StatusCode.UNAUTHENTICATED:b.a.warn("Receive signal stream error",{error:e});break;default:b.a.error("Receive signal stream error",{error:e})}i.cancel(),this.receiveSignalStream=void 0})),this.receiveSignalStream=i}))}createRTCPeerConnection(e,t){var r;return H(this,void 0,void 0,(function*(){const n=null==t?void 0:t.rtcIceTransportPolicy,o=null==t?void 0:t.rtcIceServerProtocol,i=(e,t)=>"string"==typeof e?e.endsWith(`transport=${t}`):e.some((e=>e.endsWith(`transport=${t}`))),s=e.filter((e=>{return"relay"!==n||("string"==typeof(t=e.urls)?t.startsWith("turn:"):t.some((e=>e.startsWith("turn:"))));var t})).filter((e=>"udp"!==o||i(e.urls,"udp"))).filter((e=>"tcp"!==o||i(e.urls,"tcp"))),a=null!==(r=this.config.alternateRTCPeerConnection)&&void 0!==r?r:window.RTCPeerConnection;if(!a)throw new Error("RTCPeerConnection class not found. WebRTC must be enabled.");return new a(Object.assign({iceServers:s,iceTransportPolicy:n},t))}))}closeConnections(e){return H(this,void 0,void 0,(function*(){const t=yield y(e.map((e=>H(this,void 0,void 0,(function*(){yield e.close()})))));for(const e of t)b.a.warn("Request to close session failed",{error:e})}))}getActiveConnection(e){return this.getConnections().find((t=>t.getRemotePeerId()===e&&t.isActive()))}update(){var e;return H(this,void 0,void 0,(function*(){if(this.localConnections=this.localConnections.filter((e=>e.isActive())),this.config.lanOnlyMode)return;const{signalingClient:t}=this.config;if(!this.localPeer||!this.receiveSignalStream||!this.iceServers)return this.localPeer||(yield this.createPeer()),this.iceServers||(yield this.updateIceServers()),void(this.receiveSignalStream||(yield this.createReceiveSignalStream()));yield this.closeConnections(this.connections.filter((e=>!e.isActive()))),this.connections=this.connections.filter((e=>e.isActive()));const{localPeer:r}=this,n=this.connections.filter((e=>e.getSessionId)).map((e=>m(e.getSessionId())));r.setSessionIdsList(n);const o=new R.RefreshPeerRequest;o.setPeer(r);try{yield t.refreshPeer(o,yield this.getMetadata({}))}catch(s){s.code===O.StatusCode.NOT_FOUND?(b.a.warn("Peer expired, creating new peer",{peerId:r.getPeerId()}),yield this.reset()):b.a.warn("Error calling RefreshPeer",{error:s})}const i=yield this.getPeers();for(const a of this.connections)a.setRemoteDeviceId(null===(e=i.find((e=>e.id===a.getRemotePeerId())))||void 0===e?void 0:e.deviceId)}))}reset(){return H(this,void 0,void 0,(function*(){yield this.closeConnections(this.connections),this.connections=[],this.isOutgoingConnection=new Map,yield this.createPeer(),yield this.createReceiveSignalStream()}))}updateIceServers(){return H(this,void 0,void 0,(function*(){if(this.config.lanOnlyMode)return;const{iceServersLastUpdate:e,iceServersTtl:t}=this,r=(new Date).getTime();if(!e||r-e>t)try{const e=(yield this.config.signalingClient.getIceServers(new R.GetIceServersRequest,yield this.getMetadata({}))).getIceServers();this.iceServers=JSON.parse(e),this.iceServersLastUpdate=r}catch(n){b.a.warn("Error in updateIceServers",{error:n})}}))}setupHandlers(e){const{peerConnection:t}=e,r=e.getSessionCreatedTimestamp();t.onconnectionstatechange=()=>H(this,void 0,void 0,(function*(){const e=t.connectionState;if(r)switch(e){case"connected":A.aggregate("rtc-connect-time",(new Date).getTime()-r);break;case"failed":A.increment("rtc-connect-failed")}}))}getMetadata(e){return H(this,void 0,void 0,(function*(){if(this.config.lanOnlyMode)throw new Error("getMetadata method cannot be called in local-only mode");const{getToken:t}=this.config,{grpcCallDeadline:r}=this,{hasDeadline:n}=e,o=!1===n?void 0:(new Date).getTime()+r;return{authorization:yield t(),deadline:o}}))}}},,function(e,t,r){r.r(t),r.d(t,"LogClient",(function(){return o}));var n=r(26);class o extends n.a{log(e){return function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(t){i(t)}}function a(e){try{l(n.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){yield this.fetch("logs",{method:"POST",body:JSON.stringify({logs:e}),allowUnsafeRetries:!0})}))}}}])},module.exports=t()})(dist);let FORMANT_API_URL="https://api.formant.io";"undefined"!=typeof window&&(FORMANT_API_URL=window.FORMANT_API_URL||FORMANT_API_URL);let urlParams$1=new URLSearchParams("");"undefined"!=typeof window&&(urlParams$1=new URLSearchParams(window.location.search));const envDev=urlParams$1.get("formant_dev");envDev&&(FORMANT_API_URL="https://api-dev.formant.io");const envStage=urlParams$1.get("formant_stage");function delay(e){return new Promise((t=>setTimeout(t,e)))}function defined(e,t){if(void 0!==e)return e;throw new Error(t||"Value is undefined")}envStage&&(FORMANT_API_URL="https://api-stage.formant.io");class App{static sendAppMessage(e){window.parent.postMessage(e,"*")}static getCurrentModuleContext(){let e=new URLSearchParams("");"undefined"!=typeof window&&(e=new URLSearchParams(window.location.search));return e.get("module")}static isModule(){return null!==this.getCurrentModuleContext()}static goToTime(e){this.sendAppMessage({type:"go_to_time",time:e.getTime()})}static showMessage(e){this.sendAppMessage({type:"show_message",message:e})}static requestModuleData(){const e=this.getCurrentModuleContext();if(!e)throw new Error("No module context");this.sendAppMessage({type:"request_module_data",module:e})}static setModuleDateTimeRange(e,t){const r=this.getCurrentModuleContext();if(!r)throw new Error("No module context");this.sendAppMessage({type:"set_module_data_time_range",module:r,before:e,after:t||0})}static refreshAuthToken(){const e=this.getCurrentModuleContext();if(!e)throw new Error("No module context");this.sendAppMessage({type:"refresh_auth_token",module:e})}static setupModuleMenus(e){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"setup_module_menus",module:t,menus:e})}static addMenuListener(e){window.addEventListener("message",(t=>{const r=t.data;"module_menu_item_clicked"===r.type&&e(r.menu)}))}static addAccessTokenRefreshListener(e){window.addEventListener("message",(t=>{const r=t.data;"auth_token"===r.type&&e(r.token)}))}static addModuleDataListener(e){window.addEventListener("message",(t=>{const r=t.data;"module_data"===r.type&&e({streams:r.streams,time:r.time,queryRange:r.queryRange})}))}static addChannelDataListener(e,t){window.addEventListener("message",(r=>{const n=r.data;"channel_data"===n.type&&n.channel===e&&t({source:n.source,data:n.data})}))}}const _Authentication=class{static async login(e,t){try{const r=await fetch(`${FORMANT_API_URL}/v1/admin/auth/login`,{method:"POST",body:JSON.stringify({email:e,password:t}),headers:{"Content-Type":"application/json"}}),n=await r.json();if(200!==r.status)throw new Error(n.message);return await _Authentication.loginWithToken(n.authentication.accessToken,n.authentication.refreshToken),n.authentication}catch(r){return _Authentication.waitingForAuth.forEach((e=>e(!1))),_Authentication.waitingForAuth=[],Promise.reject(r)}}static async loginWithToken(e,t){const r=JSON.parse(atob(e.split(".")[1]));try{let t;if(_Authentication.isShareToken=r["formant:claims"]&&"share"==r["formant:claims"].type,r["formant:claims"]&&(_Authentication.currentOrganization=r["formant:claims"].organizationId),r["custom:organization_id"]&&(_Authentication.currentOrganization=r["custom:organization_id"]),_Authentication.isShareToken||(t=r.sub),r["formant:claims"]&&r["formant:claims"].userId&&(t=r["formant:claims"].userId),t){const r=await fetch(`${FORMANT_API_URL}/v1/admin/users/${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+e}}),n=await r.json();if(200!==r.status)throw new Error(n.message);_Authentication.currentUser=n}_Authentication.token=e,_Authentication.waitingForAuth.forEach((e=>e(!0)))}catch(n){console.error(n),_Authentication.waitingForAuth.forEach((e=>e(!1)))}_Authentication.waitingForAuth=[],t&&(_Authentication.refreshToken=t,setInterval((async()=>{if(_Authentication.refreshToken){const e=await fetch(`${FORMANT_API_URL}/v1/admin/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:_Authentication.refreshToken})}),t=await e.json();_Authentication.token=t.authentication.accessToken}}),36e5))}static isAuthenticated(){return void 0!==_Authentication.token}static getCurrentUser(){return _Authentication.currentUser}static async waitTilAuthenticated(){return void 0!==_Authentication.token||new Promise((e=>{_Authentication.waitingForAuth.push((function(t){e(t)}))}))}static async listenForRefresh(){App.addAccessTokenRefreshListener((e=>{this.loginWithToken(e)})),setInterval((async()=>{App.refreshAuthToken()}),36e5)}};let Authentication=_Authentication;__publicField(Authentication,"token"),__publicField(Authentication,"refreshToken"),__publicField(Authentication,"currentUser"),__publicField(Authentication,"currentOrganization"),__publicField(Authentication,"isShareToken",!1),__publicField(Authentication,"defaultDeviceId"),__publicField(Authentication,"waitingForAuth",[]);class DataChannel{constructor(e){__publicField(this,"ready",!1),__publicField(this,"listeners",[]),__publicField(this,"binaryListeners",[]),__publicField(this,"error"),__publicField(this,"decoder",new TextDecoder),this.dataChannel=e,this.dataChannel.binaryType="arraybuffer",this.dataChannel.onopen=()=>{this.ready=!0},this.dataChannel.onclose=()=>{this.ready=!1},this.dataChannel.onerror=e=>{console.error(e),this.error="An error occurred in DataChannel"},this.dataChannel.onmessage=e=>{this.listeners.forEach((t=>{const r=new Uint8Array(e.data);t(this.decoder.decode(r))})),this.binaryListeners.forEach((t=>{t(new Uint8Array(e.data))}))}}async waitTilReady(){if(this.ready)return!0;return new Promise(((e,t)=>{let r=window.setInterval((()=>{this.ready&&(window.clearInterval(r),e(!0)),this.error&&t(this.error)}),10)}))}send(e){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(e)}sendBinary(e){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(e)}addListener(e){this.listeners.push(e)}removeListener(e){const t=this.listeners.indexOf(e);if(-1===t)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.listeners.splice(t,1)}addBinaryListener(e){this.binaryListeners.push(e)}removeBinaryListener(e){const t=this.binaryListeners.indexOf(e);if(-1===t)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.binaryListeners.splice(t,1)}}class CaptureStream{constructor(e){__publicField(this,"token"),this.captureSession=e}async ingestJSON(e){if(!this.token){const e=await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions/${this.captureSession.code}/authenticate`,{method:"POST"}),t=await e.json();this.token=t.token}await fetch(`${FORMANT_API_URL}/v1/ingest`,{method:"POST",body:JSON.stringify({deviceId:this.captureSession.deviceId,name:this.captureSession.streamName,type:"json",points:[[Date.now(),JSON.stringify(e)]]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+this.token}})}}class Manipulator{constructor(e,t){__publicField(this,"currentListeners",[]),__publicField(this,"onRealtimeMessage",((e,t)=>{t.payload.jointState&&this.currentListeners.forEach((e=>e(t.payload.jointState)))})),this.device=e,this.config=t}async synchronize(){this.device.addRealtimeListener(this.onRealtimeMessage),this.device.startListeningToRealtimeDataStream(this.config.currentJointStateStream)}async desynchronize(){this.device.removeRealtimeListener(this.onRealtimeMessage),this.device.stopListeningToRealtimeDataStream(this.config.currentJointStateStream)}async addCurrentJointStateListener(e){this.currentListeners.push(e)}}class RequestDataChannel{constructor(e,t,r){__publicField(this,"channel"),__publicField(this,"requestIdToResponseMap",new Map),this.device=e,this.channel_name=t,this.timeout=r}}class BinaryRequestDataChannel extends RequestDataChannel{constructor(){super(...arguments),__publicField(this,"RESPONSE_SUCCESS_BYTE",0),__publicField(this,"decoder",new TextDecoder)}generateBinaryId(){const e=new Uint8Array(16);for(let t=0;t<e.length;t++)e[t]=Math.floor(256*Math.random());return e}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addBinaryListener((e=>{const t=e.slice(0,16).toString();if(0===t.length)throw new Error("Invalid response");const r=e.slice(16);if(0===r.length)throw new Error("Invalid response");this.requestIdToResponseMap.has(t)&&this.requestIdToResponseMap.set(t,r)}))}async request(e){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:t,requestIdToResponseMap:r,timeout:n}=this;await t.waitTilReady();const o=this.generateBinaryId(),i=o.toString();r.set(i,!0),t.sendBinary(new Uint8Array([...o,...e]));const s=(new Date).getTime();for(;(new Date).getTime()<s+n;)if(await delay(50),r.has(i)){const e=r.get(i);if(!0!==e){r.delete(i);const t=e[0]===this.RESPONSE_SUCCESS_BYTE,n=e.slice(1);if(t)return n;throw{name:"AdapterError",message:this.decoder.decode(n)}}}throw r.delete(i),{name:"TimeoutError",message:`Request timed out after ${n/1e3} seconds`}}}class TextRequestDataChannel extends RequestDataChannel{generateTextId(){return Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2)}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addListener((e=>{const t=JSON.parse(e),{id:r,data:n,error:o}=t;if(!r)throw new Error("Invalid response");if(!n&&!o)throw new Error("Invalid response");this.requestIdToResponseMap.has(r)&&this.requestIdToResponseMap.set(r,t)}))}async request(e){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:t,requestIdToResponseMap:r,timeout:n}=this;await t.waitTilReady();const o=this.generateTextId();r.set(o,!0),t.send(JSON.stringify({id:o,data:e}));const i=(new Date).getTime();for(;(new Date).getTime()<i+n;)if(await delay(50),r.has(o)){const e=r.get(o);if(!0!==e){r.delete(o);const{data:t,error:n}=e;if(t)return t;if(n)throw{name:"AdapterError",message:n}}}throw r.delete(o),{name:"TimeoutError",message:`Request timed out after ${n/1e3} seconds`}}}var SessionType2;exports.SessionType=void 0,SessionType2=exports.SessionType||(exports.SessionType={}),SessionType2[SessionType2.Teleop=1]="Teleop",SessionType2[SessionType2.Observe=3]="Observe";class Device{constructor(e,t,r){__publicField(this,"rtcClient"),__publicField(this,"remoteDevicePeerId"),__publicField(this,"realtimeListeners",[]),__publicField(this,"handleMessage",((e,t)=>{this.realtimeListeners.forEach((r=>r(e,t)))})),this.id=e,this.name=t,this.organizationId=r}async getLatestTelemetry(){const e=await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return(await e.json()).items}async getConfiguration(){let e=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});const t=await e.json();if(!t.state.reportedConfiguration)throw new Error("Device has no configuration, has it ever been turned on?");const r=t.state.reportedConfiguration.version;e=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}/configurations/${r}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return(await e.json()).document}async getFileUrl(e){const t=await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileId:[e]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return(await t.json()).fileUrls}getRealtimeStatus(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getConnectionStatus(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}getRealtimePing(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getPing(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async startRealtimeConnection(){if(this.rtcClient)throw new Error(`Already created realtime connection to device ${this.id}`);{const e=new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:this.handleMessage});for(;!e.isReady();)await delay(100);const t=(await e.getPeers()).find((e=>e.deviceId===this.id));if(!t)throw new Error("Cannot find peer, is the robot offline?");for(this.remoteDevicePeerId=t.id,await e.connect(this.remoteDevicePeerId);"connected"!==e.getConnectionStatus(this.remoteDevicePeerId);)await delay(100);this.rtcClient=e}}addRealtimeListener(e){this.realtimeListeners.push(e)}removeRealtimeListener(e){const t=this.realtimeListeners.indexOf(e);if(-1===t)throw new Error("Could not find realtime listener to remove");this.realtimeListeners.splice(t,1)}async getRealtimeVideoStreams(){var e,t,r;const n=await this.getConfiguration(),o=[];for(const i of null!=(e=n.teleop.hardwareStreams)?e:[])"h264-video-frame"===i.rtcStreamType&&o.push({name:i.name});for(const i of null!=(t=n.teleop.rosStreams)?t:[])"formant/H264VideoFrame"==i.topicType&&o.push({name:i.topicName});for(const i of null!=(r=n.teleop.customStreams)?r:[])"h264-video-frame"===i.rtcStreamType&&o.push({name:i.name});return o}async getRealtimeManipulators(){var e;const t=await this.getConfiguration(),r=[];for(const n of null!=(e=t.teleop.rosStreams)?e:[])"sensor_msgs/JointState"==n.topicType&&r.push(new Manipulator(this,{currentJointStateStream:{name:n.topicName},plannedJointStateStream:n.plannedTopic?{name:n.plannedTopic}:void 0,planValidStream:n.planValidTopic?{name:n.planValidTopic}:void 0,endEffectorStream:n.endEffectorTopic?{name:n.endEffectorTopic}:void 0,endEffectorLinkName:n.endEffectorLinkName,baseReferenceFrame:n.baseReferenceFrame,localFrame:n.localFrame}));return r}async startListeningToRealtimeVideo(e){const t=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();t.controlRemoteStream(defined(r).id,{streamName:e.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeVideo(e){const t=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();t.controlRemoteStream(defined(r).id,{streamName:e.name,enable:!1,pipeline:"rtc"})}async startListeningToRealtimeDataStream(e){const t=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();t.controlRemoteStream(defined(r).id,{streamName:e.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeDataStream(e){const t=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();t.controlRemoteStream(defined(r).id,{streamName:e.name,enable:!1,pipeline:"rtc"})}async enableRealtimeTelemetryPriorityIngestion(e){const t=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();t.controlRemoteStream(defined(r).id,{streamName:e,enablePriorityUpload:!0,pipeline:"telemetry"})}async disableRealtimeTelemetryPriorityIngestion(e){const t=defined(this.rtcClient,"Realtime connection has not been started"),r=await this.getRemotePeer();t.controlRemoteStream(defined(r).id,{streamName:e,enablePriorityUpload:!1,pipeline:"telemetry"})}async getRemotePeer(){const e=await defined(this.rtcClient,"Realtime connection has not been started").getPeers();return defined(e.find((e=>e.deviceId===this.id)),"Could not find remote peer for device "+this.id)}async stopRealtimeConnection(){if(!this.rtcClient)throw new Error(`Realtime connection hasn't been started for ${this.id}`);await this.rtcClient.disconnect(this.id)}async isInRealtimeSession(){let e=await Fleet.getPeers(),t=await Fleet.getRealtimeSessions(),r=e.find((e=>e.deviceId===this.id));return!!r&&t[r.id].length>0}async getAvailableCommands(){const e=await fetch(`${FORMANT_API_URL}/v1/admin/command-templates/`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return(await e.json()).items.map((e=>({name:e.name,id:e.id,command:e.command,description:e.description,parameterEnabled:e.parameterEnabled,parameterValue:e.parameterValue,parameterMeta:e.parameterMeta})))}async sendCommand(e,t,r,n){var o;const i=(await this.getAvailableCommands()).find((t=>t.name===e));if(!i)throw new Error(`Could not find command with name "${e}"`);let s;if(void 0===t){if(!i.parameterEnabled||!i.parameterValue)throw new Error("Command has no default parameter value, you must provide one");s=i.parameterValue}else s=t;let a={value:s,scrubberTime:(r||new Date).toISOString(),meta:__spreadValues(__spreadValues({},i.parameterMeta),n)};const l=await fetch(`${FORMANT_API_URL}/v1/admin/commands`,{method:"POST",body:JSON.stringify({commandTemplateId:i.id,organizationId:this.organizationId,deviceId:this.id,command:i.command,parameter:a,userId:null==(o=Authentication.currentUser)?void 0:o.id}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return(await l.json()).fileUrls}async createCustomDataChannel(e,t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer(),o=await new Promise((o=>{r.createCustomDataChannel(defined(n).id,e,__spreadValues({ordered:!0},t),!1,((e,t)=>{const r=new DataChannel(t);o(r)}))}));return await o.waitTilReady(),o}createCustomRequestDataChannel(e,t=3e3){return new TextRequestDataChannel(this,e,t)}createCustomBinaryRequestDataChannel(e,t=3e3){return new BinaryRequestDataChannel(this,e,t)}async createCaptureStream(e){const t=await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions`,{method:"POST",body:JSON.stringify({deviceId:this.id,streamName:e,tags:{}}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=await t.json();return new CaptureStream(r)}async getTelemetry(e,t,r,n){return await Fleet.getTelemetry(this.id,e,t,r,n)}async getTelemetryStreams(){var e,t;const r=await this.getConfiguration(),n=await fetch(`${FORMANT_API_URL}/v1/queries/metadata/stream-names`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),o=[],i=[];null==(t=null==(e=r.telemetry)?void 0:e.streams)||t.forEach((e=>{!0!==e.disabled&&o.push(e.name),!0===e.onDemand&&i.push(e.name)})),console.log(i);return(await n.json()).items.filter((e=>!o.includes(e))).map((e=>({name:e,onDemand:i.includes(e)})))}async createInterventionRequest(e,t,r,n){const o=await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"POST",body:JSON.stringify({message:e,interventionType:t,time:(new Date).toISOString(),deviceId:this.id,tags:n,data:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return await o.json()}async addInterventionResponse(e,t,r){const n=await fetch(`${FORMANT_API_URL}/v1/admin/intervention-responses`,{method:"POST",body:JSON.stringify({interventionId:e,interventionType:t,data:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return await n.json()}}const _Fleet=class{static async setDefaultDevice(e){_Fleet.defaultDeviceId=e}static async getCurrentDevice(){if(!Authentication.token)throw new Error("Not authenticated");if(!_Fleet.defaultDeviceId)throw new Error("No known default device");const e=await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),t=(await e.json()).items.find((e=>e.id===_Fleet.defaultDeviceId)).name,r=new Device(_Fleet.defaultDeviceId,t,defined(Authentication.currentOrganization));return _Fleet.knownContext.push(new WeakRef(r)),r}static async getDevice(e){if(!Authentication.token)throw new Error("Not authenticated");const t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${e}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=await t.json(),n=r.name,o=new Device(e,n,r.organizationId);return _Fleet.knownContext.push(new WeakRef(o)),o}static async getDevices(){if(!Authentication.token)throw new Error("Not authenticated");const e=await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",body:JSON.stringify({enabled:!0,type:"default"}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),t=await e.json();return t.items,t.items.map((e=>new Device(e.id,e.name,e.organizationId)))}static async getOnlineDevices(){if(!Authentication.token)throw new Error("Not authenticated");const e=await fetch(`${FORMANT_API_URL}/v1/queries/online-devices`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),t=(await e.json()).items;return(await _Fleet.getDevices()).filter((e=>t.includes(e.id)))}static async getPeers(){if(!Authentication.token)throw new Error("Not authenticated");const e=new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}});return await e.getPeers()}static async getRealtimeSessions(){if(!Authentication.token)throw new Error("Not authenticated");const e=new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}});return await e.getSessions()}static async getRealtimeDevices(){if(!Authentication.token)throw new Error("Not authenticated");const e=await fetch(`${FORMANT_API_URL}/v1/signaling/peers`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),t=(await e.json()).items.map((e=>e.deviceId));return(await _Fleet.getDevices()).filter((e=>t.includes(e.id)))}static async getLatestTelemetry(e){let t=e;e&&!Array.isArray(e)&&(e=[e]);const r=await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:t}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return(await r.json()).items}static async getTelemetry(e,t,r,n,o){let i=e;Array.isArray(e)||(i=[e]);let s=t;Array.isArray(t)||(s=[t]);const a=await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify({deviceIds:i,end:n.toISOString(),names:s,start:r.toISOString(),tags:o}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return(await a.json()).items}static async getFileUrl(e){const t=await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileIds:[e]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=await t.json();if(0===r.fileUrls.length)throw new Error("File not found");return r.fileUrls[0]}static async queryTelemetry(e){if(!Authentication.token)throw new Error("Not authenticated");const t=await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return(await t.json()).items}static async queryEvents(e){if(!Authentication.token)throw new Error("Not authenticated");const t=await fetch(`${FORMANT_API_URL}/v1/admin/events/query`,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return(await t.json()).items}static async getInterventions(){if(!Authentication.token)throw new Error("Not authenticated");const e=await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});return(await e.json()).items}};let Fleet=_Fleet;__publicField(Fleet,"defaultDeviceId"),__publicField(Fleet,"knownContext",[]);class KeyValue{static async set(e,t){try{const r=await fetch(FORMANT_API_URL+"/v1/admin/key-value",{method:"POST",body:JSON.stringify({organizationId:defined(Authentication.currentUser).organizationId,key:e,value:t}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),n=await r.json();if(200!==r.status)throw new Error(n.message)}catch(r){throw r}}static async get(e){try{const t=await fetch(FORMANT_API_URL+`/v1/admin/key-value/${e}`,{method:"GET",body:JSON.stringify({organizationId:defined(Authentication.currentUser).organizationId}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=await t.json();if(200!==t.status)throw new Error(r.message);return r.value}catch(t){throw t}}}const accessLevels=["viewer","operator","administrator"],viewer="viewer",operator="operator",administrator="administrator",aggregateLevels=["year","month","week","day","hour","minute"],annotationTypes=["tag","sheet","user"],eventTypes=["triggered-event","intervention-request","teleop-session-record","port-forwarding-session-record","command-request","command-response","command-delivery","custom","comment","system","annotation"],healthStatuses=["unknown","operational","offline","error"],interventionTypes=["selection","labeling","teleop"],severities=["info","warning","error","critical"],videoMimeTypes=["video/mp4"];let urlParams=new URLSearchParams("");"undefined"!=typeof window&&(urlParams=new URLSearchParams(window.location.search));const urlDevice=urlParams.get("device");urlDevice&&Fleet.setDefaultDevice(urlDevice);const urlAuth=urlParams.get("auth");urlAuth&&Authentication.loginWithToken(urlAuth);const moduleName=urlParams.get("module");moduleName&&Authentication.listenForRefresh(),exports.App=App,exports.Authentication=Authentication,exports.BinaryRequestDataChannel=BinaryRequestDataChannel,exports.CaptureStream=CaptureStream,exports.DataChannel=DataChannel,exports.Device=Device,exports.Fleet=Fleet,exports.KeyValue=KeyValue,exports.Manipulator=Manipulator,exports.TextRequestDataChannel=TextRequestDataChannel,exports.accessLevels=accessLevels,exports.administrator=administrator,exports.aggregateLevels=aggregateLevels,exports.annotationTypes=annotationTypes,exports.eventTypes=eventTypes,exports.healthStatuses=healthStatuses,exports.interventionTypes=interventionTypes,exports.operator=operator,exports.severities=severities,exports.videoMimeTypes=videoMimeTypes,exports.viewer=viewer,Object.defineProperty(exports,"__esModule",{value:!0}),exports[Symbol.toStringTag]="Module"}));
1
+ (function(Te,je){typeof exports=="object"&&typeof module!="undefined"?je(exports):typeof define=="function"&&define.amd?define(["exports"],je):(Te=typeof globalThis!="undefined"?globalThis:Te||self,je(Te.FormantDataSDK={}))})(this,function(exports){"use strict";var lr=Object.defineProperty;var Zt=Object.getOwnPropertySymbols;var ur=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable;var Tt=(Te,je,e)=>je in Te?lr(Te,je,{enumerable:!0,configurable:!0,writable:!0,value:e}):Te[je]=e,lt=(Te,je)=>{for(var e in je||(je={}))ur.call(je,e)&&Tt(Te,e,je[e]);if(Zt)for(var e of Zt(je))gr.call(je,e)&&Tt(Te,e,je[e]);return Te};var Ce=(Te,je,e)=>(Tt(Te,typeof je!="symbol"?je+"":je,e),e);var dist={exports:{}};/*! For license information please see index.js.LICENSE.txt */(function(module,exports){(function(e,t){module.exports=t()})(window,function(){return function(e){function t(l){for(var m,T,b=l[0],_=l[1],f=0,S=[];f<b.length;f++)T=b[f],Object.prototype.hasOwnProperty.call(n,T)&&n[T]&&S.push(n[T][0]),n[T]=0;for(m in _)Object.prototype.hasOwnProperty.call(_,m)&&(e[m]=_[m]);for(u&&u(l);S.length;)S.shift()()}var r={},n={0:0};function i(l){if(r[l])return r[l].exports;var m=r[l]={i:l,l:!1,exports:{}};return e[l].call(m.exports,m,m.exports,i),m.l=!0,m.exports}i.e=function(){return Promise.resolve()},i.m=e,i.c=r,i.d=function(l,m,T){i.o(l,m)||Object.defineProperty(l,m,{enumerable:!0,get:T})},i.r=function(l){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},i.t=function(l,m){if(1&m&&(l=i(l)),8&m||4&m&&typeof l=="object"&&l&&l.__esModule)return l;var T=Object.create(null);if(i.r(T),Object.defineProperty(T,"default",{enumerable:!0,value:l}),2&m&&typeof l!="string")for(var b in l)i.d(T,b,function(_){return l[_]}.bind(null,b));return T},i.n=function(l){var m=l&&l.__esModule?function(){return l.default}:function(){return l};return i.d(m,"a",m),m},i.o=function(l,m){return Object.prototype.hasOwnProperty.call(l,m)},i.p="",i.oe=function(l){throw console.error(l),l};var g=window.webpackJsonpFormantRealtimeSDK=window.webpackJsonpFormantRealtimeSDK||[],s=g.push.bind(g);g.push=t,g=g.slice();for(var o=0;o<g.length;o++)t(g[o]);var u=s;return i(i.s=228)}([function(e,t,r){r.d(t,"a",function(){return U});const n=Math.pow(2,20),i=n;var g=r(54),s=r(15),o=r(53),u=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),l=new Uint8Array(16);function m(){if(!u)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u(l)}for(var T=[],b=0;b<256;++b)T[b]=(b+256).toString(16).substr(1);var _=function(A,D){var w=D||0,c=T;return[c[A[w++]],c[A[w++]],c[A[w++]],c[A[w++]],"-",c[A[w++]],c[A[w++]],"-",c[A[w++]],c[A[w++]],"-",c[A[w++]],c[A[w++]],"-",c[A[w++]],c[A[w++]],c[A[w++]],c[A[w++]],c[A[w++]],c[A[w++]]].join("")},f=function(A,D,w){var c=D&&w||0;typeof A=="string"&&(D=A==="binary"?new Array(16):null,A=null);var L=(A=A||{}).random||(A.rng||m)();if(L[6]=15&L[6]|64,L[8]=63&L[8]|128,D)for(var k=0;k<16;++k)D[c+k]=L[k];return D||_(L)},S=r(16),E=r(6),N=r(29),F=r(35);function M(A){return F(A,{cycles:!0})}var R=function(A,D){var w={};for(var c in A)Object.prototype.hasOwnProperty.call(A,c)&&D.indexOf(c)<0&&(w[c]=A[c]);if(A!=null&&typeof Object.getOwnPropertySymbols=="function"){var L=0;for(c=Object.getOwnPropertySymbols(A);L<c.length;L++)D.indexOf(c[L])<0&&Object.prototype.propertyIsEnumerable.call(A,c[L])&&(w[c[L]]=A[c[L]])}return w};function p(A,D={}){const w=K=>D.redacted!==!1?Object(N.a)(K):K;if(!A.stack)return{message:M(w(A))};const{name:c,message:L,stack:k}=A,Y=R(A,["name","message","stack"]);return{name:c,message:L!==void 0?L:M(w(A)),stack:k,meta:Y&&Object.keys(Y).length===0?void 0:w(Y)}}function P(A,D={}){const{message:w,stack:c,meta:L}=p(A,D);return`${c||w||""}${L&&Object.keys(L).length>0?` -- ${M(L)}`:""}`}var Z=r(99),$=function(A,D,w,c){return new(w||(w=Promise))(function(L,k){function Y(z){try{Q(c.next(z))}catch(V){k(V)}}function K(z){try{Q(c.throw(z))}catch(V){k(V)}}function Q(z){var V;z.done?L(z.value):(V=z.value,V instanceof w?V:new w(function(v){v(V)})).then(Y,K)}Q((c=c.apply(A,D||[])).next())})},h=function(A,D){var w={};for(var c in A)Object.prototype.hasOwnProperty.call(A,c)&&D.indexOf(c)<0&&(w[c]=A[c]);if(A!=null&&typeof Object.getOwnPropertySymbols=="function"){var L=0;for(c=Object.getOwnPropertySymbols(A);L<c.length;L++)D.indexOf(c[L])<0&&Object.prototype.propertyIsEnumerable.call(A,c[L])&&(w[c[L]]=A[c[L]])}return w};class d extends Z{constructor(D,w){super(),this.endpoint=D,this.meta=w,this.logClient=this.getLogClient()}getLogClient(){return $(this,void 0,void 0,function*(){const{LogClient:D}=yield Promise.resolve().then(r.bind(null,230));return new D(this.endpoint)})}log(D,w){return $(this,void 0,void 0,function*(){const{level:c,message:L,error:k}=D,Y=h(D,["level","message","error"]);this.emit("logged");try{yield(yield this.logClient).log([{timestamp:new Date().toISOString(),level:c,message:L.substring(0,1e3),error:k!==void 0?p(k):void 0,meta:Object.assign(Object.assign({},Y),this.meta())}])}catch(K){console.error(`Failed to log to log-api: ${P(K)}`)}w()})}}var j=function(A,D){var w={};for(var c in A)Object.prototype.hasOwnProperty.call(A,c)&&D.indexOf(c)<0&&(w[c]=A[c]);if(A!=null&&typeof Object.getOwnPropertySymbols=="function"){var L=0;for(c=Object.getOwnPropertySymbols(A);L<c.length;L++)D.indexOf(c[L])<0&&Object.prototype.propertyIsEnumerable.call(A,c[L])&&(w[c[L]]=A[c[L]])}return w};const y={app:E.a,namespace:E.i,buildTag:E.b,instanceId:f()};let x={};const B=E.e?S.format.printf(A=>{var{timestamp:D,level:w,message:c,error:L}=A,k=j(A,["timestamp","level","message","error"]);const Y=Object.assign(Object.assign({timestamp:D?new Date(D).getTime():new Date().getTime(),level:w.toUpperCase(),message:c},L?{error:p(L)}:{}),{meta:Object.assign(Object.assign(Object.assign({},y),x),k)});try{return JSON.stringify(Y)}catch{return g(Y)}}):S.format.printf(A=>{var{timestamp:D,level:w,message:c,error:L}=A,k=j(A,["timestamp","level","message","error"]);let Y=`${D||new Date().toISOString()} ${w.toUpperCase()}: ${c} `;if(Object.keys(k).length>0)try{Y+=JSON.stringify(k)}catch{Y+=g(k)}return L&&(Y+=`
2
+ ${P(L)}`),Y}),U=Object(S.createLogger)({level:E.f});if(E.g&&U.add(new S.transports.Console({format:B,level:"debug"})),E.d&&U.add(new d(E.d,()=>Object.assign(Object.assign(Object.assign({},y),x),{level:"debug"}))),E.h){const A=o.resolve(s.tmpdir(),`silly-${E.a}.log`);U.debug("Logging silly logs to file",{filename:A}),U.add(new S.transports.File({filename:A,maxsize:1*i,maxFiles:10,format:S.format.combine((O="silly",Object(S.format)(D=>D.level===O&&D)()),B),level:"silly"}))}var O},function(e,t,r){r.d(t,"a",function(){return n});const n={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}},function(e,t){var r,n,i=e.exports={};function g(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(E){if(r===setTimeout)return setTimeout(E,0);if((r===g||!r)&&setTimeout)return r=setTimeout,setTimeout(E,0);try{return r(E,0)}catch{try{return r.call(null,E,0)}catch{return r.call(this,E,0)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:g}catch{r=g}try{n=typeof clearTimeout=="function"?clearTimeout:s}catch{n=s}})();var u,l=[],m=!1,T=-1;function b(){m&&u&&(m=!1,u.length?l=u.concat(l):T=-1,l.length&&_())}function _(){if(!m){var E=o(b);m=!0;for(var N=l.length;N;){for(u=l,l=[];++T<N;)u&&u[T].run();T=-1,N=l.length}u=null,m=!1,function(F){if(n===clearTimeout)return clearTimeout(F);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(F);try{n(F)}catch{try{return n.call(null,F)}catch{return n.call(this,F)}}}(E)}}function f(E,N){this.fun=E,this.array=N}function S(){}i.nextTick=function(E){var N=new Array(arguments.length-1);if(arguments.length>1)for(var F=1;F<arguments.length;F++)N[F-1]=arguments[F];l.push(new f(E,N)),l.length!==1||m||o(_)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=S,i.addListener=S,i.once=S,i.off=S,i.removeListener=S,i.removeAllListeners=S,i.emit=S,i.prependListener=S,i.prependOnceListener=S,i.listeners=function(E){return[]},i.binding=function(E){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(E){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(t,"configs",{value:r(117)})},function(e,t,r){(function(n){var i=r(125),g=r(126),s=r(38);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(v,I){if(o()<I)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(v=new Uint8Array(I)).__proto__=l.prototype:(v===null&&(v=new l(I)),v.length=I),v}function l(v,I,W){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(v,I,W);if(typeof v=="number"){if(typeof I=="string")throw new Error("If encoding is specified then the first argument must be a string");return b(this,v)}return m(this,v,I,W)}function m(v,I,W,ee){if(typeof I=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&I instanceof ArrayBuffer?function(J,ne,oe,he){if(ne.byteLength,oe<0||ne.byteLength<oe)throw new RangeError("'offset' is out of bounds");if(ne.byteLength<oe+(he||0))throw new RangeError("'length' is out of bounds");return ne=oe===void 0&&he===void 0?new Uint8Array(ne):he===void 0?new Uint8Array(ne,oe):new Uint8Array(ne,oe,he),l.TYPED_ARRAY_SUPPORT?(J=ne).__proto__=l.prototype:J=_(J,ne),J}(v,I,W,ee):typeof I=="string"?function(J,ne,oe){if(typeof oe=="string"&&oe!==""||(oe="utf8"),!l.isEncoding(oe))throw new TypeError('"encoding" must be a valid string encoding');var he=0|S(ne,oe),fe=(J=u(J,he)).write(ne,oe);return fe!==he&&(J=J.slice(0,fe)),J}(v,I,W):function(J,ne){if(l.isBuffer(ne)){var oe=0|f(ne.length);return(J=u(J,oe)).length===0||ne.copy(J,0,0,oe),J}if(ne){if(typeof ArrayBuffer!="undefined"&&ne.buffer instanceof ArrayBuffer||"length"in ne)return typeof ne.length!="number"||(he=ne.length)!=he?u(J,0):_(J,ne);if(ne.type==="Buffer"&&s(ne.data))return _(J,ne.data)}var he;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(v,I)}function T(v){if(typeof v!="number")throw new TypeError('"size" argument must be a number');if(v<0)throw new RangeError('"size" argument must not be negative')}function b(v,I){if(T(I),v=u(v,I<0?0:0|f(I)),!l.TYPED_ARRAY_SUPPORT)for(var W=0;W<I;++W)v[W]=0;return v}function _(v,I){var W=I.length<0?0:0|f(I.length);v=u(v,W);for(var ee=0;ee<W;ee+=1)v[ee]=255&I[ee];return v}function f(v){if(v>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|v}function S(v,I){if(l.isBuffer(v))return v.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(v)||v instanceof ArrayBuffer))return v.byteLength;typeof v!="string"&&(v=""+v);var W=v.length;if(W===0)return 0;for(var ee=!1;;)switch(I){case"ascii":case"latin1":case"binary":return W;case"utf8":case"utf-8":case void 0:return Q(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*W;case"hex":return W>>>1;case"base64":return z(v).length;default:if(ee)return Q(v).length;I=(""+I).toLowerCase(),ee=!0}}function E(v,I,W){var ee=!1;if((I===void 0||I<0)&&(I=0),I>this.length||((W===void 0||W>this.length)&&(W=this.length),W<=0)||(W>>>=0)<=(I>>>=0))return"";for(v||(v="utf8");;)switch(v){case"hex":return B(this,I,W);case"utf8":case"utf-8":return j(this,I,W);case"ascii":return y(this,I,W);case"latin1":case"binary":return x(this,I,W);case"base64":return d(this,I,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,I,W);default:if(ee)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),ee=!0}}function N(v,I,W){var ee=v[I];v[I]=v[W],v[W]=ee}function F(v,I,W,ee,J){if(v.length===0)return-1;if(typeof W=="string"?(ee=W,W=0):W>2147483647?W=2147483647:W<-2147483648&&(W=-2147483648),W=+W,isNaN(W)&&(W=J?0:v.length-1),W<0&&(W=v.length+W),W>=v.length){if(J)return-1;W=v.length-1}else if(W<0){if(!J)return-1;W=0}if(typeof I=="string"&&(I=l.from(I,ee)),l.isBuffer(I))return I.length===0?-1:M(v,I,W,ee,J);if(typeof I=="number")return I&=255,l.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?J?Uint8Array.prototype.indexOf.call(v,I,W):Uint8Array.prototype.lastIndexOf.call(v,I,W):M(v,[I],W,ee,J);throw new TypeError("val must be string, number or Buffer")}function M(v,I,W,ee,J){var ne,oe=1,he=v.length,fe=I.length;if(ee!==void 0&&((ee=String(ee).toLowerCase())==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(v.length<2||I.length<2)return-1;oe=2,he/=2,fe/=2,W/=2}function G(ae,me){return oe===1?ae[me]:ae.readUInt16BE(me*oe)}if(J){var q=-1;for(ne=W;ne<he;ne++)if(G(v,ne)===G(I,q===-1?0:ne-q)){if(q===-1&&(q=ne),ne-q+1===fe)return q*oe}else q!==-1&&(ne-=ne-q),q=-1}else for(W+fe>he&&(W=he-fe),ne=W;ne>=0;ne--){for(var te=!0,se=0;se<fe;se++)if(G(v,ne+se)!==G(I,se)){te=!1;break}if(te)return ne}return-1}function R(v,I,W,ee){W=Number(W)||0;var J=v.length-W;ee?(ee=Number(ee))>J&&(ee=J):ee=J;var ne=I.length;if(ne%2!=0)throw new TypeError("Invalid hex string");ee>ne/2&&(ee=ne/2);for(var oe=0;oe<ee;++oe){var he=parseInt(I.substr(2*oe,2),16);if(isNaN(he))return oe;v[W+oe]=he}return oe}function p(v,I,W,ee){return V(Q(I,v.length-W),v,W,ee)}function P(v,I,W,ee){return V(function(J){for(var ne=[],oe=0;oe<J.length;++oe)ne.push(255&J.charCodeAt(oe));return ne}(I),v,W,ee)}function Z(v,I,W,ee){return P(v,I,W,ee)}function $(v,I,W,ee){return V(z(I),v,W,ee)}function h(v,I,W,ee){return V(function(J,ne){for(var oe,he,fe,G=[],q=0;q<J.length&&!((ne-=2)<0);++q)oe=J.charCodeAt(q),he=oe>>8,fe=oe%256,G.push(fe),G.push(he);return G}(I,v.length-W),v,W,ee)}function d(v,I,W){return I===0&&W===v.length?i.fromByteArray(v):i.fromByteArray(v.slice(I,W))}function j(v,I,W){W=Math.min(v.length,W);for(var ee=[],J=I;J<W;){var ne,oe,he,fe,G=v[J],q=null,te=G>239?4:G>223?3:G>191?2:1;if(J+te<=W)switch(te){case 1:G<128&&(q=G);break;case 2:(192&(ne=v[J+1]))==128&&(fe=(31&G)<<6|63&ne)>127&&(q=fe);break;case 3:ne=v[J+1],oe=v[J+2],(192&ne)==128&&(192&oe)==128&&(fe=(15&G)<<12|(63&ne)<<6|63&oe)>2047&&(fe<55296||fe>57343)&&(q=fe);break;case 4:ne=v[J+1],oe=v[J+2],he=v[J+3],(192&ne)==128&&(192&oe)==128&&(192&he)==128&&(fe=(15&G)<<18|(63&ne)<<12|(63&oe)<<6|63&he)>65535&&fe<1114112&&(q=fe)}q===null?(q=65533,te=1):q>65535&&(q-=65536,ee.push(q>>>10&1023|55296),q=56320|1023&q),ee.push(q),J+=te}return function(se){var ae=se.length;if(ae<=4096)return String.fromCharCode.apply(String,se);for(var me="",ye=0;ye<ae;)me+=String.fromCharCode.apply(String,se.slice(ye,ye+=4096));return me}(ee)}t.Buffer=l,t.SlowBuffer=function(v){return+v!=v&&(v=0),l.alloc(+v)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=n.TYPED_ARRAY_SUPPORT!==void 0?n.TYPED_ARRAY_SUPPORT:function(){try{var v=new Uint8Array(1);return v.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},v.foo()===42&&typeof v.subarray=="function"&&v.subarray(1,1).byteLength===0}catch{return!1}}(),t.kMaxLength=o(),l.poolSize=8192,l._augment=function(v){return v.__proto__=l.prototype,v},l.from=function(v,I,W){return m(null,v,I,W)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(v,I,W){return function(ee,J,ne,oe){return T(J),J<=0?u(ee,J):ne!==void 0?typeof oe=="string"?u(ee,J).fill(ne,oe):u(ee,J).fill(ne):u(ee,J)}(null,v,I,W)},l.allocUnsafe=function(v){return b(null,v)},l.allocUnsafeSlow=function(v){return b(null,v)},l.isBuffer=function(v){return!(v==null||!v._isBuffer)},l.compare=function(v,I){if(!l.isBuffer(v)||!l.isBuffer(I))throw new TypeError("Arguments must be Buffers");if(v===I)return 0;for(var W=v.length,ee=I.length,J=0,ne=Math.min(W,ee);J<ne;++J)if(v[J]!==I[J]){W=v[J],ee=I[J];break}return W<ee?-1:ee<W?1:0},l.isEncoding=function(v){switch(String(v).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(v,I){if(!s(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return l.alloc(0);var W;if(I===void 0)for(I=0,W=0;W<v.length;++W)I+=v[W].length;var ee=l.allocUnsafe(I),J=0;for(W=0;W<v.length;++W){var ne=v[W];if(!l.isBuffer(ne))throw new TypeError('"list" argument must be an Array of Buffers');ne.copy(ee,J),J+=ne.length}return ee},l.byteLength=S,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var v=this.length;if(v%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var I=0;I<v;I+=2)N(this,I,I+1);return this},l.prototype.swap32=function(){var v=this.length;if(v%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var I=0;I<v;I+=4)N(this,I,I+3),N(this,I+1,I+2);return this},l.prototype.swap64=function(){var v=this.length;if(v%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var I=0;I<v;I+=8)N(this,I,I+7),N(this,I+1,I+6),N(this,I+2,I+5),N(this,I+3,I+4);return this},l.prototype.toString=function(){var v=0|this.length;return v===0?"":arguments.length===0?j(this,0,v):E.apply(this,arguments)},l.prototype.equals=function(v){if(!l.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v||l.compare(this,v)===0},l.prototype.inspect=function(){var v="",I=t.INSPECT_MAX_BYTES;return this.length>0&&(v=this.toString("hex",0,I).match(/.{2}/g).join(" "),this.length>I&&(v+=" ... ")),"<Buffer "+v+">"},l.prototype.compare=function(v,I,W,ee,J){if(!l.isBuffer(v))throw new TypeError("Argument must be a Buffer");if(I===void 0&&(I=0),W===void 0&&(W=v?v.length:0),ee===void 0&&(ee=0),J===void 0&&(J=this.length),I<0||W>v.length||ee<0||J>this.length)throw new RangeError("out of range index");if(ee>=J&&I>=W)return 0;if(ee>=J)return-1;if(I>=W)return 1;if(this===v)return 0;for(var ne=(J>>>=0)-(ee>>>=0),oe=(W>>>=0)-(I>>>=0),he=Math.min(ne,oe),fe=this.slice(ee,J),G=v.slice(I,W),q=0;q<he;++q)if(fe[q]!==G[q]){ne=fe[q],oe=G[q];break}return ne<oe?-1:oe<ne?1:0},l.prototype.includes=function(v,I,W){return this.indexOf(v,I,W)!==-1},l.prototype.indexOf=function(v,I,W){return F(this,v,I,W,!0)},l.prototype.lastIndexOf=function(v,I,W){return F(this,v,I,W,!1)},l.prototype.write=function(v,I,W,ee){if(I===void 0)ee="utf8",W=this.length,I=0;else if(W===void 0&&typeof I=="string")ee=I,W=this.length,I=0;else{if(!isFinite(I))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");I|=0,isFinite(W)?(W|=0,ee===void 0&&(ee="utf8")):(ee=W,W=void 0)}var J=this.length-I;if((W===void 0||W>J)&&(W=J),v.length>0&&(W<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");for(var ne=!1;;)switch(ee){case"hex":return R(this,v,I,W);case"utf8":case"utf-8":return p(this,v,I,W);case"ascii":return P(this,v,I,W);case"latin1":case"binary":return Z(this,v,I,W);case"base64":return $(this,v,I,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h(this,v,I,W);default:if(ne)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),ne=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(v,I,W){var ee="";W=Math.min(v.length,W);for(var J=I;J<W;++J)ee+=String.fromCharCode(127&v[J]);return ee}function x(v,I,W){var ee="";W=Math.min(v.length,W);for(var J=I;J<W;++J)ee+=String.fromCharCode(v[J]);return ee}function B(v,I,W){var ee=v.length;(!I||I<0)&&(I=0),(!W||W<0||W>ee)&&(W=ee);for(var J="",ne=I;ne<W;++ne)J+=K(v[ne]);return J}function U(v,I,W){for(var ee=v.slice(I,W),J="",ne=0;ne<ee.length;ne+=2)J+=String.fromCharCode(ee[ne]+256*ee[ne+1]);return J}function O(v,I,W){if(v%1!=0||v<0)throw new RangeError("offset is not uint");if(v+I>W)throw new RangeError("Trying to access beyond buffer length")}function A(v,I,W,ee,J,ne){if(!l.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(I>J||I<ne)throw new RangeError('"value" argument is out of bounds');if(W+ee>v.length)throw new RangeError("Index out of range")}function D(v,I,W,ee){I<0&&(I=65535+I+1);for(var J=0,ne=Math.min(v.length-W,2);J<ne;++J)v[W+J]=(I&255<<8*(ee?J:1-J))>>>8*(ee?J:1-J)}function w(v,I,W,ee){I<0&&(I=4294967295+I+1);for(var J=0,ne=Math.min(v.length-W,4);J<ne;++J)v[W+J]=I>>>8*(ee?J:3-J)&255}function c(v,I,W,ee,J,ne){if(W+ee>v.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("Index out of range")}function L(v,I,W,ee,J){return J||c(v,0,W,4),g.write(v,I,W,ee,23,4),W+4}function k(v,I,W,ee,J){return J||c(v,0,W,8),g.write(v,I,W,ee,52,8),W+8}l.prototype.slice=function(v,I){var W,ee=this.length;if((v=~~v)<0?(v+=ee)<0&&(v=0):v>ee&&(v=ee),(I=I===void 0?ee:~~I)<0?(I+=ee)<0&&(I=0):I>ee&&(I=ee),I<v&&(I=v),l.TYPED_ARRAY_SUPPORT)(W=this.subarray(v,I)).__proto__=l.prototype;else{var J=I-v;W=new l(J,void 0);for(var ne=0;ne<J;++ne)W[ne]=this[ne+v]}return W},l.prototype.readUIntLE=function(v,I,W){v|=0,I|=0,W||O(v,I,this.length);for(var ee=this[v],J=1,ne=0;++ne<I&&(J*=256);)ee+=this[v+ne]*J;return ee},l.prototype.readUIntBE=function(v,I,W){v|=0,I|=0,W||O(v,I,this.length);for(var ee=this[v+--I],J=1;I>0&&(J*=256);)ee+=this[v+--I]*J;return ee},l.prototype.readUInt8=function(v,I){return I||O(v,1,this.length),this[v]},l.prototype.readUInt16LE=function(v,I){return I||O(v,2,this.length),this[v]|this[v+1]<<8},l.prototype.readUInt16BE=function(v,I){return I||O(v,2,this.length),this[v]<<8|this[v+1]},l.prototype.readUInt32LE=function(v,I){return I||O(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+16777216*this[v+3]},l.prototype.readUInt32BE=function(v,I){return I||O(v,4,this.length),16777216*this[v]+(this[v+1]<<16|this[v+2]<<8|this[v+3])},l.prototype.readIntLE=function(v,I,W){v|=0,I|=0,W||O(v,I,this.length);for(var ee=this[v],J=1,ne=0;++ne<I&&(J*=256);)ee+=this[v+ne]*J;return ee>=(J*=128)&&(ee-=Math.pow(2,8*I)),ee},l.prototype.readIntBE=function(v,I,W){v|=0,I|=0,W||O(v,I,this.length);for(var ee=I,J=1,ne=this[v+--ee];ee>0&&(J*=256);)ne+=this[v+--ee]*J;return ne>=(J*=128)&&(ne-=Math.pow(2,8*I)),ne},l.prototype.readInt8=function(v,I){return I||O(v,1,this.length),128&this[v]?-1*(255-this[v]+1):this[v]},l.prototype.readInt16LE=function(v,I){I||O(v,2,this.length);var W=this[v]|this[v+1]<<8;return 32768&W?4294901760|W:W},l.prototype.readInt16BE=function(v,I){I||O(v,2,this.length);var W=this[v+1]|this[v]<<8;return 32768&W?4294901760|W:W},l.prototype.readInt32LE=function(v,I){return I||O(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},l.prototype.readInt32BE=function(v,I){return I||O(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},l.prototype.readFloatLE=function(v,I){return I||O(v,4,this.length),g.read(this,v,!0,23,4)},l.prototype.readFloatBE=function(v,I){return I||O(v,4,this.length),g.read(this,v,!1,23,4)},l.prototype.readDoubleLE=function(v,I){return I||O(v,8,this.length),g.read(this,v,!0,52,8)},l.prototype.readDoubleBE=function(v,I){return I||O(v,8,this.length),g.read(this,v,!1,52,8)},l.prototype.writeUIntLE=function(v,I,W,ee){v=+v,I|=0,W|=0,ee||A(this,v,I,W,Math.pow(2,8*W)-1,0);var J=1,ne=0;for(this[I]=255&v;++ne<W&&(J*=256);)this[I+ne]=v/J&255;return I+W},l.prototype.writeUIntBE=function(v,I,W,ee){v=+v,I|=0,W|=0,ee||A(this,v,I,W,Math.pow(2,8*W)-1,0);var J=W-1,ne=1;for(this[I+J]=255&v;--J>=0&&(ne*=256);)this[I+J]=v/ne&255;return I+W},l.prototype.writeUInt8=function(v,I,W){return v=+v,I|=0,W||A(this,v,I,1,255,0),l.TYPED_ARRAY_SUPPORT||(v=Math.floor(v)),this[I]=255&v,I+1},l.prototype.writeUInt16LE=function(v,I,W){return v=+v,I|=0,W||A(this,v,I,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[I]=255&v,this[I+1]=v>>>8):D(this,v,I,!0),I+2},l.prototype.writeUInt16BE=function(v,I,W){return v=+v,I|=0,W||A(this,v,I,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[I]=v>>>8,this[I+1]=255&v):D(this,v,I,!1),I+2},l.prototype.writeUInt32LE=function(v,I,W){return v=+v,I|=0,W||A(this,v,I,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[I+3]=v>>>24,this[I+2]=v>>>16,this[I+1]=v>>>8,this[I]=255&v):w(this,v,I,!0),I+4},l.prototype.writeUInt32BE=function(v,I,W){return v=+v,I|=0,W||A(this,v,I,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[I]=v>>>24,this[I+1]=v>>>16,this[I+2]=v>>>8,this[I+3]=255&v):w(this,v,I,!1),I+4},l.prototype.writeIntLE=function(v,I,W,ee){if(v=+v,I|=0,!ee){var J=Math.pow(2,8*W-1);A(this,v,I,W,J-1,-J)}var ne=0,oe=1,he=0;for(this[I]=255&v;++ne<W&&(oe*=256);)v<0&&he===0&&this[I+ne-1]!==0&&(he=1),this[I+ne]=(v/oe>>0)-he&255;return I+W},l.prototype.writeIntBE=function(v,I,W,ee){if(v=+v,I|=0,!ee){var J=Math.pow(2,8*W-1);A(this,v,I,W,J-1,-J)}var ne=W-1,oe=1,he=0;for(this[I+ne]=255&v;--ne>=0&&(oe*=256);)v<0&&he===0&&this[I+ne+1]!==0&&(he=1),this[I+ne]=(v/oe>>0)-he&255;return I+W},l.prototype.writeInt8=function(v,I,W){return v=+v,I|=0,W||A(this,v,I,1,127,-128),l.TYPED_ARRAY_SUPPORT||(v=Math.floor(v)),v<0&&(v=255+v+1),this[I]=255&v,I+1},l.prototype.writeInt16LE=function(v,I,W){return v=+v,I|=0,W||A(this,v,I,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[I]=255&v,this[I+1]=v>>>8):D(this,v,I,!0),I+2},l.prototype.writeInt16BE=function(v,I,W){return v=+v,I|=0,W||A(this,v,I,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[I]=v>>>8,this[I+1]=255&v):D(this,v,I,!1),I+2},l.prototype.writeInt32LE=function(v,I,W){return v=+v,I|=0,W||A(this,v,I,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[I]=255&v,this[I+1]=v>>>8,this[I+2]=v>>>16,this[I+3]=v>>>24):w(this,v,I,!0),I+4},l.prototype.writeInt32BE=function(v,I,W){return v=+v,I|=0,W||A(this,v,I,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),l.TYPED_ARRAY_SUPPORT?(this[I]=v>>>24,this[I+1]=v>>>16,this[I+2]=v>>>8,this[I+3]=255&v):w(this,v,I,!1),I+4},l.prototype.writeFloatLE=function(v,I,W){return L(this,v,I,!0,W)},l.prototype.writeFloatBE=function(v,I,W){return L(this,v,I,!1,W)},l.prototype.writeDoubleLE=function(v,I,W){return k(this,v,I,!0,W)},l.prototype.writeDoubleBE=function(v,I,W){return k(this,v,I,!1,W)},l.prototype.copy=function(v,I,W,ee){if(W||(W=0),ee||ee===0||(ee=this.length),I>=v.length&&(I=v.length),I||(I=0),ee>0&&ee<W&&(ee=W),ee===W||v.length===0||this.length===0)return 0;if(I<0)throw new RangeError("targetStart out of bounds");if(W<0||W>=this.length)throw new RangeError("sourceStart out of bounds");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),v.length-I<ee-W&&(ee=v.length-I+W);var J,ne=ee-W;if(this===v&&W<I&&I<ee)for(J=ne-1;J>=0;--J)v[J+I]=this[J+W];else if(ne<1e3||!l.TYPED_ARRAY_SUPPORT)for(J=0;J<ne;++J)v[J+I]=this[J+W];else Uint8Array.prototype.set.call(v,this.subarray(W,W+ne),I);return ne},l.prototype.fill=function(v,I,W,ee){if(typeof v=="string"){if(typeof I=="string"?(ee=I,I=0,W=this.length):typeof W=="string"&&(ee=W,W=this.length),v.length===1){var J=v.charCodeAt(0);J<256&&(v=J)}if(ee!==void 0&&typeof ee!="string")throw new TypeError("encoding must be a string");if(typeof ee=="string"&&!l.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee)}else typeof v=="number"&&(v&=255);if(I<0||this.length<I||this.length<W)throw new RangeError("Out of range index");if(W<=I)return this;var ne;if(I>>>=0,W=W===void 0?this.length:W>>>0,v||(v=0),typeof v=="number")for(ne=I;ne<W;++ne)this[ne]=v;else{var oe=l.isBuffer(v)?v:Q(new l(v,ee).toString()),he=oe.length;for(ne=0;ne<W-I;++ne)this[ne+I]=oe[ne%he]}return this};var Y=/[^+\/0-9A-Za-z-_]/g;function K(v){return v<16?"0"+v.toString(16):v.toString(16)}function Q(v,I){var W;I=I||1/0;for(var ee=v.length,J=null,ne=[],oe=0;oe<ee;++oe){if((W=v.charCodeAt(oe))>55295&&W<57344){if(!J){if(W>56319){(I-=3)>-1&&ne.push(239,191,189);continue}if(oe+1===ee){(I-=3)>-1&&ne.push(239,191,189);continue}J=W;continue}if(W<56320){(I-=3)>-1&&ne.push(239,191,189),J=W;continue}W=65536+(J-55296<<10|W-56320)}else J&&(I-=3)>-1&&ne.push(239,191,189);if(J=null,W<128){if((I-=1)<0)break;ne.push(W)}else if(W<2048){if((I-=2)<0)break;ne.push(W>>6|192,63&W|128)}else if(W<65536){if((I-=3)<0)break;ne.push(W>>12|224,W>>6&63|128,63&W|128)}else{if(!(W<1114112))throw new Error("Invalid code point");if((I-=4)<0)break;ne.push(W>>18|240,W>>12&63|128,W>>6&63|128,63&W|128)}}return ne}function z(v){return i.toByteArray(function(I){if((I=function(W){return W.trim?W.trim():W.replace(/^\s+|\s+$/g,"")}(I).replace(Y,"")).length<2)return"";for(;I.length%4!=0;)I+="=";return I}(v))}function V(v,I,W,ee){for(var J=0;J<ee&&!(J+W>=I.length||J>=v.length);++J)I[J+W]=v[J];return J}}).call(this,r(5))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}e.exports=r},function(e,t,r){(function(n){r.d(t,"a",function(){return s}),r.d(t,"i",function(){return o}),r.d(t,"j",function(){return u}),r.d(t,"b",function(){return l}),r.d(t,"f",function(){return m}),r.d(t,"e",function(){return T}),r.d(t,"g",function(){return b}),r.d(t,"d",function(){return _}),r.d(t,"c",function(){return f}),r.d(t,"h",function(){return S});var i=r(98);const g=i.from(Object.assign(Object.assign({},n.env),{ENVIRONMENT:n.env.ENV,APP:"realtime-sdk",NAMESPACE:"production",VERSION:n.env.VERSION,BUILD_TAG:n.env.BUILD_TAG,GIT_COMMIT:n.env.GIT_COMMIT,LOG_LEVEL:n.env.LOG_LEVEL,LOG_JSON:"false",LOG_API_ENDPOINT:n.env.LOG_API_ENDPOINT,JEST_WORKER_ID:n.env.JEST_WORKER_ID,ENABLE_SENTRY:n.env.ENABLE_SENTRY,SENTRY_DSN:n.env.SENTRY_DSN,STABLE_AGENT_VERSION:n.env.STABLE_AGENT_VERSION})),s=(g.get("ENVIRONMENT").default("").asString(),g.get("APP").default("").asString()),o=(g.get("APP_PATH").default("").asString(),g.get("API_ENDPOINT").default("").asString(),g.get("NAMESPACE").default("").asString()),u=g.get("VERSION").default("").asString(),l=g.get("BUILD_TAG").default("").asString(),m=(g.get("GIT_COMMIT").default("").asString(),g.get("ENABLE_SENTRY").default("false").asBool(),g.get("SENTRY_DSN").default("").asString(),g.get("LOG_LEVEL").default("debug").asString()),T=g.get("LOG_JSON").default("true").asBool(),b=g.get("LOG_TO_CONSOLE").default("true").asBool(),_=(g.get("STABLE_AGENT_VERSION").default("").asString(),g.get("LOG_API_ENDPOINT").asString()),f=g.get("JEST_WORKER_ID").asString(),S=(g.get("SHEET_EXPORT_MAX_ROW_COUNT").default("10000").asIntPositive(),g.get("LOG_TO_FILE").default("false").asBoolStrict())}).call(this,r(2))},function(e,t){typeof Object.create=="function"?e.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(r,n){if(n){r.super_=n;var i=function(){};i.prototype=n.prototype,r.prototype=new i,r.prototype.constructor=r}}},function(e,t,r){var n=r(95),i=n,g=Function("return this")(),s=r(94);i.object.extend(proto,s),i.exportSymbol("proto.v1.signaling.api.CreatePeerRequest",null,g),i.exportSymbol("proto.v1.signaling.api.CreatePeerResponse",null,g),i.exportSymbol("proto.v1.signaling.api.DeletePeerRequest",null,g),i.exportSymbol("proto.v1.signaling.api.DeletePeerResponse",null,g),i.exportSymbol("proto.v1.signaling.api.GetIceServersRequest",null,g),i.exportSymbol("proto.v1.signaling.api.GetIceServersResponse",null,g),i.exportSymbol("proto.v1.signaling.api.GetPeersRequest",null,g),i.exportSymbol("proto.v1.signaling.api.GetPeersResponse",null,g),i.exportSymbol("proto.v1.signaling.api.Peer",null,g),i.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamRequest",null,g),i.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamResponse",null,g),i.exportSymbol("proto.v1.signaling.api.RefreshPeerRequest",null,g),i.exportSymbol("proto.v1.signaling.api.RefreshPeerResponse",null,g),i.exportSymbol("proto.v1.signaling.api.SendSignalRequest",null,g),i.exportSymbol("proto.v1.signaling.api.SendSignalResponse",null,g),i.exportSymbol("proto.v1.signaling.api.SessionType",null,g),i.exportSymbol("proto.v1.signaling.api.Signal",null,g),proto.v1.signaling.api.Peer=function(o){n.Message.initialize(this,o,0,-1,proto.v1.signaling.api.Peer.repeatedFields_,null)},i.inherits(proto.v1.signaling.api.Peer,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Peer.displayName="proto.v1.signaling.api.Peer"),proto.v1.signaling.api.Signal=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.Signal,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Signal.displayName="proto.v1.signaling.api.Signal"),proto.v1.signaling.api.CreatePeerRequest=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.CreatePeerRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerRequest.displayName="proto.v1.signaling.api.CreatePeerRequest"),proto.v1.signaling.api.CreatePeerResponse=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.CreatePeerResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerResponse.displayName="proto.v1.signaling.api.CreatePeerResponse"),proto.v1.signaling.api.DeletePeerRequest=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.DeletePeerRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerRequest.displayName="proto.v1.signaling.api.DeletePeerRequest"),proto.v1.signaling.api.DeletePeerResponse=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.DeletePeerResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerResponse.displayName="proto.v1.signaling.api.DeletePeerResponse"),proto.v1.signaling.api.RefreshPeerRequest=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.RefreshPeerRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerRequest.displayName="proto.v1.signaling.api.RefreshPeerRequest"),proto.v1.signaling.api.RefreshPeerResponse=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.RefreshPeerResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerResponse.displayName="proto.v1.signaling.api.RefreshPeerResponse"),proto.v1.signaling.api.GetPeersRequest=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.GetPeersRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersRequest.displayName="proto.v1.signaling.api.GetPeersRequest"),proto.v1.signaling.api.GetPeersResponse=function(o){n.Message.initialize(this,o,0,-1,proto.v1.signaling.api.GetPeersResponse.repeatedFields_,null)},i.inherits(proto.v1.signaling.api.GetPeersResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersResponse.displayName="proto.v1.signaling.api.GetPeersResponse"),proto.v1.signaling.api.GetIceServersRequest=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.GetIceServersRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersRequest.displayName="proto.v1.signaling.api.GetIceServersRequest"),proto.v1.signaling.api.GetIceServersResponse=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.GetIceServersResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersResponse.displayName="proto.v1.signaling.api.GetIceServersResponse"),proto.v1.signaling.api.SendSignalRequest=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.SendSignalRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalRequest.displayName="proto.v1.signaling.api.SendSignalRequest"),proto.v1.signaling.api.SendSignalResponse=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.SendSignalResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalResponse.displayName="proto.v1.signaling.api.SendSignalResponse"),proto.v1.signaling.api.ReceiveSignalStreamRequest=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.ReceiveSignalStreamRequest,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.displayName="proto.v1.signaling.api.ReceiveSignalStreamRequest"),proto.v1.signaling.api.ReceiveSignalStreamResponse=function(o){n.Message.initialize(this,o,0,-1,null,null)},i.inherits(proto.v1.signaling.api.ReceiveSignalStreamResponse,n.Message),i.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.displayName="proto.v1.signaling.api.ReceiveSignalStreamResponse"),proto.v1.signaling.api.Peer.repeatedFields_=[5],n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Peer.prototype.toObject=function(o){return proto.v1.signaling.api.Peer.toObject(o,this)},proto.v1.signaling.api.Peer.toObject=function(o,u){var l,m={peerId:n.Message.getFieldWithDefault(u,1,""),organizationId:n.Message.getFieldWithDefault(u,2,""),userId:(l=u.getUserId())&&s.StringValue.toObject(o,l),deviceId:(l=u.getDeviceId())&&s.StringValue.toObject(o,l),sessionIdsList:(l=n.Message.getRepeatedField(u,5))==null?void 0:l,peerCreatedTimestamp:(l=u.getPeerCreatedTimestamp())&&s.Int64Value.toObject(o,l)};return o&&(m.$jspbMessageInstance=u),m}),proto.v1.signaling.api.Peer.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.Peer;return proto.v1.signaling.api.Peer.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.Peer.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=u.readString();o.setPeerId(l);break;case 2:l=u.readString(),o.setOrganizationId(l);break;case 3:l=new s.StringValue,u.readMessage(l,s.StringValue.deserializeBinaryFromReader),o.setUserId(l);break;case 4:l=new s.StringValue,u.readMessage(l,s.StringValue.deserializeBinaryFromReader),o.setDeviceId(l);break;case 5:l=u.readString(),o.addSessionIds(l);break;case 6:l=new s.Int64Value,u.readMessage(l,s.Int64Value.deserializeBinaryFromReader),o.setPeerCreatedTimestamp(l);break;default:u.skipField()}return o},proto.v1.signaling.api.Peer.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.Peer.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.Peer.serializeBinaryToWriter=function(o,u){var l=void 0;(l=o.getPeerId()).length>0&&u.writeString(1,l),(l=o.getOrganizationId()).length>0&&u.writeString(2,l),(l=o.getUserId())!=null&&u.writeMessage(3,l,s.StringValue.serializeBinaryToWriter),(l=o.getDeviceId())!=null&&u.writeMessage(4,l,s.StringValue.serializeBinaryToWriter),(l=o.getSessionIdsList()).length>0&&u.writeRepeatedString(5,l),(l=o.getPeerCreatedTimestamp())!=null&&u.writeMessage(6,l,s.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.Peer.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.Peer.prototype.setPeerId=function(o){return n.Message.setProto3StringField(this,1,o)},proto.v1.signaling.api.Peer.prototype.getOrganizationId=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.v1.signaling.api.Peer.prototype.setOrganizationId=function(o){return n.Message.setProto3StringField(this,2,o)},proto.v1.signaling.api.Peer.prototype.getUserId=function(){return n.Message.getWrapperField(this,s.StringValue,3)},proto.v1.signaling.api.Peer.prototype.setUserId=function(o){return n.Message.setWrapperField(this,3,o)},proto.v1.signaling.api.Peer.prototype.clearUserId=function(){return this.setUserId(void 0)},proto.v1.signaling.api.Peer.prototype.hasUserId=function(){return n.Message.getField(this,3)!=null},proto.v1.signaling.api.Peer.prototype.getDeviceId=function(){return n.Message.getWrapperField(this,s.StringValue,4)},proto.v1.signaling.api.Peer.prototype.setDeviceId=function(o){return n.Message.setWrapperField(this,4,o)},proto.v1.signaling.api.Peer.prototype.clearDeviceId=function(){return this.setDeviceId(void 0)},proto.v1.signaling.api.Peer.prototype.hasDeviceId=function(){return n.Message.getField(this,4)!=null},proto.v1.signaling.api.Peer.prototype.getSessionIdsList=function(){return n.Message.getRepeatedField(this,5)},proto.v1.signaling.api.Peer.prototype.setSessionIdsList=function(o){return n.Message.setField(this,5,o||[])},proto.v1.signaling.api.Peer.prototype.addSessionIds=function(o,u){return n.Message.addToRepeatedField(this,5,o,u)},proto.v1.signaling.api.Peer.prototype.clearSessionIdsList=function(){return this.setSessionIdsList([])},proto.v1.signaling.api.Peer.prototype.getPeerCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,6)},proto.v1.signaling.api.Peer.prototype.setPeerCreatedTimestamp=function(o){return n.Message.setWrapperField(this,6,o)},proto.v1.signaling.api.Peer.prototype.clearPeerCreatedTimestamp=function(){return this.setPeerCreatedTimestamp(void 0)},proto.v1.signaling.api.Peer.prototype.hasPeerCreatedTimestamp=function(){return n.Message.getField(this,6)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Signal.prototype.toObject=function(o){return proto.v1.signaling.api.Signal.toObject(o,this)},proto.v1.signaling.api.Signal.toObject=function(o,u){var l,m={sessionId:(l=u.getSessionId())&&s.StringValue.toObject(o,l),sessionCreatedTimestamp:(l=u.getSessionCreatedTimestamp())&&s.Int64Value.toObject(o,l),senderId:n.Message.getFieldWithDefault(u,3,""),receiverId:n.Message.getFieldWithDefault(u,4,""),payload:n.Message.getFieldWithDefault(u,5,""),iceServers:n.Message.getFieldWithDefault(u,6,""),iceTransportPolicy:n.Message.getFieldWithDefault(u,7,""),sessionType:n.Message.getFieldWithDefault(u,8,0)};return o&&(m.$jspbMessageInstance=u),m}),proto.v1.signaling.api.Signal.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.Signal;return proto.v1.signaling.api.Signal.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.Signal.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=new s.StringValue;u.readMessage(l,s.StringValue.deserializeBinaryFromReader),o.setSessionId(l);break;case 2:l=new s.Int64Value,u.readMessage(l,s.Int64Value.deserializeBinaryFromReader),o.setSessionCreatedTimestamp(l);break;case 3:l=u.readString(),o.setSenderId(l);break;case 4:l=u.readString(),o.setReceiverId(l);break;case 5:l=u.readString(),o.setPayload(l);break;case 6:l=u.readString(),o.setIceServers(l);break;case 7:l=u.readString(),o.setIceTransportPolicy(l);break;case 8:l=u.readEnum(),o.setSessionType(l);break;default:u.skipField()}return o},proto.v1.signaling.api.Signal.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.Signal.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.Signal.serializeBinaryToWriter=function(o,u){var l=void 0;(l=o.getSessionId())!=null&&u.writeMessage(1,l,s.StringValue.serializeBinaryToWriter),(l=o.getSessionCreatedTimestamp())!=null&&u.writeMessage(2,l,s.Int64Value.serializeBinaryToWriter),(l=o.getSenderId()).length>0&&u.writeString(3,l),(l=o.getReceiverId()).length>0&&u.writeString(4,l),(l=o.getPayload()).length>0&&u.writeString(5,l),(l=o.getIceServers()).length>0&&u.writeString(6,l),(l=o.getIceTransportPolicy()).length>0&&u.writeString(7,l),(l=o.getSessionType())!==0&&u.writeEnum(8,l)},proto.v1.signaling.api.Signal.prototype.getSessionId=function(){return n.Message.getWrapperField(this,s.StringValue,1)},proto.v1.signaling.api.Signal.prototype.setSessionId=function(o){return n.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.Signal.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionId=function(){return n.Message.getField(this,1)!=null},proto.v1.signaling.api.Signal.prototype.getSessionCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,2)},proto.v1.signaling.api.Signal.prototype.setSessionCreatedTimestamp=function(o){return n.Message.setWrapperField(this,2,o)},proto.v1.signaling.api.Signal.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionCreatedTimestamp=function(){return n.Message.getField(this,2)!=null},proto.v1.signaling.api.Signal.prototype.getSenderId=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.v1.signaling.api.Signal.prototype.setSenderId=function(o){return n.Message.setProto3StringField(this,3,o)},proto.v1.signaling.api.Signal.prototype.getReceiverId=function(){return n.Message.getFieldWithDefault(this,4,"")},proto.v1.signaling.api.Signal.prototype.setReceiverId=function(o){return n.Message.setProto3StringField(this,4,o)},proto.v1.signaling.api.Signal.prototype.getPayload=function(){return n.Message.getFieldWithDefault(this,5,"")},proto.v1.signaling.api.Signal.prototype.setPayload=function(o){return n.Message.setProto3StringField(this,5,o)},proto.v1.signaling.api.Signal.prototype.getIceServers=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.v1.signaling.api.Signal.prototype.setIceServers=function(o){return n.Message.setProto3StringField(this,6,o)},proto.v1.signaling.api.Signal.prototype.getIceTransportPolicy=function(){return n.Message.getFieldWithDefault(this,7,"")},proto.v1.signaling.api.Signal.prototype.setIceTransportPolicy=function(o){return n.Message.setProto3StringField(this,7,o)},proto.v1.signaling.api.Signal.prototype.getSessionType=function(){return n.Message.getFieldWithDefault(this,8,0)},proto.v1.signaling.api.Signal.prototype.setSessionType=function(o){return n.Message.setProto3EnumField(this,8,o)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerRequest.prototype.toObject=function(o){return proto.v1.signaling.api.CreatePeerRequest.toObject(o,this)},proto.v1.signaling.api.CreatePeerRequest.toObject=function(o,u){var l={};return o&&(l.$jspbMessageInstance=u),l}),proto.v1.signaling.api.CreatePeerRequest.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.CreatePeerRequest;return proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)u.getFieldNumber(),u.skipField();return o},proto.v1.signaling.api.CreatePeerRequest.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter=function(o,u){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerResponse.prototype.toObject=function(o){return proto.v1.signaling.api.CreatePeerResponse.toObject(o,this)},proto.v1.signaling.api.CreatePeerResponse.toObject=function(o,u){var l,m={peer:(l=u.getPeer())&&proto.v1.signaling.api.Peer.toObject(o,l)};return o&&(m.$jspbMessageInstance=u),m}),proto.v1.signaling.api.CreatePeerResponse.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.CreatePeerResponse;return proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=new proto.v1.signaling.api.Peer;u.readMessage(l,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),o.setPeer(l);break;default:u.skipField()}return o},proto.v1.signaling.api.CreatePeerResponse.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter=function(o,u){var l;(l=o.getPeer())!=null&&u.writeMessage(1,l,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.CreatePeerResponse.prototype.getPeer=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.CreatePeerResponse.prototype.setPeer=function(o){return n.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.CreatePeerResponse.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.CreatePeerResponse.prototype.hasPeer=function(){return n.Message.getField(this,1)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerRequest.prototype.toObject=function(o){return proto.v1.signaling.api.DeletePeerRequest.toObject(o,this)},proto.v1.signaling.api.DeletePeerRequest.toObject=function(o,u){var l={peerId:n.Message.getFieldWithDefault(u,1,"")};return o&&(l.$jspbMessageInstance=u),l}),proto.v1.signaling.api.DeletePeerRequest.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.DeletePeerRequest;return proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=u.readString();o.setPeerId(l);break;default:u.skipField()}return o},proto.v1.signaling.api.DeletePeerRequest.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter=function(o,u){var l;(l=o.getPeerId()).length>0&&u.writeString(1,l)},proto.v1.signaling.api.DeletePeerRequest.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.DeletePeerRequest.prototype.setPeerId=function(o){return n.Message.setProto3StringField(this,1,o)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerResponse.prototype.toObject=function(o){return proto.v1.signaling.api.DeletePeerResponse.toObject(o,this)},proto.v1.signaling.api.DeletePeerResponse.toObject=function(o,u){var l={};return o&&(l.$jspbMessageInstance=u),l}),proto.v1.signaling.api.DeletePeerResponse.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.DeletePeerResponse;return proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)u.getFieldNumber(),u.skipField();return o},proto.v1.signaling.api.DeletePeerResponse.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter=function(o,u){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerRequest.prototype.toObject=function(o){return proto.v1.signaling.api.RefreshPeerRequest.toObject(o,this)},proto.v1.signaling.api.RefreshPeerRequest.toObject=function(o,u){var l,m={peer:(l=u.getPeer())&&proto.v1.signaling.api.Peer.toObject(o,l)};return o&&(m.$jspbMessageInstance=u),m}),proto.v1.signaling.api.RefreshPeerRequest.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.RefreshPeerRequest;return proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=new proto.v1.signaling.api.Peer;u.readMessage(l,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),o.setPeer(l);break;default:u.skipField()}return o},proto.v1.signaling.api.RefreshPeerRequest.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter=function(o,u){var l;(l=o.getPeer())!=null&&u.writeMessage(1,l,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.RefreshPeerRequest.prototype.getPeer=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.RefreshPeerRequest.prototype.setPeer=function(o){return n.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.RefreshPeerRequest.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.RefreshPeerRequest.prototype.hasPeer=function(){return n.Message.getField(this,1)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerResponse.prototype.toObject=function(o){return proto.v1.signaling.api.RefreshPeerResponse.toObject(o,this)},proto.v1.signaling.api.RefreshPeerResponse.toObject=function(o,u){var l={};return o&&(l.$jspbMessageInstance=u),l}),proto.v1.signaling.api.RefreshPeerResponse.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.RefreshPeerResponse;return proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)u.getFieldNumber(),u.skipField();return o},proto.v1.signaling.api.RefreshPeerResponse.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter=function(o,u){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersRequest.prototype.toObject=function(o){return proto.v1.signaling.api.GetPeersRequest.toObject(o,this)},proto.v1.signaling.api.GetPeersRequest.toObject=function(o,u){var l={};return o&&(l.$jspbMessageInstance=u),l}),proto.v1.signaling.api.GetPeersRequest.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.GetPeersRequest;return proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)u.getFieldNumber(),u.skipField();return o},proto.v1.signaling.api.GetPeersRequest.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter=function(o,u){},proto.v1.signaling.api.GetPeersResponse.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersResponse.prototype.toObject=function(o){return proto.v1.signaling.api.GetPeersResponse.toObject(o,this)},proto.v1.signaling.api.GetPeersResponse.toObject=function(o,u){var l={peersList:n.Message.toObjectList(u.getPeersList(),proto.v1.signaling.api.Peer.toObject,o)};return o&&(l.$jspbMessageInstance=u),l}),proto.v1.signaling.api.GetPeersResponse.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.GetPeersResponse;return proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=new proto.v1.signaling.api.Peer;u.readMessage(l,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),o.addPeers(l);break;default:u.skipField()}return o},proto.v1.signaling.api.GetPeersResponse.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter=function(o,u){var l;(l=o.getPeersList()).length>0&&u.writeRepeatedMessage(1,l,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.GetPeersResponse.prototype.getPeersList=function(){return n.Message.getRepeatedWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.GetPeersResponse.prototype.setPeersList=function(o){return n.Message.setRepeatedWrapperField(this,1,o)},proto.v1.signaling.api.GetPeersResponse.prototype.addPeers=function(o,u){return n.Message.addToRepeatedWrapperField(this,1,o,proto.v1.signaling.api.Peer,u)},proto.v1.signaling.api.GetPeersResponse.prototype.clearPeersList=function(){return this.setPeersList([])},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersRequest.prototype.toObject=function(o){return proto.v1.signaling.api.GetIceServersRequest.toObject(o,this)},proto.v1.signaling.api.GetIceServersRequest.toObject=function(o,u){var l={};return o&&(l.$jspbMessageInstance=u),l}),proto.v1.signaling.api.GetIceServersRequest.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.GetIceServersRequest;return proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)u.getFieldNumber(),u.skipField();return o},proto.v1.signaling.api.GetIceServersRequest.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter=function(o,u){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersResponse.prototype.toObject=function(o){return proto.v1.signaling.api.GetIceServersResponse.toObject(o,this)},proto.v1.signaling.api.GetIceServersResponse.toObject=function(o,u){var l={iceServers:n.Message.getFieldWithDefault(u,1,"")};return o&&(l.$jspbMessageInstance=u),l}),proto.v1.signaling.api.GetIceServersResponse.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.GetIceServersResponse;return proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=u.readString();o.setIceServers(l);break;default:u.skipField()}return o},proto.v1.signaling.api.GetIceServersResponse.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter=function(o,u){var l;(l=o.getIceServers()).length>0&&u.writeString(1,l)},proto.v1.signaling.api.GetIceServersResponse.prototype.getIceServers=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.GetIceServersResponse.prototype.setIceServers=function(o){return n.Message.setProto3StringField(this,1,o)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalRequest.prototype.toObject=function(o){return proto.v1.signaling.api.SendSignalRequest.toObject(o,this)},proto.v1.signaling.api.SendSignalRequest.toObject=function(o,u){var l,m={signal:(l=u.getSignal())&&proto.v1.signaling.api.Signal.toObject(o,l)};return o&&(m.$jspbMessageInstance=u),m}),proto.v1.signaling.api.SendSignalRequest.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.SendSignalRequest;return proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=new proto.v1.signaling.api.Signal;u.readMessage(l,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),o.setSignal(l);break;default:u.skipField()}return o},proto.v1.signaling.api.SendSignalRequest.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter=function(o,u){var l;(l=o.getSignal())!=null&&u.writeMessage(1,l,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalRequest.prototype.getSignal=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.SendSignalRequest.prototype.setSignal=function(o){return n.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.SendSignalRequest.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.SendSignalRequest.prototype.hasSignal=function(){return n.Message.getField(this,1)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalResponse.prototype.toObject=function(o){return proto.v1.signaling.api.SendSignalResponse.toObject(o,this)},proto.v1.signaling.api.SendSignalResponse.toObject=function(o,u){var l,m={sessionId:(l=u.getSessionId())&&s.StringValue.toObject(o,l),sessionCreatedTimestamp:(l=u.getSessionCreatedTimestamp())&&s.Int64Value.toObject(o,l)};return o&&(m.$jspbMessageInstance=u),m}),proto.v1.signaling.api.SendSignalResponse.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.SendSignalResponse;return proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=new s.StringValue;u.readMessage(l,s.StringValue.deserializeBinaryFromReader),o.setSessionId(l);break;case 2:l=new s.Int64Value,u.readMessage(l,s.Int64Value.deserializeBinaryFromReader),o.setSessionCreatedTimestamp(l);break;default:u.skipField()}return o},proto.v1.signaling.api.SendSignalResponse.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter=function(o,u){var l=void 0;(l=o.getSessionId())!=null&&u.writeMessage(1,l,s.StringValue.serializeBinaryToWriter),(l=o.getSessionCreatedTimestamp())!=null&&u.writeMessage(2,l,s.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionId=function(){return n.Message.getWrapperField(this,s.StringValue,1)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionId=function(o){return n.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionId=function(){return n.Message.getField(this,1)!=null},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,2)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionCreatedTimestamp=function(o){return n.Message.setWrapperField(this,2,o)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionCreatedTimestamp=function(){return n.Message.getField(this,2)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.toObject=function(o){return proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject(o,this)},proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject=function(o,u){var l={peerId:n.Message.getFieldWithDefault(u,1,"")};return o&&(l.$jspbMessageInstance=u),l}),proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.ReceiveSignalStreamRequest;return proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=u.readString();o.setPeerId(l);break;default:u.skipField()}return o},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter=function(o,u){var l;(l=o.getPeerId()).length>0&&u.writeString(1,l)},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.setPeerId=function(o){return n.Message.setProto3StringField(this,1,o)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.toObject=function(o){return proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject(o,this)},proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject=function(o,u){var l,m={signal:(l=u.getSignal())&&proto.v1.signaling.api.Signal.toObject(o,l)};return o&&(m.$jspbMessageInstance=u),m}),proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary=function(o){var u=new n.BinaryReader(o),l=new proto.v1.signaling.api.ReceiveSignalStreamResponse;return proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader(l,u)},proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader=function(o,u){for(;u.nextField()&&!u.isEndGroup();)switch(u.getFieldNumber()){case 1:var l=new proto.v1.signaling.api.Signal;u.readMessage(l,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),o.setSignal(l);break;default:u.skipField()}return o},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.serializeBinary=function(){var o=new n.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter(this,o),o.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter=function(o,u){var l;(l=o.getSignal())!=null&&u.writeMessage(1,l,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.getSignal=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.setSignal=function(o){return n.Message.setWrapperField(this,1,o)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.hasSignal=function(){return n.Message.getField(this,1)!=null},proto.v1.signaling.api.SessionType={UNKNOWN:0,TELEOP:1,PORT_FORWARD:2,OBSERVE:3},i.object.extend(t,proto.v1.signaling.api)},function(e,t,r){function n(b){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _})(b)}function i(b,_){return!_||n(_)!=="object"&&typeof _!="function"?g(b):_}function g(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function s(b){var _=typeof Map=="function"?new Map:void 0;return(s=function(f){if(f===null||(S=f,Function.toString.call(S).indexOf("[native code]")===-1))return f;var S;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(_!==void 0){if(_.has(f))return _.get(f);_.set(f,E)}function E(){return o(f,arguments,m(this).constructor)}return E.prototype=Object.create(f.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),l(E,f)})(b)}function o(b,_,f){return(o=u()?Reflect.construct:function(S,E,N){var F=[null];F.push.apply(F,E);var M=new(Function.bind.apply(S,F));return N&&l(M,N.prototype),M}).apply(null,arguments)}function u(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function l(b,_){return(l=Object.setPrototypeOf||function(f,S){return f.__proto__=S,f})(b,_)}function m(b){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)})(b)}var T=function(b){(function(N,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(F&&F.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),F&&l(N,F)})(E,b);var _,f,S=(_=E,f=u(),function(){var N,F=m(_);if(f){var M=m(this).constructor;N=Reflect.construct(F,arguments,M)}else N=F.apply(this,arguments);return i(this,N)});function E(N){var F;return function(M,R){if(!(M instanceof R))throw new TypeError("Cannot call a class as a function")}(this,E),F=S.call(this,`Format functions must be synchronous taking a two arguments: (info, opts)
3
+ Found: `.concat(N.toString().split(`
4
+ `)[0],`
5
+ `)),Error.captureStackTrace(g(F),E),F}return E}(s(Error));e.exports=function(b){if(b.length>2)throw new T(b);function _(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=S}function f(S){return new _(S)}return _.prototype.transform=b,f.Format=_,f}},function(e,t,r){(function(n){var i=Object.getOwnPropertyDescriptors||function(O){for(var A=Object.keys(O),D={},w=0;w<A.length;w++)D[A[w]]=Object.getOwnPropertyDescriptor(O,A[w]);return D},g=/%[sdj%]/g;t.format=function(O){if(!F(O)){for(var A=[],D=0;D<arguments.length;D++)A.push(u(arguments[D]));return A.join(" ")}D=1;for(var w=arguments,c=w.length,L=String(O).replace(g,function(Y){if(Y==="%%")return"%";if(D>=c)return Y;switch(Y){case"%s":return String(w[D++]);case"%d":return Number(w[D++]);case"%j":try{return JSON.stringify(w[D++])}catch{return"[Circular]"}default:return Y}}),k=w[D];D<c;k=w[++D])E(k)||!p(k)?L+=" "+k:L+=" "+u(k);return L},t.deprecate=function(O,A){if(n!==void 0&&n.noDeprecation===!0)return O;if(n===void 0)return function(){return t.deprecate(O,A).apply(this,arguments)};var D=!1;return function(){if(!D){if(n.throwDeprecation)throw new Error(A);n.traceDeprecation?console.trace(A):console.error(A),D=!0}return O.apply(this,arguments)}};var s,o={};function u(O,A){var D={seen:[],stylize:m};return arguments.length>=3&&(D.depth=arguments[2]),arguments.length>=4&&(D.colors=arguments[3]),S(A)?D.showHidden=A:A&&t._extend(D,A),M(D.showHidden)&&(D.showHidden=!1),M(D.depth)&&(D.depth=2),M(D.colors)&&(D.colors=!1),M(D.customInspect)&&(D.customInspect=!0),D.colors&&(D.stylize=l),T(D,O,D.depth)}function l(O,A){var D=u.styles[A];return D?"\x1B["+u.colors[D][0]+"m"+O+"\x1B["+u.colors[D][1]+"m":O}function m(O,A){return O}function T(O,A,D){if(O.customInspect&&A&&$(A.inspect)&&A.inspect!==t.inspect&&(!A.constructor||A.constructor.prototype!==A)){var w=A.inspect(D,O);return F(w)||(w=T(O,w,D)),w}var c=function(v,I){if(M(I))return v.stylize("undefined","undefined");if(F(I)){var W="'"+JSON.stringify(I).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return v.stylize(W,"string")}if(N(I))return v.stylize(""+I,"number");if(S(I))return v.stylize(""+I,"boolean");if(E(I))return v.stylize("null","null")}(O,A);if(c)return c;var L=Object.keys(A),k=function(v){var I={};return v.forEach(function(W,ee){I[W]=!0}),I}(L);if(O.showHidden&&(L=Object.getOwnPropertyNames(A)),Z(A)&&(L.indexOf("message")>=0||L.indexOf("description")>=0))return b(A);if(L.length===0){if($(A)){var Y=A.name?": "+A.name:"";return O.stylize("[Function"+Y+"]","special")}if(R(A))return O.stylize(RegExp.prototype.toString.call(A),"regexp");if(P(A))return O.stylize(Date.prototype.toString.call(A),"date");if(Z(A))return b(A)}var K,Q="",z=!1,V=["{","}"];return f(A)&&(z=!0,V=["[","]"]),$(A)&&(Q=" [Function"+(A.name?": "+A.name:"")+"]"),R(A)&&(Q=" "+RegExp.prototype.toString.call(A)),P(A)&&(Q=" "+Date.prototype.toUTCString.call(A)),Z(A)&&(Q=" "+b(A)),L.length!==0||z&&A.length!=0?D<0?R(A)?O.stylize(RegExp.prototype.toString.call(A),"regexp"):O.stylize("[Object]","special"):(O.seen.push(A),K=z?function(v,I,W,ee,J){for(var ne=[],oe=0,he=I.length;oe<he;++oe)x(I,String(oe))?ne.push(_(v,I,W,ee,String(oe),!0)):ne.push("");return J.forEach(function(fe){fe.match(/^\d+$/)||ne.push(_(v,I,W,ee,fe,!0))}),ne}(O,A,D,k,L):L.map(function(v){return _(O,A,D,k,v,z)}),O.seen.pop(),function(v,I,W){return v.reduce(function(ee,J){return J.indexOf(`
6
+ `)>=0,ee+J.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?W[0]+(I===""?"":I+`
7
+ `)+" "+v.join(`,
8
+ `)+" "+W[1]:W[0]+I+" "+v.join(", ")+" "+W[1]}(K,Q,V)):V[0]+Q+V[1]}function b(O){return"["+Error.prototype.toString.call(O)+"]"}function _(O,A,D,w,c,L){var k,Y,K;if((K=Object.getOwnPropertyDescriptor(A,c)||{value:A[c]}).get?Y=K.set?O.stylize("[Getter/Setter]","special"):O.stylize("[Getter]","special"):K.set&&(Y=O.stylize("[Setter]","special")),x(w,c)||(k="["+c+"]"),Y||(O.seen.indexOf(K.value)<0?(Y=E(D)?T(O,K.value,null):T(O,K.value,D-1)).indexOf(`
9
+ `)>-1&&(Y=L?Y.split(`
10
+ `).map(function(Q){return" "+Q}).join(`
11
+ `).substr(2):`
12
+ `+Y.split(`
13
+ `).map(function(Q){return" "+Q}).join(`
14
+ `)):Y=O.stylize("[Circular]","special")),M(k)){if(L&&c.match(/^\d+$/))return Y;(k=JSON.stringify(""+c)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(k=k.substr(1,k.length-2),k=O.stylize(k,"name")):(k=k.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),k=O.stylize(k,"string"))}return k+": "+Y}function f(O){return Array.isArray(O)}function S(O){return typeof O=="boolean"}function E(O){return O===null}function N(O){return typeof O=="number"}function F(O){return typeof O=="string"}function M(O){return O===void 0}function R(O){return p(O)&&h(O)==="[object RegExp]"}function p(O){return typeof O=="object"&&O!==null}function P(O){return p(O)&&h(O)==="[object Date]"}function Z(O){return p(O)&&(h(O)==="[object Error]"||O instanceof Error)}function $(O){return typeof O=="function"}function h(O){return Object.prototype.toString.call(O)}function d(O){return O<10?"0"+O.toString(10):O.toString(10)}t.debuglog=function(O){if(M(s)&&(s=n.env.NODE_DEBUG||""),O=O.toUpperCase(),!o[O])if(new RegExp("\\b"+O+"\\b","i").test(s)){var A=n.pid;o[O]=function(){var D=t.format.apply(t,arguments);console.error("%s %d: %s",O,A,D)}}else o[O]=function(){};return o[O]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=S,t.isNull=E,t.isNullOrUndefined=function(O){return O==null},t.isNumber=N,t.isString=F,t.isSymbol=function(O){return typeof O=="symbol"},t.isUndefined=M,t.isRegExp=R,t.isObject=p,t.isDate=P,t.isError=Z,t.isFunction=$,t.isPrimitive=function(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||O===void 0},t.isBuffer=r(106);var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function y(){var O=new Date,A=[d(O.getHours()),d(O.getMinutes()),d(O.getSeconds())].join(":");return[O.getDate(),j[O.getMonth()],A].join(" ")}function x(O,A){return Object.prototype.hasOwnProperty.call(O,A)}t.log=function(){console.log("%s - %s",y(),t.format.apply(t,arguments))},t.inherits=r(107),t._extend=function(O,A){if(!A||!p(A))return O;for(var D=Object.keys(A),w=D.length;w--;)O[D[w]]=A[D[w]];return O};var B=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;function U(O,A){if(!O){var D=new Error("Promise was rejected with a falsy value");D.reason=O,O=D}return A(O)}t.promisify=function(O){if(typeof O!="function")throw new TypeError('The "original" argument must be of type Function');if(B&&O[B]){var A;if(typeof(A=O[B])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(A,B,{value:A,enumerable:!1,writable:!1,configurable:!0}),A}function A(){for(var D,w,c=new Promise(function(Y,K){D=Y,w=K}),L=[],k=0;k<arguments.length;k++)L.push(arguments[k]);L.push(function(Y,K){Y?w(Y):D(K)});try{O.apply(this,L)}catch(Y){w(Y)}return c}return Object.setPrototypeOf(A,Object.getPrototypeOf(O)),B&&Object.defineProperty(A,B,{value:A,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(A,i(O))},t.promisify.custom=B,t.callbackify=function(O){if(typeof O!="function")throw new TypeError('The "original" argument must be of type Function');function A(){for(var D=[],w=0;w<arguments.length;w++)D.push(arguments[w]);var c=D.pop();if(typeof c!="function")throw new TypeError("The last argument must be of type Function");var L=this,k=function(){return c.apply(L,arguments)};O.apply(this,D).then(function(Y){n.nextTick(k,null,Y)},function(Y){n.nextTick(U,Y,k)})}return Object.setPrototypeOf(A,Object.getPrototypeOf(O)),Object.defineProperties(A,i(O)),A}}).call(this,r(2))},function(e,t,r){r.d(t,"a",function(){return n});const n=i=>new Promise(g=>setTimeout(g,i||0))},function(e,t,r){(function(n){var i=n!==void 0&&n||typeof self!="undefined"&&self||window,g=Function.prototype.apply;function s(o,u){this._id=o,this._clearFn=u}t.setTimeout=function(){return new s(g.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new s(g.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(o){o&&o.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(o,u){clearTimeout(o._idleTimeoutId),o._idleTimeout=u},t.unenroll=function(o){clearTimeout(o._idleTimeoutId),o._idleTimeout=-1},t._unrefActive=t.active=function(o){clearTimeout(o._idleTimeoutId);var u=o._idleTimeout;u>=0&&(o._idleTimeoutId=setTimeout(function(){o._onTimeout&&o._onTimeout()},u))},r(140),t.setImmediate=typeof self!="undefined"&&self.setImmediate||n!==void 0&&n.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self!="undefined"&&self.clearImmediate||n!==void 0&&n.clearImmediate||this&&this.clearImmediate}).call(this,r(5))},function(e,t,r){(function(n){n===void 0||!n.version||n.version.indexOf("v0.")===0||n.version.indexOf("v1.")===0&&n.version.indexOf("v1.8.")!==0?e.exports={nextTick:function(i,g,s,o){if(typeof i!="function")throw new TypeError('"callback" argument must be a function');var u,l,m=arguments.length;switch(m){case 0:case 1:return n.nextTick(i);case 2:return n.nextTick(function(){i.call(null,g)});case 3:return n.nextTick(function(){i.call(null,g,s)});case 4:return n.nextTick(function(){i.call(null,g,s,o)});default:for(u=new Array(m-1),l=0;l<u.length;)u[l++]=arguments[l];return n.nextTick(function(){i.apply(null,u)})}}}:e.exports=n}).call(this,r(2))},function(e,t,r){(function(n){function i(g){return Object.prototype.toString.call(g)}t.isArray=function(g){return Array.isArray?Array.isArray(g):i(g)==="[object Array]"},t.isBoolean=function(g){return typeof g=="boolean"},t.isNull=function(g){return g===null},t.isNullOrUndefined=function(g){return g==null},t.isNumber=function(g){return typeof g=="number"},t.isString=function(g){return typeof g=="string"},t.isSymbol=function(g){return typeof g=="symbol"},t.isUndefined=function(g){return g===void 0},t.isRegExp=function(g){return i(g)==="[object RegExp]"},t.isObject=function(g){return typeof g=="object"&&g!==null},t.isDate=function(g){return i(g)==="[object Date]"},t.isError=function(g){return i(g)==="[object Error]"||g instanceof Error},t.isFunction=function(g){return typeof g=="function"},t.isPrimitive=function(g){return g===null||typeof g=="boolean"||typeof g=="number"||typeof g=="string"||typeof g=="symbol"||g===void 0},t.isBuffer=n.isBuffer}).call(this,r(4).Buffer)},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return typeof location!="undefined"?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return typeof navigator!="undefined"?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL=`
15
+ `,t.homedir=function(){return"/"}},function(e,t,r){var n=r(56),i=r(59).warn,g=t;g.version=r(137).version,g.transports=r(138),g.config=r(47),g.addColors=n.levels,g.format=n.format,g.createLogger=r(85),g.ExceptionHandler=r(86),g.RejectionHandler=r(90),g.Container=r(209),g.Transport=r(17),g.loggers=new g.Container;var s=g.createLogger();Object.keys(g.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(function(o){return g[o]=function(){return s[o].apply(s,arguments)}}),Object.defineProperty(g,"level",{get:function(){return s.level},set:function(o){s.level=o}}),Object.defineProperty(g,"exceptions",{get:function(){return s.exceptions}}),["exitOnError"].forEach(function(o){Object.defineProperty(g,o,{get:function(){return s[o]},set:function(u){s[o]=u}})}),Object.defineProperty(g,"default",{get:function(){return{exceptionHandlers:s.exceptionHandlers,rejectionHandlers:s.rejectionHandlers,transports:s.transports}}}),i.deprecated(g,"setLevels"),i.forFunctions(g,"useFormat",["cli"]),i.forProperties(g,"useFormat",["padLevels","stripColors"]),i.forFunctions(g,"deprecated",["addRewriter","addFilter","clone","extend"]),i.forProperties(g,"deprecated",["emitErrs","levelLength"]),i.moved(g,"createLogger","Logger")},function(e,t,r){var n=r(10),i=r(141),g=r(3).LEVEL,s=e.exports=function(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i.call(this,{objectMode:!0,highWaterMark:u.highWaterMark}),this.format=u.format,this.level=u.level,this.handleExceptions=u.handleExceptions,this.handleRejections=u.handleRejections,this.silent=u.silent,u.log&&(this.log=u.log),u.logv&&(this.logv=u.logv),u.close&&(this.close=u.close),this.once("pipe",function(l){o.levels=l.levels,o.parent=l}),this.once("unpipe",function(l){l===o.parent&&(o.parent=null,o.close&&o.close())})};n.inherits(s,i),s.prototype._write=function(o,u,l){if(this.silent||o.exception===!0&&!this.handleExceptions)return l(null);var m=this.level||this.parent&&this.parent.level;if(!m||this.levels[m]>=this.levels[o[g]]){if(o&&!this.format)return this.log(o,l);var T=void 0,b=void 0;try{b=this.format.transform(Object.assign({},o),this.format.options)}catch(_){T=_}if(T||!b){if(l(),T)throw T;return}return this.log(b,l)}return l(null)},s.prototype._writev=function(o,u){if(this.logv){var l=o.filter(this._accept,this);return l.length?this.logv(l,u):u(null)}for(var m=0;m<o.length;m++)if(this._accept(o[m]))if(!o[m].chunk||this.format){var T=void 0,b=void 0;try{b=this.format.transform(Object.assign({},o[m].chunk),this.format.options)}catch(_){T=_}if(T||!b){if(o[m].callback(),T)throw u(null),T}else this.log(b,o[m].callback)}else this.log(o[m].chunk,o[m].callback);return u(null)},s.prototype._accept=function(o){var u=o.chunk;if(this.silent)return!1;var l=this.level||this.parent&&this.parent.level;return!(u.exception!==!0&&l&&!(this.levels[l]>=this.levels[u[g]])||!this.handleExceptions&&u.exception===!0)},s.prototype._nop=function(){},e.exports.LegacyTransportStream=r(147)},function(e,t,r){var n,i=typeof Reflect=="object"?Reflect:null,g=i&&typeof i.apply=="function"?i.apply:function(E,N,F){return Function.prototype.apply.call(E,N,F)};n=i&&typeof i.ownKeys=="function"?i.ownKeys:Object.getOwnPropertySymbols?function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:function(E){return Object.getOwnPropertyNames(E)};var s=Number.isNaN||function(E){return E!=E};function o(){o.init.call(this)}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var u=10;function l(E){return E._maxListeners===void 0?o.defaultMaxListeners:E._maxListeners}function m(E,N,F,M){var R,p,P,Z;if(typeof F!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof F);if((p=E._events)===void 0?(p=E._events=Object.create(null),E._eventsCount=0):(p.newListener!==void 0&&(E.emit("newListener",N,F.listener?F.listener:F),p=E._events),P=p[N]),P===void 0)P=p[N]=F,++E._eventsCount;else if(typeof P=="function"?P=p[N]=M?[F,P]:[P,F]:M?P.unshift(F):P.push(F),(R=l(E))>0&&P.length>R&&!P.warned){P.warned=!0;var $=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(N)+" listeners added. Use emitter.setMaxListeners() to increase limit");$.name="MaxListenersExceededWarning",$.emitter=E,$.type=N,$.count=P.length,Z=$,console&&console.warn&&console.warn(Z)}return E}function T(){for(var E=[],N=0;N<arguments.length;N++)E.push(arguments[N]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,g(this.listener,this.target,E))}function b(E,N,F){var M={fired:!1,wrapFn:void 0,target:E,type:N,listener:F},R=T.bind(M);return R.listener=F,M.wrapFn=R,R}function _(E,N,F){var M=E._events;if(M===void 0)return[];var R=M[N];return R===void 0?[]:typeof R=="function"?F?[R.listener||R]:[R]:F?function(p){for(var P=new Array(p.length),Z=0;Z<P.length;++Z)P[Z]=p[Z].listener||p[Z];return P}(R):S(R,R.length)}function f(E){var N=this._events;if(N!==void 0){var F=N[E];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}function S(E,N){for(var F=new Array(N),M=0;M<N;++M)F[M]=E[M];return F}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(E){if(typeof E!="number"||E<0||s(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");u=E}}),o.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||s(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(E){for(var N=[],F=1;F<arguments.length;F++)N.push(arguments[F]);var M=E==="error",R=this._events;if(R!==void 0)M=M&&R.error===void 0;else if(!M)return!1;if(M){var p;if(N.length>0&&(p=N[0]),p instanceof Error)throw p;var P=new Error("Unhandled error."+(p?" ("+p.message+")":""));throw P.context=p,P}var Z=R[E];if(Z===void 0)return!1;if(typeof Z=="function")g(Z,this,N);else{var $=Z.length,h=S(Z,$);for(F=0;F<$;++F)g(h[F],this,N)}return!0},o.prototype.addListener=function(E,N){return m(this,E,N,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(E,N){return m(this,E,N,!0)},o.prototype.once=function(E,N){if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N);return this.on(E,b(this,E,N)),this},o.prototype.prependOnceListener=function(E,N){if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N);return this.prependListener(E,b(this,E,N)),this},o.prototype.removeListener=function(E,N){var F,M,R,p,P;if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N);if((M=this._events)===void 0)return this;if((F=M[E])===void 0)return this;if(F===N||F.listener===N)--this._eventsCount==0?this._events=Object.create(null):(delete M[E],M.removeListener&&this.emit("removeListener",E,F.listener||N));else if(typeof F!="function"){for(R=-1,p=F.length-1;p>=0;p--)if(F[p]===N||F[p].listener===N){P=F[p].listener,R=p;break}if(R<0)return this;R===0?F.shift():function(Z,$){for(;$+1<Z.length;$++)Z[$]=Z[$+1];Z.pop()}(F,R),F.length===1&&(M[E]=F[0]),M.removeListener!==void 0&&this.emit("removeListener",E,P||N)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(E){var N,F,M;if((F=this._events)===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[E]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete F[E]),this;if(arguments.length===0){var R,p=Object.keys(F);for(M=0;M<p.length;++M)(R=p[M])!=="removeListener"&&this.removeAllListeners(R);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(N=F[E])=="function")this.removeListener(E,N);else if(N!==void 0)for(M=N.length-1;M>=0;M--)this.removeListener(E,N[M]);return this},o.prototype.listeners=function(E){return _(this,E,!0)},o.prototype.rawListeners=function(E){return _(this,E,!1)},o.listenerCount=function(E,N){return typeof E.listenerCount=="function"?E.listenerCount(N):f.call(E,N)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){var n=r(146).Buffer,i=n.isEncoding||function(f){switch((f=""+f)&&f.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g(f){var S;switch(this.encoding=function(E){var N=function(F){if(!F)return"utf8";for(var M;;)switch(F){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return F;default:if(M)return;F=(""+F).toLowerCase(),M=!0}}(E);if(typeof N!="string"&&(n.isEncoding===i||!i(E)))throw new Error("Unknown encoding: "+E);return N||E}(f),this.encoding){case"utf16le":this.text=u,this.end=l,S=4;break;case"utf8":this.fillLast=o,S=4;break;case"base64":this.text=m,this.end=T,S=3;break;default:return this.write=b,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(S)}function s(f){return f<=127?0:f>>5==6?2:f>>4==14?3:f>>3==30?4:f>>6==2?-1:-2}function o(f){var S=this.lastTotal-this.lastNeed,E=function(N,F,M){if((192&F[0])!=128)return N.lastNeed=0,"\uFFFD";if(N.lastNeed>1&&F.length>1){if((192&F[1])!=128)return N.lastNeed=1,"\uFFFD";if(N.lastNeed>2&&F.length>2&&(192&F[2])!=128)return N.lastNeed=2,"\uFFFD"}}(this,f);return E!==void 0?E:this.lastNeed<=f.length?(f.copy(this.lastChar,S,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(f.copy(this.lastChar,S,0,f.length),void(this.lastNeed-=f.length))}function u(f,S){if((f.length-S)%2==0){var E=f.toString("utf16le",S);if(E){var N=E.charCodeAt(E.length-1);if(N>=55296&&N<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=f[f.length-1],f.toString("utf16le",S,f.length-1)}function l(f){var S=f&&f.length?this.write(f):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return S+this.lastChar.toString("utf16le",0,E)}return S}function m(f,S){var E=(f.length-S)%3;return E===0?f.toString("base64",S):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=f[f.length-1]:(this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1]),f.toString("base64",S,f.length-E))}function T(f){var S=f&&f.length?this.write(f):"";return this.lastNeed?S+this.lastChar.toString("base64",0,3-this.lastNeed):S}function b(f){return f.toString(this.encoding)}function _(f){return f&&f.length?this.write(f):""}t.StringDecoder=g,g.prototype.write=function(f){if(f.length===0)return"";var S,E;if(this.lastNeed){if((S=this.fillLast(f))===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<f.length?S?S+this.text(f,E):this.text(f,E):S||""},g.prototype.end=function(f){var S=f&&f.length?this.write(f):"";return this.lastNeed?S+"\uFFFD":S},g.prototype.text=function(f,S){var E=function(F,M,R){var p=M.length-1;if(p<R)return 0;var P=s(M[p]);return P>=0?(P>0&&(F.lastNeed=P-1),P):--p<R||P===-2?0:(P=s(M[p]))>=0?(P>0&&(F.lastNeed=P-2),P):--p<R||P===-2?0:(P=s(M[p]))>=0?(P>0&&(P===2?P=0:F.lastNeed=P-3),P):0}(this,f,S);if(!this.lastNeed)return f.toString("utf8",S);this.lastTotal=E;var N=f.length-(E-this.lastNeed);return f.copy(this.lastChar,0,N),f.toString("utf8",S,N)},g.prototype.fillLast=function(f){if(this.lastNeed<=f.length)return f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,f.length),this.lastNeed-=f.length}},function(e,t,r){var n=r(13),i=Object.keys||function(f){var S=[];for(var E in f)S.push(E);return S};e.exports=T;var g=r(14);g.inherits=r(7);var s=r(67),o=r(44);g.inherits(T,s);for(var u=i(o.prototype),l=0;l<u.length;l++){var m=u[l];T.prototype[m]||(T.prototype[m]=o.prototype[m])}function T(f){if(!(this instanceof T))return new T(f);s.call(this,f),o.call(this,f),f&&f.readable===!1&&(this.readable=!1),f&&f.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,f&&f.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",b)}function b(){this.allowHalfOpen||this._writableState.ended||n.nextTick(_,this)}function _(f){f.end()}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),T.prototype._destroy=function(f,S){this.push(null),this.end(),n.nextTick(S,f)}},function(e,t,r){(function(n){function i(C){var H=0;return function(){return H<C.length?{done:!1,value:C[H++]}:{done:!0}}}var g=typeof Object.defineProperties=="function"?Object.defineProperty:function(C,H,X){C!=Array.prototype&&C!=Object.prototype&&(C[H]=X.value)},s=function(C){C=[typeof window=="object"&&window,typeof self=="object"&&self,typeof n=="object"&&n,C];for(var H=0;H<C.length;++H){var X=C[H];if(X&&X.Math==Math)return X}throw Error("Cannot find global object")}(this);function o(C,H){if(H){var X=s;C=C.split(".");for(var re=0;re<C.length-1;re++){var le=C[re];le in X||(X[le]={}),X=X[le]}(H=H(re=X[C=C[C.length-1]]))!=re&&H!=null&&g(X,C,{configurable:!0,writable:!0,value:H})}}function u(C){var H=typeof Symbol!="undefined"&&Symbol.iterator&&C[Symbol.iterator];return H?H.call(C):{next:i(C)}}o("Object.is",function(C){return C||function(H,X){return H===X?H!==0||1/H==1/X:H!=H&&X!=X}}),o("Array.prototype.includes",function(C){return C||function(H,X){var re=this;re instanceof String&&(re=String(re));var le=re.length;for(0>(X=X||0)&&(X=Math.max(X+le,0));X<le;X++){var pe=re[X];if(pe===H||Object.is(pe,H))return!0}return!1}}),o("Promise",function(C){function H(ie){this.b=0,this.c=void 0,this.a=[];var ue=this.f();try{ie(ue.resolve,ue.reject)}catch(ve){ue.reject(ve)}}function X(){this.a=null}function re(ie){return ie instanceof H?ie:new H(function(ue){ue(ie)})}if(C)return C;X.prototype.b=function(ie){if(this.a==null){this.a=[];var ue=this;this.c(function(){ue.g()})}this.a.push(ie)};var le=s.setTimeout;X.prototype.c=function(ie){le(ie,0)},X.prototype.g=function(){for(;this.a&&this.a.length;){var ie=this.a;this.a=[];for(var ue=0;ue<ie.length;++ue){var ve=ie[ue];ie[ue]=null;try{ve()}catch(be){this.f(be)}}}this.a=null},X.prototype.f=function(ie){this.c(function(){throw ie})},H.prototype.f=function(){function ie(be){return function(_e){ve||(ve=!0,be.call(ue,_e))}}var ue=this,ve=!1;return{resolve:ie(this.m),reject:ie(this.g)}},H.prototype.m=function(ie){if(ie===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(ie instanceof H)this.o(ie);else{e:switch(typeof ie){case"object":var ue=ie!=null;break e;case"function":ue=!0;break e;default:ue=!1}ue?this.l(ie):this.h(ie)}},H.prototype.l=function(ie){var ue=void 0;try{ue=ie.then}catch(ve){return void this.g(ve)}typeof ue=="function"?this.u(ue,ie):this.h(ie)},H.prototype.g=function(ie){this.i(2,ie)},H.prototype.h=function(ie){this.i(1,ie)},H.prototype.i=function(ie,ue){if(this.b!=0)throw Error("Cannot settle("+ie+", "+ue+"): Promise already settled in state"+this.b);this.b=ie,this.c=ue,this.j()},H.prototype.j=function(){if(this.a!=null){for(var ie=0;ie<this.a.length;++ie)pe.b(this.a[ie]);this.a=null}};var pe=new X;return H.prototype.o=function(ie){var ue=this.f();ie.w(ue.resolve,ue.reject)},H.prototype.u=function(ie,ue){var ve=this.f();try{ie.call(ue,ve.resolve,ve.reject)}catch(be){ve.reject(be)}},H.prototype.then=function(ie,ue){function ve(Re,Me){return typeof Re=="function"?function(Ie){try{be(Re(Ie))}catch(Pe){_e(Pe)}}:Me}var be,_e,Oe=new H(function(Re,Me){be=Re,_e=Me});return this.w(ve(ie,be),ve(ue,_e)),Oe},H.prototype.catch=function(ie){return this.then(void 0,ie)},H.prototype.w=function(ie,ue){function ve(){switch(be.b){case 1:ie(be.c);break;case 2:ue(be.c);break;default:throw Error("Unexpected state: "+be.b)}}var be=this;this.a==null?pe.b(ve):this.a.push(ve)},H.resolve=re,H.reject=function(ie){return new H(function(ue,ve){ve(ie)})},H.race=function(ie){return new H(function(ue,ve){for(var be=u(ie),_e=be.next();!_e.done;_e=be.next())re(_e.value).w(ue,ve)})},H.all=function(ie){var ue=u(ie),ve=ue.next();return ve.done?re([]):new H(function(be,_e){function Oe(Ie){return function(Pe){Re[Ie]=Pe,--Me==0&&be(Re)}}var Re=[],Me=0;do Re.push(void 0),Me++,re(ve.value).w(Oe(Re.length-1),_e),ve=ue.next();while(!ve.done)})},H});var l=l||{},m=this||self;function T(C,H){C=C.split("."),H=H||m;for(var X=0;X<C.length;X++)if((H=H[C[X]])==null)return null;return H}function b(){}function _(C){var H=typeof C;if(H=="object"){if(!C)return"null";if(C instanceof Array)return"array";if(C instanceof Object)return H;var X=Object.prototype.toString.call(C);if(X=="[object Window]")return"object";if(X=="[object Array]"||typeof C.length=="number"&&C.splice!==void 0&&C.propertyIsEnumerable!==void 0&&!C.propertyIsEnumerable("splice"))return"array";if(X=="[object Function]"||C.call!==void 0&&C.propertyIsEnumerable!==void 0&&!C.propertyIsEnumerable("call"))return"function"}else if(H=="function"&&C.call===void 0)return"object";return H}function f(C){var H=typeof C;return H=="object"&&C!=null||H=="function"}function S(C,H,X){return C.call.apply(C.bind,arguments)}function E(C,H,X){if(!C)throw Error();if(2<arguments.length){var re=Array.prototype.slice.call(arguments,2);return function(){var le=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(le,re),C.apply(H,le)}}return function(){return C.apply(H,arguments)}}function N(C,H,X){return(N=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?S:E).apply(null,arguments)}function F(C,H){function X(){}X.prototype=H.prototype,C.S=H.prototype,C.prototype=new X,C.prototype.constructor=C}function M(){this.a={}}function R(C,H,X,re){this.f=C,this.c=H,this.b=X,this.a=re}function p(C,H,X,re){X=X===void 0?{}:X,this.c=C,this.a=X,this.b=H,this.f=re===void 0?null:re}function P(C,H,X,re,le,pe){this.name=C,this.a=le,this.b=pe}function Z(C,H,X){X=X===void 0?{}:X;var re=re===void 0?new M:re;return new R(H,C,X,re)}function $(C,H,X,re){return re instanceof P?re:new P(C,X,re.b||H.constructor,re.f,re.a,re.c)}function h(C){this.a=C}function d(C){switch(C){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code"}}function j(C){if(Error.captureStackTrace)Error.captureStackTrace(this,j);else{var H=Error().stack;H&&(this.stack=H)}C&&(this.message=String(C))}function y(C,H){for(var X="",re=(C=C.split("%s")).length-1,le=0;le<re;le++)X+=C[le]+(le<H.length?H[le]:"%s");j.call(this,X+C[re])}function x(){this.j=null,this.i=[],this.l=0,this.b=B,this.f=this.a=this.h=0,this.c=null,this.g=0}M.prototype.get=function(C){return this.a[C]},M.prototype.f=function(){return Object.keys(this.a)},R.prototype.getRequestMessage=function(){return this.f},R.prototype.getMethodDescriptor=function(){return this.c},R.prototype.getMetadata=function(){return this.b},R.prototype.getCallOptions=function(){return this.a},p.prototype.getResponseMessage=function(){return this.c},p.prototype.getMetadata=function(){return this.a},p.prototype.getMethodDescriptor=function(){return this.b},p.prototype.getStatus=function(){return this.f},h.prototype.on=function(C,H){return C=="data"||C=="error"?this:this.a.on(C,H)},h.prototype.removeListener=function(C,H){return this.a.removeListener(C,H)},h.prototype.cancel=function(){this.a.cancel()},F(j,Error),j.prototype.name="CustomError",F(y,j),y.prototype.name="AssertionError";var B=0,U=1,O=2,A=3,D=0,w=128;function c(C,H,X,re){throw C.b=A,C.j="The stream is broken @"+C.l+"/"+X+". Error: "+re+`. With input:
16
+ `+H,Error(C.j)}var L=Array.prototype.indexOf?function(C,H){return Array.prototype.indexOf.call(C,H,void 0)}:function(C,H){if(typeof C=="string")return typeof H!="string"||H.length!=1?-1:C.indexOf(H,0);for(var X=0;X<C.length;X++)if(X in C&&C[X]===H)return X;return-1},k,Y=String.prototype.trim?function(C){return C.trim()}:function(C){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(C)[1]};function K(C,H){return C.indexOf(H)!=-1}function Q(C,H){return C<H?-1:C>H?1:0}e:{var z=m.navigator;if(z){var V=z.userAgent;if(V){k=V;break e}}k=""}var v="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function I(C){var H=1;C=C.split(":");for(var X=[];0<H&&C.length;)X.push(C.shift()),H--;return C.length&&X.push(C.join(":")),X}function W(C){return W[" "](C),C}W[" "]=b;var ee,J,ne=K(k,"Opera"),oe=K(k,"Trident")||K(k,"MSIE"),he=K(k,"Edge"),fe=K(k,"Gecko")&&!(K(k.toLowerCase(),"webkit")&&!K(k,"Edge"))&&!(K(k,"Trident")||K(k,"MSIE"))&&!K(k,"Edge"),G=K(k.toLowerCase(),"webkit")&&!K(k,"Edge");function q(){var C=m.document;return C?C.documentMode:void 0}e:{var te="",se=(J=k,fe?/rv:([^\);]+)(\)|;)/.exec(J):he?/Edge\/([\d\.]+)/.exec(J):oe?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(J):G?/WebKit\/(\S+)/.exec(J):ne?/(?:Version)[ \/]?(\S+)/.exec(J):void 0);if(se&&(te=se?se[1]:""),oe){var ae=q();if(ae!=null&&ae>parseFloat(te)){ee=String(ae);break e}}ee=te}var me,ye={};function de(C){return function(H,X){var re=ye;return Object.prototype.hasOwnProperty.call(re,H)?re[H]:re[H]=X(H)}(C,function(){for(var H=0,X=Y(String(ee)).split("."),re=Y(String(C)).split("."),le=Math.max(X.length,re.length),pe=0;H==0&&pe<le;pe++){var ie=X[pe]||"",ue=re[pe]||"";do{if(ie=/(\d*)(\D*)(.*)/.exec(ie)||["","","",""],ue=/(\d*)(\D*)(.*)/.exec(ue)||["","","",""],ie[0].length==0&&ue[0].length==0)break;H=Q(ie[1].length==0?0:parseInt(ie[1],10),ue[1].length==0?0:parseInt(ue[1],10))||Q(ie[2].length==0,ue[2].length==0)||Q(ie[2],ue[2]),ie=ie[3],ue=ue[3]}while(H==0)}return 0<=H})}if(m.document&&oe){var ge=q();me=ge||parseInt(ee,10)||void 0}else me=void 0;var ce=me;function Se(){this.F=this.F}Se.prototype.F=!1;var we,Ae=Object.freeze||function(C){return C};(we=!oe)||(we=9<=Number(ce));var xe=we,We=oe&&!de("9"),Be=function(){if(!m.addEventListener||!Object.defineProperty)return!1;var C=!1,H=Object.defineProperty({},"passive",{get:function(){C=!0}});try{m.addEventListener("test",b,H),m.removeEventListener("test",b,H)}catch{}return C}();function Le(C,H){this.type=C,this.a=this.target=H,this.defaultPrevented=!1}function Ne(C,H){if(Le.call(this,C?C.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,C){var X=this.type=C.type,re=C.changedTouches&&C.changedTouches.length?C.changedTouches[0]:null;if(this.target=C.target||C.srcElement,this.a=H,H=C.relatedTarget){if(fe){e:{try{W(H.nodeName);var le=!0;break e}catch{}le=!1}le||(H=null)}}else X=="mouseover"?H=C.fromElement:X=="mouseout"&&(H=C.toElement);this.relatedTarget=H,re?(this.clientX=re.clientX!==void 0?re.clientX:re.pageX,this.clientY=re.clientY!==void 0?re.clientY:re.pageY,this.screenX=re.screenX||0,this.screenY=re.screenY||0):(this.clientX=C.clientX!==void 0?C.clientX:C.pageX,this.clientY=C.clientY!==void 0?C.clientY:C.pageY,this.screenX=C.screenX||0,this.screenY=C.screenY||0),this.button=C.button,this.key=C.key||"",this.ctrlKey=C.ctrlKey,this.altKey=C.altKey,this.shiftKey=C.shiftKey,this.metaKey=C.metaKey,this.pointerId=C.pointerId||0,this.pointerType=typeof C.pointerType=="string"?C.pointerType:Ue[C.pointerType]||"",this.c=C,C.defaultPrevented&&this.b()}}Le.prototype.b=function(){this.defaultPrevented=!0},F(Ne,Le);var Ue=Ae({2:"touch",3:"pen",4:"mouse"});Ne.prototype.b=function(){Ne.S.b.call(this);var C=this.c;if(C.preventDefault)C.preventDefault();else if(C.returnValue=!1,We)try{(C.ctrlKey||112<=C.keyCode&&123>=C.keyCode)&&(C.keyCode=-1)}catch{}};var De="closure_listenable_"+(1e6*Math.random()|0),Ve=0;function Ge(C,H,X,re,le){this.listener=C,this.proxy=null,this.src=H,this.type=X,this.capture=!!re,this.A=le,this.key=++Ve,this.s=this.v=!1}function ut(C){C.s=!0,C.listener=null,C.proxy=null,C.src=null,C.A=null}function nt(C){this.src=C,this.a={},this.b=0}function gt(C,H){var X=H.type;if(X in C.a){var re,le=C.a[X],pe=L(le,H);(re=0<=pe)&&Array.prototype.splice.call(le,pe,1),re&&(ut(H),C.a[X].length==0&&(delete C.a[X],C.b--))}}function ct(C,H,X,re){for(var le=0;le<C.length;++le){var pe=C[le];if(!pe.s&&pe.listener==H&&pe.capture==!!X&&pe.A==re)return le}return-1}nt.prototype.add=function(C,H,X,re,le){var pe=C.toString();(C=this.a[pe])||(C=this.a[pe]=[],this.b++);var ie=ct(C,H,re,le);return-1<ie?(H=C[ie],X||(H.v=!1)):((H=new Ge(H,this.src,pe,!!re,le)).v=X,C.push(H)),H};var ft="closure_lm_"+(1e6*Math.random()|0),pt={};function ot(C,H,X,re,le){if(re&&re.once)(function ie(ue,ve,be,_e,Oe){if(Array.isArray(ve))for(var Re=0;Re<ve.length;Re++)ie(ue,ve[Re],be,_e,Oe);else be=dt(be),ue&&ue[De]?ue.f.add(String(ve),be,!0,f(_e)?!!_e.capture:!!_e,Oe):Rt(ue,ve,be,!0,_e,Oe)})(C,H,X,re,le);else if(Array.isArray(H))for(var pe=0;pe<H.length;pe++)ot(C,H[pe],X,re,le);else X=dt(X),C&&C[De]?C.f.add(String(H),X,!1,f(re)?!!re.capture:!!re,le):Rt(C,H,X,!1,re,le)}function Rt(C,H,X,re,le,pe){if(!H)throw Error("Invalid event type");var ie=f(le)?!!le.capture:!!le,ue=it(C);if(ue||(C[ft]=ue=new nt(C)),!(X=ue.add(H,X,re,ie,pe)).proxy)if(re=function(){var ve=Kt,be=xe?function(_e){return ve.call(be.src,be.listener,_e)}:function(_e){if(!(_e=ve.call(be.src,be.listener,_e)))return _e};return be}(),X.proxy=re,re.src=C,re.listener=X,C.addEventListener)Be||(le=ie),le===void 0&&(le=!1),C.addEventListener(H.toString(),re,le);else if(C.attachEvent)C.attachEvent(Ot(H.toString()),re);else{if(!C.addListener||!C.removeListener)throw Error("addEventListener and attachEvent are unavailable.");C.addListener(re)}}function At(C){if(typeof C!="number"&&C&&!C.s){var H=C.src;if(H&&H[De])gt(H.f,C);else{var X=C.type,re=C.proxy;H.removeEventListener?H.removeEventListener(X,re,C.capture):H.detachEvent?H.detachEvent(Ot(X),re):H.addListener&&H.removeListener&&H.removeListener(re),(X=it(H))?(gt(X,C),X.b==0&&(X.src=null,H[ft]=null)):ut(C)}}}function Ot(C){return C in pt?pt[C]:pt[C]="on"+C}function jt(C,H,X,re){var le=!0;if((C=it(C))&&(H=C.a[H.toString()]))for(H=H.concat(),C=0;C<H.length;C++){var pe=H[C];pe&&pe.capture==X&&!pe.s&&(pe=It(pe,re),le=le&&pe!==!1)}return le}function It(C,H){var X=C.listener,re=C.A||C.src;return C.v&&At(C),X.call(re,H)}function Kt(C,H){if(C.s)return!0;if(!xe){var X=H||T("window.event");H=new Ne(X,this);var re=!0;if(!(0>X.keyCode||X.returnValue!=null)){e:{var le=!1;if(X.keyCode==0)try{X.keyCode=-1;break e}catch{le=!0}(le||X.returnValue==null)&&(X.returnValue=!0)}for(X=[],le=H.a;le;le=le.parentNode)X.push(le);for(C=C.type,le=X.length-1;0<=le;le--){H.a=X[le];var pe=jt(X[le],C,!0,H);re=re&&pe}for(le=0;le<X.length;le++)H.a=X[le],pe=jt(X[le],C,!1,H),re=re&&pe}return re}return It(C,new Ne(H,this))}function it(C){return(C=C[ft])instanceof nt?C:null}var ht="__closure_events_fn_"+(1e9*Math.random()>>>0);function dt(C){return _(C)=="function"?C:(C[ht]||(C[ht]=function(H){return C.handleEvent(H)}),C[ht])}function Je(){Se.call(this),this.f=new nt(this),this.N=this}function qe(C,H){C=C.N;var X=H.type||H;if(typeof H=="string")H=new Le(H,C);else if(H instanceof Le)H.target=H.target||C;else{var re=H;(function(le,pe){for(var ie,ue,ve=1;ve<arguments.length;ve++){for(ie in ue=arguments[ve])le[ie]=ue[ie];for(var be=0;be<v.length;be++)ie=v[be],Object.prototype.hasOwnProperty.call(ue,ie)&&(le[ie]=ue[ie])}})(H=new Le(X,C),re)}Ct(C=H.a=C,X,!0,H),Ct(C,X,!1,H)}function Ct(C,H,X,re){if(H=C.f.a[String(H)]){H=H.concat();for(var le=!0,pe=0;pe<H.length;++pe){var ie=H[pe];if(ie&&!ie.s&&ie.capture==X){var ue=ie.listener,ve=ie.A||ie.src;ie.v&&gt(C.f,ie),le=ue.call(ve,re)!==!1&&le}}}}function Mt(C,H,X){if(_(C)=="function")X&&(C=N(C,X));else{if(!C||typeof C.handleEvent!="function")throw Error("Invalid listener argument");C=N(C.handleEvent,C)}return 2147483647<Number(H)?-1:m.setTimeout(C,H||0)}function mt(C,H,X){this.reset(C,H,X,void 0,void 0)}F(Je,Se),Je.prototype[De]=!0,Je.prototype.addEventListener=function(C,H,X,re){ot(this,C,H,X,re)},Je.prototype.removeEventListener=function(C,H,X,re){(function le(pe,ie,ue,ve,be){if(Array.isArray(ie))for(var _e=0;_e<ie.length;_e++)le(pe,ie[_e],ue,ve,be);else ve=f(ve)?!!ve.capture:!!ve,ue=dt(ue),pe&&pe[De]?(pe=pe.f,(ie=String(ie).toString())in pe.a&&-1<(ue=ct(_e=pe.a[ie],ue,ve,be))&&(ut(_e[ue]),Array.prototype.splice.call(_e,ue,1),_e.length==0&&(delete pe.a[ie],pe.b--))):pe&&(pe=it(pe))&&(ie=pe.a[ie.toString()],pe=-1,ie&&(pe=ct(ie,ue,ve,be)),(ue=-1<pe?ie[pe]:null)&&At(ue))})(this,C,H,X,re)},mt.prototype.a=null;function yt(C){this.f=C,this.b=this.c=this.a=null}function at(C,H){this.name=C,this.value=H}mt.prototype.reset=function(C,H,X,re,le){delete this.a},at.prototype.toString=function(){return this.name};var Pt=new at("SEVERE",1e3),Jt=new at("CONFIG",700),Xt=new at("FINE",500);function Nt(C){return C.c?C.c:C.a?Nt(C.a):(function(H,X){throw new y("Failure"+(H?": "+H:""),Array.prototype.slice.call(arguments,1))}("Root logger has no level set."),null)}yt.prototype.log=function(C,H,X){if(C.value>=Nt(this).value)for(_(H)=="function"&&(H=H()),C=new mt(C,String(H),this.f),X&&(C.a=X),X=this;X;)X=X.a};var bt,vt={},st=null;function Fe(C,H){C&&C.log(Xt,H,void 0)}function xt(){}function Lt(C){var H;return(H=C.a)||(H={},Bt(C)&&(H[0]=!0,H[1]=!0),H=C.a=H),H}function Ut(){}function Dt(C){return(C=Bt(C))?new ActiveXObject(C):new XMLHttpRequest}function Bt(C){if(!C.b&&typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var H=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],X=0;X<H.length;X++){var re=H[X];try{return new ActiveXObject(re),C.b=re}catch{}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return C.b}function Ze(C,H){this.b={},this.a=[],this.c=0;var X=arguments.length;if(1<X){if(X%2)throw Error("Uneven number of arguments");for(var re=0;re<X;re+=2)this.set(arguments[re],arguments[re+1])}else C&&kt(this,C)}function _t(C){if(C.c!=C.a.length){for(var H=0,X=0;H<C.a.length;){var re=C.a[H];Xe(C.b,re)&&(C.a[X++]=re),H++}C.a.length=X}if(C.c!=C.a.length){var le={};for(X=H=0;H<C.a.length;)Xe(le,re=C.a[H])||(C.a[X++]=re,le[re]=1),H++;C.a.length=X}}function kt(C,H){if(H instanceof Ze)for(var X=H.f(),re=0;re<X.length;re++)C.set(X[re],H.get(X[re]));else for(X in H)C.set(X,H[X])}function Xe(C,H){return Object.prototype.hasOwnProperty.call(C,H)}xt.prototype.a=null,F(Ut,xt),bt=new Ut,Ze.prototype.f=function(){return _t(this),this.a.concat()},Ze.prototype.get=function(C,H){return Xe(this.b,C)?this.b[C]:H},Ze.prototype.set=function(C,H){Xe(this.b,C)||(this.c++,this.a.push(C)),this.b[C]=H},Ze.prototype.forEach=function(C,H){for(var X=this.f(),re=0;re<X.length;re++){var le=X[re],pe=this.get(le);C.call(H,pe,le,this)}};var Qt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function $e(C){Je.call(this),this.headers=new Ze,this.D=C||null,this.c=!1,this.C=this.a=null,this.J=this.o="",this.g=0,this.i="",this.h=this.I=this.m=this.G=!1,this.l=0,this.u=null,this.j=Ft,this.B=this.H=!1}F($e,Je);var Ft="",er=$e.prototype,tr=function C(H){var X;if(st||(st=new yt(""),vt[""]=st,st.c=Jt),!(X=vt[H])){X=new yt(H);var re=H.lastIndexOf("."),le=H.substr(re+1);(re=C(H.substr(0,re))).b||(re.b={}),re.b[le]=X,X.a=re,vt[H]=X}return X}("goog.net.XhrIo");er.b=tr;var rr=/^https?$/i,nr=["POST","PUT"];function or(C,H,X){if(C.a)throw Error("[goog.net.XhrIo] Object is active with another request="+C.o+"; newUri="+H);C.o=H,C.i="",C.g=0,C.J="POST",C.G=!1,C.c=!0,C.a=C.D?Dt(C.D):Dt(bt),C.C=C.D?Lt(C.D):Lt(bt),C.a.onreadystatechange=N(C.K,C);try{Fe(C.b,Ye(C,"Opening Xhr")),C.I=!0,C.a.open("POST",String(H),!0),C.I=!1}catch(pe){return Fe(C.b,Ye(C,"Error opening Xhr: "+pe.message)),void Wt(C,pe)}H=X||"";var re=function(pe){e:{for(var ie=ir,ue=pe.length,ve=typeof pe=="string"?pe.split(""):pe,be=0;be<ue;be++)if(be in ve&&ie.call(void 0,ve[be],be,pe)){ie=be;break e}ie=-1}return 0>ie?null:typeof pe=="string"?pe.charAt(ie):pe[ie]}((X=new Ze(C.headers)).f()),le=m.FormData&&H instanceof m.FormData;!(0<=L(nr,"POST"))||re||le||X.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),X.forEach(function(pe,ie){this.a.setRequestHeader(ie,pe)},C),C.j&&(C.a.responseType=C.j),"withCredentials"in C.a&&C.a.withCredentials!==C.H&&(C.a.withCredentials=C.H);try{zt(C),0<C.l&&(C.B=function(pe){return oe&&de(9)&&typeof pe.timeout=="number"&&pe.ontimeout!==void 0}(C.a),Fe(C.b,Ye(C,"Will abort after "+C.l+"ms if incomplete, xhr2 "+C.B)),C.B?(C.a.timeout=C.l,C.a.ontimeout=N(C.L,C)):C.u=Mt(C.L,C.l,C)),Fe(C.b,Ye(C,"Sending request")),C.m=!0,C.a.send(H),C.m=!1}catch(pe){Fe(C.b,Ye(C,"Send error: "+pe.message)),Wt(C,pe)}}function ir(C){return C.toLowerCase()=="content-type"}function Wt(C,H){C.c=!1,C.a&&(C.h=!0,C.a.abort(),C.h=!1),C.i=H,C.g=5,Vt(C),St(C)}function Vt(C){C.G||(C.G=!0,qe(C,"complete"),qe(C,"error"))}function Ht(C){if(C.c&&l!==void 0){if(C.C[1]&&Ke(C)==4&&C.getStatus()==2)Fe(C.b,Ye(C,"Local request error detected and ignored"));else if(C.m&&Ke(C)==4)Mt(C.K,0,C);else if(qe(C,"readystatechange"),Ke(C)==4){Fe(C.b,Ye(C,"Request complete")),C.c=!1;try{var H,X=C.getStatus();e:switch(X){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var re=!0;break e;default:re=!1}if(!(H=re)){var le;if(le=X===0){var pe=String(C.o).match(Qt)[1]||null;if(!pe&&m.self&&m.self.location){var ie=m.self.location.protocol;pe=ie.substr(0,ie.length-1)}le=!rr.test(pe?pe.toLowerCase():"")}H=le}if(H)qe(C,"complete"),qe(C,"success");else{C.g=6;try{var ue=2<Ke(C)?C.a.statusText:""}catch(ve){Fe(C.b,"Can not get status: "+ve.message),ue=""}C.i=ue+" ["+C.getStatus()+"]",Vt(C)}}finally{St(C)}}}}function St(C){if(C.a){zt(C);var H=C.a,X=C.C[0]?b:null;C.a=null,C.C=null,qe(C,"ready");try{H.onreadystatechange=X}catch(re){(C=C.b)&&C.log(Pt,"Problem encountered resetting onreadystatechange: "+re.message,void 0)}}}function zt(C){C.a&&C.B&&(C.a.ontimeout=null),C.u&&(m.clearTimeout(C.u),C.u=null)}function Ke(C){return C.a?C.a.readyState:0}function Gt(C,H){if(C.a&&Ke(C)==4)return(C=C.a.getResponseHeader(H))===null?void 0:C}function Ye(C,H){return H+" ["+C.J+" "+C.o+" "+C.getStatus()+"]"}$e.prototype.L=function(){l!==void 0&&this.a&&(this.i="Timed out after "+this.l+"ms, aborting",this.g=8,Fe(this.b,Ye(this,this.i)),qe(this,"timeout"),this.abort(8))},$e.prototype.abort=function(C){this.a&&this.c&&(Fe(this.b,Ye(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.g=C||7,qe(this,"complete"),qe(this,"abort"),St(this))},$e.prototype.K=function(){this.F||(this.I||this.m||this.h?Ht(this):this.O())},$e.prototype.O=function(){Ht(this)},$e.prototype.getStatus=function(){try{return 2<Ke(this)?this.a.status:-1}catch{return-1}};var qt={},tt=null;function ar(C){var H=C.length,X=3*H/4;X%3?X=Math.floor(X):K("=.",C[H-1])&&(X=K("=.",C[H-2])?X-2:X-1);var re=new Uint8Array(X),le=0;return function(pe,ie){function ue(Me){for(;ve<pe.length;){var Ie=pe.charAt(ve++),Pe=tt[Ie];if(Pe!=null)return Pe;if(!/^[\s\xa0]*$/.test(Ie))throw Error("Unknown base64 encoding at char: "+Ie)}return Me}Yt();for(var ve=0;;){var be=ue(-1),_e=ue(0),Oe=ue(64),Re=ue(64);if(Re===64&&be===-1)break;ie(be<<2|_e>>4),Oe!=64&&(ie(_e<<4&240|Oe>>2),Re!=64&&ie(Oe<<6&192|Re))}}(C,function(pe){re[le++]=pe}),re.subarray(0,le)}function Yt(){if(!tt){tt={};for(var C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),H=["+/=","+/","-_=","-_.","-_"],X=0;5>X;X++){var re=C.concat(H[X].split(""));qt[X]=re;for(var le=0;le<re.length;le++){var pe=re[le];tt[pe]===void 0&&(tt[pe]=le)}}}}var sr=["content-type","grpc-status","grpc-message"];function He(C){this.a=C.T,this.l=null,this.b=[],this.h=[],this.g=[],this.f=[],this.c=[],this.j=!1,this.i=0,this.m=new x;var H=this;ot(this.a,"readystatechange",function(){var X=H.a;if(X=X.a?X.a.getResponseHeader("Content-Type"):null){if((X=X.toLowerCase()).lastIndexOf("application/grpc-web-text",0)==0){X=H.a;try{var re=X.a?X.a.responseText:""}catch(be){Fe(X.b,"Can not get responseText: "+be.message),re=""}if(re=(X=re||"").length-X.length%4,(X=X.substr(H.i,re-H.i)).length==0)return;H.i=re,X=ar(X)}else{if(X.lastIndexOf("application/grpc",0)!=0)return void Qe(H,{code:2,message:"Unknown Content-type received.",metadata:{}});X=new Uint8Array(function(be){try{if(!be.a)return null;if("response"in be.a)return be.a.response;switch(be.j){case Ft:case"text":return be.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in be.a)return be.a.mozResponseArrayBuffer}var _e=be.b;return _e&&_e.log(Pt,"Response type "+be.j+" is not supported on this browser",void 0),null}catch(Oe){return Fe(be.b,"Can not get response: "+Oe.message),null}}(H.a))}re=null;try{re=function(be,_e){function Oe(et){Ee.f++,Ee.a=(Ee.a<<8)+et,Ee.f==4&&(Ee.b=O,Ee.g=0,typeof Uint8Array!="undefined"?Ee.c=new Uint8Array(Ee.a):Ee.c=Array(Ee.a),Ee.a==0&&Me())}function Re(et){Ee.c[Ee.g++]=et,Ee.g==Ee.a&&Me()}function Me(){var et={};et[Ee.h]=Ee.c,Ee.i.push(et),Ee.b=B}var Ie,Pe,Ee=be,ze=0;for(Ie=_e instanceof Uint8Array||_e instanceof Array?_e:new Uint8Array(_e);ze<Ie.length;){switch(Ee.b){case A:c(Ee,Ie,ze,"stream already broken");break;case B:(Pe=Ie[ze])==D||Pe==w?Ee.h=Pe:c(Ee,Ie,ze,"invalid frame byte"),Ee.b=U,Ee.a=0,Ee.f=0;break;case U:Oe(Ie[ze]);break;case O:Re(Ie[ze]);break;default:throw Error("unexpected parser state: "+Ee.b)}Ee.l++,ze++}return be=Ee.i,Ee.i=[],0<be.length?be:null}(H.m,X)}catch{Qe(H,{code:2,message:"Error in parsing response body",metadata:{}})}if(re)for(X=0;X<re.length;X++){if(D in re[X]){var le=re[X][D];if(le)try{var pe=H.l(le);if(pe){le=H;for(var ie=pe,ue=0;ue<le.b.length;ue++)le.b[ue](ie)}}catch{Qe(H,{code:2,message:"Error in response deserializer function.",metadata:{}})}}if(w in re[X]&&0<re[X][w].length){for(le="",ie=0;ie<re[X][w].length;ie++)le+=String.fromCharCode(re[X][w][ie]);for(le=le.trim().split(`\r
17
+ `),ie={},ue=0;ue<le.length;ue++){var ve=le[ue].indexOf(":");ie[le[ue].substring(0,ve).trim()]=le[ue].substring(ve+1).trim()}le=ie,ie=0,ue="","grpc-status"in le&&(ie=le["grpc-status"],delete le["grpc-status"]),"grpc-message"in le&&(ue=le["grpc-message"],delete le["grpc-message"]),Qe(H,{code:Number(ie),message:ue,metadata:le})}}}}),ot(this.a,"complete",function(){var X=H.a.g,re="",le={},pe=function(ue){var ve={};ue=(ue.a&&Ke(ue)==4&&ue.a.getAllResponseHeaders()||"").split(`\r
18
+ `);for(var be=0;be<ue.length;be++)if(!/^[\s\xa0]*$/.test(ue[be])){var _e=I(ue[be]),Oe=_e[0];if(typeof(_e=_e[1])=="string"){_e=_e.trim();var Re=ve[Oe]||[];ve[Oe]=Re,Re.push(_e)}}return function(Me,Ie){var Pe,Ee={};for(Pe in Me)Ee[Pe]=Ie.call(void 0,Me[Pe],Pe,Me);return Ee}(ve,function(Me){return Me.join(", ")})}(H.a);if(Object.keys(pe).forEach(function(ue){sr.includes(ue)||(le[ue]=pe[ue])}),function(ue,ve){for(var be=0;be<ue.g.length;be++)ue.g[be](ve)}(H,le),X!=0){switch(X){case 7:var ie=10;break;case 8:ie=4;break;case 6:ie=function(ue){switch(ue){case 200:return 0;case 400:return 3;case 401:return 16;case 403:return 7;case 404:return 5;case 409:return 10;case 412:return 9;case 429:return 8;case 499:return 1;case 500:return 2;case 501:return 12;case 503:return 14;case 504:return 4;default:return 2}}(H.a.getStatus());break;default:ie=14}ie==10&&H.j||Qe(H,{code:ie,message:d(X),metadata:{}})}else X=!1,"grpc-status"in pe&&(ie=Gt(H.a,"grpc-status"),"grpc-message"in pe&&(re=Gt(H.a,"grpc-message")),Number(ie)!=0&&(Qe(H,{code:Number(ie),message:re,metadata:pe}),X=!0)),X||function(ue){for(var ve=0;ve<ue.c.length;ve++)ue.c[ve]()}(H)})}function rt(C,H){-1<(H=C.indexOf(H))&&C.splice(H,1)}function Qe(C,H){if(H.code!=0)for(var X={code:H.code,message:decodeURIComponent(H.message||""),metadata:H.metadata},re=0;re<C.f.length;re++)C.f[re](X);for(H={code:H.code,details:decodeURIComponent(H.message||""),metadata:H.metadata},X=0;X<C.h.length;X++)C.h[X](H)}function ke(C){this.a=T("format",C)||"text",this.f=T("suppressCorsPreflight",C)||!1,this.c=T("withCredentials",C)||!1,this.b=T("streamInterceptors",C)||[],this.g=T("unaryInterceptors",C)||[]}function wt(C,H,X){var re=H.getMethodDescriptor(),le=X+re.name;(X=new $e).H=C.c;var pe=new He({T:X});if(pe.l=re.b,kt(X.headers,H.getMetadata()),C.a=="text"?(X.headers.set("Content-Type","application/grpc-web-text"),X.headers.set("Accept","application/grpc-web-text")):X.headers.set("Content-Type","application/grpc-web+proto"),X.headers.set("X-User-Agent","grpc-web-javascript/0.1"),X.headers.set("X-Grpc-Web","1"),Xe(X.headers.b,"deadline")){var ie=X.headers.get("deadline");ie=Math.round(ie-new Date().getTime());var ue=X.headers;Xe(ue.b,"deadline")&&(delete ue.b.deadline,ue.c--,ue.a.length>2*ue.c&&_t(ue)),1/0===ie&&(ie=0),0<ie&&X.headers.set("grpc-timeout",ie+"m")}if(C.f){_t(ue=X.headers),ie={};for(var ve=0;ve<ue.a.length;ve++){var be=ue.a[ve];ie[be]=ue.b[be]}(ue=X.headers).b={},ue.a.length=0,ue.c=0;e:{for(_e in ie){var _e=!1;break e}_e=!0}_e||(ie=function(Me){var Ie="";return function(Pe,Ee){for(var ze in Pe)Ee.call(void 0,Pe[ze],ze,Pe)}(Me,function(Pe,Ee){Ie+=Ee,Ie+=":",Ie+=Pe,Ie+=`\r
19
+ `}),Ie}(ie),typeof le=="string"?(_e=encodeURIComponent("$httpHeaders"),(_e+=ie=ie!=null?"="+encodeURIComponent(String(ie)):"")&&(0>(ie=le.indexOf("#"))&&(ie=le.length),0>(ue=le.indexOf("?"))||ue>ie?(ue=ie,ve=""):ve=le.substring(ue+1,ie),ie=(le=[le.substr(0,ue),ve,le.substr(ie)])[1],le[1]=_e?ie?ie+"&"+_e:_e:ie,le=le[0]+(le[1]?"?"+le[1]:"")+le[2])):le.a("$httpHeaders",ie))}for(re=(H=(0,re.a)(H.getRequestMessage())).length,_e=[0,0,0,0],ie=new Uint8Array(5+re),ue=3;0<=ue;ue--)_e[ue]=re%256,re>>>=8;if(ie.set(new Uint8Array(_e),1),ie.set(H,5),H=ie,C.a=="text"){var Oe;for(C=H,Oe===void 0&&(Oe=0),Yt(),Oe=qt[Oe],H=[],re=0;re<C.length;re+=3){be=C[re];var Re=(_e=re+1<C.length)?C[re+1]:0;ue=be>>2,be=(3&be)<<4|Re>>4,Re=(15&Re)<<2|(ve=(ie=re+2<C.length)?C[re+2]:0)>>6,ve&=63,ie||(ve=64,_e||(Re=64)),H.push(Oe[ue],Oe[be],Oe[Re]||"",Oe[ve]||"")}H=H.join("")}else C.a=="binary"&&(X.j="arraybuffer");return or(X,le,H),pe}function $t(C,H,X){var re=null,le=!1;C.on("data",function(pe){re=pe}),C.on("error",function(pe){pe.code==0||le||(le=!0,H(pe,null))}),C.on("status",function(pe){pe.code==0||le?X&&H(null,null,pe):(le=!0,H({code:pe.code,message:pe.details,metadata:pe.metadata},null))}),X&&C.on("metadata",function(pe){H(null,null,null,pe)}),C.on("end",function(){le||(re==null?H({code:2,message:"Incomplete response"}):H(null,re)),X&&H(null,null)})}function Et(C,H){var X=C;return H.forEach(function(re){var le=X;X=function(pe){return re.intercept(pe,le)}}),X}He.prototype.on=function(C,H){return C=="data"?this.b.push(H):C=="status"?this.h.push(H):C=="metadata"?this.g.push(H):C=="end"?this.c.push(H):C=="error"&&this.f.push(H),this},He.prototype.removeListener=function(C,H){return C=="data"?rt(this.b,H):C=="status"?rt(this.h,H):C=="metadata"?rt(this.g,H):C=="end"?rt(this.c,H):C=="error"&&rt(this.f,H),this},He.prototype.cancel=function(){this.j=!0,this.a.abort()},He.prototype.cancel=He.prototype.cancel,He.prototype.removeListener=He.prototype.removeListener,He.prototype.on=He.prototype.on,ke.prototype.P=function(C,H,X,re,le){var pe=this;re=$(C,H,"unary",re);var ie=C.substr(0,C.length-re.name.length);return $t(C=Et(function(ue){return wt(pe,ue,ie)},this.b).call(this,Z(re,H,X)),le,!1),new h(C)},ke.prototype.M=function(C,H,X,re){var le=this;re=$(C,H,"unary",re);var pe=C.substr(0,C.length-re.name.length);return Et(function(ie){return new Promise(function(ue,ve){var be,_e,Oe;$t(wt(le,ie,pe),function(Re,Me,Ie,Pe){Re?ve(Re):Me?Oe=Me:Ie?_e=Ie:Pe?be=Pe:(Re=ie.getMethodDescriptor(),ue(new p(Oe,Re,Me=(Me=be)===void 0?{}:Me,_e===void 0?null:_e)))},!0)})},this.g).call(this,Z(re,H,X)).then(function(ie){return ie.getResponseMessage()})},ke.prototype.unaryCall=function(C,H,X,re){return this.M(C,H,X,re)},ke.prototype.R=function(C,H,X,re){var le=this;re=$(C,H,"server_streaming",re);var pe=C.substr(0,C.length-re.name.length);return Et(function(ie){return wt(le,ie,pe)},this.b).call(this,Z(re,H,X))},ke.prototype.serverStreaming=ke.prototype.R,ke.prototype.unaryCall=ke.prototype.unaryCall,ke.prototype.thenableCall=ke.prototype.M,ke.prototype.rpcCall=ke.prototype.P,e.exports.AbstractClientBase={MethodInfo:function(C,H,X,re,le){this.name=re,this.b=le,this.f=C,this.a=H,this.c=X}},e.exports.GrpcWebClientBase=ke,e.exports.StatusCode={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,UNAUTHENTICATED:16,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15},e.exports.MethodDescriptor=P,e.exports.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming"}}).call(this,r(5))},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=t.isAsyncGenerator=t.isAsync=void 0;var n,i=r(151),g=(n=i)&&n.__esModule?n:{default:n};function s(o){return o[Symbol.toStringTag]==="AsyncFunction"}t.default=function(o){if(typeof o!="function")throw new Error("expected a function");return s(o)?(0,g.default)(o):o},t.isAsync=s,t.isAsyncGenerator=function(o){return o[Symbol.toStringTag]==="AsyncGenerator"},t.isAsyncIterable=function(o){return typeof o[Symbol.asyncIterator]=="function"}},function(e,t,r){var n={};function i(s,o,u){u||(u=Error);var l=function(m){var T,b;function _(f,S,E){return m.call(this,function(N,F,M){return typeof o=="string"?o:o(N,F,M)}(f,S,E))||this}return b=m,(T=_).prototype=Object.create(b.prototype),T.prototype.constructor=T,T.__proto__=b,_}(u);l.prototype.name=u.name,l.prototype.code=s,n[s]=l}function g(s,o){if(Array.isArray(s)){var u=s.length;return s=s.map(function(l){return String(l)}),u>2?"one of ".concat(o," ").concat(s.slice(0,u-1).join(", "),", or ")+s[u-1]:u===2?"one of ".concat(o," ").concat(s[0]," or ").concat(s[1]):"of ".concat(o," ").concat(s[0])}return"of ".concat(o," ").concat(String(s))}i("ERR_INVALID_OPT_VALUE",function(s,o){return'The value "'+o+'" is invalid for option "'+s+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(s,o,u){var l,m,T;if(typeof o=="string"&&(m="not ",o.substr(0,m.length)===m)?(l="must not be",o=o.replace(/^not /,"")):l="must be",function(_,f,S){return(S===void 0||S>_.length)&&(S=_.length),_.substring(S-f.length,S)===f}(s," argument"))T="The ".concat(s," ").concat(l," ").concat(g(o,"type"));else{var b=function(_,f,S){return typeof S!="number"&&(S=0),!(S+f.length>_.length)&&_.indexOf(f,S)!==-1}(s,".")?"property":"argument";T='The "'.concat(s,'" ').concat(b," ").concat(l," ").concat(g(o,"type"))}return T+=". Received type ".concat(typeof u)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},function(e,t,r){(function(n){var i=Object.keys||function(_){var f=[];for(var S in _)f.push(S);return f};e.exports=m;var g=r(75),s=r(79);r(7)(m,g);for(var o=i(s.prototype),u=0;u<o.length;u++){var l=o[u];m.prototype[l]||(m.prototype[l]=s.prototype[l])}function m(_){if(!(this instanceof m))return new m(_);g.call(this,_),s.call(this,_),this.allowHalfOpen=!0,_&&(_.readable===!1&&(this.readable=!1),_.writable===!1&&(this.writable=!1),_.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",T)))}function T(){this._writableState.ended||n.nextTick(b,this)}function b(_){_.end()}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(m.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(m.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(m.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(_){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=_,this._writableState.destroyed=_)}})}).call(this,r(2))},function(e,t,r){r.d(t,"a",function(){return s});var n=r(36),i=r(6);const g={"app-id":["app-id must match formant/*"]};class s extends n.a{constructor(u,l={}){super(u,Object.assign({validateHeaders:m=>`${m.get("app-id")}`.startsWith("formant/")?{}:g,headers:Object.assign(Object.assign({},s.headers),{"App-ID":`formant/${i.a}`,"App-Version":i.j})},l)),this.endpoint=u}}s.headers={}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n,i=n.length){if(!i)throw new Error("arity is undefined");return function(...g){return typeof g[i-1]=="function"?n.apply(this,g):new Promise((s,o)=>{g[i-1]=(u,...l)=>{if(u)return o(u);s(l.length>1?l:l[0])},n.apply(this,g)})}},e.exports=t.default},function(e,t,r){(t=e.exports=r(67)).Stream=t,t.Readable=t,t.Writable=r(44),t.Duplex=r(20),t.Transform=r(70),t.PassThrough=r(164)},function(e,t,r){(t=e.exports=r(75)).Stream=t,t.Readable=t,t.Writable=r(79),t.Duplex=r(24),t.Transform=r(80),t.PassThrough=r(183),t.finished=r(45),t.pipeline=r(184)},function(e,t,r){r.d(t,"a",function(){return i});const n=["password","secret","token","key","buffer"];function i(g,s=new Set){return s.has(g)?"[ RECURSIVE ]":!(o=g)||typeof o!="object"&&typeof o!="function"?g:(s.add(g),Object.keys(g).reduce((u,l)=>(u[l]=n.some(m=>l.toLowerCase().includes(m.toLowerCase()))?"[ REDACTED ]":i(g[l],s),u),{}));var o}},function(e,t){e.exports=n,n.default=n,n.stable=g,n.stableStringify=g;var r=[];function n(s,o,u){(function T(b,_,f,S){var E;if(typeof b=="object"&&b!==null){for(E=0;E<f.length;E++)if(f[E]===b)return S[_]="[Circular]",void r.push([S,_,b]);if(f.push(b),Array.isArray(b))for(E=0;E<b.length;E++)T(b[E],E,f,b);else{var N=Object.keys(b);for(E=0;E<N.length;E++){var F=N[E];T(b[F],F,f,b)}}f.pop()}})(s,"",[],void 0);for(var l=JSON.stringify(s,o,u);r.length!==0;){var m=r.pop();m[0][m[1]]=m[2]}return l}function i(s,o){return s<o?-1:s>o?1:0}function g(s,o,u){for(var l=function b(_,f,S,E){var N;if(typeof _=="object"&&_!==null){for(N=0;N<S.length;N++)if(S[N]===_)return E[f]="[Circular]",void r.push([E,f,_]);if(typeof _.toJSON=="function")return;if(S.push(_),Array.isArray(_))for(N=0;N<_.length;N++)b(_[N],N,S,_);else{var F={},M=Object.keys(_).sort(i);for(N=0;N<M.length;N++){var R=M[N];b(_[R],R,S,_),F[R]=_[R]}if(E===void 0)return F;r.push([E,f,_]),E[f]=F}S.pop()}}(s,"",[],void 0)||s,m=JSON.stringify(l,o,u);r.length!==0;){var T=r.pop();T[0][T[1]]=T[2]}return m}},function(e,t,r){var n=r(13),i=Object.keys||function(f){var S=[];for(var E in f)S.push(E);return S};e.exports=T;var g=Object.create(r(14));g.inherits=r(7);var s=r(142),o=r(60);g.inherits(T,s);for(var u=i(o.prototype),l=0;l<u.length;l++){var m=u[l];T.prototype[m]||(T.prototype[m]=o.prototype[m])}function T(f){if(!(this instanceof T))return new T(f);s.call(this,f),o.call(this,f),f&&f.readable===!1&&(this.readable=!1),f&&f.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,f&&f.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",b)}function b(){this.allowHalfOpen||this._writableState.ended||n.nextTick(_,this)}function _(f){f.end()}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),T.prototype._destroy=function(f,S){this.push(null),this.end(),n.nextTick(S,f)}},function(e,t,r){var n=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function i(o,u){return Object.prototype.hasOwnProperty.call(o,u)}t.assign=function(o){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var l=u.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var m in l)i(l,m)&&(o[m]=l[m])}}return o},t.shrinkBuf=function(o,u){return o.length===u?o:o.subarray?o.subarray(0,u):(o.length=u,o)};var g={arraySet:function(o,u,l,m,T){if(u.subarray&&o.subarray)o.set(u.subarray(l,l+m),T);else for(var b=0;b<m;b++)o[T+b]=u[l+b]},flattenChunks:function(o){var u,l,m,T,b,_;for(m=0,u=0,l=o.length;u<l;u++)m+=o[u].length;for(_=new Uint8Array(m),T=0,u=0,l=o.length;u<l;u++)b=o[u],_.set(b,T),T+=b.length;return _}},s={arraySet:function(o,u,l,m,T){for(var b=0;b<m;b++)o[T+b]=u[l+b]},flattenChunks:function(o){return[].concat.apply([],o)}};t.setTyped=function(o){o?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,g)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(n)},function(e,t,r){e.exports=r(185)},function(e,t,r){e.exports=function(n){return n}},function(e,t,r){e.exports=function(n,i){i||(i={}),typeof i=="function"&&(i={cmp:i});var g,s=typeof i.cycles=="boolean"&&i.cycles,o=i.cmp&&(g=i.cmp,function(l){return function(m,T){var b={key:m,value:l[m]},_={key:T,value:l[T]};return g(b,_)}}),u=[];return function l(m){if(m&&m.toJSON&&typeof m.toJSON=="function"&&(m=m.toJSON()),m!==void 0){if(typeof m=="number")return isFinite(m)?""+m:"null";if(typeof m!="object")return JSON.stringify(m);var T,b;if(Array.isArray(m)){for(b="[",T=0;T<m.length;T++)T&&(b+=","),b+=l(m[T])||"null";return b+"]"}if(m===null)return"null";if(u.indexOf(m)!==-1){if(s)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var _=u.push(m)-1,f=Object.keys(m).sort(o&&o(m));for(b="",T=0;T<f.length;T++){var S=f[T],E=l(m[S]);E&&(b&&(b+=","),b+=JSON.stringify(S)+":"+E)}return u.splice(_,1),"{"+b+"}"}}(n)}},function(e,t,r){r.d(t,"a",function(){return F});var n=r(11),i=r(0);function g(M,R,p=()=>!0){if(M instanceof R&&p(M))return M;throw M}var s=r(1),o=r(100),u=r.n(o),l=r(101),m=r.n(l);class T extends Error{constructor(R,p,P){super(`Connection failure: ${R.message}`),this.cause=R,this.url=p,this.retryable=P}}var b=r(29);class _ extends Error{constructor(R,p,P,Z,$={},h){super(`Unexpected response (${P}) for ${R} ${p}: ${JSON.stringify(h?Object(b.a)([...h.entries()].reduce((d,[j,y])=>(d[j]=y,d),{})):{})} -- ${JSON.stringify(Object(b.a)(Z))}`),this.method=R,this.url=p,this.statusCode=P,this.body=Z,this.validationErrors=$,this.headers=h}}class f extends Error{constructor(R,p){super(`Invalid headers (${JSON.stringify(R)}) for response: ${p.message}`),this.validationErrors=R,this.responseError=p}}var S=function(M,R,p,P){return new(p||(p=Promise))(function(Z,$){function h(y){try{j(P.next(y))}catch(x){$(x)}}function d(y){try{j(P.throw(y))}catch(x){$(x)}}function j(y){var x;y.done?Z(y.value):(x=y.value,x instanceof p?x:new p(function(B){B(x)})).then(h,d)}j((P=P.apply(M,R||[])).next())})},E=function(M,R){var p={};for(var P in M)Object.prototype.hasOwnProperty.call(M,P)&&R.indexOf(P)<0&&(p[P]=M[P]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function"){var Z=0;for(P=Object.getOwnPropertySymbols(M);Z<P.length;Z++)R.indexOf(P[Z])<0&&Object.prototype.propertyIsEnumerable.call(M,P[Z])&&(p[P[Z]]=M[P[Z]])}return p};const N=new Set(["GET","HEAD","PUT","QUERY","DELETE","OPTIONS","TRACE"]);class F{constructor(R,p={}){if(this.endpoint=R,this.validateHeaders=P=>p.validateHeaders?p.validateHeaders(P):{},this.verbose=p.verbose!==!1,this.headers=p.headers||{},p.retries!==void 0&&!(p.retries>=0))throw new Error("retries must be positive or zero");if(this.configuredRetries=p.retries,p.timeoutMs!==void 0&&!(p.timeoutMs>0))throw new Error("timeoutMs must be positive");if(this.timeoutMs=p.timeoutMs,p.maxBackoffDelayMs!==void 0&&!(p.maxBackoffDelayMs>0))throw new Error("maxBackoffDelayMs must be positive");this.maxBackoffDelayMs=p.maxBackoffDelayMs||30*s.a.second}getRetries(){return this.configuredRetries!==void 0?this.configuredRetries:this.constructor.retries}fetch(R,p={}){return S(this,void 0,void 0,function*(){return(yield this.fetchVerbose(R,p)).body})}fetchVerbose(R,p={}){return S(this,void 0,void 0,function*(){let P=100*s.a.millisecond,Z=0;const $=this.timeoutMs!==void 0?new Date().getTime()+this.timeoutMs:void 0,h=$?()=>Math.max($-new Date().getTime(),0):void 0;for(;;)try{return yield this.doFetch(R,p,h)}catch(d){const j=g(d,T);if((h==null?void 0:h())===0||Z===this.getRetries()||!j.retryable)throw j;Z++,P=Math.min(...h?[h()]:[],P*(2+.1*(Math.random()-.5)),this.maxBackoffDelayMs),yield Object(n.a)(P),this.verbose&&i.a.warn(`Connection failure, retrying. Error: ${d.cause.message}`,{url:d.url,error:d.cause,attempt:Z})}})}doFetch(R,p,P){return S(this,void 0,void 0,function*(){const{token:Z,json:$,allowUnsafeRetries:h}=p,d=E(p,["token","json","allowUnsafeRetries"]),j=(d.method||"GET").toUpperCase(),y=this.endpoint!==void 0?`${this.endpoint}${R?`/${R}`:""}`:R,x=new u.a;let B;if(P){const U=P();U>0?B=setTimeout(()=>{x.abort()},U):x.abort()}try{let U;yield Promise.race([this.constructor.waitForConnectivity(),new Promise(k=>{U=setTimeout(k,P?Math.min(s.a.minute,P()):s.a.minute)})]),U&&clearTimeout(U);const O=yield m()(y,Object.assign(Object.assign({},d),{headers:Object.assign(Object.assign(Object.assign(Object.assign({},$!==!1?{"Content-Type":"application/json"}:{}),this.headers),d.headers||{}),Z!==void 0?{Authorization:`Bearer ${Z}`}:{}),signal:x.signal})),A=O.headers.get("content-type")||"",D=A&&A.startsWith("application/json"),w=D?yield O.json():yield O.text(),c=()=>new _(j,y,O.status,w,w&&w.validationErrors||{},O.headers);if(!O.ok)throw this.verbose&&i.a[O.status>=500?"warn":"info"]("Response error",{method:j,url:y,statusCode:O.status}),c();const L=this.validateHeaders(O.headers);if(Object.keys(L).length!==0)throw new f(L,c());if(O.status===204)return{body:void 0,headers:O.headers};if($&&!D)throw new Error(`Response is not JSON: ${JSON.stringify(w)}`);return{body:w,headers:O.headers}}catch(U){const O=h||N.has(j);if(U.message==="Network request failed")throw new T(U,y,O);if(U.type==="system"&&["EAI_AGAIN","ECONNREFUSED","EHOSTUNREACH","ENOTFOUND"].find(c=>c===U.code))throw new T(U,y,!0);if(U.type==="system"&&["ETIMEDOUT","ECONNRESET","ESOCKETTIMEDOUT","EPIPE"].find(c=>c===U.code))throw new T(U,y,O);if(U.name==="AbortError")throw new T(U,y,O);const A=g(U,_),{statusCode:D}=A;if(D===408||D===429||D===502||D===503||D===504)throw this.verbose&&!O&&i.a.warn("Potentially unsafe retry"),new T(U,y,!0);const w=this.validateHeaders(A.headers);throw Object.keys(w).length!==0?new f(w,A):(yield this.constructor.onResponseError(A),U)}finally{B&&clearTimeout(B)}})}}F.retries=8,F.waitForConnectivity=()=>S(void 0,void 0,void 0,function*(){}),F.onResponseError=()=>S(void 0,void 0,void 0,function*(){})},function(e,t,r){function n(T,b){if(!(T instanceof b))throw new TypeError("Cannot call a class as a function")}function i(T,b){for(var _=0;_<b.length;_++){var f=b[_];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(T,f.key,f)}}var g=r(57),s=r(3),o=s.LEVEL,u=s.MESSAGE;g.enabled=!0;var l=/\s+/,m=function(){function T(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(this,T),S.colors&&this.addColors(S.colors),this.options=S}var b,_,f;return b=T,f=[{key:"addColors",value:function(S){var E=Object.keys(S).reduce(function(N,F){return N[F]=l.test(S[F])?S[F].split(l):S[F],N},{});return T.allColors=Object.assign({},T.allColors||{},E),T.allColors}}],(_=[{key:"addColors",value:function(S){return T.addColors(S)}},{key:"colorize",value:function(S,E,N){if(N===void 0&&(N=E),!Array.isArray(T.allColors[S]))return g[T.allColors[S]](N);for(var F=0,M=T.allColors[S].length;F<M;F++)N=g[T.allColors[S][F]](N);return N}},{key:"transform",value:function(S,E){return E.all&&typeof S[u]=="string"&&(S[u]=this.colorize(S[o],S.level,S[u])),(E.level||E.all||!E.message)&&(S.level=this.colorize(S[o],S.level)),(E.all||E.message)&&(S.message=this.colorize(S[o],S.level,S.message)),S}}])&&i(b.prototype,_),f&&i(b,f),T}();e.exports=function(T){return new m(T)},e.exports.Colorizer=e.exports.Format=m},function(e,t){var r={}.toString;e.exports=Array.isArray||function(n){return r.call(n)=="[object Array]"}},function(e,t,r){(function(n){function i(g){try{if(!n.localStorage)return!1}catch{return!1}var s=n.localStorage[g];return s!=null&&String(s).toLowerCase()==="true"}e.exports=function(g,s){if(i("noDeprecation"))return g;var o=!1;return function(){if(!o){if(i("throwDeprecation"))throw new Error(s);i("traceDeprecation")?console.trace(s):console.warn(s),o=!0}return g.apply(this,arguments)}}}).call(this,r(5))},function(e,t,r){var n=r(4),i=n.Buffer;function g(o,u){for(var l in o)u[l]=o[l]}function s(o,u,l){return i(o,u,l)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(g(n,t),t.Buffer=s),g(i,s),s.from=function(o,u,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,u,l)},s.alloc=function(o,u,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var m=i(o);return u!==void 0?typeof l=="string"?m.fill(u,l):m.fill(u):m.fill(0),m},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return n&&typeof n.length=="number"&&n.length>=0&&n.length%1==0},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},function(e,t,r){var n=r(4),i=n.Buffer;function g(o,u){for(var l in o)u[l]=o[l]}function s(o,u,l){return i(o,u,l)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(g(n,t),t.Buffer=s),g(i,s),s.from=function(o,u,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,u,l)},s.alloc=function(o,u,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var m=i(o);return u!==void 0?typeof l=="string"?m.fill(u,l):m.fill(u):m.fill(0),m},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)}},function(e,t,r){(function(n,i,g){var s=r(13);function o(d){var j=this;this.next=null,this.entry=null,this.finish=function(){(function(y,x,B){var U=y.entry;for(y.entry=null;U;){var O=U.callback;x.pendingcb--,O(B),U=U.next}x.corkedRequestsFree?x.corkedRequestsFree.next=y:x.corkedRequestsFree=y})(j,d)}}e.exports=M;var u,l=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?i:s.nextTick;M.WritableState=F;var m=r(14);m.inherits=r(7);var T={deprecate:r(39)},b=r(68),_=r(43).Buffer,f=g.Uint8Array||function(){},S,E=r(69);function N(){}function F(d,j){u=u||r(20),d=d||{};var y=j instanceof u;this.objectMode=!!d.objectMode,y&&(this.objectMode=this.objectMode||!!d.writableObjectMode);var x=d.highWaterMark,B=d.writableHighWaterMark,U=this.objectMode?16:16384;this.highWaterMark=x||x===0?x:y&&(B||B===0)?B:U,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var O=d.decodeStrings===!1;this.decodeStrings=!O,this.defaultEncoding=d.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(A){(function(D,w){var c=D._writableState,L=c.sync,k=c.writecb;if(function(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}(c),w)(function(K,Q,z,V,v){--Q.pendingcb,z?(s.nextTick(v,V),s.nextTick(h,K,Q),K._writableState.errorEmitted=!0,K.emit("error",V)):(v(V),K._writableState.errorEmitted=!0,K.emit("error",V),h(K,Q))})(D,c,L,w,k);else{var Y=Z(c);Y||c.corked||c.bufferProcessing||!c.bufferedRequest||P(D,c),L?l(p,D,c,Y,k):p(D,c,Y,k)}})(j,A)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function M(d){if(u=u||r(20),!(S.call(M,this)||this instanceof u))return new M(d);this._writableState=new F(d,this),this.writable=!0,d&&(typeof d.write=="function"&&(this._write=d.write),typeof d.writev=="function"&&(this._writev=d.writev),typeof d.destroy=="function"&&(this._destroy=d.destroy),typeof d.final=="function"&&(this._final=d.final)),b.call(this)}function R(d,j,y,x,B,U,O){j.writelen=x,j.writecb=O,j.writing=!0,j.sync=!0,y?d._writev(B,j.onwrite):d._write(B,U,j.onwrite),j.sync=!1}function p(d,j,y,x){y||function(B,U){U.length===0&&U.needDrain&&(U.needDrain=!1,B.emit("drain"))}(d,j),j.pendingcb--,x(),h(d,j)}function P(d,j){j.bufferProcessing=!0;var y=j.bufferedRequest;if(d._writev&&y&&y.next){var x=j.bufferedRequestCount,B=new Array(x),U=j.corkedRequestsFree;U.entry=y;for(var O=0,A=!0;y;)B[O]=y,y.isBuf||(A=!1),y=y.next,O+=1;B.allBuffers=A,R(d,j,!0,j.length,B,"",U.finish),j.pendingcb++,j.lastBufferedRequest=null,U.next?(j.corkedRequestsFree=U.next,U.next=null):j.corkedRequestsFree=new o(j),j.bufferedRequestCount=0}else{for(;y;){var D=y.chunk,w=y.encoding,c=y.callback;if(R(d,j,!1,j.objectMode?1:D.length,D,w,c),y=y.next,j.bufferedRequestCount--,j.writing)break}y===null&&(j.lastBufferedRequest=null)}j.bufferedRequest=y,j.bufferProcessing=!1}function Z(d){return d.ending&&d.length===0&&d.bufferedRequest===null&&!d.finished&&!d.writing}function $(d,j){d._final(function(y){j.pendingcb--,y&&d.emit("error",y),j.prefinished=!0,d.emit("prefinish"),h(d,j)})}function h(d,j){var y=Z(j);return y&&(function(x,B){B.prefinished||B.finalCalled||(typeof x._final=="function"?(B.pendingcb++,B.finalCalled=!0,s.nextTick($,x,B)):(B.prefinished=!0,x.emit("prefinish")))}(d,j),j.pendingcb===0&&(j.finished=!0,d.emit("finish"))),y}m.inherits(M,b),F.prototype.getBuffer=function(){for(var d=this.bufferedRequest,j=[];d;)j.push(d),d=d.next;return j},function(){try{Object.defineProperty(F.prototype,"buffer",{get:T.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(d){return!!S.call(this,d)||this===M&&d&&d._writableState instanceof F}})):S=function(d){return d instanceof this},M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},M.prototype.write=function(d,j,y){var x,B=this._writableState,U=!1,O=!B.objectMode&&(x=d,_.isBuffer(x)||x instanceof f);return O&&!_.isBuffer(d)&&(d=function(A){return _.from(A)}(d)),typeof j=="function"&&(y=j,j=null),O?j="buffer":j||(j=B.defaultEncoding),typeof y!="function"&&(y=N),B.ended?function(A,D){var w=new Error("write after end");A.emit("error",w),s.nextTick(D,w)}(this,y):(O||function(A,D,w,c){var L=!0,k=!1;return w===null?k=new TypeError("May not write null values to stream"):typeof w=="string"||w===void 0||D.objectMode||(k=new TypeError("Invalid non-string/buffer chunk")),k&&(A.emit("error",k),s.nextTick(c,k),L=!1),L}(this,B,d,y))&&(B.pendingcb++,U=function(A,D,w,c,L,k){if(!w){var Y=function(V,v,I){return V.objectMode||V.decodeStrings===!1||typeof v!="string"||(v=_.from(v,I)),v}(D,c,L);c!==Y&&(w=!0,L="buffer",c=Y)}var K=D.objectMode?1:c.length;D.length+=K;var Q=D.length<D.highWaterMark;if(Q||(D.needDrain=!0),D.writing||D.corked){var z=D.lastBufferedRequest;D.lastBufferedRequest={chunk:c,encoding:L,isBuf:w,callback:k,next:null},z?z.next=D.lastBufferedRequest:D.bufferedRequest=D.lastBufferedRequest,D.bufferedRequestCount+=1}else R(A,D,!1,K,c,L,k);return Q}(this,B,O,d,j,y)),U},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var d=this._writableState;d.corked&&(d.corked--,d.writing||d.corked||d.finished||d.bufferProcessing||!d.bufferedRequest||P(this,d))},M.prototype.setDefaultEncoding=function(d){if(typeof d=="string"&&(d=d.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((d+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+d);return this._writableState.defaultEncoding=d,this},Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(d,j,y){y(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(d,j,y){var x=this._writableState;typeof d=="function"?(y=d,d=null,j=null):typeof j=="function"&&(y=j,j=null),d!=null&&this.write(d,j),x.corked&&(x.corked=1,this.uncork()),x.ending||x.finished||function(B,U,O){U.ending=!0,h(B,U),O&&(U.finished?s.nextTick(O):B.once("finish",O)),U.ended=!0,B.writable=!1}(this,x,y)},Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(d){this._writableState&&(this._writableState.destroyed=d)}}),M.prototype.destroy=E.destroy,M.prototype._undestroy=E.undestroy,M.prototype._destroy=function(d,j){this.end(),j(d)}}).call(this,r(2),r(12).setImmediate,r(5))},function(e,t,r){var n=r(23).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function g(s,o,u){if(typeof o=="function")return g(s,null,o);o||(o={}),u=function(M){var R=!1;return function(){if(!R){R=!0;for(var p=arguments.length,P=new Array(p),Z=0;Z<p;Z++)P[Z]=arguments[Z];M.apply(this,P)}}}(u||i);var l=o.readable||o.readable!==!1&&s.readable,m=o.writable||o.writable!==!1&&s.writable,T=function(){s.writable||_()},b=s._writableState&&s._writableState.finished,_=function(){m=!1,b=!0,l||u.call(s)},f=s._readableState&&s._readableState.endEmitted,S=function(){l=!1,f=!0,m||u.call(s)},E=function(M){u.call(s,M)},N=function(){var M;return l&&!f?(s._readableState&&s._readableState.ended||(M=new n),u.call(s,M)):m&&!b?(s._writableState&&s._writableState.ended||(M=new n),u.call(s,M)):void 0},F=function(){s.req.on("finish",_)};return function(M){return M.setHeader&&typeof M.abort=="function"}(s)?(s.on("complete",_),s.on("abort",N),s.req?F():s.on("request",F)):m&&!s._writableState&&(s.on("end",T),s.on("close",T)),s.on("end",S),s.on("finish",_),o.error!==!1&&s.on("error",E),s.on("close",N),function(){s.removeListener("complete",_),s.removeListener("abort",N),s.removeListener("request",F),s.req&&s.req.removeListener("finish",_),s.removeListener("end",T),s.removeListener("close",T),s.removeListener("finish",_),s.removeListener("end",S),s.removeListener("error",E),s.removeListener("close",N)}}},function(e,t,r){var n=r(193),i=r(195);function g(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=M,t.resolve=function(R,p){return M(R,!1,!0).resolve(p)},t.resolveObject=function(R,p){return R?M(R,!1,!0).resolveObject(p):p},t.format=function(R){return i.isString(R)&&(R=M(R)),R instanceof g?R.format():g.prototype.format.call(R)},t.Url=g;var s=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
20
+ `," "]),m=["'"].concat(l),T=["%","/","?",";","#"].concat(m),b=["/","?","#"],_=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,S={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},N={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},F=r(196);function M(R,p,P){if(R&&i.isObject(R)&&R instanceof g)return R;var Z=new g;return Z.parse(R,p,P),Z}g.prototype.parse=function(R,p,P){if(!i.isString(R))throw new TypeError("Parameter 'url' must be a string, not "+typeof R);var Z=R.indexOf("?"),$=Z!==-1&&Z<R.indexOf("#")?"?":"#",h=R.split($);h[0]=h[0].replace(/\\/g,"/");var d=R=h.join($);if(d=d.trim(),!P&&R.split("#").length===1){var j=u.exec(d);if(j)return this.path=d,this.href=d,this.pathname=j[1],j[2]?(this.search=j[2],this.query=p?F.parse(this.search.substr(1)):this.search.substr(1)):p&&(this.search="",this.query={}),this}var y=s.exec(d);if(y){var x=(y=y[0]).toLowerCase();this.protocol=x,d=d.substr(y.length)}if(P||y||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var B=d.substr(0,2)==="//";!B||y&&E[y]||(d=d.substr(2),this.slashes=!0)}if(!E[y]&&(B||y&&!N[y])){for(var U,O,A=-1,D=0;D<b.length;D++)(w=d.indexOf(b[D]))!==-1&&(A===-1||w<A)&&(A=w);for((O=A===-1?d.lastIndexOf("@"):d.lastIndexOf("@",A))!==-1&&(U=d.slice(0,O),d=d.slice(O+1),this.auth=decodeURIComponent(U)),A=-1,D=0;D<T.length;D++){var w;(w=d.indexOf(T[D]))!==-1&&(A===-1||w<A)&&(A=w)}A===-1&&(A=d.length),this.host=d.slice(0,A),d=d.slice(A),this.parseHost(),this.hostname=this.hostname||"";var c=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!c)for(var L=this.hostname.split(/\./),k=(D=0,L.length);D<k;D++){var Y=L[D];if(Y&&!Y.match(_)){for(var K="",Q=0,z=Y.length;Q<z;Q++)Y.charCodeAt(Q)>127?K+="x":K+=Y[Q];if(!K.match(_)){var V=L.slice(0,D),v=L.slice(D+1),I=Y.match(f);I&&(V.push(I[1]),v.unshift(I[2])),v.length&&(d="/"+v.join(".")+d),this.hostname=V.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),c||(this.hostname=n.toASCII(this.hostname));var W=this.port?":"+this.port:"",ee=this.hostname||"";this.host=ee+W,this.href+=this.host,c&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),d[0]!=="/"&&(d="/"+d))}if(!S[x])for(D=0,k=m.length;D<k;D++){var J=m[D];if(d.indexOf(J)!==-1){var ne=encodeURIComponent(J);ne===J&&(ne=escape(J)),d=d.split(J).join(ne)}}var oe=d.indexOf("#");oe!==-1&&(this.hash=d.substr(oe),d=d.slice(0,oe));var he=d.indexOf("?");if(he!==-1?(this.search=d.substr(he),this.query=d.substr(he+1),p&&(this.query=F.parse(this.query)),d=d.slice(0,he)):p&&(this.search="",this.query={}),d&&(this.pathname=d),N[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){W=this.pathname||"";var fe=this.search||"";this.path=W+fe}return this.href=this.format(),this},g.prototype.format=function(){var R=this.auth||"";R&&(R=(R=encodeURIComponent(R)).replace(/%3A/i,":"),R+="@");var p=this.protocol||"",P=this.pathname||"",Z=this.hash||"",$=!1,h="";this.host?$=R+this.host:this.hostname&&($=R+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&($+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(h=F.stringify(this.query));var d=this.search||h&&"?"+h||"";return p&&p.substr(-1)!==":"&&(p+=":"),this.slashes||(!p||N[p])&&$!==!1?($="//"+($||""),P&&P.charAt(0)!=="/"&&(P="/"+P)):$||($=""),Z&&Z.charAt(0)!=="#"&&(Z="#"+Z),d&&d.charAt(0)!=="?"&&(d="?"+d),p+$+(P=P.replace(/[?#]/g,function(j){return encodeURIComponent(j)}))+(d=d.replace("#","%23"))+Z},g.prototype.resolve=function(R){return this.resolveObject(M(R,!1,!0)).format()},g.prototype.resolveObject=function(R){if(i.isString(R)){var p=new g;p.parse(R,!1,!0),R=p}for(var P=new g,Z=Object.keys(this),$=0;$<Z.length;$++){var h=Z[$];P[h]=this[h]}if(P.hash=R.hash,R.href==="")return P.href=P.format(),P;if(R.slashes&&!R.protocol){for(var d=Object.keys(R),j=0;j<d.length;j++){var y=d[j];y!=="protocol"&&(P[y]=R[y])}return N[P.protocol]&&P.hostname&&!P.pathname&&(P.path=P.pathname="/"),P.href=P.format(),P}if(R.protocol&&R.protocol!==P.protocol){if(!N[R.protocol]){for(var x=Object.keys(R),B=0;B<x.length;B++){var U=x[B];P[U]=R[U]}return P.href=P.format(),P}if(P.protocol=R.protocol,R.host||E[R.protocol])P.pathname=R.pathname;else{for(var O=(R.pathname||"").split("/");O.length&&!(R.host=O.shift()););R.host||(R.host=""),R.hostname||(R.hostname=""),O[0]!==""&&O.unshift(""),O.length<2&&O.unshift(""),P.pathname=O.join("/")}if(P.search=R.search,P.query=R.query,P.host=R.host||"",P.auth=R.auth,P.hostname=R.hostname||R.host,P.port=R.port,P.pathname||P.search){var A=P.pathname||"",D=P.search||"";P.path=A+D}return P.slashes=P.slashes||R.slashes,P.href=P.format(),P}var w=P.pathname&&P.pathname.charAt(0)==="/",c=R.host||R.pathname&&R.pathname.charAt(0)==="/",L=c||w||P.host&&R.pathname,k=L,Y=P.pathname&&P.pathname.split("/")||[],K=(O=R.pathname&&R.pathname.split("/")||[],P.protocol&&!N[P.protocol]);if(K&&(P.hostname="",P.port=null,P.host&&(Y[0]===""?Y[0]=P.host:Y.unshift(P.host)),P.host="",R.protocol&&(R.hostname=null,R.port=null,R.host&&(O[0]===""?O[0]=R.host:O.unshift(R.host)),R.host=null),L=L&&(O[0]===""||Y[0]==="")),c)P.host=R.host||R.host===""?R.host:P.host,P.hostname=R.hostname||R.hostname===""?R.hostname:P.hostname,P.search=R.search,P.query=R.query,Y=O;else if(O.length)Y||(Y=[]),Y.pop(),Y=Y.concat(O),P.search=R.search,P.query=R.query;else if(!i.isNullOrUndefined(R.search))return K&&(P.hostname=P.host=Y.shift(),(I=!!(P.host&&P.host.indexOf("@")>0)&&P.host.split("@"))&&(P.auth=I.shift(),P.host=P.hostname=I.shift())),P.search=R.search,P.query=R.query,i.isNull(P.pathname)&&i.isNull(P.search)||(P.path=(P.pathname?P.pathname:"")+(P.search?P.search:"")),P.href=P.format(),P;if(!Y.length)return P.pathname=null,P.search?P.path="/"+P.search:P.path=null,P.href=P.format(),P;for(var Q=Y.slice(-1)[0],z=(P.host||R.host||Y.length>1)&&(Q==="."||Q==="..")||Q==="",V=0,v=Y.length;v>=0;v--)(Q=Y[v])==="."?Y.splice(v,1):Q===".."?(Y.splice(v,1),V++):V&&(Y.splice(v,1),V--);if(!L&&!k)for(;V--;V)Y.unshift("..");!L||Y[0]===""||Y[0]&&Y[0].charAt(0)==="/"||Y.unshift(""),z&&Y.join("/").substr(-1)!=="/"&&Y.push("");var I,W=Y[0]===""||Y[0]&&Y[0].charAt(0)==="/";return K&&(P.hostname=P.host=W?"":Y.length?Y.shift():"",(I=!!(P.host&&P.host.indexOf("@")>0)&&P.host.split("@"))&&(P.auth=I.shift(),P.host=P.hostname=I.shift())),(L=L||P.host&&Y.length)&&!W&&Y.unshift(""),Y.length?P.pathname=Y.join("/"):(P.pathname=null,P.path=null),i.isNull(P.pathname)&&i.isNull(P.search)||(P.path=(P.pathname?P.pathname:"")+(P.search?P.search:"")),P.auth=R.auth||P.auth,P.slashes=P.slashes||R.slashes,P.href=P.format(),P},g.prototype.parseHost=function(){var R=this.host,p=o.exec(R);p&&((p=p[0])!==":"&&(this.port=p.substr(1)),R=R.substr(0,R.length-p.length)),R&&(this.hostname=R)}},function(e,t,r){var n=r(56),i=r(3).configs;t.cli=n.levels(i.cli),t.npm=n.levels(i.npm),t.syslog=n.levels(i.syslog),t.addColors=n.levels},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(202)),i=o(r(203)),g=o(r(22)),s=o(r(26));function o(u){return u&&u.__esModule?u:{default:u}}t.default=(0,s.default)(function(u,l,m){return(0,n.default)(u,(0,i.default)((0,g.default)(l)),m)},3),e.exports=t.default},function(e,t,r){function n(i){Error.captureStackTrace(this,this.constructor),this.name="EnvVarError",this.message=`env-var: ${i}`}(0,r(10).inherits)(n,Error),e.exports=n},function(e,t,r){e.exports=function(n){const i=parseInt(n,10);if(isNaN(i)||n.toString().indexOf(".")!==-1)throw new Error("should be a valid integer");return i}},function(e,t,r){e.exports=function(n){const i=parseFloat(n);if(isNaN(i))throw new Error("should be a valid float");return i}},function(e,t,r){e.exports=function(n){try{return JSON.parse(n)}catch{throw new Error("should be valid (parseable) JSON")}}},function(e,t,r){(function(n){function i(o,u){for(var l=0,m=o.length-1;m>=0;m--){var T=o[m];T==="."?o.splice(m,1):T===".."?(o.splice(m,1),l++):l&&(o.splice(m,1),l--)}if(u)for(;l--;l)o.unshift("..");return o}function g(o,u){if(o.filter)return o.filter(u);for(var l=[],m=0;m<o.length;m++)u(o[m],m,o)&&l.push(o[m]);return l}t.resolve=function(){for(var o="",u=!1,l=arguments.length-1;l>=-1&&!u;l--){var m=l>=0?arguments[l]:n.cwd();if(typeof m!="string")throw new TypeError("Arguments to path.resolve must be strings");m&&(o=m+"/"+o,u=m.charAt(0)==="/")}return(u?"/":"")+(o=i(g(o.split("/"),function(T){return!!T}),!u).join("/"))||"."},t.normalize=function(o){var u=t.isAbsolute(o),l=s(o,-1)==="/";return(o=i(g(o.split("/"),function(m){return!!m}),!u).join("/"))||u||(o="."),o&&l&&(o+="/"),(u?"/":"")+o},t.isAbsolute=function(o){return o.charAt(0)==="/"},t.join=function(){var o=Array.prototype.slice.call(arguments,0);return t.normalize(g(o,function(u,l){if(typeof u!="string")throw new TypeError("Arguments to path.join must be strings");return u}).join("/"))},t.relative=function(o,u){function l(E){for(var N=0;N<E.length&&E[N]==="";N++);for(var F=E.length-1;F>=0&&E[F]==="";F--);return N>F?[]:E.slice(N,F-N+1)}o=t.resolve(o).substr(1),u=t.resolve(u).substr(1);for(var m=l(o.split("/")),T=l(u.split("/")),b=Math.min(m.length,T.length),_=b,f=0;f<b;f++)if(m[f]!==T[f]){_=f;break}var S=[];for(f=_;f<m.length;f++)S.push("..");return(S=S.concat(T.slice(_))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(o){if(typeof o!="string"&&(o+=""),o.length===0)return".";for(var u=o.charCodeAt(0),l=u===47,m=-1,T=!0,b=o.length-1;b>=1;--b)if((u=o.charCodeAt(b))===47){if(!T){m=b;break}}else T=!1;return m===-1?l?"/":".":l&&m===1?"/":o.slice(0,m)},t.basename=function(o,u){var l=function(m){typeof m!="string"&&(m+="");var T,b=0,_=-1,f=!0;for(T=m.length-1;T>=0;--T)if(m.charCodeAt(T)===47){if(!f){b=T+1;break}}else _===-1&&(f=!1,_=T+1);return _===-1?"":m.slice(b,_)}(o);return u&&l.substr(-1*u.length)===u&&(l=l.substr(0,l.length-u.length)),l},t.extname=function(o){typeof o!="string"&&(o+="");for(var u=-1,l=0,m=-1,T=!0,b=0,_=o.length-1;_>=0;--_){var f=o.charCodeAt(_);if(f!==47)m===-1&&(T=!1,m=_+1),f===46?u===-1?u=_:b!==1&&(b=1):u!==-1&&(b=-1);else if(!T){l=_+1;break}}return u===-1||m===-1||b===0||b===1&&u===m-1&&u===l+1?"":o.slice(u,m)};var s="ab".substr(-1)==="b"?function(o,u,l){return o.substr(u,l)}:function(o,u,l){return u<0&&(u=o.length+u),o.substr(u,l)}}).call(this,r(2))},function(e,t){function r(n,i){var g=[],s=[];return i==null&&(i=function(o,u){return g[0]===u?"[Circular ~]":"[Circular ~."+s.slice(0,g.indexOf(u)).join(".")+"]"}),function(o,u){if(g.length>0){var l=g.indexOf(this);~l?g.splice(l+1):g.push(this),~l?s.splice(l,1/0,o):s.push(o),~g.indexOf(u)&&(u=i.call(this,o,u))}else g.push(u);return n==null?u:n.call(this,o,u)}}(e.exports=function(n,i,g,s){return JSON.stringify(n,r(i,s),g)}).getSerialize=r},function(e,t,r){r(227),e.exports={encode:n=>new TextEncoder().encode(n),decode:n=>new TextDecoder().decode(n)}},function(e,t,r){var n=t.format=r(9);t.levels=r(104),Object.defineProperty(n,"align",{value:r(121)}),Object.defineProperty(n,"cli",{value:r(122)}),Object.defineProperty(n,"combine",{value:r(123)}),Object.defineProperty(n,"colorize",{value:r(37)}),Object.defineProperty(n,"json",{value:r(124)}),Object.defineProperty(n,"label",{value:r(127)}),Object.defineProperty(n,"logstash",{value:r(128)}),Object.defineProperty(n,"metadata",{value:r(129)}),Object.defineProperty(n,"padLevels",{value:r(58)}),Object.defineProperty(n,"prettyPrint",{value:r(130)}),Object.defineProperty(n,"printf",{value:r(131)}),Object.defineProperty(n,"simple",{value:r(132)}),Object.defineProperty(n,"splat",{value:r(133)}),Object.defineProperty(n,"timestamp",{value:r(134)}),Object.defineProperty(n,"uncolorize",{value:r(136)})},function(e,t,r){var n=r(105);e.exports=n},function(e,t,r){function n(b){return function(_){if(Array.isArray(_))return i(_)}(b)||function(_){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(_))return Array.from(_)}(b)||function(_,f){if(!!_){if(typeof _=="string")return i(_,f);var S=Object.prototype.toString.call(_).slice(8,-1);if(S==="Object"&&_.constructor&&(S=_.constructor.name),S==="Map"||S==="Set")return Array.from(_);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return i(_,f)}}(b)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function i(b,_){(_==null||_>b.length)&&(_=b.length);for(var f=0,S=new Array(_);f<_;f++)S[f]=b[f];return S}function g(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function s(b,_){for(var f=0;f<_.length;f++){var S=_[f];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(b,S.key,S)}}var o=r(3),u=o.configs,l=o.LEVEL,m=o.MESSAGE,T=function(){function b(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{levels:u.npm.levels};g(this,b),this.paddings=b.paddingForLevels(E.levels,E.filler),this.options=E}var _,f,S;return _=b,S=[{key:"getLongestLevel",value:function(E){var N=Object.keys(E).map(function(F){return F.length});return Math.max.apply(Math,n(N))}},{key:"paddingForLevel",value:function(E,N,F){var M=F+1-E.length,R=Math.floor(M/N.length);return"".concat(N).concat(N.repeat(R)).slice(0,M)}},{key:"paddingForLevels",value:function(E){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:" ",F=b.getLongestLevel(E);return Object.keys(E).reduce(function(M,R){return M[R]=b.paddingForLevel(R,N,F),M},{})}}],(f=[{key:"transform",value:function(E,N){return E.message="".concat(this.paddings[E[l]]).concat(E.message),E[m]&&(E[m]="".concat(this.paddings[E[l]]).concat(E[m])),E}}])&&s(_.prototype,f),S&&s(_,S),b}();e.exports=function(b){return new T(b)},e.exports.Padder=e.exports.Format=T},function(e,t,r){var n=r(10).format;t.warn={deprecated:function(i){return function(){throw new Error(n("{ %s } was removed in winston@3.0.0.",i))}},useFormat:function(i){return function(){throw new Error([n("{ %s } was removed in winston@3.0.0.",i),"Use a custom winston.format = winston.format(function) instead."].join(`
22
+ `))}},forFunctions:function(i,g,s){s.forEach(function(o){i[o]=t.warn[g](o)})},moved:function(i,g,s){function o(){return function(){throw new Error([n("winston.%s was moved in winston@3.0.0.",s),n("Use a winston.%s instead.",g)].join(`
23
+ `))}}Object.defineProperty(i,s,{get:o,set:o})},forProperties:function(i,g,s){s.forEach(function(o){var u=t.warn[g](o);Object.defineProperty(i,o,{get:u,set:u})})}}},function(e,t,r){(function(n,i,g){var s=r(13);function o(d){var j=this;this.next=null,this.entry=null,this.finish=function(){(function(y,x,B){var U=y.entry;for(y.entry=null;U;){var O=U.callback;x.pendingcb--,O(B),U=U.next}x.corkedRequestsFree?x.corkedRequestsFree.next=y:x.corkedRequestsFree=y})(j,d)}}e.exports=M;var u,l=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?i:s.nextTick;M.WritableState=F;var m=Object.create(r(14));m.inherits=r(7);var T={deprecate:r(39)},b=r(61),_=r(40).Buffer,f=g.Uint8Array||function(){},S,E=r(62);function N(){}function F(d,j){u=u||r(31),d=d||{};var y=j instanceof u;this.objectMode=!!d.objectMode,y&&(this.objectMode=this.objectMode||!!d.writableObjectMode);var x=d.highWaterMark,B=d.writableHighWaterMark,U=this.objectMode?16:16384;this.highWaterMark=x||x===0?x:y&&(B||B===0)?B:U,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var O=d.decodeStrings===!1;this.decodeStrings=!O,this.defaultEncoding=d.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(A){(function(D,w){var c=D._writableState,L=c.sync,k=c.writecb;if(function(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}(c),w)(function(K,Q,z,V,v){--Q.pendingcb,z?(s.nextTick(v,V),s.nextTick(h,K,Q),K._writableState.errorEmitted=!0,K.emit("error",V)):(v(V),K._writableState.errorEmitted=!0,K.emit("error",V),h(K,Q))})(D,c,L,w,k);else{var Y=Z(c);Y||c.corked||c.bufferProcessing||!c.bufferedRequest||P(D,c),L?l(p,D,c,Y,k):p(D,c,Y,k)}})(j,A)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function M(d){if(u=u||r(31),!(S.call(M,this)||this instanceof u))return new M(d);this._writableState=new F(d,this),this.writable=!0,d&&(typeof d.write=="function"&&(this._write=d.write),typeof d.writev=="function"&&(this._writev=d.writev),typeof d.destroy=="function"&&(this._destroy=d.destroy),typeof d.final=="function"&&(this._final=d.final)),b.call(this)}function R(d,j,y,x,B,U,O){j.writelen=x,j.writecb=O,j.writing=!0,j.sync=!0,y?d._writev(B,j.onwrite):d._write(B,U,j.onwrite),j.sync=!1}function p(d,j,y,x){y||function(B,U){U.length===0&&U.needDrain&&(U.needDrain=!1,B.emit("drain"))}(d,j),j.pendingcb--,x(),h(d,j)}function P(d,j){j.bufferProcessing=!0;var y=j.bufferedRequest;if(d._writev&&y&&y.next){var x=j.bufferedRequestCount,B=new Array(x),U=j.corkedRequestsFree;U.entry=y;for(var O=0,A=!0;y;)B[O]=y,y.isBuf||(A=!1),y=y.next,O+=1;B.allBuffers=A,R(d,j,!0,j.length,B,"",U.finish),j.pendingcb++,j.lastBufferedRequest=null,U.next?(j.corkedRequestsFree=U.next,U.next=null):j.corkedRequestsFree=new o(j),j.bufferedRequestCount=0}else{for(;y;){var D=y.chunk,w=y.encoding,c=y.callback;if(R(d,j,!1,j.objectMode?1:D.length,D,w,c),y=y.next,j.bufferedRequestCount--,j.writing)break}y===null&&(j.lastBufferedRequest=null)}j.bufferedRequest=y,j.bufferProcessing=!1}function Z(d){return d.ending&&d.length===0&&d.bufferedRequest===null&&!d.finished&&!d.writing}function $(d,j){d._final(function(y){j.pendingcb--,y&&d.emit("error",y),j.prefinished=!0,d.emit("prefinish"),h(d,j)})}function h(d,j){var y=Z(j);return y&&(function(x,B){B.prefinished||B.finalCalled||(typeof x._final=="function"?(B.pendingcb++,B.finalCalled=!0,s.nextTick($,x,B)):(B.prefinished=!0,x.emit("prefinish")))}(d,j),j.pendingcb===0&&(j.finished=!0,d.emit("finish"))),y}m.inherits(M,b),F.prototype.getBuffer=function(){for(var d=this.bufferedRequest,j=[];d;)j.push(d),d=d.next;return j},function(){try{Object.defineProperty(F.prototype,"buffer",{get:T.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(d){return!!S.call(this,d)||this===M&&d&&d._writableState instanceof F}})):S=function(d){return d instanceof this},M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},M.prototype.write=function(d,j,y){var x,B=this._writableState,U=!1,O=!B.objectMode&&(x=d,_.isBuffer(x)||x instanceof f);return O&&!_.isBuffer(d)&&(d=function(A){return _.from(A)}(d)),typeof j=="function"&&(y=j,j=null),O?j="buffer":j||(j=B.defaultEncoding),typeof y!="function"&&(y=N),B.ended?function(A,D){var w=new Error("write after end");A.emit("error",w),s.nextTick(D,w)}(this,y):(O||function(A,D,w,c){var L=!0,k=!1;return w===null?k=new TypeError("May not write null values to stream"):typeof w=="string"||w===void 0||D.objectMode||(k=new TypeError("Invalid non-string/buffer chunk")),k&&(A.emit("error",k),s.nextTick(c,k),L=!1),L}(this,B,d,y))&&(B.pendingcb++,U=function(A,D,w,c,L,k){if(!w){var Y=function(V,v,I){return V.objectMode||V.decodeStrings===!1||typeof v!="string"||(v=_.from(v,I)),v}(D,c,L);c!==Y&&(w=!0,L="buffer",c=Y)}var K=D.objectMode?1:c.length;D.length+=K;var Q=D.length<D.highWaterMark;if(Q||(D.needDrain=!0),D.writing||D.corked){var z=D.lastBufferedRequest;D.lastBufferedRequest={chunk:c,encoding:L,isBuf:w,callback:k,next:null},z?z.next=D.lastBufferedRequest:D.bufferedRequest=D.lastBufferedRequest,D.bufferedRequestCount+=1}else R(A,D,!1,K,c,L,k);return Q}(this,B,O,d,j,y)),U},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var d=this._writableState;d.corked&&(d.corked--,d.writing||d.corked||d.finished||d.bufferProcessing||!d.bufferedRequest||P(this,d))},M.prototype.setDefaultEncoding=function(d){if(typeof d=="string"&&(d=d.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((d+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+d);return this._writableState.defaultEncoding=d,this},Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(d,j,y){y(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(d,j,y){var x=this._writableState;typeof d=="function"?(y=d,d=null,j=null):typeof j=="function"&&(y=j,j=null),d!=null&&this.write(d,j),x.corked&&(x.corked=1,this.uncork()),x.ending||x.finished||function(B,U,O){U.ending=!0,h(B,U),O&&(U.finished?s.nextTick(O):B.once("finish",O)),U.ended=!0,B.writable=!1}(this,x,y)},Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(d){this._writableState&&(this._writableState.destroyed=d)}}),M.prototype.destroy=E.destroy,M.prototype._undestroy=E.undestroy,M.prototype._destroy=function(d,j){this.end(),j(d)}}).call(this,r(2),r(12).setImmediate,r(5))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){var n=r(13);function i(g,s){g.emit("error",s)}e.exports={destroy:function(g,s){var o=this,u=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return u||l?(s?s(g):!g||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(m){!s&&m?(n.nextTick(i,o,m),o._writableState&&(o._writableState.errorEmitted=!0)):s&&s(m)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t){},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(155)),i=s(r(22)),g=s(r(26));function s(o){return o&&o.__esModule?o:{default:o}}t.default=(0,g.default)(function(o,u,l,m){return(0,n.default)(u)(o,(0,i.default)(l),m)},4),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){function i(...g){if(n!==null){var s=n;n=null,s.apply(this,g)}}return Object.assign(i,n),i},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return function(...i){if(n===null)throw new Error("Callback was already called.");var g=n;n=null,g.apply(this,i)}},e.exports=t.default},function(e,t,r){(function(n,i){var g=r(13);e.exports=R;var s,o=r(38);R.ReadableState=M,r(18).EventEmitter;var u=function(w,c){return w.listeners(c).length},l=r(68),m=r(43).Buffer,T=n.Uint8Array||function(){},b=r(14);b.inherits=r(7);var _=r(161),f=void 0;f=_&&_.debuglog?_.debuglog("stream"):function(){};var S,E=r(162),N=r(69);b.inherits(R,l);var F=["error","close","destroy","pause","resume"];function M(w,c){w=w||{};var L=c instanceof(s=s||r(20));this.objectMode=!!w.objectMode,L&&(this.objectMode=this.objectMode||!!w.readableObjectMode);var k=w.highWaterMark,Y=w.readableHighWaterMark,K=this.objectMode?16:16384;this.highWaterMark=k||k===0?k:L&&(Y||Y===0)?Y:K,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new E,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=w.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,w.encoding&&(S||(S=r(19).StringDecoder),this.decoder=new S(w.encoding),this.encoding=w.encoding)}function R(w){if(s=s||r(20),!(this instanceof R))return new R(w);this._readableState=new M(w,this),this.readable=!0,w&&(typeof w.read=="function"&&(this._read=w.read),typeof w.destroy=="function"&&(this._destroy=w.destroy)),l.call(this)}function p(w,c,L,k,Y){var K,Q=w._readableState;return c===null?(Q.reading=!1,function(z,V){if(!V.ended){if(V.decoder){var v=V.decoder.end();v&&v.length&&(V.buffer.push(v),V.length+=V.objectMode?1:v.length)}V.ended=!0,$(z)}}(w,Q)):(Y||(K=function(z,V){var v;I=V,m.isBuffer(I)||I instanceof T||typeof V=="string"||V===void 0||z.objectMode||(v=new TypeError("Invalid non-string/buffer chunk"));var I;return v}(Q,c)),K?w.emit("error",K):Q.objectMode||c&&c.length>0?(typeof c=="string"||Q.objectMode||Object.getPrototypeOf(c)===m.prototype||(c=function(z){return m.from(z)}(c)),k?Q.endEmitted?w.emit("error",new Error("stream.unshift() after end event")):P(w,Q,c,!0):Q.ended?w.emit("error",new Error("stream.push() after EOF")):(Q.reading=!1,Q.decoder&&!L?(c=Q.decoder.write(c),Q.objectMode||c.length!==0?P(w,Q,c,!1):d(w,Q)):P(w,Q,c,!1))):k||(Q.reading=!1)),function(z){return!z.ended&&(z.needReadable||z.length<z.highWaterMark||z.length===0)}(Q)}function P(w,c,L,k){c.flowing&&c.length===0&&!c.sync?(w.emit("data",L),w.read(0)):(c.length+=c.objectMode?1:L.length,k?c.buffer.unshift(L):c.buffer.push(L),c.needReadable&&$(w)),d(w,c)}Object.defineProperty(R.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(w){this._readableState&&(this._readableState.destroyed=w)}}),R.prototype.destroy=N.destroy,R.prototype._undestroy=N.undestroy,R.prototype._destroy=function(w,c){this.push(null),c(w)},R.prototype.push=function(w,c){var L,k=this._readableState;return k.objectMode?L=!0:typeof w=="string"&&((c=c||k.defaultEncoding)!==k.encoding&&(w=m.from(w,c),c=""),L=!0),p(this,w,c,!1,L)},R.prototype.unshift=function(w){return p(this,w,null,!0,!1)},R.prototype.isPaused=function(){return this._readableState.flowing===!1},R.prototype.setEncoding=function(w){return S||(S=r(19).StringDecoder),this._readableState.decoder=new S(w),this._readableState.encoding=w,this};function Z(w,c){return w<=0||c.length===0&&c.ended?0:c.objectMode?1:w!=w?c.flowing&&c.length?c.buffer.head.data.length:c.length:(w>c.highWaterMark&&(c.highWaterMark=function(L){return L>=8388608?L=8388608:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}(w)),w<=c.length?w:c.ended?c.length:(c.needReadable=!0,0))}function $(w){var c=w._readableState;c.needReadable=!1,c.emittedReadable||(f("emitReadable",c.flowing),c.emittedReadable=!0,c.sync?g.nextTick(h,w):h(w))}function h(w){f("emit readable"),w.emit("readable"),B(w)}function d(w,c){c.readingMore||(c.readingMore=!0,g.nextTick(j,w,c))}function j(w,c){for(var L=c.length;!c.reading&&!c.flowing&&!c.ended&&c.length<c.highWaterMark&&(f("maybeReadMore read 0"),w.read(0),L!==c.length);)L=c.length;c.readingMore=!1}function y(w){f("readable nexttick read 0"),w.read(0)}function x(w,c){c.reading||(f("resume read 0"),w.read(0)),c.resumeScheduled=!1,c.awaitDrain=0,w.emit("resume"),B(w),c.flowing&&!c.reading&&w.read(0)}function B(w){var c=w._readableState;for(f("flow",c.flowing);c.flowing&&w.read()!==null;);}function U(w,c){return c.length===0?null:(c.objectMode?L=c.buffer.shift():!w||w>=c.length?(L=c.decoder?c.buffer.join(""):c.buffer.length===1?c.buffer.head.data:c.buffer.concat(c.length),c.buffer.clear()):L=function(k,Y,K){var Q;return k<Y.head.data.length?(Q=Y.head.data.slice(0,k),Y.head.data=Y.head.data.slice(k)):Q=k===Y.head.data.length?Y.shift():K?function(z,V){var v=V.head,I=1,W=v.data;for(z-=W.length;v=v.next;){var ee=v.data,J=z>ee.length?ee.length:z;if(J===ee.length?W+=ee:W+=ee.slice(0,z),(z-=J)===0){J===ee.length?(++I,v.next?V.head=v.next:V.head=V.tail=null):(V.head=v,v.data=ee.slice(J));break}++I}return V.length-=I,W}(k,Y):function(z,V){var v=m.allocUnsafe(z),I=V.head,W=1;for(I.data.copy(v),z-=I.data.length;I=I.next;){var ee=I.data,J=z>ee.length?ee.length:z;if(ee.copy(v,v.length-z,0,J),(z-=J)===0){J===ee.length?(++W,I.next?V.head=I.next:V.head=V.tail=null):(V.head=I,I.data=ee.slice(J));break}++W}return V.length-=W,v}(k,Y),Q}(w,c.buffer,c.decoder),L);var L}function O(w){var c=w._readableState;if(c.length>0)throw new Error('"endReadable()" called on non-empty stream');c.endEmitted||(c.ended=!0,g.nextTick(A,c,w))}function A(w,c){w.endEmitted||w.length!==0||(w.endEmitted=!0,c.readable=!1,c.emit("end"))}function D(w,c){for(var L=0,k=w.length;L<k;L++)if(w[L]===c)return L;return-1}R.prototype.read=function(w){f("read",w),w=parseInt(w,10);var c=this._readableState,L=w;if(w!==0&&(c.emittedReadable=!1),w===0&&c.needReadable&&(c.length>=c.highWaterMark||c.ended))return f("read: emitReadable",c.length,c.ended),c.length===0&&c.ended?O(this):$(this),null;if((w=Z(w,c))===0&&c.ended)return c.length===0&&O(this),null;var k,Y=c.needReadable;return f("need readable",Y),(c.length===0||c.length-w<c.highWaterMark)&&f("length less than watermark",Y=!0),c.ended||c.reading?f("reading or ended",Y=!1):Y&&(f("do read"),c.reading=!0,c.sync=!0,c.length===0&&(c.needReadable=!0),this._read(c.highWaterMark),c.sync=!1,c.reading||(w=Z(L,c))),(k=w>0?U(w,c):null)===null?(c.needReadable=!0,w=0):c.length-=w,c.length===0&&(c.ended||(c.needReadable=!0),L!==w&&c.ended&&O(this)),k!==null&&this.emit("data",k),k},R.prototype._read=function(w){this.emit("error",new Error("_read() is not implemented"))},R.prototype.pipe=function(w,c){var L=this,k=this._readableState;switch(k.pipesCount){case 0:k.pipes=w;break;case 1:k.pipes=[k.pipes,w];break;default:k.pipes.push(w)}k.pipesCount+=1,f("pipe count=%d opts=%j",k.pipesCount,c);var Y=(!c||c.end!==!1)&&w!==i.stdout&&w!==i.stderr?Q:ne;function K(oe,he){f("onunpipe"),oe===L&&he&&he.hasUnpiped===!1&&(he.hasUnpiped=!0,f("cleanup"),w.removeListener("close",ee),w.removeListener("finish",J),w.removeListener("drain",z),w.removeListener("error",W),w.removeListener("unpipe",K),L.removeListener("end",Q),L.removeListener("end",ne),L.removeListener("data",I),V=!0,!k.awaitDrain||w._writableState&&!w._writableState.needDrain||z())}function Q(){f("onend"),w.end()}k.endEmitted?g.nextTick(Y):L.once("end",Y),w.on("unpipe",K);var z=function(oe){return function(){var he=oe._readableState;f("pipeOnDrain",he.awaitDrain),he.awaitDrain&&he.awaitDrain--,he.awaitDrain===0&&u(oe,"data")&&(he.flowing=!0,B(oe))}}(L);w.on("drain",z);var V=!1,v=!1;function I(oe){f("ondata"),v=!1,w.write(oe)!==!1||v||((k.pipesCount===1&&k.pipes===w||k.pipesCount>1&&D(k.pipes,w)!==-1)&&!V&&(f("false write response, pause",L._readableState.awaitDrain),L._readableState.awaitDrain++,v=!0),L.pause())}function W(oe){f("onerror",oe),ne(),w.removeListener("error",W),u(w,"error")===0&&w.emit("error",oe)}function ee(){w.removeListener("finish",J),ne()}function J(){f("onfinish"),w.removeListener("close",ee),ne()}function ne(){f("unpipe"),L.unpipe(w)}return L.on("data",I),function(oe,he,fe){if(typeof oe.prependListener=="function")return oe.prependListener(he,fe);oe._events&&oe._events[he]?o(oe._events[he])?oe._events[he].unshift(fe):oe._events[he]=[fe,oe._events[he]]:oe.on(he,fe)}(w,"error",W),w.once("close",ee),w.once("finish",J),w.emit("pipe",L),k.flowing||(f("pipe resume"),L.resume()),w},R.prototype.unpipe=function(w){var c=this._readableState,L={hasUnpiped:!1};if(c.pipesCount===0)return this;if(c.pipesCount===1)return w&&w!==c.pipes||(w||(w=c.pipes),c.pipes=null,c.pipesCount=0,c.flowing=!1,w&&w.emit("unpipe",this,L)),this;if(!w){var k=c.pipes,Y=c.pipesCount;c.pipes=null,c.pipesCount=0,c.flowing=!1;for(var K=0;K<Y;K++)k[K].emit("unpipe",this,L);return this}var Q=D(c.pipes,w);return Q===-1||(c.pipes.splice(Q,1),c.pipesCount-=1,c.pipesCount===1&&(c.pipes=c.pipes[0]),w.emit("unpipe",this,L)),this},R.prototype.on=function(w,c){var L=l.prototype.on.call(this,w,c);if(w==="data")this._readableState.flowing!==!1&&this.resume();else if(w==="readable"){var k=this._readableState;k.endEmitted||k.readableListening||(k.readableListening=k.needReadable=!0,k.emittedReadable=!1,k.reading?k.length&&$(this):g.nextTick(y,this))}return L},R.prototype.addListener=R.prototype.on,R.prototype.resume=function(){var w=this._readableState;return w.flowing||(f("resume"),w.flowing=!0,function(c,L){L.resumeScheduled||(L.resumeScheduled=!0,g.nextTick(x,c,L))}(this,w)),this},R.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},R.prototype.wrap=function(w){var c=this,L=this._readableState,k=!1;for(var Y in w.on("end",function(){if(f("wrapped end"),L.decoder&&!L.ended){var Q=L.decoder.end();Q&&Q.length&&c.push(Q)}c.push(null)}),w.on("data",function(Q){f("wrapped data"),L.decoder&&(Q=L.decoder.write(Q)),L.objectMode&&Q==null||(L.objectMode||Q&&Q.length)&&(c.push(Q)||(k=!0,w.pause()))}),w)this[Y]===void 0&&typeof w[Y]=="function"&&(this[Y]=function(Q){return function(){return w[Q].apply(w,arguments)}}(Y));for(var K=0;K<F.length;K++)w.on(F[K],this.emit.bind(this,F[K]));return this._read=function(Q){f("wrapped _read",Q),k&&(k=!1,w.resume())},this},Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),R._fromList=U}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){var n=r(13);function i(g,s){g.emit("error",s)}e.exports={destroy:function(g,s){var o=this,u=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return u||l?(s?s(g):!g||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(m){!s&&m?(n.nextTick(i,o,m),o._writableState&&(o._writableState.errorEmitted=!0)):s&&s(m)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,r){e.exports=s;var n=r(20),i=r(14);function g(l,m){var T=this._transformState;T.transforming=!1;var b=T.writecb;if(!b)return this.emit("error",new Error("write callback called multiple times"));T.writechunk=null,T.writecb=null,m!=null&&this.push(m),b(l);var _=this._readableState;_.reading=!1,(_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}function s(l){if(!(this instanceof s))return new s(l);n.call(this,l),this._transformState={afterTransform:g.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",o)}function o(){var l=this;typeof this._flush=="function"?this._flush(function(m,T){u(l,m,T)}):u(this,null,null)}function u(l,m,T){if(m)return l.emit("error",m);if(T!=null&&l.push(T),l._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(l._transformState.transforming)throw new Error("Calling transform done when still transforming");return l.push(null)}i.inherits=r(7),i.inherits(s,n),s.prototype.push=function(l,m){return this._transformState.needTransform=!1,n.prototype.push.call(this,l,m)},s.prototype._transform=function(l,m,T){throw new Error("_transform() is not implemented")},s.prototype._write=function(l,m,T){var b=this._transformState;if(b.writecb=T,b.writechunk=l,b.writeencoding=m,!b.transforming){var _=this._readableState;(b.needTransform||_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}},s.prototype._read=function(l){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},s.prototype._destroy=function(l,m){var T=this;n.prototype._destroy.call(this,l,function(b){m(b),T.emit("close")})}},function(e,t,r){e.exports=r(44)},function(e,t,r){(function(n){var i=r(169);function g(h,d){if(h===d)return 0;for(var j=h.length,y=d.length,x=0,B=Math.min(j,y);x<B;++x)if(h[x]!==d[x]){j=h[x],y=d[x];break}return j<y?-1:y<j?1:0}function s(h){return n.Buffer&&typeof n.Buffer.isBuffer=="function"?n.Buffer.isBuffer(h):!(h==null||!h._isBuffer)}var o=r(10),u=Object.prototype.hasOwnProperty,l=Array.prototype.slice,m=function(){}.name==="foo";function T(h){return Object.prototype.toString.call(h)}function b(h){return!s(h)&&typeof n.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(h):!!h&&(h instanceof DataView||!!(h.buffer&&h.buffer instanceof ArrayBuffer)))}var _=e.exports=M,f=/\s*function\s+([^\(\s]*)\s*/;function S(h){if(o.isFunction(h)){if(m)return h.name;var d=h.toString().match(f);return d&&d[1]}}function E(h,d){return typeof h=="string"?h.length<d?h:h.slice(0,d):h}function N(h){if(m||!o.isFunction(h))return o.inspect(h);var d=S(h);return"[Function"+(d?": "+d:"")+"]"}function F(h,d,j,y,x){throw new _.AssertionError({message:j,actual:h,expected:d,operator:y,stackStartFunction:x})}function M(h,d){h||F(h,!0,d,"==",_.ok)}function R(h,d,j,y){if(h===d)return!0;if(s(h)&&s(d))return g(h,d)===0;if(o.isDate(h)&&o.isDate(d))return h.getTime()===d.getTime();if(o.isRegExp(h)&&o.isRegExp(d))return h.source===d.source&&h.global===d.global&&h.multiline===d.multiline&&h.lastIndex===d.lastIndex&&h.ignoreCase===d.ignoreCase;if(h!==null&&typeof h=="object"||d!==null&&typeof d=="object"){if(b(h)&&b(d)&&T(h)===T(d)&&!(h instanceof Float32Array||h instanceof Float64Array))return g(new Uint8Array(h.buffer),new Uint8Array(d.buffer))===0;if(s(h)!==s(d))return!1;var x=(y=y||{actual:[],expected:[]}).actual.indexOf(h);return x!==-1&&x===y.expected.indexOf(d)||(y.actual.push(h),y.expected.push(d),function(B,U,O,A){if(B==null||U==null)return!1;if(o.isPrimitive(B)||o.isPrimitive(U))return B===U;if(O&&Object.getPrototypeOf(B)!==Object.getPrototypeOf(U))return!1;var D=p(B),w=p(U);if(D&&!w||!D&&w)return!1;if(D)return B=l.call(B),U=l.call(U),R(B,U,O);var c,L,k=$(B),Y=$(U);if(k.length!==Y.length)return!1;for(k.sort(),Y.sort(),L=k.length-1;L>=0;L--)if(k[L]!==Y[L])return!1;for(L=k.length-1;L>=0;L--)if(c=k[L],!R(B[c],U[c],O,A))return!1;return!0}(h,d,j,y))}return j?h===d:h==d}function p(h){return Object.prototype.toString.call(h)=="[object Arguments]"}function P(h,d){if(!h||!d)return!1;if(Object.prototype.toString.call(d)=="[object RegExp]")return d.test(h);try{if(h instanceof d)return!0}catch{}return!Error.isPrototypeOf(d)&&d.call({},h)===!0}function Z(h,d,j,y){var x;if(typeof d!="function")throw new TypeError('"block" argument must be a function');typeof j=="string"&&(y=j,j=null),x=function(O){var A;try{O()}catch(D){A=D}return A}(d),y=(j&&j.name?" ("+j.name+").":".")+(y?" "+y:"."),h&&!x&&F(x,j,"Missing expected exception"+y);var B=typeof y=="string",U=!h&&x&&!j;if((!h&&o.isError(x)&&B&&P(x,j)||U)&&F(x,j,"Got unwanted exception"+y),h&&x&&j&&!P(x,j)||!h&&x)throw x}_.AssertionError=function(h){this.name="AssertionError",this.actual=h.actual,this.expected=h.expected,this.operator=h.operator,h.message?(this.message=h.message,this.generatedMessage=!1):(this.message=function(O){return E(N(O.actual),128)+" "+O.operator+" "+E(N(O.expected),128)}(this),this.generatedMessage=!0);var d=h.stackStartFunction||F;if(Error.captureStackTrace)Error.captureStackTrace(this,d);else{var j=new Error;if(j.stack){var y=j.stack,x=S(d),B=y.indexOf(`
24
+ `+x);if(B>=0){var U=y.indexOf(`
25
+ `,B+1);y=y.substring(U+1)}this.stack=y}}},o.inherits(_.AssertionError,Error),_.fail=F,_.ok=M,_.equal=function(h,d,j){h!=d&&F(h,d,j,"==",_.equal)},_.notEqual=function(h,d,j){h==d&&F(h,d,j,"!=",_.notEqual)},_.deepEqual=function(h,d,j){R(h,d,!1)||F(h,d,j,"deepEqual",_.deepEqual)},_.deepStrictEqual=function(h,d,j){R(h,d,!0)||F(h,d,j,"deepStrictEqual",_.deepStrictEqual)},_.notDeepEqual=function(h,d,j){R(h,d,!1)&&F(h,d,j,"notDeepEqual",_.notDeepEqual)},_.notDeepStrictEqual=function h(d,j,y){R(d,j,!0)&&F(d,j,y,"notDeepStrictEqual",h)},_.strictEqual=function(h,d,j){h!==d&&F(h,d,j,"===",_.strictEqual)},_.notStrictEqual=function(h,d,j){h===d&&F(h,d,j,"!==",_.notStrictEqual)},_.throws=function(h,d,j){Z(!0,h,d,j)},_.doesNotThrow=function(h,d,j){Z(!1,h,d,j)},_.ifError=function(h){if(h)throw h},_.strict=i(function h(d,j){d||F(d,!0,j,"==",h)},_,{equal:_.strictEqual,deepEqual:_.deepStrictEqual,notEqual:_.notStrictEqual,notDeepEqual:_.notDeepStrictEqual}),_.strict.strict=_.strict;var $=Object.keys||function(h){var d=[];for(var j in h)u.call(h,j)&&d.push(j);return d}}).call(this,r(5))},function(e,t,r){e.exports=function(n,i,g,s){for(var o=65535&n|0,u=n>>>16&65535|0,l=0;g!==0;){g-=l=g>2e3?2e3:g;do u=u+(o=o+i[s++]|0)|0;while(--l);o%=65521,u%=65521}return o|u<<16|0}},function(e,t,r){var n=function(){for(var i,g=[],s=0;s<256;s++){i=s;for(var o=0;o<8;o++)i=1&i?3988292384^i>>>1:i>>>1;g[s]=i}return g}();e.exports=function(i,g,s,o){var u=n,l=o+s;i^=-1;for(var m=o;m<l;m++)i=i>>>8^u[255&(i^g[m])];return-1^i}},function(e,t,r){(function(n,i){var g;e.exports=d,d.ReadableState=h,r(18).EventEmitter;var s=function(z,V){return z.listeners(V).length},o=r(76),u=r(4).Buffer,l=n.Uint8Array||function(){},m,T=r(178);m=T&&T.debuglog?T.debuglog("stream"):function(){};var b,_,f,S=r(179),E=r(77),N=r(78).getHighWaterMark,F=r(23).codes,M=F.ERR_INVALID_ARG_TYPE,R=F.ERR_STREAM_PUSH_AFTER_EOF,p=F.ERR_METHOD_NOT_IMPLEMENTED,P=F.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(7)(d,o);var Z=E.errorOrDestroy,$=["error","close","destroy","pause","resume"];function h(z,V,v){g=g||r(24),z=z||{},typeof v!="boolean"&&(v=V instanceof g),this.objectMode=!!z.objectMode,v&&(this.objectMode=this.objectMode||!!z.readableObjectMode),this.highWaterMark=N(this,z,"readableHighWaterMark",v),this.buffer=new S,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=z.emitClose!==!1,this.autoDestroy=!!z.autoDestroy,this.destroyed=!1,this.defaultEncoding=z.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,z.encoding&&(b||(b=r(19).StringDecoder),this.decoder=new b(z.encoding),this.encoding=z.encoding)}function d(z){if(g=g||r(24),!(this instanceof d))return new d(z);var V=this instanceof g;this._readableState=new h(z,this,V),this.readable=!0,z&&(typeof z.read=="function"&&(this._read=z.read),typeof z.destroy=="function"&&(this._destroy=z.destroy)),o.call(this)}function j(z,V,v,I,W){m("readableAddChunk",V);var ee,J=z._readableState;if(V===null)J.reading=!1,function(ne,oe){if(m("onEofChunk"),!oe.ended){if(oe.decoder){var he=oe.decoder.end();he&&he.length&&(oe.buffer.push(he),oe.length+=oe.objectMode?1:he.length)}oe.ended=!0,oe.sync?B(ne):(oe.needReadable=!1,oe.emittedReadable||(oe.emittedReadable=!0,U(ne)))}}(z,J);else if(W||(ee=function(ne,oe){var he;fe=oe,u.isBuffer(fe)||fe instanceof l||typeof oe=="string"||oe===void 0||ne.objectMode||(he=new M("chunk",["string","Buffer","Uint8Array"],oe));var fe;return he}(J,V)),ee)Z(z,ee);else if(J.objectMode||V&&V.length>0)if(typeof V=="string"||J.objectMode||Object.getPrototypeOf(V)===u.prototype||(V=function(ne){return u.from(ne)}(V)),I)J.endEmitted?Z(z,new P):y(z,J,V,!0);else if(J.ended)Z(z,new R);else{if(J.destroyed)return!1;J.reading=!1,J.decoder&&!v?(V=J.decoder.write(V),J.objectMode||V.length!==0?y(z,J,V,!1):O(z,J)):y(z,J,V,!1)}else I||(J.reading=!1,O(z,J));return!J.ended&&(J.length<J.highWaterMark||J.length===0)}function y(z,V,v,I){V.flowing&&V.length===0&&!V.sync?(V.awaitDrain=0,z.emit("data",v)):(V.length+=V.objectMode?1:v.length,I?V.buffer.unshift(v):V.buffer.push(v),V.needReadable&&B(z)),O(z,V)}Object.defineProperty(d.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(z){this._readableState&&(this._readableState.destroyed=z)}}),d.prototype.destroy=E.destroy,d.prototype._undestroy=E.undestroy,d.prototype._destroy=function(z,V){V(z)},d.prototype.push=function(z,V){var v,I=this._readableState;return I.objectMode?v=!0:typeof z=="string"&&((V=V||I.defaultEncoding)!==I.encoding&&(z=u.from(z,V),V=""),v=!0),j(this,z,V,!1,v)},d.prototype.unshift=function(z){return j(this,z,null,!0,!1)},d.prototype.isPaused=function(){return this._readableState.flowing===!1},d.prototype.setEncoding=function(z){b||(b=r(19).StringDecoder);var V=new b(z);this._readableState.decoder=V,this._readableState.encoding=this._readableState.decoder.encoding;for(var v=this._readableState.buffer.head,I="";v!==null;)I+=V.write(v.data),v=v.next;return this._readableState.buffer.clear(),I!==""&&this._readableState.buffer.push(I),this._readableState.length=I.length,this};function x(z,V){return z<=0||V.length===0&&V.ended?0:V.objectMode?1:z!=z?V.flowing&&V.length?V.buffer.head.data.length:V.length:(z>V.highWaterMark&&(V.highWaterMark=function(v){return v>=1073741824?v=1073741824:(v--,v|=v>>>1,v|=v>>>2,v|=v>>>4,v|=v>>>8,v|=v>>>16,v++),v}(z)),z<=V.length?z:V.ended?V.length:(V.needReadable=!0,0))}function B(z){var V=z._readableState;m("emitReadable",V.needReadable,V.emittedReadable),V.needReadable=!1,V.emittedReadable||(m("emitReadable",V.flowing),V.emittedReadable=!0,i.nextTick(U,z))}function U(z){var V=z._readableState;m("emitReadable_",V.destroyed,V.length,V.ended),V.destroyed||!V.length&&!V.ended||(z.emit("readable"),V.emittedReadable=!1),V.needReadable=!V.flowing&&!V.ended&&V.length<=V.highWaterMark,L(z)}function O(z,V){V.readingMore||(V.readingMore=!0,i.nextTick(A,z,V))}function A(z,V){for(;!V.reading&&!V.ended&&(V.length<V.highWaterMark||V.flowing&&V.length===0);){var v=V.length;if(m("maybeReadMore read 0"),z.read(0),v===V.length)break}V.readingMore=!1}function D(z){var V=z._readableState;V.readableListening=z.listenerCount("readable")>0,V.resumeScheduled&&!V.paused?V.flowing=!0:z.listenerCount("data")>0&&z.resume()}function w(z){m("readable nexttick read 0"),z.read(0)}function c(z,V){m("resume",V.reading),V.reading||z.read(0),V.resumeScheduled=!1,z.emit("resume"),L(z),V.flowing&&!V.reading&&z.read(0)}function L(z){var V=z._readableState;for(m("flow",V.flowing);V.flowing&&z.read()!==null;);}function k(z,V){return V.length===0?null:(V.objectMode?v=V.buffer.shift():!z||z>=V.length?(v=V.decoder?V.buffer.join(""):V.buffer.length===1?V.buffer.first():V.buffer.concat(V.length),V.buffer.clear()):v=V.buffer.consume(z,V.decoder),v);var v}function Y(z){var V=z._readableState;m("endReadable",V.endEmitted),V.endEmitted||(V.ended=!0,i.nextTick(K,V,z))}function K(z,V){if(m("endReadableNT",z.endEmitted,z.length),!z.endEmitted&&z.length===0&&(z.endEmitted=!0,V.readable=!1,V.emit("end"),z.autoDestroy)){var v=V._writableState;(!v||v.autoDestroy&&v.finished)&&V.destroy()}}function Q(z,V){for(var v=0,I=z.length;v<I;v++)if(z[v]===V)return v;return-1}d.prototype.read=function(z){m("read",z),z=parseInt(z,10);var V=this._readableState,v=z;if(z!==0&&(V.emittedReadable=!1),z===0&&V.needReadable&&((V.highWaterMark!==0?V.length>=V.highWaterMark:V.length>0)||V.ended))return m("read: emitReadable",V.length,V.ended),V.length===0&&V.ended?Y(this):B(this),null;if((z=x(z,V))===0&&V.ended)return V.length===0&&Y(this),null;var I,W=V.needReadable;return m("need readable",W),(V.length===0||V.length-z<V.highWaterMark)&&m("length less than watermark",W=!0),V.ended||V.reading?m("reading or ended",W=!1):W&&(m("do read"),V.reading=!0,V.sync=!0,V.length===0&&(V.needReadable=!0),this._read(V.highWaterMark),V.sync=!1,V.reading||(z=x(v,V))),(I=z>0?k(z,V):null)===null?(V.needReadable=V.length<=V.highWaterMark,z=0):(V.length-=z,V.awaitDrain=0),V.length===0&&(V.ended||(V.needReadable=!0),v!==z&&V.ended&&Y(this)),I!==null&&this.emit("data",I),I},d.prototype._read=function(z){Z(this,new p("_read()"))},d.prototype.pipe=function(z,V){var v=this,I=this._readableState;switch(I.pipesCount){case 0:I.pipes=z;break;case 1:I.pipes=[I.pipes,z];break;default:I.pipes.push(z)}I.pipesCount+=1,m("pipe count=%d opts=%j",I.pipesCount,V);var W=(!V||V.end!==!1)&&z!==i.stdout&&z!==i.stderr?J:te;function ee(se,ae){m("onunpipe"),se===v&&ae&&ae.hasUnpiped===!1&&(ae.hasUnpiped=!0,m("cleanup"),z.removeListener("close",G),z.removeListener("finish",q),z.removeListener("drain",ne),z.removeListener("error",fe),z.removeListener("unpipe",ee),v.removeListener("end",J),v.removeListener("end",te),v.removeListener("data",he),oe=!0,!I.awaitDrain||z._writableState&&!z._writableState.needDrain||ne())}function J(){m("onend"),z.end()}I.endEmitted?i.nextTick(W):v.once("end",W),z.on("unpipe",ee);var ne=function(se){return function(){var ae=se._readableState;m("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&s(se,"data")&&(ae.flowing=!0,L(se))}}(v);z.on("drain",ne);var oe=!1;function he(se){m("ondata");var ae=z.write(se);m("dest.write",ae),ae===!1&&((I.pipesCount===1&&I.pipes===z||I.pipesCount>1&&Q(I.pipes,z)!==-1)&&!oe&&(m("false write response, pause",I.awaitDrain),I.awaitDrain++),v.pause())}function fe(se){m("onerror",se),te(),z.removeListener("error",fe),s(z,"error")===0&&Z(z,se)}function G(){z.removeListener("finish",q),te()}function q(){m("onfinish"),z.removeListener("close",G),te()}function te(){m("unpipe"),v.unpipe(z)}return v.on("data",he),function(se,ae,me){if(typeof se.prependListener=="function")return se.prependListener(ae,me);se._events&&se._events[ae]?Array.isArray(se._events[ae])?se._events[ae].unshift(me):se._events[ae]=[me,se._events[ae]]:se.on(ae,me)}(z,"error",fe),z.once("close",G),z.once("finish",q),z.emit("pipe",v),I.flowing||(m("pipe resume"),v.resume()),z},d.prototype.unpipe=function(z){var V=this._readableState,v={hasUnpiped:!1};if(V.pipesCount===0)return this;if(V.pipesCount===1)return z&&z!==V.pipes||(z||(z=V.pipes),V.pipes=null,V.pipesCount=0,V.flowing=!1,z&&z.emit("unpipe",this,v)),this;if(!z){var I=V.pipes,W=V.pipesCount;V.pipes=null,V.pipesCount=0,V.flowing=!1;for(var ee=0;ee<W;ee++)I[ee].emit("unpipe",this,{hasUnpiped:!1});return this}var J=Q(V.pipes,z);return J===-1||(V.pipes.splice(J,1),V.pipesCount-=1,V.pipesCount===1&&(V.pipes=V.pipes[0]),z.emit("unpipe",this,v)),this},d.prototype.on=function(z,V){var v=o.prototype.on.call(this,z,V),I=this._readableState;return z==="data"?(I.readableListening=this.listenerCount("readable")>0,I.flowing!==!1&&this.resume()):z==="readable"&&(I.endEmitted||I.readableListening||(I.readableListening=I.needReadable=!0,I.flowing=!1,I.emittedReadable=!1,m("on readable",I.length,I.reading),I.length?B(this):I.reading||i.nextTick(w,this))),v},d.prototype.addListener=d.prototype.on,d.prototype.removeListener=function(z,V){var v=o.prototype.removeListener.call(this,z,V);return z==="readable"&&i.nextTick(D,this),v},d.prototype.removeAllListeners=function(z){var V=o.prototype.removeAllListeners.apply(this,arguments);return z!=="readable"&&z!==void 0||i.nextTick(D,this),V},d.prototype.resume=function(){var z=this._readableState;return z.flowing||(m("resume"),z.flowing=!z.readableListening,function(V,v){v.resumeScheduled||(v.resumeScheduled=!0,i.nextTick(c,V,v))}(this,z)),z.paused=!1,this},d.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},d.prototype.wrap=function(z){var V=this,v=this._readableState,I=!1;for(var W in z.on("end",function(){if(m("wrapped end"),v.decoder&&!v.ended){var J=v.decoder.end();J&&J.length&&V.push(J)}V.push(null)}),z.on("data",function(J){m("wrapped data"),v.decoder&&(J=v.decoder.write(J)),v.objectMode&&J==null||(v.objectMode||J&&J.length)&&(V.push(J)||(I=!0,z.pause()))}),z)this[W]===void 0&&typeof z[W]=="function"&&(this[W]=function(J){return function(){return z[J].apply(z,arguments)}}(W));for(var ee=0;ee<$.length;ee++)z.on($[ee],this.emit.bind(this,$[ee]));return this._read=function(J){m("wrapped _read",J),I&&(I=!1,z.resume())},this},typeof Symbol=="function"&&(d.prototype[Symbol.asyncIterator]=function(){return _===void 0&&(_=r(181)),_(this)}),Object.defineProperty(d.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(d.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(d.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(z){this._readableState&&(this._readableState.flowing=z)}}),d._fromList=k,Object.defineProperty(d.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(d.from=function(z,V){return f===void 0&&(f=r(182)),f(d,z,V)})}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){(function(n){function i(o,u){s(o,u),g(o)}function g(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function s(o,u){o.emit("error",u)}e.exports={destroy:function(o,u){var l=this,m=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;return m||T?(u?u(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,o)):n.nextTick(s,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(b){!u&&b?l._writableState?l._writableState.errorEmitted?n.nextTick(g,l):(l._writableState.errorEmitted=!0,n.nextTick(i,l,b)):n.nextTick(i,l,b):u?(n.nextTick(g,l),u(b)):n.nextTick(g,l)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(o,u){var l=o._readableState,m=o._writableState;l&&l.autoDestroy||m&&m.autoDestroy?o.destroy(u):o.emit("error",u)}}}).call(this,r(2))},function(e,t,r){var n=r(23).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(i,g,s,o){var u=function(l,m,T){return l.highWaterMark!=null?l.highWaterMark:m?l[T]:null}(g,o,s);if(u!=null){if(!isFinite(u)||Math.floor(u)!==u||u<0)throw new n(o?s:"highWaterMark",u);return Math.floor(u)}return i.objectMode?16:16384}}},function(e,t,r){(function(n,i){function g(A){var D=this;this.next=null,this.entry=null,this.finish=function(){(function(w,c,L){var k=w.entry;for(w.entry=null;k;){var Y=k.callback;c.pendingcb--,Y(L),k=k.next}c.corkedRequestsFree.next=w})(D,A)}}var s;e.exports=d,d.WritableState=h;var o={deprecate:r(39)},u=r(76),l=r(4).Buffer,m=n.Uint8Array||function(){},T,b=r(77),_=r(78).getHighWaterMark,f=r(23).codes,S=f.ERR_INVALID_ARG_TYPE,E=f.ERR_METHOD_NOT_IMPLEMENTED,N=f.ERR_MULTIPLE_CALLBACK,F=f.ERR_STREAM_CANNOT_PIPE,M=f.ERR_STREAM_DESTROYED,R=f.ERR_STREAM_NULL_VALUES,p=f.ERR_STREAM_WRITE_AFTER_END,P=f.ERR_UNKNOWN_ENCODING,Z=b.errorOrDestroy;function $(){}function h(A,D,w){s=s||r(24),A=A||{},typeof w!="boolean"&&(w=D instanceof s),this.objectMode=!!A.objectMode,w&&(this.objectMode=this.objectMode||!!A.writableObjectMode),this.highWaterMark=_(this,A,"writableHighWaterMark",w),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=A.decodeStrings===!1;this.decodeStrings=!c,this.defaultEncoding=A.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){(function(k,Y){var K=k._writableState,Q=K.sync,z=K.writecb;if(typeof z!="function")throw new N;if(function(v){v.writing=!1,v.writecb=null,v.length-=v.writelen,v.writelen=0}(K),Y)(function(v,I,W,ee,J){--I.pendingcb,W?(i.nextTick(J,ee),i.nextTick(O,v,I),v._writableState.errorEmitted=!0,Z(v,ee)):(J(ee),v._writableState.errorEmitted=!0,Z(v,ee),O(v,I))})(k,K,Q,Y,z);else{var V=B(K)||k.destroyed;V||K.corked||K.bufferProcessing||!K.bufferedRequest||x(k,K),Q?i.nextTick(y,k,K,V,z):y(k,K,V,z)}})(D,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=A.emitClose!==!1,this.autoDestroy=!!A.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new g(this)}function d(A){var D=this instanceof(s=s||r(24));if(!D&&!T.call(d,this))return new d(A);this._writableState=new h(A,this,D),this.writable=!0,A&&(typeof A.write=="function"&&(this._write=A.write),typeof A.writev=="function"&&(this._writev=A.writev),typeof A.destroy=="function"&&(this._destroy=A.destroy),typeof A.final=="function"&&(this._final=A.final)),u.call(this)}function j(A,D,w,c,L,k,Y){D.writelen=c,D.writecb=Y,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new M("write")):w?A._writev(L,D.onwrite):A._write(L,k,D.onwrite),D.sync=!1}function y(A,D,w,c){w||function(L,k){k.length===0&&k.needDrain&&(k.needDrain=!1,L.emit("drain"))}(A,D),D.pendingcb--,c(),O(A,D)}function x(A,D){D.bufferProcessing=!0;var w=D.bufferedRequest;if(A._writev&&w&&w.next){var c=D.bufferedRequestCount,L=new Array(c),k=D.corkedRequestsFree;k.entry=w;for(var Y=0,K=!0;w;)L[Y]=w,w.isBuf||(K=!1),w=w.next,Y+=1;L.allBuffers=K,j(A,D,!0,D.length,L,"",k.finish),D.pendingcb++,D.lastBufferedRequest=null,k.next?(D.corkedRequestsFree=k.next,k.next=null):D.corkedRequestsFree=new g(D),D.bufferedRequestCount=0}else{for(;w;){var Q=w.chunk,z=w.encoding,V=w.callback;if(j(A,D,!1,D.objectMode?1:Q.length,Q,z,V),w=w.next,D.bufferedRequestCount--,D.writing)break}w===null&&(D.lastBufferedRequest=null)}D.bufferedRequest=w,D.bufferProcessing=!1}function B(A){return A.ending&&A.length===0&&A.bufferedRequest===null&&!A.finished&&!A.writing}function U(A,D){A._final(function(w){D.pendingcb--,w&&Z(A,w),D.prefinished=!0,A.emit("prefinish"),O(A,D)})}function O(A,D){var w=B(D);if(w&&(function(L,k){k.prefinished||k.finalCalled||(typeof L._final!="function"||k.destroyed?(k.prefinished=!0,L.emit("prefinish")):(k.pendingcb++,k.finalCalled=!0,i.nextTick(U,L,k)))}(A,D),D.pendingcb===0&&(D.finished=!0,A.emit("finish"),D.autoDestroy))){var c=A._readableState;(!c||c.autoDestroy&&c.endEmitted)&&A.destroy()}return w}r(7)(d,u),h.prototype.getBuffer=function(){for(var A=this.bufferedRequest,D=[];A;)D.push(A),A=A.next;return D},function(){try{Object.defineProperty(h.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(A){return!!T.call(this,A)||this===d&&A&&A._writableState instanceof h}})):T=function(A){return A instanceof this},d.prototype.pipe=function(){Z(this,new F)},d.prototype.write=function(A,D,w){var c,L=this._writableState,k=!1,Y=!L.objectMode&&(c=A,l.isBuffer(c)||c instanceof m);return Y&&!l.isBuffer(A)&&(A=function(K){return l.from(K)}(A)),typeof D=="function"&&(w=D,D=null),Y?D="buffer":D||(D=L.defaultEncoding),typeof w!="function"&&(w=$),L.ending?function(K,Q){var z=new p;Z(K,z),i.nextTick(Q,z)}(this,w):(Y||function(K,Q,z,V){var v;return z===null?v=new R:typeof z=="string"||Q.objectMode||(v=new S("chunk",["string","Buffer"],z)),!v||(Z(K,v),i.nextTick(V,v),!1)}(this,L,A,w))&&(L.pendingcb++,k=function(K,Q,z,V,v,I){if(!z){var W=function(oe,he,fe){return oe.objectMode||oe.decodeStrings===!1||typeof he!="string"||(he=l.from(he,fe)),he}(Q,V,v);V!==W&&(z=!0,v="buffer",V=W)}var ee=Q.objectMode?1:V.length;Q.length+=ee;var J=Q.length<Q.highWaterMark;if(J||(Q.needDrain=!0),Q.writing||Q.corked){var ne=Q.lastBufferedRequest;Q.lastBufferedRequest={chunk:V,encoding:v,isBuf:z,callback:I,next:null},ne?ne.next=Q.lastBufferedRequest:Q.bufferedRequest=Q.lastBufferedRequest,Q.bufferedRequestCount+=1}else j(K,Q,!1,ee,V,v,I);return J}(this,L,Y,A,D,w)),k},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var A=this._writableState;A.corked&&(A.corked--,A.writing||A.corked||A.bufferProcessing||!A.bufferedRequest||x(this,A))},d.prototype.setDefaultEncoding=function(A){if(typeof A=="string"&&(A=A.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((A+"").toLowerCase())>-1))throw new P(A);return this._writableState.defaultEncoding=A,this},Object.defineProperty(d.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(A,D,w){w(new E("_write()"))},d.prototype._writev=null,d.prototype.end=function(A,D,w){var c=this._writableState;return typeof A=="function"?(w=A,A=null,D=null):typeof D=="function"&&(w=D,D=null),A!=null&&this.write(A,D),c.corked&&(c.corked=1,this.uncork()),c.ending||function(L,k,Y){k.ending=!0,O(L,k),Y&&(k.finished?i.nextTick(Y):L.once("finish",Y)),k.ended=!0,L.writable=!1}(this,c,w),this},Object.defineProperty(d.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(d.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(A){this._writableState&&(this._writableState.destroyed=A)}}),d.prototype.destroy=b.destroy,d.prototype._undestroy=b.undestroy,d.prototype._destroy=function(A,D){D(A)}}).call(this,r(5),r(2))},function(e,t,r){e.exports=m;var n=r(23).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,g=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(24);function l(_,f){var S=this._transformState;S.transforming=!1;var E=S.writecb;if(E===null)return this.emit("error",new g);S.writechunk=null,S.writecb=null,f!=null&&this.push(f),E(_);var N=this._readableState;N.reading=!1,(N.needReadable||N.length<N.highWaterMark)&&this._read(N.highWaterMark)}function m(_){if(!(this instanceof m))return new m(_);u.call(this,_),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,_&&(typeof _.transform=="function"&&(this._transform=_.transform),typeof _.flush=="function"&&(this._flush=_.flush)),this.on("prefinish",T)}function T(){var _=this;typeof this._flush!="function"||this._readableState.destroyed?b(this,null,null):this._flush(function(f,S){b(_,f,S)})}function b(_,f,S){if(f)return _.emit("error",f);if(S!=null&&_.push(S),_._writableState.length)throw new o;if(_._transformState.transforming)throw new s;return _.push(null)}r(7)(m,u),m.prototype.push=function(_,f){return this._transformState.needTransform=!1,u.prototype.push.call(this,_,f)},m.prototype._transform=function(_,f,S){S(new i("_transform()"))},m.prototype._write=function(_,f,S){var E=this._transformState;if(E.writecb=S,E.writechunk=_,E.writeencoding=f,!E.transforming){var N=this._readableState;(E.needTransform||N.needReadable||N.length<N.highWaterMark)&&this._read(N.highWaterMark)}},m.prototype._read=function(_){var f=this._transformState;f.writechunk===null||f.transforming?f.needTransform=!0:(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform))},m.prototype._destroy=function(_,f){u.prototype._destroy.call(this,_,function(S){f(S)})}},function(e,t,r){(function(n){var i=r(189),g=r(83),s=r(191),o=r(192),u=r(46),l=t;l.request=function(m,T){m=typeof m=="string"?u.parse(m):s(m);var b=n.location.protocol.search(/^https?:$/)===-1?"http:":"",_=m.protocol||b,f=m.hostname||m.host,S=m.port,E=m.path||"/";f&&f.indexOf(":")!==-1&&(f="["+f+"]"),m.url=(f?_+"//"+f:"")+(S?":"+S:"")+E,m.method=(m.method||"GET").toUpperCase(),m.headers=m.headers||{};var N=new i(m);return T&&N.on("response",T),N},l.get=function(m,T){var b=l.request(m,T);return b.end(),b},l.ClientRequest=i,l.IncomingMessage=g.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=o,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(5))},function(e,t,r){(function(n){t.fetch=l(n.fetch)&&l(n.ReadableStream),t.writableStream=l(n.WritableStream),t.abortController=l(n.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch{}var i;function g(){if(i!==void 0)return i;if(n.XMLHttpRequest){i=new n.XMLHttpRequest;try{i.open("GET",n.XDomainRequest?"/":"https://example.com")}catch{i=null}}else i=null;return i}function s(m){var T=g();if(!T)return!1;try{return T.responseType=m,T.responseType===m}catch{}return!1}var o=n.ArrayBuffer!==void 0,u=o&&l(n.ArrayBuffer.prototype.slice);function l(m){return typeof m=="function"}t.arraybuffer=t.fetch||o&&s("arraybuffer"),t.msstream=!t.fetch&&u&&s("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o&&s("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!g()&&l(g().overrideMimeType),t.vbArray=l(n.VBArray),i=null}).call(this,r(5))},function(e,t,r){(function(n,i,g){var s=r(82),o=r(7),u=r(27),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},m=t.IncomingMessage=function(T,b,_,f){var S=this;if(u.Readable.call(S),S._mode=_,S.headers={},S.rawHeaders=[],S.trailers={},S.rawTrailers=[],S.on("end",function(){n.nextTick(function(){S.emit("close")})}),_==="fetch"){if(S._fetchResponse=b,S.url=b.url,S.statusCode=b.status,S.statusMessage=b.statusText,b.headers.forEach(function(R,p){S.headers[p.toLowerCase()]=R,S.rawHeaders.push(p,R)}),s.writableStream){var E=new WritableStream({write:function(R){return new Promise(function(p,P){S._destroyed?P():S.push(new i(R))?p():S._resumeFetch=p})},close:function(){g.clearTimeout(f),S._destroyed||S.push(null)},abort:function(R){S._destroyed||S.emit("error",R)}});try{return void b.body.pipeTo(E).catch(function(R){g.clearTimeout(f),S._destroyed||S.emit("error",R)})}catch{}}var N=b.body.getReader();(function R(){N.read().then(function(p){if(!S._destroyed){if(p.done)return g.clearTimeout(f),void S.push(null);S.push(new i(p.value)),R()}}).catch(function(p){g.clearTimeout(f),S._destroyed||S.emit("error",p)})})()}else if(S._xhr=T,S._pos=0,S.url=T.responseURL,S.statusCode=T.status,S.statusMessage=T.statusText,T.getAllResponseHeaders().split(/\r?\n/).forEach(function(R){var p=R.match(/^([^:]+):\s*(.*)/);if(p){var P=p[1].toLowerCase();P==="set-cookie"?(S.headers[P]===void 0&&(S.headers[P]=[]),S.headers[P].push(p[2])):S.headers[P]!==void 0?S.headers[P]+=", "+p[2]:S.headers[P]=p[2],S.rawHeaders.push(p[1],p[2])}}),S._charset="x-user-defined",!s.overrideMimeType){var F=S.rawHeaders["mime-type"];if(F){var M=F.match(/;\s*charset=([^;])(;|$)/);M&&(S._charset=M[1].toLowerCase())}S._charset||(S._charset="utf-8")}};o(m,u.Readable),m.prototype._read=function(){var T=this._resumeFetch;T&&(this._resumeFetch=null,T())},m.prototype._onXHRProgress=function(){var T=this,b=T._xhr,_=null;switch(T._mode){case"text:vbarray":if(b.readyState!==l.DONE)break;try{_=new g.VBArray(b.responseBody).toArray()}catch{}if(_!==null){T.push(new i(_));break}case"text":try{_=b.responseText}catch{T._mode="text:vbarray";break}if(_.length>T._pos){var f=_.substr(T._pos);if(T._charset==="x-user-defined"){for(var S=new i(f.length),E=0;E<f.length;E++)S[E]=255&f.charCodeAt(E);T.push(S)}else T.push(f,T._charset);T._pos=_.length}break;case"arraybuffer":if(b.readyState!==l.DONE||!b.response)break;_=b.response,T.push(new i(new Uint8Array(_)));break;case"moz-chunked-arraybuffer":if(_=b.response,b.readyState!==l.LOADING||!_)break;T.push(new i(new Uint8Array(_)));break;case"ms-stream":if(_=b.response,b.readyState!==l.LOADING)break;var N=new g.MSStreamReader;N.onprogress=function(){N.result.byteLength>T._pos&&(T.push(new i(new Uint8Array(N.result.slice(T._pos)))),T._pos=N.result.byteLength)},N.onload=function(){T.push(null)},N.readAsArrayBuffer(_)}T._xhr.readyState===l.DONE&&T._mode!=="ms-stream"&&T.push(null)}}).call(this,r(2),r(4).Buffer,r(5))},function(e,t,r){const n=i=>i!==null&&typeof i=="object"&&typeof i.pipe=="function";n.writable=i=>n(i)&&i.writable!==!1&&typeof i._write=="function"&&typeof i._writableState=="object",n.readable=i=>n(i)&&i.readable!==!1&&typeof i._read=="function"&&typeof i._readableState=="object",n.duplex=i=>n.writable(i)&&n.readable(i),n.transform=i=>n.duplex(i)&&typeof i._transform=="function"&&typeof i._transformState=="object",e.exports=n},function(e,t,r){function n(S){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(S)}function i(S,E){if(!(S instanceof E))throw new TypeError("Cannot call a class as a function")}function g(S,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(E&&E.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),E&&s(S,E)}function s(S,E){return(s=Object.setPrototypeOf||function(N,F){return N.__proto__=F,N})(S,E)}function o(S){var E=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var N,F=l(S);if(E){var M=l(this).constructor;N=Reflect.construct(F,arguments,M)}else N=F.apply(this,arguments);return u(this,N)}}function u(S,E){return!E||n(E)!=="object"&&typeof E!="function"?function(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}(S):E}function l(S){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(S)}var m=r(3).LEVEL,T=r(47),b=r(201),_=r(33)("winston:create-logger");function f(S){return"is"+S.charAt(0).toUpperCase()+S.slice(1)+"Enabled"}e.exports=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.levels=S.levels||T.npm.levels;var E=function(F){g(R,F);var M=o(R);function R(p){return i(this,R),M.call(this,p)}return R}(b),N=new E(S);return Object.keys(S.levels).forEach(function(F){_('Define prototype method for "%s"',F),F!=="log"?(E.prototype[F]=function(){for(var M=this||N,R=arguments.length,p=new Array(R),P=0;P<R;P++)p[P]=arguments[P];if(p.length===1){var Z=p[0],$=Z&&Z.message&&Z||{message:Z};return $.level=$[m]=F,M._addDefaultMeta($),M.write($),this||N}return p.length===0?(M.log(F,""),M):M.log.apply(M,[F].concat(p))},E.prototype[f(F)]=function(){return(this||N).isLevelEnabled(F)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')}),N}},function(e,t,r){(function(n){function i(T,b){for(var _=0;_<b.length;_++){var f=b[_];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(T,f.key,f)}}var g=r(15),s=r(48),o=r(33)("winston:exception"),u=r(87),l=r(88),m=r(89);e.exports=function(){function T(f){if(function(S,E){if(!(S instanceof E))throw new TypeError("Cannot call a class as a function")}(this,T),!f)throw new Error("Logger is required to handle exceptions");this.logger=f,this.handlers=new Map}var b,_;return b=T,(_=[{key:"handle",value:function(){for(var f=this,S=arguments.length,E=new Array(S),N=0;N<S;N++)E[N]=arguments[N];E.forEach(function(F){if(Array.isArray(F))return F.forEach(function(M){return f._addHandler(M)});f._addHandler(F)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),n.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var f=this;this.catcher&&(n.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(function(S){return f.logger.unpipe(S)}))}},{key:"getAllInfo",value:function(f){var S=f.message;return S||typeof f!="string"||(S=f),{error:f,level:"error",message:["uncaughtException: ".concat(S||"(no error message)"),f.stack||" No stack trace"].join(`
26
+ `),stack:f.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(f)}}},{key:"getProcessInfo",value:function(){return{pid:n.pid,uid:n.getuid?n.getuid():null,gid:n.getgid?n.getgid():null,cwd:n.cwd(),execPath:n.execPath,version:n.version,argv:n.argv,memoryUsage:n.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:g.loadavg(),uptime:g.uptime()}}},{key:"getTrace",value:function(f){return(f?l.parse(f):l.get()).map(function(S){return{column:S.getColumnNumber(),file:S.getFileName(),function:S.getFunctionName(),line:S.getLineNumber(),method:S.getMethodName(),native:S.isNative()}})}},{key:"_addHandler",value:function(f){if(!this.handlers.has(f)){f.handleExceptions=!0;var S=new m(f);this.handlers.set(f,S),this.logger.pipe(S)}}},{key:"_uncaughtException",value:function(f){var S,E=this.getAllInfo(f),N=this._getExceptionHandlers(),F=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(f):this.logger.exitOnError;function M(){o("doExit",F),o("process._exiting",n._exiting),F&&!n._exiting&&(S&&clearTimeout(S),n.exit(1))}if(!N.length&&F&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),F=!1),!N||N.length===0)return n.nextTick(M);s(N,function(R,p){var P=u(p),Z=R.transport||R;function $(h){return function(){o(h),P()}}Z._ending=!0,Z.once("finish",$("finished")),Z.once("error",$("error"))},function(){return F&&M()}),this.logger.log(E),F&&(S=setTimeout(M,3e3))}},{key:"_getExceptionHandlers",value:function(){return this.logger.transports.filter(function(f){return(f.transport||f).handleExceptions})}}])&&i(b.prototype,_),T}()}).call(this,r(2))},function(e,t,r){var n=r(204);e.exports=function(i){var g,s=0;function o(){return s||(s=1,g=i.apply(this,arguments),i=null),g}return o.displayName=n(i),o}},function(e,t){function r(n){for(var i in n)this[i]=n[i]}t.get=function(n){var i=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var g={},s=Error.prepareStackTrace;Error.prepareStackTrace=function(u,l){return l},Error.captureStackTrace(g,n||t.get);var o=g.stack;return Error.prepareStackTrace=s,Error.stackTraceLimit=i,o},t.parse=function(n){if(!n.stack)return[];var i=this;return n.stack.split(`
27
+ `).slice(1).map(function(g){if(g.match(/^\s*[-]{4,}$/))return i._createParsedCallSite({fileName:g,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var s=g.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(s){var o=null,u=null,l=null,m=null,T=null,b=s[5]==="native";if(s[1]){var _=(l=s[1]).lastIndexOf(".");if(l[_-1]=="."&&_--,_>0){o=l.substr(0,_),u=l.substr(_+1);var f=o.indexOf(".Module");f>0&&(l=l.substr(f+1),o=o.substr(0,f))}m=null}u&&(m=o,T=u),u==="<anonymous>"&&(T=null,l=null);var S={fileName:s[2]||null,lineNumber:parseInt(s[3],10)||null,functionName:l,typeName:m,methodName:T,columnNumber:parseInt(s[4],10)||null,native:b};return i._createParsedCallSite(S)}}).filter(function(g){return!!g})},["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach(function(n){r.prototype[n]=null,r.prototype["get"+n[0].toUpperCase()+n.substr(1)]=function(){return this[n]}}),["topLevel","eval","native","constructor"].forEach(function(n){r.prototype[n]=!1,r.prototype["is"+n[0].toUpperCase()+n.substr(1)]=function(){return this[n]}}),t._createParsedCallSite=function(n){return new r(n)}},function(e,t,r){function n(m){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T})(m)}function i(m,T){for(var b=0;b<T.length;b++){var _=T[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}function g(m,T){return(g=Object.setPrototypeOf||function(b,_){return b.__proto__=_,b})(m,T)}function s(m){var T=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var b,_=u(m);if(T){var f=u(this).constructor;b=Reflect.construct(_,arguments,f)}else b=_.apply(this,arguments);return o(this,b)}}function o(m,T){return!T||n(T)!=="object"&&typeof T!="function"?function(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}(m):T}function u(m){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)})(m)}var l=r(28).Writable;e.exports=function(m){(function(S,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(E&&E.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),E&&g(S,E)})(f,m);var T,b,_=s(f);function f(S){var E;if(function(N,F){if(!(N instanceof F))throw new TypeError("Cannot call a class as a function")}(this,f),E=_.call(this,{objectMode:!0}),!S)throw new Error("ExceptionStream requires a TransportStream instance.");return E.handleExceptions=!0,E.transport=S,E}return T=f,(b=[{key:"_write",value:function(S,E,N){return S.exception?this.transport.log(S,N):(N(),!0)}}])&&i(T.prototype,b),f}(l)},function(e,t,r){(function(n){function i(T,b){for(var _=0;_<b.length;_++){var f=b[_];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(T,f.key,f)}}var g=r(15),s=r(48),o=r(33)("winston:rejection"),u=r(87),l=r(88),m=r(89);e.exports=function(){function T(f){if(function(S,E){if(!(S instanceof E))throw new TypeError("Cannot call a class as a function")}(this,T),!f)throw new Error("Logger is required to handle rejections");this.logger=f,this.handlers=new Map}var b,_;return b=T,(_=[{key:"handle",value:function(){for(var f=this,S=arguments.length,E=new Array(S),N=0;N<S;N++)E[N]=arguments[N];E.forEach(function(F){if(Array.isArray(F))return F.forEach(function(M){return f._addHandler(M)});f._addHandler(F)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),n.on("unhandledRejection",this.catcher))}},{key:"unhandle",value:function(){var f=this;this.catcher&&(n.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(function(S){return f.logger.unpipe(S)}))}},{key:"getAllInfo",value:function(f){var S=f.message;return S||typeof f!="string"||(S=f),{error:f,level:"error",message:["unhandledRejection: ".concat(S||"(no error message)"),f.stack||" No stack trace"].join(`
28
+ `),stack:f.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(f)}}},{key:"getProcessInfo",value:function(){return{pid:n.pid,uid:n.getuid?n.getuid():null,gid:n.getgid?n.getgid():null,cwd:n.cwd(),execPath:n.execPath,version:n.version,argv:n.argv,memoryUsage:n.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:g.loadavg(),uptime:g.uptime()}}},{key:"getTrace",value:function(f){return(f?l.parse(f):l.get()).map(function(S){return{column:S.getColumnNumber(),file:S.getFileName(),function:S.getFunctionName(),line:S.getLineNumber(),method:S.getMethodName(),native:S.isNative()}})}},{key:"_addHandler",value:function(f){if(!this.handlers.has(f)){f.handleRejections=!0;var S=new m(f);this.handlers.set(f,S),this.logger.pipe(S)}}},{key:"_unhandledRejection",value:function(f){var S,E=this.getAllInfo(f),N=this._getRejectionHandlers(),F=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(f):this.logger.exitOnError;function M(){o("doExit",F),o("process._exiting",n._exiting),F&&!n._exiting&&(S&&clearTimeout(S),n.exit(1))}if(!N.length&&F&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),F=!1),!N||N.length===0)return n.nextTick(M);s(N,function(R,p){var P=u(p),Z=R.transport||R;function $(h){return function(){o(h),P()}}Z._ending=!0,Z.once("finish",$("finished")),Z.once("error",$("error"))},function(){return F&&M()}),this.logger.log(E),F&&(S=setTimeout(M,3e3))}},{key:"_getRejectionHandlers",value:function(){return this.logger.transports.filter(function(f){return(f.transport||f).handleRejections})}}])&&i(b.prototype,_),T}()}).call(this,r(2))},function(e,t,r){const n=r(50);e.exports=function(i){const g=n(i);if(g<0)throw new Error("should be a positive integer");return g}},function(e,t,r){const n=r(46).URL,i=r(34);e.exports=function(g){const s=i(g);try{return new n(s)}catch{throw new Error("should be a valid URL")}}},function(e,t,r){const n={};n.web=r(21),r(94);const i={v1:{}};i.v1.signaling={},i.v1.signaling.api=r(8),i.v1.signaling.api.SignalingClient=function(b,_,f){f||(f={}),f.format="text",this.client_=new n.web.GrpcWebClientBase(f),this.hostname_=b},i.v1.signaling.api.SignalingPromiseClient=function(b,_,f){f||(f={}),f.format="text",this.client_=new n.web.GrpcWebClientBase(f),this.hostname_=b};const g=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/CreatePeer",n.web.MethodType.UNARY,i.v1.signaling.api.CreatePeerRequest,i.v1.signaling.api.CreatePeerResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.CreatePeerResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.CreatePeerResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.CreatePeerResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.createPeer=function(b,_,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/CreatePeer",b,_||{},g,f)},i.v1.signaling.api.SignalingPromiseClient.prototype.createPeer=function(b,_){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/CreatePeer",b,_||{},g)};const s=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/DeletePeer",n.web.MethodType.UNARY,i.v1.signaling.api.DeletePeerRequest,i.v1.signaling.api.DeletePeerResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.DeletePeerResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.DeletePeerResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.DeletePeerResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.deletePeer=function(b,_,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/DeletePeer",b,_||{},s,f)},i.v1.signaling.api.SignalingPromiseClient.prototype.deletePeer=function(b,_){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/DeletePeer",b,_||{},s)};const o=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/RefreshPeer",n.web.MethodType.UNARY,i.v1.signaling.api.RefreshPeerRequest,i.v1.signaling.api.RefreshPeerResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.RefreshPeerResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.RefreshPeerResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.RefreshPeerResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.refreshPeer=function(b,_,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/RefreshPeer",b,_||{},o,f)},i.v1.signaling.api.SignalingPromiseClient.prototype.refreshPeer=function(b,_){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/RefreshPeer",b,_||{},o)};const u=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/GetPeers",n.web.MethodType.UNARY,i.v1.signaling.api.GetPeersRequest,i.v1.signaling.api.GetPeersResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.GetPeersResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.GetPeersResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.GetPeersResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.getPeers=function(b,_,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetPeers",b,_||{},u,f)},i.v1.signaling.api.SignalingPromiseClient.prototype.getPeers=function(b,_){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetPeers",b,_||{},u)};const l=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/GetIceServers",n.web.MethodType.UNARY,i.v1.signaling.api.GetIceServersRequest,i.v1.signaling.api.GetIceServersResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.GetIceServersResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.GetIceServersResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.GetIceServersResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.getIceServers=function(b,_,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetIceServers",b,_||{},l,f)},i.v1.signaling.api.SignalingPromiseClient.prototype.getIceServers=function(b,_){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetIceServers",b,_||{},l)};const m=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/SendSignal",n.web.MethodType.UNARY,i.v1.signaling.api.SendSignalRequest,i.v1.signaling.api.SendSignalResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.SendSignalResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.SendSignalResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.SendSignalResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.sendSignal=function(b,_,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/SendSignal",b,_||{},m,f)},i.v1.signaling.api.SignalingPromiseClient.prototype.sendSignal=function(b,_){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/SendSignal",b,_||{},m)};const T=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/ReceiveSignalStream",n.web.MethodType.SERVER_STREAMING,i.v1.signaling.api.ReceiveSignalStreamRequest,i.v1.signaling.api.ReceiveSignalStreamResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(i.v1.signaling.api.ReceiveSignalStreamResponse,function(b){return b.serializeBinary()},i.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary),i.v1.signaling.api.SignalingClient.prototype.receiveSignalStream=function(b,_){return this.client_.serverStreaming(this.hostname_+"/v1.signaling.api.Signaling/ReceiveSignalStream",b,_||{},T)},i.v1.signaling.api.SignalingPromiseClient.prototype.receiveSignalStream=function(b,_){return this.client_.serverStreaming(this.hostname_+"/v1.signaling.api.Signaling/ReceiveSignalStream",b,_||{},T)},e.exports=i.v1.signaling.api},function(e,t,r){var n=r(95),i=n,g=Function("return this")();i.exportSymbol("proto.google.protobuf.BoolValue",null,g),i.exportSymbol("proto.google.protobuf.BytesValue",null,g),i.exportSymbol("proto.google.protobuf.DoubleValue",null,g),i.exportSymbol("proto.google.protobuf.FloatValue",null,g),i.exportSymbol("proto.google.protobuf.Int32Value",null,g),i.exportSymbol("proto.google.protobuf.Int64Value",null,g),i.exportSymbol("proto.google.protobuf.StringValue",null,g),i.exportSymbol("proto.google.protobuf.UInt32Value",null,g),i.exportSymbol("proto.google.protobuf.UInt64Value",null,g),proto.google.protobuf.DoubleValue=function(s){n.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.google.protobuf.DoubleValue,n.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.DoubleValue.displayName="proto.google.protobuf.DoubleValue"),proto.google.protobuf.FloatValue=function(s){n.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.google.protobuf.FloatValue,n.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.FloatValue.displayName="proto.google.protobuf.FloatValue"),proto.google.protobuf.Int64Value=function(s){n.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.google.protobuf.Int64Value,n.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.Int64Value.displayName="proto.google.protobuf.Int64Value"),proto.google.protobuf.UInt64Value=function(s){n.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.google.protobuf.UInt64Value,n.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.UInt64Value.displayName="proto.google.protobuf.UInt64Value"),proto.google.protobuf.Int32Value=function(s){n.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.google.protobuf.Int32Value,n.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.Int32Value.displayName="proto.google.protobuf.Int32Value"),proto.google.protobuf.UInt32Value=function(s){n.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.google.protobuf.UInt32Value,n.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.UInt32Value.displayName="proto.google.protobuf.UInt32Value"),proto.google.protobuf.BoolValue=function(s){n.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.google.protobuf.BoolValue,n.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.BoolValue.displayName="proto.google.protobuf.BoolValue"),proto.google.protobuf.StringValue=function(s){n.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.google.protobuf.StringValue,n.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.StringValue.displayName="proto.google.protobuf.StringValue"),proto.google.protobuf.BytesValue=function(s){n.Message.initialize(this,s,0,-1,null,null)},i.inherits(proto.google.protobuf.BytesValue,n.Message),i.DEBUG&&!COMPILED&&(proto.google.protobuf.BytesValue.displayName="proto.google.protobuf.BytesValue"),n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.DoubleValue.prototype.toObject=function(s){return proto.google.protobuf.DoubleValue.toObject(s,this)},proto.google.protobuf.DoubleValue.toObject=function(s,o){var u={value:n.Message.getFloatingPointFieldWithDefault(o,1,0)};return s&&(u.$jspbMessageInstance=o),u}),proto.google.protobuf.DoubleValue.deserializeBinary=function(s){var o=new n.BinaryReader(s),u=new proto.google.protobuf.DoubleValue;return proto.google.protobuf.DoubleValue.deserializeBinaryFromReader(u,o)},proto.google.protobuf.DoubleValue.deserializeBinaryFromReader=function(s,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var u=o.readDouble();s.setValue(u);break;default:o.skipField()}return s},proto.google.protobuf.DoubleValue.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.DoubleValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.DoubleValue.serializeBinaryToWriter=function(s,o){var u;(u=s.getValue())!==0&&o.writeDouble(1,u)},proto.google.protobuf.DoubleValue.prototype.getValue=function(){return n.Message.getFloatingPointFieldWithDefault(this,1,0)},proto.google.protobuf.DoubleValue.prototype.setValue=function(s){return n.Message.setProto3FloatField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FloatValue.prototype.toObject=function(s){return proto.google.protobuf.FloatValue.toObject(s,this)},proto.google.protobuf.FloatValue.toObject=function(s,o){var u={value:n.Message.getFloatingPointFieldWithDefault(o,1,0)};return s&&(u.$jspbMessageInstance=o),u}),proto.google.protobuf.FloatValue.deserializeBinary=function(s){var o=new n.BinaryReader(s),u=new proto.google.protobuf.FloatValue;return proto.google.protobuf.FloatValue.deserializeBinaryFromReader(u,o)},proto.google.protobuf.FloatValue.deserializeBinaryFromReader=function(s,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var u=o.readFloat();s.setValue(u);break;default:o.skipField()}return s},proto.google.protobuf.FloatValue.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.FloatValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.FloatValue.serializeBinaryToWriter=function(s,o){var u;(u=s.getValue())!==0&&o.writeFloat(1,u)},proto.google.protobuf.FloatValue.prototype.getValue=function(){return n.Message.getFloatingPointFieldWithDefault(this,1,0)},proto.google.protobuf.FloatValue.prototype.setValue=function(s){return n.Message.setProto3FloatField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Int64Value.prototype.toObject=function(s){return proto.google.protobuf.Int64Value.toObject(s,this)},proto.google.protobuf.Int64Value.toObject=function(s,o){var u={value:n.Message.getFieldWithDefault(o,1,0)};return s&&(u.$jspbMessageInstance=o),u}),proto.google.protobuf.Int64Value.deserializeBinary=function(s){var o=new n.BinaryReader(s),u=new proto.google.protobuf.Int64Value;return proto.google.protobuf.Int64Value.deserializeBinaryFromReader(u,o)},proto.google.protobuf.Int64Value.deserializeBinaryFromReader=function(s,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var u=o.readInt64();s.setValue(u);break;default:o.skipField()}return s},proto.google.protobuf.Int64Value.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.Int64Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.Int64Value.serializeBinaryToWriter=function(s,o){var u;(u=s.getValue())!==0&&o.writeInt64(1,u)},proto.google.protobuf.Int64Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.Int64Value.prototype.setValue=function(s){return n.Message.setProto3IntField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UInt64Value.prototype.toObject=function(s){return proto.google.protobuf.UInt64Value.toObject(s,this)},proto.google.protobuf.UInt64Value.toObject=function(s,o){var u={value:n.Message.getFieldWithDefault(o,1,0)};return s&&(u.$jspbMessageInstance=o),u}),proto.google.protobuf.UInt64Value.deserializeBinary=function(s){var o=new n.BinaryReader(s),u=new proto.google.protobuf.UInt64Value;return proto.google.protobuf.UInt64Value.deserializeBinaryFromReader(u,o)},proto.google.protobuf.UInt64Value.deserializeBinaryFromReader=function(s,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var u=o.readUint64();s.setValue(u);break;default:o.skipField()}return s},proto.google.protobuf.UInt64Value.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.UInt64Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.UInt64Value.serializeBinaryToWriter=function(s,o){var u;(u=s.getValue())!==0&&o.writeUint64(1,u)},proto.google.protobuf.UInt64Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.UInt64Value.prototype.setValue=function(s){return n.Message.setProto3IntField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Int32Value.prototype.toObject=function(s){return proto.google.protobuf.Int32Value.toObject(s,this)},proto.google.protobuf.Int32Value.toObject=function(s,o){var u={value:n.Message.getFieldWithDefault(o,1,0)};return s&&(u.$jspbMessageInstance=o),u}),proto.google.protobuf.Int32Value.deserializeBinary=function(s){var o=new n.BinaryReader(s),u=new proto.google.protobuf.Int32Value;return proto.google.protobuf.Int32Value.deserializeBinaryFromReader(u,o)},proto.google.protobuf.Int32Value.deserializeBinaryFromReader=function(s,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var u=o.readInt32();s.setValue(u);break;default:o.skipField()}return s},proto.google.protobuf.Int32Value.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.Int32Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.Int32Value.serializeBinaryToWriter=function(s,o){var u;(u=s.getValue())!==0&&o.writeInt32(1,u)},proto.google.protobuf.Int32Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.Int32Value.prototype.setValue=function(s){return n.Message.setProto3IntField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UInt32Value.prototype.toObject=function(s){return proto.google.protobuf.UInt32Value.toObject(s,this)},proto.google.protobuf.UInt32Value.toObject=function(s,o){var u={value:n.Message.getFieldWithDefault(o,1,0)};return s&&(u.$jspbMessageInstance=o),u}),proto.google.protobuf.UInt32Value.deserializeBinary=function(s){var o=new n.BinaryReader(s),u=new proto.google.protobuf.UInt32Value;return proto.google.protobuf.UInt32Value.deserializeBinaryFromReader(u,o)},proto.google.protobuf.UInt32Value.deserializeBinaryFromReader=function(s,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var u=o.readUint32();s.setValue(u);break;default:o.skipField()}return s},proto.google.protobuf.UInt32Value.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.UInt32Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.UInt32Value.serializeBinaryToWriter=function(s,o){var u;(u=s.getValue())!==0&&o.writeUint32(1,u)},proto.google.protobuf.UInt32Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.UInt32Value.prototype.setValue=function(s){return n.Message.setProto3IntField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.BoolValue.prototype.toObject=function(s){return proto.google.protobuf.BoolValue.toObject(s,this)},proto.google.protobuf.BoolValue.toObject=function(s,o){var u={value:n.Message.getBooleanFieldWithDefault(o,1,!1)};return s&&(u.$jspbMessageInstance=o),u}),proto.google.protobuf.BoolValue.deserializeBinary=function(s){var o=new n.BinaryReader(s),u=new proto.google.protobuf.BoolValue;return proto.google.protobuf.BoolValue.deserializeBinaryFromReader(u,o)},proto.google.protobuf.BoolValue.deserializeBinaryFromReader=function(s,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var u=o.readBool();s.setValue(u);break;default:o.skipField()}return s},proto.google.protobuf.BoolValue.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.BoolValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.BoolValue.serializeBinaryToWriter=function(s,o){var u;(u=s.getValue())&&o.writeBool(1,u)},proto.google.protobuf.BoolValue.prototype.getValue=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},proto.google.protobuf.BoolValue.prototype.setValue=function(s){return n.Message.setProto3BooleanField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.StringValue.prototype.toObject=function(s){return proto.google.protobuf.StringValue.toObject(s,this)},proto.google.protobuf.StringValue.toObject=function(s,o){var u={value:n.Message.getFieldWithDefault(o,1,"")};return s&&(u.$jspbMessageInstance=o),u}),proto.google.protobuf.StringValue.deserializeBinary=function(s){var o=new n.BinaryReader(s),u=new proto.google.protobuf.StringValue;return proto.google.protobuf.StringValue.deserializeBinaryFromReader(u,o)},proto.google.protobuf.StringValue.deserializeBinaryFromReader=function(s,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var u=o.readString();s.setValue(u);break;default:o.skipField()}return s},proto.google.protobuf.StringValue.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.StringValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.StringValue.serializeBinaryToWriter=function(s,o){var u;(u=s.getValue()).length>0&&o.writeString(1,u)},proto.google.protobuf.StringValue.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.StringValue.prototype.setValue=function(s){return n.Message.setProto3StringField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.BytesValue.prototype.toObject=function(s){return proto.google.protobuf.BytesValue.toObject(s,this)},proto.google.protobuf.BytesValue.toObject=function(s,o){var u={value:o.getValue_asB64()};return s&&(u.$jspbMessageInstance=o),u}),proto.google.protobuf.BytesValue.deserializeBinary=function(s){var o=new n.BinaryReader(s),u=new proto.google.protobuf.BytesValue;return proto.google.protobuf.BytesValue.deserializeBinaryFromReader(u,o)},proto.google.protobuf.BytesValue.deserializeBinaryFromReader=function(s,o){for(;o.nextField()&&!o.isEndGroup();)switch(o.getFieldNumber()){case 1:var u=o.readBytes();s.setValue(u);break;default:o.skipField()}return s},proto.google.protobuf.BytesValue.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.BytesValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.BytesValue.serializeBinaryToWriter=function(s,o){var u;(u=s.getValue_asU8()).length>0&&o.writeBytes(1,u)},proto.google.protobuf.BytesValue.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.BytesValue.prototype.getValue_asB64=function(){return n.Message.bytesAsB64(this.getValue())},proto.google.protobuf.BytesValue.prototype.getValue_asU8=function(){return n.Message.bytesAsU8(this.getValue())},proto.google.protobuf.BytesValue.prototype.setValue=function(s){return n.Message.setProto3BytesField(this,1,s)},i.object.extend(t,proto.google.protobuf)},function(module,exports,__webpack_require__){(function(global,Buffer){var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(e,t,r){e instanceof String&&(e=String(e));for(var n=e.length,i=0;i<n;i++){var g=e[i];if(t.call(r,g,i,e))return{i,v:g}}return{i:-1,v:void 0}},$jscomp.ASSUME_ES5=!1,$jscomp.ASSUME_NO_NATIVE_MAP=!1,$jscomp.ASSUME_NO_NATIVE_SET=!1,$jscomp.SIMPLE_FROUND_POLYFILL=!1,$jscomp.defineProperty=$jscomp.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},$jscomp.getGlobal=function(e){return typeof window!="undefined"&&window===e?e:global!==void 0&&global!=null?global:e},$jscomp.global=$jscomp.getGlobal(this),$jscomp.polyfill=function(e,t,r,n){if(t){for(r=$jscomp.global,e=e.split("."),n=0;n<e.length-1;n++){var i=e[n];i in r||(r[i]={}),r=r[i]}(t=t(n=r[e=e[e.length-1]]))!=n&&t!=null&&$jscomp.defineProperty(r,e,{configurable:!0,writable:!0,value:t})}},$jscomp.polyfill("Array.prototype.findIndex",function(e){return e||function(t,r){return $jscomp.findInternal(this,t,r).i}},"es6","es3"),$jscomp.checkStringArgs=function(e,t,r){if(e==null)throw new TypeError("The 'this' value for String.prototype."+r+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+r+" must not be a regular expression");return e+""},$jscomp.polyfill("String.prototype.endsWith",function(e){return e||function(t,r){var n=$jscomp.checkStringArgs(this,t,"endsWith");t+="",r===void 0&&(r=n.length),r=Math.max(0,Math.min(0|r,n.length));for(var i=t.length;0<i&&0<r;)if(n[--r]!=t[--i])return!1;return 0>=i}},"es6","es3"),$jscomp.polyfill("Array.prototype.find",function(e){return e||function(t,r){return $jscomp.findInternal(this,t,r).v}},"es6","es3"),$jscomp.polyfill("String.prototype.startsWith",function(e){return e||function(t,r){var n=$jscomp.checkStringArgs(this,t,"startsWith");t+="";var i=n.length,g=t.length;r=Math.max(0,Math.min(0|r,n.length));for(var s=0;s<g&&r<i;)if(n[r++]!=t[s++])return!1;return s>=g}},"es6","es3"),$jscomp.polyfill("String.prototype.repeat",function(e){return e||function(t){var r=$jscomp.checkStringArgs(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var n="";t;)1&t&&(n+=r),(t>>>=1)&&(r+=r);return n}},"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self,goog.isDef=function(e){return e!==void 0},goog.isString=function(e){return typeof e=="string"},goog.isBoolean=function(e){return typeof e=="boolean"},goog.isNumber=function(e){return typeof e=="number"},goog.exportPath_=function(e,t,r){e=e.split("."),r=r||goog.global,e[0]in r||r.execScript===void 0||r.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)!e.length&&goog.isDef(t)?r[n]=t:r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}},goog.define=function(e,t){return t},goog.FEATURESET_YEAR=2012,goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){goog.exportPath_(e,t)},goog.getScriptNonce=function(e){return e&&e!=goog.global?goog.getScriptNonce_(e.document):(goog.cspNonce_===null&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(e)?e:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||e.search(goog.VALID_MODULE_RE_)==-1)throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=e},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var e=goog.global.$jscomp;return!!e&&typeof e.getCurrentModulePath=="function"&&!!e.getCurrentModulePath()},goog.module.declareLegacyNamespace=function(){goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(e){if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=e;else{var t=goog.global.$jscomp;if(!t||typeof t.getCurrentModulePath!="function")throw Error('Module with namespace "'+e+'" has been loaded incorrectly.');t=t.require(t.getCurrentModulePath()),goog.loadedModules_[e]={exports:t,type:goog.ModuleType.ES6,moduleId:e}}},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},goog.getObjectByName=function(e,t){e=e.split("."),t=t||goog.global;for(var r=0;r<e.length;r++)if(t=t[e[r]],!goog.isDefAndNotNull(t))return null;return t},goog.globalize=function(e,t){for(var r in t=t||goog.global,e)t[r]=e[r]},goog.addDependency=function(e,t,r,n){},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(e){goog.global.console&&goog.global.console.error(e)},goog.require=function(e){},goog.requireType=function(e){return{}},goog.basePath="",goog.nullFunction=function(){},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(e){e.instance_=void 0,e.getInstance=function(){return e.instance_?e.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=e),e.instance_=new e)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!COMPILED,goog.TRANSPILE="detect",goog.ASSUME_ES_MODULES_TRANSPILED=!1,goog.TRANSPILE_TO_LANGUAGE="",goog.TRANSPILER="transpile.js",goog.hasBadLetScoping=null,goog.useSafari10Workaround=function(){if(goog.hasBadLetScoping==null){try{var a=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(e){a=!1}goog.hasBadLetScoping=a}return goog.hasBadLetScoping},goog.workaroundSafari10EvalBug=function(e){return"(function(){"+e+`
29
+ ;})();
30
+ `},goog.loadModule=function(e){var t=goog.moduleLoaderState_;try{if(goog.moduleLoaderState_={moduleName:"",declareLegacyNamespace:!1,type:goog.ModuleType.GOOG},goog.isFunction(e))var r=e.call(void 0,{});else{if(!goog.isString(e))throw Error("Invalid module definition");goog.useSafari10Workaround()&&(e=goog.workaroundSafari10EvalBug(e)),r=goog.loadModuleFromSource_.call(void 0,e)}var n=goog.moduleLoaderState_.moduleName;if(!goog.isString(n)||!n)throw Error('Invalid module name "'+n+'"');goog.moduleLoaderState_.declareLegacyNamespace?goog.constructNamespace_(n,r):goog.SEAL_MODULE_EXPORTS&&Object.seal&&typeof r=="object"&&r!=null&&Object.seal(r),goog.loadedModules_[n]={exports:r,type:goog.ModuleType.GOOG,moduleId:goog.moduleLoaderState_.moduleName}}finally{goog.moduleLoaderState_=t}},goog.loadModuleFromSource_=function(a){return eval(a),{}},goog.normalizePath_=function(e){e=e.split("/");for(var t=0;t<e.length;)e[t]=="."?e.splice(t,1):t&&e[t]==".."&&e[t-1]&&e[t-1]!=".."?e.splice(--t,2):t++;return e.join("/")},goog.loadFileSync_=function(e){if(goog.global.CLOSURE_LOAD_FILE_SYNC)return goog.global.CLOSURE_LOAD_FILE_SYNC(e);try{var t=new goog.global.XMLHttpRequest;return t.open("get",e,!1),t.send(),t.status==0||t.status==200?t.responseText:null}catch{return null}},goog.transpile_=function(e,t,r){var n=goog.global.$jscomp;n||(goog.global.$jscomp=n={});var i=n.transpile;if(!i){var g=goog.basePath+goog.TRANSPILER,s=goog.loadFileSync_(g);if(s){if(function(){(0,eval)(s+`
31
+ //# sourceURL=`+g)}.call(goog.global),goog.global.$gwtExport&&goog.global.$gwtExport.$jscomp&&!goog.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(goog.global.$gwtExport));goog.global.$jscomp.transpile=goog.global.$gwtExport.$jscomp.transpile,i=(n=goog.global.$jscomp).transpile}}return i||(i=n.transpile=function(o,u){return goog.logToConsole_(u+" requires transpilation but no transpiler was found."),o}),i(e,t,r)},goog.typeOf=function(e){var t=typeof e;if(t=="object"){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var r=Object.prototype.toString.call(e);if(r=="[object Window]")return"object";if(r=="[object Array]"||typeof e.length=="number"&&e.splice!==void 0&&e.propertyIsEnumerable!==void 0&&!e.propertyIsEnumerable("splice"))return"array";if(r=="[object Function]"||e.call!==void 0&&e.propertyIsEnumerable!==void 0&&!e.propertyIsEnumerable("call"))return"function"}else if(t=="function"&&e.call===void 0)return"object";return t},goog.isNull=function(e){return e===null},goog.isDefAndNotNull=function(e){return e!=null},goog.isArray=function(e){return goog.typeOf(e)=="array"},goog.isArrayLike=function(e){var t=goog.typeOf(e);return t=="array"||t=="object"&&typeof e.length=="number"},goog.isDateLike=function(e){return goog.isObject(e)&&typeof e.getFullYear=="function"},goog.isFunction=function(e){return goog.typeOf(e)=="function"},goog.isObject=function(e){var t=typeof e;return t=="object"&&e!=null||t=="function"},goog.getUid=function(e){return e[goog.UID_PROPERTY_]||(e[goog.UID_PROPERTY_]=++goog.uidCounter_)},goog.hasUid=function(e){return!!e[goog.UID_PROPERTY_]},goog.removeUid=function(e){e!==null&&"removeAttribute"in e&&e.removeAttribute(goog.UID_PROPERTY_);try{delete e[goog.UID_PROPERTY_]}catch{}},goog.UID_PROPERTY_="closure_uid_"+(1e9*Math.random()>>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if(t=="object"||t=="array"){if(typeof e.clone=="function")return e.clone();for(var r in t=t=="array"?[]:{},e)t[r]=goog.cloneObject(e[r]);return t}return e},goog.bindNative_=function(e,t,r){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,r){if(!e)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,n),e.apply(t,i)}}return function(){return e.apply(t,arguments)}},goog.bind=function(e,t,r){return Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_,goog.bind.apply(null,arguments)},goog.partial=function(e,t){var r=Array.prototype.slice.call(arguments,1);return function(){var n=r.slice();return n.push.apply(n,arguments),e.apply(this,n)}},goog.mixin=function(e,t){for(var r in t)e[r]=t[r]},goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date},goog.globalEval=function(e){if(goog.global.execScript)goog.global.execScript(e,"JavaScript");else{if(!goog.global.eval)throw Error("goog.globalEval not available");if(goog.evalWorksForGlobals_==null){try{goog.global.eval("var _evalTest_ = 1;")}catch{}if(goog.global._evalTest_!==void 0){try{delete goog.global._evalTest_}catch{}goog.evalWorksForGlobals_=!0}else goog.evalWorksForGlobals_=!1}if(goog.evalWorksForGlobals_)goog.global.eval(e);else{var t=goog.global.document,r=t.createElement("SCRIPT");r.type="text/javascript",r.defer=!1,r.appendChild(t.createTextNode(e)),t.head.appendChild(r),t.head.removeChild(r)}}},goog.evalWorksForGlobals_=null,goog.getCssName=function(e,t){if(String(e).charAt(0)==".")throw Error('className passed in goog.getCssName must not start with ".". You passed: '+e);var r=function(i){return goog.cssNameMapping_[i]||i},n=function(i){i=i.split("-");for(var g=[],s=0;s<i.length;s++)g.push(r(i[s]));return g.join("-")};return n=goog.cssNameMapping_?goog.cssNameMappingStyle_=="BY_WHOLE"?r:n:function(i){return i},e=t?e+"-"+n(t):n(e),goog.global.CLOSURE_CSS_NAME_MAP_FN?goog.global.CLOSURE_CSS_NAME_MAP_FN(e):e},goog.setCssNameMapping=function(e,t){goog.cssNameMapping_=e,goog.cssNameMappingStyle_=t},goog.getMsg=function(e,t,r){return r&&r.html&&(e=e.replace(/</g,"&lt;")),t&&(e=e.replace(/\{\$([^}]+)}/g,function(n,i){return t!=null&&i in t?t[i]:n})),e},goog.getMsgWithFallback=function(e,t){return e},goog.exportSymbol=function(e,t,r){goog.exportPath_(e,t,r)},goog.exportProperty=function(e,t,r){e[t]=r},goog.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.base=function(n,i,g){for(var s=Array(arguments.length-2),o=2;o<arguments.length;o++)s[o-2]=arguments[o];return t.prototype[i].apply(n,s)}},goog.base=function(e,t,r){var n=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!n)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(n.superClass_!==void 0){for(var i=Array(arguments.length-1),g=1;g<arguments.length;g++)i[g-1]=arguments[g];return n.superClass_.constructor.apply(e,i)}if(typeof t!="string"&&typeof t!="symbol")throw Error("method names provided to goog.base must be a string or a symbol");for(i=Array(arguments.length-2),g=2;g<arguments.length;g++)i[g-2]=arguments[g];g=!1;for(var s=e.constructor.prototype;s;s=Object.getPrototypeOf(s))if(s[t]===n)g=!0;else if(g)return s[t].apply(e,i);if(e[t]===n)return e.constructor.prototype[t].apply(e,i);throw Error("goog.base called from a method of one name to a method of a different name")},goog.scope=function(e){if(goog.isInModuleLoader_())throw Error("goog.scope is not supported within a module.");e.call(goog.global)},goog.defineClass=function(e,t){var r=t.constructor,n=t.statics;return r&&r!=Object.prototype.constructor||(r=function(){throw Error("cannot instantiate an interface (no constructor defined).")}),r=goog.defineClass.createSealingConstructor_(r,e),e&&goog.inherits(r,e),delete t.constructor,delete t.statics,goog.defineClass.applyProperties_(r.prototype,t),n!=null&&(n instanceof Function?n(r):goog.defineClass.applyProperties_(r,n)),r},goog.defineClass.SEAL_CLASS_INSTANCES=goog.DEBUG,goog.defineClass.createSealingConstructor_=function(e,t){if(!goog.defineClass.SEAL_CLASS_INSTANCES)return e;var r=!goog.defineClass.isUnsealable_(t),n=function(){var i=e.apply(this,arguments)||this;return i[goog.UID_PROPERTY_]=i[goog.UID_PROPERTY_],this.constructor===n&&r&&Object.seal instanceof Function&&Object.seal(i),i};return n},goog.defineClass.isUnsealable_=function(e){return e&&e.prototype&&e.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]},goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.defineClass.applyProperties_=function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);for(var n=0;n<goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;n++)r=goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[n],Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},goog.tagUnsealableClass=function(e){},goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable",goog.TRUSTED_TYPES_POLICY_NAME="",goog.identity_=function(e){return e},goog.createTrustedTypesPolicy=function(e){var t=null;if(typeof TrustedTypes=="undefined"||!TrustedTypes.createPolicy)return t;try{t=TrustedTypes.createPolicy(e,{createHTML:goog.identity_,createScript:goog.identity_,createScriptURL:goog.identity_,createURL:goog.identity_})}catch(r){goog.logToConsole_(r.message)}return t},goog.TRUSTED_TYPES_POLICY_=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#base"):null;var jspb={BinaryConstants:{},ConstBinaryMessage:function(){},BinaryMessage:function(){}};jspb.BinaryConstants.FieldType={INVALID:-1,DOUBLE:1,FLOAT:2,INT64:3,UINT64:4,INT32:5,FIXED64:6,FIXED32:7,BOOL:8,STRING:9,GROUP:10,MESSAGE:11,BYTES:12,UINT32:13,ENUM:14,SFIXED32:15,SFIXED64:16,SINT32:17,SINT64:18,FHASH64:30,VHASH64:31},jspb.BinaryConstants.WireType={INVALID:-1,VARINT:0,FIXED64:1,DELIMITED:2,START_GROUP:3,END_GROUP:4,FIXED32:5},jspb.BinaryConstants.FieldTypeToWireType=function(e){var t=jspb.BinaryConstants.FieldType,r=jspb.BinaryConstants.WireType;switch(e){case t.INT32:case t.INT64:case t.UINT32:case t.UINT64:case t.SINT32:case t.SINT64:case t.BOOL:case t.ENUM:case t.VHASH64:return r.VARINT;case t.DOUBLE:case t.FIXED64:case t.SFIXED64:case t.FHASH64:return r.FIXED64;case t.STRING:case t.MESSAGE:case t.BYTES:return r.DELIMITED;case t.FLOAT:case t.FIXED32:case t.SFIXED32:return r.FIXED32;default:return r.INVALID}},jspb.BinaryConstants.INVALID_FIELD_NUMBER=-1,jspb.BinaryConstants.FLOAT32_EPS=1401298464324817e-60,jspb.BinaryConstants.FLOAT32_MIN=11754943508222875e-54,jspb.BinaryConstants.FLOAT32_MAX=34028234663852886e22,jspb.BinaryConstants.FLOAT64_EPS=5e-324,jspb.BinaryConstants.FLOAT64_MIN=22250738585072014e-324,jspb.BinaryConstants.FLOAT64_MAX=17976931348623157e292,jspb.BinaryConstants.TWO_TO_20=1048576,jspb.BinaryConstants.TWO_TO_23=8388608,jspb.BinaryConstants.TWO_TO_31=2147483648,jspb.BinaryConstants.TWO_TO_32=4294967296,jspb.BinaryConstants.TWO_TO_52=4503599627370496,jspb.BinaryConstants.TWO_TO_63=9223372036854776e3,jspb.BinaryConstants.TWO_TO_64=18446744073709552e3,jspb.BinaryConstants.ZERO_HASH="\0\0\0\0\0\0\0\0",goog.dom={},goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},goog.debug={},goog.debug.Error=function(e){if(Error.captureStackTrace)Error.captureStackTrace(this,goog.debug.Error);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e)),this.reportErrorToServer=!0},goog.inherits(goog.debug.Error,Error),goog.debug.Error.prototype.name="CustomError",goog.asserts={},goog.asserts.ENABLE_ASSERTS=goog.DEBUG,goog.asserts.AssertionError=function(e,t){goog.debug.Error.call(this,goog.asserts.subs_(e,t)),this.messagePattern=e},goog.inherits(goog.asserts.AssertionError,goog.debug.Error),goog.asserts.AssertionError.prototype.name="AssertionError",goog.asserts.DEFAULT_ERROR_HANDLER=function(e){throw e},goog.asserts.errorHandler_=goog.asserts.DEFAULT_ERROR_HANDLER,goog.asserts.subs_=function(e,t){for(var r="",n=(e=e.split("%s")).length-1,i=0;i<n;i++)r+=e[i]+(i<t.length?t[i]:"%s");return r+e[n]},goog.asserts.doAssertFailure_=function(e,t,r,n){var i="Assertion failed";if(r){i+=": "+r;var g=n}else e&&(i+=": "+e,g=t);e=new goog.asserts.AssertionError(""+i,g||[]),goog.asserts.errorHandler_(e)},goog.asserts.setErrorHandler=function(e){goog.asserts.ENABLE_ASSERTS&&(goog.asserts.errorHandler_=e)},goog.asserts.assert=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!e&&goog.asserts.doAssertFailure_("",null,t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertExists=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&e==null&&goog.asserts.doAssertFailure_("Expected to exist: %s.",[e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.fail=function(e,t){goog.asserts.ENABLE_ASSERTS&&goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1)))},goog.asserts.assertNumber=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isNumber(e)&&goog.asserts.doAssertFailure_("Expected number but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertString=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isString(e)&&goog.asserts.doAssertFailure_("Expected string but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertFunction=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isFunction(e)&&goog.asserts.doAssertFailure_("Expected function but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObject=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isObject(e)&&goog.asserts.doAssertFailure_("Expected object but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertArray=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isArray(e)&&goog.asserts.doAssertFailure_("Expected array but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertBoolean=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isBoolean(e)&&goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertElement=function(e,t,r){return!goog.asserts.ENABLE_ASSERTS||goog.isObject(e)&&e.nodeType==goog.dom.NodeType.ELEMENT||goog.asserts.doAssertFailure_("Expected Element but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertInstanceof=function(e,t,r,n){return!goog.asserts.ENABLE_ASSERTS||e instanceof t||goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[goog.asserts.getType_(t),goog.asserts.getType_(e)],r,Array.prototype.slice.call(arguments,3)),e},goog.asserts.assertFinite=function(e,t,r){return!goog.asserts.ENABLE_ASSERTS||typeof e=="number"&&isFinite(e)||goog.asserts.doAssertFailure_("Expected %s to be a finite number but it is not.",[e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObjectPrototypeIsIntact=function(){for(var e in Object.prototype)goog.asserts.fail(e+" should not be enumerable in Object.prototype.")},goog.asserts.getType_=function(e){return e instanceof Function?e.displayName||e.name||"unknown type name":e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):e===null?"null":typeof e},goog.array={},goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE,goog.array.ASSUME_NATIVE_FUNCTIONS=2012<goog.FEATURESET_YEAR,goog.array.peek=function(e){return e[e.length-1]},goog.array.last=goog.array.peek,goog.array.indexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.indexOf.call(e,t,r)}:function(e,t,r){if(r=r==null?0:0>r?Math.max(0,e.length+r):r,goog.isString(e))return goog.isString(t)&&t.length==1?e.indexOf(t,r):-1;for(;r<e.length;r++)if(r in e&&e[r]===t)return r;return-1},goog.array.lastIndexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.lastIndexOf.call(e,t,r==null?e.length-1:r)}:function(e,t,r){if(0>(r=r==null?e.length-1:r)&&(r=Math.max(0,e.length+r)),goog.isString(e))return goog.isString(t)&&t.length==1?e.lastIndexOf(t,r):-1;for(;0<=r;r--)if(r in e&&e[r]===t)return r;return-1},goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(e,t,r){goog.asserts.assert(e.length!=null),Array.prototype.forEach.call(e,t,r)}:function(e,t,r){for(var n=e.length,i=goog.isString(e)?e.split(""):e,g=0;g<n;g++)g in i&&t.call(r,i[g],g,e)},goog.array.forEachRight=function(e,t,r){var n=e.length,i=goog.isString(e)?e.split(""):e;for(--n;0<=n;--n)n in i&&t.call(r,i[n],n,e)},goog.array.filter=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.filter.call(e,t,r)}:function(e,t,r){for(var n=e.length,i=[],g=0,s=goog.isString(e)?e.split(""):e,o=0;o<n;o++)if(o in s){var u=s[o];t.call(r,u,o,e)&&(i[g++]=u)}return i},goog.array.map=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.map.call(e,t,r)}:function(e,t,r){for(var n=e.length,i=Array(n),g=goog.isString(e)?e.split(""):e,s=0;s<n;s++)s in g&&(i[s]=t.call(r,g[s],s,e));return i},goog.array.reduce=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(e,t,r,n){return goog.asserts.assert(e.length!=null),n&&(t=goog.bind(t,n)),Array.prototype.reduce.call(e,t,r)}:function(e,t,r,n){var i=r;return goog.array.forEach(e,function(g,s){i=t.call(n,i,g,s,e)}),i},goog.array.reduceRight=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(e,t,r,n){return goog.asserts.assert(e.length!=null),goog.asserts.assert(t!=null),n&&(t=goog.bind(t,n)),Array.prototype.reduceRight.call(e,t,r)}:function(e,t,r,n){var i=r;return goog.array.forEachRight(e,function(g,s){i=t.call(n,i,g,s,e)}),i},goog.array.some=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.some.call(e,t,r)}:function(e,t,r){for(var n=e.length,i=goog.isString(e)?e.split(""):e,g=0;g<n;g++)if(g in i&&t.call(r,i[g],g,e))return!0;return!1},goog.array.every=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.every.call(e,t,r)}:function(e,t,r){for(var n=e.length,i=goog.isString(e)?e.split(""):e,g=0;g<n;g++)if(g in i&&!t.call(r,i[g],g,e))return!1;return!0},goog.array.count=function(e,t,r){var n=0;return goog.array.forEach(e,function(i,g,s){t.call(r,i,g,s)&&++n},r),n},goog.array.find=function(e,t,r){return 0>(t=goog.array.findIndex(e,t,r))?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndex=function(e,t,r){for(var n=e.length,i=goog.isString(e)?e.split(""):e,g=0;g<n;g++)if(g in i&&t.call(r,i[g],g,e))return g;return-1},goog.array.findRight=function(e,t,r){return 0>(t=goog.array.findIndexRight(e,t,r))?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndexRight=function(e,t,r){var n=e.length,i=goog.isString(e)?e.split(""):e;for(--n;0<=n;n--)if(n in i&&t.call(r,i[n],n,e))return n;return-1},goog.array.contains=function(e,t){return 0<=goog.array.indexOf(e,t)},goog.array.isEmpty=function(e){return e.length==0},goog.array.clear=function(e){if(!goog.isArray(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0},goog.array.insert=function(e,t){goog.array.contains(e,t)||e.push(t)},goog.array.insertAt=function(e,t,r){goog.array.splice(e,r,0,t)},goog.array.insertArrayAt=function(e,t,r){goog.partial(goog.array.splice,e,r,0).apply(null,t)},goog.array.insertBefore=function(e,t,r){var n;arguments.length==2||0>(n=goog.array.indexOf(e,r))?e.push(t):goog.array.insertAt(e,t,n)},goog.array.remove=function(e,t){var r;return(r=0<=(t=goog.array.indexOf(e,t)))&&goog.array.removeAt(e,t),r},goog.array.removeLast=function(e,t){return 0<=(t=goog.array.lastIndexOf(e,t))&&(goog.array.removeAt(e,t),!0)},goog.array.removeAt=function(e,t){return goog.asserts.assert(e.length!=null),Array.prototype.splice.call(e,t,1).length==1},goog.array.removeIf=function(e,t,r){return 0<=(t=goog.array.findIndex(e,t,r))&&(goog.array.removeAt(e,t),!0)},goog.array.removeAllIf=function(e,t,r){var n=0;return goog.array.forEachRight(e,function(i,g){t.call(r,i,g,e)&&goog.array.removeAt(e,g)&&n++}),n},goog.array.concat=function(e){return Array.prototype.concat.apply([],arguments)},goog.array.join=function(e){return Array.prototype.concat.apply([],arguments)},goog.array.toArray=function(e){var t=e.length;if(0<t){for(var r=Array(t),n=0;n<t;n++)r[n]=e[n];return r}return[]},goog.array.clone=goog.array.toArray,goog.array.extend=function(e,t){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(goog.isArrayLike(n)){var i=e.length||0,g=n.length||0;e.length=i+g;for(var s=0;s<g;s++)e[i+s]=n[s]}else e.push(n)}},goog.array.splice=function(e,t,r,n){return goog.asserts.assert(e.length!=null),Array.prototype.splice.apply(e,goog.array.slice(arguments,1))},goog.array.slice=function(e,t,r){return goog.asserts.assert(e.length!=null),2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,r)},goog.array.removeDuplicates=function(e,t,r){t=t||e;var n=function(u){return goog.isObject(u)?"o"+goog.getUid(u):(typeof u).charAt(0)+u};r=r||n,n={};for(var i=0,g=0;g<e.length;){var s=e[g++],o=r(s);Object.prototype.hasOwnProperty.call(n,o)||(n[o]=!0,t[i++]=s)}t.length=i},goog.array.binarySearch=function(e,t,r){return goog.array.binarySearch_(e,r||goog.array.defaultCompare,!1,t)},goog.array.binarySelect=function(e,t,r){return goog.array.binarySearch_(e,t,!0,void 0,r)},goog.array.binarySearch_=function(e,t,r,n,i){for(var g,s=0,o=e.length;s<o;){var u=s+o>>1,l=r?t.call(i,e[u],u,e):t(n,e[u]);0<l?s=u+1:(o=u,g=!l)}return g?s:~s},goog.array.sort=function(e,t){e.sort(t||goog.array.defaultCompare)},goog.array.stableSort=function(e,t){for(var r=Array(e.length),n=0;n<e.length;n++)r[n]={index:n,value:e[n]};var i=t||goog.array.defaultCompare;for(goog.array.sort(r,function(g,s){return i(g.value,s.value)||g.index-s.index}),n=0;n<e.length;n++)e[n]=r[n].value},goog.array.sortByKey=function(e,t,r){var n=r||goog.array.defaultCompare;goog.array.sort(e,function(i,g){return n(t(i),t(g))})},goog.array.sortObjectsByKey=function(e,t,r){goog.array.sortByKey(e,function(n){return n[t]},r)},goog.array.isSorted=function(e,t,r){t=t||goog.array.defaultCompare;for(var n=1;n<e.length;n++){var i=t(e[n-1],e[n]);if(0<i||i==0&&r)return!1}return!0},goog.array.equals=function(e,t,r){if(!goog.isArrayLike(e)||!goog.isArrayLike(t)||e.length!=t.length)return!1;var n=e.length;r=r||goog.array.defaultCompareEquality;for(var i=0;i<n;i++)if(!r(e[i],t[i]))return!1;return!0},goog.array.compare3=function(e,t,r){r=r||goog.array.defaultCompare;for(var n=Math.min(e.length,t.length),i=0;i<n;i++){var g=r(e[i],t[i]);if(g!=0)return g}return goog.array.defaultCompare(e.length,t.length)},goog.array.defaultCompare=function(e,t){return e>t?1:e<t?-1:0},goog.array.inverseDefaultCompare=function(e,t){return-goog.array.defaultCompare(e,t)},goog.array.defaultCompareEquality=function(e,t){return e===t},goog.array.binaryInsert=function(e,t,r){return 0>(r=goog.array.binarySearch(e,t,r))&&(goog.array.insertAt(e,t,-(r+1)),!0)},goog.array.binaryRemove=function(e,t,r){return 0<=(t=goog.array.binarySearch(e,t,r))&&goog.array.removeAt(e,t)},goog.array.bucket=function(e,t,r){for(var n={},i=0;i<e.length;i++){var g=e[i],s=t.call(r,g,i,e);goog.isDef(s)&&(n[s]||(n[s]=[])).push(g)}return n},goog.array.toObject=function(e,t,r){var n={};return goog.array.forEach(e,function(i,g){n[t.call(r,i,g,e)]=i}),n},goog.array.range=function(e,t,r){var n=[],i=0,g=e;if(t!==void 0&&(i=e,g=t),0>(r=r||1)*(g-i))return[];if(0<r)for(e=i;e<g;e+=r)n.push(e);else for(e=i;e>g;e+=r)n.push(e);return n},goog.array.repeat=function(e,t){for(var r=[],n=0;n<t;n++)r[n]=e;return r},goog.array.flatten=function(e){for(var t=[],r=0;r<arguments.length;r++){var n=arguments[r];if(goog.isArray(n))for(var i=0;i<n.length;i+=8192){var g=goog.array.slice(n,i,i+8192);g=goog.array.flatten.apply(null,g);for(var s=0;s<g.length;s++)t.push(g[s])}else t.push(n)}return t},goog.array.rotate=function(e,t){return goog.asserts.assert(e.length!=null),e.length&&(0<(t%=e.length)?Array.prototype.unshift.apply(e,e.splice(-t,t)):0>t&&Array.prototype.push.apply(e,e.splice(0,-t))),e},goog.array.moveItem=function(e,t,r){goog.asserts.assert(0<=t&&t<e.length),goog.asserts.assert(0<=r&&r<e.length),t=Array.prototype.splice.call(e,t,1),Array.prototype.splice.call(e,r,0,t[0])},goog.array.zip=function(e){if(!arguments.length)return[];for(var t=[],r=arguments[0].length,n=1;n<arguments.length;n++)arguments[n].length<r&&(r=arguments[n].length);for(n=0;n<r;n++){for(var i=[],g=0;g<arguments.length;g++)i.push(arguments[g][n]);t.push(i)}return t},goog.array.shuffle=function(e,t){t=t||Math.random;for(var r=e.length-1;0<r;r--){var n=Math.floor(t()*(r+1)),i=e[r];e[r]=e[n],e[n]=i}},goog.array.copyByIndex=function(e,t){var r=[];return goog.array.forEach(t,function(n){r.push(e[n])}),r},goog.array.concatMap=function(e,t,r){return goog.array.concat.apply([],goog.array.map(e,t,r))},goog.crypt={},goog.crypt.stringToByteArray=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=e.charCodeAt(n);255<i&&(t[r++]=255&i,i>>=8),t[r++]=i}return t},goog.crypt.byteArrayToString=function(e){if(8192>=e.length)return String.fromCharCode.apply(null,e);for(var t="",r=0;r<e.length;r+=8192){var n=goog.array.slice(e,r,r+8192);t+=String.fromCharCode.apply(null,n)}return t},goog.crypt.byteArrayToHex=function(e,t){return goog.array.map(e,function(r){return 1<(r=r.toString(16)).length?r:"0"+r}).join(t||"")},goog.crypt.hexToByteArray=function(e){goog.asserts.assert(e.length%2==0,"Key string length must be multiple of 2");for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substring(r,r+2),16));return t},goog.crypt.stringToUtf8ByteArray=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=e.charCodeAt(n);128>i?t[r++]=i:(2048>i?t[r++]=i>>6|192:((64512&i)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128):t[r++]=i>>12|224,t[r++]=i>>6&63|128),t[r++]=63&i|128)}return t},goog.crypt.utf8ByteArrayToString=function(e){for(var t=[],r=0,n=0;r<e.length;){var i=e[r++];if(128>i)t[n++]=String.fromCharCode(i);else if(191<i&&224>i){var g=e[r++];t[n++]=String.fromCharCode((31&i)<<6|63&g)}else if(239<i&&365>i){g=e[r++];var s=e[r++];i=((7&i)<<18|(63&g)<<12|(63&s)<<6|63&e[r++])-65536,t[n++]=String.fromCharCode(55296+(i>>10)),t[n++]=String.fromCharCode(56320+(1023&i))}else g=e[r++],s=e[r++],t[n++]=String.fromCharCode((15&i)<<12|(63&g)<<6|63&s)}return t.join("")},goog.crypt.xorByteArray=function(e,t){goog.asserts.assert(e.length==t.length,"XOR array lengths must match");for(var r=[],n=0;n<e.length;n++)r.push(e[n]^t[n]);return r},goog.string={},goog.string.internal={},goog.string.internal.startsWith=function(e,t){return e.lastIndexOf(t,0)==0},goog.string.internal.endsWith=function(e,t){var r=e.length-t.length;return 0<=r&&e.indexOf(t,r)==r},goog.string.internal.caseInsensitiveStartsWith=function(e,t){return goog.string.internal.caseInsensitiveCompare(t,e.substr(0,t.length))==0},goog.string.internal.caseInsensitiveEndsWith=function(e,t){return goog.string.internal.caseInsensitiveCompare(t,e.substr(e.length-t.length,t.length))==0},goog.string.internal.caseInsensitiveEquals=function(e,t){return e.toLowerCase()==t.toLowerCase()},goog.string.internal.isEmptyOrWhitespace=function(e){return/^[\s\xa0]*$/.test(e)},goog.string.internal.trim=goog.TRUSTED_SITE&&String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},goog.string.internal.caseInsensitiveCompare=function(e,t){return(e=String(e).toLowerCase())<(t=String(t).toLowerCase())?-1:e==t?0:1},goog.string.internal.newLineToBr=function(e,t){return e.replace(/(\r\n|\r|\n)/g,t?"<br />":"<br>")},goog.string.internal.htmlEscape=function(e,t){if(t)e=e.replace(goog.string.internal.AMP_RE_,"&amp;").replace(goog.string.internal.LT_RE_,"&lt;").replace(goog.string.internal.GT_RE_,"&gt;").replace(goog.string.internal.QUOT_RE_,"&quot;").replace(goog.string.internal.SINGLE_QUOTE_RE_,"&#39;").replace(goog.string.internal.NULL_RE_,"&#0;");else{if(!goog.string.internal.ALL_RE_.test(e))return e;e.indexOf("&")!=-1&&(e=e.replace(goog.string.internal.AMP_RE_,"&amp;")),e.indexOf("<")!=-1&&(e=e.replace(goog.string.internal.LT_RE_,"&lt;")),e.indexOf(">")!=-1&&(e=e.replace(goog.string.internal.GT_RE_,"&gt;")),e.indexOf('"')!=-1&&(e=e.replace(goog.string.internal.QUOT_RE_,"&quot;")),e.indexOf("'")!=-1&&(e=e.replace(goog.string.internal.SINGLE_QUOTE_RE_,"&#39;")),e.indexOf("\0")!=-1&&(e=e.replace(goog.string.internal.NULL_RE_,"&#0;"))}return e},goog.string.internal.AMP_RE_=/&/g,goog.string.internal.LT_RE_=/</g,goog.string.internal.GT_RE_=/>/g,goog.string.internal.QUOT_RE_=/"/g,goog.string.internal.SINGLE_QUOTE_RE_=/'/g,goog.string.internal.NULL_RE_=/\x00/g,goog.string.internal.ALL_RE_=/[\x00&<>"']/,goog.string.internal.whitespaceEscape=function(e,t){return goog.string.internal.newLineToBr(e.replace(/ /g," &#160;"),t)},goog.string.internal.contains=function(e,t){return e.indexOf(t)!=-1},goog.string.internal.caseInsensitiveContains=function(e,t){return goog.string.internal.contains(e.toLowerCase(),t.toLowerCase())},goog.string.internal.compareVersions=function(e,t){var r=0;e=goog.string.internal.trim(String(e)).split("."),t=goog.string.internal.trim(String(t)).split(".");for(var n=Math.max(e.length,t.length),i=0;r==0&&i<n;i++){var g=e[i]||"",s=t[i]||"";do{if(g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],g[0].length==0&&s[0].length==0)break;r=g[1].length==0?0:parseInt(g[1],10);var o=s[1].length==0?0:parseInt(s[1],10);r=goog.string.internal.compareElements_(r,o)||goog.string.internal.compareElements_(g[2].length==0,s[2].length==0)||goog.string.internal.compareElements_(g[2],s[2]),g=g[3],s=s[3]}while(r==0)}return r},goog.string.internal.compareElements_=function(e,t){return e<t?-1:e>t?1:0},goog.string.TypedString=function(){},goog.string.Const=function(e,t){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_=e===goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_&&t||"",this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=goog.string.Const.TYPE_MARKER_},goog.string.Const.prototype.implementsGoogStringTypedString=!0,goog.string.Const.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_},goog.string.Const.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"},goog.string.Const.unwrap=function(e){return e instanceof goog.string.Const&&e.constructor===goog.string.Const&&e.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===goog.string.Const.TYPE_MARKER_?e.stringConstValueWithSecurityContract__googStringSecurityPrivate_:(goog.asserts.fail("expected object of type Const, got '"+e+"'"),"type_error:Const")},goog.string.Const.from=function(e){return new goog.string.Const(goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_,e)},goog.string.Const.TYPE_MARKER_={},goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_={},goog.string.Const.EMPTY=goog.string.Const.from(""),goog.fs={},goog.fs.url={},goog.fs.url.createObjectUrl=function(e){return goog.fs.url.getUrlObject_().createObjectURL(e)},goog.fs.url.revokeObjectUrl=function(e){goog.fs.url.getUrlObject_().revokeObjectURL(e)},goog.fs.url.getUrlObject_=function(){var e=goog.fs.url.findUrlObject_();if(e!=null)return e;throw Error("This browser doesn't seem to support blob URLs")},goog.fs.url.findUrlObject_=function(){return goog.isDef(goog.global.URL)&&goog.isDef(goog.global.URL.createObjectURL)?goog.global.URL:goog.isDef(goog.global.webkitURL)&&goog.isDef(goog.global.webkitURL.createObjectURL)?goog.global.webkitURL:goog.isDef(goog.global.createObjectURL)?goog.global:null},goog.fs.url.browserSupportsObjectUrls=function(){return goog.fs.url.findUrlObject_()!=null},goog.html={},goog.html.trustedtypes={},goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#html"):null,goog.i18n={},goog.i18n.bidi={},goog.i18n.bidi.FORCE_RTL=!1,goog.i18n.bidi.IS_RTL=goog.i18n.bidi.FORCE_RTL||(goog.LOCALE.substring(0,2).toLowerCase()=="ar"||goog.LOCALE.substring(0,2).toLowerCase()=="fa"||goog.LOCALE.substring(0,2).toLowerCase()=="he"||goog.LOCALE.substring(0,2).toLowerCase()=="iw"||goog.LOCALE.substring(0,2).toLowerCase()=="ps"||goog.LOCALE.substring(0,2).toLowerCase()=="sd"||goog.LOCALE.substring(0,2).toLowerCase()=="ug"||goog.LOCALE.substring(0,2).toLowerCase()=="ur"||goog.LOCALE.substring(0,2).toLowerCase()=="yi")&&(goog.LOCALE.length==2||goog.LOCALE.substring(2,3)=="-"||goog.LOCALE.substring(2,3)=="_")||3<=goog.LOCALE.length&&goog.LOCALE.substring(0,3).toLowerCase()=="ckb"&&(goog.LOCALE.length==3||goog.LOCALE.substring(3,4)=="-"||goog.LOCALE.substring(3,4)=="_")||7<=goog.LOCALE.length&&(goog.LOCALE.substring(2,3)=="-"||goog.LOCALE.substring(2,3)=="_")&&(goog.LOCALE.substring(3,7).toLowerCase()=="adlm"||goog.LOCALE.substring(3,7).toLowerCase()=="arab"||goog.LOCALE.substring(3,7).toLowerCase()=="hebr"||goog.LOCALE.substring(3,7).toLowerCase()=="nkoo"||goog.LOCALE.substring(3,7).toLowerCase()=="rohg"||goog.LOCALE.substring(3,7).toLowerCase()=="thaa")||8<=goog.LOCALE.length&&(goog.LOCALE.substring(3,4)=="-"||goog.LOCALE.substring(3,4)=="_")&&(goog.LOCALE.substring(4,8).toLowerCase()=="adlm"||goog.LOCALE.substring(4,8).toLowerCase()=="arab"||goog.LOCALE.substring(4,8).toLowerCase()=="hebr"||goog.LOCALE.substring(4,8).toLowerCase()=="nkoo"||goog.LOCALE.substring(4,8).toLowerCase()=="rohg"||goog.LOCALE.substring(4,8).toLowerCase()=="thaa"),goog.i18n.bidi.Format={LRE:"\u202A",RLE:"\u202B",PDF:"\u202C",LRM:"\u200E",RLM:"\u200F"},goog.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0},goog.i18n.bidi.RIGHT="right",goog.i18n.bidi.LEFT="left",goog.i18n.bidi.I18N_RIGHT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.LEFT:goog.i18n.bidi.RIGHT,goog.i18n.bidi.I18N_LEFT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,goog.i18n.bidi.toDir=function(e,t){return typeof e=="number"?0<e?goog.i18n.bidi.Dir.LTR:0>e?goog.i18n.bidi.Dir.RTL:t?null:goog.i18n.bidi.Dir.NEUTRAL:e==null?null:e?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.ltrChars_="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0900-\u1FFF\u200E\u2C00-\uD801\uD804-\uD839\uD83C-\uDBFF\uF900-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",goog.i18n.bidi.rtlChars_="\u0591-\u06EF\u06FA-\u08FF\u200F\uD802-\uD803\uD83A-\uD83B\uFB1D-\uFDFF\uFE70-\uFEFC",goog.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g,goog.i18n.bidi.stripHtmlIfNeeded_=function(e,t){return t?e.replace(goog.i18n.bidi.htmlSkipReg_,""):e},goog.i18n.bidi.rtlCharReg_=new RegExp("["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.ltrCharReg_=new RegExp("["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.hasAnyRtl=function(e,t){return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.hasRtlChar=goog.i18n.bidi.hasAnyRtl,goog.i18n.bidi.hasAnyLtr=function(e,t){return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.ltrRe_=new RegExp("^["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlRe_=new RegExp("^["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.isRtlChar=function(e){return goog.i18n.bidi.rtlRe_.test(e)},goog.i18n.bidi.isLtrChar=function(e){return goog.i18n.bidi.ltrRe_.test(e)},goog.i18n.bidi.isNeutralChar=function(e){return!goog.i18n.bidi.isLtrChar(e)&&!goog.i18n.bidi.isRtlChar(e)},goog.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.rtlChars_+"]*["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.ltrChars_+"]*["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.startsWithRtl=function(e,t){return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlText=goog.i18n.bidi.startsWithRtl,goog.i18n.bidi.startsWithLtr=function(e,t){return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrText=goog.i18n.bidi.startsWithLtr,goog.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/,goog.i18n.bidi.isNeutralText=function(e,t){return e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t),goog.i18n.bidi.isRequiredLtrRe_.test(e)||!goog.i18n.bidi.hasAnyLtr(e)&&!goog.i18n.bidi.hasAnyRtl(e)},goog.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.ltrChars_+"][^"+goog.i18n.bidi.rtlChars_+"]*$"),goog.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.rtlChars_+"][^"+goog.i18n.bidi.ltrChars_+"]*$"),goog.i18n.bidi.endsWithLtr=function(e,t){return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrExitText=goog.i18n.bidi.endsWithLtr,goog.i18n.bidi.endsWithRtl=function(e,t){return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlExitText=goog.i18n.bidi.endsWithRtl,goog.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,goog.i18n.bidi.isRtlLanguage=function(e){return goog.i18n.bidi.rtlLocalesRe_.test(e)},goog.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g,goog.i18n.bidi.guardBracketInText=function(e,t){return t=(t===void 0?goog.i18n.bidi.hasAnyRtl(e):t)?goog.i18n.bidi.Format.RLM:goog.i18n.bidi.Format.LRM,e.replace(goog.i18n.bidi.bracketGuardTextRe_,t+"$&"+t)},goog.i18n.bidi.enforceRtlInHtml=function(e){return e.charAt(0)=="<"?e.replace(/<\w+/,"$& dir=rtl"):`
32
+ <span dir=rtl>`+e+"</span>"},goog.i18n.bidi.enforceRtlInText=function(e){return goog.i18n.bidi.Format.RLE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.enforceLtrInHtml=function(e){return e.charAt(0)=="<"?e.replace(/<\w+/,"$& dir=ltr"):`
33
+ <span dir=ltr>`+e+"</span>"},goog.i18n.bidi.enforceLtrInText=function(e){return goog.i18n.bidi.Format.LRE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g,goog.i18n.bidi.leftRe_=/left/gi,goog.i18n.bidi.rightRe_=/right/gi,goog.i18n.bidi.tempRe_=/%%%%/g,goog.i18n.bidi.mirrorCSS=function(e){return e.replace(goog.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_,"%%%%").replace(goog.i18n.bidi.rightRe_,goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_,goog.i18n.bidi.RIGHT)},goog.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g,goog.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g,goog.i18n.bidi.normalizeHebrewQuote=function(e){return e.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_,"$1\u05F4").replace(goog.i18n.bidi.singleQuoteSubstituteRe_,"$1\u05F3")},goog.i18n.bidi.wordSeparatorRe_=/\s+/,goog.i18n.bidi.hasNumeralsRe_=/[\d\u06f0-\u06f9]/,goog.i18n.bidi.rtlDetectionThreshold_=.4,goog.i18n.bidi.estimateDirection=function(e,t){var r=0,n=0,i=!1;for(e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t).split(goog.i18n.bidi.wordSeparatorRe_),t=0;t<e.length;t++){var g=e[t];goog.i18n.bidi.startsWithRtl(g)?(r++,n++):goog.i18n.bidi.isRequiredLtrRe_.test(g)?i=!0:goog.i18n.bidi.hasAnyLtr(g)?n++:goog.i18n.bidi.hasNumeralsRe_.test(g)&&(i=!0)}return n==0?i?goog.i18n.bidi.Dir.LTR:goog.i18n.bidi.Dir.NEUTRAL:r/n>goog.i18n.bidi.rtlDetectionThreshold_?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.detectRtlDirectionality=function(e,t){return goog.i18n.bidi.estimateDirection(e,t)==goog.i18n.bidi.Dir.RTL},goog.i18n.bidi.setElementDirAndAlign=function(e,t){e&&(t=goog.i18n.bidi.toDir(t))&&(e.style.textAlign=t==goog.i18n.bidi.Dir.RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,e.dir=t==goog.i18n.bidi.Dir.RTL?"rtl":"ltr")},goog.i18n.bidi.setElementDirByTextDirectionality=function(e,t){switch(goog.i18n.bidi.estimateDirection(t)){case goog.i18n.bidi.Dir.LTR:e.dir="ltr";break;case goog.i18n.bidi.Dir.RTL:e.dir="rtl";break;default:e.removeAttribute("dir")}},goog.i18n.bidi.DirectionalString=function(){},goog.html.TrustedResourceUrl=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="",this.trustedURL_=null,this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString=!0,goog.html.TrustedResourceUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()},goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.TrustedResourceUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.html.TrustedResourceUrl.prototype.cloneWithParams=function(e,t){var r=goog.html.TrustedResourceUrl.unwrap(this),n=(r=goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(r))[3]||"";return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(r[1]+goog.html.TrustedResourceUrl.stringifyParams_("?",r[2]||"",e)+goog.html.TrustedResourceUrl.stringifyParams_("#",n,t))},goog.DEBUG&&(goog.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"}),goog.html.TrustedResourceUrl.unwrap=function(e){return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(e).toString()},goog.html.TrustedResourceUrl.unwrapTrustedScriptURL=function(e){return e instanceof goog.html.TrustedResourceUrl&&e.constructor===goog.html.TrustedResourceUrl&&e.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_:(goog.asserts.fail("expected object of type TrustedResourceUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:TrustedResourceUrl")},goog.html.TrustedResourceUrl.unwrapTrustedURL=function(e){return e.trustedURL_?e.trustedURL_:goog.html.TrustedResourceUrl.unwrap(e)},goog.html.TrustedResourceUrl.format=function(e,t){var r=goog.string.Const.unwrap(e);if(!goog.html.TrustedResourceUrl.BASE_URL_.test(r))throw Error("Invalid TrustedResourceUrl format: "+r);return e=r.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_,function(n,i){if(!Object.prototype.hasOwnProperty.call(t,i))throw Error('Found marker, "'+i+'", in format string, "'+r+'", but no valid label mapping found in args: '+JSON.stringify(t));return(n=t[i])instanceof goog.string.Const?goog.string.Const.unwrap(n):encodeURIComponent(String(n))}),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.TrustedResourceUrl.FORMAT_MARKER_=/%{(\w+)}/g,goog.html.TrustedResourceUrl.BASE_URL_=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,goog.html.TrustedResourceUrl.URL_PARAM_PARSER_=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/,goog.html.TrustedResourceUrl.formatWithParams=function(e,t,r,n){return goog.html.TrustedResourceUrl.format(e,t).cloneWithParams(r,n)},goog.html.TrustedResourceUrl.fromConstant=function(e){return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.TrustedResourceUrl.fromConstants=function(e){for(var t="",r=0;r<e.length;r++)t+=goog.string.Const.unwrap(e[r]);return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.TrustedResourceUrl;return t.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScriptURL(e):e,goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY&&(t.trustedURL_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(e)),t},goog.html.TrustedResourceUrl.stringifyParams_=function(e,t,r){if(r==null)return t;if(goog.isString(r))return r?e+encodeURIComponent(r):"";for(var n in r){var i=r[n];i=goog.isArray(i)?i:[i];for(var g=0;g<i.length;g++){var s=i[g];s!=null&&(t||(t=e),t+=(t.length>e.length?"&":"")+encodeURIComponent(n)+"="+encodeURIComponent(String(s)))}}return t},goog.html.SafeUrl=function(){this.privateDoNotAccessOrElseSafeUrlWrappedValue_="",this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez",goog.html.SafeUrl.prototype.implementsGoogStringTypedString=!0,goog.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()},goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.DEBUG&&(goog.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeUrlWrappedValue_+"}"}),goog.html.SafeUrl.unwrap=function(e){return goog.html.SafeUrl.unwrapTrustedURL(e).toString()},goog.html.SafeUrl.unwrapTrustedURL=function(e){return e instanceof goog.html.SafeUrl&&e.constructor===goog.html.SafeUrl&&e.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeUrlWrappedValue_:(goog.asserts.fail("expected object of type SafeUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeUrl")},goog.html.SafeUrl.fromConstant=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.SAFE_MIME_TYPE_PATTERN_=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))(?:;\w+=(?:\w+|"[\w;=]+"))*$/i,goog.html.SafeUrl.isSafeMimeType=function(e){return goog.html.SAFE_MIME_TYPE_PATTERN_.test(e)},goog.html.SafeUrl.fromBlob=function(e){return e=goog.html.SAFE_MIME_TYPE_PATTERN_.test(e.type)?goog.fs.url.createObjectUrl(e):goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.DATA_URL_PATTERN_=/^data:([^,]*);base64,[a-z0-9+\/]+=*$/i,goog.html.SafeUrl.fromDataUrl=function(e){var t=(e=e.replace(/(%0A|%0D)/g,"")).match(goog.html.DATA_URL_PATTERN_);return t=t&&goog.html.SAFE_MIME_TYPE_PATTERN_.test(t[1]),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t?e:goog.html.SafeUrl.INNOCUOUS_STRING)},goog.html.SafeUrl.fromTelUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"tel:")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SIP_URL_PATTERN_=/^sip[s]?:[+a-z0-9_.!$%&'*\/=^`{|}~-]+@([a-z0-9-]+\.)+[a-z0-9]{2,63}$/i,goog.html.SafeUrl.fromSipUrl=function(e){return goog.html.SIP_URL_PATTERN_.test(decodeURIComponent(e))||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromFacebookMessengerUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"fb-messenger://share")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromWhatsAppUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"whatsapp://send")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromSmsUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"sms:")&&goog.html.SafeUrl.isSmsUrlBodyValid_(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.isSmsUrlBodyValid_=function(e){var t=e.indexOf("#");if(0<t&&(e=e.substring(0,t)),!(t=e.match(/[?&]body=/gi)))return!0;if(1<t.length)return!1;if(!(e=e.match(/[?&]body=([^&]*)/)[1]))return!0;try{decodeURIComponent(e)}catch{return!1}return/^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(e)},goog.html.SafeUrl.fromSshUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"ssh://")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.sanitizeChromeExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^chrome-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeFirefoxExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^moz-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeEdgeExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^ms-browser-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeExtensionUrl_=function(e,t,r){return(e=e.exec(t))?(e=e[1],(r instanceof goog.string.Const?[goog.string.Const.unwrap(r)]:r.map(function(n){return goog.string.Const.unwrap(n)})).indexOf(e)==-1&&(t=goog.html.SafeUrl.INNOCUOUS_STRING)):t=goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.SafeUrl.fromTrustedResourceUrl=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.html.TrustedResourceUrl.unwrap(e))},goog.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,goog.html.SafeUrl.SAFE_URL_PATTERN=goog.html.SAFE_URL_PATTERN_,goog.html.SafeUrl.sanitize=function(e){return e instanceof goog.html.SafeUrl?e:(e=typeof e=="object"&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SAFE_URL_PATTERN_.test(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeUrl.sanitizeAssertUnchanged=function(e,t){return e instanceof goog.html.SafeUrl?e:(e=typeof e=="object"&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),t&&/^data:/i.test(e)&&(t=goog.html.SafeUrl.fromDataUrl(e)).getTypedStringValue()==e?t:(goog.asserts.assert(goog.html.SAFE_URL_PATTERN_.test(e),"%s does not match the safe URL pattern",e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)))},goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.SafeUrl;return t.privateDoNotAccessOrElseSafeUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(e):e,t},goog.html.SafeUrl.ABOUT_BLANK=goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank"),goog.html.SafeStyle=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="",this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyle.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyle.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeStyle.EMPTY:(goog.asserts.assert(goog.string.internal.endsWith(e,";"),"Last character of style string is not ';': "+e),goog.asserts.assert(goog.string.internal.contains(e,":"),`Style string must contain at least one ':', to specify a "name: value" pair: `+e),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_},goog.DEBUG&&(goog.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"}),goog.html.SafeStyle.unwrap=function(e){return e instanceof goog.html.SafeStyle&&e.constructor===goog.html.SafeStyle&&e.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleWrappedValue_:(goog.asserts.fail("expected object of type SafeStyle, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyle")},goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeStyle().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_=e,this},goog.html.SafeStyle.EMPTY=goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(""),goog.html.SafeStyle.INNOCUOUS_STRING="zClosurez",goog.html.SafeStyle.create=function(e){var t,r="";for(t in e){if(!/^[-_a-zA-Z0-9]+$/.test(t))throw Error("Name allows only [-_a-zA-Z0-9], got: "+t);var n=e[t];n!=null&&(r+=t+":"+(n=goog.isArray(n)?goog.array.map(n,goog.html.SafeStyle.sanitizePropertyValue_).join(" "):goog.html.SafeStyle.sanitizePropertyValue_(n))+";")}return r?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(r):goog.html.SafeStyle.EMPTY},goog.html.SafeStyle.sanitizePropertyValue_=function(e){if(e instanceof goog.html.SafeUrl)return'url("'+goog.html.SafeUrl.unwrap(e).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';if(e=e instanceof goog.string.Const?goog.string.Const.unwrap(e):goog.html.SafeStyle.sanitizePropertyValueString_(String(e)),/[{;}]/.test(e))throw new goog.asserts.AssertionError("Value does not allow [{;}], got: %s.",[e]);return e},goog.html.SafeStyle.sanitizePropertyValueString_=function(e){var t=e.replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.URL_RE_,"url");return goog.html.SafeStyle.VALUE_RE_.test(t)?goog.html.SafeStyle.COMMENT_RE_.test(e)?(goog.asserts.fail("String value disallows comments, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):goog.html.SafeStyle.hasBalancedQuotes_(e)?goog.html.SafeStyle.hasBalancedSquareBrackets_(e)?goog.html.SafeStyle.sanitizeUrl_(e):(goog.asserts.fail("String value requires balanced square brackets and one identifier per pair of brackets, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value requires balanced quotes, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value allows only "+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+" and simple functions, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING)},goog.html.SafeStyle.hasBalancedQuotes_=function(e){for(var t=!0,r=!0,n=0;n<e.length;n++){var i=e.charAt(n);i=="'"&&r?t=!t:i=='"'&&t&&(r=!r)}return t&&r},goog.html.SafeStyle.hasBalancedSquareBrackets_=function(e){for(var t=!0,r=/^[-_a-zA-Z0-9]$/,n=0;n<e.length;n++){var i=e.charAt(n);if(i=="]"){if(t)return!1;t=!0}else if(i=="["){if(!t)return!1;t=!1}else if(!t&&!r.test(i))return!1}return t},goog.html.SafeStyle.VALUE_ALLOWED_CHARS_=`[-,."'%_!# a-zA-Z0-9\\[\\]]`,goog.html.SafeStyle.VALUE_RE_=new RegExp("^"+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+"+$"),goog.html.SafeStyle.URL_RE_=/\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g,goog.html.SafeStyle.FUNCTIONS_RE_=/\b(hsl|hsla|rgb|rgba|matrix|calc|minmax|fit-content|repeat|(rotate|scale|translate)(X|Y|Z|3d)?)\([-+*/0-9a-z.%\[\], ]+\)/g,goog.html.SafeStyle.COMMENT_RE_=/\/\*/,goog.html.SafeStyle.sanitizeUrl_=function(e){return e.replace(goog.html.SafeStyle.URL_RE_,function(t,r,n,i){var g="";return n=n.replace(/^(['"])(.*)\1$/,function(s,o,u){return g=o,u}),t=goog.html.SafeUrl.sanitize(n).getTypedStringValue(),r+g+t+g+i})},goog.html.SafeStyle.concat=function(e){var t="",r=function(n){goog.isArray(n)?goog.array.forEach(n,r):t+=goog.html.SafeStyle.unwrap(n)};return goog.array.forEach(arguments,r),t?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t):goog.html.SafeStyle.EMPTY},goog.html.SafeScript=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="",this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeScript.prototype.implementsGoogStringTypedString=!0,goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeScript.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeScript.EMPTY:goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeScript.fromConstantAndArgs=function(e,t){for(var r=[],n=1;n<arguments.length;n++)r.push(goog.html.SafeScript.stringify_(arguments[n]));return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("("+goog.string.Const.unwrap(e)+")("+r.join(", ")+");")},goog.html.SafeScript.fromJson=function(e){return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(goog.html.SafeScript.stringify_(e))},goog.html.SafeScript.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()},goog.DEBUG&&(goog.html.SafeScript.prototype.toString=function(){return"SafeScript{"+this.privateDoNotAccessOrElseSafeScriptWrappedValue_+"}"}),goog.html.SafeScript.unwrap=function(e){return goog.html.SafeScript.unwrapTrustedScript(e).toString()},goog.html.SafeScript.unwrapTrustedScript=function(e){return e instanceof goog.html.SafeScript&&e.constructor===goog.html.SafeScript&&e.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeScriptWrappedValue_:(goog.asserts.fail("expected object of type SafeScript, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeScript")},goog.html.SafeScript.stringify_=function(e){return JSON.stringify(e).replace(/</g,"\\x3c")},goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeScript().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScript(e):e,this},goog.html.SafeScript.EMPTY=goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(""),goog.object={},goog.object.is=function(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t},goog.object.forEach=function(e,t,r){for(var n in e)t.call(r,e[n],n,e)},goog.object.filter=function(e,t,r){var n,i={};for(n in e)t.call(r,e[n],n,e)&&(i[n]=e[n]);return i},goog.object.map=function(e,t,r){var n,i={};for(n in e)i[n]=t.call(r,e[n],n,e);return i},goog.object.some=function(e,t,r){for(var n in e)if(t.call(r,e[n],n,e))return!0;return!1},goog.object.every=function(e,t,r){for(var n in e)if(!t.call(r,e[n],n,e))return!1;return!0},goog.object.getCount=function(e){var t,r=0;for(t in e)r++;return r},goog.object.getAnyKey=function(e){for(var t in e)return t},goog.object.getAnyValue=function(e){for(var t in e)return e[t]},goog.object.contains=function(e,t){return goog.object.containsValue(e,t)},goog.object.getValues=function(e){var t,r=[],n=0;for(t in e)r[n++]=e[t];return r},goog.object.getKeys=function(e){var t,r=[],n=0;for(t in e)r[n++]=t;return r},goog.object.getValueByKeys=function(e,t){var r=goog.isArrayLike(t),n=r?t:arguments;for(r=r?0:1;r<n.length;r++){if(e==null)return;e=e[n[r]]}return e},goog.object.containsKey=function(e,t){return e!==null&&t in e},goog.object.containsValue=function(e,t){for(var r in e)if(e[r]==t)return!0;return!1},goog.object.findKey=function(e,t,r){for(var n in e)if(t.call(r,e[n],n,e))return n},goog.object.findValue=function(e,t,r){return(t=goog.object.findKey(e,t,r))&&e[t]},goog.object.isEmpty=function(e){for(var t in e)return!1;return!0},goog.object.clear=function(e){for(var t in e)delete e[t]},goog.object.remove=function(e,t){var r;return(r=t in e)&&delete e[t],r},goog.object.add=function(e,t,r){if(e!==null&&t in e)throw Error('The object already contains the key "'+t+'"');goog.object.set(e,t,r)},goog.object.get=function(e,t,r){return e!==null&&t in e?e[t]:r},goog.object.set=function(e,t,r){e[t]=r},goog.object.setIfUndefined=function(e,t,r){return t in e?e[t]:e[t]=r},goog.object.setWithReturnValueIfNotSet=function(e,t,r){return t in e?e[t]:(r=r(),e[t]=r)},goog.object.equals=function(e,t){for(var r in e)if(!(r in t)||e[r]!==t[r])return!1;for(var n in t)if(!(n in e))return!1;return!0},goog.object.clone=function(e){var t,r={};for(t in e)r[t]=e[t];return r},goog.object.unsafeClone=function(e){var t=goog.typeOf(e);if(t=="object"||t=="array"){if(goog.isFunction(e.clone))return e.clone();for(var r in t=t=="array"?[]:{},e)t[r]=goog.object.unsafeClone(e[r]);return t}return e},goog.object.transpose=function(e){var t,r={};for(t in e)r[e[t]]=t;return r},goog.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.object.extend=function(e,t){for(var r,n,i=1;i<arguments.length;i++){for(r in n=arguments[i])e[r]=n[r];for(var g=0;g<goog.object.PROTOTYPE_FIELDS_.length;g++)r=goog.object.PROTOTYPE_FIELDS_[g],Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}},goog.object.create=function(e){var t=arguments.length;if(t==1&&goog.isArray(arguments[0]))return goog.object.create.apply(null,arguments[0]);if(t%2)throw Error("Uneven number of arguments");for(var r={},n=0;n<t;n+=2)r[arguments[n]]=arguments[n+1];return r},goog.object.createSet=function(e){var t=arguments.length;if(t==1&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);for(var r={},n=0;n<t;n++)r[arguments[n]]=!0;return r},goog.object.createImmutableView=function(e){var t=e;return Object.isFrozen&&!Object.isFrozen(e)&&(t=Object.create(e),Object.freeze(t)),t},goog.object.isImmutableView=function(e){return!!Object.isFrozen&&Object.isFrozen(e)},goog.object.getAllPropertyNames=function(e,t,r){if(!e)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return goog.object.getKeys(e);for(var n={};e&&(e!==Object.prototype||t)&&(e!==Function.prototype||r);){for(var i=Object.getOwnPropertyNames(e),g=0;g<i.length;g++)n[i[g]]=!0;e=Object.getPrototypeOf(e)}return goog.object.getKeys(n)},goog.object.getSuperClass=function(e){return(e=Object.getPrototypeOf(e.prototype))&&e.constructor},goog.html.SafeStyleSheet=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="",this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyleSheet.createRule=function(e,t){if(goog.string.internal.contains(e,"<"))throw Error("Selector does not allow '<', got: "+e);var r=e.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g,"");if(!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(r))throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: "+e);if(!goog.html.SafeStyleSheet.hasBalancedBrackets_(r))throw Error("() and [] in selector must be balanced, got: "+e);return t instanceof goog.html.SafeStyle||(t=goog.html.SafeStyle.create(t)),e=e+"{"+goog.html.SafeStyle.unwrap(t).replace(/</g,"\\3C ")+"}",goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeStyleSheet.hasBalancedBrackets_=function(e){for(var t={"(":")","[":"]"},r=[],n=0;n<e.length;n++){var i=e[n];if(t[i])r.push(t[i]);else if(goog.object.contains(t,i)&&r.pop()!=i)return!1}return r.length==0},goog.html.SafeStyleSheet.concat=function(e){var t="",r=function(n){goog.isArray(n)?goog.array.forEach(n,r):t+=goog.html.SafeStyleSheet.unwrap(n)};return goog.array.forEach(arguments,r),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(t)},goog.html.SafeStyleSheet.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeStyleSheet.EMPTY:(goog.asserts.assert(!goog.string.internal.contains(e,"<"),"Forbidden '<' character in style sheet string: "+e),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyleSheet.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_},goog.DEBUG&&(goog.html.SafeStyleSheet.prototype.toString=function(){return"SafeStyleSheet{"+this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_+"}"}),goog.html.SafeStyleSheet.unwrap=function(e){return e instanceof goog.html.SafeStyleSheet&&e.constructor===goog.html.SafeStyleSheet&&e.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_:(goog.asserts.fail("expected object of type SafeStyleSheet, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyleSheet")},goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeStyleSheet().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=e,this},goog.html.SafeStyleSheet.EMPTY=goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(""),goog.dom.tags={},goog.dom.tags.VOID_TAGS_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},goog.dom.tags.isVoidTag=function(e){return goog.dom.tags.VOID_TAGS_[e]===!0},goog.dom.HtmlElement=function(){},goog.dom.TagName=function(e){this.tagName_=e},goog.dom.TagName.prototype.toString=function(){return this.tagName_},goog.dom.TagName.A=new goog.dom.TagName("A"),goog.dom.TagName.ABBR=new goog.dom.TagName("ABBR"),goog.dom.TagName.ACRONYM=new goog.dom.TagName("ACRONYM"),goog.dom.TagName.ADDRESS=new goog.dom.TagName("ADDRESS"),goog.dom.TagName.APPLET=new goog.dom.TagName("APPLET"),goog.dom.TagName.AREA=new goog.dom.TagName("AREA"),goog.dom.TagName.ARTICLE=new goog.dom.TagName("ARTICLE"),goog.dom.TagName.ASIDE=new goog.dom.TagName("ASIDE"),goog.dom.TagName.AUDIO=new goog.dom.TagName("AUDIO"),goog.dom.TagName.B=new goog.dom.TagName("B"),goog.dom.TagName.BASE=new goog.dom.TagName("BASE"),goog.dom.TagName.BASEFONT=new goog.dom.TagName("BASEFONT"),goog.dom.TagName.BDI=new goog.dom.TagName("BDI"),goog.dom.TagName.BDO=new goog.dom.TagName("BDO"),goog.dom.TagName.BIG=new goog.dom.TagName("BIG"),goog.dom.TagName.BLOCKQUOTE=new goog.dom.TagName("BLOCKQUOTE"),goog.dom.TagName.BODY=new goog.dom.TagName("BODY"),goog.dom.TagName.BR=new goog.dom.TagName("BR"),goog.dom.TagName.BUTTON=new goog.dom.TagName("BUTTON"),goog.dom.TagName.CANVAS=new goog.dom.TagName("CANVAS"),goog.dom.TagName.CAPTION=new goog.dom.TagName("CAPTION"),goog.dom.TagName.CENTER=new goog.dom.TagName("CENTER"),goog.dom.TagName.CITE=new goog.dom.TagName("CITE"),goog.dom.TagName.CODE=new goog.dom.TagName("CODE"),goog.dom.TagName.COL=new goog.dom.TagName("COL"),goog.dom.TagName.COLGROUP=new goog.dom.TagName("COLGROUP"),goog.dom.TagName.COMMAND=new goog.dom.TagName("COMMAND"),goog.dom.TagName.DATA=new goog.dom.TagName("DATA"),goog.dom.TagName.DATALIST=new goog.dom.TagName("DATALIST"),goog.dom.TagName.DD=new goog.dom.TagName("DD"),goog.dom.TagName.DEL=new goog.dom.TagName("DEL"),goog.dom.TagName.DETAILS=new goog.dom.TagName("DETAILS"),goog.dom.TagName.DFN=new goog.dom.TagName("DFN"),goog.dom.TagName.DIALOG=new goog.dom.TagName("DIALOG"),goog.dom.TagName.DIR=new goog.dom.TagName("DIR"),goog.dom.TagName.DIV=new goog.dom.TagName("DIV"),goog.dom.TagName.DL=new goog.dom.TagName("DL"),goog.dom.TagName.DT=new goog.dom.TagName("DT"),goog.dom.TagName.EM=new goog.dom.TagName("EM"),goog.dom.TagName.EMBED=new goog.dom.TagName("EMBED"),goog.dom.TagName.FIELDSET=new goog.dom.TagName("FIELDSET"),goog.dom.TagName.FIGCAPTION=new goog.dom.TagName("FIGCAPTION"),goog.dom.TagName.FIGURE=new goog.dom.TagName("FIGURE"),goog.dom.TagName.FONT=new goog.dom.TagName("FONT"),goog.dom.TagName.FOOTER=new goog.dom.TagName("FOOTER"),goog.dom.TagName.FORM=new goog.dom.TagName("FORM"),goog.dom.TagName.FRAME=new goog.dom.TagName("FRAME"),goog.dom.TagName.FRAMESET=new goog.dom.TagName("FRAMESET"),goog.dom.TagName.H1=new goog.dom.TagName("H1"),goog.dom.TagName.H2=new goog.dom.TagName("H2"),goog.dom.TagName.H3=new goog.dom.TagName("H3"),goog.dom.TagName.H4=new goog.dom.TagName("H4"),goog.dom.TagName.H5=new goog.dom.TagName("H5"),goog.dom.TagName.H6=new goog.dom.TagName("H6"),goog.dom.TagName.HEAD=new goog.dom.TagName("HEAD"),goog.dom.TagName.HEADER=new goog.dom.TagName("HEADER"),goog.dom.TagName.HGROUP=new goog.dom.TagName("HGROUP"),goog.dom.TagName.HR=new goog.dom.TagName("HR"),goog.dom.TagName.HTML=new goog.dom.TagName("HTML"),goog.dom.TagName.I=new goog.dom.TagName("I"),goog.dom.TagName.IFRAME=new goog.dom.TagName("IFRAME"),goog.dom.TagName.IMG=new goog.dom.TagName("IMG"),goog.dom.TagName.INPUT=new goog.dom.TagName("INPUT"),goog.dom.TagName.INS=new goog.dom.TagName("INS"),goog.dom.TagName.ISINDEX=new goog.dom.TagName("ISINDEX"),goog.dom.TagName.KBD=new goog.dom.TagName("KBD"),goog.dom.TagName.KEYGEN=new goog.dom.TagName("KEYGEN"),goog.dom.TagName.LABEL=new goog.dom.TagName("LABEL"),goog.dom.TagName.LEGEND=new goog.dom.TagName("LEGEND"),goog.dom.TagName.LI=new goog.dom.TagName("LI"),goog.dom.TagName.LINK=new goog.dom.TagName("LINK"),goog.dom.TagName.MAIN=new goog.dom.TagName("MAIN"),goog.dom.TagName.MAP=new goog.dom.TagName("MAP"),goog.dom.TagName.MARK=new goog.dom.TagName("MARK"),goog.dom.TagName.MATH=new goog.dom.TagName("MATH"),goog.dom.TagName.MENU=new goog.dom.TagName("MENU"),goog.dom.TagName.MENUITEM=new goog.dom.TagName("MENUITEM"),goog.dom.TagName.META=new goog.dom.TagName("META"),goog.dom.TagName.METER=new goog.dom.TagName("METER"),goog.dom.TagName.NAV=new goog.dom.TagName("NAV"),goog.dom.TagName.NOFRAMES=new goog.dom.TagName("NOFRAMES"),goog.dom.TagName.NOSCRIPT=new goog.dom.TagName("NOSCRIPT"),goog.dom.TagName.OBJECT=new goog.dom.TagName("OBJECT"),goog.dom.TagName.OL=new goog.dom.TagName("OL"),goog.dom.TagName.OPTGROUP=new goog.dom.TagName("OPTGROUP"),goog.dom.TagName.OPTION=new goog.dom.TagName("OPTION"),goog.dom.TagName.OUTPUT=new goog.dom.TagName("OUTPUT"),goog.dom.TagName.P=new goog.dom.TagName("P"),goog.dom.TagName.PARAM=new goog.dom.TagName("PARAM"),goog.dom.TagName.PICTURE=new goog.dom.TagName("PICTURE"),goog.dom.TagName.PRE=new goog.dom.TagName("PRE"),goog.dom.TagName.PROGRESS=new goog.dom.TagName("PROGRESS"),goog.dom.TagName.Q=new goog.dom.TagName("Q"),goog.dom.TagName.RP=new goog.dom.TagName("RP"),goog.dom.TagName.RT=new goog.dom.TagName("RT"),goog.dom.TagName.RTC=new goog.dom.TagName("RTC"),goog.dom.TagName.RUBY=new goog.dom.TagName("RUBY"),goog.dom.TagName.S=new goog.dom.TagName("S"),goog.dom.TagName.SAMP=new goog.dom.TagName("SAMP"),goog.dom.TagName.SCRIPT=new goog.dom.TagName("SCRIPT"),goog.dom.TagName.SECTION=new goog.dom.TagName("SECTION"),goog.dom.TagName.SELECT=new goog.dom.TagName("SELECT"),goog.dom.TagName.SMALL=new goog.dom.TagName("SMALL"),goog.dom.TagName.SOURCE=new goog.dom.TagName("SOURCE"),goog.dom.TagName.SPAN=new goog.dom.TagName("SPAN"),goog.dom.TagName.STRIKE=new goog.dom.TagName("STRIKE"),goog.dom.TagName.STRONG=new goog.dom.TagName("STRONG"),goog.dom.TagName.STYLE=new goog.dom.TagName("STYLE"),goog.dom.TagName.SUB=new goog.dom.TagName("SUB"),goog.dom.TagName.SUMMARY=new goog.dom.TagName("SUMMARY"),goog.dom.TagName.SUP=new goog.dom.TagName("SUP"),goog.dom.TagName.SVG=new goog.dom.TagName("SVG"),goog.dom.TagName.TABLE=new goog.dom.TagName("TABLE"),goog.dom.TagName.TBODY=new goog.dom.TagName("TBODY"),goog.dom.TagName.TD=new goog.dom.TagName("TD"),goog.dom.TagName.TEMPLATE=new goog.dom.TagName("TEMPLATE"),goog.dom.TagName.TEXTAREA=new goog.dom.TagName("TEXTAREA"),goog.dom.TagName.TFOOT=new goog.dom.TagName("TFOOT"),goog.dom.TagName.TH=new goog.dom.TagName("TH"),goog.dom.TagName.THEAD=new goog.dom.TagName("THEAD"),goog.dom.TagName.TIME=new goog.dom.TagName("TIME"),goog.dom.TagName.TITLE=new goog.dom.TagName("TITLE"),goog.dom.TagName.TR=new goog.dom.TagName("TR"),goog.dom.TagName.TRACK=new goog.dom.TagName("TRACK"),goog.dom.TagName.TT=new goog.dom.TagName("TT"),goog.dom.TagName.U=new goog.dom.TagName("U"),goog.dom.TagName.UL=new goog.dom.TagName("UL"),goog.dom.TagName.VAR=new goog.dom.TagName("VAR"),goog.dom.TagName.VIDEO=new goog.dom.TagName("VIDEO"),goog.dom.TagName.WBR=new goog.dom.TagName("WBR"),goog.labs={},goog.labs.userAgent={},goog.labs.userAgent.util={},goog.labs.userAgent.util.getNativeUserAgentString_=function(){var e=goog.labs.userAgent.util.getNavigator_();return e&&(e=e.userAgent)?e:""},goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator},goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_(),goog.labs.userAgent.util.setUserAgent=function(e){goog.labs.userAgent.util.userAgent_=e||goog.labs.userAgent.util.getNativeUserAgentString_()},goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_},goog.labs.userAgent.util.matchUserAgent=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.contains(t,e)},goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.caseInsensitiveContains(t,e)},goog.labs.userAgent.util.extractVersionTuples=function(e){for(var t,r=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,n=[];t=r.exec(e);)n.push([t[1],t[2],t[3]||void 0]);return n},goog.labs.userAgent.browser={},goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")},goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.browser.matchEdgeHtml_=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.browser.matchEdgeChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("Edg/")},goog.labs.userAgent.browser.matchOperaChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("OPR")},goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")||goog.labs.userAgent.util.matchUserAgent("FxiOS")},goog.labs.userAgent.browser.matchSafari_=function(){return goog.labs.userAgent.util.matchUserAgent("Safari")&&!(goog.labs.userAgent.browser.matchChrome_()||goog.labs.userAgent.browser.matchCoast_()||goog.labs.userAgent.browser.matchOpera_()||goog.labs.userAgent.browser.matchEdgeHtml_()||goog.labs.userAgent.browser.matchEdgeChromium_()||goog.labs.userAgent.browser.matchOperaChromium_()||goog.labs.userAgent.browser.matchFirefox_()||goog.labs.userAgent.browser.isSilk()||goog.labs.userAgent.util.matchUserAgent("Android"))},goog.labs.userAgent.browser.matchCoast_=function(){return goog.labs.userAgent.util.matchUserAgent("Coast")},goog.labs.userAgent.browser.matchIosWebview_=function(){return(goog.labs.userAgent.util.matchUserAgent("iPad")||goog.labs.userAgent.util.matchUserAgent("iPhone"))&&!goog.labs.userAgent.browser.matchSafari_()&&!goog.labs.userAgent.browser.matchChrome_()&&!goog.labs.userAgent.browser.matchCoast_()&&!goog.labs.userAgent.browser.matchFirefox_()&&goog.labs.userAgent.util.matchUserAgent("AppleWebKit")},goog.labs.userAgent.browser.matchChrome_=function(){return(goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS"))&&!goog.labs.userAgent.browser.matchEdgeHtml_()},goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return goog.labs.userAgent.util.matchUserAgent("Android")&&!(goog.labs.userAgent.browser.isChrome()||goog.labs.userAgent.browser.isFirefox()||goog.labs.userAgent.browser.isOpera()||goog.labs.userAgent.browser.isSilk())},goog.labs.userAgent.browser.isOpera=goog.labs.userAgent.browser.matchOpera_,goog.labs.userAgent.browser.isIE=goog.labs.userAgent.browser.matchIE_,goog.labs.userAgent.browser.isEdge=goog.labs.userAgent.browser.matchEdgeHtml_,goog.labs.userAgent.browser.isEdgeChromium=goog.labs.userAgent.browser.matchEdgeChromium_,goog.labs.userAgent.browser.isOperaChromium=goog.labs.userAgent.browser.matchOperaChromium_,goog.labs.userAgent.browser.isFirefox=goog.labs.userAgent.browser.matchFirefox_,goog.labs.userAgent.browser.isSafari=goog.labs.userAgent.browser.matchSafari_,goog.labs.userAgent.browser.isCoast=goog.labs.userAgent.browser.matchCoast_,goog.labs.userAgent.browser.isIosWebview=goog.labs.userAgent.browser.matchIosWebview_,goog.labs.userAgent.browser.isChrome=goog.labs.userAgent.browser.matchChrome_,goog.labs.userAgent.browser.isAndroidBrowser=goog.labs.userAgent.browser.matchAndroidBrowser_,goog.labs.userAgent.browser.isSilk=function(){return goog.labs.userAgent.util.matchUserAgent("Silk")},goog.labs.userAgent.browser.getVersion=function(){function e(i){return i=goog.array.find(i,n),r[i]||""}var t=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(t);t=goog.labs.userAgent.util.extractVersionTuples(t);var r={};goog.array.forEach(t,function(i){r[i[0]]=i[1]});var n=goog.partial(goog.object.containsKey,r);return goog.labs.userAgent.browser.isOpera()?e(["Version","Opera"]):goog.labs.userAgent.browser.isEdge()?e(["Edge"]):goog.labs.userAgent.browser.isEdgeChromium()?e(["Edg"]):goog.labs.userAgent.browser.isChrome()?e(["Chrome","CriOS"]):(t=t[2])&&t[1]||""},goog.labs.userAgent.browser.isVersionOrHigher=function(e){return 0<=goog.string.internal.compareVersions(goog.labs.userAgent.browser.getVersion(),e)},goog.labs.userAgent.browser.getIEVersion_=function(e){var t=/rv: *([\d\.]*)/.exec(e);if(t&&t[1])return t[1];t="";var r=/MSIE +([\d\.]+)/.exec(e);if(r&&r[1])if(e=/Trident\/(\d.\d)/.exec(e),r[1]=="7.0")if(e&&e[1])switch(e[1]){case"4.0":t="8.0";break;case"5.0":t="9.0";break;case"6.0":t="10.0";break;case"7.0":t="11.0"}else t="7.0";else t=r[1];return t},goog.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="",this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_,this.dir_=null},goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeHtml.prototype.getDirection=function(){return this.dir_},goog.html.SafeHtml.prototype.implementsGoogStringTypedString=!0,goog.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()},goog.DEBUG&&(goog.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"}),goog.html.SafeHtml.unwrap=function(e){return goog.html.SafeHtml.unwrapTrustedHTML(e).toString()},goog.html.SafeHtml.unwrapTrustedHTML=function(e){return e instanceof goog.html.SafeHtml&&e.constructor===goog.html.SafeHtml&&e.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeHtmlWrappedValue_:(goog.asserts.fail("expected object of type SafeHtml, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeHtml")},goog.html.SafeHtml.htmlEscape=function(e){if(e instanceof goog.html.SafeHtml)return e;var t=typeof e=="object",r=null;return t&&e.implementsGoogI18nBidiDirectionalString&&(r=e.getDirection()),e=t&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.htmlEscape(e),r)},goog.html.SafeHtml.htmlEscapePreservingNewlines=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.newLineToBr(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.whitespaceEscape(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.from=goog.html.SafeHtml.htmlEscape,goog.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/,goog.html.SafeHtml.URL_ATTRIBUTES_={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0},goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.html.SafeHtml.create=function(e,t,r){return goog.html.SafeHtml.verifyTagName(String(e)),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(e),t,r)},goog.html.SafeHtml.verifyTagName=function(e){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(e))throw Error("Invalid tag name <"+e+">.");if(e.toUpperCase()in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error("Tag name <"+e+"> is not allowed for SafeHtml.")},goog.html.SafeHtml.createIframe=function(e,t,r,n){e&&goog.html.TrustedResourceUrl.unwrap(e);var i={};return i.src=e||null,i.srcdoc=t&&goog.html.SafeHtml.unwrap(t),e=goog.html.SafeHtml.combineAttributes(i,{sandbox:""},r),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,n)},goog.html.SafeHtml.createSandboxIframe=function(e,t,r,n){if(!goog.html.SafeHtml.canUseSandboxIframe())throw Error("The browser does not support sandboxed iframes.");var i={};return i.src=e?goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)):null,i.srcdoc=t||null,i.sandbox="",e=goog.html.SafeHtml.combineAttributes(i,{},r),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,n)},goog.html.SafeHtml.canUseSandboxIframe=function(){return goog.global.HTMLIFrameElement&&"sandbox"in goog.global.HTMLIFrameElement.prototype},goog.html.SafeHtml.createScriptSrc=function(e,t){return goog.html.TrustedResourceUrl.unwrap(e),e=goog.html.SafeHtml.combineAttributes({src:e},{},t),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",e)},goog.html.SafeHtml.createScript=function(e,t){for(var r in t){var n=r.toLowerCase();if(n=="language"||n=="src"||n=="text"||n=="type")throw Error('Cannot set "'+n+'" attribute')}for(r="",e=goog.array.concat(e),n=0;n<e.length;n++)r+=goog.html.SafeScript.unwrap(e[n]);return e=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(r,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",t,e)},goog.html.SafeHtml.createStyle=function(e,t){t=goog.html.SafeHtml.combineAttributes({type:"text/css"},{},t);var r="";e=goog.array.concat(e);for(var n=0;n<e.length;n++)r+=goog.html.SafeStyleSheet.unwrap(e[n]);return e=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(r,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style",t,e)},goog.html.SafeHtml.createMetaRefresh=function(e,t){return e=goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)),(goog.labs.userAgent.browser.isIE()||goog.labs.userAgent.browser.isEdge())&&goog.string.internal.contains(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta",{"http-equiv":"refresh",content:(t||0)+"; url="+e})},goog.html.SafeHtml.getAttrNameAndValue_=function(e,t,r){if(r instanceof goog.string.Const)r=goog.string.Const.unwrap(r);else if(t.toLowerCase()=="style")r=goog.html.SafeHtml.getStyleValue_(r);else{if(/^on/i.test(t))throw Error('Attribute "'+t+'" requires goog.string.Const value, "'+r+'" given.');if(t.toLowerCase()in goog.html.SafeHtml.URL_ATTRIBUTES_)if(r instanceof goog.html.TrustedResourceUrl)r=goog.html.TrustedResourceUrl.unwrap(r);else if(r instanceof goog.html.SafeUrl)r=goog.html.SafeUrl.unwrap(r);else{if(!goog.isString(r))throw Error('Attribute "'+t+'" on tag "'+e+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+r+'" given.');r=goog.html.SafeUrl.sanitize(r).getTypedStringValue()}}return r.implementsGoogStringTypedString&&(r=r.getTypedStringValue()),goog.asserts.assert(goog.isString(r)||goog.isNumber(r),"String or number value expected, got "+typeof r+" with value: "+r),t+'="'+goog.string.internal.htmlEscape(String(r))+'"'},goog.html.SafeHtml.getStyleValue_=function(e){if(!goog.isObject(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof e+" given: "+e);return e instanceof goog.html.SafeStyle||(e=goog.html.SafeStyle.create(e)),goog.html.SafeStyle.unwrap(e)},goog.html.SafeHtml.createWithDir=function(e,t,r,n){return(t=goog.html.SafeHtml.create(t,r,n)).dir_=e,t},goog.html.SafeHtml.join=function(e,t){var r=(e=goog.html.SafeHtml.htmlEscape(e)).getDirection(),n=[],i=function(g){goog.isArray(g)?goog.array.forEach(g,i):(g=goog.html.SafeHtml.htmlEscape(g),n.push(goog.html.SafeHtml.unwrap(g)),g=g.getDirection(),r==goog.i18n.bidi.Dir.NEUTRAL?r=g:g!=goog.i18n.bidi.Dir.NEUTRAL&&r!=g&&(r=null))};return goog.array.forEach(t,i),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n.join(goog.html.SafeHtml.unwrap(e)),r)},goog.html.SafeHtml.concat=function(e){return goog.html.SafeHtml.join(goog.html.SafeHtml.EMPTY,Array.prototype.slice.call(arguments))},goog.html.SafeHtml.concatWithDir=function(e,t){var r=goog.html.SafeHtml.concat(goog.array.slice(arguments,1));return r.dir_=e,r},goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(e,t){return new goog.html.SafeHtml().initSecurityPrivateDoNotAccessOrElse_(e,t)},goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e,t){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createHTML(e):e,this.dir_=t,this},goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(e,t,r){var n=null,i="<"+e+goog.html.SafeHtml.stringifyAttributes(e,t);return goog.isDefAndNotNull(r)?goog.isArray(r)||(r=[r]):r=[],goog.dom.tags.isVoidTag(e.toLowerCase())?(goog.asserts.assert(!r.length,"Void tag <"+e+"> does not allow content."),i+=">"):(n=goog.html.SafeHtml.concat(r),i+=">"+goog.html.SafeHtml.unwrap(n)+"</"+e+">",n=n.getDirection()),(e=t&&t.dir)&&(n=/^(ltr|rtl|auto)$/i.test(e)?goog.i18n.bidi.Dir.NEUTRAL:null),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(i,n)},goog.html.SafeHtml.stringifyAttributes=function(e,t){var r="";if(t)for(var n in t){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(n))throw Error('Invalid attribute name "'+n+'".');var i=t[n];goog.isDefAndNotNull(i)&&(r+=" "+goog.html.SafeHtml.getAttrNameAndValue_(e,n,i))}return r},goog.html.SafeHtml.combineAttributes=function(e,t,r){var n,i={};for(n in e)goog.asserts.assert(n.toLowerCase()==n,"Must be lower case"),i[n]=e[n];for(n in t)goog.asserts.assert(n.toLowerCase()==n,"Must be lower case"),i[n]=t[n];for(n in r){var g=n.toLowerCase();if(g in e)throw Error('Cannot override "'+g+'" attribute, got "'+n+'" with value "'+r[n]+'"');g in t&&delete i[g],i[n]=r[n]}return i},goog.html.SafeHtml.DOCTYPE_HTML=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.EMPTY=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.BR=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.uncheckedconversions={},goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(e,t,r){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(t,r||null)},goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(t)},goog.dom.asserts={},goog.dom.asserts.assertIsLocation=function(e){if(goog.asserts.ENABLE_ASSERTS){var t=goog.dom.asserts.getWindow_(e);t&&(!e||!(e instanceof t.Location)&&e instanceof t.Element)&&goog.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s",goog.dom.asserts.debugStringForType_(e))}return e},goog.dom.asserts.assertIsElementType_=function(e,t){if(goog.asserts.ENABLE_ASSERTS){var r=goog.dom.asserts.getWindow_(e);r&&r[t]!==void 0&&(e&&(e instanceof r[t]||!(e instanceof r.Location||e instanceof r.Element))||goog.asserts.fail("Argument is not a %s (or a non-Element, non-Location mock); got: %s",t,goog.dom.asserts.debugStringForType_(e)))}return e},goog.dom.asserts.assertIsHTMLAnchorElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLAnchorElement")},goog.dom.asserts.assertIsHTMLButtonElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLButtonElement")},goog.dom.asserts.assertIsHTMLLinkElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLLinkElement")},goog.dom.asserts.assertIsHTMLImageElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLImageElement")},goog.dom.asserts.assertIsHTMLAudioElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLAudioElement")},goog.dom.asserts.assertIsHTMLVideoElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLVideoElement")},goog.dom.asserts.assertIsHTMLInputElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLInputElement")},goog.dom.asserts.assertIsHTMLTextAreaElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLTextAreaElement")},goog.dom.asserts.assertIsHTMLCanvasElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLCanvasElement")},goog.dom.asserts.assertIsHTMLEmbedElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLEmbedElement")},goog.dom.asserts.assertIsHTMLFormElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLFormElement")},goog.dom.asserts.assertIsHTMLFrameElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLFrameElement")},goog.dom.asserts.assertIsHTMLIFrameElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLIFrameElement")},goog.dom.asserts.assertIsHTMLObjectElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLObjectElement")},goog.dom.asserts.assertIsHTMLScriptElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLScriptElement")},goog.dom.asserts.debugStringForType_=function(e){if(!goog.isObject(e))return e===void 0?"undefined":e===null?"null":typeof e;try{return e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e)}catch{return"<object could not be stringified>"}},goog.dom.asserts.getWindow_=function(e){try{var t=e&&e.ownerDocument,r=t&&(t.defaultView||t.parentWindow);if((r=r||goog.global).Element&&r.Location)return r}catch{}return null},goog.functions={},goog.functions.constant=function(e){return function(){return e}},goog.functions.FALSE=function(){return!1},goog.functions.TRUE=function(){return!0},goog.functions.NULL=function(){return null},goog.functions.identity=function(e,t){return e},goog.functions.error=function(e){return function(){throw Error(e)}},goog.functions.fail=function(e){return function(){throw e}},goog.functions.lock=function(e,t){return t=t||0,function(){return e.apply(this,Array.prototype.slice.call(arguments,0,t))}},goog.functions.nth=function(e){return function(){return arguments[e]}},goog.functions.partialRight=function(e,t){var r=Array.prototype.slice.call(arguments,1);return function(){var n=Array.prototype.slice.call(arguments);return n.push.apply(n,r),e.apply(this,n)}},goog.functions.withReturnValue=function(e,t){return goog.functions.sequence(e,goog.functions.constant(t))},goog.functions.equalTo=function(e,t){return function(r){return t?e==r:e===r}},goog.functions.compose=function(e,t){var r=arguments,n=r.length;return function(){var i;n&&(i=r[n-1].apply(this,arguments));for(var g=n-2;0<=g;g--)i=r[g].call(this,i);return i}},goog.functions.sequence=function(e){var t=arguments,r=t.length;return function(){for(var n,i=0;i<r;i++)n=t[i].apply(this,arguments);return n}},goog.functions.and=function(e){var t=arguments,r=t.length;return function(){for(var n=0;n<r;n++)if(!t[n].apply(this,arguments))return!1;return!0}},goog.functions.or=function(e){var t=arguments,r=t.length;return function(){for(var n=0;n<r;n++)if(t[n].apply(this,arguments))return!0;return!1}},goog.functions.not=function(e){return function(){return!e.apply(this,arguments)}},goog.functions.create=function(e,t){var r=function(){};return r.prototype=e.prototype,r=new r,e.apply(r,Array.prototype.slice.call(arguments,1)),r},goog.functions.CACHE_RETURN_VALUE=!0,goog.functions.cacheReturnValue=function(e){var t,r=!1;return function(){return goog.functions.CACHE_RETURN_VALUE?(r||(t=e(),r=!0),t):e()}},goog.functions.once=function(e){var t=e;return function(){if(t){var r=t;t=null,r()}}},goog.functions.debounce=function(e,t,r){var n=0;return function(i){goog.global.clearTimeout(n);var g=arguments;n=goog.global.setTimeout(function(){e.apply(r,g)},t)}},goog.functions.throttle=function(e,t,r){var n=0,i=!1,g=[],s=function(){n=0,i&&(i=!1,o())},o=function(){n=goog.global.setTimeout(s,t),e.apply(r,g)};return function(u){g=arguments,n?i=!0:o()}},goog.functions.rateLimit=function(e,t,r){var n=0,i=function(){n=0};return function(g){n||(n=goog.global.setTimeout(i,t),e.apply(r,arguments))}},goog.dom.safe={},goog.dom.safe.InsertAdjacentHtmlPosition={AFTERBEGIN:"afterbegin",AFTEREND:"afterend",BEFOREBEGIN:"beforebegin",BEFOREEND:"beforeend"},goog.dom.safe.insertAdjacentHtml=function(e,t,r){e.insertAdjacentHTML(t,goog.html.SafeHtml.unwrapTrustedHTML(r))},goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.dom.safe.isInnerHtmlCleanupRecursive_=goog.functions.cacheReturnValue(function(){if(goog.DEBUG&&typeof document=="undefined")return!1;var e=document.createElement("div"),t=document.createElement("div");return t.appendChild(document.createElement("div")),e.appendChild(t),!(goog.DEBUG&&!e.firstChild)&&(t=e.firstChild.firstChild,e.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY),!t.parentElement)}),goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse=function(e,t){if(goog.dom.safe.isInnerHtmlCleanupRecursive_())for(;e.lastChild;)e.removeChild(e.lastChild);e.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setInnerHtml=function(e,t){if(goog.asserts.ENABLE_ASSERTS){var r=e.tagName.toUpperCase();if(goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[r])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+e.tagName+".")}goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(e,t)},goog.dom.safe.setOuterHtml=function(e,t){e.outerHTML=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setFormElementAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLFormElement(e).action=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setButtonFormAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLButtonElement(e).formAction=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setInputFormAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLInputElement(e).formAction=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setStyle=function(e,t){e.style.cssText=goog.html.SafeStyle.unwrap(t)},goog.dom.safe.documentWrite=function(e,t){e.write(goog.html.SafeHtml.unwrapTrustedHTML(t))},goog.dom.safe.setAnchorHref=function(e,t){goog.dom.asserts.assertIsHTMLAnchorElement(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.href=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setImageSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLImageElement(e),!(t instanceof goog.html.SafeUrl)){var r=/^data:image\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,r)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setAudioSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLAudioElement(e),!(t instanceof goog.html.SafeUrl)){var r=/^data:audio\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,r)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setVideoSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLVideoElement(e),!(t instanceof goog.html.SafeUrl)){var r=/^data:video\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,r)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setEmbedSrc=function(e,t){goog.dom.asserts.assertIsHTMLEmbedElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t)},goog.dom.safe.setFrameSrc=function(e,t){goog.dom.asserts.assertIsHTMLFrameElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)},goog.dom.safe.setIframeSrc=function(e,t){goog.dom.asserts.assertIsHTMLIFrameElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)},goog.dom.safe.setIframeSrcdoc=function(e,t){goog.dom.asserts.assertIsHTMLIFrameElement(e),e.srcdoc=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setLinkHrefAndRel=function(e,t,r){goog.dom.asserts.assertIsHTMLLinkElement(e),e.rel=r,goog.string.internal.caseInsensitiveContains(r,"stylesheet")?(goog.asserts.assert(t instanceof goog.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),e.href=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)):e.href=t instanceof goog.html.TrustedResourceUrl?goog.html.TrustedResourceUrl.unwrapTrustedURL(t):t instanceof goog.html.SafeUrl?goog.html.SafeUrl.unwrapTrustedURL(t):goog.html.SafeUrl.unwrapTrustedURL(goog.html.SafeUrl.sanitizeAssertUnchanged(t))},goog.dom.safe.setObjectData=function(e,t){goog.dom.asserts.assertIsHTMLObjectElement(e),e.data=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t)},goog.dom.safe.setScriptSrc=function(e,t){goog.dom.asserts.assertIsHTMLScriptElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t),(t=goog.getScriptNonce())&&e.setAttribute("nonce",t)},goog.dom.safe.setScriptContent=function(e,t){goog.dom.asserts.assertIsHTMLScriptElement(e),e.text=goog.html.SafeScript.unwrapTrustedScript(t),(t=goog.getScriptNonce())&&e.setAttribute("nonce",t)},goog.dom.safe.setLocationHref=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.href=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.assignLocation=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.assign(goog.html.SafeUrl.unwrapTrustedURL(t))},goog.dom.safe.replaceLocation=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.replace(goog.html.SafeUrl.unwrapTrustedURL(t))},goog.dom.safe.openInWindow=function(e,t,r,n,i){return e=e instanceof goog.html.SafeUrl?e:goog.html.SafeUrl.sanitizeAssertUnchanged(e),(t||goog.global).open(goog.html.SafeUrl.unwrapTrustedURL(e),r?goog.string.Const.unwrap(r):"",n,i)},goog.dom.safe.parseFromStringHtml=function(e,t){return goog.dom.safe.parseFromString(e,t,"text/html")},goog.dom.safe.parseFromString=function(e,t,r){return e.parseFromString(goog.html.SafeHtml.unwrapTrustedHTML(t),r)},goog.dom.safe.createImageFromBlob=function(e){if(!/^image\/.*/g.test(e.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var t=goog.global.URL.createObjectURL(e);return(e=new goog.global.Image).onload=function(){goog.global.URL.revokeObjectURL(t)},goog.dom.safe.setImageSrc(e,goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Image blob URL."),t)),e},goog.string.DETECT_DOUBLE_ESCAPING=!1,goog.string.FORCE_NON_DOM_HTML_UNESCAPING=!1,goog.string.Unicode={NBSP:"\xA0"},goog.string.startsWith=goog.string.internal.startsWith,goog.string.endsWith=goog.string.internal.endsWith,goog.string.caseInsensitiveStartsWith=goog.string.internal.caseInsensitiveStartsWith,goog.string.caseInsensitiveEndsWith=goog.string.internal.caseInsensitiveEndsWith,goog.string.caseInsensitiveEquals=goog.string.internal.caseInsensitiveEquals,goog.string.subs=function(e,t){for(var r=e.split("%s"),n="",i=Array.prototype.slice.call(arguments,1);i.length&&1<r.length;)n+=r.shift()+i.shift();return n+r.join("%s")},goog.string.collapseWhitespace=function(e){return e.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},goog.string.isEmptyOrWhitespace=goog.string.internal.isEmptyOrWhitespace,goog.string.isEmptyString=function(e){return e.length==0},goog.string.isEmpty=goog.string.isEmptyOrWhitespace,goog.string.isEmptyOrWhitespaceSafe=function(e){return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(e))},goog.string.isEmptySafe=goog.string.isEmptyOrWhitespaceSafe,goog.string.isBreakingWhitespace=function(e){return!/[^\t\n\r ]/.test(e)},goog.string.isAlpha=function(e){return!/[^a-zA-Z]/.test(e)},goog.string.isNumeric=function(e){return!/[^0-9]/.test(e)},goog.string.isAlphaNumeric=function(e){return!/[^a-zA-Z0-9]/.test(e)},goog.string.isSpace=function(e){return e==" "},goog.string.isUnicodeChar=function(e){return e.length==1&&" "<=e&&"~">=e||"\x80"<=e&&"\uFFFD">=e},goog.string.stripNewlines=function(e){return e.replace(/(\r\n|\r|\n)+/g," ")},goog.string.canonicalizeNewlines=function(e){return e.replace(/(\r\n|\r|\n)/g,`
34
+ `)},goog.string.normalizeWhitespace=function(e){return e.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(e){return e.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.string.internal.trim,goog.string.trimLeft=function(e){return e.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(e){return e.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=goog.string.internal.caseInsensitiveCompare,goog.string.numberAwareCompare_=function(e,t,r){if(e==t)return 0;if(!e)return-1;if(!t)return 1;for(var n=e.toLowerCase().match(r),i=t.toLowerCase().match(r),g=Math.min(n.length,i.length),s=0;s<g;s++){r=n[s];var o=i[s];if(r!=o)return e=parseInt(r,10),!isNaN(e)&&(t=parseInt(o,10),!isNaN(t)&&e-t)?e-t:r<o?-1:1}return n.length!=i.length?n.length-i.length:e<t?-1:1},goog.string.intAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\D+/g)},goog.string.floatAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\.\d+|\D+/g)},goog.string.numerateCompare=goog.string.floatAwareCompare,goog.string.urlEncode=function(e){return encodeURIComponent(String(e))},goog.string.urlDecode=function(e){return decodeURIComponent(e.replace(/\+/g," "))},goog.string.newLineToBr=goog.string.internal.newLineToBr,goog.string.htmlEscape=function(e,t){return e=goog.string.internal.htmlEscape(e,t),goog.string.DETECT_DOUBLE_ESCAPING&&(e=e.replace(goog.string.E_RE_,"&#101;")),e},goog.string.E_RE_=/e/g,goog.string.unescapeEntities=function(e){return goog.string.contains(e,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(e):goog.string.unescapePureXmlEntities_(e):e},goog.string.unescapeEntitiesWithDocument=function(e,t){return goog.string.contains(e,"&")?goog.string.unescapeEntitiesUsingDom_(e,t):e},goog.string.unescapeEntitiesUsingDom_=function(e,t){var r={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'},n=t?t.createElement("div"):goog.global.document.createElement("div");return e.replace(goog.string.HTML_ENTITY_PATTERN_,function(i,g){var s=r[i];return s||(g.charAt(0)=="#"&&(g=Number("0"+g.substr(1)),isNaN(g)||(s=String.fromCharCode(g))),s||(goog.dom.safe.setInnerHtml(n,goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Single HTML entity."),i+" ")),s=n.firstChild.nodeValue.slice(0,-1)),r[i]=s)})},goog.string.unescapePureXmlEntities_=function(e){return e.replace(/&([^;]+);/g,function(t,r){switch(r){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';default:return r.charAt(0)!="#"||(r=Number("0"+r.substr(1)),isNaN(r))?t:String.fromCharCode(r)}})},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(e,t){return goog.string.newLineToBr(e.replace(/ /g," &#160;"),t)},goog.string.preserveSpaces=function(e){return e.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(e,t){for(var r=t.length,n=0;n<r;n++){var i=r==1?t:t.charAt(n);if(e.charAt(0)==i&&e.charAt(e.length-1)==i)return e.substring(1,e.length-1)}return e},goog.string.truncate=function(e,t,r){return r&&(e=goog.string.unescapeEntities(e)),e.length>t&&(e=e.substring(0,t-3)+"..."),r&&(e=goog.string.htmlEscape(e)),e},goog.string.truncateMiddle=function(e,t,r,n){if(r&&(e=goog.string.unescapeEntities(e)),n&&e.length>t){n>t&&(n=t);var i=e.length-n;e=e.substring(0,t-n)+"..."+e.substring(i)}else e.length>t&&(n=Math.floor(t/2),i=e.length-n,e=e.substring(0,n+t%2)+"..."+e.substring(i));return r&&(e=goog.string.htmlEscape(e)),e},goog.string.specialEscapeChars_={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(e){e=String(e);for(var t=['"'],r=0;r<e.length;r++){var n=e.charAt(r),i=n.charCodeAt(0);t[r+1]=goog.string.specialEscapeChars_[n]||(31<i&&127>i?n:goog.string.escapeChar(n))}return t.push('"'),t.join("")},goog.string.escapeString=function(e){for(var t=[],r=0;r<e.length;r++)t[r]=goog.string.escapeChar(e.charAt(r));return t.join("")},goog.string.escapeChar=function(e){if(e in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[e];if(e in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[e]=goog.string.specialEscapeChars_[e];var t=e.charCodeAt(0);if(31<t&&127>t)var r=e;else 256>t?(r="\\x",(16>t||256<t)&&(r+="0")):(r="\\u",4096>t&&(r+="0")),r+=t.toString(16).toUpperCase();return goog.string.jsEscapeCache_[e]=r},goog.string.contains=goog.string.internal.contains,goog.string.caseInsensitiveContains=goog.string.internal.caseInsensitiveContains,goog.string.countOf=function(e,t){return e&&t?e.split(t).length-1:0},goog.string.removeAt=function(e,t,r){var n=e;return 0<=t&&t<e.length&&0<r&&(n=e.substr(0,t)+e.substr(t+r,e.length-t-r)),n},goog.string.remove=function(e,t){return e.replace(t,"")},goog.string.removeAll=function(e,t){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,"")},goog.string.replaceAll=function(e,t,r){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,r.replace(/\$/g,"$$$$"))},goog.string.regExpEscape=function(e){return String(e).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},goog.string.repeat=String.prototype.repeat?function(e,t){return e.repeat(t)}:function(e,t){return Array(t+1).join(e)},goog.string.padNumber=function(e,t,r){return(r=(e=goog.isDef(r)?e.toFixed(r):String(e)).indexOf("."))==-1&&(r=e.length),goog.string.repeat("0",Math.max(0,t-r))+e},goog.string.makeSafe=function(e){return e==null?"":String(e)},goog.string.buildString=function(e){return Array.prototype.join.call(arguments,"")},goog.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^goog.now()).toString(36)},goog.string.compareVersions=goog.string.internal.compareVersions,goog.string.hashCode=function(e){for(var t=0,r=0;r<e.length;++r)t=31*t+e.charCodeAt(r)>>>0;return t},goog.string.uniqueStringCounter_=2147483648*Math.random()|0,goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++},goog.string.toNumber=function(e){var t=Number(e);return t==0&&goog.string.isEmptyOrWhitespace(e)?NaN:t},goog.string.isLowerCamelCase=function(e){return/^[a-z]+([A-Z][a-z]*)*$/.test(e)},goog.string.isUpperCamelCase=function(e){return/^([A-Z][a-z]*)+$/.test(e)},goog.string.toCamelCase=function(e){return String(e).replace(/\-([a-z])/g,function(t,r){return r.toUpperCase()})},goog.string.toSelectorCase=function(e){return String(e).replace(/([A-Z])/g,"-$1").toLowerCase()},goog.string.toTitleCase=function(e,t){return t=goog.isString(t)?goog.string.regExpEscape(t):"\\s",e.replace(new RegExp("(^"+(t?"|["+t+"]+":"")+")([a-z])","g"),function(r,n,i){return n+i.toUpperCase()})},goog.string.capitalize=function(e){return String(e.charAt(0)).toUpperCase()+String(e.substr(1)).toLowerCase()},goog.string.parseInt=function(e){return isFinite(e)&&(e=String(e)),goog.isString(e)?/^\s*-?0x/i.test(e)?parseInt(e,16):parseInt(e,10):NaN},goog.string.splitLimit=function(e,t,r){e=e.split(t);for(var n=[];0<r&&e.length;)n.push(e.shift()),r--;return e.length&&n.push(e.join(t)),n},goog.string.lastComponent=function(e,t){if(!t)return e;typeof t=="string"&&(t=[t]);for(var r=-1,n=0;n<t.length;n++)if(t[n]!=""){var i=e.lastIndexOf(t[n]);i>r&&(r=i)}return r==-1?e:e.slice(r+1)},goog.string.editDistance=function(e,t){var r=[],n=[];if(e==t)return 0;if(!e.length||!t.length)return Math.max(e.length,t.length);for(var i=0;i<t.length+1;i++)r[i]=i;for(i=0;i<e.length;i++){n[0]=i+1;for(var g=0;g<t.length;g++)n[g+1]=Math.min(n[g]+1,r[g+1]+1,r[g]+Number(e[i]!=t[g]));for(g=0;g<r.length;g++)r[g]=n[g]}return n[t.length]},goog.labs.userAgent.platform={},goog.labs.userAgent.platform.isAndroid=function(){return goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.platform.isIpod=function(){return goog.labs.userAgent.util.matchUserAgent("iPod")},goog.labs.userAgent.platform.isIphone=function(){return goog.labs.userAgent.util.matchUserAgent("iPhone")&&!goog.labs.userAgent.util.matchUserAgent("iPod")&&!goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIpad=function(){return goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIos=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpad()||goog.labs.userAgent.platform.isIpod()},goog.labs.userAgent.platform.isMacintosh=function(){return goog.labs.userAgent.util.matchUserAgent("Macintosh")},goog.labs.userAgent.platform.isLinux=function(){return goog.labs.userAgent.util.matchUserAgent("Linux")},goog.labs.userAgent.platform.isWindows=function(){return goog.labs.userAgent.util.matchUserAgent("Windows")},goog.labs.userAgent.platform.isChromeOS=function(){return goog.labs.userAgent.util.matchUserAgent("CrOS")},goog.labs.userAgent.platform.isChromecast=function(){return goog.labs.userAgent.util.matchUserAgent("CrKey")},goog.labs.userAgent.platform.isKaiOS=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("KaiOS")},goog.labs.userAgent.platform.isGo2Phone=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("GAFP")},goog.labs.userAgent.platform.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent(),t="";return goog.labs.userAgent.platform.isWindows()?t=(e=(t=/Windows (?:NT|Phone) ([0-9.]+)/).exec(e))?e[1]:"0.0":goog.labs.userAgent.platform.isIos()?t=(e=(t=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/).exec(e))&&e[1].replace(/_/g,"."):goog.labs.userAgent.platform.isMacintosh()?t=(e=(t=/Mac OS X ([0-9_.]+)/).exec(e))?e[1].replace(/_/g,"."):"10":goog.labs.userAgent.platform.isKaiOS()?t=(e=(t=/(?:KaiOS)\/(\S+)/i).exec(e))&&e[1]:goog.labs.userAgent.platform.isAndroid()?t=(e=(t=/Android\s+([^\);]+)(\)|;)/).exec(e))&&e[1]:goog.labs.userAgent.platform.isChromeOS()&&(t=(e=(t=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/).exec(e))&&e[1]),t||""},goog.labs.userAgent.platform.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),e)},goog.reflect={},goog.reflect.object=function(e,t){return t},goog.reflect.objectProperty=function(e,t){return e},goog.reflect.sinkValue=function(e){return goog.reflect.sinkValue[" "](e),e},goog.reflect.sinkValue[" "]=goog.nullFunction,goog.reflect.canAccessProperty=function(e,t){try{return goog.reflect.sinkValue(e[t]),!0}catch{}return!1},goog.reflect.cache=function(e,t,r,n){return n=n?n(t):t,Object.prototype.hasOwnProperty.call(e,n)?e[n]:e[n]=r(t)},goog.labs.userAgent.engine={},goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")},goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.engine.isEdge=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent();if(e){e=goog.labs.userAgent.util.extractVersionTuples(e);var t,r=goog.labs.userAgent.engine.getEngineTuple_(e);if(r)return r[0]=="Gecko"?goog.labs.userAgent.engine.getVersionForKey_(e,"Firefox"):r[1];if((e=e[0])&&(t=e[2])&&(t=/Trident\/([^\s;]+)/.exec(t)))return t[1]}return""},goog.labs.userAgent.engine.getEngineTuple_=function(e){if(!goog.labs.userAgent.engine.isEdge())return e[1];for(var t=0;t<e.length;t++){var r=e[t];if(r[0]=="Edge")return r}},goog.labs.userAgent.engine.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(),e)},goog.labs.userAgent.engine.getVersionForKey_=function(e,t){return(e=goog.array.find(e,function(r){return t==r[0]}))&&e[1]||""},goog.userAgent={},goog.userAgent.ASSUME_IE=!1,goog.userAgent.ASSUME_EDGE=!1,goog.userAgent.ASSUME_GECKO=!1,goog.userAgent.ASSUME_WEBKIT=!1,goog.userAgent.ASSUME_MOBILE_WEBKIT=!1,goog.userAgent.ASSUME_OPERA=!1,goog.userAgent.ASSUME_ANY_VERSION=!1,goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA,goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()},goog.userAgent.getNavigatorTyped=function(){return goog.global.navigator||null},goog.userAgent.getNavigator=function(){return goog.userAgent.getNavigatorTyped()},goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera(),goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE(),goog.userAgent.EDGE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_EDGE:goog.labs.userAgent.engine.isEdge(),goog.userAgent.EDGE_OR_IE=goog.userAgent.EDGE||goog.userAgent.IE,goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko(),goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit(),goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")},goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_(),goog.userAgent.SAFARI=goog.userAgent.WEBKIT,goog.userAgent.determinePlatform_=function(){var e=goog.userAgent.getNavigatorTyped();return e&&e.platform||""},goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_(),goog.userAgent.ASSUME_MAC=!1,goog.userAgent.ASSUME_WINDOWS=!1,goog.userAgent.ASSUME_LINUX=!1,goog.userAgent.ASSUME_X11=!1,goog.userAgent.ASSUME_ANDROID=!1,goog.userAgent.ASSUME_IPHONE=!1,goog.userAgent.ASSUME_IPAD=!1,goog.userAgent.ASSUME_IPOD=!1,goog.userAgent.ASSUME_KAIOS=!1,goog.userAgent.ASSUME_GO2PHONE=!1,goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD,goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh(),goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows(),goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()},goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_(),goog.userAgent.isX11_=function(){var e=goog.userAgent.getNavigatorTyped();return!!e&&goog.string.contains(e.appVersion||"","X11")},goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_(),goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid(),goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone(),goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.IPOD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIpod(),goog.userAgent.IOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIos(),goog.userAgent.KAIOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_KAIOS:goog.labs.userAgent.platform.isKaiOS(),goog.userAgent.GO2PHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_GO2PHONE:goog.labs.userAgent.platform.isGo2Phone(),goog.userAgent.determineVersion_=function(){var e="",t=goog.userAgent.getVersionRegexResult_();return t&&(e=t?t[1]:""),goog.userAgent.IE&&(t=goog.userAgent.getDocumentMode_())!=null&&t>parseFloat(e)?String(t):e},goog.userAgent.getVersionRegexResult_=function(){var e=goog.userAgent.getUserAgentString();return goog.userAgent.GECKO?/rv:([^\);]+)(\)|;)/.exec(e):goog.userAgent.EDGE?/Edge\/([\d\.]+)/.exec(e):goog.userAgent.IE?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):goog.userAgent.WEBKIT?/WebKit\/(\S+)/.exec(e):goog.userAgent.OPERA?/(?:Version)[ \/]?(\S+)/.exec(e):void 0},goog.userAgent.getDocumentMode_=function(){var e=goog.global.document;return e?e.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(e,t){return goog.string.compareVersions(e,t)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(e){return goog.userAgent.ASSUME_ANY_VERSION||goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_,e,function(){return 0<=goog.string.compareVersions(goog.userAgent.VERSION,e)})},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(e){return Number(goog.userAgent.DOCUMENT_MODE)>=e},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=function(){if(goog.global.document&&goog.userAgent.IE)return goog.userAgent.getDocumentMode_()}(),goog.userAgent.product={},goog.userAgent.product.ASSUME_FIREFOX=!1,goog.userAgent.product.ASSUME_IPHONE=!1,goog.userAgent.product.ASSUME_IPAD=!1,goog.userAgent.product.ASSUME_ANDROID=!1,goog.userAgent.product.ASSUME_CHROME=!1,goog.userAgent.product.ASSUME_SAFARI=!1,goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_IPAD||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI,goog.userAgent.product.OPERA=goog.userAgent.OPERA,goog.userAgent.product.IE=goog.userAgent.IE,goog.userAgent.product.EDGE=goog.userAgent.EDGE,goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.labs.userAgent.browser.isFirefox(),goog.userAgent.product.isIphoneOrIpod_=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpod()},goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.isIphoneOrIpod_(),goog.userAgent.product.IPAD=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.labs.userAgent.browser.isAndroidBrowser(),goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.labs.userAgent.browser.isChrome(),goog.userAgent.product.isSafariDesktop_=function(){return goog.labs.userAgent.browser.isSafari()&&!goog.labs.userAgent.platform.isIos()},goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.isSafariDesktop_(),goog.crypt.base64={},goog.crypt.base64.DEFAULT_ALPHABET_COMMON_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",goog.crypt.base64.ENCODED_VALS=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"+/=",goog.crypt.base64.ENCODED_VALS_WEBSAFE=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"-_.",goog.crypt.base64.Alphabet={DEFAULT:0,NO_PADDING:1,WEBSAFE:2,WEBSAFE_DOT_PADDING:3,WEBSAFE_NO_PADDING:4},goog.crypt.base64.paddingChars_="=.",goog.crypt.base64.isPadding_=function(e){return goog.string.contains(goog.crypt.base64.paddingChars_,e)},goog.crypt.base64.byteToCharMaps_={},goog.crypt.base64.charToByteMap_=null,goog.crypt.base64.ASSUME_NATIVE_SUPPORT_=goog.userAgent.GECKO||goog.userAgent.WEBKIT&&!goog.userAgent.product.SAFARI||goog.userAgent.OPERA,goog.crypt.base64.HAS_NATIVE_ENCODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||typeof goog.global.btoa=="function",goog.crypt.base64.HAS_NATIVE_DECODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||!goog.userAgent.product.SAFARI&&!goog.userAgent.IE&&typeof goog.global.atob=="function",goog.crypt.base64.encodeByteArray=function(e,t){goog.asserts.assert(goog.isArrayLike(e),"encodeByteArray takes an array as a parameter"),t===void 0&&(t=goog.crypt.base64.Alphabet.DEFAULT),goog.crypt.base64.init_(),t=goog.crypt.base64.byteToCharMaps_[t];for(var r=[],n=0;n<e.length;n+=3){var i=e[n],g=n+1<e.length,s=g?e[n+1]:0,o=n+2<e.length,u=o?e[n+2]:0,l=i>>2;i=(3&i)<<4|s>>4,s=(15&s)<<2|u>>6,u&=63,o||(u=64,g||(s=64)),r.push(t[l],t[i],t[s]||"",t[u]||"")}return r.join("")},goog.crypt.base64.encodeString=function(e,t){return goog.crypt.base64.HAS_NATIVE_ENCODE_&&!t?goog.global.btoa(e):goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(e),t)},goog.crypt.base64.decodeString=function(e,t){if(goog.crypt.base64.HAS_NATIVE_DECODE_&&!t)return goog.global.atob(e);var r="";return goog.crypt.base64.decodeStringInternal_(e,function(n){r+=String.fromCharCode(n)}),r},goog.crypt.base64.decodeStringToByteArray=function(e,t){var r=[];return goog.crypt.base64.decodeStringInternal_(e,function(n){r.push(n)}),r},goog.crypt.base64.decodeStringToUint8Array=function(e){goog.asserts.assert(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10"),"Browser does not support typed arrays");var t=e.length,r=3*t/4;r%3?r=Math.floor(r):goog.crypt.base64.isPadding_(e[t-1])&&(r=goog.crypt.base64.isPadding_(e[t-2])?r-2:r-1);var n=new Uint8Array(r),i=0;return goog.crypt.base64.decodeStringInternal_(e,function(g){n[i++]=g}),n.subarray(0,i)},goog.crypt.base64.decodeStringInternal_=function(e,t){function r(u){for(;n<e.length;){var l=e.charAt(n++),m=goog.crypt.base64.charToByteMap_[l];if(m!=null)return m;if(!goog.string.isEmptyOrWhitespace(l))throw Error("Unknown base64 encoding at char: "+l)}return u}goog.crypt.base64.init_();for(var n=0;;){var i=r(-1),g=r(0),s=r(64),o=r(64);if(o===64&&i===-1)break;t(i<<2|g>>4),s!=64&&(t(g<<4&240|s>>2),o!=64&&t(s<<6&192|o))}},goog.crypt.base64.init_=function(){if(!goog.crypt.base64.charToByteMap_){goog.crypt.base64.charToByteMap_={};for(var e=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));goog.crypt.base64.byteToCharMaps_[r]=n;for(var i=0;i<n.length;i++){var g=n[i],s=goog.crypt.base64.charToByteMap_[g];s===void 0?goog.crypt.base64.charToByteMap_[g]=i:goog.asserts.assert(s===i)}}}},jspb.utils={},jspb.utils.split64Low=0,jspb.utils.split64High=0,jspb.utils.splitUint64=function(e){var t=e>>>0;e=Math.floor((e-t)/jspb.BinaryConstants.TWO_TO_32)>>>0,jspb.utils.split64Low=t,jspb.utils.split64High=e},jspb.utils.splitInt64=function(e){var t=0>e,r=(e=Math.abs(e))>>>0;e=Math.floor((e-r)/jspb.BinaryConstants.TWO_TO_32),e>>>=0,t&&(e=~e>>>0,4294967295<(r=1+(~r>>>0))&&(r=0,4294967295<++e&&(e=0))),jspb.utils.split64Low=r,jspb.utils.split64High=e},jspb.utils.splitZigzag64=function(e){var t=0>e;e=2*Math.abs(e),jspb.utils.splitUint64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;t&&(e==0?r==0?r=e=4294967295:(r--,e=4294967295):e--),jspb.utils.split64Low=e,jspb.utils.split64High=r},jspb.utils.splitFloat32=function(e){var t=0>e?1:0;if((e=t?-e:e)===0)0<1/e?(jspb.utils.split64High=0,jspb.utils.split64Low=0):(jspb.utils.split64High=0,jspb.utils.split64Low=2147483648);else if(isNaN(e))jspb.utils.split64High=0,jspb.utils.split64Low=2147483647;else if(e>jspb.BinaryConstants.FLOAT32_MAX)jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|2139095040)>>>0;else if(e<jspb.BinaryConstants.FLOAT32_MIN)e=Math.round(e/Math.pow(2,-149)),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|e)>>>0;else{var r=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-r),e=8388607&Math.round(e*jspb.BinaryConstants.TWO_TO_23),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|r+127<<23|e)>>>0}},jspb.utils.splitFloat64=function(e){var t=0>e?1:0;if((e=t?-e:e)===0)jspb.utils.split64High=0<1/e?0:2147483648,jspb.utils.split64Low=0;else if(isNaN(e))jspb.utils.split64High=2147483647,jspb.utils.split64Low=4294967295;else if(e>jspb.BinaryConstants.FLOAT64_MAX)jspb.utils.split64High=(t<<31|2146435072)>>>0,jspb.utils.split64Low=0;else if(e<jspb.BinaryConstants.FLOAT64_MIN){var r=e/Math.pow(2,-1074);e=r/jspb.BinaryConstants.TWO_TO_32,jspb.utils.split64High=(t<<31|e)>>>0,jspb.utils.split64Low=r>>>0}else{var n=0;if(2<=(r=e))for(;2<=r&&1023>n;)n++,r/=2;else for(;1>r&&-1022<n;)r*=2,n--;e=(r=e*Math.pow(2,-n))*jspb.BinaryConstants.TWO_TO_20&1048575,r=r*jspb.BinaryConstants.TWO_TO_52>>>0,jspb.utils.split64High=(t<<31|n+1023<<20|e)>>>0,jspb.utils.split64Low=r}},jspb.utils.splitHash64=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),g=e.charCodeAt(4),s=e.charCodeAt(5),o=e.charCodeAt(6);e=e.charCodeAt(7),jspb.utils.split64Low=t+(r<<8)+(n<<16)+(i<<24)>>>0,jspb.utils.split64High=g+(s<<8)+(o<<16)+(e<<24)>>>0},jspb.utils.joinUint64=function(e,t){return t*jspb.BinaryConstants.TWO_TO_32+(e>>>0)},jspb.utils.joinInt64=function(e,t){var r=2147483648&t;return r&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),e=jspb.utils.joinUint64(e,t),r?-e:e},jspb.utils.toZigzag64=function(e,t,r){var n=t>>31;return r(e<<1^n,(t<<1|e>>>31)^n)},jspb.utils.joinZigzag64=function(e,t){return jspb.utils.fromZigzag64(e,t,jspb.utils.joinInt64)},jspb.utils.fromZigzag64=function(e,t,r){var n=-(1&e);return r((e>>>1|t<<31)^n,t>>>1^n)},jspb.utils.joinFloat32=function(e,t){t=2*(e>>31)+1;var r=e>>>23&255;return e&=8388607,r==255?e?NaN:1/0*t:r==0?t*Math.pow(2,-149)*e:t*Math.pow(2,r-150)*(e+Math.pow(2,23))},jspb.utils.joinFloat64=function(e,t){var r=2*(t>>31)+1,n=t>>>20&2047;return e=jspb.BinaryConstants.TWO_TO_32*(1048575&t)+e,n==2047?e?NaN:1/0*r:n==0?r*Math.pow(2,-1074)*e:r*Math.pow(2,n-1075)*(e+jspb.BinaryConstants.TWO_TO_52)},jspb.utils.joinHash64=function(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)},jspb.utils.DIGITS="0123456789abcdef".split(""),jspb.utils.ZERO_CHAR_CODE_=48,jspb.utils.A_CHAR_CODE_=97,jspb.utils.joinUnsignedDecimalString=function(e,t){function r(i,g){return i=i?String(i):"",g?"0000000".slice(i.length)+i:i}if(2097151>=t)return""+(jspb.BinaryConstants.TWO_TO_32*t+e);var n=(e>>>24|t<<8)>>>0&16777215;return e=(16777215&e)+6777216*n+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,1e7<=e&&(n+=Math.floor(e/1e7),e%=1e7),1e7<=n&&(t+=Math.floor(n/1e7),n%=1e7),r(t,0)+r(n,t)+r(e,1)},jspb.utils.joinSignedDecimalString=function(e,t){var r=2147483648&t;return r&&(t=~t+((e=1+~e>>>0)==0?1:0)>>>0),e=jspb.utils.joinUnsignedDecimalString(e,t),r?"-"+e:e},jspb.utils.hash64ToDecimalString=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;return t?jspb.utils.joinSignedDecimalString(e,r):jspb.utils.joinUnsignedDecimalString(e,r)},jspb.utils.hash64ArrayToDecimalStrings=function(e,t){for(var r=Array(e.length),n=0;n<e.length;n++)r[n]=jspb.utils.hash64ToDecimalString(e[n],t);return r},jspb.utils.decimalStringToHash64=function(e){function t(g,s){for(var o=0;8>o&&(g!==1||0<s);o++)s=g*n[o]+s,n[o]=255&s,s>>>=8}goog.asserts.assert(0<e.length);var r=!1;e[0]==="-"&&(r=!0,e=e.slice(1));for(var n=[0,0,0,0,0,0,0,0],i=0;i<e.length;i++)t(10,e.charCodeAt(i)-jspb.utils.ZERO_CHAR_CODE_);return r&&(function(){for(var g=0;8>g;g++)n[g]=255&~n[g]}(),t(1,1)),goog.crypt.byteArrayToString(n)},jspb.utils.splitDecimalString=function(e){jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e))},jspb.utils.toHexDigit_=function(e){return String.fromCharCode(10>e?jspb.utils.ZERO_CHAR_CODE_+e:jspb.utils.A_CHAR_CODE_-10+e)},jspb.utils.fromHexCharCode_=function(e){return e>=jspb.utils.A_CHAR_CODE_?e-jspb.utils.A_CHAR_CODE_+10:e-jspb.utils.ZERO_CHAR_CODE_},jspb.utils.hash64ToHexString=function(e){var t=Array(18);t[0]="0",t[1]="x";for(var r=0;8>r;r++){var n=e.charCodeAt(7-r);t[2*r+2]=jspb.utils.toHexDigit_(n>>4),t[2*r+3]=jspb.utils.toHexDigit_(15&n)}return t.join("")},jspb.utils.hexStringToHash64=function(e){e=e.toLowerCase(),goog.asserts.assert(e.length==18),goog.asserts.assert(e[0]=="0"),goog.asserts.assert(e[1]=="x");for(var t="",r=0;8>r;r++){var n=jspb.utils.fromHexCharCode_(e.charCodeAt(2*r+2)),i=jspb.utils.fromHexCharCode_(e.charCodeAt(2*r+3));t=String.fromCharCode(16*n+i)+t}return t},jspb.utils.hash64ToNumber=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;return t?jspb.utils.joinInt64(e,r):jspb.utils.joinUint64(e,r)},jspb.utils.numberToHash64=function(e){return jspb.utils.splitInt64(e),jspb.utils.joinHash64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.utils.countVarints=function(e,t,r){for(var n=0,i=t;i<r;i++)n+=e[i]>>7;return r-t-n},jspb.utils.countVarintFields=function(e,t,r,n){var i=0;if(128>(n=8*n+jspb.BinaryConstants.WireType.VARINT))for(;t<r&&e[t++]==n;)for(i++;;){var g=e[t++];if((128&g)==0)break}else for(;t<r;){for(g=n;128<g;){if(e[t]!=(127&g|128))return i;t++,g>>=7}if(e[t++]!=g)break;for(i++;(128&(g=e[t++]))!=0;);}return i},jspb.utils.countFixedFields_=function(e,t,r,n,i){var g=0;if(128>n)for(;t<r&&e[t++]==n;)g++,t+=i;else for(;t<r;){for(var s=n;128<s;){if(e[t++]!=(127&s|128))return g;s>>=7}if(e[t++]!=s)break;g++,t+=i}return g},jspb.utils.countFixed32Fields=function(e,t,r,n){return jspb.utils.countFixedFields_(e,t,r,8*n+jspb.BinaryConstants.WireType.FIXED32,4)},jspb.utils.countFixed64Fields=function(e,t,r,n){return jspb.utils.countFixedFields_(e,t,r,8*n+jspb.BinaryConstants.WireType.FIXED64,8)},jspb.utils.countDelimitedFields=function(e,t,r,n){var i=0;for(n=8*n+jspb.BinaryConstants.WireType.DELIMITED;t<r;){for(var g=n;128<g;){if(e[t++]!=(127&g|128))return i;g>>=7}if(e[t++]!=g)break;i++;for(var s=0,o=1;s+=(127&(g=e[t++]))*o,o*=128,(128&g)!=0;);t+=s}return i},jspb.utils.debugBytesToTextFormat=function(e){var t='"';if(e){e=jspb.utils.byteSourceToUint8Array(e);for(var r=0;r<e.length;r++)t+="\\x",16>e[r]&&(t+="0"),t+=e[r].toString(16)}return t+'"'},jspb.utils.debugScalarToTextFormat=function(e){return typeof e=="string"?goog.string.quote(e):e.toString()},jspb.utils.stringToByteArray=function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++){var n=e.charCodeAt(r);if(255<n)throw Error("Conversion error: string contains codepoint outside of byte range");t[r]=n}return t},jspb.utils.byteSourceToUint8Array=function(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||Buffer!==void 0&&e.constructor===Buffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Type not convertible to Uint8Array."),new Uint8Array(0))},jspb.BinaryDecoder=function(e,t,r){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1,e&&this.setBlock(e,t,r)},jspb.BinaryDecoder.instanceCache_=[],jspb.BinaryDecoder.alloc=function(e,t,r){if(jspb.BinaryDecoder.instanceCache_.length){var n=jspb.BinaryDecoder.instanceCache_.pop();return e&&n.setBlock(e,t,r),n}return new jspb.BinaryDecoder(e,t,r)},jspb.BinaryDecoder.prototype.free=function(){this.clear(),100>jspb.BinaryDecoder.instanceCache_.length&&jspb.BinaryDecoder.instanceCache_.push(this)},jspb.BinaryDecoder.prototype.clone=function(){return jspb.BinaryDecoder.alloc(this.bytes_,this.start_,this.end_-this.start_)},jspb.BinaryDecoder.prototype.clear=function(){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1},jspb.BinaryDecoder.prototype.getBuffer=function(){return this.bytes_},jspb.BinaryDecoder.prototype.setBlock=function(e,t,r){this.bytes_=jspb.utils.byteSourceToUint8Array(e),this.start_=t!==void 0?t:0,this.end_=r!==void 0?this.start_+r:this.bytes_.length,this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getEnd=function(){return this.end_},jspb.BinaryDecoder.prototype.setEnd=function(e){this.end_=e},jspb.BinaryDecoder.prototype.reset=function(){this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getCursor=function(){return this.cursor_},jspb.BinaryDecoder.prototype.setCursor=function(e){this.cursor_=e},jspb.BinaryDecoder.prototype.advance=function(e){this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_)},jspb.BinaryDecoder.prototype.atEnd=function(){return this.cursor_==this.end_},jspb.BinaryDecoder.prototype.pastEnd=function(){return this.cursor_>this.end_},jspb.BinaryDecoder.prototype.getError=function(){return this.error_||0>this.cursor_||this.cursor_>this.end_},jspb.BinaryDecoder.prototype.readSplitVarint64=function(e){for(var t=128,r=0,n=0,i=0;4>i&&128<=t;i++)r|=(127&(t=this.bytes_[this.cursor_++]))<<7*i;if(128<=t&&(r|=(127&(t=this.bytes_[this.cursor_++]))<<28,n|=(127&t)>>4),128<=t)for(i=0;5>i&&128<=t;i++)n|=(127&(t=this.bytes_[this.cursor_++]))<<7*i+3;if(128>t)return e(r>>>0,n>>>0);goog.asserts.fail("Failed to read varint, encoding is invalid."),this.error_=!0},jspb.BinaryDecoder.prototype.readSplitZigzagVarint64=function(e){return this.readSplitVarint64(function(t,r){return jspb.utils.fromZigzag64(t,r,e)})},jspb.BinaryDecoder.prototype.readSplitFixed64=function(e){var t=this.bytes_,r=this.cursor_;this.cursor_+=8;for(var n=0,i=0,g=r+7;g>=r;g--)n=n<<8|t[g],i=i<<8|t[g+4];return e(n,i)},jspb.BinaryDecoder.prototype.skipVarint=function(){for(;128&this.bytes_[this.cursor_];)this.cursor_++;this.cursor_++},jspb.BinaryDecoder.prototype.unskipVarint=function(e){for(;128<e;)this.cursor_--,e>>>=7;this.cursor_--},jspb.BinaryDecoder.prototype.readUnsignedVarint32=function(){var e=this.bytes_,t=e[this.cursor_+0],r=127&t;return 128>t?(this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+1]))<<7,128>t?(this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+2]))<<14,128>t?(this.cursor_+=3,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+3]))<<21,128>t?(this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(15&(t=e[this.cursor_+4]))<<28,128>t?(this.cursor_+=5,goog.asserts.assert(this.cursor_<=this.end_),r>>>0):(this.cursor_+=5,128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&goog.asserts.assert(!1),goog.asserts.assert(this.cursor_<=this.end_),r)))))},jspb.BinaryDecoder.prototype.readSignedVarint32=jspb.BinaryDecoder.prototype.readUnsignedVarint32,jspb.BinaryDecoder.prototype.readUnsignedVarint32String=function(){return this.readUnsignedVarint32().toString()},jspb.BinaryDecoder.prototype.readSignedVarint32String=function(){return this.readSignedVarint32().toString()},jspb.BinaryDecoder.prototype.readZigzagVarint32=function(){var e=this.readUnsignedVarint32();return e>>>1^-(1&e)},jspb.BinaryDecoder.prototype.readUnsignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinUint64)},jspb.BinaryDecoder.prototype.readUnsignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinUnsignedDecimalString)},jspb.BinaryDecoder.prototype.readSignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinInt64)},jspb.BinaryDecoder.prototype.readSignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readZigzagVarint64=function(){return this.readSplitVarint64(jspb.utils.joinZigzag64)},jspb.BinaryDecoder.prototype.readZigzagVarintHash64=function(){return this.readSplitZigzagVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readZigzagVarint64String=function(){return this.readSplitZigzagVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readUint8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e},jspb.BinaryDecoder.prototype.readUint16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8},jspb.BinaryDecoder.prototype.readUint32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],n=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8|r<<16|n<<24)>>>0},jspb.BinaryDecoder.prototype.readUint64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUint64(e,t)},jspb.BinaryDecoder.prototype.readUint64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUnsignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readInt8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e<<24>>24},jspb.BinaryDecoder.prototype.readInt16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8)<<16>>16},jspb.BinaryDecoder.prototype.readInt32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],n=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8|r<<16|n<<24},jspb.BinaryDecoder.prototype.readInt64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinInt64(e,t)},jspb.BinaryDecoder.prototype.readInt64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinSignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readFloat=function(){var e=this.readUint32();return jspb.utils.joinFloat32(e,0)},jspb.BinaryDecoder.prototype.readDouble=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinFloat64(e,t)},jspb.BinaryDecoder.prototype.readBool=function(){return!!this.bytes_[this.cursor_++]},jspb.BinaryDecoder.prototype.readEnum=function(){return this.readSignedVarint32()},jspb.BinaryDecoder.prototype.readString=function(e){var t=this.bytes_,r=this.cursor_;e=r+e;for(var n=[],i="";r<e;){var g=t[r++];if(128>g)n.push(g);else{if(192>g)continue;if(224>g){var s=t[r++];n.push((31&g)<<6|63&s)}else if(240>g){s=t[r++];var o=t[r++];n.push((15&g)<<12|(63&s)<<6|63&o)}else 248>g&&(g=(7&g)<<18|(63&(s=t[r++]))<<12|(63&(o=t[r++]))<<6|63&t[r++],g-=65536,n.push(55296+(g>>10&1023),56320+(1023&g)))}8192<=n.length&&(i+=String.fromCharCode.apply(null,n),n.length=0)}return i+=goog.crypt.byteArrayToString(n),this.cursor_=r,i},jspb.BinaryDecoder.prototype.readStringWithLength=function(){var e=this.readUnsignedVarint32();return this.readString(e)},jspb.BinaryDecoder.prototype.readBytes=function(e){if(0>e||this.cursor_+e>this.bytes_.length)return this.error_=!0,goog.asserts.fail("Invalid byte length!"),new Uint8Array(0);var t=this.bytes_.subarray(this.cursor_,this.cursor_+e);return this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_),t},jspb.BinaryDecoder.prototype.readVarintHash64=function(){return this.readSplitVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readFixedHash64=function(){var e=this.bytes_,t=this.cursor_,r=e[t+0],n=e[t+1],i=e[t+2],g=e[t+3],s=e[t+4],o=e[t+5],u=e[t+6];return e=e[t+7],this.cursor_+=8,String.fromCharCode(r,n,i,g,s,o,u,e)},jspb.BinaryReader=function(e,t,r){this.decoder_=jspb.BinaryDecoder.alloc(e,t,r),this.fieldCursor_=this.decoder_.getCursor(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null},jspb.BinaryReader.instanceCache_=[],jspb.BinaryReader.alloc=function(e,t,r){if(jspb.BinaryReader.instanceCache_.length){var n=jspb.BinaryReader.instanceCache_.pop();return e&&n.decoder_.setBlock(e,t,r),n}return new jspb.BinaryReader(e,t,r)},jspb.BinaryReader.prototype.alloc=jspb.BinaryReader.alloc,jspb.BinaryReader.prototype.free=function(){this.decoder_.clear(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null,100>jspb.BinaryReader.instanceCache_.length&&jspb.BinaryReader.instanceCache_.push(this)},jspb.BinaryReader.prototype.getFieldCursor=function(){return this.fieldCursor_},jspb.BinaryReader.prototype.getCursor=function(){return this.decoder_.getCursor()},jspb.BinaryReader.prototype.getBuffer=function(){return this.decoder_.getBuffer()},jspb.BinaryReader.prototype.getFieldNumber=function(){return this.nextField_},jspb.BinaryReader.prototype.getWireType=function(){return this.nextWireType_},jspb.BinaryReader.prototype.isDelimited=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED},jspb.BinaryReader.prototype.isEndGroup=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP},jspb.BinaryReader.prototype.getError=function(){return this.error_||this.decoder_.getError()},jspb.BinaryReader.prototype.setBlock=function(e,t,r){this.decoder_.setBlock(e,t,r),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.reset=function(){this.decoder_.reset(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.advance=function(e){this.decoder_.advance(e)},jspb.BinaryReader.prototype.nextField=function(){if(this.decoder_.atEnd())return!1;if(this.getError())return goog.asserts.fail("Decoder hit an error"),!1;this.fieldCursor_=this.decoder_.getCursor();var e=this.decoder_.readUnsignedVarint32(),t=e>>>3;return(e&=7)!=jspb.BinaryConstants.WireType.VARINT&&e!=jspb.BinaryConstants.WireType.FIXED32&&e!=jspb.BinaryConstants.WireType.FIXED64&&e!=jspb.BinaryConstants.WireType.DELIMITED&&e!=jspb.BinaryConstants.WireType.START_GROUP&&e!=jspb.BinaryConstants.WireType.END_GROUP?(goog.asserts.fail("Invalid wire type: %s (at position %s)",e,this.fieldCursor_),this.error_=!0,!1):(this.nextField_=t,this.nextWireType_=e,!0)},jspb.BinaryReader.prototype.unskipHeader=function(){this.decoder_.unskipVarint(this.nextField_<<3|this.nextWireType_)},jspb.BinaryReader.prototype.skipMatchingFields=function(){var e=this.nextField_;for(this.unskipHeader();this.nextField()&&this.getFieldNumber()==e;)this.skipField();this.decoder_.atEnd()||this.unskipHeader()},jspb.BinaryReader.prototype.skipVarintField=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.VARINT?(goog.asserts.fail("Invalid wire type for skipVarintField"),this.skipField()):this.decoder_.skipVarint()},jspb.BinaryReader.prototype.skipDelimitedField=function(){if(this.nextWireType_!=jspb.BinaryConstants.WireType.DELIMITED)goog.asserts.fail("Invalid wire type for skipDelimitedField"),this.skipField();else{var e=this.decoder_.readUnsignedVarint32();this.decoder_.advance(e)}},jspb.BinaryReader.prototype.skipFixed32Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED32?(goog.asserts.fail("Invalid wire type for skipFixed32Field"),this.skipField()):this.decoder_.advance(4)},jspb.BinaryReader.prototype.skipFixed64Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED64?(goog.asserts.fail("Invalid wire type for skipFixed64Field"),this.skipField()):this.decoder_.advance(8)},jspb.BinaryReader.prototype.skipGroup=function(){for(var e=this.nextField_;;){if(!this.nextField()){goog.asserts.fail("Unmatched start-group tag: stream EOF"),this.error_=!0;break}if(this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP){this.nextField_!=e&&(goog.asserts.fail("Unmatched end-group tag"),this.error_=!0);break}this.skipField()}},jspb.BinaryReader.prototype.skipField=function(){switch(this.nextWireType_){case jspb.BinaryConstants.WireType.VARINT:this.skipVarintField();break;case jspb.BinaryConstants.WireType.FIXED64:this.skipFixed64Field();break;case jspb.BinaryConstants.WireType.DELIMITED:this.skipDelimitedField();break;case jspb.BinaryConstants.WireType.FIXED32:this.skipFixed32Field();break;case jspb.BinaryConstants.WireType.START_GROUP:this.skipGroup();break;default:goog.asserts.fail("Invalid wire encoding for field.")}},jspb.BinaryReader.prototype.registerReadCallback=function(e,t){this.readCallbacks_===null&&(this.readCallbacks_={}),goog.asserts.assert(!this.readCallbacks_[e]),this.readCallbacks_[e]=t},jspb.BinaryReader.prototype.runReadCallback=function(e){return goog.asserts.assert(this.readCallbacks_!==null),e=this.readCallbacks_[e],goog.asserts.assert(e),e(this)},jspb.BinaryReader.prototype.readAny=function(e){this.nextWireType_=jspb.BinaryConstants.FieldTypeToWireType(e);var t=jspb.BinaryConstants.FieldType;switch(e){case t.DOUBLE:return this.readDouble();case t.FLOAT:return this.readFloat();case t.INT64:return this.readInt64();case t.UINT64:return this.readUint64();case t.INT32:return this.readInt32();case t.FIXED64:return this.readFixed64();case t.FIXED32:return this.readFixed32();case t.BOOL:return this.readBool();case t.STRING:return this.readString();case t.GROUP:goog.asserts.fail("Group field type not supported in readAny()");case t.MESSAGE:goog.asserts.fail("Message field type not supported in readAny()");case t.BYTES:return this.readBytes();case t.UINT32:return this.readUint32();case t.ENUM:return this.readEnum();case t.SFIXED32:return this.readSfixed32();case t.SFIXED64:return this.readSfixed64();case t.SINT32:return this.readSint32();case t.SINT64:return this.readSint64();case t.FHASH64:return this.readFixedHash64();case t.VHASH64:return this.readVarintHash64();default:goog.asserts.fail("Invalid field type in readAny()")}return 0},jspb.BinaryReader.prototype.readMessage=function(e,t){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var r=this.decoder_.getEnd(),n=this.decoder_.readUnsignedVarint32();n=this.decoder_.getCursor()+n,this.decoder_.setEnd(n),t(e,this),this.decoder_.setCursor(n),this.decoder_.setEnd(r)},jspb.BinaryReader.prototype.readGroup=function(e,t,r){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP),goog.asserts.assert(this.nextField_==e),r(t,this),this.error_||this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP||(goog.asserts.fail("Group submessage did not end with an END_GROUP tag"),this.error_=!0)},jspb.BinaryReader.prototype.getFieldDecoder=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32(),t=this.decoder_.getCursor(),r=t+e;return e=jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(),t,e),this.decoder_.setCursor(r),e},jspb.BinaryReader.prototype.readInt32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32()},jspb.BinaryReader.prototype.readInt32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32String()},jspb.BinaryReader.prototype.readInt64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readInt64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64String()},jspb.BinaryReader.prototype.readUint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readUint32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32String()},jspb.BinaryReader.prototype.readUint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64()},jspb.BinaryReader.prototype.readUint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64String()},jspb.BinaryReader.prototype.readSint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint32()},jspb.BinaryReader.prototype.readSint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64()},jspb.BinaryReader.prototype.readSint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64String()},jspb.BinaryReader.prototype.readFixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readUint32()},jspb.BinaryReader.prototype.readFixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64()},jspb.BinaryReader.prototype.readFixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64String()},jspb.BinaryReader.prototype.readSfixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32()},jspb.BinaryReader.prototype.readSfixed32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32().toString()},jspb.BinaryReader.prototype.readSfixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64()},jspb.BinaryReader.prototype.readSfixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64String()},jspb.BinaryReader.prototype.readFloat=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readFloat()},jspb.BinaryReader.prototype.readDouble=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readDouble()},jspb.BinaryReader.prototype.readBool=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),!!this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readEnum=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readString=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readString(e)},jspb.BinaryReader.prototype.readBytes=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readBytes(e)},jspb.BinaryReader.prototype.readVarintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readVarintHash64()},jspb.BinaryReader.prototype.readSintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarintHash64()},jspb.BinaryReader.prototype.readSplitVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(e)},jspb.BinaryReader.prototype.readSplitZigzagVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(function(t,r){return jspb.utils.fromZigzag64(t,r,e)})},jspb.BinaryReader.prototype.readFixedHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readFixedHash64()},jspb.BinaryReader.prototype.readSplitFixed64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readSplitFixed64(e)},jspb.BinaryReader.prototype.readPackedField_=function(e){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var t=this.decoder_.readUnsignedVarint32();t=this.decoder_.getCursor()+t;for(var r=[];this.decoder_.getCursor()<t;)r.push(e.call(this.decoder_));return r},jspb.BinaryReader.prototype.readPackedInt32=function(){return this.readPackedField_(this.decoder_.readSignedVarint32)},jspb.BinaryReader.prototype.readPackedInt32String=function(){return this.readPackedField_(this.decoder_.readSignedVarint32String)},jspb.BinaryReader.prototype.readPackedInt64=function(){return this.readPackedField_(this.decoder_.readSignedVarint64)},jspb.BinaryReader.prototype.readPackedInt64String=function(){return this.readPackedField_(this.decoder_.readSignedVarint64String)},jspb.BinaryReader.prototype.readPackedUint32=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32)},jspb.BinaryReader.prototype.readPackedUint32String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32String)},jspb.BinaryReader.prototype.readPackedUint64=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64)},jspb.BinaryReader.prototype.readPackedUint64String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64String)},jspb.BinaryReader.prototype.readPackedSint32=function(){return this.readPackedField_(this.decoder_.readZigzagVarint32)},jspb.BinaryReader.prototype.readPackedSint64=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64)},jspb.BinaryReader.prototype.readPackedSint64String=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64String)},jspb.BinaryReader.prototype.readPackedFixed32=function(){return this.readPackedField_(this.decoder_.readUint32)},jspb.BinaryReader.prototype.readPackedFixed64=function(){return this.readPackedField_(this.decoder_.readUint64)},jspb.BinaryReader.prototype.readPackedFixed64String=function(){return this.readPackedField_(this.decoder_.readUint64String)},jspb.BinaryReader.prototype.readPackedSfixed32=function(){return this.readPackedField_(this.decoder_.readInt32)},jspb.BinaryReader.prototype.readPackedSfixed64=function(){return this.readPackedField_(this.decoder_.readInt64)},jspb.BinaryReader.prototype.readPackedSfixed64String=function(){return this.readPackedField_(this.decoder_.readInt64String)},jspb.BinaryReader.prototype.readPackedFloat=function(){return this.readPackedField_(this.decoder_.readFloat)},jspb.BinaryReader.prototype.readPackedDouble=function(){return this.readPackedField_(this.decoder_.readDouble)},jspb.BinaryReader.prototype.readPackedBool=function(){return this.readPackedField_(this.decoder_.readBool)},jspb.BinaryReader.prototype.readPackedEnum=function(){return this.readPackedField_(this.decoder_.readEnum)},jspb.BinaryReader.prototype.readPackedVarintHash64=function(){return this.readPackedField_(this.decoder_.readVarintHash64)},jspb.BinaryReader.prototype.readPackedFixedHash64=function(){return this.readPackedField_(this.decoder_.readFixedHash64)},jspb.Map=function(e,t){this.arr_=e,this.valueCtor_=t,this.map_={},this.arrClean=!0,0<this.arr_.length&&this.loadFromArray_()},jspb.Map.prototype.loadFromArray_=function(){for(var e=0;e<this.arr_.length;e++){var t=this.arr_[e],r=t[0];this.map_[r.toString()]=new jspb.Map.Entry_(r,t[1])}this.arrClean=!0},jspb.Map.prototype.toArray=function(){if(this.arrClean){if(this.valueCtor_){var e,t=this.map_;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=t[e].valueWrapper;r&&r.toArray()}}}else{for(this.arr_.length=0,(t=this.stringKeys_()).sort(),e=0;e<t.length;e++){var n=this.map_[t[e]];(r=n.valueWrapper)&&r.toArray(),this.arr_.push([n.key,n.value])}this.arrClean=!0}return this.arr_},jspb.Map.prototype.toObject=function(e,t){for(var r=this.toArray(),n=[],i=0;i<r.length;i++){var g=this.map_[r[i][0].toString()];this.wrapEntry_(g);var s=g.valueWrapper;s?(goog.asserts.assert(t),n.push([g.key,t(e,s)])):n.push([g.key,g.value])}return n},jspb.Map.fromObject=function(e,t,r){t=new jspb.Map([],t);for(var n=0;n<e.length;n++){var i=e[n][0],g=r(e[n][1]);t.set(i,g)}return t},jspb.Map.ArrayIteratorIterable_=function(e){this.idx_=0,this.arr_=e},jspb.Map.ArrayIteratorIterable_.prototype.next=function(){return this.idx_<this.arr_.length?{done:!1,value:this.arr_[this.idx_++]}:{done:!0,value:void 0}},typeof Symbol!="undefined"&&(jspb.Map.ArrayIteratorIterable_.prototype[Symbol.iterator]=function(){return this}),jspb.Map.prototype.getLength=function(){return this.stringKeys_().length},jspb.Map.prototype.clear=function(){this.map_={},this.arrClean=!1},jspb.Map.prototype.del=function(e){e=e.toString();var t=this.map_.hasOwnProperty(e);return delete this.map_[e],this.arrClean=!1,t},jspb.Map.prototype.getEntryList=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++){var n=this.map_[t[r]];e.push([n.key,n.value])}return e},jspb.Map.prototype.entries=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++){var n=this.map_[t[r]];e.push([n.key,this.wrapEntry_(n)])}return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.keys=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++)e.push(this.map_[t[r]].key);return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.values=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++)e.push(this.wrapEntry_(this.map_[t[r]]));return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.forEach=function(e,t){var r=this.stringKeys_();r.sort();for(var n=0;n<r.length;n++){var i=this.map_[r[n]];e.call(t,this.wrapEntry_(i),i.key,this)}},jspb.Map.prototype.set=function(e,t){var r=new jspb.Map.Entry_(e);return this.valueCtor_?(r.valueWrapper=t,r.value=t.toArray()):r.value=t,this.map_[e.toString()]=r,this.arrClean=!1,this},jspb.Map.prototype.wrapEntry_=function(e){return this.valueCtor_?(e.valueWrapper||(e.valueWrapper=new this.valueCtor_(e.value)),e.valueWrapper):e.value},jspb.Map.prototype.get=function(e){if(e=this.map_[e.toString()])return this.wrapEntry_(e)},jspb.Map.prototype.has=function(e){return e.toString()in this.map_},jspb.Map.prototype.serializeBinary=function(e,t,r,n,i){var g=this.stringKeys_();g.sort();for(var s=0;s<g.length;s++){var o=this.map_[g[s]];t.beginSubMessage(e),r.call(t,1,o.key),this.valueCtor_?n.call(t,2,this.wrapEntry_(o),i):n.call(t,2,o.value),t.endSubMessage()}},jspb.Map.deserializeBinary=function(e,t,r,n,i,g,s){for(;t.nextField()&&!t.isEndGroup();){var o=t.getFieldNumber();o==1?g=r.call(t):o==2&&(e.valueCtor_?(goog.asserts.assert(i),s||(s=new e.valueCtor_),n.call(t,s,i)):s=n.call(t))}goog.asserts.assert(g!=null),goog.asserts.assert(s!=null),e.set(g,s)},jspb.Map.prototype.stringKeys_=function(){var e,t=this.map_,r=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.push(e);return r},jspb.Map.Entry_=function(e,t){this.key=e,this.value=t,this.valueWrapper=void 0},jspb.ExtensionFieldInfo=function(e,t,r,n,i){this.fieldIndex=e,this.fieldName=t,this.ctor=r,this.toObjectFn=n,this.isRepeated=i},jspb.ExtensionFieldBinaryInfo=function(e,t,r,n,i,g){this.fieldInfo=e,this.binaryReaderFn=t,this.binaryWriterFn=r,this.binaryMessageSerializeFn=n,this.binaryMessageDeserializeFn=i,this.isPacked=g},jspb.ExtensionFieldInfo.prototype.isMessageType=function(){return!!this.ctor},jspb.Message=function(){},jspb.Message.GENERATE_TO_OBJECT=!0,jspb.Message.GENERATE_FROM_OBJECT=!goog.DISALLOW_TEST_ONLY_CODE,jspb.Message.GENERATE_TO_STRING=!0,jspb.Message.ASSUME_LOCAL_ARRAYS=!1,jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=!0,jspb.Message.SUPPORTS_UINT8ARRAY_=typeof Uint8Array=="function",jspb.Message.prototype.getJsPbMessageId=function(){return this.messageId_},jspb.Message.getIndex_=function(e,t){return t+e.arrayIndexOffset_},jspb.Message.hiddenES6Property_=function(){},jspb.Message.getFieldNumber_=function(e,t){return t-e.arrayIndexOffset_},jspb.Message.initialize=function(e,t,r,n,i,g){if(e.wrappers_=null,t||(t=r?[r]:[]),e.messageId_=r?String(r):void 0,e.arrayIndexOffset_=r===0?-1:0,e.array=t,jspb.Message.initPivotAndExtensionObject_(e,n),e.convertedPrimitiveFields_={},jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS||(e.repeatedFields=i),i)for(t=0;t<i.length;t++)(r=i[t])<e.pivot_?(r=jspb.Message.getIndex_(e,r),e.array[r]=e.array[r]||jspb.Message.EMPTY_LIST_SENTINEL_):(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[r]=e.extensionObject_[r]||jspb.Message.EMPTY_LIST_SENTINEL_);if(g&&g.length)for(t=0;t<g.length;t++)jspb.Message.computeOneofCase(e,g[t])},jspb.Message.EMPTY_LIST_SENTINEL_=goog.DEBUG&&Object.freeze?Object.freeze([]):[],jspb.Message.isArray_=function(e){return jspb.Message.ASSUME_LOCAL_ARRAYS?e instanceof Array:Array.isArray(e)},jspb.Message.isExtensionObject_=function(e){return!(e===null||typeof e!="object"||jspb.Message.isArray_(e)||jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)},jspb.Message.initPivotAndExtensionObject_=function(e,t){var r=e.array.length,n=-1;if(r&&(n=r-1,r=e.array[n],jspb.Message.isExtensionObject_(r)))return e.pivot_=jspb.Message.getFieldNumber_(e,n),void(e.extensionObject_=r);-1<t?(e.pivot_=Math.max(t,jspb.Message.getFieldNumber_(e,n+1)),e.extensionObject_=null):e.pivot_=Number.MAX_VALUE},jspb.Message.maybeInitEmptyExtensionObject_=function(e){var t=jspb.Message.getIndex_(e,e.pivot_);e.array[t]||(e.extensionObject_=e.array[t]={})},jspb.Message.toObjectList=function(e,t,r){for(var n=[],i=0;i<e.length;i++)n[i]=t.call(e[i],r,e[i]);return n},jspb.Message.toObjectExtension=function(e,t,r,n,i){for(var g in r){var s=r[g],o=n.call(e,s);if(o!=null){for(var u in s.fieldName)if(s.fieldName.hasOwnProperty(u))break;t[u]=s.toObjectFn?s.isRepeated?jspb.Message.toObjectList(o,s.toObjectFn,i):s.toObjectFn(i,o):o}}},jspb.Message.serializeBinaryExtensions=function(e,t,r,n){for(var i in r){var g=r[i],s=g.fieldInfo;if(!g.binaryWriterFn)throw Error("Message extension present that was generated without binary serialization support");var o=n.call(e,s);if(o!=null)if(s.isMessageType()){if(!g.binaryMessageSerializeFn)throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");g.binaryWriterFn.call(t,s.fieldIndex,o,g.binaryMessageSerializeFn)}else g.binaryWriterFn.call(t,s.fieldIndex,o)}},jspb.Message.readBinaryExtension=function(e,t,r,n,i){var g=r[t.getFieldNumber()];if(g){if(r=g.fieldInfo,!g.binaryReaderFn)throw Error("Deserializing extension whose generated code does not support binary format");if(r.isMessageType()){var s=new r.ctor;g.binaryReaderFn.call(t,s,g.binaryMessageDeserializeFn)}else s=g.binaryReaderFn.call(t);r.isRepeated&&!g.isPacked?(t=n.call(e,r))?t.push(s):i.call(e,r,[s]):i.call(e,r,s)}else t.skipField()},jspb.Message.getField=function(e,t){if(t<e.pivot_){t=jspb.Message.getIndex_(e,t);var r=e.array[t];return r===jspb.Message.EMPTY_LIST_SENTINEL_?e.array[t]=[]:r}if(e.extensionObject_)return(r=e.extensionObject_[t])===jspb.Message.EMPTY_LIST_SENTINEL_?e.extensionObject_[t]=[]:r},jspb.Message.getRepeatedField=function(e,t){return jspb.Message.getField(e,t)},jspb.Message.getOptionalFloatingPointField=function(e,t){return(e=jspb.Message.getField(e,t))==null?e:+e},jspb.Message.getBooleanField=function(e,t){return(e=jspb.Message.getField(e,t))==null?e:!!e},jspb.Message.getRepeatedFloatingPointField=function(e,t){var r=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var n=0;n<r.length;n++)r[n]=+r[n];e.convertedPrimitiveFields_[t]=!0}return r},jspb.Message.getRepeatedBooleanField=function(e,t){var r=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var n=0;n<r.length;n++)r[n]=!!r[n];e.convertedPrimitiveFields_[t]=!0}return r},jspb.Message.bytesAsB64=function(e){return e==null||typeof e=="string"?e:jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array?goog.crypt.base64.encodeByteArray(e):(goog.asserts.fail("Cannot coerce to b64 string: "+goog.typeOf(e)),null)},jspb.Message.bytesAsU8=function(e){return e==null||e instanceof Uint8Array?e:typeof e=="string"?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Cannot coerce to Uint8Array: "+goog.typeOf(e)),null)},jspb.Message.bytesListAsB64=function(e){return jspb.Message.assertConsistentTypes_(e),e.length&&typeof e[0]!="string"?goog.array.map(e,jspb.Message.bytesAsB64):e},jspb.Message.bytesListAsU8=function(e){return jspb.Message.assertConsistentTypes_(e),!e.length||e[0]instanceof Uint8Array?e:goog.array.map(e,jspb.Message.bytesAsU8)},jspb.Message.assertConsistentTypes_=function(e){if(goog.DEBUG&&e&&1<e.length){var t=goog.typeOf(e[0]);goog.array.forEach(e,function(r){goog.typeOf(r)!=t&&goog.asserts.fail("Inconsistent type in JSPB repeated field array. Got "+goog.typeOf(r)+" expected "+t)})}},jspb.Message.getFieldWithDefault=function(e,t,r){return(e=jspb.Message.getField(e,t))==null?r:e},jspb.Message.getBooleanFieldWithDefault=function(e,t,r){return(e=jspb.Message.getBooleanField(e,t))==null?r:e},jspb.Message.getFloatingPointFieldWithDefault=function(e,t,r){return(e=jspb.Message.getOptionalFloatingPointField(e,t))==null?r:e},jspb.Message.getFieldProto3=jspb.Message.getFieldWithDefault,jspb.Message.getMapField=function(e,t,r,n){if(e.wrappers_||(e.wrappers_={}),t in e.wrappers_)return e.wrappers_[t];var i=jspb.Message.getField(e,t);if(!i){if(r)return;i=[],jspb.Message.setField(e,t,i)}return e.wrappers_[t]=new jspb.Map(i,n)},jspb.Message.setField=function(e,t,r){return goog.asserts.assertInstanceof(e,jspb.Message),t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=r:(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[t]=r),e},jspb.Message.setProto3IntField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3FloatField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3BooleanField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,!1)},jspb.Message.setProto3StringField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"")},jspb.Message.setProto3BytesField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"")},jspb.Message.setProto3EnumField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3StringIntField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"0")},jspb.Message.setFieldIgnoringDefault_=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),r!==n?jspb.Message.setField(e,t,r):t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=null:(jspb.Message.maybeInitEmptyExtensionObject_(e),delete e.extensionObject_[t]),e},jspb.Message.addToRepeatedField=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),t=jspb.Message.getRepeatedField(e,t),n!=null?t.splice(n,0,r):t.push(r),e},jspb.Message.setOneofField=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),(r=jspb.Message.computeOneofCase(e,r))&&r!==t&&n!==void 0&&(e.wrappers_&&r in e.wrappers_&&(e.wrappers_[r]=void 0),jspb.Message.setField(e,r,void 0)),jspb.Message.setField(e,t,n)},jspb.Message.computeOneofCase=function(e,t){for(var r,n,i=0;i<t.length;i++){var g=t[i],s=jspb.Message.getField(e,g);s!=null&&(r=g,n=s,jspb.Message.setField(e,g,void 0))}return r?(jspb.Message.setField(e,r,n),r):0},jspb.Message.getWrapperField=function(e,t,r,n){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[r]){var i=jspb.Message.getField(e,r);(n||i)&&(e.wrappers_[r]=new t(i))}return e.wrappers_[r]},jspb.Message.getRepeatedWrapperField=function(e,t,r){return jspb.Message.wrapRepeatedField_(e,t,r),(t=e.wrappers_[r])==jspb.Message.EMPTY_LIST_SENTINEL_&&(t=e.wrappers_[r]=[]),t},jspb.Message.wrapRepeatedField_=function(e,t,r){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[r]){for(var n=jspb.Message.getRepeatedField(e,r),i=[],g=0;g<n.length;g++)i[g]=new t(n[g]);e.wrappers_[r]=i}},jspb.Message.setWrapperField=function(e,t,r){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var n=r&&r.toArray();return e.wrappers_[t]=r,jspb.Message.setField(e,t,n)},jspb.Message.setOneofWrapperField=function(e,t,r,n){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var i=n&&n.toArray();return e.wrappers_[t]=n,jspb.Message.setOneofField(e,t,r,i)},jspb.Message.setRepeatedWrapperField=function(e,t,r){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={}),r=r||[];for(var n=[],i=0;i<r.length;i++)n[i]=r[i].toArray();return e.wrappers_[t]=r,jspb.Message.setField(e,t,n)},jspb.Message.addToRepeatedWrapperField=function(e,t,r,n,i){jspb.Message.wrapRepeatedField_(e,n,t);var g=e.wrappers_[t];return g||(g=e.wrappers_[t]=[]),r=r||new n,e=jspb.Message.getRepeatedField(e,t),i!=null?(g.splice(i,0,r),e.splice(i,0,r.toArray())):(g.push(r),e.push(r.toArray())),r},jspb.Message.toMap=function(e,t,r,n){for(var i={},g=0;g<e.length;g++)i[t.call(e[g])]=r?r.call(e[g],n,e[g]):e[g];return i},jspb.Message.prototype.syncMapFields_=function(){if(this.wrappers_)for(var e in this.wrappers_){var t=this.wrappers_[e];if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&t[r].toArray();else t&&t.toArray()}},jspb.Message.prototype.toArray=function(){return this.syncMapFields_(),this.array},jspb.Message.GENERATE_TO_STRING&&(jspb.Message.prototype.toString=function(){return this.syncMapFields_(),this.array.toString()}),jspb.Message.prototype.getExtension=function(e){if(this.extensionObject_){this.wrappers_||(this.wrappers_={});var t=e.fieldIndex;if(e.isRepeated){if(e.isMessageType())return this.wrappers_[t]||(this.wrappers_[t]=goog.array.map(this.extensionObject_[t]||[],function(r){return new e.ctor(r)})),this.wrappers_[t]}else if(e.isMessageType())return!this.wrappers_[t]&&this.extensionObject_[t]&&(this.wrappers_[t]=new e.ctor(this.extensionObject_[t])),this.wrappers_[t];return this.extensionObject_[t]}},jspb.Message.prototype.setExtension=function(e,t){this.wrappers_||(this.wrappers_={}),jspb.Message.maybeInitEmptyExtensionObject_(this);var r=e.fieldIndex;return e.isRepeated?(t=t||[],e.isMessageType()?(this.wrappers_[r]=t,this.extensionObject_[r]=goog.array.map(t,function(n){return n.toArray()})):this.extensionObject_[r]=t):e.isMessageType()?(this.wrappers_[r]=t,this.extensionObject_[r]=t&&t.toArray()):this.extensionObject_[r]=t,this},jspb.Message.difference=function(e,t){if(!(e instanceof t.constructor))throw Error("Messages have different types.");var r=e.toArray();t=t.toArray();var n=[],i=0,g=r.length>t.length?r.length:t.length;for(e.getJsPbMessageId()&&(n[0]=e.getJsPbMessageId(),i=1);i<g;i++)jspb.Message.compareFields(r[i],t[i])||(n[i]=t[i]);return new e.constructor(n)},jspb.Message.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&jspb.Message.compareFields(e.toArray(),t.toArray())},jspb.Message.compareExtensions=function(e,t){e=e||{},t=t||{};var r,n={};for(r in e)n[r]=0;for(r in t)n[r]=0;for(r in n)if(!jspb.Message.compareFields(e[r],t[r]))return!1;return!0},jspb.Message.compareFields=function(e,t){if(e==t)return!0;if(!goog.isObject(e)||!goog.isObject(t))return!!(typeof e=="number"&&isNaN(e)||typeof t=="number"&&isNaN(t))&&String(e)==String(t);if(e.constructor!=t.constructor)return!1;if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e.constructor===Uint8Array){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}if(e.constructor===Array){var n=void 0,i=void 0,g=Math.max(e.length,t.length);for(r=0;r<g;r++){var s=e[r],o=t[r];if(s&&s.constructor==Object&&(goog.asserts.assert(n===void 0),goog.asserts.assert(r===e.length-1),n=s,s=void 0),o&&o.constructor==Object&&(goog.asserts.assert(i===void 0),goog.asserts.assert(r===t.length-1),i=o,o=void 0),!jspb.Message.compareFields(s,o))return!1}return!n&&!i||(n=n||{},i=i||{},jspb.Message.compareExtensions(n,i))}if(e.constructor===Object)return jspb.Message.compareExtensions(e,t);throw Error("Invalid type in JSPB array")},jspb.Message.prototype.cloneMessage=function(){return jspb.Message.cloneMessage(this)},jspb.Message.prototype.clone=function(){return jspb.Message.cloneMessage(this)},jspb.Message.clone=function(e){return jspb.Message.cloneMessage(e)},jspb.Message.cloneMessage=function(e){return new e.constructor(jspb.Message.clone_(e.toArray()))},jspb.Message.copyInto=function(e,t){goog.asserts.assertInstanceof(e,jspb.Message),goog.asserts.assertInstanceof(t,jspb.Message),goog.asserts.assert(e.constructor==t.constructor,"Copy source and target message should have the same type."),e=jspb.Message.clone(e);for(var r=t.toArray(),n=e.toArray(),i=r.length=0;i<n.length;i++)r[i]=n[i];t.wrappers_=e.wrappers_,t.extensionObject_=e.extensionObject_},jspb.Message.clone_=function(e){if(Array.isArray(e)){for(var t=Array(e.length),r=0;r<e.length;r++){var n=e[r];n!=null&&(t[r]=typeof n=="object"?jspb.Message.clone_(goog.asserts.assert(n)):n)}return t}if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)return new Uint8Array(e);for(r in t={},e)(n=e[r])!=null&&(t[r]=typeof n=="object"?jspb.Message.clone_(goog.asserts.assert(n)):n);return t},jspb.Message.registerMessageType=function(e,t){t.messageId=e},jspb.Message.messageSetExtensions={},jspb.Message.messageSetExtensionsBinary={},jspb.arith={},jspb.arith.UInt64=function(e,t){this.lo=e,this.hi=t},jspb.arith.UInt64.prototype.cmp=function(e){return this.hi<e.hi||this.hi==e.hi&&this.lo<e.lo?-1:this.hi==e.hi&&this.lo==e.lo?0:1},jspb.arith.UInt64.prototype.rightShift=function(){return new jspb.arith.UInt64((this.lo>>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},jspb.arith.UInt64.prototype.leftShift=function(){return new jspb.arith.UInt64(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},jspb.arith.UInt64.prototype.msb=function(){return!!(2147483648&this.hi)},jspb.arith.UInt64.prototype.lsb=function(){return!!(1&this.lo)},jspb.arith.UInt64.prototype.zero=function(){return this.lo==0&&this.hi==0},jspb.arith.UInt64.prototype.add=function(e){return new jspb.arith.UInt64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.UInt64.prototype.sub=function(e){return new jspb.arith.UInt64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.UInt64.mul32x32=function(e,t){var r=65535&e,n=65535&t,i=t>>>16;for(t=r*n+65536*(r*i&65535)+65536*((e>>>=16)*n&65535),r=e*i+(r*i>>>16)+(e*n>>>16);4294967296<=t;)t-=4294967296,r+=1;return new jspb.arith.UInt64(t>>>0,r>>>0)},jspb.arith.UInt64.prototype.mul=function(e){var t=jspb.arith.UInt64.mul32x32(this.lo,e);return(e=jspb.arith.UInt64.mul32x32(this.hi,e)).hi=e.lo,e.lo=0,t.add(e)},jspb.arith.UInt64.prototype.div=function(e){if(e==0)return[];var t=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(this.lo,this.hi);e=new jspb.arith.UInt64(e,0);for(var n=new jspb.arith.UInt64(1,0);!e.msb();)e=e.leftShift(),n=n.leftShift();for(;!n.zero();)0>=e.cmp(r)&&(t=t.add(n),r=r.sub(e)),e=e.rightShift(),n=n.rightShift();return[t,r]},jspb.arith.UInt64.prototype.toString=function(){for(var e="",t=this;!t.zero();){var r=(t=t.div(10))[0];e=t[1].lo+e,t=r}return e==""&&(e="0"),e},jspb.arith.UInt64.fromString=function(e){for(var t=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(0,0),n=0;n<e.length;n++){if("0">e[n]||"9"<e[n])return null;var i=parseInt(e[n],10);r.lo=i,t=t.mul(10).add(r)}return t},jspb.arith.UInt64.prototype.clone=function(){return new jspb.arith.UInt64(this.lo,this.hi)},jspb.arith.Int64=function(e,t){this.lo=e,this.hi=t},jspb.arith.Int64.prototype.add=function(e){return new jspb.arith.Int64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.sub=function(e){return new jspb.arith.Int64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.clone=function(){return new jspb.arith.Int64(this.lo,this.hi)},jspb.arith.Int64.prototype.toString=function(){var e=(2147483648&this.hi)!=0,t=new jspb.arith.UInt64(this.lo,this.hi);return e&&(t=new jspb.arith.UInt64(0,0).sub(t)),(e?"-":"")+t.toString()},jspb.arith.Int64.fromString=function(e){var t=0<e.length&&e[0]=="-";return t&&(e=e.substring(1)),(e=jspb.arith.UInt64.fromString(e))===null?null:(t&&(e=new jspb.arith.UInt64(0,0).sub(e)),new jspb.arith.Int64(e.lo,e.hi))},jspb.BinaryEncoder=function(){this.buffer_=[]},jspb.BinaryEncoder.prototype.length=function(){return this.buffer_.length},jspb.BinaryEncoder.prototype.end=function(){var e=this.buffer_;return this.buffer_=[],e},jspb.BinaryEncoder.prototype.writeSplitVarint64=function(e,t){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32);0<t||127<e;)this.buffer_.push(127&e|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSplitFixed64=function(e,t){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUint32(e),this.writeUint32(t)},jspb.BinaryEncoder.prototype.writeUnsignedVarint32=function(e){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32);127<e;)this.buffer_.push(127&e|128),e>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSignedVarint32=function(e){if(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),0<=e)this.writeUnsignedVarint32(e);else{for(var t=0;9>t;t++)this.buffer_.push(127&e|128),e>>=7;this.buffer_.push(1)}},jspb.BinaryEncoder.prototype.writeUnsignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeSignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeUnsignedVarint32((e<<1^e>>31)>>>0)},jspb.BinaryEncoder.prototype.writeZigzagVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitZigzag64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint64String=function(e){this.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(e))},jspb.BinaryEncoder.prototype.writeZigzagVarintHash64=function(e){var t=this;jspb.utils.splitHash64(e),jspb.utils.toZigzag64(jspb.utils.split64Low,jspb.utils.split64High,function(r,n){t.writeSplitVarint64(r>>>0,n>>>0)})},jspb.BinaryEncoder.prototype.writeUint8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&256>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeUint16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&65536>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeUint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeUint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitUint64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-128<=e&&128>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeInt16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-32768<=e&&32768>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeInt32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeInt64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt64String=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(+e>=-jspb.BinaryConstants.TWO_TO_63&&+e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e)),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFloat=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT32_MAX&&e<=jspb.BinaryConstants.FLOAT32_MAX),jspb.utils.splitFloat32(e),this.writeUint32(jspb.utils.split64Low)},jspb.BinaryEncoder.prototype.writeDouble=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT64_MAX&&e<=jspb.BinaryConstants.FLOAT64_MAX),jspb.utils.splitFloat64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeBool=function(e){goog.asserts.assert(typeof e=="boolean"||typeof e=="number"),this.buffer_.push(e?1:0)},jspb.BinaryEncoder.prototype.writeEnum=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32(e)},jspb.BinaryEncoder.prototype.writeBytes=function(e){this.buffer_.push.apply(this.buffer_,e)},jspb.BinaryEncoder.prototype.writeVarintHash64=function(e){jspb.utils.splitHash64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFixedHash64=function(e){jspb.utils.splitHash64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeString=function(e){for(var t=this.buffer_.length,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(128>n)this.buffer_.push(n);else if(2048>n)this.buffer_.push(n>>6|192),this.buffer_.push(63&n|128);else if(65536>n)if(55296<=n&&56319>=n&&r+1<e.length){var i=e.charCodeAt(r+1);56320<=i&&57343>=i&&(n=1024*(n-55296)+i-56320+65536,this.buffer_.push(n>>18|240),this.buffer_.push(n>>12&63|128),this.buffer_.push(n>>6&63|128),this.buffer_.push(63&n|128),r++)}else this.buffer_.push(n>>12|224),this.buffer_.push(n>>6&63|128),this.buffer_.push(63&n|128)}return this.buffer_.length-t},jspb.BinaryWriter=function(){this.blocks_=[],this.totalLength_=0,this.encoder_=new jspb.BinaryEncoder,this.bookmarks_=[]},jspb.BinaryWriter.prototype.appendUint8Array_=function(e){var t=this.encoder_.end();this.blocks_.push(t),this.blocks_.push(e),this.totalLength_+=t.length+e.length},jspb.BinaryWriter.prototype.beginDelimited_=function(e){return this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),e=this.encoder_.end(),this.blocks_.push(e),this.totalLength_+=e.length,e.push(this.totalLength_),e},jspb.BinaryWriter.prototype.endDelimited_=function(e){var t=e.pop();for(t=this.totalLength_+this.encoder_.length()-t,goog.asserts.assert(0<=t);127<t;)e.push(127&t|128),t>>>=7,this.totalLength_++;e.push(t),this.totalLength_++},jspb.BinaryWriter.prototype.writeSerializedMessage=function(e,t,r){this.appendUint8Array_(e.subarray(t,r))},jspb.BinaryWriter.prototype.maybeWriteSerializedMessage=function(e,t,r){e!=null&&t!=null&&r!=null&&this.writeSerializedMessage(e,t,r)},jspb.BinaryWriter.prototype.reset=function(){this.blocks_=[],this.encoder_.end(),this.totalLength_=0,this.bookmarks_=[]},jspb.BinaryWriter.prototype.getResultBuffer=function(){goog.asserts.assert(this.bookmarks_.length==0);for(var e=new Uint8Array(this.totalLength_+this.encoder_.length()),t=this.blocks_,r=t.length,n=0,i=0;i<r;i++){var g=t[i];e.set(g,n),n+=g.length}return t=this.encoder_.end(),e.set(t,n),n+=t.length,goog.asserts.assert(n==e.length),this.blocks_=[e],e},jspb.BinaryWriter.prototype.getResultBase64String=function(e){return goog.crypt.base64.encodeByteArray(this.getResultBuffer(),e)},jspb.BinaryWriter.prototype.beginSubMessage=function(e){this.bookmarks_.push(this.beginDelimited_(e))},jspb.BinaryWriter.prototype.endSubMessage=function(){goog.asserts.assert(0<=this.bookmarks_.length),this.endDelimited_(this.bookmarks_.pop())},jspb.BinaryWriter.prototype.writeFieldHeader_=function(e,t){goog.asserts.assert(1<=e&&e==Math.floor(e)),this.encoder_.writeUnsignedVarint32(8*e+t)},jspb.BinaryWriter.prototype.writeAny=function(e,t,r){var n=jspb.BinaryConstants.FieldType;switch(e){case n.DOUBLE:this.writeDouble(t,r);break;case n.FLOAT:this.writeFloat(t,r);break;case n.INT64:this.writeInt64(t,r);break;case n.UINT64:this.writeUint64(t,r);break;case n.INT32:this.writeInt32(t,r);break;case n.FIXED64:this.writeFixed64(t,r);break;case n.FIXED32:this.writeFixed32(t,r);break;case n.BOOL:this.writeBool(t,r);break;case n.STRING:this.writeString(t,r);break;case n.GROUP:goog.asserts.fail("Group field type not supported in writeAny()");break;case n.MESSAGE:goog.asserts.fail("Message field type not supported in writeAny()");break;case n.BYTES:this.writeBytes(t,r);break;case n.UINT32:this.writeUint32(t,r);break;case n.ENUM:this.writeEnum(t,r);break;case n.SFIXED32:this.writeSfixed32(t,r);break;case n.SFIXED64:this.writeSfixed64(t,r);break;case n.SINT32:this.writeSint32(t,r);break;case n.SINT64:this.writeSint64(t,r);break;case n.FHASH64:this.writeFixedHash64(t,r);break;case n.VHASH64:this.writeVarintHash64(t,r);break;default:goog.asserts.fail("Invalid field type in writeAny()")}},jspb.BinaryWriter.prototype.writeUnsignedVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint32(t))},jspb.BinaryWriter.prototype.writeSignedVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeUnsignedVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint64(t))},jspb.BinaryWriter.prototype.writeSignedVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint32(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64String_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64String(t))},jspb.BinaryWriter.prototype.writeZigzagVarintHash64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarintHash64(t))},jspb.BinaryWriter.prototype.writeInt32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt32String=function(e,t){t!=null&&(t=parseInt(t,10),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeSignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeInt64String=function(e,t){t!=null&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeUint32=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint32String=function(e,t){t!=null&&(t=parseInt(t,10),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint64=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeUnsignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeUint64String=function(e,t){t!=null&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSint32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeZigzagVarint32_(e,t))},jspb.BinaryWriter.prototype.writeSint64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeZigzagVarint64_(e,t))},jspb.BinaryWriter.prototype.writeSintHash64=function(e,t){t!=null&&this.writeZigzagVarintHash64_(e,t)},jspb.BinaryWriter.prototype.writeSint64String=function(e,t){t!=null&&this.writeZigzagVarint64String_(e,t)},jspb.BinaryWriter.prototype.writeFixed32=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeUint32(t))},jspb.BinaryWriter.prototype.writeFixed64=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeUint64(t))},jspb.BinaryWriter.prototype.writeFixed64String=function(e,t){t!=null&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSfixed32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeInt32(t))},jspb.BinaryWriter.prototype.writeSfixed64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeInt64(t))},jspb.BinaryWriter.prototype.writeSfixed64String=function(e,t){t!=null&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeFloat=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeFloat(t))},jspb.BinaryWriter.prototype.writeDouble=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeDouble(t))},jspb.BinaryWriter.prototype.writeBool=function(e,t){t!=null&&(goog.asserts.assert(typeof t=="boolean"||typeof t=="number"),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeBool(t))},jspb.BinaryWriter.prototype.writeEnum=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeString=function(e,t){t!=null&&(e=this.beginDelimited_(e),this.encoder_.writeString(t),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeBytes=function(e,t){t!=null&&(t=jspb.utils.byteSourceToUint8Array(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),this.appendUint8Array_(t))},jspb.BinaryWriter.prototype.writeMessage=function(e,t,r){t!=null&&(e=this.beginDelimited_(e),r(t,this),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeMessageSet=function(e,t,r){t!=null&&(this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.START_GROUP),this.writeFieldHeader_(2,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(e),e=this.beginDelimited_(3),r(t,this),this.endDelimited_(e),this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeGroup=function(e,t,r){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),r(t,this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeFixedHash64=function(e,t){t!=null&&(goog.asserts.assert(t.length==8),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeFixedHash64(t))},jspb.BinaryWriter.prototype.writeVarintHash64=function(e,t){t!=null&&(goog.asserts.assert(t.length==8),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeVarintHash64(t))},jspb.BinaryWriter.prototype.writeSplitFixed64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t,r)},jspb.BinaryWriter.prototype.writeSplitVarint64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t,r)},jspb.BinaryWriter.prototype.writeSplitZigzagVarint64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT);var n=this.encoder_;jspb.utils.toZigzag64(t,r,function(i,g){n.writeSplitVarint64(i>>>0,g>>>0)})},jspb.BinaryWriter.prototype.writeRepeatedInt32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSignedVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedInt32String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeInt32String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedInt64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSignedVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSplitFixed64=function(e,t,r,n){if(t!=null)for(var i=0;i<t.length;i++)this.writeSplitFixed64(e,r(t[i]),n(t[i]))},jspb.BinaryWriter.prototype.writeRepeatedSplitVarint64=function(e,t,r,n){if(t!=null)for(var i=0;i<t.length;i++)this.writeSplitVarint64(e,r(t[i]),n(t[i]))},jspb.BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64=function(e,t,r,n){if(t!=null)for(var i=0;i<t.length;i++)this.writeSplitZigzagVarint64(e,r(t[i]),n(t[i]))},jspb.BinaryWriter.prototype.writeRepeatedInt64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeInt64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUnsignedVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint32String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUint32String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUnsignedVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUint64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarint64String_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSintHash64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarintHash64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixed32(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixed64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixed64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSfixed32(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSfixed64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSfixed64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFloat=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFloat(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedDouble=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeDouble(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedBool=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeBool(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedEnum=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeEnum(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedString=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeString(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedBytes=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeBytes(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedMessage=function(e,t,r){if(t!=null)for(var n=0;n<t.length;n++){var i=this.beginDelimited_(e);r(t[n],this),this.endDelimited_(i)}},jspb.BinaryWriter.prototype.writeRepeatedGroup=function(e,t,r){if(t!=null)for(var n=0;n<t.length;n++)this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),r(t[n],this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP)},jspb.BinaryWriter.prototype.writeRepeatedFixedHash64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixedHash64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedVarintHash64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeVarintHash64(e,t[r])},jspb.BinaryWriter.prototype.writePackedInt32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt32String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint32(parseInt(t[r],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitFixed64=function(e,t,r,n){if(t!=null){e=this.beginDelimited_(e);for(var i=0;i<t.length;i++)this.encoder_.writeSplitFixed64(r(t[i]),n(t[i]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitVarint64=function(e,t,r,n){if(t!=null){e=this.beginDelimited_(e);for(var i=0;i<t.length;i++)this.encoder_.writeSplitVarint64(r(t[i]),n(t[i]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitZigzagVarint64=function(e,t,r,n){if(t!=null){e=this.beginDelimited_(e);for(var i=this.encoder_,g=0;g<t.length;g++)jspb.utils.toZigzag64(r(t[g]),n(t[g]),function(s,o){i.writeSplitVarint64(s>>>0,o>>>0)});this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++){var n=jspb.arith.Int64.fromString(t[r]);this.encoder_.writeSplitVarint64(n.lo,n.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint32(parseInt(t[r],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++){var n=jspb.arith.UInt64.fromString(t[r]);this.encoder_.writeSplitVarint64(n.lo,n.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(t[r]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSintHash64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarintHash64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixed32=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeUint32(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeUint64(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64String=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++){var r=jspb.arith.UInt64.fromString(t[e]);this.encoder_.writeSplitFixed64(r.lo,r.hi)}},jspb.BinaryWriter.prototype.writePackedSfixed32=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeInt32(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64String=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64String(t[e])},jspb.BinaryWriter.prototype.writePackedFloat=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeFloat(t[e])},jspb.BinaryWriter.prototype.writePackedDouble=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeDouble(t[e])},jspb.BinaryWriter.prototype.writePackedBool=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),e=0;e<t.length;e++)this.encoder_.writeBool(t[e])},jspb.BinaryWriter.prototype.writePackedEnum=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeEnum(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixedHash64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeFixedHash64(t[e])},jspb.BinaryWriter.prototype.writePackedVarintHash64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeVarintHash64(t[r]);this.endDelimited_(e)}},jspb.Export={},exports.Map=jspb.Map,exports.Message=jspb.Message,exports.BinaryReader=jspb.BinaryReader,exports.BinaryWriter=jspb.BinaryWriter,exports.ExtensionFieldInfo=jspb.ExtensionFieldInfo,exports.ExtensionFieldBinaryInfo=jspb.ExtensionFieldBinaryInfo,exports.exportSymbol=goog.exportSymbol,exports.inherits=goog.inherits,exports.object={extend:goog.object.extend},exports.typeOf=goog.typeOf}).call(this,__webpack_require__(5),__webpack_require__(4).Buffer)},function(e,t){var r=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var i=new Array(16);e.exports=function(){for(var g,s=0;s<16;s++)(3&s)==0&&(g=4294967296*Math.random()),i[s]=g>>>((3&s)<<3)&255;return i}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(i,g){var s=g||0,o=r;return[o[i[s++]],o[i[s++]],o[i[s++]],o[i[s++]],"-",o[i[s++]],o[i[s++]],"-",o[i[s++]],o[i[s++]],"-",o[i[s++]],o[i[s++]],"-",o[i[s++]],o[i[s++]],o[i[s++]],o[i[s++]],o[i[s++]],o[i[s++]]].join("")}},function(e,t,r){(function(n){const i=r(210),g=r(49),s=(o,u)=>({from:s,EnvVarError:r(49),get:function(l){if(!l)return o;if(arguments.length>1)throw new g("It looks like you passed more than one argument to env.get(). Since env-var@6.0.0 this is no longer supported. To set a default value use env.get(TARGET).default(DEFAULT)");return i(o,l,u||{})}});e.exports=s(n.env)}).call(this,r(2))},function(e,t,r){var n=r(10),i=r(71),g=r(3).LEVEL,s=e.exports=function(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i.call(this,{objectMode:!0,highWaterMark:u.highWaterMark}),this.format=u.format,this.level=u.level,this.handleExceptions=u.handleExceptions,this.silent=u.silent,u.log&&(this.log=u.log),u.logv&&(this.logv=u.logv),u.close&&(this.close=u.close),this.once("pipe",function(l){o.levels=l.levels,o.parent=l}),this.once("unpipe",function(l){l===o.parent&&(o.parent=null,o.close&&o.close())})};n.inherits(s,i),s.prototype._write=function(o,u,l){if(this.silent||o.exception===!0&&!this.handleExceptions)return l(null);var m=this.level||this.parent&&this.parent.level;if(!m||this.levels[m]>=this.levels[o[g]]){if(o&&!this.format)return this.log(o,l);var T=void 0,b=void 0;try{b=this.format.transform(Object.assign({},o),this.format.options)}catch(_){T=_}if(T||!b){if(l(),T)throw T;return}return this.log(b,l)}return l(null)},s.prototype._writev=function(o,u){if(this.logv){var l=o.filter(this._accept,this);return l.length?this.logv(l,u):u(null)}for(var m=0;m<o.length;m++)if(this._accept(o[m]))if(!o[m].chunk||this.format){var T=void 0,b=void 0;try{b=this.format.transform(Object.assign({},o[m].chunk),this.format.options)}catch(_){T=_}if(T||!b){if(o[m].callback(),T)throw u(null),T}else this.log(b,o[m].callback)}else this.log(o[m].chunk,o[m].callback);return u(null)},s.prototype._accept=function(o){var u=o.chunk;if(this.silent)return!1;var l=this.level||this.parent&&this.parent.level;return!(u.exception!==!0&&l&&!(this.levels[l]>=this.levels[u[g]])||!this.handleExceptions&&u.exception===!0)},s.prototype._nop=function(){}},function(e,t,r){const{AbortController:n,AbortSignal:i}=typeof self!="undefined"?self:typeof window!="undefined"?window:void 0;e.exports=n,e.exports.AbortSignal=i,e.exports.default=n},function(e,t){var r=function(n){function i(){this.fetch=!1,this.DOMException=n.DOMException}return i.prototype=n,new i}(typeof self!="undefined"?self:this);(function(n){(function(i){var g="URLSearchParams"in n,s="Symbol"in n&&"iterator"in Symbol,o="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch{return!1}}(),u="FormData"in n,l="ArrayBuffer"in n;if(l)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],T=ArrayBuffer.isView||function(j){return j&&m.indexOf(Object.prototype.toString.call(j))>-1};function b(j){if(typeof j!="string"&&(j=String(j)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(j))throw new TypeError("Invalid character in header field name");return j.toLowerCase()}function _(j){return typeof j!="string"&&(j=String(j)),j}function f(j){var y={next:function(){var x=j.shift();return{done:x===void 0,value:x}}};return s&&(y[Symbol.iterator]=function(){return y}),y}function S(j){this.map={},j instanceof S?j.forEach(function(y,x){this.append(x,y)},this):Array.isArray(j)?j.forEach(function(y){this.append(y[0],y[1])},this):j&&Object.getOwnPropertyNames(j).forEach(function(y){this.append(y,j[y])},this)}function E(j){if(j.bodyUsed)return Promise.reject(new TypeError("Already read"));j.bodyUsed=!0}function N(j){return new Promise(function(y,x){j.onload=function(){y(j.result)},j.onerror=function(){x(j.error)}})}function F(j){var y=new FileReader,x=N(y);return y.readAsArrayBuffer(j),x}function M(j){if(j.slice)return j.slice(0);var y=new Uint8Array(j.byteLength);return y.set(new Uint8Array(j)),y.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(j){var y;this._bodyInit=j,j?typeof j=="string"?this._bodyText=j:o&&Blob.prototype.isPrototypeOf(j)?this._bodyBlob=j:u&&FormData.prototype.isPrototypeOf(j)?this._bodyFormData=j:g&&URLSearchParams.prototype.isPrototypeOf(j)?this._bodyText=j.toString():l&&o&&(y=j)&&DataView.prototype.isPrototypeOf(y)?(this._bodyArrayBuffer=M(j.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(j)||T(j))?this._bodyArrayBuffer=M(j):this._bodyText=j=Object.prototype.toString.call(j):this._bodyText="",this.headers.get("content-type")||(typeof j=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):g&&URLSearchParams.prototype.isPrototypeOf(j)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var j=E(this);if(j)return j;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?E(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(F)}),this.text=function(){var j,y,x,B=E(this);if(B)return B;if(this._bodyBlob)return j=this._bodyBlob,y=new FileReader,x=N(y),y.readAsText(j),x;if(this._bodyArrayBuffer)return Promise.resolve(function(U){for(var O=new Uint8Array(U),A=new Array(O.length),D=0;D<O.length;D++)A[D]=String.fromCharCode(O[D]);return A.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u&&(this.formData=function(){return this.text().then(Z)}),this.json=function(){return this.text().then(JSON.parse)},this}S.prototype.append=function(j,y){j=b(j),y=_(y);var x=this.map[j];this.map[j]=x?x+", "+y:y},S.prototype.delete=function(j){delete this.map[b(j)]},S.prototype.get=function(j){return j=b(j),this.has(j)?this.map[j]:null},S.prototype.has=function(j){return this.map.hasOwnProperty(b(j))},S.prototype.set=function(j,y){this.map[b(j)]=_(y)},S.prototype.forEach=function(j,y){for(var x in this.map)this.map.hasOwnProperty(x)&&j.call(y,this.map[x],x,this)},S.prototype.keys=function(){var j=[];return this.forEach(function(y,x){j.push(x)}),f(j)},S.prototype.values=function(){var j=[];return this.forEach(function(y){j.push(y)}),f(j)},S.prototype.entries=function(){var j=[];return this.forEach(function(y,x){j.push([x,y])}),f(j)},s&&(S.prototype[Symbol.iterator]=S.prototype.entries);var p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function P(j,y){var x,B,U=(y=y||{}).body;if(j instanceof P){if(j.bodyUsed)throw new TypeError("Already read");this.url=j.url,this.credentials=j.credentials,y.headers||(this.headers=new S(j.headers)),this.method=j.method,this.mode=j.mode,this.signal=j.signal,U||j._bodyInit==null||(U=j._bodyInit,j.bodyUsed=!0)}else this.url=String(j);if(this.credentials=y.credentials||this.credentials||"same-origin",!y.headers&&this.headers||(this.headers=new S(y.headers)),this.method=(x=y.method||this.method||"GET",B=x.toUpperCase(),p.indexOf(B)>-1?B:x),this.mode=y.mode||this.mode||null,this.signal=y.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&U)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(U)}function Z(j){var y=new FormData;return j.trim().split("&").forEach(function(x){if(x){var B=x.split("="),U=B.shift().replace(/\+/g," "),O=B.join("=").replace(/\+/g," ");y.append(decodeURIComponent(U),decodeURIComponent(O))}}),y}function $(j,y){y||(y={}),this.type="default",this.status=y.status===void 0?200:y.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in y?y.statusText:"OK",this.headers=new S(y.headers),this.url=y.url||"",this._initBody(j)}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})},R.call(P.prototype),R.call($.prototype),$.prototype.clone=function(){return new $(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new S(this.headers),url:this.url})},$.error=function(){var j=new $(null,{status:0,statusText:""});return j.type="error",j};var h=[301,302,303,307,308];$.redirect=function(j,y){if(h.indexOf(y)===-1)throw new RangeError("Invalid status code");return new $(null,{status:y,headers:{location:j}})},i.DOMException=n.DOMException;try{new i.DOMException}catch{i.DOMException=function(y,x){this.message=y,this.name=x;var B=Error(y);this.stack=B.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function d(j,y){return new Promise(function(x,B){var U=new P(j,y);if(U.signal&&U.signal.aborted)return B(new i.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function A(){O.abort()}O.onload=function(){var D,w,c={status:O.status,statusText:O.statusText,headers:(D=O.getAllResponseHeaders()||"",w=new S,D.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(k){var Y=k.split(":"),K=Y.shift().trim();if(K){var Q=Y.join(":").trim();w.append(K,Q)}}),w)};c.url="responseURL"in O?O.responseURL:c.headers.get("X-Request-URL");var L="response"in O?O.response:O.responseText;x(new $(L,c))},O.onerror=function(){B(new TypeError("Network request failed"))},O.ontimeout=function(){B(new TypeError("Network request failed"))},O.onabort=function(){B(new i.DOMException("Aborted","AbortError"))},O.open(U.method,U.url,!0),U.credentials==="include"?O.withCredentials=!0:U.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&o&&(O.responseType="blob"),U.headers.forEach(function(D,w){O.setRequestHeader(w,D)}),U.signal&&(U.signal.addEventListener("abort",A),O.onreadystatechange=function(){O.readyState===4&&U.signal.removeEventListener("abort",A)}),O.send(U._bodyInit===void 0?null:U._bodyInit)})}d.polyfill=!0,n.fetch||(n.fetch=d,n.Headers=S,n.Request=P,n.Response=$),i.Headers=S,i.Request=P,i.Response=$,i.fetch=d})({})})(r),delete r.fetch.polyfill,(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t},function(e,t,r){const n=r(222),i=Symbol("max"),g=Symbol("length"),s=Symbol("lengthCalculator"),o=Symbol("allowStale"),u=Symbol("maxAge"),l=Symbol("dispose"),m=Symbol("noDisposeOnSet"),T=Symbol("lruList"),b=Symbol("cache"),_=Symbol("updateAgeOnGet"),f=()=>1,S=(p,P,Z)=>{const $=p[b].get(P);if($){const h=$.value;if(E(p,h)){if(F(p,$),!p[o])return}else Z&&(p[_]&&($.value.now=Date.now()),p[T].unshiftNode($));return h.value}},E=(p,P)=>{if(!P||!P.maxAge&&!p[u])return!1;const Z=Date.now()-P.now;return P.maxAge?Z>P.maxAge:p[u]&&Z>p[u]},N=p=>{if(p[g]>p[i])for(let P=p[T].tail;p[g]>p[i]&&P!==null;){const Z=P.prev;F(p,P),P=Z}},F=(p,P)=>{if(P){const Z=P.value;p[l]&&p[l](Z.key,Z.value),p[g]-=Z.length,p[b].delete(Z.key),p[T].removeNode(P)}};class M{constructor(P,Z,$,h,d){this.key=P,this.value=Z,this.length=$,this.now=h,this.maxAge=d||0}}const R=(p,P,Z,$)=>{let h=Z.value;E(p,h)&&(F(p,Z),p[o]||(h=void 0)),h&&P.call($,h.value,h.key,p)};e.exports=class{constructor(p){if(typeof p=="number"&&(p={max:p}),p||(p={}),p.max&&(typeof p.max!="number"||p.max<0))throw new TypeError("max must be a non-negative number");this[i]=p.max||1/0;const P=p.length||f;if(this[s]=typeof P!="function"?f:P,this[o]=p.stale||!1,p.maxAge&&typeof p.maxAge!="number")throw new TypeError("maxAge must be a number");this[u]=p.maxAge||0,this[l]=p.dispose,this[m]=p.noDisposeOnSet||!1,this[_]=p.updateAgeOnGet||!1,this.reset()}set max(p){if(typeof p!="number"||p<0)throw new TypeError("max must be a non-negative number");this[i]=p||1/0,N(this)}get max(){return this[i]}set allowStale(p){this[o]=!!p}get allowStale(){return this[o]}set maxAge(p){if(typeof p!="number")throw new TypeError("maxAge must be a non-negative number");this[u]=p,N(this)}get maxAge(){return this[u]}set lengthCalculator(p){typeof p!="function"&&(p=f),p!==this[s]&&(this[s]=p,this[g]=0,this[T].forEach(P=>{P.length=this[s](P.value,P.key),this[g]+=P.length})),N(this)}get lengthCalculator(){return this[s]}get length(){return this[g]}get itemCount(){return this[T].length}rforEach(p,P){P=P||this;for(let Z=this[T].tail;Z!==null;){const $=Z.prev;R(this,p,Z,P),Z=$}}forEach(p,P){P=P||this;for(let Z=this[T].head;Z!==null;){const $=Z.next;R(this,p,Z,P),Z=$}}keys(){return this[T].toArray().map(p=>p.key)}values(){return this[T].toArray().map(p=>p.value)}reset(){this[l]&&this[T]&&this[T].length&&this[T].forEach(p=>this[l](p.key,p.value)),this[b]=new Map,this[T]=new n,this[g]=0}dump(){return this[T].map(p=>!E(this,p)&&{k:p.key,v:p.value,e:p.now+(p.maxAge||0)}).toArray().filter(p=>p)}dumpLru(){return this[T]}set(p,P,Z){if((Z=Z||this[u])&&typeof Z!="number")throw new TypeError("maxAge must be a number");const $=Z?Date.now():0,h=this[s](P,p);if(this[b].has(p)){if(h>this[i])return F(this,this[b].get(p)),!1;const j=this[b].get(p).value;return this[l]&&(this[m]||this[l](p,j.value)),j.now=$,j.maxAge=Z,j.value=P,this[g]+=h-j.length,j.length=h,this.get(p),N(this),!0}const d=new M(p,P,h,$,Z);return d.length>this[i]?(this[l]&&this[l](p,P),!1):(this[g]+=d.length,this[T].unshift(d),this[b].set(p,this[T].head),N(this),!0)}has(p){if(!this[b].has(p))return!1;const P=this[b].get(p).value;return!E(this,P)}get(p){return S(this,p,!0)}peek(p){return S(this,p,!1)}pop(){const p=this[T].tail;return p?(F(this,p),p.value):null}del(p){F(this,this[b].get(p))}load(p){this.reset();const P=Date.now();for(let Z=p.length-1;Z>=0;Z--){const $=p[Z],h=$.e||0;if(h===0)this.set($.k,$.v);else{const d=h-P;d>0&&this.set($.k,$.v,d)}}}prune(){this[b].forEach((p,P)=>S(this,P,!1))}}},function(e,t,r){var n=r(225),i=r(226),g=i;g.v1=n,g.v4=i,e.exports=g},function(e,t,r){var n=r(37).Colorizer;e.exports=function(i){return n.addColors(i.colors||i),i}},function(e,t,r){var n={};e.exports=n,n.themes={};var i=r(10),g=n.styles=r(108),s=Object.defineProperties,o=new RegExp(/[\r\n]+/g);n.supportsColor=r(109).supportsColor,n.enabled===void 0&&(n.enabled=n.supportsColor()!==!1),n.enable=function(){n.enabled=!0},n.disable=function(){n.enabled=!1},n.stripColors=n.strip=function(E){return(""+E).replace(/\x1B\[\d+m/g,"")},n.stylize=function(E,N){return n.enabled?g[N].open+E+g[N].close:E+""};var u=/[|\\{}()[\]^$+*?.]/g;function l(E){var N=function F(){return _.apply(F,arguments)};return N._styles=E,N.__proto__=b,N}var m,T=(m={},g.grey=g.gray,Object.keys(g).forEach(function(E){g[E].closeRe=new RegExp(function(N){if(typeof N!="string")throw new TypeError("Expected a string");return N.replace(u,"\\$&")}(g[E].close),"g"),m[E]={get:function(){return l(this._styles.concat(E))}}}),m),b=s(function(){},T);function _(){var E=Array.prototype.slice.call(arguments),N=E.map(function(P){return P!==void 0&&P.constructor===String?P:i.inspect(P)}).join(" ");if(!n.enabled||!N)return N;for(var F=N.indexOf(`
35
+ `)!=-1,M=this._styles,R=M.length;R--;){var p=g[M[R]];N=p.open+N.replace(p.closeRe,p.open)+p.close,F&&(N=N.replace(o,function(P){return p.close+P+p.open}))}return N}n.setTheme=function(E){if(typeof E!="string")for(var N in E)(function(F){n[F]=function(M){if(typeof E[F]=="object"){var R=M;for(var p in E[F])R=n[E[F][p]](R);return R}return n[E[F]](M)}})(N);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var f=function(E,N){var F=N.split("");return(F=F.map(E)).join("")};for(var S in n.trap=r(111),n.zalgo=r(112),n.maps={},n.maps.america=r(113)(n),n.maps.zebra=r(114)(n),n.maps.rainbow=r(115)(n),n.maps.random=r(116)(n),n.maps)(function(E){n[E]=function(N){return f(n.maps[E],N)}})(S);s(n,function(){var E={};return Object.keys(T).forEach(function(N){E[N]={get:function(){return l([N])}}}),E}())},function(e,t){e.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}},function(e,t){typeof Object.create=="function"?e.exports=function(r,n){r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(r,n){r.super_=n;var i=function(){};i.prototype=n.prototype,r.prototype=new i,r.prototype.constructor=r}},function(e,t){var r={};e.exports=r;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach(function(i){var g=n[i],s=r[i]=[];s.open="\x1B["+g[0]+"m",s.close="\x1B["+g[1]+"m"})},function(e,t,r){(function(n){var i=r(15),g=r(110),s=n.env,o=void 0;function u(l){return function(m){return m!==0&&{level:m,hasBasic:!0,has256:m>=2,has16m:m>=3}}(function(m){if(o===!1)return 0;if(g("color=16m")||g("color=full")||g("color=truecolor"))return 3;if(g("color=256"))return 2;if(m&&!m.isTTY&&o!==!0)return 0;var T=o?1:0;if(n.platform==="win32"){var b=i.release().split(".");return Number(n.versions.node.split(".")[0])>=8&&Number(b[0])>=10&&Number(b[2])>=10586?Number(b[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(f){return f in s})||s.CI_NAME==="codeship"?1:T;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in s){var _=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return _>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test("xterm-256color")?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test("xterm-256color")||"COLORTERM"in s?1:T}(l))}g("no-color")||g("no-colors")||g("color=false")?o=!1:(g("color")||g("colors")||g("color=true")||g("color=always"))&&(o=!0),"FORCE_COLOR"in s&&(o=s.FORCE_COLOR.length===0||parseInt(s.FORCE_COLOR,10)!==0),e.exports={supportsColor:u,stdout:u(n.stdout),stderr:u(n.stderr)}}).call(this,r(2))},function(e,t,r){(function(n){e.exports=function(i,g){var s=(g=g||n.argv).indexOf("--"),o=/^-{1,2}/.test(i)?"":"--",u=g.indexOf(o+i);return u!==-1&&(s===-1||u<s)}}).call(this,r(2))},function(e,t){e.exports=function(r,n){var i="";r=(r=r||"Run the trap, drop the bass").split("");var g={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return r.forEach(function(s){s=s.toLowerCase();var o=g[s]||[" "],u=Math.floor(Math.random()*o.length);i+=g[s]!==void 0?g[s][u]:s}),i}},function(e,t){e.exports=function(r,n){r=r||" he is here ";var i={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},g=[].concat(i.up,i.down,i.mid);function s(u){return Math.floor(Math.random()*u)}function o(u){var l=!1;return g.filter(function(m){l=m===u}),l}return function(u,l){var m,T,b="";for(T in(l=l||{}).up=l.up===void 0||l.up,l.mid=l.mid===void 0||l.mid,l.down=l.down===void 0||l.down,l.size=l.size!==void 0?l.size:"maxi",u=u.split(""))if(!o(T)){switch(b+=u[T],m={up:0,down:0,mid:0},l.size){case"mini":m.up=s(8),m.mid=s(2),m.down=s(8);break;case"maxi":m.up=s(16)+3,m.mid=s(4)+1,m.down=s(64)+3;break;default:m.up=s(8)+1,m.mid=s(6)/2,m.down=s(8)+1}var _=["up","mid","down"];for(var f in _)for(var S=_[f],E=0;E<=m[S];E++)l[S]&&(b+=i[S][s(i[S].length)])}return b}(r,n)}},function(e,t){e.exports=function(r){return function(n,i,g){if(n===" ")return n;switch(i%3){case 0:return r.red(n);case 1:return r.white(n);case 2:return r.blue(n)}}}},function(e,t){e.exports=function(r){return function(n,i,g){return i%2==0?n:r.inverse(n)}}},function(e,t){e.exports=function(r){var n=["red","yellow","green","blue","magenta"];return function(i,g,s){return i===" "?i:r[n[g++%n.length]](i)}}},function(e,t){e.exports=function(r){var n=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(i,g,s){return i===" "?i:r[n[Math.round(Math.random()*(n.length-2))]](i)}}},function(e,t,r){Object.defineProperty(t,"cli",{value:r(118)}),Object.defineProperty(t,"npm",{value:r(119)}),Object.defineProperty(t,"syslog",{value:r(120)})},function(e,t,r){t.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},t.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}},function(e,t,r){t.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},t.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}},function(e,t,r){t.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},t.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}},function(e,t,r){var n=r(9);e.exports=n(function(i){return i.message=" ".concat(i.message),i})},function(e,t,r){function n(T,b){if(!(T instanceof b))throw new TypeError("Cannot call a class as a function")}function i(T,b){for(var _=0;_<b.length;_++){var f=b[_];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(T,f.key,f)}}var g=r(37).Colorizer,s=r(58).Padder,o=r(3),u=o.configs,l=o.MESSAGE,m=function(){function T(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(this,T),f.levels||(f.levels=u.npm.levels),this.colorizer=new g(f),this.padder=new s(f),this.options=f}var b,_;return b=T,(_=[{key:"transform",value:function(f,S){return this.colorizer.transform(this.padder.transform(f,S),S),f[l]="".concat(f.level,":").concat(f.message),f}}])&&i(b.prototype,_),T}();e.exports=function(T){return new m(T)},e.exports.Format=m},function(e,t,r){var n=r(9);function i(s){if(s.every(g))return function(o){for(var u=o,l=0;l<s.length;l++)if(!(u=s[l].transform(u,s[l].options)))return!1;return u}}function g(s){if(typeof s.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
36
+ `));return!0}e.exports=function(){for(var s=arguments.length,o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];var l=n(i(o)),m=l();return m.Format=l.Format,m},e.exports.cascade=i},function(e,t,r){(function(n){var i=r(9),g=r(3).MESSAGE,s=r(30);function o(u,l){return l instanceof n?l.toString("base64"):typeof l=="bigint"?l.toString():l}e.exports=i(function(u){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return u[g]=(l.stable?s.stableStringify:s)(u,l.replacer||o,l.space),u})}).call(this,r(4).Buffer)},function(e,t,r){t.byteLength=function(T){var b=l(T),_=b[0],f=b[1];return 3*(_+f)/4-f},t.toByteArray=function(T){for(var b,_=l(T),f=_[0],S=_[1],E=new g(function(R,p,P){return 3*(p+P)/4-P}(0,f,S)),N=0,F=S>0?f-4:f,M=0;M<F;M+=4)b=i[T.charCodeAt(M)]<<18|i[T.charCodeAt(M+1)]<<12|i[T.charCodeAt(M+2)]<<6|i[T.charCodeAt(M+3)],E[N++]=b>>16&255,E[N++]=b>>8&255,E[N++]=255&b;return S===2&&(b=i[T.charCodeAt(M)]<<2|i[T.charCodeAt(M+1)]>>4,E[N++]=255&b),S===1&&(b=i[T.charCodeAt(M)]<<10|i[T.charCodeAt(M+1)]<<4|i[T.charCodeAt(M+2)]>>2,E[N++]=b>>8&255,E[N++]=255&b),E},t.fromByteArray=function(T){for(var b,_=T.length,f=_%3,S=[],E=0,N=_-f;E<N;E+=16383)S.push(m(T,E,E+16383>N?N:E+16383));return f===1?(b=T[_-1],S.push(n[b>>2]+n[b<<4&63]+"==")):f===2&&(b=(T[_-2]<<8)+T[_-1],S.push(n[b>>10]+n[b>>4&63]+n[b<<2&63]+"=")),S.join("")};for(var n=[],i=[],g=typeof Uint8Array!="undefined"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)n[o]=s[o],i[s.charCodeAt(o)]=o;function l(T){var b=T.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=T.indexOf("=");return _===-1&&(_=b),[_,_===b?0:4-_%4]}function m(T,b,_){for(var f,S,E=[],N=b;N<_;N+=3)f=(T[N]<<16&16711680)+(T[N+1]<<8&65280)+(255&T[N+2]),E.push(n[(S=f)>>18&63]+n[S>>12&63]+n[S>>6&63]+n[63&S]);return E.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(r,n,i,g,s){var o,u,l=8*s-g-1,m=(1<<l)-1,T=m>>1,b=-7,_=i?s-1:0,f=i?-1:1,S=r[n+_];for(_+=f,o=S&(1<<-b)-1,S>>=-b,b+=l;b>0;o=256*o+r[n+_],_+=f,b-=8);for(u=o&(1<<-b)-1,o>>=-b,b+=g;b>0;u=256*u+r[n+_],_+=f,b-=8);if(o===0)o=1-T;else{if(o===m)return u?NaN:1/0*(S?-1:1);u+=Math.pow(2,g),o-=T}return(S?-1:1)*u*Math.pow(2,o-g)},t.write=function(r,n,i,g,s,o){var u,l,m,T=8*o-s-1,b=(1<<T)-1,_=b>>1,f=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=g?0:o-1,E=g?1:-1,N=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(l=isNaN(n)?1:0,u=b):(u=Math.floor(Math.log(n)/Math.LN2),n*(m=Math.pow(2,-u))<1&&(u--,m*=2),(n+=u+_>=1?f/m:f*Math.pow(2,1-_))*m>=2&&(u++,m/=2),u+_>=b?(l=0,u=b):u+_>=1?(l=(n*m-1)*Math.pow(2,s),u+=_):(l=n*Math.pow(2,_-1)*Math.pow(2,s),u=0));s>=8;r[i+S]=255&l,S+=E,l/=256,s-=8);for(u=u<<s|l,T+=s;T>0;r[i+S]=255&u,S+=E,u/=256,T-=8);r[i+S-E]|=128*N}},function(e,t,r){var n=r(9);e.exports=n(function(i,g){return g.message?(i.message="[".concat(g.label,"] ").concat(i.message),i):(i.label=g.label,i)})},function(e,t,r){var n=r(9),i=r(3).MESSAGE,g=r(30);e.exports=n(function(s){var o={};return s.message&&(o["@message"]=s.message,delete s.message),s.timestamp&&(o["@timestamp"]=s.timestamp,delete s.timestamp),o["@fields"]=s,s[i]=g(o),s})},function(e,t,r){var n=r(9);function i(s,o,u){var l,m,T,b=o.reduce(function(f,S){return f[S]=s[S],delete s[S],f},{}),_=Object.keys(s).reduce(function(f,S){return f[S]=s[S],delete s[S],f},{});return Object.assign(s,b,(T=_,(m=u)in(l={})?Object.defineProperty(l,m,{value:T,enumerable:!0,configurable:!0,writable:!0}):l[m]=T,l)),s}function g(s,o,u){return s[u]=o.reduce(function(l,m){return l[m]=s[m],delete s[m],l},{}),s}e.exports=n(function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u="metadata";o.key&&(u=o.key);var l=[];return o.fillExcept||o.fillWith||(l.push("level"),l.push("message")),o.fillExcept&&(l=o.fillExcept),l.length>0?i(s,l,u):o.fillWith?g(s,o.fillWith,u):s})},function(e,t,r){var n=r(10).inspect,i=r(9),g=r(3),s=g.LEVEL,o=g.MESSAGE,u=g.SPLAT;e.exports=i(function(l){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T=Object.assign({},l);return delete T[s],delete T[o],delete T[u],l[o]=n(T,!1,m.depth||null,m.colorize),l})},function(e,t,r){function n(s,o){for(var u=0;u<o.length;u++){var l=o[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(s,l.key,l)}}var i=r(3).MESSAGE,g=function(){function s(l){(function(m,T){if(!(m instanceof T))throw new TypeError("Cannot call a class as a function")})(this,s),this.template=l}var o,u;return o=s,(u=[{key:"transform",value:function(l){return l[i]=this.template(l),l}}])&&n(o.prototype,u),s}();e.exports=function(s){return new g(s)},e.exports.Printf=e.exports.Format=g},function(e,t,r){var n=r(9),i=r(3).MESSAGE,g=r(30);e.exports=n(function(s){var o=g(Object.assign({},s,{level:void 0,message:void 0,splat:void 0})),u=s.padding&&s.padding[s.level]||"";return s[i]=o!=="{}"?"".concat(s.level,":").concat(u," ").concat(s.message," ").concat(o):"".concat(s.level,":").concat(u," ").concat(s.message),s})},function(e,t,r){function n(T){return function(b){if(Array.isArray(b))return i(b)}(T)||function(b){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(b))return Array.from(b)}(T)||function(b,_){if(!!b){if(typeof b=="string")return i(b,_);var f=Object.prototype.toString.call(b).slice(8,-1);if(f==="Object"&&b.constructor&&(f=b.constructor.name),f==="Map"||f==="Set")return Array.from(b);if(f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return i(b,_)}}(T)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
37
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function i(T,b){(b==null||b>T.length)&&(b=T.length);for(var _=0,f=new Array(b);_<b;_++)f[_]=T[_];return f}function g(T,b){for(var _=0;_<b.length;_++){var f=b[_];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(T,f.key,f)}}var s=r(10),o=r(3).SPLAT,u=/%[scdjifoO%]/g,l=/%%/g,m=function(){function T(f){(function(S,E){if(!(S instanceof E))throw new TypeError("Cannot call a class as a function")})(this,T),this.options=f}var b,_;return b=T,(_=[{key:"_splat",value:function(f,S){var E=f.message,N=f[o]||f.splat||[],F=E.match(l),M=F&&F.length||0,R=S.length-M-N.length,p=R<0?N.splice(R,-1*R):[],P=p.length;if(P)for(var Z=0;Z<P;Z++)Object.assign(f,p[Z]);return f.message=s.format.apply(s,[E].concat(n(N))),f}},{key:"transform",value:function(f){var S=f.message,E=f[o]||f.splat;if(!E||!E.length)return f;var N=S&&S.match&&S.match(u);if(!N&&(E||E.length)){var F=E.length>1?E.splice(0):E,M=F.length;if(M)for(var R=0;R<M;R++)Object.assign(f,F[R]);return f}return N?this._splat(f,N):f}}])&&g(b.prototype,_),T}();e.exports=function(T){return new m(T)}},function(e,t,r){var n=r(135),i=r(9);e.exports=i(function(g){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s.format&&(g.timestamp=typeof s.format=="function"?s.format():n.format(new Date,s.format)),g.timestamp||(g.timestamp=new Date().toISOString()),s.alias&&(g[s.alias]=g.timestamp),g})},function(e,t,r){r.r(t),r.d(t,"assign",function(){return u}),r.d(t,"format",function(){return d}),r.d(t,"parse",function(){return j}),r.d(t,"defaultI18n",function(){return b}),r.d(t,"setGlobalDateI18n",function(){return f}),r.d(t,"setGlobalDateMasks",function(){return h});var n=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,i="[^\\s]+",g=/\[([^]*?)\]/gm;function s(x,B){for(var U=[],O=0,A=x.length;O<A;O++)U.push(x[O].substr(0,B));return U}var o=function(x){return function(B,U){var O=U[x].map(function(A){return A.toLowerCase()}).indexOf(B.toLowerCase());return O>-1?O:null}};function u(x){for(var B=[],U=1;U<arguments.length;U++)B[U-1]=arguments[U];for(var O=0,A=B;O<A.length;O++){var D=A[O];for(var w in D)x[w]=D[w]}return x}var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"],T=s(m,3),b={dayNamesShort:s(l,3),dayNames:l,monthNamesShort:T,monthNames:m,amPm:["am","pm"],DoFn:function(x){return x+["th","st","nd","rd"][x%10>3?0:(x-x%10!=10?1:0)*x%10]}},_=u({},b),f=function(x){return _=u(_,x)},S=function(x){return x.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},E=function(x,B){for(B===void 0&&(B=2),x=String(x);x.length<B;)x="0"+x;return x},N={D:function(x){return String(x.getDate())},DD:function(x){return E(x.getDate())},Do:function(x,B){return B.DoFn(x.getDate())},d:function(x){return String(x.getDay())},dd:function(x){return E(x.getDay())},ddd:function(x,B){return B.dayNamesShort[x.getDay()]},dddd:function(x,B){return B.dayNames[x.getDay()]},M:function(x){return String(x.getMonth()+1)},MM:function(x){return E(x.getMonth()+1)},MMM:function(x,B){return B.monthNamesShort[x.getMonth()]},MMMM:function(x,B){return B.monthNames[x.getMonth()]},YY:function(x){return E(String(x.getFullYear()),4).substr(2)},YYYY:function(x){return E(x.getFullYear(),4)},h:function(x){return String(x.getHours()%12||12)},hh:function(x){return E(x.getHours()%12||12)},H:function(x){return String(x.getHours())},HH:function(x){return E(x.getHours())},m:function(x){return String(x.getMinutes())},mm:function(x){return E(x.getMinutes())},s:function(x){return String(x.getSeconds())},ss:function(x){return E(x.getSeconds())},S:function(x){return String(Math.round(x.getMilliseconds()/100))},SS:function(x){return E(Math.round(x.getMilliseconds()/10),2)},SSS:function(x){return E(x.getMilliseconds(),3)},a:function(x,B){return x.getHours()<12?B.amPm[0]:B.amPm[1]},A:function(x,B){return x.getHours()<12?B.amPm[0].toUpperCase():B.amPm[1].toUpperCase()},ZZ:function(x){var B=x.getTimezoneOffset();return(B>0?"-":"+")+E(100*Math.floor(Math.abs(B)/60)+Math.abs(B)%60,4)},Z:function(x){var B=x.getTimezoneOffset();return(B>0?"-":"+")+E(Math.floor(Math.abs(B)/60),2)+":"+E(Math.abs(B)%60,2)}},F=function(x){return+x-1},M=[null,"[1-9]\\d?"],R=[null,i],p=["isPm",i,function(x,B){var U=x.toLowerCase();return U===B.amPm[0]?0:U===B.amPm[1]?1:null}],P=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(x){var B=(x+"").match(/([+-]|\d\d)/gi);if(B){var U=60*+B[1]+parseInt(B[2],10);return B[0]==="+"?U:-U}return 0}],Z={D:["day","[1-9]\\d?"],DD:["day","\\d\\d"],Do:["day","[1-9]\\d?"+i,function(x){return parseInt(x,10)}],M:["month","[1-9]\\d?",F],MM:["month","\\d\\d",F],YY:["year","\\d\\d",function(x){var B=+(""+new Date().getFullYear()).substr(0,2);return+(""+(+x>68?B-1:B)+x)}],h:["hour","[1-9]\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","[1-9]\\d?"],HH:["hour","\\d\\d"],m:["minute","[1-9]\\d?"],mm:["minute","\\d\\d"],s:["second","[1-9]\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(x){return 100*+x}],SS:["millisecond","\\d\\d",function(x){return 10*+x}],SSS:["millisecond","\\d{3}"],d:M,dd:M,ddd:R,dddd:R,MMM:["month",i,o("monthNamesShort")],MMMM:["month",i,o("monthNames")],a:p,A:p,ZZ:P,Z:P},$={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},h=function(x){return u($,x)},d=function(x,B,U){if(B===void 0&&(B=$.default),U===void 0&&(U={}),typeof x=="number"&&(x=new Date(x)),Object.prototype.toString.call(x)!=="[object Date]"||isNaN(x.getTime()))throw new Error("Invalid Date pass to format");var O=[];B=(B=$[B]||B).replace(g,function(D,w){return O.push(w),"@@@"});var A=u(u({},_),U);return(B=B.replace(n,function(D){return N[D](x,A)})).replace(/@@@/g,function(){return O.shift()})};function j(x,B,U){if(U===void 0&&(U={}),typeof B!="string")throw new Error("Invalid format in fecha parse");if(B=$[B]||B,x.length>1e3)return null;var O={year:new Date().getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},A=[],D=[],w=B.replace(g,function(J,ne){return D.push(S(ne)),"@@@"}),c={},L={};w=S(w).replace(n,function(J){var ne=Z[J],oe=ne[0],he=ne[1],fe=ne[3];if(c[oe])throw new Error("Invalid format. "+oe+" specified twice in format");return c[oe]=!0,fe&&(L[fe]=!0),A.push(ne),"("+he+")"}),Object.keys(L).forEach(function(J){if(!c[J])throw new Error("Invalid format. "+J+" is required in specified format")}),w=w.replace(/@@@/g,function(){return D.shift()});var k=x.match(new RegExp(w,"i"));if(!k)return null;for(var Y=u(u({},_),U),K=1;K<k.length;K++){var Q=A[K-1],z=Q[0],V=Q[2],v=V?V(k[K],Y):+k[K];if(v==null)return null;O[z]=v}O.isPm===1&&O.hour!=null&&+O.hour!=12?O.hour=+O.hour+12:O.isPm===0&&+O.hour==12&&(O.hour=0);for(var I=new Date(O.year,O.month,O.day,O.hour,O.minute,O.second,O.millisecond),W=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],ee=(K=0,W.length);K<ee;K++)if(c[W[K][0]]&&O[W[K][0]]!==I[W[K][1]]())return null;return O.timezoneOffset==null?I:new Date(Date.UTC(O.year,O.month,O.day,O.hour,O.minute-O.timezoneOffset,O.second,O.millisecond))}var y={format:d,parse:j,defaultI18n:b,setGlobalDateI18n:f,setGlobalDateMasks:h};t.default=y},function(e,t,r){var n=r(57),i=r(9),g=r(3).MESSAGE;e.exports=i(function(s,o){return o.level!==!1&&(s.level=n.strip(s.level)),o.message!==!1&&(s.message=n.strip(s.message)),o.raw!==!1&&s[g]&&(s[g]=n.strip(s[g])),s})},function(e){e.exports=JSON.parse('{"name":"winston","description":"A logger for just about everything.","version":"3.3.3","author":"Charlie Robbins <charlie.robbins@gmail.com>","maintainers":["Jarrett Cruger <jcrugzz@gmail.com>","Chris Alderson <chrisalderson@protonmail.com>","David Hyde <dabh@stanford.edu>"],"repository":{"type":"git","url":"https://github.com/winstonjs/winston.git"},"keywords":["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"dependencies":{"async":"^3.1.0","@dabh/diagnostics":"^2.0.2","is-stream":"^2.0.0","logform":"^2.2.0","one-time":"^1.0.0","readable-stream":"^3.4.0","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.4.0"},"devDependencies":{"@babel/cli":"^7.10.3","@babel/core":"^7.10.3","@babel/preset-env":"^7.10.3","@types/node":"^14.0.13","abstract-winston-transport":"^0.5.1","assume":"^2.2.0","colors":"^1.4.0","cross-spawn-async":"^2.2.5","eslint-config-populist":"^4.2.0","hock":"^1.4.1","mocha":"^8.0.1","nyc":"^15.1.0","rimraf":"^3.0.2","split2":"^3.1.1","std-mocks":"^1.0.1","through2":"^3.0.1","winston-compat":"^0.1.5"},"main":"./lib/winston","browser":"./dist/winston","types":"./index.d.ts","scripts":{"lint":"populist lib/*.js lib/winston/*.js lib/winston/**/*.js","pretest":"npm run lint","test":"nyc --reporter=text --reporter lcov npm run test:mocha","test:mocha":"mocha test/*.test.js test/**/*.test.js --exit","build":"./node_modules/.bin/rimraf dist && babel lib -d dist","prepublishOnly":"npm run build"},"engines":{"node":">= 6.4.0"},"license":"MIT"}')},function(e,t,r){Object.defineProperty(t,"Console",{configurable:!0,enumerable:!0,get:function(){return r(139)}}),Object.defineProperty(t,"File",{configurable:!0,enumerable:!0,get:function(){return r(148)}}),Object.defineProperty(t,"Http",{configurable:!0,enumerable:!0,get:function(){return r(188)}}),Object.defineProperty(t,"Stream",{configurable:!0,enumerable:!0,get:function(){return r(200)}})},function(e,t,r){(function(n){function i(E){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N})(E)}function g(E,N){if(!(E instanceof N))throw new TypeError("Cannot call a class as a function")}function s(E,N){for(var F=0;F<N.length;F++){var M=N[F];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(E,M.key,M)}}function o(E,N){return(o=Object.setPrototypeOf||function(F,M){return F.__proto__=M,F})(E,N)}function u(E){var N=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var F,M=m(E);if(N){var R=m(this).constructor;F=Reflect.construct(M,arguments,R)}else F=M.apply(this,arguments);return l(this,F)}}function l(E,N){return!N||i(N)!=="object"&&typeof N!="function"?function(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}(E):N}function m(E){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)})(E)}var T=r(15),b=r(3),_=b.LEVEL,f=b.MESSAGE,S=r(17);e.exports=function(E){(function(p,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(P&&P.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),P&&o(p,P)})(R,E);var N,F,M=u(R);function R(){var p,P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return g(this,R),(p=M.call(this,P)).name=P.name||"console",p.stderrLevels=p._stringArrayToSet(P.stderrLevels),p.consoleWarnLevels=p._stringArrayToSet(P.consoleWarnLevels),p.eol=P.eol||T.EOL,p.setMaxListeners(30),p}return N=R,(F=[{key:"log",value:function(p,P){var Z=this;return n(function(){return Z.emit("logged",p)}),this.stderrLevels[p[_]]?(console._stderr?console._stderr.write("".concat(p[f]).concat(this.eol)):console.error(p[f]),void(P&&P())):this.consoleWarnLevels[p[_]]?(console._stderr?console._stderr.write("".concat(p[f]).concat(this.eol)):console.warn(p[f]),void(P&&P())):(console._stdout?console._stdout.write("".concat(p[f]).concat(this.eol)):console.log(p[f]),void(P&&P()))}},{key:"_stringArrayToSet",value:function(p,P){if(!p)return{};if(P=P||"Cannot make set from type other than Array of string elements",!Array.isArray(p))throw new Error(P);return p.reduce(function(Z,$){if(typeof $!="string")throw new Error(P);return Z[$]=!0,Z},{})}}])&&s(N.prototype,F),R}(S)}).call(this,r(12).setImmediate)},function(e,t,r){(function(n,i){(function(g,s){if(!g.setImmediate){var o,u,l,m,T,b=1,_={},f=!1,S=g.document,E=Object.getPrototypeOf&&Object.getPrototypeOf(g);E=E&&E.setTimeout?E:g,{}.toString.call(g.process)==="[object process]"?o=function(M){i.nextTick(function(){F(M)})}:function(){if(g.postMessage&&!g.importScripts){var M=!0,R=g.onmessage;return g.onmessage=function(){M=!1},g.postMessage("","*"),g.onmessage=R,M}}()?(m="setImmediate$"+Math.random()+"$",T=function(M){M.source===g&&typeof M.data=="string"&&M.data.indexOf(m)===0&&F(+M.data.slice(m.length))},g.addEventListener?g.addEventListener("message",T,!1):g.attachEvent("onmessage",T),o=function(M){g.postMessage(m+M,"*")}):g.MessageChannel?((l=new MessageChannel).port1.onmessage=function(M){F(M.data)},o=function(M){l.port2.postMessage(M)}):S&&"onreadystatechange"in S.createElement("script")?(u=S.documentElement,o=function(M){var R=S.createElement("script");R.onreadystatechange=function(){F(M),R.onreadystatechange=null,u.removeChild(R),R=null},u.appendChild(R)}):o=function(M){setTimeout(F,0,M)},E.setImmediate=function(M){typeof M!="function"&&(M=new Function(""+M));for(var R=new Array(arguments.length-1),p=0;p<R.length;p++)R[p]=arguments[p+1];var P={callback:M,args:R};return _[b]=P,o(b),b++},E.clearImmediate=N}function N(M){delete _[M]}function F(M){if(f)setTimeout(F,0,M);else{var R=_[M];if(R){f=!0;try{(function(p){var P=p.callback,Z=p.args;switch(Z.length){case 0:P();break;case 1:P(Z[0]);break;case 2:P(Z[0],Z[1]);break;case 3:P(Z[0],Z[1],Z[2]);break;default:P.apply(void 0,Z)}})(R)}finally{N(M),f=!1}}}}})(typeof self=="undefined"?n===void 0?this:n:self)}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(60)},function(e,t,r){(function(n,i){var g=r(13);e.exports=R;var s,o=r(38);R.ReadableState=M,r(18).EventEmitter;var u=function(w,c){return w.listeners(c).length},l=r(61),m=r(40).Buffer,T=n.Uint8Array||function(){},b=Object.create(r(14));b.inherits=r(7);var _=r(143),f=void 0;f=_&&_.debuglog?_.debuglog("stream"):function(){};var S,E=r(144),N=r(62);b.inherits(R,l);var F=["error","close","destroy","pause","resume"];function M(w,c){w=w||{};var L=c instanceof(s=s||r(31));this.objectMode=!!w.objectMode,L&&(this.objectMode=this.objectMode||!!w.readableObjectMode);var k=w.highWaterMark,Y=w.readableHighWaterMark,K=this.objectMode?16:16384;this.highWaterMark=k||k===0?k:L&&(Y||Y===0)?Y:K,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new E,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=w.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,w.encoding&&(S||(S=r(19).StringDecoder),this.decoder=new S(w.encoding),this.encoding=w.encoding)}function R(w){if(s=s||r(31),!(this instanceof R))return new R(w);this._readableState=new M(w,this),this.readable=!0,w&&(typeof w.read=="function"&&(this._read=w.read),typeof w.destroy=="function"&&(this._destroy=w.destroy)),l.call(this)}function p(w,c,L,k,Y){var K,Q=w._readableState;return c===null?(Q.reading=!1,function(z,V){if(!V.ended){if(V.decoder){var v=V.decoder.end();v&&v.length&&(V.buffer.push(v),V.length+=V.objectMode?1:v.length)}V.ended=!0,$(z)}}(w,Q)):(Y||(K=function(z,V){var v;I=V,m.isBuffer(I)||I instanceof T||typeof V=="string"||V===void 0||z.objectMode||(v=new TypeError("Invalid non-string/buffer chunk"));var I;return v}(Q,c)),K?w.emit("error",K):Q.objectMode||c&&c.length>0?(typeof c=="string"||Q.objectMode||Object.getPrototypeOf(c)===m.prototype||(c=function(z){return m.from(z)}(c)),k?Q.endEmitted?w.emit("error",new Error("stream.unshift() after end event")):P(w,Q,c,!0):Q.ended?w.emit("error",new Error("stream.push() after EOF")):(Q.reading=!1,Q.decoder&&!L?(c=Q.decoder.write(c),Q.objectMode||c.length!==0?P(w,Q,c,!1):d(w,Q)):P(w,Q,c,!1))):k||(Q.reading=!1)),function(z){return!z.ended&&(z.needReadable||z.length<z.highWaterMark||z.length===0)}(Q)}function P(w,c,L,k){c.flowing&&c.length===0&&!c.sync?(w.emit("data",L),w.read(0)):(c.length+=c.objectMode?1:L.length,k?c.buffer.unshift(L):c.buffer.push(L),c.needReadable&&$(w)),d(w,c)}Object.defineProperty(R.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(w){this._readableState&&(this._readableState.destroyed=w)}}),R.prototype.destroy=N.destroy,R.prototype._undestroy=N.undestroy,R.prototype._destroy=function(w,c){this.push(null),c(w)},R.prototype.push=function(w,c){var L,k=this._readableState;return k.objectMode?L=!0:typeof w=="string"&&((c=c||k.defaultEncoding)!==k.encoding&&(w=m.from(w,c),c=""),L=!0),p(this,w,c,!1,L)},R.prototype.unshift=function(w){return p(this,w,null,!0,!1)},R.prototype.isPaused=function(){return this._readableState.flowing===!1},R.prototype.setEncoding=function(w){return S||(S=r(19).StringDecoder),this._readableState.decoder=new S(w),this._readableState.encoding=w,this};function Z(w,c){return w<=0||c.length===0&&c.ended?0:c.objectMode?1:w!=w?c.flowing&&c.length?c.buffer.head.data.length:c.length:(w>c.highWaterMark&&(c.highWaterMark=function(L){return L>=8388608?L=8388608:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}(w)),w<=c.length?w:c.ended?c.length:(c.needReadable=!0,0))}function $(w){var c=w._readableState;c.needReadable=!1,c.emittedReadable||(f("emitReadable",c.flowing),c.emittedReadable=!0,c.sync?g.nextTick(h,w):h(w))}function h(w){f("emit readable"),w.emit("readable"),B(w)}function d(w,c){c.readingMore||(c.readingMore=!0,g.nextTick(j,w,c))}function j(w,c){for(var L=c.length;!c.reading&&!c.flowing&&!c.ended&&c.length<c.highWaterMark&&(f("maybeReadMore read 0"),w.read(0),L!==c.length);)L=c.length;c.readingMore=!1}function y(w){f("readable nexttick read 0"),w.read(0)}function x(w,c){c.reading||(f("resume read 0"),w.read(0)),c.resumeScheduled=!1,c.awaitDrain=0,w.emit("resume"),B(w),c.flowing&&!c.reading&&w.read(0)}function B(w){var c=w._readableState;for(f("flow",c.flowing);c.flowing&&w.read()!==null;);}function U(w,c){return c.length===0?null:(c.objectMode?L=c.buffer.shift():!w||w>=c.length?(L=c.decoder?c.buffer.join(""):c.buffer.length===1?c.buffer.head.data:c.buffer.concat(c.length),c.buffer.clear()):L=function(k,Y,K){var Q;return k<Y.head.data.length?(Q=Y.head.data.slice(0,k),Y.head.data=Y.head.data.slice(k)):Q=k===Y.head.data.length?Y.shift():K?function(z,V){var v=V.head,I=1,W=v.data;for(z-=W.length;v=v.next;){var ee=v.data,J=z>ee.length?ee.length:z;if(J===ee.length?W+=ee:W+=ee.slice(0,z),(z-=J)===0){J===ee.length?(++I,v.next?V.head=v.next:V.head=V.tail=null):(V.head=v,v.data=ee.slice(J));break}++I}return V.length-=I,W}(k,Y):function(z,V){var v=m.allocUnsafe(z),I=V.head,W=1;for(I.data.copy(v),z-=I.data.length;I=I.next;){var ee=I.data,J=z>ee.length?ee.length:z;if(ee.copy(v,v.length-z,0,J),(z-=J)===0){J===ee.length?(++W,I.next?V.head=I.next:V.head=V.tail=null):(V.head=I,I.data=ee.slice(J));break}++W}return V.length-=W,v}(k,Y),Q}(w,c.buffer,c.decoder),L);var L}function O(w){var c=w._readableState;if(c.length>0)throw new Error('"endReadable()" called on non-empty stream');c.endEmitted||(c.ended=!0,g.nextTick(A,c,w))}function A(w,c){w.endEmitted||w.length!==0||(w.endEmitted=!0,c.readable=!1,c.emit("end"))}function D(w,c){for(var L=0,k=w.length;L<k;L++)if(w[L]===c)return L;return-1}R.prototype.read=function(w){f("read",w),w=parseInt(w,10);var c=this._readableState,L=w;if(w!==0&&(c.emittedReadable=!1),w===0&&c.needReadable&&(c.length>=c.highWaterMark||c.ended))return f("read: emitReadable",c.length,c.ended),c.length===0&&c.ended?O(this):$(this),null;if((w=Z(w,c))===0&&c.ended)return c.length===0&&O(this),null;var k,Y=c.needReadable;return f("need readable",Y),(c.length===0||c.length-w<c.highWaterMark)&&f("length less than watermark",Y=!0),c.ended||c.reading?f("reading or ended",Y=!1):Y&&(f("do read"),c.reading=!0,c.sync=!0,c.length===0&&(c.needReadable=!0),this._read(c.highWaterMark),c.sync=!1,c.reading||(w=Z(L,c))),(k=w>0?U(w,c):null)===null?(c.needReadable=!0,w=0):c.length-=w,c.length===0&&(c.ended||(c.needReadable=!0),L!==w&&c.ended&&O(this)),k!==null&&this.emit("data",k),k},R.prototype._read=function(w){this.emit("error",new Error("_read() is not implemented"))},R.prototype.pipe=function(w,c){var L=this,k=this._readableState;switch(k.pipesCount){case 0:k.pipes=w;break;case 1:k.pipes=[k.pipes,w];break;default:k.pipes.push(w)}k.pipesCount+=1,f("pipe count=%d opts=%j",k.pipesCount,c);var Y=(!c||c.end!==!1)&&w!==i.stdout&&w!==i.stderr?Q:ne;function K(oe,he){f("onunpipe"),oe===L&&he&&he.hasUnpiped===!1&&(he.hasUnpiped=!0,f("cleanup"),w.removeListener("close",ee),w.removeListener("finish",J),w.removeListener("drain",z),w.removeListener("error",W),w.removeListener("unpipe",K),L.removeListener("end",Q),L.removeListener("end",ne),L.removeListener("data",I),V=!0,!k.awaitDrain||w._writableState&&!w._writableState.needDrain||z())}function Q(){f("onend"),w.end()}k.endEmitted?g.nextTick(Y):L.once("end",Y),w.on("unpipe",K);var z=function(oe){return function(){var he=oe._readableState;f("pipeOnDrain",he.awaitDrain),he.awaitDrain&&he.awaitDrain--,he.awaitDrain===0&&u(oe,"data")&&(he.flowing=!0,B(oe))}}(L);w.on("drain",z);var V=!1,v=!1;function I(oe){f("ondata"),v=!1,w.write(oe)!==!1||v||((k.pipesCount===1&&k.pipes===w||k.pipesCount>1&&D(k.pipes,w)!==-1)&&!V&&(f("false write response, pause",L._readableState.awaitDrain),L._readableState.awaitDrain++,v=!0),L.pause())}function W(oe){f("onerror",oe),ne(),w.removeListener("error",W),u(w,"error")===0&&w.emit("error",oe)}function ee(){w.removeListener("finish",J),ne()}function J(){f("onfinish"),w.removeListener("close",ee),ne()}function ne(){f("unpipe"),L.unpipe(w)}return L.on("data",I),function(oe,he,fe){if(typeof oe.prependListener=="function")return oe.prependListener(he,fe);oe._events&&oe._events[he]?o(oe._events[he])?oe._events[he].unshift(fe):oe._events[he]=[fe,oe._events[he]]:oe.on(he,fe)}(w,"error",W),w.once("close",ee),w.once("finish",J),w.emit("pipe",L),k.flowing||(f("pipe resume"),L.resume()),w},R.prototype.unpipe=function(w){var c=this._readableState,L={hasUnpiped:!1};if(c.pipesCount===0)return this;if(c.pipesCount===1)return w&&w!==c.pipes||(w||(w=c.pipes),c.pipes=null,c.pipesCount=0,c.flowing=!1,w&&w.emit("unpipe",this,L)),this;if(!w){var k=c.pipes,Y=c.pipesCount;c.pipes=null,c.pipesCount=0,c.flowing=!1;for(var K=0;K<Y;K++)k[K].emit("unpipe",this,L);return this}var Q=D(c.pipes,w);return Q===-1||(c.pipes.splice(Q,1),c.pipesCount-=1,c.pipesCount===1&&(c.pipes=c.pipes[0]),w.emit("unpipe",this,L)),this},R.prototype.on=function(w,c){var L=l.prototype.on.call(this,w,c);if(w==="data")this._readableState.flowing!==!1&&this.resume();else if(w==="readable"){var k=this._readableState;k.endEmitted||k.readableListening||(k.readableListening=k.needReadable=!0,k.emittedReadable=!1,k.reading?k.length&&$(this):g.nextTick(y,this))}return L},R.prototype.addListener=R.prototype.on,R.prototype.resume=function(){var w=this._readableState;return w.flowing||(f("resume"),w.flowing=!0,function(c,L){L.resumeScheduled||(L.resumeScheduled=!0,g.nextTick(x,c,L))}(this,w)),this},R.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},R.prototype.wrap=function(w){var c=this,L=this._readableState,k=!1;for(var Y in w.on("end",function(){if(f("wrapped end"),L.decoder&&!L.ended){var Q=L.decoder.end();Q&&Q.length&&c.push(Q)}c.push(null)}),w.on("data",function(Q){f("wrapped data"),L.decoder&&(Q=L.decoder.write(Q)),L.objectMode&&Q==null||(L.objectMode||Q&&Q.length)&&(c.push(Q)||(k=!0,w.pause()))}),w)this[Y]===void 0&&typeof w[Y]=="function"&&(this[Y]=function(Q){return function(){return w[Q].apply(w,arguments)}}(Y));for(var K=0;K<F.length;K++)w.on(F[K],this.emit.bind(this,F[K]));return this._read=function(Q){f("wrapped _read",Q),k&&(k=!1,w.resume())},this},Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),R._fromList=U}).call(this,r(5),r(2))},function(e,t){},function(e,t,r){var n=r(40).Buffer,i=r(145);e.exports=function(){function g(){(function(s,o){if(!(s instanceof o))throw new TypeError("Cannot call a class as a function")})(this,g),this.head=null,this.tail=null,this.length=0}return g.prototype.push=function(s){var o={data:s,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length},g.prototype.unshift=function(s){var o={data:s,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length},g.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},g.prototype.clear=function(){this.head=this.tail=null,this.length=0},g.prototype.join=function(s){if(this.length===0)return"";for(var o=this.head,u=""+o.data;o=o.next;)u+=s+o.data;return u},g.prototype.concat=function(s){if(this.length===0)return n.alloc(0);if(this.length===1)return this.head.data;for(var o,u,l,m=n.allocUnsafe(s>>>0),T=this.head,b=0;T;)o=T.data,u=m,l=b,o.copy(u,l),b+=T.data.length,T=T.next;return m},g}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var g=i.inspect({length:this.length});return this.constructor.name+" "+g})},function(e,t){},function(e,t,r){var n=r(4),i=n.Buffer;function g(o,u){for(var l in o)u[l]=o[l]}function s(o,u,l){return i(o,u,l)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(g(n,t),t.Buffer=s),g(i,s),s.from=function(o,u,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,u,l)},s.alloc=function(o,u,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var m=i(o);return u!==void 0?typeof l=="string"?m.fill(u,l):m.fill(u):m.fill(0),m},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)}},function(e,t,r){var n=r(10),i=r(3).LEVEL,g=r(17),s=e.exports=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(g.call(this,o),!o.transport||typeof o.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");function u(l){this.emit("error",l,this.transport)}this.transport=o.transport,this.level=this.level||o.transport.level,this.handleExceptions=this.handleExceptions||o.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=u.bind(this),this.transport.on("error",this.transport.__winstonError))};n.inherits(s,g),s.prototype._write=function(o,u,l){if(this.silent||o.exception===!0&&!this.handleExceptions)return l(null);(!this.level||this.levels[this.level]>=this.levels[o[i]])&&this.transport.log(o[i],o.message,o,this._nop),l(null)},s.prototype._writev=function(o,u){for(var l=0;l<o.length;l++)this._accept(o[l])&&(this.transport.log(o[l].chunk[i],o[l].chunk.message,o[l].chunk,this._nop),o[l].callback());return u(null)},s.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
38
+ `))},s.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,r){(function(n,i){function g(h){return(g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d})(h)}function s(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}function o(h,d){for(var j=0;j<d.length;j++){var y=d[j];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}function u(h,d){return(u=Object.setPrototypeOf||function(j,y){return j.__proto__=y,j})(h,d)}function l(h){var d=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var j,y=b(h);if(d){var x=b(this).constructor;j=Reflect.construct(y,arguments,x)}else j=y.apply(this,arguments);return m(this,j)}}function m(h,d){return!d||g(d)!=="object"&&typeof d!="function"?T(h):d}function T(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function b(h){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)})(h)}var _=r(63),f=r(53),S=r(149),E=r(159),N=r(3).MESSAGE,F=r(28),M=F.Stream,R=F.PassThrough,p=r(17),P=r(33)("winston:file"),Z=r(15),$=r(187);e.exports=function(h){(function(B,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function");B.prototype=Object.create(U&&U.prototype,{constructor:{value:B,writable:!0,configurable:!0}}),U&&u(B,U)})(x,h);var d,j,y=l(x);function x(){var B,U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};function O(A){for(var D=arguments.length,w=new Array(D>1?D-1:0),c=1;c<D;c++)w[c-1]=arguments[c];w.slice(1).forEach(function(L){if(U[L])throw new Error("Cannot set ".concat(L," and ").concat(A," together"))})}if(s(this,x),(B=y.call(this,U)).name=U.name||"file",B._stream=new R,B._stream.setMaxListeners(30),B._onError=B._onError.bind(T(B)),U.filename||U.dirname)O("filename or dirname","stream"),B._basename=B.filename=U.filename?f.basename(U.filename):"winston.log",B.dirname=U.dirname||f.dirname(U.filename),B.options=U.options||{flags:"a"};else{if(!U.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),O("stream","filename","maxsize"),B._dest=B._stream.pipe(B._setupStream(U.stream)),B.dirname=f.dirname(B._dest.path)}return B.maxsize=U.maxsize||null,B.rotationFormat=U.rotationFormat||!1,B.zippedArchive=U.zippedArchive||!1,B.maxFiles=U.maxFiles||null,B.eol=U.eol||Z.EOL,B.tailable=U.tailable||!1,B._size=0,B._pendingSize=0,B._created=0,B._drain=!1,B._opening=!1,B._ending=!1,B.dirname&&B._createLogDirIfNotExist(B.dirname),B.open(),B}return d=x,(j=[{key:"finishIfEnding",value:function(){var B=this;this._ending&&(this._opening?this.once("open",function(){B._stream.once("finish",function(){return B.emit("finish")}),n(function(){return B._stream.end()})}):(this._stream.once("finish",function(){return B.emit("finish")}),n(function(){return B._stream.end()})))}},{key:"log",value:function(B){var U=this,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};if(this.silent)return O(),!0;if(this._drain)this._stream.once("drain",function(){U._drain=!1,U.log(B,O)});else{if(!this._rotate){var A="".concat(B[N]).concat(this.eol),D=i.byteLength(A);this._pendingSize+=D,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var w=this._stream.write(A,c.bind(this));return w?O():(this._drain=!0,this._stream.once("drain",function(){U._drain=!1,O()})),P("written",w,this._drain),this.finishIfEnding(),w}this._stream.once("rotate",function(){U._rotate=!1,U.log(B,O)})}function c(){var L=this;this._size+=D,this._pendingSize-=D,P("logged %s %s",this._size,A),this.emit("logged",B),this._opening||this._needsNewFile()&&(this._rotate=!0,this._endStream(function(){return L._rotateFile()}))}}},{key:"query",value:function(B,U){typeof B=="function"&&(U=B,B={}),B=function(k){return(k=k||{}).rows=k.rows||k.limit||10,k.start=k.start||0,k.until=k.until||new Date,g(k.until)!=="object"&&(k.until=new Date(k.until)),k.from=k.from||k.until-864e5,g(k.from)!=="object"&&(k.from=new Date(k.from)),k.order=k.order||"desc",k}(B);var O=f.join(this.dirname,this.filename),A="",D=[],w=0,c=_.createReadStream(O,{encoding:"utf8"});function L(k,Y){try{var K=JSON.parse(k);(function(Q){if(Q&&g(Q)==="object"){var z=new Date(Q.timestamp);if(!(B.from&&z<B.from||B.until&&z>B.until||B.level&&B.level!==Q.level))return!0}})(K)&&function(Q){B.rows&&D.length>=B.rows&&B.order!=="desc"?c.readable&&c.destroy():(B.fields&&(Q=B.fields.reduce(function(z,V){return z[V]=Q[V],z},{})),B.order==="desc"&&D.length>=B.rows&&D.shift(),D.push(Q))}(K)}catch(Q){Y||c.emit("error",Q)}}c.on("error",function(k){if(c.readable&&c.destroy(),U)return k.code!=="ENOENT"?U(k):U(null,D)}),c.on("data",function(k){for(var Y=(k=(A+k).split(/\n+/)).length-1,K=0;K<Y;K++)(!B.start||w>=B.start)&&L(k[K]),w++;A=k[Y]}),c.on("close",function(){A&&L(A,!0),B.order==="desc"&&(D=D.reverse()),U&&U(null,D)})}},{key:"stream",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=f.join(this.dirname,this.filename),O=new M,A={file:U,start:B.start};return O.destroy=$(A,function(D,w){if(D)return O.emit("error",D);try{O.emit("data",w),w=JSON.parse(w),O.emit("log",w)}catch(c){O.emit("error",c)}}),O}},{key:"open",value:function(){var B=this;this.filename&&(this._opening||(this._opening=!0,this.stat(function(U,O){if(U)return B.emit("error",U);P("stat done: %s { size: %s }",B.filename,O),B._size=O,B._dest=B._createStream(B._stream),B._opening=!1,B.once("open",function(){B._stream.eventNames().includes("rotate")?B._stream.emit("rotate"):B._rotate=!1})})))}},{key:"stat",value:function(B){var U=this,O=this._getFile(),A=f.join(this.dirname,O);_.stat(A,function(D,w){return D&&D.code==="ENOENT"?(P("ENOENT\xA0ok",A),U.filename=O,B(null,0)):D?(P("err ".concat(D.code," ").concat(A)),B(D)):!w||U._needsNewFile(w.size)?U._incFile(function(){return U.stat(B)}):(U.filename=O,void B(null,w.size))})}},{key:"close",value:function(B){var U=this;this._stream&&this._stream.end(function(){B&&B(),U.emit("flush"),U.emit("closed")})}},{key:"_needsNewFile",value:function(B){return B=B||this._size,this.maxsize&&B>=this.maxsize}},{key:"_onError",value:function(B){this.emit("error",B)}},{key:"_setupStream",value:function(B){return B.on("error",this._onError),B}},{key:"_cleanupStream",value:function(B){return B.removeListener("error",this._onError),B}},{key:"_rotateFile",value:function(){var B=this;this._incFile(function(){return B.open()})}},{key:"_endStream",value:function(){var B=this,U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end(function(){B._cleanupStream(B._dest),U()})):U()}},{key:"_createStream",value:function(B){var U=this,O=f.join(this.dirname,this.filename);P("create stream start",O,this.options);var A=_.createWriteStream(O,this.options).on("error",function(w){return P(w)}).on("close",function(){return P("close",A.path,A.bytesWritten)}).on("open",function(){P("file open ok",O),U.emit("open",O),B.pipe(A),U.rotatedWhileOpening&&(U._stream=new R,U._stream.setMaxListeners(30),U._rotateFile(),U.rotatedWhileOpening=!1,U._cleanupStream(A),B.end())});if(P("create stream ok",O),this.zippedArchive){var D=E.createGzip();return D.pipe(A),D}return A}},{key:"_incFile",value:function(B){P("_incFile",this.filename);var U=f.extname(this._basename),O=f.basename(this._basename,U);this.tailable?this._checkMaxFilesTailable(U,O,B):(this._created+=1,this._checkMaxFilesIncrementing(U,O,B))}},{key:"_getFile",value:function(){var B=f.extname(this._basename),U=f.basename(this._basename,B),O=this.rotationFormat?this.rotationFormat():this._created,A=!this.tailable&&this._created?"".concat(U).concat(O).concat(B):"".concat(U).concat(B);return this.zippedArchive&&!this.tailable?"".concat(A,".gz"):A}},{key:"_checkMaxFilesIncrementing",value:function(B,U,O){if(!this.maxFiles||this._created<this.maxFiles)return n(O);var A=this._created-this.maxFiles,D=A!==0?A:"",w=this.zippedArchive?".gz":"",c="".concat(U).concat(D).concat(B).concat(w),L=f.join(this.dirname,c);_.unlink(L,O)}},{key:"_checkMaxFilesTailable",value:function(B,U,O){var A=this,D=[];if(this.maxFiles){for(var w=this.zippedArchive?".gz":"",c=this.maxFiles-1;c>1;c--)D.push(function(L,k){var Y=this,K="".concat(U).concat(L-1).concat(B).concat(w),Q=f.join(this.dirname,K);_.exists(Q,function(z){if(!z)return k(null);K="".concat(U).concat(L).concat(B).concat(w),_.rename(Q,f.join(Y.dirname,K),k)})}.bind(this,c));S(D,function(){_.rename(f.join(A.dirname,"".concat(U).concat(B)),f.join(A.dirname,"".concat(U,"1").concat(B).concat(w)),O)})}}},{key:"_createLogDirIfNotExist",value:function(B){_.existsSync(B)||_.mkdirSync(B,{recursive:!0})}}])&&o(d.prototype,j),x}(p)}).call(this,r(12).setImmediate,r(4).Buffer)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s,o){return(0,n.default)(i.default,s,o)};var n=g(r(150)),i=g(r(154));function g(s){return s&&s.__esModule?s:{default:s}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(41)),i=s(r(22)),g=s(r(26));function s(o){return o&&o.__esModule?o:{default:o}}t.default=(0,g.default)((o,u,l)=>{var m=(0,n.default)(u)?[]:{};o(u,(T,b,_)=>{(0,i.default)(T)((f,...S)=>{S.length<2&&([S]=S),m[b]=S,_(f)})},T=>l(T,m))},3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(l){return(0,g.isAsync)(l)?function(...m){const T=m.pop();return o(l.apply(this,m),T)}:(0,n.default)(function(m,T){var b;try{b=l.apply(this,m)}catch(_){return T(_)}if(b&&typeof b.then=="function")return o(b,T);T(null,b)})};var n=s(r(152)),i=s(r(153)),g=r(22);function s(l){return l&&l.__esModule?l:{default:l}}function o(l,m){return l.then(T=>{u(m,null,T)},T=>{u(m,T&&T.message?T:new Error(T))})}function u(l,m,T){try{l(m,T)}catch(b){(0,i.default)(_=>{throw _},b)}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return function(...i){var g=i.pop();return n.call(this,i,g)}},e.exports=t.default},function(e,t,r){(function(n,i){Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=u,t.wrap=l;var g,s=t.hasSetImmediate=typeof n=="function"&&n,o=t.hasNextTick=typeof i=="object"&&typeof i.nextTick=="function";function u(m){setTimeout(m,0)}function l(m){return(T,...b)=>m(()=>T(...b))}g=s?n:o?i.nextTick:u,t.default=l(g)}).call(this,r(12).setImmediate,r(2))},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=g(r(64)),i=g(r(26));function g(s){return s&&s.__esModule?s:{default:s}}t.default=(0,i.default)(function(s,o,u){return(0,n.default)(s,1,o,u)},3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(65)),i=l(r(156)),g=l(r(66)),s=r(22),o=l(r(158)),u=l(r(42));function l(m){return m&&m.__esModule?m:{default:m}}t.default=m=>(T,b,_)=>{if(_=(0,n.default)(_),m<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!T)return _(null);if((0,s.isAsyncGenerator)(T))return(0,o.default)(T,m,b,_);if((0,s.isAsyncIterable)(T))return(0,o.default)(T[Symbol.asyncIterator](),m,b,_);var f=(0,i.default)(T),S=!1,E=!1,N=0,F=!1;function M(p,P){if(!E)if(N-=1,p)S=!0,_(p);else if(p===!1)S=!0,E=!0;else{if(P===u.default||S&&N<=0)return S=!0,_(null);F||R()}}function R(){for(F=!0;N<m&&!S;){var p=f();if(p===null)return S=!0,void(N<=0&&_(null));N+=1,b(p.value,p.key,(0,g.default)(M))}F=!1}R()},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s){if((0,n.default)(s))return function(b){var _=-1,f=b.length;return function(){return++_<f?{value:b[_],key:_}:null}}(s);var o=(0,i.default)(s);return o?function(b){var _=-1;return function(){var f=b.next();return f.done?null:(_++,{value:f.value,key:_})}}(o):(u=s,l=u?Object.keys(u):[],m=-1,T=l.length,function(){var b=l[++m];return m<T?{value:u[b],key:b}:null});var u,l,m,T};var n=g(r(41)),i=g(r(157));function g(s){return s&&s.__esModule?s:{default:s}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return n[Symbol.iterator]&&n[Symbol.iterator]()},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s,o,u,l){let m=!1,T=!1,b=!1,_=0,f=0;function S(){_>=o||b||m||(b=!0,s.next().then(({value:F,done:M})=>{if(!T&&!m){if(b=!1,M)return m=!0,void(_<=0&&l(null));_++,u(F,f,E),f++,S()}}).catch(N))}function E(F,M){if(_-=1,!T)return F?N(F):F===!1?(m=!0,void(T=!0)):M===g.default||m&&_<=0?(m=!0,l(null)):void S()}function N(F){T||(b=!1,m=!0,l(F))}S()};var n,i=r(42),g=(n=i)&&n.__esModule?n:{default:n};e.exports=t.default},function(e,t,r){(function(n){var i=r(4).Buffer,g=r(160).Transform,s=r(168),o=r(10),u=r(72).ok,l=r(4).kMaxLength,m="Cannot create final Buffer. It would be larger than 0x"+l.toString(16)+" bytes";s.Z_MIN_WINDOWBITS=8,s.Z_MAX_WINDOWBITS=15,s.Z_DEFAULT_WINDOWBITS=15,s.Z_MIN_CHUNK=64,s.Z_MAX_CHUNK=1/0,s.Z_DEFAULT_CHUNK=16384,s.Z_MIN_MEMLEVEL=1,s.Z_MAX_MEMLEVEL=9,s.Z_DEFAULT_MEMLEVEL=8,s.Z_MIN_LEVEL=-1,s.Z_MAX_LEVEL=9,s.Z_DEFAULT_LEVEL=s.Z_DEFAULT_COMPRESSION;for(var T=Object.keys(s),b=0;b<T.length;b++){var _=T[b];_.match(/^Z/)&&Object.defineProperty(t,_,{enumerable:!0,value:s[_],writable:!1})}for(var f={Z_OK:s.Z_OK,Z_STREAM_END:s.Z_STREAM_END,Z_NEED_DICT:s.Z_NEED_DICT,Z_ERRNO:s.Z_ERRNO,Z_STREAM_ERROR:s.Z_STREAM_ERROR,Z_DATA_ERROR:s.Z_DATA_ERROR,Z_MEM_ERROR:s.Z_MEM_ERROR,Z_BUF_ERROR:s.Z_BUF_ERROR,Z_VERSION_ERROR:s.Z_VERSION_ERROR},S=Object.keys(f),E=0;E<S.length;E++){var N=S[E];f[f[N]]=N}function F(U,O,A){var D=[],w=0;function c(){for(var k;(k=U.read())!==null;)D.push(k),w+=k.length;U.once("readable",c)}function L(){var k,Y=null;w>=l?Y=new RangeError(m):k=i.concat(D,w),D=[],U.close(),A(Y,k)}U.on("error",function(k){U.removeListener("end",L),U.removeListener("readable",c),A(k)}),U.on("end",L),U.end(O),c()}function M(U,O){if(typeof O=="string"&&(O=i.from(O)),!i.isBuffer(O))throw new TypeError("Not a string or buffer");var A=U._finishFlushFlag;return U._processChunk(O,A)}function R(U){if(!(this instanceof R))return new R(U);y.call(this,U,s.DEFLATE)}function p(U){if(!(this instanceof p))return new p(U);y.call(this,U,s.INFLATE)}function P(U){if(!(this instanceof P))return new P(U);y.call(this,U,s.GZIP)}function Z(U){if(!(this instanceof Z))return new Z(U);y.call(this,U,s.GUNZIP)}function $(U){if(!(this instanceof $))return new $(U);y.call(this,U,s.DEFLATERAW)}function h(U){if(!(this instanceof h))return new h(U);y.call(this,U,s.INFLATERAW)}function d(U){if(!(this instanceof d))return new d(U);y.call(this,U,s.UNZIP)}function j(U){return U===s.Z_NO_FLUSH||U===s.Z_PARTIAL_FLUSH||U===s.Z_SYNC_FLUSH||U===s.Z_FULL_FLUSH||U===s.Z_FINISH||U===s.Z_BLOCK}function y(U,O){var A=this;if(this._opts=U=U||{},this._chunkSize=U.chunkSize||t.Z_DEFAULT_CHUNK,g.call(this,U),U.flush&&!j(U.flush))throw new Error("Invalid flush flag: "+U.flush);if(U.finishFlush&&!j(U.finishFlush))throw new Error("Invalid flush flag: "+U.finishFlush);if(this._flushFlag=U.flush||s.Z_NO_FLUSH,this._finishFlushFlag=U.finishFlush!==void 0?U.finishFlush:s.Z_FINISH,U.chunkSize&&(U.chunkSize<t.Z_MIN_CHUNK||U.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+U.chunkSize);if(U.windowBits&&(U.windowBits<t.Z_MIN_WINDOWBITS||U.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+U.windowBits);if(U.level&&(U.level<t.Z_MIN_LEVEL||U.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+U.level);if(U.memLevel&&(U.memLevel<t.Z_MIN_MEMLEVEL||U.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+U.memLevel);if(U.strategy&&U.strategy!=t.Z_FILTERED&&U.strategy!=t.Z_HUFFMAN_ONLY&&U.strategy!=t.Z_RLE&&U.strategy!=t.Z_FIXED&&U.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+U.strategy);if(U.dictionary&&!i.isBuffer(U.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new s.Zlib(O);var D=this;this._hadError=!1,this._handle.onerror=function(L,k){x(D),D._hadError=!0;var Y=new Error(L);Y.errno=k,Y.code=t.codes[k],D.emit("error",Y)};var w=t.Z_DEFAULT_COMPRESSION;typeof U.level=="number"&&(w=U.level);var c=t.Z_DEFAULT_STRATEGY;typeof U.strategy=="number"&&(c=U.strategy),this._handle.init(U.windowBits||t.Z_DEFAULT_WINDOWBITS,w,U.memLevel||t.Z_DEFAULT_MEMLEVEL,c,U.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=w,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!A._handle},configurable:!0,enumerable:!0})}function x(U,O){O&&n.nextTick(O),U._handle&&(U._handle.close(),U._handle=null)}function B(U){U.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(f),writable:!1}),t.Deflate=R,t.Inflate=p,t.Gzip=P,t.Gunzip=Z,t.DeflateRaw=$,t.InflateRaw=h,t.Unzip=d,t.createDeflate=function(U){return new R(U)},t.createInflate=function(U){return new p(U)},t.createDeflateRaw=function(U){return new $(U)},t.createInflateRaw=function(U){return new h(U)},t.createGzip=function(U){return new P(U)},t.createGunzip=function(U){return new Z(U)},t.createUnzip=function(U){return new d(U)},t.deflate=function(U,O,A){return typeof O=="function"&&(A=O,O={}),F(new R(O),U,A)},t.deflateSync=function(U,O){return M(new R(O),U)},t.gzip=function(U,O,A){return typeof O=="function"&&(A=O,O={}),F(new P(O),U,A)},t.gzipSync=function(U,O){return M(new P(O),U)},t.deflateRaw=function(U,O,A){return typeof O=="function"&&(A=O,O={}),F(new $(O),U,A)},t.deflateRawSync=function(U,O){return M(new $(O),U)},t.unzip=function(U,O,A){return typeof O=="function"&&(A=O,O={}),F(new d(O),U,A)},t.unzipSync=function(U,O){return M(new d(O),U)},t.inflate=function(U,O,A){return typeof O=="function"&&(A=O,O={}),F(new p(O),U,A)},t.inflateSync=function(U,O){return M(new p(O),U)},t.gunzip=function(U,O,A){return typeof O=="function"&&(A=O,O={}),F(new Z(O),U,A)},t.gunzipSync=function(U,O){return M(new Z(O),U)},t.inflateRaw=function(U,O,A){return typeof O=="function"&&(A=O,O={}),F(new h(O),U,A)},t.inflateRawSync=function(U,O){return M(new h(O),U)},o.inherits(y,g),y.prototype.params=function(U,O,A){if(U<t.Z_MIN_LEVEL||U>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+U);if(O!=t.Z_FILTERED&&O!=t.Z_HUFFMAN_ONLY&&O!=t.Z_RLE&&O!=t.Z_FIXED&&O!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+O);if(this._level!==U||this._strategy!==O){var D=this;this.flush(s.Z_SYNC_FLUSH,function(){u(D._handle,"zlib binding closed"),D._handle.params(U,O),D._hadError||(D._level=U,D._strategy=O,A&&A())})}else n.nextTick(A)},y.prototype.reset=function(){return u(this._handle,"zlib binding closed"),this._handle.reset()},y.prototype._flush=function(U){this._transform(i.alloc(0),"",U)},y.prototype.flush=function(U,O){var A=this,D=this._writableState;(typeof U=="function"||U===void 0&&!O)&&(O=U,U=s.Z_FULL_FLUSH),D.ended?O&&n.nextTick(O):D.ending?O&&this.once("end",O):D.needDrain?O&&this.once("drain",function(){return A.flush(U,O)}):(this._flushFlag=U,this.write(i.alloc(0),"",O))},y.prototype.close=function(U){x(this,U),n.nextTick(B,this)},y.prototype._transform=function(U,O,A){var D,w=this._writableState,c=(w.ending||w.ended)&&(!U||w.length===U.length);return U===null||i.isBuffer(U)?this._handle?(c?D=this._finishFlushFlag:(D=this._flushFlag,U.length>=w.length&&(this._flushFlag=this._opts.flush||s.Z_NO_FLUSH)),void this._processChunk(U,D,A)):A(new Error("zlib binding closed")):A(new Error("invalid input"))},y.prototype._processChunk=function(U,O,A){var D=U&&U.length,w=this._chunkSize-this._offset,c=0,L=this,k=typeof A=="function";if(!k){var Y,K=[],Q=0;this.on("error",function(W){Y=W}),u(this._handle,"zlib binding closed");do var z=this._handle.writeSync(O,U,c,D,this._buffer,this._offset,w);while(!this._hadError&&I(z[0],z[1]));if(this._hadError)throw Y;if(Q>=l)throw x(this),new RangeError(m);var V=i.concat(K,Q);return x(this),V}u(this._handle,"zlib binding closed");var v=this._handle.write(O,U,c,D,this._buffer,this._offset,w);function I(W,ee){if(this&&(this.buffer=null,this.callback=null),!L._hadError){var J=w-ee;if(u(J>=0,"have should not go down"),J>0){var ne=L._buffer.slice(L._offset,L._offset+J);L._offset+=J,k?L.push(ne):(K.push(ne),Q+=ne.length)}if((ee===0||L._offset>=L._chunkSize)&&(w=L._chunkSize,L._offset=0,L._buffer=i.allocUnsafe(L._chunkSize)),ee===0){if(c+=D-W,D=W,!k)return!0;var oe=L._handle.write(O,U,c,D,L._buffer,L._offset,L._chunkSize);return oe.callback=I,void(oe.buffer=U)}if(!k)return!1;A()}}v.buffer=U,v.callback=I},o.inherits(R,y),o.inherits(p,y),o.inherits(P,y),o.inherits(Z,y),o.inherits($,y),o.inherits(h,y),o.inherits(d,y)}).call(this,r(2))},function(e,t,r){e.exports=i;var n=r(18).EventEmitter;function i(){n.call(this)}r(7)(i,n),i.Readable=r(27),i.Writable=r(71),i.Duplex=r(165),i.Transform=r(166),i.PassThrough=r(167),i.Stream=i,i.prototype.pipe=function(g,s){var o=this;function u(S){g.writable&&g.write(S)===!1&&o.pause&&o.pause()}function l(){o.readable&&o.resume&&o.resume()}o.on("data",u),g.on("drain",l),g._isStdio||s&&s.end===!1||(o.on("end",T),o.on("close",b));var m=!1;function T(){m||(m=!0,g.end())}function b(){m||(m=!0,typeof g.destroy=="function"&&g.destroy())}function _(S){if(f(),n.listenerCount(this,"error")===0)throw S}function f(){o.removeListener("data",u),g.removeListener("drain",l),o.removeListener("end",T),o.removeListener("close",b),o.removeListener("error",_),g.removeListener("error",_),o.removeListener("end",f),o.removeListener("close",f),g.removeListener("close",f)}return o.on("error",_),g.on("error",_),o.on("end",f),o.on("close",f),g.on("close",f),g.emit("pipe",o),g}},function(e,t){},function(e,t,r){var n=r(43).Buffer,i=r(163);e.exports=function(){function g(){(function(s,o){if(!(s instanceof o))throw new TypeError("Cannot call a class as a function")})(this,g),this.head=null,this.tail=null,this.length=0}return g.prototype.push=function(s){var o={data:s,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length},g.prototype.unshift=function(s){var o={data:s,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length},g.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},g.prototype.clear=function(){this.head=this.tail=null,this.length=0},g.prototype.join=function(s){if(this.length===0)return"";for(var o=this.head,u=""+o.data;o=o.next;)u+=s+o.data;return u},g.prototype.concat=function(s){if(this.length===0)return n.alloc(0);if(this.length===1)return this.head.data;for(var o,u,l,m=n.allocUnsafe(s>>>0),T=this.head,b=0;T;)o=T.data,u=m,l=b,o.copy(u,l),b+=T.data.length,T=T.next;return m},g}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var g=i.inspect({length:this.length});return this.constructor.name+" "+g})},function(e,t){},function(e,t,r){e.exports=g;var n=r(70),i=r(14);function g(s){if(!(this instanceof g))return new g(s);n.call(this,s)}i.inherits=r(7),i.inherits(g,n),g.prototype._transform=function(s,o,u){u(null,s)}},function(e,t,r){e.exports=r(20)},function(e,t,r){e.exports=r(27).Transform},function(e,t,r){e.exports=r(27).PassThrough},function(e,t,r){(function(n,i){var g=r(72),s=r(170),o=r(171),u=r(174),l=r(177);for(var m in l)t[m]=l[m];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function T(b){if(typeof b!="number"||b<t.DEFLATE||b>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=b,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}T.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,g(this.init_done,"close before init"),g(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||u.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},T.prototype.write=function(b,_,f,S,E,N,F){return this._write(!0,b,_,f,S,E,N,F)},T.prototype.writeSync=function(b,_,f,S,E,N,F){return this._write(!1,b,_,f,S,E,N,F)},T.prototype._write=function(b,_,f,S,E,N,F,M){if(g.equal(arguments.length,8),g(this.init_done,"write before init"),g(this.mode!==t.NONE,"already finalized"),g.equal(!1,this.write_in_progress,"write already in progress"),g.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,g.equal(!1,_===void 0,"must provide flush value"),this.write_in_progress=!0,_!==t.Z_NO_FLUSH&&_!==t.Z_PARTIAL_FLUSH&&_!==t.Z_SYNC_FLUSH&&_!==t.Z_FULL_FLUSH&&_!==t.Z_FINISH&&_!==t.Z_BLOCK)throw new Error("Invalid flush value");if(f==null&&(f=n.alloc(0),E=0,S=0),this.strm.avail_in=E,this.strm.input=f,this.strm.next_in=S,this.strm.avail_out=M,this.strm.output=N,this.strm.next_out=F,this.flush=_,!b)return this._process(),this._checkError()?this._afterSync():void 0;var R=this;return i.nextTick(function(){R._process(),R._after()}),this},T.prototype._afterSync=function(){var b=this.strm.avail_out,_=this.strm.avail_in;return this.write_in_progress=!1,[_,b]},T.prototype._process=function(){var b=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(b=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(b===null)break;if(this.strm.input[b]!==31){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,b++,this.strm.avail_in===1)break;case 1:if(b===null)break;this.strm.input[b]===139?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=u.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=u.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=u.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=u.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},T.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},T.prototype._after=function(){if(this._checkError()){var b=this.strm.avail_out,_=this.strm.avail_in;this.write_in_progress=!1,this.callback(_,b),this.pending_close&&this.close()}},T.prototype._error=function(b){this.strm.msg&&(b=this.strm.msg),this.onerror(b,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},T.prototype.init=function(b,_,f,S,E){g(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),g(b>=8&&b<=15,"invalid windowBits"),g(_>=-1&&_<=9,"invalid compression level"),g(f>=1&&f<=9,"invalid memlevel"),g(S===t.Z_FILTERED||S===t.Z_HUFFMAN_ONLY||S===t.Z_RLE||S===t.Z_FIXED||S===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(_,b,f,S,E),this._setDictionary()},T.prototype.params=function(){throw new Error("deflateParams Not supported")},T.prototype.reset=function(){this._reset(),this._setDictionary()},T.prototype._init=function(b,_,f,S,E){switch(this.level=b,this.windowBits=_,this.memLevel=f,this.strategy=S,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new s,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=u.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=E,this.write_in_progress=!1,this.init_done=!0},T.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},T.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=o.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=u.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=T}).call(this,r(4).Buffer,r(2))},function(e,t,r){var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;function s(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}e.exports=function(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var u={},l=0;l<10;l++)u["_"+String.fromCharCode(l)]=l;if(Object.getOwnPropertyNames(u).map(function(T){return u[T]}).join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(T){m[T]=T}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(o,u){for(var l,m,T=s(o),b=1;b<arguments.length;b++){for(var _ in l=Object(arguments[b]))i.call(l,_)&&(T[_]=l[_]);if(n){m=n(l);for(var f=0;f<m.length;f++)g.call(l,m[f])&&(T[m[f]]=l[m[f]])}}return T}},function(e,t,r){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,r){var n,i=r(32),g=r(172),s=r(73),o=r(74),u=r(173);function l(h,d){return h.msg=u[d],d}function m(h){return(h<<1)-(h>4?9:0)}function T(h){for(var d=h.length;--d>=0;)h[d]=0}function b(h){var d=h.state,j=d.pending;j>h.avail_out&&(j=h.avail_out),j!==0&&(i.arraySet(h.output,d.pending_buf,d.pending_out,j,h.next_out),h.next_out+=j,d.pending_out+=j,h.total_out+=j,h.avail_out-=j,d.pending-=j,d.pending===0&&(d.pending_out=0))}function _(h,d){g._tr_flush_block(h,h.block_start>=0?h.block_start:-1,h.strstart-h.block_start,d),h.block_start=h.strstart,b(h.strm)}function f(h,d){h.pending_buf[h.pending++]=d}function S(h,d){h.pending_buf[h.pending++]=d>>>8&255,h.pending_buf[h.pending++]=255&d}function E(h,d){var j,y,x=h.max_chain_length,B=h.strstart,U=h.prev_length,O=h.nice_match,A=h.strstart>h.w_size-262?h.strstart-(h.w_size-262):0,D=h.window,w=h.w_mask,c=h.prev,L=h.strstart+258,k=D[B+U-1],Y=D[B+U];h.prev_length>=h.good_match&&(x>>=2),O>h.lookahead&&(O=h.lookahead);do if(D[(j=d)+U]===Y&&D[j+U-1]===k&&D[j]===D[B]&&D[++j]===D[B+1]){B+=2,j++;do;while(D[++B]===D[++j]&&D[++B]===D[++j]&&D[++B]===D[++j]&&D[++B]===D[++j]&&D[++B]===D[++j]&&D[++B]===D[++j]&&D[++B]===D[++j]&&D[++B]===D[++j]&&B<L);if(y=258-(L-B),B=L-258,y>U){if(h.match_start=d,U=y,y>=O)break;k=D[B+U-1],Y=D[B+U]}}while((d=c[d&w])>A&&--x!=0);return U<=h.lookahead?U:h.lookahead}function N(h){var d,j,y,x,B,U,O,A,D,w,c=h.w_size;do{if(x=h.window_size-h.lookahead-h.strstart,h.strstart>=c+(c-262)){i.arraySet(h.window,h.window,c,c,0),h.match_start-=c,h.strstart-=c,h.block_start-=c,d=j=h.hash_size;do y=h.head[--d],h.head[d]=y>=c?y-c:0;while(--j);d=j=c;do y=h.prev[--d],h.prev[d]=y>=c?y-c:0;while(--j);x+=c}if(h.strm.avail_in===0)break;if(U=h.strm,O=h.window,A=h.strstart+h.lookahead,D=x,w=void 0,(w=U.avail_in)>D&&(w=D),j=w===0?0:(U.avail_in-=w,i.arraySet(O,U.input,U.next_in,w,A),U.state.wrap===1?U.adler=s(U.adler,O,w,A):U.state.wrap===2&&(U.adler=o(U.adler,O,w,A)),U.next_in+=w,U.total_in+=w,w),h.lookahead+=j,h.lookahead+h.insert>=3)for(B=h.strstart-h.insert,h.ins_h=h.window[B],h.ins_h=(h.ins_h<<h.hash_shift^h.window[B+1])&h.hash_mask;h.insert&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[B+3-1])&h.hash_mask,h.prev[B&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=B,B++,h.insert--,!(h.lookahead+h.insert<3)););}while(h.lookahead<262&&h.strm.avail_in!==0)}function F(h,d){for(var j,y;;){if(h.lookahead<262){if(N(h),h.lookahead<262&&d===0)return 1;if(h.lookahead===0)break}if(j=0,h.lookahead>=3&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,j=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),j!==0&&h.strstart-j<=h.w_size-262&&(h.match_length=E(h,j)),h.match_length>=3)if(y=g._tr_tally(h,h.strstart-h.match_start,h.match_length-3),h.lookahead-=h.match_length,h.match_length<=h.max_lazy_match&&h.lookahead>=3){h.match_length--;do h.strstart++,h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,j=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart;while(--h.match_length!=0);h.strstart++}else h.strstart+=h.match_length,h.match_length=0,h.ins_h=h.window[h.strstart],h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+1])&h.hash_mask;else y=g._tr_tally(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++;if(y&&(_(h,!1),h.strm.avail_out===0))return 1}return h.insert=h.strstart<2?h.strstart:2,d===4?(_(h,!0),h.strm.avail_out===0?3:4):h.last_lit&&(_(h,!1),h.strm.avail_out===0)?1:2}function M(h,d){for(var j,y,x;;){if(h.lookahead<262){if(N(h),h.lookahead<262&&d===0)return 1;if(h.lookahead===0)break}if(j=0,h.lookahead>=3&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,j=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),h.prev_length=h.match_length,h.prev_match=h.match_start,h.match_length=2,j!==0&&h.prev_length<h.max_lazy_match&&h.strstart-j<=h.w_size-262&&(h.match_length=E(h,j),h.match_length<=5&&(h.strategy===1||h.match_length===3&&h.strstart-h.match_start>4096)&&(h.match_length=2)),h.prev_length>=3&&h.match_length<=h.prev_length){x=h.strstart+h.lookahead-3,y=g._tr_tally(h,h.strstart-1-h.prev_match,h.prev_length-3),h.lookahead-=h.prev_length-1,h.prev_length-=2;do++h.strstart<=x&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,j=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart);while(--h.prev_length!=0);if(h.match_available=0,h.match_length=2,h.strstart++,y&&(_(h,!1),h.strm.avail_out===0))return 1}else if(h.match_available){if((y=g._tr_tally(h,0,h.window[h.strstart-1]))&&_(h,!1),h.strstart++,h.lookahead--,h.strm.avail_out===0)return 1}else h.match_available=1,h.strstart++,h.lookahead--}return h.match_available&&(y=g._tr_tally(h,0,h.window[h.strstart-1]),h.match_available=0),h.insert=h.strstart<2?h.strstart:2,d===4?(_(h,!0),h.strm.avail_out===0?3:4):h.last_lit&&(_(h,!1),h.strm.avail_out===0)?1:2}function R(h,d,j,y,x){this.good_length=h,this.max_lazy=d,this.nice_length=j,this.max_chain=y,this.func=x}function p(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),T(this.dyn_ltree),T(this.dyn_dtree),T(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),T(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),T(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function P(h){var d;return h&&h.state?(h.total_in=h.total_out=0,h.data_type=2,(d=h.state).pending=0,d.pending_out=0,d.wrap<0&&(d.wrap=-d.wrap),d.status=d.wrap?42:113,h.adler=d.wrap===2?0:1,d.last_flush=0,g._tr_init(d),0):l(h,-2)}function Z(h){var d,j=P(h);return j===0&&((d=h.state).window_size=2*d.w_size,T(d.head),d.max_lazy_match=n[d.level].max_lazy,d.good_match=n[d.level].good_length,d.nice_match=n[d.level].nice_length,d.max_chain_length=n[d.level].max_chain,d.strstart=0,d.block_start=0,d.lookahead=0,d.insert=0,d.match_length=d.prev_length=2,d.match_available=0,d.ins_h=0),j}function $(h,d,j,y,x,B){if(!h)return-2;var U=1;if(d===-1&&(d=6),y<0?(U=0,y=-y):y>15&&(U=2,y-=16),x<1||x>9||j!==8||y<8||y>15||d<0||d>9||B<0||B>4)return l(h,-2);y===8&&(y=9);var O=new p;return h.state=O,O.strm=h,O.wrap=U,O.gzhead=null,O.w_bits=y,O.w_size=1<<O.w_bits,O.w_mask=O.w_size-1,O.hash_bits=x+7,O.hash_size=1<<O.hash_bits,O.hash_mask=O.hash_size-1,O.hash_shift=~~((O.hash_bits+3-1)/3),O.window=new i.Buf8(2*O.w_size),O.head=new i.Buf16(O.hash_size),O.prev=new i.Buf16(O.w_size),O.lit_bufsize=1<<x+6,O.pending_buf_size=4*O.lit_bufsize,O.pending_buf=new i.Buf8(O.pending_buf_size),O.d_buf=1*O.lit_bufsize,O.l_buf=3*O.lit_bufsize,O.level=d,O.strategy=B,O.method=j,Z(h)}n=[new R(0,0,0,0,function(h,d){var j=65535;for(j>h.pending_buf_size-5&&(j=h.pending_buf_size-5);;){if(h.lookahead<=1){if(N(h),h.lookahead===0&&d===0)return 1;if(h.lookahead===0)break}h.strstart+=h.lookahead,h.lookahead=0;var y=h.block_start+j;if((h.strstart===0||h.strstart>=y)&&(h.lookahead=h.strstart-y,h.strstart=y,_(h,!1),h.strm.avail_out===0)||h.strstart-h.block_start>=h.w_size-262&&(_(h,!1),h.strm.avail_out===0))return 1}return h.insert=0,d===4?(_(h,!0),h.strm.avail_out===0?3:4):(h.strstart>h.block_start&&(_(h,!1),h.strm.avail_out),1)}),new R(4,4,8,4,F),new R(4,5,16,8,F),new R(4,6,32,32,F),new R(4,4,16,16,M),new R(8,16,32,32,M),new R(8,16,128,128,M),new R(8,32,128,256,M),new R(32,128,258,1024,M),new R(32,258,258,4096,M)],t.deflateInit=function(h,d){return $(h,d,8,15,8,0)},t.deflateInit2=$,t.deflateReset=Z,t.deflateResetKeep=P,t.deflateSetHeader=function(h,d){return h&&h.state?h.state.wrap!==2?-2:(h.state.gzhead=d,0):-2},t.deflate=function(h,d){var j,y,x,B;if(!h||!h.state||d>5||d<0)return h?l(h,-2):-2;if(y=h.state,!h.output||!h.input&&h.avail_in!==0||y.status===666&&d!==4)return l(h,h.avail_out===0?-5:-2);if(y.strm=h,j=y.last_flush,y.last_flush=d,y.status===42)if(y.wrap===2)h.adler=0,f(y,31),f(y,139),f(y,8),y.gzhead?(f(y,(y.gzhead.text?1:0)+(y.gzhead.hcrc?2:0)+(y.gzhead.extra?4:0)+(y.gzhead.name?8:0)+(y.gzhead.comment?16:0)),f(y,255&y.gzhead.time),f(y,y.gzhead.time>>8&255),f(y,y.gzhead.time>>16&255),f(y,y.gzhead.time>>24&255),f(y,y.level===9?2:y.strategy>=2||y.level<2?4:0),f(y,255&y.gzhead.os),y.gzhead.extra&&y.gzhead.extra.length&&(f(y,255&y.gzhead.extra.length),f(y,y.gzhead.extra.length>>8&255)),y.gzhead.hcrc&&(h.adler=o(h.adler,y.pending_buf,y.pending,0)),y.gzindex=0,y.status=69):(f(y,0),f(y,0),f(y,0),f(y,0),f(y,0),f(y,y.level===9?2:y.strategy>=2||y.level<2?4:0),f(y,3),y.status=113);else{var U=8+(y.w_bits-8<<4)<<8;U|=(y.strategy>=2||y.level<2?0:y.level<6?1:y.level===6?2:3)<<6,y.strstart!==0&&(U|=32),U+=31-U%31,y.status=113,S(y,U),y.strstart!==0&&(S(y,h.adler>>>16),S(y,65535&h.adler)),h.adler=1}if(y.status===69)if(y.gzhead.extra){for(x=y.pending;y.gzindex<(65535&y.gzhead.extra.length)&&(y.pending!==y.pending_buf_size||(y.gzhead.hcrc&&y.pending>x&&(h.adler=o(h.adler,y.pending_buf,y.pending-x,x)),b(h),x=y.pending,y.pending!==y.pending_buf_size));)f(y,255&y.gzhead.extra[y.gzindex]),y.gzindex++;y.gzhead.hcrc&&y.pending>x&&(h.adler=o(h.adler,y.pending_buf,y.pending-x,x)),y.gzindex===y.gzhead.extra.length&&(y.gzindex=0,y.status=73)}else y.status=73;if(y.status===73)if(y.gzhead.name){x=y.pending;do{if(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>x&&(h.adler=o(h.adler,y.pending_buf,y.pending-x,x)),b(h),x=y.pending,y.pending===y.pending_buf_size)){B=1;break}B=y.gzindex<y.gzhead.name.length?255&y.gzhead.name.charCodeAt(y.gzindex++):0,f(y,B)}while(B!==0);y.gzhead.hcrc&&y.pending>x&&(h.adler=o(h.adler,y.pending_buf,y.pending-x,x)),B===0&&(y.gzindex=0,y.status=91)}else y.status=91;if(y.status===91)if(y.gzhead.comment){x=y.pending;do{if(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>x&&(h.adler=o(h.adler,y.pending_buf,y.pending-x,x)),b(h),x=y.pending,y.pending===y.pending_buf_size)){B=1;break}B=y.gzindex<y.gzhead.comment.length?255&y.gzhead.comment.charCodeAt(y.gzindex++):0,f(y,B)}while(B!==0);y.gzhead.hcrc&&y.pending>x&&(h.adler=o(h.adler,y.pending_buf,y.pending-x,x)),B===0&&(y.status=103)}else y.status=103;if(y.status===103&&(y.gzhead.hcrc?(y.pending+2>y.pending_buf_size&&b(h),y.pending+2<=y.pending_buf_size&&(f(y,255&h.adler),f(y,h.adler>>8&255),h.adler=0,y.status=113)):y.status=113),y.pending!==0){if(b(h),h.avail_out===0)return y.last_flush=-1,0}else if(h.avail_in===0&&m(d)<=m(j)&&d!==4)return l(h,-5);if(y.status===666&&h.avail_in!==0)return l(h,-5);if(h.avail_in!==0||y.lookahead!==0||d!==0&&y.status!==666){var O=y.strategy===2?function(A,D){for(var w;;){if(A.lookahead===0&&(N(A),A.lookahead===0)){if(D===0)return 1;break}if(A.match_length=0,w=g._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,w&&(_(A,!1),A.strm.avail_out===0))return 1}return A.insert=0,D===4?(_(A,!0),A.strm.avail_out===0?3:4):A.last_lit&&(_(A,!1),A.strm.avail_out===0)?1:2}(y,d):y.strategy===3?function(A,D){for(var w,c,L,k,Y=A.window;;){if(A.lookahead<=258){if(N(A),A.lookahead<=258&&D===0)return 1;if(A.lookahead===0)break}if(A.match_length=0,A.lookahead>=3&&A.strstart>0&&(c=Y[L=A.strstart-1])===Y[++L]&&c===Y[++L]&&c===Y[++L]){k=A.strstart+258;do;while(c===Y[++L]&&c===Y[++L]&&c===Y[++L]&&c===Y[++L]&&c===Y[++L]&&c===Y[++L]&&c===Y[++L]&&c===Y[++L]&&L<k);A.match_length=258-(k-L),A.match_length>A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=3?(w=g._tr_tally(A,1,A.match_length-3),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(w=g._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),w&&(_(A,!1),A.strm.avail_out===0))return 1}return A.insert=0,D===4?(_(A,!0),A.strm.avail_out===0?3:4):A.last_lit&&(_(A,!1),A.strm.avail_out===0)?1:2}(y,d):n[y.level].func(y,d);if(O!==3&&O!==4||(y.status=666),O===1||O===3)return h.avail_out===0&&(y.last_flush=-1),0;if(O===2&&(d===1?g._tr_align(y):d!==5&&(g._tr_stored_block(y,0,0,!1),d===3&&(T(y.head),y.lookahead===0&&(y.strstart=0,y.block_start=0,y.insert=0))),b(h),h.avail_out===0))return y.last_flush=-1,0}return d!==4?0:y.wrap<=0?1:(y.wrap===2?(f(y,255&h.adler),f(y,h.adler>>8&255),f(y,h.adler>>16&255),f(y,h.adler>>24&255),f(y,255&h.total_in),f(y,h.total_in>>8&255),f(y,h.total_in>>16&255),f(y,h.total_in>>24&255)):(S(y,h.adler>>>16),S(y,65535&h.adler)),b(h),y.wrap>0&&(y.wrap=-y.wrap),y.pending!==0?0:1)},t.deflateEnd=function(h){var d;return h&&h.state?(d=h.state.status)!==42&&d!==69&&d!==73&&d!==91&&d!==103&&d!==113&&d!==666?l(h,-2):(h.state=null,d===113?l(h,-3):0):-2},t.deflateSetDictionary=function(h,d){var j,y,x,B,U,O,A,D,w=d.length;if(!h||!h.state||(B=(j=h.state).wrap)===2||B===1&&j.status!==42||j.lookahead)return-2;for(B===1&&(h.adler=s(h.adler,d,w,0)),j.wrap=0,w>=j.w_size&&(B===0&&(T(j.head),j.strstart=0,j.block_start=0,j.insert=0),D=new i.Buf8(j.w_size),i.arraySet(D,d,w-j.w_size,j.w_size,0),d=D,w=j.w_size),U=h.avail_in,O=h.next_in,A=h.input,h.avail_in=w,h.next_in=0,h.input=d,N(j);j.lookahead>=3;){y=j.strstart,x=j.lookahead-2;do j.ins_h=(j.ins_h<<j.hash_shift^j.window[y+3-1])&j.hash_mask,j.prev[y&j.w_mask]=j.head[j.ins_h],j.head[j.ins_h]=y,y++;while(--x);j.strstart=y,j.lookahead=2,N(j)}return j.strstart+=j.lookahead,j.block_start=j.strstart,j.insert=j.lookahead,j.lookahead=0,j.match_length=j.prev_length=2,j.match_available=0,h.next_in=O,h.input=A,h.avail_in=U,j.wrap=B,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,r){var n=r(32);function i(c){for(var L=c.length;--L>=0;)c[L]=0}var g=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);i(l);var m=new Array(60);i(m);var T=new Array(512);i(T);var b=new Array(256);i(b);var _=new Array(29);i(_);var f,S,E,N=new Array(30);function F(c,L,k,Y,K){this.static_tree=c,this.extra_bits=L,this.extra_base=k,this.elems=Y,this.max_length=K,this.has_stree=c&&c.length}function M(c,L){this.dyn_tree=c,this.max_code=0,this.stat_desc=L}function R(c){return c<256?T[c]:T[256+(c>>>7)]}function p(c,L){c.pending_buf[c.pending++]=255&L,c.pending_buf[c.pending++]=L>>>8&255}function P(c,L,k){c.bi_valid>16-k?(c.bi_buf|=L<<c.bi_valid&65535,p(c,c.bi_buf),c.bi_buf=L>>16-c.bi_valid,c.bi_valid+=k-16):(c.bi_buf|=L<<c.bi_valid&65535,c.bi_valid+=k)}function Z(c,L,k){P(c,k[2*L],k[2*L+1])}function $(c,L){var k=0;do k|=1&c,c>>>=1,k<<=1;while(--L>0);return k>>>1}function h(c,L,k){var Y,K,Q=new Array(16),z=0;for(Y=1;Y<=15;Y++)Q[Y]=z=z+k[Y-1]<<1;for(K=0;K<=L;K++){var V=c[2*K+1];V!==0&&(c[2*K]=$(Q[V]++,V))}}function d(c){var L;for(L=0;L<286;L++)c.dyn_ltree[2*L]=0;for(L=0;L<30;L++)c.dyn_dtree[2*L]=0;for(L=0;L<19;L++)c.bl_tree[2*L]=0;c.dyn_ltree[512]=1,c.opt_len=c.static_len=0,c.last_lit=c.matches=0}function j(c){c.bi_valid>8?p(c,c.bi_buf):c.bi_valid>0&&(c.pending_buf[c.pending++]=c.bi_buf),c.bi_buf=0,c.bi_valid=0}function y(c,L,k,Y){var K=2*L,Q=2*k;return c[K]<c[Q]||c[K]===c[Q]&&Y[L]<=Y[k]}function x(c,L,k){for(var Y=c.heap[k],K=k<<1;K<=c.heap_len&&(K<c.heap_len&&y(L,c.heap[K+1],c.heap[K],c.depth)&&K++,!y(L,Y,c.heap[K],c.depth));)c.heap[k]=c.heap[K],k=K,K<<=1;c.heap[k]=Y}function B(c,L,k){var Y,K,Q,z,V=0;if(c.last_lit!==0)do Y=c.pending_buf[c.d_buf+2*V]<<8|c.pending_buf[c.d_buf+2*V+1],K=c.pending_buf[c.l_buf+V],V++,Y===0?Z(c,K,L):(Z(c,(Q=b[K])+256+1,L),(z=g[Q])!==0&&P(c,K-=_[Q],z),Z(c,Q=R(--Y),k),(z=s[Q])!==0&&P(c,Y-=N[Q],z));while(V<c.last_lit);Z(c,256,L)}function U(c,L){var k,Y,K,Q=L.dyn_tree,z=L.stat_desc.static_tree,V=L.stat_desc.has_stree,v=L.stat_desc.elems,I=-1;for(c.heap_len=0,c.heap_max=573,k=0;k<v;k++)Q[2*k]!==0?(c.heap[++c.heap_len]=I=k,c.depth[k]=0):Q[2*k+1]=0;for(;c.heap_len<2;)Q[2*(K=c.heap[++c.heap_len]=I<2?++I:0)]=1,c.depth[K]=0,c.opt_len--,V&&(c.static_len-=z[2*K+1]);for(L.max_code=I,k=c.heap_len>>1;k>=1;k--)x(c,Q,k);K=v;do k=c.heap[1],c.heap[1]=c.heap[c.heap_len--],x(c,Q,1),Y=c.heap[1],c.heap[--c.heap_max]=k,c.heap[--c.heap_max]=Y,Q[2*K]=Q[2*k]+Q[2*Y],c.depth[K]=(c.depth[k]>=c.depth[Y]?c.depth[k]:c.depth[Y])+1,Q[2*k+1]=Q[2*Y+1]=K,c.heap[1]=K++,x(c,Q,1);while(c.heap_len>=2);c.heap[--c.heap_max]=c.heap[1],function(W,ee){var J,ne,oe,he,fe,G,q=ee.dyn_tree,te=ee.max_code,se=ee.stat_desc.static_tree,ae=ee.stat_desc.has_stree,me=ee.stat_desc.extra_bits,ye=ee.stat_desc.extra_base,de=ee.stat_desc.max_length,ge=0;for(he=0;he<=15;he++)W.bl_count[he]=0;for(q[2*W.heap[W.heap_max]+1]=0,J=W.heap_max+1;J<573;J++)(he=q[2*q[2*(ne=W.heap[J])+1]+1]+1)>de&&(he=de,ge++),q[2*ne+1]=he,ne>te||(W.bl_count[he]++,fe=0,ne>=ye&&(fe=me[ne-ye]),G=q[2*ne],W.opt_len+=G*(he+fe),ae&&(W.static_len+=G*(se[2*ne+1]+fe)));if(ge!==0){do{for(he=de-1;W.bl_count[he]===0;)he--;W.bl_count[he]--,W.bl_count[he+1]+=2,W.bl_count[de]--,ge-=2}while(ge>0);for(he=de;he!==0;he--)for(ne=W.bl_count[he];ne!==0;)(oe=W.heap[--J])>te||(q[2*oe+1]!==he&&(W.opt_len+=(he-q[2*oe+1])*q[2*oe],q[2*oe+1]=he),ne--)}}(c,L),h(Q,I,c.bl_count)}function O(c,L,k){var Y,K,Q=-1,z=L[1],V=0,v=7,I=4;for(z===0&&(v=138,I=3),L[2*(k+1)+1]=65535,Y=0;Y<=k;Y++)K=z,z=L[2*(Y+1)+1],++V<v&&K===z||(V<I?c.bl_tree[2*K]+=V:K!==0?(K!==Q&&c.bl_tree[2*K]++,c.bl_tree[32]++):V<=10?c.bl_tree[34]++:c.bl_tree[36]++,V=0,Q=K,z===0?(v=138,I=3):K===z?(v=6,I=3):(v=7,I=4))}function A(c,L,k){var Y,K,Q=-1,z=L[1],V=0,v=7,I=4;for(z===0&&(v=138,I=3),Y=0;Y<=k;Y++)if(K=z,z=L[2*(Y+1)+1],!(++V<v&&K===z)){if(V<I)do Z(c,K,c.bl_tree);while(--V!=0);else K!==0?(K!==Q&&(Z(c,K,c.bl_tree),V--),Z(c,16,c.bl_tree),P(c,V-3,2)):V<=10?(Z(c,17,c.bl_tree),P(c,V-3,3)):(Z(c,18,c.bl_tree),P(c,V-11,7));V=0,Q=K,z===0?(v=138,I=3):K===z?(v=6,I=3):(v=7,I=4)}}i(N);var D=!1;function w(c,L,k,Y){P(c,0+(Y?1:0),3),function(K,Q,z,V){j(K),V&&(p(K,z),p(K,~z)),n.arraySet(K.pending_buf,K.window,Q,z,K.pending),K.pending+=z}(c,L,k,!0)}t._tr_init=function(c){D||(function(){var L,k,Y,K,Q,z=new Array(16);for(Y=0,K=0;K<28;K++)for(_[K]=Y,L=0;L<1<<g[K];L++)b[Y++]=K;for(b[Y-1]=K,Q=0,K=0;K<16;K++)for(N[K]=Q,L=0;L<1<<s[K];L++)T[Q++]=K;for(Q>>=7;K<30;K++)for(N[K]=Q<<7,L=0;L<1<<s[K]-7;L++)T[256+Q++]=K;for(k=0;k<=15;k++)z[k]=0;for(L=0;L<=143;)l[2*L+1]=8,L++,z[8]++;for(;L<=255;)l[2*L+1]=9,L++,z[9]++;for(;L<=279;)l[2*L+1]=7,L++,z[7]++;for(;L<=287;)l[2*L+1]=8,L++,z[8]++;for(h(l,287,z),L=0;L<30;L++)m[2*L+1]=5,m[2*L]=$(L,5);f=new F(l,g,257,286,15),S=new F(m,s,0,30,15),E=new F(new Array(0),o,0,19,7)}(),D=!0),c.l_desc=new M(c.dyn_ltree,f),c.d_desc=new M(c.dyn_dtree,S),c.bl_desc=new M(c.bl_tree,E),c.bi_buf=0,c.bi_valid=0,d(c)},t._tr_stored_block=w,t._tr_flush_block=function(c,L,k,Y){var K,Q,z=0;c.level>0?(c.strm.data_type===2&&(c.strm.data_type=function(V){var v,I=4093624447;for(v=0;v<=31;v++,I>>>=1)if(1&I&&V.dyn_ltree[2*v]!==0)return 0;if(V.dyn_ltree[18]!==0||V.dyn_ltree[20]!==0||V.dyn_ltree[26]!==0)return 1;for(v=32;v<256;v++)if(V.dyn_ltree[2*v]!==0)return 1;return 0}(c)),U(c,c.l_desc),U(c,c.d_desc),z=function(V){var v;for(O(V,V.dyn_ltree,V.l_desc.max_code),O(V,V.dyn_dtree,V.d_desc.max_code),U(V,V.bl_desc),v=18;v>=3&&V.bl_tree[2*u[v]+1]===0;v--);return V.opt_len+=3*(v+1)+5+5+4,v}(c),K=c.opt_len+3+7>>>3,(Q=c.static_len+3+7>>>3)<=K&&(K=Q)):K=Q=k+5,k+4<=K&&L!==-1?w(c,L,k,Y):c.strategy===4||Q===K?(P(c,2+(Y?1:0),3),B(c,l,m)):(P(c,4+(Y?1:0),3),function(V,v,I,W){var ee;for(P(V,v-257,5),P(V,I-1,5),P(V,W-4,4),ee=0;ee<W;ee++)P(V,V.bl_tree[2*u[ee]+1],3);A(V,V.dyn_ltree,v-1),A(V,V.dyn_dtree,I-1)}(c,c.l_desc.max_code+1,c.d_desc.max_code+1,z+1),B(c,c.dyn_ltree,c.dyn_dtree)),d(c),Y&&j(c)},t._tr_tally=function(c,L,k){return c.pending_buf[c.d_buf+2*c.last_lit]=L>>>8&255,c.pending_buf[c.d_buf+2*c.last_lit+1]=255&L,c.pending_buf[c.l_buf+c.last_lit]=255&k,c.last_lit++,L===0?c.dyn_ltree[2*k]++:(c.matches++,L--,c.dyn_ltree[2*(b[k]+256+1)]++,c.dyn_dtree[2*R(L)]++),c.last_lit===c.lit_bufsize-1},t._tr_align=function(c){P(c,2,3),Z(c,256,l),function(L){L.bi_valid===16?(p(L,L.bi_buf),L.bi_buf=0,L.bi_valid=0):L.bi_valid>=8&&(L.pending_buf[L.pending++]=255&L.bi_buf,L.bi_buf>>=8,L.bi_valid-=8)}(c)}},function(e,t,r){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,r){var n=r(32),i=r(73),g=r(74),s=r(175),o=r(176);function u(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function l(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function m(M){var R;return M&&M.state?(R=M.state,M.total_in=M.total_out=R.total=0,M.msg="",R.wrap&&(M.adler=1&R.wrap),R.mode=1,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new n.Buf32(852),R.distcode=R.distdyn=new n.Buf32(592),R.sane=1,R.back=-1,0):-2}function T(M){var R;return M&&M.state?((R=M.state).wsize=0,R.whave=0,R.wnext=0,m(M)):-2}function b(M,R){var p,P;return M&&M.state?(P=M.state,R<0?(p=0,R=-R):(p=1+(R>>4),R<48&&(R&=15)),R&&(R<8||R>15)?-2:(P.window!==null&&P.wbits!==R&&(P.window=null),P.wrap=p,P.wbits=R,T(M))):-2}function _(M,R){var p,P;return M?(P=new l,M.state=P,P.window=null,(p=b(M,R))!==0&&(M.state=null),p):-2}var f,S,E=!0;function N(M){if(E){var R;for(f=new n.Buf32(512),S=new n.Buf32(32),R=0;R<144;)M.lens[R++]=8;for(;R<256;)M.lens[R++]=9;for(;R<280;)M.lens[R++]=7;for(;R<288;)M.lens[R++]=8;for(o(1,M.lens,0,288,f,0,M.work,{bits:9}),R=0;R<32;)M.lens[R++]=5;o(2,M.lens,0,32,S,0,M.work,{bits:5}),E=!1}M.lencode=f,M.lenbits=9,M.distcode=S,M.distbits=5}function F(M,R,p,P){var Z,$=M.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new n.Buf8($.wsize)),P>=$.wsize?(n.arraySet($.window,R,p-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):((Z=$.wsize-$.wnext)>P&&(Z=P),n.arraySet($.window,R,p-P,Z,$.wnext),(P-=Z)?(n.arraySet($.window,R,p-P,P,0),$.wnext=P,$.whave=$.wsize):($.wnext+=Z,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=Z))),0}t.inflateReset=T,t.inflateReset2=b,t.inflateResetKeep=m,t.inflateInit=function(M){return _(M,15)},t.inflateInit2=_,t.inflate=function(M,R){var p,P,Z,$,h,d,j,y,x,B,U,O,A,D,w,c,L,k,Y,K,Q,z,V,v,I=0,W=new n.Buf8(4),ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!M||!M.state||!M.output||!M.input&&M.avail_in!==0)return-2;(p=M.state).mode===12&&(p.mode=13),h=M.next_out,Z=M.output,j=M.avail_out,$=M.next_in,P=M.input,d=M.avail_in,y=p.hold,x=p.bits,B=d,U=j,z=0;e:for(;;)switch(p.mode){case 1:if(p.wrap===0){p.mode=13;break}for(;x<16;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}if(2&p.wrap&&y===35615){p.check=0,W[0]=255&y,W[1]=y>>>8&255,p.check=g(p.check,W,2,0),y=0,x=0,p.mode=2;break}if(p.flags=0,p.head&&(p.head.done=!1),!(1&p.wrap)||(((255&y)<<8)+(y>>8))%31){M.msg="incorrect header check",p.mode=30;break}if((15&y)!=8){M.msg="unknown compression method",p.mode=30;break}if(x-=4,Q=8+(15&(y>>>=4)),p.wbits===0)p.wbits=Q;else if(Q>p.wbits){M.msg="invalid window size",p.mode=30;break}p.dmax=1<<Q,M.adler=p.check=1,p.mode=512&y?10:12,y=0,x=0;break;case 2:for(;x<16;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}if(p.flags=y,(255&p.flags)!=8){M.msg="unknown compression method",p.mode=30;break}if(57344&p.flags){M.msg="unknown header flags set",p.mode=30;break}p.head&&(p.head.text=y>>8&1),512&p.flags&&(W[0]=255&y,W[1]=y>>>8&255,p.check=g(p.check,W,2,0)),y=0,x=0,p.mode=3;case 3:for(;x<32;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}p.head&&(p.head.time=y),512&p.flags&&(W[0]=255&y,W[1]=y>>>8&255,W[2]=y>>>16&255,W[3]=y>>>24&255,p.check=g(p.check,W,4,0)),y=0,x=0,p.mode=4;case 4:for(;x<16;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}p.head&&(p.head.xflags=255&y,p.head.os=y>>8),512&p.flags&&(W[0]=255&y,W[1]=y>>>8&255,p.check=g(p.check,W,2,0)),y=0,x=0,p.mode=5;case 5:if(1024&p.flags){for(;x<16;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}p.length=y,p.head&&(p.head.extra_len=y),512&p.flags&&(W[0]=255&y,W[1]=y>>>8&255,p.check=g(p.check,W,2,0)),y=0,x=0}else p.head&&(p.head.extra=null);p.mode=6;case 6:if(1024&p.flags&&((O=p.length)>d&&(O=d),O&&(p.head&&(Q=p.head.extra_len-p.length,p.head.extra||(p.head.extra=new Array(p.head.extra_len)),n.arraySet(p.head.extra,P,$,O,Q)),512&p.flags&&(p.check=g(p.check,P,O,$)),d-=O,$+=O,p.length-=O),p.length))break e;p.length=0,p.mode=7;case 7:if(2048&p.flags){if(d===0)break e;O=0;do Q=P[$+O++],p.head&&Q&&p.length<65536&&(p.head.name+=String.fromCharCode(Q));while(Q&&O<d);if(512&p.flags&&(p.check=g(p.check,P,O,$)),d-=O,$+=O,Q)break e}else p.head&&(p.head.name=null);p.length=0,p.mode=8;case 8:if(4096&p.flags){if(d===0)break e;O=0;do Q=P[$+O++],p.head&&Q&&p.length<65536&&(p.head.comment+=String.fromCharCode(Q));while(Q&&O<d);if(512&p.flags&&(p.check=g(p.check,P,O,$)),d-=O,$+=O,Q)break e}else p.head&&(p.head.comment=null);p.mode=9;case 9:if(512&p.flags){for(;x<16;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}if(y!==(65535&p.check)){M.msg="header crc mismatch",p.mode=30;break}y=0,x=0}p.head&&(p.head.hcrc=p.flags>>9&1,p.head.done=!0),M.adler=p.check=0,p.mode=12;break;case 10:for(;x<32;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}M.adler=p.check=u(y),y=0,x=0,p.mode=11;case 11:if(p.havedict===0)return M.next_out=h,M.avail_out=j,M.next_in=$,M.avail_in=d,p.hold=y,p.bits=x,2;M.adler=p.check=1,p.mode=12;case 12:if(R===5||R===6)break e;case 13:if(p.last){y>>>=7&x,x-=7&x,p.mode=27;break}for(;x<3;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}switch(p.last=1&y,x-=1,3&(y>>>=1)){case 0:p.mode=14;break;case 1:if(N(p),p.mode=20,R===6){y>>>=2,x-=2;break e}break;case 2:p.mode=17;break;case 3:M.msg="invalid block type",p.mode=30}y>>>=2,x-=2;break;case 14:for(y>>>=7&x,x-=7&x;x<32;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}if((65535&y)!=(y>>>16^65535)){M.msg="invalid stored block lengths",p.mode=30;break}if(p.length=65535&y,y=0,x=0,p.mode=15,R===6)break e;case 15:p.mode=16;case 16:if(O=p.length){if(O>d&&(O=d),O>j&&(O=j),O===0)break e;n.arraySet(Z,P,$,O,h),d-=O,$+=O,j-=O,h+=O,p.length-=O;break}p.mode=12;break;case 17:for(;x<14;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}if(p.nlen=257+(31&y),y>>>=5,x-=5,p.ndist=1+(31&y),y>>>=5,x-=5,p.ncode=4+(15&y),y>>>=4,x-=4,p.nlen>286||p.ndist>30){M.msg="too many length or distance symbols",p.mode=30;break}p.have=0,p.mode=18;case 18:for(;p.have<p.ncode;){for(;x<3;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}p.lens[ee[p.have++]]=7&y,y>>>=3,x-=3}for(;p.have<19;)p.lens[ee[p.have++]]=0;if(p.lencode=p.lendyn,p.lenbits=7,V={bits:p.lenbits},z=o(0,p.lens,0,19,p.lencode,0,p.work,V),p.lenbits=V.bits,z){M.msg="invalid code lengths set",p.mode=30;break}p.have=0,p.mode=19;case 19:for(;p.have<p.nlen+p.ndist;){for(;c=(I=p.lencode[y&(1<<p.lenbits)-1])>>>16&255,L=65535&I,!((w=I>>>24)<=x);){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}if(L<16)y>>>=w,x-=w,p.lens[p.have++]=L;else{if(L===16){for(v=w+2;x<v;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}if(y>>>=w,x-=w,p.have===0){M.msg="invalid bit length repeat",p.mode=30;break}Q=p.lens[p.have-1],O=3+(3&y),y>>>=2,x-=2}else if(L===17){for(v=w+3;x<v;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}x-=w,Q=0,O=3+(7&(y>>>=w)),y>>>=3,x-=3}else{for(v=w+7;x<v;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}x-=w,Q=0,O=11+(127&(y>>>=w)),y>>>=7,x-=7}if(p.have+O>p.nlen+p.ndist){M.msg="invalid bit length repeat",p.mode=30;break}for(;O--;)p.lens[p.have++]=Q}}if(p.mode===30)break;if(p.lens[256]===0){M.msg="invalid code -- missing end-of-block",p.mode=30;break}if(p.lenbits=9,V={bits:p.lenbits},z=o(1,p.lens,0,p.nlen,p.lencode,0,p.work,V),p.lenbits=V.bits,z){M.msg="invalid literal/lengths set",p.mode=30;break}if(p.distbits=6,p.distcode=p.distdyn,V={bits:p.distbits},z=o(2,p.lens,p.nlen,p.ndist,p.distcode,0,p.work,V),p.distbits=V.bits,z){M.msg="invalid distances set",p.mode=30;break}if(p.mode=20,R===6)break e;case 20:p.mode=21;case 21:if(d>=6&&j>=258){M.next_out=h,M.avail_out=j,M.next_in=$,M.avail_in=d,p.hold=y,p.bits=x,s(M,U),h=M.next_out,Z=M.output,j=M.avail_out,$=M.next_in,P=M.input,d=M.avail_in,y=p.hold,x=p.bits,p.mode===12&&(p.back=-1);break}for(p.back=0;c=(I=p.lencode[y&(1<<p.lenbits)-1])>>>16&255,L=65535&I,!((w=I>>>24)<=x);){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}if(c&&(240&c)==0){for(k=w,Y=c,K=L;c=(I=p.lencode[K+((y&(1<<k+Y)-1)>>k)])>>>16&255,L=65535&I,!(k+(w=I>>>24)<=x);){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}y>>>=k,x-=k,p.back+=k}if(y>>>=w,x-=w,p.back+=w,p.length=L,c===0){p.mode=26;break}if(32&c){p.back=-1,p.mode=12;break}if(64&c){M.msg="invalid literal/length code",p.mode=30;break}p.extra=15&c,p.mode=22;case 22:if(p.extra){for(v=p.extra;x<v;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}p.length+=y&(1<<p.extra)-1,y>>>=p.extra,x-=p.extra,p.back+=p.extra}p.was=p.length,p.mode=23;case 23:for(;c=(I=p.distcode[y&(1<<p.distbits)-1])>>>16&255,L=65535&I,!((w=I>>>24)<=x);){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}if((240&c)==0){for(k=w,Y=c,K=L;c=(I=p.distcode[K+((y&(1<<k+Y)-1)>>k)])>>>16&255,L=65535&I,!(k+(w=I>>>24)<=x);){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}y>>>=k,x-=k,p.back+=k}if(y>>>=w,x-=w,p.back+=w,64&c){M.msg="invalid distance code",p.mode=30;break}p.offset=L,p.extra=15&c,p.mode=24;case 24:if(p.extra){for(v=p.extra;x<v;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}p.offset+=y&(1<<p.extra)-1,y>>>=p.extra,x-=p.extra,p.back+=p.extra}if(p.offset>p.dmax){M.msg="invalid distance too far back",p.mode=30;break}p.mode=25;case 25:if(j===0)break e;if(O=U-j,p.offset>O){if((O=p.offset-O)>p.whave&&p.sane){M.msg="invalid distance too far back",p.mode=30;break}O>p.wnext?(O-=p.wnext,A=p.wsize-O):A=p.wnext-O,O>p.length&&(O=p.length),D=p.window}else D=Z,A=h-p.offset,O=p.length;O>j&&(O=j),j-=O,p.length-=O;do Z[h++]=D[A++];while(--O);p.length===0&&(p.mode=21);break;case 26:if(j===0)break e;Z[h++]=p.length,j--,p.mode=21;break;case 27:if(p.wrap){for(;x<32;){if(d===0)break e;d--,y|=P[$++]<<x,x+=8}if(U-=j,M.total_out+=U,p.total+=U,U&&(M.adler=p.check=p.flags?g(p.check,Z,U,h-U):i(p.check,Z,U,h-U)),U=j,(p.flags?y:u(y))!==p.check){M.msg="incorrect data check",p.mode=30;break}y=0,x=0}p.mode=28;case 28:if(p.wrap&&p.flags){for(;x<32;){if(d===0)break e;d--,y+=P[$++]<<x,x+=8}if(y!==(4294967295&p.total)){M.msg="incorrect length check",p.mode=30;break}y=0,x=0}p.mode=29;case 29:z=1;break e;case 30:z=-3;break e;case 31:return-4;case 32:default:return-2}return M.next_out=h,M.avail_out=j,M.next_in=$,M.avail_in=d,p.hold=y,p.bits=x,(p.wsize||U!==M.avail_out&&p.mode<30&&(p.mode<27||R!==4))&&F(M,M.output,M.next_out,U-M.avail_out)?(p.mode=31,-4):(B-=M.avail_in,U-=M.avail_out,M.total_in+=B,M.total_out+=U,p.total+=U,p.wrap&&U&&(M.adler=p.check=p.flags?g(p.check,Z,U,M.next_out-U):i(p.check,Z,U,M.next_out-U)),M.data_type=p.bits+(p.last?64:0)+(p.mode===12?128:0)+(p.mode===20||p.mode===15?256:0),(B===0&&U===0||R===4)&&z===0&&(z=-5),z)},t.inflateEnd=function(M){if(!M||!M.state)return-2;var R=M.state;return R.window&&(R.window=null),M.state=null,0},t.inflateGetHeader=function(M,R){var p;return M&&M.state?(2&(p=M.state).wrap)==0?-2:(p.head=R,R.done=!1,0):-2},t.inflateSetDictionary=function(M,R){var p,P=R.length;return M&&M.state?(p=M.state).wrap!==0&&p.mode!==11?-2:p.mode===11&&i(1,R,P,0)!==p.check?-3:F(M,R,P,P)?(p.mode=31,-4):(p.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,r){e.exports=function(n,i){var g,s,o,u,l,m,T,b,_,f,S,E,N,F,M,R,p,P,Z,$,h,d,j,y,x;g=n.state,s=n.next_in,y=n.input,o=s+(n.avail_in-5),u=n.next_out,x=n.output,l=u-(i-n.avail_out),m=u+(n.avail_out-257),T=g.dmax,b=g.wsize,_=g.whave,f=g.wnext,S=g.window,E=g.hold,N=g.bits,F=g.lencode,M=g.distcode,R=(1<<g.lenbits)-1,p=(1<<g.distbits)-1;e:do{N<15&&(E+=y[s++]<<N,N+=8,E+=y[s++]<<N,N+=8),P=F[E&R];t:for(;;){if(E>>>=Z=P>>>24,N-=Z,(Z=P>>>16&255)===0)x[u++]=65535&P;else{if(!(16&Z)){if((64&Z)==0){P=F[(65535&P)+(E&(1<<Z)-1)];continue t}if(32&Z){g.mode=12;break e}n.msg="invalid literal/length code",g.mode=30;break e}$=65535&P,(Z&=15)&&(N<Z&&(E+=y[s++]<<N,N+=8),$+=E&(1<<Z)-1,E>>>=Z,N-=Z),N<15&&(E+=y[s++]<<N,N+=8,E+=y[s++]<<N,N+=8),P=M[E&p];r:for(;;){if(E>>>=Z=P>>>24,N-=Z,!(16&(Z=P>>>16&255))){if((64&Z)==0){P=M[(65535&P)+(E&(1<<Z)-1)];continue r}n.msg="invalid distance code",g.mode=30;break e}if(h=65535&P,N<(Z&=15)&&(E+=y[s++]<<N,(N+=8)<Z&&(E+=y[s++]<<N,N+=8)),(h+=E&(1<<Z)-1)>T){n.msg="invalid distance too far back",g.mode=30;break e}if(E>>>=Z,N-=Z,h>(Z=u-l)){if((Z=h-Z)>_&&g.sane){n.msg="invalid distance too far back",g.mode=30;break e}if(d=0,j=S,f===0){if(d+=b-Z,Z<$){$-=Z;do x[u++]=S[d++];while(--Z);d=u-h,j=x}}else if(f<Z){if(d+=b+f-Z,(Z-=f)<$){$-=Z;do x[u++]=S[d++];while(--Z);if(d=0,f<$){$-=Z=f;do x[u++]=S[d++];while(--Z);d=u-h,j=x}}}else if(d+=f-Z,Z<$){$-=Z;do x[u++]=S[d++];while(--Z);d=u-h,j=x}for(;$>2;)x[u++]=j[d++],x[u++]=j[d++],x[u++]=j[d++],$-=3;$&&(x[u++]=j[d++],$>1&&(x[u++]=j[d++]))}else{d=u-h;do x[u++]=x[d++],x[u++]=x[d++],x[u++]=x[d++],$-=3;while($>2);$&&(x[u++]=x[d++],$>1&&(x[u++]=x[d++]))}break}}break}}while(s<o&&u<m);s-=$=N>>3,E&=(1<<(N-=$<<3))-1,n.next_in=s,n.next_out=u,n.avail_in=s<o?o-s+5:5-(s-o),n.avail_out=u<m?m-u+257:257-(u-m),g.hold=E,g.bits=N}},function(e,t,r){var n=r(32),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],o=[16,16,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,29,29,64,64];e.exports=function(u,l,m,T,b,_,f,S){var E,N,F,M,R,p,P,Z,$,h=S.bits,d=0,j=0,y=0,x=0,B=0,U=0,O=0,A=0,D=0,w=0,c=null,L=0,k=new n.Buf16(16),Y=new n.Buf16(16),K=null,Q=0;for(d=0;d<=15;d++)k[d]=0;for(j=0;j<T;j++)k[l[m+j]]++;for(B=h,x=15;x>=1&&k[x]===0;x--);if(B>x&&(B=x),x===0)return b[_++]=20971520,b[_++]=20971520,S.bits=1,0;for(y=1;y<x&&k[y]===0;y++);for(B<y&&(B=y),A=1,d=1;d<=15;d++)if(A<<=1,(A-=k[d])<0)return-1;if(A>0&&(u===0||x!==1))return-1;for(Y[1]=0,d=1;d<15;d++)Y[d+1]=Y[d]+k[d];for(j=0;j<T;j++)l[m+j]!==0&&(f[Y[l[m+j]]++]=j);if(u===0?(c=K=f,p=19):u===1?(c=i,L-=257,K=g,Q-=257,p=256):(c=s,K=o,p=-1),w=0,j=0,d=y,R=_,U=B,O=0,F=-1,M=(D=1<<B)-1,u===1&&D>852||u===2&&D>592)return 1;for(;;){P=d-O,f[j]<p?(Z=0,$=f[j]):f[j]>p?(Z=K[Q+f[j]],$=c[L+f[j]]):(Z=96,$=0),E=1<<d-O,y=N=1<<U;do b[R+(w>>O)+(N-=E)]=P<<24|Z<<16|$|0;while(N!==0);for(E=1<<d-1;w&E;)E>>=1;if(E!==0?(w&=E-1,w+=E):w=0,j++,--k[d]==0){if(d===x)break;d=l[m+f[j]]}if(d>B&&(w&M)!==F){for(O===0&&(O=B),R+=y,A=1<<(U=d-O);U+O<x&&!((A-=k[U+O])<=0);)U++,A<<=1;if(D+=1<<U,u===1&&D>852||u===2&&D>592)return 1;b[F=w&M]=B<<24|U<<16|R-_|0}}return w!==0&&(b[R+w]=d-O<<24|64<<16|0),S.bits=B,0}},function(e,t,r){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t){},function(e,t,r){function n(l,m){var T=Object.keys(l);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(l);m&&(b=b.filter(function(_){return Object.getOwnPropertyDescriptor(l,_).enumerable})),T.push.apply(T,b)}return T}function i(l,m,T){return m in l?Object.defineProperty(l,m,{value:T,enumerable:!0,configurable:!0,writable:!0}):l[m]=T,l}function g(l,m){for(var T=0;T<m.length;T++){var b=m[T];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(l,b.key,b)}}var s=r(4).Buffer,o=r(180).inspect,u=o&&o.custom||"inspect";e.exports=function(){function l(){(function(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}var m,T;return m=l,(T=[{key:"push",value:function(b){var _={data:b,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length}},{key:"unshift",value:function(b){var _={data:b,next:this.head};this.length===0&&(this.tail=_),this.head=_,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var _=this.head,f=""+_.data;_=_.next;)f+=b+_.data;return f}},{key:"concat",value:function(b){if(this.length===0)return s.alloc(0);for(var _,f,S,E=s.allocUnsafe(b>>>0),N=this.head,F=0;N;)_=N.data,f=E,S=F,s.prototype.copy.call(_,f,S),F+=N.data.length,N=N.next;return E}},{key:"consume",value:function(b,_){var f;return b<this.head.data.length?(f=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):f=b===this.head.data.length?this.shift():_?this._getString(b):this._getBuffer(b),f}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var _=this.head,f=1,S=_.data;for(b-=S.length;_=_.next;){var E=_.data,N=b>E.length?E.length:b;if(N===E.length?S+=E:S+=E.slice(0,b),(b-=N)==0){N===E.length?(++f,_.next?this.head=_.next:this.head=this.tail=null):(this.head=_,_.data=E.slice(N));break}++f}return this.length-=f,S}},{key:"_getBuffer",value:function(b){var _=s.allocUnsafe(b),f=this.head,S=1;for(f.data.copy(_),b-=f.data.length;f=f.next;){var E=f.data,N=b>E.length?E.length:b;if(E.copy(_,_.length-b,0,N),(b-=N)==0){N===E.length?(++S,f.next?this.head=f.next:this.head=this.tail=null):(this.head=f,f.data=E.slice(N));break}++S}return this.length-=S,_}},{key:u,value:function(b,_){return o(this,function(f){for(var S=1;S<arguments.length;S++){var E=arguments[S]!=null?arguments[S]:{};S%2?n(Object(E),!0).forEach(function(N){i(f,N,E[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(E)):n(Object(E)).forEach(function(N){Object.defineProperty(f,N,Object.getOwnPropertyDescriptor(E,N))})}return f}({},_,{depth:0,customInspect:!1}))}}])&&g(m.prototype,T),l}()},function(e,t){},function(e,t,r){(function(n){var i;function g(M,R,p){return R in M?Object.defineProperty(M,R,{value:p,enumerable:!0,configurable:!0,writable:!0}):M[R]=p,M}var s=r(45),o=Symbol("lastResolve"),u=Symbol("lastReject"),l=Symbol("error"),m=Symbol("ended"),T=Symbol("lastPromise"),b=Symbol("handlePromise"),_=Symbol("stream");function f(M,R){return{value:M,done:R}}function S(M){var R=M[o];if(R!==null){var p=M[_].read();p!==null&&(M[T]=null,M[o]=null,M[u]=null,R(f(p,!1)))}}function E(M){n.nextTick(S,M)}var N=Object.getPrototypeOf(function(){}),F=Object.setPrototypeOf((g(i={get stream(){return this[_]},next:function(){var M=this,R=this[l];if(R!==null)return Promise.reject(R);if(this[m])return Promise.resolve(f(void 0,!0));if(this[_].destroyed)return new Promise(function($,h){n.nextTick(function(){M[l]?h(M[l]):$(f(void 0,!0))})});var p,P=this[T];if(P)p=new Promise(function($,h){return function(d,j){$.then(function(){h[m]?d(f(void 0,!0)):h[b](d,j)},j)}}(P,this));else{var Z=this[_].read();if(Z!==null)return Promise.resolve(f(Z,!1));p=new Promise(this[b])}return this[T]=p,p}},Symbol.asyncIterator,function(){return this}),g(i,"return",function(){var M=this;return new Promise(function(R,p){M[_].destroy(null,function(P){P?p(P):R(f(void 0,!0))})})}),i),N);e.exports=function(M){var R,p=Object.create(F,(g(R={},_,{value:M,writable:!0}),g(R,o,{value:null,writable:!0}),g(R,u,{value:null,writable:!0}),g(R,l,{value:null,writable:!0}),g(R,m,{value:M._readableState.endEmitted,writable:!0}),g(R,b,{value:function(P,Z){var $=p[_].read();$?(p[T]=null,p[o]=null,p[u]=null,P(f($,!1))):(p[o]=P,p[u]=Z)},writable:!0}),R));return p[T]=null,s(M,function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Z=p[u];return Z!==null&&(p[T]=null,p[o]=null,p[u]=null,Z(P)),void(p[l]=P)}var $=p[o];$!==null&&(p[T]=null,p[o]=null,p[u]=null,$(f(void 0,!0))),p[m]=!0}),M.on("readable",E.bind(null,p)),p}}).call(this,r(2))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,r){e.exports=i;var n=r(80);function i(g){if(!(this instanceof i))return new i(g);n.call(this,g)}r(7)(i,n),i.prototype._transform=function(g,s,o){o(null,g)}},function(e,t,r){var n,i=r(23).codes,g=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function o(b){if(b)throw b}function u(b,_,f,S){S=function(F){var M=!1;return function(){M||(M=!0,F.apply(void 0,arguments))}}(S);var E=!1;b.on("close",function(){E=!0}),n===void 0&&(n=r(45)),n(b,{readable:_,writable:f},function(F){if(F)return S(F);E=!0,S()});var N=!1;return function(F){if(!E&&!N)return N=!0,function(M){return M.setHeader&&typeof M.abort=="function"}(b)?b.abort():typeof b.destroy=="function"?b.destroy():void S(F||new s("pipe"))}}function l(b){b()}function m(b,_){return b.pipe(_)}function T(b){return b.length?typeof b[b.length-1]!="function"?o:b.pop():o}e.exports=function(){for(var b=arguments.length,_=new Array(b),f=0;f<b;f++)_[f]=arguments[f];var S,E=T(_);if(Array.isArray(_[0])&&(_=_[0]),_.length<2)throw new g("streams");var N=_.map(function(F,M){var R=M<_.length-1;return u(F,R,M>0,function(p){S||(S=p),p&&N.forEach(l),R||(N.forEach(l),E(S))})});return _.reduce(m)}},function(e,t,r){var n=r(186)(function i(g,s){return(s=s||{}).namespace=g,s.prod=!0,s.dev=!1,s.force||i.force?i.yep(s):i.nope(s)});e.exports=n},function(e,t){var r=[],n=[],i=function(){};function g(f){return!~r.indexOf(f)&&(r.push(f),!0)}function s(f){i=f}function o(f){for(var S=[],E=0;E<r.length;E++)if(r[E].async)S.push(r[E]);else if(r[E](f))return!0;return!!S.length&&new Promise(function(N){Promise.all(S.map(function(F){return F(f)})).then(function(F){N(F.some(Boolean))})})}function u(f){return!~n.indexOf(f)&&(n.push(f),!0)}function l(){i.apply(i,arguments)}function m(f){for(var S=0;S<n.length;S++)f=n[S].apply(n[S],arguments);return f}function T(f,S){var E=Object.prototype.hasOwnProperty;for(var N in S)E.call(S,N)&&(f[N]=S[N]);return f}function b(f){return f.enabled=!1,f.modify=u,f.set=s,f.use=g,T(function(){return!1},f)}function _(f){return f.enabled=!0,f.modify=u,f.set=s,f.use=g,T(function(){var S=Array.prototype.slice.call(arguments,0);return l.call(l,f,m(S,f)),!0},f)}e.exports=function(f){return f.introduce=T,f.enabled=o,f.process=m,f.modify=u,f.write=l,f.nope=b,f.yep=_,f.set=s,f.use=g,f}},function(e,t,r){(function(n){var i=r(63),g=r(19).StringDecoder,s=r(28).Stream;function o(){}e.exports=function(u,l){var m=n.alloc(65536),T=new g("utf8"),b=new s,_="",f=0,S=0;return u.start===-1&&delete u.start,b.readable=!0,b.destroy=function(){b.destroyed=!0,b.emit("end"),b.emit("close")},i.open(u.file,"a+","0644",function(E,N){if(E)return l?l(E):b.emit("error",E),void b.destroy();(function F(){if(!b.destroyed)return i.read(N,m,0,m.length,f,function(M,R){if(M)return l?l(M):b.emit("error",M),void b.destroy();if(!R)return _&&((u.start==null||S>u.start)&&(l?l(null,_):b.emit("line",_)),S++,_=""),setTimeout(F,1e3);var p=T.write(m.slice(0,R));l||b.emit("data",p);for(var P=(p=(_+p).split(/\n+/)).length-1,Z=0;Z<P;Z++)(u.start==null||S>u.start)&&(l?l(null,p[Z]):b.emit("line",p[Z])),S++;return _=p[P],f+=R,F()});i.close(N,o)})()}),l?b.destroy:b}}).call(this,r(4).Buffer)},function(e,t,r){(function(n,i){function g(M){return(g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(M)}function s(M,R){var p=Object.keys(M);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(M);R&&(P=P.filter(function(Z){return Object.getOwnPropertyDescriptor(M,Z).enumerable})),p.push.apply(p,P)}return p}function o(M){for(var R=1;R<arguments.length;R++){var p=arguments[R]!=null?arguments[R]:{};R%2?s(Object(p),!0).forEach(function(P){u(M,P,p[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(p)):s(Object(p)).forEach(function(P){Object.defineProperty(M,P,Object.getOwnPropertyDescriptor(p,P))})}return M}function u(M,R,p){return R in M?Object.defineProperty(M,R,{value:p,enumerable:!0,configurable:!0,writable:!0}):M[R]=p,M}function l(M,R){if(!(M instanceof R))throw new TypeError("Cannot call a class as a function")}function m(M,R){for(var p=0;p<R.length;p++){var P=R[p];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(M,P.key,P)}}function T(M,R){return(T=Object.setPrototypeOf||function(p,P){return p.__proto__=P,p})(M,R)}function b(M){var R=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var p,P=f(M);if(R){var Z=f(this).constructor;p=Reflect.construct(P,arguments,Z)}else p=P.apply(this,arguments);return _(this,p)}}function _(M,R){return!R||g(R)!=="object"&&typeof R!="function"?function(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}(M):R}function f(M){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)})(M)}var S=r(81),E=r(199),N=r(28).Stream,F=r(17);e.exports=function(M){(function($,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");$.prototype=Object.create(h&&h.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),h&&T($,h)})(Z,M);var R,p,P=b(Z);function Z(){var $,h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return l(this,Z),($=P.call(this,h)).options=h,$.name=h.name||"http",$.ssl=!!h.ssl,$.host=h.host||"localhost",$.port=h.port,$.auth=h.auth,$.path=h.path||"",$.agent=h.agent,$.headers=h.headers||{},$.headers["content-type"]="application/json",$.port||($.port=$.ssl?443:80),$}return R=Z,(p=[{key:"log",value:function($,h){var d=this;this._request($,function(j,y){y&&y.statusCode!==200&&(j=new Error("Invalid HTTP Status Code: ".concat(y.statusCode))),j?d.emit("warn",j):d.emit("logged",$)}),h&&n(h)}},{key:"query",value:function($,h){typeof $=="function"&&(h=$,$={}),($={method:"query",params:this.normalizeQuery($)}).params.path&&($.path=$.params.path,delete $.params.path),$.params.auth&&($.auth=$.params.auth,delete $.params.auth),this._request($,function(d,j,y){if(j&&j.statusCode!==200&&(d=new Error("Invalid HTTP Status Code: ".concat(j.statusCode))),d)return h(d);if(typeof y=="string")try{y=JSON.parse(y)}catch(x){return h(x)}h(null,y)})}},{key:"stream",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=new N;($={method:"stream",params:$}).params.path&&($.path=$.params.path,delete $.params.path),$.params.auth&&($.auth=$.params.auth,delete $.params.auth);var d="",j=this._request($);return h.destroy=function(){return j.destroy()},j.on("data",function(y){for(var x=(y=(d+y).split(/\n+/)).length-1,B=0;B<x;B++)try{h.emit("log",JSON.parse(y[B]))}catch(U){h.emit("error",U)}d=y[x]}),j.on("error",function(y){return h.emit("error",y)}),h}},{key:"_request",value:function($,h){var d=($=$||{}).auth||this.auth,j=$.path||this.path||"";delete $.auth,delete $.path;var y=Object.assign({},this.headers);d&&d.bearer&&(y.Authorization="Bearer ".concat(d.bearer));var x=(this.ssl?E:S).request(o(o({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(j.replace(/^\//,"")),headers:y,auth:d&&d.username&&d.password?"".concat(d.username,":").concat(d.password):"",agent:this.agent}));x.on("error",h),x.on("response",function(B){return B.on("end",function(){return h(null,B)}).resume()}),x.end(i.from(JSON.stringify($),"utf8"))}}])&&m(R.prototype,p),Z}(F)}).call(this,r(12).setImmediate,r(4).Buffer)},function(e,t,r){(function(n,i,g){var s=r(82),o=r(7),u=r(83),l=r(27),m=r(190),T=u.IncomingMessage,b=u.readyStates,_=e.exports=function(S){var E,N=this;l.Writable.call(N),N._opts=S,N._body=[],N._headers={},S.auth&&N.setHeader("Authorization","Basic "+new n(S.auth).toString("base64")),Object.keys(S.headers).forEach(function(M){N.setHeader(M,S.headers[M])});var F=!0;if(S.mode==="disable-fetch"||"requestTimeout"in S&&!s.abortController)F=!1,E=!0;else if(S.mode==="prefer-streaming")E=!1;else if(S.mode==="allow-wrong-content-type")E=!s.overrideMimeType;else{if(S.mode&&S.mode!=="default"&&S.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");E=!0}N._mode=function(M,R){return s.fetch&&R?"fetch":s.mozchunkedarraybuffer?"moz-chunked-arraybuffer":s.msstream?"ms-stream":s.arraybuffer&&M?"arraybuffer":s.vbArray&&M?"text:vbarray":"text"}(E,F),N._fetchTimer=null,N.on("finish",function(){N._onFinish()})};o(_,l.Writable),_.prototype.setHeader=function(S,E){var N=S.toLowerCase();f.indexOf(N)===-1&&(this._headers[N]={name:S,value:E})},_.prototype.getHeader=function(S){var E=this._headers[S.toLowerCase()];return E?E.value:null},_.prototype.removeHeader=function(S){delete this._headers[S.toLowerCase()]},_.prototype._onFinish=function(){var S=this;if(!S._destroyed){var E=S._opts,N=S._headers,F=null;E.method!=="GET"&&E.method!=="HEAD"&&(F=s.arraybuffer?m(n.concat(S._body)):s.blobConstructor?new i.Blob(S._body.map(function(Z){return m(Z)}),{type:(N["content-type"]||{}).value||""}):n.concat(S._body).toString());var M=[];if(Object.keys(N).forEach(function(Z){var $=N[Z].name,h=N[Z].value;Array.isArray(h)?h.forEach(function(d){M.push([$,d])}):M.push([$,h])}),S._mode==="fetch"){var R=null;if(s.abortController){var p=new AbortController;R=p.signal,S._fetchAbortController=p,"requestTimeout"in E&&E.requestTimeout!==0&&(S._fetchTimer=i.setTimeout(function(){S.emit("requestTimeout"),S._fetchAbortController&&S._fetchAbortController.abort()},E.requestTimeout))}i.fetch(S._opts.url,{method:S._opts.method,headers:M,body:F||void 0,mode:"cors",credentials:E.withCredentials?"include":"same-origin",signal:R}).then(function(Z){S._fetchResponse=Z,S._connect()},function(Z){i.clearTimeout(S._fetchTimer),S._destroyed||S.emit("error",Z)})}else{var P=S._xhr=new i.XMLHttpRequest;try{P.open(S._opts.method,S._opts.url,!0)}catch(Z){return void g.nextTick(function(){S.emit("error",Z)})}"responseType"in P&&(P.responseType=S._mode.split(":")[0]),"withCredentials"in P&&(P.withCredentials=!!E.withCredentials),S._mode==="text"&&"overrideMimeType"in P&&P.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in E&&(P.timeout=E.requestTimeout,P.ontimeout=function(){S.emit("requestTimeout")}),M.forEach(function(Z){P.setRequestHeader(Z[0],Z[1])}),S._response=null,P.onreadystatechange=function(){switch(P.readyState){case b.LOADING:case b.DONE:S._onXHRProgress()}},S._mode==="moz-chunked-arraybuffer"&&(P.onprogress=function(){S._onXHRProgress()}),P.onerror=function(){S._destroyed||S.emit("error",new Error("XHR error"))};try{P.send(F)}catch(Z){return void g.nextTick(function(){S.emit("error",Z)})}}}},_.prototype._onXHRProgress=function(){(function(S){try{var E=S.status;return E!==null&&E!==0}catch{return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},_.prototype._connect=function(){var S=this;S._destroyed||(S._response=new T(S._xhr,S._fetchResponse,S._mode,S._fetchTimer),S._response.on("error",function(E){S.emit("error",E)}),S.emit("response",S._response))},_.prototype._write=function(S,E,N){this._body.push(S),N()},_.prototype.abort=_.prototype.destroy=function(){this._destroyed=!0,i.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},_.prototype.end=function(S,E,N){typeof S=="function"&&(N=S,S=void 0),l.Writable.prototype.end.call(this,S,E,N)},_.prototype.flushHeaders=function(){},_.prototype.setTimeout=function(){},_.prototype.setNoDelay=function(){},_.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(4).Buffer,r(5),r(2))},function(e,t,r){var n=r(4).Buffer;e.exports=function(i){if(i instanceof Uint8Array){if(i.byteOffset===0&&i.byteLength===i.buffer.byteLength)return i.buffer;if(typeof i.buffer.slice=="function")return i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)}if(n.isBuffer(i)){for(var g=new Uint8Array(i.length),s=i.length,o=0;o<s;o++)g[o]=i[o];return g.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){e.exports=function(){for(var n={},i=0;i<arguments.length;i++){var g=arguments[i];for(var s in g)r.call(g,s)&&(n[s]=g[s])}return n};var r=Object.prototype.hasOwnProperty},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,r){(function(n,i){var g;(function(s){t&&t.nodeType,n&&n.nodeType;var o=typeof i=="object"&&i;o.global!==o&&o.window!==o&&o.self;var u,l=2147483647,m=/^xn--/,T=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,S=String.fromCharCode;function E(h){throw new RangeError(_[h])}function N(h,d){for(var j=h.length,y=[];j--;)y[j]=d(h[j]);return y}function F(h,d){var j=h.split("@"),y="";return j.length>1&&(y=j[0]+"@",h=j[1]),y+N((h=h.replace(b,".")).split("."),d).join(".")}function M(h){for(var d,j,y=[],x=0,B=h.length;x<B;)(d=h.charCodeAt(x++))>=55296&&d<=56319&&x<B?(64512&(j=h.charCodeAt(x++)))==56320?y.push(((1023&d)<<10)+(1023&j)+65536):(y.push(d),x--):y.push(d);return y}function R(h){return N(h,function(d){var j="";return d>65535&&(j+=S((d-=65536)>>>10&1023|55296),d=56320|1023&d),j+=S(d)}).join("")}function p(h,d){return h+22+75*(h<26)-((d!=0)<<5)}function P(h,d,j){var y=0;for(h=j?f(h/700):h>>1,h+=f(h/d);h>455;y+=36)h=f(h/35);return f(y+36*h/(h+38))}function Z(h){var d,j,y,x,B,U,O,A,D,w,c,L=[],k=h.length,Y=0,K=128,Q=72;for((j=h.lastIndexOf("-"))<0&&(j=0),y=0;y<j;++y)h.charCodeAt(y)>=128&&E("not-basic"),L.push(h.charCodeAt(y));for(x=j>0?j+1:0;x<k;){for(B=Y,U=1,O=36;x>=k&&E("invalid-input"),((A=(c=h.charCodeAt(x++))-48<10?c-22:c-65<26?c-65:c-97<26?c-97:36)>=36||A>f((l-Y)/U))&&E("overflow"),Y+=A*U,!(A<(D=O<=Q?1:O>=Q+26?26:O-Q));O+=36)U>f(l/(w=36-D))&&E("overflow"),U*=w;Q=P(Y-B,d=L.length+1,B==0),f(Y/d)>l-K&&E("overflow"),K+=f(Y/d),Y%=d,L.splice(Y++,0,K)}return R(L)}function $(h){var d,j,y,x,B,U,O,A,D,w,c,L,k,Y,K,Q=[];for(L=(h=M(h)).length,d=128,j=0,B=72,U=0;U<L;++U)(c=h[U])<128&&Q.push(S(c));for(y=x=Q.length,x&&Q.push("-");y<L;){for(O=l,U=0;U<L;++U)(c=h[U])>=d&&c<O&&(O=c);for(O-d>f((l-j)/(k=y+1))&&E("overflow"),j+=(O-d)*k,d=O,U=0;U<L;++U)if((c=h[U])<d&&++j>l&&E("overflow"),c==d){for(A=j,D=36;!(A<(w=D<=B?1:D>=B+26?26:D-B));D+=36)K=A-w,Y=36-w,Q.push(S(p(w+K%Y,0))),A=f(K/Y);Q.push(S(p(A,0))),B=P(j,k,y==x),j=0,++y}++j,++d}return Q.join("")}u={version:"1.4.1",ucs2:{decode:M,encode:R},decode:Z,encode:$,toASCII:function(h){return F(h,function(d){return T.test(d)?"xn--"+$(d):d})},toUnicode:function(h){return F(h,function(d){return m.test(d)?Z(d.slice(4).toLowerCase()):d})}},(g=function(){return u}.call(t,r,t,n))===void 0||(n.exports=g)})()}).call(this,r(194)(e),r(5))},function(e,t){e.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(e,t,r){e.exports={isString:function(n){return typeof n=="string"},isObject:function(n){return typeof n=="object"&&n!==null},isNull:function(n){return n===null},isNullOrUndefined:function(n){return n==null}}},function(e,t,r){t.decode=t.parse=r(197),t.encode=t.stringify=r(198)},function(e,t,r){function n(g,s){return Object.prototype.hasOwnProperty.call(g,s)}e.exports=function(g,s,o,u){s=s||"&",o=o||"=";var l={};if(typeof g!="string"||g.length===0)return l;var m=/\+/g;g=g.split(s);var T=1e3;u&&typeof u.maxKeys=="number"&&(T=u.maxKeys);var b=g.length;T>0&&b>T&&(b=T);for(var _=0;_<b;++_){var f,S,E,N,F=g[_].replace(m,"%20"),M=F.indexOf(o);M>=0?(f=F.substr(0,M),S=F.substr(M+1)):(f=F,S=""),E=decodeURIComponent(f),N=decodeURIComponent(S),n(l,E)?i(l[E])?l[E].push(N):l[E]=[l[E],N]:l[E]=N}return l};var i=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"}},function(e,t,r){var n=function(o){switch(typeof o){case"string":return o;case"boolean":return o?"true":"false";case"number":return isFinite(o)?o:"";default:return""}};e.exports=function(o,u,l,m){return u=u||"&",l=l||"=",o===null&&(o=void 0),typeof o=="object"?g(s(o),function(T){var b=encodeURIComponent(n(T))+l;return i(o[T])?g(o[T],function(_){return b+encodeURIComponent(n(_))}).join(u):b+encodeURIComponent(n(o[T]))}).join(u):m?encodeURIComponent(n(m))+l+encodeURIComponent(n(o)):""};var i=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"};function g(o,u){if(o.map)return o.map(u);for(var l=[],m=0;m<o.length;m++)l.push(u(o[m],m));return l}var s=Object.keys||function(o){var u=[];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&u.push(l);return u}},function(e,t,r){var n=r(81),i=r(46),g=e.exports;for(var s in n)n.hasOwnProperty(s)&&(g[s]=n[s]);function o(u){if(typeof u=="string"&&(u=i.parse(u)),u.protocol||(u.protocol="https:"),u.protocol!=="https:")throw new Error('Protocol "'+u.protocol+'" not supported. Expected "https:"');return u}g.request=function(u,l){return u=o(u),n.request.call(this,u,l)},g.get=function(u,l){return u=o(u),n.get.call(this,u,l)}},function(e,t,r){(function(n){function i(S){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(S)}function g(S,E){if(!(S instanceof E))throw new TypeError("Cannot call a class as a function")}function s(S,E){for(var N=0;N<E.length;N++){var F=E[N];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(S,F.key,F)}}function o(S,E){return(o=Object.setPrototypeOf||function(N,F){return N.__proto__=F,N})(S,E)}function u(S){var E=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var N,F=m(S);if(E){var M=m(this).constructor;N=Reflect.construct(F,arguments,M)}else N=F.apply(this,arguments);return l(this,N)}}function l(S,E){return!E||i(E)!=="object"&&typeof E!="function"?function(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}(S):E}function m(S){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(S)}var T=r(84),b=r(3).MESSAGE,_=r(15),f=r(17);e.exports=function(S){(function(R,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(p&&p.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),p&&o(R,p)})(M,S);var E,N,F=u(M);function M(){var R,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(g(this,M),R=F.call(this,p),!p.stream||!T(p.stream))throw new Error("options.stream is required.");return R._stream=p.stream,R._stream.setMaxListeners(1/0),R.isObjectMode=p.stream._writableState.objectMode,R.eol=p.eol||_.EOL,R}return E=M,(N=[{key:"log",value:function(R,p){var P=this;if(n(function(){return P.emit("logged",R)}),this.isObjectMode)return this._stream.write(R),void(p&&p());this._stream.write("".concat(R[b]).concat(this.eol)),p&&p()}}])&&s(E.prototype,N),M}(f)}).call(this,r(12).setImmediate)},function(e,t,r){(function(n){function i(y,x,B){return x in y?Object.defineProperty(y,x,{value:B,enumerable:!0,configurable:!0,writable:!0}):y[x]=B,y}function g(y){return(g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x})(y)}function s(y,x){for(var B=0;B<x.length;B++){var U=x[B];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(y,U.key,U)}}function o(y,x){return(o=Object.setPrototypeOf||function(B,U){return B.__proto__=U,B})(y,x)}function u(y){var x=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var B,U=m(y);if(x){var O=m(this).constructor;B=Reflect.construct(U,arguments,O)}else B=U.apply(this,arguments);return l(this,B)}}function l(y,x){return!x||g(x)!=="object"&&typeof x!="function"?function(B){if(B===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B}(y):x}function m(y){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)})(y)}var T=r(28),b=T.Stream,_=T.Transform,f=r(48),S=r(3),E=S.LEVEL,N=S.SPLAT,F=r(84),M=r(86),R=r(90),p=r(205),P=r(206),Z=r(59).warn,$=r(47),h=/%[scdjifoO%]/g,d=function(y){(function(A,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(D&&D.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),D&&o(A,D)})(O,y);var x,B,U=u(O);function O(A){var D;return function(w,c){if(!(w instanceof c))throw new TypeError("Cannot call a class as a function")}(this,O),(D=U.call(this,{objectMode:!0})).configure(A),D}return x=O,(B=[{key:"child",value:function(A){var D=this;return Object.create(D,{write:{value:function(w){var c=Object.assign({},A,w);w instanceof Error&&(c.stack=w.stack,c.message=w.message),D.write(c)}}})}},{key:"configure",value:function(){var A=this,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},w=D.silent,c=D.format,L=D.defaultMeta,k=D.levels,Y=D.level,K=Y===void 0?"info":Y,Q=D.exitOnError,z=Q===void 0||Q,V=D.transports,v=D.colors,I=D.emitErrs,W=D.formatters,ee=D.padLevels,J=D.rewriters,ne=D.stripColors,oe=D.exceptionHandlers,he=D.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=w,this.format=c||this.format||r(207)(),this.defaultMeta=L||null,this.levels=k||this.levels||$.npm.levels,this.level=K,this.exceptions=new M(this),this.rejections=new R(this),this.profilers={},this.exitOnError=z,V&&(V=Array.isArray(V)?V:[V]).forEach(function(fe){return A.add(fe)}),v||I||W||ee||J||ne)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
39
+ `));oe&&this.exceptions.handle(oe),he&&this.rejections.handle(he)}},{key:"isLevelEnabled",value:function(A){var D=this,w=j(this.levels,A);if(w===null)return!1;var c=j(this.levels,this.level);return c!==null&&(this.transports&&this.transports.length!==0?this.transports.findIndex(function(L){var k=j(D.levels,L.level);return k===null&&(k=c),k>=w})!==-1:c>=w)}},{key:"log",value:function(A,D){for(var w,c,L=arguments.length,k=new Array(L>2?L-2:0),Y=2;Y<L;Y++)k[Y-2]=arguments[Y];if(arguments.length===1)return A[E]=A.level,this._addDefaultMeta(A),this.write(A),this;if(arguments.length===2)return D&&g(D)==="object"?(D[E]=D.level=A,this._addDefaultMeta(D),this.write(D),this):(this.write((i(c={},E,A),i(c,"level",A),i(c,"message",D),c)),this);var K=k[0];if(g(K)==="object"&&K!==null){var Q=D&&D.match&&D.match(h);if(!Q){var z,V=Object.assign({},this.defaultMeta,K,(i(z={},E,A),i(z,N,k),i(z,"level",A),i(z,"message",D),z));return K.message&&(V.message="".concat(V.message," ").concat(K.message)),K.stack&&(V.stack=K.stack),this.write(V),this}}return this.write(Object.assign({},this.defaultMeta,(i(w={},E,A),i(w,N,k),i(w,"level",A),i(w,"message",D),w))),this}},{key:"_transform",value:function(A,D,w){if(this.silent)return w();A[E]||(A[E]=A.level),this.levels[A[E]]||this.levels[A[E]]===0||console.error("[winston] Unknown logger level: %s",A[E]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports %j",A);try{this.push(this.format.transform(A,this.format.options))}catch(c){throw c}finally{w()}}},{key:"_final",value:function(A){var D=this.transports.slice();f(D,function(w,c){if(!w||w.finished)return n(c);w.once("finish",c),w.end()},A)}},{key:"add",value:function(A){var D=!F(A)||A.log.length>2?new p({transport:A}):A;if(!D._writableState||!D._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",D),this._onEvent("warn",D),this.pipe(D),A.handleExceptions&&this.exceptions.handle(),A.handleRejections&&this.rejections.handle(),this}},{key:"remove",value:function(A){if(!A)return this;var D=A;return(!F(A)||A.log.length>2)&&(D=this.transports.filter(function(w){return w.transport===A})[0]),D&&this.unpipe(D),this}},{key:"clear",value:function(){return this.unpipe(),this}},{key:"close",value:function(){return this.clear(),this.emit("close"),this}},{key:"setLevels",value:function(){Z.deprecated("setLevels")}},{key:"query",value:function(A,D){typeof A=="function"&&(D=A,A={}),A=A||{};var w={},c=Object.assign({},A.query||{});f(this.transports.filter(function(L){return!!L.query}),function(L,k){(function(Y,K){A.query&&typeof Y.formatQuery=="function"&&(A.query=Y.formatQuery(c)),Y.query(A,function(Q,z){if(Q)return K(Q);typeof Y.formatResults=="function"&&(z=Y.formatResults(z,A.format)),K(null,z)})})(L,function(Y,K){k&&((K=Y||K)&&(w[L.name]=K),k()),k=null})},function(){return D(null,w)})}},{key:"stream",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=new b,w=[];return D._streams=w,D.destroy=function(){for(var c=w.length;c--;)w[c].destroy()},this.transports.filter(function(c){return!!c.stream}).forEach(function(c){var L=c.stream(A);L&&(w.push(L),L.on("log",function(k){k.transport=k.transport||[],k.transport.push(c.name),D.emit("log",k)}),L.on("error",function(k){k.transport=k.transport||[],k.transport.push(c.name),D.emit("error",k)}))}),D}},{key:"startTimer",value:function(){return new P(this)}},{key:"profile",value:function(A){var D=Date.now();if(this.profilers[A]){var w=this.profilers[A];delete this.profilers[A];for(var c=arguments.length,L=new Array(c>1?c-1:0),k=1;k<c;k++)L[k-1]=arguments[k];typeof L[L.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),L.pop());var Y=g(L[L.length-1])==="object"?L.pop():{};return Y.level=Y.level||"info",Y.durationMs=D-w,Y.message=Y.message||A,this.write(Y)}return this.profilers[A]=D,this}},{key:"handleExceptions",value:function(){var A;console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),(A=this.exceptions).handle.apply(A,arguments)}},{key:"unhandleExceptions",value:function(){var A;console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),(A=this.exceptions).unhandle.apply(A,arguments)}},{key:"cli",value:function(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
40
+ `))}},{key:"_onEvent",value:function(A,D){D["__winston"+A]||(D["__winston"+A]=function(w){A!=="error"||this.transports.includes(D)||this.add(D),this.emit(A,w,D)}.bind(this),D.on(A,D["__winston"+A]))}},{key:"_addDefaultMeta",value:function(A){this.defaultMeta&&Object.assign(A,this.defaultMeta)}}])&&s(x.prototype,B),O}(_);function j(y,x){var B=y[x];return B||B===0?B:null}Object.defineProperty(d.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var y=this._readableState.pipes;return Array.isArray(y)?y:[y].filter(Boolean)}}),e.exports=d}).call(this,r(12).setImmediate)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=m(r(41)),i=m(r(42)),g=m(r(64)),s=m(r(65)),o=m(r(66)),u=m(r(22)),l=m(r(26));function m(_){return _&&_.__esModule?_:{default:_}}function T(_,f,S){S=(0,s.default)(S);var E=0,N=0,{length:F}=_,M=!1;function R(p,P){p===!1&&(M=!0),M!==!0&&(p?S(p):++N!==F&&P!==i.default||S(null))}for(F===0&&S(null);E<F;E++)f(_[E],E,(0,o.default)(R))}function b(_,f,S){return(0,g.default)(_,1/0,f,S)}t.default=(0,l.default)(function(_,f,S){return((0,n.default)(_)?T:b)(_,(0,u.default)(f),S)},3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return(i,g,s)=>n(i,s)},e.exports=t.default},function(e,t,r){var n=Object.prototype.toString;e.exports=function(i){if(typeof i.displayName=="string"&&i.constructor.name)return i.displayName;if(typeof i.name=="string"&&i.name)return i.name;if(typeof i=="object"&&i.constructor&&typeof i.constructor.name=="string")return i.constructor.name;var g=i.toString(),s=n.call(i).slice(8,-1);return(g=s==="Function"?g.substring(g.indexOf("(")+1,g.indexOf(")")):s)||"anonymous"}},function(e,t,r){const n=r(10),{LEVEL:i}=r(3),g=r(17),s=e.exports=function(o={}){if(g.call(this,o),!o.transport||typeof o.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=o.transport,this.level=this.level||o.transport.level,this.handleExceptions=this.handleExceptions||o.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(u){this.emit("error",u,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};n.inherits(s,g),s.prototype._write=function(o,u,l){if(this.silent||o.exception===!0&&!this.handleExceptions)return l(null);(!this.level||this.levels[this.level]>=this.levels[o[i]])&&this.transport.log(o[i],o.message,o,this._nop),l(null)},s.prototype._writev=function(o,u){for(let l=0;l<o.length;l++)this._accept(o[l])&&(this.transport.log(o[l].chunk[i],o[l].chunk.message,o[l].chunk,this._nop),o[l].callback());return u(null)},s.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
41
+ `))},s.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,r){function n(g){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(g)}function i(g,s){for(var o=0;o<s.length;o++){var u=s[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}e.exports=function(){function g(u){if(function(l,m){if(!(l instanceof m))throw new TypeError("Cannot call a class as a function")}(this,g),!u)throw new Error("Logger is required for profiling.");this.logger=u,this.start=Date.now()}var s,o;return s=g,(o=[{key:"done",value:function(){for(var u=arguments.length,l=new Array(u),m=0;m<u;m++)l[m]=arguments[m];typeof l[l.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),l.pop());var T=n(l[l.length-1])==="object"?l.pop():{};return T.level=T.level||"info",T.durationMs=Date.now()-this.start,this.logger.write(T)}}])&&i(s.prototype,o),g}()},function(e,t,r){(function(n){const i=r(208),{MESSAGE:g}=r(3),s=r(30);function o(u,l){return l instanceof n?l.toString("base64"):typeof l=="bigint"?l.toString():l}e.exports=i((u,l={})=>(u[g]=(l.stable?s.stableStringify:s)(u,l.replacer||o,l.space),u))}).call(this,r(4).Buffer)},function(e,t,r){class n extends Error{constructor(g){super(`Format functions must be synchronous taking a two arguments: (info, opts)
42
+ Found: ${g.toString().split(`
43
+ `)[0]}
44
+ `),Error.captureStackTrace(this,n)}}e.exports=i=>{if(i.length>2)throw new n(i);function g(o={}){this.options=o}function s(o){return new g(o)}return g.prototype.transform=i,s.Format=g,s}},function(e,t,r){function n(s,o){if(!(s instanceof o))throw new TypeError("Cannot call a class as a function")}function i(s,o){for(var u=0;u<o.length;u++){var l=o[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(s,l.key,l)}}var g=r(85);e.exports=function(){function s(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(this,s),this.loggers=new Map,this.options=l}var o,u;return o=s,(u=[{key:"add",value:function(l,m){var T=this;if(!this.loggers.has(l)){var b=(m=Object.assign({},m||this.options)).transports||this.options.transports;m.transports=b?b.slice():[];var _=g(m);_.on("close",function(){return T._delete(l)}),this.loggers.set(l,_)}return this.loggers.get(l)}},{key:"get",value:function(l,m){return this.add(l,m)}},{key:"has",value:function(l){return!!this.loggers.has(l)}},{key:"close",value:function(l){var m=this;if(l)return this._removeLogger(l);this.loggers.forEach(function(T,b){return m._removeLogger(b)})}},{key:"_removeLogger",value:function(l){this.loggers.has(l)&&(this.loggers.get(l).close(),this._delete(l))}},{key:"_delete",value:function(l){this.loggers.delete(l)}}])&&i(o.prototype,u),s}()},function(e,t,r){(function(n){const i=r(49),g=/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/;e.exports=function(s,o,u){let l,m,T=!1,b=!1;function _(E,N){let F=`"${o}" ${N}`;throw E&&(F=`${F}, but is set to "${E}"`),m&&(F=`${F}. An example of a valid value would be: ${m}`),new i(F)}function f(E){return function(){let N=s[o];if(N===void 0)if(l===void 0&&b)_(void 0,"is a required variable, but it was not set");else{if(l===void 0)return;N=l}b&&N.trim().length===0&&_(void 0,"is a required variable, but its value was empty"),T&&(N.match(g)||_(N,"should be a valid base64 string if using convertFromBase64"),N=n.from(N,"base64").toString());const F=[N].concat(Array.prototype.slice.call(arguments));try{return E.apply(E,F)}catch(M){_(N,M.message)}}}const S={asArray:f(r(211)),asBoolStrict:f(r(212)),asBool:f(r(213)),asPortNumber:f(r(214)),asEnum:f(r(215)),asFloatNegative:f(r(216)),asFloatPositive:f(r(217)),asFloat:f(r(51)),asIntNegative:f(r(218)),asIntPositive:f(r(91)),asInt:f(r(50)),asJsonArray:f(r(219)),asJsonObject:f(r(220)),asJson:f(r(52)),asString:f(r(34)),asUrlObject:f(r(92)),asUrlString:f(r(221)),convertFromBase64:function(){return T=!0,S},default:function(E){if(typeof E=="number")l=E.toString();else if(Array.isArray(E)||typeof E=="object"&&E!==null)l=JSON.stringify(E);else{if(typeof E!="string")throw new i("values passed to default() must be of Number, String, Array, or Object type");l=E}return S},required:function(E){return b=E===void 0||E,S},example:function(E){return m=E,S}};return Object.entries(u).forEach(([E,N])=>{S[E]=f(N)}),S}}).call(this,r(4).Buffer)},function(e,t,r){const n=r(34);e.exports=function(i,g){return g=g||",",i.length?n(i).split(g).filter(Boolean):[]}},function(e,t,r){e.exports=function(n){const i=n.toLowerCase();if(i!=="false"&&i!=="true")throw new Error('should be either "true", "false", "TRUE", or "FALSE"');return i!=="false"}},function(e,t,r){e.exports=function(n){const i=n.toLowerCase();if(["false","0","true","1"].indexOf(i)===-1)throw new Error('should be either "true", "false", "TRUE", "FALSE", 1, or 0');return!(i==="0"||i==="false")}},function(e,t,r){const n=r(91);e.exports=function(i){var g=n(i);if(g>65535)throw new Error("cannot assign a port number greater than 65535");return g}},function(e,t,r){const n=r(34);e.exports=function(i,g){const s=n(i);if(g.indexOf(s)<0)throw new Error(`should be one of [${g.join(", ")}]`);return s}},function(e,t,r){const n=r(51);e.exports=function(i){const g=n(i);if(g>0)throw new Error("should be a negative float");return g}},function(e,t,r){const n=r(51);e.exports=function(i){const g=n(i);if(g<0)throw new Error("should be a positive float");return g}},function(e,t,r){const n=r(50);e.exports=function(i){const g=n(i);if(g>0)throw new Error("should be a negative integer");return g}},function(e,t,r){const n=r(52);e.exports=function(i){var g=n(i);if(!Array.isArray(g))throw new Error("should be a parseable JSON Array");return g}},function(e,t,r){const n=r(52);e.exports=function(i){var g=n(i);if(Array.isArray(g))throw new Error("should be a parseable JSON Object");return g}},function(e,t,r){const n=r(92);e.exports=function(i){return n(i).toString()}},function(e,t,r){function n(o){var u=this;if(u instanceof n||(u=new n),u.tail=null,u.head=null,u.length=0,o&&typeof o.forEach=="function")o.forEach(function(T){u.push(T)});else if(arguments.length>0)for(var l=0,m=arguments.length;l<m;l++)u.push(arguments[l]);return u}function i(o,u){o.tail=new s(u,o.tail,null,o),o.head||(o.head=o.tail),o.length++}function g(o,u){o.head=new s(u,null,o.head,o),o.tail||(o.tail=o.head),o.length++}function s(o,u,l,m){if(!(this instanceof s))return new s(o,u,l,m);this.list=m,this.value=o,u?(u.next=this,this.prev=u):this.prev=null,l?(l.prev=this,this.next=l):this.next=null}e.exports=n,n.Node=s,n.create=n,n.prototype.removeNode=function(o){if(o.list!==this)throw new Error("removing node which does not belong to this list");var u=o.next,l=o.prev;u&&(u.prev=l),l&&(l.next=u),o===this.head&&(this.head=u),o===this.tail&&(this.tail=l),o.list.length--,o.next=null,o.prev=null,o.list=null},n.prototype.unshiftNode=function(o){if(o!==this.head){o.list&&o.list.removeNode(o);var u=this.head;o.list=this,o.next=u,u&&(u.prev=o),this.head=o,this.tail||(this.tail=o),this.length++}},n.prototype.pushNode=function(o){if(o!==this.tail){o.list&&o.list.removeNode(o);var u=this.tail;o.list=this,o.prev=u,u&&(u.next=o),this.tail=o,this.head||(this.head=o),this.length++}},n.prototype.push=function(){for(var o=0,u=arguments.length;o<u;o++)i(this,arguments[o]);return this.length},n.prototype.unshift=function(){for(var o=0,u=arguments.length;o<u;o++)g(this,arguments[o]);return this.length},n.prototype.pop=function(){if(this.tail){var o=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,o}},n.prototype.shift=function(){if(this.head){var o=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,o}},n.prototype.forEach=function(o,u){u=u||this;for(var l=this.head,m=0;l!==null;m++)o.call(u,l.value,m,this),l=l.next},n.prototype.forEachReverse=function(o,u){u=u||this;for(var l=this.tail,m=this.length-1;l!==null;m--)o.call(u,l.value,m,this),l=l.prev},n.prototype.get=function(o){for(var u=0,l=this.head;l!==null&&u<o;u++)l=l.next;if(u===o&&l!==null)return l.value},n.prototype.getReverse=function(o){for(var u=0,l=this.tail;l!==null&&u<o;u++)l=l.prev;if(u===o&&l!==null)return l.value},n.prototype.map=function(o,u){u=u||this;for(var l=new n,m=this.head;m!==null;)l.push(o.call(u,m.value,this)),m=m.next;return l},n.prototype.mapReverse=function(o,u){u=u||this;for(var l=new n,m=this.tail;m!==null;)l.push(o.call(u,m.value,this)),m=m.prev;return l},n.prototype.reduce=function(o,u){var l,m=this.head;if(arguments.length>1)l=u;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");m=this.head.next,l=this.head.value}for(var T=0;m!==null;T++)l=o(l,m.value,T),m=m.next;return l},n.prototype.reduceReverse=function(o,u){var l,m=this.tail;if(arguments.length>1)l=u;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");m=this.tail.prev,l=this.tail.value}for(var T=this.length-1;m!==null;T--)l=o(l,m.value,T),m=m.prev;return l},n.prototype.toArray=function(){for(var o=new Array(this.length),u=0,l=this.head;l!==null;u++)o[u]=l.value,l=l.next;return o},n.prototype.toArrayReverse=function(){for(var o=new Array(this.length),u=0,l=this.tail;l!==null;u++)o[u]=l.value,l=l.prev;return o},n.prototype.slice=function(o,u){(u=u||this.length)<0&&(u+=this.length),(o=o||0)<0&&(o+=this.length);var l=new n;if(u<o||u<0)return l;o<0&&(o=0),u>this.length&&(u=this.length);for(var m=0,T=this.head;T!==null&&m<o;m++)T=T.next;for(;T!==null&&m<u;m++,T=T.next)l.push(T.value);return l},n.prototype.sliceReverse=function(o,u){(u=u||this.length)<0&&(u+=this.length),(o=o||0)<0&&(o+=this.length);var l=new n;if(u<o||u<0)return l;o<0&&(o=0),u>this.length&&(u=this.length);for(var m=this.length,T=this.tail;T!==null&&m>u;m--)T=T.prev;for(;T!==null&&m>o;m--,T=T.prev)l.push(T.value);return l},n.prototype.reverse=function(){for(var o=this.head,u=this.tail,l=o;l!==null;l=l.prev){var m=l.prev;l.prev=l.next,l.next=m}return this.head=u,this.tail=o,this};try{r(223)(n)}catch{}},function(e,t,r){e.exports=function(n){n.prototype[Symbol.iterator]=function*(){for(let i=this.head;i;i=i.next)yield i.value}}},function(e,t,r){(function(n){(function(){var i,g,s,o,u,l;typeof performance!="undefined"&&performance!==null&&performance.now?e.exports=function(){return performance.now()}:n!=null&&n.hrtime?(e.exports=function(){return(i()-u)/1e6},g=n.hrtime,o=(i=function(){var m;return 1e9*(m=g())[0]+m[1]})(),l=1e9*n.uptime(),u=o-l):Date.now?(e.exports=function(){return Date.now()-s},s=Date.now()):(e.exports=function(){return new Date().getTime()-s},s=new Date().getTime())}).call(this)}).call(this,r(2))},function(e,t,r){var n,i,g=r(96),s=r(97),o=0,u=0;e.exports=function(l,m,T){var b=m&&T||0,_=m||[],f=(l=l||{}).node||n,S=l.clockseq!==void 0?l.clockseq:i;if(f==null||S==null){var E=g();f==null&&(f=n=[1|E[0],E[1],E[2],E[3],E[4],E[5]]),S==null&&(S=i=16383&(E[6]<<8|E[7]))}var N=l.msecs!==void 0?l.msecs:new Date().getTime(),F=l.nsecs!==void 0?l.nsecs:u+1,M=N-o+(F-u)/1e4;if(M<0&&l.clockseq===void 0&&(S=S+1&16383),(M<0||N>o)&&l.nsecs===void 0&&(F=0),F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=N,u=F,i=S;var R=(1e4*(268435455&(N+=122192928e5))+F)%4294967296;_[b++]=R>>>24&255,_[b++]=R>>>16&255,_[b++]=R>>>8&255,_[b++]=255&R;var p=N/4294967296*1e4&268435455;_[b++]=p>>>8&255,_[b++]=255&p,_[b++]=p>>>24&15|16,_[b++]=p>>>16&255,_[b++]=S>>>8|128,_[b++]=255&S;for(var P=0;P<6;++P)_[b+P]=f[P];return m||s(_)}},function(e,t,r){var n=r(96),i=r(97);e.exports=function(g,s,o){var u=s&&o||0;typeof g=="string"&&(s=g==="binary"?new Array(16):null,g=null);var l=(g=g||{}).random||(g.rng||n)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,s)for(var m=0;m<16;++m)s[u+m]=l[m];return s||i(l)}},function(e,t,r){(function(n){(function(i){function g(o){if((o=o===void 0?"utf-8":o)!=="utf-8")throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+o+"') is invalid.")}function s(o,u){if(u=u===void 0?{fatal:!1}:u,(o=o===void 0?"utf-8":o)!=="utf-8")throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+o+"') is invalid.");if(u.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(i.TextEncoder&&i.TextDecoder)return!1;Object.defineProperty(g.prototype,"encoding",{value:"utf-8"}),g.prototype.encode=function(o,u){if((u=u===void 0?{stream:!1}:u).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");u=0;for(var l=o.length,m=0,T=Math.max(32,l+(l>>1)+7),b=new Uint8Array(T>>3<<3);u<l;){var _=o.charCodeAt(u++);if(55296<=_&&56319>=_){if(u<l){var f=o.charCodeAt(u);(64512&f)==56320&&(++u,_=((1023&_)<<10)+(1023&f)+65536)}if(55296<=_&&56319>=_)continue}if(m+4>b.length&&(T+=8,T=(T*=1+u/o.length*2)>>3<<3,(f=new Uint8Array(T)).set(b),b=f),(4294967168&_)==0)b[m++]=_;else{if((4294965248&_)==0)b[m++]=_>>6&31|192;else if((4294901760&_)==0)b[m++]=_>>12&15|224,b[m++]=_>>6&63|128;else{if((4292870144&_)!=0)continue;b[m++]=_>>18&7|240,b[m++]=_>>12&63|128,b[m++]=_>>6&63|128}b[m++]=63&_|128}}return b.slice(0,m)},Object.defineProperty(s.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(s.prototype,"fatal",{value:!1}),Object.defineProperty(s.prototype,"ignoreBOM",{value:!1}),s.prototype.decode=function(o,u){if((u=u===void 0?{stream:!1}:u).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");u=0;for(var l=(o=new Uint8Array(o)).length,m=[];u<l;){var T=o[u++];if(T===0)break;if((128&T)==0)m.push(T);else if((224&T)==192){var b=63&o[u++];m.push((31&T)<<6|b)}else if((240&T)==224){b=63&o[u++];var _=63&o[u++];m.push((31&T)<<12|b<<6|_)}else(248&T)==240&&(65535<(T=(7&T)<<18|(b=63&o[u++])<<12|(_=63&o[u++])<<6|63&o[u++])&&(T-=65536,m.push(T>>>10&1023|55296),T=56320|1023&T),m.push(T))}return String.fromCharCode.apply(null,m)},i.TextEncoder=g,i.TextDecoder=s})(typeof window!="undefined"?window:n!==void 0?n:this)}).call(this,r(5))},function(e,t,r){r.r(t),r.d(t,"AuthClient",function(){return g}),r.d(t,"RtcSignalingClient",function(){return o}),r.d(t,"Credentials",function(){return S}),r.d(t,"SignalingPromiseClient",function(){return E.SignalingPromiseClient}),r.d(t,"IRtcClientConfiguration",function(){}),r.d(t,"IRtcConnectConfiguration",function(){}),r.d(t,"IRtcConnectionStatsInfo",function(){}),r.d(t,"IRtcSendConfiguration",function(){}),r.d(t,"IRtcSessionMetricsMessageCounts",function(){}),r.d(t,"IRtcStreamMessage",function(){}),r.d(t,"IStreamControl",function(){}),r.d(t,"RtcClient",function(){return he});var n=r(25),i=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};class g extends n.a{adminSignup(G,q){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/admin-signup",{token:q,method:"POST",body:JSON.stringify(G)})})}login(G){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/login",{method:"POST",body:JSON.stringify(G),allowUnsafeRetries:!0})})}loginWithGoogleToken(G){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/login-google",{method:"POST",body:JSON.stringify(G),allowUnsafeRetries:!0})})}refresh(G,q){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/refresh",{method:"POST",body:JSON.stringify({refreshToken:G,tokenExpirationSeconds:q}),allowUnsafeRetries:!0})})}respondToNewPasswordRequiredChallenge(G){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/respond-to-new-password-required-challenge",{method:"POST",body:JSON.stringify(G)})})}forgotPassword(G){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/forgot-password",{method:"POST",body:JSON.stringify({email:G})})})}confirmForgotPassword(G){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/confirm-forgot-password",{method:"POST",body:JSON.stringify(G)})})}resendInvitation(G){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/resend-invitation",{method:"POST",body:JSON.stringify({email:G})})})}changePassword({token:G,refreshToken:q,currentPassword:te,newPassword:se}){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/change-password",{token:G,method:"POST",body:JSON.stringify({refreshToken:q,currentPassword:te,newPassword:se})})})}getDeviceCredentials(G){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/device-credentials",{token:G,method:"POST",allowUnsafeRetries:!0})})}impersonate(G,q){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/impersonate",{token:G,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({userId:q})})})}createServiceAccount(G,q,te,se){return i(this,void 0,void 0,function*(){return yield this.fetch("auth/service-account",{token:G,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({name:q,roleId:te,tags:se})})})}getFeatures(G){return i(this,void 0,void 0,function*(){return(yield this.fetch("auth/features",{token:G})).features})}}var s=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};class o extends n.a{createPeer(G,q){return s(this,void 0,void 0,function*(){return yield this.fetch("peers",{token:G,method:"POST",body:JSON.stringify(q)})})}getPeers(G){return s(this,void 0,void 0,function*(){return(yield this.fetch("peers",{token:G})).items})}refreshPeer(G,q){return s(this,void 0,void 0,function*(){yield this.fetch(`peers/${q}/refresh`,{token:G,method:"POST",allowUnsafeRetries:!0})})}createSession(G,q){return s(this,void 0,void 0,function*(){return yield this.fetch("sessions",{token:G,method:"POST",body:JSON.stringify(q)})})}refreshSession(G,q){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${q}/refresh`,{token:G,method:"POST",allowUnsafeRetries:!0})})}deleteSession(G,q){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${q}`,{token:G,method:"DELETE",allowUnsafeRetries:!0})})}getSessions(G){return s(this,void 0,void 0,function*(){return(yield this.fetch("sessions",{token:G})).items})}getIceServers(G){return s(this,void 0,void 0,function*(){return(yield this.fetch("ice-servers",{token:G})).items})}addSignals(G,q,te){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${q}/add-signals`,{token:G,method:"POST",body:JSON.stringify(te)})})}takeSignals(G,q){return s(this,void 0,void 0,function*(){return(yield this.fetch(`sessions/${q}/take-signals`,{token:G,method:"POST"})).items})}}var u=r(1),l=r(11),m=r(35),T=r(102),b=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};class _ extends class{constructor(G={}){this.cache=new T(G),this.stringify=G.fastStringify?JSON.stringify:m}set(G,q,te){if(!this.cache.set(this.stringify(G),q,te))throw Error(`Value too large (${this.cache.lengthCalculator(q)} > ${this.cache.max})`)}get(G){return this.cache.get(this.stringify(G))}del(G){this.cache.del(this.stringify(G))}length(){return this.cache.length}reset(){this.cache.reset()}prune(){return this.cache.prune()}forEach(G){return this.cache.forEach(G)}}{constructor(G={}){if(super(G),this.expireRejectedPromiseValues=G.expireRejectedPromiseValues===void 0||G.expireRejectedPromiseValues,this.rejectedPromiseValueTtl=G.rejectedPromiseValueTtl!==void 0?G.rejectedPromiseValueTtl:u.a.second,this.rejectedPromiseValueTtl<0)throw new Error("rejectedPromiseValueTtl must not be negative")}set(G,q,te){const se=this.stringify(G);this.cache.set(se,q,te),this.expireRejectedPromiseValues&&Promise.resolve(q).catch(()=>b(this,void 0,void 0,function*(){yield Object(l.a)(this.rejectedPromiseValueTtl),this.cache.peek(se)===q&&this.cache.del(se)}))}}var f=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};class S{constructor(G,q,te){this.authClient=G,this.email=q,this.password=te,this.tokenTtlMs=1*u.a.hour,this.tokenCache=new _({max:100,maxAge:this.tokenTtlMs-5*u.a.minute,fastStringify:!0})}getToken(){return f(this,void 0,void 0,function*(){let G=this.tokenCache.get(this.email);return G||(G=(()=>f(this,void 0,void 0,function*(){const{authentication:q}=yield this.authClient.login({email:this.email,password:this.password,tokenExpirationSeconds:this.tokenTtlMs/u.a.second});if(!q)throw new Error("User account not verified.");return q.accessToken}))(),this.tokenCache.set(this.email,G)),G})}}var E=r(93),N=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};function F(fe){return N(this,void 0,void 0,function*(){return(yield Promise.all(fe.map(G=>G.catch(q=>q)))).filter(G=>G instanceof Error)})}function M(fe){if(fe!==void 0)return fe;throw new Error("Value is undefined")}var R=r(0),p=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};function P({func:fe,delay:G,immediate:q}){let te=!1,se=setTimeout(function me(){return p(this,void 0,void 0,function*(){if(te)return;const ye=new Date().getTime();try{ae=fe(),yield ae}finally{if(!te){const de=new Date().getTime();se=setTimeout(me,Math.max(G-(de-ye),0))}}})},q?0:G),ae=Promise.resolve();return{stop(){return p(this,void 0,void 0,function*(){te=!0,clearTimeout(se),yield ae})}}}function Z(fe,G){return Object.keys(fe).reduce((q,te)=>Object.assign(Object.assign({},q),{[te]:G(fe[te])}),{})}var $=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};class h{constructor(G){this.message=G}send(G){return $(this,void 0,void 0,function*(){R.a.info(this.message,Z(G,q=>{const{sum:te,count:se}=q,ae=te/se;return Object.assign(Object.assign({},q),{average:ae})}))})}}var d=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};const j=r(224);var y=r(6);const x=!!y.c,B=new class{constructor(fe=60){this.buffer={},this.metrics={},this.reporters=[],this.flushInterval=P({func:()=>this.flushStats(),delay:fe*u.a.second})}shutdown(){return d(this,void 0,void 0,function*(){yield this.flushInterval.stop(),yield this.flushStats(),yield Object(l.a)(2*u.a.second)})}aggregate(fe,G){if(this.buffer[fe]){const{min:q,max:te,sum:se,count:ae}=this.buffer[fe];this.buffer[fe]={min:Math.min(q,G),max:Math.max(te,G),sum:se+G,count:ae+1}}else this.buffer[fe]={min:G,max:G,sum:G,count:1}}increment(fe){this.aggregate(fe,1)}timer(fe,G){return d(this,void 0,void 0,function*(){const q=j(),te=yield G(),se=j();return this.aggregate(fe,se-q),te})}metric(fe,G){this.metrics[fe]=G}registerStatsReporter(fe){this.reporters.push(fe)}write(fe){return d(this,void 0,void 0,function*(){if(Object.values(fe).length===0)return;const G=yield F(this.reporters.map(q=>q.send(fe)));for(const q of G)R.a.warn("Failed to write stats",{error:q})})}flushStats(){return d(this,void 0,void 0,function*(){const fe=Object.assign(Object.assign({},this.buffer),Z(this.metrics,G=>{const q=G();return{min:q,max:q,sum:q,count:1}}));Object.keys(fe).length>0&&(yield this.write(fe),this.buffer={})})}};x||["local","on-prem"].includes(y.i)||B.registerStatsReporter(new h("stats"));var U=r(8),O=r(21),A=r(103),D=r(36),w=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};class c extends D.a{constructor(G){super(G)}postLanRtcOffer(G){return w(this,void 0,void 0,function*(){return yield this.fetch("v1/lan-rtc-offer",{method:"POST",body:JSON.stringify(G)})})}}var L=r(55);const k={ordered:!1,maxPacketLifeTime:300*u.a.millisecond},Y={ordered:!0},K={ordered:!0},Q={ordered:!1,maxRetransmits:0},z={ordered:!1,maxRetransmits:0};function V({entityId:fe,streamName:G,streamType:q}){return`${fe}.${G}.${q}`}var v=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};class I{constructor(G,q){this.sessionId=G,this.connection=q,this.counts={localSent:new Map,localReceived:new Map,remoteSent:new Map,remoteReceived:new Map},this.sessionId=G,this.connection=q}updateRemoteMessagesCounts(G){if(G.payload.streamsInfo){this.counts.remoteSent=new Map,this.counts.remoteReceived=new Map;for(const q of G.payload.streamsInfo.items)this.counts.remoteSent.set(q.streamId,q.sentCount),this.counts.remoteReceived.set(q.streamId,q.receivedCount)}}getLocalStreamsInfo(G){const{localSent:q,localReceived:te}=this.counts;return{items:[...new Set([...q.keys(),...te.keys()])].map(se=>{var ae,me;return{streamId:se,sentCount:(ae=q.get(se))!==null&&ae!==void 0?ae:0,receivedCount:(me=te.get(se))!==null&&me!==void 0?me:0}}),timestamp:G}}incrementLocalSent(G){const{localSent:q}=this.counts,te=V(G.header.stream);q.set(te,(q.get(te)||0)+1)}incrementLocalReceived(G){const{localReceived:q}=this.counts,te=V(G.header.stream),se=q.get(te)||0;if(se===0){const{streamName:ae,streamType:me}=G.header.stream;R.a.debug("RTC client received first message for stream",{streamName:ae,streamType:me})}q.set(te,se+1)}uploadMetrics(){return v(this,void 0,void 0,function*(){const{sessionId:G}=this,q=yield this.connection.peerConnection.getStats(),te={};q.forEach(ge=>te[ge.id]=ge),R.a.debug("rtc-stats",Object.assign(Object.assign({},te),{sessionId:G}));const{localSent:se,localReceived:ae,remoteSent:me,remoteReceived:ye}=this.counts,de=[...new Set([...se.keys(),...ae.keys()])].reduce((ge,ce)=>{const Se=se.get(ce),we=ae.get(ce),Ae=me.get(ce),xe=ye.get(ce);return Object.assign(Object.assign({},ge),{[`local-${ce}-sent`]:Se,[`local-${ce}-received`]:we,[`remote-${ce}-sent`]:Ae,[`remote-${ce}-received`]:xe})},{sessionId:G});R.a.debug("rtc-message-report",Object.assign({deviceId:this.connection.getRemoteDeviceId()},de))})}}function W(fe){return new Set(["disconnected","failed","closed"]).has(fe.iceConnectionState)}var ee=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};class J{constructor(G,q,te){this.peerConnection=G,this.config=q,this.dataChannelNotifier=te,this.connectTimeoutMs=20*u.a.second,this.iceGatheringTimeoutMs=15*u.a.second,this.pingUpdateTimeoutMs=1*u.a.second,this.streamsInfoUpdateTimeoutMs=2*u.a.second,this.reassemblyTimeoutMs=500*u.a.millisecond,this.reassemblyTableCleanupMs=1*u.a.second,this.heartbeatTimeoutMs=20*u.a.millisecond,this.streamLatestTimestamp=new Map,this.reassemblyTable=new Map,this.reassemblyTableLastTimestamp=new Map,this.closeCalled=!1,this.gotOffer=!1,this.hasIceCandidate=!1;const{isOffer:se}=q.baseConfig;se?this.initializeChannels(G):G.ondatachannel=ae=>{switch(ae.channel.label){case"stream.latest-ttl":this.latestTtlStreamChannel=ae.channel;break;case"stream.reliable":this.reliableStreamChannel=ae.channel;break;case"stream.latest-reliable":this.latestReliableStreamChannel=ae.channel;break;case"stream.latest-try-once":this.latestTryOnceStreamChannel=ae.channel;break;case"heartbeat":return void(this.heartbeatChannel=ae.channel);default:return void this.dataChannelNotifier(ae.channel)}this.setupChannel(ae.channel)},this.pingUpdateTimeout=setInterval(()=>{const{reliableStreamChannel:ae}=this;ae&&this.sendSystemMessage(ae,{type:"ping"})},this.pingUpdateTimeoutMs),this.streamsInfoUpdateTimeout=setInterval(()=>{const{latestTtlStreamChannel:ae}=this;ae&&this.sendSystemMessage(ae,{type:"streams-info"})},this.streamsInfoUpdateTimeoutMs),this.reassemblyTableCleanupTimeout=setInterval(()=>{const ae=new Date().getTime();this.reassemblyTableLastTimestamp.forEach((me,ye,de)=>{ae>ye+this.reassemblyTimeoutMs&&this.reassemblyTable.delete(me)})},this.reassemblyTableCleanupMs),this.heartbeatTimeout=setInterval(()=>{const{heartbeatChannel:ae}=this;ae&&ae.readyState==="open"&&ae.send(new Uint8Array([1]))},this.heartbeatTimeoutMs)}handleSignal(G){return ee(this,void 0,void 0,function*(){const{peerConnection:q}=this,{track:te}=this.config.baseConfig,se=(()=>{try{return JSON.parse(G.getPayload())}catch{return}})();if(!se)return void R.a.error("Received unparseable signal.");R.a.debug("Handling signal",{description:se});const{sdp:ae,type:me}=se;if(!ae||!me)return void R.a.warn("Received non-SDP signal");const{signalingState:ye,connectionState:de}=q;if(ye!=="stable"||de!=="connected")if(q.remoteDescription)R.a.warn(`Received SDP after remote description was set: ${ae}`);else{if(me==="offer"){if(ye!=="stable")return void R.a.warn("Received offer SDP when signaling is ongoing.");yield q.setRemoteDescription(se);const ge=yield q.createAnswer();yield q.setLocalDescription(ge);const ce=G.clone();return te==null||te("Answer Received",ce),ce.setPayload(JSON.stringify(ge)),ce.setReceiverId(G.getSenderId()),ce.setSenderId(G.getReceiverId()),ce}if(me==="answer"){if(ye==="stable")return void R.a.warn("Received answer SDP when signaling hasn't started.");yield q.setRemoteDescription(se)}}else R.a.warn(`Received SDP when already connected: ${ae}`)})}send(G,q){const te=this.getChannelFromLabel(q.channelLabel);te?this.sendOnChannel(te,G):R.a.warn("Send called with unexpected channel label",{channelLabel:q.channelLabel})}controlRemoteStream(G){this.sendSystemMessage(M(this.reliableStreamChannel),{type:"stream-control",streamControl:G})}isActive(){return new Set(["new","checking","connected","completed"]).has(this.peerConnection.iceConnectionState)||this.isReady()}isReady(){const{reliableStreamChannel:G,latestTtlStreamChannel:q,latestTryOnceStreamChannel:te,latestReliableStreamChannel:se}=this;return(G==null?void 0:G.readyState)==="open"&&(q==null?void 0:q.readyState)==="open"&&(te==null?void 0:te.readyState)==="open"&&(se==null?void 0:se.readyState)==="open"}close(){return ee(this,void 0,void 0,function*(){if(this.closeCalled)return;this.closeCalled=!0,this.sessionMetrics&&(yield this.sessionMetrics.uploadMetrics()),this.pingUpdateTimeout&&clearInterval(this.pingUpdateTimeout),this.reassemblyTableCleanupTimeout&&clearInterval(this.reassemblyTableCleanupTimeout),this.streamsInfoUpdateTimeout&&clearInterval(this.streamsInfoUpdateTimeout),this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout);const{peerConnection:G,reliableStreamChannel:q,latestTtlStreamChannel:te,latestTryOnceStreamChannel:se,latestReliableStreamChannel:ae}=this;G.close(),q==null||q.close(),te==null||te.close(),se==null||se.close(),ae==null||ae.close()})}getPing(){return this.pingTimeMs}getLastMessageTimestamp(){return this.lastMessageTimestamp}getSessionCreatedTimestamp(){var G;return(G=this.config.remoteConfig)===null||G===void 0?void 0:G.sessionCreatedTimestamp}setSessionCreatedTimestamp(G){this.config.remoteConfig&&(this.config.remoteConfig.sessionCreatedTimestamp=G)}getSessionId(){var G;return(G=this.config.remoteConfig)===null||G===void 0?void 0:G.sessionId}setSessionId(G){this.config.remoteConfig&&(this.config.remoteConfig.sessionId=G,this.sessionMetrics=new I(G,this))}getRemotePeerId(){return this.config.baseConfig.remotePeerId}getRemoteDeviceId(){var G;return(G=this.config.baseConfig)===null||G===void 0?void 0:G.remoteDeviceId}setRemoteDeviceId(G){this.config.baseConfig.remoteDeviceId=G}getSessionMetricsMessageCounts(){var G;return(G=this.sessionMetrics)===null||G===void 0?void 0:G.counts}getConnectionStatsInfo(){return ee(this,void 0,void 0,function*(){const{peerConnection:G}=this;if(!G)return;const q=yield G.getStats(null),te=[];q.forEach(de=>{te.push(de)});const se=te.find(de=>de.type==="transport");if(!se)return;const ae=te.find(de=>(de.type==="candidate-pair"||de.type==="candidatepair")&&de.id===se.selectedCandidatePairId);if(!ae)return;const me=te.find(de=>de.id===ae.localCandidateId),ye=te.find(de=>de.id===ae.remoteCandidateId);return me&&ye&&(me.address=me.address||me.ip,ye.address=ye.address||ye.ip,me.address!==void 0&&ye.address!==void 0)?{transport:se,localCandidate:me,remoteCandidate:ye}:void 0})}initializeChannels(G){this.heartbeatChannel=G.createDataChannel("heartbeat",z),this.heartbeatChannel.binaryType="arraybuffer",this.latestTtlStreamChannel=G.createDataChannel("stream.latest-ttl",k),this.latestTtlStreamChannel.binaryType="arraybuffer",this.reliableStreamChannel=G.createDataChannel("stream.reliable",Y),this.reliableStreamChannel.binaryType="arraybuffer",this.latestReliableStreamChannel=G.createDataChannel("stream.latest-reliable",K),this.latestReliableStreamChannel.binaryType="arraybuffer",this.latestTryOnceStreamChannel=G.createDataChannel("stream.latest-try-once",Q),this.latestTryOnceStreamChannel.binaryType="arraybuffer",this.setupChannel(this.latestTtlStreamChannel),this.setupChannel(this.reliableStreamChannel),this.setupChannel(this.latestReliableStreamChannel),this.setupChannel(this.latestTryOnceStreamChannel)}getOffer(){var G,q,te;return ee(this,void 0,void 0,function*(){const{gotOffer:se}=this,{peerConnection:ae,config:me}=this;if(this.config.baseConfig.isLan)throw new Error('"getOffer" method can only be called with internet connections. LAN connections should call the "getLanOffer" method.');const ye=(G=this.config.remoteConfig)===null||G===void 0?void 0:G.sessionId;if(se)return void R.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,W(this.peerConnection))return void R.a.debug("Failed to generate offer because the peer connection was inactive.");const de=me.baseConfig.track;ae.onicecandidate=()=>{this.hasIceCandidate=!0},ae.oniceconnectionstatechange=()=>ee(this,void 0,void 0,function*(){const Ae=ae.iceConnectionState;if(Ae==="connected"||Ae==="completed"){const xe=yield this.getConnectionStatsInfo(),We=xe?function(Be){const Le=Be.localCandidate.candidateType,Ne=Be.remoteCandidate.candidateType;return Le==="host"&&Ne==="host"?"local":Le==="relay"||Ne==="relay"?"TURN":"STUN"}(xe):void 0;R.a.info(`ICE connection state changed to ${Ae}`,{sessionId:ye,connectionStatsInfo:xe,iceMode:We}),de==null||de("ICE connection state change",{iceConnectionState:Ae,sessionId:ye,connectionStatsInfo:xe,iceMode:We})}}),yield ae.setLocalDescription(yield ae.createOffer());const ge=new Date().getTime();for(;;){const Ae=new Date().getTime()-ge;if(Ae>this.connectTimeoutMs)return void R.a.debug("Failed to generate offer because ICE gathering timed out.");if(Ae>this.iceGatheringTimeoutMs&&this.hasIceCandidate){R.a.debug("ICE gathering partially completed; proceeding",{iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Ae}),de==null||de("ICE gathering partially completed",{sessionId:ye,iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Ae});break}if(ae.iceGatheringState==="complete"){R.a.debug("ICE gathering complete",{iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Ae}),de==null||de("ICE gathering completed",{sessionId:ye,iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Ae});break}yield Object(l.a)(.1*u.a.second)}const ce=(q=this.peerConnection.getConfiguration().iceServers)!==null&&q!==void 0?q:[];for(const Ae of ce)Ae.credentialType=void 0;const Se=JSON.stringify(ce),we=new U.Signal;return we.setPayload(JSON.stringify(ae.localDescription)),we.setSenderId(this.config.baseConfig.localPeerId),we.setReceiverId(this.config.baseConfig.remotePeerId),we.setIceServers(Se),we.setIceTransportPolicy((te=this.peerConnection.getConfiguration().iceTransportPolicy)!==null&&te!==void 0?te:"all"),we.setSessionType(U.SessionType.TELEOP),R.a.debug("Sending offer signal with description",{description:we.getPayload()}),we})}getLanOffer(){return ee(this,void 0,void 0,function*(){const{peerConnection:G,gotOffer:q}=this;if(!this.config.baseConfig.isLan)throw new Error('"getLanOffer" method can only be used with LAN connections. Internet connections should call the "getOffer" method.');if(q)return void R.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,W(this.peerConnection))return void R.a.debug("Failed to generate offer because the peer connection was inactive.");yield G.setLocalDescription(yield G.createOffer());const te=new Date().getTime();for(;;){if(new Date().getTime()-te>this.iceGatheringTimeoutMs)return void R.a.debug("Failed to generate offer because ICE gathering timed out.");if(G.iceGatheringState==="complete")break;yield Object(l.a)(.1*u.a.second)}const se=G.localDescription;if(se)return R.a.debug("Sending LAN offer signal with description",{description:se}),se;R.a.error("Failed to generate LAN offer description")})}handleLanAnswer(G){return ee(this,void 0,void 0,function*(){const{peerConnection:q}=this;if(!this.config.baseConfig.isLan)throw new Error('"handleLanAnswer" method can only be used with LAN connections. Internet connections should call the "handleSignal" method.');yield q.setRemoteDescription(G)})}getChannelFromLabel(G){switch(G){case"stream.latest-ttl":return this.latestTtlStreamChannel;case"stream.reliable":return this.reliableStreamChannel;case"stream.latest-reliable":return this.latestReliableStreamChannel;case"stream.latest-try-once":return this.latestTryOnceStreamChannel}}sendOnChannel(G,q){let te;try{te=Object(L.encode)(JSON.stringify(q))}catch(se){return void R.a.warn("Failed to encode RTC message",{error:se})}try{G.send(te),this.sessionMetrics&&this.sessionMetrics.incrementLocalSent(q)}catch(se){R.a.warn("Failed to send message to channel",{error:se,channel:G.label})}}channelNotRecognized(G){return G!==this.latestTtlStreamChannel&&G!==this.latestReliableStreamChannel&&G!==this.latestTryOnceStreamChannel&&G!==this.reliableStreamChannel}setupChannel(G){G.onmessage=q=>{if(this.channelNotRecognized(G))return void R.a.warn("Received message on unrecognized data channel.");let te;try{te=JSON.parse(Object(L.decode)(q.data))}catch(se){return void R.a.warn("Received unparseable message on RTC stream data channel",{error:se,channel:G.label})}te.communicationType==="message-chunk"?this.receiveChannelMessageChunk(G,te):this.receiveChannelMessage(G,te)},G.onerror=q=>{R.a.warn(`Channel error: ${q.error}`,{error:q.error,sessionId:this.getSessionId(),channelLabel:G.label})},G.onopen=()=>{R.a.debug("Channel opened",{sessionId:this.getSessionId(),channelLabel:G.label})},G.onclose=()=>{const q={bufferedAmount:G.bufferedAmount,sessionId:this.getSessionId(),channelLabel:G.label};this.closeCalled===!1?R.a.debug("Unexpected channel closed",q):R.a.debug("Channel closed",q)}}receiveChannelMessage(G,q){const{config:te}=this,{remotePeerId:se}=this.config.baseConfig;this.lastMessageTimestamp=new Date().getTime(),q=function(ae){switch(ae.header.stream.streamType){case"twist":{const{twist:me}=ae.payload;if(!me)throw Error("twist not in payload of RTC message with type twist");return{header:ae.header,payload:{twist:{linear:Object.assign({x:0,y:0,z:0},me.linear),angular:Object.assign({x:0,y:0,z:0},me.angular)}}}}case"pose":{const{pose:me}=ae.payload;if(!me)throw Error("pose not in payload of RTC message with type pose");return{header:ae.header,payload:{pose:{translation:Object.assign({x:0,y:0,z:0},me.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},me.rotation)}}}}case"pose-with-covariance":{const{poseWithCovariance:me}=ae.payload;if(!me)throw Error("poseWithCovariance not in payload of RTC message with type pose-with-covariance");const ye=new Array(36).fill(0);return me.covariance.forEach((de,ge)=>{if(ge>=36)throw Error("covariance contains more than 36 elements");ye[ge]=de}),{header:ae.header,payload:{poseWithCovariance:{pose:{translation:Object.assign({x:0,y:0,z:0},me.pose.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},me.pose.rotation)},covariance:ye}}}}case"point":{const{point:me}=ae.payload;if(!me)throw Error("point not in payload of RTC message with type point");return{header:ae.header,payload:{point:Object.assign({x:0,y:0,z:0},me)}}}default:return ae}}(q),this.sessionMetrics&&this.sessionMetrics.incrementLocalReceived(q),this.handleSystemMessage(G,q)||(G===this.latestTryOnceStreamChannel||G===this.latestTtlStreamChannel||G===this.latestReliableStreamChannel)&&!this.isLatestMessage(q)||te.baseConfig.receive(se,q)}receiveChannelMessageChunk(G,q){const te=this.reassemblyTable.get(q.id)||[];if(te.push(q),te.length===q.total){const se=function(ae){const me=ae.sort((ye,de)=>ye.seq<de.seq?-1:1).map(ye=>ye.part).reduce((ye,de)=>ye+de);try{return JSON.parse(me)}catch{return void R.a.warn("Could not reassemble RTC message chunks")}}(te);return se&&this.receiveChannelMessage(G,se),void this.reassemblyTable.delete(q.id)}this.reassemblyTable.set(q.id,te),this.reassemblyTableLastTimestamp.set(q.id,new Date().getTime())}handleSystemMessage(G,q){var te,se;const{config:ae}=this,{baseConfig:me}=ae,{remotePeerId:ye}=me;switch(q.header.stream.streamType){case"ping":return this.sendSystemMessage(G,{type:"pong",timestamp:M(q.payload.ping)}),!0;case"pong":{const de=new Date().getTime()-M(q.payload.pong);return this.pingTimeMs=de,B.aggregate("rtc-ping-time",de),!0}case"streams-info":{const{sessionMetrics:de}=this,ge=(te=q.payload.streamsInfo)===null||te===void 0?void 0:te.timestamp;return!!ge&&(de==null||de.updateRemoteMessagesCounts(q),(se=me.onStreamsInfoUpdate)===null||se===void 0||se.call(me,ye,ge),!0)}case"stream-control":return!0;default:return!1}}sendSystemMessage(G,q){var te;const{localUserId:se,localPeerId:ae}=this.config.baseConfig;if(G.readyState!=="open")return;const me={entityId:se!=null?se:ae,streamName:`$.${q.type}`,streamType:q.type};let ye;switch(q.type){case"ping":ye={ping:new Date().getTime()};break;case"pong":ye={pong:q.timestamp};break;case"stream-control":ye={streamControl:q.streamControl};break;case"streams-info":ye={streamsInfo:(te=this.sessionMetrics)===null||te===void 0?void 0:te.getLocalStreamsInfo(new Date().getTime())}}this.sendOnChannel(G,function(de,ge){return{header:{stream:de,created:Date.now(),frameId:""},payload:ge}}(me,ye))}isLatestMessage(G){const q=V(G.header.stream),te=(this.streamLatestTimestamp.get(q)||0)<=G.header.created;return te&&this.streamLatestTimestamp.set(q,G.header.created),te}}function ne(fe){var G,q;return{userId:(G=fe.getUserId())===null||G===void 0?void 0:G.getValue(),deviceId:(q=fe.getDeviceId())===null||q===void 0?void 0:q.getValue(),organizationId:fe.getOrganizationId(),id:fe.getPeerId(),capabilities:[],capabilitySet:{}}}var oe=function(fe,G,q,te){return new(q||(q=Promise))(function(se,ae){function me(ge){try{de(te.next(ge))}catch(ce){ae(ce)}}function ye(ge){try{de(te.throw(ge))}catch(ce){ae(ce)}}function de(ge){var ce;ge.done?se(ge.value):(ce=ge.value,ce instanceof q?ce:new q(function(Se){Se(ce)})).then(me,ye)}de((te=te.apply(fe,G||[])).next())})};class he{constructor(G){this.config=G,this.grpcCallDeadline=5*u.a.second,this.refreshIntervalDelayMs=2*u.a.second,this.iceServersTtl=30*u.a.minute,this.connections=[],this.localConnections=[],this.isConnectionInitiator=new Map,this.isOutgoingConnection=new Map,this.peerDataChannelListeners=[];const{refreshIntervalDelayMs:q}=this;this.refreshInterval=P({func:()=>oe(this,void 0,void 0,function*(){try{yield this.update()}catch(te){R.a.warn("RTC refresh failed",{error:te})}}),delay:q,immediate:!0})}send(G,q,te){const se=this.getActiveConnection(G);se?se.isReady()?se.send(q,te):R.a.warn("Send called with unready connection."):R.a.warn("Send called with no connection.")}controlRemoteStream(G,q){const te=this.getActiveConnection(G);te?te.isReady()?te.controlRemoteStream(q):R.a.warn("controlRemoteStream called with unready connection."):R.a.warn("controlRemoteStream called with no connection.")}getLocalPeer(){return oe(this,void 0,void 0,function*(){for(;!this.localPeer;)yield Object(l.a)(.1*u.a.second);return ne(this.localPeer)})}connect(G,q,te){var se,ae,me;return oe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode===!0)throw new Error("connect method called in local only mode.");const{track:ye,signalingClient:de}=this.config,{localPeer:ge,receiveSignalStream:ce,iceServers:Se}=this;if(!ge||!ce||!Se)return void R.a.warn("Connect called prior to local peer, receiveSignalStream, and ICE servers ready");if(this.getActiveConnection(G))return void R.a.warn("Connect called for peer with existing connection.");if(this.isOutgoingConnection.get(G))return void R.a.warn("Connect called for peer with an existing outgoing connection offer.");this.isOutgoingConnection.set(G,!0);const we=new J(yield this.createRTCPeerConnection(Se,q),{baseConfig:{isOffer:!0,isLan:!1,receive:(Ne,Ue)=>this.config.receive(Ne,Ue),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(Ne,Ue)=>{var De,Ve;return(Ve=(De=this.config).onStreamsInfoUpdate)===null||Ve===void 0?void 0:Ve.call(De,Ne,Ue)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:(se=ge.getUserId())===null||se===void 0?void 0:se.getValue(),localPeerId:ge.getPeerId(),remotePeerId:G},remoteConfig:{}},Ne=>this.onCustomDataChannel(G,Ne)),Ae=yield we.getOffer();if(!Ae)return R.a.error("Failed to generate offer."),void this.isOutgoingConnection.delete(G);R.a.debug("Sending offer."),ye==null||ye("Sending offer",Ae);const xe=new U.SendSignalRequest;te&&Ae.setSessionType(te),xe.setSignal(Ae);const We=yield(()=>oe(this,void 0,void 0,function*(){try{return yield de.sendSignal(xe,yield this.getMetadata({}))}catch(Ne){R.a.warn("Error when sending signal",{error:Ne})}}))();if(!this.isOutgoingConnection.get(G))return void R.a.debug("No offer set after receiving offer signal response.");R.a.debug("Offer sent.");const Be=(ae=We==null?void 0:We.getSessionId())===null||ae===void 0?void 0:ae.getValue(),Le=(me=We==null?void 0:We.getSessionCreatedTimestamp())===null||me===void 0?void 0:me.getValue();return Be&&Le?(we.setSessionId(Be),we.setSessionCreatedTimestamp(Le),this.isOutgoingConnection.delete(G),this.connections.push(we),this.isConnectionInitiator.set(we,!0),this.setupHandlers(we),Be):(R.a.warn("No session ID or no session created timestamp on send signal response."),void this.isOutgoingConnection.delete(G))})}connectLan(G){var q,te;return oe(this,void 0,void 0,function*(){const se=new c(G),ae=new J(yield this.createRTCPeerConnection([]),{baseConfig:{isOffer:!0,isLan:!0,receive:(ge,ce)=>this.config.receive(ge,ce),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(ge,ce)=>{var Se,we;return(we=(Se=this.config).onStreamsInfoUpdate)===null||we===void 0?void 0:we.call(Se,ge,ce)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:(te=(q=this.localPeer)===null||q===void 0?void 0:q.getUserId())===null||te===void 0?void 0:te.getValue(),localPeerId:"lan_client",remotePeerId:G}},ge=>this.onCustomDataChannel(G,ge)),me=yield ae.getLanOffer();if(!me)return R.a.warn("Could not generate LAN offer"),!1;const ye=yield se.postLanRtcOffer({offer:JSON.stringify(me)}),de=new RTCSessionDescription(JSON.parse(ye.answer));return yield ae.handleLanAnswer(de),this.localConnections.push(ae),Object(A.v4)()})}getConnections(){return[...this.connections,...this.localConnections]}createCustomDataChannel(G,q,te,se,ae){const me=this.getActiveConnection(G);if(me&&this.isConnectionInitiator.has(me)){const de=me.peerConnection.createDataChannel("custom."+q,te);return se&&(de.binaryType="arraybuffer"),ae(G,de),()=>{}}const ye=(de,ge)=>{G===de&&ge.label==="custom."+q&&ae(G,ge)};return this.peerDataChannelListeners.push(ye),()=>{this.peerDataChannelListeners=this.peerDataChannelListeners.filter(de=>de!==ye)}}onCustomDataChannel(G,q){this.peerDataChannelListeners.forEach(te=>te(G,q))}getConnectionStatus(G){if(this.isOutgoingConnection.get(G))return"connecting";const q=this.getActiveConnection(G);return q?q.isReady()?"connected":"connecting":"disconnected"}getConnectionStatsInfo(G){return oe(this,void 0,void 0,function*(){const q=this.getActiveConnection(G);if(q)return yield q.getConnectionStatsInfo()})}disconnect(G){return oe(this,void 0,void 0,function*(){const q=this.getActiveConnection(G);q&&(yield q.close())})}getPeers(){return oe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:G}=this.config,q=yield(()=>oe(this,void 0,void 0,function*(){try{return yield G.getPeers(new U.GetPeersRequest,yield this.getMetadata({}))}catch(ae){R.a.warn("Error when getting peers",{error:ae})}}))();if(!q)return[];const te=q.getPeersList();if(!te)return[];const se=ae=>{var me,ye;return(ye=(me=ae.getPeerCreatedTimestamp())===null||me===void 0?void 0:me.getValue())!==null&&ye!==void 0?ye:0};return te.sort((ae,me)=>se(me)-se(ae)).map(ae=>ne(ae))})}getSessions(){return oe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:G}=this.config,q=yield(()=>oe(this,void 0,void 0,function*(){try{return yield G.getPeers(new U.GetPeersRequest,yield this.getMetadata({}))}catch(ae){R.a.warn("Error when getting peers",{error:ae})}}))();if(!q)return{};const te=q.getPeersList(),se={};for(const ae of te)se[ae.getPeerId()]=ae.getSessionIdsList();return se})}getPing(G){const q=this.getActiveConnection(G);if(q)return q.getPing();R.a.warn("Attempted to get ping time from inactive peer.")}getLastMessageTimestamp(G){const q=this.getActiveConnection(G);if(q)return q.getLastMessageTimestamp();R.a.warn("Attempted to get last message time from inactive peer.")}getSessionMetricsMessageCounts(G){const q=this.getActiveConnection(G);if(q)return q.getSessionMetricsMessageCounts();R.a.warn("Attempted to get session metrics counts from inactive peer.")}isReady(){if(this.config.lanOnlyMode)return!0;const{localPeer:G,receiveSignalStream:q,iceServers:te}=this;return!!(G&&q&&te)}shutdown(){return oe(this,void 0,void 0,function*(){R.a.info("Shutdown called on RTC client"),yield this.refreshInterval.stop(),this.receiveSignalStream&&this.receiveSignalStream.cancel();const G=this.connections;this.connections=[],yield this.closeConnections(G);const{localPeer:q}=this;if(!q||this.config.lanOnlyMode)return;const{signalingClient:te}=this.config;yield(()=>oe(this,void 0,void 0,function*(){try{const se=new U.DeletePeerRequest;se.setPeerId(q.getPeerId()),yield te.deletePeer(se,yield this.getMetadata({}))}catch(se){return void R.a.warn("Error deleting local peer",{error:se})}}))()})}createPeer(){return oe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("createPeer method cannot be used in local-only mode.");const{signalingClient:G}=this.config,q=yield(()=>oe(this,void 0,void 0,function*(){try{return yield G.createPeer(new U.CreatePeerRequest,yield this.getMetadata({}))}catch(se){throw new Error(`Was not able to create peer: ${JSON.stringify(se)}`)}}))(),te=q==null?void 0:q.getPeer();if(!te)throw new Error("Response did not provide peer.");return this.localPeer=te})}createReceiveSignalStream(){return oe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("createReceiveSignalStream method cannot be used in local-only mode.");const{signalingClient:G}=this.config,{localPeer:q,iceServers:te}=this;if(!q||!te)return;const{receiveSignalStream:se}=this;se&&se.cancel();const ae=new U.ReceiveSignalStreamRequest;ae.setPeerId(q.getPeerId());const me=yield(()=>oe(this,void 0,void 0,function*(){try{return G.receiveSignalStream(ae,yield this.getMetadata({hasDeadline:!1}))}catch(ye){throw new Error(`Unable to create receive signal stream: ${JSON.stringify(ye)}`)}}))();if(!me)throw new Error("Response did not provide stream.");return me.on("data",ye=>oe(this,void 0,void 0,function*(){var de,ge,ce,Se;const we=ye.getSignal(),Ae=(de=we==null?void 0:we.getSessionId())===null||de===void 0?void 0:de.getValue(),xe=we==null?void 0:we.getSenderId(),We=we==null?void 0:we.getReceiverId(),Be=(ge=we==null?void 0:we.getSessionCreatedTimestamp())===null||ge===void 0?void 0:ge.getValue();if(!(we&&Ae&&xe&&We&&Be))return void R.a.warn("Received signal with missing information.");const Le=this.getActiveConnection(xe);if(Le)if(Le.getSessionId()!==Ae){if(R.a.debug("Received signal: different session for a peer we're already connected to."),(Le.getSessionCreatedTimestamp()||0)>Be)return;const Ne=new J(yield this.createRTCPeerConnection(te),{baseConfig:{isOffer:!1,isLan:!1,receive:(Ue,De)=>this.config.receive(Ue,De),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(Ue,De)=>{var Ve,Ge;return(Ge=(Ve=this.config).onStreamsInfoUpdate)===null||Ge===void 0?void 0:Ge.call(Ve,Ue,De)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:q.getPeerId(),localUserId:(Se=q.getUserId())===null||Se===void 0?void 0:Se.getValue(),remotePeerId:xe},remoteConfig:{sessionId:Ae,sessionCreatedTimestamp:Be}},Ue=>this.onCustomDataChannel(xe,Ue));yield Ne.handleSignal(we),this.connections.push(Ne)}else R.a.debug("Received signal: for an existing connection."),yield Le.handleSignal(we);else{R.a.debug("Received signal: new connection.");const Ne=new J(yield this.createRTCPeerConnection(te),{baseConfig:{isOffer:!1,isLan:!1,receive:(Ue,De)=>this.config.receive(Ue,De),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(Ue,De)=>{var Ve,Ge;return(Ge=(Ve=this.config).onStreamsInfoUpdate)===null||Ge===void 0?void 0:Ge.call(Ve,Ue,De)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:q.getPeerId(),localUserId:(ce=q.getUserId())===null||ce===void 0?void 0:ce.getValue(),remotePeerId:xe},remoteConfig:{sessionId:Ae,sessionCreatedTimestamp:Be}},Ue=>this.onCustomDataChannel(xe,Ue));yield Ne.handleSignal(we),this.connections.push(Ne)}})),me.on("end",()=>{me.cancel(),this.receiveSignalStream=void 0}),me.on("error",ye=>{switch(ye.code){case O.StatusCode.CANCELLED:case O.StatusCode.UNAVAILABLE:case O.StatusCode.UNKNOWN:R.a.debug("Receive signal stream error",{error:ye});break;case O.StatusCode.UNAUTHENTICATED:R.a.warn("Receive signal stream error",{error:ye});break;default:R.a.error("Receive signal stream error",{error:ye})}me.cancel(),this.receiveSignalStream=void 0}),this.receiveSignalStream=me})}createRTCPeerConnection(G,q){var te;return oe(this,void 0,void 0,function*(){const se=q==null?void 0:q.rtcIceTransportPolicies,ae=q!=null&&q.rtcIceServerProtocol?[q==null?void 0:q.rtcIceServerProtocol]:void 0,me=G.map(de=>Object.assign(Object.assign({},de),{urls:typeof de.urls=="string"?[de.urls]:de.urls})).map(de=>Object.assign(Object.assign({},de),{urls:de.urls.filter(ge=>{const ce=(se===void 0||se.some(Se=>((we,Ae)=>{switch(Ae){case"stun":return/^stuns?:/.test(we);case"turn":return/^turns?:/.test(we)}})(ge,Se)))&&(ae===void 0||ae.some(Se=>((we,Ae)=>we.endsWith(`transport=${Ae}`))(ge,Se)));return ce||R.a.debug(`Ignoring ICE server: ${ge}`),ce})})).filter(({urls:de})=>de.filter(ge=>ge).length>0),ye=(te=this.config.alternateRTCPeerConnection)!==null&&te!==void 0?te:window.RTCPeerConnection;if(!ye)throw new Error("RTCPeerConnection class not found. WebRTC must be enabled.");return new ye(Object.assign({iceServers:me,iceTransportPolicy:(se==null?void 0:se.length)===1&&se[0]==="turn"?"relay":"all"},q))})}closeConnections(G){return oe(this,void 0,void 0,function*(){const q=yield F(G.map(te=>oe(this,void 0,void 0,function*(){yield te.close()})));for(const te of q)R.a.warn("Request to close session failed",{error:te})})}getActiveConnection(G){return this.getConnections().find(q=>q.getRemotePeerId()===G&&q.isActive())}update(){var G;return oe(this,void 0,void 0,function*(){if(this.localConnections=this.localConnections.filter(ye=>ye.isActive()),this.config.lanOnlyMode)return;const{signalingClient:q}=this.config;if(!this.localPeer||!this.receiveSignalStream||!this.iceServers)return this.localPeer||(yield this.createPeer()),this.iceServers||(yield this.updateIceServers()),void(this.receiveSignalStream||(yield this.createReceiveSignalStream()));yield this.closeConnections(this.connections.filter(ye=>!ye.isActive())),this.connections=this.connections.filter(ye=>ye.isActive());const{localPeer:te}=this,se=this.connections.filter(ye=>ye.getSessionId).map(ye=>M(ye.getSessionId()));te.setSessionIdsList(se);const ae=new U.RefreshPeerRequest;ae.setPeer(te);try{yield q.refreshPeer(ae,yield this.getMetadata({}))}catch(ye){ye.code===O.StatusCode.NOT_FOUND?(R.a.warn("Peer expired, creating new peer",{peerId:te.getPeerId()}),yield this.reset()):R.a.warn("Error calling RefreshPeer",{error:ye})}const me=yield this.getPeers();for(const ye of this.connections)ye.setRemoteDeviceId((G=me.find(de=>de.id===ye.getRemotePeerId()))===null||G===void 0?void 0:G.deviceId)})}reset(){return oe(this,void 0,void 0,function*(){yield this.closeConnections(this.connections),this.connections=[],this.isOutgoingConnection=new Map,yield this.createPeer(),yield this.createReceiveSignalStream()})}updateIceServers(){return oe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)return;const{iceServersLastUpdate:G,iceServersTtl:q}=this,te=new Date().getTime();if(!G||te-G>q)try{const se=(yield this.config.signalingClient.getIceServers(new U.GetIceServersRequest,yield this.getMetadata({}))).getIceServers();this.iceServers=JSON.parse(se),this.iceServersLastUpdate=te}catch(se){R.a.warn("Error in updateIceServers",{error:se})}})}setupHandlers(G){const{peerConnection:q}=G,te=G.getSessionCreatedTimestamp();q.onconnectionstatechange=()=>oe(this,void 0,void 0,function*(){const se=q.connectionState;if(te)switch(se){case"connected":B.aggregate("rtc-connect-time",new Date().getTime()-te);break;case"failed":B.increment("rtc-connect-failed")}})}getMetadata(G){return oe(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getMetadata method cannot be called in local-only mode");const{getToken:q}=this.config,{grpcCallDeadline:te}=this,{hasDeadline:se}=G,ae=se===!1?void 0:new Date().getTime()+te;return{authorization:yield q(),deadline:ae}})}}},,function(e,t,r){r.r(t),r.d(t,"LogClient",function(){return g});var n=r(25),i=function(s,o,u,l){return new(u||(u=Promise))(function(m,T){function b(S){try{f(l.next(S))}catch(E){T(E)}}function _(S){try{f(l.throw(S))}catch(E){T(E)}}function f(S){var E;S.done?m(S.value):(E=S.value,E instanceof u?E:new u(function(N){N(E)})).then(b,_)}f((l=l.apply(s,o||[])).next())})};class g extends n.a{log(o){return i(this,void 0,void 0,function*(){yield this.fetch("logs",{method:"POST",body:JSON.stringify({logs:o}),allowUnsafeRetries:!0})})}}}])})})(dist);let FORMANT_API_URL="https://api.formant.io";typeof window!="undefined"&&(FORMANT_API_URL=window.FORMANT_API_URL||FORMANT_API_URL);let urlParams$1=new URLSearchParams("");typeof window!="undefined"&&(urlParams$1=new URLSearchParams(window.location.search));const envDev=urlParams$1.get("formant_dev");envDev&&(FORMANT_API_URL="https://api-dev.formant.io");const envStage=urlParams$1.get("formant_stage");envStage&&(FORMANT_API_URL="https://api-stage.formant.io");function delay(e){return new Promise(t=>setTimeout(t,e))}function defined(e,t){if(e!==void 0)return e;throw new Error(t||"Value is undefined")}class App{static sendAppMessage(t){window.parent.postMessage(t,"*")}static getCurrentModuleContext(){let t=new URLSearchParams("");return typeof window!="undefined"&&(t=new URLSearchParams(window.location.search)),t.get("module")}static isModule(){return this.getCurrentModuleContext()!==null}static goToTime(t){this.sendAppMessage({type:"go_to_time",time:t.getTime()})}static showMessage(t){this.sendAppMessage({type:"show_message",message:t})}static requestModuleData(){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"request_module_data",module:t})}static setModuleDateTimeRange(t,r){const n=this.getCurrentModuleContext();if(!n)throw new Error("No module context");this.sendAppMessage({type:"set_module_data_time_range",module:n,before:t,after:r||0})}static refreshAuthToken(){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"refresh_auth_token",module:t})}static sendChannelData(t,r){const n=this.getCurrentModuleContext();if(!n)throw new Error("No module context");this.sendAppMessage({type:"send_channel_data",source:n,channel:t,data:r})}static setupModuleMenus(t){const r=this.getCurrentModuleContext();if(!r)throw new Error("No module context");this.sendAppMessage({type:"setup_module_menus",module:r,menus:t})}static addMenuListener(t){window.addEventListener("message",r=>{const n=r.data;n.type==="module_menu_item_clicked"&&t(n.menu)})}static addAccessTokenRefreshListener(t){window.addEventListener("message",r=>{const n=r.data;n.type==="auth_token"&&t(n.token)})}static addModuleDataListener(t){window.addEventListener("message",r=>{const n=r.data;n.type==="module_data"&&t({streams:n.streams,time:n.time,queryRange:n.queryRange})})}static addChannelDataListener(t,r){window.addEventListener("message",n=>{const i=n.data;i.type==="channel_data"&&i.channel===t&&r({source:i.source,data:i.data})})}}const Te=class{static async login(t,r){try{const n=await fetch(`${FORMANT_API_URL}/v1/admin/auth/login`,{method:"POST",body:JSON.stringify({email:t,password:r}),headers:{"Content-Type":"application/json"}}),i=await n.json();if(n.status!==200)throw new Error(i.message);return await Te.loginWithToken(i.authentication.accessToken,i.authentication.refreshToken),i.authentication}catch(n){return Te.waitingForAuth.forEach(i=>i(!1)),Te.waitingForAuth=[],Promise.reject(n)}}static async loginWithToken(t,r){const n=JSON.parse(atob(t.split(".")[1]));try{let i;if(Te.isShareToken=n["formant:claims"]&&n["formant:claims"].type=="share",n["formant:claims"]&&(Te.currentOrganization=n["formant:claims"].organizationId),n["custom:organization_id"]&&(Te.currentOrganization=n["custom:organization_id"]),Te.isShareToken||(i=n.sub),n["formant:claims"]&&n["formant:claims"].userId&&(i=n["formant:claims"].userId),i){const g=await fetch(`${FORMANT_API_URL}/v1/admin/users/${i}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t}}),s=await g.json();if(g.status!==200)throw new Error(s.message);Te.currentUser=s}Te.token=t,Te.waitingForAuth.forEach(g=>g(!0))}catch(i){console.error(i),Te.waitingForAuth.forEach(g=>g(!1))}Te.waitingForAuth=[],r&&(Te.refreshToken=r,setInterval(async()=>{if(Te.refreshToken){const g=await(await fetch(`${FORMANT_API_URL}/v1/admin/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:Te.refreshToken})})).json();Te.token=g.authentication.accessToken}},1e3*60*60))}static isAuthenticated(){return Te.token!==void 0}static getCurrentUser(){return Te.currentUser}static async waitTilAuthenticated(){return Te.token!==void 0?!0:new Promise(t=>{Te.waitingForAuth.push(function(r){t(r)})})}static async listenForRefresh(){App.addAccessTokenRefreshListener(t=>{this.loginWithToken(t)}),setInterval(async()=>{App.refreshAuthToken()},1e3*60*60)}};let Authentication=Te;Ce(Authentication,"token"),Ce(Authentication,"refreshToken"),Ce(Authentication,"currentUser"),Ce(Authentication,"currentOrganization"),Ce(Authentication,"isShareToken",!1),Ce(Authentication,"defaultDeviceId"),Ce(Authentication,"waitingForAuth",[]);class DataChannel{constructor(t){Ce(this,"ready",!1);Ce(this,"listeners",[]);Ce(this,"binaryListeners",[]);Ce(this,"error");Ce(this,"decoder",new TextDecoder);this.dataChannel=t,this.dataChannel.binaryType="arraybuffer",this.dataChannel.onopen=()=>{this.ready=!0},this.dataChannel.onclose=()=>{this.ready=!1},this.dataChannel.onerror=r=>{console.error(r),this.error="An error occurred in DataChannel"},this.dataChannel.onmessage=r=>{this.listeners.forEach(n=>{const i=new Uint8Array(r.data),g=this.decoder.decode(i);n(g)}),this.binaryListeners.forEach(n=>{n(new Uint8Array(r.data))})}}async waitTilReady(){return this.ready?!0:new Promise((r,n)=>{let i=window.setInterval(()=>{this.ready&&(window.clearInterval(i),r(!0)),this.error&&n(this.error)},10)})}send(t){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(t)}sendBinary(t){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(t)}addListener(t){this.listeners.push(t)}removeListener(t){const r=this.listeners.indexOf(t);if(r===-1)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.listeners.splice(r,1)}addBinaryListener(t){this.binaryListeners.push(t)}removeBinaryListener(t){const r=this.binaryListeners.indexOf(t);if(r===-1)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.binaryListeners.splice(r,1)}}class CaptureStream{constructor(t){Ce(this,"token");this.captureSession=t}async ingestJSON(t){if(!this.token){const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions/${this.captureSession.code}/authenticate`,{method:"POST"})).json();this.token=n.token}await fetch(`${FORMANT_API_URL}/v1/ingest`,{method:"POST",body:JSON.stringify({deviceId:this.captureSession.deviceId,name:this.captureSession.streamName,type:"json",points:[[Date.now(),JSON.stringify(t)]]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+this.token}})}}class Manipulator{constructor(t,r){Ce(this,"currentListeners",[]);Ce(this,"onRealtimeMessage",(t,r)=>{r.payload.jointState&&this.currentListeners.forEach(n=>n(r.payload.jointState))});this.device=t,this.config=r}async synchronize(){this.device.addRealtimeListener(this.onRealtimeMessage),this.device.startListeningToRealtimeDataStream(this.config.currentJointStateStream)}async desynchronize(){this.device.removeRealtimeListener(this.onRealtimeMessage),this.device.stopListeningToRealtimeDataStream(this.config.currentJointStateStream)}async addCurrentJointStateListener(t){this.currentListeners.push(t)}}class RequestDataChannel{constructor(t,r,n){Ce(this,"channel");Ce(this,"requestIdToResponseMap",new Map);this.device=t,this.channel_name=r,this.timeout=n}}class BinaryRequestDataChannel extends RequestDataChannel{constructor(){super(...arguments);Ce(this,"RESPONSE_SUCCESS_BYTE",0);Ce(this,"decoder",new TextDecoder)}generateBinaryId(){const r=new Uint8Array(16);for(let n=0;n<r.length;n++)r[n]=Math.floor(Math.random()*256);return r}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addBinaryListener(r=>{const i=r.slice(0,16).toString();if(i.length===0)throw new Error("Invalid response");const g=r.slice(16);if(g.length===0)throw new Error("Invalid response");this.requestIdToResponseMap.has(i)&&this.requestIdToResponseMap.set(i,g)})}async request(r){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:n,requestIdToResponseMap:i,timeout:g}=this;await n.waitTilReady();const s=this.generateBinaryId(),o=s.toString();i.set(o,!0),n.sendBinary(new Uint8Array([...s,...r]));const u=new Date().getTime();for(;new Date().getTime()<u+g;)if(await delay(50),i.has(o)){const l=i.get(o);if(l!==!0){i.delete(o);const m=l[0]===this.RESPONSE_SUCCESS_BYTE,T=l.slice(1);if(m)return T;throw{name:"AdapterError",message:this.decoder.decode(T)}}}throw i.delete(o),{name:"TimeoutError",message:`Request timed out after ${g/1e3} seconds`}}}class TextRequestDataChannel extends RequestDataChannel{generateTextId(){return Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2)}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addListener(t=>{const r=JSON.parse(t),{id:n,data:i,error:g}=r;if(!n)throw new Error("Invalid response");if(!i&&!g)throw new Error("Invalid response");this.requestIdToResponseMap.has(n)&&this.requestIdToResponseMap.set(n,r)})}async request(t){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:r,requestIdToResponseMap:n,timeout:i}=this;await r.waitTilReady();const g=this.generateTextId();n.set(g,!0),r.send(JSON.stringify({id:g,data:t}));const s=new Date().getTime();for(;new Date().getTime()<s+i;)if(await delay(50),n.has(g)){const o=n.get(g);if(o!==!0){n.delete(g);const{data:u,error:l}=o;if(u)return u;if(l)throw{name:"AdapterError",message:l}}}throw n.delete(g),{name:"TimeoutError",message:`Request timed out after ${i/1e3} seconds`}}}var SessionType=(e=>(e[e.Teleop=1]="Teleop",e[e.Observe=3]="Observe",e))(SessionType||{});class Device{constructor(t,r,n){Ce(this,"rtcClient");Ce(this,"remoteDevicePeerId");Ce(this,"realtimeListeners",[]);Ce(this,"handleMessage",(t,r)=>{this.realtimeListeners.forEach(n=>n(t,r))});this.id=t,this.name=r,this.organizationId=n}async getLatestTelemetry(){return(await(await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}async getConfiguration(){let t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});const r=await t.json();if(!r.state.reportedConfiguration)throw new Error("Device has no configuration, has it ever been turned on?");const n=r.state.reportedConfiguration.version;return t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}/configurations/${n}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),(await t.json()).document}async getFileUrl(t){return(await(await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileId:[t]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).fileUrls}getRealtimeStatus(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getConnectionStatus(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}getRealtimePing(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getPing(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async startRealtimeConnection(t){if(this.rtcClient)throw new Error(`Already created realtime connection to device ${this.id}`);{const r=new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:this.handleMessage});for(;!r.isReady();)await delay(100);const i=(await r.getPeers()).find(g=>g.deviceId===this.id);if(!i)throw new Error("Cannot find peer, is the robot offline?");for(this.remoteDevicePeerId=i.id,await r.connect(this.remoteDevicePeerId,void 0,t);r.getConnectionStatus(this.remoteDevicePeerId)!=="connected";)await delay(100);this.rtcClient=r}}addRealtimeListener(t){this.realtimeListeners.push(t)}removeRealtimeListener(t){const r=this.realtimeListeners.indexOf(t);if(r===-1)throw new Error("Could not find realtime listener to remove");this.realtimeListeners.splice(r,1)}async getRealtimeVideoStreams(){var n,i,g;const t=await this.getConfiguration(),r=[];for(const s of(n=t.teleop.hardwareStreams)!=null?n:[])s.rtcStreamType==="h264-video-frame"&&r.push({name:s.name});for(const s of(i=t.teleop.rosStreams)!=null?i:[])s.topicType=="formant/H264VideoFrame"&&r.push({name:s.topicName});for(const s of(g=t.teleop.customStreams)!=null?g:[])s.rtcStreamType==="h264-video-frame"&&r.push({name:s.name});return r}async getRealtimeManipulators(){var n;const t=await this.getConfiguration(),r=[];for(const i of(n=t.teleop.rosStreams)!=null?n:[])i.topicType=="sensor_msgs/JointState"&&r.push(new Manipulator(this,{currentJointStateStream:{name:i.topicName},plannedJointStateStream:i.plannedTopic?{name:i.plannedTopic}:void 0,planValidStream:i.planValidTopic?{name:i.planValidTopic}:void 0,endEffectorStream:i.endEffectorTopic?{name:i.endEffectorTopic}:void 0,endEffectorLinkName:i.endEffectorLinkName,baseReferenceFrame:i.baseReferenceFrame,localFrame:i.localFrame}));return r}async startListeningToRealtimeVideo(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeVideo(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async startListeningToRealtimeDataStream(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeDataStream(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async enableRealtimeTelemetryPriorityIngestion(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t,enablePriorityUpload:!0,pipeline:"telemetry"})}async disableRealtimeTelemetryPriorityIngestion(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t,enablePriorityUpload:!1,pipeline:"telemetry"})}async getRemotePeer(){const r=(await defined(this.rtcClient,"Realtime connection has not been started").getPeers()).find(n=>n.deviceId===this.id);return defined(r,"Could not find remote peer for device "+this.id)}async stopRealtimeConnection(){if(this.rtcClient)await this.rtcClient.disconnect(this.id);else throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async isInRealtimeSession(){let t=await Fleet.getPeers(),r=await Fleet.getRealtimeSessions(),n=t.find(i=>i.deviceId===this.id);return n?r[n.id].length>0:!1}async getAvailableCommands(){return(await(await fetch(`${FORMANT_API_URL}/v1/admin/command-templates/`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(n=>({name:n.name,id:n.id,command:n.command,description:n.description,parameterEnabled:n.parameterEnabled,parameterValue:n.parameterValue,parameterMeta:n.parameterMeta}))}async sendCommand(t,r,n,i){var T;const s=(await this.getAvailableCommands()).find(b=>b.name===t);if(!s)throw new Error(`Could not find command with name "${t}"`);let o;if(r===void 0)if(s.parameterEnabled&&s.parameterValue)o=s.parameterValue;else throw new Error("Command has no default parameter value, you must provide one");else o=r;let u={value:o,scrubberTime:(n||new Date).toISOString(),meta:lt(lt({},s.parameterMeta),i)};return(await(await fetch(`${FORMANT_API_URL}/v1/admin/commands`,{method:"POST",body:JSON.stringify({commandTemplateId:s.id,organizationId:this.organizationId,deviceId:this.id,command:s.command,parameter:u,userId:(T=Authentication.currentUser)==null?void 0:T.id}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).fileUrls}async createCustomDataChannel(t,r){const n=defined(this.rtcClient,"Realtime connection has not been started"),i=await this.getRemotePeer(),g=await new Promise(s=>{n.createCustomDataChannel(defined(i).id,t,lt({ordered:!0},r),!1,(o,u)=>{const l=new DataChannel(u);s(l)})});return await g.waitTilReady(),g}createCustomRequestDataChannel(t,r=3e3){return new TextRequestDataChannel(this,t,r)}createCustomBinaryRequestDataChannel(t,r=3e3){return new BinaryRequestDataChannel(this,t,r)}async createCaptureStream(t){const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions`,{method:"POST",body:JSON.stringify({deviceId:this.id,streamName:t,tags:{}}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();return new CaptureStream(n)}async getTelemetry(t,r,n,i){return await Fleet.getTelemetry(this.id,t,r,n,i)}async getTelemetryStreams(){var o,u;const t=await this.getConfiguration(),r=await fetch(`${FORMANT_API_URL}/v1/queries/metadata/stream-names`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),n=[],i=[];return(u=(o=t.telemetry)==null?void 0:o.streams)==null||u.forEach(l=>{l.disabled!==!0&&n.push(l.name),l.onDemand===!0&&i.push(l.name)}),console.log(i),(await r.json()).items.filter(l=>!n.includes(l)).map(l=>({name:l,onDemand:i.includes(l)}))}async createInterventionRequest(t,r,n,i){return await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"POST",body:JSON.stringify({message:t,interventionType:r,time:new Date().toISOString(),deviceId:this.id,tags:i,data:n}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}async addInterventionResponse(t,r,n){return await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-responses`,{method:"POST",body:JSON.stringify({interventionId:t,interventionType:r,data:n}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}}const je=class{static async setDefaultDevice(t){je.defaultDeviceId=t}static async getCurrentDevice(){if(!Authentication.token)throw new Error("Not authenticated");if(!je.defaultDeviceId)throw new Error("No known default device");const i=(await(await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.find(s=>s.id===je.defaultDeviceId).name,g=new Device(je.defaultDeviceId,i,defined(Authentication.currentOrganization));return je.knownContext.push(new WeakRef(g)),g}static async getDevice(t){if(!Authentication.token)throw new Error("Not authenticated");const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/devices/${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json(),i=n.name,g=new Device(t,i,n.organizationId);return je.knownContext.push(new WeakRef(g)),g}static async getDevices(){if(!Authentication.token)throw new Error("Not authenticated");const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",body:JSON.stringify({enabled:!0,type:"default"}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();return r.items,r.items.map(n=>new Device(n.id,n.name,n.organizationId))}static async getOnlineDevices(){if(!Authentication.token)throw new Error("Not authenticated");const n=(await(await fetch(`${FORMANT_API_URL}/v1/queries/online-devices`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items;return(await je.getDevices()).filter(g=>n.includes(g.id))}static async getPeers(){if(!Authentication.token)throw new Error("Not authenticated");return await new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}}).getPeers()}static async getRealtimeSessions(){if(!Authentication.token)throw new Error("Not authenticated");return await new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}}).getSessions()}static async getRealtimeDevices(){if(!Authentication.token)throw new Error("Not authenticated");const n=(await(await fetch(`${FORMANT_API_URL}/v1/signaling/peers`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(g=>g.deviceId);return(await je.getDevices()).filter(g=>n.includes(g.id))}static async getLatestTelemetry(t){let r=t;return t&&!Array.isArray(t)&&(t=[t]),(await(await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getTelemetry(t,r,n,i,g){let s=t;Array.isArray(t)||(s=[t]);let o=r;return Array.isArray(r)||(o=[r]),(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify({deviceIds:s,end:i.toISOString(),names:o,start:n.toISOString(),tags:g}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getFileUrl(t){const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileIds:[t]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();if(n.fileUrls.length===0)throw new Error("File not found");return n.fileUrls[0]}static async queryTelemetry(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async queryEvents(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/events/query`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getInterventions(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}};let Fleet=je;Ce(Fleet,"defaultDeviceId"),Ce(Fleet,"knownContext",[]);class KeyValue{static async set(t,r){try{const n=await fetch(FORMANT_API_URL+"/v1/admin/key-value",{method:"POST",body:JSON.stringify({organizationId:defined(Authentication.currentUser).organizationId,key:t,value:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),i=await n.json();if(n.status!==200)throw new Error(i.message)}catch(n){throw n}}static async get(t){try{const r=await fetch(FORMANT_API_URL+`/v1/admin/key-value/${t}`,{method:"GET",body:JSON.stringify({organizationId:defined(Authentication.currentUser).organizationId}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),n=await r.json();if(r.status!==200)throw new Error(n.message);return n.value}catch(r){throw r}}}const accessLevels=["viewer","operator","administrator"],viewer="viewer",operator="operator",administrator="administrator",aggregateLevels=["year","month","week","day","hour","minute"],annotationTypes=["tag","sheet","user"],eventTypes=["triggered-event","intervention-request","teleop-session-record","port-forwarding-session-record","command-request","command-response","command-delivery","custom","comment","system","annotation"],healthStatuses=["unknown","operational","offline","error"],interventionTypes=["selection","labeling","teleop"],severities=["info","warning","error","critical"],videoMimeTypes=["video/mp4"];let urlParams=new URLSearchParams("");typeof window!="undefined"&&(urlParams=new URLSearchParams(window.location.search));const urlDevice=urlParams.get("device");urlDevice&&Fleet.setDefaultDevice(urlDevice);const urlAuth=urlParams.get("auth");urlAuth&&Authentication.loginWithToken(urlAuth);const moduleName=urlParams.get("module");moduleName&&Authentication.listenForRefresh(),exports.App=App,exports.Authentication=Authentication,exports.BinaryRequestDataChannel=BinaryRequestDataChannel,exports.CaptureStream=CaptureStream,exports.DataChannel=DataChannel,exports.Device=Device,exports.Fleet=Fleet,exports.KeyValue=KeyValue,exports.Manipulator=Manipulator,exports.SessionType=SessionType,exports.TextRequestDataChannel=TextRequestDataChannel,exports.accessLevels=accessLevels,exports.administrator=administrator,exports.aggregateLevels=aggregateLevels,exports.annotationTypes=annotationTypes,exports.eventTypes=eventTypes,exports.healthStatuses=healthStatuses,exports.interventionTypes=interventionTypes,exports.operator=operator,exports.severities=severities,exports.videoMimeTypes=videoMimeTypes,exports.viewer=viewer,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});