1(self.webpackChunk_fancode_web_app=self.webpackChunk_fancode_web_app||[]).push([["400"],{49407:function(module){!function(e,t){module.exports=t()}(self,()=>(()=>{var __webpack_modules__={15(e,t,n){e.exports=n(32284)(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})},53(e,t,n){"use strict";var r=n(87558);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},144(e,t,n){"use strict";var r=n(64883);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.clear=function(){this.handlers&&(this.handlers=[])},i.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},172(e,t,n){var r=n(6645),i=n(97395);e.exports=function(e){return r(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var c=n[r];c&&e(t,c,r,a)}return t})}},215(e){var t,n,r=e.exports={};function i(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,c=[],u=!1,l=-1;function f(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&h())}function h(){if(!u){var e=a(f);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||u||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw Error("process.chdir is not supported")},r.umask=function(){return 0}},235(e,t,n){e.exports=n(7043)},246(e,t,n){var r=n(41036);e.exports=function(e,t){var n=null==e?0:e.length;return n?r(e,t)/n:NaN}},424(e){e.exports=function(){return!1}},478(e,t,n){"use strict";var r=n(73738),i=n(16477),o=i.ArrayPrototypePop,a=i.Promise,s=n(87092),c=s.isIterable,u=s.isNodeStream,l=s.isWebStream,f=n(37195).pipelineImpl,h=n(79625).finished;n(34165),e.exports={finished:h,pipeline:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return new a(function(e,n){var i,a,s=t[t.length-1];if(s&&"object"===r(s)&&!u(s)&&!c(s)&&!l(s)){var h=o(t);i=h.signal,a=h.end}f(t,function(t,r){t?n(t):e(r)},{signal:i,end:a})})}}},512(e,t,n){var r=n(83118),i=n(95683),o=n(79255),a=n(64198),s=n(14306),c=n(6842);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},801(e,t,n){"use strict";var r,i=n(43693),o=n(54756),a=n(53344),s=n(42958);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?c(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var h=n(215),d=n(16477),p=d.ArrayPrototypeIndexOf,v=d.NumberIsInteger,g=d.NumberIsNaN,y=d.NumberParseInt,m=d.ObjectDefineProperties,b=d.ObjectKeys,S=d.ObjectSetPrototypeOf,E=d.Promise,C=d.SafeSet,w=d.SymbolAsyncDispose,T=d.SymbolAsyncIterator,k=d.Symbol;e.exports=ei,ei.ReadableState=er;var _=n(37370).EventEmitter,R=n(76978),O=R.Stream,I=R.prependListener,N=n(21076).Buffer,x=n(15406).addAbortSignal,A=n(79625),P=n(60765).debuglog("stream",function(e){P=e}),D=n(11326),M=n(14515),B=n(10972),L=B.getHighWaterMark,j=B.getDefaultHighWaterMark,F=n(4258),U=F.aggregateTwoErrors,q=F.codes,H=q.ERR_INVALID_ARG_TYPE,W=q.ERR_METHOD_NOT_IMPLEMENTED,V=q.ERR_OUT_OF_RANGE,G=q.ERR_STREAM_PUSH_AFTER_EOF,z=q.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,K=F.AbortError,X=n(16964).validateObject,Y=k("kPaused"),Z=n(28436).StringDecoder,$=n(62705);S(ei.prototype,O.prototype),S(ei,O);var J=function(){},Q=M.errorOrDestroy,ee=2048,et=4096;function en(e){return{enumerable:!1,get:function(){return 0!=(this.state&e)},set:function(t){t?this.state|=e:this.state&=~e}}}function er(e,t,r){"boolean"!=typeof r&&(r=t instanceof n(98547)),this.state=6192,e&&e.objectMode&&(this.state|=1),r&&e&&e.readableObjectMode&&(this.state|=1),this.highWaterMark=e?L(this,e,"readableHighWaterMark",r):j(!1),this.buffer=new D,this.length=0,this.pipes=[],this.flowing=null,this[Y]=null,e&&!1===e.emitClose&&(this.state&=-2049),e&&!1===e.autoDestroy&&(this.state&=-4097),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new Z(e.encoding),this.encoding=e.encoding)}function ei(e){var t=this;if(!(this instanceof ei))return new ei(e);var r=this instanceof n(98547);this._readableState=new er(e,this,r),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!r&&x(e.signal,this)),O.call(this,e),M.construct(this,function(){t._readableState.needReadable&&el(t,t._readableState)})}function eo(e,t,n,r){P("readableAddChunk",t);var i,o=e._readableState;if(1&o.state||("string"==typeof t?(n=n||o.defaultEncoding,o.encoding!==n&&(r&&o.encoding?t=N.from(t,n).toString(o.encoding):(t=N.from(t,n),n=""))):t instanceof N?n="":O._isUint8Array(t)?(t=O._uint8ArrayToBuffer(t),n=""):null!=t&&(i=new H("chunk",["string","Buffer","Uint8Array"],t))),i)Q(e,i);else if(null===t)o.state&=-9,function(e,t){if(P("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?ec(e):(t.needReadable=!1,t.emittedReadable=!0,eu(e))}}(e,o);else if(1&o.state||t&&t.length>0)if(r)if(4&o.state)Q(e,new z);else{if(o.destroyed||o.errored)return!1;ea(e,o,t,!0)}else if(o.ended)Q(e,new G);else{if(o.destroyed||o.errored)return!1;o.state&=-9,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?ea(e,o,t,!1):el(e,o)):ea(e,o,t,!1)}else r||(o.state&=-9,el(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function ea(e,t,n,r){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(65536&t.state?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),64&t.state&&ec(e)),el(e,t)}function es(e,t){return e<=0||0===t.length&&t.ended?0:1&t.state?1:g(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function ec(e){var t=e._readableState;P("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(P("emitReadable",t.flowing),t.emittedReadable=!0,h.nextTick(eu,e))}function eu(e){var t=e._readableState;P("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,ev(e)}function el(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,h.nextTick(ef,e,t))}function ef(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(P("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function eh(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[Y]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ed(e){P("readable nexttick read 0"),e.read(0)}function ep(e,t){P("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),ev(e),t.flowing&&!t.reading&&e.read(0)}function ev(e){var t=e._readableState;for(P("flow",t.flowing);t.flowing&&null!==e.read(););}function eg(e,t){"function"!=typeof e.read&&(e=ei.wrap(e,{objectMode:!0}));var n=function(e,t){return ey.apply(this,arguments)}(e,t);return n.stream=e,n}function ey(){return(ey=s(o.mark(function e(t,n){var r,i,s,c,u,l;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=function(e){this===t?(r(),r=J):r=e}
1,r=J,t.on("readable",i),c=A(t,{writable:!1},function(e){s=e?U(s,e):null,r(),r=J}),e.prev=1;case 2:if(null===(u=t.destroyed?null:t.read())){e.next=4;break}return e.next=3,u;case 3:e.next=7;break;case 4:if(!s){e.next=5;break}throw s;case 5:if(null!==s){e.next=6;break}return e.abrupt("return");case 6:return e.next=7,a(new E(i));case 7:e.next=2;break;case 8:e.next=10;break;case 9:throw e.prev=9,l=e.catch(1),s=U(s,l);case 10:return e.prev=10,(s||!1!==(null==n?void 0:n.destroyOnReturn))&&(void 0===s||t._readableState.autoDestroy)?M.destroyer(t,null):(t.off("readable",i),c()),e.finish(10);case 11:case"end":return e.stop()}},e,null,[[1,9,10,11]])}))).apply(this,arguments)}function em(e,t){var n;return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n)}function eb(e){var t=e._readableState;P("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,h.nextTick(eS,t,e))}function eS(e,t){if(P("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length){if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)h.nextTick(eE,t);else if(e.autoDestroy){var n=t._writableState;(!n||n.autoDestroy&&(n.finished||!1===n.writable))&&t.destroy()}}}function eE(e){!e.writable||e.writableEnded||e.destroyed||e.end()}function eC(){return void 0===r&&(r={}),r}m(er.prototype,{objectMode:en(1),ended:en(2),endEmitted:en(4),reading:en(8),constructed:en(16),sync:en(32),needReadable:en(64),emittedReadable:en(128),readableListening:en(256),resumeScheduled:en(512),errorEmitted:en(1024),emitClose:en(ee),autoDestroy:en(et),destroyed:en(8192),closed:en(16384),closeEmitted:en(32768),multiAwaitDrain:en(65536),readingMore:en(131072),dataEmitted:en(262144)}),ei.prototype.destroy=M.destroy,ei.prototype._undestroy=M.undestroy,ei.prototype._destroy=function(e,t){t(e)},ei.prototype[_.captureRejectionSymbol]=function(e){this.destroy(e)},ei.prototype[w]=function(){var e,t=this;return this.destroyed||(e=this.readableEnded?null:new K,this.destroy(e)),new E(function(n,r){return A(t,function(t){return t&&t!==e?r(t):n(null)})})},ei.prototype.push=function(e,t){return eo(this,e,t,!1)},ei.prototype.unshift=function(e,t){return eo(this,e,t,!0)},ei.prototype.isPaused=function(){var e=this._readableState;return!0===e[Y]||!1===e.flowing},ei.prototype.setEncoding=function(e){var t=new Z(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var n,r=this._readableState.buffer,i="",o=l(r);try{for(o.s();!(n=o.n()).done;){var a=n.value;i+=t.write(a)}}catch(e){o.e(e)}finally{o.f()}return r.clear(),""!==i&&r.push(i),this._readableState.length=i.length,this},ei.prototype.read=function(e){P("read",e),void 0===e?e=NaN:v(e)||(e=y(e,10));var t=this._readableState,n=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>0x40000000)throw new V("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return P("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?eb(this):ec(this),null;if(0===(e=es(e,t))&&t.ended)return 0===t.length&&eb(this),null;var r,i=!!(64&t.state);if(P("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&P("length less than watermark",i=!0),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)P("reading, ended or constructing",i=!1);else if(i){P("do read"),t.state|=40,0===t.length&&(t.state|=64);try{this._read(t.highWaterMark)}catch(e){Q(this,e)}t.state&=-33,t.reading||(e=es(n,t))}return null===(r=e>0?em(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&eb(this)),null===r||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",r)),r},ei.prototype._read=function(e){throw new W("_read()")},ei.prototype.pipe=function(e,t){var n=this,r=this._readableState;1===r.pipes.length&&(r.multiAwaitDrain||(r.multiAwaitDrain=!0,r.awaitDrainWriters=new C(r.awaitDrainWriters?[r.awaitDrainWriters]:[]))),r.pipes.push(e),P("pipe
1count=%d opts=%j",r.pipes.length,t);var i,o=t&&!1===t.end||e===h.stdout||e===h.stderr?v:s;function a(t,o){P("onunpipe"),t===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,function(){P("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),i&&e.removeListener("drain",i),e.removeListener("error",f),e.removeListener("unpipe",a),n.removeListener("end",s),n.removeListener("end",v),n.removeListener("data",l),c=!0,i&&r.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&i()}())}function s(){P("onend"),e.end()}r.endEmitted?h.nextTick(o):n.once("end",o),e.on("unpipe",a);var c=!1;function u(){c||(1===r.pipes.length&&r.pipes[0]===e?(P("false write response, pause",0),r.awaitDrainWriters=e,r.multiAwaitDrain=!1):r.pipes.length>1&&r.pipes.includes(e)&&(P("false write response, pause",r.awaitDrainWriters.size),r.awaitDrainWriters.add(e)),n.pause()),i||(i=function(e,t){return function(){var n=e._readableState;n.awaitDrainWriters===t?(P("pipeOnDrain",1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(P("pipeOnDrain",n.awaitDrainWriters.size),n.awaitDrainWriters.delete(t)),n.awaitDrainWriters&&0!==n.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(n,e),e.on("drain",i))}function l(t){P("ondata");var n=e.write(t);P("dest.write",n),!1===n&&u()}function f(t){if(P("onerror",t),v(),e.removeListener("error",f),0===e.listenerCount("error")){var n=e._writableState||e._readableState;n&&!n.errorEmitted?Q(e,t):e.emit("error",t)}}function d(){e.removeListener("finish",p),v()}function p(){P("onfinish"),e.removeListener("close",d),v()}function v(){P("unpipe"),n.unpipe(e)}return n.on("data",l),I(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",n),!0===e.writableNeedDrain?u():r.flowing||(P("pipe resume"),n.resume()),e},ei.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipes.length)return this;if(!e){var n=t.pipes;t.pipes=[],this.pause();for(var r=0;r<n.length;r++)n[r].emit("unpipe",this,{hasUnpiped:!1});return this}var i=p(t.pipes,e);return -1===i||(t.pipes.splice(i,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},ei.prototype.on=function(e,t){var n=O.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,P("on readable",r.length,r.reading),r.length?ec(this):r.reading||h.nextTick(ed,this))),n},ei.prototype.addListener=ei.prototype.on,ei.prototype.removeListener=function(e,t){var n=O.prototype.removeListener.call(this,e,t);return"readable"===e&&h.nextTick(eh,this),n},ei.prototype.off=ei.prototype.removeListener,ei.prototype.removeAllListeners=function(e){var t=O.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||h.nextTick(eh,this),t},ei.prototype.resume=function(){var e=this._readableState;return e.flowing||(P("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,h.nextTick(ep,e,t))}(this,e)),e[Y]=!1,this},ei.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._readableState[Y]=!0,this},ei.prototype.wrap=function(e){var t=this,n=!1;e.on("data",function(r){!t.push(r)&&e.pause&&(n=!0,e.pause())}),e.on("end",function(){t.push(null)}),e.on("error",function(e){Q(t,e)}),e.on("close",function(){t.destroy()}),e.on("destroy",function(){t.destroy()}),this._read=function(){n&&e.resume&&(n=!1,e.resume())};for(var r=b(e),i=1;i<r.length;i++){var o=r[i];void 0===this[o]&&"function"==typeof e[o]&&(this[o]=e[o].bind(e))}return this},ei.prototype[T]=function(){return eg(this)},ei.prototype.iterator=function(e){return void 0!==e&&X(e,"options"),eg(this,e)},m(ei.prototype,{readable:{__proto__:null,get:function(){var e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set:function(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get:function(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get:function(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get:function(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get:function(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get:function(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get:function(){return!!this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get:function(){return!!this._readableState&&this._readableState.endEmitted}}}),m(er.prototype,{pipesCount:{__proto__:null,get:function(){return this.pipes.length}},paused:{__proto__:null,get:function(){return!1!==this[Y]}
1,set:function(e){this[Y]=!!e}}}),ei._fromList=em,ei.from=function(e,t){return $(ei,e,t)},ei.fromWeb=function(e,t){return eC().newStreamReadableFromReadableStream(e,t)},ei.toWeb=function(e,t){return eC().newReadableStreamFromStreamReadable(e,t)},ei.wrap=function(e,t){var n,r;return new ei(u(u({objectMode:null==(n=null!=(r=e.readableObjectMode)?r:e.objectMode)||n},t),{},{destroy:function(t,n){M.destroyer(e,t),n(t)}})).wrap(e)}},887(e,t,n){var r=n(16993),i=n(11791);e.exports=function(e,t,n,o,a){return new i(r().w(e,t,n,o),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},978(e){var t=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i=Object.assign({},r,i),!e||"string"!=typeof e)return e;var o=e.trim();if(void 0!==i.skipLike&&i.skipLike.test(o))return e;if("0"===e)return 0;if(i.hex&&t.test(o))return function(e,t){if(parseInt)return parseInt(e,16);if(Number.parseInt)return Number.parseInt(e,16);if(window&&window.parseInt)return window.parseInt(e,t);throw Error("parseInt, Number.parseInt, window.parseInt are not supported")}(o,16);if(-1!==o.search(/[eE]/)){var a=o.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(a){if(i.leadingZeros)o=(a[1]||"")+a[3];else if("0"!==a[2]||"."!==a[3][0])return e;return i.eNotation?Number(o):e}return e}var s=n.exec(o);if(s){var c=s[1],u=s[2],l=function(e){return e&&-1!==e.indexOf(".")&&("."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1))),e}(s[3]);if(!i.leadingZeros&&u.length>0&&c&&"."!==o[2]||!i.leadingZeros&&u.length>0&&!c&&"."!==o[1])return e;if(i.leadingZeros&&u===e)return 0;var f=Number(o),h=""+f;return -1!==h.search(/[eE]/)?i.eNotation?f:e:-1!==o.indexOf(".")?"0"===h&&""===l||h===l||c&&h==="-"+l?f:e:u?l===h||c+l===h?f:e:o===h||o===c+h?f:e}return e}},1131(e,t,n){"use strict";var r=n(42933),i={allowBooleanAttributes:!1,unpairedTags:[]};function o(e){return" "===e||" "===e||"\n"===e||"\r"===e}function a(e,t){for(var n=t;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{var r=e.substr(n,t-n);if(t>5&&"xml"===r)return h("InvalidXml","XML declaration allowed only at the start of the document.",v(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){var n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&0==--n)break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7]){for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}}return t}function c(e,t){for(var n="",r="",i=!1;t<e.length;t++){if('"'===e[t]||"'"===e[t])""===r?r=e[t]:r!==e[t]||(r="");else if(">"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}t.validate=function(e,t){t=Object.assign({},i,t);var n=[],r=!1,u=!1;"\uFEFF"===e[0]&&(e=e.substr(1));for(var d=0;d<e.length;d++)if("<"===e[d]&&"?"===e[d+1]){if((d=a(e,d+=2)).err)return d}else{if("<"!==e[d]){if(o(e[d]))continue;return h("InvalidChar","char '"+e[d]+"' is not expected.",v(e,d))}var g=d;if("!"===e[++d]){d=s(e,d);continue}var y=!1;"/"===e[d]&&(y=!0,d++);for(var m="";d<e.length&&">"!==e[d]&&" "!==e[d]&&" "!==e[d]&&"\n"!==e[d]&&"\r"!==e[d];d++)m+=e[d];if("/"===(m=m.trim())[m.length-1]&&(m=m.substring(0,m.length-1),d--),!p(m))return h("InvalidTag",0===m.trim().length?"Invalid space after '<'.":"Tag '"+m+"' is an invalid name.",v(e,d));var b=c(e,d);if(!1===b)return h("InvalidAttr","Attributes for '"+m+"' have open quote.",v(e,d));var S=b.value;if(d=b.index,"/"===S[S.length-1]){var E=d-S.length,C=l(S=S.substring(0,S.length-1),t);if(!0!==C)return h(C.err.code,C.err.msg,v(e,E+C.err.line));r=!0}else if(y){if(!b.tagClosed)return h("InvalidTag","Closing tag '"+m+"' doesn't have proper closing.",v(e,d));if(S.trim().length>0)return h("InvalidTag","Closing tag '"+m+"' can't have attributes or invalid starting.",v(e,g));if(0===n.length)return h("InvalidTag","Closing tag '"+m+"' has not been opened.",v(e,g));var w=n.pop();if(m!==w.tagName){var T=v(e,w.tagStartPos);return h("InvalidTag","Expected closing tag '"+w.tagName+"' (opened in line "+T.line+", col "+T.col+") instead of closing tag '"+m+"'.",v(e,g))}0==n.length&&(u=!0)}else{var k=l(S,t);if(!0!==k)return h(k.err.code,k.err.msg,v(e,d-S.length+k.err.line));if(!0===u)return h("InvalidXml","Multiple possible root nodes found.",v(e,d));-1!==t.unpairedTags.indexOf(m)||n.push({tagName:m,tagStartPos:g}),r=!0}for(d++;d<e.length;d++)if("<"===e[d]){if("!"===e[d+1]){d=s(e,++d);continue}if("?"!==e[d+1])break;if((d=a(e,++d)).err)return d}else if("&"===e[d]){var _=f(e,d);if(-1==_)return h("InvalidChar","char '&' is not expected.",v(e,d));d=_}else if(!0===u&&!o(e[d]))return h("InvalidXml","Extra text at the end",v(e,d));"<"===e[d]&&d--}return r?1==n.length?h("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",v(e,n[0].tagStartPos)):!(n.length>0)||h("InvalidXml","Invalid '"+JSON.stringify(n.map(function(e){return e.tagName}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};var u=RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function l(e,t){for(var n=r.getAllMatches(e,u),i={},o=0;o<n.length;o++){if(0===n[o][1].length)return h("InvalidAttr","Attribute '"+n[o][2]+"' has no space in starting.",g(n[o]));if(void 0!==n[o][3]&&void 0===n[o][4])return h("InvalidAttr","Attribute '"+n[o][2]+"' is without value.",g(n[o]));if(void 0===n[o][3]&&!t.allowBooleanAttributes)return h("InvalidAttr","boolean attribute '"+n[o][2]+"' is not allowed.",g(n[o]));var a=n[o][2];
1if(!d(a))return h("InvalidAttr","Attribute '"+a+"' is an invalid name.",g(n[o]));if(i.hasOwnProperty(a))return h("InvalidAttr","Attribute '"+a+"' is repeated.",g(n[o]));i[a]=1}return!0}function f(e,t){if(";"===e[++t])return -1;if("#"===e[t])return function(e,t){var n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return -1}(e,++t);for(var n=0;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return -1}return t}function h(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function d(e){return r.isName(e)}function p(e){return r.isName(e)}function v(e,t){var n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function g(e){return e.startIndex+e[1].length}},1309(e,t,n){e=n.nmd(e);var r,i=n(6365),o=n(73738);!function(a){var s="object"==o(t)&&t&&!t.nodeType&&t,c="object"==o(e)&&e&&!e.nodeType&&e,u="object"==(void 0===i?"undefined":o(i))&&i;u.global!==u&&u.window!==u&&u.self!==u||(a=u);var l,f,h=0x7fffffff,d=36,p=/^xn--/,v=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,b=String.fromCharCode;function S(e){throw RangeError(y[e])}function E(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function C(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+E((e=e.replace(g,".")).split("."),t).join(".")}function w(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function T(e){return E(e,function(e){var t="";return e>65535&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=b(e)}).join("")}function k(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function R(e,t,n){var r=0;for(e=n?m(e/700):e>>1,e+=m(e/t);e>455;r+=d)e=m(e/35);return m(r+36*e/(e+38))}function O(e){var t,n,r,i,o,a,s,c,u,l,f=[],p=e.length,v=0,g=128,y=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&S("not-basic"),f.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<p;){for(o=v,a=1,s=d;i>=p&&S("invalid-input"),((c=k(e.charCodeAt(i++)))>=d||c>m((h-v)/a))&&S("overflow"),v+=c*a,!(c<(u=s<=y?1:s>=y+26?26:s-y));s+=d)a>m(h/(l=d-u))&&S("overflow"),a*=l;y=R(v-o,t=f.length+1,0==o),m(v/t)>h-g&&S("overflow"),g+=m(v/t),v%=t,f.splice(v++,0,g)}return T(f)}function I(e){var t,n,r,i,o,a,s,c,u,l,f,p,v,g,y,E=[];for(p=(e=w(e)).length,t=128,n=0,o=72,a=0;a<p;++a)(f=e[a])<128&&E.push(b(f));for(r=i=E.length,i&&E.push("-");r<p;){for(s=h,a=0;a<p;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>m((h-n)/(v=r+1))&&S("overflow"),n+=(s-t)*v,t=s,a=0;a<p;++a)if((f=e[a])<t&&++n>h&&S("overflow"),f==t){for(c=n,u=d;!(c<(l=u<=o?1:u>=o+26?26:u-o));u+=d)y=c-l,g=d-l,E.push(b(_(l+y%g,0))),c=m(y/g);E.push(b(_(c,0))),o=R(n,v,r==i),n=0,++r}++n,++t}return E.join("")}if(l={version:"1.3.2",ucs2:{decode:w,encode:T},decode:O,encode:I,toASCII:function(e){return C(e,function(e){return v.test(e)?"xn--"+I(e):e})},toUnicode:function(e){return C(e,function(e){return p.test(e)?O(e.slice(4).toLowerCase()):e})}},"object"==o(n.amdO)&&n.amdO)void 0===(r=(function(){return l}).call(t,n,t,e))||(e.exports=r);else if(s&&c)if(e.exports==s)c.exports=l;else for(f in l)l.hasOwnProperty(f)&&(s[f]=l[f]);else a.punycode=l}(this)},1356(e,t,n){"use strict";e.exports=i;var r=n(86823);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/0x100000000>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>0xffffffff&&(n=0,++r>0xffffffff&&(r=0))),new i(n,r)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(r.isString(e)){if(!r.Long)return i.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+0x100000000*n)}return this.lo+0x100000000*this.hi},i.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var s=String.prototype.charCodeAt;i.fromHash=function(e){return e===a?o:new i((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>
10,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},1550(e,t,n){var r=n(46441);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1}},1790(e,t,n){"use strict";var r,i=n(14624).F,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];var l,f=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var h=t.map(function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",function(){s=!0}),void 0===r&&(r=n(56350)),r(e,{readable:t,writable:i},function(e){if(e)return o(e);s=!0,o()});var c=!1;return function(t){if(!s&&!c)return c=!0,!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe")):e.abort()}}(e,o,i>0,function(e){l||(l=e),e&&h.forEach(c),o||(h.forEach(c),f(l))})});return t.reduce(u)}},2263(e,t,n){var r=n(50303);e.exports=n(172)(function(e,t,n,i){r(e,t,n,i)})},2805(e,t,n){var r=n(85715),i=n(42933);function o(e,t){for(var n="";t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(-1!==(n=n.trim()).indexOf(" "))throw Error("External entites are not supported");for(var r=e[t++],i="";t<e.length&&e[t]!==r;t++)i+=e[t];return[n,i,t]}function a(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function c(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function u(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function l(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function f(e){if(i.isName(e))return e;throw Error("Invalid entity name ".concat(e))}e.exports=function(e,t){var n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw Error("Invalid Tag instead of DOCTYPE");t+=9;for(var i=1,h=!1,d=!1;t<e.length;t++)if("<"!==e[t]||d)if(">"===e[t]){if(d?"-"===e[t-1]&&"-"===e[t-2]&&(d=!1,i--):i--,0===i)break}else"["===e[t]?h=!0:e[t];else{if(h&&s(e,t)){var p=r(o(e,(t+=7)+1),3);entityName=p[0],val=p[1],t=p[2],-1===val.indexOf("&")&&(n[f(entityName)]={regx:RegExp("&".concat(entityName,";"),"g"),val})}else if(h&&c(e,t))t+=8;else if(h&&u(e,t))t+=8;else if(h&&l(e,t))t+=9;else{if(!a)throw Error("Invalid DOCTYPE");d=!0}i++}if(0!==i)throw Error("Unclosed DOCTYPE");return{entities:n,i:t}}},3223(e,t,n){var r=n(36734);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},3838(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},4034(e,t,n){var r=n(66760),i=n(38917),o=n(70652);e.exports=function(e,t,n,a,s,c){var u=1&n,l=e.length,f=t.length;if(l!=f&&!(u&&f>l))return!1;var h=c.get(e),d=c.get(t);if(h&&d)return h==t&&d==e;var p=-1,v=!0,g=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++p<l;){var y=e[p],m=t[p];if(a)var b=u?a(m,y,p,t,e,c):a(y,m,p,e,t,c);if(void 0!==b){if(b)continue;v=!1;break}
1if(g){if(!i(t,function(e,t){if(!o(g,t)&&(y===e||s(y,e,n,a,c)))return g.push(t)})){v=!1;break}}else if(y!==m&&!s(y,m,n,a,c)){v=!1;break}}return c.delete(e),c.delete(t),v}},4181(e,t,n){"use strict";var r=n(73738),i=n(91669).version,o=n(93033),a={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){a[e]=function(n){return r(n)===e||"a"+(t<1?"n ":" ")+e}});var s={};a.transitional=function(e,t,n){function r(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,a){if(!1===e)throw new o(r(i," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!s[i]&&(s[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}},e.exports={assertOptions:function(e,t,n){if("object"!==r(e))throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),a=i.length;a-- >0;){var s=i[a],c=t[s];if(c){var u=e[s],l=void 0===u||c(u,s,e);if(!0!==l)throw new o("option "+s+" must be "+l,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}},validators:a}},4258(e,t,n){"use strict";var r=n(73738),i=n(61837),o=n(17383),a=n(34579),s=n(28452),c=n(63072),u=n(29511),l=n(41132);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return h(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t,n){return t=c(t),s(e,p()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var v=n(13138),g=v.format,y=v.inspect,m=n(16477).AggregateError,b=window.AggregateError||m,S=Symbol("kIsNodeError"),E=["string","function","number","object","Function","Object","boolean","bigint","symbol"],C=/^([A-Z][a-z0-9]*)+$/,w={};function T(e,t){if(!e)throw new w.ERR_INTERNAL_ASSERTION(t)}function k(e){for(var t="",n=e.length,r=+("-"===e[0]);n>=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function _(e,t,n){if("function"==typeof t)return T(t.length<=n.length,"Code: ".concat(e,"; The provided arguments length (").concat(n.length,") does not match the required ones (").concat(t.length,").")),t.apply(void 0,l(n));var r=(t.match(/%[dfijoOs]/g)||[]).length;return T(r===n.length,"Code: ".concat(e,"; The provided arguments length (").concat(n.length,") does not match the required ones (").concat(r,").")),0===n.length?t:g.apply(void 0,[t].concat(l(n)))}function R(e,t,n){n||(n=Error);var r=function(n){function r(){o(this,r);for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];return d(this,r,[_(e,t,i)])}return u(r,n),a(r,[{key:"toString",value:function(){return"".concat(this.name," [").concat(e,"]: ").concat(this.message)}}])}(n);Object.defineProperties(r.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value:function(){return"".concat(this.name," [").concat(e,"]: ").concat(this.message)},writable:!0,enumerable:!1,configurable:!0}}),r.prototype.code=e,r.prototype[S]=!0,w[e]=r}function O(e){var t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}var I=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"The operation was aborted",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(o(this,t),void 0!==i&&"object"!==r(i))throw new w.ERR_INVALID_ARG_TYPE("options","Object",i);return(e=d(this,t,[n,i])).code="ABORT_ERR",e.name="AbortError",e}return u(t,e),a(t)}(i(Error));R("ERR_ASSERTION","%s",Error),R("ERR_INVALID_ARG_TYPE",function(e,t,n){T("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);var i,o="The ";e.endsWith(" argument")?o+="".concat(e," "):o+='"'.concat(e,'" ').concat(e.includes(".")?"property":"argument"," "),o+="must be ";var a,s=[],c=[],u=[],l=f(t);try{for(l.s();!(a=l.n()).done;){var h=a.value;T("string"==typeof h,"All expected entries have to be of type string"),E.includes(h)?s.push(h.toLowerCase()):C.test(h)?c.push(h):(T("object"!==h,'The value "object" should be written as "Object"'),u.push(h))}}catch(e){l.e(e)}finally{l.f()}if(c.length>0){var d=s.indexOf("object");-1!==d&&(s.splice(s,d,1),c.push("Object"))}if(s.length>0){switch(s.length){case 1:o+="of type ".concat(s[0]);break;case 2:o+="one of type ".concat(s[0]," or ").concat(s[1]);break;default:var p=s.pop();o+="one of type ".concat(s.join(", "),", or ").concat(p)}(c.length>0||u.length>0)&&(o+=" or ")}if(c.length>0){switch(c.length){case 1:o+="an instance of ".concat(c[0]);break;case 2:o+="an instance of ".concat(c[0]," or ").concat(c[1]);break;default:var v=c.pop();o+="an instance of ".concat(c.join(", "),", or ").concat(v)}u.length>0&&(o+=" or ")}switch(u.length){case 0:break;case 1:u[0].toLowerCase()!==u[0]&&(o+="an "),o+="".concat(u[0]);break;case 2:o+="one of ".concat(u[0]," or ").concat(u[1]);break;default:var g=u.pop();o+="one of ".concat(u.join(", "),", or ").concat(g)}if(null==n)o+=". Received ".concat(n);else if("function"==typeof n&&n.name)o+=". Received function ".concat(n.name);else if("object"===r(n))if(null!=(i=n.constructor)&&i.name)o+=". Received an instance of ".concat(n.constructor.name);else{var m=y(n,{depth:-1});o+=". Received ".concat(m)}else{var b=y(n,{colors:!1});b.length>25&&(b="".concat(b.slice(0,25),"...")),o+=". Received type ".concat(r(n)," (").concat(b,")")}return o},TypeError),R("ERR_INVALID_ARG_VALUE",function(e,t){var n=arguments.length>
12&&void 0!==arguments[2]?arguments[2]:"is invalid",r=y(t);r.length>128&&(r=r.slice(0,128)+"...");var i=e.includes(".")?"property":"argument";return"The ".concat(i," '").concat(e,"' ").concat(n,". Received ").concat(r)},TypeError),R("ERR_INVALID_RETURN_VALUE",function(e,t,n){var i,o=null!=n&&null!=(i=n.constructor)&&i.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n));return"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")},TypeError),R("ERR_MISSING_ARGS",function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];T(n.length>0,"At least one arg needs to be specified");var i=n.length;switch(n=(Array.isArray(n)?n:[n]).map(function(e){return'"'.concat(e,'"')}).join(" or "),i){case 1:e+="The ".concat(n[0]," argument");break;case 2:e+="The ".concat(n[0]," and ").concat(n[1]," arguments");break;default:var o=n.pop();e+="The ".concat(n.join(", "),", and ").concat(o," arguments")}return"".concat(e," must be specified")},TypeError),R("ERR_OUT_OF_RANGE",function(e,t,n){var r;if(T(t,'Missing "range" argument'),Number.isInteger(n)&&Math.abs(n)>0x100000000)r=k(String(n));else if("bigint"==typeof n){r=String(n);var i=Math.pow(BigInt(2),BigInt(32));(n>i||n<-i)&&(r=k(r)),r+="n"}else r=y(n);return'The value of "'.concat(e,'" is out of range. It must be ').concat(t,". Received ").concat(r)},RangeError),R("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),R("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),R("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),R("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),R("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),R("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),R("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),R("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),R("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),R("ERR_STREAM_WRITE_AFTER_END","write after end",Error),R("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:I,aggregateTwoErrors:O(function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;var n=new b([t,e],t.message);return n.code=t.code,n}return e||t}),hideStackFrames:O,codes:w}},4373(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4471(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return((0,i.default)(t),n=String(n))?"4"===n?!!s.test(t)&&t.split(".").sort(function(e,t){return e-t})[3]<=255:"6"===n&&!!u.test(t):e(t,4)||e(t,6)};var r,i=(r=n(38494))&&r.__esModule?r:{default:r},o="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(o,"[.]){3}").concat(o),s=new RegExp("^".concat(a,"$")),c="(?:[0-9a-fA-F]{1,4})",u=RegExp("^("+"(?:".concat(c,":){7}(?:").concat(c,"|:)|")+"(?:".concat(c,":){6}(?:").concat(a,"|:").concat(c,"|:)|")+"(?:".concat(c,":){5}(?::").concat(a,"|(:").concat(c,"){1,2}|:)|")+"(?:".concat(c,":){4}(?:(:").concat(c,"){0,1}:").concat(a,"|(:").concat(c,"){1,3}|:)|")+"(?:".concat(c,":){3}(?:(:").concat(c,"){0,2}:").concat(a,"|(:").concat(c,"){1,4}|:)|")+"(?:".concat(c,":){2}(?:(:").concat(c,"){0,3}:").concat(a,"|(:").concat(c,"){1,5}|:)|")+"(?:".concat(c,":){1}(?:(:").concat(c,"){0,4}:").concat(a,"|(:").concat(c,"){1,6}|:)|")+"(?::((?::".concat(c,"){0,5}:").concat(a,"|(?::").concat(c,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default},4622(e,t,n){"use strict";var r=n(93848);e.exports=function(e){function t(e,n,i,o){var a=e[o++];if("__proto__"===a)return!0;var s=Number.isFinite(+a),c=o>=e.length;return a=!a&&r.isArray(i)?i.length:a,c?r.hasOwnProperty(i,a)?i[a]=[i[a],n]:i[a]=n:(i[a]&&r.isObject(i[a])||(i[a]=[]),t(e,n,i[a],o)&&r.isArray(i[a])&&(i[a]=function(e){var t,n,r={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)r[n=i[t]]=e[n];return r}(i[a]))),!s}if(r.isFormData(e)&&r.isFunction(e.entries)){var n={};return r.forEachEntry(e,function(e,i){t(function(e){return r.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),i,n,0)}),n}return null}},4633(e,t,n){var r=n(25172),i=n(16993),o=n(55869),a=n(887),s=n(11791),c=n(4373),u=n(30579);function l(){"use strict";var t=i(),n=t.m(l),f=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function p(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,d[e],t)},delegateYield:function(e,i,o){return t.resultName=i,n(r.d,u(e),o)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,i){return t.w(p(e),n,r,i&&i.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new r(e,t)}
1,AsyncIterator:s,async:function(e,t,n,r,i){return(h(t)?a:o)(p(e),t,n,r,i)},keys:c,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},5261(e){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"}},5708(e,t,n){e.exports=n(90431)(n(18090),"Set")},5729(e,t,n){"use strict";var r=n(43693),i=n(17383),o=n(34579);e.exports=function(){return o(function e(t){i(this,e),this.tagname=t,this.child=[],this[":@"]={}},[{key:"add",value:function(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push(r({},e,t))}},{key:"addChild",value:function(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push(r(r({},e.tagname,e.child),":@",e[":@"])):this.child.push(r({},e.tagname,e.child))}}])}()},5901(e,t,n){var r=n(70079);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},5999(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},6032(e,t,n){"use strict";e.exports=i;var r=n(48530);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(64939)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},6246(e,t,n){"use strict";var r=n(73738),i=n(57608).version,o=n(87558),a={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){a[e]=function(n){return r(n)===e||"a"+(t<1?"n ":" ")+e}});var s={};a.transitional=function(e,t,n){function r(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,a){if(!1===e)throw new o(r(i," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!s[i]&&(s[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}},e.exports={assertOptions:function(e,t,n){if("object"!==r(e))throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),a=i.length;a-- >0;){var s=i[a],c=t[s];if(c){var u=e[s],l=void 0===u||c(u,s,e);if(!0!==l)throw new o("option "+s+" must be "+l,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}},validators:a}},6269(e,t,n){"use strict";var r=n(73738),i=function(e){switch(r(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,o){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===r(e)?Object.keys(e).map(function(r){var o=encodeURIComponent(i(r))+n;return Array.isArray(e[r])?e[r].map(function(e){return o+encodeURIComponent(i(e))}).join(t):o+encodeURIComponent(i(e[r]))}).join(t):o?encodeURIComponent(i(o))+n+encodeURIComponent(i(e)):""}},6365(e,t,n){var r=n(6365);e.exports="undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{}},6396(e,t,n){"use strict";var r=n(64883),i=n(97681),o=n(65156);e.exports=function(e,t){return i(e,new o.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,i){return o.isNode&&r.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}},6645(e,t,n){var r=n(63361),i=n(91598),o=n(55296);e.exports=function(e,t){return o(i(e,t,r),e+"")}},6842(e,t,n){var r=n(83118),i=n(55470),o=n(36734);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},7036(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7043(e,t,n){"use strict";var r=n(73738);e.exports="object"===("undefined"==typeof self?"undefined":r(self))?self.FormData:window.FormData},7502(e,t,n){e.exports=n(18090).Symbol},7595(e,t,n){var r=n(39019);e.exports=function(e,t){return r(e,t)}},7774(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7908(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}
1,8007(e,t,n){var r=n(73738),i=n(57794),o=n(15135),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(i(e))return!1;var n=r(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||s.test(e)||!a.test(e)||null!=t&&e in Object(t)}},8252(e,t,n){"use strict";t.Service=n(26584)},8367(e,t,n){"use strict";var r=n(1131);e.exports={XMLParser:n(10838),XMLValidator:r,XMLBuilder:n(79025)}},8803(e,t,n){e=n.nmd(e);var r,i=n(73738);!function(o,a){"use strict";var s="function",c="undefined",u="object",l="string",f="model",h="name",d="type",p="vendor",v="version",g="architecture",y="console",m="mobile",b="tablet",S="smarttv",E="wearable",C="embedded",w="Amazon",T="Apple",k="ASUS",_="BlackBerry",R="Browser",O="Chrome",I="Firefox",N="Google",x="Huawei",A="LG",P="Microsoft",D="Motorola",M="Opera",B="Samsung",L="Sharp",j="Sony",F="Xiaomi",U="Zebra",q="Facebook",H=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},W=function(e,t){return i(e)===l&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},G=function(e,t){if(i(e)===l)return e=e.replace(/^\s\s*/,""),i(t)===c?e:e.substring(0,350)},z=function(e,t){for(var n,r,o,c,l,f,h=0;h<t.length&&!l;){var d=t[h],p=t[h+1];for(n=r=0;n<d.length&&!l;)if(l=d[n++].exec(e))for(o=0;o<p.length;o++)f=l[++r],i(c=p[o])===u&&c.length>0?2===c.length?i(c[1])==s?this[c[0]]=c[1].call(this,f):this[c[0]]=c[1]:3===c.length?i(c[1])!==s||c[1].exec&&c[1].test?this[c[0]]=f?f.replace(c[1],c[2]):void 0:this[c[0]]=f?c[1].call(this,f,c[2]):void 0:4===c.length&&(this[c[0]]=f?c[3].call(this,f.replace(c[1],c[2])):a):this[c]=f||a;h+=2}},K=function(e,t){for(var n in t)if(i(t[n])===u&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(W(t[n][r],e))return"?"===n?a:n}else if(W(t[n],e))return"?"===n?a:n;return e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,v],[/opios[\/ ]+([\w\.]+)/i],[v,[h,M+" Mini"]],[/\bopr\/([\w\.]+)/i],[v,[h,M]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[h,v],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[h,"UC"+R]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[v,[h,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[v,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[h,"IE"]],[/yabrowser\/([\w\.]+)/i],[v,[h,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+R],v],[/\bfocus\/([\w\.]+)/i],[v,[h,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[h,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[h,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[h,"MIUI "+R]],[/fxios\/([-\w\.]+)/i],[v,[h,I]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+R]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+R],v],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[h,v],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,q],v],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[h,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[h,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[h,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,O+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[h,"Android "+R]],[/(chrome|omniweb|arora|[t
vendor: 4,765 bytes, line 1
1izenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[v,K,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[h,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[h,I+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[h,v],[/(cobalt)\/([\w\.]+)/i],[h,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,V]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[p,B],[d,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[f,[p,B],[d,m]],[/\((ip(?:hone|od)[\w ]*);/i],[f,[p,T],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[p,T],[d,b]],[/(macintosh);/i],[f,[p,T]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[p,x],[d,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[p,x],[d,m]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[f,/_/g," "],[p,F],[d,m]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[p,F],[d,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[p,"OPPO"],[d,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[p,"Vivo"],[d,m]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[f,[p,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[p,D],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[p,D],[d,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[p,A],[d,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[p,A],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[p,"Lenovo"],[d,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[p,"Nokia"],[d,m]],[/(pixel c)\b/i],[f,[p,N],[d,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[p,N],[d,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[p,j],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[p,j],[d,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[p,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[p,w],[d,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[p,w],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[f,p,[d,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[p,_],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[p,k],[d,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[p,k],[d,m]],[/(nexus 9)/i],[f,[p,"HTC"],[d,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[f,/_/g," "],[d,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[p,"Acer"],[d,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[p,"Meizu"],[d,m]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[p,L],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asu
1s)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,f,[d,m]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,f,[d,b]],[/(surface duo)/i],[f,[p,P],[d,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[p,"Fairphone"],[d,m]],[/(u304aa)/i],[f,[p,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[f,[p,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[f,[p,"RCA"],[d,b]],[/\b(venue[\d ]{2,7}) b/i],[f,[p,"Dell"],[d,b]],[/\b(q(?:mv|ta)\w+) b/i],[f,[p,"Verizon"],[d,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[p,"Barnes & Noble"],[d,b]],[/\b(tm\d{3}\w+) b/i],[f,[p,"NuVision"],[d,b]],[/\b(k88) b/i],[f,[p,"ZTE"],[d,b]],[/\b(nx\d{3}j) b/i],[f,[p,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[f,[p,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[f,[p,"Swiss"],[d,b]],[/\b((zeki)?tb.*\b) b/i],[f,[p,"Zeki"],[d,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],f,[d,b]],[/\b(ns-?\w{0,9}) b/i],[f,[p,"Insignia"],[d,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[p,"NextBook"],[d,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],f,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],f,[d,m]],[/\b(ph-1) /i],[f,[p,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[p,"Envizen"],[d,b]],[/\b(trio[-\w\. ]+) b/i],[f,[p,"MachSpeed"],[d,b]],[/\btu_(1491) b/i],[f,[p,"Rotor"],[d,b]],[/(shield[\w ]+) b/i],[f,[p,"Nvidia"],[d,b]],[/(sprint) (\w+)/i],[p,f,[d,m]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[p,P],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[p,U],[d,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[p,U],[d,m]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,f,[d,y]],[/droid.+; (shield) bui/i],[f,[p,"Nvidia"],[d,y]],[/(playstation [345portablevi]+)/i],[f,[p,j],[d,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[p,P],[d,y]],[/smart-tv.+(samsung)/i],[p,[d,S]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[p,B],[d,S]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,A],[d,S]],[/(apple) ?tv/i],[p,[f,T+" TV"],[d,S]],[/crkey/i],[[f,O+"cast"],[p,N],[d,S]],[/droid.+aft(\w)( bui|\))/i],[f,[p,w],[d,S]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[p,L],[d,S]],[/(bravia[\w ]+)( bui|\))/i],[f,[p,j],[d,S]],[/(mitv-\w{5}) bui/i],[f,[p,F],[d,S]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[p,G],[f,G],[d,S]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,S]],[/((pebble))app/i],[p,f,[d,E]],[/droid.+; (glass) \d/i],[f,[p,N],[d,E]],[/droid.+; (wt63?0{2,3})\)/i],[f,[p,U],[d,E]],[/(quest( 2)?)/i],[f,[p,q],[d,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[d,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[f,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[d,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[h,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[h,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,v],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[h,[v,K,X]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,"Windows"],[v,K,X]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,"Mac OS"],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,v],[/\(bb(10);/i],[v,[h,_]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[h,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[h,"webOS"]],[/crkey\/([\d\.]+)/i],[v,[h,O+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[h,"Chromium OS"],v],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,v],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[h,v]]},Z=function(e,t){if(i(e)===u&&(t=e,e=a),!(this instanceof Z))return new Z(e,t).getResult();var n=e||(i(o)!==c&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),r=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(Y,t):Y;return this.getBrowser=function(){var e,t={};return t[h]=a,t[v]=a,z.call(t,n,r.browser),t.major=i(e=t.version)===l?e.replace(/[^\d\.]/g,"").split(".")[0]:a,t},this.getCPU=function(){var e={};return e[g]=a,z.call(e,n,r.cpu),e},this.getDevice=function(){var e={};return e[p]=a,e[f]=a,e[d]=a,z.call(e,n,r.device),e},this.getEngine=function(){var e={};return e[h]=a,e[v]=a,z.call(e,n,r.engine),e},this.getOS=function(){var e={};return e[h]=a,e[v]=a,z.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=i(e)===l&&e.length>350?G(e,350):e,this},this.setUA(n),this};Z.VERSION="1.0.33",Z.BROWSER=H([h,v,"major"]),Z.CPU=H([g]),Z.DEVICE=H([f,p,d,y,m,S,b,E,C]),Z.ENGINE=Z.OS=H([h,v]),i(t)!==c?(i(e)!==c&&e.exports&&(t=e.exports=Z),t.UAParser=Z):i(n.amdD)===s&&n.amdO?(r=(function(){return Z}).call(t,n,t,e))===a||(e.exports=r):i(o)!==c&&(o.UAParser=Z);var $=i(o)!==c&&(o.jQuery||o.Zepto);if($&&!$.ua){var J=new Z;$.ua=J.getResult(),$.ua.get=function(){return J.getUA()},$.ua.set=function(e){J.setUA(e);var t=J.getResult();for(var n in t)$.ua[n]=t[n]}}}("object"===("undefined"==typeof window?"undefined":i(window))?window:this)},9592(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},9697(e,t,n){var r=n(73738),i=n(54756),o=n(29293),a=n(34579),s=n(17383),c=n(28452),u=n(63072),l=n(29511),f=n(53344),h=n(42958);function d(e,t,n){return t=u(t),c(e,p()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var v=n(215),g=n(21076),y=n(87092),m=y.isReadable,b=y.isWritable,S=y.isIterable,E=y.isNodeStream,C=y.isReadableNodeStream,w=y.isWritableNodeStream,T=y.isDuplexNodeStream,k=y.isReadableStream,_=y.isWritableStream,R=n(79625),O=n(4258),I=O.AbortError,N=O.codes,x=N.ERR_INVALID_ARG_TYPE,A=N.ERR_INVALID_RETURN_VALUE,P=n(14515).destroyer,D=n(98547),M=n(801),B=n(79969),L=n(60765).createDeferredPromise,j=n(62705),F=window.Blob||g.Blob,U=void 0!==F?function(e){return e instanceof F}:function(e){return!1},q=window.AbortController||n(47063).AbortController,H=n(16477).FunctionPrototypeCall,W=function(e){"use strict";function t(e){var n;return s(this,t),n=d(this,t,[e]),!1===(null==e?void 0:e.readable)&&(n._readableState.readable=!1,n._readableState.ended=!0,n._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(n._writableState.writable=!1,n._writableState.ending=!0,n._writableState.ended=!0,n._writableState.finished=!0),n}return l(t,e),a(t)}(D);function V(e){var t,n,r,i,o,a=e.readable&&"function"!=typeof e.readable.read?M.wrap(e.readable):e.readable,s=e.writable,c=!!m(a),u=!!b(s);function l(e){var t=i;i=null,t?t(e):e&&o.destroy(e)}return o=new W({readableObjectMode:!(null==a||!a.readableObjectMode),writableObjectMode:!(null==s||!s.writableObjectMode),readable:c,writable:u}),u&&(R(s,function(e){u=!1,e&&P(a,e),l(e)}),o._write=function(e,n,r){s.write(e,n)?r():t=r},o._final=function(e){s.end(),n=e},s.on("drain",function(){if(t){var e=t;t=null,e()}}),s.on("finish",function(){if(n){var e=n;n=null,e()}})),c&&(R(a,function(e){c=!1,e&&P(a,e),l(e)}),a.on("readable",function(){if(r){var e=r;r=null,e()}}),a.on("end",function(){o.push(null)}),o._read=function(){for(;;){var e=a.read();if(null===e)return void(r=o._read);if(!o.push(e))return}}),o._destroy=function(e,o){e||null===i||(e=new I),r=null,t=null,n=null,null===i?o(e):(i=o,P(s,e),P(a,e))},o}e.exports=function e(t,n){if(T(t))return t;if(C(t))return V({readable:t});if(w(t))return V({writable:t});if(E(t))return V({writable:!1,readable:!1});if(k(t))return V({readable:M.fromWeb(t)});if(_(t))return V({writable:B.fromWeb(t)});if("function"==typeof t){var a=function(e){var t=L(),n=t.promise,r=t.resolve,o=new q,a=o.signal;return{value:e(h(i.mark(function e(){var t,o,s,c,u,l;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n,n=null,e.next=1,f(t);case 1:if(s=(o=e.sent).chunk,c=o.done,u=o.cb,v.nextTick(u),!c){e.next=2;break}return e.abrupt("return");case 2:if(!a.aborted){e.next=3;break}throw new I(void 0,{cause:a.reason});
1case 3:return n=(l=L()).promise,r=l.resolve,e.next=4,s;case 4:e.next=0;break;case 5:case"end":return e.stop()}},e)}))(),{signal:a}),write:function(e,t,n){var i=r;r=null,i({chunk:e,done:!1,cb:n})},final:function(e){var t=r;r=null,t({done:!0,cb:e})},destroy:function(e,t){o.abort(),t(e)}}}(t),s=a.value,c=a.write,u=a.final,l=a.destroy;if(S(s))return j(W,s,{objectMode:!0,write:c,final:u,destroy:l});var d=null==s?void 0:s.then;if("function"==typeof d){var p,g=H(d,s,function(e){if(null!=e)throw new A("nully","body",e)},function(e){P(p,e)});return p=new W({objectMode:!0,readable:!1,write:c,final:function(e){u(o(i.mark(function t(){var n;return i.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=1,g;case 1:v.nextTick(e,null),t.next=3;break;case 2:t.prev=2,n=t.catch(0),v.nextTick(e,n);case 3:case"end":return t.stop()}},t,null,[[0,2]])})))},destroy:l})}throw new A("Iterable, AsyncIterable or AsyncFunction",n,s)}if(U(t))return e(t.arrayBuffer());if(S(t))return j(W,t,{objectMode:!0,writable:!1});if(k(null==t?void 0:t.readable)&&_(null==t?void 0:t.writable))return W.fromWeb(t);if("object"===r(null==t?void 0:t.writable)||"object"===r(null==t?void 0:t.readable))return V({readable:null!=t&&t.readable?C(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?w(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});var y,m=null==t?void 0:t.then;if("function"==typeof m)return H(m,t,function(e){null!=e&&y.push(e),y.push(null)},function(e){P(y,e)}),y=new W({objectMode:!0,writable:!1,read:function(){}});throw new x(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},10061(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},10147(e,t,n){var r,i=n(6365);function o(){if(void 0!==r)return r;if(i.XMLHttpRequest){r=new i.XMLHttpRequest;try{r.open("GET",i.XDomainRequest?"/":"https://example.com")}catch(e){r=null}}else r=null;return r}function a(e){var t=o();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function s(e){return"function"==typeof e}t.fetch=s(i.fetch)&&s(i.ReadableStream),t.writableStream=s(i.WritableStream),t.abortController=s(i.AbortController),t.arraybuffer=t.fetch||a("arraybuffer"),t.msstream=!t.fetch&&a("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&a("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!o()&&s(o().overrideMimeType),r=null},10761(e){e.exports=function(e){return e.split("")}},10838(e,t,n){var r=n(17383),i=n(34579),o=n(93579).buildOptions,a=n(67087),s=n(54700).prettify,c=n(1131);e.exports=function(){return i(function e(t){r(this,e),this.externalEntities={},this.options=o(t)},[{key:"parse",value:function(e,t){if("string"==typeof e);else{if(!e.toString)throw Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});var n=c.validate(e,t);if(!0!==n)throw Error("".concat(n.err.msg,":").concat(n.err.line,":").concat(n.err.col))}var r=new a(this.options);r.addExternalEntities(this.externalEntities);var i=r.parseXml(e);return this.options.preserveOrder||void 0===i?i:s(i,this.options)}},{key:"addEntity",value:function(e,t){if(-1!==t.indexOf("&"))throw Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}])}()},10925(e,t,n){"use strict";e.exports=o;var r=n(13964);(o.prototype=Object.create(r.prototype)).constructor=o;var i=n(86823);function o(e){r.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},10972(e,t,n){"use strict";var r=n(16477),i=r.MathFloor,o=r.NumberIsInteger,a=n(16964).validateInteger,s=n(4258).co
1des.ERR_INVALID_ARG_VALUE,c=16384,u=16;function l(e){return e?u:c}e.exports={getHighWaterMark:function(e,t,n,r){var a=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,r,n);if(null!=a){if(!o(a)||a<0)throw new s(r?"options.".concat(n):"options.highWaterMark",a);return i(a)}return l(e.objectMode)},getDefaultHighWaterMark:l,setDefaultHighWaterMark:function(e,t){a(t,"value",0),e?u=t:c=t}}},11160(e,t,n){var r=n(80848);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=+(n.size!=i),this}},11244(e,t,n){var r=n(78477),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},11326(e,t,n){"use strict";var r=n(43693),i=n(54756),o=n(17383),a=n(34579);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var u=n(16477),l=u.StringPrototypeSlice,f=u.SymbolIterator,h=u.TypedArrayPrototypeSet,d=u.Uint8Array,p=n(21076).Buffer,v=n(60765).inspect;e.exports=function(){return a(function e(){o(this,e),this.head=null,this.tail=null,this.length=0},[{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,n=""+t.data;null!==(t=t.next);)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return p.alloc(0);for(var t=p.allocUnsafe(e>>>0),n=this.head,r=0;n;)h(t,n.data,r),r+=n.data.length,n=n.next;return t}},{key:"consume",value:function(e,t){var n=this.head.data;if(e<n.length){var r=n.slice(0,e);return this.head.data=n.slice(e),r}return e===n.length?this.shift():t?this._getString(e):this._getBuffer(e)}},{key:"first",value:function(){return this.head.data}},{key:f,value:i.mark(function e(){var t;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=3;break}return e.next=2,t.data;case 2:t=t.next,e.next=1;break;case 3:case"end":return e.stop()}},e,this)})},{key:"_getString",value:function(e){var t="",n=this.head,r=0;do{var i=n.data;if(!(e>i.length)){e===i.length?(t+=i,++r,n.next?this.head=n.next:this.head=this.tail=null):(t+=l(i,0,e),this.head=n,n.data=l(i,e));break}t+=i,e-=i.length,++r}while(null!==(n=n.next));return this.length-=r,t}},{key:"_getBuffer",value:function(e){var t=p.allocUnsafe(e),n=e,r=this.head,i=0;do{var o=r.data;if(!(e>o.length)){e===o.length?(h(t,o,n-e),++i,r.next?this.head=r.next:this.head=this.tail=null):(h(t,new d(o.buffer,o.byteOffset,e),n-e),this.head=r,r.data=o.slice(e));break}h(t,o,n-e),e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}},{key:Symbol.for("nodejs.util.inspect.custom"),value:function(e,t){return v(this,c(c({},t),{},{depth:0,customInspect:!1}))}}])}()},11349(e,t,n){var r=n(512),i=n(4034),o=n(70681),a=n(80642),s=n(64802),c=n(57794),u=n(48193),l=n(49366),f="[object Arguments]",h="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,g,y){var m=c(e),b=c(t),S=m?h:s(e),E=b?h:s(t),C=(S=S==f?d:S)==d,w=(E=E==f?d:E)==d,T=S==E;if(T&&u(e)){if(!u(t))return!1;m=!0,C=!1}if(T&&!C)return y||(y=new r),m||l(e)?i(e,t,n,v,g,y):o(e,t,S,n,v,g,y);if(!(1&n)){var k=C&&p.call(e,"__wrapped__"),_=w&&p.call(t,"__wrapped__");
1if(k||_){var R=k?e.value():e,O=_?t.value():t;return y||(y=new r),g(R,O,n,v,y)}}return!!T&&(y||(y=new r),a(e,t,n,v,g,y))}},11603(e,t,n){var r,i=n(17026),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},11675(e,t,n){e.exports=n(90431)(n(18090),"DataView")},11725(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),!e||/[\s<>]/.test(e)||0===e.indexOf("mailto:")||(t=(0,a.default)(t,u)).validate_length&&e.length>=2083||!t.allow_fragments&&e.includes("#")||!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;if((g=(e=(g=(e=(g=e.split("#")).shift()).split("?")).shift()).split("://")).length>1){if(n=g.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(n))return!1}else{if(t.require_protocol)return!1;if("//"===e.substr(0,2)){if(!t.allow_protocol_relative_urls)return!1;g[0]=e.substr(2)}}if(""===(e=g.join("://")))return!1;if(""===(e=(g=e.split("/")).shift())&&!t.require_host)return!0;if((g=e.split("@")).length>1){if(t.disallow_auth||""===g[0]||(s=g.shift()).indexOf(":")>=0&&s.split(":").length>2)return!1;var n,s,f,d,p,v,g,y,m,b,S=(b=2,function(e){if(Array.isArray(e))return e}(m=s.split(":"))||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(m,b)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(m,b)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),E=S[0],C=S[1];if(""===E&&""===C)return!1}d=g.join("@"),v=null,y=null;var w=d.match(l);if(w?(f="",y=w[1],v=w[2]||null):(f=(g=d.split(":")).shift(),g.length&&(v=g.join(":"))),null!==v&&v.length>0){if(p=parseInt(v,10),!/^[0-9]+$/.test(v)||p<=0||p>65535)return!1}else if(t.require_port)return!1;return t.host_whitelist?h(f,t.host_whitelist):!(!((0,o.default)(f)||(0,i.default)(f,t)||y&&(0,o.default)(y,6))||(f=f||y,t.host_blacklist&&h(f,t.host_blacklist)))};var r=s(n(38494)),i=s(n(98861)),o=s(n(4471)),a=s(n(17473));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},l=/^\[([^\]]+)\](?::([0-9]+))?$/;function f(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(e===r||f(r)&&r.test(e))return!0}return!1}e.exports=t.default,e.exports.default=t.default},11791(e,t,n){var r=n(25172),i=n(75546);e.exports=function e(t,n){var o;function a(e,i,o,s){try{var c=t[e](i),u=c.value;return u instanceof r?n.resolve(u.v).then(function(e){a("next",e,o,s)},function(e){a("throw",e,o,s)}):n.resolve(u).then(function(e){c.value=e,o(c)},function(e){return a("throw",e,o,s)})}catch(e){s(e)}}this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,r){function i(){return new n(function(t,n){a(e,r,t,n)})}return o=o?o.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},12036(e,t,n){var r=n(23350);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},12311(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},12347(e,t,n){"use strict";t.decode=t.parse=n(23589),t.encode=t.stringify=n(6269)},12475(e){e.exports=function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},12782(e,t,n){var r=n(83733),i=n(99301),o=n(11244),a=n(91752),s=n(48552);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},13138(e,t,n){"use strict";var r=n(73738);e.exports={format:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.replace(/%([sdifj])/g,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];t[0];var o=t[1],a=n.shift();if("f"===o)return a.toFixed(6);if("j"===o)return JSON.stringify(a);if("s"===o&&"object"===r(a)){var s=a.constructor!==Object?a.constructor.name:"";return"".concat(s," {}").trim()}return a.toString()})},inspect:function(e){switch(r(e)){case"string":if(e.includes("'")){
1if(!e.includes('"'))return'"'.concat(e,'"');if(!e.includes("`")&&!e.includes("${"))return"`".concat(e,"`")}return"'".concat(e,"'");case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return"".concat(String(e),"n");case"boolean":case"undefined":return String(e);case"object":return"{}"}}}},13230(e){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return -1}},13259(e,t,n){var r=n(23527),i=n(22983);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},13708(e,t,n){e.exports=n(21337)(n(97478))},13727(e){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},13789(e,t,n){var r=n(71259),i=n(12311);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},13964(e,t,n){"use strict";e.exports=c;var r,i=n(86823),o=i.LongBits,a=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},f=function(){return i.Buffer?function(e){return(c.create=function(e){return i.Buffer.isBuffer(e)?new r(e):l(e)})(e)}:l};function h(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw s(this,8);return new o(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}c.create=f(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=(u=0xffffffff,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return u;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return d(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|d(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,n);if(t===n){var r=i.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do if(this.pos>=this.len)throw s(this);while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){r=e,c.create=f(),r._configure();var t=i.Long?"toLong":"toNumber";i.merge(c.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},14306(e){e.exports=function(e){return this.__data__.has(e)}},14348(e,t,n){var r=n(55416),i=n(61110),o=n(41846),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];
1for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},14515(e,t,n){"use strict";var r=n(215),i=n(4258),o=i.aggregateTwoErrors,a=i.codes.ERR_MULTIPLE_CALLBACK,s=i.AbortError,c=n(16477).Symbol,u=n(87092),l=u.kIsDestroyed,f=u.isDestroyed,h=u.isFinished,d=u.isServerRequest,p=c("kDestroy"),v=c("kConstruct");function g(e,t,n){e&&(e.stack,t&&!t.errored&&(t.errored=e),n&&!n.errored&&(n.errored=e))}function y(e,t,n){var i=!1;function o(t){if(!i){i=!0;var o=e._readableState,a=e._writableState;g(t,a,o),a&&(a.closed=!0),o&&(o.closed=!0),"function"==typeof n&&n(t),t?r.nextTick(m,e,t):r.nextTick(b,e)}}try{e._destroy(t||null,o)}catch(e){o(e)}}function m(e,t){S(e,t),b(e)}function b(e){var t=e._readableState,n=e._writableState;n&&(n.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=n&&n.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function S(e,t){var n=e._readableState,r=e._writableState;null!=r&&r.errorEmitted||null!=n&&n.errorEmitted||(r&&(r.errorEmitted=!0),n&&(n.errorEmitted=!0),e.emit("error",t))}function E(e,t,n){var i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),n?r.nextTick(S,e,t):S(e,t))}function C(e){var t=!1;
1function n(n){if(t)E(e,null!=n?n:new a);else{t=!0;var i=e._readableState,o=e._writableState,s=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),s.destroyed?e.emit(p,n):n?E(e,n,!0):r.nextTick(w,e)}}try{e._construct(function(e){r.nextTick(n,e)})}catch(e){r.nextTick(n,e)}}function w(e){e.emit(v)}function T(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function k(e){e.emit("close")}function _(e,t){e.emit("error",t),r.nextTick(k,e)}e.exports={construct:function(e,t){if("function"==typeof e._construct){var n=e._readableState,i=e._writableState;n&&(n.constructed=!1),i&&(i.constructed=!1),e.once(v,t),e.listenerCount(v)>1||r.nextTick(C,e)}},destroyer:function(e,t){e&&!f(e)&&(t||h(e)||(t=new s),d(e)?(e.socket=null,e.destroy(t)):T(e)?e.abort():T(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?r.nextTick(_,e,t):r.nextTick(k,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){var n=this._readableState,r=this._writableState,i=r||n;return null!=r&&r.destroyed||null!=n&&n.destroyed?"function"==typeof t&&t():(g(e,r,n),r&&(r.destroyed=!0),n&&(n.destroyed=!0),i.constructed?y(this,e,t):this.once(p,function(n){y(this,o(n,e),t)})),this},undestroy:function(){var e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:E}},14624(e,t,n){"use strict";var r=n(73738),i={};function o(e,t,n){n||(n=Error);var r=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);r.prototype.name=n.name,r.prototype.code=e,i[e]=r}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"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,n){var i,o,s,c;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))c="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var u=!function(e,t,n){return"number"!=typeof n&&(n=0),!(n+1>e.length)&&-1!==e.indexOf(".",n)}(e,".")?"argument":"property";c='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return c+". Received type ".concat(r(n))},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.F=i},14703(e,t,n){var r=n(63063),i=n(46431);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},15053(e,t,n){"use strict";var r=n(64883),i=n(53),o=n(22535),a=n(91831),s=n(40734),c=n(18725),u=n(95897),l=n(5999),f=n(87558),h=n(84226),d=n(26307),p=n(65156);e.exports=function(e){return new Promise(function(t,n){var v,g=e.data,y=e.headers,m=e.responseType,b=e.withXSRFToken;function S(){e.cancelToken&&e.cancelToken.unsubscribe(v),e.signal&&e.signal.removeEventListener("abort",v)}r.isFormData(g)&&r.isStandardBrowserEnv()&&delete y["Content-Type"];var E=new XMLHttpRequest;e.auth&&(y.Authorization="Basic "+btoa((e.auth.username||"")+":"+(e.auth.password?unescape(encodeURIComponent(e.auth.password)):"")));var C=s(e.baseURL,e.url,e.allowAbsoluteUrls);function w(){if(E){var r="getAllResponseHeaders"in E?c(E.getAllResponseHeaders()):null;i(function(e){t(e),S()},function(e){n(e),S()},{data:m&&"text"!==m&&"json"!==m?E.response:E.responseText,status:E.status,statusText:E.statusText,headers:r,config:e,request:E}),E=null}}if(E.open(e.method.toUpperCase(),a(C,e.params,e.paramsSerializer),!0),E.timeout=e.timeout,"onloadend"in E?E.onloadend=w:E.onreadystatechange=function(){E&&4===E.readyState&&(0!==E.status||E.responseURL&&0===E.responseURL.indexOf("file:"))&&setTimeout(w)},E.onabort=function(){E&&(n(new f("Request aborted",f.ECONNABORTED,e,E)),E=null)},E.onerror=function(){n(new f("Network Error",f.ERR_NETWORK,e,E)),E=null},E.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||l;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new f(t,r.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,e,E)),E=null},r.isStandardBrowserEnv()&&(b&&r.isFunction(b)&&(b=b(e)),b||!1!==b&&u(C))){var T=e.xsrfHeaderName&&e.xsrfCookieName&&o.read(e.xsrfCookieName);T&&(y[e.xsrfHeaderName]=T)}"setRequestHeader"in E&&r.forEach(y,function(e,t){void 0===g&&"content-type"===t.toLowerCase()?delete y[t]:E.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(E.withCredentials=!!e.withCredentials),m&&"json"!==m&&(E.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&E.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&E.upload&&E.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(v=function(t){E&&(n(!t||t.type?new h(null,e,E):t),E.abort(),E=null)},e.cancelToken&&e.cancelToken.subscribe(v),e.signal&&(e.signal.aborted?v():e.signal.addEventListener("abort",v))),g||!1===g||0===g||""===g||(g=null);var k=d(C);k&&-1===p.protocols.indexOf(k)?n(new f("Unsupported protocol "+k+":",f.ERR_BAD_REQUEST,e)):E.send(g)})}},15135(e,t,n){var r=n(73738),i=n(63063),o=n(46431);e.exports=function(e){return"symbol"==r(e)||o(e)&&"[object Symbol]"==i(e)}}
1,15246(e,t,n){"use strict";var r=n(82412);function i(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function o(e,t){this._pairs=[],e&&r(e,this,t)}var a=o.prototype;a.append=function(e,t){this._pairs.push([e,t])},a.toString=function(e){var t=e?function(t){return e.call(this,t,i)}:i;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")},e.exports=o},15282(e,t,n){var r=n(52581),i=n(85160),o=n(39022),a=o&&o.isMap;e.exports=a?i(a):r},15406(e,t,n){"use strict";var r,i=n(73738),o=n(16477).SymbolDispose,a=n(4258),s=a.AbortError,c=a.codes,u=n(87092),l=u.isNodeStream,f=u.isWebStream,h=u.kControllerErrorFunction,d=n(79625),p=c.ERR_INVALID_ARG_TYPE;e.exports.addAbortSignal=function(t,n){if(function(e,t){if("object"!==i(e)||!("aborted"in e))throw new p(t,"AbortSignal",e)}(t,"signal"),!l(n)&&!f(n))throw new p("stream",["ReadableStream","WritableStream","Stream"],n);return e.exports.addAbortSignalNoValidate(t,n)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!==i(e)||!("aborted"in e))return t;var a=l(t)?function(){t.destroy(new s(void 0,{cause:e.reason}))}:function(){t[h](new s(void 0,{cause:e.reason}))};return e.aborted?a():d(t,(r=r||n(60765).addAbortListener)(e,a)[o]),t}},15549(e,t,n){"use strict";var r=n(34165),i=n(478),o=r.Readable.destroy;e.exports=r.Readable,e.exports._uint8ArrayToBuffer=r._uint8ArrayToBuffer,e.exports._isUint8Array=r._isUint8Array,e.exports.isDisturbed=r.isDisturbed,e.exports.isErrored=r.isErrored,e.exports.isReadable=r.isReadable,e.exports.Readable=r.Readable,e.exports.Writable=r.Writable,e.exports.Duplex=r.Duplex,e.exports.Transform=r.Transform,e.exports.PassThrough=r.PassThrough,e.exports.addAbortSignal=r.addAbortSignal,e.exports.finished=r.finished,e.exports.destroy=r.destroy,e.exports.destroy=o,e.exports.pipeline=r.pipeline,e.exports.compose=r.compose,Object.defineProperty(r,"promises",{configurable:!0,enumerable:!0,get:function(){return i}}),e.exports.Stream=r.Stream,e.exports.default=e.exports},16230(e,t,n){var r=n(50634);e.exports=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?r(e,void 0,t):[]}},16262(e,t,n){"use strict";var r=n(215),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=l;var o=n(93956),a=n(65252);n(64939)(l,o);for(var s=i(a.prototype),c=0;c<s.length;c++){var u=s[c];l.prototype[u]||(l.prototype[u]=a.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);o.call(this,e),a.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",f)))}function f(){this._writableState.ended||r.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.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)}})},16477(e,t,n){"use strict";var r=n(73738),i=n(34579),o=n(17383),a=n(28452),s=n(63072),c=n(29511);function u(e,t,n){return t=s(t),a(e,l()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}e.exports={AggregateError:function(e){function t(e){var n;if(o(this,t),!Array.isArray(e))throw TypeError("Expected input to be an Array, got ".concat(r(e)));for(var i="",a=0;a<e.length;a++)i+=" ".concat(e[a].stack,"\n");return(n=u(this,t,[i])).name="AggregateError",n.errors=e,n}return c(t,e),i(t)}(n(61837)(Error)),ArrayIsArray:function(e){return Array.isArray(e)},ArrayPrototypeIncludes:function(e,t){return e.includes(t)},ArrayPrototypeIndexOf:function(e,t){return e.indexOf(t)},ArrayPrototypeJoin:function(e,t){return e.join(t)},ArrayPrototypeMap:function(e,t){return e.map(t)},ArrayPrototypePop:function(e,t){return e.pop(t)},ArrayPrototypePush:function(e,t){return e.push(t)},ArrayPrototypeSlice:function(e,t,n){return e.slice(t,n)},Error,FunctionPrototypeCall:function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.call.apply(e,[t].concat(r))},FunctionPrototypeSymbolHasInstance:function(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:function(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty:function(e,t,n){return Object.defineProperty(e,t,n)},ObjectGetOwnPropertyDescriptor:function(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys:function(e){return Object.keys(e)},ObjectSetPrototypeOf:function(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch:function(e,t){return e.catch(t)},PromisePrototypeThen:function(e,t,n){return e.then(t,n)},PromiseReject:function(e){return Promise.reject(e)},PromiseResolve:function(e){return Promise.resolve(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest:function(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice:function(e,t,n){return e.slice(t,n)},StringPrototypeToLowerCase:function(e){return e.toLowerCase()},StringPrototypeToUpperCase:function(e){return e.toUpperCase()},StringPrototypeTrim:function(e){return e.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:function(e,t,n){return e.set(t,n)},Boolean,Uint8Array}},16667(e,t,n){var r=n(39019),i=n(72479),o=n(38096),a=n(8007),s=n(23527),c=n(36660),u=n(35548);e.exports=function(e,t){return a(e)&&s(t)?c(u(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},16964(e,t,n){"use strict";var r=n(73738),i=n(16477),o=i.ArrayIsArray,a=i.ArrayPrototypeIncludes,s=i.ArrayPrototypeJoin,c=i.ArrayPrototypeMap,u=i.NumberIsInteger,l=i.NumberIsNaN,f=i.NumberMAX_SAFE_INTEGER,h=i.NumberMIN_SAFE_INTEGER,d=i.NumberParseInt,p=i.ObjectPrototypeHasOwnProperty,v=i.RegExpPrototypeExec,g=i.String,y=i.StringPrototypeToUpperCase,m=i.StringPrototypeTrim,b=n(4258),S=b.hideStackFrames,E=b.codes,C=E.ERR_SOCKET_BAD_PORT,w=E.ERR_INVALID_ARG_TYPE,T=E.ERR_INVALID_ARG_VALUE,k=E.ERR_OUT_OF_RANGE,_=E.ERR_UNKNOWN_SIGNAL,R=n(60765).normalizeEncoding,O=n(60765).types,I=O.isAsyncFunction,N=O.isArrayBufferView,x={},A=/^[0-7]+$/,P=S(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f;if("number"!=typeof e)throw new w(t,"number",e);if(!u(e))throw new k(t,"an integer",e);if(e<n||e>r)throw new k(t,">= ".concat(n," && <= ").concat(r),e)}),D=S(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-0x80000000,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0x7fffffff;if("number"!=typeof e)throw new w(t,"number",e);if(!u(e))throw new k(t,"an integer",e);if(e<n||e>r)throw new k(t,">= ".concat(n," && <= ").concat(r),e)}),M=S(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"!=typeof e)throw new w(t,"number",e);if(!u(e))throw new k(t,"an integer",e);var r=+!!n,i=0xffffffff;if(e<r||e>i)throw new k(t,">= ".concat(r," && <= ").concat(i),e)});function B(e,t){if("string"!=typeof e)throw new w(t,"string",e)}var L=S(function(e,t,n){if(!a(n,e))throw new T(t,e,"must be one of: "+s(c(n,function(e){return"string"==typeof e?"'".concat(e,"'"):g(e)}),", "))});function j(e,t){if("boolean"!=typeof e)throw new w(t,"boolean",e)}function F(e,t,n){return null!=e&&p(e,t)?e[t]:n}var U=S(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=F(n,"allowArray",!1),a=F(n,"allowFunction",!1);if(!F(n,"nullable",!1)&&null===e||!i&&o(e)||"object"!==r(e)&&(!a||"function"!=typeof e))throw new w(t,"Object",e)}),q=S(function(e,t){if(null!=e&&"object"!==r(e)&&"function"!=typeof e)throw new w(t,"a dictionary",e)}),H=S(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!o(e))throw new w(t,"Array",e);if(e.length<n)throw new T(t,e,"must be longer than ".concat(n))}),W=S(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"buffer";if(!N(e))throw new w(t,["Buffer","TypedArray","DataView"],e)}),V=S(function(e,t){if(void 0!==e&&(null===e||"object"!==r(e)||!("aborted"in e)))throw new w(t,"AbortSignal",e)}),G=S(function(e,t){if("function"!=typeof e)throw new w(t,"Function",e)}),z=S(function(e,t){if("function"!=typeof e||I(e))throw new w(t,"Function",e)}),K=S(function(e,t){if(void 0!==e)throw new w(t,"undefined",e)}),X=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Y(e,t){if(void 0===e||!v(X,e))throw new T(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,n){if(void 0===e&&(e=n),"string"==typeof e){if(null===v(A,e))throw new T(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return M(e,t),e},validateArray:H,validateStringArray:function(e,t){H(e,t);for(var n=0;n<e.length;n++)B(e[n],"".concat(t,"[").concat(n,"]"))},validateBooleanArray:function(e,t){H(e,t);for(var n=0;n<e.length;n++)j(e[n],"".concat(t,"[").concat(n,"]"))},validateAbortSignalArray:function(e,t){H(e,t);for(var n=0;n<e.length;n++){var r=e[n],i="".concat(t,"[").concat(n,"]");if(null==r)throw new w(i,"AbortSignal",r);
1V(r,i)}},validateBoolean:j,validateBuffer:W,validateDictionary:q,validateEncoding:function(e,t){var n=R(t),r=e.length;if("hex"===n&&r%2!=0)throw new T("encoding",t,"is invalid for data of length ".concat(r))},validateFunction:G,validateInt32:D,validateInteger:P,validateNumber:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("number"!=typeof e)throw new w(t,"number",e);if(null!=n&&e<n||null!=r&&e>r||(null!=n||null!=r)&&l(e))throw new k(t,"".concat(null!=n?">= ".concat(n):"").concat(null!=n&&null!=r?" && ":"").concat(null!=r?"<= ".concat(r):""),e)},validateObject:U,validateOneOf:L,validatePlainFunction:z,validatePort:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Port",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===m(e).length||+e!=+e>>>0||e>65535||0===e&&!n)throw new C(t,e,n);return 0|e},validateSignalName:function(e){if(B(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"signal"),void 0===x[e]){if(void 0!==x[y(e)])throw new _(e+" (signals must use all capital letters)");throw new _(e)}},validateString:B,validateUint32:M,validateUndefined:K,validateUnion:function(e,t,n){if(!a(n,e))throw new w(t,"('".concat(s(n,"|"),"')"),e)},validateAbortSignal:V,validateLinkHeaderValue:function(e){if("string"==typeof e)return Y(e,"hints"),e;if(o(e)){var t=e.length,n="";if(0===t)return n;for(var r=0;r<t;r++){var i=e[r];Y(i,"hints"),n+=i,r!==t-1&&(n+=", ")}return n}throw new T("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},16993(e,t,n){var r=n(75546);function i(){var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function c(e,i,o,a){var s=Object.create((i&&i.prototype instanceof l?i:l).prototype);return r(s,"_invoke",function(e,r,i){var o,a,s,c=0,l=i||[],f=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,u}};function d(e,r){for(a=e,s=r,n=0;!f&&c&&!i&&n<l.length;n++){var i,o=l[n],d=h.p,p=o[2];e>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=e<2&&d<o[1])?(a=0,h.v=r,h.n=o[1]):d<p&&(i=e<3||o[0]>r||r>p)&&(o[4]=e,o[5]=r,h.n=p,a=0))}if(i||e>1)return u;throw f=!0,r}return function(i,l,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,p),a=l,s=p;(n=a<2?t:s)||!f;){o||(a?a<3?(a>1&&(h.n=-1),d(a,s)):h.n=s:h.v=s);try{if(c=2,o){if(a||(i="next"),n=o[i]){if(!(n=n.call(o,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=o.return)&&n.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((n=(f=h.n<0)?s:e.call(r,h))!==u)break}catch(e){o=t,a=1,s=e}finally{c=1}}return{value:n,done:f}}}(e,o,a),!0),s}var u={};function l(){}function f(){}function h(){}n=Object.getPrototypeOf;var d=h.prototype=l.prototype=Object.create([][a]?n(n([][a]())):(r(n={},a,function(){return this}),n));function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,r(e,s,"GeneratorFunction")),e.prototype=Object.create(d),e}return f.prototype=h,r(d,"constructor",h),r(h,"constructor",f),f.displayName="GeneratorFunction",r(h,s,"GeneratorFunction"),r(d),r(d,s,"Generator"),r(d,a,function(){return this}),r(d,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:c,m:p}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},17026(e,t,n){e.exports=n(18090)["__core-js_shared__"]},17116(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},17122(e,t,n){var r=n(70079);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},17383(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},17461(e,t,n){var r=n(80848);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=+!!t,t}},17473(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var n in t)void 0===e[n]&&(e[n]=t[n]);return e},e.exports=t.default,e.exports.default=t.default},17889(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},18090(e,t,n){var r=n(73738),i=n(51683),o="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self;e.exports=i||o||Function("return this")()},18120(e,t,n){e.exports=n(6645)(n(61985))},18408(e,t,n){var r=n(42376),i=n(97395),o=n(37790),a=n(43463);e.exports=function(e,t,n){return t=(n?i(e,t,n):void 0===t)?1:o(t),r(a(e),t)}},18725(e,t,n){"use strict";var r=n(64883),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e&&r.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=r.trim(e.slice(0,o)).toLowerCase(),n=r.trim(e.slice(o+1)),t&&(a[t]&&i.indexOf(t)>=0||(a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n))}),a}},18850(e,t,n){"use strict";var r=n(64883),i=n(91831),o=n(144),a=n(73651),s=n(19678),c=n(40734),u=n(6246),l=u.validators;function f(e){this.defaults=e,this.interceptors={request:new o,response:new o}}f.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:l.transitional(l.boolean),forcedJSONParsing:l.transitional(l.boolean),clarifyTimeoutError:l.transitional(l.boolean)},!1);var i=t.paramsSerializer;null!=i&&(r.isFunction(i)?t.paramsSerializer={serialize:i}:u.assertOptions(i,{encode:l.function,serialize:l.function},!0));var o=[],c=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});var f,h=[];if(this.interceptors.response.forEach(function(e){h.push(e.fulfilled,e.rejected)}),!c){var d=[a,void 0];for(Array.prototype.unshift.apply(d,o),d=d.concat(h),f=Promise.resolve(t);d.length;)f=f.then(d.shift(),d.shift());return f}for(var p=t;o.length;){var v=o.shift(),g=o.shift();try{p=v(p)}catch(e){g(e);break}}try{f=a(p)}catch(e){return Promise.reject(e)}for(;h.length;)f=f.then(h.shift(),h.shift());return f},f.prototype.getUri=function(e){return i(c((e=s(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],function(e){f.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}}),r.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}f.prototype[e]=t(),f.prototype[e+"Form"]=t(!0)}),e.exports=f},18893(e,t,n){var r=n(10061),i=n(19734);e.exports=function e(t,n,o,a,s){var c=-1,u=t.length;for(o||(o=i),s||(s=[]);++c<u;){var l=t[c];n>0&&o(l)?n>1?e(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},19004(e,t,n){var r=n(63063),i=n(60852),o=n(46431),a=Object.prototype,s=Function.prototype.toString,c=a.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},19678(e,t,n){"use strict";var r=n(64883);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isEmptyObject(t)?r.merge({},e):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function c(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=u[e]||o,i=t(e);r.isUndefined(i)&&t!==c||(n[e]=i)}),n}},19718(e,t,n){"use strict";var r=n(15246);e.exports="undefined"!=typeof URLSearchParams?URLSearchParams:r},19734(e,t,n){var r=n(7502),i=n(25327),o=n(57794),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},20028(e){"use strict";e.exports=function(e,t){for(var n=Array(arguments.length-1),r=0,i=2,o=!0;i<arguments.length;)n[r++]=arguments[i++];return new Promise(function(i,a){n[r]=function(e){if(o)if(o=!1,e)a(e);else{for(var t=Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];i.apply(null,t)}};try{e.apply(t||null,n)}catch(e){o&&(o=!1,a(e))}})}},20437(e){e.exports=function(){throw Error("Readable.from is not available in the browser")}},20650(e,t,n){var r=n(50634);e.exports=function(e){return e&&e.length?r(e):[]}},21076(e,t,n){"use strict";var r=n(17383),i=n(34579),o=n(28452),a=n(63072),s=n(29511),c=n(73738);function u(e,t,n){return t=a(t),o(e,l()?Reflect.construct(t,n||[],a(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}var f=n(55883),h=n(88122),d="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=g,t.SlowBuffer=function(e){return+e!=e&&(e=0),g.alloc(+e)},t.INSPECT_MAX_BYTES=50;var p=0x7fffffff;function v(e){if(e>
vendor: 9,259 bytes, line 1
1p)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,g.prototype),t}function g(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return b(e)}return y(e,t,n)}function y(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!g.isEncoding(t))throw TypeError("Unknown encoding: "+t);var n=0|w(e,t),r=v(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(er(e,Uint8Array)){var t=new Uint8Array(e);return E(t.buffer,t.byteOffset,t.byteLength)}return S(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(e));if(er(e,ArrayBuffer)||e&&er(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(er(e,SharedArrayBuffer)||e&&er(e.buffer,SharedArrayBuffer)))return E(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return g.from(r,t,n);var i=function(e){if(g.isBuffer(e)){var t=0|C(e.length),n=v(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||ei(e.length)?v(0):S(e):"Buffer"===e.type&&Array.isArray(e.data)?S(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return g.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(e))}function m(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function b(e){return m(e),v(e<0?0:0|C(e))}function S(e){for(var t=e.length<0?0:0|C(e.length),n=v(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function E(e,t,n){var r;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),g.prototype),r}function C(e){if(e>=p)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|e}function w(e,t){if(g.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||er(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+c(e));var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return ee(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return et(e).length;default:if(i)return r?-1:ee(e).length;t=(""+t).toLowerCase(),i=!0}}function T(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return B(this,t,n);case"latin1":case"binary":return L(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(r)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function k(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _(e,t,n,r,i){if(0===e.length)return -1;if("string"==typeof n?(r=n,n=0):n>0x7fffffff?n=0x7fffffff:n<-0x80000000&&(n=-0x80000000),ei(n*=1)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return -1;n=e.length-1}else if(n<0){if(!i)return -1;n=0}if("string"==typeof t&&(t=g.from(t,r)),g.isBuffer(t))return 0===t.length?-1:R(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):R(e,[t],n,r,i);throw TypeError("val must be string, number or Buffer")}function R(e,t,n,r,i){var o,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;o<s;o++)if(u(e,o)===u(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*a}else -1!==l&&(o-=o-l),l=-1}else for(n+c>s&&(n=s-c),o=n;o>=0;o--){for(var f=!0,h=0;h<c;h++)if(u(e,o+h)!==u(t,h)){f=!1;break}if(f)return o}return -1}function O(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o,a=t.length;for(r>a/2&&(r=a/2),o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(ei(s))break;e[n+o]=s}return o}function I(e,t,n,r){return en(ee(t,e.length-n),e,n,r)}function N(e,t,n,r){return en(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return en(et(t),e,n,r)}function A(e,t,n,r){return en(function(e,t){for(var n,r,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i.push(n%256),i.push(r);return i}(t,e.length-n),e,n,r)}function P(e,t,n){return 0===t&&n===e.length?f.fromByteArray(e):f.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var c=void 0,u=void 0,l=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(c=e[i+1]))&&(f=(31&o)<<6|63&c)>127&&(a=f);break;case 3:c=e[i+1],u=e[i+2],128==(192&c)&&128==(192&u)&&(f=(15&o)<<12|(63&c)<<6|63&u)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:c=e[i+1],u=e[i+2],l=e[i+3],128==(192&c)&&128==(192&u)&&128==(192&l)&&(f=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=M));return n}(r)}t.kMaxLength=0x7fffffff,g.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),g.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(g.prototype,"parent",{enumerable:!0,get:function(){if(g.isBuffer(this))return this.buffer}}),Object.defineProperty(g.prototype,"offset",{enumerable:!0,get:function(){if(g.isBuffer(this))return this.byteOffset}}),g.poolSize=8192,g.from=function(e,t,n){return y(e,t,n)},Object.setPrototypeOf(g.prototype,Uint8Array.prototype),Object.setPrototypeOf(g,Uint8Array),g.alloc=function(e,t,n){return function(e,t,n){return m(e),e<=0?v(e):void 0!==t?"string"==typeof n?v(e).fill(t,n):v(e).fill(t):v(e)}(e,t,n)},g.allocUnsafe=function(e){return b(e)},g.allocUnsafeSlow=function(e){return b(e)},g.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==g.prototype},g.compare=function(e,t){if(er(e,Uint8Array)&&(e=g.from(e,e.offset,e.byteLength)),er(t,Uint8Array)&&(t=g.from(t,t.offset,t.byteLength)),!g.isBuffer(e)||!g.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},g.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}},g.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return g.alloc(0);if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var n,r=g.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(er(o,Uint8Array))i+o.length>r.length?(g.isBuffer(o)||(o=g.from(o)),o.copy(r,i)):Uint8Array.prototype.set.call(r,o,i);else{if(!g.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},g.byteLength=w,g.prototype._isBuffer=!0,g.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)k(this,t,t+1);return this},g.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)k(this,t,t+3),k(this,t+1,t+2);return this},g.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)k(this,t,t+7),k(this,t+1,t+6),k(this,t+2,t+5),k(this,t+3,t+4);return this},g.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?D(this,0,e):T.apply(this,arguments)}
vendor: 12,015 bytes, line 1
1,g.prototype.toLocaleString=g.prototype.toString,g.prototype.equals=function(e){if(!g.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===g.compare(this,e)},g.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},d&&(g.prototype[d]=g.prototype.inspect),g.prototype.compare=function(e,t,n,r,i){if(er(e,Uint8Array)&&(e=g.from(e,e.offset,e.byteLength)),!g.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+c(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return -1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),l=e.slice(t,n),f=0;f<s;++f)if(u[f]!==l[f]){o=u[f],a=l[f];break}return o<a?-1:+(a<o)},g.prototype.includes=function(e,t,n){return -1!==this.indexOf(e,t,n)},g.prototype.indexOf=function(e,t,n){return _(this,e,t,n,!0)},g.prototype.lastIndexOf=function(e,t,n){return _(this,e,t,n,!1)},g.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return O(this,e,t,n);case"utf8":case"utf-8":return I(this,e,t,n);case"ascii":case"latin1":case"binary":return N(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(o)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function B(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function j(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=eo[e[o]];return i}function F(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function U(e,t,n){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>n)throw RangeError("Trying to access beyond buffer length")}function q(e,t,n,r,i,o){if(!g.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(n+r>e.length)throw RangeError("Index out of range")}function H(e,t,n,r,i){Z(t,r,i,e,n,7);var o=Number(t&BigInt(0xffffffff));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;var a=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function W(e,t,n,r,i){Z(t,r,i,e,n,7);var o=Number(t&BigInt(0xffffffff));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;var a=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function V(e,t,n,r,i,o){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function G(e,t,n,r,i){return t*=1,n>>>=0,i||V(e,0,n,4),h.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,i){return t*=1,n>>>=0,i||V(e,0,n,8),h.write(e,t,n,r,52,8),n+8}g.prototype.slice=function(e,t){var n=this.length;(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);var r=this.subarray(e,t);return Object.setPrototypeOf(r,g.prototype),r},g.prototype.readUintLE=g.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||U(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},g.prototype.readUintBE=g.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||U(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},g.prototype.readUint8=g.prototype.readUInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),this[e]},g.prototype.readUint16LE=g.prototype.readUInt16LE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]|this[e+1]<<8},g.prototype.readUint16BE=g.prototype.readUInt16BE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]<<8|this[e+1]},g.prototype.readUint32LE=g.prototype.readUInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},g.prototype.readUint32BE=g.prototype.readUInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},g.prototype.readBigUInt64LE=ea(function(e){$(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var r=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*n;return BigInt(r)+(BigInt(i)<<BigInt(32))}),g.prototype.readBigUInt64BE=ea(function(e){$(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||J(e,this.length-8);var r=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],i=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),g.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||U(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},g.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||U(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},g.prototype.readInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},g.prototype.readInt16LE=function(e,t){e>>>=0,t||U(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?0xffff0000|n:n},g.prototype.readInt16BE=function(e,t){e>>>=0,t||U(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?0xffff0000|n:n},g.prototype.readInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},g.prototype.readInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},g.prototype.readBigInt64LE=ea(function(e){$(e>>>=0,"offset");var t=this[e],n=this[e+7];return void 0!==t&&void 0!==n||J(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+0x1000000*this[++e])}),g.prototype.readBigInt64BE=ea(function(e){$(e>>>=0,"offset");var t=this[e],n=this[e+7];return void 0!==t&&void 0!==n||J(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(0x1000000*this[++e]+65536*this[++e]+256*this[++e]+n)}),g.prototype.readFloatLE=function(e,t){return e>>>=0,t||U(e,4,this.length),h.read(this,e,!0,23,4)},g.prototype.readFloatBE=function(e,t){return e>>>=0,t||U(e,4,this.length),h.read(this,e,!1,23,4)},g.prototype.readDoubleLE=function(e,t){return e>>>=0,t||U(e,8,this.length),h.read(this,e,!0,52,8)},g.prototype.readDoubleBE=function(e,t){return e>>>=0,t||U(e,8,this.length),h.read(this,e,!1,52,8)},g.prototype.writeUintLE=g.prototype.writeUIntLE=function(e,t,n,r){e*=1,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},g.prototype.writeUintBE=g.prototype.writeUIntBE=function(e,t,n,r){e*=1,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},g.prototype.writeUint8=g.prototype.writeUInt8=function(e,t,n){return e*=1,t>>>=0,n||q(this,e,t,1,255,0),this[t]=255&e,t+1},g.prototype.writeUint16LE=g.prototype.writeUInt16LE=function(e,t,n){return e*=1,t>>>=0,n||q(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},g.prototype.writeUint16BE=g.prototype.writeUInt16BE=function(e,t,n){return e*=1,t>>>=0,n||q(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},g.prototype.writeUint32LE=g.prototype.writeUInt32LE=function(e,t,n){return e*=1,t>>>=0,n||q(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},g.prototype.writeUint32BE=g.prototype.writeUInt32BE=function(e,t,n){return e*=1,t>>>=0,n||q(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},g.prototype.writeBigUInt64LE=ea(function(e){return H(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),g.prototype.writeBigUInt64BE=ea(function(e){return W(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),g.prototype.writeIntLE=function(e,t,n,r){if(e*=1,t>>>=0,!r){var i=Math.pow(2,8*n-1);q(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+n},g.prototype.writeIntBE=function(e,t,n,r){if(e*=1,t>>>=0,!r){var i=Math.pow(2,8*n-1);q(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+n},g.prototype.writeInt8=function(e,t,n){return e*=1,t>>>=0,n||q(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},g.prototype.writeInt16LE=function(e,t,n){return e*=1,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},g.prototype.writeInt16BE=function(e,t,n){return e*=1,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},g.prototype.writeInt32LE=function(e,t,n){return e*=1,t>>>=0,n||q(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},g.prototype.writeInt32BE=function(e,t,n){return e*=1,t>>>=0,n||q(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},g.prototype.writeBigInt64LE=ea(function(e){return H(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),g.prototype.writeBigInt64BE=ea(function(e){return W(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),g.prototype.writeFloatLE=function(e,t,n){return G(this,e,t,!0,n)},g.prototype.writeFloatBE=function(e,t,n){return G(this,e,t,!1,n)},g.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},g.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},g.prototype.copy=function(e,t,n,r){if(!g.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},g.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!g.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===r&&o<128||"latin1"===r)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=g.isBuffer(e)?e:g.from(e,r),s=a.length;
vendor: 3,508 bytes, line 1
1if(0===s)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var K={};function X(e,t,n){K[e]=function(n){function o(){var n;return r(this,o),Object.defineProperty(n=u(this,o),"message",{value:t.apply(n,arguments),writable:!0,configurable:!0}),n.name="".concat(n.name," [").concat(e,"]"),n.stack,delete n.name,n}return s(o,n),i(o,[{key:"code",get:function(){return e},set:function(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(e,"]: ").concat(this.message)}}])}(n)}function Y(e){for(var t="",n=e.length,r=+("-"===e[0]);n>=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function Z(e,t,n,r,i,o){if(e>n||e<t){var a,s="bigint"==typeof t?"n":"";throw a=o>3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(o+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(o+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(n).concat(s),new K.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){$(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||J(t,e.length-(n+1))}(r,i,o)}function $(e,t){if("number"!=typeof e)throw new K.ERR_INVALID_ARG_TYPE(t,"number",e)}function J(e,t,n){if(Math.floor(e)!==e)throw $(e,n),new K.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new K.ERR_BUFFER_OUT_OF_BOUNDS;throw new K.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(+!!n," and <= ").concat(t),e)}X("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),X("ERR_INVALID_ARG_TYPE",function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(c(t))},TypeError),X("ERR_OUT_OF_RANGE",function(e,t,n){var r='The value of "'.concat(e,'" is out of range.'),i=n;return Number.isInteger(n)&&Math.abs(n)>0x100000000?i=Y(String(n)):"bigint"==typeof n&&(i=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(i=Y(i)),i+="n"),r+=" It must be ".concat(t,". Received ").concat(i)},RangeError);var Q=/[^+/0-9A-Za-z-_]/g;function ee(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319||a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function et(e){return f.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function en(e,t,n,r){var i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function er(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function ei(e){return e!=e}var eo=function(){for(var e="0123456789abcdef",t=Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}();function ea(e){return"undefined"==typeof BigInt?es:e}function es(){throw Error("BigInt not supported")}}
1,21207(e,t,n){e=n.nmd(e);var r=n(73738),i=n(18090),o="object"==r(t)&&t&&!t.nodeType&&t,a=o&&"object"==r(e)&&e&&!e.nodeType&&e,s=a&&a.exports===o?i.Buffer:void 0,c=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);return e.copy(r),r}},21260(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}},21337(e,t,n){var r=n(36458),i=n(13789),o=n(22983);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!i(t)){var c=r(n,3);t=o(t),n=function(e){return c(s[e],e,s)}}var u=e(t,n,a);return u>-1?s[c?t[u]:u]:void 0}}},21375(e,t,n){"use strict";var r=n(93848),i=n(44102),o=n(63659),a=n(66254),s=n(92483),c=n(67091),u=n(4181),l=u.validators;function f(e){this.defaults=e,this.interceptors={request:new o,response:new o}}f.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:l.transitional(l.boolean),forcedJSONParsing:l.transitional(l.boolean),clarifyTimeoutError:l.transitional(l.boolean)},!1);var i=t.paramsSerializer;null!=i&&(r.isFunction(i)?t.paramsSerializer={serialize:i}:u.assertOptions(i,{encode:l.function,serialize:l.function},!0));var o=[],c=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});var f,h=[];if(this.interceptors.response.forEach(function(e){h.push(e.fulfilled,e.rejected)}),!c){var d=[a,void 0];for(Array.prototype.unshift.apply(d,o),d=d.concat(h),f=Promise.resolve(t);d.length;)f=f.then(d.shift(),d.shift());return f}for(var p=t;o.length;){var v=o.shift(),g=o.shift();try{p=v(p)}catch(e){g(e);break}}try{f=a(p)}catch(e){return Promise.reject(e)}for(;h.length;)f=f.then(h.shift(),h.shift());return f},f.prototype.getUri=function(e){return i(c((e=s(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],function(e){f.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}}),r.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}f.prototype[e]=t(),f.prototype[e+"Form"]=t(!0)}),e.exports=f},21379(e){function t(e,a,s,c){for(var u="",l=!1,f=0;f<e.length;f++){var h=e[f],d=n(h);if(void 0!==d){var p="";if(p=0===s.length?d:"".concat(s,".").concat(d),d!==a.textNodeName)if(d!==a.cdataPropName)if(d!==a.commentPropName)if("?"!==d[0]){var v=c;""!==v&&(v+=a.indentBy);var g=r(h[":@"],a),y=c+"<".concat(d).concat(g),m=t(h[d],a,p,v);-1!==a.unpairedTags.indexOf(d)?a.suppressUnpairedNode?u+=y+">":u+=y+"/>":m&&0!==m.length||!a.suppressEmptyNode?m&&m.endsWith(">")?u+=y+">".concat(m).concat(c,"</").concat(d,">"):(u+=y+">",m&&""!==c&&(m.includes("/>")||m.includes("</"))?u+=c+a.indentBy+m+c:u+=m,u+="</".concat(d,">")):u+=y+"/>",l=!0}else{var b=r(h[":@"],a),S="?xml"===d?"":c,E=h[d][0][a.textNodeName];E=0!==E.length?" "+E:"",u+=S+"<".concat(d).concat(E).concat(b,"?>"),l=!0}else u+=c+"\x3c!--".concat(h[d][0][a.textNodeName],"--\x3e"),l=!0;else l&&(u+=c),u+="<![CDATA[".concat(h[d][0][a.textNodeName],"]]>"),l=!1;else{var C=h[d];i(p,a)||(C=o(C=a.tagValueProcessor(d,C),a)),l&&(u+=c),u+=C,l=!1}}}return u}function n(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var r=t[n];if(e.hasOwnProperty(r)&&":@"!==r)return r}}function r(e,t){var n="";if(e&&!t.ignoreAttributes){for(var r in e)if(e.hasOwnProperty(r)){var i=t.attributeValueProcessor(r,e[r]);!0===(i=o(i,t))&&t.suppressBooleanAttributes?n+=" ".concat(r.substr(t.attributeNamePrefix.length)):n+=" ".concat(r.substr(t.attributeNamePrefix.length),'="').concat(i,'"')}}return n}function i(e,t){var n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(var r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]==="*."+n)return!0;return!1}function o(e,t){if(e&&e.length>0&&t.processEntities)for(var n=0;n<t.entities.length;n++){var r=t.entities[n];e=e.replace(r.regex,r.val)}return e}e.exports=function(e,n){var r="";return n.format&&n.indentBy.length>0&&(r="\n"),t(e,n,"",r)}},22050(e){e.exports=function(e){return e!=e}},22517(e,t,n){"use strict";var r=n(43693);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?i(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var a=n(16477),s=a.ObjectSetPrototypeOf,c=a.Symbol;e.exports=d;var u=n(4258).codes.ERR_METHOD_NOT_IMPLEMENTED,l=n(98547),f=n(10972).getHighWaterMark;s(d.prototype,l.prototype),s(d,l);var h=c("kCallback");function d(e){if(!(this instanceof d))return new d(e);var t=e?f(this,e,"readableHighWaterMark",!0):null;0===t&&(e=o(o({},e),{},{highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0})),l.call(this,e),this._readableState.sync=!1,this[h]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",v)}function p(e){var t=this;"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(function(n,r){n?e?e(n):t.destroy(n):(null!=r&&t.push(r),t.push(null),e&&e())})}
1function v(){this._final!==p&&p.call(this)}d.prototype._final=p,d.prototype._transform=function(e,t,n){throw new u("_transform()")},d.prototype._write=function(e,t,n){var r=this,i=this._readableState,o=this._writableState,a=i.length;this._transform(e,t,function(e,t){e?n(e):(null!=t&&r.push(t),o.ended||a===i.length||i.length<i.highWaterMark?n():r[h]=n)})},d.prototype._read=function(){if(this[h]){var e=this[h];this[h]=null,e()}}},22535(e,t,n){"use strict";var r=n(64883);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},22802(e,t,n){var r=n(55218),i=n(85160),o=n(39022),a=o&&o.isRegExp;e.exports=a?i(a):r},22983(e,t,n){var r=n(27018),i=n(36615),o=n(13789);e.exports=function(e){return o(e)?r(e):i(e)}},23350(e,t,n){var r=n(42563);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},23527(e,t,n){var r=n(55416);e.exports=function(e){return e==e&&!r(e)}},23589(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,i){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(n);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var u=0;u<c;++u){var l,f,h,d,p=e[u].replace(a,"%20"),v=p.indexOf(r);v>=0?(l=p.substr(0,v),f=p.substr(v+1)):(l=p,f=""),h=decodeURIComponent(l),d=decodeURIComponent(f),t(o,h)?Array.isArray(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o}},23822(e){"use strict";e.exports={}},23832(e,t,n){var r=n(18090).isFinite;e.exports=function(e){return"number"==typeof e&&r(e)}},23889(e,t,n){var r=n(36620),i=n(90380);e.exports=function(e,t){return e&&r(t,i(t),e)}},23898(e,t,n){var r=n(91059),i=n(78874),o=n(55686),a=n(51482),s=n(36620),c=n(77215),u=n(73051),l=n(74334);e.exports=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,function(t){return t=a(t,e),u||(u=t.length>1),t}),s(e,l(e),n),u&&(n=i(n,7,c));for(var f=t.length;f--;)o(n,t[f]);return n})},24027(e,t,n){var r=n(79498),i=n(51482),o=n(68804),a=n(55416),s=n(35548);e.exports=function(e,t,n,c){if(!a(e))return e;for(var u=-1,l=(t=i(t,e)).length,f=l-1,h=e;null!=h&&++u<l;){var d=s(t[u]),p=n;if("__proto__"===d||"constructor"===d||"prototype"===d)break;if(u!=f){var v=h[d];void 0===(p=c?c(v,d,h):void 0)&&(p=a(v)?v:o(t[u+1])?[]:{})}r(h,d,p),h=h[d]}return e}},24717(e,t,n){"use strict";e.exports=n(88422)},25172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},25327(e,t,n){var r=n(14703),i=n(46431),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable;e.exports=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")}},25455(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},25829(e,t,n){var r=n(6365),i=n(94920),o=n(37522),a=n(96023),s=n(5261),c=n(86174),u=t;u.request=function(e,t){e="string"==typeof e?c.parse(e):a(e);var n=-1===r.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||n,s=e.hostname||e.host,u=e.port,l=e.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?o+"//"+s:"")+(u?":"+u:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new i(e);return t&&f.on("response",t),f},u.get=function(e,t){var n=u.request(e,t);return n.end(),n},u.ClientRequest=i,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.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"]},26307(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},26584(e,t,n){"use strict";e.exports=i;var r=n(86823);function i(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!n}(i.prototype=Object.create(r.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,n,i,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return r.asPromise(e,s,t,n,i,o);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,n){if(e)return s.emit("error",e,t),a(e);if(null!==n){if(!(n instanceof i))try{n=i[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",n,t),a(null,n)}s.end(!0)})}catch(e){return s.emit("error",e,t),void setTimeout(function(){a(e)},0)}setTimeout(function(){a(Error("already ended"))},0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit
1("end").off()),this}},26708(e){"use strict";e.exports=FormData},26822(e,t,n){"use strict";var r=n(93033);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},27018(e,t,n){var r=n(36773),i=n(25327),o=n(57794),a=n(48193),s=n(68804),c=n(49366),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),l=!n&&i(e),f=!n&&!l&&a(e),h=!n&&!l&&!f&&c(e),d=n||l||f||h,p=d?r(e.length,String):[],v=p.length;for(var g in e)!t&&!u.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||p.push(g);return p}},27550(e){function t(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e.exports=t=function(){return!!n},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},27792(e,t,n){var r=n(6365);function i(e){try{if(!r.localStorage)return!1}catch(e){return!1}var t=r.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(i("noDeprecation"))return e;var n=!1;return function(){if(!n){if(i("throwDeprecation"))throw Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},28436(e,t,n){"use strict";var r=n(87632).Buffer,i=r.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 o(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&&(r.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){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!==n?n: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 c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}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 n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?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-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){var t,n;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.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}},28452(e,t,n){var r=n(73738).default,i=n(12475);e.exports=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports}
1,28965(e,t,n){var r=n(76808);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},29088(e,t,n){var r=n(53056),i=n(97395),o=n(31001),a=parseFloat,s=Math.min,c=Math.random;e.exports=function(e,t,n){if(n&&"boolean"!=typeof n&&i(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=o(e),void 0===t?(t=e,e=0):t=o(t)),e>t){var u=e;e=t,t=u}if(n||e%1||t%1){var l=c();return s(e+l*(t-e+a("1e-"+((l+"").length-1))),t)}return r(e,t)}},29293(e){function t(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise(function(i,o){var a=e.apply(n,r);function s(e){t(a,i,o,s,c,"next",e)}function c(e){t(a,i,o,s,c,"throw",e)}s(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},29511(e,t,n){var r=n(95636);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},29657(e,t,n){var r=n(3223);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},30282(e){e.exports=function(e){return this.__data__.has(e)}},30579(e,t,n){var r=n(73738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},31001(e,t,n){var r=n(64983),i=1/0;e.exports=function(e){return e?(e=r(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},31060(e,t,n){var r=n(5708),i=n(69067),o=n(9592);e.exports=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i},31414(e,t,n){var r=n(63063),i=n(12311),o=n(46431),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},32284(e,t,n){var r=n(35751),i=n(69573),o=n(45134),a=RegExp("['â]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}},33413(e,t,n){var r=n(12782),i=n(83118),o=n(55470);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},34055(e,t,n){"use strict";e.exports={isBrowser:!0,classes:{URLSearchParams:n(73123),FormData:n(26708),Blob},protocols:["http","https","file","blob","url","data"]}},34058(e,t,n){var r=n(78874),i=n(81834);e.exports=function(e){return i(r(e,1))}},34163(e,t,n){var r=n(64802),i=n(46431);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},34165(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e}
1,f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var o=n(21076).Buffer,a=n(16477),s=a.ObjectDefineProperty,c=a.ObjectKeys,u=a.ReflectApply,l=n(60765).promisify.custom,f=n(99976),h=f.streamReturningOperators,d=f.promiseReturningOperators,p=n(4258).codes.ERR_ILLEGAL_CONSTRUCTOR,v=n(90557),g=n(10972),y=g.setDefaultHighWaterMark,m=g.getDefaultHighWaterMark,b=n(37195).pipeline,S=n(14515).destroyer,E=n(79625),C=n(478),w=n(87092),T=e.exports=n(76978).Stream;T.isDestroyed=w.isDestroyed,T.isDisturbed=w.isDisturbed,T.isErrored=w.isErrored,T.isReadable=w.isReadable,T.isWritable=w.isWritable,T.Readable=n(801);var k,_=r(c(h));try{var R=function(){var e=k.value,t=h[e];function n(){if(this instanceof n?this.constructor:void 0)throw p();for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];return T.Readable.from(u(t,this,r))}s(n,"name",{__proto__:null,value:t.name}),s(n,"length",{__proto__:null,value:t.length}),s(T.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})};for(_.s();!(k=_.n()).done;)R()}catch(e){_.e(e)}finally{_.f()}var O,I=r(c(d));try{var N=function(){var e=O.value,t=d[e];function n(){if(this instanceof n?this.constructor:void 0)throw p();for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];return u(t,this,r)}s(n,"name",{__proto__:null,value:t.name}),s(n,"length",{__proto__:null,value:t.length}),s(T.Readable.prototype,e,{__proto__:null,value:n,enumerable:!1,configurable:!0,writable:!0})};for(I.s();!(O=I.n()).done;)N()}catch(e){I.e(e)}finally{I.f()}T.Writable=n(79969),T.Duplex=n(98547),T.Transform=n(22517),T.PassThrough=n(68479),T.pipeline=b,T.addAbortSignal=n(15406).addAbortSignal,T.finished=E,T.destroy=S,T.compose=v,T.setDefaultHighWaterMark=y,T.getDefaultHighWaterMark=m,s(T,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:function(){return C}}),s(b,l,{__proto__:null,enumerable:!0,get:function(){return C.pipeline}}),s(E,l,{__proto__:null,enumerable:!0,get:function(){return C.finished}}),T.Stream=T,T._isUint8Array=function(e){return e instanceof Uint8Array},T._uint8ArrayToBuffer=function(e){return o.from(e.buffer,e.byteOffset,e.byteLength)}},34174(e,t,n){var r=n(36615),i=n(64802),o=n(25327),a=n(57794),s=n(13789),c=n(48193),u=n(61110),l=n(49366),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},34579(e,t,n){var r=n(77736);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}e.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},35548(e,t,n){var r=n(15135);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},35751(e){e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}}
1,36458(e,t,n){var r=n(73738),i=n(81834),o=n(16667),a=n(63361),s=n(57794),c=n(71422);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==r(e)?s(e)?o(e[0],e[1]):i(e):c(e)}},36598(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},36615(e,t,n){var r=n(61110),i=n(57381),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},36620(e,t,n){var r=n(79498),i=n(28965);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,c=t.length;++s<c;){var u=t[s],l=o?o(n[u],e[u],u,n,e):void 0;void 0===l&&(l=e[u]),a?i(n,u,l):r(n,u,l)}return n}},36660(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},36734(e,t,n){var r=n(33413),i=n(17461),o=n(38556),a=n(92600),s=n(11160);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},36773(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},37184(e,t,n){var r=n(51322);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},37195(e,t,n){var r=n(29293),i=n(54756),o=n(42958),a=n(53344),s=n(93513);function c(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new u(t.call(e));n="@@asyncIterator",r="@@iterator"}throw TypeError("Object is not async iterable")}function u(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(u=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new u(e)}var l,f,h,d=n(215),p=n(16477),v=p.ArrayIsArray,g=p.Promise,y=p.SymbolAsyncIterator,m=p.SymbolDispose,b=n(79625),S=n(60765).once,E=n(14515),C=n(98547),w=n(4258),T=w.aggregateTwoErrors,k=w.codes,_=k.ERR_INVALID_ARG_TYPE,R=k.ERR_INVALID_RETURN_VALUE,O=k.ERR_MISSING_ARGS,I=k.ERR_STREAM_DESTROYED,N=k.ERR_STREAM_PREMATURE_CLOSE,x=w.AbortError,A=n(16964),P=A.validateFunction,D=A.validateAbortSignal,M=n(87092),B=M.isIterable,L=M.isReadable,j=M.isReadableNodeStream,F=M.isNodeStream,U=M.isTransformStream,q=M.isWebStream,H=M.isReadableStream,W=M.isReadableFinished,V=window.AbortController||n(47063).AbortController;function G(e,t,n){var r=!1;return e.on("close",function(){r=!0}),{destroy:function(t){r||(r=!0,E.destroyer(e,t||new I("pipe")))},cleanup:b(e,{readable:t,writable:n},function(e){r=!e})}}function z(e){if(B(e))return e;if(j(e))return function(e){return K.apply(this,arguments)}(e);throw new _("val",["Readable","Iterable","AsyncIterable"],e)}function K(){return(K=o(i.mark(function e(t){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f||(f=n(801)),e.delegateYield(s(c(f.prototype[y].call(t)),a),"t0",1);case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function X(e,t,n,r){return Y.apply(this,arguments)}function Y(){return(Y=r(i.mark(function e(t,n,r,o){var a,s,u,l,f,h,d,p,v,y,m,S,E,C;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=o.end,u=null,l=function(e){if(e&&(s=e),u){var t=u;u=null,t()}},f=function(){return new g(function(e,t){s?t(s):u=function(){s?t(s):e()}})},n.on("drain",l),h=b(n,{readable:!1},l),e.prev=1,!n.writableNeedDrain){e.next=2;break}return e.next=2,f();case 2:d=!1,p=!1,e.prev=3,y=c(t);case 4:return e.next=5,y.next();case 5:if(!(d=!(m=e.sent).done)){e.next=7;break}if(S=m.value,n.write(S)){e.next=6;break}return e.next=6,f();case 6:d=!1,e.next=4;break;case 7:e.next=9;break;case 8:e.prev=8,E=e.catch(3),p=!0,v=E;case 9:if(e.prev=9,e.prev=10,!d||null==y.return){e.next=11;break}return e.next=11,y.return();case 11:if(e.prev=11,!p){e.next=12;break}throw v;case 12:return e.finish(11);case 13:return e.finish(9);case 14:if(!a){e.next=15;break}return n.end(),e.next=15,f();case 15:r(),e.next=17;break;case 16:e.prev=16,C=e.catch(1),r(s!==C?T(s,C):C);case 17:return e.prev=17,h(),n.off("drain",l),e.finish(17);case 18:case"end":return e.stop()}},e,null,[[1,16,17,18],[3,8,9,14],[10,,11,13]])}))).apply(this,arguments)}function Z(e,t,n,r){return $.apply(this,arguments)}function $(){return($=r(i.mark(function e(t,n,r,o){var a,s,u,l,f,h,d,p,v,g;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=o.end,U(n)&&(n=n.writable),s=n.getWriter(),e.prev=1,u=!1,l=!1,e.prev=2,h=c(t);case 3:return e.next=4,h.next();case 4:if(!(u=!(d=e.sent).done)){e.next=7;break}return p=d.value,e.next=5,s.ready;case 5:s.write(p).catch(function(){});case 6:u=!1,e.next=3;break;case 7:e.next=9;break;case 8:e.prev=8,v=e.catch(2),l=!0,f=v;case 9:if(e.prev=9,e.prev=10,!u||null==h.return){e.next=11;break}return e.next=11,h.return();case 11:if(e.prev=11,!l){e.next=12;break}throw f;case 12:return e.finish(11);case 13:return e.finish(9);case 14:return e.next=15,s.ready;case 15:if(!a){e.next=16;break}return e.next=16,s.close();case 16:r(),e.next=21;break;case 17:return e.prev=17,g=e.catch(1),e.prev=18,e.next=19,s.abort(g);case 19:r(g),e.next=21;break;case 20:e.prev=20,r(e.catch(18));case 21:case"end":return e.stop()}},e,null,[[1,17],[2,8,9,14],[10,,11,13],[18,20]])}))).apply(this,arguments)}function J(e,t,r){if(1===e.length&&v(e[0])&&(e=e[0]),e.length<2)throw new O("streams");var i,o,a,s=new V,c=s.signal,u=null==r?void 0:r.signal,f=[];function p(){w(new x)}
1D(u,"options.signal"),h=h||n(60765).addAbortListener,u&&(i=h(u,p));var g,y=[],S=0;function E(e){w(e,0==--S)}function w(e,n){var r;if(!e||o&&"ERR_STREAM_PREMATURE_CLOSE"!==o.code||(o=e),o||n){for(;y.length;)y.shift()(o);null==(r=i)||r[m](),s.abort(),n&&(o||f.forEach(function(e){return e()}),d.nextTick(t,o,a))}}for(var T,k,I=function(){var t=e[A],i=A<e.length-1,o=A>0,s=i||!1!==(null==r?void 0:r.end),u=A===e.length-1;if(F(t)){var h=function(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&E(e)};if(s){var p=G(t,i,o),v=p.destroy,m=p.cleanup;y.push(v),L(t)&&u&&f.push(m)}t.on("error",h),L(t)&&u&&f.push(function(){t.removeListener("error",h)})}if(0===A)if("function"==typeof t){if(!B(g=t({signal:c})))throw new R("Iterable, AsyncIterable or Stream","source",g)}else g=B(t)||j(t)||U(t)?t:C.from(t);else if("function"==typeof t)if(g=t(g=U(g)?z(null==(T=g)?void 0:T.readable):z(g),{signal:c}),i){if(!B(g,!0))throw new R("AsyncIterable","transform[".concat(A-1,"]"),g)}else{l||(l=n(68479));var w=new l({objectMode:!0}),O=null==(k=g)?void 0:k.then;if("function"==typeof O)S++,O.call(g,function(e){a=e,null!=e&&w.write(e),s&&w.end(),d.nextTick(E)},function(e){w.destroy(e),d.nextTick(E,e)});else if(B(g,!0))S++,X(g,w,E,{end:s});else{if(!H(g)&&!U(g))throw new R("AsyncIterable or Promise","destination",g);var I=g.readable||g;S++,X(I,w,E,{end:s})}var x=G(g=w,!1,!0),P=x.destroy,D=x.cleanup;y.push(P),u&&f.push(D)}else if(F(t)){if(j(g)){S+=2;var M=function(e,t,n,r){var i=r.end,o=!1;if(t.on("close",function(){o||n(new N)}),e.pipe(t,{end:!1}),i){var a=function(){o=!0,t.end()};W(e)?d.nextTick(a):e.once("end",a)}else n();return b(e,{readable:!0,writable:!1},function(t){var r=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&r&&r.ended&&!r.errored&&!r.errorEmitted?e.once("end",n).once("error",n):n(t)}),b(t,{readable:!1,writable:!0},n)}(g,t,E,{end:s});L(t)&&u&&f.push(M)}else if(U(g)||H(g)){var V=g.readable||g;S++,X(V,t,E,{end:s})}else{if(!B(g))throw new _("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],g);S++,X(g,t,E,{end:s})}g=t}else if(q(t)){if(j(g))S++,Z(z(g),t,E,{end:s});else if(H(g)||B(g))S++,Z(g,t,E,{end:s});else{if(!U(g))throw new _("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],g);S++,Z(g.readable,t,E,{end:s})}g=t}else g=C.from(t)},A=0;A<e.length;A++)I();return(null!=c&&c.aborted||null!=u&&u.aborted)&&d.nextTick(p),g}e.exports={pipelineImpl:J,pipeline:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return J(t,S(function(e){return P(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(t)))}}},37321(e,t,n){var r=n(55686),i=n(68804),o=Array.prototype.splice;e.exports=function(e,t){for(var n=e?t.length:0,a=n-1;n--;){var s=t[n];if(n==a||s!==c){var c=s;i(s)?o.call(e,s,1):r(e,s)}}return e}},37370(e,t,n){"use strict";var r,i=n(73738),o="object"===("undefined"==typeof Reflect?"undefined":i(Reflect))?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=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 c(){c.init.call(this)}e.exports=c,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})})},c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var u=10;function l(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+i(e))}function f(e){return void 0===e._maxListeners?c.defaultMaxListeners:e._maxListeners}function h(e,t,n,r){var i,o,a,s;if(l(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=f(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function v(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):y(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+i(e));e.addEventListener(t,function i(o){r.once&&e.removeEventListener(t,i),n(o)})}}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),c.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},c.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},c.prototype.getMaxListeners=function(){return f(this)},c.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var o,s=Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)a(c,this,t);else{var u=c.length,l=y(c,u);for(n=0;n<u;++n)a(l[n],this,t)}return!0},c.prototype.addListener=function(e,t){return h(this,e,t,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(e,t){return h(this,e,t,!0)},c.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},c.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},c.prototype.removeListener=function(e,t){var n,r,i,o,a;if(l(t),void 0===(r=this._events)||void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit
1("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0==arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},c.prototype.listeners=function(e){return v(this,e,!0)},c.prototype.rawListeners=function(e){return v(this,e,!1)},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},c.prototype.listenerCount=g,c.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},37522(e,t,n){var r=n(215),i=n(21076).Buffer,o=n(6365),a=n(10147),s=n(64939),c=n(83023),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=t.IncomingMessage=function(e,t,n,o){var s=this;if(c.Readable.call(s),s._mode=n,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",function(){r.nextTick(function(){s.emit("close")})}),"fetch"===n){var u=function(){f.read().then(function(e){s._destroyed||(o(e.done),e.done?s.push(null):(s.push(i.from(e.value)),u()))}).catch(function(e){o(!0),s._destroyed||s.emit("error",e)})};if(s._fetchResponse=t,s.url=t.url,s.statusCode=t.status,s.statusMessage=t.statusText,t.headers.forEach(function(e,t){s.headers[t.toLowerCase()]=e,s.rawHeaders.push(t,e)}),a.writableStream){var l=new WritableStream({write:function(e){return o(!1),new Promise(function(t,n){s._destroyed?n():s.push(i.from(e))?t():s._resumeFetch=t})},close:function(){o(!0),s._destroyed||s.push(null)},abort:function(e){o(!0),s._destroyed||s.emit("error",e)}});try{return void t.body.pipeTo(l).catch(function(e){o(!0),s._destroyed||s.emit("error",e)})}catch(e){}}var f=t.body.getReader();u()}else if(s._xhr=e,s._pos=0,s.url=e.responseURL,s.statusCode=e.status,s.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===s.headers[n]&&(s.headers[n]=[]),s.headers[n].push(t[2])):void 0!==s.headers[n]?s.headers[n]+=", "+t[2]:s.headers[n]=t[2],s.rawHeaders.push(t[1],t[2])}}),s._charset="x-user-defined",!a.overrideMimeType){var h=s.rawHeaders["mime-type"];if(h){var d=h.match(/;\s*charset=([^;])(;|$)/);d&&(s._charset=d[1].toLowerCase())}s._charset||(s._charset="utf-8")}};s(l,c.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,r=null;switch(t._mode){case"text":if((r=n.responseText).length>t._pos){var a=r.substr(t._pos);if("x-user-defined"===t._charset){for(var s=i.alloc(a.length),c=0;c<a.length;c++)s[c]=255&a.charCodeAt(c);t.push(s)}else t.push(a,t._charset);t._pos=r.length}break;case"arraybuffer":if(n.readyState!==u.DONE||!n.response)break;r=n.response,t.push(i.from(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=n.response,n.readyState!==u.LOADING||!r)break;t.push(i.from(new Uint8Array(r)));break;case"ms-stream":if(r=n.response,n.readyState!==u.LOADING)break;var l=new o.MSStreamReader;l.onprogress=function(){l.result.byteLength>t._pos&&(t.push(i.from(new Uint8Array(l.result.slice(t._pos)))),t._pos=l.result.byteLength)},l.onload=function(){e(!0),t.push(null)},l.readAsArrayBuffer(r)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},37542(e,t,n){"use strict";var r=n(93848);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}}
1,37790(e,t,n){var r=n(31001);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},37845(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},37902(e,t,n){e.exports=n(43080)},38007(e,t,n){var r=n(89207),i=n(76808),o=n(63361);e.exports=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o},38096(e,t,n){var r=n(97776),i=n(79007);e.exports=function(e,t){return null!=e&&i(e,t,r)}},38177(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},38304(e,t,n){var r=n(78874);e.exports=function(e){return r(e,5)}},38338(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},38494(e,t){"use strict";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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String)){var t=n(e);throw null===e?t="null":"object"===t&&(t=e.constructor.name),TypeError("Expected a string but received a ".concat(t))}},e.exports=t.default,e.exports.default=t.default},38556(e,t,n){var r=n(80848);e.exports=function(e){return r(this,e).get(e)}},38572(e,t,n){var r=n(70495);e.exports=function(e){return function(t){return r(t,e)}}},38597(e,t,n){var r=n(1550),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},38609(e,t,n){e.exports=n(46050)("toUpperCase")},38784(e){e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===n(o[c],c,o))break}return t}}},38917(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},39019(e,t,n){var r=n(11349),i=n(46431);e.exports=function e(t,n,o,a,s){return t===n||(null!=t&&null!=n&&(i(t)||i(n))?r(t,n,o,a,e,s):t!=t&&n!=n)}},39022(e,t,n){e=n.nmd(e);var r=n(73738),i=n(51683),o="object"==r(t)&&t&&!t.nodeType&&t,a=o&&"object"==r(e)&&e&&!e.nodeType&&e,s=a&&a.exports===o&&i.process,c=function(){try{return a&&a.require&&a.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=c},39490(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},40013(e,t,n){var r=n(43696),i=n(49439),o=n(22983);e.exports=function(e){return r(e,o,i)}},40691(e){e.exports=function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}},e.exports.__esModule=!0,e.exports.default=e.exports},40734(e,t,n){"use strict";var r=n(38338),i=n(55083);e.exports=function(e,t,n){var o=!r(t);return e&&(o||!1===n)?i(e,t):t}},40837(e,t,n){"use strict";var r=n(6365),i=n(73738),o=n(96858),a=n(43451),s=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,c=/[\n\r\t]/g,u=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,f=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,h=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(s,"")}var p=[["#","hash"],["?","query"],function(e,t){return y(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],v={hash:1,query:1};function g(e){var t,n=("undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{}).location||{},o={},a=i(e=e||n);if("blob:"===e.protocol)o=new b(unescape(e.pathname),{});else if("string"===a)for(t in o=new b(e,{}),v)delete o[t];else if("object"===a){for(t in e)t in v||(o[t]=e[t]);void 0===o.slashes&&(o.slashes=u.test(e.href))}return o}function y(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function m(e,t){e=(e=d(e)).replace(c,""),t=t||{};var n,r=f.exec(e),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],s=0;return o?a?(n=r[2]+r[3]+r[4],s=r[2].length+r[3].length):(n=r[2]+r[4],s=r[2].length):a?(n=r[3]+r[4],s=r[3].length):n=r[4],"file:"===i?s>=2&&(n=n.slice(2)):y(i)?n=r[4]:i?o&&(n=n.slice(2)):s>=2&&y(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||y(i),slashesCount:s,rest:n}}function b(e,t,n){if(e=(e=d(e)).replace(c,""),!(this instanceof b))return new b(e,t,n);var r,s,u,l,f,v,S=p.slice(),E=i(t),C=this,w=0;for("object"!==E&&"string"!==E&&(n=t,t=null),n&&"function"!=typeof n&&(n=a.parse),r=!(s=m(e||"",t=g(t))).protocol&&!s.slashes,C.slashes=s.slashes||r&&t.slashes,C.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||h.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!y(C.protocol)))&&(S[3]=[/(.*)/,"pathname"]);w<S.length;w++)"function"!=typeof(l=S[w])?(u=l[0],v=l[1],u!=u?C[v]=e:"string"==typeof u?~(f="@"===u?e.lastIndexOf(u):e.indexOf(u))&&("number"==typeof l[2]?(C[v]=e.slice(0,f),e=e.slice(f+l[2])):(C[v]=e.slice(f),e=e.slice(0,f))):(f=u.exec(e))&&(C[v]=f[1],e=e.slice(0,f.index)),C[v]=C[v]||r&&l[3]&&t[v]||"",l[4]&&(C[v]=C[v].toLowerCase())):e=l(e,C);n&&(C.query=n(C.query)),r&&t.slashes&&"/"!==C.pathname.charAt(0)&&(""!==C.pathname||""!==t.pathname)&&(C.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(C.pathname,t.pathname)),"/"!==C.pathname.charAt(0)&&y(C.protocol)&&(C.pathname="/"+C.pathname),o(C.port,C.protocol)||(C.host=C.hostname,C.port=""),C.username=C.password="",C.auth&&(~(f=C.auth.indexOf(":"))?(C.username=C.auth.slice(0,f),C.username=encodeURIComponent(decodeURIComponent(C.username)),C.password=C.auth.slice(f+1),C.password=encodeURIComponent(decodeURIComponent(C.password))):C.username=encodeURIComponent(decodeURIComponent(C.auth)),C.auth=C.password?C.username+":"+C.password:C.username),C.origin="file:"!==C.protocol&&y(C.protocol)&&C.host?C.protocol+"//"+C.host:"null",C.href=C.toString()}b.prototype={set:function(e,t,n){var r=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||a.parse)(t)),r[e]=t;break;case"port":r[e]=t,o(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,l.test(t)?(r.port=(t=t.split(":")).pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";r[e]=t.charAt(0)!==i?i+t:t}else r[e]=t;break;case"username":case"password":r[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(r.username=t.slice(0,s),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=t.slice(s+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<p.length;c++){var u=p[c];u[4]&&(r[u[1]]=r[u[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin="file:"!==r.protocol&&y(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r}
1,toString:function(e){e&&"function"==typeof e||(e=a.stringify);var t,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var s=o+(n.protocol&&n.slashes||y(n.protocol)?"//":"");return n.username?(s+=n.username,n.password&&(s+=":"+n.password),s+="@"):n.password?(s+=":"+n.password,s+="@"):"file:"!==n.protocol&&y(n.protocol)&&!r&&"/"!==n.pathname&&(s+="@"),(":"===r[r.length-1]||l.test(n.hostname)&&!n.port)&&(r+=":"),s+=r+n.pathname,(t="object"===i(n.query)?e(n.query):n.query)&&(s+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(s+=n.hash),s}},b.extractProtocol=m,b.location=g,b.trimLeft=d,b.qs=a,e.exports=b},41036(e){e.exports=function(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}},41084(e,t){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=Array(64),i=Array(123),o=0;o<64;)i[r[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(e,t,n){for(var i,o=null,a=[],s=0,c=0;t<n;){var u=e[t++];switch(c){case 0:a[s++]=r[u>>2],i=(3&u)<<4,c=1;break;case 1:a[s++]=r[i|u>>4],i=(15&u)<<2,c=2;break;case 2:a[s++]=r[i|u>>6],a[s++]=r[63&u],c=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0)}return c&&(a[s++]=r[i],a[s++]=61,1===c&&(a[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var a="invalid encoding";n.decode=function(e,t,n){for(var r,o=n,s=0,c=0;c<e.length;){var u=e.charCodeAt(c++);if(61===u&&s>1)break;if(void 0===(u=i[u]))throw Error(a);switch(s){case 0:r=u,s=1;break;case 1:t[n++]=r<<2|(48&u)>>4,r=u,s=2;break;case 2:t[n++]=(15&r)<<4|(60&u)>>2,r=u,s=3;break;case 3:t[n++]=(3&r)<<6|u,s=0}}if(1===s)throw Error(a);return n-o},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},41132(e,t,n){var r=n(5901),i=n(99291),o=n(17122),a=n(41869);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},41748(e,t,n){var r=n(71259),i=n(11603),o=n(55416),a=n(7774),s=/^\[object .+?Constructor\]$/,c=Object.prototype,u=Function.prototype.toString,l=c.hasOwnProperty,f=RegExp("^"+u.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?f:s).test(a(e))}},41771(e,t,n){"use strict";var r,i=n(215),o=n(73738);function a(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==o(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(56350),c=Symbol("lastResolve"),u=Symbol("lastReject"),l=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),d=Symbol("handlePromise"),p=Symbol("stream");function v(e,t){return{value:e,done:t}}function g(e){var t=e[c];if(null!==t){var n=e[p].read();null!==n&&(e[h]=null,e[c]=null,e[u]=null,t(v(n,!1)))}}function y(e){i.nextTick(g,e)}var m=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((a(r={get stream(){return this[p]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(v(void 0,!0));if(this[p].destroyed)return new Promise(function(t,n){i.nextTick(function(){e[l]?n(e[l]):t(v(void 0,!0))})});var n,r=this[h];if(r)n=new Promise(function(e,t){return function(n,r){e.then(function(){t[f]?n(v(void 0,!0)):t[d](n,r)},r)}}(r,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(v(o,!1));n=new Promise(this[d])}return this[h]=n,n}},Symbol.asyncIterator,function(){return this}),a(r,"return",function(){var e=this;return new Promise(function(t,n){e[p].destroy(null,function(e){e?n(e):t(v(void 0,!0))})})}),r),m);e.exports=function(e){var t,n=Object.create(b,(a(t={},p,{value:e,writable:!0}),a(t,c,{value:null,writable:!0}),a(t,u,{value:null,writable:!0}),a(t,l,{value:null,writable:!0}),a(t,f,{value:e._readableState.endEmitted,writable:!0}),a(t,d,{value:function(e,t){var r=n[p].read();r?(n[h]=null,n[c]=null,n[u]=null,e(v(r,!1))):(n[c]=e,n[u]=t)},writable:!0}),t));
1return n[h]=null,s(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[u];return null!==t&&(n[h]=null,n[c]=null,n[u]=null,t(e)),void(n[l]=e)}var r=n[c];null!==r&&(n[h]=null,n[c]=null,n[u]=null,r(v(void 0,!0))),n[f]=!0}),e.on("readable",y.bind(null,n)),n}},41846(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},41869(e){e.exports=function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},42376(e){var t=Math.floor;e.exports=function(e,n){var r="";if(!e||n<1||n>0x1fffffffffffff)return r;do n%2&&(r+=e),(n=t(n/2))&&(e+=e);while(n);return r}},42545(e,t,n){var r=n(79710),i=n(21207),o=n(62812),a=n(36598),s=n(86768),c=n(25327),u=n(57794),l=n(90290),f=n(48193),h=n(71259),d=n(55416),p=n(19004),v=n(49366),g=n(13727),y=n(74995);e.exports=function(e,t,n,m,b,S,E){var C=g(e,n),w=g(t,n),T=E.get(w);if(T)r(e,n,T);else{var k=S?S(C,w,n+"",e,t,E):void 0,_=void 0===k;if(_){var R=u(w),O=!R&&f(w),I=!R&&!O&&v(w);k=w,R||O||I?u(C)?k=C:l(C)?k=a(C):O?(_=!1,k=i(w,!0)):I?(_=!1,k=o(w,!0)):k=[]:p(w)||c(w)?(k=C,c(C)?k=y(C):d(C)&&!h(C)||(k=s(w))):_=!1}_&&(E.set(w,k),b(k,w,m,S,E),E.delete(w)),r(e,n,k)}}},42563(e,t,n){e.exports=n(18090).Uint8Array},42933(e,t){"use strict";var n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=RegExp("^"+r+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t)for(var r=Object.keys(t),i=r.length,o=0;o<i;o++)e[r[o]]="strict"===n?[t[r[o]]]:t[r[o]]},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(e){return null!=i.exec(e)},t.getAllMatches=function(e,t){for(var n=[],r=t.exec(e);r;){var i=[];i.startIndex=t.lastIndex-r[0].length;for(var o=r.length,a=0;a<o;a++)i.push(r[a]);n.push(i),r=t.exec(e)}return n},t.nameRegexp=r},42958(e,t,n){var r=n(25172);function i(e){var t,n;function i(t,n){try{var a=e[t](n),s=a.value,c=s instanceof r;Promise.resolve(c?s.v:s).then(function(n){if(c){var r="return"===t?"return":"next";if(!s.k||n.done)return i(r,n);n=e[r](n).value}o(a.done?"return":"normal",n)},function(e){i("throw",e)})}catch(e){o("throw",e)}}function o(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(e,r){return new Promise(function(o,a){var s={key:e,arg:r,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,i(e,r))})},"function"!=typeof e.return&&(this.return=void 0)}i.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},i.prototype.next=function(e){return this._invoke("next",e)},i.prototype.throw=function(e){return this._invoke("throw",e)},i.prototype.return=function(e){return this._invoke("return",e)},e.exports=function(e){return function(){return new i(e.apply(this,arguments))}},e.exports.__esModule=!0,e.exports.default=e.exports},43080(e,t,n){"use strict";var r=n(64883),i=n(78549),o=n(18850),a=n(19678),s=n(78357),c=n(80439),u=function e(t){var n=new o(t),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(s);u.Axios=o,u.CanceledError=n(84226),u.CancelToken=n(71026),u.isCancel=n(25455),u.VERSION=n(57608).version,u.toFormData=n(97681),u.AxiosError=n(87558),u.Cancel=u.CanceledError,u.all=function(e){return Promise.all(e)},u.spread=n(37845),u.isAxiosError=n(62778),u.formToJSON=function(e){return c(r.isHTMLForm(e)?new FormData(e):e)},e.exports=u,e.exports.default=u},43204(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},43310(e,t,n){var r=n(18893),i=n(77522),o=n(6645),a=n(97395);e.exports=o(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])})},43451(e,t){"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function i(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){var r,o,a=[];for(o in"string"!=typeof(t=t||"")&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?t+a.join("&"):""}
1,t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,i={};t=n.exec(e);){var o=r(t[1]),a=r(t[2]);null===o||null===a||o in i||(i[o]=a)}return i}},43463(e,t,n){var r=n(75879);e.exports=function(e){return null==e?"":r(e)}},43573(e){e.exports=function(){this.__data__=[],this.size=0}},43693(e,t,n){var r=n(77736);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},43696(e,t,n){var r=n(10061),i=n(57794);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},44102(e,t,n){"use strict";var r=n(93848),i=n(15246);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a));var s,c=n&&n.encode||o,u=n&&n.serialize;return(s=u?u(t,n):r.isURLSearchParams(t)?t.toString():new i(t,n).toString(c))&&(e+=(-1===e.indexOf("?")?"?":"&")+s),e}},44441(e,t,n){"use strict";var r=n(73738);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==r(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===r(t)?t:String(t)}var u=n(21076).Buffer,l=n(59169).inspect,f=l&&l.custom||"inspect";function h(e,t,n){u.prototype.copy.call(e,t,n)}e.exports=function(){var e,t,n;function r(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),this.head=null,this.tail=null,this.length=0}return e=r,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,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),n=this.head,r=0;n;)h(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:f,value:function(e,t){return l(this,o(o({},t),{},{depth:0,customInspect:!1}))}}],s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),r}()},45017(e,t,n){var r=n(7502),i=r?r.prototype:void 0,o=i?i.valueOf
1:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},45134(e,t,n){var r=n(58166),i=n(75929),o=n(43463),a=n(53878);e.exports=function(e,t,n){return e=o(e),void 0===(t=n?void 0:t)?i(e)?a(e):r(e):e.match(t)||[]}},45606(e){e.exports=function(){return[]}},46024(e,t,n){"use strict";var r=n(93848);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},46050(e,t,n){var r=n(98871),i=n(96933),o=n(98417),a=n(43463);e.exports=function(e){return function(t){var n=i(t=a(t))?o(t):void 0,s=n?n[0]:t.charAt(0),c=n?r(n,1).join(""):t.slice(1);return s[e]()+c}}},46431(e,t,n){var r=n(73738);e.exports=function(e){return null!=e&&"object"==r(e)}},46441(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},46480(e){e.exports=function(e){return null==e}},47063(e){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0,n=t.AbortController,r=t.AbortSignal;e.exports=n,e.exports.AbortSignal=r,e.exports.default=n},47312(e){"use strict";e.exports=function(e,t){return function(){return e.apply(t,arguments)}}},47622(e,t,n){var r=n(63063),i=n(57794),o=n(46431);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},47752(e){e.exports=function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},47918(e,t,n){var r=n(77902);e.exports=n(73051)(function(e,t){return null==e?{}:r(e,t)})},48193(e,t,n){e=n.nmd(e);var r=n(73738),i=n(18090),o=n(424),a="object"==r(t)&&t&&!t.nodeType&&t,s=a&&"object"==r(e)&&e&&!e.nodeType&&e,c=s&&s.exports===a?i.Buffer:void 0,u=(c?c.isBuffer:void 0)||o;e.exports=u},48530(e,t,n){"use strict";e.exports=l;var r=n(14624).F,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,c=n(16262);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);c.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",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush(function(t,n){h(e,t,n)})}function h(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}n(64939)(l,c),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,n){n(new i("_transform()"))},l.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.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))},l.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,function(e){t(e)})}},48552(e,t,n){var r=n(78477);e.exports=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},49366(e,t,n){var r=n(31414),i=n(85160),o=n(39022),a=o&&o.isTypedArray;e.exports=a?i(a):r},49439(e,t,n){var r=n(67571),i=n(45606),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;e.exports=a?function(e){return null==e?[]:r(a(e=Object(e)),function(t){return o.call(e,t)})}:i},49995(e,t,n){var r=n(96421);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,c=n.length;++i<s;){var u=r(o[i],a[i]);if(u)return i>=c?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}},50262(e,t,n){var r=n(36620),i=n(49439);e.exports=function(e,t){return r(e,i(e),t)}},50303(e,t,n){var r=n(512),i=n(79710),o=n(65576),a=n(42545),s=n(55416),c=n(90380),u=n(13727);e.exports=function e(t,n,l,f,h){t!==n&&o(n,function(o,c){if(h||(h=new r),s(o))a(t,n,c,l,e,f,h);else{var d=f?f(u(t,c),o,c+"",t,n,h):void 0;void 0===d&&(d=o),i(t,c,d)}},c)}},50634(e,t,n){var r=n(66760),i=n(37184),o=n(91208),a=n(70652),s=n(31060),c=n(9592);e.exports=function(e,t,n){var u=-1,l=i,f=e.length,h=!0,d=[],p=d;if(n)h=!1,l=o;else if(f>=200){var v=t?null:s(e);if(v)return c(v);h=!1,l=a,p=new r}else p=t?[]:d;e:for(;++u<f;){var g=e[u],y=t?t(g):g;if(g=n||0!==g?g:0,h&&y==y){for(var m=p.length;m--;)if(p[m]===y)continue e;t&&p.push(y),d.push(g)}else l(p,y,n)||(p!==d&&p.push(y),d.push(g))}return d}},51189(e,t,n){"use strict";var r=t;function i(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._
1configure(r.BufferReader)}r.build="minimal",r.Writer=n(82120),r.BufferWriter=n(51369),r.Reader=n(13964),r.BufferReader=n(10925),r.util=n(86823),r.rpc=n(8252),r.roots=n(23822),r.configure=i,i()},51322(e,t,n){var r=n(95110),i=n(22050),o=n(13230);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},51369(e,t,n){"use strict";e.exports=o;var r=n(82120);(o.prototype=Object.create(r.prototype)).constructor=o;var i=n(86823);function o(){r.call(this)}function a(e,t,n){e.length<40?i.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},o.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},o._configure()},51482(e,t,n){var r=n(57794),i=n(8007),o=n(67601),a=n(43463);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},51683(e,t,n){var r=n(6365),i=n(73738);e.exports="object"==(void 0===r?"undefined":i(r))&&r&&r.Object===Object&&r},51793(e,t,n){"use strict";var r=n(64883);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},52581(e,t,n){var r=n(64802),i=n(46431);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},53056(e){var t=Math.floor,n=Math.random;e.exports=function(e,r){return e+t(n()*(r-e+1))}},53145(e,t,n){var r,i,o=n(73738);i=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1)?-0x12477ce0^e>>>1:e>>>1,t[n]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),n=function(e){var t=0,n=0,r=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):Array(4096);for(r=0;256!=r;++r)i[r]=e[r];for(r=0;256!=r;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[255&n];var o=[];for(r=1;16!=r;++r)o[r-1]="undefined"!=typeof Int32Array?i.subarray(256*r,256*r+256):i.slice(256*r,256*r+256);return o}(t),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],u=n[6],l=n[7],f=n[8],h=n[9],d=n[10],p=n[11],v=n[12],g=n[13],y=n[14];e.table=t,e.bstr=function(e,n){for(var r=-1^n,i=0,o=e.length;i<o;)r=r>>>8^t[255&(r^e.charCodeAt(i++))];return~r},e.buf=function(e,n){for(var m=-1^n,b=e.length-15,S=0;S<b;)m=y[e[S++]^255&m]^g[e[S++]^m>>8&255]^v[e[S++]^m>>16&255]^p[e[S++]^m>>>24]^d[e[S++]]^h[e[S++]]^f[e[S++]]^l[e[S++]]^u[e[S++]]^c[e[S++]]^s[e[S++]]^a[e[S++]]^o[e[S++]]^i[e[S++]]^r[e[S++]]^t[e[S++]];for(b+=15;S<b;)m=m>>>8^t[255&(m^e[S++])];return~m},e.str=function(e,n){for(var r=-1^n,i=0,o=e.length,a=0,s=0;i<o;)(a=e.charCodeAt(i++))<128?r=r>>>8^t[255&(r^a)]:a<2048?r=(r=r>>>8^t[255&(r^(192|a>>6&31))])>>>8^t[255&(r^(128|63&a))]:a>=55296&&a<57344?(a=64+(1023&a),s=1023&e.charCodeAt(i++),r=(r=(r=(r=r>>>8^t[255&(r^(240|a>>8&7))])>>>8^t[255&(r^(128|a>>2&63))])>>>8^t[255&(r^(128|s>>6&15|(3&a)<<4))])>>>8^t[255&(r^(128|63&s))]):r=(r=(r=r>>>8^t[255&(r^(224|a>>12&15))])>>>8^t[255&(r^(128|a>>6&63))])>>>8^t[255&(r^(128|63&a))];return~r}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===o(t)?i(t):void 0===(r=(function(){var e={};return i(e),e}).call(t,n,t,e))||(e.exports=r):i({})},53344(e,t,n){var r=n(25172);e.exports=function(e){return new r(e,0)},e.exports.__esModule=!0,e.exports.default=e.exports},53878(e){var t="\ud800-\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+o+"]",s="\\d+",c="["+n+"]",u="["+r+"]",l="[^"+t+o+s+n+r+i+"]",f="(?:\ud83c[\udde6-\uddff]){2}",h="[\ud800-\udbff][\udc00-\udfff]",d="["+i+"]",p="(?:"+u+"|"+l+")",v="(?:"+d+"|"+l+")",g="(?:['â](?:d|ll|m|re|s|t|ve))?",y="(?:['â](?:D|LL|M|RE|S|T|VE))?",m="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",b="[\\ufe0e\\ufe0f]?",S=b+m+("(?:\\u200d(?:"+["[^"+t+"]",f,h].join("|")+")"+b)+m+")*",E="(?:"+[c,f,h].join("|")+")"+S,C=RegExp([d+"?"+u+"+"+g+"(?="+[a,d,"$"].join("|")+")",v+"+"+y+"(?="+[a,d+p,"$"].join("|")+")",d+"?"+p+"+"+g,d+"+"+y,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",s,E].join("|"),"g");e.exports=function(e){return e.match(C)||[]}}
1,54675(e,t,n){var r=n(36458),i=n(37321);e.exports=function(e,t){var n=[];if(!e||!e.length)return n;var o=-1,a=[],s=e.length;for(t=r(t,3);++o<s;){var c=e[o];t(c,o,e)&&(n.push(c),a.push(o))}return i(e,a),n}},54700(e,t){"use strict";function n(e,t,a){for(var s,c={},u=0;u<e.length;u++){var l=e[u],f=r(l),h="";if(h=void 0===a?f:a+"."+f,f===t.textNodeName)void 0===s?s=l[f]:s+=""+l[f];else{if(void 0===f)continue;if(l[f]){var d=n(l[f],t,h),p=o(d,t);l[":@"]?i(d,l[":@"],h,t):1!==Object.keys(d).length||void 0===d[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(d).length&&(t.alwaysCreateTextNode?d[t.textNodeName]="":d=""):d=d[t.textNodeName],void 0!==c[f]&&c.hasOwnProperty(f)?(Array.isArray(c[f])||(c[f]=[c[f]]),c[f].push(d)):t.isArray(f,h,p)?c[f]=[d]:c[f]=d}}}return"string"==typeof s?s.length>0&&(c[t.textNodeName]=s):void 0!==s&&(c[t.textNodeName]=s),c}function r(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var r=t[n];if(":@"!==r)return r}}function i(e,t,n,r){if(t)for(var i=Object.keys(t),o=i.length,a=0;a<o;a++){var s=i[a];r.isArray(s,n+"."+s,!0,!0)?e[s]=[t[s]]:e[s]=t[s]}}function o(e,t){var n=t.textNodeName,r=Object.keys(e).length;return 0===r||!(1!==r||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n])}t.prettify=function(e,t){return n(e,t)}},54756(e,t,n){var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof window?window.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},55083(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}},55218(e,t,n){var r=n(63063),i=n(46431);e.exports=function(e){return i(e)&&"[object RegExp]"==r(e)}},55296(e,t,n){var r=n(38007);e.exports=n(64416)(r)},55416(e,t,n){var r=n(73738);e.exports=function(e){var t=r(e);return null!=e&&("object"==t||"function"==t)}},55470(e,t,n){e.exports=n(90431)(n(18090),"Map")},55686(e,t,n){var r=n(51482),i=n(71163),o=n(60082),a=n(35548);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[a(i(t))]}},55869(e,t,n){var r=n(887);e.exports=function(e,t,n,i,o){var a=r(e,t,n,i,o);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},55883(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o,a,c=s(e),u=c[0],l=c[1],f=new i((t=0,3*(u+(n=l))/4-n)),h=0,d=l>0?u-4:u;for(a=0;a<d;a+=4)o=r[e.charCodeAt(a)]<<18|r[e.charCodeAt(a+1)]<<12|r[e.charCodeAt(a+2)]<<6|r[e.charCodeAt(a+3)],f[h++]=o>>16&255,f[h++]=o>>8&255,f[h++]=255&o;return 2===l&&(o=r[e.charCodeAt(a)]<<2|r[e.charCodeAt(a+1)]>>4,f[h++]=255&o),1===l&&(o=r[e.charCodeAt(a)]<<10|r[e.charCodeAt(a+1)]<<4|r[e.charCodeAt(a+2)]>>2,f[h++]=o>>8&255,f[h++]=255&o),f},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,s=0,c=r-i;s<c;s+=a)o.push(u(e,s,s+a>c?c:s+a));return 1===i?o.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===i&&o.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return -1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,n){for(var r=[],i=t;i<n;i+=3)r.push(c((e[i]<<16&0xff0000)+(e[i+1]<<8&65280)+(255&e[i+2])));return r.join("")}r[45]=62,r[95]=63},56223(e,t,n){var r=n(73989),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},56230(e,t,n){"use strict";var r=n(93848);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},56350(e,t,n){"use strict";var r=n(14624).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||i);var a=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,c=function(){t.writable||l()},u=t._writableState&&t._writableState.finished,l=function(){s=!1,u=!0,a||o.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){a=!1,f=!0,s||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return a&&!f?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):s&&!u?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},v=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",c),t.on("close",c)):(t.on("complete",l),t.on("abort",p),t.req?v():t.on("request",v)),t.on("end",h),t.on("finish",l),!1!==n.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",v),t.req&&t.req.removeListener("finish",l),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",l),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},57045(e,t,n){e.exports=n(69371)},57243(e,t,n){"use strict";var r=n(97681);
1function i(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function o(e,t){this._pairs=[],e&&r(e,this,t)}var a=o.prototype;a.append=function(e,t){this._pairs.push([e,t])},a.toString=function(e){var t=e?function(t){return e.call(this,t,i)}:i;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")},e.exports=o},57381(e,t,n){e.exports=n(80098)(Object.keys,Object)},57608(e){e.exports={version:"0.30.0"}},57794(e){e.exports=Array.isArray},57885(e,t,n){"use strict";var r=n(93848),i=n(61952);e.exports=function(e,t,n,o){var a=this||i;return r.forEach(o,function(r){e=r.call(a,e,t,n)}),e}},58166(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},58755(e){"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function i(e,r,i){t[0]=e,r[i]=n[0],r[i+1]=n[1],r[i+2]=n[2],r[i+3]=n[3]}function o(e,r,i){t[0]=e,r[i]=n[3],r[i+1]=n[2],r[i+2]=n[1],r[i+3]=n[0]}function a(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function s(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?i:o,e.writeFloatBE=r?o:i,e.readFloatLE=r?a:s,e.readFloatBE=r?s:a}():function(){function t(e,t,n,r){var i=+(t<0);if(i&&(t=-t),0===t)e(1/t>0?0:0x80000000,n,r);else if(isNaN(t))e(0x7fc00000,n,r);else if(t>34028234663852886e22)e((i<<31|0x7f800000)>>>0,n,r);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var o=Math.floor(Math.log(t)/Math.LN2);e((i<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,n,r)}}function a(e,t,n){var r=e(t,n),i=2*(r>>31)+1,o=r>>>23&255,a=8388607&r;return 255===o?a?NaN:1/0*i:0===o?1401298464324817e-60*i*a:i*Math.pow(2,o-150)*(a+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,r),e.readFloatLE=a.bind(null,i),e.readFloatBE=a.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function i(e,r,i){t[0]=e,r[i]=n[0],r[i+1]=n[1],r[i+2]=n[2],r[i+3]=n[3],r[i+4]=n[4],r[i+5]=n[5],r[i+6]=n[6],r[i+7]=n[7]}function o(e,r,i){t[0]=e,r[i]=n[7],r[i+1]=n[6],r[i+2]=n[5],r[i+3]=n[4],r[i+4]=n[3],r[i+5]=n[2],r[i+6]=n[1],r[i+7]=n[0]}function a(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function s(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?i:o,e.writeDoubleBE=r?o:i,e.readDoubleLE=r?a:s,e.readDoubleBE=r?s:a}():function(){function t(e,t,n,r,i,o){var a,s=+(r<0);if(s&&(r=-r),0===r)e(0,i,o+t),e(1/r>0?0:0x80000000,i,o+n);else if(isNaN(r))e(0,i,o+t),e(0x7ff80000,i,o+n);else if(r>17976931348623157e292)e(0,i,o+t),e((s<<31|0x7ff00000)>>>0,i,o+n);else if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,i,o+t),e((s<<31|a/0x100000000)>>>0,i,o+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),e(0x10000000000000*(a=r*Math.pow(2,-c))>>>0,i,o+t),e((s<<31|c+1023<<20|1048576*a&1048575)>>>0,i,o+n)}}function a(e,t,n,r,i){var o=e(r,i+t),a=e(r,i+n),s=2*(a>>31)+1,c=a>>>20&2047,u=0x100000000*(1048575&a)+o;return 2047===c?u?NaN:1/0*s:0===c?5e-324*s*u:s*Math.pow(2,c-1075)*(u+0x10000000000000)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=a.bind(null,i,0,4),e.readDoubleBE=a.bind(null,o,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function r(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},59160(e,t,n){"use strict";var r=n(215);function i(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(a,this,e)):r.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted?r.nextTick(o,n):(n._writableState.errorEmitted=!0,r.nextTick(i,n,e)):r.nextTick(i,n,e):t?(r.nextTick(o,n),t(e)):r.nextTick(o,n)})),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 n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},59169(){},59646(e,t,n){var r=n(27550),i=n(95636);e.exports=function(e,t,n){if(r())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var a=new(e.bind.apply(e,o));return n&&i(a,n.prototype),a},e.exports.__esModule=!0,e.exports.default=e.exports},60082(e,t,n){var r=n(70495),i=n(60513);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},60478(e,t,n){e.exports=n(7043)},60513(e){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},60765(e,t,n){"use strict";var r=n(43693),i=n(73738),o=n(54756),a=n(29293),s=n(21076),c=n(13138),u=c.format,l=c.inspect,f=n(4258).co
1des.ERR_INVALID_ARG_TYPE,h=n(16477),d=h.kResistStopPropagation,p=h.AggregateError,v=h.SymbolDispose,g=window.AbortSignal||n(47063).AbortSignal,y=window.AbortController||n(47063).AbortController,m=Object.getPrototypeOf(a(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)}))).constructor,b=window.Blob||s.Blob,S=void 0!==b?function(e){return e instanceof b}:function(e){return!1},E=function(e,t){if(void 0!==e&&(null===e||"object"!==i(e)||!("aborted"in e)))throw new f(t,"AbortSignal",e)};e.exports={AggregateError:p,kEmptyObject:Object.freeze({}),once:function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}},createDeferredPromise:function(){var e,t;return{promise:new Promise(function(n,r){e=n,t=r}),resolve:e,reject:t}},promisify:function(e){return new Promise(function(t,n){e(function(e){if(e)return n(e);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.apply(void 0,i)})})},debuglog:function(){return function(){}},format:u,inspect:l,types:{isAsyncFunction:function(e){return e instanceof m},isArrayBufferView:function(e){return ArrayBuffer.isView(e)}},isBlob:S,deprecate:function(e,t){return e},addAbortListener:n(37370).addAbortListener||function(e,t){var n;if(void 0===e)throw new f("signal","AbortSignal",e);return E(e,"signal"),function(e,t){if("function"!=typeof e)throw new f(t,"Function",e)}(t,"listener"),e.aborted?queueMicrotask(function(){return t()}):(e.addEventListener("abort",t,r({__proto__:null,once:!0},d,!0)),n=function(){e.removeEventListener("abort",t)}),r({__proto__:null},v,function(){var e;null==(e=n)||e()})},AbortSignalAny:g.any||function(e){if(1===e.length)return e[0];var t=new y,n=function(){return t.abort()};return e.forEach(function(e){E(e,"signals"),e.addEventListener("abort",n,{once:!0})}),t.signal.addEventListener("abort",function(){e.forEach(function(e){return e.removeEventListener("abort",n)})},{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},60852(e,t,n){e.exports=n(80098)(Object.getPrototypeOf,Object)},61073(e,t,n){var r=n(43463),i=n(38609);e.exports=function(e){return i(r(e).toLowerCase())}},61110(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},61837(e,t,n){var r=n(63072),i=n(95636),o=n(40691),a=n(59646);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},61952(e,t,n){"use strict";var r=n(215),i=n(93848),o=n(37542),a=n(93033),s=n(7036),c=n(82412),u=n(70713),l=n(24717),f=n(4622),h={"Content-Type":"application/x-www-form-urlencoded"};function d(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var p,v={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(p=n(99972)),p),transformRequest:[function(e,t){o(t,"Accept"),o(t,"Content-Type");var n,r=t&&t["Content-Type"]||"",a=r.indexOf("application/json")>-1,s=i.isObject(e);if(s&&i.isHTMLForm(e)&&(e=new FormData(e)),i.isFormData(e))return a?JSON.stringify(f(e)):e;if(i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e))return e;if(i.isArrayBufferView(e))return e.buffer;if(i.isURLSearchParams(e))return d(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(s){if(-1!==r.indexOf("application/x-www-form-urlencoded"))return u(e,this.formSerializer).toString();if((n=i.isFileList(e))||r.indexOf("multipart/form-data")>-1){var l=this.env&&this.env.FormData;return c(n?{"files[]":e}
1:e,l&&new l,this.formSerializer)}}return s||a?(d(t,"application/json"),function(e,t,n){if(i.isString(e))try{return(0,JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||v.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&i.isString(e)&&(n&&!this.responseType||r)){var o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw a.from(e,a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:l.classes.FormData,Blob:l.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],function(e){v.headers[e]={}}),i.forEach(["post","put","patch"],function(e){v.headers[e]=i.merge(h)}),e.exports=v},61985(e,t,n){var r=n(67571),i=n(91059),o=n(3838),a=n(36773),s=n(90290),c=Math.max;e.exports=function(e){if(!e||!e.length)return[];var t=0;return e=r(e,function(e){if(s(e))return t=c(e.length,t),!0}),a(t,function(t){return i(e,o(t))})}},62705(e,t,n){"use strict";var r=n(54756),i=n(29293),o=n(43693);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var c=n(215),u=n(16477),l=u.PromisePrototypeThen,f=u.SymbolAsyncIterator,h=u.SymbolIterator,d=n(21076).Buffer,p=n(4258).codes,v=p.ERR_INVALID_ARG_TYPE,g=p.ERR_STREAM_NULL_VALUES;e.exports=function(e,t,n){if("string"==typeof t||t instanceof d)return new e(s(s({objectMode:!0},n),{},{read:function(){this.push(t),this.push(null)}}));if(t&&t[f])a=!0,o=t[f]();else{if(!t||!t[h])throw new v("iterable",["Iterable"],t);a=!1,o=t[h]()}var o,a,u=new e(s({objectMode:!0,highWaterMark:1},n)),p=!1;function y(){return(y=i(r.mark(function e(t){var n,i,a,s,c,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null!=t,i="function"==typeof o.throw,!n||!i){e.next=3;break}return e.next=1,o.throw(t);case 1:return s=(a=e.sent).value,c=a.done,e.next=2,s;case 2:if(!c){e.next=3;break}return e.abrupt("return");case 3:if("function"!=typeof o.return){e.next=5;break}return e.next=4,o.return();case 4:return u=e.sent.value,e.next=5,u;case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function m(){return(m=i(r.mark(function e(){var t,n,i,s,c,l;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!a){e.next=2;break}return e.next=1,o.next();case 1:s=e.sent,e.next=3;break;case 2:s=o.next();case 3:if(n=(t=s).value,!t.done){e.next=4;break}u.push(null),e.next=10;break;case 4:if(!n||"function"!=typeof n.then){e.next=6;break}return e.next=5,n;case 5:c=e.sent,e.next=7;break;case 6:c=n;case 7:if(null!==(i=c)){e.next=8;break}throw p=!1,new g;case 8:if(!u.push(i)){e.next=9;break}return e.abrupt("continue",13);case 9:p=!1;case 10:e.next=12;break;case 11:e.prev=11,l=e.catch(0),u.destroy(l);case 12:return e.abrupt("continue",14);case 13:e.next=0;break;case 14:case"end":return e.stop()}},e,null,[[0,11]])}))).apply(this,arguments)}return u._read=function(){p||(p=!0,function(){m.apply(this,arguments)}())},u._destroy=function(e,t){l(function(e){return y.apply(this,arguments)}(e),function(){return c.nextTick(t,e)},function(n){return c.nextTick(t,n||e)})},u}},62778(e,t,n){"use strict";var r=n(64883);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},62812(e,t,n){var r=n(23350);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},63063(e,t,n){var r=n(7502),i=n(69170),o=n(17889),a=r?r.toStringTag:void 0;
1e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},63072(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},63361(e){e.exports=function(e){return e}},63659(e,t,n){"use strict";var r=n(93848);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.clear=function(){this.handlers&&(this.handlers=[])},i.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},64198(e){e.exports=function(e){return this.__data__.get(e)}},64416(e){var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},64802(e,t,n){var r=n(11675),i=n(55470),o=n(67113),a=n(5708),s=n(92922),c=n(63063),u=n(7774),l="[object Map]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",p="[object DataView]",v=u(r),g=u(i),y=u(o),m=u(a),b=u(s),S=c;
1(r&&S(new r(new ArrayBuffer(1)))!=p||i&&S(new i)!=l||o&&S(o.resolve())!=f||a&&S(new a)!=h||s&&S(new s)!=d)&&(S=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case v:return p;case g:return l;case y:return f;case m:return h;case b:return d}return t}),e.exports=S},64823(e){"use strict";e.exports=FormData},64883(e,t,n){"use strict";var r,i=n(73738),o=n(78549),a=Object.prototype.toString,s=(r=Object.create(null),function(e){var t=a.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function c(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function u(e){return Array.isArray(e)}function l(e){return void 0===e}var f=c("ArrayBuffer");function h(e){return"number"==typeof e}function d(e){return null!==e&&"object"===i(e)}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var v=c("Date"),g=c("File"),y=c("Blob"),m=c("FileList");function b(e){return"[object Function]"===a.call(e)}var S=c("URLSearchParams");function E(e,t){if(null!=e)if("object"!==i(e)&&(e=[e]),u(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var C,w,T=(C="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return C&&e instanceof C}),k=c("HTMLFormElement");e.exports={isArray:u,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||a.call(e)===t||b(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:h,isObject:d,isPlainObject:p,isEmptyObject:function(e){return e&&0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype},isUndefined:l,isDate:v,isFile:g,isBlob:y,isFunction:b,isStream:function(e){return d(e)&&b(e.pipe)},isURLSearchParams:S,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:E,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):u(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)E(arguments[r],n);return t},extend:function(e,t,n){return E(t,function(t,r){e[r]=n&&"function"==typeof t?o(t,n):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return -1!==r&&r===n},toArray:function(e){if(!e)return null;if(u(e))return e;var t=e.length;if(!h(t))return null;for(var n=Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:T,isFileList:m,forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var i=n.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:k,hasOwnProperty:(w=Object.prototype.hasOwnProperty,function(e,t){return w.call(e,t)})}},64939(e){"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 n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},64983(e,t,n){var r=n(56223),i=n(55416),o=n(15135),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},65156(e,t,n){"use strict";e.exports=n(34055)},65252(e,t,n){"use strict";var r,i=n(6365),o=n(215);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}
vendor: 7,260 bytes, line 1
1e.exports=_,_.WritableState=k;var s,c={deprecate:n(27792)},u=n(79161),l=n(21076).Buffer,f=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=n(59160),d=n(65483).getHighWaterMark,p=n(14624).F,v=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,m=p.ERR_STREAM_CANNOT_PIPE,b=p.ERR_STREAM_DESTROYED,S=p.ERR_STREAM_NULL_VALUES,E=p.ERR_STREAM_WRITE_AFTER_END,C=p.ERR_UNKNOWN_ENCODING,w=h.errorOrDestroy;function T(){}function k(e,t,i){r=r||n(16262),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,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 n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(A,e,t),e._writableState.errorEmitted=!0,w(e,r)):(i(r),e._writableState.errorEmitted=!0,w(e,r),A(e,t))}(e,n,r,t,i);else{var a=N(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||I(e,n),r?o.nextTick(O,e,n,a,i):O(e,n,a,i)}}(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 a(this)}function _(e){var t=this instanceof(r=r||n(16262));if(!t&&!s.call(_,this))return new _(e);this._writableState=new k(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)),u.call(this)}function R(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function O(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),A(e,t)}function I(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=Array(t.bufferedRequestCount),i=t.corkedRequestsFree;i.entry=n;for(var o=0,s=!0;n;)r[o]=n,n.isBuf||(s=!1),n=n.next,o+=1;r.allBuffers=s,R(e,t,!0,t.length,r,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,l=n.callback;if(R(e,t,!1,t.objectMode?1:c.length,c,u,l),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function N(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function x(e,t){e._final(function(n){t.pendingcb--,n&&w(e,n),t.prefinished=!0,e.emit("prefinish"),A(e,t)})}function A(e,t){var n=N(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(x,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(64939)(_,u),k.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(k.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]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===_&&e&&e._writableState instanceof k}})):s=function(e){return e instanceof this},_.prototype.pipe=function(){w(this,new m)},_.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,l.isBuffer(r)||r instanceof f);return s&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=T),i.ending?function(e,t){var n=new E;w(e,n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i;return null===n?i=new S:"string"==typeof n||t.objectMode||(i=new v("chunk",["string","Buffer"],n)),!i||(w(e,i),o.nextTick(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,s,r,i,o);return c}(this,i,s,e,t,n)),a},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||I(this,e))},_.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 C(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(_.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(e,t,n){n(new g("_write()"))},_.prototype._writev=null,_.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,A(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(_.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),_.prototype.destroy=h.destroy,_.prototype._undestroy=h.undestroy,_.prototype._destroy=function(e,t){t(e)}},65483(e,t,n){"use strict";var r=n(14624).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);
1if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},65576(e,t,n){e.exports=n(38784)()},66254(e,t,n){"use strict";var r=n(93848),i=n(57885),o=n(88836),a=n(61952),s=n(84823),c=n(37542);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,null,e.transformRequest),c(e.headers,"Accept"),c(e.headers,"Content-Type"),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return u(e),t.data=i.call(e,t.data,t.headers,t.status,e.transformResponse),t},function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)})}},66760(e,t,n){var r=n(36734),i=n(93257),o=n(30282);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},67087(e,t,n){"use strict";var r=n(43693),i=n(73738),o=n(34579),a=n(17383),s=n(42933),c=n(5729),u=n(2805),l=n(978),f=o(function e(t){a(this,e),this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xa2"},pound:{regex:/&(pound|#163);/g,val:"\xa3"},yen:{regex:/&(yen|#165);/g,val:"\xa5"},euro:{regex:/&(euro|#8364);/g,val:"â¬"},copyright:{regex:/&(copy|#169);/g,val:"\xa9"},reg:{regex:/&(reg|#174);/g,val:"\xae"},inr:{regex:/&(inr|#8377);/g,val:"â¹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:function(e,t){return String.fromCharCode(Number.parseInt(t,10))}},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:function(e,t){return String.fromCharCode(Number.parseInt(t,16))}}},this.addExternalEntities=h,this.parseXml=y,this.parseTextData=d,this.resolveNameSpace=p,this.buildAttributesMap=g,this.isItStopNode=E,this.replaceEntitiesValue=b,this.readStopNodeData=T,this.saveTextToParentTag=S,this.addChild=m});function h(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var r=t[n];this.lastEntities[r]={regex:RegExp("&"+r+";","g"),val:e[r]}}}function d(e,t,n,r,o,a,s){if(void 0!==e&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));var c=this.options.tagValueProcessor(t,e,n,o,a);return null==c?e:i(c)!==i(e)||c!==e?c:this.options.trimValues||e.trim()===e?k(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function p(e){if(this.options.removeNSPrefix){var t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}var v=RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function g(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){for(var r=s.getAllMatches(e,v),o=r.length,a={},c=0;c<o;c++){var u=this.resolveNameSpace(r[c][1]),l=r[c][4],f=this.options.attributeNamePrefix+u;if(u.length)if(this.options.transformAttributeName&&(f=this.options.transformAttributeName(f)),"__proto__"===f&&(f="#__proto__"),void 0!==l){this.options.trimValues&&(l=l.trim()),l=this.replaceEntitiesValue(l);var h=this.options.attributeValueProcessor(u,l,t);null==h?a[f]=l:i(h)!==i(l)||h!==l?a[f]=h:a[f]=k(l,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(a[f]=!0)}if(Object.keys(a).length){if(this.options.attributesGroupName){var d={};return d[this.options.attributesGroupName]=a,d}return a}}}var y=function(e){e=e.replace(/\r\n?/g,"\n");for(var t=new c("!xml"),n=t,i="",o="",a=0;a<e.length;a++)if("<"===e[a])if("/"===e[a+1]){var s=C(e,">",a,"Closing Tag is not closed."),l=e.substring(a+2,s).trim();if(this.options.removeNSPrefix){var f=l.indexOf(":");-1!==f&&(l=l.substr(f+1))}this.options.transformTagName&&(l=this.options.transformTagName(l)),n&&(i=this.saveTextToParentTag(i,n,o));var h=o.substring(o.lastIndexOf(".")+1);if(l&&-1!==this.options.unpairedTags.indexOf(l))throw Error("Unpaired tag can not be used as closing tag: </".concat(l,">"));var d=0;h&&-1!==this.options.unpairedTags.indexOf(h)?(d=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):d=o.lastIndexOf("."),o=o.substring(0,d),n=this.tagsNodeStack.pop(),i="",a=s}else if("?"===e[a+1]){var p=w(e,a,!1,"?>");if(!p)throw Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,o),this.options.ignoreDeclaration&&"?xml"===p.tagName||this.options.ignorePiTags);else{var v=new c(p.tagName);v.add(this.options.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&(v["
1:@"]=this.buildAttributesMap(p.tagExp,o,p.tagName)),this.addChild(n,v,o)}a=p.closeIndex+1}else if("!--"===e.substr(a+1,3)){var g=C(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){var y=e.substring(a+4,g-2);i=this.saveTextToParentTag(i,n,o),n.add(this.options.commentPropName,[r({},this.options.textNodeName,y)])}a=g}else if("!D"===e.substr(a+1,2)){var m=u(e,a);this.docTypeEntities=m.entities,a=m.i}else if("!["===e.substr(a+1,2)){var b=C(e,"]]>",a,"CDATA is not closed.")-2,S=e.substring(a+9,b);i=this.saveTextToParentTag(i,n,o);var E=this.parseTextData(S,n.tagname,o,!0,!1,!0,!0);null==E&&(E=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[r({},this.options.textNodeName,S)]):n.add(this.options.textNodeName,E),a=b+2}else{var T=w(e,a,this.options.removeNSPrefix),k=T.tagName,_=T.rawTagName,R=T.tagExp,O=T.attrExpPresent,I=T.closeIndex;this.options.transformTagName&&(k=this.options.transformTagName(k)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,o,!1));var N=n;if(N&&-1!==this.options.unpairedTags.indexOf(N.tagname)&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),k!==t.tagname&&(o+=o?"."+k:k),this.isItStopNode(this.options.stopNodes,o,k)){var x="";if(R.length>0&&R.lastIndexOf("/")===R.length-1)"/"===k[k.length-1]?(k=k.substr(0,k.length-1),o=o.substr(0,o.length-1),R=k):R=R.substr(0,R.length-1),a=T.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(k))a=T.closeIndex;else{var A=this.readStopNodeData(e,_,I+1);if(!A)throw Error("Unexpected end of ".concat(_));a=A.i,x=A.tagContent}var P=new c(k);k!==R&&O&&(P[":@"]=this.buildAttributesMap(R,o,k)),x&&(x=this.parseTextData(x,k,o,!0,O,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),P.add(this.options.textNodeName,x),this.addChild(n,P,o)}else{if(R.length>0&&R.lastIndexOf("/")===R.length-1){"/"===k[k.length-1]?(k=k.substr(0,k.length-1),o=o.substr(0,o.length-1),R=k):R=R.substr(0,R.length-1),this.options.transformTagName&&(k=this.options.transformTagName(k));var D=new c(k);k!==R&&O&&(D[":@"]=this.buildAttributesMap(R,o,k)),this.addChild(n,D,o),o=o.substr(0,o.lastIndexOf("."))}else{var M=new c(k);this.tagsNodeStack.push(n),k!==R&&O&&(M[":@"]=this.buildAttributesMap(R,o,k)),this.addChild(n,M,o),n=M}i="",a=I}}else i+=e[a];return t.child};function m(e,t,n){var r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r&&(t.tagname=r),e.addChild(t))}var b=function(e){if(this.options.processEntities){for(var t in this.docTypeEntities){var n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(var r in this.lastEntities){var i=this.lastEntities[r];e=e.replace(i.regex,i.val)}if(this.options.htmlEntities)for(var o in this.htmlEntities){var a=this.htmlEntities[o];e=e.replace(a.regex,a.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function S(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function E(e,t,n){var r="*."+n;for(var i in e){var o=e[i];if(r===o||t===o)return!0}return!1}function C(e,t,n,r){var i=e.indexOf(t,n);if(-1===i)throw Error(r);return i+t.length-1}function w(e,t,n){var r=function(e,t){for(var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="",o=t;o<e.length;o++){var a=e[o];if(n)a===n&&(n="");else if('"'===a||"'"===a)n=a;else if(a===r[0]){if(!r[1]||e[o+1]===r[1])return{data:i,index:o}}else" "===a&&(a=" ");i+=a}}(e,t+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(r){var i=r.data,o=r.index,a=i.search(/\s/),s=i,c=!0;-1!==a&&(s=i.substring(0,a),i=i.substring(a+1).trimStart());var u=s;if(n){var l=s.indexOf(":");-1!==l&&(c=(s=s.substr(l+1))!==r.data.substr(l+1))}return{tagName:s,tagExp:i,closeIndex:o,attrExpPresent:c,rawTagName:u}}}function T(e,t,n){for(var r=n,i=1;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){var o=C(e,">",n,"".concat(t," is not closed"));if(e.substring(n+2,o).trim()===t&&0==--i)return{tagContent:e.substring(r,n),i:o};n=o}else if("?"===e[n+1])n=C(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=C(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=C(e,"]]>",n,"StopNode is not closed.")-2;else{var a=w(e,n,">");a&&((a&&a.tagName)===t&&"/"!==a.tagExp[a.tagExp.length-1]&&i++,n=a.closeIndex)}}
1function k(e,t,n){if(t&&"string"==typeof e){var r=e.trim();return"true"===r||"false"!==r&&l(e,n)}return s.isExist(e)?e:""}e.exports=f},67091(e,t,n){"use strict";var r=n(67869),i=n(21260);e.exports=function(e,t,n){var o=!r(t);return e&&(o||!1===n)?i(e,t):t}},67113(e,t,n){e.exports=n(90431)(n(18090),"Promise")},67278(e){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},67571(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},67601(e,t,n){var r=n(29657),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;e.exports=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t})},67813(e,t,n){var r=n(28965),i=n(91375),o=Object.prototype.hasOwnProperty;e.exports=i(function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])})},67869(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},68079(e,t,n){var r=n(43204),i=n(68135),o=n(76342),a=n(36458),s=n(60852),c=n(57794),u=n(48193),l=n(71259),f=n(55416),h=n(49366);e.exports=function(e,t,n){var d=c(e),p=d||u(e)||h(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=p?d?new v:[]:f(e)&&l(v)?i(s(e)):{}}return(p?r:o)(e,function(e,r,i){return t(n,e,r,i)}),n}},68135(e,t,n){var r=n(55416),i=Object.create;e.exports=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()},68479(e,t,n){"use strict";var r=n(16477).ObjectSetPrototypeOf;e.exports=o;var i=n(22517);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}r(o.prototype,i.prototype),r(o,i),o.prototype._transform=function(e,t,n){n(null,e)}},68742(e,t,n){var r=n(79498),i=n(36620),o=n(172),a=n(13789),s=n(61110),c=n(22983),u=Object.prototype.hasOwnProperty;e.exports=o(function(e,t){if(s(t)||a(t))i(t,c(t),e);else for(var n in t)u.call(t,n)&&r(e,n,t[n])})},68804(e,t,n){var r=n(73738),i=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var n=r(e);return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&i.test(e))&&e>-1&&e%1==0&&e<t}},69067(e){e.exports=function(){}},69170(e,t,n){var r=n(7502),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},69371(e,t,n){"use strict";var r=n(93848),i=n(47312),o=n(21375),a=n(92483),s=n(61952),c=n(4622),u=function e(t){var n=new o(t),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(s);u.Axios=o,u.CanceledError=n(84823),u.CancelToken=n(83227),u.isCancel=n(88836),u.VERSION=n(91669).version,u.toFormData=n(82412),u.AxiosError=n(93033),u.Cancel=u.CanceledError,u.all=function(e){return Promise.all(e)},u.spread=n(86216),u.isAxiosError=n(91567),u.formToJSON=function(e){return c(r.isHTMLForm(e)?new FormData(e):e)},e.exports=u,e.exports.default=u},69573(e,t,n){var r=n(87412),i=n(43463),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
17f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},69918(e,t,n){var r=n(76342);e.exports=n(78726)(r)},70079(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},70262(e,t,n){var r=n(246),i=n(63361);e.exports=function(e){return r(e,i)}},70340(e,t,n){var r=n(10061),i=n(60852),o=n(49439),a=n(45606);e.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a},70495(e,t,n){var r=n(51482),i=n(35548);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},70652(e){e.exports=function(e,t){return e.has(t)}},70681(e,t,n){var r=n(7502),i=n(42563),o=n(46441),a=n(4034),s=n(39490),c=n(9592),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,f,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=c),e.size!=t.size&&!p)break;var v=h.get(e);if(v)return v==t;r|=2,h.set(e,t);var g=a(d(e),d(t),r,u,f,h);return h.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},70713(e,t,n){"use strict";var r=n(93848),i=n(82412),o=n(24717);e.exports=function(e,t){return i(e,new o.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,i){return o.isNode&&r.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}},71026(e,t,n){"use strict";var r=n(84226);function i(e){if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});var t,n=this;this.promise.then(function(e){if(n._listeners){for(var t=n._listeners.length;t-- >0;)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,r=new Promise(function(e){n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,i,o){n.reason||(n.reason=new r(e,i,o),t(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},71163(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},71259(e,t,n){var r=n(63063),i=n(55416);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},71422(e,t,n){var r=n(3838),i=n(38572),o=n(8007),a=n(35548);e.exports=function(e){return o(e)?r(a(e)):i(e)}},71731(e,t,n){var r=n(70495),i=n(24027),o=n(51482);e.exports=function(e,t,n){for(var a=-1,s=t.length,c={};++a<s;){var u=t[a],l=r(e,u);n(l,u)&&i(c,o(u,e),l)}return c}},72457(e){var t="\ud800-\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\ud83c[\udffb-\udfff]",o="[^"+t+"]",a="(?:\ud83c[\udde6-\uddff]){2}",s="[\ud800-\udbff][\udc00-\udfff]",c="(?:"+r+"|"+i+")?",u="[\\ufe0e\\ufe0f]?",l=u+c+("(?:\\u200d(?:"+[o,a,s].join("|")+")"+u)+c+")*",f=RegExp(i+"(?="+i+")|"+("(?:"+[o+r+"?",r,a,s,n].join("|"))+")"+l,"g");e.exports=function(e){return e.match(f)||[]}},72479(e,t,n){var r=n(70495);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},73051(e,t,n){var r=n(87469),i=n(91598),o=n(55296);e.exports=function(e){return o(i(e,void 0,r),e+"")}},73123(e,t,n){"use strict";var r=n(57243);e.exports="undefined"!=typeof URLSearchParams?URLSearchParams:r},73651(e,t,n){"use strict";var r=n(64883),i=n(77672),o=n(25455),a=n(78357),s=n(84226),c=n(51793);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}
1e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,null,e.transformRequest),c(e.headers,"Accept"),c(e.headers,"Content-Type"),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return u(e),t.data=i.call(e,t.data,t.headers,t.status,e.transformResponse),t},function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)})}},73738(e){function t(n){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},73989(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},74334(e,t,n){var r=n(43696),i=n(70340),o=n(90380);e.exports=function(e){return r(e,o,i)}},74483(e,t,n){var r=n(34163),i=n(85160),o=n(39022),a=o&&o.isSet;e.exports=a?i(a):r},74995(e,t,n){var r=n(36620),i=n(90380);e.exports=function(e){return r(e,i(e))}},75212(e,t,n){var r=n(1550);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},75465(e,t,n){var r=n(61073);e.exports=n(32284)(function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)})},75546(e){function t(n,r,i,o){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}e.exports=t=function(e,n,r,i){function o(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},75834(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},75879(e,t,n){var r=n(7502),i=n(91059),o=n(57794),a=n(15135),s=r?r.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},75929(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},75969(e){"use strict";e.exports=function(e,t,n){var r=n||8192,i=r>>>1,o=null,a=r;return function(n){if(n<1||n>i)return e(n);a+n>r&&(o=e(r),a=0);var s=t.call(o,a,a+=n);return 7&a&&(a=1+(7|a)),s}}},76342(e,t,n){var r=n(65576),i=n(22983);e.exports=function(e,t){return e&&r(e,t,i)}},76808(e,t,n){var r=n(90431);e.exports=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},76978(e,t,n){"use strict";var r=n(16477),i=r.ArrayIsArray,o=r.ObjectSetPrototypeOf,a=n(37370).EventEmitter;function s(e){a.call(this,e)}function c(e,t,n){if("function"==typeof e.prependListener)return e.prepe
1ndListener(t,n);e._events&&e._events[t]?i(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}o(s.prototype,a.prototype),o(s,a),s.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",i),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var o=!1;function s(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){f(),0===a.listenerCount(this,"error")&&this.emit("error",e)}function f(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",f),n.removeListener("close",f),e.removeListener("close",f)}return c(n,"error",l),c(e,"error",l),n.on("end",f),n.on("close",f),e.on("close",f),e.emit("pipe",n),e},e.exports={Stream:s,prependListener:c}},77055(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},77215(e,t,n){var r=n(19004);e.exports=function(e){return r(e)?void 0:e}},77522(e,t,n){var r=n(91059),i=n(70495),o=n(36458),a=n(88093),s=n(67278),c=n(85160),u=n(49995),l=n(63361),f=n(57794);e.exports=function(e,t,n){t=t.length?r(t,function(e){return f(e)?function(t){return i(t,1===e.length?e[0]:e)}:e}):[l];var h=-1;return t=r(t,c(o)),s(a(e,function(e,n,i){return{criteria:r(t,function(t){return t(e)}),index:++h,value:e}}),function(e,t){return u(e,t,n)})}},77662(e,t,n){var r=n(69918);e.exports=function(e,t,n,i){return r(e,function(e,r,o){t(i,e,n(e),o)}),i}},77672(e,t,n){"use strict";var r=n(64883),i=n(78357);e.exports=function(e,t,n,o){var a=this||i;return r.forEach(o,function(r){e=r.call(a,e,t,n)}),e}},77710(e,t,n){var r=n(512),i=n(39019);e.exports=function(e,t,n,o){var a=n.length,s=a,c=!o;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(c&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<s;){var l=(u=n[a])[0],f=e[l],h=u[1];if(c&&u[2]){if(void 0===f&&!(l in e))return!1}else{var d=new r;if(o)var p=o(f,h,l,e,t,d);if(!(void 0===p?i(h,f,3,o,d):p))return!1}}return!0}},77736(e,t,n){var r=n(73738).default,i=n(89045);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},77902(e,t,n){var r=n(71731),i=n(38096);e.exports=function(e,t){return r(e,t,function(t,n){return i(e,n)})}},78357(e,t,n){"use strict";var r=n(215),i=n(64883),o=n(51793),a=n(87558),s=n(5999),c=n(97681),u=n(6396),l=n(65156),f=n(80439),h={"Content-Type":"application/x-www-form-urlencoded"};function d(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var p,v={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(p=n(15053)),p),transformRequest:[function(e,t){o(t,"Accept"),o(t,"Content-Type");var n,r=t&&t["Content-Type"]||"",a=r.indexOf("application/json")>-1,s=i.isObject(e);if(s&&i.isHTMLForm(e)&&(e=new FormData(e)),i.isFormData(e))return a?JSON.stringify(f(e)):e;if(i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e))return e;if(i.isArrayBufferView(e))return e.buffer;if(i.isURLSearchParams(e))return d(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(s){if(-1!==r.indexOf("application/x-www-form-urlencoded"))return u(e,this.formSerializer).toString();if((n=i.isFileList(e))||r.indexOf("multipart/form-data")>-1){var l=this.env&&this.env.FormData;return c(n?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||a?(d(t,"application/json"),function(e,t,n){if(i.isString(e))try{return(0,JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||v.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&i.isString(e)&&(n&&!this.responseType||r)){var o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw a.from(e,a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:l.classes.FormData,Blob:l.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};
1i.forEach(["delete","get","head"],function(e){v.headers[e]={}}),i.forEach(["post","put","patch"],function(e){v.headers[e]=i.merge(h)}),e.exports=v},78477(e,t,n){e.exports=n(90431)(Object,"create")},78504(e,t,n){var r=n(1550);e.exports=function(e){return r(this.__data__,e)>-1}},78549(e){"use strict";e.exports=function(e,t){return function(){return e.apply(t,arguments)}}},78726(e,t,n){var r=n(13789);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},78874(e,t,n){var r=n(512),i=n(43204),o=n(79498),a=n(92710),s=n(23889),c=n(21207),u=n(36598),l=n(50262),f=n(78881),h=n(40013),d=n(74334),p=n(64802),v=n(75834),g=n(98972),y=n(86768),m=n(57794),b=n(48193),S=n(15282),E=n(55416),C=n(74483),w=n(22983),T=n(90380),k="[object Arguments]",_="[object Function]",R="[object Object]",O={};O[k]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[R]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[_]=O["[object WeakMap]"]=!1,e.exports=function e(t,n,I,N,x,A){var P,D=1&n,M=2&n,B=4&n;if(I&&(P=x?I(t,N,x,A):I(t)),void 0!==P)return P;if(!E(t))return t;var L=m(t);if(L){if(P=v(t),!D)return u(t,P)}else{var j=p(t),F=j==_||"[object GeneratorFunction]"==j;if(b(t))return c(t,D);if(j==R||j==k||F&&!x){if(P=M||F?{}:y(t),!D)return M?f(t,s(P,t)):l(t,a(P,t))}else{if(!O[j])return x?t:{};P=g(t,j,D)}}A||(A=new r);var U=A.get(t);if(U)return U;A.set(t,P),C(t)?t.forEach(function(r){P.add(e(r,n,I,r,t,A))}):S(t)&&t.forEach(function(r,i){P.set(i,e(r,n,I,i,t,A))});var q=L?void 0:(B?M?d:h:M?T:w)(t);return i(q||t,function(r,i){q&&(r=t[i=r]),o(P,i,e(r,n,I,i,t,A))}),P}},78881(e,t,n){var r=n(36620),i=n(70340);e.exports=function(e,t){return r(e,i(e),t)}},79007(e,t,n){var r=n(51482),i=n(25327),o=n(57794),a=n(68804),s=n(12311),c=n(35548);e.exports=function(e,t,n){for(var u=-1,l=(t=r(t,e)).length,f=!1;++u<l;){var h=c(t[u]);if(!(f=null!=e&&n(e,h)))break;e=e[h]}return f||++u!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(h,l)&&(o(e)||i(e))}},79025(e,t,n){"use strict";var r=n(73738),i=n(43693),o=n(21379),a={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp("&","g"),val:"&"},{regex:RegExp(">","g"),val:">"},{regex:RegExp("<","g"),val:"<"},{regex:RegExp("'","g"),val:"'"},{regex:RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function s(e){this.options=Object.assign({},a,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=c,this.options.format?(this.indentate=u,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function c(e,t,n){var r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjectNode(r.val,t,r.attrStr,n)}function u(e){return this.options.indentBy.repeat(e)}function l(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}s.prototype.build=function(e){return this.options.preserveOrder?o(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e=i({},this.options.arrayNodeName,e)),this.j2x(e,0).val)},s.prototype.j2x=function(e,t){var n="",i="";for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(void 0===e[o])this.isAttribute(o)&&(i+="");else if(null===e[o])this.isAttribute(o)?i+="":"?"===o[0]?i+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;
1else if(e[o]instanceof Date)i+=this.buildTextValNode(e[o],o,"",t);else if("object"!==r(e[o])){var a=this.isAttribute(o);if(a)n+=this.buildAttrPairStr(a,""+e[o]);else if(o===this.options.textNodeName){var s=this.options.tagValueProcessor(o,""+e[o]);i+=this.replaceEntitiesValue(s)}else i+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){for(var c=e[o].length,u="",l="",f=0;f<c;f++){var h=e[o][f];if(void 0===h);else if(null===h)"?"===o[0]?i+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if("object"===r(h))if(this.options.oneListGroup){var d=this.j2x(h,t+1);u+=d.val,this.options.attributesGroupName&&h.hasOwnProperty(this.options.attributesGroupName)&&(l+=d.attrStr)}else u+=this.processTextOrObjNode(h,o,t);else if(this.options.oneListGroup){var p=this.options.tagValueProcessor(o,h);u+=p=this.replaceEntitiesValue(p)}else u+=this.buildTextValNode(h,o,"",t)}this.options.oneListGroup&&(u=this.buildObjectNode(u,o,l,t)),i+=u}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName)for(var v=Object.keys(e[o]),g=v.length,y=0;y<g;y++)n+=this.buildAttrPairStr(v[y],""+e[o][v[y]]);else i+=this.processTextOrObjNode(e[o],o,t);return{attrStr:n,val:i}},s.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},s.prototype.buildObjectNode=function(e,t,n,r){if(""===e)return"?"===t[0]?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar;var i="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",i=""),(n||""===n)&&-1===e.indexOf("<")?this.indentate(r)+"<"+t+n+o+">"+e+i:!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(r)+"\x3c!--".concat(e,"--\x3e")+this.newLine:this.indentate(r)+"<"+t+n+o+this.tagEndChar+e+this.indentate(r)+i},s.prototype.closeTag=function(e){var t="";return -1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":"></".concat(e),t},s.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+"<![CDATA[".concat(e,"]]>")+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+"\x3c!--".concat(e,"--\x3e")+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;var i=this.options.tagValueProcessor(t,e);return""===(i=this.replaceEntitiesValue(i))?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"</"+t+this.tagEndChar},s.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(var t=0;t<this.options.entities.length;t++){var n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e},e.exports=s},79161(e,t,n){e.exports=n(37370).EventEmitter},79255(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},79498(e,t,n){var r=n(28965),i=n(46441),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},79625(e,t,n){"use strict";var r,i=n(215),o=n(4258),a=o.AbortError,s=o.codes,c=s.ERR_INVALID_ARG_TYPE,u=s.ERR_STREAM_PREMATURE_CLOSE,l=n(60765),f=l.kEmptyObject,h=l.once,d=n(16964),p=d.validateAbortSignal,v=d.validateFunction,g=d.validateObject,y=d.validateBoolean,m=n(16477),b=m.Promise,S=m.PromisePrototypeThen,E=m.SymbolDispose,C=n(87092),w=C.isClosed,T=C.isReadable,k=C.isReadableNodeStream,_=C.isReadableStream,R=C.isReadableFinished,O=C.isReadableErrored,I=C.isWritable,N=C.isWritableNodeStream,x=C.isWritableStream,A=C.isWritableFinished,P=C.isWritableErrored,D=C.isNodeStream,M=C.willEmitClose,B=C.kIsClosedPromise,L=function(){};function j(e,t,o){if(2==arguments.length?(o=t,t=f):null==t?t=f:g(t,"options"),v(o,"callback"),p(t.signal,"options.signal"),o=h(o),_(e)||x(e))return function(e,t,o){var s=!1,c=L;if(t.signal)if(c=function(){s=!0,o.call(e,new a(void 0,{cause:t.signal.reason}))},t.signal.aborted)i.nextTick(c);
1else{var u=(r=r||n(60765).addAbortListener)(t.signal,c),l=o;o=h(function(){u[E]();for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];l.apply(e,n)})}var f=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];s||i.nextTick(function(){return o.apply(e,n)})};return S(e[B].promise,f,f),L}(e,t,o);if(!D(e))throw new c("stream",["ReadableStream","WritableStream","Stream"],e);var s,l,d=null!=(s=t.readable)?s:k(e),y=null!=(l=t.writable)?l:N(e),m=e._writableState,b=e._readableState,C=function(){e.writable||U()},j=M(e)&&k(e)===d&&N(e)===y,F=A(e,!1),U=function(){F=!0,e.destroyed&&(j=!1),j&&(!e.readable||d)||d&&!q||o.call(e)},q=R(e,!1),H=function(){q=!0,e.destroyed&&(j=!1),j&&(!e.writable||y)||y&&!F||o.call(e)},W=function(t){o.call(e,t)},V=w(e),G=function(){V=!0;var t=P(e)||O(e);return t&&"boolean"!=typeof t?o.call(e,t):d&&!q&&k(e,!0)&&!R(e,!1)?o.call(e,new u):!y||F||A(e,!1)?void o.call(e):o.call(e,new u)},z=function(){V=!0;var t=P(e)||O(e);if(t&&"boolean"!=typeof t)return o.call(e,t);o.call(e)},K=function(){e.req.on("finish",U)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?y&&!m&&(e.on("end",C),e.on("close",C)):(e.on("complete",U),j||e.on("abort",G),e.req?K():e.on("request",K)),j||"boolean"!=typeof e.aborted||e.on("aborted",G),e.on("end",H),e.on("finish",U),!1!==t.error&&e.on("error",W),e.on("close",G),V?i.nextTick(G):null!=m&&m.errorEmitted||null!=b&&b.errorEmitted?j||i.nextTick(z):(d||j&&!T(e)||!F&&!1!==I(e))&&(y||j&&!I(e)||!q&&!1!==T(e))?b&&e.req&&e.aborted&&i.nextTick(z):i.nextTick(z);var X=function(){o=L,e.removeListener("aborted",G),e.removeListener("complete",U),e.removeListener("abort",G),e.removeListener("request",K),e.req&&e.req.removeListener("finish",U),e.removeListener("end",C),e.removeListener("close",C),e.removeListener("finish",U),e.removeListener("end",H),e.removeListener("error",W),e.removeListener("close",G)};if(t.signal&&!V){var Y=function(){var n=o;X(),n.call(e,new a(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)i.nextTick(Y);
1else{var Z=(r=r||n(60765).addAbortListener)(t.signal,Y),$=o;o=h(function(){Z[E]();for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];$.apply(e,n)})}}return X}e.exports=j,e.exports.finished=function(e,t){var n,r=!1;return null===t&&(t=f),null!=(n=t)&&n.cleanup&&(y(t.cleanup,"cleanup"),r=t.cleanup),new b(function(n,i){var o=j(e,t,function(e){r&&o(),e?i(e):n()})})}},79654(e,t,n){var r=n(55686);e.exports=function(e,t){return null==e||r(e,t)}},79710(e,t,n){var r=n(28965),i=n(46441);e.exports=function(e,t,n){(void 0===n||i(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},79969(e,t,n){"use strict";var r=n(215),i=n(16477),o=i.ArrayPrototypeSlice,a=i.Error,s=i.FunctionPrototypeSymbolHasInstance,c=i.ObjectDefineProperty,u=i.ObjectDefineProperties,l=i.ObjectSetPrototypeOf,f=i.StringPrototypeToLowerCase,h=i.Symbol,d=i.SymbolHasInstance;e.exports=L,L.WritableState=M;var p=n(37370).EventEmitter,v=n(76978).Stream,g=n(21076).Buffer,y=n(14515),m=n(15406).addAbortSignal,b=n(10972),S=b.getHighWaterMark,E=b.getDefaultHighWaterMark,C=n(4258).codes,w=C.ERR_INVALID_ARG_TYPE,T=C.ERR_METHOD_NOT_IMPLEMENTED,k=C.ERR_MULTIPLE_CALLBACK,_=C.ERR_STREAM_CANNOT_PIPE,R=C.ERR_STREAM_DESTROYED,O=C.ERR_STREAM_ALREADY_FINISHED,I=C.ERR_STREAM_NULL_VALUES,N=C.ERR_STREAM_WRITE_AFTER_END,x=C.ERR_UNKNOWN_ENCODING,A=y.errorOrDestroy;function P(){}l(L.prototype,v.prototype),l(L,v);var D=h("kOnFinished");function M(e,t,r){"boolean"!=typeof r&&(r=t instanceof n(98547)),this.objectMode=!(!e||!e.objectMode),r&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?S(this,e,"writableHighWaterMark",r):E(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=q.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,B(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[D]=[]}function B(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function L(e){var t=this,r=this instanceof n(98547);if(!r&&!s(L,this))return new L(e);this._writableState=new M(e,this,r),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),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&m(e.signal,this)),v.call(this,e),y.construct(this,function(){var e=t._writableState;e.writing||G(t,e),X(t,e)})}function j(e,t,n,i){var o,a=e._writableState;if("function"==typeof n)i=n,n=a.defaultEncoding;else{if(n){if("buffer"!==n&&!g.isEncoding(n))throw new x(n)}else n=a.defaultEncoding;"function"!=typeof i&&(i=P)}if(null===t)throw new I;if(!a.objectMode)if("string"==typeof t)!1!==a.decodeStrings&&(t=g.from(t,n),n="buffer");else if(t instanceof g)n="buffer";else{if(!v._isUint8Array(t))throw new w("chunk",["string","Buffer","Uint8Array"],t);t=v._uint8ArrayToBuffer(t),n="buffer"}return a.ending?o=new N:a.destroyed&&(o=new R("write")),o?(r.nextTick(i,o),A(e,o,!0),o):(a.pendingcb++,function(e,t,n,r,i){var o=t.objectMode?1:n.length;t.length+=o;var a=t.length<t.highWaterMark;return a||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:n,encoding:r,callback:i}),t.allBuffers&&"buffer"!==r&&(t.allBuffers=!1),t.allNoop&&i!==P&&(t.allNoop=!1)):(t.writelen=o,t.writecb=i,t.writing=!0,t.sync=!0,e._write(n,r,t.onwrite),t.sync=!1),a&&!t.errored&&!t.destroyed}(e,a,t,n,i))}function F(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new R("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function U(e,t,n,r){--t.pendingcb,r(n),V(t),A(e,n)}function q(e,t){var n=e._writableState,i=n.sync,o=n.writecb;"function"==typeof o?(n.writing=!1,n.writecb=null,n.length-=n.writelen,n.writelen=0,t?(t.stack,n.errored||(n.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?r.nextTick(U,e,n,t,o):U(e,n,t,o)):(n.buffered.length>n.bufferedIndex&&G(e,n),i?null!==n.afterWriteTickInfo&&n.afterWriteTickInfo.cb===o?n.afterWriteTickInfo.count++:(n.afterWriteTickInfo={count:1,cb:o,stream:e,state:n},r.nextTick(H,n.afterWriteTickInfo)):W(e,n,1,o))):A(e,new k)}function H(e){var t=e.stream,n=e.state,r=e.count,i=e.cb;return n.afterWriteTickInfo=null,W(t,n,r,i)}
1function W(e,t,n,r){for(t.ending||e.destroyed||0!==t.length||!t.needDrain||(t.needDrain=!1,e.emit("drain"));n-- >0;)t.pendingcb--,r();t.destroyed&&V(t),X(e,t)}function V(e){if(!e.writing){for(var t,n=e.bufferedIndex;n<e.buffered.length;++n){var r,i=e.buffered[n],o=i.chunk,a=i.callback,s=e.objectMode?1:o.length;e.length-=s,a(null!=(r=e.errored)?r:new R("write"))}for(var c=e[D].splice(0),u=0;u<c.length;u++)c[u](null!=(t=e.errored)?t:new R("end"));B(e)}}function G(e,t){if(!(t.corked||t.bufferProcessing||t.destroyed)&&t.constructed){var n=t.buffered,r=t.bufferedIndex,i=t.objectMode,a=n.length-r;if(a){var s=r;if(t.bufferProcessing=!0,a>1&&e._writev){t.pendingcb-=a-1;var c=t.allNoop?P:function(e){for(var t=s;t<n.length;++t)n[t].callback(e)},u=t.allNoop&&0===s?n:o(n,s);u.allBuffers=t.allBuffers,F(e,t,!0,t.length,u,"",c),B(t)}else{do{var l=n[s],f=l.chunk,h=l.encoding,d=l.callback;n[s++]=null,F(e,t,!1,i?1:f.length,f,h,d)}while(s<n.length&&!t.writing);s===n.length?B(t):s>256?(n.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}}}function z(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function K(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){var n=!1;function i(i){if(n)A(e,null!=i?i:k());else if(n=!0,t.pendingcb--,i){for(var o=t[D].splice(0),a=0;a<o.length;a++)o[a](i);A(e,i,t.sync)}else z(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,r.nextTick(Y,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}(e,t)))}function X(e,t,n){z(t)&&(K(e,t),0===t.pendingcb&&(n?(t.pendingcb++,r.nextTick(function(e,t){z(t)?Y(e,t):t.pendingcb--},e,t)):z(t)&&(t.pendingcb++,Y(e,t))))}function Y(e,t){t.pendingcb--,t.finished=!0;for(var n=t[D].splice(0),r=0;r<n.length;r++)n[r]();if(e.emit("finish"),t.autoDestroy){var i=e._readableState;(!i||i.autoDestroy&&(i.endEmitted||!1===i.readable))&&e.destroy()}}M.prototype.getBuffer=function(){return o(this.buffered,this.bufferedIndex)},c(M.prototype,"bufferedRequestCount",{__proto__:null,get:function(){return this.buffered.length-this.bufferedIndex}}),c(L,d,{__proto__:null,value:function(e){return!!s(this,e)||this===L&&e&&e._writableState instanceof M}}),L.prototype.pipe=function(){A(this,new _)},L.prototype.write=function(e,t,n){return!0===j(this,e,t,n)},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||G(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=f(e)),!g.isEncoding(e))throw new x(e);return this._writableState.defaultEncoding=e,this},L.prototype._write=function(e,t,n){if(!this._writev)throw new T("_write()");this._writev([{chunk:e,encoding:t}],n)},L.prototype._writev=null,L.prototype.end=function(e,t,n){var i,o=this._writableState;if("function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e){var s=j(this,e,t);s instanceof a&&(i=s)}return o.corked&&(o.corked=1,this.uncork()),i||(o.errored||o.ending?o.finished?i=new O("end"):o.destroyed&&(i=new R("end")):(o.ending=!0,X(this,o,!0),o.ended=!0)),"function"==typeof n&&(i||o.finished?r.nextTick(n,i):o[D].push(n)),this},u(L.prototype,{closed:{__proto__:null,get:function(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get:function(){return!!this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get:function(){var e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set:function(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get:function(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get:function(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get:function(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get:function(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get:function(){var e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get:function(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get:function(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get:function(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get:function(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});var Z,$=y.destroy;function J(){return void 0===Z&&(Z={}),Z}L.prototype.destroy=function(e,t){var n=this._writableState;return!n.destroyed&&(n.bufferedIndex<n.buffered.length||n[D].length)&&r.nextTick(V,n),$.call(this,e,t),this},L.prototype._undestroy=y.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype[p.captureRejectionSymbol]=function(e){this.destroy(e)},L.fromWeb=function(e,t){return J().newStreamWritableFromWritableStream(e,t)},L.toWeb=function(e){return J().newWritableStreamFromStreamWritable(e)}},80098(e){e.exports=function(e,t){return function(n){return e(t(n))}}},80439(e,t,n){"use strict";var r=n(64883);e.exports=function(e){function t(e,n,i,o){var a=e[o++];if("__proto__"===a)return!0;var s=Number.isFinite(+a),c=o>=e.length;return a=!a&&r.isArray(i)?i.length:a,c?r.hasOwnProperty(i,a)?i[a]=[i[a],n]:i[a]=n:(i[a]&&r.isObject(i[a])||(i[a]=[]),t(e,n,i[a],o)&&r.isArray(i[a])&&(i[a]=function(e){var t,n,r={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)r[n=i[t]]=e[n];return r}(i[a]))),!s}if(r.isFormData(e)&&r.isFunction(e.entries)){var n={};return r.forEachEntry(e,function(e,i){t(function(e){return r.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),i,n,0)}),n}return null}}
1,80575(e,t,n){var r=n(73738);e.exports=function(e){var t=r(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},80616(e,t,n){var r=n(1550);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},80642(e,t,n){var r=n(40013),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var c=1&n,u=r(e),l=u.length;if(l!=r(t).length&&!c)return!1;for(var f=l;f--;){var h=u[f];if(!(c?h in t:i.call(t,h)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=c;++f<l;){var y=e[h=u[f]],m=t[h];if(o)var b=c?o(m,y,h,t,e,s):o(y,m,h,e,t,s);if(!(void 0===b?y===m||a(y,m,n,o,s):b)){v=!1;break}g||(g="constructor"==h)}if(v&&!g){var S=e.constructor,E=t.constructor;S==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof S&&S instanceof S&&"function"==typeof E&&E instanceof E||(v=!1)}return s.delete(e),s.delete(t),v}},80848(e,t,n){var r=n(80575);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},81156(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},81335(e,t,n){"use strict";var r=n(73738);e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===r(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},81834(e,t,n){var r=n(77710),i=n(13259),o=n(36660);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},82120(e,t,n){"use strict";e.exports=f;var r,i=n(86823),o=i.LongBits,a=i.base64,s=i.utf8;function c(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function f(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var h=function(){return i.Buffer?function(){return(f.create=function(){return new r})()}:function(){return new f}};function d(e,t,n){t[n]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function v(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function g(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}f.create=h(),f.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(f.alloc=i.pool(f.alloc,i.Array.prototype.subarray)),f.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},f.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:5,e)).len,this},f.prototype.int32=function(e){return e<0?this._push(v,10,o.fromNumber(e)):this.uint32(e)},f.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},f.prototype.uint64=function(e){var t=o.from(e);return this._push(v,t.length(),t)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(v,t.length(),t)},f.prototype.bool=function(e){return this._push(d,1,+!!e)},f.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(e){var t=o.from(e);return this._push(g,4,t.lo)._push(g,4,t.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},f.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var y=i.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};f.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(d,1,0);if(i.isString(e)){var n=f.alloc(t=a.length(e));a.decode(e,n,0),e=n}return this.uint32(t)._push(y,t,e)},f.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(d,1,0)},f.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new c(u,0,0),this.len=0,this},f.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},f.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},f.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},f._configure=function(e){r=e,f.create=h(),r._configure()}},82412(e,t,n){"use strict";var r=n(21076).Buffer,i=n(73738),o=n(93848),a=n(93033),s=n(60478);function c(e){return o.isPlainObject(e)||o.isArray(e)}function u(e){return o.endsWith(e,"[]")?e.slice(0,-2):e}function l(e,t,n){return e?e.concat(t).map(function(e,t){return e=u(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var f=o.toFlatObject(o,{},null,function(e){return/^is[A-Z]/.test(e)});e.exports=function(e,t,n){if(!o.isObject(e))throw TypeError("target must be an object");t=t||new(s||FormData);var h,d=(n=o.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!o.isUndefined(t[e])})).metaTokens,p=n.visitor||b,v=n.dots,g=n.indexes,y=(n.Blob||"undefined"!=typeof Blob&&Blob)&&(h=t)&&o.isFunction(h.append)&&"FormData"===h[Symbol.toStringTag]&&h[Symbol.iterator];if(!o.isFunction(p))throw TypeError("visitor must be a function");function m(e){if(null===e)return"";if(o.isDate(e))return e.toISOString();if(!y&&o.isBlob(e))throw new a("Blob is not supported. Use a Buffer instead.");return o.isArrayBuffer(e)||o.isTypedArray(e)?y&&"function"==typeof Blob?new Blob([e]):r.from(e):e}function b(e,n,r){var a=e;if(e&&!r&&"object"===i(e)){if(o.endsWith(n,"{}"))n=d?n:n.slice(0,-2),e=JSON.stringify(e);else if(o.isArray(e)&&function(e){return o.isArray(e)&&!e.some(c)}(e)||o.isFileList(e)||o.endsWith(n,"[]")&&(a=o.toArray(e)))return n=u(n),a.forEach(function(e,r){o.isUndefined(e)||null===e||t.append(!0===g?l([n],r,v):null===g?n:n+"[]",m(e))}),!1}return!!c(e)||(t.append(l(r,n,v),m(e)),!1)}var S=[],E=Object.assign(f,{defaultVisitor:b,convertValue:m,isVisitable:c});if(!o.isObject(e))throw TypeError("data must be an object");return function e(n,r){if(!o.isUndefined(n)){if(-1!==S.indexOf(n))throw Error("Circular reference detected in "+r.join("."));S.push(n),o.forEach(n,function(n,i){!0===(!(o.isUndefined(n)||null===n)&&p.call(t,n,o.isString(i)?i.trim():i,r,E))&&e(n,r?r.concat(i):[i])}),S.pop()}}(e),t}},83023(e,t,n){(t=e.exports=n(93956)).Stream=t,t.Readable=t,t.Writable=n(65252),t.Duplex=n(16262),t.Transform=n(48530),t.PassThrough=n(6032),t.finished=n(56350),t.pipeline=n(1790)},83118(e,t,n){var r=n(43573),i=n(38597),o=n(75212),a=n(78504),s=n(80616);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},83227(e,t,n){"use strict";var r=n(84823);function i(e){if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});var t,n=this;this.promise.then(function(e){if(n._listeners){for(var t=n._listeners.length;t-- >0;)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,r=new Promise(function(e){n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,i,o){n.reason||(n.reason=new r(e,i,o),t(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},83284(e,t){"use strict";var n=t;n.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},n.read=function(e,t,n){if(n-t<1)return"";for(var r,i=null,o=[],a=0;t<n;)(r=e[t++])<128?o[a++]=r:r>191&&r<224?o[a++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(r>>10),o[a++]=56320+(1023&r)):o[a++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0);return i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))},n.write=function(e,t,n){for(var r,i,o=n,a=0;a<e.length;++a)(r=e.charCodeAt(a))<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(55296==(64512&r)&&56320==(64512&(i=e.charCodeAt(a+1)))?(r=65536+((1023&r)<<10)+(1023&i),++a,t[n++]=r>>18|240,t[n++]=r>>12&63|128):t[n++]=r>>12|224,t[n++]=r>>6&63|128),t[n++]=63&r|128);return n-o}},83592(e,t,n){"use strict";var r=n(93848),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e&&r.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=r.trim(e.slice(0,o)).toLowerCase(),n=r.trim(e.slice(o+1)),t&&(a[t]&&i.indexOf(t)>=0||(a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n))}),a}},83672(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},83733(e,t,n){var r=n(78477);e.exports=function(){this.__data__=r?r(null):{},this.size=0}}
vendor: 8,801 bytes, line 1
1,84226(e,t,n){"use strict";var r=n(87558);function i(e,t,n){r.call(this,null==e?"canceled":e,r.ERR_CANCELED,t,n),this.name="CanceledError"}n(64883).inherits(i,r,{__CANCEL__:!0}),e.exports=i},84789(e,t,n){"use strict";e.exports=n(51189)},84823(e,t,n){"use strict";var r=n(93033);function i(e,t,n){r.call(this,null==e?"canceled":e,r.ERR_CANCELED,t,n),this.name="CanceledError"}n(93848).inherits(i,r,{__CANCEL__:!0}),e.exports=i},85160(e){e.exports=function(e){return function(t){return e(t)}}},85715(e,t,n){var r=n(92987),i=n(81156),o=n(17122),a=n(47752);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},86174(e,t,n){"use strict";var r=n(73738),i=n(1309),o=n(81335);function a(){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=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){return o.isString(e)&&(e=b(e)),e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var s=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["'"].concat(["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n"," "])),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=n(12347);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw TypeError("Parameter 'url' must be a string, not "+r(e));var a=e.indexOf("?"),c=-1!==a&&a<e.indexOf("#")?"?":"#",b=e.split(c);b[0]=b[0].replace(/\\/g,"/");var S=e=b.join(c);if(S=S.trim(),!n&&1===e.split("#").length){var E=u.exec(S);if(E)return this.path=S,this.href=S,this.pathname=E[1],E[2]?(this.search=E[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var C=s.exec(S);if(C){var w=(C=C[0]).toLowerCase();this.protocol=w,S=S.substr(C.length)}if(n||C||S.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===S.substr(0,2);!T||C&&g[C]||(S=S.substr(2),this.slashes=!0)}if(!g[C]&&(T||C&&!y[C])){for(var k,_,R,O=-1,I=0;I<h.length;I++)-1!==(k=S.indexOf(h[I]))&&(-1===O||k<O)&&(O=k);for(-1!==(R=-1===O?S.lastIndexOf("@"):S.lastIndexOf("@",O))&&(_=S.slice(0,R),S=S.slice(R+1),this.auth=decodeURIComponent(_)),O=-1,I=0;I<f.length;I++)-1!==(k=S.indexOf(f[I]))&&(-1===O||k<O)&&(O=k);-1===O&&(O=S.length),this.host=S.slice(0,O),S=S.slice(O),this.parseHost(),this.hostname=this.hostname||"";var N="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!N)for(var x=this.hostname.split(/\./),A=(I=0,x.length);I<A;I++){var P=x[I];if(P&&!P.match(d)){for(var D="",M=0,B=P.length;M<B;M++)P.charCodeAt(M)>127?D+="x":D+=P[M];if(!D.match(d)){var L=x.slice(0,I),j=x.slice(I+1),F=P.match(p);F&&(L.push(F[1]),j.unshift(F[2])),j.length&&(S="/"+j.join(".")+S),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=i.toASCII(this.hostname));var U=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+U,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==S[0]&&(S="/"+S))}if(!v[w])for(I=0,A=l.length;I<A;I++){var H=l[I];if(-1!==S.indexOf(H)){var W=encodeURIComponent(H);W===H&&(W=escape(H)),S=S.split(H).join(W)}}var V=S.indexOf("#");-1!==V&&(this.hash=S.substr(V),S=S.slice(0,V));var G=S.indexOf("?");if(-1!==G?(this.search=S.substr(G),this.query=S.substr(G+1),t&&(this.query=m.parse(this.query)),S=S.slice(0,G)):t&&(this.search="",this.query={}),S&&(this.pathname=S),y[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var z=this.search||"";this.path=U+z}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":")+"@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";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&&(a=m.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(s=s.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(o.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var n=new a,r=Object.keys(this),i=0;i<r.length;i++){var s=r[i];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var l=c[u];"protocol"!==l&&(n[l]=e[l])}return y[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!y[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var d=f[h];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var v=n.pathname||"",m=n.search||"";n.path=v+m}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),S=e.host||e.pathname&&"/"===e.pathname.charAt(0),E=S||b||n.host&&e.pathname,C=E,w=n.pathname&&n.pathname.split("/")||[],T=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!y[n.protocol]);if(T&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),E=E&&(""===p[0]||""===w[0])),S)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=p;else if(p.length)w||(w=[]),w.pop(),w=w.concat(p),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search))return T&&(n.hostname=n.host=w.shift(),(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift())),n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=w.slice(-1)[0],_=(n.host||e.host||w.length>1)&&("."===k||".."===k)||""===k,R=0,O=w.length;O>=0;O--)"."===(k=w[O])?w.splice(O,1):".."===k?(w.splice(O,1),R++):R&&(w.splice(O,1),R--);if(!E&&!C)for(;R--;)w.unshift("..");!E||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),_&&"/"!==w.join("/").substr(-1)&&w.push("");var I,N=""===w[0]||w[0]&&"/"===w[0].charAt(0);return T&&(n.hostname=n.host=N?"":w.length?w.shift():"",(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift())),(E=E||n.host&&w.length)&&!N&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},86216(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},86295(e,t,n){e=n.nmd(e);var r,i,o,a,s,c,u=n(73738);i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,o=/^(?=([^\/?#]*))\1([^]*)$/,a=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,c={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=c.parseURL(e);if(!r)throw Error("Error trying to parse base URL.");return r.path=c.normalizePath(r.path),c.buildURLFromParts(r)}var i=c.parseURL(t);if(!i)throw Error("Error trying to parse relative URL.");
1if(i.scheme)return n.alwaysNormalize?(i.path=c.normalizePath(i.path),c.buildURLFromParts(i)):t;var a=c.parseURL(e);if(!a)throw Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var s=o.exec(a.path);a.netLoc=s[1],a.path=s[2]}a.netLoc&&!a.path&&(a.path="/");var u={scheme:a.scheme,netLoc:i.netLoc,path:null,params:i.params,query:i.query,fragment:i.fragment};if(!i.netLoc&&(u.netLoc=a.netLoc,"/"!==i.path[0]))if(i.path){var l=a.path,f=l.substring(0,l.lastIndexOf("/")+1)+i.path;u.path=c.normalizePath(f)}else u.path=a.path,i.params||(u.params=a.params,i.query||(u.query=a.query));return null===u.path&&(u.path=n.alwaysNormalize?c.normalizePath(i.path):i.path),c.buildURLFromParts(u)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(a,"");e.length!==(e=e.replace(s,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},"object"===u(t)&&"object"===u(e)?e.exports=c:void 0===(r=(function(){return c}).apply(t,[]))||(e.exports=r)},86632(e){e.exports=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}},86768(e,t,n){var r=n(68135),i=n(60852),o=n(61110);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},86823(e,t,n){"use strict";var r=n(6365),i=n(73738),o=t;function a(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;++i)void 0!==e[r[i]]&&n||(e[r[i]]=t[r[i]]);return e}function s(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack||""}),n&&a(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}o.asPromise=n(20028),o.base64=n(41084),o.EventEmitter=n(38177),o.float=n(58755),o.inquire=n(96116),o.utf8=n(83284),o.pool=n(75969),o.LongBits=n(1356),o.isNode=!!(void 0!==r&&r&&r.process&&r.process.versions&&r.process.versions.node),o.global=o.isNode&&r||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,o.emptyArray=Object.freeze?Object.freeze([]):[],o.emptyObject=Object.freeze?Object.freeze({}):{},o.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},o.isString=function(e){return"string"==typeof e||e instanceof String},o.isObject=function(e){return e&&"object"===i(e)},o.isset=o.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!==i(n)||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},o.Buffer=function(){try{var e=o.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),o._Buffer_from=null,o._Buffer_allocUnsafe=null,o.newBuffer=function(e){return"number"==typeof e?o.Buffer?o._Buffer_allocUnsafe(e):new o.Array(e):o.Buffer?o._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},o.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,o.Long=o.global.dcodeIO&&o.global.dcodeIO.Long||o.global.Long||o.inquire("long"),o.key2Re=/^true|false|0|1$/,o.key32Re=/^-?(?:0|[1-9][0-9]*)$/,o.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,o.longToHash=function(e){return e?o.LongBits.from(e).toHash():o.LongBits.zeroHash},o.longFromHash=function(e,t){var n=o.LongBits.fromHash(e);return o.Long?o.Long.fromBits(n.lo,n.hi,t):n.toNumber(!!t)},o.merge=a,o.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},o.newError=s,o.ProtocolError=s("ProtocolError"),o.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},o.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},o.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},o._configure=function(){var e=o.Buffer;e?(o._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},o._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):o._Buffer_from=o._Buffer_allocUnsafe=null}},86833(){},86855(e){e.exports=function(e,t){return null==e?void 0:e[t]}},87092(e,t,n){"use strict";var r=n(73738),i=n(16477),o=i.SymbolAsyncIterator,a=i.SymbolIterator,s=i.SymbolFor,c=s("nodejs.stream.destroyed"),u=s("nodejs.stream.errored"),l=s("nodejs.stream.readable"),f=s("nodejs.stream.writable"),h=s("nodejs.stream.disturbed");function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||n&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null==(t=e._readableState)?void 0:t.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null==(t=e._writableState)?void 0:t.writable))}function v(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||v(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function y(e){return!(!e||v(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function m(e){return!(!e||v(e)||"object"!==r(e.readable)||"object"!==r(e.writable))}function b(e){if(!v(e))return null;var t=e._writableState,n=e._readableState,r=t||n;return!!(e.destroyed||e[c]||null!=r&&r.destroyed)}function S(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;var t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function E(e,t){if(!d(e))return null;var n=e._readableState;return(null==n||!n.errored)&&("boolean"!=typeof(null==n?void 0:n.endEmitted)?null:!!(n.endEmitted||!1===t&&!0===n.ended&&0===n.length))}function C(e){return e&&null!=e[l]?e[l]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!b(e)&&d(e)&&e.readable&&!E(e)}function w(e){return e&&null!=e[f]?e[f]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!b(e)&&p(e)&&e.writable&&!S(e)}function T(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function k(e){return"boolean"==typeof e._sent100&&T(e)}e.exports={isDestroyed:b,kIsDestroyed:c,isDisturbed:function(e){var t;return!(!e||!(null!=(t=e[h])?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:h,isErrored:function(e){var t,n,r,i,o,a,s,c,l,f;return!(!e||!(null!=(t=null!=(n=null!=(r=null!=(i=null!=(o=null!=(a=e[u])?a:e.readableErrored)?o:e.writableErrored)?i:null==(s=e._readableState)?void 0:s.errorEmitted)?r:null==(c=e._writableState)?void 0:c.errorEmitted)?n:null==(l=e._readableState)?void 0:l.errored)?t:null==(f=e._writableState)?void 0:f.errored))},kIsErrored:u,isReadable:C,kIsReadable:l,kIsClosedPromise:s("nodejs.webstream.isClosedPromise"),kControllerErrorFunction:s("nodejs.webstream.controllerErrorFunction"),kIsWritable:f,isClosed:function(e){if(!v(e))return null;if("boolean"==typeof e.closed)return e.closed;var t=e._writableState,n=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==n?void 0:n.closed)?(null==t?void 0:t.closed)||(null==n?void 0:n.closed):"boolean"==typeof e._closed&&T(e)?e._closed:null}
1,isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return v(e)?!!b(e)||(!1===(null==t?void 0:t.readable)||!C(e))&&(!1===(null==t?void 0:t.writable)||!w(e)):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[o]:!1===t?"function"==typeof e[a]:"function"==typeof e[o]||"function"==typeof e[a])},isReadableNodeStream:d,isReadableStream:g,isReadableEnded:function(e){if(!d(e))return null;if(!0===e.readableEnded)return!0;var t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:E,isReadableErrored:function(e){var t,n;return v(e)?e.readableErrored?e.readableErrored:null!=(t=null==(n=e._readableState)?void 0:n.errored)?t:null:null},isNodeStream:v,isWebStream:function(e){return g(e)||y(e)||m(e)},isWritable:w,isWritableNodeStream:p,isWritableStream:y,isWritableEnded:S,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;var n=e._writableState;return(null==n||!n.errored)&&("boolean"!=typeof(null==n?void 0:n.finished)?null:!!(n.finished||!1===t&&!0===n.ended&&0===n.length))},isWritableErrored:function(e){var t,n;return v(e)?e.writableErrored?e.writableErrored:null!=(t=null==(n=e._writableState)?void 0:n.errored)?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null==(t=e.req)?void 0:t.upgradeOrConnect)},isServerResponse:k,willEmitClose:function(e){if(!v(e))return null;var t=e._writableState,n=e._readableState,r=t||n;return!r&&k(e)||!!(r&&r.autoDestroy&&r.emitClose&&!1===r.closed)},isTransformStream:m}},87412(e,t,n){e.exports=n(77055)({Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"})},87469(e,t,n){var r=n(18893);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},87558(e,t,n){"use strict";var r=n(64883);function i(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){a[e]={value:e}}),Object.defineProperties(i,a),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,n,a,s,c){var u=Object.create(o);return r.toFlatObject(e,u,function(e){return e!==Error.prototype}),i.call(u,e.message,t,n,a,s),u.cause=e,u.name=e.name,c&&Object.assign(u,c),u},e.exports=i},87632(e,t,n){var r=n(21076),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return r.SlowBuffer(e)}},88093(e,t,n){var r=n(69918),i=n(13789);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,function(e,r,i){o[++n]=t(e,r,i)}),o}},88122(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=u}return(d?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,h=5960464477539062e-23*(23===i),d=r?0:o-1,p=r?1:-1,v=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+d]=255&a,d+=p,a/=256,u-=8);e[n+d-p]|=128*v}},88422(e,t,n){"use strict";
1e.exports={isBrowser:!0,classes:{URLSearchParams:n(19718),FormData:n(64823),Blob},protocols:["http","https","file","blob","url","data"]}},88836(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},89045(e,t,n){var r=n(73738).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},89207(e){e.exports=function(e){return function(){return e}}},90290(e,t,n){var r=n(13789),i=n(46431);e.exports=function(e){return i(e)&&r(e)}},90380(e,t,n){var r=n(27018),i=n(14348),o=n(13789);e.exports=function(e){return o(e)?r(e,!0):i(e)}},90431(e,t,n){var r=n(41748),i=n(86855);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},90557(e,t,n){"use strict";var r=n(54756),i=n(29293),o=n(37195).pipeline,a=n(98547),s=n(14515).destroyer,c=n(87092),u=c.isNodeStream,l=c.isReadable,f=c.isWritable,h=c.isWebStream,d=c.isTransformStream,p=c.isWritableStream,v=c.isReadableStream,g=n(4258),y=g.AbortError,m=g.codes,b=m.ERR_INVALID_ARG_VALUE,S=m.ERR_MISSING_ARGS,E=n(79625);e.exports=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new S("streams");if(1===t.length)return a.from(t[0]);var c,g,m,C,w,T=[].concat(t);if("function"==typeof t[0]&&(t[0]=a.from(t[0])),"function"==typeof t[t.length-1]){var k=t.length-1;t[k]=a.from(t[k])}for(var _=0;_<t.length;++_)if(u(t[_])||h(t[_])){if(_<t.length-1&&!(l(t[_])||v(t[_])||d(t[_])))throw new b("streams[".concat(_,"]"),T[_],"must be readable");if(_>0&&!(f(t[_])||p(t[_])||d(t[_])))throw new b("streams[".concat(_,"]"),T[_],"must be writable")}var R=t[0],O=o(t,function(e){var t=C;C=null,t?t(e):e?w.destroy(e):N||I||w.destroy()}),I=!!(f(R)||p(R)||d(R)),N=!!(l(O)||v(O)||d(O));if(w=new a({writableObjectMode:!(null==R||!R.writableObjectMode),readableObjectMode:!(null==O||!O.readableObjectMode),writable:I,readable:N}),I){if(u(R))w._write=function(e,t,n){R.write(e,t)?n():c=n},w._final=function(e){R.end(),g=e},R.on("drain",function(){if(c){var e=c;c=null,e()}});else if(h(R)){var x=(d(R)?R.writable:R).getWriter();w._write=function(){var e=i(r.mark(function e(t,n,i){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,x.ready;case 1:x.write(t).catch(function(){}),i(),e.next=3;break;case 2:e.prev=2,i(e.catch(0));case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t,n,r){return e.apply(this,arguments)}}(),w._final=function(){var e=i(r.mark(function e(t){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,x.ready;case 1:x.close().catch(function(){}),g=t,e.next=3;break;case 2:e.prev=2,t(e.catch(0));case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}()}E(d(O)?O.readable:O,function(){if(g){var e=g;g=null,e()}})}if(N){if(u(O))O.on("readable",function(){if(m){var e=m;m=null,e()}}),O.on("end",function(){w.push(null)}),w._read=function(){for(;;){var e=O.read();if(null===e)return void(m=w._read);if(!w.push(e))return}};else if(h(O)){var A=(d(O)?O.readable:O).getReader();w._read=i(r.mark(function e(){var t,n,i;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=1,e.next=2,A.read();case 2:if(n=(t=e.sent).value,i=t.done,w.push(n)){e.next=3;break}return e.abrupt("return");case 3:if(!i){e.next=4;break}return w.push(null),e.abrupt("return");case 4:e.next=6;break;case 5:return e.prev=5,e.catch(1),e.abrupt("return");case 6:e.next=0;break;case 7:case"end":return e.stop()}},e,null,[[1,5]])}))}}return w._destroy=function(e,t){e||null===C||(e=new y),m=null,c=null,g=null,null===C?t(e):(C=t,u(O)&&s(O,e))},w}},90623(e,t,n){var r=n(50303);e.exports=n(172)(function(e,t,n){r(e,t,n)})},91059(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},91208(e){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},91375(e,t,n){var r=n(86632),i=n(77662),o=n(36458),a=n(57794);e.exports=function(e,t){return function(n,s){var c=a(n)?r:i,u=t?t():{};return c(n,e,o(s,2),u)}}},91567(e,t,n){"use strict";var r=n(93848);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},91598(e,t,n){var r=n(7908),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),c=Array(s);++a<s;)c[a]=o[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=o[a];return u[t]=n(c),r(e,this,u)}}},91669(e){e.exports={version:"0.30.0"}},91752(e,t,n){var r=n(78477),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},91831(e,t,n){"use strict";var r=n(64883),i=n(57243);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a));var s,c=n&&n.encode||o,u=n&&n.serialize;return(s=u?u(t,n):r.isURLSearchParams(t)?t.toString():new i(t,n).toString(c))&&(e+=(-1===e.indexOf("?")?"?":"&")+s),e}},92483(e,t,n){"use strict";var r=n(93848);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isEmptyObject(t)?r.merge({},e):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function c(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=u[e]||o,i=t(e);r.isUndefined(i)&&t!==c||(n[e]=i)}),n}},92600(e,t,n){var r=n(80848);e.exports=function(e){return r(this,e).has(e)}},92710(e,t,n){var r=n(36620),i=n(22983);e.exports=function(e,t){return e&&r(t,i(t),e)}},92922(e,t,n){e.exports=n(90431)(n(18090),"WeakMap")},92987(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},93033(e,t,n){"use strict";var r=n(93848);function i(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,a={};
1["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){a[e]={value:e}}),Object.defineProperties(i,a),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,n,a,s,c){var u=Object.create(o);return r.toFlatObject(e,u,function(e){return e!==Error.prototype}),i.call(u,e.message,t,n,a,s),u.cause=e,u.name=e.name,c&&Object.assign(u,c),u},e.exports=i},93257(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},93513(e,t,n){var r=n(25172);e.exports=function(e){var t={},n=!1;function i(t,i){return n=!0,{done:!1,value:new r(i=new Promise(function(n){n(e[t](i))}),1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):i("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return i("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):i("return",e)}),t},e.exports.__esModule=!0,e.exports.default=e.exports},93579(e,t){var n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:function(){return!1},commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};t.buildOptions=function(e){return Object.assign({},n,e)},t.defaultOptions=n},93848(e,t,n){"use strict";var r,i=n(73738),o=n(47312),a=Object.prototype.toString,s=(r=Object.create(null),function(e){var t=a.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function c(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function u(e){return Array.isArray(e)}function l(e){return void 0===e}var f=c("ArrayBuffer");function h(e){return"number"==typeof e}function d(e){return null!==e&&"object"===i(e)}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var v=c("Date"),g=c("File"),y=c("Blob"),m=c("FileList");function b(e){return"[object Function]"===a.call(e)}var S=c("URLSearchParams");function E(e,t){if(null!=e)if("object"!==i(e)&&(e=[e]),u(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var C,w,T=(C="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return C&&e instanceof C}),k=c("HTMLFormElement");e.exports={isArray:u,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||a.call(e)===t||b(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:h,isObject:d,isPlainObject:p,isEmptyObject:function(e){return e&&0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype},isUndefined:l,isDate:v,isFile:g,isBlob:y,isFunction:b,isStream:function(e){return d(e)&&b(e.pipe)},isURLSearchParams:S,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:E,merge:function e(){var t={};function n(n,r){p(t[r])&&p(n)?t[r]=e(t[r],n):p(n)?t[r]=e({},n):u(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)E(arguments[r],n);return t},extend:function(e,t,n){return E(t,function(t,r){e[r]=n&&"function"==typeof t?o(t,n):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return -1!==r&&r===n},toArray:function(e){if(!e)return null;if(u(e))return e;var t=e.length;
vendor: 6,787 bytes, line 1
1if(!h(t))return null;for(var n=Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:T,isFileList:m,forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var i=n.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:k,hasOwnProperty:(w=Object.prototype.hasOwnProperty,function(e,t){return w.call(e,t)})}},93956(e,t,n){"use strict";var r,i=n(6365),o=n(215);e.exports=_,_.ReadableState=k,n(37370).EventEmitter;var a,s=function(e,t){return e.listeners(t).length},c=n(79161),u=n(21076).Buffer,l=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=n(86833);a=f&&f.debuglog?f.debuglog("stream"):function(){};var h,d,p,v=n(44441),g=n(59160),y=n(65483).getHighWaterMark,m=n(14624).F,b=m.ERR_INVALID_ARG_TYPE,S=m.ERR_STREAM_PUSH_AFTER_EOF,E=m.ERR_METHOD_NOT_IMPLEMENTED,C=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(64939)(_,c);var w=g.errorOrDestroy,T=["error","close","destroy","pause","resume"];function k(e,t,i){r=r||n(16262),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",i),this.buffer=new v,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&&(h||(h=n(28436).StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function _(e){if(r=r||n(16262),!(this instanceof _))return new _(e);var t=this instanceof r;this._readableState=new k(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function R(e,t,n,r,i){a("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(a("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?x(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,A(e)))}}(e,s);else if(i||(o=function(e,t){var n,r;return r=t,u.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],t)),n}(s,t)),o)w(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r)s.endEmitted?w(e,new C):O(e,s,t,!0);else if(s.ended)w(e,new S);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?O(e,s,t,!1):P(e,s)):O(e,s,t,!1)}else r||(s.reading=!1,P(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&x(e)),P(e,t)}Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=g.destroy,_.prototype._undestroy=g.undestroy,_.prototype._destroy=function(e,t){t(e)},_.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=u.from(e,t),t=""),n=!0),R(this,e,t,!1,n)},_.prototype.unshift=function(e){return R(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){h||(h=n(28436).StringDecoder);var t=new h(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var I=0x40000000;function N(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=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(A,e))}function A(e){var t=e._readableState;a("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,j(e)}function P(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(D,e,t))}function D(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(a("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function M(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 B(e){a("readable nexttick read 0"),e.read(0)}function L(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){var n;return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n)}function U(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(q,t,e))}function q(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function H(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return -1}_.prototype.read=function(e){a("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return a("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):x(this),null;if(0===(e=N(e,t))&&t.ended)return 0===t.length&&U(this),null;var r,i=t.needReadable;
vendor: 6,286 bytes, line 1
1return a("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&a("length less than watermark",i=!0),t.ended||t.reading?a("reading or ended",i=!1):i&&(a("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=N(n,t))),null===(r=e>0?F(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),n!==e&&t.ended&&U(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(e){w(this,new E("_read()"))},_.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,a("pipe count=%d opts=%j",r.pipesCount,t);var i=t&&!1===t.end||e===o.stdout||e===o.stderr?g:u;function c(t,i){a("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,a("cleanup"),e.removeListener("close",p),e.removeListener("finish",v),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",c),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",h),f=!0,r.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l())}function u(){a("onend"),e.end()}r.endEmitted?o.nextTick(i):n.once("end",i),e.on("unpipe",c);var l=function(e){return function(){var t=e._readableState;a("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",l);var f=!1;function h(t){a("ondata");var i=e.write(t);a("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==H(r.pipes,e))&&!f&&(a("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function d(t){a("onerror",t),g(),e.removeListener("error",d),0===s(e,"error")&&w(e,t)}function p(){e.removeListener("finish",v),g()}function v(){a("onfinish"),e.removeListener("close",p),g()}function g(){a("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",d),e.once("close",p),e.once("finish",v),e.emit("pipe",n),r.flowing||(a("pipe resume"),n.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,n={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,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=H(t.pipes,e);return -1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},_.prototype.on=function(e,t){var n=c.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,a("on readable",r.length,r.reading),r.length?x(this):r.reading||o.nextTick(B,this))),n},_.prototype.addListener=_.prototype.on,_.prototype.removeListener=function(e,t){var n=c.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(M,this),n},_.prototype.removeAllListeners=function(e){var t=c.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||o.nextTick(M,this),t},_.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(L,e,t))}(this,e)),e.paused=!1,this},_.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},_.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(a("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){a("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<T.length;o++)e.on(T[o],this.emit.bind(this,T[o]));return this._read=function(t){a("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(_.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n(41771)),d(this)}),Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(_.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(_.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),_._fromList=F,Object.defineProperty(_.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(_.from=function(e,t){return void 0===p&&(p=n(20437)),p(_,e,t)})},94672(e,t,n){var r,i,o=n(6365),a=n(73738);void 0===(i="function"==typeof(r=function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e,t,n){return t=l(t),d(e,h()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n))}function r(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=b(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=v(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(null,arguments)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function d(e,n){if(n&&("object"==a(n)||"function"==typeof n))return n;if(void 0!==n)throw TypeError("Derived constructors may only return object or undefined");return t(e)}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}function g(e,t,n,r){var i=u(l(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function y(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e){var t=y(e,"string");return"symbol"==a(t)?t:t+""}function b(t,n){if(t){if("string"==typeof t)return e(t,n);var r=({}).toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function S(e){var t;try{t=new Event("abort")}catch(e){"undefined"!=typeof document?document.createEvent?(t=document.createEvent("Event")).initEvent("abort",!1,!1):(t=document.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function E(e){if(void 0===e)if("undefined"==typeof document)(e=Error("This operation was aborted")).name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch(t){(e=Error("This operation was aborted")).name="AbortError"}return e}!function(e){e.AbortSignal,e.AbortController}("undefined"!=typeof self?self:o);var C=function(){function e(){r(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return s(e,[{key:"addEventListener",value:function(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}},{key:"removeEventListener",value:function(e,t){if(e in this.listeners){for(var n=this.listeners[e],r=0,i=n.length;r<i;r++)if(n[r].callback===t)return void n.splice(r,1)}}},{key:"dispatchEvent",value:function(e){var t=this;if(e.type in this.listeners){for(var n=this.listeners[e.type].slice(),r=function(){var r=n[i];try{r.callback.call(t,e)}catch(e){Promise.resolve().then(function(){throw e})}r.options&&r.options.once&&t.removeEventListener(e.type,r.callback)},i=0,o=n.length;i<o;i++)r();return!e.defaultPrevented}}}])}(),w=function(e){function t(){var e;return r(this,t),(e=n(this,t)).listeners||C.call(e),Object.defineProperty(e,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(e,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(e,"reason",{value:void 0,writable:!0,configurable:!0}),e}return f(t,e),s(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(e){"abort"===e.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,e)),g(t,"dispatchEvent",this,3)([e])}},{key:"throwIfAborted",value:function(){var e=this.aborted,t=this.reason;if(e)throw void 0===t?"Aborted":t}}],[{key:"timeout",value:function(e){var t=new T;return setTimeout(function(){return t.abort(new DOMException("This signal is timeout in ".concat(e,"ms"),"TimeoutError"))},e),t.signal}},{key:"any",value:function(e){var t=new T;function n(){t.abort(this.reason),r()}function r(){var t,r=c(e);try{for(r.s();!(t=r.n()).done;)t.value.removeEventListener("abort",n)}catch(e){r.e(e)}finally{r.f()}}var i,o=c(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a.aborted){t.abort(a.reason);break}a.addEventListener("abort",n)}}catch(e){o.e(e)}finally{o.f()}return t.signal}}])}(C),T=function(){function e(){r(this,e),Object.defineProperty(this,"signal",{value:new w,writable:!0,configurable:!0})}return s(e,[{key:"abort",value:function(e){var t=E(e),n=S(t);
1this.signal.reason=t,this.signal.dispatchEvent(n)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();function k(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof e.Request&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function _(e){"function"==typeof e&&(e={fetch:e});var t=e,n=t.fetch,r=t.Request,i=void 0===r?n.Request:r,o=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,s=void 0!==a&&a;if(!k({fetch:n,Request:i,AbortController:o,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:n,Request:c};var c=i;(c&&!c.prototype.hasOwnProperty("signal")||s)&&((c=function(e,t){t&&t.signal&&(n=t.signal,delete t.signal);var n,r=new i(e,t);return n&&Object.defineProperty(r,"signal",{writable:!1,enumerable:!1,configurable:!0,value:n}),r}).prototype=i.prototype);var u=n;return{fetch:function(e,t){var n=c&&c.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){try{r=new DOMException("Aborted","AbortError")}catch(e){(r=Error("Aborted")).name="AbortError"}if(n.aborted)return Promise.reject(r);var r,i=new Promise(function(e,t){n.addEventListener("abort",function(){return t(r)},{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,u(e,t)])}return u(e,t)},Request:c}}"undefined"!=typeof Symbol&&Symbol.toStringTag&&(T.prototype[Symbol.toStringTag]="AbortController",w.prototype[Symbol.toStringTag]="AbortSignal"),function(e){if(k(e))if(e.fetch){var t=_(e),n=t.fetch,r=t.Request;e.fetch=n,e.Request=r,Object.defineProperty(e,"AbortController",{writable:!0,enumerable:!1,configurable:!0,value:T}),Object.defineProperty(e,"AbortSignal",{writable:!0,enumerable:!1,configurable:!0,value:w})}else console.warn("fetch() is not available, cannot install abortcontroller-polyfill")}("undefined"!=typeof self?self:o)})?r.call(t,n,t,e):r)||(e.exports=i)},94920(e,t,n){var r=n(21076).Buffer,i=n(6365),o=n(215),a=n(10147),s=n(64939),c=n(37522),u=n(83023),l=c.IncomingMessage,f=c.readyStates,h=e.exports=function(e){var t,n=this;u.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+r.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){n.setHeader(t,e.headers[t])});var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!a.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!a.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return a.fetch&&t?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&e?"arraybuffer":"text"}(t,i),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",function(){n._onFinish()})};s(h,u.Writable),h.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===d.indexOf(n)&&(this._headers[n]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,r=null;"GET"!==t.method&&"HEAD"!==t.method&&(r=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach(function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach(function(e){s.push([t,e])}):s.push([t,r])}),"fetch"===e._mode){var c=null;if(a.abortController){var u=new AbortController;c=u.signal,e._fetchAbortController=u,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=i.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}i.fetch(e._opts.url,{method:e._opts.method,headers:s,body:r||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then(function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()},function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)})}else{var l=e._xhr=new i.XMLHttpRequest;try{l.open(e._opts.method,e._opts.url,!0)}catch(t){return void o.nextTick(function(){e.emit("error",t)})}"responseType"in l&&(l.responseType=e._mode),"withCredentials"in l&&(l.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain;
1 charset=x-user-defined"),"requestTimeout"in t&&(l.timeout=t.requestTimeout,l.ontimeout=function(){e.emit("requestTimeout")}),s.forEach(function(e){l.setRequestHeader(e[0],e[1])}),e._response=null,l.onreadystatechange=function(){switch(l.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(l.onprogress=function(){e._onXHRProgress()}),l.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",Error("XHR error")))};try{l.send(r)}catch(t){return void o.nextTick(function(){e.emit("error",t)})}}}},h.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},h.prototype._write=function(e,t,n){this._body.push(e),n()},h.prototype._resetTimers=function(e){var t=this;i.clearTimeout(t._socketTimer),t._socketTimer=null,e?(i.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=i.setTimeout(function(){t.emit("timeout")},t._socketTimeout))},h.prototype.abort=h.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},h.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),u.Writable.prototype.end.call(this,e,t,n)},h.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},h.prototype.flushHeaders=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var d=["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"]},95110(e){e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return -1}},95636(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},95683(e,t,n){var r=n(83118);e.exports=function(){this.__data__=new r,this.size=0}},95897(e,t,n){"use strict";var r=n(64883);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},96023(e){e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)t.call(r,i)&&(e[i]=r[i])}return e};var t=Object.prototype.hasOwnProperty},96116(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},96421(e,t,n){var r=n(15135);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,c=null===t,u=t==t,l=r(t);if(!c&&!l&&!a&&e>t||a&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!l&&e<t||l&&n&&o&&!i&&!a||c&&n&&o||!s&&o||!u)return -1}return 0}},96858(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e*=1))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},96933(e){var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},97395(e,t,n){var r=n(73738),i=n(46441),o=n(13789),a=n(68804),s=n(55416);e.exports=function(e,t,n){if(!s(n))return!1;var c=r(t);return!!("number"==c?o(n)&&a(t,n.length):"string"==c&&t in n)&&i(n[t],e)}},97478(e,t,n){var r=n(95110),i=n(36458),o=n(37790),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return -1;var c=null==n?0:o(n);return c<0&&(c=a(s+c,0)),r(e,i(t,3),c)}}
1,97681(e,t,n){"use strict";var r=n(21076).Buffer,i=n(73738),o=n(64883),a=n(87558),s=n(235);function c(e){return o.isPlainObject(e)||o.isArray(e)}function u(e){return o.endsWith(e,"[]")?e.slice(0,-2):e}function l(e,t,n){return e?e.concat(t).map(function(e,t){return e=u(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var f=o.toFlatObject(o,{},null,function(e){return/^is[A-Z]/.test(e)});e.exports=function(e,t,n){if(!o.isObject(e))throw TypeError("target must be an object");t=t||new(s||FormData);var h,d=(n=o.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!o.isUndefined(t[e])})).metaTokens,p=n.visitor||b,v=n.dots,g=n.indexes,y=(n.Blob||"undefined"!=typeof Blob&&Blob)&&(h=t)&&o.isFunction(h.append)&&"FormData"===h[Symbol.toStringTag]&&h[Symbol.iterator];if(!o.isFunction(p))throw TypeError("visitor must be a function");function m(e){if(null===e)return"";if(o.isDate(e))return e.toISOString();if(!y&&o.isBlob(e))throw new a("Blob is not supported. Use a Buffer instead.");return o.isArrayBuffer(e)||o.isTypedArray(e)?y&&"function"==typeof Blob?new Blob([e]):r.from(e):e}function b(e,n,r){var a=e;if(e&&!r&&"object"===i(e)){if(o.endsWith(n,"{}"))n=d?n:n.slice(0,-2),e=JSON.stringify(e);else if(o.isArray(e)&&function(e){return o.isArray(e)&&!e.some(c)}(e)||o.isFileList(e)||o.endsWith(n,"[]")&&(a=o.toArray(e)))return n=u(n),a.forEach(function(e,r){o.isUndefined(e)||null===e||t.append(!0===g?l([n],r,v):null===g?n:n+"[]",m(e))}),!1}return!!c(e)||(t.append(l(r,n,v),m(e)),!1)}var S=[],E=Object.assign(f,{defaultVisitor:b,convertValue:m,isVisitable:c});if(!o.isObject(e))throw TypeError("data must be an object");return function e(n,r){if(!o.isUndefined(n)){if(-1!==S.indexOf(n))throw Error("Circular reference detected in "+r.join("."));S.push(n),o.forEach(n,function(n,i){!0===(!(o.isUndefined(n)||null===n)&&p.call(t,n,o.isString(i)?i.trim():i,r,E))&&e(n,r?r.concat(i):[i])}),S.pop()}}(e),t}},97776(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},98417(e,t,n){var r=n(10761),i=n(96933),o=n(72457);e.exports=function(e){return i(e)?o(e):r(e)}},98547(e,t,n){"use strict";var r=n(43693);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var a=n(16477),s=a.ObjectDefineProperties,c=a.ObjectGetOwnPropertyDescriptor,u=a.ObjectKeys,l=a.ObjectSetPrototypeOf;e.exports=m;var f,h,d=n(801),p=n(79969);l(m.prototype,d.prototype),l(m,d);for(var v=u(p.prototype),g=0;g<v.length;g++){var y=v[g];m.prototype[y]||(m.prototype[y]=p.prototype[y])}function m(e){if(!(this instanceof m))return new m(e);d.call(this,e),p.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}function b(){return void 0===f&&(f={}),f}s(m.prototype,{writable:o({__proto__:null},c(p.prototype,"writable")),writableHighWaterMark:o({__proto__:null},c(p.prototype,"writableHighWaterMark")),writableObjectMode:o({__proto__:null},c(p.prototype,"writableObjectMode")),writableBuffer:o({__proto__:null},c(p.prototype,"writableBuffer")),writableLength:o({__proto__:null},c(p.prototype,"writableLength")),writableFinished:o({__proto__:null},c(p.prototype,"writableFinished")),writableCorked:o({__proto__:null},c(p.prototype,"writableCorked")),writableEnded:o({__proto__:null},c(p.prototype,"writableEnded")),writableNeedDrain:o({__proto__:null},c(p.prototype,"writableNeedDrain")),destroyed:{__proto__:null,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),m.fromWeb=function(e,t){return b().newStreamDuplexFromReadableWritablePair(e,t)},m.toWeb=function(e){return b().newReadableWritablePairFromDuplex(e)},m.from=function(e){return h||(h=n(9697)),h(e,"body")}},98861(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),(t=(0,i.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1)),!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var n=e.split("."),o=n[n.length-1];return!(t.require_tld&&(n.length<2||!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(o)||/\s/.test(o)))&&!(!t.allow_numeric_tld&&/^\d+$/.test(o))&&n.every(function(e){return!(e.length>63)&&!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)&&!/[\uff01-\uff5e]/.test(e)&&!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e))})};var r=o(n(38494)),i=o(n(17473));function o(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1};e.exports=t.default,e.exports.default=t.default},98871(e,t,n){var r=n(60513);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},98972(e,t,n){var r=n(23350),i=n(12036),o=n(83672),a=n(45017),s=n(62812);e.exports=function(e,t,n){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return o(e);case"[object Symbol]":return a(e)}}},99291(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},99301(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}},99972(e,t,n){"use strict";var r=n(93848),i=n(26822),o=n(46024),a=n(44102),s=n(67091),c=n(83592),u=n(56230),l=n(7036),f=n(93033),h=n(84823),d=n(17116),p=n(24717);e.exports=function(e){return new Promise(function(t,n){var v,g=e.data,y=e.headers,m=e.responseType,b=e.withXSRFToken;function S(){e.cancelToken&&e.cancelToken.unsubscribe(v),e.signal&&e.signal.removeEventListener("abort",v)}r.isFormData(g)&&r.isStandardBrowserEnv()&&delete y["Content-Type"];var E=new XMLHttpRequest;e.auth&&(y.Authorization="Basic "+btoa((e.auth.username||"")+":"+(e.auth.password?unescape(encodeURIComponent(e.auth.password)):"")));var C=s(e.baseURL,e.url,e.allowAbsoluteUrls);function w(){if(E){var r="getAllResponseHeaders"in E?c(E.getAllResponseHeaders()):null;i(function(e){t(e),S()},function(e){n(e),S()},{data:m&&"text"!==m&&"json"!==m?E.response:E.responseText,status:E.status,statusText:E.statusText,headers:r,config:e,request:E}),E=null}}if(E.open(e.method.toUpperCase(),a(C,e.params,e.paramsSerializer),!0),E.timeout=e.timeout,"onloadend"in E?E.onloadend=w:E.onreadystatechange=function(){E&&4===E.readyState&&(0!==E.status||E.responseURL&&0===E.responseURL.indexOf("file:"))&&setTimeout(w)},E.onabort=function(){E&&(n(new f("Request aborted",f.ECONNABORTED,e,E)),E=null)},E.onerror=function(){n(new f("Network Error",f.ERR_NETWORK,e,E)),E=null},E.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||l;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new f(t,r.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,e,E)),E=null},r.isStandardBrowserEnv()&&(b&&r.isFunction(b)&&(b=b(e)),b||!1!==b&&u(C))){var T=e.xsrfHeaderName&&e.xsrfCookieName&&o.read(e.xsrfCookieName);T&&(y[e.xsrfHeaderName]=T)}"setRequestHeader"in E&&r.forEach(y,function(e,t){void 0===g&&"content-type"===t.toLowerCase()?delete y[t]:E.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(E.withCredentials=!!e.withCredentials),m&&"json"!==m&&(E.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&E.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&E.upload&&E.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(v=function(t){E&&(n(!t||t.type?new h(null,e,E):t),E.abort(),E=null)},e.cancelToken&&e.cancelToken.subscribe(v),e.signal&&(e.signal.aborted?v():e.signal.addEventListener("abort",v))),g||!1===g||0===g||""===g||(g=null);var k=d(C);k&&-1===p.protocols.indexOf(k)?n(new f("Unsupported protocol "+k+":",f.ERR_BAD_REQUEST,e)):E.send(g)})}},99976(e,t,n){"use strict";var r=n(43693),i=n(34579),o=n(17383),a=n(28452),s=n(63072),c=n(29511),u=n(54756),l=n(29293),f=n(93513),h=n(53344),d=n(42958);function p(e,t,n){return t=s(t),a(e,v()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}function g(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);
1if(r&&null!=(t=e[r]))return new y(t.call(e));n="@@asyncIterator",r="@@iterator"}throw TypeError("Object is not async iterable")}function y(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(y=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new y(e)}var m=window.AbortController||n(47063).AbortController,b=n(4258),S=b.codes,E=S.ERR_INVALID_ARG_VALUE,C=S.ERR_INVALID_ARG_TYPE,w=S.ERR_MISSING_ARGS,T=S.ERR_OUT_OF_RANGE,k=b.AbortError,_=n(16964),R=_.validateAbortSignal,O=_.validateInteger,I=_.validateObject,N=n(16477).Symbol("kWeak"),x=n(16477).Symbol("kResistStopPropagation"),A=n(79625).finished,P=n(90557),D=n(15406).addAbortSignalNoValidate,M=n(87092),B=M.isWritable,L=M.isNodeStream,j=n(60765).deprecate,F=n(16477),U=F.ArrayPrototypePush,q=F.Boolean,H=F.MathFloor,W=F.Number,V=F.NumberIsNaN,G=F.Promise,z=F.PromiseReject,K=F.PromiseResolve,X=F.PromisePrototypeThen,Y=F.Symbol,Z=Y("kEmpty"),$=Y("kEof");function J(e,t){if("function"!=typeof e)throw new C("fn",["Function","AsyncFunction"],e);null!=t&&I(t,"options"),null!=(null==t?void 0:t.signal)&&R(t.signal,"options.signal");var r=1;null!=(null==t?void 0:t.concurrency)&&(r=H(t.concurrency));var i,o=r-1;return null!=(null==t?void 0:t.highWaterMark)&&(o=H(t.highWaterMark)),O(r,"options.concurrency",1),O(o,"options.highWaterMark",0),o+=r,(i=d(u.mark(function i(){var a,s,c,f,d,p,v,y,m,b,S,E,C,w;return u.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:C=function(){return(C=l(u.mark(function t(){var n,i,l,h,S,E,C,w;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,n=!1,i=!1,t.prev=1,h=g(s);case 2:return t.next=3,h.next();case 3:if(!(n=!(S=t.sent).done)){t.next=10;break}if(E=S.value,!v){t.next=4;break}return t.abrupt("return");case 4:if(!a.aborted){t.next=5;break}throw new k;case 5:if(t.prev=5,(E=e(E,f))!==Z){t.next=6;break}return t.abrupt("continue",9);case 6:E=K(E),t.next=8;break;case 7:t.prev=7,E=z(t.catch(5));case 8:if(y+=1,X(E,b,m),c.push(E),d&&(d(),d=null),v||!(c.length>=o||y>=r)){t.next=9;break}return t.next=9,new G(function(e){p=e});case 9:n=!1,t.next=2;break;case 10:t.next=12;break;case 11:t.prev=11,w=t.catch(1),i=!0,l=w;case 12:if(t.prev=12,t.prev=13,!n||null==h.return){t.next=14;break}return t.next=14,h.return();case 14:if(t.prev=14,!i){t.next=15;break}throw l;case 15:return t.finish(14);case 16:return t.finish(12);case 17:c.push($),t.next=19;break;case 18:t.prev=18,X(C=z(t.catch(0)),b,m),c.push(C);case 19:return t.prev=19,v=!0,d&&(d(),d=null),t.finish(19);case 20:case"end":return t.stop()}},t,null,[[0,18,19,20],[1,11,12,17],[5,7],[13,,14,16]])}))).apply(this,arguments)},E=function(){return C.apply(this,arguments)},S=function(){p&&!v&&y<r&&c.length<o&&(p(),p=null)},b=function(){y-=1,S()},m=function(){v=!0,b()},a=n(60765).AbortSignalAny([null==t?void 0:t.signal].filter(q)),s=this,c=[],f={signal:a},v=!1,y=0,E(),i.prev=1;case 2:case 3:if(!(c.length>0)){i.next=8;break}return i.next=4,h(c[0]);case 4:if((w=i.sent)!==$){i.next=5;break}return i.abrupt("return");case 5:if(!a.aborted){i.next=6;break}throw new k;case 6:if(w===Z){i.next=7;break}return i.next=7,w;case 7:c.shift(),S(),i.next=3;break;case 8:return i.next=9,h(new G(function(e){d=e}));case 9:i.next=2;break;case 10:return i.prev=10,v=!0,p&&(p(),p=null),i.finish(10);case 11:case"end":return i.stop()}},i,this,[[1,,10,11]])})),function(){return i.apply(this,arguments)}).call(this)}function Q(e){return ee.apply(this,arguments)}function ee(){return(ee=l(u.mark(function e(t){var n,r,i,o,a,s,c,l=arguments;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=l.length>1&&void 0!==l[1]?l[1]:void 0,r=!1,i=!1,e.prev=1,a=g(ei.call(this,t,n));case 2:return e.next=3,a.next();case 3:if(!(r=!(s=e.sent).done)){e.next=5;break}return s.value,e.abrupt("return",!0);case 4:r=!1,e.next=2;break;case 5:e.next=7;break;case 6:e.prev=6,c=e.catch(1),i=!0,o=c;case 7:if(e.prev=7,e.prev=8,!r||null==a.return){e.next=9;break}return e.next=9,a.return();case 9:if(e.prev=9,!i){e.next=10;break}throw o;case 10:return e.finish(9);case 11:return e.finish(7);case 12:return e.abrupt("return",!1);case 13:case"end":return e.stop()}},e,this,[[1,6,7,12],[8,,9,11]])}))).apply(this,arguments)}function et(){return(et=l(u.mark(function e(t){var n,r=arguments;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>1&&void 0!==r[1]?r[1]:void 0,"function"==typeof t){e.next=1;break}
1throw new C("fn",["Function","AsyncFunction"],t);case 1:return e.next=2,Q.call(this,l(u.mark(function e(){var n=arguments;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.apply(void 0,n);case 1:return e.abrupt("return",!e.sent);case 2:case"end":return e.stop()}},e)})),n);case 2:return e.abrupt("return",!e.sent);case 3:case"end":return e.stop()}},e,this)}))).apply(this,arguments)}function en(){return(en=l(u.mark(function e(t,n){var r,i,o,a,s,c,l;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=!1,i=!1,e.prev=1,a=g(ei.call(this,t,n));case 2:return e.next=3,a.next();case 3:if(!(r=!(s=e.sent).done)){e.next=5;break}return c=s.value,e.abrupt("return",c);case 4:r=!1,e.next=2;break;case 5:e.next=7;break;case 6:e.prev=6,l=e.catch(1),i=!0,o=l;case 7:if(e.prev=7,e.prev=8,!r||null==a.return){e.next=9;break}return e.next=9,a.return();case 9:if(e.prev=9,!i){e.next=10;break}throw o;case 10:return e.finish(9);case 11:return e.finish(7);case 12:return e.abrupt("return",void 0);case 13:case"end":return e.stop()}},e,this,[[1,6,7,12],[8,,9,11]])}))).apply(this,arguments)}function er(){return(er=l(u.mark(function e(t,n){var r,i,o,a,s,c,f,h;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=function(){return(i=l(u.mark(function e(n,r){return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t(n,r);case 1:return e.abrupt("return",Z);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)},r=function(e,t){return i.apply(this,arguments)},"function"==typeof t){e.next=1;break}throw new C("fn",["Function","AsyncFunction"],t);case 1:o=!1,a=!1,e.prev=2,c=g(J.call(this,r,n));case 3:return e.next=4,c.next();case 4:if(!(o=!(f=e.sent).done)){e.next=6;break}f.value;case 5:o=!1,e.next=3;break;case 6:e.next=8;break;case 7:e.prev=7,h=e.catch(2),a=!0,s=h;case 8:if(e.prev=8,e.prev=9,!o||null==c.return){e.next=10;break}return e.next=10,c.return();case 10:if(e.prev=10,!a){e.next=11;break}throw s;case 11:return e.finish(10);case 12:return e.finish(8);case 13:case"end":return e.stop()}},e,this,[[2,7,8,13],[9,,10,12]])}))).apply(this,arguments)}function ei(e,t){if("function"!=typeof e)throw new C("fn",["Function","AsyncFunction"],e);function n(){return(n=l(u.mark(function t(n,r){return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e(n,r);case 1:if(!t.sent){t.next=2;break}return t.abrupt("return",n);case 2:return t.abrupt("return",Z);case 3:case"end":return t.stop()}},t)}))).apply(this,arguments)}return J.call(this,function(e,t){return n.apply(this,arguments)},t)}var eo=function(e){function t(){var e;return o(this,t),(e=p(this,t,["reduce"])).message="Reduce of an empty stream requires an initial value",e}return c(t,e),i(t)}(w);function ea(){return(ea=l(u.mark(function e(t,n,i){var o,a,s,c,l,f,h,d,p,v,y,b,S,E,w,T=arguments;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("function"==typeof t){e.next=1;break}throw new C("reducer",["Function","AsyncFunction"],t);case 1:if(null!=i&&I(i,"options"),null!=(null==i?void 0:i.signal)&&R(i.signal,"options.signal"),a=T.length>1,null==i||null==(o=i.signal)||!o.aborted){e.next=3;break}return s=new k(void 0,{cause:i.signal.reason}),this.once("error",function(){}),e.next=2,A(this.destroy(s));case 2:throw s;case 3:l=(c=new m).signal,null!=i&&i.signal&&(f=r(r({once:!0},N,this),x,!0),i.signal.addEventListener("abort",function(){return c.abort()},f)),h=!1,e.prev=4,d=!1,p=!1,e.prev=5,y=g(this);case 6:return e.next=7,y.next();case 7:if(!(d=!(b=e.sent).done)){e.next=12;break}if(S=b.value,h=!0,null==i||null==(E=i.signal)||!E.aborted){e.next=8;break}throw new k;case 8:if(a){e.next=9;break}n=S,a=!0,e.next=11;break;case 9:return e.next=10,t(n,S,{signal:l});case 10:n=e.sent;case 11:d=!1,e.next=6;break;case 12:e.next=14;break;case 13:e.prev=13,w=e.catch(5),p=!0,v=w;case 14:if(e.prev=14,e.prev=15,!d||null==y.return){e.next=16;break}return e.next=16,y.return();case 16:if(e.prev=16,!p){e.next=17;break}throw v;case 17:return e.finish(16);case 18:return e.finish(14);case 19:if(h||a){e.next=20;break}throw new eo;case 20:return e.prev=20,c.abort(),e.finish(20);case 21:return e.abrupt("return",n);case 22:case"end":return e.stop()}},e,this,[[4,,20,21],[5,13,14,19],[15,,16,18]])}))).apply(this,arguments)}function es(){return(es=l(u.mark(function e(t){var n,r,i,o,a,s,c,l,f;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:null!=t&&I(t,"options"),null!=(null==t?void 0:t.signal)&&R(t.signal,"options.signal"),n=[],r=!1,i=!1,e.prev=1,a=g(this);case 2:return e.next=3,a.next();case 3:if(!(r=!(s=e.sent).done)){e.next=6;break}
1if(c=s.value,null==t||null==(l=t.signal)||!l.aborted){e.next=4;break}throw new k(void 0,{cause:t.signal.reason});case 4:U(n,c);case 5:r=!1,e.next=2;break;case 6:e.next=8;break;case 7:e.prev=7,f=e.catch(1),i=!0,o=f;case 8:if(e.prev=8,e.prev=9,!r||null==a.return){e.next=10;break}return e.next=10,a.return();case 10:if(e.prev=10,!i){e.next=11;break}throw o;case 11:return e.finish(10);case 12:return e.finish(8);case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}},e,this,[[1,7,8,13],[9,,10,12]])}))).apply(this,arguments)}function ec(e){if(V(e=W(e)))return 0;if(e<0)throw new T("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:j(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return null!=t&&I(t,"options"),null!=(null==t?void 0:t.signal)&&R(t.signal,"options.signal"),(e=d(u.mark(function e(){var n,r,i,o,a,s,c,l,f;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=0,r=!1,i=!1,e.prev=1,a=g(this);case 2:return e.next=3,h(a.next());case 3:if(!(r=!(s=e.sent).done)){e.next=6;break}if(c=s.value,null==t||null==(l=t.signal)||!l.aborted){e.next=4;break}throw new k({cause:t.signal.reason});case 4:return e.next=5,[n++,c];case 5:r=!1,e.next=2;break;case 6:e.next=8;break;case 7:e.prev=7,f=e.catch(1),i=!0,o=f;case 8:if(e.prev=8,e.prev=9,!r||null==a.return){e.next=10;break}return e.next=10,h(a.return());case 10:if(e.prev=10,!i){e.next=11;break}throw o;case 11:return e.finish(10);case 12:return e.finish(8);case 13:case"end":return e.stop()}},e,this,[[1,7,8,13],[9,,10,12]])})),function(){return e.apply(this,arguments)}).call(this)},"readable.asIndexedPairs will be removed in a future version."),drop:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return null!=n&&I(n,"options"),null!=(null==n?void 0:n.signal)&&R(n.signal,"options.signal"),e=ec(e),(t=d(u.mark(function t(){var r,i,o,a,s,c,l,f,d;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null==n||null==(r=n.signal)||!r.aborted){t.next=1;break}throw new k;case 1:i=!1,o=!1,t.prev=2,s=g(this);case 3:return t.next=4,h(s.next());case 4:if(!(i=!(c=t.sent).done)){t.next=7;break}if(l=c.value,null==n||null==(f=n.signal)||!f.aborted){t.next=5;break}throw new k;case 5:if(!(e--<=0)){t.next=6;break}return t.next=6,l;case 6:i=!1,t.next=3;break;case 7:t.next=9;break;case 8:t.prev=8,d=t.catch(2),o=!0,a=d;case 9:if(t.prev=9,t.prev=10,!i||null==s.return){t.next=11;break}return t.next=11,h(s.return());case 11:if(t.prev=11,!o){t.next=12;break}throw a;case 12:return t.finish(11);case 13:return t.finish(9);case 14:case"end":return t.stop()}},t,this,[[2,8,9,14],[10,,11,13]])})),function(){return t.apply(this,arguments)}).call(this)},filter:ei,flatMap:function(e,t){var n,r=J.call(this,e,t);return(n=d(u.mark(function e(){var t,n,i,o,a,s,c;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=!1,n=!1,e.prev=1,o=g(r);case 2:return e.next=3,h(o.next());case 3:if(!(t=!(a=e.sent).done)){e.next=5;break}return s=a.value,e.delegateYield(f(g(s),h),"t0",4);case 4:t=!1,e.next=2;break;case 5:e.next=7;break;case 6:e.prev=6,c=e.catch(1),n=!0,i=c;case 7:if(e.prev=7,e.prev=8,!t||null==o.return){e.next=9;break}return e.next=9,h(o.return());case 9:if(e.prev=9,!n){e.next=10;break}throw i;case 10:return e.finish(9);case 11:return e.finish(7);case 12:case"end":return e.stop()}},e,null,[[1,6,7,12],[8,,9,11]])})),function(){return n.apply(this,arguments)}).call(this)},map:J,take:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return null!=n&&I(n,"options"),null!=(null==n?void 0:n.signal)&&R(n.signal,"options.signal"),e=ec(e),(t=d(u.mark(function t(){var r,i,o,a,s,c,l,f,d;return u.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null==n||null==(r=n.signal)||!r.aborted){t.next=1;break}throw new k;case 1:i=!1,o=!1,t.prev=2,s=g(this);case 3:return t.next=4,h(s.next());case 4:if(!(i=!(c=t.sent).done)){t.next=8;break}if(l=c.value,null==n||null==(f=n.signal)||!f.aborted){t.next=5;break}throw new k;case 5:if(!(e-- >0)){t.next=6;break}return t.next=6,l;case 6:if(!(e<=0)){t.next=7;break}return t.abrupt("return");case 7:i=!1,t.next=3;break;case 8:t.next=10;break;case 9:t.prev=9,d=t.catch(2),o=!0,a=d;case 10:if(t.prev=10,t.prev=11,!i||null==s.return){t.next=12;break}return t.next=12,h(s.return());case 12:if(t.prev=12,!o){t.next=13;break}throw a;case 13:return t.finish(12);case 14:return t.finish(10);case 15:case"end":return t.stop()}},t,this,[[2,9,10,15],[11,,12,14]])})),function(){return t.apply(this,arguments)}).call(this)},compose:function(e,t){if(null!=t&&I(t,"options"),null!=(null==t?void 0:t.signal)&&R(t.signal,"options.signal"),L(e)&&!B(e))throw new E("stream",e,"must be writable");var n=P(this,e);return null!=t&&t.signal&&D(t.signal,n),n}},e.exports.promiseReturningOperators={every:function(e){return et.apply(this,arguments)}
1,forEach:function(e,t){return er.apply(this,arguments)},reduce:function(e,t,n){return ea.apply(this,arguments)},toArray:function(e){return es.apply(this,arguments)},some:Q,find:function(e,t){return en.apply(this,arguments)}}}},__webpack_module_cache__={};function __nested_webpack_require_888620__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__nested_webpack_require_888620__),n.loaded=!0,n.exports}__nested_webpack_require_888620__.amdD=function(){throw Error("define cannot be used indirect")},__nested_webpack_require_888620__.amdO={},__nested_webpack_require_888620__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __nested_webpack_require_888620__.d(t,{a:t}),t},__nested_webpack_require_888620__.d=(e,t)=>{for(var n in t)__nested_webpack_require_888620__.o(t,n)&&!__nested_webpack_require_888620__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__nested_webpack_require_888620__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__nested_webpack_require_888620__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __nested_webpack_exports__={};return(()=>{"use strict";function e(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e=function(){return!!t})()}function t(e,n){return(t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,n)}function n(n,r,i){if(e())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,r);var a=new(n.bind.apply(n,o));return i&&t(a,i.prototype),a}function r(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function i(e){return(i="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){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(null,arguments)}function f(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&t(e,n)}function h(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}__nested_webpack_require_888620__.d(__nested_webpack_exports__,{default:()=>uM}),__nested_webpack_require_888620__(94672);var d=__nested_webpack_require_888620__(54756),p=__nested_webpack_require_888620__.n(d),v=__nested_webpack_require_888620__(68742),g=__nested_webpack_require_888620__.n(v),y=__nested_webpack_require_888620__(75465),m=__nested_webpack_require_888620__.n(y),b=__nested_webpack_require_888620__(38304),S=__nested_webpack_require_888620__.n(b),E=__nested_webpack_require_888620__(13708),C=__nested_webpack_require_888620__.n(E),w=__nested_webpack_require_888620__(67813),T=__nested_webpack_require_888620__.n(w),k=__nested_webpack_require_888620__(34174),_=__nested_webpack_require_888620__.n(k),R=__nested_webpack_require_888620__(7595),O=__nested_webpack_require_888620__.n(R),I=__nested_webpack_require_888620__(23832),N=__nested_webpack_require_888620__.n(I),x=__nested_webpack_require_888620__(71259),A=__nested_webpack_require_888620__.n(x),P=__nested_webpack_require_888620__(46480),D=__nested_webpack_require_888620__.n(P),M=__nested_webpack_require_888620__(55416),B=__nested_webpack_require_888620__.n(M),L=__nested_webpack_require_888620__(22802),j=__nested_webpack_require_888620__.n(L),F=__nested_webpack_require_888620__(47622),U=__nested_webpack_require_888620__.n(F),q=__nested_webpack_require_888620__(34058),H=__nested_webpack_require_888620__.n(q),W=__nested_webpack_require_888620__(70262),V=__nested_webpack_require_888620__.n(W),G=__nested_webpack_require_888620__(90623),z=__nested_webpack_require_888620__.n(G),K=__nested_webpack_require_888620__(2263),X=__nested_webpack_require_888620__.n(K),Y=__nested_webpack_require_888620__(23898),Z=__nested_webpack_require_888620__.n(Y),$=__nested_webpack_require_888620__(47918),J=__nested_webpack_require_888620__.n($),Q=__nested_webpack_require_888620__(29088),ee=__nested_webpack_require_888620__.n(Q),et=__nested_webpack_require_888620__(54675),en=__nested_webpack_require_888620__.n(et),er=__nested_webpack_require_888620__(18408),ei=__nested_webpack_require_888620__.n(er),eo=__nested_webpack_require_888620__(15),ea=__nested_webpack_require_888620__.n(eo),es=__nested_webpack_require_888620__(43310),ec=__nested_webpack_require_888620__.n(es),eu=__nested_webpack_require_888620__(68079),el=__nested_webpack_require_888620__.n(eu),ef=__nested_webpack_require_888620__(20650),eh=__nested_webpack_require_888620__.n(ef),ed=__nested_webpack_require_888620__(16230),ep=__nested_webpack_require_888620__.n(ed),ev=__nested_webpack_require_888620__(79654),eg=__nested_webpack_require_888620__.n(ev),ey=__nested_webpack_require_888620__(18120),em=__nested_webpack_require_888620__.n(ey),eb=__nested_webpack_require_888620__(87469),eS=__nested_webpack_require_888620__.n(eb),eE={assign:g(),camel
1Case:m(),cloneDeep:S(),find:C(),groupBy:T(),isEmpty:_(),isEqual:O(),isFinite:N(),isFunction:A(),isNil:D(),isObject:B(),isRegExp:j(),isString:U(),matches:H(),mean:V(),merge:z(),mergeWith:X(),omit:Z(),pick:J(),random:ee(),remove:en(),repeat:ei(),snakeCase:ea(),sortBy:ec(),transform:el(),uniq:eh(),uniqWith:ep(),unset:eg(),waitFor:function(e){return new Promise(function(t){setTimeout(t,e)})},zip:em(),flatten:eS()};function eC(e){var r="function"==typeof Map?new Map:void 0;return(eC=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,i)}function i(){return n(e,arguments,u(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),t(i,e)})(e)}function ew(e,t,n){return t=u(t),c(e,eT()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function eT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eT=function(){return!!e})()}var ek=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.Codes.UNKNOWN_ERROR,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.NAME;return r(this,t),(e=ew(this,t)).errCode=i,e.name=o,e.message="[".concat(e.name,"] ").concat(n," ").concat(e.errCode),Error.captureStackTrace&&Error.captureStackTrace(e,t),e}return f(t,e),s(t)}(eC(Error));ek.NAME="ApplicationError",function(e){!function(e){e.UNKNOWN_ERROR="UNKNOWN ERROR",e.NULL_OR_UNDEFINED="NULL OR UNDEFINED",e.TYPE_ERROR="TYPE ERROR",e.WEB_WORKER_ERROR="WEB_WORKER ERROR",e.NOT_VALID_REPRESENTATION="NOT VALID REPRESENTATION",e.DATACHANNEL_NOT_FOUND="NO DATACHANNEL",e.DATACHANNEL_NOT_OPEN="NOT OPEN DATACHANNEL",e.CONTENT_CACHE_EXISTING="CONTENT CACHE EXISTING",e.CONTENT_CACHE_NOT_FOUND="CONTENT CACHE NOT FOUND",e.CONTENT_CACHE_SIZE_EXCEEDED="CONTENT CACHE SIZE EXCEEDED"}(e.Codes||(e.Codes={}))}(ek||(ek={})),function(e){function t(){return r(this,t),ew(this,t,["Check your API Key. If problem persists, contact support at [email protected].",-600,t.NAME])}return f(t,e),s(t)}(ek).NAME="InvalidApiKeyBase64Format",function(e){function t(){return r(this,t),ew(this,t,["Check your API Key. If problem persists, contact support at [email protected].",-601,t.NAME])}return f(t,e),s(t)}(ek).NAME="InvalidApiKeyJSONFormat",function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"No detail";return r(this,t),ew(this,t,["Check your API Key. Detail: ".concat(e,". If problem persists, contact support at [email protected]."),-602,t.NAME])}return f(t,e),s(t)}(ek).NAME="InvalidApiKeyProperties",function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"No detail";return r(this,t),ew(this,t,["The PolyNet SDK has failed to build. Detail: ".concat(e,". If problem persists, contact support at [email protected]."),-603,t.NAME])}return f(t,e),s(t)}(ek).NAME="InternalBuildError";var e_=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"The PolyNet SDK has failed and raised an exception. If problem persists, contact support at [email protected].";return r(this,t),ew(this,t,[e,-700,t.NAME])}return f(t,e),s(t,null,[{key:"throw",value:function(e,n){e.error(new t(n))}}])}(ek);e_.NAME="PolyNetInternalError";var eR=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"No detail";return r(this,t),ew(this,t,["The PolyNet SDK is not compatible with the Tracker. Tracker code: ".concat(e,". ")+"This may happen in transitions to newer versions. If problem persists, contact support at [email protected].",-701,t.NAME])}return f(t,e),s(t,null,[{key:"throw",value:function(e,n){e.error(new t(n))}}])}(ek);eR.NAME="UnsupportedTracker";var eO=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"No detail";
1return r(this,t),ew(this,t,["Error communicating with Tracker. Detail: ".concat(e,". If problem persists, contact support at [email protected]."),-702,t.NAME])}return f(t,e),s(t,null,[{key:"throw",value:function(e,n){e.error(new t(n))}}])}(ek);eO.NAME="UnreachableTracker";var eI=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"No detail";return r(this,t),ew(this,t,["Error communicating with Tracker metrics endpoint. Detail: ".concat(e,". ")+"If problem persists, contact support at [email protected].",-703,t.NAME])}return f(t,e),s(t,null,[{key:"throw",value:function(e,n){e.error(new t(n))}}])}(ek);eI.NAME="UnreachableTrackerMetricsEndpoint";var eN=function(e){function t(){return r(this,t),ew(this,t,["The Api Key is revoked from Tracker. Please, contact support at [email protected].",-704,t.NAME])}return f(t,e),s(t,null,[{key:"throw",value:function(e){e.error(new t)}}])}(ek);eN.NAME="RevokedApiKey";var ex=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"No detail";return r(this,t),ew(this,t,["PolyNet connection rejected. Detail: ".concat(e,". If problem persists, contact support at [email protected]."),-705,t.NAME])}return f(t,e),s(t,null,[{key:"throw",value:function(e,n){e.error(new t(n))}}])}(ek);ex.NAME="ConcurrencyLimitationsReached";var eA=function(e){function t(){return r(this,t),ew(this,t,["The content steering API Key is revoked. Please, contact support at [email protected].",-706,t.NAME])}return f(t,e),s(t,null,[{key:"throw",value:function(e){e.error(new t)}}])}(ek);eA.NAME="RevokedCSToken";var eP=function(){return s(function e(){r(this,e),this.handlers={},this.eventQueue=[]},[{key:"emitAsync",value:function(e,t){var n=this;this.eventQueue.push({event:e,payload:t}),Promise.resolve().then(function(){var e=n.eventQueue.shift(),t=e.event,r=e.payload;n.emit(t,r)})}},{key:"emit",value:function(e,t){if((t=t||{}).hasOwnProperty("event")||t.hasOwnProperty("result"))throw new ek("'event' or 'result' are reserved words for event dispatching");t.event=e;var n=this.handlers;if(!e||!n[e]||0===n[e].length)return t;for(var r=n[e],i=0,o=r.length;i<o;i++){var a=r[i];if(!a.target||t.target===a.target){var s=a.listener.call(a.scope,t);s&&(t.result=s)}}return t}},{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{target:null,scope:null},r=n.target,i=n.scope,o=this.handlers;if(!e)throw new ek("event type cannot be null or undefined",ek.Codes.NULL_OR_UNDEFINED);if(!t||"function"!=typeof t)throw new ek("listener must be a function: "+t,ek.Codes.TYPE_ERROR);if(!(this.getHandlerIndex(e,t,i,r)>=0)){o[e]=o[e]||[];var a={listener:t,scope:i,target:r};o[e]=o[e].slice(0),o[e].push(a)}}},{key:"once",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{target:null,scope:null},i=r.target,o=r.scope,a=function(r){n.off(e,a,{scope:o,target:i}),t.call(o,r)};this.on(e,a,{scope:o,target:i});var s=this.getHandlerIndex(e,a,o,i);this.handlers[e][s].once=t}},{key:"off",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{scope:null,target:null},r=n.scope,i=n.target,o=this.handlers;if(e&&t&&o[e]){var a=this.getHandlerIndex(e,t,r,i);a<0||(o[e]=o[e].slice(0),o[e].splice(a,1))}}},{key:"offAll",value:function(){for(var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{scope:null,target:null},n=t.scope,r=t.target,i=this.handlers,o=function(){var t=s[a];i[t].forEach(function(i){var o=t;e.off(o,i.listener,{scope:n,target:r})})},a=0,s=Object.keys(i);a<s.length;a++)o()}},{key:"getHandlerIndex",value:function(e,t,n,r){return this.handlers[e]?this.handlers[e].findIndex(function(e){return!(e.listener!==t&&e.once!==t||n&&n!==e.scope||r&&r!==e.target)}):-1}}])}();function eD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eM(e,t){if(e){if("string"==typeof e)return eD(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eD(e,t):void 0}}function eB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}
1finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||eM(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eL(e){return function(e){if(Array.isArray(e))return eD(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||eM(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ej=function(){return s(function e(){r(this,e)},null,[{key:"debug",value:function(){var e;(e=console).debug.apply(e,arguments)}},{key:"info",value:function(){var e;(e=console).info.apply(e,arguments)}},{key:"warn",value:function(){var e;(e=console).warn.apply(e,arguments)}},{key:"error",value:function(){var e;(e=console).error.apply(e,arguments)}}])}();function eF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eF=function(){return!!e})()}var eU=function(){function e(){r(this,e)}return s(e,null,[{key:"destroyContext",value:function(t){var n=e.SINGLETON_CONTEXTS.get(t);n&&((function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t})(n).reverse().forEach(function(e){try{e.destroy()}catch(e){ej.error(e)}}),e.removeContext(t))}},{key:"removeContext",value:function(t){e.SINGLETON_CONTEXTS.delete(t)}},{key:"getSingletonInstance",value:function(t,n){var r=e.SINGLETON_CONTEXTS.get(t);if(!r)return null;var i=n.polyNetFactoryName;if(!i)throw Error("Cannot get singleton instance: Class ".concat(n.name||"Unknown"," must define static polyNetFactoryName"));return r.get(i)}},{key:"setSingletonInstance",value:function(t,n,r){var i=n.polyNetFactoryName;if(!i)throw Error("Cannot set singleton instance: Class ".concat(n.name||"Unknown"," must define static polyNetFactoryName"));var o=e.SINGLETON_CONTEXTS.get(t);o||(o=new Map,e.SINGLETON_CONTEXTS.set(t,o)),o.set(i,r)}},{key:"getSingletonFactory",value:function(t){var n=function(n){var r;return void 0===n&&(n={}),{getInstance:function(){if(r||(r=e.getSingletonInstance(n,t)),!r){for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];r=e.instance(n,t,o),e.setSingletonInstance(n,t,r)}return r}}};return e.initFactoryProperties(t,n),n}},{key:"getInstanceFactory",value:function(t){var n=function(n){return void 0===n&&(n={}),{createInstance:function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return e.instance(n,t,i)}}};return e.initFactoryProperties(t,n),n}},{key:"instance",value:function(e,t,i){return new new Proxy(t,{construct:function(t,i,o){return n(function(t){function n(){var e,t,i;r(this,n);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return e=this,t=n,i=[].concat(a),t=u(t),c(e,eF()?Reflect.construct(t,i||[],u(e).constructor):t.apply(e,i))}return f(n,t),s(n,[{key:"context",get:function(){return e}}])}(t),eL(i[0]))}})(i)}},{key:"initFactoryProperties",value:function(e,t){for(var n=0,r=Object.entries(e);n<r.length;n++){var i=eB(r[n],2),o=i[0],a=i[1];-1!==o.indexOf("polyNetFactory")&&(t[o]=a)}t.polyNetFactoryClass=e}}])}();function eq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eq=function(){return!!e})()}eU.SINGLETON_CONTEXTS=new Map;var eH=function(e){function t(){var e,n,i;return r(this,t),e=this,i=arguments,n=u(n=t),c(e,eq()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i))}return f(t,e),s(t,[{key:"destroy",value:function(){this.offAll()}}])}(eP);eH.polyNetFactoryName="EventBus";var eW,eV,eG=eU.getSingletonFactory(eH),ez=function(){return s(function e(){r(this,e)},[{key:"context",get:function(){return this._context},set:function(e){this._context=e}},{key:"start",value:function(){}},{key:"stop",value:function(){}},{key:"destroy",value:function(){}}])}();function eK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eK=function(){return!!e})()}!function(e){e[e.OFF=0]="OFF",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e[e.TRACE=5]="TRACE"}(eW||(eW={})),function(e){e.OFF="OFF",e.BASIC="BASIC"}(eV||(eV={}));var eX=function(e){function t(){var e,n,i;return r(this,t),e=this,i=arguments,n=u(n=t),c(e,eK()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i))}return f(t,e),s(t,[{key:"setup",value:function(e,t){this.loggerSettings=e||this.loggerSettings,this.setupConsole(t)}},{key:"get",value:function(e){return(this.loggerSettings||{})[e]}},{key:"setupConsole",value:function(e){var t=this.get("console");if(!eE.isNil(e)&&!eE.isNil(t))switch(i(e)){case"string":t.level=eW[e=e.toUpperCase()]?e:eW[eW.OFF];break;case"boolean":t.level=e?eW[eW.DEBUG]:eW[eW.OFF];break;case"number":t.level=eW[e]?eW[e]:eW[eW.OFF]}}}])}(ez);
1eX.polyNetFactoryName="LoggerSettings";var eY=eU.getSingletonFactory(eX);function eZ(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return e$(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e$(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function e$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eJ=function(){return!!e})()}var eQ=function(e){function t(e,n){var i,o,a,s;return r(this,t),o=this,a=u(a=t),(i=c(o,eJ()?Reflect.construct(a,s||[],u(o).constructor):a.apply(o,s))).name=e,i.messageBuffer=new Map,i.loggers=[],i.appenders=[],n&&(i.appenders=i.appenders.concat(n.appenders)),i}return f(t,e),s(t,[{key:"getLogger",value:function(e){var n=this.loggers.find(eE.matches({name:e}));return n||((n=new t(e,this)).context=this.context,this.loggers.push(n)),n}},{key:"trace",value:function(e,t){this.log(eW.TRACE,e,t)}},{key:"debug",value:function(e,t){this.log(eW.DEBUG,e,t)}},{key:"info",value:function(e,t){this.log(eW.INFO,e,t)}},{key:"warn",value:function(e,t){this.log(eW.WARN,e,t)}},{key:"error",value:function(e,t){this.log(eW.ERROR,e,t)}},{key:"logEvery",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:eW.DEBUG,i=arguments.length>4?arguments[4]:void 0;this.messageBuffer.get(t)&&this.messageBuffer.get(t)%e!=0||this.log(r,n,i),this.messageBuffer.set(t,this.messageBuffer.get(t)?this.messageBuffer.get(t)+1:1)}},{key:"logOnce",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eW.DEBUG,r=arguments.length>3?arguments[3]:void 0;this.messageBuffer.get(e)||(this.log(n,t,r),this.messageBuffer.set(e,!0))}},{key:"logWhenChange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eW.DEBUG,r=arguments.length>3?arguments[3]:void 0;this.messageBuffer.get(e)!==t&&this.log(n,t,r),this.messageBuffer.set(e,t)}},{key:"integration",value:function(e,t){this.log(eW.INFO,e,t)}},{key:"log",value:function(e,t,n){var r=new Date;n&&n instanceof Error&&n.stack&&(t="".concat(t,"\n").concat(n.stack));var i,o=eZ(this.appenders);try{for(o.s();!(i=o.n()).done;)i.value.log(this,e,r,t)}catch(e){o.e(e)}finally{o.f()}}},{key:"registerAppender",value:function(e){eE.isNil(e)||(this.appenders.push(e),this.loggers.forEach(function(t){return t.registerAppender(e)}))}}])}(ez);eQ.polyNetFactoryName="Logger";var e0=eU.getSingletonFactory(eQ);function e1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e1=function(){return!!e})()}var e2=function(e){function t(e){var n,i,o,a;if(r(this,t),i=this,o=u(o=t),n=c(i,e1()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a)),!eE.isString(e)||eE.isEmpty(e))throw TypeError("ID ".concat(e," is not a valid string"));return n.id=e,n._settings=eY(n.context).getInstance(),n}return f(t,e),s(t,[{key:"settings",get:function(){return this._settings.get(this.id)}},{key:"isLevelEnabled",value:function(e){var t=eW[this.settings.level.toUpperCase()];return!eE.isNil(t)&&t>=e}}])}(ez);function e3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e3=function(){return!!e})()}var e6=function(e){function t(e){var n,i,o;
1return r(this,t),n=this,o=[e],i=u(i=t),c(n,e3()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))}return f(t,e),s(t,[{key:"log",value:function(e,t,n,r){if(this.isLevelEnabled(t)||t===eW.ERROR){var i=this.getLog(t);i&&i("".concat(this.formatDate(n)," ").concat(eW[t].toUpperCase()," ").concat(e.name," ").concat(r))}}},{key:"getLog",value:function(e){switch(e){case eW.TRACE:case eW.DEBUG:return ej.debug;case eW.INFO:return ej.info;case eW.WARN:return ej.warn;case eW.ERROR:return ej.error}}},{key:"formatDate",value:function(e){return e.toISOString().slice(11).substring(0,12)}}])}(e2);e6.polyNetFactoryName="LoggerConsoleAppender";var e8=eU.getInstanceFactory(e6),e5=__nested_webpack_require_888620__(37902),e4=__nested_webpack_require_888620__.n(e5);function e7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(e7=function(){return!!e})()}var e9=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},te=function(e){function t(e,n){var i,o,a,s;return r(this,t),o=this,s=[e],a=u(a=t),(i=c(o,e7()?Reflect.construct(a,s||[],u(o).constructor):a.apply(o,s))).queue=[],i.messageId=0,i.metadataProvider=null!=n?n:{},i}return f(t,e),s(t,[{key:"destroy",value:function(){this.stopSending(),this.queue=null}},{key:"log",value:function(e,t,n,r){if(this.queue&&this.settings){if(!this.isEnabled)return this.stopSending(),void(this.queue=[]);if(this.isLevelEnabled(t)){this.queue.length>=this.settings.maxQueueSize&&this.queue.shift();var i=this.metadataProvider,o=i.deviceId,a=i.nodeId,s=i.platform,c=i.sessionId,u=i.channelId;this.queue.push({deviceId:o,logger:e.name,messageId:"".concat(this.messageId++),msgData:{},channelId:u,nodeId:a,platform:s,sessionId:c,severity:eW[t],text:r,timestamp:n.toISOString()}),this.isRunning||this.schedule(eE.random(0,this.settings.postTimeout))}}else ej.warn("Attempted to log message after destruction: ".concat(r))}},{key:"isEnabled",get:function(){var e,t;return!!(null==(e=this.settings)?void 0:e.enabled)&&!!(null==(t=this.settings)?void 0:t.url)}},{key:"isRunning",get:function(){return!eE.isNil(this.timer)}},{key:"authConfig",get:function(){var e,t,n=null==(e=this.settings)?void 0:e.auth;if(null==n?void 0:n.enabled)return(null==(t=n.type)?void 0:t.toUpperCase())===eV.BASIC?Object.assign({},n.basic):void 0}},{key:"stopSending",value:function(){clearTimeout(this.timer),this.timer=null}},{key:"schedule",value:function(e){var t=this;this.timer=setTimeout(function(){return t.send()},e)}},{key:"send",value:function(){return e9(this,void 0,void 0,p().mark(function e(){var t,n;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=this.settings.batchSize;case 1:if(!(this.queue.length>=t)){e.next=3;break}return n=this.queue.splice(0,t),e.next=2,this.sendBatch(n);case 2:e.next=1;break;case 3:this.schedule(this.settings.postTimeout);case 4:case"end":return e.stop()}},e,this)}))}},{key:"sendBatch",value:function(e){return e9(this,void 0,void 0,p().mark(function n(){var r,i,o,a;return p().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=(r=this.authConfig)?{auth:r}:void 0,o=0,n.next=1,t.postBatch(this.settings.url,e,i);case 1:a=n.sent;case 2:if(a||!(o<this.settings.maxRetries)){n.next=5;break}return n.next=3,eE.waitFor(this.settings.retryTimeout);case 3:return n.next=4,t.postBatch(this.settings.url,e,i);case 4:a=n.sent,o++,n.next=2;break;case 5:case"end":return n.stop()}},n,this)}))}}],[{key:"postBatch",value:function(e,t,n){return e9(this,void 0,void 0,p().mark(function r(){var i;return p().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=1,e4().post(e,t,n);case 1:return r.abrupt("return",!0);case 2:return r.prev=2,(i=r.catch(0)).response?ej.warn("Error sending log to server. Status: ".concat(i.response.status,": ").concat(i.response.data)):ej.warn("Error sending log to server: \xab".concat(i.message,"\xbb")),r.abrupt("return",!1);case 3:case"end":return r.stop()}},r,null,[[0,2]])}))}}])}(e2);te.polyNetFactoryName="LoggerHttpAppender";var tt,tn=eU.getInstanceFactory(te),tr=function(){function e(){r(this,e)}return s(e,null,[{key:"sentTrackerMessage",value:function(e){return"â¬ï¸ Sent: ".concat(e)}},{key:"receivedTrackerMessage",value:function(e){return"â¬ï¸ Received: ".concat(JSON.stringify(e))}},{key:"sentContentRequest",value:function(t,n,r){return"".concat(e.sentP2PBegin(t)," ContentRequest, contentId: ").concat(n,", duration: ").concat(r)}},{key:"sentContentResponseStart",value:function(t,n,r,i){return"".concat(e.sentP2PBegin(t)," ContentResponseStart, contentId: ").concat(n,", contentLength: ").concat(r,", duration: ").concat(i)}},{key:"sentContentResponseEnd",value:function(t,n,r,i,o){return"".concat(e.sentP2PBegin(t)," ContentResponseEnd, contentId: ").concat(n,", contentLength: ").concat(r,", chunksAmount: ").concat(i,", crc32
1: ").concat(o)}},{key:"sentLoopCheck",value:function(t,n){return"".concat(e.sentP2PBegin(t)," LoopCheck, nodeId: ").concat(n)}},{key:"sentTakeControl",value:function(t){return"".concat(e.sentP2PBegin(t)," TakeControl")}},{key:"receivedPeerMessage",value:function(t,n){return"".concat(e.receivedP2PBegin(t)," ").concat(n)}},{key:"receivedContentRequest",value:function(t,n,r){return"".concat(e.receivedP2PBegin(t)," ContentRequest, contentId: ").concat(n,", duration: ").concat(r)}},{key:"receivedContentResponseStart",value:function(t,n,r,i){return"".concat(e.receivedP2PBegin(t)," ContentResponseStart, contentId: ").concat(n,", contentLength: ").concat(r,", duration: ").concat(i)}},{key:"receivedContentResponseProgress",value:function(t,n,r){return"".concat(e.receivedP2PBegin(t)," ContentResponseProgress, contentId: ").concat(n,", chunkId: ").concat(r)}},{key:"receivedContentResponseEnd",value:function(t,n,r,i,o){return"".concat(e.receivedP2PBegin(t)," ContentResponseEnd, contentId: ").concat(n,", contentLength: ").concat(r,", ")+"chunksAmount: ".concat(i,", crc32: ").concat(o)}},{key:"receivedLoopCheck",value:function(t,n){return"".concat(e.receivedP2PBegin(t)," LoopCheck, nodeId: ").concat(n)}},{key:"receivedTakeControl",value:function(t){return"".concat(e.receivedP2PBegin(t)," TakeControl")}},{key:"requestCreatedFromPlayer",value:function(e){return"âPLAYER Did create request for URL: ".concat(e)}},{key:"requestCreated",value:function(t,n){return"âDid create request for URL: ".concat(t).concat(e.printContentId(t,n))}},{key:"requestHit",value:function(t,n){return"Requested: â
Hit for contentId: ".concat(t,", URL: ").concat(e.toShortURL(n))}},{key:"requestMiss",value:function(t,n){return"Requested: âï¸ Miss for contentId: ".concat(t,", URL: ").concat(e.toShortURL(n))}},{key:"noShareableRequest",value:function(t,n){return"Requested: Non-shareable content URL: ".concat(e.toShortURL(n)).concat(e.printContentId(n,t))}},{key:"requestingCDN",value:function(t,n){return"Requesting to CDN, URL: ".concat(e.toShortURL(t)," ").concat(e.printContentId(t,n))}},{key:"completeContentShareable",value:function(t,n,r){return"Complete: Content with URL: ".concat(e.toShortURL(n),", crc32: ").concat(r).concat(e.printContentId(n,t))}},{key:"completeContentNonShareable",value:function(t){return"Complete: Non-shareable content with URL: ".concat(e.toShortURL(t))}},{key:"printCache",value:function(e){return"Cache: [".concat(e.join(","),"]")}},{key:"finishedRequest",value:function(t,n,r,i,o,a,s){var c=(o-r)/1e3,u=(i-r)/1e3,l=(o-i)/1e3;return"âï¸Did finish request for"+" URL: ".concat(e.toShortURL(t),",")+" source: ".concat("HTTP"===n?"CDN":"P2P",",")+" total: ".concat(c.toFixed(e.MAX_DECIMALS),",")+" lag: ".concat(u.toFixed(e.MAX_DECIMALS),",")+" streamed: ".concat(l.toFixed(e.MAX_DECIMALS))+" ".concat(e.printContentId(t,a),",")+(s?" duration: ".concat(s):"")}},{key:"bufferHealthEnabled",value:function(){return"\uD83D\uDC99 Player buffer health countermeasure is enabled."}},{key:"bufferHealthStable",value:function(e,t,n){return"\uD83D\uDC9A Player buffer health stable. ".concat(Math.round(e)," ms. | ").concat(t," ms. | ").concat(t+n," ms. (current | threshold | threshold + delta)")}},{key:"bufferHealthCriticalP2P",value:function(e,t,n){return"\uD83D\uDC94 Player buffer health critical when \uD83D\uDD3B inbound P2P. Repairing... ".concat(Math.round(e)," ms. | ").concat(t," ms. | ").concat(t+n," ms. (current | threshold | threshold + delta)")}},{key:"bufferHealthCriticalCDN",value:function(e,t,n){return"\uD83D\uDC94 ï¸Player buffer health critical when inbound CDN. ".concat(Math.round(e)," ms. | ").concat(t," ms. | ").concat(t+n," ms. (current | threshold | threshold + delta)")}},{key:"printPlaylist",value:function(t,n){return"Playlist, URL: ".concat(e.toShortURL(t),"\n").concat(n)}},{key:"printHlsMediaPlaylistSummary",value:function(t,n,r,i,o){return"HLS media playlist summary, URL: ".concat(e.toShortURL(t),", target duration: ").concat(n,", size: ").concat(r,", media sequences: ").concat(i,"-").concat(o)}},{key:"representationsUpdated",value:function(e){return"â»ï¸ ï¸Representations updated, total of ".concat(e)}},{key:"representationChanged",value:function(t,n){return"â»ï¸ï¸ ï¸Representation did change, representationId: ".concat(t,", URL: ").concat(e.toShortURL(n))}},{key:"newBufferThreshold",value:function(e,t,n){return"New buffer health threshold: ".concat(e/1e3,", delta: ").concat(t/1e3,", next segment duration: ").concat(n/1e3)}},{key:"liveWindowChanged",value:function(e){return"New live window: ".concat(e)}},{key:"initialTimerFires",value:function(){return"\uD83D\uDD25 Initial connection timer fires. Releasing blocked requests."}},{key:"closingTrackerConnection",value:function(){return"Closing tracker connection..."}},{key:"startingTrackerConnection",value:function(){return"Connecting to tracker..."}},{key:"scheduledRetryTrackerConnection",value:function(e){return"Scheduled retry connection in ".concat(Math.round(e/1e3)," seconds.")}},{key:"NATTypeFound",value:function(e){return"NAT type found: ".concat(e)}},{key:"ICEConnectionState",value:function(e,t,n){return"â¦ï¸ ICE connection state changed to ".concat(e," with connectionId: ").concat(t," nodeId: ").concat(n)}},{key:"ICEGatheringState",value:function(e,t,n){return"â¦ï¸ ICE gathering state changed to ".concat(e," with connectionId: ").concat(t," nodeId: ").concat(n)}},{key:"dataChannelState",value:function(e,t,n){return e=(e||"").toUpperCase()+(e?" ":""),"â¦ï¸ WebRTC ".concat(e,"Data channel state changed to ").concat(t," nodeId: ").concat(n)}},{key:"dataChannelPeerOpen",value:function(e,t){return"⦠Peer connection did open with connectionId: ".concat(e," nodeId: ").concat(t)}},{key:"dataChannelIsReady",value:function(e){return"â¦ï¸ P2P connection is READY. Data transfer may start for nodeId: ".concat(e)}},{key:"multiPeerOpeningType",value:function(e){return"⦠InboundP2P opening type: ".concat(e?"sequential":"concurrent")}},{key:"openAdditionalConnections",value:function(e){return"⦠".concat(e," will open additional connections")}},{key:"metricsComputed",value:function(e){return"x10 metrics did compute, last: ".concat(JSON.stringify(e,null,4))}},{key:"beaconMetrics",value:function(e){var t=function(e){return e?e.substring(e.length-5):"?".repeat(5)};return"â¸ï¸ Beacon: ".concat(t(e.inboundNodeId)," => ").concat(t(e.nodeId)," - ").concat(e.source," - ").concat(e.representationId," - ").concat(e.bitrate," - BFR ").concat(e.bufferFillingRate," - BH ").concat(e.playerBufferHealth," ").concat(e.gapsInfo)}},{key:"receivedFeatureFlags",value:function(e){return"Received feature flags: ".concat(JSON.stringify(e,null,4))}},{key:"repeatingRequest",value:function(e){return"Repeating request with contentId: ".concat(e)}},{key:"waitingToRepeatRequest",value:function(e){return"Waiting to repeat request with contentId: ".concat(e)}},{key:"diffBetweenClocks",value:function(e){return"New diff between clocks: ".concat(e/1e3)}},{key:"fetchingMediaPlaylist",value:function(){return"Fetching media playlist, trigger: contentCannotBeSatisfied'"}},{key:"alreadyFetching",value:function(){return"Cannot fetch media playlist because is already fetching"}},{key:"autoFetching",value:function(t){return"AutoFetching segment URL: ".concat(e.toShortURL(t))}},{key:"vodMode",value:function(){return"VoD"}}
1,{key:"outsideWindow",value:function(){return"Live - Outside DVR window"}},{key:"insideWindow",value:function(){return"Live - Inside DVR window"}},{key:"estimatorStarted",value:function(e){return"Estimator started with capacity: ".concat(e)}},{key:"estimatorTimerScheduled",value:function(e){return"Estimator timer scheduled with period: ".concat(e)}},{key:"estimatorTimerStopped",value:function(){return"Estimator timer stopped"}},{key:"capacityChange",value:function(e,t,n){return"Capacity: ".concat(e," -> ").concat(t,". ").concat(n)}},{key:"cdnLowBfr",value:function(e){return"CDN with low BFR: ".concat(e)}},{key:"cdnEnoughCapacity",value:function(){return"CDN with no children, enough capacity"}},{key:"newAttempt",value:function(){return"Trying with a new attempt"}},{key:"noMoreAttempts",value:function(){return"No more attempts allowed"}},{key:"waitAttempt",value:function(){return"Waiting for a new attempt"}},{key:"increaseCapacity",value:function(e){return"Increase. Outbound BFRs aggregated = ".concat(e)}},{key:"increaseCapacityBySensor",value:function(){return"Increased by sensor"}},{key:"decreaseCapacity",value:function(e){return"Decrease. Outbound BFRs aggregated = ".concat(e)}},{key:"decreaseCapacityChildLost",value:function(e){return"Decrease after a lost child. Reason: ".concat(e)}},{key:"keepCapacity",value:function(e){return"Keep. Outbound BFRs aggregated = ".concat(e)}},{key:"adaptCapacity",value:function(e,t){return"Adapt for bitrate: ".concat(e," -> ").concat(t)}},{key:"adaptCapacityNewRepresentation",value:function(e,t){return"Adapt for bitrate: ".concat(e," -> ").concat(t,". New representation")}},{key:"reuseCapacity",value:function(){return"Reuse former capacity"}},{key:"restartCapacityNewRepresentation",value:function(){return"Restart. New representation"}},{key:"zeroCapacityNewRepresentation",value:function(){return"Zero. New representation"}},{key:"sensingStart",value:function(e,t){return"Sensing starts, target: ".concat(e,", to cork: ").concat(t," bits.")}},{key:"sensingEnded",value:function(e){return"Sensing ended, detected BFR: ".concat(e)}},{key:"uncorkingOutbounds",value:function(){return"Sensing cork done, uncorking..."}},{key:"sensingTimeout",value:function(){return"\uD83D\uDD25 Sensing timeout."}},{key:"overflowBytesSent",value:function(){return"Overflow in bytes sent value."}},{key:"invalidSensingResult",value:function(){return"Invalid sensing result."}},{key:"version",value:function(e){return"Version ".concat(e)}},{key:"systemInfo",value:function(e,t){return"".concat(e.name," v").concat(e.version," running on ").concat(t.name," ").concat(t.version)}},{key:"trackerURL",value:function(e){return"Tracker URL: ".concat(e)}},{key:"trackerMetricsURL",value:function(e){return"Tracker metrics URL: ".concat(e)}},{key:"stunURL",value:function(e){return"Stun URL: ".concat(e)}},{key:"channelIdentifier",value:function(e){return"Channel identifier: ".concat(e)}},{key:"trackerClosed",value:function(){return"Connection to the Tracker was unexpectedly closed."}},{key:"connectedTo",value:function(e,t,n){return"Connected to ".concat(e," ").concat(t.toLowerCase()," with nodeId: ").concat(n)}},{key:"disconnectedFrom",value:function(e,t,n){return"Disconnected from ".concat(e," ").concat(t.toLowerCase()," with nodeId: ").concat(n)}},{key:"trackerCDN",value:function(e){return"Connected successfully to the Tracker, with nodeId: ".concat(e," Will fetch from CDN.")}},{key:"trackerP2P",value:function(e,t){return"Connected successfully to the Tracker, with nodeId: ".concat(e," Will fetch from P2P (parent nodeId: ").concat(t,")")}},{key:"moveCDN",value:function(){return"Node is moving, Will fetch from CDN"}},{key:"moveP2P",value:function(e){return"Node is moving. Will fetch from P2P (parent nodeId: ".concat(e,")")}},{key:"printContentId",value:function(e,t){return t&&e!==t?", contentId: ".concat(t):""}},{key:"toShortURL",value:function(t){if(t){var n=t.split("/");return((t=n[n.length-1]).length>e.MAX_URL_LENGTH?"...":"")+t.slice(-e.MAX_URL_LENGTH)}}},{key:"sentP2PBegin",value:function(e){return"nodeId: ".concat(e," \uD83D\uDD3A Sent:")}},{key:"receivedP2PBegin",value:function(e){return"nodeId: ".concat(e," \uD83D\uDD3B Received:")}},{key:"logContentStatsForBfr",value:function(e){var t=e.id,n=e.representationId,r=e.origin,i=e.duration,o=e.timeFirst,a=e.timeResponse,s=e.retries;return"(".concat(t,"|").concat(n,"|").concat(r,"|").concat(i/1e3,"|#").concat(s,"|").concat(o/1e3,"|").concat(a/1e3,")")}},{key:"logContentCacheForBfr",value:function(e){var t=e.id,n=e.representationId,r=e.origin,i=e.duration,o=e.firstTimeFirst,a=e.timeFirst,s=e.timeResponse,c=e.discardedTime,u=e.retries,l="(".concat(t,"|").concat(n,"|").concat(r,"|").concat(i/1e3,"|#").concat(u);return l+="|".concat(o/1e3,"|").concat(a/1e3,"|").concat(s/1e3,"|").concat(c/1e3),l+=")"}},{key:"genericErrorFetchingSteeringManifest",value:function(e){return"Error fetching the steering manifest from ".concat(e)}},{key:"fetchingSteeringManifest",value:function(){return"â¸ï¸ Fetching content steering manifest."}},{key:"contentSteeringManifestResponse",value:function(e){return"â¸ï¸ Content steering manifest response: ".concat(e)}},{key:"replacedUrlByPathMatching",value:function(e,t){return"â¸ï¸ Replace base url in content from: ".concat(e," to cdn: ").concat(t," by matching paths")}},{key:"replacedUrlByHostname",value:function(e,t){return"â¸ï¸ Replace base url in content from: ".concat(e," to cdn: ").concat(t," by hostname")}},{key:"reportBufferFillingRate",value:function(e,t,n){return"\uD83D\uDC89 Debug BFR: Report ".concat(t," BFR ").concat(e," ").concat(n?"forced zero":"")}},{key:"updateBufferFillingRateCalculationOnRequests",value:function(e,t,n,r,i,o,a,s){return"\uD83D\uDC89 Debug BFR: Update ".concat(n," BFR ").concat(t," -> ").concat(e,", on requests, division ").concat(r," / ").concat(i," (elapsed ").concat(a/1e3," - ").concat(o/1e3,"), contents: [ ").concat(s.join(", ")," ]")}},{key:"updateBufferFillingRateCalculationOnThroughput",value:function(e,t,n,r,i,o,a){return"\uD83D\uDC89 Debug BFR: Update ".concat(n," BFR ").concat(t," -> ").concat(e,", on throughput, division ").concat(r," / ").concat(i," (actual bitrate = ").concat(8*o," / ").concat(a/1e3,"), data: ").concat(JSON.stringify({bitrate:i,nloaded:o,tdelta:a}))}},{key:"clearBufferFillingRate",value:function(e,t){return"\uD83D\uDC89 Debug BFR: Clear ".concat(t," BFR ").concat(e)}},{key:"printCacheForDebugBfr",value:function(e){var t=this;return"\uD83D\uDC89 Debug BFR: Cache: "+e.filter(function(e){return e.isCacheable&&e.isFinished}).map(function(e){return t.logContentCacheForBfr(e)}).join(", ")}},{key:"tecaLostParentBfr",value:function(e,t,n){var r=t[t.length-1];return"\uD83D\uDC89 Debug BFR: Lost parent ---\x3e ".concat(e,", Hist inboundBfr: ").concat(JSON.stringify(t),", aggrInboundBfr: ").concat(n,", Last inboundBfr: ").concat(r)}},{key:"tecaLostChildBfr",value:function(e,t,n){var r=t[t.length-1];return"\uD83D\uDC89 Debug BFR: Lost child ---\x3e ".concat(e,", Hist outboundBfr: ").concat(JSON.stringify(t),", aggrOutboundBfr: ").concat(n,", Last outboundBfr: ").concat(r)}},{key:"tecaHistoricalBfrs",value:function(e,t,n,r){return"\uD83D\uDC89 Debug BFR: TECA historical arrays: Hist inbound BFRs (length ".concat(e,", unique ").concat(t,"), hist outbound BFRs (length ").concat(n,", unique ").concat(r,")")}}])}();tr.MAX_DECIMALS=4,tr.MAX_URL_LENGTH=40,function(e){e.SETTINGS_CHANGED="SETTINGS_CHANGED",e.POLYNET_DATA_CHANGED="POLYNET_DATA_CHANGED",e.POLYNET_STATE_CHANGED="POLYNET_STATE_CHANGED",e.POLYNET_MODE_CHANGED="POLYNET_MODE_CHANGED",e.METRICS_MESSAGE="METRICS_MESSAGE",e.COUNTERMEASURE_TRACKER_RESPONSE_TIMEOUT="COUNTERMEASURE_TRACKER_RESPONSE_TIMEOUT",e.REQUEST_NO_RECOVERY="REQUEST_NO_RECOVERY",e.REQUEST_CONNECT="REQUEST_CONNECT",e.LOG_REQUEST_REPAIR="LOG_REQUEST_REPAIR",e.REQUEST_REPAIR="REQUEST_REPAIR",e.WS_OPEN="WS_OPEN",e.WS_ER
1ROR="WS_ERROR",e.WS_CLOSE="WS_CLOSE",e.WS_MESSAGE="WS_MESSAGE",e.CONNECTION_WEB_RTC_DATA_CHANNEL_OPEN="CONNECTION_WEB_RTC_DATA_CHANNEL_OPEN",e.CONNECTION_WEB_RTC_CLOSED="CONNECTION_WEB_RTC_CLOSED",e.LOOP_CHECK_MESSAGE_RECEIVED="LOOP_CHECK_MESSAGE_RECEIVED",e.CONTENT_CACHE_CONTENT_CREATED="CONTENT_CACHE_CONTENT_CREATED",e.CONTENT_CACHE_CONTENT_UPDATED="CONTENT_CACHE_CONTENT_UPDATED",e.CONTENT_CACHE_CONTENT_ERROR="CONTENT_CACHE_CONTENT_ERROR",e.CONTENT_CACHE_CONTENT_REMOVED="CONTENT_CACHE_CONTENT_REMOVED",e.CONTENT_CACHE_RETRY_NEEDED="CONTENT_CACHE_RETRY_NEEDED",e.DATA_CHANNEL_CREATED="DATA_CHANNEL_CREATED",e.DATA_CHANNEL_STATE_CHANGED="DATA_CHANNEL_STATE_CHANGED",e.DATA_CHANNEL_REMOVED="DATA_CHANNEL_REMOVED",e.DATA_CHANNEL_CONNECTED="DATA_CHANNEL_CONNECTED",e.DATA_CHANNEL_CONNECTING_TIMEOUT="DATA_CHANNEL_CONNECTING_TIMEOUT",e.DATA_CHANNEL_STILL_ALIVE_TIMEOUT="DATA_CHANNEL_STILL_ALIVE_TIMEOUT",e.DATA_CHANNEL_MONITOR_UPDATE="DATA_CHANNEL_MONITOR_UPDATE",e.BROWSER_STATS_CONNECTION_TYPE_CHANGED="BROWSER_STATS_CONNECTION_TYPE_CHANGED",e.CONTENT_URL_MISSING="CONTENT_URL_MISSING",e.MANIFEST_INFO_MISSING="MANIFEST_INFO_MISSING",e.COLLECT_POLYNET_STATS="COLLECT_POLYNET_STATS",e.COLLECT_NETWORK_STATS="COLLECT_NETWORK_STATS",e.COLLECT_STREAMING_STATS="
1COLLECT_STREAMING_STATS",e.COLLECT_DATA_CHANNEL_STATS="COLLECT_DATA_CHANNEL_STATS",e.COLLECT_CS_STATS="COLLECT_CS_STATS",e.COLLECT_VIDEO_STATS="COLLECT_VIDEO_STATS",e.COLLECT_PLATFORM_STATS="COLLECT_PLATFORM_STATS",e.STREAM_INFO="STREAM_INFO",e.REPRESENTATION_CHANGE="REPRESENTATION_CHANGE",e.EXECUTE_PENDING_MOVE_INSTRUCTION="EXECUTE_PENDING_MOVE_INSTRUCTION"}(tt||(tt={}));var ti=__nested_webpack_require_888620__(21076).Buffer;let to="function"==typeof atob,ta="function"==typeof ti,ts="function"==typeof TextDecoder?new TextDecoder:void 0,tc=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(("function"==typeof TextEncoder&&new TextEncoder,Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="))),tu=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,tl=String.fromCharCode.bind(String),tf="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):(e,t=e=>e)=>new Uint8Array(Array.prototype.slice.call(e,0).map(t)),th=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),td=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,tp=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return tl((t>>>10)+55296)+tl(56320+(1023&t));case 3:return tl((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return tl((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},tv=e=>e.replace(td,tp),tg=e=>{if(e=e.replace(/\s+/g,""),!tu.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,n,r,i="";for(let o=0;o<e.length;)t=tc[e.charAt(o++)]<<18|tc[e.charAt(o++)]<<12|(n=tc[e.charAt(o++)])<<6|(r=tc[e.charAt(o++)]),i+=64===n?tl(t>>16&255):64===r?tl(t>>16&255,t>>8&255):tl(t>>16&255,t>>8&255,255&t);return i},ty=to?e=>atob(th(e)):ta?e=>ti.from(e,"base64").toString("binary"):tg,tm=ta?e=>tf(ti.from(e,"base64")):e=>tf(ty(e),e=>e.charCodeAt(0)),tb=ta?e=>ti.from(e,"base64").toString("utf8"):ts?e=>ts.decode(tm(e)):e=>tv(ty(e)),tS=e=>th(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),tE=e=>tb(tS(e)),tC=e=>{if("string"!=typeof e)return!1;let t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)};var tw,tT,tk,t_=6e4;!function(e){e.ALWAYS="ALWAYS",e.NEVER="NEVER",e.ONLY_ON_LAN="ONLY_ON_LAN"}(tw||(tw={})),function(e){e.OFF="off",e.DOWN_SPEED="down_speed",e.DURATION="duration"}(tT||(tT={})),function(e){e.AVERAGE="average",e.MEDIAN="median"}(tk||(tk={}));var tR,tO,tI=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find(function(t){return t.type===e});return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}());function tN(e){if(tR)try{var t=tR.get(e);if(t||!tO||!tO.fallback)return t}catch(e){if(!tO||!tO.fallbackOnErrors)throw e}return tI.get(e)}var tx=function(){function e(e,t,n){void 0===n&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return tN(this.target)},enumerable:!1,configurable:!0}),e}(),tA=function(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.target=e.target,this.propertyName=e.propertyName,this.constraints=e.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)},tP=function(){function e(){}return e.isValid=function(e){var t=this;return"isValid"!==e&&"getMessage"!==e&&-1!==Object.keys(this).map(function(e){return t[e]}).indexOf(e)},e.CUSTOM_VALIDATION="customValidation",e.NESTED_VALIDATION="nestedValidation",e.PROMISE_VALIDATION="promiseValidation",e.CONDITIONAL_VALIDATION="conditionalValidation",e.WHITELIST="whitelistValidation",e.IS_DEFINED="isDefined",e}(),tD=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach(function(n){e.properties[n].forEac
1h(function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},o={type:r.type,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new tA(o))})}),t},e}(),tM=__nested_webpack_require_888620__(6365);function tB(){return"undefined"!=typeof window?window:void 0!==tM?tM:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0}var tL=function(){function e(){this.validationMetadatas=[],this.constraintMetadatas=[]}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.length},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;(new tD).transform(e).forEach(function(e){return t.addValidationMetadata(e)})},e.prototype.addValidationMetadata=function(e){this.validationMetadatas.push(e)},e.prototype.addConstraintMetadata=function(e){this.constraintMetadatas.push(e)},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach(function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)}),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var o=function(e){return void 0!==e.always?e.always:(!e.groups||!e.groups.length)&&n},a=function(e){return!(!r||i&&i.length||!e.groups||!e.groups.length)},s=this.validationMetadatas.filter(function(n){return(n.target===e||n.target===t)&&(!!o(n)||!a(n)&&(!(i&&i.length>0)||n.groups&&!!n.groups.find(function(e){return -1!==i.indexOf(e)})))}),c=this.validationMetadatas.filter(function(t){return"string"!=typeof t.target&&t.target!==e&&(!(t.target instanceof Function)||e.prototype instanceof t.target)&&(!!o(t)||!a(t)&&(!(i&&i.length>0)||t.groups&&!!t.groups.find(function(e){return -1!==i.indexOf(e)})))}).filter(function(e){return!s.find(function(t){return t.propertyName===e.propertyName&&t.type===e.type})});return s.concat(c)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.filter(function(t){return t.target===e})},e}();function tj(){var e=tB();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new tL),e.classValidatorMetadataStorage}function tF(e){if(e.validator instanceof Function){if(t=e.validator,tN(tL).getTargetValidatorConstraints(e.validator).length>1)throw"More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(e.target.name,":").concat(e.propertyName)}else{var t,n=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return n.validate(e,t)},e.prototype.defaultMessage=function(e){return n.defaultMessage?n.defaultMessage(e):""},e}(),tj().addConstraintMetadata(new tx(t,e.name,e.async))}var r={type:e.name&&tP.isValid(e.name)?e.name:tP.CUSTOM_VALIDATION,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};tj().addValidationMetadata(new tA(r))}var tU=function(){function e(){}return e.prototype.toString=function(e,t,n){var r=this;void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n="");var i=e?"\x1b[1m":"",o=e?"\x1b[22m":"",a=function(e){return" - property ".concat(i).concat(n).concat(e).concat(o," has failed the following constraints: ").concat(i).concat(Object.keys(r.constraints).join(", ")).concat(o," \n")};if(t){var s=Number.isInteger(+this.property)?"[".concat(this.property,"]"):"".concat(n?".":"").concat(this.property);return this.constraints?a(s):this.children?this.children.map(function(t){return t.toString(e,!0,"".concat(n).concat(s))}).join(""):""}return"An instance of ".concat(i).concat(this.target?this.target.constructor.name:"an object").concat(o," has failed the validation:\n")+(this.constraints?a(this.property):"")+(this.children?this.children.map(function(t){return t.toString(e,!0,r.property)}).join(""):"")},e}(),tq=function(){function e(){}return e.replaceMessageSpecialTokens=function(e,t){var n;return e instanceof Function?n=e(t):"string"==typeof e&&(n=e),n&&Array.isArray(t.constraints)&&t.constraints.forEach(function(e,t){n=n.replace(RegExp("\\$constraint".concat(t+1),"g"),function(e){return Array.isArray(e)?e.join(", "):"".concat(e)}(e))}),n&&void 0!==t.value&&null!==t.value&&"string"==typeof t.value&&(n=n.replace(/\$value/g,t.value)),n&&(n=n.replace(/\$property/g,t.property)),n&&(n=n.replace(/\$target/g,t.targetName)),n},e}();function tH(e){return null!==e&&"object"===i(e)&&"function"==typeof e.then}var tW,tV=function(){function e(e,t){this.validator=e,this.validatorOptions=t,this.awaitingPromises=[],this.ignoreAsyncValidations=!1,this.metadataStorage=tj()}return e.prototype.execute=function(e,t,n){var r,i=this;this.metadataStorage.hasValidationMetaData||!0!==(null==(r=this.validatorOptions)?void 0:r.enableDebugMessages)||console.warn("No metadata found. There is more than once class-validator version installed probably. You need to flatten your dependencies.");var o=this.validatorOptions?this.validatorOptions.groups:void 0,a=this.validatorOptions&&this.validatorOptions.strictGroups||!1,s=this.validatorOptions&&this.validatorOptions.always||!1,c=this.metadataStorage.getTargetValidationMetadatas(e.constructor,t,s,a,o),u=this.metadataStorage.groupByPropertyName(c);if(this.validatorOptions&&this.validatorOptions.forbidUnknownValues&&!c.length){var l=new tU;return this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.target&&!0!==this.validatorOptions.validationError.target||(l.target=e),l.value=void 0,l.property=void 0,l.children=[],l.constraints={unknownValue:"an unknown value was passed to the validate function"},void n.push(l)}this.validatorOptions&&this.validatorOptions.whitelist&&this.whitelist(e,u,n),Object.keys(u).forEach(function(t){var r=e[t],o=u[t].filter(function(e){return e.type===tP.IS_DEFINED}),a=u[t].filter(function(e){return e.type!==tP.IS_DEFINED&&e.type!==tP.WHITELIST});r instanceof Promise&&a.find(function(e){return e.type===tP.PROMISE_VALIDATION})?i.awaitingPromises.push(r.then(function(r){i.performValidations(e,r,t,o,a,n)})):i.performValidations(e,r,t,o,a,n)})},e.prototype.whitelist=function(e,t,n){var r=this,i=[];Object.keys(e).forEach(function(e){t[e]&&0!==t[e].length||i.push(e)}),i.length>0&&(this.validatorOptions&&this.validatorOptions.forbidNonWhitelisted?i.forEac
1h(function(t){var i,o=r.generateValidationError(e,e[t],t);(i={})[tP.WHITELIST]="property ".concat(t," should not exist"),o.constraints=i,o.children=void 0,n.push(o)}):i.forEach(function(t){return delete e[t]}))},e.prototype.stripEmptyErrors=function(e){var t=this;return e.filter(function(e){if(e.children&&(e.children=t.stripEmptyErrors(e.children)),0===Object.keys(e.constraints).length){if(0===e.children.length)return!1;delete e.constraints}return!0})},e.prototype.performValidations=function(e,t,n,r,i,o){var a=i.filter(function(e){return e.type===tP.CUSTOM_VALIDATION}),s=i.filter(function(e){return e.type===tP.NESTED_VALIDATION}),c=i.filter(function(e){return e.type===tP.CONDITIONAL_VALIDATION}),u=this.generateValidationError(e,t,n);o.push(u),this.conditionalValidations(e,t,c)&&(this.customValidations(e,t,r,u),this.mapContexts(e,t,r,u),void 0===t&&this.validatorOptions&&!0===this.validatorOptions.skipUndefinedProperties||null===t&&this.validatorOptions&&!0===this.validatorOptions.skipNullProperties||null==t&&this.validatorOptions&&!0===this.validatorOptions.skipMissingProperties||(this.customValidations(e,t,a,u),this.nestedValidations(t,s,u.children),this.mapContexts(e,t,i,u),this.mapContexts(e,t,a,u)))},e.prototype.generateValidationError=function(e,t,n){var r=new tU;return this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.target&&!0!==this.validatorOptions.validationError.target||(r.target=e),this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.value&&!0!==this.validatorOptions.validationError.value||(r.value=t),r.property=n,r.children=[],r.constraints={},r},e.prototype.conditionalValidations=function(e,t,n){return n.map(function(n){return n.constraints[0](e,t)}).reduce(function(e,t){return e&&t},!0)},e.prototype.customValidations=function(e,t,n,r){var i=this;n.forEach(function(n){i.metadataStorage.getTargetValidatorConstraints(n.constraintCls).forEach(function(o){if(!(o.async&&i.ignoreAsyncValidations||i.validatorOptions&&i.validatorOptions.stopAtFirstError&&Object.keys(r.constraints||{}).length>0)){var a={targetName:e.constructor?e.constructor.name:void 0,property:n.propertyName,object:e,value:t,constraints:n.constraints};if(n.each&&(Array.isArray(t)||t instanceof Set||t instanceof Map)){var s=(function(e){return e instanceof Map?Array.from(e.values()):Array.isArray(e)?e:Array.from(e)})(t).map(function(e){return o.instance.validate(e,a)});if(s.some(function(e){return tH(e)})){var c=Promise.all(s.map(function(e){return tH(e)?e:Promise.resolve(e)})).then(function(a){if(!a.every(function(e){return e})){var s=i.createValidationError(e,t,n,o),c=s[0],u=s[1];r.constraints[c]=u,n.context&&(r.contexts||(r.contexts={}),r.contexts[c]=Object.assign(r.contexts[c]||{},n.context))}});i.awaitingPromises.push(c)}else if(!s.every(function(e){return e})){var u=i.createValidationError(e,t,n,o);d=u[0],p=u[1],r.constraints[d]=p}}else{var l=o.instance.validate(t,a);if(tH(l)){var f=l.then(function(a){if(!a){var s=i.createValidationError(e,t,n,o),c=s[0],u=s[1];r.constraints[c]=u,n.context&&(r.contexts||(r.contexts={}),r.contexts[c]=Object.assign(r.contexts[c]||{},n.context))}});i.awaitingPromises.push(f)}else if(!l){var h=i.createValidationError(e,t,n,o),d=h[0],p=h[1];r.constraints[d]=p}}}})})},e.prototype.nestedValidations=function(e,t,n){var r=this;void 0!==e&&t.forEach(function(i){var o;if(i.type===tP.NESTED_VALIDATION||i.type===tP.PROMISE_VALIDATION)if(Array.isArray(e)||e instanceof Set||e instanceof Map)(e instanceof Set?Array.from(e):e).forEach(function(i,o){r.performValidations(e,i,o.toString(),[],t,n)});else if(e instanceof Object){var a="string"==typeof i.target?i.target:i.target.name;r.execute(e,a,n)}else{var s=new tU;s.value=e,s.property=i.propertyName,s.target=i.target;var c=r.createValidationError(i.target,e,i),u=c[0],l=c[1];(o={})[u]=l,s.constraints=o,n.push(s)}})},e.prototype.mapContexts=function(e,t,n,r){var i=this;return n.forEach(function(e){if(e.context){var t=void 0;e.type===tP.CUSTOM_VALIDATION&&(t=i.metadataStorage.getTargetValidatorConstraints(e.constraintCls)[0]);var n=i.getConstraintType(e,t);r.constraints[n]&&(r.contexts||(r.contexts={}),r.contexts[n]=Object.assign(r.contexts[n]||{},e.context))}})},e.prototype.createValidationError=function(e,t,n,r){var i=e.constructor?e.constructor.name:void 0,o=this.getConstraintType(n,r),a={targetName:i,property:n.propertyName,object:e,value:t,constraints:n.constraints},s=n.message||"";return n.message||this.validatorOptions&&(!this.validatorOptions||this.validatorOptions.dismissDefaultMessages)||r&&r.instance.defaultMessage instanceof Function&&(s=r.instance.defaultMessage(
1a)),[o,tq.replaceMessageSpecialTokens(s,a)]},e.prototype.getConstraintType=function(e,t){return t&&t.name?t.name:e.type},e}(),tG=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},tz=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},tK=function(){function e(){}return e.prototype.validate=function(e,t,n){return this.coreValidate(e,t,n)},e.prototype.validateOrReject=function(e,t,n){return tG(this,void 0,void 0,function(){var r;return tz(this,function(i){switch(i.label){case 0:return[4,this.coreValidate(e,t,n)];case 1:return(r=i.sent()).length?[2,Promise.reject(r)]:[2]}})})},e.prototype.validateSync=function(e,t,n){var r="string"==typeof e?t:e,i="string"==typeof e?e:void 0,o=new tV(this,"string"==typeof e?n:t);o.ignoreAsyncValidations=!0;var a=[];return o.execute(r,i,a),o.stripEmptyErrors(a)},e.prototype.coreValidate=function(e,t,n){var r="string"==typeof e?t:e,i="string"==typeof e?e:void 0,o=new tV(this,"string"==typeof e?n:t),a=[];return o.execute(r,i,a),Promise.all(o.awaitingPromises).then(function(){return o.stripEmptyErrors(a)})},e}();function tX(e,t,n){return"string"==typeof e?tN(tK).validateSync(e,t,n):tN(tK).validateSync(e,t)}function tY(e,t,n){var r=function(e){return eE.isFinite(e)||Math.abs(e)===1/0};if(!r(e))throw TypeError("@InRange: Invalid minimum value: ".concat(e));if(!r(t))throw TypeError("@InRange: Invalid maximum value: ".concat(t));if(e>t){var i=[t,e];e=i[0],t=i[1]}return function(r,i){tF({name:"InRange",options:n,propertyName:i,target:r.constructor,validator:{validate:function(n){return eE.isFinite(n)&&n>=e&&n<=t}}})}}function tZ(e){return tY(0,Number.MAX_SAFE_INTEGER,e)}function t$(e){return function(t,n){tF({name:"IsFunction",options:e,propertyName:n,target:t.constructor,validator:{validate:eE.isFunction}})}}function tJ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ignoreCase:!1},n=arguments.length>2?arguments[2]:void 0,r=Object.keys(e).filter(function(e){return isNaN(Number(e))}),i=(null==t?void 0:t.ignoreCase)?function(e){return eE.isString(e)&&r.some(function(t){return t.toUpperCase()===e.toUpperCase()})}:function(e){return r.includes(e)};return function(e,t){tF({name:"IsEnumKey",options:n,propertyName:t,target:e.constructor,validator:{validate:i}})}}function tQ(e,t){return function(n){return e(t&&t.each?"each value in ":"",n)}}function t0(e,t){return function(n,r){tF({name:e.name,target:n.constructor,propertyName:r,options:t,constraints:e.constraints,validator:e.validator})}}!function(e){e.validate=tX}(tW||(tW={}));var t1=tP.IS_DEFINED;function t2(e){return t0({name:t1,validator:{validate:function(e){return null!=e},defaultMessage:tQ(function(e){return e+"$property should not be null or undefined"},e)}},e)}function t3(e){return t0({name:"isString",validator:{validate:function(e,t){return function(e){return e instanceof String||"string"==typeof e}(e)},defaultMessage:tQ(function(e){return e+"$property must be a string"},e)}},e)}var t6=__nested_webpack_require_888620__(11725),t8=__nested_webpack_require_888620__.n(t6);function t5(e,t){return t0({name:"isUrl",constraints:[e],validator:{validate:function(e,t){return function(e,t){return"string"==typeof e&&t8()(e,t)}(e,t.constraints[0])},defaultMessage:tQ(function(e){return e+"$property must be an URL address"},t)}},t)}function t4(e){return t0({name:"isBoolean",validator:{validate:function(e,t){return function(e){return e instanceof Boolean||"boolean"==typeof e}(e)},defaultMessage:tQ(function(e){return e+"$property must be a boolean value"},e)}},e)}var t7=function(){return(t7=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function t9(e){var t=t7({},e),n=t.each?"each value in ":"";return t.message=t.message||n+"nested property $property must be either object or array",function(e,n){var r={type:tP.NEST
1ED_VALIDATION,target:e.constructor,propertyName:n,validationOptions:t};tj().addValidationMetadata(new tA(r))}}function ne(e,t){return t0({name:"isEnum",constraints:[e],validator:{validate:function(e,t){return function(e,t){return Object.keys(t).map(function(e){return t[e]}).indexOf(e)>=0}(e,t.constraints[0])},defaultMessage:tQ(function(e){return e+"$property must be a valid enum value"},t)}},t)}function nt(e,t,n){return t=u(t),c(e,nn()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function nn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nn=function(){return!!e})()}var nr,ni=function(e,t,n,r){var o,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===("undefined"==typeof Reflect?"undefined":i(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(a<3?o(s):a>3?o(t,n,s):o(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},no=s(function e(){r(this,e)});ni([t2(),t3()],no.prototype,"hashedKey",void 0),ni([t2(),t5({protocols:["http","https"],require_tld:!1,require_protocol:!0})],no.prototype,"metricSinkUrl",void 0),ni([t2(),t5({protocols:["ws","wss"],require_tld:!1,require_protocol:!0})],no.prototype,"signalServerUrl",void 0),ni([t2(),t0({name:"isArray",validator:{validate:function(e,t){return function(e){return Array.isArray(e)}(e)},defaultMessage:tQ(function(e){return e+"$property must be an array"},nr)}},nr)],no.prototype,"stunServerUrl",void 0);var na=s(function e(){r(this,e),this.level=eW[eW.OFF]});ni([tJ(eW,{ignoreCase:!0})],na.prototype,"level",void 0);var ns=function(e){function t(){return r(this,t),nt(this,t,arguments)}return f(t,e),s(t)}(na),nc=s(function e(){r(this,e),this.username=void 0,this.password=void 0});ni([t3()],nc.prototype,"username",void 0),ni([t3()],nc.prototype,"password",void 0);var nu=s(function e(){r(this,e),this.enabled=!1,this.type=eV.OFF,this.basic=new nc});ni([t4()],nu.prototype,"enabled",void 0),ni([tJ(eV,{ignoreCase:!0})],nu.prototype,"type",void 0),ni([t9()],nu.prototype,"basic",void 0);var nl=function(e){function t(){var e;return r(this,t),(e=nt(this,t,arguments)).batchSize=50,e.enabled=!1,e.maxQueueSize=1e3,e.maxRetries=3,e.postTimeout=1e3,e.retryTimeout=5e3,e.url=void 0,e.auth=new nu,e}return f(t,e),s(t)}(na);ni([tY(1,Number.MAX_SAFE_INTEGER)],nl.prototype,"batchSize",void 0),ni([t4()],nl.prototype,"enabled",void 0),ni([tY(1,Number.MAX_SAFE_INTEGER)],nl.prototype,"maxQueueSize",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nl.prototype,"maxRetries",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nl.prototype,"postTimeout",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nl.prototype,"retryTimeout",void 0),ni([t3()],nl.prototype,"url",void 0),ni([t9()],nl.prototype,"auth",void 0);var nf=s(function e(){r(this,e),this.console=new ns,this.http=new nl,this.remote=new nl});ni([t9()],nf.prototype,"console",void 0),ni([t9()],nf.prototype,"http",void 0),ni([t9()],nf.prototype,"remote",void 0);var nh=s(function e(){r(this,e),this.minPercentReady=.75,this.sctpInterAsnCount=1,this.sctpIntraAsnCount=1,this.sctpLanCount=1,this.singleConnectionTimeout=700});ni([tY(0,1)],nh.prototype,"minPercentReady",void 0),ni([tY(1,Number.MAX_SAFE_INTEGER)],nh.prototype,"sctpInterAsnCount",void 0),ni([tY(1,Number.MAX_SAFE_INTEGER)],nh.prototype,"sctpIntraAsnCount",void 0),ni([tY(1,Number.MAX_SAFE_INTEGER)],nh.prototype,"sctpLanCount",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nh.prototype,"singleConnectionTimeout",void 0);var nd=s(function e(){r(this,e),this.sequentialDetectionThreshold=6,this.sequentialInjectionAmount=10});ni([tY(0,Number.MAX_SAFE_INTEGER)],nd.prototype,"sequentialDetectionThreshold",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nd.prototype,"sequentialInjectionAmount",void 0);var np=s(function e(){r(this,e),this.exponentialBase=1.5,this.maxBackoffTimeout=2,this.timeoutJitterRatio=.5});ni([tY(0,Number.MAX_SAFE_INTEGER)],np.prototype,"exponentialBase",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],np.prototype,"maxBackoffTimeout",void 0),ni([tY(0,1)],np.prototype,"timeoutJitterRatio",void 0);var nv=s(function e(){r(this,e),this.initialFlip=.2,this.flip=.1,this.representation=.3,this.decrease=.4,this.increase=.5,this.sensing=.6,this.keep=.7});ni([tY(0,1)],nv.prototype,"initialFlip",void 0),ni([tY(0,1)],nv.prototype,"flip",void 0),ni([tY(0,1)],nv.prototype,"representation",void 0),ni([tY(0,1)],nv.prototype,"decrease",void 0),ni([tY(0,1)],nv.prototype,"increase",void 0),ni([tY(0,1)],nv.prototype,"sensing",void 0),ni([tY(0,1)],nv.prototype,"keep",void 0);var ng=s(function e(){r(this,e),this.enableTeca=!0,this.enableSensing=!0,this.bfrHistoryUniqueDesiredValues=3,this.usePrecedenceModifiers=!0,this.capacityEstimationInterval=1e3,this.maxTimeWithoutSensing=6e3,this.initialFlipRatio=.5,this.bfrTimesToIncrease=3.6,this.bfrTimesToDecrease=3.6,this.maxAttemptsToExitZeroCapacity=5,this.sensingTimeout=6e3,this.sensingIncreaseFactor=21,this.minimalRequiredSensedCapacities=3,this.minimalRequiredIncreaseSensedCapacities=2,this.capacityModifiers=new nv,this.checkOutboundBfrBeforeSensing=!1,this.historicalAggregationMethod=tk.AVERAGE});ni([t4()],ng.prototype,"enableTeca",void 0),ni([t4()],ng.prototype,"enableSensing",void 0),ni([tZ()],ng.prototype,"bfrHistoryUniqueDesiredValues",void 0),ni([t4()],ng.prototype,"usePrecedenceModifiers",void 0),ni([tZ()],ng.prototype,"capacityEstimationInterval",void 0),ni([tZ()],ng.prototype,"maxTimeWithoutSensing",void 0),ni([tZ()],ng.prototype,"periodicSensingInterval",void 0),ni([tZ()],ng.prototype,"initialFlipRatio",void 0),ni([tZ()],ng.prototype,"bfrTimesToIncrease",void 0),ni([tZ()],ng.prototype,"bfrTimesToDecrease",void 0),ni([tZ()],ng.prototype,"maxAttemptsToExitZeroCapacity",void 0),ni([tZ()],ng.prototype,"sensingTimeout",void 0),ni([tZ()],ng.prototype,"sensingIncreaseFactor",void 0),ni([tZ()],ng.prototype,"minimalRequiredSensedCapacities",void 0),ni([tZ()],ng.prototype,"minimalRequiredIncreaseSensedCapacities",void 0),ni([t9()],ng.prototype,"capacityModifiers",void 0),ni([t4()],ng.prototype,"checkOutboundBfrBeforeSensing",void 0),ni([ne(tk)],ng.prototype,"historicalAggregationMethod",void 0);var ny=s(function e(){r(this,e),this.enableCs=!0,this.isRevoked=!1});ni([t4()],ny.prototype,"enableCs",void 0),ni([t4()],ny.prototype,"isRevoked",void 0);var nm,nb=s(function e(){r(this,e),this.regex=/^http[s]?:\/\/(.*\/[\w\W]+\.m3u[8]?|.*\/[\w\W]+\.mpd)[?]?/});ni([function(e,t){tF({name:"IsRegExp",options:nm,propertyName:t,target:e.constructor,validator:{validate:function(e){return e instanceof RegExp}}})}],nb.prototype,"regex",void 0);var nS=s(function e(){r(this,e),this.enableSinglePc=!1,this.rtcConnectionHighWaterMark=0,this.peerBufferedAmountLowThreshold=16384,this.peerHighWaterMark=1048576,this.peerInactivityTimeout=12e4});ni([t4()],nS.prototype,"enableSinglePc",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nS.prototype,"rtcConnectionHighWaterMark",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nS.prototype,"peerBufferedAmountLowThreshold",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nS.prototype,"peerHighWaterMark",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nS.prototype,"peerInactivityTimeout",void 0);
1var nE=s(function e(){r(this,e),this.blacklistedFragmentUrlRegex=void 0,this.fragmentUrlSnRegex=void 0,this.fragmentUrlSubcontentRegex=void 0,this.urlLookupFilterRegex=void 0});ni([t3()],nE.prototype,"blacklistedFragmentUrlRegex",void 0),ni([t3()],nE.prototype,"fragmentUrlSnRegex",void 0),ni([t3()],nE.prototype,"fragmentUrlSubcontentRegex",void 0),ni([t3()],nE.prototype,"urlLookupFilterRegex",void 0);var nC=s(function e(){r(this,e),this.enabled=!0,this.forceMerge=!1,this.nloaded=2e5,this.tdelta=200});ni([t4()],nC.prototype,"enabled",void 0),ni([t4()],nC.prototype,"forceMerge",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nC.prototype,"nloaded",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nC.prototype,"tdelta",void 0);var nw=function(){},nT=function(e){function t(){var e;return r(this,t),(e=nt(this,t,arguments)).apiKey=new no,e.bufferHealthDelta=1e3,e.bufferHealthThreshold=8e3,e.bufferHealthPeriod=1e3,e.bufferHealthThresholdRatio=.25,e.channelId="default channel",e.debug=eW.OFF,e.defaultContentDuration=void 0,e.enableEstimatedBitrate=!1,e.enablePullOnce=!1,e.logger=new nf,e.loopCheckerTtl=100,e.liveCacheDuration=t_,e.maxCacheDuration=t_,e.maxConcurrentPeerNegotiation=100,e.maxOutbound=40,e.metricsPeriod=1e3,e.multiPeer=new nh,e.natTraversal=new nd,e.nextSegmentDurationFactor=1,e.onMetrics=nw,e.transformRequest=nw,e.playerContentThrottlingMode=tT.OFF,e.pushProtocol=!0,e.initialBurstPush=!1,e.reconnectRetryRange=new np,e.sdkFeatureFlags="",e.sharingContent=tw.ONLY_ON_LAN,e.teca=new ng,e.timeoutP2PConnection=999999e3,e.trackerResponseTimeoutPeriod=2e4,e.withCredentials=!1,e.analytics=new nb,e.cs=new ny,e.contentSteeringEndpoint="",e.enableInboundChecks=!1,e.enableTimeoutP2PConnection=!1,e.rtcConnection=new nS,e.slowParentDurationFactor=9e3,e.bfrZero=!0,e.bfrCompletion=!1,e.bfrOutlierFilter=new nC,e.hlsParser=new nE,e.customDimension1="",e.customDimension2="",e.customDimension3="",e.p2pAllowDvr=!0,e.p2pAllowVod=!0,e.overrideDefaultMoveDelayTimeout=0,e.safeCacheRangePtsTolerance=1.5,e.overrideCustomDimensionWithVodDvrStats=!1,e.kickMismatchedVodDvrChildren=!1,e.guaranteedCdnInteractionPeriod=0,e.modifyInternalCdnRequestDomainToMatchPlayer=!1,e.allowPrefixedWebRtc=!1,e}return f(t,e),s(t)}(ez);function nk(e){return eE.isObject(e)&&!Array.isArray(e)&&!eE.isFunction(e)&&!eE.isRegExp(e)}function n_(e){var t=function(n,r,i){nk(r)&&(r=eE.transform(r,t,{})),Array.isArray(r)&&(r=eE.transform(r,t,[])),n[i=e(i).replace(/p_2_p/g,"p2p").replace(/p2P/g,"p2p").replace(/v_/g,"v")]=r};return function(e){return eE.transform(e,t)}}ni([t2(),t9()],nT.prototype,"apiKey",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"bufferHealthDelta",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"bufferHealthThreshold",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"bufferHealthPeriod",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"bufferHealthThresholdRatio",void 0),ni([t3()],nT.prototype,"channelId",void 0),ni([function(e){return function(e,t){var n={type:tP.WHITELIST,target:e.constructor,propertyName:t,validationOptions:void 0};tj().addValidationMetadata(new tA(n))}}()],nT.prototype,"debug",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"defaultContentDuration",void 0),ni([t4()],nT.prototype,"enableEstimatedBitrate",void 0),ni([t4()],nT.prototype,"enablePullOnce",void 0),ni([t9()],nT.prototype,"logger",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"loopCheckerTtl",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"liveCacheDuration",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"maxCacheDuration",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"maxConcurrentPeerNegotiation",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"maxOutbound",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"metricsPeriod",void 0),ni([t9()],nT.prototype,"multiPeer",void 0),ni([t9()],nT.prototype,"natTraversal",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"nextSegmentDurationFactor",void 0),ni([t$()],nT.prototype,"onMetrics",void 0),ni([t$()],nT.prototype,"transformRequest",void 0),ni([ne(tT)],nT.prototype,"playerContentThrottlingMode",void 0),ni([t4()],nT.prototype,"pushProtocol",void 0),ni([t4()],nT.prototype,"initialBurstPush",void 0),ni([t9()],nT.prototype,"reconnectRetryRange",void 0),ni([t3()],nT.prototype,"sdkFeatureFlags",void 0),ni([ne(tw)],nT.prototype,"sharingContent",void 0),ni([t9()],nT.prototype,"teca",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"timeoutP2PConnection",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"trackerResponseTimeoutPeriod",void 0),ni([t4()],nT.prototype,"withCredentials",void 0),ni([t9()],nT.prototype,"analytics",void 0),ni([t9()],nT.prototype,"cs",void 0),ni([t3()],nT.prototype,"contentSteeringEndpoint",void 0),ni([t4()],nT.prototype,"enableInboundChecks",void 0),ni([t4()],nT.prototype,"enableTimeoutP2PConnection",void 0),ni([t9()],nT.prototype,"rtcConnection",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"slowParentDurationFactor",void 0),ni([t4()],nT.prototype,"bfrZero",void 0),ni([t4()],nT.prototype,"bfrCompletion",void 0),ni([t9()],nT.prototype,"bfrOutlierFilter",void 0),ni([t9()],nT.prototype,"hlsParser",void 0),ni([t3()],nT.prototype,"customDimension1",void 0),ni([t3()],nT.prototype,"customDimension2",void 0),ni([t3()],nT.prototype,"customDimension3",void 0),ni([t4()],nT.prototype,"p2pAllowDvr",void 0),ni([t4()],nT.prototype,"p2pAllowVod",void 0),ni([function(e){return function(e,t){var n={type:tP.CONDITIONAL_VALIDATION,target:e.constructor,propertyName:t,constraints:[function(e,n){return null!==e[t]&&void 0!==e[t]}],validationOptions:void 0};tj().addValidationMetadata(new tA(n))}}(),tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"overrideDefaultMoveDelayTimeout",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"safeCacheRangePtsTolerance",void 0),ni([t4()],nT.prototype,"overrideCustomDimensionWithVodDvrStats",void 0),ni([t4()],nT.prototype,"kickMismatchedVodDvrChildren",void 0),ni([tY(0,Number.MAX_SAFE_INTEGER)],nT.prototype,"guaranteedCdnInteractionPeriod",void 0),ni([t4()],nT.prototype,"modifyInternalCdnRequestDomainToMatchPlayer",void 0),ni([t4()],nT.prototype,"allowPrefixedWebRtc",void 0);var nR=n_(eE.camelCase),nO=n_(eE.snakeCase);function nI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nI=function(){return!!e})()}var nN=["apiKey"],nx=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,nI()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).eventBus=eG(e.context).getInstance(),e.loggerSettings=eY(e.context).getInstance(),e.loggerSettings.setup(e.logger,e.debug),e.log=e0(e.context).getInstance().getLogger(t.polyNetFactoryName),e}return f(t,e),s(t,[{key:"destroy",value:function(){var e;null==(e=this.eventBus)||e.offAll({scope:this}),this.eventBus=null}},{key:"setup",value:function(e){var t=this.buildValidSettings(e);if(!eE.isEmpty(t)){var n=this.differenceObjects(this,t);eE.merge(this,n),this.loggerSettings.setup(this.logger,this.debug),this.eventBus.emit(tt.SETTINGS_CHANGED,{diffSettings:n,receivedSettings:t,target:this})}}},{key:"isValidApiKey",get:function(){return eE.isEmpty(tW.validate(this.apiKey,{forbidNonWhitelisted:!0,skipUndefinedProperties:!0,whitelist:!0}))}},{key:"buildValidSettings",value:function(e){var n=eE.cloneDeep(e);
1n=t.parseRequired(n),n=t.normalizeSettings(n);var r=t.validateSettings(n);return this.removeInvalidSettings(n,r),this.filterOutEmptySettings(n)}},{key:"removeInvalidSettings",value:function(e,t){var n=this,r=function(t,i){i.forEach(function(i){var o=i.children,a=i.constraints,s=i.property,c=i.value,u=(null==a?void 0:a.nestedValidation)?t:[].concat(eL(t),[s]);(null==o?void 0:o.length)?r(u,o):((null==a?void 0:a.whitelistValidation)?n.log.trace("Unknown setting ".concat(u.join("."))):n.log.trace("Setting ".concat(u.join(".")," has invalid value ").concat(JSON.stringify(c))),eE.unset(e,u))})};r([],t)}},{key:"filterOutEmptySettings",value:function(e){return eE.transform(e,function e(t,n,r){nk(n)?(n=eE.transform(n,e,{}),eE.isEmpty(n)||(t[r]=n)):void 0!==n&&(t[r]=n)},{})}},{key:"differenceObjects",value:function(e,t){var n=this;return eE.transform(t,function(t,r,i){if(nk(r)){var o=n.differenceObjects(e[i],r);eE.isEmpty(o)||(t[i]=o)}else eE.isEqual(r,e[i])||(t[i]=r)},{})}}],[{key:"validateSettings",value:function(e){return tW.validate(eE.merge(new nT,e),{forbidNonWhitelisted:!0,skipUndefinedProperties:!0,whitelist:!0})}},{key:"parseRequired",value:function(e){return nN.forEach(function(t){eE.isNil(e[t])||function(e,t){if(tC(t[e])){var n=tE(t[e]);try{t[e]=JSON.parse(n)}catch(e){return t}}}(t,e)}),e}},{key:"normalizeSettings",value:function(e){return nR(e)}}])}(nT);nx.polyNetFactoryName="Settings",function(e){e.DEFAULT_MAX_CACHE_DURATION=t_,e.SharingContent=tw}(nx||(nx={}));var nA=eU.getSingletonFactory(nx);let nP={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var nD,nM=new Uint8Array(16);function nB(){if(!nD&&!(nD="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nD(nM)}for(var nL=[],nj=0;nj<256;++nj)nL.push((nj+256).toString(16).slice(1));function nF(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(nL[e[t+0]]+nL[e[t+1]]+nL[e[t+2]]+nL[e[t+3]]+"-"+nL[e[t+4]]+nL[e[t+5]]+"-"+nL[e[t+6]]+nL[e[t+7]]+"-"+nL[e[t+8]]+nL[e[t+9]]+"-"+nL[e[t+10]]+nL[e[t+11]]+nL[e[t+12]]+nL[e[t+13]]+nL[e[t+14]]+nL[e[t+15]]).toLowerCase()}let nU=function(e,t,n){if(nP.randomUUID&&!t&&!e)return nP.randomUUID();var r=(e=e||{}).random||(e.rng||nB)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return nF(r)};function nq(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return nH(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nH(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function nH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nW=function(){return s(function e(){r(this,e)},null,[{key:"getShortId",value:function(e){return e.substring(e.length-5)}},{key:"generateUUID",value:function(){return nU()}},{key:"setCookie",value:function(e,t,n){var r=new Date;r.setTime(r.getTime()+24*n*36e5);var i=r.toUTCString();document.cookie="".concat(e,"=").concat(t,";expires=").concat(i,";path=/;sameSite=lax;")}},{key:"getCookie",value:function(e){var t,n=e+"=",r=nq(document.cookie.split(";"));try{for(r.s();!(t=r.n()).done;){for(var i=t.value;" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(n))return i.substring(n.length,i.length)}}catch(e){r.e(e)}finally{r.f()}return""}},{key:"isAllowedToShare",value:function(e,t){switch(e){case nx.SharingContent.NEVER:return!1;case nx.SharingContent.ALWAYS:break;case nx.SharingContent.ONLY_ON_LAN:return"cellular"!==t}return!0}}])}();function nV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nV=function(){return!!e})()}var nG="device_id",nz=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,nV()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o)))._state=t.States.DISCONNECTED,e._mode=t.Modes.REPAIRING,e._enabled=!0,e.eventBus=eG(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("PolyNet"),e.data={deviceId:t.generateDeviceID(),maskedStreamUri:null,nodeId:null,representationId:null,
1sessionId:t.generateSessionID(),streamId:null,streamUri:null},e}return f(t,e),s(t,[{key:"destroy",value:function(){this.eventBus=null,this.logger=null,this.data=null}},{key:"clearRepresentation",value:function(){var e={representationId:void 0,nodeId:void 0,streamUri:void 0,maskedStreamUri:void 0,streamId:void 0};this.update(e)}},{key:"deviceId",get:function(){return this.data.deviceId}},{key:"sessionId",get:function(){return this.data.sessionId}},{key:"nodeId",get:function(){return this.data.nodeId}},{key:"nodeIdShort",get:function(){return this.nodeId?nW.getShortId(this.nodeId):null}},{key:"mode",get:function(){return this._mode}},{key:"state",get:function(){return this._state}},{key:"representationId",get:function(){return this.data.representationId}},{key:"streamId",get:function(){return this.data.streamId}},{key:"streamUri",get:function(){return this.data.streamUri}},{key:"maskedStreamUri",get:function(){return this.data.maskedStreamUri}},{key:"updateAbility",value:function(e){this._enabled=e}},{key:"updateMode",value:function(e){var n=this.mode;this._mode=e,this.logger.trace("".concat(t.Modes[n]," -> ").concat(t.Modes[this.mode])),this.eventBus.emit(tt.POLYNET_MODE_CHANGED,{target:this,oldMode:n,newMode:e})}},{key:"updateState",value:function(e){if(e!==this.state){var n=this.state;this._state=e,this.logger.trace("State changed: ".concat(t.States[n]," -> ").concat(t.States[this.state])),this.eventBus.emit(tt.POLYNET_STATE_CHANGED,{target:this,oldState:n,newState:e})}}},{key:"update",value:function(e){var t=this.data,n=eE.assign({},this.data,e);this.data=n,this.eventBus.emit(tt.POLYNET_DATA_CHANGED,{target:this,newData:n,oldData:t})}},{key:"isInState",value:function(e){return e===this._state}},{key:"isInMode",value:function(e){return this._mode===e}},{key:"isEnabled",get:function(){return this._enabled}},{key:"isConnected",get:function(){return this.isInState(t.States.CONNECTED)||this.isJoined}},{key:"isJoined",get:function(){return this.isInState(t.States.JOINED)}},{key:"isInRepair",get:function(){return this.isInMode(t.Modes.REPAIRING)}},{key:"isDisconnected",get:function(){return this.isInState(t.States.DISCONNECTED)}},{key:"isInNoRecovery",get:function(){return this.isInState(t.States.NO_RECOVERY)}}],[{key:"generateSessionID",value:function(){return nW.generateUUID()}},{key:"generateDeviceID",value:function(){var e=nW.getCookie(nG);return e||(e=nW.generateUUID()),nW.setCookie(nG,e,3650),e}}])}(ez);nz.polyNetFactoryName="PolyNet",function(e){!function(e){e[e.NO_RECOVERY=0]="NO_RECOVERY",e[e.DISCONNECTED=1]="DISCONNECTED",e[e.CONNECTED=2]="CONNECTED",e[e.JOINED=3]="JOINED"}(e.States||(e.States={})),function(e){e[e.DEFAULT=0]="DEFAULT",e[e.REPAIRING=1]="REPAIRING"}(e.Modes||(e.Modes={}))}(nz||(nz={}));var nK=eU.getSingletonFactory(nz),nX=__nested_webpack_require_888620__(6365),nY=__nested_webpack_require_888620__.n(nX),nZ=__nested_webpack_require_888620__(8803),n$=__nested_webpack_require_888620__.n(nZ);function nJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nJ=function(){return!!e})()}var nQ='video/mp4; codecs="avc1.42E01E,mp4a.40.2"',n0=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,nJ()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("PlatformStats"),e.eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.stats={connectionType:void 0,isAnyMediaSourceApiSupported:void 0,isWebRTCSupported:void 0,location:void 0,os:{name:void 0,version:void 0},browser:{name:void 0,version:void 0},player:{name:void 0,version:void 0}},e.handleConnectionChangeEvent=e.handleConnectionChangeEvent.bind(e),e}return f(t,e),s(t,[{key:"destroy",value:function(){this.stopDetectionConnectionChanges(),this.logger=null,this.eventBus=null}},{key:"start",value:function(){this.eventBus.on(tt.COLLECT_PLATFORM_STATS,this.handleCollectStatsEvent,{scope:this}),this.startDetectionConnectionChanges();var e=t.getOSAndBrowser(),n=e.os,r=e.browser;this.stats.os=n,this.stats.browser=r,this.stats.connectionType=t.getConnectionType(),this.stats.isAnyMediaSourceApiSupported=t.isAnyMediaSourceApiSupported(),this.stats.isWebRTCSupported=(t.isWebRTCSupported()||t.isSupportedPrefixedWebRTC()&&this.settings.allowPrefixedWebRtc)&&t.isWebRTCDataChannelSupported(),this.stats.location=t.getLocationHref()}},{key:"location",get:function(){return this.stats.location}},{key:"connectionType",get:function(){return this.stats.connectionType}},{key:"isAnyMediaSourceApiSupported",get:function(){return this.stats.isAnyMediaSourceApiSupported}},{key:"isWebRTCSupported",get:function(){return this.stats.isWebRTCSupported}},{key:"os",get:function(){return this.stats.os}},{key:"browser",get:function(){return this.stats.browser}},{key:"player",get:function(){return this.stats.player}},{key:"startDetectionConnectionChanges",value:function(){var e=t.getConnection();if(e){var n=t.getConnectionTypeChangedEventName(e);e.addEventListener(n,this.handleConnectionChangeEvent),this.logger.trace("Listening to on '".concat(n,"' events"))}else this.logger.trace("Connection interface not available")}},{key:"stopDetectionConnectionChanges",value:function(){var e=t.getConnection();if(e){var n=t.getConnectionTypeChangedEventName(e);e.removeEventListener(n,this.handleConnectionChangeEvent)}}},{key:"handleConnectionChangeEvent",value:function(e){var n=t.getConnectionType();n!=this.stats.connectionType&&(this.stats.connectionType=n,this.logger.trace("Browser connection type changed from '".concat(this.stats.connectionType,"' to '").concat(n,"'")),this.eventBus.emit(tt.BROWSER_STATS_CONNECTION_TYPE_CHANGED,{target:this,type:this.stats.connectionType}))}},{key:"handleCollectStatsEvent",value:function(e){var t=this;if(e){var n=eE.omit(e,["event"]);eE.mergeWith(this.stats,n,function(e,n,r){return t.updateStats(e,n,r)})}}},{key:"updateStats",value:function(e,t,n){return"player"===n?eE.isNil(null==e?void 0:e.version)&&!eE.isNil(null==t?void 0:t.ver
1sion)?t:e:t}}],[{key:"getOSAndBrowser",value:function(){function e(e){if(!eE.isNil(e)&&!eE.isEmpty(e))return e.replace(/\s+/g,"_").replace(/,/g,".").toLowerCase()}var t=new(n$())(nY().navigator.userAgent).getResult();return{os:{name:e(t.os.name),version:e(t.os.version)},browser:{name:e(t.browser.name),version:e(t.browser.version)}}}},{key:"isAnyMediaSourceApiSupported",value:function(){return t.isManagedMediaSourceExtensionSupported()||t.isMediaSourceExtensionSupported()}},{key:"isMediaSourceExtensionSupported",value:function(){var e,t,n=nY().MediaSource||nY().WebKitMediaSource,r=nY().SourceBuffer||nY().WebKitSourceBuffer,i=n&&eE.isFunction(n.isTypeSupported)&&n.isTypeSupported(nQ),o=!r||eE.isFunction(null==(e=r.prototype)?void 0:e.appendBuffer)&&eE.isFunction(null==(t=r.prototype)?void 0:t.remove);return!!i&&!!o}},{key:"isManagedMediaSourceExtensionSupported",value:function(){var e=nY().ManagedMediaSource;return e&&eE.isFunction(e.isTypeSupported)&&e.isTypeSupported(nQ)}},{key:"isSupportedPrefixedWebRTC",value:function(){var e=t.getOSAndBrowser().browser,n=Number.parseInt(e.version.split(".")[0]);return"chrome"===e.name&&n>=51&&!!nY().webkitRTCPeerConnection}},{key:"isWebRTCSupported",value:function(){return!!nY().RTCPeerConnection}},{key:"isWebRTCDataChannelSupported",value:function(){var e,t;return eE.isFunction(null==(e=nY().RTCPeerConnection)?void 0:e.prototype.createDataChannel)||eE.isFunction(null==(t=nY().webkitRTCPeerConnection)?void 0:t.prototype.createDataChannel)}},{key:"getConnectionType",value:function(){var e=t.getConnection();return(null==e?void 0:e.type)||"unknown"}},{key:"getConnection",value:function(){return nY().navigator.connection||nY().navigator.mozConnection||nY().navigator.webkitConnection}},{key:"getConnectionTypeChangedEventName",value:function(e){return"onchange"in e?"change":"typechange"}},{key:"getLocationHref",value:function(){return nY().location.href}}])}(ez);n0.polyNetFactoryName="PlatformStats";var n1=eU.getSingletonFactory(n0),n2=__nested_webpack_require_888620__(15549);function n3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n3=function(){return!!e})()}var n6=Number.MAX_SAFE_INTEGER,n8=function(e){function t(e){r(this,t);var n,i,o,a=(null==e?void 0:e.highWaterMark)||n6;return n=this,i=t,o=[Object.assign(Object.assign({objectMode:!0},e),{highWaterMark:a,readableHighWaterMark:a,writableHighWaterMark:a})],i=u(i),c(n,n3()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))}return f(t,e),s(t,[{key:"context",get:function(){return this._context},set:function(e){this._context=e}},{key:"start",value:function(){}},{key:"stop",value:function(){}}])}(n2.Duplex),n5=__nested_webpack_require_888620__(25829),n4=__nested_webpack_require_888620__.n(n5),n7=__nested_webpack_require_888620__(86174),n9=function(){function e(){r(this,e)}return s(e,null,[{key:"toString",value:function(e){return(new TextDecoder).decode(e)}},{key:"nodeBufferToArrayBuffer",value:function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}},{key:"concat",value:function(){return e.join.apply(e,arguments).buffer}},{key:"sliceEvery",value:function(e,t){for(var n=e.byteLength,r=[],i=0;i<n;i+=t)r.push(e.slice(i,i+t));return r}},{key:"toArrayBuffer",value:function(e){if(e.length===e.buffer.byteLength)return e.buffer;var t=new ArrayBuffer(e.length);return new Uint8Array(t).set(e),t}},{key:"join",value:function(){for(var e=0,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,o=n;i<o.length;i++)e+=o[i].byteLength;for(var a=new Uint8Array(e),s=0,c=0,u=n;c<u.length;c++){var l=u[c];a.set(new Uint8Array(l),s),s+=l.byteLength}return a}},{key:"copy",value:function(e){return e.slice(0)}}])}();function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(re=function(){return!!e})()}var rt=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},rn=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=t,a=[Object.assign(Object.assign({},e),{objectMode:!0}
1)],o=u(o),(n=c(i,re()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a)))._connected=!1,n}return f(t,e),s(t,[{key:"connected",get:function(){return this._connected}},{key:"configure",value:function(e){}},{key:"startConnection",value:function(){this._connected=!0,this.emit("open")}},{key:"getStats",value:function(){return rt(this,void 0,void 0,p().mark(function e(){return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return");case 1:case"end":return e.stop()}},e)}))}},{key:"_read",value:function(e){}},{key:"_write",value:function(e,t,n){var r={timeRequest:performance.now(),timeFirst:0,timeResponse:0},i=this.createHttpStreamRequest(e,r);this.push({type:"content-response-start",id:e.id,url:e.url,representationId:e.representationId,request:i}),n()}},{key:"_destroy",value:function(){}},{key:"signal",value:function(e){}},{key:"transport",get:function(){return"http"}},{key:"count",get:function(){return 1}},{key:"createHttpStreamRequest",value:function(e,t){var n=this,r=(0,n7.parse)(e.url),i=n4().request(Object.assign(Object.assign({},e),r),function(r){if(function(e){return e.statusCode>=200&&e.statusCode<=399}(r)){var i=0,o=r.headers["content-length"],a=!!o&&isFinite(o)&&!!parseInt(o),s=a?parseInt(o):null;r.on("data",function(o){var c=n9.nodeBufferToArrayBuffer(o);i+=c.byteLength,n.handleOnProgress(e,t,{headers:r.headers,chunk:c,lengthComputable:a,loaded:i,total:s})}),r.on("end",function(){n.handleOnComplete(e,t,{headers:r.headers,responseUrl:r.url})})}else n.handleOnError(e,t,r)});return e.data&&i.write(new Uint8Array(e.data)),i.end(),i.on("error",function(r){n.handleOnError(e,t,r)}),{abort:function(){return i.abort()},request:i}}},{key:"handleOnProgress",value:function(e,t,n){0===t.timeFirst&&(t.timeFirst=Math.max(performance.now(),t.timeRequest)),this.push(Object.assign(Object.assign({},e),{chunk:n.chunk||void 0,url:e.url,lengthComputable:!!n.lengthComputable,loaded:n.loaded,total:n.total,headers:n.headers,type:"content-response-progress"}))}},{key:"handleOnComplete",value:function(e,t,n){var r;t.timeResponse=Math.max(performance.now(),t.timeFirst),this.push(Object.assign(Object.assign({},e),{response:n.data||void 0,headers:n.headers,stats:t,type:"content-response-end",url:e.url,responseUrl:(null==(r=n.request)?void 0:r.responseURL)||n.responseUrl}))}},{key:"handleOnError",value:function(e,t,n){this.emit("error",Object.assign(Object.assign({},e),{msg:n,code:n.statusCode||0,url:n.url||e.url}))}}],[{key:"isSupported",get:function(){return!0}}])}(n8),rr=eU.getInstanceFactory(rn),ri=__nested_webpack_require_888620__(21076).Buffer;function ro(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ra(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ra(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ra(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rs=function(){return!!e})()}var rc=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},ru=window.RTCPeerConnection||window.webkitRTCPeerConnection,rl=!!window.RTCPeerConnection,rf=function(e){function t(e){r(this,t);var n,i,o,a,s=(null==e?void 0:e.highWaterMark)||1048576;return i=this,a=[{allowHalfOpen:!1,highWaterMark:s,readableHighWaterMark:s,writableHighWaterMark:s}],o=u(o=t),(n=c(i,rs()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).lastHighWaterMarkReached=null,n.writeCount=0,n.writeAmount=0,n.bufferBeaconTimer=null,n.lastActivityTimestamp=null,n.settings=nA(n.context).getInstance(),n.highWaterMark=s,n.pendingCandidates=[],n._connected=!1,n}
1return f(t,e),s(t,[{key:"context",get:function(){return this._context},set:function(e){this._context=e}},{key:"start",value:function(){}},{key:"stop",value:function(){}},{key:"connected",get:function(){return this._connected&&this.rtcDataChannel&&"open"===this.rtcDataChannel.readyState}},{key:"bufferedAmount",get:function(){return this.rtcDataChannel.bufferedAmount}},{key:"configure",value:function(e){var t=e.rtcConfiguration,n=e.ordered,r=e.trickle,i=e.iceCompleteTimeout;this.ordered=n,this.trickle=r,this.iceCompleteTimeout=i,this.rtcConfiguration=t}},{key:"startConnection",value:function(){return rc(this,arguments,void 0,function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return p().mark(function n(){var r;return p().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(e.initiator=t,e.rtcPeerConnection=new ru(e.rtcConfiguration),e.rtcPeerConnection.oniceconnectionstatechange=function(){return e.onIceStateChange()},e.rtcPeerConnection.onicegatheringstatechange=function(){return e.onIceStateChange()},e.rtcPeerConnection.ondatachannel=function(t){return e.onDataChannel(t)},e.rtcPeerConnection.onicecandidate=function(t){return e.onIceCandidate(t)},e.once("rtc_ice_complete",function(){return e.onIceComplete()}),e.iceCompleteTimeout&&(r=setTimeout(function(){e.emit("rtc_ice_complete"),clearTimeout(r)},e.iceCompleteTimeout)),!e.initiator){n.next=1;break}return e.createDataChannel(),n.next=1,e.emitOffer();case 1:case"end":return n.stop()}},n)})()})}},{key:"emitOffer",value:function(){return rc(this,void 0,void 0,p().mark(function e(){var t,n;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,this.rtcPeerConnection.createOffer({iceRestart:!0});case 1:return t=e.sent,e.next=2,this.rtcPeerConnection.setLocalDescription(t);case 2:this.trickle&&this.emit("signal",{type:"offer",sdp:t.sdp}),e.next=4;break;case 3:e.prev=3,n=e.catch(0),this.destroy(n);case 4:case"end":return e.stop()}},e,this,[[0,3]])}))}},{key:"signal",value:function(e){return rc(this,void 0,void 0,p().mark(function t(){var n;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.connected){t.next=1;break}return t.abrupt("return");case 1:return t.prev=1,t.next=2,this._signal(e);case 2:t.next=4;break;case 3:t.prev=3,n=t.catch(1),this.destroy(n);case 4:case"end":return t.stop()}},t,this,[[1,3]])}))}},{key:"getStats",value:function(){return rc(this,void 0,void 0,p().mark(function e(){var t,n,r,i,o,a,s,c,u,l,f,h,d,v,g,y;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!rl){e.next=16;break}return e.next=1,this.rtcPeerConnection.getStats();case 1:n=ro((t=e.sent).values()),e.prev=2,n.s();case 3:if((r=n.n()).done){e.next=5;break}if("transport"!==(i=r.value).type){e.next=4;break}return e.abrupt("return",i);case 4:e.next=3;break;case 5:e.next=7;break;case 6:e.prev=6,g=e.catch(2),n.e(g);case 7:return e.prev=7,n.f(),e.finish(7);case 8:o=ro(t.values()),e.prev=9,o.s();case 10:if((a=o.n()).done){e.next=12;break}if("data-channel"!==(s=a.value).type){e.next=11;break}return e.abrupt("return",s);case 11:e.next=10;break;case 12:e.next=14;break;case 13:e.prev=13,y=e.catch(9),o.e(y);case 14:return e.prev=14,o.f(),e.finish(14);case 15:e.next=18;break;case 16:return c=function(e){return new Promise(function(t,n){e.getStats(function(e){t(e)},function(e){n(e)})})},e.next=17,c(this.rtcPeerConnection);case 17:u=e.sent,l=null,f=null,h=ro(u.result());try{for(h.s();!(d=h.n()).done;)"googCandidatePair"===(v=d.value).type&&"true"===v.stat("googActiveConnection")&&(l=v.stat("localCandidateId"),f=Number.parseInt(v.stat("bytesSent")))}catch(e){h.e(e)}finally{h.f()}if(null===l||null===f){e.next=18;break}return e.abrupt("return",{id:l,bytesSent:f});case 18:case"end":return e.stop()}},e,this,[[2,6,7,8],[9,13,14,15]])}))}},{key:"_signal",value:function(e){return rc(this,void 0,void 0,p().mark(function t(){var n,r;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.next="offer"===(r=e.type)?1:"answer"===r?5:"candidate"===r?7:11;break;case 1:return t.next=2,this.addRemote(e);case 2:return t.next=3,this.rtcPeerConnection.createAnswer();case 3:return n=t.sent,t.next=4,this.rtcPeerConnection.setLocalDescription(n);
1case 4:return this.trickle&&this.emit("signal",{type:"answer",sdp:n.sdp}),t.abrupt("continue",11);case 5:return t.next=6,this.addRemote(e);case 6:return t.abrupt("continue",11);case 7:if(!this.rtcPeerConnection.remoteDescription){t.next=9;break}return t.next=8,this.addCandidate(e.candidate);case 8:t.next=10;break;case 9:this.pendingCandidates.push(e.candidate);case 10:return t.abrupt("continue",11);case 11:case"end":return t.stop()}},t,this)}))}},{key:"addCandidate",value:function(e){return rc(this,void 0,void 0,p().mark(function t(){return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.rtcPeerConnection.addIceCandidate(new window.RTCIceCandidate(e));case 1:case"end":return t.stop()}},t,this)}))}},{key:"addRemote",value:function(e){return rc(this,void 0,void 0,p().mark(function t(){var n,r,i,o;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,this.rtcPeerConnection.setRemoteDescription(new window.RTCSessionDescription(e));case 1:n=ro(this.pendingCandidates),t.prev=2,n.s();case 3:if((r=n.n()).done){t.next=5;break}return i=r.value,t.next=4,this.addCandidate(new window.RTCIceCandidate(i));case 4:t.next=3;break;case 5:t.next=7;break;case 6:t.prev=6,o=t.catch(2),n.e(o);case 7:return t.prev=7,n.f(),t.finish(7);case 8:this.pendingCandidates=[];case 9:case"end":return t.stop()}},t,this,[[2,6,7,8]])}))}},{key:"_read",value:function(e){}},{key:"_write",value:function(e,t,n){var r=this;if(this.destroyed)return n(Error("cannot write after peer is destroyed"));this.connected?(this.bufferBeaconTimer||(this.bufferBeaconTimer=setInterval(function(){null!==r.lastActivityTimestamp&&performance.now()-r.lastActivityTimestamp>r.settings.rtcConnection.peerInactivityTimeout&&r.destroy(Error("Inactivity timed out"));var e=r.rtcDataChannel.bufferedAmount;e>0&&r.emit("sctp_buffer_beacon",{buffered:e})},2e3)),this.internalWrite(e,n)):(this.currentChunk=e,this.currentCb=n)}},{key:"send",value:function(e){this.rtcDataChannel.send(e)}},{key:"internalWrite",value:function(e,t){try{this.lastActivityTimestamp=performance.now(),this.rtcDataChannel.send(e),++this.writeCount,this.writeAmount+=e.length,this.writeCount%100==0&&this.emit("sctp_write_beacon",{count:this.writeCount,amount:this.writeAmount,bufferedAmount:this.rtcDataChannel.bufferedAmount})}catch(e){return this.emit("stcp_error",e),t(e)}if(!(this.rtcDataChannel.bufferedAmount>this.highWaterMark))return t();null==this.lastHighWaterMarkReached&&(this.emit("sctp_high_watermark_reached",{buffered:this.rtcDataChannel.bufferedAmount}),this.lastHighWaterMarkReached=performance.now()),this.currentCb=t}},{key:"writePending",value:function(){this.currentChunk&&this.currentCb&&(this.internalWrite(this.currentChunk,this.currentCb),this.currentChunk=null,this.currentCb=null)}},{key:"_destroy",value:function(e,t){if(clearInterval(this.bufferBeaconTimer),this._connected=!1,this.rtcPeerConnection){if(this.rtcDataChannel){this.rtcDataChannel.onmessage=null,this.rtcDataChannel.onopen=null,this.rtcDataChannel.onerror=null,this.rtcDataChannel.onclose=null;try{this.rtcDataChannel.close()}catch(e){this.emit("stcp_error",e)}this.rtcDataChannel=null}this.rtcPeerConnection.ondatachannel=null,this.rtcPeerConnection.onconnectionstatechange=null,this.rtcPeerConnection.onsignalingstatechange=null,this.rtcPeerConnection.onnegotiationneeded=null,this.rtcPeerConnection.onicecandidate=null,this.rtcPeerConnection.oniceconnectionstatechange=null,this.rtcPeerConnection.onicegatheringstatechange=null;try{this.rtcPeerConnection.close()}catch(e){this.emit("stcp_error",e)}return this.rtcPeerConnection=null,t(e)}}},{key:"onIceComplete",value:function(){if(!this.trickle){var e=this.rtcPeerConnection.localDescription.sdp;this.emit("signal",{type:this.initiator?"offer":"answer",sdp:e})}}},{key:"onIceStateChange",value:function(){switch(this.trickle||"complete"!==this.rtcPeerConnection.iceGatheringState||this.emit("rtc_ice_complete"),this.rtcPeerConnection.iceConnectionState){case"failed":this.destroy(Error("ICE Connection failed"));break;case"closed":case"disconnected":this.destroy()}}},{key:"onIceCandidate",value:function(e){if(this.trickle){if(!e.candidate)return this.emit
1("signal",{type:"candidate",candidate:"",sdpMid:"",sdpMLineIndex:-1}),void this.emit("rtc_ice_complete");var t=e.candidate,n=t.candidate,r=t.sdpMid,i=t.sdpMLineIndex;this.emit("signal",{type:"candidate",candidate:n,sdpMid:r,sdpMLineIndex:i})}else e.candidate||this.emit("rtc_ice_complete")}},{key:"onDataChannel",value:function(e){this.rtcDataChannel=e.channel,this.setupDataChannel(this.rtcDataChannel),this.writePending()}},{key:"createDataChannel",value:function(){this.rtcDataChannel=this.rtcPeerConnection.createDataChannel("RTCDataChannel",{ordered:this.ordered}),this.setupDataChannel(this.rtcDataChannel)}},{key:"setupDataChannel",value:function(e){var t=this;"number"==typeof e.bufferedAmountLowThreshold&&(e.bufferedAmountLowThreshold=this.settings.rtcConnection.peerBufferedAmountLowThreshold),e.binaryType="arraybuffer",e.onbufferedamountlow=function(){return t.onBufferedAmountLowDataChannel()},e.onmessage=function(e){return t.onMessageDataChannel(e)},e.onopen=function(){return t.onOpenDataChannel()},e.onerror=function(){return t.onErrorDataChannel()},e.onclose=function(){return t.onCloseDataChannel()}}},{key:"onMessageDataChannel",value:function(e){if(!this.destroyed){this.lastActivityTimestamp=performance.now();var t=e.data;t instanceof ArrayBuffer&&(t=ri.from(t)),this.push(t)}}},{key:"onBufferedAmountLowDataChannel",value:function(){if(null!==this.lastHighWaterMarkReached&&(this.lastHighWaterMarkReached=null),!this.destroyed&&this.currentCb){var e=this.currentCb;return this.currentCb=null,e()}}},{key:"onOpenDataChannel",value:function(){this._connected=!0,this.writePending(),this.emit("open")}},{key:"onErrorDataChannel",value:function(){this.destroy()}},{key:"onCloseDataChannel",value:function(){this.destroy()}}],[{key:"isSupported",get:function(){return!!ru&&!!ru.prototype.createDataChannel}},{key:"isTrickleIceSupported",get:function(){return!!ru.prototype.addIceCandidate}}])}(n2.Duplex),rh=eU.getInstanceFactory(rf);function rd(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return rp(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rp(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function rp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rv=function(){return!!e})()}var rg=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},ry=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=t,a=[Object.assign(Object.assign({},e),{objectMode:!1})],o=u(o),(n=c(i,rv()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).currentPeerIndex=0,n.settings=nA(n.context).getInstance(),n.peerPool=[],n}return f(t,e),s(t,[{key:"connected",get:function(){return this.peerPool.some(function(e){return e.peer.connected})}},{key:"transport",get:function(){return this._transport}},{key:"count",get:function(){return this.connectedPeers.length}},{key:"connectedPeers",get:function(){return this.peerPool.filter(function(e){return e.peer.connected})}},{key:"configure",value:function(e,t){this._transport=e,this.peerConfig=t}},{key:"startConnection",value:function(){var e,t=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.findPeerById(r)||("sctp"===this.transport&&(e=rh(this.context).createInstance({highWaterMark:this.settings.rtcConnection.peerHighWaterMark})),e.configure(this.peerConfig),e.on("open",function(){t.writePending(),t.emit("open",{connectionId:r})}),e.on("signal",function(e){t.emit("signal",Object.assign(Object.assign({},e),{connectionId:r}))}),e.on("rtc_ice_complete",function(){t.emit("rtc_ice_complete",{connectionId:r})}),e.on("data",function(e){t.push(e)}
1),e.on("close",function(){t.emit("close",{connectionId:r})}),e.on("error",function(e){t.emit("error",e)}),e.on("stcp_error",function(e){t.emit("sctp_debug_event",{type:"send_error",message:e.message})}),e.on("sctp_high_watermark_reached",function(e){e.type="high_watermark_reached",t.emit("sctp_debug_event",e)}),e.on("sctp_buffer_drained",function(e){e.type="send_buffer_drained",t.emit("sctp_debug_event",e)}),e.on("sctp_write_beacon",function(e){e.type="sctp_write_beacon",t.emit("sctp_debug_event",e)}),e.on("sctp_buffer_beacon",function(e){e.type="sctp_buffer_beacon",t.emit("sctp_debug_event",e)}),e.startConnection(n),this.peerPool.push({connectionId:r,peer:e}))}},{key:"signal",value:function(e){var t=e.connectionId||0,n=this.findPeerById(t);n&&n.signal(e)}},{key:"getStats",value:function(){var e=this;return Promise.all(this.connectedPeers.map(function(t){return rg(e,void 0,void 0,p().mark(function e(){var n;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.peer.getStats();case 1:return n=e.sent,e.abrupt("return",{connectionId:t.connectionId,stats:n});case 2:case"end":return e.stop()}},e)}))}))}},{key:"_destroy",value:function(e,t){var n,r=rd(this.peerPool);try{for(r.s();!(n=r.n()).done;)n.value.peer.destroy()}catch(e){r.e(e)}finally{r.f()}this.peerPool=[],t(e)}},{key:"writePending",value:function(){this.currentChunk&&this.currentCb&&(this.internalWrite(this.currentChunk,this.currentCb),this.currentChunk=null,this.currentCb=null)}},{key:"internalWrite",value:function(e,t){var n,r,i=this.connectedPeers[this.currentPeerIndex];1===(null==(n=this.peerConfig)?void 0:n.count)&&this.settings.rtcConnection.enableSinglePc?this.currentPeerIndex=0:this.currentPeerIndex=(this.currentPeerIndex+1)%this.connectedPeers.length,null==(r=null==i?void 0:i.peer)||r.write(e),t()}},{key:"_write",value:function(e,t,n){return rg(this,void 0,void 0,p().mark(function t(){return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==this.connectedPeers.length){t.next=1;break}return this.currentChunk=e,this.currentCb=n,t.abrupt("return");case 1:this.internalWrite(e,n);case 2:case"end":return t.stop()}},t,this)}))}},{key:"_read",value:function(e){return rg(this,void 0,void 0,p().mark(function e(){return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)}))}},{key:"findPeerById",value:function(e){var t;return null==(t=this.peerPool.find(function(t){return t.connectionId===e}))?void 0:t.peer}}],[{key:"isSctpSupported",get:function(){return rf.isSupported}},{key:"isTrickleIceSupported",get:function(){return rf.isTrickleIceSupported}}])}(n8),rm=eU.getInstanceFactory(ry);function rb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rb=function(){return!!e})()}var rS,rE,rC=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},rw=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,rb()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).settings=nA(e.context).getInstance(),e}return f(t,e),s(t,[{key:"connected",get:function(){var e,t;return null!=(t=null==(e=this.transportConnection)?void 0:e.connected)&&t}},{key:"transport",get:function(){return this._transport}},{key:"count",get:function(){var e,t;return null!=(t=null==(e=this.transportConnection)?void 0:e.count)?t:0}},{key:"writableBuffer",get:function(){var e;return null==(e=this.transportConnection)?void 0:e._writableState.getBuffer()}},{key:"writableBufferSize",get:function(){if(this.transportConnection)return this.transportConnection._writableState.objectMode?this.writableBuffer.length:this.writableBuffer.reduce(function(e,t){return e+t.chunk.byteLength},0)}},{key:"cork",value:function(){var e;null==(e=this.transportConnection)||e.cork()}},{key:"uncork",value:function(){var e;null==(e=this.transportConnection)||e.uncork()}},{key:"signal",value:function(e){this.transportConnection.signal(e)}},{key:"configure",value:function(e,t){var n=this;if(!this.transportConnection&&["http","sctp"].includes(e)){switch(this._transport=e,this._transport){case"http":this.transportConnection=rr(this.context).createInstance();break;case"sctp":this.transportConnection=rm(this.context).createInstance({highWaterMark:this.settings.rtcConnection.rtcConnectionHighWaterMark})}this.transportConnection.on("open",function(e){n.emit("open",e)}),this.transportConnection.on("signal",function(e){n.emit("signal",Object.assign(Object.assign({},e),{origin:"local"}))}),this.transportConnection.on("rtc_ice_complete",function(e){n.emit("rtc_ice_complete",e)}),this.transportConnection.on("data",function(e){n.push(e)}),this.transportConnection.on("close",function(e){n.emit("close",e)}),this.transportConnection.on("error",function(e){n.emit("error",e)}),this.transportConnection.on("sctp_debug_event",function(e){n.emit("sctp_debug_event",e)}),this.transportConnection.configure(e,t)}}},{key:"startConnection",value:function(e,t){var n;null==(n=this.transportConnection)||n.startConnection(e,t)}},{key:"getStats",value:function(){return rC(this,void 0,void 0,p().mark(function e(){var t;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null==(t=this.transportConnection)?void 0:t.getStats());case 1:case"end":return e.stop()}},e,this)}))}},{key:"_read",value:function(e){}},{key:"_write",value:function(e,t,n){this.transportConnection.write(e),n()}},{key:"_destroy",value:function(){var e;null==(e=this.transportConnection)||e.destroy()}}],[{key:"isTransportSupported",value:function(e){switch(e){case"http":return rn.isSupported;case"sctp":return ry.isSctpSupported}return!1}},{key:"isTrickleIceSupported",get:function(){return ry.isTrickleIceSupported}}])}(n8),rT=eU.getInstanceFactory(rw);function rk(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r_(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r_(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function r_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rR=function(){return!!e})()}!function(e){!function(e){e.UNKNOWN="unknown",e.NON_SYMMETRIC="non_symmetric",e.SYMMETRIC="symmetric",e.SEQUENTIAL="sequential"}(e.Type||(e.Type={}))}(rS||(rS={})),function(e){e.parseCandidate=function(e){for(var t=0===e.indexOf("a=candidate:")?12:10,n=e.substring(t).split(" "),r={component:n[1],foundation:n[0],ip:n[4],isReflexive:!1,port:Number(n[5]),priority:Number(n[3]),protocol:n[2].toLowerCase()},i=6;i<n.length;i+=2){var o=n[i],a=n[i+1];switch(o){case"typ":r.type=a,r.isReflexive="srflx"===r.type;break;case"raddr":r.relatedAddress=a;break;case"rport":r.relatedPort=Number(a);break;case"tcptype":r.tcpType=a;break;case"network-cost":r.networkCost=Number(a)}}return r},e.composePriority=function(e,t,n){return e<<24|t<<8|255&-n},e.decomposePriority=function(e){return{componentId:255&-e,localPreference:e>>8&65535,typePreference:e>>24}}}(rE||(rE={}));var rO=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,rR()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o)))._type=rS.Type.UNKNOWN,e.logger=e0(e.context).getInstance().getLogger("NatStats"),e.eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.platformStats=n1(e.context).getInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.BROWSER_STATS_CONNECTION_TYPE_CHANGED,this.handleBrowserStatsConnectionTypeChangedEvent,{scope:this}),this.detectNat()}},{key:"type",get:function(){return this._type}},{key:"destroy",value:function(){var e;null==(e=this.eventBus)||e.offAll({scope:this}),this.closePeerConnection(),this.logger=null,this.eventBus=null,this.settings=null}},{key:"closePeerConnection",value:function(){var e,t;null==(e=this.connection)||e.removeAllListeners(),null==(t=this.connection)||t.destroy(),this.connection=null}},{key:"detectNat",value:function(){var e=this;if(null!=this.connection&&this.closePeerConnection(),this.platformStats.isWebRTCSupported){var t=eE.uniq(this.settings.apiKey.stunServerUrl).map(function(e){return{urls:e}});t.length<2&&this.logger.warn("Need at least 2 different STUNs"),this.logger.trace("Detecting NAT"),this.candidates=[],this.connection=rT(this.context).createInstance(),this.connection.configure("sctp",{rtcConfiguration:{iceServers:t},trickle:!0}),this.connection.on("signal",function(t){if(!eE.isNil(e.connection)&&!eE.isNil(e.settings)){var n=t.candidate;e.addCandidate(n);var r=e.calculateNatType();e.updateNatType(r)}}),this.connection.on("rtc_ice_complete",function(){e.logger.trace("NAT discovery completed"),e.closePeerConnection()}),this.connection.on("error",function(t){e.logger.error("Error detected while detecting NAT: ".concat(t.message))}),this.connection.on("close",function(){e.closePeerConnection()}),this.connection.startConnection()}else this.logger.trace("Cannot detect NAT: WebRTC is not supported")}},{key:"addCandidate",value:function(e){if(!eE.isNil(e)&&""!==e){this.logger.trace("ICE candidate: ".concat(e));var t=rE.parseCandidate(e);t.isReflexive&&this.candidates.push(t)}}},{key:"calculateNatType",value:function(){function e(e,t){return Object.values(eE.groupBy(e,t))}var t,n=[],r=rk(e(this.candidates,"ip"));try{for(r.s();!(t=r.n()).done;){var i,o=rk(e(t.value,"relatedPort"));try{for(o.s();!(i=o.n()).done;){var a=i.value,s=a.map(function(e){return e.networkCost||1e3}),c=Math.min.apply(Math,eL(s))||1e3;this.isNonSymmetricNat(a)?n.push({nat:rS.Type.NON_SYMMETRIC,cost:c}):this.isSequentialNat(a)?n.push({nat:rS.Type.SEQUENTIAL,cost:c}):n.push({nat:rS.Type.SYMMETRIC,cost:c})}}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}var u=Math.min.apply(Math,eL(n.map(function(e){return e.cost}))),l=n.find(function(e){return e.cost===u});return(null==l?void 0:l.nat)||rS.Type.UNKNOWN}},{key:"isNonSymmetricNat",value:function(e){return 0!==e.length&&!(e.length>1&&!function(e){var t=e[0].port;return e.every(function(e){return e.port===t})}(e))}},{key:"isSequentialNat",value:function(e){var t=this.settings.natTraversal.sequentialDetectionThreshold,n=e.map(function(e){return e.port});n=eE.sortBy(n);for(var r=0;r<n.length-1;++r){var i=n[r+1]-n[r];if(i>0&&i<=t)return this.logger.trace("Port delta: ".concat(n[r+1]," - ").concat(n[r]," = ").concat(i," <= ").concat(t)),!0}return!1}},{key:"updateNatType",value:function(e){this._type=e,this.logger.debug(tr.NATTypeFound(this._type))}},{key:"handleBrowserStatsConnectionTypeChangedEvent",value:function(){this.detectNat()}}])}(ez);rO.polyNetFactoryName="NatStats";var rI=eU.getSingletonFactory(rO);function rN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rN=function(){return!!e})()}var rx=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,rN()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).eventBus=eG(e.context).getInstance(),e.stats={rtt:[]},e}return f(t,e),s(t,[{key:"rtt",get:function(){return this.stats.rtt}},{key:"start",value:function(){this.eventBus.on(tt.COLLECT_NETWORK_STATS,this.handleCollectStatsEvent,{scope:this})}},{key:"handleCollectStatsEvent",value:function(e){var t=this;if(e){var n=eE.omit(e,["event"]);eE.mergeWith(this.stats,n,function(e,n,r){return t.updateStats(e,n,r)})}}},{key:"updateStats",value:function(e,t,n){return"rtt"===n?(e.push(t),e):t}},{key:"clean",value:function(){this.stats.rtt=[]}}])}(ez);rx.polyNetFactoryName="NetworkStats";var rA=eU.getSingletonFactory(rx);function rP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rP=function(){return!!e})()}var rD=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,rP()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).eventBus=eG(e.context).getInstance(),e.polyNet=nK(e.context).getInstance(),e.stats={contentRequestResponseTimes:[],joinRequestTime:void 0,joinResponseTime:void 0,sessionId:void 0,state:void 0,mode:void 0,tecaCapacity:void 0,sdkVersion:void 0,revokedStatus:void 0},e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.COLLECT_POLYNET_STATS,this.handleCollectStatsEvent,{scope:this}),this.eventBus.on(tt.POLYNET_STATE_CHANGED,this.handlePolyNetStateChangeEvent,{scope:this}),this.eventBus.on(tt.POLYNET_DATA_CHANGED,this.handlePolyNetDataChangeEvent,{scope:this}),this.eventBus.on(tt.POLYNET_MODE_CHANGED,this.handlePolyNetModeChangeEvent,{scope:this})}},{key:"contentRequestResponseTimes",get:function(){return this.stats.contentRequestResponseTimes}},{key:"joinResponseTime",get:function(){return this.stats.joinResponseTime}},{key:"joinRequestTime",get:function(){return this.stats.joinRequestTime}},{key:"sessionId",get:function(){return this.stats.sessionId||this.polyNet.sessionId}},{key:"state",get:function(){return this.stats.state||this.polyNet.state}},{key:"mode",get:function(){return this.stats.mode||this.polyNet.mode}},{key:"tecaCapacity",get:function(){return this.stats.tecaCapacity}},{key:"sdkVersion",get:function(){return"4.8.25"}},{key:"revokedStatus",get:function(){return this.stats.revokedStatus}},{key:"clean",value:function(){return Object.assign(this.stats,{contentRequestResponseTimes:[]})}},{key:"handleCollectStatsEvent",value:function(e){var t=this;if(e){var n=eE.omit(e,["event"]);eE.mergeWith(this.stats,n,function(e,n,r){return t.updateStats(e,n,r)})}}},{key:"updateStats",value:function(e,t,n){switch(n){case"contentRequestResponseTimes":return e.push(t),e;case"revokedStatus":return this.updateRevokedStatus(t),this.stats.revokedStatus;default:return t}}},{key:"updateRevokedStatus",value:function(e){var t=e;t&&(this.stats.revokedStatus>=t||(this.stats.revokedStatus=t))}},{key:"handlePolyNetStateChangeEvent",value:function(e){e.newState&&Object.assign(this.stats,{state:e.newState})}},{key:"handlePolyNetDataChangeEvent",value:function(e){e.newData&&Object.assign(this.stats,Object.assign({},e.newData))}},{key:"handlePolyNetModeChangeEvent",value:function(e){e.newMode&&Object.assign(this.stats,{state:e.newMode})}}])}(ez);rD.polyNetFactoryName="PolyNetStats",function(e){!function(e){e[e.NOT_ALLOWED=150]="NOT_ALLOWED",e[e.PROTOCOL_NOT_SUPPORTED=100]="PROTOCOL_NOT_SUPPORTED",e[e.MAX_USERS_PER_API_KEY=50]="MAX_USERS_PER_API_KEY",e[e.OUT_OF_LIVE_WINDOW=10]="OUT_OF_LIVE_WINDOW"}(e.RevokedStatus||(e.RevokedStatus={}))}(rD||(rD={}));var rM=eU.getSingletonFactory(rD);function rB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rB=function(){return!!e})()}var rL=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,rB()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.polyNet=nK(e.context).getInstance(),e.estimatedBitrateByRepresentation=new Map,e.stats={bitrate:void 0,estimatedBitrate:void 0,parsedBitrate:void 0,maskedStreamUri:void 0,streamUri:void 0,playerUri:void 0,representationId:void 0,streamState:void 0,isLive:void 0,isInsideLiveWindow:void 0,isMonoBitrate:void 0,streamInfo:void 0,findBitrate:void 0},e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.COLLECT_STREAMING_STATS,this.handleCollectStatsEvent,{scope:this}),this.eventBus.on(tt.STREAM_INFO,this.handleStreamInfoEvent,{scope:this})}},{key:"destroy",value:function(){var e;null==(e=this.eventBus)||e.offAll({scope:this}),this.stats=null}},{key:"maskedStreamUri",get:function(){var e,t,n;return"live"===this.streamState?null!=(e=this.polyNet.maskedStreamUri)?e:"no-media-uri":null!=(n=null!=(t=this.polyNet.maskedStreamUri)?t:function(e,t){if(!eE.isNil(e)&&!eE.isNil(t)){var n=t.exec(e);if(!(eE.isNil(n)||n&&n.length<2))return n.slice(1).join("")}}(this.stats.streamUri,this.settings.analytics.regex))?n:"no-media-uri"}},{key:"streamUri",get:function(){return this.stats.streamUri}},{key:"playerUri",get:function(){return this.stats.playerUri}},{key:"streamState",get:function(){return eE.isNil(this.stats.isLive)||eE.isNil(this.stats.isInsideLiveWindow)?"unknown":this.stats.isLive&&this.stats.isInsideLiveWindow?"live":this.stats.isLive&&!this.stats.isInsideLiveWindow?"dvr":this.stats.isLive?"unknown":"vod"}},{key:"bitrate",get:function(){var e=this.parsedBitrate,t=this.estimatedBitrate;return e||t}},{key:"representationId",get:function(){return this.stats.representationId}},{key:"parsedBitrate",get:function(){if(eE.isFinite(this.stats.bitrate))return Number(this.stats.bitrate)}},{key:"estimatedBitrate",get:function(){if(this.stats.representationId)return this.estimatedBitrateByRepresentation.get(this.stats.representationId)}},{key:"isMonoBitrate",get:function(){return"monobitrate"===this.stats.representationId}},{key:"streamInfo",get:function(){return this.stats.streamInfo}},{key:"findBitrate",value:function(e){var t,n,r=null==(n=null==(t=this.stats.streamInfo)?void 0:t.manifest)?void 0:n.levels,i=null==r?void 0:r.find(function(t){return t.id===e});return null==i?void 0:i.bitrate}},{key:"handleCollectStatsEvent",value:function(e){var t=this,n=e.stats;eE.isEmpty(n)||eE.mergeWith(this.stats,n,function(e,n,r){return t.updateStats(e,n,r)})}},{key:"updateStats",value:function(e,t,n){if("estimatedBitrate"===n){var r=t.representationId,i=t.bitrate;return this.updateEstimatedBitrate(r,i),e}return t}},{key:"updateEstimatedBitrate",value:function(e,t){if(e&&t){var n=this.estimatedBitrateByRepresentation.get(e),r=n?Math.max(n,t):t;this.estimatedBitrateByRepresentation.set(e,r)}}},{key:"handleStreamInfoEvent",value:function(e){this.stats.streamInfo=null==e?void 0:e.streamInfo}}])}(ez);rL.polyNetFactoryName="StreamingStats";var rj=eU.getSingletonFactory(rL);function rF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rF=function(){return!!e})()}var rU=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,rF()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).eventBus=eG(e.context).getInstance(),e.stats={dataChannels:[],dataChannelsNotEstablished:[],peeringType:void 0,accumulatedP2pBytesSent:0},e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.COLLECT_DATA_CHANNEL_STATS,this.handleCollectStatsEvent,{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_CREATED,this.handleDataChannelCreateEvent,{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_STATE_CHANGED,this.handleDataChannelStateChangedEvent,{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_REMOVED,this.handleDataChannelRemoveEvent,{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_CONNECTING_TIMEOUT,this.handleDataChannelTimeoutEvent,{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_MONITOR_UPDATE,this.handleDataChannelMonitorUpdateEvent,{scope:this})}},{key:"dataChannels",get:function(){return this.stats.dataChannels}},{key:"dataChannelsNotEstablished",get:function(){return this.stats.dataChannelsNotEstablished}},{key:"peeringType",get:function(){return this.stats.peeringType}},{key:"accumulatedP2pBytesSent",get:function(){return this.stats.accumulatedP2pBytesSent}},{key:"destroy",value:function(){var e;null==(e=this.eventBus)||e.offAll({scope:this}),this.eventBus=null}},{key:"handleCollectStatsEvent",value:function(e){var t=this;if(e){var n=eE.omit(e,["event"]);eE.mergeWith(this.stats,n,function(e,n,r){return t.updateStats(e,n,r)})}}},{key:"updateStats",value:function(e,t,n){switch(n){case"peeringType":default:return t;case"bufferFillingRate":return this.updateDataChannelBufferFillingRate(e,t),e}}},{key:"handleDataChannelCreateEvent",value:function(e){if(e.dataChannel){var t=e.dataChannel,n=t.nodeId,r=t.direction,i=t.state,o=t.type;this.stats.dataChannels.push({nodeId:n,direction:r,state:i,type:o})}}},{key:"handleDataChannelStateChangedEvent",value:function(e){if(e.dataChannel){var t=e.dataChannel,n=t.nodeId,r=t.direction,i=t.state,o=t.type,a=this.stats.dataChannels.find(eE.matches({nodeId:n}));a&&Object.assign(a,{nodeId:n,direction:r,state:i,type:o})}}},{key:"handleDataChannelRemoveEvent",value:function(e){if(e.dataChannel){var t=e.dataChannel.nodeId;eE.remove(this.stats.dataChannels,{nodeId:t})}}},{key:"handleDataChannelTimeoutEvent",value:function(e){var t=e.dataChannel;t&&t.isInbound&&t.isWebRTC&&this.stats.dataChannelsNotEstablished.push(t.identifier)}},{key:"handleDataChannelMonitorUpdateEvent",value:function(e){this.stats.accumulatedP2pBytesSent=e.accumulatedP2pBytesSent}},{key:"updateDataChannelBufferFillingRate",value:function(e,t){var n=t.nodeId,r=t.bufferFillingRate,i=this.stats.dataChannels.find(eE.matches({nodeId:n}));if(i)return i.bufferFillingRate=r,e}},{key:"clean",value:function(){return Object.assign(this.stats,{dataChannelsNotEstablished:[]})}}])}(ez);rU.polyNetFactoryName="DataChannelStats";var rq=eU.getSingletonFactory(rU);function rH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rH=function(){return!!e})()}var rW=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,rH()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).eventBus=eG(e.context).getInstance(),e.stats={resourceId:void 0,pathwayName:void 0,pathwayPriority:[],responseCdn:void 0},e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.COLLECT_CS_STATS,this.handleCollectStatsEvent,{scope:this})}},{key:"resourceId",get:function(){return this.stats.resourceId}},{key:"pathwayName"
1,get:function(){return this.stats.pathwayName}},{key:"pathwayPriority",get:function(){return this.stats.pathwayPriority}},{key:"responseCdn",get:function(){return this.stats.responseCdn}},{key:"handleCollectStatsEvent",value:function(e){var t=this;if(e){var n=eE.omit(e,["event"]);eE.mergeWith(this.stats,n,function(e,n,r){return t.updateStats(e,n,r)})}}},{key:"updateStats",value:function(e,t,n){switch(n){case"resourceId":return this.stats.resourceId=Number(t),this.stats.resourceId;case"pathwayName":return this.stats.pathwayName=t,this.stats.pathwayName;case"pathwayPriority":return this.stats.pathwayPriority=t,this.stats.pathwayPriority;case"responseCdn":return this.stats.responseCdn=t,this.stats.responseCdn;default:return e}}}])}(ez);rW.polyNetFactoryName="ContentSteeringStats";var rV=eU.getSingletonFactory(rW),rG=function(e,t){return(rG=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function rz(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}rG(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function rK(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function rX(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function rY(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function rZ(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function r$(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function rJ(e){return this instanceof rJ?(this.v=e,this):new rJ(e)}function rQ(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){var n;try{(n=i[e](t)).value instanceof rJ?Promise.resolve(n.value.v).then(c,u):l(o[0][2],n)}catch(e){l(o[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function r0(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=rY(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}function r1(e){return"function"==typeof e}function r2(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}"function"==typeof SuppressedError&&SuppressedError;var r3=r2(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function r6(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var r8=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=rY(o),s=a.next();!s.done;s=a.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var c=this.initialTeardown;
vendor: 4,460 bytes, line 1
1if(r1(c))try{c()}catch(e){i=e instanceof r3?e.errors:[e]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=rY(u),f=l.next();!f.done;f=l.next()){var h=f.value;try{r7(h)}catch(e){i=null!=i?i:[],e instanceof r3?i=r$(r$([],rZ(i)),rZ(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new r3(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)r7(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!=(n=this._finalizers)?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&r6(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&r6(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),r5=r8.EMPTY;function r4(e){return e instanceof r8||e&&"closed"in e&&r1(e.remove)&&r1(e.add)&&r1(e.unsubscribe)}function r7(e){r1(e)?e():e.unsubscribe()}var r9={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ie={setTimeout:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=ie.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,r$([e,t],rZ(n))):setTimeout.apply(void 0,r$([e,t],rZ(n)))}),clearTimeout:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){var t=ie.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)}),delegate:void 0};function it(e){ie.setTimeout(function(){var t=r9.onUnhandledError;if(!t)throw e;t(e)})}function ir(){}var ii=io("C",void 0,void 0);function io(e,t,n){return{kind:e,value:t,error:n}}var ia=null;function is(e){if(r9.useDeprecatedSynchronousErrorHandling){var t=!ia;if(t&&(ia={errorThrown:!1,error:null}),e(),t){var n=ia,r=n.errorThrown,i=n.error;if(ia=null,r)throw i}}else e()}var ic=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,r4(t)&&t.add(n)):n.destination=ig,n}return rz(t,e),t.create=function(e,t,n){return new id(e,t,n)},t.prototype.next=function(e){this.isStopped?iv(function(e){return io("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?iv(io("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?iv(ii,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(r8),iu=Function.prototype.bind;function il(e,t){return iu.call(e,t)}var ih=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){ip(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){ip(e)}else ip(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){ip(e)}},e}(),id=function(e){function t(t,n,r){var i,o,a=e.call(this)||this;return r1(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:a&&r9.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return a.unsubscribe()},i={next:t.next&&il(t.next,o),error:t.error&&il(t.error,o),complete:t.complete&&il(t.complete,o)}):i=t,a.destination=new ih(i),a}return rz(t,e),t}(ic);function ip(e){var t;r9.useDeprecatedSynchronousErrorHandling?(t=e,r9.useDeprecatedSynchronousErrorHandling&&ia&&(ia.errorThrown=!0,ia.error=t)):it(e)}function iv(e,t){var n=r9.onStoppedNotification;n&&ie.setTimeout(function(){return n(e,t)})}var ig={closed:!0,next:ir,error:function(e){throw e},complete:ir},iy="function"==typeof Symbol&&Symbol.observable||"@@observable";function im(e){return e}
1function ib(e){return 0===e.length?im:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var iS=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,o=(r=e)&&r instanceof ic||function(e){return e&&r1(e.next)&&r1(e.error)&&r1(e.complete)}(r)&&r4(r)?e:new id(e,t,n);return is(function(){var e=i,t=e.operator,n=e.source;o.add(t?t.call(o,n):n?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=iE(t))(function(t,r){var i=new id({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[iy]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ib(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=iE(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function iE(e){var t;return null!=(t=null!=e?e:r9.Promise)?t:Promise}var iC=r2(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),iw=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return rz(t,e),t.prototype.lift=function(e){var t=new iT(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new iC},t.prototype.next=function(e){var t=this;is(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=rY(t.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(e)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;is(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;is(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?r5:(this.currentObservers=null,o.push(e),new r8(function(){t.currentObservers=null,r6(o,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new iS;return e.source=this,e},t.create=function(e,t){return new iT(e,t)},t}(iS),iT=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return rz(t,e),t.prototype.next=function(e){var t,n;null==(n=null==(t=this.destination)?void 0:t.next)||n.call(t,e)},t.prototype.error=function(e){var t,n;null==(n=null==(t=this.destination)?void 0:t.error)||n.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!=(n=null==(t=this.source)?void 0:t.subscribe(e))?n:r5},t}(iw);function ik(e){return function(t){if(function(e){return r1(null==e?void 0:e.lift)}(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function i_(e,t,n,r,i){return new iR(e,t,n,r,i)}var iR=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t)||this;return s.onFinalize=o,s.shouldUnsubscribe=a,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return rz(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),n||null==(t=this.onFinalize)||t.call(this)}},t}(ic);function iO(e,t){return ik(function(n,r){var i=0;n.subscribe(i_(r,function(n){r.next(e.call(t,n,i++))}))})}var iI=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function iN(e){return r1(null==e?void 0:e.then)}function ix(e){return r1(e[iy])}function iA(e){return Symbol.asyncIterator&&r1(null==e?void 0:e[Symbol.asyncIterator])}function iP(e){return TypeError("You provided "+(null!==e&&"object"===i(e)?"an invali
1d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var iD="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function iM(e){return r1(null==e?void 0:e[iD])}function iB(e){return rQ(this,arguments,function(){var t,n,r;return rX(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,rJ(t.read())];case 3:return r=(n=i.sent()).value,n.done?[4,rJ(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,rJ(r)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function iL(e){return r1(null==e?void 0:e.getReader)}function ij(e){var t,n,r,i;if(e instanceof iS)return e;if(null!=e){if(ix(e))return i=e,new iS(function(e){var t=i[iy]();if(r1(t.subscribe))return t.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")});if(iI(e))return r=e,new iS(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()});if(iN(e))return n=e,new iS(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,it)});if(iA(e))return iF(e);if(iM(e))return t=e,new iS(function(e){var n,r;try{for(var i=rY(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()});if(iL(e))return iF(iB(e))}throw iP(e)}function iF(e){return new iS(function(t){(function(e,t){var n,r,i,o;return rK(this,void 0,void 0,function(){var a;return rX(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),n=r0(e),s.label=1;case 1:return[4,n.next()];case 2:if((r=s.sent()).done)return[3,4];if(a=r.value,t.next(a),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:s.sent()},[3,11];case 6:return s.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function iU(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function iq(e,t,n){return void 0===n&&(n=1/0),r1(t)?iq(function(n,r){return iO(function(e,i){return t(n,e,r,i)})(ij(e(n,r)))},n):("number"==typeof t&&(n=t),ik(function(t,r){return function(e,t,n,r,i,o,a,s){var c=[],u=0,l=0,f=!1,h=function(){!f||c.length||u||t.complete()},d=function(e){return u<r?p(e):c.push(e)},p=function(e){u++;var i=!1;ij(n(e,l++)).subscribe(i_(t,function(e){t.next(e)},function(){i=!0},void 0,function(){if(i)try{u--;for(var e=function(){var e=c.shift();p(e)};c.length&&u<r;)e();h()}catch(e){t.error(e)}}))};return e.subscribe(i_(t,d,function(){f=!0,h()})),function(){}}(t,r,e,n)}))}var iH=new iS(function(e){return e.complete()});function iW(e){return e[e.length-1]}function iV(e){var t;return(t=iW(e))&&r1(t.schedule)?e.pop():void 0}function iG(e,t){return void 0===t&&(t=0),ik(function(n,r){n.subscribe(i_(r,function(n){return iU(r,e,function(){return r.next(n)},t)},function(){return iU(r,e,function(){return r.complete()},t)},function(n){return iU(r,e,function(){return r.error(n)},t)}))})}function iz(e,t){return void 0===t&&(t=0),ik(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function iK(e,t){if(!e)throw Error("Iterable cannot be null");return new iS(function(n){iU(n,t,function(){var r=e[Symbol.asyncIterator]();iU(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function iX(e,t){if(null!=e){if(ix(e))return function(e,t){return ij(e).pipe(iz(t),iG(t))}(e,t);if(iI(e))return function(e,t){return new iS(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}(e,t);if(iN(e))return function(e,t){return ij(e).pipe(iz(t),iG(t))}(e,t);if(iA(e))return iK(e,t);if(iM(e))return function(e,t){return new iS(function(n){var r;return iU(n,t,function(){r=e[iD](),iU(n,t,function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(e){return void n.error(e)}i?n.complete():n.next(t)},0,!0)}),function(){return r1(null==r?void 0:r.return)&&r.return()}})}(e,t);if(iL(e))return function(e,t){return iK(iB(e),t)}(e,t)}throw iP(e)}function iY(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=iV(e),r=function(e,t){return"number"==typeof iW(e)?e.pop():t}(e,1/0),i=e;return i.length?1===i.length?ij(i[0]):(function(e){return void 0===e&&(e=1/0),iq(im,e)})(r)(function(e,t){return t?iX(e,t):ij(e)}(i,n)):iH}var iZ=__nested_webpack_require_888620__(53145),i$=function(){return s(function e(){r(this,e)},null,[{key:"b64DecodeUnicode",value:function(e){return decodeURIComponent(atob(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))}},{key:"numberToUInt32",value:function(e){return e>>>0}},{key:"ab2str",value:function(e){for(var t="",n=new Uint8Array(e),r=0;r<n.length;r++)t+=String.fromCharCode(n[r]);return t}},{key:"str2ab",value:function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return t}}])}(),iJ=function(){return s(function e(){r(this,e)},null,[{key:"crc32FromArrayBuffer",value:function(e){var t=iZ.buf(new Uint8Array(e));return i$.numberToUInt32(t)}},{key:"crc32FromString",value:function(e){var t=iZ.str(e);return i$.numberToUInt32(t)}}])}(),iQ={now:function(){return(iQ.delegate||Date).now()},delegate:void 0},i0=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=iQ);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return rz(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,s=n._windowTime;r||(i.push(t),o||i.push(a.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var a=n.now(),s=0,c=1;c<r.length&&r[c]<=a;c+=2)s=c;s&&r.splice(0,s+1)}},t}(iw),i1=function(){return s(function e(){r(this,e),this.chunksMap=new Map,this.chunksList=[],this._subject=ne
1w i0},[{key:"byteLength",get:function(){return this.chunksList.reduce(function(e,t){return e+t.data.byteLength},0)}},{key:"receivedChunksSummary",get:function(){return eL(this.chunksMap.keys()).sort(function(e,t){return e-t}).reduce(function(e,t){if(0===e.length)e.push([t,null]);else{var n=e[e.length-1];null===n[1]&&n[0]+1===t||n[1]+1===t?n[1]=t:e.push([t,null])}return e},[]).map(function(e){return null==e[1]?[e[0]]:e})}},{key:"subject",get:function(){return this._subject}},{key:"close",value:function(){this._subject.complete()}},{key:"size",get:function(){return this.chunksMap.size}},{key:"get",value:function(e){return this.chunksMap.get(e)}},{key:"set",value:function(e,t){if(!this.chunksMap.has(e)){var n={id:e,data:t};return this.chunksMap.set(n.id,n.data),this.chunksList.push(n),this._subject.next(n),n}}},{key:"clear",value:function(){this.chunksMap.clear(),this.chunksList.splice(0)}},{key:"chunks",get:function(){return this.chunksList}},{key:"rebuild",value:function(){if(0===this.size)return new ArrayBuffer(0);var e=this.chunks.slice().sort(function(e,t){return e.id-t.id}).map(function(e){return e.data});return n9.concat.apply(n9,eL(e))}},{key:Symbol.iterator,value:function(){var e=0,t=this.chunksList;return{next:function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0,value:null}}}}}])}(),i2=function(){function e(t,n,i){r(this,e),this.state=e.State.PROGRESS,this.cachePolicy=e.Policy.CACHEABLE,this._contentLength=null,this.discardedData=0,this.discardedTime=0,this.unsafe=!1,this.errorCode=0,this.droppedChunks=0,this.id=t.id,this.representationId=t.representationId,this.cachePolicy=t.cachePolicy,this.duration=t.duration,this.origin=n.origin,this.dataChannelId=n.dataChannelId,this.bitrate=n.bitrate,this.options=t,this._timeRequest=performance.now(),this.chunks=new i1,this.requested=!1,this.external=!1,this.aborted=!1,this.retries=0,this.errorSubject=new iw,this.seq=++e.instanceCtr,this.logger=e0(i).getInstance().getLogger("ContentCache-".concat(this.seq))}return s(e,[{key:"url",get:function(){return this.options.url},set:function(e){this.options.url=e}},{key:"contentLength",get:function(){return this._contentLength},set:function(e){this._contentLength!=e&&(null==this._contentLength?this.logger.trace("contentLength initial ".concat(e," ").concat(this.toString(),".")):this.logger.trace("contentLength changed ".concat(this._contentLength," -> ").concat(e," ").concat(this.toString(),"."))),this._contentLength=e}},{key:"contentData",get:function(){return this.isFinished&&(eE.isNil(this._contentData)||0===this._contentData.byteLength)&&(this._contentData=this.chunks.rebuild()),this._contentData},set:function(e){this._contentData=e}},{key:"destroy",value:function(){var t;this.state!==e.State.FINISH&&this.logger.debug("unfinished but destroyed with ".concat(this.chunks.size," chunks of data ").concat(this.toString())),this._contentData=null,null==(t=this.chunks)||t.clear(),this.chunks=null}},{key:"isCacheable",get:function(){return this.cachePolicy===e.Policy.CACHEABLE}},{key:"isFinished",get:function(){return this.state===e.State.FINISH}},{key:"isInProgress",get:function(){return this.state===e.State.PROGRESS}},{key:"hasError",get:function(){return this.state===e.State.ERROR}},{key:"isAborted",get:function(){return this.aborted}},{key:"duration",get:function(){return this._duration},set:function(e){e&&(this._duration=e)}},{key:"isResourceFromCdn",get:function(){return this.origin===e.Origin.HTTP}},{key:"isResourceFromP2P",get:function(){return this.origin===e.Origin.WEB_RTC}},{key:"timeRequest",get:function(){return this._timeRequest}},{key:"timeFirst",get:function(){return this._timeFirst}},{key:"timeResponse",get:function(){return this._timeResponse}},{key:"chunksLength",get:function(){return this.chunks.size}},{key:"expectedChunksLength",get:function(){if(null==this._contentLength)return null;var t=Math.floor(this._contentLength/e.CHUNK_SIZE);return this._contentLength%e.CHUNK_SIZE!=0&&++t,t}},{key:"loaded",get:function(){return this.contentData?this.contentData.byteLength:this.chunks.byteLength}},{key:"crc32",get:function(){var e;if(!eE.isNil(this.contentData))return(null==(e=this.contentData)?void 0:e.byteLength)?iJ.crc32FromArrayBuffer(this.contentData):iJ.crc32FromString(this.contentData)}},{key:"checkRemoteFinish",value:function(){return!eE.isNil(this.chunksLength)&&!eE.isNil(this.expectedChunksLength)&&this.chunksLength===this.expectedChunksLength}},{key:"asObservable",get:function(){var e,t;return iY(this.chunks.subject,this.errorSubject).pipe((e=function(e){return e.id},ik(function(n,r){var i=new Set;n.subscribe(i_(r,function(t){var n=e?e(t):t;i.has(n)||(i.add(n),r.next(t))})),null==t||t.subscribe(i_(r,function(){return i.clear()},ir))})))}},{key:"error",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.logger.trace("error, ".concat(null!=t?t:"aborted"," ").concat(this.toString())),this.state=e.State.ERROR,this.aborted=t,this.errorSubject.error(Error("Content error. ".concat(null!=t?t:" Aborted")))}},{key:"reset",value:function(){this._timeFirst&&(this.discardedTime=performance.now()-this._timeFirst),this._timeFirst=null,this.requested=!1}},{key:"finish",value:function(){var t=this.logger.trace,n="";if(this.droppedChunks>0){t=this.logger.debug;var r=Math.round(this.droppedChunks/this.expectedChunksLength*100);n+=" dropped ".concat(r,"% chunks")}this._timeResponse=performance.now();var i=Math.round((this._timeResponse-this._firstTimeFirst)/this.duration*100);i>100&&(t=this.logger.debug,n+=" took ".concat(i,"% duration")),t.call(this.logger,"finished".concat(n," ").concat(this.toString())),this.state=e.State.FINISH,this.contentLength=this.contentData.byteLength,this.chunks.close(),this.errorSubject.complete()}},{key:"setChunk",value:function(e,t){var n;
1if(this.setTimeFirst(),Number(this.id)>0&&!this.chunks.get(e)){var r=this.expectedChunksLength?Math.floor(.25*this.expectedChunksLength):100;this.chunks.size%r==0&&this.logger.trace("milestone ".concat(this.chunks.size,"/").concat(null!=(n=this.expectedChunksLength)?n:"unknown"," ").concat(this.toString()))}if(this.chunks.get(e))return++this.droppedChunks,void(this.discardedData+=t.byteLength);this.chunks.set(e,t)}},{key:"firstTimeFirst",get:function(){return this._firstTimeFirst}},{key:"setTimeFirst",value:function(){eE.isNil(this._timeFirst)&&(this._timeFirst=performance.now()),eE.isNil(this._firstTimeFirst)&&(this._firstTimeFirst=this._timeFirst)}},{key:"toString",value:function(){return"seq: ".concat(this.seq,", contentId: ").concat(this.id,", representationId: ").concat(this.representationId,", chunksCount: ").concat(this.expectedChunksLength,", chunks: ").concat(JSON.stringify(this.chunks.receivedChunksSummary))}}])}();i2.CHUNK_SIZE=16367,i2.instanceCtr=0,function(e){!function(e){e.HTTP="HTTP",e.WEB_RTC="WebRTC"}(e.Origin||(e.Origin={})),function(e){e.CACHEABLE="CACHEABLE",e.NO_CACHEABLE="NO_CACHEABLE"}(e.Policy||(e.Policy={})),function(e){e.PROGRESS="PROGRESS",e.FINISH="FINISH",e.ERROR="ERROR"}(e.State||(e.State={}))}(i2||(i2={}));var i3=function(){return s(function e(){r(this,e),this.data=new Map,this.data.set("http",new Map),this.data.set("webrtc",new Map),this.historicalData=new Map},[{key:"shift",value:function(){this.historicalData=this.data,this.data=new Map,this.data.set("http",new Map),this.data.set("webrtc",new Map)}},{key:"addLoadedBytes",value:function(e,t,n){var r;if(!(eE.isNil(e)||eE.isEmpty(e)||!eE.isFinite(t)||!eE.isFinite(n)||n<=0)){var i="".concat(t),o=this.data.get(e);if(o){o.has(i)||o.set(i,{bitrate:t,nloaded:0,tstart:void 0,tend:void 0,tdelta:0});var a=performance.now(),s=o.get(i);s.nloaded+=n,null!=(r=s.tstart)||(s.tstart=a),s.tend=a,s.tdelta=s.tend-s.tstart}}}},{key:"getLastStatsFromSource",value:function(e){var t=this.getStats(e,this.data);if(eE.isNil(t))return[];if(0===this.historicalData.size)return[t];var n=this.getStats(e,this.historicalData);return eE.isNil(n)||t.bitrate!==n.bitrate?[t]:[t,n]}},{key:"getStats",value:function(e,t){if(t.has(e))return eL(t.get(e).entries()).map(function(e){var t=eB(e,2),n=t[0],r=t[1];return Object.assign({bitrate:Number(n)},r)}).filter(function(e){var t=e.bitrate,n=e.nloaded,r=e.tdelta;return eE.isFinite(t)&&r>0&&n>0}).sort(function(e,t){return t.tend-e.tend})[0]}}])}();function i6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(i6=function(){return!!e})()}function i8(e){return i5(e)||e.hasError||e.isFinished}function i5(e){var t=e.isFinished,n=e.loaded,r=e.timeFirst,i=e.timeResponse;return t&&eE.isFinite(r)&&eE.isFinite(i)&&eE.isFinite(n)}function i4(e){return e.isCacheable}function i7(e){var t=e.timeFirst,n=e.timeResponse;return i4(e)&&i5(e)&&t<n}var i9=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,i6()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).reporter="zero",e.eventBus=eG(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("ContentStats"),e.settings=nA(e.context).getInstance(),e.downloadCounters=new i3,e.stats={source:"http",bufferFillingRate:0,bfrHttp:0,bfrWebRTC:0,contents:[],downSpeed:void 0,throughputHttp:0,throughputWebRTC:0},e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.POLYNET_MODE_CHANGED,this.handlePolyNetModeChangeEvent,{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_CREATED,this.handleDataChannelEvent,{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_STATE_CHANGED,this.handleDataChannelEvent,{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_REMOVED,this.handleDataChannelEvent,{scope:this}),this.eventBus.on(tt.CONTENT_CACHE_CONTENT_CREATED,this.handleContentCacheEvent,{scope:this}),this.eventBus.on(tt.CONTENT_CACHE_CONTENT_UPDATED,this.handleContentCacheEvent,{scope:this}),this.eventBus.on(tt.CONTENT_CACHE_CONTENT_ERROR,this.handleContentCacheEvent,{scope:this})}},{key:"clean",value:function(){this.stats.contents=this.stats.contents.filter(function(e){return!i8(e)}),this.stats.throughputWebRTC=0,this.stats.throughputHttp=0,this.downloadCounters.shift()}},{key:"cleanP2P",value:function(e){this.stats.contents=this.stats.contents.filter(function(t){return t.origin!==i2.Origin.WEB_RTC||t.dataChannelId===e})}},{key:"bufferFillingRate",get:function(){var e=this,t=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.oldBfr!==t&&(e.settings.bfrZero?e.logger.trace(tr.reportBufferFillingRate(t,e.reporter.toUpperCase(),e.forceZero)):e.logger.trace(tr.reportBufferFillingRate(t,n.toUpperCase(),!1))),e.oldBfr=t};if(this.forceZero&&this.settings.bfrZero)return t(0);if(this.settings.bfrCompletion?(this.hasValidContentsByOrigin(i2.Origin.HTTP)&&(this.stats.bfrHttp=this.computeBfrByOriginOnRequests(i2.Origin.HTTP)),this.hasValidContentsByOrigin(i2.Origin.WEB_RTC)&&(this.stats.bfrWebRTC=this.computeBfrByOriginOnRequests(i2.Origin.WEB_RTC))):(this.stats.bfrHttp=this.computeBfrByOriginOnThroughput(i2.Origin.HTTP),this.stats.bfrWebRTC=this.computeBfrByOriginOnThroughput(i2.Origin.WEB_RTC)),this.settings.bfrZero)switch(this.reporter){case"zero":return t(0);case"http":return t(this.stats.bfrHttp);case"webrtc":return t(this.stats.bfrWebRTC)}else switch(this.stats.source){case"http":return t(this.stats.bfrHttp,this.stats.source);case"webrtc":return t(this.stats.bfrWebRTC,this.stats.source)}}},{key:"bfrHttp",get:function(){return this.stats.bfrHttp}},{key:"bfrWebRTC",get:function(){return this.stats.bfrWebRTC}},{key:"source",get:function(){return this.stats.source}},{key:"throughputHttp",get:function(){return this.stats.throughputHttp}},{key:"throughputWebRTC",get:function(){return this.stats.throughputWebRTC}},{key:"contents",get:function(){return this.stats.contents}},{key:"downSpeed",get:function(){return this.hasValidContents&&(this.stats.downSpeed=this.computeDownSpeed()),this.stats.downSpeed}},{key:"handlePolyNetModeChangeEvent",value:function(e){var t=e.newMode;this.forceZero=t===nz.Modes.REPAIRING}},{key:"handleDataChannelEvent",value:function(e){var t=e.dataChannel;if(t.isInbound)if(t.isHttp)this.reporter="http";else{if(!t.isWebRTC||!t.isClosed)return t.isWebRTC&&t.isConnecting?(this.cleanP2P(t.identifier),this.reporter="zero",void(this.settings.bfrZero&&(this.stats.bfrWebRTC=0,this.logger.trace(tr.clearBufferFillingRate(this.stats.bfrWebRTC,this.reporter.toUpperCase()))))):void(t.isWebRTC&&t.isConnected&&(this.reporter="webrtc"));this.reporter="http"}}},{key:"handleContentCacheEvent",value:function(e){var t=e.contentCache;if(!eE.isNil(t.id)&&!eE.isNil(t.origin)){var n=eE.find(this.stats.contents,{id:t.id});if(eE.isNil(n)&&(n={id:t.id,dataChannelId:t.dataChannelId,isCacheable:t.isCacheable,isFinished:t.isFinished,hasError:t.hasError,contentLength:0,contentResponseTime:null,duration:0,loaded:0,origin:t.origin,representationId:t.representationId,timeFirst:void 0,timeRequest:void 0,timeResponse:void 0,retries:0,originalCache:void 0},this.stats.contents.push(n)),t.isCacheable&&(this.settings.bfrCompletion?t.isFinished&&(this.stats.source=t.isResourceFromCdn?"http":"webrtc"):this.stats.source=t.isResourceFromCdn?"http":"webrtc"),this.sumDeltaDownload(t,n),n.origin=t.origin,n.isCacheable=t.isCacheable,n.duration=t.duration,n.timeRequest=t.timeRequest,n.timeResponse=t.timeResponse,n.timeFirst=t.timeFirst,n.contentLength=t.contentLength,n.loaded=t.loaded||0,n.isFinished=t.isFinished,n.hasError=t.hasError,n.retries=t.retries,n.originalCache=t,t.isCacheable&&t.isFinished){var r=this.stats.contents.filter(function(e){return e.isCacheable}).map(function(e){var t="".concat(e.id),n="".concat(e.origin),r="".concat(i8(e));return"".concat(t,":").concat(n,":finished?").concat(r)});this.logger.trace("Current content stats: [ ".concat(r.join(" , ")," ]"))}}}},{key:"completedCacheableContents",get:function(){return this.stats.contents.filter(function(e){return i4(e)&&i5(e)})}},{key:"completedCacheableContentsByOrigin",value:function(e){return this.stats.contents.filter(function(t){return i4(t)&&i5(t)&&function(e,t){return e.origin===t}(t,e)})}},{key:"hasValidContents",get:function(){return!eE.isEmpty(this.completedCacheableContents.filter(i7))}},{key:"hasValidContentsByOrigin",value:function(e){return!eE.isEmpty(this.completedCacheableContentsByOrigin(e).filter(i7))}},{key:"minTimeFirst",get:function(){return this.completedCacheableContents.reduce(function(e,t){return Math.min(e,t.timeFirst)},Number.POSITIVE_INFINITY)}},{key:"maxTimeResponse",get:function(){return this.completedCacheableContents.reduce(function(e,t){return Math.max(e,t.timeResponse)},Number.NEGATIVE_INFINITY)}},{key:"computeBfrByOriginOnRequests",value:function(e){var t=this.settings.defaultContentDuration,n=e===i2.Origin.HTTP?this.stats.bfrHttp:this.stats.bfrWebRTC,r=[],i=function(e){return e.duration||t},o=this.completedCacheableContents.map(function(t){return e===i2.Origin.HTTP?t.origin===i2.Origin.WEB_RTC&&t.retries>0&&(t.origin=i2.Origin.HTTP):e===i2.Origin.WEB_RTC&&t.origin===i2.Origin.WEB_RTC&&t.retries>0&&(t.contentLength=t.originalCache.discardedData,t.timeRequest=t.originalCache.discardedTime),t}).filter(function(t){return t.origin===e&&t.contentLength>0&&i(t)}).map(function(e){return r.push(tr.logContentStatsForBfr(e)),e}).map(function(e){return i(e)/1e3}).reduce(function(e,t){return e+t},0),a=this.maxTimeResponse,s=this.minTimeFirst,c=(a-s)/1e3,u=o/c;return u!==n&&this.logger.trace(tr.updateBufferFillingRateCalculationOnRequests(u,n,e,o,c,s,a,r)),u}},{key:"computeBfrByOriginOnThroughput",value:function(e){var t=e===i2.Origin.HTTP?this.stats.bfrHttp:this.stats.bfrWebRTC,n=e===i2.Origin.HTTP?"http":"webrtc",r=this.downloadCounters.getLastStatsFromSource(n);if(eE.isNil(r)||eE.isEmpty(r))return t;var i=this.isBfrOutlier(n,r[0].nloaded,r[0].tdelta,{nloaded:this.settings.bfrOutlierFilter.nloaded,tdelta:this.settings.bfrOutlierFilter.tdelta}
1),o=this.computeBfrFromStats(r,i),a=o.bfr,s=o.actualBitrate,c=o.bitrate,u=o.tdelta,l=o.nloaded;return!eE.isFinite(a)||a<=0?t:(this.logger.trace(tr.updateBufferFillingRateCalculationOnThroughput(a,t,e,s,c,l,u)),a)}},{key:"computeDownSpeed",value:function(){var e=this.completedCacheableContents.map(function(e){return .008*e.loaded}).reduce(function(e,t){return e+t},0),t=.001*(this.maxTimeResponse-this.minTimeFirst);return t<=0?this.stats.downSpeed:this.stats.downSpeed=e/t}},{key:"computeBfrFromStats",value:function(e,t){var n,r,i,o;if(this.settings.bfrOutlierFilter.enabled)if(t){if(e.length<2)return{};i=e.reduce(function(e,t){return e+t.tdelta},0),o=e.reduce(function(e,t){return e+t.nloaded},0)}else if(this.settings.bfrOutlierFilter.forceMerge)i=e.reduce(function(e,t){return e+t.tdelta},0),o=e.reduce(function(e,t){return e+t.nloaded},0);else{var a=e[0];i=a.tdelta,o=a.nloaded}else{var s=e[0];i=s.tdelta,o=s.nloaded}return{bfr:(n=8*o/(.001*i))/(r=e[0].bitrate),actualBitrate:n,bitrate:r,tdelta:i,nloaded:o}}},{key:"isBfrOutlier",value:function(e,t,n,r){return!("http"===e||!t||!n)&&(n<r.tdelta||t<r.nloaded)}},{key:"sumDeltaDownload",value:function(e,t){if(!function(e){return/\.mpd|\.m3u/.test(e)}(e.url)){var n=e.loaded||0,r=n>t.loaded?n-t.loaded:0;if(e.isCacheable){var i=e.isResourceFromCdn?"http":"webrtc";this.downloadCounters.addLoadedBytes(i,e.bitrate,r)}e.isResourceFromCdn&&(this.stats.throughputHttp+=r),e.isResourceFromP2P&&(this.stats.throughputWebRTC+=r)}}}])}(ez);i9.polyNetFactoryName="ContentStats";var oe=eU.getSingletonFactory(i9),ot=__nested_webpack_require_888620__(37370);function on(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(on=function(){return!!e})()}var or=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,on()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).htmlVideoElement=e,n.handleVideoElementEvents(),n}return f(t,e),s(t,[{key:"currentTime",get:function(){return this.htmlVideoElement.currentTime}},{key:"matchVideoElement",value:function(e){return this.htmlVideoElement===e}},{key:"currentBufferEnd",get:function(){for(var e=this.currentTime,t=this.htmlVideoElement.buffered,n=0,r=t.length;n<r;n++){var i=t.start(n),o=t.end(n);if(i<=e&&e<o)return o}}},{key:"isPlaying",get:function(){return this.htmlVideoElement.currentTime>0&&!this.htmlVideoElement.paused&&!this.htmlVideoElement.ended&&this.htmlVideoElement.readyState>2}},{key:"isPaused",get:function(){return this.htmlVideoElement.currentTime>0&&this.htmlVideoElement.paused&&!this.htmlVideoElement.ended&&this.htmlVideoElement.readyState>2}},{key:"isSeeking",get:function(){return this.htmlVideoElement.seeking}},{key:"hasMetadata",get:function(){return this.htmlVideoElement.readyState>=1}},{key:"droppedFrames",get:function(){if(eE.isFunction(this.htmlVideoElement.getVideoPlaybackQuality))return this.htmlVideoElement.getVideoPlaybackQuality().droppedVideoFrames;var e="webkitDroppedFrameCount";return e in this.htmlVideoElement?this.htmlVideoElement[e]:0}},{key:"bufferHealthAfterGap",get:function(){for(var e=this.htmlVideoElement.buffered,t=this.htmlVideoElement.currentTime,n=0,r=0;r<e.length;r++)eE.isFinite(e.end(r))&&t<e.start(r)&&(n+=e.end(r)-e.start(r));return n}},{key:"bufferHealth",get:function(){var e=this.currentTime,t=this.currentBufferEnd;return eE.isNil(t)||!eE.isFinite(t)||eE.isNil(e)||!eE.isFinite(e)||e>t?0:1e3*(t-e+this.bufferHealthAfterGap)}},{key:"getGapsInfo",value:function(){var e=this.htmlVideoElement;if(e){for(var t=e.currentTime,n=e.buffered,r=[],i=0,o=n.length;i<o;i++)if(n.start(i)<=t&&t<n.end(i))r.push("[".concat(t," - ").concat(n.end(i),"]"));else if(t<n.end(i)){var a=i>0?n.end(i-1):t;r.push("[gap ".concat(n.start(i)-a,"]")),r.push("[".concat(n.start(i)," - ").concat(n.end(i),"]"))}if(0!==r.length)return r.join(" ")}}},{key:"viewport",get:function(){return{height:eE.isFinite(this.htmlVideoElement.clientHeight)?this.htmlVideoElement.clientHeight:void 0,width:eE.isFinite(this.htmlVideoElement.clientWidth)?this.htmlVideoElement.clientWidth:void 0}}},{key:"resolution",get:function(){var e=this.htmlVideoElement.videoHeight,t=this.htmlVideoElement.videoWidth;return{height:eE.isFinite(e)&&e>0?e:void 0,width:eE.isFinite(t)&&t>0?t:void 0}}},{key:"handleVideoElementEvents",value:function(){var e=this;this.unknownEmitter=function(){return e.emit("state","unknown")},this.pauseEmitter=function(){return e.isPaused&&e.emit("state","pause")},this.playListener=function(){return!e.hasMetadata&&e.emit("state","starting")},this.playingListener=function(){return e.emit("state","playing")},this.progressListener=function(){return e.isPlaying&&!e.isSeeking&&e.emit("state","playing")},this.waitingListener=function(){return e.hasMetadata&&e.emit("state","buffering")},this.htmlVideoElement.addEventListener("ended",this.unknownEmitter),this.htmlVideoElement.addEventListener("error",this.unknownEmitter),this.htmlVideoElement.addEventListener("pause",this.pauseEmitter),this.htmlVideoElement.addEventListener("play",this.playListener),this.htmlVideoElement.addEventListener("playing",this.playingListener),this.htmlVideoElement.addEventListener("progress",this.progressListener),this.htmlVideoElement.addEventListener("seeked",this.pauseEmitter),this.htmlVideoElement.addEventListener("waiting",this.waitingListener)}},{key:"removeAllListeners",value:function(e){var n,r,i,o,a;return(n=t,r="removeAllListeners",i=this,a=l(u(1&(o=3)?n.prototype:n),r,i),2&o&&"function"==typeof a?function(e){return a.apply(i,e)}:a)([e]),this.htmlVideoElement.removeEventListener("ended",this.unknownEmitter),this.htmlVideoElement.removeEventListener("error",this.unknownEmitter),this.htmlVideoElement.removeEventListener("loadstart",this.unknownEmitter),this.htmlVideoElement.removeEventListener("pause",this.pauseEmitter),this.htmlVideoElement.removeEventListener("play",this.playListener),this.htmlVideoElement.removeEventListener("playing",this.playingListener),this.htmlVideoElement.removeEventListener("progress",this.progressListener),this.htmlVideoElement.removeEventListener("seeked",this.pauseEmitter),this.htmlVideoElement.removeEventListener("waiting",this.waitingListener),this.unknownEmitter=void 0,this.pauseEmitter=void 0,this.playListener=void 0,this.playingListener=void 0,this.progressListener=void 0,this.waitingListener=void 0,this}}])}(__nested_webpack_require_888620__.n(ot)()),oi=function(){return s(function e(){r(this,e),this.times=new Map,this.reset()},[{key:"reset",value:function(){this._state="unknown",this.lastStateTime=performance.now(),this.times.clear()}},{key:"state",get:function(){return this._state},set:function(e){this._state!==e&&(this.times.set(this._state,this.get
1StateTime(this._state)),this._state=e,this.lastStateTime=performance.now())}},{key:"canWarmStart",get:function(){return"unknown"===this._state&&!this.startingTime}},{key:"warmStart",value:function(){this.canWarmStart&&(this.times.set("starting",this.getStateTime("unknown")),this.state="playing")}},{key:"startingTime",get:function(){return this.getStateTime("starting")}},{key:"seekingTime",get:function(){return this.getStateTime("seeking")}},{key:"bufferingTime",get:function(){return this.getStateTime("buffering")}},{key:"playingTime",get:function(){return this.getStateTime("playing")}},{key:"pauseTime",get:function(){return this.getStateTime("pause")}},{key:"getStateTime",value:function(e){var t,n=null!=(t=this.times.get(e))?t:0,r=performance.now()-this.lastStateTime;return Math.round(this._state===e?n+r:n)}}])}();function oo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oo=function(){return!!e})()}var oa=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,oo()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("PlaybackStats"),e.eventBus=eG(e.context).getInstance(),e.playerStateTimes=new oi,e.startTime=performance.now(),e.currentDroppedFrames=0,e.stats={bufferHealth:void 0,bufferingEvents:0,bufferingTime:void 0,droppedFrames:void 0,gapsInfo:void 0,pauseTime:void 0,playingTime:void 0,resolution:{height:void 0,width:void 0},seekingTime:void 0,startingTime:void 0,state:void 0,timeToFirstFrame:void 0,viewport:{height:void 0,width:void 0}},e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.COLLECT_VIDEO_STATS,this.handleCollectStatsEvent,{scope:this})}},{key:"destroy",value:function(){var e;null==(e=this._videoElement)||e.removeAllListeners(),this._videoElement=null}},{key:"reset",value:function(){this.playerStateTimes.reset(),this.stats.bufferingEvents=0}},{key:"videoElement",get:function(){return eE.isNil(this._videoElement)&&this.checkForVideoElement(),this._videoElement}},{key:"bufferHealth",get:function(){return this.videoElement?this.videoElement.bufferHealth:0}},{key:"gapsInfo",get:function(){if(this.videoElement)return this.videoElement.getGapsInfo()}},{key:"droppedFrames",get:function(){var e,t=null==(e=this.videoElement)?void 0:e.droppedFrames;if(eE.isNil(t))return 0;t<this.currentDroppedFrames&&(this.currentDroppedFrames=t);var n=t-this.currentDroppedFrames;return this.currentDroppedFrames=t,n}},{key:"resolution",get:function(){var e,t=null==(e=this.videoElement)?void 0:e.resolution;return eE.isNil(t)?{height:void 0,width:void 0}:t}},{key:"state",get:function(){return this.playerStateTimes.state}},{key:"timeToFirstFrame",get:function(){return this.stats.timeToFirstFrame}},{key:"bufferingEvents",get:function(){return this.stats.bufferingEvents}},{key:"viewport",get:function(){var e,t=null==(e=this.videoElement)?void 0:e.viewport;return eE.isNil(t)?{height:void 0,width:void 0}:t}},{key:"startingTime",get:function(){return this.playerStateTimes.startingTime}},{key:"seekingTime",get:function(){return this.playerStateTimes.seekingTime}},{key:"bufferingTime",get:function(){return this.playerStateTimes.bufferingTime}},{key:"playingTime",get:function(){return this.playerStateTimes.playingTime}},{key:"pauseTime",get:function(){return this.playerStateTimes.pauseTime}},{key:"handleVideoEvents",value:function(){var e=this,t=function(t){"playing"===t&&eE.isNil(e.stats.timeToFirstFrame)&&(e.stats.timeToFirstFrame=performance.now()-e.startTime),"playing"===t&&e.playerStateTimes.canWarmStart&&e.playerStateTimes.warmStart(),"buffering"===t&&e.stats.bufferingEvents++,e.playerStateTimes.state=t};this.videoElement.isPlaying&&t("playing"),this.videoElement.on("state",t)}},{key:"handleCollectStatsEvent",value:function(e){var t=e.videoElementReader;this.videoElementReader=t,this.checkForVideoElement()}},{key:"checkForVideoElement",value:function(){var e=eE.isNil(this.videoElementReader)?void 0:this.videoElementReader();if(!(eE.isNil(e)||this._videoElement&&this._videoElement.matchVideoElement(e))){try{this._videoElement=new or(e),this.logger.trace("Registered new video player element")}catch(e){return void this.logger.error("Setting up an incorrect HTMLVideoElement, error: ".concat(e))}this.handleVideoEvents()}}}])}(ez);oa.polyNetFactoryName="PlaybackStats";var os=eU.getSingletonFactory(oa);function oc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oc=function(){return!!e})()}var ou=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,oc()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).started=!1,e.initTime=performance.now(),e.polyNetStats=rM(e.context).getInstance(),e.platformStats=n1(e.context).getInstance(),e.natStats=rI(e.context).getInstance(),e.networkStats=rA(e.context).getInstance(),e.streamingStats=rj(e.context).getInstance(),e.dataChannelStats=rq(e.context).getInstance(),e.contentSteeringStats=rV(e.context).getInstance(),e.contentStats=oe(e.context).getInstance(),e.playbackStats=os(e.context).getInstance(),e.eventBus=eG(e.context).getInstance(),e.start(),e}return f(t,e),s(t,[{key:"start",value:function(){this.started||(this.started=!0,this.polyNetStats.start(),this.platformStats.start(),this.natStats.start(),this.networkStats.start(),this.streamingStats.start(),this.dataChannelStats.start(),this.contentSteeringStats.start(),this.contentStats.start(),this.playbackStats.start(),this.eventBus.on(tt.REPRESENTATION_CHANGE,this.handleRepresentationChange,{scope:this}))}},{key:"destroy",value:function(){var e,t,n,r,i,o;null==(e=this.platformStats)||e.destroy(),null==(t=this.natStats)||t.destroy(),null==(n=this.streamingStats)||n.destroy(),null==(r=this.dataChannelStats)||r.destroy(),null==(i=this.contentStats)||i.destroy(),null==(o=this.playbackStats)||o.destroy(),this.platformStats=null,this.natStats=null,this.streamingStats=null,this.dataChannelStats=null,this.contentSteeringStats=null,this.contentStats=null,this.playbackStats=null}},{key:"clean",value:function(){this.polyNetStats.clean(),this.networkStats.clean(),this.dataChannelStats.clean(),this.contentStats.clean()}},{key:"reset",value:function(){this.playbackStats.reset()}},{key:"aliveTime",get:function(){return Math.round(performance.now()-this.initTime)}},{key:"polyNet",get:function(){return this.polyNetStats}},{key:"platform",get:function(){return this.platformStats}},{key:"stream",get:function(){return this.streamingStats}},{key:"network",get:function(){return this.networkStats}},{key:"nat",get:function(){return this.natStats}},{key:"datachannel",get:function(){return this.dataChannelStats}},{key:"contentSteering",get:function(){return this.contentSteeringStats}},{key:"content",get:function(){return this.contentStats}},{key:"playback",get:function(){return this.playbackStats}},{key:"handleRepresentationChange",value:function(e){e.sameStreamUri||this.reset()}}])}(ez);ou.polyNetFactoryName="Stats";var ol,of=eU.getSingletonFactory(ou);!function(e){e.TIMEOUT="TIMEOUT",e.INTERVAL="INTERVAL"}(ol||(ol={}));var oh,od,op=function(){return s(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ol.TIMEOUT;r(this,e),this.id=t,this.period=n,this.type=i},[{key:"timerInfo",get:function(){return{id:this.id,period:this.period,type:this.t
1ype}}},{key:"observable",get:function(){switch(this.type){case ol.INTERVAL:return this.interval();case ol.TIMEOUT:return this.timeout()}}},{key:"timeout",value:function(){var e=this;return new iS(function(t){var n=setTimeout(function(){t.next({id:e.id,counter:0}),t.complete()},e.period);return function(){return clearTimeout(n)}})}},{key:"interval",value:function(){var e=this;return new iS(function(t){var n=0,r=function(){t.next({id:e.id,counter:n}),n=(n+1)%Number.MAX_SAFE_INTEGER,i=setTimeout(r,e.period)},i=setTimeout(function(){r()},e.period);return function(){return clearTimeout(i)}})}}])}(),ov=function(){return s(function e(){r(this,e)},[{key:"createTimer",value:function(e,t,n){return new op(e,t,n).observable}},{key:"createTimeout",value:function(e,t){return this.createTimer(e,t,ol.TIMEOUT)}},{key:"createInterval",value:function(e,t){return this.createTimer(e,t,ol.INTERVAL)}}])}();function og(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return oy(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oy(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function oy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.START="START",e.STOP="STOP",e.DESTROY="DESTROY"}(oh||(oh={})),function(e){e.FIRED="FIRED",e.COMPLETED="COMPLETED",e.REMOVED="REMOVED",e.ERROR="ERROR"}(od||(od={}));var om=function(){function e(t){var n=this;r(this,e),this.store=new Map,this.workerEnv=t,this.workerEnv.onmessage=function(e){return n.handleMessages(e)}}return s(e,[{key:"sendFired",value:function(e,t,n){this.workerEnv.postMessage({command:od.FIRED,counter:t,id:e,period:n})}},{key:"sendCompleted",value:function(e){this.workerEnv.postMessage({command:od.COMPLETED,id:e})}},{key:"handleMessages",value:function(e){var t,n=this;if(e.data){var r,i=e.data,o=i.id,a=i.period,s=i.type;switch(i.command){case oh.START:t=(r=new op(o,a,s)).observable.subscribe({complete:function(){n.store.delete(o),n.sendCompleted(o)},next:function(e){n.sendFired(r.id,e.counter,r.period)}}),this.store.set(o,t);break;case oh.STOP:(t=this.store.get(o))&&(this.sendCompleted(o),t.unsubscribe(),this.store.delete(o));break;case oh.DESTROY:var c,u=og(this.store.values());try{for(u.s();!(c=u.n()).done;)c.value.unsubscribe()}catch(e){u.e(e)}finally{u.f()}this.store.clear(),this.workerEnv.close()}}}}],[{key:"createTimer",value:function(t){return new e(t)}}])}();om.createTimer(self);var ob=function(){return s(function e(){var t=this;r(this,e);try{this.firingHandlers=new Map,this.worker=new om,this.worker.onmessage=function(e){return t.handleWorkerMessage(e)}}catch(e){throw new ek("Unable to start the webworker for timers",ek.Codes.WEB_WORKER_ERROR)}},[{key:"createTimer",value:function(e,t,n){var r=this;if(!this.worker)throw new ek("Unable to user webworker for timers",ek.Codes.WEB_WORKER_ERROR);var i=new iS(function(t){return r.firingHandlers.set(e,{observer:t,firingTime:(new Date).getTime()}),function(){r.worker.postMessage({id:e,command:oh.STOP})}});return this.worker.postMessage({id:e,command:oh.START,period:t,type:n}),i}},{key:"createTimeout",value:function(e,t){return this.createTimer(e,t,ol.TIMEOUT)}},{key:"createInterval",value:function(e,t){return this.createTimer(e,t,ol.INTERVAL)}},{key:"clear",value:function(){this.worker&&this.worker.postMessage({command:oh.DESTROY})}},{key:"handleWorkerMessage",value:function(e){if(e.data){var t=e.data,n=t.command,r=t.id,i=t.counter,o=t.period,a=this.firingHandlers.get(r);if(a){var s,c=a.observer,u=a.firingTime;if(c)switch(n){case od.FIRED:s=(new Date).getTime(),u?s-u>=.9*o&&c.next({id:r,counter:i}):c.next({id:r,counter:i}),a.firingTime=s;break;case od.COMPLETED:this.firingHandlers.delete(r),c.complete()}}}}}])}();function oS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oS=function(){return!!e})()}var oE=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,oS()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("TimerService"),e.startWorker(),e.timerN
1ativeCollection=new ov,e.counter=0,e.store=new Map,e}return f(t,e),s(t,[{key:"destroy",value:function(){this.store.clear(),this.logger=null,this.timerWorkerCollection&&this.timerWorkerCollection.clear()}},{key:"createTimeout",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.createTimer(e,t,n,ol.TIMEOUT)}},{key:"createInterval",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.createTimer(e,t,n,ol.INTERVAL)}},{key:"createTimer",value:function(e,t,n,r){var i=this;if("number"!=typeof t||t<0)throw new ek("Timer - Invalid period: ".concat(t));var o,a="".concat(this.counter);return this.counter=(this.counter+1)%Number.MAX_SAFE_INTEGER,o=n?this.createWorkerizedTimer(e,a,t,r):this.createNativeTimer(e,a,t,r),new iS(function(e){var t=i.store,n=o.subscribe({complete:function(){t.delete(a),e.complete()},next:function(t){e.next(t)}});return function(){n.unsubscribe(),i.store.delete(a)}})}},{key:"startWorker",value:function(){try{this.timerWorkerCollection=new ob}catch(e){e instanceof ek&&this.logger.trace("Unable to start the webworker, falling to native timers")}}},{key:"createNativeTimer",value:function(e,t,n,r){var i=this.timerNativeCollection.createTimer(t,n,r);return this.store.set(t,{name:e,worker:!1,id:t,period:n,type:r}),i}},{key:"createWorkerizedTimer",value:function(e,t,n,r){if(!this.timerWorkerCollection)return this.createNativeTimer(e,t,n,r);try{var i=this.timerWorkerCollection.createTimer(t,n,r);return this.store.set(t,{name:e,worker:!0,id:t,period:n,type:r}),i}catch(i){return this.createNativeTimer(e,t,n,r)}}}])}(ez);oE.polyNetFactoryName="TimerService";var oC=eU.getSingletonFactory(oE);function ow(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ow=function(){return!!e})()}var oT=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,ow()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).timerService=oC(e.context).getInstance(),e}return f(t,e),s(t,[{key:"setTimeout",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.timerService.createTimeout(e,t,r);this.subscription=i.subscribe({next:function(){n()}})}},{key:"setInterval",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.timerService.createInterval(e,t,r);this.subscription=i.subscribe({next:function(){n()}})}},{key:"cancel",value:function(){this.subscription&&this.subscription.unsubscribe()}},{key:"isRunning",get:function(){return this.subscription&&!this.subscription.closed}}])}(ez);oT.polyNetFactoryName="Timer";var ok=eU.getInstanceFactory(oT);function o_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o_=function(){return!!e})()}var oR=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,o_()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=null,e.eventBus=null,e.settings=null,e.responseTimeout=null,e.logger=e0(e.context).getInstance().getLogger("ResponseTimer"),e.eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.responseTimeout=ok(e.context).createInstance(),e}return f(t,e),s(t,[{key:"schedule",value:function(e){var n=this,r=this.settings.trackerResponseTimeoutPeriod;eE.isNil(r)||r<=0||(this.cancel(),this.responseTimeout.setTimeout(t.polyNetFactoryName,r,function(){n.logger.warn("Triggered timeout for tracker response due to the request took more than ".concat(r," ms")),n.eventBus.emit(tt.COUNTERMEASURE_TRACKER_RESPONSE_TIMEOUT,{target:n,request:e})}))}},{key:"cancel",value:function(){this.responseTimeout.cancel()}},{key:"destroy",value:function(){this.eventBus&&this.eventBus.offAll({scope:this}),this.cancel(),this.logger=null,this.eventBus=null,this.settings=null,this.responseTimeout=null}}])}(ez);oR.polyNetFactoryName="ResponseTimer";var oO,oI=eU.getSingletonFactory(oR);!function(e){!function(e){e.HANDSHAKE_REQUEST="polynet_handshake_request",e.HANDSHAKE_RESPONSE="polynet_handshake_response",e.CHANGE_SETTINGS_INSTRUCTION="polynet_change_settings_instruction",e.JOIN_REQUEST="polynet_join_request",e.JOIN_RESPONSE="polynet_join_response",e.MOVE_INSTRUCTION="polynet_move_instruction",e.PEER_TO_PEER="p2p"}
1(e.MessageType||(e.MessageType={})),function(e){e[e.HANDSHAKE_RESPONSE_NOT_SUPPORTED=401]="HANDSHAKE_RESPONSE_NOT_SUPPORTED",e[e.HANDSHAKE_RESPONSE_OK=201]="HANDSHAKE_RESPONSE_OK",e[e.JOIN_RESPONSE_OK=200]="JOIN_RESPONSE_OK",e[e.DATA_CHANNEL_NOT_AVAILABLE=503]="DATA_CHANNEL_NOT_AVAILABLE"}(e.StatusCode||(e.StatusCode={}))}(oO||(oO={}));var oN=__nested_webpack_require_888620__(84789),ox=oN.Reader,oA=oN.Writer,oP=oN.util,oD=oN.roots.default||(oN.roots.default={}),oM=(oD.system73=function(){var e,t,n={};return(t={}).p2p=((e={}).ContentRequest=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.contentId="",e.prototype.duration=0,e.encode=function(e,t){return t||(t=oA.create()),t.uint32(10).string(e.contentId),null!=e.duration&&Object.hasOwnProperty.call(e,"duration")&&t.uint32(16).uint32(e.duration),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.ContentRequest;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.contentId=e.string();break;case 2:r.duration=e.uint32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("contentId"))throw oP.ProtocolError("missing required 'contentId'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.ContentRequest"},e}(),e.ContentAborted=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.contentId="",e.encode=function(e,t){return t||(t=oA.create()),t.uint32(10).string(e.contentId),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.ContentAborted;e.pos<n;){var i=e.uint32();i>>>3==1?r.contentId=e.string():e.skipType(7&i)}if(!r.hasOwnProperty("contentId"))throw oP.ProtocolError("missing required 'contentId'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.ContentAborted"},e}(),e.ContentResponseStart=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.contentId="",e.prototype.contentLength=0,e.prototype.chunksAmount=0,e.prototype.duration=0,e.encode=function(e,t){return t||(t=oA.create()),t.uint32(10).string(e.contentId),null!=e.contentLength&&Object.hasOwnProperty.call(e,"contentLength")&&t.uint32(16).uint32(e.contentLength),null!=e.chunksAmount&&Object.hasOwnProperty.call(e,"chunksAmount")&&t.uint32(24).uint32(e.chunksAmount),null!=e.duration&&Object.hasOwnProperty.call(e,"duration")&&t.uint32(32).uint32(e.duration),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.ContentResponseStart;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.contentId=e.string();break;case 2:r.contentLength=e.uint32();break;case 3:r.chunksAmount=e.uint32();break;case 4:r.duration=e.uint32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("contentId"))throw oP.ProtocolError("missing required 'contentId'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.ContentResponseStart"},e}(),e.ContentResponseProgress=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.contentId="",e.prototype.chunkId=0,e.prototype.chunkData=oP.newBuffer([]),e.encode=function(e,t){return t||(t=oA.create()),t.uint32(10).string(e.contentId),t.uint32(16).uint32(e.chunkId),t.uint32(26).bytes(e.chunkData),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.ContentResponseProgress;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.contentId=e.string();break;case 2:r.chunkId=e.uint32();break;case 3:r.chunkData=e.bytes();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("contentId"))throw oP.ProtocolError("missing required 'contentId'",{instance:r});if(!r.hasOwnProperty("chunkId"))throw oP.ProtocolError("missing required 'chunkId'",{instance:r});if(!r.hasOwnProperty("chunkData"))throw oP.ProtocolError("missing required 'chunkData'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.ContentResponseProgress"},e}(),e.ContentResponseEnd=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.contentId="",e.prototype.contentLength=0,e.prototype.chunksAmount=0,e.prototype.crc32=0,e.encode=function(e,t){return t||(t=oA.create()),t.uint32(10).string(e.contentId),t.uint32(16).uint32(e.contentLength),t.uint32(24).uint32(e.chunksAmount),t.uint32(32).uint32(e.crc32),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.ContentResponseEnd;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.contentId=e.string();break;case 2:r.contentLength=e.uint32();break;case 3:r.chunksAmount=e.uint32();break;case 4:r.crc32=e.uint32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("contentId"))throw oP.ProtocolError("missing required 'contentId'",{instance:r});if(!r.hasOwnProperty("contentLength"))throw oP.ProtocolError("missing required 'contentLength'",{instance:r});if(!r.hasOwnProperty("chunksAmount"))throw oP.ProtocolError("missing required 'chunksAmount'",{instance:r});if(!r.hasOwnProperty("crc32"))throw oP.ProtocolError("missing required 'crc32'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.ContentResponseEnd"},e}(),e.Ping=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.encode=function(e,t){return t||(t=oA.create()),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.Ping;e.pos<n;){var i=e.uint32();e.skipType(7&i)}return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.Ping"},e}(),e.Pong=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.encode=function(e,t){return t||(t=oA.create()),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.Pong;e.pos<n;){var i=e.uint32();e.skipType(7&i)}return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.Pong"},e}(),e.StillAliveRequest=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.correlationId=0,e.encode=function(e,t){return t||(t=oA.create()),t.uint32(8).uint32(e.correlationId),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.StillAliveRequest;e.pos<n;){var i=e.uint32();i>>>
13==1?r.correlationId=e.uint32():e.skipType(7&i)}if(!r.hasOwnProperty("correlationId"))throw oP.ProtocolError("missing required 'correlationId'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.StillAliveRequest"},e}(),e.StillAliveResponse=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.correlationId=0,e.encode=function(e,t){return t||(t=oA.create()),t.uint32(8).uint32(e.correlationId),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.StillAliveResponse;e.pos<n;){var i=e.uint32();i>>>3==1?r.correlationId=e.uint32():e.skipType(7&i)}if(!r.hasOwnProperty("correlationId"))throw oP.ProtocolError("missing required 'correlationId'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.StillAliveResponse"},e}(),e.Metrics=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.representationBufferFillingRate=0,e.prototype.aggregateBufferFillingRate=0,e.encode=function(e,t){return t||(t=oA.create()),null!=e.representationBufferFillingRate&&Object.hasOwnProperty.call(e,"representationBufferFillingRate")&&t.uint32(13).float(e.representationBufferFillingRate),null!=e.aggregateBufferFillingRate&&Object.hasOwnProperty.call(e,"aggregateBufferFillingRate")&&t.uint32(21).float(e.aggregateBufferFillingRate),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.Metrics;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.representationBufferFillingRate=e.float();break;case 2:r.aggregateBufferFillingRate=e.float();break;default:e.skipType(7&i)}}return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.Metrics"},e}(),e.LoopCheck=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.nodeId="",e.prototype.correlationId="",e.prototype.finalCountdown=0,e.encode=function(e,t){return t||(t=oA.create()),t.uint32(10).string(e.nodeId),t.uint32(18).string(e.correlationId),t.uint32(24).uint32(e.finalCountdown),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.LoopCheck;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.nodeId=e.string();break;case 2:r.correlationId=e.string();break;case 3:r.finalCountdown=e.uint32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("nodeId"))throw oP.ProtocolError("missing required 'nodeId'",{instance:r});if(!r.hasOwnProperty("correlationId"))throw oP.ProtocolError("missing required 'correlationId'",{instance:r});if(!r.hasOwnProperty("finalCountdown"))throw oP.ProtocolError("missing required 'finalCountdown'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.LoopCheck"},e}(),e.SignalingSDP=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.id=0,e.prototype.sdp="",e.prototype.sdpType="",e.encode=function(e,t){return t||(t=oA.create()),t.uint32(8).uint32(e.id),t.uint32(18).string(e.sdp),t.uint32(26).string(e.sdpType),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.SignalingSDP;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.id=e.uint32();break;case 2:r.sdp=e.string();break;case 3:r.sdpType=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("id"))throw oP.ProtocolError("missing required 'id'",{instance:r});if(!r.hasOwnProperty("sdp"))throw oP.ProtocolError("missing required 'sdp'",{instance:r});if(!r.hasOwnProperty("sdpType"))throw oP.ProtocolError("missing required 'sdpType'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.SignalingSDP"},e}(),e.SignalingQUIC=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.id=0,e.prototype.sdpType="",e.prototype.key="",e.prototype.params="",e.encode=function(e,t){return t||(t=oA.create()),t.uint32(8).uint32(e.id),t.uint32(18).string(e.sdpType),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(26).string(e.key),null!=e.params&&Object.hasOwnProperty.call(e,"params")&&t.uint32(34).string(e.params),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.SignalingQUIC;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.id=e.uint32();break;case 2:r.sdpType=e.string();break;case 3:r.key=e.string();break;case 4:r.params=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("id"))throw oP.ProtocolError("missing required 'id'",{instance:r});if(!r.hasOwnProperty("sdpType"))throw oP.ProtocolError("missing required 'sdpType'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.SignalingQUIC"},e}(),e.SignalingCandidate=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.id=0,e.prototype.candidateSdp="",e.prototype.sdpMid="",e.prototype.sdpMLineIndex=0,e.encode=function(e,t){return t||(t=oA.create()),t.uint32(8).uint32(e.id),t.uint32(18).string(e.candidateSdp),t.uint32(26).string(e.sdpMid),t.uint32(32).int32(e.sdpMLineIndex),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.SignalingCandidate;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.id=e.uint32();break;case 2:r.candidateSdp=e.string();break;case 3:r.sdpMid=e.string();break;case 4:r.sdpMLineIndex=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("id"))throw oP.ProtocolError("missing required 'id'",{instance:r});if(!r.hasOwnProperty("candidateSdp"))throw oP.ProtocolError("missing required 'candidateSdp'",{instance:r});if(!r.hasOwnProperty("sdpMid"))throw oP.ProtocolError("missing required 'sdpMid'",{instance:r});if(!r.hasOwnProperty("sdpMLineIndex"))throw oP.ProtocolError("missing required 'sdpMLineIndex'",{instance:r});return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.SignalingCandidate"},e}(),e.SignalingTakeControl=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.encode=function(e,t){return t||(t=oA.create()),t},e.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.SignalingTakeControl;e.pos<n;){var i=e.uint32();e.skipType(7&i)}return r},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.SignalingTakeControl"},e}(),e.Message=function(){var e,t,n;function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return r.prototype.type=1,r.prototype.ping=null,r.prototype.pong=null,r.prototype.contentRequest=null,r.prototype.contentResponseStart=null,r.prototype.contentResponseProgress=null,r.prototype.contentResponseEnd=null,r.prototype.contentAborted=null,r.prototype.stillAliveRequest=null,r.prototype.stillAliveResponse=null,r.prototype.metrics=null,r.prototype.loopCheck=null,r.prototype.signalingSDP=null,r.prototype.signalingCandidate=null,r.prototype.signalingQUIC=null,r.prototype.signalingTakeControl=null,Object.defineProperty(r.prototype,"message",{get:oP.oneOfGetter(e=["ping","pong","contentRequest","contentResponseStart","contentResponseProgress","contentResponseEnd","contentAborted","stillAliveRequest","stillAliveResponse","metrics","loopCheck","signalingSDP","signalingCandidate","signalingQUIC","signalingTakeControl"]),set:oP.oneOfSetter(e)}),r.encode=function(e,t){return t||(t=oA.create()),t.uint32(8).int32(e.type),null!=e.ping&&Object.hasOwnProperty.call(e,"ping")&&oD.system73.protocol.p2p.Ping.encode(e.ping,t.uint32(18).fork()).ldelim(),null!=e.pong&&Object.hasOwnProperty.call(e,"pong")&&oD.system73.protocol.p2p.Pong.encode(e.pong,t.uint32(26).fork()).ldelim(),null!=e.contentRequest&&Object.hasOwnProperty.call(e,"contentRequest")&&oD.system73.protocol.p2p.ContentRequest.encode(e.contentRequest,t.uint32(34).fork()).ldelim(),null!=e.contentResponseStart&&Object.hasOwnProperty.call(e,"contentResponseStart")&&oD.system73.protocol.p2p.ContentResponseStart.encode(e.contentResponseStart,t.uint32(42).fork()).ldelim(),null!=e.contentResponseProgress&&Object.hasOwnProperty.call(e,"contentResponseProgress")&&oD.system73.protocol.p2p.ContentResponseProgress.encode(e.contentResponseProgress,t.uint32(50).fork()).ldelim(),null!=e.contentResponseEnd&&Object.hasOwnProperty.call(e,"contentResponseEnd")&&oD.system73.protocol.p2p.ContentResponseEnd.encode(e.contentResponseEnd,t.uint32(58).fork()).ldelim(),null!=e.contentAborted&&Object.hasOwnProperty.call(e,"contentAborted")&&oD.system73.protocol.p2p.ContentAborted.encode(e.contentAborted,t.uint32(66).fork()).ldelim(),null!=e.stillAliveRequest&&Object.hasOwnProperty.call(e,"stillAliveRequest")&&oD.system73.protocol.p2p.StillAliveRequest.encode(e.stillAliveRequest,t.uint32(90).fork()).ldelim(),null!=e.stillAliveResponse&&Object.hasOwnProperty.call(e,"stillAliveResponse")&&oD.system73.protocol.p2p.StillAliveResponse.encode(e.stillAliveResponse,t.uint32(98).fork()).ldelim(),null!=e.metrics&&Object.hasOwnProperty.call(e,"metrics")&&oD.system73.protocol.p2p.Metrics.encode(e.metrics,t.uint32(106).fork()).ldelim(),null!=e.loopCheck&&Object.hasOwnProperty.call(e,"loopCheck")&&oD.system73.protocol.p2p.LoopC
1heck.encode(e.loopCheck,t.uint32(114).fork()).ldelim(),null!=e.signalingSDP&&Object.hasOwnProperty.call(e,"signalingSDP")&&oD.system73.protocol.p2p.SignalingSDP.encode(e.signalingSDP,t.uint32(122).fork()).ldelim(),null!=e.signalingCandidate&&Object.hasOwnProperty.call(e,"signalingCandidate")&&oD.system73.protocol.p2p.SignalingCandidate.encode(e.signalingCandidate,t.uint32(130).fork()).ldelim(),null!=e.signalingQUIC&&Object.hasOwnProperty.call(e,"signalingQUIC")&&oD.system73.protocol.p2p.SignalingQUIC.encode(e.signalingQUIC,t.uint32(138).fork()).ldelim(),null!=e.signalingTakeControl&&Object.hasOwnProperty.call(e,"signalingTakeControl")&&oD.system73.protocol.p2p.SignalingTakeControl.encode(e.signalingTakeControl,t.uint32(146).fork()).ldelim(),t},r.decode=function(e,t){e instanceof ox||(e=ox.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new oD.system73.protocol.p2p.Message;e.pos<n;){var i=e.uint32();switch(i>>>3){case 1:r.type=e.int32();break;case 2:r.ping=oD.system73.protocol.p2p.Ping.decode(e,e.uint32());break;case 3:r.pong=oD.system73.protocol.p2p.Pong.decode(e,e.uint32());break;case 4:r.contentRequest=oD.system73.protocol.p2p.ContentRequest.decode(e,e.uint32());break;case 5:r.contentResponseStart=oD.system73.protocol.p2p.ContentResponseStart.decode(e,e.uint32());break;case 6:r.contentResponseProgress=oD.system73.protocol.p2p.ContentResponseProgress.decode(e,e.uint32());break;case 7:r.contentResponseEnd=oD.system73.protocol.p2p.ContentResponseEnd.decode(e,e.uint32());break;case 8:r.contentAborted=oD.system73.protocol.p2p.ContentAborted.decode(e,e.uint32());break;case 11:r.stillAliveRequest=oD.system73.protocol.p2p.StillAliveRequest.decode(e,e.uint32());break;case 12:r.stillAliveResponse=oD.system73.protocol.p2p.StillAliveResponse.decode(e,e.uint32());break;case 13:r.metrics=oD.system73.protocol.p2p.Metrics.decode(e,e.uint32());break;case 14:r.loopCheck=oD.system73.protocol.p2p.LoopCheck.decode(e,e.uint32());break;case 15:r.signalingSDP=oD.system73.protocol.p2p.SignalingSDP.decode(e,e.uint32());break;case 16:r.signalingCandidate=oD.system73.protocol.p2p.SignalingCandidate.decode(e,e.uint32());break;case 17:r.signalingQUIC=oD.system73.protocol.p2p.SignalingQUIC.decode(e,e.uint32());break;case 18:r.signalingTakeControl=oD.system73.protocol.p2p.SignalingTakeControl.decode(e,e.uint32());break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("type"))throw oP.ProtocolError("missing required 'type'",{instance:r});return r},r.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/system73.protocol.p2p.Message"},(n=Object.create(t={}))[t[1]="PING"]=1,n[t[2]="PONG"]=2,n[t[3]="CONTENT_REQUEST"]=3,n[t[4]="CONTENT_RESPONSE_START"]=4,n[t[5]="CONTENT_RESPONSE_PROGRESS"]=5,n[t[6]="CONTENT_RESPONSE_END"]=6,n[t[7]="CONTENT_ABORTED"]=7,n[t[10]="STILL_ALIVE_REQUEST"]=10,n[t[11]="STILL_ALIVE_RESPONSE"]=11,n[t[12]="METRICS"]=12,n[t[13]="LOOP_CHECK"]=13,n[t[14]="SIGNALING_SDP"]=14,n[t[15]="SIGNALING_CANDIDATE"]=15,n[t[16]="SIGNALING_QUIC"]=16,n[t[17]="SIGNALING_TAKE_CONTROL"]=17,r.Type=n,r}(),e),n.protocol=t,n}()).protocol.p2p;function oB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oB=function(){return!!e})()}function oL(e,t,n,r){var i=l(u(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var oj=function(e){function t(){var e,n,i;return r(this,t),e=this,i=arguments,n=u(n=t),c(e,oB()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i))}return f(t,e),s(t,[{key:"needEncoding",get:function(){return"sctp"===this.transport}},{key:"configure",value:function(e,n){oL(t,"configure",this,3)([e,n])}},{key:"_write",value:function(e,n,r){if(this.needEncoding)try{var i=t.encodeMessage(e),o=oM.Message.encode(i).finish();oL(t,"_write",this,3)([o,n,r])}catch(e){r(e)}else oL(t,"_write",this,3)([e,n,r])}},{key:"push",value:function(e){if(this.needEncoding){var n=t.decodeMessage(e);return oL(t,"push",this,3)([n])}return oL(t,"push",this,3)([e])}}],[{key:"decodeMessage",value:function(e){function t(e,t){var n=null==e?void 0:e.contentId;return eE.isNil(n)?Object.assign(Object.assign({},e),{type:t}):Object.assign(Object.assign({},e),{contentId:Number(n),type:t})}var n=oM.Message.decode(e);switch(n.type){case oM.Message.Type.CONTENT_REQUEST:return t(n.contentRequest,"content-request");case oM.Message.Type.CONTENT_RESPONSE_START:return t(n.contentResponseStart,"content-response-start");case oM.Message.Type.CONTENT_RESPONSE_PROGRESS:return t(n.contentResponseProgress,"content-response-progress");case oM.Message.Type.CONTENT_RESPONSE_END:return t(n.contentResponseEnd,"content-response-end");case oM.Message.Type.CONTENT_ABORTED:return t(n.contentAborted,"content-aborted");case oM.Message.Type.PING:return t(n.ping,"ping");case oM.Message.Type.PONG:return t(n.pong,"pong");case oM.Message.Type.STILL_ALIVE_REQUEST:return t(n.stillAliveRequest,"still-alive-request");case oM.Message.Type.STILL_ALIVE_RESPONSE:return t(n.stillAliveResponse,"still-alive-response");case oM.Message.Type.METRICS:return t(n.metrics,"metrics");case oM.Message.Type.LOOP_CHECK:return t(n.loopCheck,"loop-check");case oM.Message.Type.SIGNALING_SDP:return t(n.signalingSDP,"signaling-sdp");case oM.Message.Type.SIGNALING_CANDIDATE:return t(n.signalingCandidate,"signaling-candidate");case oM.Message.Type.SIGNALING_TAKE_CONTROL:return t(n.signalingTakeControl,"signaling-take-control");default:throw Error("Unsupported type: ".concat(e.type))}}},{key:"encodeMessage",value:function(e){function t(e){var t=null==e?void 0:e.contentId;return eE.isNil(t)?e:Object.assign(Object.assign({},e),{contentId:String(t)})}var n=new oM.Message;switch(e.type){case"content-request":n.type=oM.Message.Type.CONTENT_REQUEST,n.contentRequest=t(e);break;case"metrics":n.type=oM.Message.Type.METRICS,n.metrics=t(e);break;case"ping":n.type=oM.Message.Type.PING,n.ping=t(e);break;case"pong":n.type=oM.Message.Type.PONG,n.pong=t(e);break;case"still-alive-response":n.type=oM.Message.Type.STILL_ALIVE_RESPONSE,n.stillAliveResponse=t(e);break;case"still-alive-request":n.type=oM.Message.Type.STILL_ALIVE_REQUEST,n.stillAliveRequest=t(e);break;case"content-aborted":n.type=oM.Message.Type.CONTENT_ABORTED,n.contentAborted=t(e);break;case"content-response-start":n.type=oM.Message.Type.CONTENT_RESPONSE_START,n.contentResponseStart=t(e);break;case"content-response-progress":n.type=oM.Message.Type.CONTENT_RESPONSE_PROGRESS,n.contentResponseProgress=t(e);break;case"content-response-end":n.type=oM.Message.Type.CONTENT_RESPONSE_END,n.contentResponseEnd=t(e);break;case"loop-check":n.type=oM.Message.Type.LOOP_CHECK,n.loopCheck=t(e);break;case"signaling-sdp":n.type=oM.Message.Type.SIGNALING_SDP,n.signalingSDP=t(e);break;case"signaling-candidate":n.type=oM.Message.Type.SIGNALING_CANDIDATE,n.signalingCandidate=t(e);break;case"signaling-take-control":n.type=oM.Message.Type.SIGNALING_TAKE_CONTROL,n.signalingTakeControl=t(e);break;default:throw Error("Unsupported type: ".concat(e.type))}return n}}])}(rw),oF=eU.getInstanceFactory(oj);function oU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oU=function(){return!!e})()}
1var oq=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},oH=function(e){function t(e){var n,i,o,a,s=e.identifier,l=e.direction,f=e.type;r(this,t),i=this,o=u(o=t),(n=c(i,oU()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).type=t.Type.HTTP,n.identifier=s,n.direction=l,n.type=f,n.state=t.State.CONNECTING;var h=eB(n.identifier.split(":"),2),d=h[0],p=h[1];return n.nodeId=n.isInbound?d:p,n.nodeIdShort=nW.getShortId(n.nodeId),n.connection=oF(n.context).createInstance(),n}return f(t,e),s(t,[{key:"destroy",value:function(){return oq(this,void 0,void 0,p().mark(function e(){var n,r,i,o;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isClosed){e.next=1;break}return e.abrupt("return");case 1:if(this.eventBus){e.next=2;break}return e.abrupt("return");case 2:return this.eventBus.offAll({scope:this}),this.updateState(t.State.CLOSED),e.next=3,null==(n=this.protocol)?void 0:n.dispose();case 3:this.protocol&&this.eventBus.offAll({target:this.protocol,scope:this}),null==(r=this.eventBus)||r.offAll({target:this,scope:this}),null==(i=this.protocol)||i.destroy(),null==(o=this.connection)||o.destroy(),this.protocol=null,this.connection=null,this.eventBus=null;case 4:case"end":return e.stop()}},e,this)}))}},{key:"updateState",value:function(e){var t=this.state;this.state=e,this.eventBus.emit(tt.DATA_CHANNEL_STATE_CHANGED,{target:this,dataChannel:this,oldState:t,newState:this.state})}},{key:"write",value:function(e){var t;try{this.connection.write(e)}catch(e){null==(t=this.logger)||t.warn(e.stack)}}},{key:"isInbound",get:function(){return this.direction===t.Direction.INBOUND}},{key:"isOutbound",get:function(){return this.direction===t.Direction.OUTBOUND}},{key:"isHttp",get:function(){return this.type===t.Type.HTTP}},{key:"isWebRTC",get:function(){return this.type===t.Type.WEB_RTC}},{key:"isConnected",get:function(){return this.state===t.State.CONNECTED}},{key:"isConnecting",get:function(){return this.state===t.State.CONNECTING}},{key:"isClosed",get:function(){return this.state===t.State.CLOSED}},{key:"connectionTransport",get:function(){return this.connection.transport}},{key:"connectionCount",get:function(){return this.connection.count}},{key:"writableBufferSize",get:function(){return this.connection.writableBufferSize}},{key:"cork",value:function(){var e;null==(e=this.connection)||e.cork()}},{key:"uncork",value:function(){var e;null==(e=this.connection)||e.uncork()}},{key:"getStats",value:function(){return oq(this,void 0,void 0,p().mark(function e(){var t;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null==(t=this.connection)?void 0:t.getStats());case 1:case"end":return e.stop()}},e,this)}))}}])}(ez);function oW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oW=function(){return!!e})()}!function(e){!function(e){e.INBOUND="INBOUND",e.OUTBOUND="OUTBOUND"}(e.Direction||(e.Direction={})),function(e){e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.CLOSED="CLOSED"}(e.State||(e.State={})),function(e){e.HTTP="HTTP",e.WEB_RTC="WebRTC"}(e.Type||(e.Type={})),function(e){e.LAN="LAN",e.INTRA_ASN="IntraASN",e.INTER_ASN="InterASN"}(e.PeeringType||(e.PeeringType={}))}(oH||(oH={}));var oV=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,oW()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).store=[],e}return f(t,e),s(t,[{key:"destroy",value:function(){this.store=[]}},{key:"add",value:function(e){return this.store.push(e),e}},{key:"remove",value:function(e){var t=this.store.findIndex(eE.matches({identifier:e.identifier}));if(!(t<0))return this.store.splice(t,1)[0]}},{key:"findByQuery",value:function(e){return this.store.find(eE.matches(e))}},{key:"findAllByQuery",value:function(e){return this.store.filter(eE.matches(e))}},{key:Symbol.iterator,value:function(){var e=0,t=this.store;return{next:function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0,value:null}}}}}])}(ez);oV.polyNetFactoryName="DataChannelCollection";var oG=eU.getInstanceFactory(oV);function oz(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return oK(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oK(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function oK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var oX=function(){return s(function e(t){r(this,e),this.nextId=0,this.chunks=[],this.maxChunkSize=t},[{key:"push",value:function(e){var t=this.buffer?n9.concat(this.buffer,e):n9.copy(e);this.buffer=t,this.flush()}},{key:"shift",value:function(){return this.chunks.shift()}},{key:"finish",value:function(){this.flush(),this.buffer&&(this.pushChunk(new Uint8Array(this.buffer)),this.buffer=null)}},{key:"flush",value:function(){if(this.buffer){var e,t=null,n=oz(n9.sliceEvery(this.buffer,this.maxChunkSize));try{for(n.s();!(e=n.n()).done;){var r=e.value;r.byteLength<this.maxChunkSize?t=r:this.pushChunk(new Uint8Array(r))}}catch(e){n.e(e)}finally{n.f()}this.buffer=t}}},{key:"pushChunk",value:function(e){var t=this.nextId++;this.chunks.push({id:t,data:e})}}])}(),oY=function(){return s(function e(){r(this,e),this._live=void 0},[{key:"isLive",get:function(){return void 0!==this._live?this._live:this.streamType?"LIVE"===this.streamType||"EVENT"===this.streamType:void 0},set:function(e){this._live=e}}])}();function oZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oZ=function(){return!!e})()}var o$=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,oZ()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).stream=new oY,e}return f(t,e),s(t)}(ez);o$.polyNetFactoryName="StreamInfoService";var oJ=eU.getSingletonFactory(o$),oQ=function(){return s(function e(){r(this,e)},null,[{key:"resolveStreamInfo",value:function(e,t,n){var r=oJ(e).getInstance().stream,i=r.manifest;if(!i)return null;var o=i.findLevelById(t);if(!o)return null;var a=o.findFragmentById(n);return a?{stream:r,manifest:i,level:o,fragment:a}:null}},{key:"getRelativeOriginTime",value:function(e){var t,n,r,i=null==(t=e.fragment)?void 0:t.presentationTime;return(null==(n=e.stream)?void 0:n.isLive)?(i-(Date.now()-(null==(r=e.manifest)?void 0:r.startTime)))/1e3:i/1e3}}])}();function o0(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o1(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o1(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function o1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o2=function(){return!!e})()}var o3=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,o2()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("ContentCacheService"),e.eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.cacheableStore=[],e.noCacheableStore=[],e.eventBus.on(tt.STREAM_INFO,e.handleStreamInfoEvent,{scope:e}),e.eventBus.on(tt.LOG_REQUEST_REPAIR,e.logIncompleteContents,{scope:e}),e}return f(t,e),s(t,[{key:"destroy",value:function(){this.flush(),this.eventBus.offAll({scope:this})}},{key:"flush",value:function(){this.logger.trace("Flush Content Cache - Flushing cache"),this.cacheableStore.forEach(function(e){return e.destroy()}),this.cacheableStore=[]}},{key:"createContentCache",value:function(e){var t=this.selectStore(e);if(this.findFullIdIndex(t,{representationId:e.representationId,id:e.id})>=0)throw new ek("contentId: ".concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," already cached"),ek.Codes.CONTENT_CACHE_EXISTING);t.push(e),this.trimStoreIfNecessary(),this.logger.trace("Create Content Cache - contentId: ".concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," cached with ").concat(e.isFinished?"completed":"NO completed"));var n=t.map(function(e){var t="cacheSeq".concat(e.seq),n="retries".concat(e.retries),r='"'.concat(e.representationId,'"'),i=e.isCacheable?e.id:'"'.concat(e.url,'"'),o=e.origin,a="[#".concat(e.chunksLength,"]"),s="".concat(e.unsafe?":unsafe":"");return"".concat(t,":").concat(n,":").concat(r,":").concat(i,":").concat(o,":").concat(a).concat(s)});this.logger.trace("Cache ".concat(e.isCacheable?"CACHEABLE":"NO_CACHEABLE",": [ ").concat(n.join(" , ")," ]")),this.eventBus.emit(tt.CONTENT_CACHE_CONTENT_CREATED,{target:e,contentCache:e});var r,i=[],o=o0(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a.isCacheable&&a.representationId==e.representationId){var s=oQ.resolveStreamInfo(this.context,a.representationId,a.id);if(s){var c=oQ.getRelativeOriginTime(s);i.push([c,c+s.fragment.duration/1e3])}}}}catch(e){o.e(e)}finally{o.f()}if(i.length>0){i.sort(function(e,t){return e[0]-t[0]});
1var u=i.reduce(function(e,t){if(0===e.length)e.push(t);else{var n=e[e.length-1];1.5>Math.abs(t[0]-n[1])?n[1]=t[1]:e.push(t)}return e},[]);this.lastCacheableStorePtsRanges=u}}},{key:"updateContentCache",value:function(e){var t=this.selectStore(e),n=this.findFullIdIndex(t,{representationId:e.representationId,id:e.id});if(n<0)throw new ek("contentId: ".concat(e.id," not found"),ek.Codes.CONTENT_CACHE_NOT_FOUND);t[n]=e,this.eventBus.emit(tt.CONTENT_CACHE_CONTENT_UPDATED,{target:e,contentCache:e})}},{key:"errorContentCache",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;if(e){if("p2p-closed"===n||"p2p-abort"===n)return this.logger.trace("Error content cache: contentId: ".concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," - representationId: ").concat(e.representationId,", reason: ").concat(n," - Retrying without removing content")),e.reset(),void this.eventBus.emit(tt.CONTENT_CACHE_RETRY_NEEDED,{target:e,contentCache:e});this.logger.warn("Abort Content Cache - Aborted contentId: ".concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," - representationId: ").concat(e.representationId," - errorCode: ").concat(e.errorCode)),e.error(t),this.eventBus.emit(tt.CONTENT_CACHE_CONTENT_ERROR,{target:e,contentCache:e,reason:n}),this.removeContentCache(e)}}},{key:"finishContentCache",value:function(e){var t=this.selectStore(e),n=this.findFullIdIndex(t,{representationId:e.representationId,id:e.id});if(n<0)throw new ek("contentId: ".concat(e.id," not found"),ek.Codes.CONTENT_CACHE_NOT_FOUND);if(e.isCacheable&&!e.duration&&this.logger.trace("contentId: ".concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," complete but duration ").concat(e.duration)),e.finish(),t[n]=e,this.eventBus.emit(tt.CONTENT_CACHE_CONTENT_UPDATED,{target:e,contentCache:e}),e.isCacheable)return this.logger.debug(tr.completeContentShareable(e.id,e.url,e.crc32)),this.logger.debug(tr.printCache(t.map(function(e){return e.isCacheable?"".concat(JSON.stringify({id:e.id.toString(),reprId:e.representationId})):e.url}))),void(this.settings.bfrCompletion&&this.logger.trace(tr.printCacheForDebugBfr(t)));this.logger.debug(tr.completeContentNonShareable(e.url)),e.isCacheable||this.removeContentCache(e)}},{key:"removeContentCache",value:function(e){var t=this.selectStore(e),n=this.findFullIdIndex(t,{representationId:e.representationId,id:e.id});if(n<0)throw new ek("contentId: ".concat(e.id," not found"),ek.Codes.CONTENT_CACHE_NOT_FOUND);this.logger.trace("Remove Content Cache - Removed contentId: ".concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," from cache")),t.splice(n,1),e.destroy(),this.eventBus.emit(tt.CONTENT_CACHE_CONTENT_REMOVED,{target:e,contentCache:e})}},{key:"findOneContentCacheByUrl",value:function(e){return[].concat(eL(this.cacheableStore),eL(this.noCacheableStore)).find(eE.matches({url:e}))}},{key:"findOneContentCacheById",value:function(e){return[].concat(eL(this.cacheableStore),eL(this.noCacheableStore)).find(eE.matches({id:e}))}},{key:"findOneContentCacheByFullId",value:function(e){var t=e.representationId,n=e.id;return[].concat(eL(this.cacheableStore),eL(this.noCacheableStore)).find(eE.matches({representationId:t,id:n}))}},{key:"findOneContentCacheByQuery",value:function(e){return[].concat(eL(this.cacheableStore),eL(this.noCacheableStore)).find(eE.matches(e))}},{key:"findAllContentCache",value:function(){return[].concat(eL(this.cacheableStore),eL(this.noCacheableStore))}},{key:"findAllContentCacheByQuery",value:function(e){return[].concat(eL(this.cacheableStore),eL(this.noCacheableStore)).filter(eE.matches(e))}},{key:"countAllCacheable",value:function(){return this.findAllCacheable().length}},{key:"findAllCacheable",value:function(){return this.cacheableStore}},{key:"findAllCacheableByQuery",value:function(e){return this.cacheableStore.filter(eE.matches(e))}},{key:"selectStore",value:function(e){return e.isCacheable?this.cacheableStore:this.noCacheableStore}},{key:"findFullIdIndex",value:function(e,t){var n=t.representationId,r=t.id;return e.findIndex(eE.matches({representationId:n,id:r}))}},{key:"findAllPendingWebRTCContentCache",value:function(){return this.findAllContentCache().filter(function(e){return e.origin===i2.Origin.WEB_RTC&&!e.isFinished})}},{key:"computeCompletedDuration",value:function(e,t){return e.reduce(function(e,n){return n.isFinished?e+(n.duration||t||0):e},0)}},{key:"trimStoreIfNecessary",value:function(){for(var e=this.settings.defaultContentDuration,t=this.settings.liveCacheDuration,n=this.findAllContentCacheByQuery({cachePolicy:i2.Policy.CACHEABLE}),r=this.computeCompletedDuration(n,e);r>t;){var i=n.shift();i.isFinished&&(i.duration?r-=i.duration:e?r-=e:this.logger.warn("Cannot compute duration for complete contentId: ".concat(i.id," - cacheSeq: ").concat(i.seq," - retries: ").concat(i.retries))),this.removeContentCache(i)}}},{key:"handleStreamInfoEvent",value:function(e){var t,n=this,r=e.streamInfo;(null==r?void 0:r.fragment)&&"VIDEO"===(null==(t=null==r?void 0:r.level)?void 0:t.mediaType)&&(this.lastPlayerRequestRelTime=oQ.getRelativeOriginTime(r),this.updateSafeCacheRange());var i=function(e){var t,r;return n.settings.defaultContentDuration||(null==(t=null==e?void 0:e.level)?void 0:t.targetDuration)||(null==(r=null==e?void 0:e.fragment)?void 0:r.duration)}(r),o=function(e,t){if(!(null==(r=e.level)?void 0:r.targetDuration)||!(null==(i=e.level)?void 0:i.fragments))return n.settings.liveCacheDuration;var r,i,o,a=e.level.fragments;return Math.min(a.reduce(function(e,n){return e+(n.duration||t||0)},(null==(o=a[0])?void 0:o.duration)||t||0),n.settings.maxCacheDuration||nx.DEFAULT_MAX_CACHE_DURATION)}(r,i);this.settings.defaultContentDuration===i&&this.settings.liveCacheDuration===o||this.settings.setup({defaultContentDuration:i,liveCacheDuration:o})}},{key:"updateSafeCacheRange",value:function(){var e=this.lastPlayerRequestRelTime,t=this.lastCacheableStorePtsRanges;if(null!=t){var n=t.find(function(t){return e>=t[0]&&e<=t[1]}),r=this.settings.safeCacheRangePtsTolerance;r>0&&!n&&(n=t.find(function(t){return t[0]-e>r||e-t[1]<r})),n&&(this.safeCacheRange=n,this.settings.overrideCustomDimensionWithVodDvrStats&&this.settings.setup({customDimension1:n[0].toString(),customDimension2:n[1].toString(),customDimension3:e.toString()}))}}},{key:"logIncompleteContents",value:function(){var e=this.findAllCacheable().filter(function(e){return!e.isFinished});if(0!==e.length){var t=e.map(function(e){var t="cacheSeq".concat(e.seq),n="retries".concat(e.retries),r='"'.concat(e.representationId,'"'),i=e.isCacheable?e.id:'"'.concat(e.url,'"'),o=e.origin,a="[#".concat(e.chunksLength,"]");return"".concat(t,":").concat(n,":").concat(r,":").concat(i,":").concat(o,":").concat(a)});this.logger.trace("\uD83D\uDC94 Player buffer health critical: Incomplete contents: [ ".concat(t.join(" , ")," ]"))}}}])}(ez);o3.polyNetFactoryName="ContentCacheService";var o6=eU.getSingletonFactory(o3);function o8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o8=function(){return!!e})()}var o5=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,o8()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).dataChannel=e,n.eventBus=eG(n.context).getInstance(),n.logger=e0(n.context).getInstance().getLogger("HttpProtocol-Inbound-".concat(n.dataChannel.nodeIdShort)),n.contentCacheService=o6(n.context).getInstance(),n.streamingStats=rj(n.context).getInstance(),n.requests=new Map,n}return f(t,e),s(t,[{key:"dispose",value:function(){var e=this;if(this.requests.size>0)return new Promise(function(t){e.completeDispose=t})}},{key:"destroy",value:function(){this.requests.clear(),this.eventBus.offAll({scope:this}),this.logger=null,this.eventBus=null,this.contentCacheService=null,this.dataChannel=null}},{key:"destroyIfIsDestroying",value:function(){this.completeDispose&&0===this.requests.size&&this.completeDispose()}},{key:"start",value:function(){this.eventBus.on(tt.CONTENT_CACHE_CONTENT_ERROR,this.handleContentCacheContentAbortedEvent,{scope:this})}},{key:"requestContent",value:function(e){var t=this.contentCacheService.findOneContentCacheByFullId({representationId:e.representationId,id:e.id});t||(t=this.createContentCache(e)),this.logger.trace("Content requested: contentId: ".concat(t.id," - representationId: ").concat(t.representationId," - ").concat(t.url," - cacheSeq: ").concat(t.seq," - retries: ").concat(t.retries)),t.requested=!0,e.external&&(t.external=!0),t.duration=e.duration}},{key:"handleConnectionHttpData",value:function(e){switch(e.type){case"content-response-start":this.handleConnectionHttpRequestStartedEvent(e);break;case"content-response-progress":this.handleConnectionHttpRequestProgressEvent(e);break;case"content-response-end":this.handleConnectionHttpRequestCompletedEvent(e)}}},{key:"hasRequest",value:function(e,t){return this.requests.has(this.getKey(e,t))}},{key:"handleConnectionHttpRequestStartedEvent",value:function(e){this.logger.trace("Content started: contentId: ".concat(e.id," - representationId: ").concat(e.representationId," - ").concat(e.url)),this.requests.set(this.getKey(e.id,e.representationId),Object.assign(Object.assign({},e),{generator:new oX(i2.CHUNK_SIZE)}))}},{key:"handleConnectionHttpRequestProgressEvent",value:function(e){var t=this.contentCacheService.findOneContentCacheByFullId({representationId:e.representationId,id:e.id});if(t){if(t.url=e.url,e.lengthComputable&&(t.contentLength=e.total),e.headers&&(t.headers=e.headers),e.chunk){var n=this.requests.get(this.getKey(t.id,t.representationId)).generator;n.push(e.chunk),this.setChunks(n,t)}this.contentCacheService.updateContentCache(t)}}},{key:"handleConnectionHttpRequestCompletedEvent",value:function(e){var t=this.contentCacheService.findOneContentCacheByFullId({representationId:e.representationId,id:e.id});if(t){t.responseUrl=e.responseUrl,this.logger.trace("Content completed: contentId: ".concat(t.id," - representationId: ").concat(t.representationId," - ").concat(t.url," - cacheSeq: ").concat(t.seq," - retries: ").concat(t.retries));var n=this.requests.get(this.getKey(t.id,t.representationId)).generator;e.headers&&(t.headers=e.headers),n.finish(),this.setChunks(n,t),this.contentCacheService.finishContentCache(t),this.requests.delete(this.getKey(e.id,e.representationId)),this.destroyIfIsDestroying()}}},{key:"handleConnectionHttpRequestErrorEvent",value:function(e){this.logger.warn("Content error: contentId: ".concat(e.id," - representationId: ").concat(e.representationId," - ").concat(e.url," - errorCode: ").concat(e.code));var t=this.contentCacheService.findOneContentCacheByFullId({representationId:e.representationId,id:e.id});e.code&&(t.errorCode=e.code),t.responseUrl=e.url,this.contentCacheService.errorContentCache(t,!1,"http-error"),this.requests.delete(this.getKey(e.id,e.representationId)),this.destroyIfIsDestroying()}},{key:"handleContentCacheContentAbortedEvent",value:function(e){var t=e.contentCache,n=this.requests.get(this.getKey(t.id,t.representationId));if(n){var r=n.id,i=n.url,o=n.representationId;i===t.url&&r===t.id&&o===t.representationId&&(this.logger.trace("Aborting the HTTP request for content contentId: ".concat(n.id," - representationId: ").concat(n.representationId," - ").concat(n.url)),n.request.abort(),this.requests.delete(this.getKey(t.id,t.representationId)),this.destroyIfIsDestroying())}}},{key:"createContentCache",value:function(e){e.cachePolicy||(e.cac
1hePolicy=i2.Policy.CACHEABLE);var t=new i2(e,{origin:i2.Origin.HTTP,dataChannelId:this.dataChannel.identifier,bitrate:this.streamingStats.findBitrate(e.representationId)||this.streamingStats.bitrate},this.context);return this.contentCacheService.createContentCache(t),t}},{key:"getKey",value:function(e,t){return"".concat(e,":").concat(t)}},{key:"setChunks",value:function(e,t){for(var n=e.shift();n;n=e.shift())t.setChunk(n.id,n.data)}}])}(ez);o5.polyNetFactoryName="HttpProtocol";var o4=eU.getInstanceFactory(o5);function o7(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o7=function(){return!!e})()}var o9=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=t,a=[Object.assign(Object.assign({},e),{type:oH.Type.HTTP})],o=u(o),(n=c(i,o7()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).eventBus=eG(n.context).getInstance(),n.logger=e0(n.context).getInstance().getLogger("DataChannelHttp-".concat(n.nodeIdShort)),n.protocol=o4(n.context).createInstance(n),n.connection.on("open",function(){n.handleConnectionHttpStartedEvent()}),n.connection.on("data",function(e){n.protocol.handleConnectionHttpData(e)}),n.connection.on("error",function(e){n.protocol.handleConnectionHttpRequestErrorEvent(e)}),n}return f(t,e),s(t,[{key:"peeringType",get:function(){},set:function(e){}},{key:"start",value:function(){this.logger.trace("Connecting"),this.updateState(oH.State.CONNECTING),this.connection.configure("http"),this.connection.startConnection()}},{key:"requestContent",value:function(e){e.url?(this.logger.debug(tr.requestingCDN(e.url,e.id)),this.protocol.requestContent(e),this.protocol.hasRequest(e.id,e.representationId)||this.connection.write(e)):this.eventBus.emit(tt.CONTENT_URL_MISSING,{target:this,options:e})}},{key:"handleConnectionHttpStartedEvent",value:function(){this.logger.trace("Ready"),this.updateState(oH.State.CONNECTED),this.protocol.start(),this.eventBus.emit(tt.DATA_CHANNEL_CONNECTED,{target:this,dataChannel:this})}}])}(oH),ae=eU.getInstanceFactory(o9);function at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(at=function(){return!!e})()}var an=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,at()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).logger=e0(n.context).getInstance().getLogger("DataChannelWebRTC-".concat(e.nodeIdShort,"-LoopChecker")),n.eventBus=eG(n.context).getInstance(),n.polyNet=nK(n.context).getInstance(),n.settings=nA(n.context).getInstance(),n.dataChannel=e,n.correlationId=nU(),n}return f(t,e),s(t,[{key:"destroy",value:function(){this.eventBus&&(this.eventBus.offAll({scope:this}),this.logger=null,this.eventBus=null,this.dataChannel=null,this.polyNet=null,this.correlationId=null)}},{key:"start",value:function(){this.eventBus&&(this.settings.loopCheckerTtl&&this.settings.enableInboundChecks?this.dataChannel.isInbound?(this.eventBus.on(tt.LOOP_CHECK_MESSAGE_RECEIVED,this.handleLoopCheckMessageEvent,{scope:this}),this.sendLoopCheckMessage({correlationId:this.correlationId,finalCountdown:this.settings.loopCheckerTtl,nodeId:this.polyNet.nodeId,type:"loop-check"})):this.logger.trace("Not an inbound WebRTC data channel"):this.logger.trace("Loop Check disabled"))}},{key:"handleLoopCheckMessageEvent",value:function(e){var t=e.correlationId,n=e.finalCountdown,r=e.nodeId;this.logger.trace("Received Loop Check message from nodeId: ".concat(r," with correlationId: ").concat(t," and countdown: ").concat(n)),0!==this.dataChannel.connectionCount?this.polyNet.nodeId===r?(this.logger.trace("It is from this peer (nodeId: ".concat(r,"). Check loop - expected correlationId: ").concat(this.correlationId)),this.correlationId===t&&this.eventBus.emit(tt.REQUEST_REPAIR,{reason:"A loop has been found at nodeId: ".concat(this.polyNet.nodeIdShort)})):n>0&&(this.logger.trace("Forwarding Loop Check message to nodeId: ".concat(this.dataChannel.nodeIdShort)),this.sendLoopCheckMessage({correlationId:t,finalCountdown:n-1,nodeId:r,type:"loop-check"})):this.logger.trace("Ignoring incoming Loop Check message from nodeId: ".concat(r," - Reason: Inbound connection not yet open"))}},{key:"sendLoopCheckMessage",value:function(e){this.dataChannel.write(e),this.logger.debug(tr.sentLoopC
1heck(this.dataChannel.nodeIdShort,e.nodeId))}}])}(ez);an.polyNetFactoryName="LoopChecker";var ar=eU.getInstanceFactory(an);function ai(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ai=function(){return!!e})()}var ao=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,ai()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).dataChannel=e,n.eventBus=eG(n.context).getInstance(),n.logger=e0(n.context).getInstance().getLogger("DataChannelWebRTC-".concat(n.dataChannel.nodeIdShort,"-PeerMetric")),n.contentStats=oe(n.context).getInstance(),n}return f(t,e),s(t,[{key:"start",value:function(){var e=this;this.eventBus.on(tt.METRICS_MESSAGE,function(t){return e.handleMetricsEvent(t)},{scope:this})}},{key:"destroy",value:function(){this.eventBus.offAll({scope:this})}},{key:"handleMetricsMessage",value:function(e){this.eventBus.emit(tt.COLLECT_DATA_CHANNEL_STATS,{bufferFillingRate:{bufferFillingRate:e.aggregateBufferFillingRate,nodeId:this.dataChannel.nodeId}}),this.logger.trace("Received metrics message with aggregateBufferFillingRate: ".concat(e.aggregateBufferFillingRate))}},{key:"handleMetricsEvent",value:function(e){var t=this.contentStats.bfrWebRTC;if(eE.isNil(this.lastSent)||!(1e-4>Math.abs(t-this.lastSent))){this.lastSent=t;var n={aggregateBufferFillingRate:t,type:"metrics"};this.dataChannel.write(n)}}}])}(ez);ao.polyNetFactoryName="PeerMetrics";var aa=eU.getInstanceFactory(ao),as=function(){return s(function e(){r(this,e),this.usedPorts=new Set},[{key:"generate",value:function(e,t,n){function r(e,t,n){return e.replace(s,t).replace(l,"".concat(c," ").concat(n))}function i(e){return"".concat(t," ").concat(c," ").concat(e)}var o=[],a=e.split(" "),s=Number(a[3]),c=a[4],u=Number(a[5]),l="".concat(c," ").concat(u),f=rE.decomposePriority(s),h=f.typePreference,d=f.localPreference,p=f.componentId;this.usedPorts.has(i(u))||(this.usedPorts.add(i(u)),o.push(e));for(var v=u+n,g=d-1,y=1;y<=n;++y){if(!this.usedPorts.has(i(v))){this.usedPorts.add(i(v));var m=rE.composePriority(h,g,p);o.push(r(e,m,v))}--g,--v}return o}}])}();function ac(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ac=function(){return!!e})()}var au=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,ac()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("ReconnectScheduler"),e.eventBus=eG(e.context).getInstance(),e.reconnectTimer=ok(e.context).createInstance(),e.settings=nA(e.context).getInstance(),e.polyNet=nK(e.context).getInstance(),e.retries=0,e}return f(t,e),s(t,[{key:"isTimerRunning",get:function(){return this.reconnectTimer.isRunning}},{key:"start",value:function(){this.eventBus.on(tt.WS_OPEN,this.handleWebSocketConnect,{scope:this}),this.eventBus.on(tt.WS_CLOSE,this.handleWebSocketDisconnect,{scope:this}),this.eventBus.on(tt.WS_ERROR,this.handleWebSocketDisconnect,{scope:this})}},{key:"destroy",value:function(){var e;null==(e=this.eventBus)||e.offAll({scope:this}),this.destroyTimeout(),this.eventBus=null,this.reconnectTimer=null}},{key:"createTimeout",value:function(e){var t=this;this.reconnectTimer.setTimeout("Reconnect-scheduler",e,function(){t.logger.trace("Retrying to connect"),t.eventBus.emit(tt.REQUEST_CONNECT,{target:t})})}},{key:"destroyTimeout",value:function(){var e;null==(e=this.reconnectTimer)||e.cancel()}},{key:"startScheduler",value:function(){if(!this.isTimerRunning){var e,t=1e3*this.settings.reconnectRetryRange.maxBackoffTimeout,n=1e3*Math.pow(this.settings.reconnectRetryRange.exponentialBase,this.retries);e=0===this.retries?0:Math.min(t,n)*eE.random(this.settings.reconnectRetryRange.timeoutJitterRatio,1),this.logger.debug(tr.scheduledRetryTrackerConnection(e)),this.createTimeout(e),n<=t&&this.retries++}}},{key:"stopScheduler",value:function(){this.logger.trace("Disabling ReconnectScheduler"),this.destroyTimeout(),this.retries=0}},{key:"handleWebSocketDisconnect",value:function(){this.polyNet.isInNoRecovery||this.startScheduler()}},{key:"handleWebSocketConnect",value:function(){this.stopScheduler()}}])}(ez);au.polyNetFactoryName="ReconnectScheduler";var al=eU.getInstanceFactory(au);function af(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(af=function(){return!!e})()}var ah=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,af()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("WebSocketManager"),e.eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.reconnectScheduler
1=al(e.context).createInstance(),e.handleOpenEvent=e.handleOpenEvent.bind(e),e.handleErrorEvent=e.handleErrorEvent.bind(e),e.handleCloseEvent=e.handleCloseEvent.bind(e),e.handleMessageEvent=e.handleMessageEvent.bind(e),e}return f(t,e),s(t,[{key:"start",value:function(){this.reconnectScheduler.start()}},{key:"destroy",value:function(){this.disconnect(),this.reconnectScheduler.destroy(),this.logger=null,this.eventBus=null,this.webSocket=null}},{key:"connect",value:function(e){if(!this.webSocket)try{this.logger.trace("WS ".concat(e," - Opening")),this.webSocket=new WebSocket("".concat(e,"?authorization=").concat(this.settings.apiKey.hashedKey)),this.webSocket.addEventListener("open",this.handleOpenEvent),this.webSocket.addEventListener("error",this.handleErrorEvent),this.webSocket.addEventListener("close",this.handleCloseEvent),this.webSocket.addEventListener("message",this.handleMessageEvent)}catch(e){this.closeWebSocket(9999,e.message)}}},{key:"disconnect",value:function(){this.webSocket&&(this.webSocket.removeEventListener("open",this.handleOpenEvent),this.webSocket.removeEventListener("error",this.handleErrorEvent),this.webSocket.removeEventListener("close",this.handleCloseEvent),this.webSocket.removeEventListener("message",this.handleMessageEvent),this.webSocket.readyState!==WebSocket.CONNECTING&&this.webSocket.readyState!==WebSocket.OPEN||this.webSocket.close(),this.webSocket=null)}},{key:"send",value:function(e){var t=JSON.stringify(nO(e));this.webSocket&&this.webSocket.readyState===WebSocket.OPEN?(this.logger.debug(tr.sentTrackerMessage(t)),this.webSocket.send(t)):this.logger.trace("Sending message in a closed WS: ".concat(t))}},{key:"handleOpenEvent",value:function(){this.logger.trace("WS ".concat(this.webSocket.url," - Opened")),this.eventBus.emit(tt.WS_OPEN,{target:this})}},{key:"handleErrorEvent",value:function(){e_.throw(this.logger,"WS ".concat(this.webSocket.url," - Error")),this.eventBus.emit(tt.WS_ERROR,{target:this})}},{key:"handleCloseEvent",value:function(e){this.closeWebSocket(e.code,e.reason)}},{key:"handleMessageEvent",value:function(e){var t=this.parse(e.data);eE.isNil(t)?this.logger.warn("Unable to parse message: ".concat(e.data)):(this.logger.debug(tr.receivedTrackerMessage(t)),this.eventBus.emit(tt.WS_MESSAGE,{target:this,message:t}))}},{key:"closeWebSocket",value:function(e,t){var n;switch(this.logger.trace("WS ".concat(null==(n=this.webSocket)?void 0:n.url," - Closed. Code: ").concat(e," Reason: ").concat(t)),this.disconnect(),e){case 1e3:break;case 4429:ex.throw(this.logger,"".concat(t)),this.eventBus.emit(tt.COLLECT_POLYNET_STATS,{revokedStatus:rD.RevokedStatus.MAX_USERS_PER_API_KEY});break;default:eO.throw(this.logger,"Code: ".concat(e," - Reason: ").concat(t,"."))}this.eventBus.emit(tt.WS_CLOSE,{target:this})}},{key:"parse",value:function(e){try{return nR(JSON.parse(e))}catch(e){return}}}])}(ez);ah.polyNetFactoryName="WebSocketManager";var ad=eU.getSingletonFactory(ah);function ap(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ap=function(){return!!e})()}var av=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,ap()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.polyNet=nK(e.context).getInstance(),e.stats=of(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("Signaler"),e.dataChannelService=a7(e.context).getInstance(),e.websocket=ad(e.context).getInstance(),e}return f(t,e),s(t,[{key:"startSignalingForDataChannel",value:function(e){e.isInbound&&e.isWebRTC&&this.sendHandShakeRequest(e)}},{key:"destroy",value:function(){this.eventBus.offAll({scope:this}),this.eventBus=null,this.polyNet=null,this.logger=null,this.dataChannelService=null}},{key:"getConnectionsCount",value:function(e){var t;switch(e.peeringType){case oH.PeeringType.LAN:t=this.settings.multiPeer.sctpLanCount;break;case oH.PeeringType.INTRA_ASN:t=this.settings.multiPeer.sctpIntraAsnCount;break;case oH.PeeringType.INTER_ASN:t=this.settings.multiPeer.sctpInterAsnCount}return this.logger.trace("Using connections count: ".concat(t)),t}},{key:"canUseSequentialOpening",value:function(){return this.stats.nat.type===rS.Type.SEQUENTIAL}},{key:"handleSignalingMessage",value:function(e){var n=this.dataChannelService.findByNodeId(e.from);if(n)switch(e.payload.messageType){case t.Messages.HANDSHAKE_REQUEST:this.handleHandshakeRequestMessage(n,e.payload);break;case t.Messages.HANDSHAKE_RESPONSE:this.handleHandshakeResponseMessage(n,e.payload);break;case t.Messages.KICK:this.handleKickMessage(n,e.payload);break;case t.Messages.SDP:case t.Messages.ICE_CANDIDATE:this.handleWsSignalingMessage(n,e.payload)}}},{key:"sendHandShakeRequest",value:function(e){e.useSequentialOpening=this.canUseSequentialOpening(),e.connectionsCount=this.getConnectionsCount(e),e.useTr
1ickle=this.canUseTrickleIce(),this.sendWSMessageToPeer(e.nodeId,{messageType:t.Messages.HANDSHAKE_REQUEST,representationId:this.polyNet.representationId,streamId:this.polyNet.streamId,supportedProtocols:[a$.PROTOCOL_VERSION],useSequentialOpening:e.useSequentialOpening,useTrickle:e.useTrickle,peeringType:e.peeringType,connectionsCount:e.connectionsCount})}},{key:"sendHanshakeResponseOk",value:function(e,n){e.useSequentialOpening=!!n.useSequentialOpening||this.canUseSequentialOpening(),e.useTrickle=!!n.useTrickle,e.connectionsCount=n.connectionsCount,e.peeringType=n.peeringType;var r={messageType:t.Messages.HANDSHAKE_RESPONSE,protocol:a$.PROTOCOL_VERSION,statusCode:t.StatusCodes.OK,statusMessage:"Everything OK.",useSequentialOpening:e.useSequentialOpening,useTrickle:e.useTrickle};this.sendWSMessageToPeer(e.nodeId,r)}},{key:"sendHandshakeResponseError",value:function(e,n){var r={messageType:t.Messages.HANDSHAKE_RESPONSE,statusCode:t.StatusCodes.ERROR,statusMessage:"Unsupported protocols: ".concat(n.supportedProtocols)};this.sendWSMessageToPeer(e.nodeId,r)}},{key:"handleHandshakeRequestMessage",value:function(e,t){this.logger.trace("Processing handshake request"),!(t.supportedProtocols||[]).includes(a$.PROTOCOL_VERSION)||eE.isNil(t.peeringType)||eE.isNil(t.connectionsCount)?this.sendHandshakeResponseError(e,t):this.sendHanshakeResponseOk(e,t)}},{key:"handleHandshakeResponseMessage",value:function(e,n){if(this.logger.trace("Processing handshake response"),n.statusCode!==t.StatusCodes.OK)return this.logger.error("Error during handshaking process: ".concat(n.statusMessage)),void this.dataChannelService.removeDataChannel(e);e.useSequentialOpening=!!n.useSequentialOpening||this.canUseSequentialOpening(),e.useTrickle=!!n.useTrickle,e.openMasterConnection()}},{key:"handleWsSignalingMessage",value:function(e,t){e.openMasterConnection(),e.handleWsSignalingMessage(t)}},{key:"handleKickMessage",value:function(e,t){this.logger.trace("Received kick message with reason: ".concat(t.reasonMessage,". Closing DataChannel")),this.dataChannelService.removeDataChannel(e)}},{key:"canUseTrickleIce",value:function(){return a2.isTrickleIceSupported}},{key:"sendWSMessageToPeer",value:function(e,t){this.websocket.send({from:this.polyNet.nodeId,messageType:oO.MessageType.PEER_TO_PEER,payload:t,to:e})}}])}(ez);av.polyNetFactoryName="Signaler",function(e){!function(e){e.HANDSHAKE_REQUEST="handshake-request",e.HANDSHAKE_RESPONSE="handshake-response",e.SDP="sdp",e.ICE_CANDIDATE="ice-candidate",e.KICK="kick"}(e.Messages||(e.Messages={})),function(e){e.OK="OK",e.ERROR="ERROR"}(e.StatusCodes||(e.StatusCodes={}))}(av||(av={}));var ag=eU.getInstanceFactory(av);function ay(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ay=function(){return!!e})()}var am=/[0-9a-f-]+.local/g,ab=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,ay()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).logger=e0(n.context).getInstance().getLogger("PeerSignaler-".concat(e.isInbound?"Inbound":"Outbound","-").concat(e.nodeIdShort)),n.settings=nA(n.context).getInstance(),n.stats=of(n.context).getInstance(),n.websocket=ad(n.context).getInstance(),n.polyNet=nK(n.context).getInstance(),n.dataChannel=e,n.candidateGenerator=new as,n}return f(t,e),s(t,[{key:"handleWsSignalingMessage",value:function(e){"sdp"!==e.messageType?"ice-candidate"!==e.messageType||this.dataChannel.signal({candidate:{candidate:e.candidateSdp,sdpMLineIndex:e.sdpMLineIndex,sdpMid:e.sdpMid},connectionId:e.id,type:"candidate"}):this.dataChannel.signal({type:e.sdpType,sdp:e.sdp,connectionId:e.id})}},{key:"handleSignalingMessage",value:function(e){switch(e.id&&this.dataChannel.handleRemoteMasterOpening(e.id),e.type){case"signaling-sdp":this.dataChannel.signal({type:e.sdpType,sdp:e.sdp,connectionId:e.id});break;case"signaling-candidate":this.dataChannel.signal({candidate:{candidate:e.candidateSdp,sdpMLineIndex:e.sdpMLineIndex,sdpMid:e.sdpMid},connectionId:e.id,type:"candidate"});break;case"signaling-take-control":this.logger.debug(tr.receivedTakeControl(this.dataChannel.nodeIdShort)),this.dataChannel.takeControl()}}},{key:"handleSignalingEvent",value:function(e){if("candidate"===e.type){if(""!==e.candidate){var t=rE.parseCandidate(e.candidate),n=t.type;"host"===n?this.injectForMDNS(e,t):"srflx"===n&&this.stats.nat.type===rS.Type.SEQUENTIAL?this.injectForNATTraversal(e):this.sendSignalingMessage(e)}}else this.sendSignalingMessage(e)}},{key:"sendSignalingTakeControlMessage",value:function(){this.logger.debug(tr.sentTakeControl(this.dataChannel.nodeIdShort)),this.dataChannel.write({type:"signaling-take-control"})}},{key:"injectForNATTraversal",value:function(e){var t=this,n=e.connectionId;this.candidateGenerator.generate(e.candidate,n,this.settings.natTraversal.sequentialInjectionAmount).forEach(function(n){return t.sendSignalingMessage(Object.assign(Object.assign({},e),{candidate:n}))})}},{key:"injectForMDNS",value:function(e,t){var n=e.candidate,r=t.priority;"host"===t.type&&n.match(am)&&(n=n.replace(r,1),this.sendSignalingMessage(Object.assign(Object.assign({},e),{candidate:n.replace(am,"224.0.0.251")}))),this.sendSignalingMessage(Object.assign(Object.assign({},e),{candidate:n}))}},{key:"sendSignalingMessage",value:function(e){e.connectionId<2?this.sendWebSocketSignaling(e):this.sendWebrtcSignalingMessage(e)}},{key:"sendWebrtcSignalingMessage",value:function(e){if("sctp"===this.dataChannel.connectionTransport){var t="offer"===e.type||"answer"===e.type?"signaling-sdp":"signaling-candidate";this.dataChannel.write(Object.assign(Object.assign({candidateSdp:e.candidate},e),{id:e.connectionId,sdpType:e.type,type:t}))}}},{key:"sendWebSocketSignaling",value:function(e){var t=this.dataChannel;switch(e.type){case"candidate":var n=e.candidate,r=e.sdpMid,i=e.sdpMLineIndex,o=e.connectionId;this.sendWSMessageToPeer(t.nodeId,{candidateSdp:n,messageType:av.Messages.ICE_CANDIDATE,id:o,sdpMLineIndex:i,sdpMid:r});break;case"answer":case"offer":e.sdp&&this.sendWSMessageToPeer(t.nodeId,{sdpType:e.type,id:e.connectionId,sdp:e.sdp,messageType:av.Messages.SDP})}}},{key:"sendWSMessageToPeer",value:function(e,t){this.websocket.send({from:this.polyNet.nodeId,messageType:
1oO.MessageType.PEER_TO_PEER,payload:t,to:e})}}])}(ez);ab.polyNetFactoryName="PeerSignaler";var aS=eU.getInstanceFactory(ab);function aE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aE=function(){return!!e})()}var aC=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,aE()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).eventBus=eG(n.context).getInstance(),n.settings=nA(n.context).getInstance(),n.dataChannel=e,n}return f(t,e),s(t,[{key:"start",value:function(){this.scheduleNextPing(0)}},{key:"destroy",value:function(){this.eventBus&&(this.eventBus.offAll({scope:this}),this.cancelNextPing(),this.eventBus=null,this.lastPingTime=null)}},{key:"handlePingPongMessage",value:function(e){switch(e.type){case"ping":this.sendPong();break;case"pong":this.dataChannel.isInbound&&this.handlePong()}}},{key:"sendPong",value:function(){this.dataChannel.isOutbound&&this.dataChannel.write({type:"pong"})}},{key:"handlePong",value:function(){if(this.lastPingTime){var e=performance.now()-this.lastPingTime||void 0;this.lastPingTime=null,e&&this.eventBus.emit(tt.COLLECT_NETWORK_STATS,{target:this,rtt:e});var t=this.settings.metricsPeriod/2;t&&this.scheduleNextPing(t)}}},{key:"sendPing",value:function(){this.dataChannel.isInbound&&(this.cancelNextPing(),this.dataChannel.write({type:"ping"}),this.lastPingTime=performance.now())}},{key:"scheduleNextPing",value:function(e){var t=this;this.sendNextPingTimeout||(this.sendNextPingTimeout=window.setTimeout(function(){return t.sendPing()},e))}},{key:"cancelNextPing",value:function(){clearTimeout(this.sendNextPingTimeout),this.sendNextPingTimeout=null}}])}(ez);aC.polyNetFactoryName="RTTCalculator";var aw=eU.getInstanceFactory(aC);function aT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aT=function(){return!!e})()}var ak=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,aT()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).correlationId=0,n.alive=!1,n.dataChannel=e,n.eventBus=eG(n.context).getInstance(),n.logger=e0(n.context).getInstance().getLogger("DataChannelWebRTC-".concat(n.dataChannel.nodeIdShort,"-StillAlive")),n.stillAliveTimer=ok(n.context).createInstance(),n}return f(t,e),s(t,[{key:"destroy",value:function(){this.eventBus.offAll({scope:this}),this.stillAliveTimer.cancel(),this.correlationId=0,this.logger=null,this.dataChannel=null}},{key:"start",value:function(){this.sendStillAliveRequest(),this.scheduleStillAliveTimeout()}},{key:"markAsAlive",value:function(){this.alive=!0}},{key:"handleStillAliveMessage",value:function(e){switch(e.type){case"still-alive-request":this.handleStillAliveRequest(e);break;case"still-alive-response":this.handleStillAliveResponse(e)}}},{key:"handleStillAliveRequest",value:function(e){this.logger.trace('Received Still Alive REQUEST message with correlationID: "'.concat(e.correlationId,'"')),this.sendStillAliveResponse(e.correlationId)}},{key:"handleStillAliveResponse",value:function(e){var t=e.correlationId;this.logger.trace('Received Still Alive RESPONSE message with correlationID: "'.concat(t,'"')),t===this.correlationId?this.markAsAlive():this.logger.warn("Received wrong correlationId: ".concat(t,", ignoring message"))}},{key:"checkIsAlive",value:function(){this.alive?(this.sendStillAliveRequest(),this.scheduleStillAliveTimeout()):this.triggerDataChannelTimeout(this.correlationId)}},{key:"stillAlivePeriod",get:function(){return 15e3}},{key:"scheduleStillAliveTimeout",value:function(){var e=this;this.stillAliveTimer.cancel(),this.stillAliveTimer.setTimeout("Still-Alive-Timer",this.stillAlivePeriod,function(){return e.checkIsAlive()})}},{key:"triggerDataChannelTimeout",value:function(e){this.logger.trace('Still alive response message with correlationId = "'.concat(e,'" not received. Closing data channel')),this.eventBus.emit(tt.DATA_CHANNEL_STILL_ALIVE_TIMEOUT,{target:this.dataChannel,dataChannel:this.dataChannel})}},{key:"sendStillAliveRequest",value:function(){this.logger.trace("Sending Still Alive REQUEST message with to: ".concat(this.dataChannel.isInbound?"INBOUND":"OUTBOUND",":").concat(this.dataChannel.nodeIdShort)),this.alive=!1,this.dataChannel.write({correlationId:++this.correlationId,type:"still-alive-request"})}},{key:"sendStillAliveResponse",value:function(e){this.logger.trace('Sending Still Alive RESPONSE message with correlationID: "'.concat(e,'"')),this.dataChannel.write({correlationId:e,type:"still-alive-response"})}}])}(ez);ak.polyNetFactoryName="StillAlive";var a_=eU.getInstanceFactory(ak);function aR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aR=function(){return!!e})()}var aO=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,aR()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).id=e,n.contentCacheService=o6(n.context).getInstance(),n.logger=e0(n.context).getInstance().getLogger("ContentAbortManager-".concat(e)),n.settings=nA(n.context).getInstance(),n.timers=new Map,n}return f(t,e),s(t,[{key:"destroy",value:function(){var e,n,r,i,o;(e=t,n="destroy",r=this,o=l(u(1&(i=3)?e.prototype:e),n,r),2&i&&"function"==typeof o?function(e){return o.apply(r,e)}
1:o)([]),this.timers.forEach(function(e){return clearTimeout(e)}),this.timers.clear()}},{key:"armAbortTimer",value:function(e){var t=this,n=this.getKey(e.options);if(!this.timers.has(n)){var r=e.options.duration||e.duration||1e4;if(r){var i=setTimeout(function(){t.logger.trace("Aborting slow P2P transfer from nodeId: ".concat(t.id,", contentId: ").concat(e.id," - cacheSeq: ").concat(null==e?void 0:e.seq," - retries: ").concat(e.retries,".")),t.contentCacheService.errorContentCache(e,!0,"p2p-abort")},Math.round(r*this.settings.slowParentDurationFactor));this.timers.set(n,i)}}}},{key:"delete",value:function(e){var t=this.getKey(e.options);this.timers.has(t)&&(clearTimeout(this.timers.get(t)),this.timers.delete(t))}},{key:"getKey",value:function(e){return"".concat(e.id,":").concat(e.representationId)}}])}(ez),aI=eU.getInstanceFactory(aO);function aN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aN=function(){return!!e})()}var ax=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},aA=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,aN()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).dataChannel=e,n.logger=e0(n.context).getInstance().getLogger("ContentClient-".concat(e.nodeIdShort)),n.eventBus=eG(n.context).getInstance(),n.contentCacheService=o6(n.context).getInstance(),n.settings=nA(n.context).getInstance(),n.polyNet=nK(n.context).getInstance(),n.streamingStats=rj(n.context).getInstance(),n.contentAbortManager=aI(n.context).createInstance(e.nodeIdShort),n}return f(t,e),s(t,[{key:"destroy",value:function(){var e,t=this;this.eventBus.offAll({scope:this}),this.contentAbortManager.destroy(),null==(e=this.contentCacheService)||e.findAllContentCache().filter(function(e){return e.dataChannelId===t.dataChannel.identifier&&!e.isFinished}).forEach(function(e){t.contentCacheService.errorContentCache(e,!0,"p2p-closed")}),this.contentCacheService=null}},{key:"requestContent",value:function(e){var t=this.contentCacheService.findOneContentCacheByFullId({representationId:e.representationId,id:e.id});t||(t=this.createContentCache(e)),t.requested=!0,e.external&&(t.external=!0),t.duration=e.duration;var n={contentId:e.id,duration:t.duration,type:"content-request"};this.logger.trace("Requesting contentId: ".concat(e.id," - cacheSeq: ").concat(t.seq," - retries: ").concat(t.retries," from nodeId: ").concat(this.dataChannel.nodeIdShort)),this.logger.debug(tr.sentContentRequest(this.dataChannel.nodeIdShort,n.contentId,n.duration)),this.dataChannel.write(n),this.contentAbortManager.armAbortTimer(t)}},{key:"createContentCache",value:function(e){e.cachePolicy||(e.cachePolicy=i2.Policy.CACHEABLE),e.representationId||(e.representationId=this.polyNet.representationId);var t=new i2(e,{origin:i2.Origin.WEB_RTC,dataChannelId:this.dataChannel.identifier,bitrate:this.streamingStats.findBitrate(e.representationId)||this.streamingStats.bitrate},this.context);return this.contentCacheService.createContentCache(t),t}},{key:"handleContentMessage",value:function(e){switch(e.type){case"content-response-start":case"content-response-progress":case"content-response-end":return void this.handleContentResponse(e);case"content-aborted":return void this.handleContentAborted(e)}}},{key:"handleContentResponse",value:function(e){var t=e.contentId,n=ax(e,["contentId"]),r=this.contentCacheService.findOneContentCacheByFullId({representationId:this.polyNet.representationId,id:t});this.logContentResponse(e),!r&&this.settings.pushProtocol&&(this.logger.trace("Received pushed contentId: ".concat(t," from nodeId: ").concat(this.dataChannel.nodeIdShort)),(r=this.createContentCache(Object.assign({id:t},n))).external=!0,this.contentAbortManager.armAbortTimer(r)),r?(null==r?void 0:r.isFinished)?this.logger.logOnce("".concat(t),"Received already completed content from nodeId: ".concat(this.dataChannel.nodeIdShort,", contentId: ").concat(t," - cacheSeq: ").concat(null==r?void 0:r.seq," - retries: ").concat(r.retries,"."),eW.TRACE):this.updateContentCache(r,e):this.logger.trace("Received unexpected contentId: ".concat(t," from nodeId: ").concat(this.dataChannel.nodeIdShort,". Is push enabled? = ").concat(this.settings.pushProtocol))}},{key:"logContentResponse",value:function(e){"content-response-start"===e.type&&this.logger.debug(tr.receivedContentResponseStart(this.dataChannel.nodeIdShort,e.contentId,e.contentLength,e.duration)),"content-response-end"===e.type&&this.logger.debug(tr.receivedContentResponseEnd(this.dataChannel.nodeIdShort,e.contentId,e.contentLength,e.chunksAmount,e.crc32))}},{key:"handleContentAborted",value:function(e){this.logger.debug(tr.receivedPeerMessage(this.dataChannel.nodeIdShort,JSON.stringify(e)));var t=this.contentCacheService.findOneContentCacheByFullId({representationId:this.polyNet.representationId,id:e.contentId});this.contentCacheService.errorContentCache(t,!0,"p2p-abort"),this.contentAbortManager.delete(t)}},{key:"updateContentCache",value:function(e,t){"content-response-start"===t.type&&(e.contentLength=t.contentLength,e.duration=t.duration),"content-response-progress"===t.type&&e.setChunk(t.chunkId,t.chunkData),"content-response-end"===t.type&&(e.contentLength=t.contentLength,e.expectedCrc32=t.crc32,e.expectedChunksLength!=t.chunksAmount&&this.logger.warn("Mismatched chunksAmount: ".concat(t.chunksAmount," - expected: ").concat(e.expectedChunksLength," - contentId: ").concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries,"."))),this.contentCacheService.updateContentCache(e),e.checkRemoteFinish()&&(this.logger.trace("contentId: ".concat(e.id," from nodeId: ").concat(this.dataChannel.nodeIdShort," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," - End")),this.contentCacheService.finishContentCache(e),this.contentAbortManager.delete(e))}}])}(ez),aP=eU.getInstanceFactory(aA);function aD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aD=function(){return!!e})()}var aM=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,aD()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).currentSegmentDuration=0,e.pendingMoveMessage=null,e.pendingMoveRepresentationId=null,e.logger=e0(e.context).getInstance().getLogger("MoveInstructionHandler"),e.eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.timer=ok(e.context).createInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){eE.isNil(this.eventBus)||(this.stats=of(this.context).getInstance(),this.contentCacheService=o6(this.context).getInstance(),this.eventBus.on(tt.STREAM_INFO,this.handleStreamInfo,{scope:this}),this.eventBus.on(tt.REPRESENTATION_CHANGE,this.handleRepresentationChange,{scope:this}))}},{key:"waitingForMove",get:function(){return!eE.isNil(this.pendingMoveMessage)}},{key:"destroy",value:function(){this.cleanUp(),eE.isNil(this.eventBus)||this.eventBus.offAll({scope:this}),this.logger=null,this.eventBus=null,this.settings=null,this.contentCacheService=null,this.stats=null}},{key:"handleMoveInstruction",value:function(e){var t,n,r,i,o=this;this.cleanUp(),this.pendingMoveMessage=e,this.pendingMoveRepresentationId=null!=(r=null==(n=null==(t=this.stats)?void 0:t.stream)?void 0:n.representationId)?r:null;var a=this.maxMoveDelayTimeout,s=(null==(i=this.contentCacheService)?void 0:i.findAllPendingWebRTCContentCache())||[];if(0===s.length||0===a)return this.logger.trace("No active P2P downloads or timeout 0, executing move immediately"),void this.applyPendingMove();this.logger.trace("Move instruction received but deferred due to ".concat(s.length," active P2P downloads")),this.timer.setTimeout("pendingMoveTimer",a,function(){o.logger.trace("Pending move timeout expired, forcing move"),o.applyPendingMove()}),this.startTrackingDownloads()}},{key:"maxMoveDelayTimeout",get:function(){var e=this.settings.overrideDefaultMoveDelayTimeout;return eE.isNil(e)?this.currentSegmentDuration/this.settings.teca.bfrTimesToIncrease:e}},{key:"cleanUp",value:function(){this.timer.cancel(),this.pendingMoveMessage=null,this.pendingMoveRepresentationId=null,this.stopTrackingDownloads()}},{key:"checkPendingMoveCompletion",value:function(){this.pendingMoveMessage&&0===this.contentCacheService.findAllPendingWebRTCContentCache().length&&(this.logger.trace("All pending P2P downloads finished, applying pending move"),this.applyPendingMove())}},{key:"applyPendingMove",value:function(){var e=this.pendingMoveMessage;eE.isNil(e)||(this.cleanUp(),this.eventBus.emit(tt.EXECUTE_PENDING_MOVE_INSTRUCTION,e))}},{key:"startTrackingDownloads",value:function(){this.eventBus.off(tt.CONTENT_CACHE_CONTENT_UPDATED,this.checkPendingMoveCompletion,{scope:this}),this.eventBus.off(tt.CONTENT_CACHE_CONTENT_ERROR,this.checkPendingMoveCompletion,{scope:this}),this.eventBus.off(tt.CONTENT_CACHE_CONTENT_REMOVED,this.checkPendingMoveCompletion,{scope:this}),this.eventBus.on(tt.CONTENT_CACHE_CONTENT_UPDATED,this.checkPendingMoveCompletion,{scope:this}),this.eventBus.on(tt.CONTENT_CACHE_CONTENT_ERROR,this.checkPendingMoveCompletion,{scope:this}),this.eventBus.on(tt.CONTENT_CACHE_CONTENT_REMOVED,this.checkPendingMoveCompletion,{scope:this})}},{key:"stopTrackingDownloads",value:function(){eE.isNil(this.eventBus)||(this.eventBus.off(tt.CONTENT_CACHE_CONTENT_UPDATED,this.checkPendingMoveCompletion,{scope:this}),this.eventBus.off(tt.CONTENT_CACHE_CONTENT_ERROR,this.checkPendingMoveCompletion,{scope:this}),this.eventBus.off(tt.CONTENT_CACHE_CONTENT_REMOVED,this.checkPendingMoveCompletion,{scope:this}))}},{key:"handleStreamInfo",value:function(e){if(this.settings){var t=e.streamInfo;if(t.fragment){var n=t.fragment.duration;n&&(this.currentSegmentDuration=n)}}}},{key:"handleRepresentationChange",value:function(e){var t,n;if(this.pendingMoveMessage){var r=null==(t=null==e?void 0:e.newRepresentation)?void 0:t.representationId;this.pendingMoveRepresentationId&&r&&r===this.pendingMoveRepresentationId||(this.logger.trace("Representation change: cancelling pending move (assigned for ".concat(null!=(n=this.pendingMoveRepresentationId)?n:"unknown",", now ").concat(null!=r?r:"unknown",")")),this.cleanUp())}}}])}(ez);aM.polyNetFactoryName="MoveInstructionHandler";var aB=eU.getSingletonFactory(aM);function aL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aL=function(){return!!e})()}var aj=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,aL()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("ContentRequestService"),e.eventBus=eG(e.context).getInstance(),e.polyNet=nK(e.context).getInstance(),e.contentCacheService=o6(e.context).getInstance(),e.dataChannelService=a7(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.moveInstructionHandler=aB(e.context).getInstance(),e.eventBus.on(tt.CONTENT_CACHE_RETRY_NEEDED,e.handleContentCacheRetryNeeded,{scope:e}),e.lastCachableCdnRequestTimestamp=0,e}return f(t,e),s(t,[{key:"destroy",value:function(){this.eventBus.offAll({scope:this}),this.polyNet=null,this.contentCacheService=null,this.dataChannelService=null}},{key:"getDataChannelForRequest",value:function(e){var t=this.dataChannelService.findFirstConnectedInbound();
1return(this.needHttpDataChannel(e)||eE.isNil(t))&&(t=this.dataChannelService.getHttpDataChannel()),t}},{key:"requestToDataChannel",value:function(e){var t=this.getDataChannelForRequest(e);e.retry&&this.logger.trace("Selected datachannel ".concat(t.isHttp?"CDN":"P2P"," to retry content request: contentId: ").concat(e.id," - representationId: ").concat(e.representationId," - URL: ").concat(e.url)),t.requestContent(e),t.isHttp&&e.cachePolicy===i2.Policy.CACHEABLE&&(this.needInteractionWithCDN()&&this.logger.trace("CDN datachannel forced due to necessary interaction required: contentId: ".concat(e.id," - representationId: ").concat(e.representationId," - URL: ").concat(e.url)),this.lastCachableCdnRequestTimestamp=performance.now())}},{key:"needInteractionWithCDN",value:function(){return this.settings.guaranteedCdnInteractionPeriod>0&&performance.now()-this.lastCachableCdnRequestTimestamp>=1e3*this.settings.guaranteedCdnInteractionPeriod}},{key:"needHttpDataChannel",value:function(e){var t=e.retry;return e.cachePolicy===i2.Policy.NO_CACHEABLE||this.polyNet.isInRepair||t||this.needInteractionWithCDN()||this.moveInstructionHandler.waitingForMove}},{key:"request",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.contentCacheService.findOneContentCacheByFullId({representationId:e.representationId,id:e.id});return e.cachePolicy===i2.Policy.NO_CACHEABLE&&this.logger.debug(tr.noShareableRequest(e.id,e.url)),n?(n.duration=e.duration,n.isCacheable&&(this.logger.debug(tr.requestHit(n.id,n.url)),e.external&&(n.external=!0)),n.isCacheable&&!n.isFinished&&(!n.requested||t)&&n.external?(this.logger.trace("contentId: ".concat(e.id," - cacheSeq: ").concat(n.seq," - retries: ").concat(n.retries," - duration: ").concat(n.duration," - CACHED incomplete content - Escalating to inbound")),n.retries>0&&(n.origin=this.getDataChannelForRequest(e).isHttp?i2.Origin.HTTP:i2.Origin.WEB_RTC),this.requestToDataChannel(e)):this.logger.trace("contentId: ".concat(e.id," - cacheSeq: ").concat(n.seq," - retries: ").concat(n.retries," - duration: ").concat(n.duration," - Ignored - isFinished: ").concat(n.isFinished," - isRequested: ").concat(n.requested," - isExternal: ").concat(n.external))):(e.cachePolicy===i2.Policy.CACHEABLE&&this.logger.debug(tr.requestMiss(e.id,e.url)),this.requestToDataChannel(e),n=this.contentCacheService.findOneContentCacheByFullId({representationId:e.representationId,id:e.id}),this.logger.trace("contentId: ".concat(e.id," - cacheSeq: ").concat(null==n?void 0:n.seq," - retries: ").concat(null==n?void 0:n.retries," - duration: ").concat(null==n?void 0:n.duration," - NOT CACHED - Starting anew"))),n}},{key:"handleContentCacheRetryNeeded",value:function(e){var t=e.contentCache;t&&this.retryRequest(t)}},{key:"retryRequest",value:function(e){var t=this;try{++e.retries,this.logger.trace("Retrying content request transparently #".concat(e.retries,": contentId: ").concat(e.id," - cacheSeq: ").concat(null==e?void 0:e.seq," - retries: ").concat(e.retries," - representationId: ").concat(e.representationId," - URL: ").concat(e.url)),setTimeout(function(){try{e.options.retry=!0,t.request(e.options)}catch(n){t.logger.error("Error in retry: contentId: ".concat(null==e?void 0:e.id," - cacheSeq: ").concat(null==e?void 0:e.seq," - retries: ").concat(e.retries," - representationId: ").concat(null==e?void 0:e.representationId,":").concat(n.message),n)}})}catch(t){this.logger.error("Error in retry: contentId: ".concat(null==e?void 0:e.id," - cacheSeq: ").concat(null==e?void 0:e.seq," - retries: ").concat(e.retries," - representationId: ").concat(null==e?void 0:e.representationId,":").concat(t.message),t)}}}])}(ez);aj.polyNetFactoryName="ContentRequestService";var aF=eU.getSingletonFactory(aj);function aU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aU=function(){return!!e})()}var aq=function(e){function t(e,n){var i,o,a,s,l=n.representationId,f=n.contentId,h=n.url;return r(this,t),o=this,a=u(a=t),(i=c(o,aU()?Reflect.construct(a,s||[],u(o).constructor):a.apply(o,s))).queuedChunks=0,i.logger=e0(i.context).getInstance().getLogger("ContentResponseGenerator-".concat(e.nodeIdShort)),i.eventBus=eG(i.context).getInstance(),i.contentRequestService=aF(i.context).getInstance(),i.settings=nA(i.context).getInstance(),i.dataChannel=e,i.representationId=l,i.contentId=f,i.url=h,i.nodeIdShort=e.nodeIdShort,i}return f(t,e),s(t,[{key:"start",value:function(){}},{key:"destroy",value:function(){this.stop(),this.logger=null,this.dataChannel=null,this.representationId=null,this.contentId=null,this.timeStart=null,this.timeEnd=null,this.contentResponseStartMessageCreated=null,this.sendReject=null,this.sendResolver=null}},{key:"unsubscribe",value:function(){var e;this.eventBus.offAll({scope:this}),null==(e=this.subscription)||e.unsubscribe()}},{key:"stop",value:function(){var e,n,r,i,o;(e=t,n="stop",r=this,o=l(u(1&(i=3)?e.prototype:e),n,r),2&i&&"function"==typeof o?function(e){return o.apply(r,e)}:o)([]),this.succeed()}},{key:"sendContent",value:function(){var e=this;return new Promise(function(t,n){e.sendResolver=t,e.sendReject=n,e.start(),e.contentCache=e.contentRequestService.request({representationId:e.representationId,id:e.contentId,url:e.url,responseType:"arraybuffer",external:!0,withCredentials:e.settings.withCredentials}),e.contentCache?e.contentCache.unsafe?e.fail(Error("Unsafe Content Cache requested")):e.generateMessages(e.contentCache):e.fail(Error("ContentCache not created synchronously"))})}},{key:"generateMessages",value:function(e){var t=this;this.subscription=e.asObservable.subscribe({next:function(n){t.generateContentResponseMessages(e,n
1)},error:function(n){t.abortContentResponseMessages(e,n)},complete:function(){t.sendEnd(e),t.succeed()}})}},{key:"succeed",value:function(){var e;this.unsubscribe(),null==(e=this.sendResolver)||e.call(this)}},{key:"fail",value:function(e){var t;this.unsubscribe(),null==(t=this.sendReject)||t.call(this,e)}},{key:"abortContentResponseMessages",value:function(e,t){this.sendAbortContentResponse(e),this.fail(t)}},{key:"sendAbortContentResponse",value:function(e){var t={contentId:e.id,type:"content-aborted"};this.dataChannel.write(t)}},{key:"generateContentResponseMessages",value:function(e,t){this.contentResponseStartMessageCreated||this.generateContentResponseStartMessage(e),t&&this.generateContentResponseProgressMessage(e,t)}},{key:"sendEnd",value:function(e){!this.contentResponseEndMessageCreated&&e.isFinished&&this.generateContentResponseEndMessage(e)}},{key:"generateContentResponseProgressMessage",value:function(e,t){var n,r={chunkData:t.data,chunkId:t.id,contentId:e.id,type:"content-response-progress"};++this.queuedChunks,this.queuedChunks%100==0&&this.logger.trace("".concat(this.queuedChunks," chunks sent - contentId: ").concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," - representationId: ").concat(e.representationId)),null==(n=this.dataChannel)||n.write(r)}},{key:"generateContentResponseStartMessage",value:function(e){this.contentResponseStartMessageCreated=!0,this.logger.trace("Start sending contentId: ".concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," - representationId: ").concat(e.representationId)),this.timeStart=performance.now();var t,n={chunksAmount:e.chunksLength,contentId:e.id,contentLength:e.contentLength||void 0,duration:e.duration||void 0,type:"content-response-start"};this.logger.debug(tr.sentContentResponseStart(this.dataChannel.nodeIdShort,n.contentId,n.contentLength,n.duration)),null==(t=this.dataChannel)||t.write(n)}},{key:"generateContentResponseEndMessage",value:function(e){this.contentResponseEndMessageCreated=!0;var t,n={chunksAmount:e.chunksLength,contentId:e.id,contentLength:e.contentLength,crc32:e.crc32,type:"content-response-end"};this.logger.debug(tr.sentContentResponseEnd(this.dataChannel.nodeIdShort,n.contentId,n.contentLength,n.chunksAmount,n.crc32)),null==(t=this.dataChannel)||t.write(n),this.timeEnd=performance.now(),this.logger.trace("Finished sending ".concat(this.queuedChunks," chunks contentId: ").concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," - representationId: ").concat(e.representationId," in ").concat(this.timeEnd-this.timeStart," ms"))}}])}(ez),aH=eU.getInstanceFactory(aq);function aW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aW=function(){return!!e})()}var aV=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},aG=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,aW()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).maxRequestedContentId=0,n.dataChannel=e,n.logger=e0(n.context).getInstance().getLogger("ContentServer-".concat(e.nodeIdShort)),n.eventBus=eG(n.context).getInstance(),n.contentCacheService=o6(n.context).getInstance(),n.dataChannelService=a7(n.context).getInstance(),n.settings=nA(n.context).getInstance(),n.polyNet=nK(n.context).getInstance(),n.stats=of(n.context).getInstance(),n.initContentSent(),n}return f(t,e),s(t,[{key:"initContentSent",value:function(){this.contentSent=new Map}},{key:"start",value:function(){this.eventBus.on(tt.CONTENT_CACHE_CONTENT_CREATED,this.handleContentCacheEvent,{scope:this}),this.eventBus.on(tt.CONTENT_CACHE_CONTENT_UPDATED,this.handleContentCacheEvent,{scope:this})}},{key:"destroy",value:function(){this.contentSent.forEach(function(e){null==e||e.destroy()}),this.contentSent.clear(),this.contentSent=null,this.eventBus.offAll({scope:this})}},{key:"handleContentRequestMessage",value:function(e){return aV(this,void 0,void 0,p().mark(function t(){var n,r,i,o,a,s;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.debug(tr.receivedContentRequest(this.dataChannel.nodeIdShort,e.contentId,e.duration)),n=this.polyNet.representationId,r=e.contentId,!this.settings.kickMismatchedVodDvrChildren||"live"==this.stats.stream.streamState){t.next=2;break}if(i=oQ.resolveStreamInfo(this.context,n,r)){t.next=1;break}
1return this.dataChannelService.removeDataChannel(this.dataChannel),this.logger.debug("kicked ".concat(this.dataChannel.nodeIdShort," requested segment not in parent manifest yet")),t.abrupt("return");case 1:if(!this.contentCacheService.safeCacheRange||(o=this.contentCacheService.safeCacheRange,!((a=oQ.getRelativeOriginTime(i))<o[0]||a>o[1]))){t.next=2;break}return this.dataChannelService.removeDataChannel(this.dataChannel),this.logger.debug("kicked ".concat(this.dataChannel.nodeIdShort," requested outside of safe cache range ").concat(a," - ").concat(JSON.stringify(o))),t.abrupt("return");case 2:return(s=parseInt(r))>this.maxRequestedContentId&&(this.maxRequestedContentId=s),t.next=3,this.sendContent(n,r);case 3:this.firstRequestReceived||(this.initialPushFrom(n,r),this.firstRequestReceived=!0);case 4:case"end":return t.stop()}},t,this)}))}},{key:"sendContent",value:function(e,t,n){return aV(this,void 0,void 0,p().mark(function r(){var i,o,a,s,c,u;return p().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(s=this.getKey(e,t),this.contentSent){r.next=1;break}return this.logger.trace("Ignore send content contentId: ".concat(t," - representationId: ").concat(e," to nodeId: ").concat(this.dataChannel.nodeIdShort,", because was destroyed")),r.abrupt("return");case 1:if(!(null==(i=this.contentSent)?void 0:i.has(s))){r.next=2;break}return this.logger.trace("Ignore send content contentId: ".concat(t," - representationId: ").concat(e," to nodeId: ").concat(this.dataChannel.nodeIdShort,", because ALREADY sending")),r.abrupt("return");case 2:return c=aH(this.context).createInstance(this.dataChannel,{representationId:e,contentId:t,url:n}),this.logger.trace("Sending content contentId: ".concat(t," - representationId: ").concat(e," to nodeId: ").concat(this.dataChannel.nodeIdShort)),r.prev=3,this.contentSent.set(s,c),r.next=4,c.sendContent();case 4:null==(o=this.contentSent)||o.delete(s),this.logger.trace("Done send content contentId: ".concat(t," - representationId: ").concat(e," to nodeId: ").concat(this.dataChannel.nodeIdShort)),r.next=6;break;case 5:r.prev=5,u=r.catch(3),this.logger.trace("Failed send content contentId: ".concat(t," - representationId: ").concat(e," to nodeId: ").concat(this.dataChannel.nodeIdShort," - reason: ").concat(u)),null==(a=this.contentSent)||a.delete(s);case 6:return r.prev=6,this.logger.trace("Clearing responder for contentId: ".concat(t," - representationId: ").concat(e," to nodeId: ").concat(this.dataChannel.nodeIdShort)),null==c||c.destroy(),r.finish(6);case 7:case"end":return r.stop()}},r,this,[[3,5,6,7]])}))}},{key:"initialPushFrom",value:function(e,t){var n=this;this.settings.pushProtocol&&this.settings.initialBurstPush&&(this.logger.trace("Pushing initial burst: Contents AFTER contentId: ".concat(t," - representationId: ").concat(e," to nodeId: ").concat(this.dataChannel.nodeIdShort)),this.contentCacheService.findAllCacheable().filter(function(t){return t.representationId===e}).filter(function(e){return!e.unsafe}).filter(function(e){return Number(e.id)>Number(t)}).sort(function(e,t){return Number(e.id)-Number(t.id)}).forEach(function(r){return aV(n,void 0,void 0,p().mark(function n(){return p().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return this.logger.trace("Pushing content contentId: ".concat(t," - representationId: ").concat(e," - cacheSeq: ").concat(r.seq," - retries: ").concat(r.retries," to nodeId: ").concat(this.dataChannel.nodeIdShort)),n.next=1,this.sendContent(e,r.id);case 1:case"end":return n.stop()}},n,this)}))}))}},{key:"handleContentCacheEvent",value:function(e){return aV(this,void 0,void 0,p().mark(function t(){var n,r,i;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.contentCache).isCacheable&&this.settings.pushProtocol&&this.firstRequestReceived){t.next=1;break}return t.abrupt("return");case 1:if(!("number"==typeof n.id&&n.id<this.maxRequestedContentId)){t.next=2;break}return t.abrupt("return");case 2:if(r=this.getKey(n.representationId,n.id),i=this.contentSent.get(r),!eE.isNil(i)){t.next=4;break}return t.next=3,this.sendContent(n.representationId,n.id,n.url);case 3:t.next=5;break;case 4:n.external=!0;case 5:case"end":return t.stop()}},t,this)}))}},{key:"getKey",value:function(e,t){return"".concat(e,":").concat(t)}}])}(ez),az=eU.getInstanceFactory(aG);function aK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aK=function(){return!!e})()}var aX=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,aK()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).dataChannel=e,n.eventBus=eG(n.context).getInstance(),n.contentClient=aP(n.context).createInstance(n.dataChannel),n.contentServer=az(n.context).createInstance(n.dataChannel),n}return f(t,e),s(t,[{key:"start",value:function(){this.contentClient.start(),this.contentServer.start()}},{key:"destroy",value:function(){this.eventBus.offAll({scope:this}
1),this.contentClient.destroy(),this.contentServer.destroy(),this.contentClient=null,this.contentServer=null}},{key:"requestContent",value:function(e){this.contentClient.requestContent(e)}},{key:"handleContentMessage",value:function(e){switch(e.type){case"content-request":return void this.contentServer.handleContentRequestMessage(e);case"content-response-start":case"content-response-progress":case"content-response-end":case"content-aborted":return void this.contentClient.handleContentMessage(e)}}}])}(ez),aY=eU.getInstanceFactory(aX);function aZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aZ=function(){return!!e})()}var a$=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=u(o=t),(n=c(i,aZ()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).logger=e0(n.context).getInstance().getLogger("WebRTCProtocol-".concat(e.isInbound?"Inbound":"Outbound","-").concat(e.nodeIdShort)),n.eventBus=eG(n.context).getInstance(),n.contentManager=aY(n.context).createInstance(e),n.rttCalculator=aw(n.context).createInstance(e),n.stillAlive=a_(n.context).createInstance(e),n.metrics=aa(n.context).createInstance(e),n.signaling=aS(n.context).createInstance(e),e.isInbound&&(n.loopChecker=ar(n.context).createInstance(e)),n.dataChannel=e,n}return f(t,e),s(t,[{key:"preStart",value:function(){this.dataChannel.isInbound&&this.loopChecker&&this.loopChecker.start()}},{key:"start",value:function(){this.dataChannel.isOutbound?(this.contentManager.start(),this.stillAlive.start()):(this.rttCalculator.start(),this.metrics.start())}},{key:"dispose",value:function(){}},{key:"destroy",value:function(){var e,t,n,r,i;null==(e=this.rttCalculator)||e.destroy(),null==(t=this.stillAlive)||t.destroy(),null==(n=this.metrics)||n.destroy(),null==(r=this.loopChecker)||r.destroy(),null==(i=this.contentManager)||i.destroy(),this.dataChannel=null,this.rttCalculator=null,this.stillAlive=null,this.loopChecker=null}},{key:"requestContent",value:function(e){this.contentManager.requestContent(e)}},{key:"sendSignalingTakeControl",value:function(){this.signaling.sendSignalingTakeControlMessage()}},{key:"handleSignalingEvent",value:function(e){this.signaling.handleSignalingEvent(e)}},{key:"handleWsSignalingMessage",value:function(e){this.signaling.handleWsSignalingMessage(e)}},{key:"handleConnectionWebRTCMessageEvent",value:function(e){switch(this.stillAlive.markAsAlive(),e.type){case"signaling-sdp":case"signaling-candidate":case"signaling-take-control":return void this.signaling.handleSignalingMessage(e);case"content-request":case"content-response-start":case"content-response-progress":case"content-response-end":case"content-aborted":return void this.contentManager.handleContentMessage(e);case"ping":case"pong":this.rttCalculator.handlePingPongMessage(e);break;case"still-alive-request":case"still-alive-response":this.stillAlive.handleStillAliveMessage(e);break;case"metrics":this.metrics.handleMetricsMessage(e);break;case"loop-check":this.handleLoopCheckMessage(e)}}},{key:"handleLoopCheckMessage",value:function(e){this.logger.debug(tr.receivedLoopCheck(this.dataChannel.nodeIdShort,e.nodeId)),this.dataChannel.isInbound?this.logger.trace("Ignoring LoopCheck coming from INBOUND nodeId: ".concat(this.dataChannel.nodeIdShort)):this.eventBus.emit(tt.LOOP_CHECK_MESSAGE_RECEIVED,{correlationId:e.correlationId,finalCountdown:e.finalCountdown,nodeId:e.nodeId})}}])}(ez);a$.polyNetFactoryName="WebRTCProtocol",a$.PROTOCOL_VERSION=7;var aJ=eU.getInstanceFactory(a$);function aQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aQ=function(){return!!e})()}function a0(e,t,n,r){var i=l(u(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var a1=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},a2=function(e){function t(e){var n,i,o,a;return r(this,t),i=this,o=t,a=[Object.assign(Object.assign({},e),{type:oH.Type.WEB_RTC}
1)],o=u(o),(n=c(i,aQ()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).useSequentialOpening=!1,n.useTrickle=!0,n.nextConnectionId=0,n.masterInitialized=!1,n.signalingConnectionId=void 0,n.settings=nA(n.context).getInstance(),n.eventBus=eG(n.context).getInstance(),n.logger=e0(n.context).getInstance().getLogger("DataChannelWebRTC-".concat(n.nodeIdShort)),n.connectedPeers=new Set,n._isReady=!1,n.protocol=aJ(n.context).createInstance(n),n.connection.on("open",function(e){var t=e.connectionId;n.connectedPeers.add(t),n.logger.debug(tr.dataChannelPeerOpen(t,n.nodeIdShort)),n.isInbound&&n.handleMasterOpening(t),n.didTakeControl&&n.useSequentialOpening&&t>1&&n.startConnectionSequential(t+1),n.checkReady()}),n.connection.on("signal",function(e){n.protocol.handleSignalingEvent(e)}),n.connection.on("data",function(e){n.protocol.handleConnectionWebRTCMessageEvent(e)}),n.connection.on("close",function(e){var t=e.connectionId;n.connectedPeers.has(t)?(n.logger.trace("Connection WebRTC closed for nodeId: ".concat(n.identifier)),n.eventBus.emit(tt.CONNECTION_WEB_RTC_CLOSED,{target:n,dataChannel:n})):t<2&&n.logger.trace("Signaling connectionId: ".concat(t," closed for nodeId: ").concat(n.identifier))}),n.connection.on("error",function(e){n.logger.warn("Connection WebRTC failed for nodeId: ".concat(n.identifier," - reason: ").concat(e.message))}),n.connection.on("sctp_debug_event",function(e){var t="".concat(e.type);for(var r in delete e.type,e)t+=" - ".concat(r,": ").concat(e[r]);n.logger.trace("nodeId: ".concat(n.nodeIdShort," - ").concat(t))}),n.scheduleTimerForDataChannelCreation(),n}return f(t,e),s(t,[{key:"handleRemoteMasterOpening",value:function(e){!eE.isNil(this.signalingConnectionId)||this.isInbound||e<2||(this.signalingConnectionId=0,this.logger.debug(tr.openAdditionalConnections("Inbound")))}},{key:"handleMasterOpening",value:function(e){!eE.isNil(this.signalingConnectionId)||e>1||(this.protocol.preStart(),this.signalingConnectionId=e,0===e?(this.logger.debug(tr.openAdditionalConnections("Inbound")),this.openMultiPeerConnections()):1===e&&(this.logger.debug(tr.openAdditionalConnections("Outbound")),this.protocol.sendSignalingTakeControl()))}},{key:"didTakeControl",get:function(){return this.isInbound&&0===this.signalingConnectionId||this.isOutbound&&1===this.signalingConnectionId}},{key:"minConnectedPeersCount",get:function(){return Math.ceil(this.connectionsCount*this.settings.multiPeer.minPercentReady)||1}},{key:"connectedPeersCount",get:function(){return this.connectedPeers.size}},{key:"peeringType",get:function(){return this._peeringType},set:function(e){switch(e){case oH.PeeringType.LAN:case oH.PeeringType.INTRA_ASN:case oH.PeeringType.INTER_ASN:this._peeringType=e;break;default:this._peeringType=oH.PeeringType.INTER_ASN}}},{key:"handleWsSignalingMessage",value:function(e){this.protocol.handleWsSignalingMessage(e)}},{key:"takeControl",value:function(){this.signalingConnectionId=1,this.logger.debug(tr.openAdditionalConnections("Outbound")),this.openMultiPeerConnections()}},{key:"signal",value:function(e){this.startConnection(!1,e.connectionId),this.connection.signal(e)}},{key:"start",value:function(){this.updateState(oH.State.CONNECTING)}},{key:"updateState",value:function(e){this.logger.debug(tr.dataChannelState(this.connection.transport,e,this.nodeIdShort)),a0(t,"updateState",this,3)([e])}},{key:"destroy",value:function(){var e=this,n=Object.create(null,{destroy:{get:function(){return a0(t,"destroy",e,1)}}});return a1(this,void 0,void 0,p().mark(function e(){return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.connection.removeAllListeners(),this.cancelTimerForDataChannelCreation(),e.next=1,n.destroy.call(this);case 1:case"end":return e.stop()}},e,this)}))}},{key:"checkReady",value:function(){this.connectedPeersCount<this.minConnectedPeersCount||this._isReady||(this._isReady=!0,this.logger.debug(tr.dataChannelIsReady(this.nodeIdShort)),this.handleConnectionWebRTCChannelOpenEvent())}},{key:"startConnection",value:function(e,t){var n,r;null==(n=this.connection)||n.configure("sctp",{ordered:!0,rtcConfiguration:{iceServers:this.settings.apiKey.stunServerUrl.map(function(e){return{urls:e}})},trickle:this.useTrickle,count:this.connectionsCount}),null==(r=this.connection)||r.startConnection(e,t)}},{key:"startConnectionConcurrent",value:function(e){for(var t=e;t<this.connectionsCount;t++)this.startConnection(!0,t)}},{key:"startConnectionSequential",value:function(e){var t=this;!(this.nextConnectionId>=this.connectionsCount||e!==this.nextConnectionId||e<2)&&(!function(e){0!==t.settings.multiPeer.singleConnectionTimeout&&window.setTimeout(function(){t.isClosed||t.connectedPeers.has(e)||(t.logger.trace("Timeout of WebRTC nodeId: ".concat(t.identifier," connectionId: ").concat(e," ")),t.startConnectionSequential(e+1))},t.settings.multiPeer.singleConnectionTimeout)}(e),this.startConnection(!0,e),this.nextConnectionId++)}},{key:"openMasterConnection",value:function(){if(!this.masterInitialized){this.masterInitialized=!0;var e=+!this.isInbound;this.startConnection(!0,e)}}},{key:"openMultiPeerConnections",value:function(){this.logger.debug(tr.multiPeerOpeningType(this.useSequentialOpening)),this.useSequentialOpening?(this.nextConnectionId=2,this.startConnectionSequential(2)):this.startConnectionConcurrent(2)}},{key:"scheduleTimerForDataChannelCreation",value:function(){var e,t=this,n=null==(e=this.settings)?void 0:e.timeoutP2PConnection;eE.isNil(n)||n<=0||this.creationTimeout||(this.logger.trace("Scheduling Timeout for WebRTC data channel nodeId: ".concat(this.nodeIdShort)),this.creationTimeout=window.setTimeout(function(){t.logger.trace("Triggered Timeout WebRTC data channel nodeId: ".concat(t.no
1deIdShort," -> Reporting")),t.cancelTimerForDataChannelCreation(),t.eventBus.emit(tt.DATA_CHANNEL_CONNECTING_TIMEOUT,{target:t,dataChannel:t})},n))}},{key:"cancelTimerForDataChannelCreation",value:function(){this.creationTimeout&&(this.logger.trace("Canceling Timeout for WebRTC data channel nodeId: ".concat(this.nodeIdShort)),window.clearTimeout(this.creationTimeout),this.creationTimeout=null)}},{key:"requestContent",value:function(e){this.protocol.requestContent(e)}},{key:"handleConnectionWebRTCChannelOpenEvent",value:function(){this.cancelTimerForDataChannelCreation(),this.updateState(oH.State.CONNECTED),this.protocol.start(),this.eventBus.emit(tt.DATA_CHANNEL_CONNECTED,{target:this,dataChannel:this})}}],[{key:"isTrickleIceSupported",get:function(){return rw.isTrickleIceSupported}}])}(oH);a2.polyNetFactoryName="DataChannelWebRTC",a2.SUPPORTED_PROTOCOLS_VERSION=[a$.PROTOCOL_VERSION];var a3=eU.getInstanceFactory(a2);function a6(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a8(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a8(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function a8(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a5=function(){return!!e})()}var a4=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,a5()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("DataChannelService"),e.eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.store=oG(e.context).createInstance(),e.createFallback(),e}return f(t,e),s(t,[{key:"destroy",value:function(){var e,t=a6(this.store);try{for(t.s();!(e=t.n()).done;)e.value.destroy()}catch(e){t.e(e)}finally{t.f()}this.store.destroy()}},{key:"getHttpDataChannel",value:function(){return this.fallbackDataChannel}},{key:"isCollector",value:function(){return!this.findOneByQuery({direction:oH.Direction.INBOUND,type:oH.Type.WEB_RTC})}},{key:"hasConnectedWebRTCInbounds",value:function(){return this.findAllByQuery({direction:oH.Direction.INBOUND,type:oH.Type.WEB_RTC,state:oH.State.CONNECTED}).length>0}},{key:"hasOutbounds",value:function(){return this.findAllOutbound().length>0}},{key:"createDataChannel",value:function(e){return this.store.add(e),this.eventBus.emit(tt.DATA_CHANNEL_CREATED,{target:e,dataChannel:e}),e}},{key:"removeDataChannel",value:function(e){var t=this.store.remove(e);if(t)return this.logger.trace("Remove DataChannel - Removing datachannel nodeId: ".concat(e.nodeIdShort)),e.destroy(),this.eventBus.emit(tt.DATA_CHANNEL_REMOVED,{target:e,dataChannel:e}),t;this.logger.trace("Remove DataChannel - DataChannel nodeId: ".concat(e.nodeIdShort," not found"))}},{key:"findAllByDirection",value:function(e){return this.findAllByQuery({direction:e})}},{key:"findAllInbound",value:function(){return this.findAllByDirection(oH.Direction.INBOUND)}},{key:"findAllOutbound",value:function(){return this.findAllByDirection(oH.Direction.OUTBOUND).filter(function(e){return e.isConnecting||e.isConnected})}},{key:"findAllConnectingOutbounds",value:function(){return this.findAllByQuery({direction:oH.Direction.OUTBOUND,state:oH.State.CONNECTING})}},{key:"findByNodeId",value:function(e){return this.store.findByQuery({nodeId:e})}},{key:"findByIdentifier",value:function(e){return this.store.findByQuery({identifier:e})}},{key:"findByReverseIdentifier",value:function(e){if(e)return e=e.split(":").reverse().join(":"),this.findByIdentifier(e)}},{key:"findFirstInbound",value:function(){return this.findAllInbound()[0]}},{key:"findFirstInboundWebRTC",value:function(){return this.findAllByQuery({direction:oH.Direction.INBOUND,type:oH.Type.WEB_RTC})[0]}},{key:"findFirstConnectedInbound",value:function(){return this.store.findAllByQuery({direction:oH.Direction.INBOUND,state:oH.State.CONNECTED})[0]}},{key:"findFirstConnectedInboundWebRTC",value:function(){return this.findAllByQuery({direction:oH.Direction.INBOUND,type:oH.Type.WEB_RTC,state:oH.State.CONNECTED})[0]}},{key:"findOneByQuery",value:function(e){return this.store.findByQuery(e)}},{key:"findAllByQuery",value:function(e){return this.store.findAllByQuery(e)}},{key:"countAllOutbounds",value:function(){return this.findAllOutbound().length}},{key:"countAllConnectingOutbounds",value:function(){return this.findAllConnectingOutbounds().length}},{key:"createDataChannelWebRTC",value:function(e,t){var n=this,r=function(e){(e.event!==tt.DATA_CHANNEL_CONNECTING_TIMEOUT||n.settings.enableTimeoutP2PConnection)&&n.removeDataChannel
1(i)},i=a3(this.context).createInstance({identifier:e,direction:t});return this.createDataChannel(i),this.eventBus.on(tt.CONNECTION_WEB_RTC_CLOSED,r,{scope:this,target:i}),this.eventBus.on(tt.DATA_CHANNEL_CONNECTING_TIMEOUT,r,{scope:this,target:i}),this.eventBus.on(tt.DATA_CHANNEL_STILL_ALIVE_TIMEOUT,r,{scope:this,target:i}),i.start(),i}},{key:"createFallback",value:function(){var e={direction:oH.Direction.INBOUND,identifier:"HTTP"};this.fallbackDataChannel=ae(this.context).createInstance(e),this.fallbackDataChannel.start()}}])}(ez);a4.polyNetFactoryName="DataChannelService";var a7=eU.getSingletonFactory(a4);function a9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a9=function(){return!!e})()}var se=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,a9()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("BufferHealthChecker"),e.eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.dataChannelService=a7(e.context).getInstance(),e.polyNet=nK(e.context).getInstance(),e.stats=of(e.context).getInstance(),e.bufferHealthTimer=ok(e.context).createInstance(),e.eventBus.on(tt.SETTINGS_CHANGED,e.handleSettingsChanged,{scope:e}),e.eventBus.on(tt.STREAM_INFO,e.handleStreamInfo,{scope:e}),e}return f(t,e),s(t,[{key:"start",value:function(){this.scheduleTimerForBufferHealth()}},{key:"destroy",value:function(){this.eventBus&&(this.eventBus.offAll({scope:this}),this.bufferHealthTimer.cancel(),this.logger=null,this.eventBus=null,this.settings=null,this.dataChannelService=null,this.stats=null,this.bufferHealthTimer=null)}},{key:"scheduleTimerForBufferHealth",value:function(){var e,t=this;if(this.bufferHealthTimer){this.bufferHealthTimer.isRunning&&this.bufferHealthTimer.cancel();var n=null==(e=this.settings)?void 0:e.bufferHealthPeriod;!eE.isFinite(n)||n<=0||(this.logger.debug(tr.bufferHealthEnabled()),this.bufferHealthTimer.setInterval("BufferHealthChecker",n,function(){return t.checkBufferHealth()},!0))}}},{key:"checkBufferHealth",value:function(){var e,t,n,r=null==(e=this.stats)?void 0:e.playback.bufferHealth,i=null==(t=this.settings)?void 0:t.bufferHealthThreshold,o=null==(n=this.settings)?void 0:n.bufferHealthDelta;return[r,i,o].every(eE.isFinite)?this.polyNet.isInRepair&&r>=i+o?(this.polyNet.updateMode(nz.Modes.DEFAULT),void this.logger.debug(tr.bufferHealthStable(r,i,o))):!this.polyNet.isInRepair&&r<i?(this.polyNet.updateMode(nz.Modes.REPAIRING),void this.goCritical(r,i,o)):void 0:(this.logger.warn("The buffer health value has not been set, setting repair"),void this.polyNet.updateMode(nz.Modes.REPAIRING))}},{key:"goCritical",value:function(e,t,n){var r=this.dataChannelService.findFirstConnectedInboundWebRTC();r?(this.logger.debug(tr.bufferHealthCriticalP2P(e,t,n)),this.requestRepair(t,e,r)):this.logger.logWhenChange("bufferHealthCritical",tr.bufferHealthCriticalCDN(e,t,n))}},{key:"requestRepair",value:function(e,t,n){this.eventBus.emit(tt.LOG_REQUEST_REPAIR,{target:this}),this.eventBus.emit(tt.REQUEST_REPAIR,{bufferHealth:t,bufferHealthThreshold:e,dataChannel:n,reason:"Low buffer health: ".concat(t.toFixed(4)," / ").concat(e.toFixed(4)),target:this})}},{key:"handleSettingsChanged",value:function(e){var t;void 0!==(null!=(t=null==e?void 0:e.diffSettings)?t:{}).bufferHealthPeriod&&this.scheduleTimerForBufferHealth()}},{key:"handleStreamInfo",value:function(e){if(this.settings){var t=e.streamInfo;if(t.fragment){var n=t.fragment.duration;if(n){var r=Math.round(this.settings.nextSegmentDurationFactor*n),i=Math.round(this.settings.bufferHealthThresholdRatio*r);this.settings.bufferHealthThreshold===r&&this.settings.bufferHealthDelta===i||(this.logger.logWhenChange("newBufferThreshold",tr.newBufferThreshold(r,i,n)),this.settings.setup({bufferHealthDelta:i,bufferHealthThreshold:r}))}}}}}])}(ez);se.polyNetFactoryName="BufferHealthChecker";var st=eU.getInstanceFactory(se);function sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sn=function(){return!!e})()}var sr=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,sn()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("MessageValidator"),e.polyNet=nK(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.stats=of(e.context).getInstance(),e.dataChannelService=a7(e.context).getInstance(),e}return f(t,e),s(t,[{key:"destroy",value:function(){this.logger=null,this.polyNet=null,this.settings=null,this.stats=null,this.dataChannelService=null}},{key:"checkPeerToPeerHandshake",value:function(e){var t;return(t=this.checkSharingContent()).error||(t=this.checkStreamID(e)).error||(t=this.checkRepresentationID(e)).error||(t=this.checkMaxOutboundConnections()).error||(t=this.checkMaxConcurrentPeerNegotiations()).error,t}},{key:"isPeerToPeerMessageForCurrentNode",value:function(e){return this.polyNet.nodeId===e.to}},{key:"checkSharingContent",value:function(){var e=this.settings.sharingContent,n=this.stats.platform.connectionType;return nW.isAllowedToShare(e,n)?{error:!1}:"cellular"===n?this.createKickMessage(t.ErrorMessages.SharingContentCellular):this.createKickMessage(t.ErrorMessages.SharingContentNever)}},{key:"isPeerToPeerHandshake",value:function(e){return e.payload.messageType===av.Messages.HANDSHAKE_REQUEST}},{key:"isValidPeerToPeerMessageType",value:function(e){return!!e.payload&&Object.values(av.Messages).includes(e.payload.messageType)}},{key:"checkStreamID",value:function(e){return e.payload.streamId!==this.polyNet.streamId?this.createKickMessage(t.ErrorMessages.StreamIDNotSupported):{error:!1}}},{key:"checkRepresentationID",value:function(e){return e.payload.representationId!==this.polyNet.representationId?this.createKickMessage(t.ErrorMessages.RepresentationNotSupported):{error:!1}}},{key:"checkMaxOutboundConnections",value:function(){var e=this.settings.maxOutbound;return this.dataChannelService.countAllOutbounds()>=e?this.createKickMessage("".concat(t.ErrorMessages.MaxChildren,": ").concat(e)):{error:!1}}},{key:"checkMaxConcurrentPeerNegotiations",value:function(){var e=this.settings.maxConcurrentPeerNegotiation;return this.dataChannelService.countAllConnectingOutbounds()>=e?this.createKickMessage("".concat(t.ErrorMessages.MaxConcurrentNegotiations,": ").concat(e)):{error:!1}}},{key:"createKickMessage",value:function(e,t){return this.logger.warn("".concat(e," -> Sending KICK message")),{error:!0,message:e,messageType:av.Messages.KICK,timeout:t}}}])}(ez);sr.polyNetFactoryName="MessageValidator",function(e){!function(e){e.LoopDetected="Loop detected",e.MaxChildren="Maximum children reached",e.MaxConcurrentNegotiations="Maximum concurrent peer negotiations reached",e.RepresentationNotSupported="Representation not supported",e.SharingContentCellular="Not allowed outbound data channels on cellular network",e.SharingContentNever="Sharing content disabled by settings",e.StreamIDNotSupported="StreamId not supported"}(e.ErrorMessages||(e.ErrorMessages={}))}(sr||(sr={}));var si=eU.getInstanceFactory(sr);function so(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sa(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sa(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function sa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ss(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ss=function(){return!!e})()}var sc=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},su=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,ss()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("CapacitySensor"),e.dataChannelService=a7(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.stats=of(e.context).getInstance(),e.timer=ok(e.context).createInstance(),e.statsTimer=ok(e.context).createInstance(),e.sensingTimeoutTimer=ok(e.context).createInstance(),e.sensingOutbounds=[],e.cancellationToken=new eP,e.running=!1,e}return f(t,e),s(t,[{key:"destroy",value:function(){this.stop(),this.stats=null,this.dataChannelService=null,this.settings=null,this.timer=null,this.statsTimer=null,this.sensingOutbounds=null,this.cancellationToken=null}},{key:"stop",value:function(){this.timer&&(this.running=!1,this.timer.cancel(),this.statsTimer.cancel(),this.sensingTimeoutTimer.cancel(),this.uncorkOutbounds(),this.sensingOutbounds=[],this.cancellationToken.emit("cancel",{}),this.cancellationToken.offAll())}},{key:"isRunning",get:function(){return this.running}},{key:"getBitsToSend",value:function(e){if(!eE.isNil(this.stats.stream.bitrate))return this.stats.stream.bitrate*e*this.settings.teca.sensingIncreaseFactor*this.settings.teca.bfrTimesToIncrease*t.STATS_TIME_WINDOW/1e3}},{key:"estimateCapacity",value:function(e){var t=this;this.running=!0;var n=this.getBitsToSend(e);return eE.isNil(n)?(this.running=!1,Promise.resolve(void 0)):(this.logger.debug(tr.sensingStart(e,n)),this.sensingOutbounds=this.getOutbounds(),eE.isNil(this.sensingOutbounds)||eE.isEmpty(this.sensingOutbounds)?(this.running=!1,Promise.reject("Empty outbound list")):new Promise(function(e,r){return sc(t,void 0,void 0,p().mark(function t(){var i,o=this;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.sensingTimeoutTimer.setTimeout("SensingTimeout",this.settings.teca.sensingTimeout,function(){o.logger.warn(tr.sensingTimeout()),o.stop(),r("Sensing timeout")}),this.corkOutbounds(),this.waitForSendBuffered(n).then(function(t){var n=o.processStats(t.reports);o.sensingTimeoutTimer.cancel(),o.logger.debug(tr.sensingEnded(n)),e(n)}).catch(function(e){return o.stop(),o.logger.warn(tr.invalidSensingResult()),r(e)}).finally(function(){o.startTime=void 0,o.running=!1}),t.prev=1,t.next=2,this.waitForAccumulateBuffer(n);case 2:this.timer.cancel(),t.next=4;break;case 3:return t.prev=3,i=t.catch(1),this.stop(),this.logger.warn(tr.invalidSensingResult()),t.abrupt("return",r(i));case 4:this.startTime=(new Date).getTime(),this.logger.debug(tr.uncorkingOutbounds()),this.uncorkOutbounds();case 5:case"end":return t.stop()}},t,this,[[1,3]])}))}))}},{key:"waitForAccumulateBuffer",value:function(e){var t=this;return new Promise(function(n,r){if(eE.isEmpty(t.sensingOutbounds))return r("Unable to get buffered data");t.cancellationToken.on("cancel",function(){return t.timer.cancel(),r("Cancelled")}),t.timer.setInterval("SensingBuffer",10,function(){var i,o=8*(null==(i=t.sensingOutbounds)?void 0:i.reduce(function(e,t){return(null==t?void 0:t.writableBufferSize)+e},0));return eE.isFinite(o)?o>=e?(t.timer.cancel(),n()):void 0:(t.timer.cancel(),r("Invalid buffer size"))})})}},{key:"waitForSendBuffered",value:function(e){var n=this;return new Promise(function(r,i){n.cancellationToken.on("cancel",function(){return n.statsTimer.cancel(),i("Cancelled")});var o,a=[];n.statsTimer.setInterval("SensingStats",t.STATS_TIME_WINDOW,function(){return sc(n,void 0,void 0,p().mark(function n(){var s,c,u,l,f,h,d,v,g
1=this;return p().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=1,this.getProcessedStats();case 1:c=n.sent,n.next=3;break;case 2:return n.prev=2,n.catch(0),null==(s=this.statsTimer)||s.cancel(),n.abrupt("return",i("Unable to get WebRTC stats"));case 3:if(!eE.isNil(c)){n.next=4;break}return n.abrupt("return");case 4:if(!eE.isNil(o)){n.next=5;break}return o=c,n.abrupt("return");case 5:if(!(u=t.diffStats(c,o)).some(function(e){return e.bitsSentDelta<0||!eE.isFinite(e.bitsSentDelta)})){n.next=6;break}return this.logger.warn(tr.overflowBytesSent()),this.statsTimer.cancel(),n.abrupt("return",i("Overflow in bytes send value"));case 6:o=c,u=u.filter(function(e){return!eE.isNil(g.startTime)&&e.timestamp>=g.startTime}),l=a.reduce(function(e,t){return e+t.bitsSentDelta},0),f=so(u),n.prev=7,f.s();case 8:if((h=f.n()).done){n.next=10;break}if(d=h.value,l+=d.bitsSentDelta,a.push(d),!(l>=e)){n.next=9;break}return this.statsTimer.cancel(),n.abrupt("return",r({bitsSent:l,startTime:this.startTime,reports:a}));case 9:n.next=8;break;case 10:n.next=12;break;case 11:n.prev=11,v=n.catch(7),f.e(v);case 12:return n.prev=12,f.f(),n.finish(12);case 13:case"end":return n.stop()}},n,this,[[0,2],[7,11,12,13]])}))},!0)})}},{key:"processStats",value:function(e){var n,r=new Map,i=so(e);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=Math.floor(o.timestamp/t.STATS_TIME_WINDOW)*t.STATS_TIME_WINDOW;eE.isNil(r.get(a))&&r.set(a,0),r.set(a,r.get(a)+o.bitsSentDelta)}}catch(e){i.e(e)}finally{i.f()}var s,c,u=Array.from(r.entries()).map(function(e){return{timestamp:e[0],bitsSent:e[1]}});u=eE.sortBy(u,"timestamp");var l,f=0,h=this.getNumberOfPeerConnections(),d=so(u);try{for(d.s();!(l=d.n()).done;){var p=l.value;p.bitsSent/h>=t.MIN_BITS_SENT_THRESHOLD&&(f+=p.bitsSent,eE.isNil(s)&&(s=p.timestamp),c=p.timestamp)}}catch(e){d.e(e)}finally{d.f()}if(s-=t.STATS_TIME_WINDOW,!eE.isNil(c)&&!eE.isNil(this.stats.stream.bitrate))return f/((c-s)/1e3)/this.stats.stream.bitrate;this.logger.warn(tr.invalidSensingResult())}},{key:"getProcessedStats",value:function(){return sc(this,void 0,void 0,p().mark(function e(){var t,n=this;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Promise.all(this.sensingOutbounds.map(function(e){return sc(n,void 0,void 0,p().mark(function t(){var n;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.getStats();case 1:if(n=t.sent){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",n.map(function(t){return{bytesSent:t.stats.bytesSent,connectionId:t.connectionId,nodeId:e.nodeId,timestamp:t.stats.timestamp}}));case 3:case"end":return t.stop()}},t)}))}));case 1:return t=(t=e.sent).filter(function(e){return!eE.isNil(e)}),e.abrupt("return",eE.flatten(t));case 2:case"end":return e.stop()}},e,this)}))}},{key:"corkOutbounds",value:function(){this.sensingOutbounds.forEach(function(e){return null==e?void 0:e.cork()})}},{key:"uncorkOutbounds",value:function(){this.sensingOutbounds.forEach(function(e){return null==e?void 0:e.uncork()})}},{key:"getNumberOfPeerConnections",value:function(){return this.sensingOutbounds.reduce(function(e,t){return e+((null==t?void 0:t.connectionCount)||0)},0)}},{key:"getOutbounds",value:function(){return eL(this.dataChannelService.findAllOutbound())}}],[{key:"diffStats",value:function(e,t){return eE.zip(e,t).map(function(e){var t=eB(e,2),n=t[0],r=t[1];return{bitsSentDelta:8*(n.bytesSent-r.bytesSent),connectionId:n.connectionId,diff:n.timestamp-r.timestamp,nodeId:n.nodeId,timestamp:n.timestamp}})}}])}(ez);su.polyNetFactoryName="CapacitySensor",su.STATS_TIME_WINDOW=50,su.MIN_BITS_SENT_THRESHOLD=3125;var sl=eU.getInstanceFactory(su);function sf(e){return e.filter(function(t,n){return t!==e[n-1]})}function sh(e){var t=eE.mean(e);return eE.isFinite(t)?t:void 0}function sd(e){var t=eE.sortBy(e);if(0!==t.length){var n=t.length/2;return t.length%2==0?(t[n]+t[n-1])/2:t[Math.floor(n)]}}var sp=function(){return s(function e(t){r(this,e),this._array=[],this.maxUniqueValues=t},[{key:"asArray",get:function(){return this._array}},{key:"uniqueBfrs",get:function(){return sf(this.asArray)}},{key:"length",get:function(){return this._array.length}},{key:"uniqueCount",get:function(){return new Set(this._array).size}},{key:"average",get:function(){return sh(sf(this.asArray))}},{key:"median",get:function(){return sd(sf(this.asArray))}},{key:"averageByNodeId",value:function(e){return this.average}},{key:"medianByNodeId",value:function(e){return this.median}},{key:"clear",value:function(){this._array.splice(0)}},{key:"filter",value:function(e){return this._array.filter(e)}},{key:"push",value:function(){var e;return(e=this._array).push.apply(e,arguments),this.uniqueValuesSieve(),this._array.length}},{key:"uniqueValuesSieve",value:function(){for(;this.uniqueCount>this.maxUniqueValues&&this._array.length>0;)this._array.shift()}},{key:Symbol.iterator,value:p().mark(function e(){return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this._array,"t0",1);case 1:case"end":return e.stop()}},e,this)})}])}(),sv=function(){return s(function e(t){r(this,e),this._array=[],this.maxUniqueValues=t},[{key:"asArray",get:function(){return this._array}},{key:"uniqueBfrs",get:function(){return sf(this.bfrs)}},{key:"length",get:function(){return this._array.length}},{key:"bfrs",get:function(){return this._array.map(function(e){return Array.from(e.values()).reduce(function(e,t){return e+t},0)})}},{key:"bfrsFromNodeId",value:function(e){return this.asArray.map(function(t){return t.get(e)}).filter(function(e){return eE.isFinite(e)}
1)}},{key:"rawBfrs",get:function(){return this._array.map(function(e){return Array.from(e.entries())})}},{key:"average",get:function(){return sh(sf(this.bfrs))}},{key:"median",get:function(){return sd(sf(this.bfrs))}},{key:"averageByNodeId",value:function(e){return sh(sf(this.bfrsFromNodeId(e)))}},{key:"medianByNodeId",value:function(e){return sd(sf(this.bfrsFromNodeId(e)))}},{key:"clear",value:function(){this._array.splice(0)}},{key:"filter",value:function(e){return this._array.filter(e)}},{key:"deleteBfrsFromNodeId",value:function(e){this._array.forEach(function(t){return t.delete(e)}),this._array=this._array.filter(function(e){return e.size>0}),this.uniqueValuesSieve()}},{key:"push",value:function(e){return this._array.push(e),this.uniqueValuesSieve(),this._array.length}},{key:"uniqueValuesSieve",value:function(){for(;this.uniqueCount>this.maxUniqueValues&&this._array.length>0;)this._array.shift()}},{key:"uniqueCount",get:function(){return eE.uniqWith(this._array,eE.isEqual).length}},{key:"uniqueCountFromNodeId",value:function(e){return sf(this.bfrsFromNodeId(e)).length}}])}(),sg=function(){return s(function e(){r(this,e),this.representations=new Map},[{key:"get",value:function(e){return this.representations.get(e)}},{key:"set",value:function(e,t){var n=this.representations.get(e)||{};this.representations.set(e,eE.merge(n,t,{representationId:e}))}},{key:"filter",value:function(e){var t=[];return this.representations.forEach(function(n){e(n)&&t.push(n)}),t}}])}();function sy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sy=function(){return!!e})()}var sm=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,sy()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).settings=nA(e.context).getInstance(),e.dataChannelService=a7(e.context).getInstance(),e.historicalInboundBfrs=new sp(e.settings.teca.bfrHistoryUniqueDesiredValues),e.historicalMapOutboundBfr=new sv(e.settings.teca.bfrHistoryUniqueDesiredValues),e.historicalSensedCapacities=new sp(e.settings.teca.minimalRequiredSensedCapacities),e.representations=new sg,e}return f(t,e),s(t,[{key:"capacity",get:function(){return this._capacity},set:function(e){this._lastCapacity=this._capacity,this._capacity=e}},{key:"capacityInt",get:function(){return Math.floor(this.capacity)}},{key:"lastCapacity",get:function(){return this._lastCapacity}},{key:"capacityDidChange",get:function(){return this._lastCapacity!==this._capacity}},{key:"addInboundBfr",value:function(e){this.historicalInboundBfrs.push(e)}},{key:"addOutboundBfr",value:function(e){this.historicalMapOutboundBfr.push(e)}},{key:"addSensedCapacity",value:function(e){this.historicalSensedCapacities.push(e)}},{key:"aggregateAll",value:function(e){switch(this.settings.teca.historicalAggregationMethod){case"average":return e.average;case"median":return e.median}}},{key:"aggregateByNodeId",value:function(e,t){switch(this.settings.teca.historicalAggregationMethod){case"average":return e.averageByNodeId(t);case"median":return e.medianByNodeId(t)}}},{key:"aggregatedInboundBfr",get:function(){return this.aggregateAll(this.historicalInboundBfrs)}},{key:"aggregatedOutboundBfr",get:function(){return this.aggregateAll(this.historicalMapOutboundBfr)}},{key:"aggregatedOutboundBfrFromChild",value:function(e){return this.aggregateByNodeId(this.historicalMapOutboundBfr,e)}},{key:"countUniqueInboundBfrs",get:function(){return this.historicalInboundBfrs.uniqueCount}},{key:"countUniqueOutboundBfrs",get:function(){return this.historicalMapOutboundBfr.uniqueCount}},{key:"isInboundBfrValid",get:function(){return this.historicalInboundBfrs.uniqueCount>=this.settings.teca.bfrHistoryUniqueDesiredValues}},{key:"isOutboundBfrValid",get:function(){return this.historicalMapOutboundBfr.uniqueCount>=this.settings.teca.bfrHistoryUniqueDesiredValues}},{key:"isOutboundBfrValidFromChild",value:function(e){return this.historicalMapOutboundBfr.uniqueCountFromNodeId(e)>=this.settings.teca.bfrHistoryUniqueDesiredValues}},{key:"countInboundBfrs",get:function(){return this.historicalInboundBfrs.length}},{key:"countOutboundBfrs",get:function(){return this.historicalMapOutboundBfr.length}},{key:"allInboundBfrs",get:function(){return this.historicalInboundBfrs.asArray}},{key:"allOutboundBfrs",get:function(){return this.historicalMapOutboundBfr.asArray}},{key:"getOutboundBfrsFromChild",value:function(e){return this.historicalMapOutboundBfr.bfrsFromNodeId(e)}},{key:"countSensedCapacities",get:function(){return this.historicalSensedCapacities.length}},{key:"totalIncreaseCandidates",get:function(){var e=this;return this.historicalSensedCapacities.filter(function(t){return t>=e.settings.teca.bfrTimesToIncrease}).length}},{key:"clearInboundBfr",value:function(){this.historicalInboundBfrs.clear()}},{key:"clearOutboundBfr",value:function(){this.historicalMapOutboundBfr.clear()}},{key:"clearOutboundBfrFromChild",value:function(e){this.historicalMapOutboundBfr.deleteBfrsFromNodeId(e)}},{key:"clearSensedCapacities",value:function(){this.historicalSensedCapacities.clear()}},{key:"setLastSensingNow",value:function(){this.timeSinceLastSensing=(new Date).getTime()}},{key:"clearLastSensingTime",value:function(){this.timeSinceLastSensing=void 0}},{key:"getRepresentationInfo",value:function(e){return this.representations.get(e)}},{key:"updateRepresentationInfo",value:function(e,t){this.representations.set(e,t)}},{key:"refreshLastCapacity",value:function(){this._lastCapacity=this._capacity}},{key:"getRepresentationsLowerThan",value:function(e){return this.representations.filter(function(t){return t.bitrate<e})}},{key:"getRepresentationsHigherThan",value:function(e){return this.representations.filter(function(t){return t.bitrate>e})}},{key:"adaptCapacityToBitrate",value:function(e){return Math.floor(this.capacityInt*this.lastBitrate/e)}},{key:"mustRepresentationNotBeEligible",value:function(e){return(eE.isNil(e)||e.isEligibleToCapacityZero!==this.isEligibleToCapacityZero)&&!this.isEligibleToCapacityZero}},{key:"mustRepresentationIncreaseAttempts",value:function(e){return eE.isNil(e)||e.attemptsToExitCapacityZero!==this.attemptsToExitCapacityZero}},{key:"mayAdaptCapacityToBitrate",value:function(e){return!this.isEligibleToCapacityZero&&!e.isEligibleToCapacityZero&&this.capacityInt>1&&!eE.isNil(this.lastBitrate)}},{key:"someHigherRepresentationsNotEligible",value:function(e){return this.getRepresentationsHigherThan(e).some(function(e){return!e.isEligibleToCapacityZero})}},{key:"getMaxAttemptsOfLowerRepresentations",value:function(e){var t=this.getRepresentationsLowerThan(e).map(function(e){return e.attemptsToExitCapacityZero});return Math.max.apply(Math,[0].concat(eL(t)))}},{key:"reset",value:function(){this.currentBfr=void 0,this.attemptsToExitCapacityZero=0,this.timeSinceLastSensing=void 0,this.resetHistorical(),this.totalSensingSinceLastCapacityChange=0,this.hasChildrenExitedDueToLowBfr=!1,this.isEligibleToCapacityZero=!0,this.targetCapacity=void 0,this.resetModifiers()}},{key:"resetModifiers",value:function(){var e=+!!this.settings.teca.usePre
1cedenceModifiers;this.capacityInitialFlipModifier=e*this.settings.teca.capacityModifiers.initialFlip,this.capacityFlipModifier=e*this.settings.teca.capacityModifiers.flip,this.capacityRepresentationModifier=e*this.settings.teca.capacityModifiers.representation,this.capacitySensingModifier=e*this.settings.teca.capacityModifiers.sensing,this.capacityIncreaseModifier=e*this.settings.teca.capacityModifiers.increase,this.capacityDecreaseModifier=e*this.settings.teca.capacityModifiers.decrease,this.capacityKeepModifier=e*this.settings.teca.capacityModifiers.keep}},{key:"resetHistorical",value:function(){this.clearInboundBfr(),this.clearOutboundBfr(),this.clearSensedCapacities(),this.historicalInboundBfrs.maxUniqueValues=this.settings.teca.bfrHistoryUniqueDesiredValues,this.historicalMapOutboundBfr.maxUniqueValues=this.settings.teca.bfrHistoryUniqueDesiredValues,this.historicalSensedCapacities.maxUniqueValues=this.settings.teca.minimalRequiredSensedCapacities}},{key:"setup",value:function(){this.resetModifiers(),this.historicalInboundBfrs.maxUniqueValues=this.settings.teca.bfrHistoryUniqueDesiredValues,this.historicalMapOutboundBfr.maxUniqueValues=this.settings.teca.bfrHistoryUniqueDesiredValues,this.historicalSensedCapacities.maxUniqueValues=this.settings.teca.minimalRequiredSensedCapacities}},{key:"addExtraAttemptsToExitCapacityZero",value:function(){this.attemptsToExitCapacityZero=Math.max(-1,this.attemptsToExitCapacityZero-1)}},{key:"updateAttemptsToExitCapacityZero",value:function(){this.isEligibleToCapacityZero&&(this.attemptsToExitCapacityZero++,this.clearInboundBfr(),this.clearOutboundBfr())}},{key:"clearTotalSensing",value:function(){this.totalSensingSinceLastCapacityChange=0,this.clearSensedCapacities()}},{key:"isCollectorWithLowBfr",get:function(){return!this.dataChannelService.hasConnectedWebRTCInbounds()&&this.currentBfr<this.settings.teca.bfrTimesToDecrease}},{key:"mayGoZeroCapacity",get:function(){return this.attemptsToExitCapacityZero>=this.settings.teca.maxAttemptsToExitZeroCapacity&&this.isEligibleToCapacityZero}},{key:"mayIncreaseWithChildren",value:function(e,t){return this.areCapacitySlotsFilledFor(t)&&e>=this.settings.teca.bfrTimesToIncrease*(this.capacityInt+1)}},{key:"mayDecreaseWithChildren",value:function(e){return this.isInboundBfrValid&&this.aggregatedInboundBfr>this.settings.teca.bfrTimesToDecrease&&e<this.settings.teca.bfrTimesToDecrease*this.capacityInt}},{key:"areCapacitySlotsFilledFor",value:function(e){return e===this.capacityInt}},{key:"needCapacitySensing",value:function(e,t){var n=(new Date).getTime(),r=this.totalSensingSinceLastCapacityChange*this.settings.teca.capacityEstimationInterval,i=!this.timeSinceLastSensing||n-this.timeSinceLastSensing>Math.min(r,this.settings.teca.maxTimeWithoutSensing),o=e>this.settings.teca.bfrTimesToDecrease*this.capacityInt;return this.settings.teca.enableSensing&&i&&(o||!this.settings.teca.checkOutboundBfrBeforeSensing)&&this.capacityInt===t}},{key:"needPeriodicCapacitySensing",value:function(e){var t=(new Date).getTime(),n=this.settings.teca.periodicSensingInterval&&(!this.timeSinceLastSensing||t-this.timeSinceLastSensing>this.settings.teca.periodicSensingInterval);return this.settings.teca.enableSensing&&n&&e>0}},{key:"didChildrenExitDueToLowBfr",value:function(e){return this.isOutboundBfrValid&&this.aggregatedOutboundBfr<this.settings.teca.bfrTimesToDecrease*(e+1)}},{key:"hasChildLowBfr",value:function(e){return this.isOutboundBfrValidFromChild(e)&&this.aggregatedOutboundBfrFromChild(e)<this.settings.teca.bfrTimesToDecrease}},{key:"logReasonChildrenLostOnRepresentationChange",get:function(){var e={countInboundBfrs:this.countInboundBfrs,hasChildrenExitedDueToLowBfr:this.hasChildrenExitedDueToLowBfr,aggregatedOutboundBfr:this.aggregatedOutboundBfr,isEligibleToCapacityZero:this.isEligibleToCapacityZero};return"Representation change. State & flags: ".concat(JSON.stringify(e))}},{key:"logReasonChildrenLostOnComputeCapacity",value:function(e){var t={hasChildrenExitedDueToLowBfr:this.hasChildrenExitedDueToLowBfr,outboundCount:e};return"Compute capacity. State & flags: ".concat(JSON.stringify(t))}}])}(ez),sb=eU.getInstanceFactory(sm);function sS(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sE(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sE(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function sE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sC=function(){return!!e})()}var sw=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,sC()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("CapacityEstimator"),e.eventBus=eG(e.context).getInstance(),e.stats=of(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.timer=ok(e.context).createInstance(),e.capacitySensor=sl(e.context).createInstance(),e.state=sb(e.context).createInstance(),e.handleContentCacheCreatedEvent=e.handleContentCacheCreatedEvent.bind(e),e.invalidateCapacity(),e}return f(t,e),s(t,[{key:"isSensorRunning",get:function(){return this.capacitySensor.isRunning||this.onHoldSensor}},{key:"start",value:function(){var e=this;this.eventBus.on(tt.METRICS_MESSAGE,function(t){return e.handleMetricsMessage(t)},{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_CREATED,function(t){return e.handleDataChannelEvent(t)},{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_STATE_CHANGED,function(t){return e.handleDataChannelEvent(t)},{scope:this}),this.eventBus.on(tt.SETTINGS_CHANGED,function(t){return e.handleSettingsChangedEvent(t)},{scope:this}),this.setUpAndSchedule()}},{key:"destroy",value:function(){this.eventBus.offAll({scope:this}),this.stop(),this.capacitySensor.destroy(),this.state.destroy()}},{key:"reset",value:function(){this.stop(),this.setUpAndSchedule()}},{key:"setUpAndSchedule",value:function(){this.settings.teca.enableTeca?(this.state.reset(),this.initialCapacity(),this.logger.debug(tr.estimatorStarted(this.state.capacity)),this.schedule()):this.invalidateCapacity()}},{key:"schedule",value:function(){var e=this;this.logger.debug(tr.estimatorTimerScheduled(this.settings.teca.capacityEstimationInterval)),this.timer.setInterval("Capacity Estimation",this.settings.teca.capacityEstimationInterval,function(){return e.computeCapacity()})}},{key:"stop",value:function(){this.logger.debug(tr.estimatorTimerStopped()),this.timer.cancel(),this.cancelSensor()}},{key:"primeCapacitySensing",value:function(){this.cancelSensor(),this.state.targetCapacity=this.state.capacityInt+1,this.onHoldSensor=!0,this.eventBus.on(tt.CONTENT_CACHE_CONTENT_CREATED,this.handleContentCacheCreatedEvent,{scope:this})}},{key:"computeCapacity",value:function(){if(!eE.isNil(this.stats.stream.bitrate)&&!this.isSensorRunning){if(this.state.mayGoZeroCapacity)return this.zeroCapacity(),this.logCapacity(tr.noMoreAttempts()),void this.updateRepresentationInfo();var e=this.computeOutboundBfrAndOutboundCount(),t=e.aggregatedOutboundBfr,n=e.outboundCount,r=e.isOutboundBfrValid;if(!eE.isNil(this.state.currentBfr)){if(this.state.hasChildrenExitedDueToLowBfr){var i=this.state.logReasonChildrenLostOnComputeCapacity(n);return this.decreaseCapacity(this.state.capacityInt-1),this.logCapacity(tr.decreaseCapacityChildLost(i)),this.state.hasChildrenExitedDueToLowBfr=!1,void this.updateRepresentationInfo()}this.state.isCollectorWithLowBfr?this.logCapacity(tr.cdnLowBfr(this.state.currentBfr)):0===n||0===this.state.capacityInt?this.state.capacityInt<1?this.state.isInboundBfrValid?this.state.mayGoZeroCapacity?(this.zeroCapacity(),this.logCapacity(tr.noMoreAttempts())):(this.increaseFlipCapacity(1),this.logCapacity(tr.newAttempt())):(this.zeroCapacity(),this.logCapacity(tr.waitAttempt())):this.logCapacity(tr.cdnEnoughCapacity()):n>0&&r&&(this.state.needPeriodicCapacitySensing(n)?this.primeCapacitySensing():this.state.mayIncreaseWithChildren(t,n)?(this.increaseCapacity(this.state.capacityInt+1),this.logCapacity(tr.increaseCapacity(t))):this.state.mayDecreaseWithChildren(t)?(this.decreaseCapacity(this.state.capacityInt-1),this.logCapacity(tr.decreaseCapacity(t))):this.state.needCapacitySensing(t,n)?this.primeCapacitySensing():(this.keepCapacity(this.state.capacityInt),this.logCapacity(tr.keepCapacity(t)))),this.updateRepresentationInfo()}}}},{key:"updateRepresentationInfo",value:function(){if(!eE.isNil(this.stats.stream.bitrate)){var e=this.state.lastRepresentationId,t=this.state.lastBitrate,n=this.state.getRepresentationInfo(e);this.state.mustRepresentationNotBeEligible(n)&&this.state.getRepresentationsLowerThan(t).forEach(function(e){return e.isEligibleToCapacityZero=!1}),this.state.mustRepresentationIncreaseAttempts(n)&&this.state.getRepresentationsHigherThan(t).forEach(function(e){return e.attemptsToExitCapacityZero++}),this.state.updateRepresentationInfo(e,{attemptsToExitCapacityZero:this.state.attemptsToExitCapacityZero,bitrate:t,capacity:this.state.capacity,isEligibleToCapacityZero:this.state.isEligibleToCapacityZero}),this.state.lastBitrate=t,this.state.lastRepresentationId=e}}},{key:"representationChanged",value:function(){var e=this;if(this.settings.teca.enableTeca&&!eE.isNil(this.stats.stream.bitrate)){var t=function(t){return e.setCapacity(Math.floor(t)+e.state.capacityRepresentationModifier)};this.stop();var n=this.stats.stream.representationId,r=this.stats.stream.bitrate,i=this.state.getRepresentationInfo(n);if(this.state.lastBitrate>this.stats.stream.bitrate&&this.state.isInboundBfrValid&&this.state.hasChildrenExitedDueToLowBfr){var o=this.state.logReasonChildrenLostOnRepresentationChange;this.decreaseCapacity(this.state.capacityInt-1),this.logCapacity(tr.decreaseCapacityChildLost(o)),this.state.hasChildrenExitedDueToLowBfr=!1,this.updateRepresentationInfo()}if(eE.isNil(i))this.state.isEligibleToCapacityZero=!this.state.someHigherRepresentationsNotEligible(r),this.state.attemptsToExitCapacityZero=this.state.getMaxAttemptsOfLowerRepresentations(r),this.state.isEligibleToCapacityZero||eE.isNil(this.state.lastBitrate)?this.state.attemptsToExitCapacityZero>this.settings.teca.maxAttemptsToExitZeroCapacity?(t(0),this.logCapacity(tr.zeroCapacityNewRepresentation())):(this.initialCapacity(),this.logCapacity(tr.restartCapacityNewRepresentation())):(t(this.state.adaptCapacityToBitrate(r)),this.logCapacity(tr.adaptCapacityNewRepresentation(this.state.lastBitrate,r)));else{if(this.state.mayAdaptCapacityToBitrate(i)){var a=this.state.adaptCapacityToBitrate(r);t(a<1?i.capacity:a),this.logCapacity(tr.adaptCapacity(this.state.lastBitrate,r))}else t(i.capacity),this.logCapacity(tr.reuseCapacity());this.state.isEligibleToCapacityZero=i.isEligibleToCapacityZero,this.state.attemptsToExitCapacityZero=i.attemptsToExitCapacityZero}this.state.clearSensedCapacities(),this.state.clearInboundBfr(),this.state.clearOutboundBfr(),this.state.updateRepresentationInfo(n,{attemptsToExitCapacityZero:this.state.attemptsToExitCapacityZero,bitrate:r,capacity:this.state.capacity,isEligibleToCapacityZero:this.state.isEligibleToCapacityZero}),this.state.lastBitrate=r,this.state.lastRepresentationId=n,this.schedule()}}},{key:"setCapacity",value:function(e){this.state.capacity=e,this.eventBus.emit(tt.COLLECT_POLYNET_STATS,{tecaCapacity:this.state.capacity})}},{key:"initialCapacity",value:function(){var e=this,t=Math.random()>e.settings.teca.initialFlipRatio;this.setCapacity(+!!t+this.state.capacityInitialFlipModifier),t||this.state.addExtraAttemptsToExitCapacityZero(),this.state.lastBitrate=this.stats.stream.bitrate,this.state.lastRepresentationId=this.stats.stream.representationId,this.updateRepresentationInfo()}},{key:"invalidateCapacity",value:function(){this.setCapacity(-1)}},{key:"decreaseCapacity",value:function(e){var t=Math.max(e,0);0===Math.floor(t)&&this.state.updateAttemptsToExitCapacityZero(),this.setCapacity(t+this.state.capacityDecreaseModifier),this.state.clearTotalSensing()}},{key:"increaseCapacity",value:function(e){this.setCapacity(e+this.state.capacityIncreaseModifier),this.state.clearTotalSensing()}},{key:"increaseFlipCapacity",value:function(e){this.setCapacity(e+this.state.capacityFlipModifier),this.state.clearTotalSensing()}},{key:"increaseCapacitySensing",value:function(e){this.setCapacity(e+this.state.capacitySensingModifier),this.state.clearTotalSensing()}},{key:"keepCapacity",value:function(e){this.setCapacity(e+this.state.capacityKeepModifier)}},{key:"zeroCapacity",value:function(){this.setCapacity(0)}}
1,{key:"logCapacity",value:function(e){this.state.capacityDidChange&&(this.logger.debug(tr.capacityChange(this.state.lastCapacity,this.state.capacity,e)),this.state.refreshLastCapacity())}},{key:"estimateWithSensors",value:function(e){var t=this;this.state.setLastSensingNow(),this.capacitySensor.estimateCapacity(e).then(function(n){if(!eE.isNil(n)&&eE.isFinite(n)){var r=n/e;t.state.addSensedCapacity(r),t.state.totalIncreaseCandidates>=t.settings.teca.minimalRequiredIncreaseSensedCapacities&&(t.state.clearSensedCapacities(),t.increaseCapacitySensing(t.state.capacityInt+1),t.logCapacity(tr.increaseCapacityBySensor())),t.state.totalSensingSinceLastCapacityChange+=1,t.state.clearInboundBfr(),t.state.clearOutboundBfr(),t.onHoldSensor=!1}}).catch(function(e){t.state.clearInboundBfr(),t.state.clearOutboundBfr(),t.state.clearLastSensingTime(),t.logger.warn("Unable to finish sensing process due to: ".concat(e)),t.onHoldSensor=!1})}},{key:"computeOutboundBfrAndOutboundCount",value:function(){var e,t=this.getOutboundFromStats(),n=t.reduce(function(e,t){return e+t.bufferFillingRate},0),r=new Map,i=sS(t);try{for(i.s();!(e=i.n()).done;){var o=e.value,a=o.nodeId,s=o.bufferFillingRate;r.set(a,s)}}catch(e){i.e(e)}finally{i.f()}return n>this.settings.teca.bfrTimesToDecrease&&(this.state.isEligibleToCapacityZero=!1),n>0&&this.state.addOutboundBfr(r),{aggregatedOutboundBfr:this.state.aggregatedOutboundBfr,outboundCount:t.length,isOutboundBfrValid:this.state.isOutboundBfrValid}}},{key:"getOutboundFromStats",value:function(){return this.stats.datachannel.dataChannels.filter(function(e){return e.direction===oH.Direction.OUTBOUND&&e.bufferFillingRate>0})}},{key:"handleMetricsMessage",value:function(e){var t,n=null==(t=null==e?void 0:e.metrics)?void 0:t.representationBufferFillingRate;!eE.isFinite(n)||n<=0||(this.state.currentBfr=n,this.state.addInboundBfr(n))}},{key:"handleDataChannelEvent",value:function(e){var t=function(e){var t=e.dataChannel,n=e.oldState;return(null==t?void 0:t.isClosed)&&(null==t?void 0:t.isWebRTC)&&n===oH.State.CONNECTED},n=e.dataChannel,r=e.oldState;eE.isNil(n)||(n.isInbound?(t(e)&&this.logger.trace(tr.tecaLostParentBfr(n.nodeId,this.state.allInboundBfrs,this.state.aggregatedInboundBfr)),this.state.clearInboundBfr()):n.isOutbound&&(n.isClosed&&r===oH.State.CONNECTED&&this.state.hasChildLowBfr(n.nodeId)&&(this.state.hasChildrenExitedDueToLowBfr=!0),t(e)&&this.logger.trace(tr.tecaLostChildBfr(n.nodeId,this.state.getOutboundBfrsFromChild(n.nodeId),this.state.aggregatedOutboundBfr)),this.state.clearOutboundBfrFromChild(n.nodeId)),this.cancelSensor())}},{key:"handleSettingsChangedEvent",value:function(e){var t,n,r=null==e?void 0:e.diffSettings;eE.isNil(null==r?void 0:r.teca)||(eE.isNil(null==(t=null==r?void 0:r.teca)?void 0:t.enableTeca)?(eE.isFinite(null==(n=null==r?void 0:r.teca)?void 0:n.capacityEstimationInterval)&&(this.stop(),this.schedule()),this.state.setup()):this.reset())}},{key:"handleContentCacheCreatedEvent",value:function(e){var t=null==e?void 0:e.contentCache;!eE.isNil(t)&&t.isCacheable&&(this.eventBus.off(tt.CONTENT_CACHE_CONTENT_CREATED,this.handleContentCacheCreatedEvent,{scope:this}),this.estimateWithSensors(this.state.targetCapacity))}},{key:"cancelSensor",value:function(){this.capacitySensor.stop(),this.state.clearLastSensingTime(),this.eventBus.off(tt.CONTENT_CACHE_CONTENT_CREATED,this.handleContentCacheCreatedEvent,{scope:this}),this.onHoldSensor=!1}}])}(ez);sw.polyNetFactoryName="CapacityEstimator";var sT=eU.getInstanceFactory(sw);function sk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sk=function(){return!!e})()}var s_=[oO.MessageType.JOIN_RESPONSE],sR=0,sO=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,sk()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).sequence=0,e.logger=e0(e.context).getInstance().getLogger("TrackerV5"),e.eventBus=eG(e.context).getInstance(),e.dataChannelService=a7(e.context).getInstance(),e.webSocket=ad(e.context).getInstance(),e.responseTimer=oI(e.context).getInstance(),e.stats=of(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.bufferHealthChecker=st(e.context).createInstance(),e.messageValidator=si(e.context).createInstance(),e.polyNet=nK(e.context).getInstance(),e.signaler=ag(e.context).createInstance(),e.capacityEstimator=sT(e.context).createInstance(),e.moveInstructionHandler=aB(e.context).getInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.WS_MESSAGE,this.handleTrackerWebSocketMessageEvent,{scope:this}),this.eventBus.on(tt.REQUEST_REPAIR,this.handleRequestRepair,{scope:this}),this.eventBus.on(tt.COUNTERMEASURE_TRACKER_RESPONSE_TIMEOUT,this.handleCountermeasureTrackerResponseTimeoutEvent,{scope:this}),this.eventBus.on(tt.DATA_CHANNEL_STATE_CHANGED,this.handleDataChannelStateChangedEvent,{scope:this}),this.eventBus.on(tt.SETTINGS_CHANGED,this.handleSettingsChangedEvent,{scope:this}),this.eventBus.on(tt.EXECUTE_PENDING_MOVE_INSTRUCTION,this.handleRunPendingMoveInstructionEvent,{scope:this}),this.bufferHealthChecker.start(),this.capacityEstimator.start(),this.moveInstructionHandler.start()}},{key:"destroy",value:function(){var e;this.eventBus&&(this.requestLeave(),this.eventBus.offAll({scope:this}),this.polyNet.clearRepresentation(),this.messageValidator.destroy(),this.bufferHealthChecker.destroy(),this.signaler.destroy(),this.capacityEstimator.destroy(),this.logger=null,this.eventBus=null,this.dataChannelService=null,this.webSocket=null,this.stats=null,this.messageValidator=null,this.signaler=null,this.cancelTimerForTrackerResponseTimeout(),null==(e=this.responseTimer)||e.cancel(),this.responseTimer=null)}},{key:"requestJoin",value:function(e,t){var n=eE.isNil(this.polyNet.representationId)||eE.isNil(t),r=eE.isNil(this.polyNet.streamUri)||eE.isNil(e),i=n||r,o=!n&&t!==this.polyNet.representationId,a=!r&&e!==this.polyNet.streamUri,s=o||a;s&&this.logger.trace("Representation did change, representationId: ".concat(t,", cache flushing is required")),(s||i)&&this.requestInternalJoin(e,t,s)}},{key:"requestInternalJoin",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.polyNet.isJoined&&this.requestLeave(),n&&this.capacityEstimator.representationChanged(),this.polyNet.update({representationId:t,streamUri:e}),this.polyNet.state===nz.States.CONNECTED?(this.logger.debug(tr.representationChanged(t,e)),this.sendPolyNetJoinRequest(e,t)):this.logger.trace("Request Join - Incorrect polyNet state ".concat(this.polyNet.state))}},{key:"requestLeave",value:function(){this.polyNet.updateState(nz.States.CONNECTED),this.cancelTimerForTrackerResponseTimeout(),this.closeOutBoundDataChannels(),this.closeInboundDataChannels()}},{key:"closeOutBoundDataChannels",value:function(){var e=this;
1this.dataChannelService.findAllOutbound().forEach(function(t){e.removeDataChannel(t)})}},{key:"closeInboundDataChannels",value:function(){var e=this;this.dataChannelService.findAllInbound().forEach(function(t){e.removeDataChannel(t)})}},{key:"closeDataChannelAndReverse",value:function(e){var t=this.dataChannelService.findByIdentifier(e);t&&this.removeDataChannel(t);var n=this.dataChannelService.findByReverseIdentifier(e);n&&this.removeDataChannel(n)}},{key:"handleDataChannelStateChangedEvent",value:function(e){var t=e.dataChannel,n=t.state,r=t.type,i=t.direction,o=t.nodeIdShort;switch(n){case oH.State.CONNECTED:this.logger.integration(tr.connectedTo(r,i,o));break;case oH.State.CLOSED:this.logger.integration(tr.disconnectedFrom(r,i,o))}}},{key:"createDataChannelWebRTCInbound",value:function(e){var t=this.dataChannelService.createDataChannelWebRTC(e,oH.Direction.INBOUND);return this.eventBus.on(tt.DATA_CHANNEL_REMOVED,this.handleInboundDataChannelRemoved,{target:t,scope:this}),t}},{key:"createDataChannelWebRTCOutbound",value:function(e){return this.dataChannelService.createDataChannelWebRTC("".concat(e.to,":").concat(e.from),oH.Direction.OUTBOUND)}},{key:"handleSettingsChangedEvent",value:function(e){var t=e.diffSettings;eE.isNil(t.sharingContent)||this.messageValidator.checkSharingContent().error&&this.requestLeave()}},{key:"checkSequence",value:function(e){return!s_.includes(e.messageType)||[this.sequence,sR].includes(e.sequence)}},{key:"handleTrackerWebSocketMessageEvent",value:function(e){var t=e.message;if(this.checkSequence(t))switch(t.messageType){case oO.MessageType.JOIN_RESPONSE:this.handleTrackerJoinResponseMessage(t);break;case oO.MessageType.MOVE_INSTRUCTION:this.handlePolyNetMoveInstructionMessage(t);break;case oO.MessageType.PEER_TO_PEER:this.handlePolyNetPeerToPeerMessage(t);break;case oO.MessageType.CHANGE_SETTINGS_INSTRUCTION:this.handleSettingsMessage(t);break;default:this.logger.trace("Unsupported message type: ".concat(t.messageType))}else this.logger.trace("Ignoring message due to sequence mismatch. Expected sequence: ".concat(this.sequence))}},{key:"handleSettingsMessage",value:function(e){if(e.settings){var t=e.settings;this.settings.setup(t)}}},{key:"handleTrackerJoinResponseMessage",value:function(e){this.eventBus.emit(tt.COLLECT_POLYNET_STATS,{joinResponseTime:performance.now()}),this.cancelTimerForTrackerResponseTimeout();var t=eB(e.dataChannelId.split(":"),2),n=t[0],r=t[1];e.statusCode===oO.StatusCode.JOIN_RESPONSE_OK&&("cdn"===e.source?this.logger.integration(tr.trackerCDN(r)):this.logger.integration(tr.trackerP2P(r,n)),this.storeJoinResponseData(e),this.moveNodeToNewParent(e.source,e.dataChannelId,e.peeringType))}},{key:"handlePolyNetMoveInstructionMessage",value:function(e){this.moveInstructionHandler.handleMoveInstruction(e)}},{key:"handlePolyNetPeerToPeerMessage",value:function(e){if(this.messageValidator.isPeerToPeerMessageForCurrentNode(e))if(this.messageValidator.isValidPeerToPeerMessageType(e)){if(this.messageValidator.isPeerToPeerHandshake(e)){var t=this.messageValidator.checkPeerToPeerHandshake(e);if(t.error)return void this.sendKickMessage(e.from,t.message);var n=this.dataChannelService.findOneByQuery({nodeId:e.from});n&&this.removeDataChannel(n),this.createDataChannelWebRTCOutbound(e)}this.signaler.handleSignalingMessage(e)}else this.logger.trace("Unsupported message type: ".concat(e.payload.messageType));else this.logger.trace("Ignoring received message for another nodeId: ".concat(e.to," - ").concat(JSON.stringify(e)))}},{key:"handleInboundDataChannelRemoved",value:function(e){var t=e.dataChannel;t.isWebRTC&&t.isInbound&&this.logger.trace("Lost inbound with nodeId: ".concat(t.nodeId))}},{key:"moveNodeToNewParent",value:function(e,t,n){var r,i=this,o=function(){return i.polyNet.updateState(nz.States.JOINED)},a=function(){i.eventBus.off(tt.DATA_CHANNEL_CONNECTED,a,{scope:i}),o()};this.cancelTimerForTrackerResponseTimeout(),this.closeInboundDataChannels(),this.closeDataChannelAndReverse(t),"cdn"===e?(r=this.dataChannelService.getHttpDataChannel(),this.logger.integration(tr.moveCDN())):(r=this.createDataChannelWebRTCInbou
1nd(t),this.logger.integration(tr.moveP2P(r.nodeId))),r.isConnected?o():this.eventBus.on(tt.DATA_CHANNEL_CONNECTED,a,{target:r,scope:this}),r.peeringType=n,this.eventBus.emit(tt.COLLECT_DATA_CHANNEL_STATS,{peeringType:r.peeringType}),r.isWebRTC&&this.signaler.startSignalingForDataChannel(r)}},{key:"handleRequestRepair",value:function(e){var t,n=e.dataChannelId;t=n?this.dataChannelService.findByIdentifier(n):this.dataChannelService.findFirstInboundWebRTC(),this.logger.warn("Repair requested for nodeId: ".concat(null==t?void 0:t.nodeIdShort," due to: ").concat(e.reason)),(null==t?void 0:t.type)===oH.Type.WEB_RTC&&(this.removeDataChannel(t),this.handleInboundDataChannelRemoved({dataChannel:t}))}},{key:"createPolyNetJoinRequest",value:function(e,t){return{connectionType:this.stats.platform.connectionType,messageType:oO.MessageType.JOIN_REQUEST,natType:this.stats.nat.type,receiverProtocols:a2.SUPPORTED_PROTOCOLS_VERSION,representationId:t,sequence:++this.sequence,streamUri:e}}},{key:"sendPolyNetJoinRequest",value:function(e,t){var n=this.createPolyNetJoinRequest(e,t);this.eventBus.emit(tt.COLLECT_POLYNET_STATS,{joinRequestTime:performance.now()}),this.sendMessageToTracker(n),this.scheduleTimerForTrackerResponseTimeout(n)}},{key:"trackerSendMessageToPeer",value:function(e,t){var n={from:this.polyNet.nodeId,messageType:oO.MessageType.PEER_TO_PEER,payload:t,to:e};this.sendMessageToTracker(n)}},{key:"sendKickMessage",value:function(e,t){var n,r={messageType:av.Messages.KICK,reasonMessage:t};null==(n=this.logger)||n.trace("".concat(t," -> Sending KICK message to nodeId: ").concat(e)),this.trackerSendMessageToPeer(e,r)}},{key:"sendMessageToTracker",value:function(e){var t;null==(t=this.webSocket)||t.send(e)}},{key:"storeJoinResponseData",value:function(e){if(e.dataChannelId&&e.streamId&&e.maskedStreamUri){var t=eB(e.dataChannelId.split(":"),2)[1],n=e.streamId,r=e.maskedStreamUri;this.polyNet.update({maskedStreamUri:r,nodeId:t,streamId:n})}}},{key:"temporaryLeavePolyNet",value:function(){this.requestLeave(),this.requestInternalJoin(this.polyNet.streamUri,this.polyNet.representationId)}},{key:"removeDataChannel",value:function(e){this.logger.trace("Closing DataChannel nodeId: ".concat(e.nodeIdShort)),this.eventBus.off(tt.DATA_CHANNEL_REMOVED,this.handleInboundDataChannelRemoved,{target:e,scope:this}),this.dataChannelService.removeDataChannel(e)}},{key:"handleRunPendingMoveInstructionEvent",value:function(e){var t=e.source,n=e.dataChannelId,r=e.peeringType;this.moveNodeToNewParent(t,n,r)}},{key:"handleCountermeasureTrackerResponseTimeoutEvent",value:function(e){var t=e.request;(null==t?void 0:t.statusCode)===oO.StatusCode.DATA_CHANNEL_NOT_AVAILABLE&&(this.logger.warn("Rejoin due to a response timeout from ".concat(t.messageType," ").concat(t.statusCode)),this.temporaryLeavePolyNet())}},{key:"scheduleTimerForTrackerResponseTimeout",value:function(e){this.responseTimer.schedule(e)}},{key:"cancelTimerForTrackerResponseTimeout",value:function(){this.responseTimer.cancel()}}])}(ez);sO.polyNetFactoryName="TrackerV5";var sI=eU.getInstanceFactory(sO);function sN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sN=function(){return!!e})()}var sx=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},sA=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,sN()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).eventBus=eG(e.context).getInstance(),e.timer=ok(e.context).createInstance(),e.dataChannelService=a7(e.context).getInstance(),e}return f(t,e),s(t,[{key:"destroy",value:function(){this.stop(),this.eventBus=null,this.timer=null,this.dataChannelService=null}},{key:"start",value:function(){this.lastOutboundsDcStats={},this.disconnectedOutboundsDcBytesSent=0,this.timer.setInterval("DataChannelMonitor",t.MONITOR_INTERVAL,this.collectOutboundStats.bind(this))}},{key:"stop",value:function(){var e,t;null==(e=this.eventBus)||e.offAll({scope:this}),null==(t=this.timer)||t.cancel()}},{key:"collectOutboundStats",value:function(){return sx(this,void 0,void 0,p().mark(function e(){var t,n,r;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.getOutboundsStats();case 1:for(r in n=(t=e.sent).reduce(function(e,t){return t.stats&&(e[t.stats.id]=t.stats),e},{}),this.lastOutboundsDcStats)eE.isNil(n[r])&&(this.disconnectedOutboundsDcBytesSent+=this.lastOutboundsDcStats[r].bytesSent);this.lastOutboundsDcStats=n,this.updateSubscribers();case 2:case"end":return e.stop()}},e,this)}))}},{key:"updateSubscribers",value:function(){var e=this.disconnectedOutboundsDcBytesSent;for(var t in this.lastOutboundsDcStats)e+=this.lastOutboundsDcStats[t].bytesSent;this.eventBus.emit(tt.DATA_CHANNEL_MONITOR_UPDATE,{accumulatedP2pBytesSent:e})}},{key:"getOutbounds",value:function(){return eL(this.dataChannelService.findAllOutbound())}},{key:"getOutboundsStats",value:function(){return sx(this,void 0,void 0,p().mark(function e(){var t,n=this;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Promise.all(this.getOutbounds().map(function(e){return sx(n,void 0,void 0,p().mark(function t(){var n;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.getStats();case 1:if(n=t.sent){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",n);case 3:case"end":return t.stop()}},t)}))}));case 1:return t=(t=e.sent).filter(function(e){return!eE.isNil(e)}),e.abrupt("return",eE.flatten(t));case 2:case"end":return e.stop()}},e,this)}))}}])}(ez);sA.MONITOR_INTERVAL=1e3;var sP=eU.getInstanceFactory(sA);function sD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sD=function(){return!!e})()}var sM=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,sD()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).eventBus=eG(e.context).getInstance(),e.webSocketManager=ad(e.context).getInstance(),e.polyNet=nK(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("Tracker"),e.settings=nA(e.context).getInstance(),e.responseTimer=oI(e.context).getInstance(),e.stats=of(e.context).getInstance(),e.dataChannelMonitor=sP(e.context).createInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){if(!this.isValidPolyNetEnvironment())return this.requestNoRecovery(),void this.logger.warn("This browser does not support PolyNet, going into fallback mode");this.eventBus.on(tt.WS_OPEN,this.handleWebSocketManagerOpenEvent,{scope:this}),this.eventBus.on(tt.WS_ERROR,this.handleWebSocketManagerErrorEvent,{scope:this}),this.eventBus.on(tt.WS_CLOSE,this.handleWebSocketManagerCloseEvent,{scope:this}),this.eventBus.on(tt.WS_MESSAGE,this.handleWebSocketManagerMessageEvent,{scope:this}),this.eventBus.on(tt.REQUEST_CONNECT,this.handleRequestConnect,{scope:this}),this.eventBus.on(tt.REQUEST_NO_RECOVERY,this.handleRequestNoRecovery,{scope:this}),this.eventBus.on(tt.COUNTERMEASURE_TRACKER_RESPONSE_TIMEOUT,this.handleCountermeasureTrackerResponseTimeoutEvent,{scope:this}),this.webSocketManager.start(),this.dataChannelMonitor.start()}},{key:"destroy",value:function(){var e,t;this.eventBus&&(this.webSocketManager.disconnect(),this.eventBus.offAll({scope:this}),null==(e=this.versionedTracker)||e.destroy(),this.dataChannelMonitor.destroy(),this.cancelTimerForTrackerResponseTimeout(),null==(t=this.responseTimer)||t.cancel(),this.responseTimer=null,this.logger=null,this.eventBus=null,this.webSocketManager=null,this.versionedTracker=null)}},{key:"requestConnect",value:function(){if(!this.polyNet.isDisconnected)return this.logger.trace("Request Connect - Incorrect polyNet state ".concat(this.polyNet.state));this.settings.isValidApiKey&&(this.logger.debug(tr.startingTrackerConnection()),this.startWebSocket())}},{key:"requestJoin",value:function(e,t){var n;null==(n=this.versionedTracker)||n.requestJoin(e,t)}},{key:"requestDisconnect",value:function(){this.logger.debug(tr.closingTrackerConnection()),this.disconnectWsAndVersionedTracker(),this.polyNet.updateState(nz.States.DISCONNECTED)}},{key:"requestNoRecovery",value:function(){this.disconnectWsAndVersionedTracker(),this.polyNet.updateState(nz.States.NO_RECOVERY)}},{key:"disconnectWsAndVersionedTracker",value:function(){var e;null==(e=this.versionedTracker)||e.destroy(),this.webSocketManager.disconnect()}},{key:"startWebSocket",value:function(){var e=this.settings.apiKey.signalServerUrl;this.webSocketManager.connect(e)}},{key:"handleWebSocketManagerOpenEvent",value:function(){this.sendHandshakeRequest
1()}},{key:"handleWebSocketManagerMessageEvent",value:function(e){var t=e.message;t.messageType===oO.MessageType.HANDSHAKE_RESPONSE&&this.handleHandShakeResponseMessage(t)}},{key:"handleWebSocketManagerErrorEvent",value:function(){this.logger.trace("Connection to the Tracker got an error."),this.requestDisconnect()}},{key:"handleWebSocketManagerCloseEvent",value:function(){this.logger.integration(tr.trackerClosed()),this.requestDisconnect()}},{key:"handleHandShakeResponseMessage",value:function(e){switch(e.statusCode){case oO.StatusCode.HANDSHAKE_RESPONSE_OK:this.cancelTimerForTrackerResponseTimeout(),this.polyNet.updateState(nz.States.CONNECTED),this.versionedTracker=sI(this.context).createInstance(),this.versionedTracker.start(),this.polyNet.representationId&&this.versionedTracker.requestJoin(this.polyNet.streamUri,this.polyNet.representationId);break;case oO.StatusCode.HANDSHAKE_RESPONSE_NOT_SUPPORTED:eR.throw(this.logger,"".concat(oO.StatusCode.HANDSHAKE_RESPONSE_NOT_SUPPORTED)),this.eventBus.emit(tt.COLLECT_POLYNET_STATS,{revokedStatus:rD.RevokedStatus.PROTOCOL_NOT_SUPPORTED}),this.requestNoRecovery();break;default:this.logger.trace("Unsupported status code: ".concat(e))}}},{key:"sendHandshakeRequest",value:function(){var e={messageType:oO.MessageType.HANDSHAKE_REQUEST,supportedProtocols:t.PROTOCOL_VERSIONS};this.sendMessageToTracker(e),this.scheduleTimerForTrackerResponseTimeout(e)}},{key:"handleRequestConnect",value:function(){this.requestConnect()}},{key:"handleRequestNoRecovery",value:function(){this.requestNoRecovery()}},{key:"sendMessageToTracker",value:function(e){var t;this.logger.trace("Sending message: ".concat(JSON.stringify(e))),null==(t=this.webSocketManager)||t.send(e)}},{key:"handleCountermeasureTrackerResponseTimeoutEvent",value:function(e){var t=[oO.MessageType.HANDSHAKE_REQUEST,oO.MessageType.JOIN_REQUEST],n=null==e?void 0:e.request;n&&t.includes(n.messageType)&&(this.logger.warn("Closing WS due to a response timeout from ".concat(n.messageType)),this.requestDisconnect(),this.eventBus.emit(tt.WS_CLOSE,{target:this}))}},{key:"scheduleTimerForTrackerResponseTimeout",value:function(e){this.responseTimer.schedule(e)}},{key:"cancelTimerForTrackerResponseTimeout",value:function(){this.responseTimer.cancel()}},{key:"isValidPolyNetEnvironment",value:function(){return this.stats.platform.isAnyMediaSourceApiSupported&&this.stats.platform.isWebRTCSupported}}])}(ez);sM.polyNetFactoryName="Tracker",sM.PROTOCOL_VERSIONS=[5];var sB=eU.getSingletonFactory(sM);function sL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sL=function(){return!!e})()}var sj=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},sF=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,sL()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).polyNet=nK(e.context).getInstance(),e.tracker=sB(e.context).getInstance(),e.eventBus=eG(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("ConnectionManager"),e}return f(t,e),s(t,[{key:"destroy",value:function(){this.polyNet=null,this.tracker=null,this.eventBus=null,this.logger=null}},{key:"connectToPolyNet",value:function(e,t){return sj(this,void 0,void 0,p().mark(function n(){return p().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.polyNet.isInNoRecovery){n.next=1;break}return n.abrupt("return");case 1:if(!this.polyNet.isDisconnected){n.next=2;break}return this.logger.trace("Connecting..."),n.next=2,this.connect();case 2:return n.next=3,this.join(e,t);case 3:case"end":return n.stop()}},n,this)}))}},{key:"disconnectFromPolyNet",value:function(){return sj(this,void 0,void 0,p().mark(function e(){return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.disconnect();case 1:case"end":return e.stop()}},e,this)}))}},{key:"connect",value:function(){var e=this;return new Promise(function(t){var n=function(){e.polyNet.state===nz.States.CONNECTED&&(e.eventBus.off(tt.POLYNET_STATE_CHANGED,n,{scope:e}),t())};e.polyNet.state>=nz.States.CONNECTED?t():(e.eventBus.on(tt.POLYNET_STATE_CHANGED,n,{scope:e}),e.polyNet.isDisconnected&&e.tracker.requestConnect())})}},{key:"join",value:function(e,t){var n=this;
1return new Promise(function(r){var i=function(){n.polyNet.state===nz.States.JOINED&&(n.eventBus.off(tt.POLYNET_STATE_CHANGED,i,{scope:n}),r())};n.eventBus.on(tt.POLYNET_STATE_CHANGED,i,{scope:n});try{n.tracker.requestJoin(e,t)}catch(e){e_.throw(n.logger,e)}})}},{key:"disconnect",value:function(){var e=this;return new Promise(function(t){var n=function(){e.polyNet.isDisconnected&&(e.eventBus.off(tt.POLYNET_STATE_CHANGED,n,{scope:e}),t())};e.polyNet.state<=nz.States.DISCONNECTED?t():(e.eventBus.on(tt.POLYNET_STATE_CHANGED,n,{scope:e}),e.polyNet.state>nz.States.DISCONNECTED&&e.tracker.requestDisconnect())})}}])}(ez);sF.polyNetFactoryName="ConnectionManager";var sU=eU.getInstanceFactory(sF),sq=oN.Writer,sH=oN.util,sW=oN.roots.default||(oN.roots.default={}),sV=sW.s73_metrics=function(){var e,t,n={};return n.Connection=function(){var e,t;function n(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.encode=function(e,t){return t||(t=sq.create()),t},n.verify=function(e){return"object"!==i(e)||null===e?"object expected":null},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/s73_metrics.Connection"},(t=Object.create(e={}))[e[0]="NO_PARENT"]=0,t[e[1]="P2P_CONNECTING"]=1,t[e[2]="P2P_CONNECTED"]=2,t[e[3]="P2P_NOT_SUPPORTED"]=3,t[e[4]="PROTOCOL_NOT_SUPPORTED"]=4,t[e[5]="CONTENT_NOT_SUPPORTED"]=5,t[e[6]="NOT_ALLOWED"]=6,t[e[7]="MAX_USERS_PER_KEY_REACHED"]=7,t[e[8]="MEDIA_SOURCE_EXTENSIONS_NOT_SUPPORTED"]=8,t[e[100]="UNKNOWN_STATUS"]=100,n.Status=t,n.Type=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="NONE"]=1,t[e[2]="OTHER"]=2,t[e[3]="BLUETOOTH"]=3,t[e[4]="CELLULAR"]=4,t[e[5]="ETHERNET"]=5,t[e[6]="WIFI"]=6,t[e[7]="WIMAX"]=7,t}(),n}(),n.Nat=function(){var e,t;function n(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.encode=function(e,t){return t||(t=sq.create()),t},n.verify=function(e){return"object"!==i(e)||null===e?"object expected":null},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/s73_metrics.Nat"},(t=Object.create(e={}))[e[0]="UNKNOWN"]=0,t[e[1]="NON_SYMMETRIC"]=1,t[e[2]="SYMMETRIC"]=2,t[e[3]="SEQUENTIAL"]=3,n.Type=t,n}(),n.OperatingSystem=function(){var e,t;function n(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.encode=function(e,t){return t||(t=sq.create()),t},n.verify=function(e){return"object"!==i(e)||null===e?"object expected":null},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/s73_metrics.OperatingSystem"},(t=Object.create(e={}))[e[0]="UNKNOWN"]=0,t[e[1]="ANDROID"]=1,t[e[2]="IOS"]=2,t[e[3]="LINUX"]=3,t[e[4]="MACOS"]=4,t[e[5]="WINDOWS"]=5,t[e[6]="TVOS"]=6,n.Name=t,n}(),n.Platform=function(){var e,t;function n(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.encode=function(e,t){return t||(t=sq.create()),t},n.verify=function(e){return"object"!==i(e)||null===e?"object expected":null},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/s73_metrics.Platform"},(t=Object.create(e={}))[e[0]="UNKNOWN"]=0,t[e[1]="ANDROID"]=1,t[e[2]="IOS"]=2,t[e[3]="LINUX"]=3,t[e[4]="MACOS"]=4,t[e[5]="WINDOWS"]=5,t[e[6]="CHROME"]=6,t[e[7]="CHROMIUM"]=7,t[e[8]="EDGE"]=8,t[e[9]="EXPLORER"]=9,t[e[10]="FIREFOX"]=10,t[e[11]="OPERA"]=11,t[e[12]="SAFARI"]=12,t[e[13]="TVOS"]=13,t[e[14]="ANDROID_TV"]=14,n.Name=t,n}(),(t=Object.create(e={}))[e[0]="CDN"]=0,t[e[1]="P2P"]=1,n.Source=t,n.InboundProtocol=function(){var e={},t=Object.create(e);return t[e[0]="HTTP"]=0,t[e[1]="SCTP"]=1,t[e[2]="QUIC"]=2,t}(),n.PeeringType=function(){var e={},t=Object.create(e);return t[e[0]="LAN"]=0,t[e[1]="INTRA_ASN"]=1,t[e[2]="INTER_ASN"]=2,t}(),n.UplinkSpeedError=function(){var e={},t=Object.create(e);return t[e[0]="UNKNOWN"]=0,t[e[1]="NOT_READY"]=1,t[e[2]="INVALID_SPEEDY_URL"]=2,t[e[3]="API_RESPONSE_ERROR"]=3,t[e[4]="SPEEDY_INVALID_RESULT"]=4,t[e[5]="CONNECTION_ERROR"]=5,t[e[6]="PROBE_FAILED"]=6,t[e[7]="PROBE_TIMEOUT"]=7,t}(),n.Peer=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.nodeId="",e.prototype.aggregateBufferFillingRate=0,e.prototype.uplinkSpeed=0,e.prototype.outboundConnectionStatus=0,e.encode=function(e,t){return t||(t=sq.create()),t.uint32(10).string(e.nodeId),null!=e.aggregateBufferFillingRate&&Object.hasOwnProperty.call(e,"aggregateBufferFillingRate")&&t.uint32(21).float(e.aggregateBufferFillingRate),null!=e.uplinkSpeed&&Object.hasOwnProperty.call(e,"uplinkSpeed")&&t.uint32(24).uint32(e.uplinkSpeed),null!=e.outboundConnectionStatus&&Object.hasOwnProperty.call(e,"outboundConnectionStatus")&&t.uint32(32).int32(e.outboundConnectionStatus),t},e.verify=function(e){if("object"!==i(e)||null===e)return"object expected";if(!sH.isString(e.nodeId))return"nodeId: string expected";if(null!=e.aggregateBufferFillingRate&&e.hasOwnProperty("aggregateBufferFillingRate")&&"number"!=typeof e.aggregateBufferFillingRate)return"aggregateBufferFillingRate: number expected";if(null!=e.uplinkSpeed&&e.hasOwnProperty("uplinkSpeed")&&!sH.isInteger(e.uplinkSpeed))return"uplinkSpeed: integer expected";if(null!=e.outboundConnectionStatus&&e.hasOwnProperty("outboundConnectionStatus"))switch(e.outboundConnectionStatus){default:return"outboundConnectionStatus: enum value expected";
1case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 100:}return null},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/s73_metrics.Peer"},e}(),n.Metrics=function(){function e(e){if(this.datachannelWasNotEstablished=[],this.contentRequestResponseTimesCdn=[],this.contentRequestResponseTimesP2p=[],this.contentSteeringPathwayPriority=[],this.peers=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.nodeId="",e.prototype.deviceId="",e.prototype.channelId="default",e.prototype.representationId="",e.prototype.streamId="",e.prototype.source=0,e.prototype.receiveFromNodeId="",e.prototype.natType=0,e.prototype.connectionStatus=0,e.prototype.connectionType=0,e.prototype.operatingSystemName=0,e.prototype.operatingSystemVersion="",e.prototype.platformName=0,e.prototype.platformVersion="",e.prototype.maskedStreamUri="",e.prototype.bitrate="",e.prototype.peerSettings="",e.prototype.sdkVersion="",e.prototype.datachannelWasNotEstablished=sH.emptyArray,e.prototype.currentHost="",e.prototype.responseCdn="",e.prototype.bufferHealth=0,e.prototype.droppedFramesPerSecond=0,e.prototype.timeToFirstFrame=0,e.prototype.bufferingRatio=0,e.prototype.playbackTime=0,e.prototype.aggregateBufferFillingRate=0,e.prototype.representationBufferFillingRate=0,e.prototype.cdnDownlinkThroughput=0,e.prototype.p2pDownlinkThroughput=0,e.prototype.downlinkSpeed=0,e.prototype.uplinkSpeed=0,e.prototype.roundTripTime=0,e.prototype.interarrivalJitter=0,e.prototype.packetLoss=0,e.prototype.joinResponseTime=0,e.prototype.contentRequestResponseTimesCdn=sH.emptyArray,e.prototype.contentRequestResponseTimesP2p=sH.emptyArray,e.prototype.inboundProtocol=0,e.prototype.inboundConnectionCount=1,e.prototype.inboundThroughputProbe=-1,e.prototype.uplinkCapacity=-1,e.prototype.inboundPeeringType=0,e.prototype.uplinkSpeedError=0,e.prototype.cpuLoad=0,e.prototype.sessionId="",e.prototype.osName="",e.prototype.osVersion="",e.prototype.appName="",e.prototype.appVersion="",e.prototype.browserName="",e.prototype.browserVersion="",e.prototype.playerName="",e.prototype.playerVersion="",e.prototype.hrefLocation="",e.prototype.viewportWidth=0,e.prototype.viewportHeight=0,e.prototype.videoResolutionWidth=0,e.prototype.videoResolutionHeight=0,e.prototype.playerState="",e.prototype.startingTime=0,e.prototype.seekingTime=0,e.prototype.bufferingTime=0,e.prototype.playingTime=0,e.prototype.pauseTime=0,e.prototype.bufferingEvents=0,e.prototype.streamState="",e.prototype.aliveTime=0,e.prototype.contentSteeringEnabled=!1,e.prototype.contentSteeringResourceId=0,e.prototype.contentSteeringPathwayPriority=sH.emptyArray,e.prototype.contentSteeringPathway="",e.prototype.peers=sH.emptyArray,e.prototype.customDimension_1="",e.prototype.customDimension_2="",e.prototype.customDimension_3="",e.encode=function(e,t){if(t||(t=sq.create()),t.uint32(10).string(e.nodeId),t.uint32(18).string(e.deviceId),null!=e.channelId&&Object.hasOwnProperty.call(e,"channelId")&&t.uint32(26).string(e.channelId),t.uint32(34).string(e.representationId),t.uint32(42).string(e.streamId),t.uint32(48).int32(e.source),null!=e.receiveFromNodeId&&Object.hasOwnProperty.call(e,"receiveFromNodeId")&&t.uint32(58).string(e.receiveFromNodeId),t.uint32(64).int32(e.natType),t.uint32(72).int32(e.connectionStatus),t.uint32(80).int32(e.connectionType),t.uint32(88).int32(e.operatingSystemName),t.uint32(98).string(e.operatingSystemVersion),t.uint32(104).int32(e.platformName),t.uint32(114).string(e.platformVersion),t.uint32(130).string(e.maskedStreamUri),null!=e.bitrate&&Object.hasOwnProperty.call(e,"bitrate")&&t.uint32(138).string(e.bitrate),null!=e.peerSettings&&Object.hasOwnProperty.call(e,"peerSettings")&&t.uint32(146).string(e.peerSettings),null!=e.sdkVersion&&Object.hasOwnProperty.call(e,"sdkVersion")&&t.uint32(154).string(e.sdkVersion),null!=e.datachannelWasNotEstablished&&e.datachannelWasNotEstablished.length)for(var n=0;n<e.datachannelWasNotEstablished.length;++n)t.uint32(162).string(e.datachannelWasNotEstablished[n]);if(null!=e.currentHost&&Object.hasOwnProperty.call(e,"currentHost")&&t.uint32(170).string(e.currentHost),null!=e.responseCdn&&Object.hasOwnProperty.call(e,"responseCdn")&&t.uint32(178).string(e.responseCdn),null!=e.bufferHealth&&Object.hasOwnProperty.call(e,"bufferHealth")&&t.uint32(248).int32(e.bufferHealth),null!=e.droppedFramesPerSecond&&Object.hasOwnProperty.call(e,"droppedFramesPerSecond")&&t.uint32(256).uint32(e.droppedFramesPerSecond),null!=e.timeToFirstFrame&&Object.hasOwnProperty.call(e,"timeToFirstFrame")&&t.uint32(264).uint32(e.timeToFirstFrame),null!=e.bufferingRatio&&Object.hasOwnProperty.call(e,"bufferingRatio")&&t.uint32(277).float(e.bufferingRatio),null!=e.playbackTime&&Object.hasOwnProperty.call(e,"playbackTime")&&t.uint32(285).float(e.playbackTime),null!=e.aggregateBufferFillingRate&&Object.hasOwnProperty.call(e,"aggregateBufferFillingRate")&&t.uint32(333).float(e.aggregateBufferFillingRate),null!=e.representationBufferFillingRate&&Object.hasOwnProperty.call(e,"representationBufferFillingRate")&&t.uint32(341).float(e.representationBufferFillingRate),null!=e.cdnDownlinkThroughput&&Object.hasOwnProperty.call(e,"cdnDownlinkThroughput")&&t.uint32(344).uint32(e.cdnDownlinkThroughput),null!=e.p2pDownlinkThroughput&&Object.hasOwnProperty.call(e,"p2pDownlinkThroughput")&&t.uint32(352).uint32(e.p2pDownlinkThroughput),null!=e.downlinkSpeed&&Object.hasOwnProperty.call(e,"downlinkSpeed")&&t.uint32(360).uint32(e.downlinkSpeed),null!=e.uplinkSpeed&&Object.hasOwnProperty.call(e,"uplinkSpeed")&&t.uint32(368).uint32(e.uplinkSpeed),null!=e.roundTripTime&&Object.hasOwnProperty.call(e,"roundTripTime")&&t.uint32(376).uint32(e.roundTripTime),null!=e.interarrivalJitter&&Object.hasOwnProperty.call(e,"interarrivalJitter")&&t.uint32(389).float(e.interarrivalJitter),null!=e.packetLoss&&Object.hasOwnProperty.call(e,"packetLoss")&&t.uint32(392).uint32(e.packetLoss),null!=e.joinResponseTime&&Object.hasOwnProperty.call(e,"joinResponseTime")&&t.uint32(400).uint32(e.joinResponseTime),null!=e.contentRequestResponseTimesCdn&&e.contentRequestResponseTimesCdn.length)for(n=0;n<e.contentRequestResponseTimesCdn.length;++n)t.uint32(408).uint32(e.contentRequestResponseTimesCdn[n]);if(null!=e.contentRequestResponseTimesP2p&&e.contentRequestResponseTimesP2p.length)for(n=0;n<e.contentRequestResponseTimesP2p.length;++n)t.uint32(416).uint32(e.contentRequestResponseTimesP2p[n]);if(null!=e.inboundProtocol&&Object.hasOwnProperty.call(e,"inboundProtocol")&&t.uint32(424).int32(e.inboundProtocol),null!=e.inboundConnectionCount&&Object.hasOwnProperty.call(e,"inboundConnectionCount")&&t.uint32(432).uint32(e.inboundConnectionCount),null!=e.inboundThroughputProbe&&Object.hasOwnProperty.call(e,"inboundThroughputProbe")&&t.uint32(440).int32(e.inboundThroughputProbe),null!=e.uplinkCapacity&&Object.hasOwnProperty.call(e,"uplinkCapacity")&&t.uint32(453).float(e.uplinkCapacity),null!=e.inboundPeeringType&&Object.hasOwnProperty.call(e,"inboundPeeringType")&&t.uint32(464).int32(e.inboundPeeringType),null!=e.uplinkSpeedError&&Object.hasOwnProperty.call(e,"uplinkSpeedError")&&t.uint32(472).int32(e.uplinkSpeedError),null!=e.cpuLoad&&Object.hasOwnProperty.call(e,"cpuLoad")&&t.uint32(488).uint32(e.cpuLoad),null!=e.sessionId&&Object.hasOwnProperty.call(e,"sessionId")&&t.uint32(498).string(e.sessionId),null!=e.osName&&Object.hasOwnProperty.call(e,"osName")&&t.uint32(506).string(e.osName),null!=e.osVersion&&Object.hasOwnProperty.call(e,"osVersion")&&t.uint32(514).string(e.osVersion),null!=e.appName&&Object.hasOwnProperty.call(e,"appName")&&t.uint32(522).string(e.appName),null!=e.appVersion&&Object.hasOwnProperty.call(e,"appVersion")&&t.uint32(530).string(e.appVersion),null!=e.browserName&&Object.hasOwnProperty.call(e,"browserName")&&t.uint32(538).string(e.browserName),null!=e.browserVersion&&Object.hasOwnProperty.call(e,"browserVersion")&&t.uint32(546).str
1ing(e.browserVersion),null!=e.playerName&&Object.hasOwnProperty.call(e,"playerName")&&t.uint32(554).string(e.playerName),null!=e.playerVersion&&Object.hasOwnProperty.call(e,"playerVersion")&&t.uint32(562).string(e.playerVersion),null!=e.hrefLocation&&Object.hasOwnProperty.call(e,"hrefLocation")&&t.uint32(570).string(e.hrefLocation),null!=e.viewportWidth&&Object.hasOwnProperty.call(e,"viewportWidth")&&t.uint32(576).uint32(e.viewportWidth),null!=e.viewportHeight&&Object.hasOwnProperty.call(e,"viewportHeight")&&t.uint32(584).uint32(e.viewportHeight),null!=e.videoResolutionWidth&&Object.hasOwnProperty.call(e,"videoResolutionWidth")&&t.uint32(592).uint32(e.videoResolutionWidth),null!=e.videoResolutionHeight&&Object.hasOwnProperty.call(e,"videoResolutionHeight")&&t.uint32(600).uint32(e.videoResolutionHeight),null!=e.playerState&&Object.hasOwnProperty.call(e,"playerState")&&t.uint32(610).string(e.playerState),null!=e.startingTime&&Object.hasOwnProperty.call(e,"startingTime")&&t.uint32(616).uint32(e.startingTime),null!=e.seekingTime&&Object.hasOwnProperty.call(e,"seekingTime")&&t.uint32(624).uint32(e.seekingTime),null!=e.bufferingTime&&Object.hasOwnProperty.call(e,"bufferingTime")&&t.uint32(632).uint32(e.bufferingTime),null!=e.playingTime&&Object.hasOwnProperty.call(e,"playingTime")&&t.uint32(640).uint32(e.playingTime),null!=e.pauseTime&&Object.hasOwnProperty.call(e,"pauseTime")&&t.uint32(648).uint32(e.pauseTime),null!=e.bufferingEvents&&Object.hasOwnProperty.call(e,"bufferingEvents")&&t.uint32(656).uint32(e.bufferingEvents),null!=e.streamState&&Object.hasOwnProperty.call(e,"streamState")&&t.uint32(666).string(e.streamState),null!=e.aliveTime&&Object.hasOwnProperty.call(e,"aliveTime")&&t.uint32(672).uint32(e.aliveTime),null!=e.contentSteeringEnabled&&Object.hasOwnProperty.call(e,"contentSteeringEnabled")&&t.uint32(680).bool(e.contentSteeringEnabled),null!=e.contentSteeringResourceId&&Object.hasOwnProperty.call(e,"contentSteeringResourceId")&&t.uint32(688).uint32(e.contentSteeringResourceId),null!=e.contentSteeringPathwayPriority&&e.contentSteeringPathwayPriority.length)for(n=0;n<e.contentSteeringPathwayPriority.length;++n)t.uint32(698).string(e.contentSteeringPathwayPriority[n]);if(null!=e.contentSteeringPathway&&Object.hasOwnProperty.call(e,"contentSteeringPathway")&&t.uint32(706).string(e.contentSteeringPathway),null!=e.peers&&e.peers.length)for(n=0;n<e.peers.length;++n)sW.s73_metrics.Peer.encode(e.peers[n],t.uint32(810).fork()).ldelim();return null!=e.customDimension_1&&Object.hasOwnProperty.call(e,"customDimension_1")&&t.uint32(826).string(e.customDimension_1),null!=e.customDimension_2&&Object.hasOwnProperty.call(e,"customDimension_2")&&t.uint32(834).string(e.customDimension_2),null!=e.customDimension_3&&Object.hasOwnProperty.call(e,"customDimension_3")&&t.uint32(842).string(e.customDimension_3),t},e.verify=function(e){if("object"!==i(e)||null===e)return"object expected";if(!sH.isString(e.nodeId))return"nodeId: string expected";if(!sH.isString(e.deviceId))return"deviceId: string expected";if(null!=e.channelId&&e.hasOwnProperty("channelId")&&!sH.isString(e.channelId))return"channelId: string expected";if(!sH.isString(e.representationId))return"representationId: string expected";if(!sH.isString(e.streamId))return"streamId: string expected";switch(e.source){default:return"source: enum value expected";case 0:case 1:}},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/s73_metrics.Metrics"},e}(),n.Message=function(){var e;function t(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return t.prototype.type=0,t.prototype.metrics=null,Object.defineProperty(t.prototype,"message",{get:sH.oneOfGetter(e=["metrics"]),set:sH.oneOfSetter(e)}),t.encode=function(e,t){return t||(t=sq.create()),t.uint32(8).int32(e.type),null!=e.metrics&&Object.hasOwnProperty.call(e,"metrics")&&sW.s73_metrics.Metrics.encode(e.metrics,t.uint32(18).fork()).ldelim(),t},t.verify=function(e){if("object"!==i(e)||null===e)return"object expected";if(0!==e.type)return"type: enum value expected";if(null!=e.metrics&&e.hasOwnProperty("metrics")){var t=sW.s73_metrics.Metrics.verify(e.metrics);if(t)return"metrics."+t}return null},t.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/s73_metrics.Message"},t.Type=function(){var e={},t=Object.create(e);return t[e[0]="METRICS"]=0,t}(),t}(),n}();function sG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sG=function(){return!!e})()}function sz(e){return Math.round(8*e/1e3)}var sK=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,sG()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).polyNet=nK(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("Metrics"),e.eventBus=eG(e.context).getInstance(),e.dataChannelService=a7(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e.stats=of(e.context).getInstance(),e.computeMetricsTimer=ok(e.context).createInstance(),e.enableBufferingRatio=!1,e.bufferHealthGreaterZeroCounter=0,e.bufferHealthDepletedCounter=0,e.lastPeerSettings={},e.computeMetrics=e.computeMetrics.bind(e),e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.SETTINGS_CHANGED,this.handleSettingsChangedEvent,{scope:this}),this.scheduleComputeMetricsTimer()}},{key:"stop",value:function(){var e,t;null==(e=this.computeMetricsTimer)||e.cancel(),null==(t=this.eventBus)||t.offAll({scope:this})}},{key:"destroy",value:function(){this.stop(),this.computeMetricsTimer=null,this.eventBus=null,this.polyNet=null,this.logger=null,this.stats=null,this.dataChannelService=null}},{key:"enabled",get:function(){return this.settings.metricsPeriod>0}},{key:"computeMetrics",value:function(){var e,n;if(this.stats){if(this.enabled){var r=this.stats.platform.browser,i=this.stats.platform.os,o=this.stats.platform.connectionType,a=this.computeBufferHealth(),s=this.computeBufferingRatio(a),c=this.computePlaybackTime(s),u=this.stats.playback.resolution,l=this.stats.playback.viewport,f=new sV.Metrics;return f.platformName=this.transformPlatformName(r.name),f.platformVersion=null!=(e=r.version)?e:"",f.operatingSystemName=this.transformOperatingSystemName(i.name),f.operatingSystemVersion=null!=(n=i.version)?n:"",f.connectionType=this.transformConnectionType(o),f.deviceId=this.polyNet.deviceId,f.channelId=this.extractChannelId(),f.nodeId=this.extractNodeId(),f.source=this.computeSource(),f.receiveFromNodeId=this.computeParentNodeId(),f.droppedFramesPerSecond=this.computeDroppedFrames(),f.bufferHealth=a,f.cdnDownlinkThroughput=this.computeCdnThroughput(),f.p2pDownlinkThroughput=this.computeP2PThroughput(),f.connectionStatus=this.computeParentConnectionStatus(),f.roundTripTime=this.computeRoundTripTime(),f.downlinkSpeed=this.computeDownSpeed(),f.aggregateBufferFillingRate=this.computeBufferFillingRate(),f.representationBufferFillingRate=f.aggregateBufferFillingRate,f.timeToFirstFrame=this.computeTimeToFirstFrame(),f.bufferingRatio=s,f.playbackTime=c,f.joinResponseTime=this.computeJoinResponseTime(),f.natType=this.computeNatType(),f.streamId=this.extractStreamId(),f.maskedStreamUri=this.extractMaskedStreamUri(),f.representationId=this.extractRepresentationId(),f.bitrate=this.computeBitrate(),f.uplinkCapacity=this.computeUplinkCapacity(),f.peers=this.extractPeersMetrics(),f.contentRequestResponseTimesCdn=this.extractCRRTFromHTTP(),f.contentRequestResponseTimesP2p=this.extractCRRTFromP2P(),f.inboundProtocol=this.computeInboundProtocol(),f.inboundConnectionCount=this.computeInboundConnectionCount(),f.inboundPeeringType=this.computeInboundPeeringType(),f.datachannelWasNotEstablished=this.computeDatachannelWasNotEstablished(),f.peerSettings=this.extractPeerSettings(),f.sdkVersion=this.stats.polyNet.sdkVersion,f.responseCdn=this.computeResponseCdn(),f.sessionId=this.computeSessionId(),f.osName=this.computeOsName(),f.osVersion=this.computeOsVersion(),f.browserName=this.computeBrowserName(),f.browserVersion=this.computeBrowserVersion(),f.hrefLocation=this.computeLocationHref(),f.playerName=this.computePlayerName(),f.playerVersion=this.computePlayerVersion(),f.videoRes
1olutionWidth=u.width,f.videoResolutionHeight=u.height,f.viewportWidth=l.width,f.viewportHeight=l.height,f.aliveTime=this.computeAliveTime(),f.streamState=this.computeStreamState(),f.playerState=this.computePlayerState(),f.bufferingEvents=this.computeBufferingEvents(),f.startingTime=this.stats.playback.startingTime,f.seekingTime=this.stats.playback.seekingTime,f.bufferingTime=this.stats.playback.bufferingTime,f.playingTime=this.stats.playback.playingTime,f.pauseTime=this.stats.playback.pauseTime,f.contentSteeringEnabled=this.isContentSteeringEnabled,f.contentSteeringResourceId=this.stats.contentSteering.resourceId,f.contentSteeringPathway=this.extractContentSteeringPathway(),f.contentSteeringPathwayPriority=this.extractContentSteeringPathwayPriority(),f.customDimension_1=this.customDimension1,f.customDimension_2=this.customDimension2,f.customDimension_3=this.customDimension3,this.stats.clean(),this.logger.logEvery(10,"metricsComputed",tr.metricsComputed(t.stringifyMetrics(f))),this.eventBus.emit(tt.METRICS_MESSAGE,{target:this,metrics:f}),f}this.clearComputeMetricsTimer()}}},{key:"extractNodeId",value:function(){return this.polyNet.nodeId||"no-node-id"}},{key:"extractChannelId",value:function(){return this.settings.channelId}},{key:"extractStreamId",value:function(){return this.polyNet.streamId||"no-stream-id"}},{key:"extractMaskedStreamUri",value:function(){return this.stats.stream.maskedStreamUri}},{key:"extractRepresentationId",value:function(){return this.stats.stream.representationId||"no-representation-id"}},{key:"computeBitrate",value:function(){var e=this.stats.stream.parsedBitrate,t=this.stats.stream.estimatedBitrate,n=this.stats.stream.isMonoBitrate;return this.settings.enableEstimatedBitrate?"".concat(e||t):eE.isNil(e)?n?"monobitrate":void 0:"".concat(e)}},{key:"computeUplinkCapacity",value:function(){if(this.settings.teca.enableTeca)return"buffering"===this.stats.playback.state?0:this.stats.polyNet.tecaCapacity}},{key:"scheduleComputeMetricsTimer",value:function(){this.clearComputeMetricsTimer(),this.enabled&&this.computeMetricsTimer.setInterval("Timer-Metrics",this.settings.metricsPeriod,this.computeMetrics,!0)}},{key:"clearComputeMetricsTimer",value:function(){this.computeMetricsTimer&&this.computeMetricsTimer.cancel()}},{key:"extractCRRTFromHTTP",value:function(){return this.stats.polyNet.contentRequestResponseTimes?this.stats.polyNet.contentRequestResponseTimes.filter(function(e){return e.origin===i2.Origin.HTTP}).map(function(e){return e.contentRequestResponseTime}):[]}},{key:"extractCRRTFromP2P",value:function(){return this.stats.polyNet.contentRequestResponseTimes?this.stats.polyNet.contentRequestResponseTimes.filter(function(e){return e.origin===i2.Origin.WEB_RTC}).map(function(e){return e.contentRequestResponseTime}):[]}},{key:"computeBufferHealth",value:function(){var e=this.stats.playback.bufferHealth;if(!eE.isNil(e))return Math.round(e)}},{key:"computeBufferingRatio",value:function(e){if(!this.enableBufferingRatio){if(!(eE.isFinite(e)&&e>t.bufferHealthZeroThreshold))return;this.enableBufferingRatio=!0}eE.isFinite(e)&&e>=t.bufferHealthZeroThreshold?this.bufferHealthGreaterZeroCounter++:this.bufferHealthDepletedCounter++;var n=this.bufferHealthGreaterZeroCounter+this.bufferHealthDepletedCounter;return n>0?this.bufferHealthDepletedCounter/n:void 0}},{key:"computePlaybackTime",value:function(e){if(eE.isFinite(e)){var t=this.settings.metricsPeriod;if(eE.isFinite(t)&&!(t<=0))return(this.bufferHealthGreaterZeroCounter+this.bufferHealthDepletedCounter)*(t/1e3)}}},{key:"computeDroppedFrames",value:function(){return this.stats.playback.droppedFrames}},{key:"computeTimeToFirstFrame",value:function(){var e=this.stats.playback.timeToFirstFrame;return e?Math.floor(e):void 0}},{key:"computePlayerState",value:function(){return this.stats.playback.state}},{key:"computeBufferingEvents",value:function(){return this.stats.playback.bufferingEvents}},{key:"computeCdnThroughput",value:function(){return sz(this.stats.content.throughputHttp)}},{key:"computeP2PThroughput",value:function(){return sz(this.stats.content.throughputWebRTC)}},{key:"computeParentNodeId",value:function(){var e=this.dataChannelService.findFirstInboundWebRTC();return e?e.nodeId:void 0}},{key:"computeSource",value:function(){return"http"===this.stats.content.source?sV.Source.CDN:sV.Source.P2P}},{key:"computeParentConnectionStatus",value:function(){if(this.polyNet.isConnected){var e=this.dataChannelService.findFirstInboundWebRTC();return e?e.isConnected?sV.Connection.Status.P2P_CONNECTED:sV.Connection.Status.P2P_CONNECTING:sV.Connection.Status.NO_PARENT}if(!this.stats.platform.isWebRTCSupported)return sV.Connection.Status.P2P_NOT_SUPPORTED;if(!this.stats.platform.isAnyMediaSourceApiSupported)return sV.Connection.Status.MEDIA_SOURCE_EXTENSIONS_NOT_SUPPORTED;switch(this.stats.polyNet.revokedStatus){case rD.RevokedStatus.PROTOCOL_NOT_SUPPORTED:return sV.Connection.Status.PROTOCOL_NOT_SUPPORTED;case rD.RevokedStatus.NOT_ALLOWED:return sV.Connection.Status.NOT_ALLOWED;case rD.RevokedStatus.MAX_USERS_PER_API_KEY:return sV.Connection.Status.MAX_USERS_PER_KEY_REACHED;case rD.RevokedStatus.OUT_OF_LIVE_WINDOW:return sV.Connection.Status.CONTENT_NOT_SUPPORTED}return sV.Connection.Status.UNKNOWN_STATUS}},{key:"computeDownSpeed",value:function(){return eE.isNil(this.stats.content.downSpeed)?void 0:Math.round(this.stats.content.downSpeed)}},{key:"computeRoundTripTime",value:function(){var e=Math.round(eE.mean(this.stats.network.rtt));return eE.isFinite(e)?e:void 0}},{key:"computeBufferFillingRate",value:function(){return this.stats.content.bufferFillingRate}},{key:"computeSessionId",value:function(){return this.stats.polyNet.sessionId}},{key:"computeOsName",value:function(){return this.stats.platform.os.name||"unknown"}},{key:"computeOsVersion",value:function(){return this.stats.platform.os.version||"unknown"}},{key:"computeBrowserName",value:function(){return this.stats.platform.browser.name||"unknown"}},{key:"computeBrowserVersion",value:function(){return this.stats.platform.browser.version||"unknown"}},{key:"computeLocationHref",value:function(){return this.stats.platform.location}},{key:"computePlayerName",value:function(){return this.stats.platform.player.name}},{key:"computePlayerVersion",value:function(){return this.stats.platform.player.version}},{key:"computeAliveTime",value:function(){return this.stats.aliveTime}},{key:"computeStreamState",value:function(){return this.stats.stream.streamState}},{key:"handleSettingsChangedEvent",value:function(e){void 0!==e.diffSettings.metricsPeriod&&this.scheduleComputeMetricsTimer()}},{key:"computeNatType",value:function(){if(!this.stats.nat||!this.stats.nat.type)return sV.Nat.Type.UNKNOWN;switch(this.stats.nat.type){case rS.Type.UNKNOWN:return sV.Nat.Type.UNKNOWN;case rS.Type.SYMMETRIC:return sV.Nat.Type.SYMMETRIC;case rS.Type.NON_SYMMETRIC:return sV.Nat.Type.NON_SYMMETRIC;case rS.Type.SEQUENTIAL:return sV.Nat.Type.SEQUENTIAL}}},{key:"transformPlatformName",value:function(e){switch(e){case"chrome":case"chrome_webview":case"chrome_headless":return sV.Platform.Name.CHROME;case"chromium":return sV.Platform.Name.CHROMIUM;case"edge":return sV.Platform.Name.EDGE;case"ie":case"iemobile":return sV.Platform.Name.EXPLORER;case"firefox":return sV.Platform.Name.FIREFOX;case"opera":case"opera_mini":case"opera_mobi":case"opera_tablet":return sV.Platform.Name.OPERA;case"safari":case"mobile_safari":return sV.Platform.Name.SAFARI;default:return sV.Platform.Name.UNKNOWN}}},{key:"transformOperatingSystemName",value:function(e){switch(e){case"android":return sV.OperatingSystem.Name.ANDROID;case"ios":return sV.OperatingSystem.Name.IOS;case"linux":case"ubuntu":return sV.OperatingSystem.Name.LINUX;case"mac_os":return sV.OperatingSystem.Name.MACOS;case"windows":case"windows_phone":case"windows_mobile":return sV.OperatingSystem.Name.WINDOWS;default:return sV.OperatingSystem.Name.UNKNOWN}}},{key:"transformConnectionType",value:function(e){switch(e){case"bluetooth":return sV.Connection.Type.BLUETOOTH;case"cellular":return sV.Connection.Type.CELLULAR;case"ethernet":return sV.Connection.Type.ETHERNET;case"mixed":case"none":return sV.Connection.Type.NONE;case"other":return sV.Connection.Type.OTHER;case"unknown":return sV.Connection.Type.UNKNOWN;case"wifi":return sV.Connection.Type.WIFI;case"wimax":return sV.Connection.Type.WIMAX;default:return this.logger.trace("Invalid connection type: '".concat(e,"'")),sV.Connection.Type.UNKNOWN}}},{key:"computeJoinResponseTime",value:function(){var e=this.stats.polyNet.joinResponseTime,t=this.stats.polyNet.joinRequestTime;if(!(eE.isNil(t)||eE.isNil(e)||t>e))return Math.round(e-t)}},{key:"computeInboundProtocol",value:function(){var e=this.dataChannelService.findFirstConnectedInbound();if(!e)return sV.InboundProtocol.HTTP;switch(e.connectionTransport){case"http":return sV.InboundProtocol.HTTP;case"sctp":return sV.InboundProtocol.SCTP;default:return}}},{key:"computeInboundConnectionCount",value:function(){var e=this.dataChannelService.findFirstConnectedInbound();return e?e.connectionCount:1}},{key:"computeInboundPeeringType",value:function(){if(this.stats.datachannel.peeringType)switch(this.stats.datachannel.peeringType){case oH.PeeringType.INTER_ASN:return sV.PeeringType.INTER_ASN;case oH.PeeringType.INTRA_ASN:return sV.PeeringType.INTRA_ASN;case oH.PeeringType.LAN:return sV.PeeringType.LAN}}},{key:"computeDatachannelWasNotEstablished",value:function(){return this.stats.datachannel.dataChannelsNotEstablished}},{key:"isContentSteeringEnabled",get:function(){return this.settings.cs.enableCs&&!this.settings.cs.isRevoked&&!eE.isEmpty(this.settings.contentSteeringEndpoint)}},{key:"extractContentSteeringPathway",value:function(){if(this.isContentSteeringEnabled)return this.stats.contentSteering.pathwayName}},{key:"extractContentSteeringPathwayPriority",value:function(){if(this.isContentSteeringEnabled)return this.stats.contentSteering.pathwayPriority}},{key:"computeResponseCdn",value:function(){var e=this.stats.contentSteering.responseCdn;return eE.isString(e)&&(e=e.trim()),e||void 0}},{key:"extractPeersMetrics",value:function(){return this.stats.datachannel.dataChannels?this.stats.datachannel.dataChannels.filter(function(e){return e.direction===oH.Direction.OUTBOUND}).map(function(e){var t=new sV.Peer;return t.nodeId=e.nodeId,t.aggregateBufferFillingRate=e.bufferFillingRate,t.outboundConnectionStatus=e.state===oH.State.CONNECTED?sV.Connection.Status.P2P_CONNECTED:sV.Connection.Status.P2P_CONNECTING,t}):[]}},{key:"customSnakeCaseObject",value:function(e){return eE.transform(e,function e(t,n,r){nk(n)&&(n=eE.transform(n,e)),t[r=eE.snakeCase(r||"").replace(/p_2_p/g,"p2p").replace(/v_/g,"v")]=n})}},{key:"extractPeerSettings",value:function(){var e=this.customSnakeCaseObject(eE.pick(this.settings,t.reportableSettings));if(!eE.isEqual(this.lastPeerSettings,e))return this.lastPeerSettings=e,JSON.stringify(this.lastPeerSettings)}},{key:"customDimension1",get:function(){return this.settings.customDimension1||void 0}},{key:"customDimension2",get:function(){return this.settings.customDimension2||void 0}},{key:"customDimension3",get:function(){return this.settings.customDimension3||void 0}}],[{key:"stringifyMetrics",value:function(e){var t={platformName:sV.Platform.Name[e.platformName],operatingSystemName:sV.OperatingSystem.Name[e.operatingSystemName],connectionType:sV.Connection.Type[e.connectionType],connectionStatus:sV.Connection.Status[e.connectionStatus],natType:sV.Nat.Type[e.natType],inboundProtocol:sV.InboundProtocol[e.inbou
1ndProtocol],source:sV.Source[e.source]},n=e.peers.map(function(e){return Object.assign(Object.assign({},e),{outboundConnectionStatus:sV.Connection.Status[e.outboundConnectionStatus]})});return Object.assign(Object.assign(Object.assign({},e),t),{peers:n})}}])}(ez);sK.bufferHealthZeroThreshold=1e3,sK.reportableSettings=["bufferHealthThresholdRatio","enableEstimatedBitrate","enablePullOnce","loopCheckerTtl","maxConcurrentPeerNegotiation","maxOutbound","multiPeer","natTraversal","nextSegmentDurationFactor","playerContentThrottlingMode","sdkFeatureFlags","timeoutP2PConnection","uploadCapacity","teca"];var sX=eU.getInstanceFactory(sK);function sY(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sZ(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sZ(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function sZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s$=function(){return!!e})()}var sJ=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,s$()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).accumulatedCdnDownThroughput=0,e.accumulatedP2pDownThroughput=0,e.collectedCdnCrrtMessages=[],e.collectedP2pCrrtMessages=[],e.eventBus=eG(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("PublicMetricsService"),e.stats=of(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.METRICS_MESSAGE,this.handleMetricMessageEvent,{scope:this})}},{key:"stop",value:function(){this.eventBus.offAll({scope:this})}},{key:"destroy",value:function(){this.stop(),this.eventBus=null,this.settings=null,this.stats=null}},{key:"removeStaleCrrts",value:function(){var e=performance.now()-6e4;this.collectedCdnCrrtMessages=this.collectedCdnCrrtMessages.filter(function(t){return t.timestamp>=e}),this.collectedP2pCrrtMessages=this.collectedP2pCrrtMessages.filter(function(t){return t.timestamp>=e})}},{key:"getMeanCrrt",value:function(e){var t,n=0,r=0,i=sY(e);try{for(i.s();!(t=i.n()).done;){var o,a=sY(t.value.crrts);try{for(a.s();!(o=a.n()).done;)n+=o.value,r++}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}return 0===r?-1:n/r}},{key:"handleMetricMessageEvent",value:function(e){var n,r,i,o;if(null==e?void 0:e.metrics){var a=e.metrics;this.accumulatedCdnDownThroughput+=a.cdnDownlinkThroughput||0,this.accumulatedP2pDownThroughput+=a.p2pDownlinkThroughput||0;var s=eB(this.computeInboundMetrics(),1)[0],c=this.computeOutboundMetrics();this.removeStaleCrrts(),(null==(n=a.contentRequestResponseTimesCdn)?void 0:n.length)>0&&this.collectedCdnCrrtMessages.push({crrts:a.contentRequestResponseTimesCdn,timestamp:performance.now()}),(null==(r=a.contentRequestResponseTimesP2p)?void 0:r.length)>0&&this.collectedP2pCrrtMessages.push({crrts:a.contentRequestResponseTimesP2p,timestamp:performance.now()});var u={accumulatedCdnDownThroughput:this.accumulatedCdnDownThroughput,accumulatedP2pDownThroughput:this.accumulatedP2pDownThroughput,bitrate:a.bitrate,bufferFillingRate:t.format(a.representationBufferFillingRate),cdnDownThroughput:t.format(a.cdnDownlinkThroughput),connectionStatus:eE.isNil(a.connectionStatus)?void 0:"".concat(sV.Connection.Status[a.connectionStatus].toLowerCase()),date:new Date,deviceId:a.deviceId,downSpeed:t.format(a.downlinkSpeed),gapsInfo:this.stats.playback.gapsInfo,inboundNodeId:"".concat(s?s.nodeId:t.CDN_NODE_ID),isConnected:[nz.States.CONNECTED,nz.States.JOINED].includes(this.stats.polyNet.state),maskedStreamUri:a.maskedStreamUri,nodeId:a.nodeId,outboundMetrics:c,p2pDownThroughput:t.format(a.p2pDownlinkThroughput),playerBufferHealth:t.format(a.bufferHealth),playerTimeToFirstFrame:t.format(a.timeToFirstFrame),representationId:a.representationId,roun
1dTripTime:t.format(a.roundTripTime),sessionId:this.stats.polyNet.sessionId,source:eE.isNil(a.source)?void 0:"".concat(sV.Source[a.source].toLowerCase()),streamId:a.streamId,streamUri:this.stats.stream.streamUri,accumulatedP2pBytesSent:this.stats.datachannel.accumulatedP2pBytesSent,averageLastMinuteCrrtP2p:this.getMeanCrrt(this.collectedP2pCrrtMessages),averageLastMinuteCrrtCdn:this.getMeanCrrt(this.collectedCdnCrrtMessages)};null==(o=(i=this.settings).onMetrics)||o.call(i,u),this.logger.trace(tr.beaconMetrics(u))}}},{key:"computeInboundMetrics",value:function(){return this.stats.datachannel.dataChannels?this.stats.datachannel.dataChannels.filter(function(e){return e.direction===oH.Direction.INBOUND}).map(function(e){return{nodeId:"".concat(e.nodeId)}}):[]}},{key:"computeOutboundMetrics",value:function(){return this.stats.datachannel.dataChannels?this.stats.datachannel.dataChannels.filter(function(e){return e.direction===oH.Direction.OUTBOUND}).map(function(e){var n=e.state===oH.State.CONNECTED?"".concat(sV.Connection.Status[sV.Connection.Status.P2P_CONNECTED]):"".concat(sV.Connection.Status[sV.Connection.Status.P2P_CONNECTING]);return{bufferFillingRate:t.format(e.bufferFillingRate),nodeId:"".concat(e.nodeId),status:n.toLowerCase()}}):[]}}],[{key:"format",value:function(e){return eE.isNil(e)?void 0:e}}])}(ez);sJ.CDN_NODE_ID="POI";var sQ=eU.getInstanceFactory(sJ),s0=__nested_webpack_require_888620__(21076),s1=__nested_webpack_require_888620__(57045),s2=__nested_webpack_require_888620__.n(s1);function s3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s3=function(){return!!e})()}var s6=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},s8=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,s3()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("MetricsMessageSender"),e.eventBus=eG(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.METRICS_MESSAGE,this.handleMetricsMessageEvent,{scope:this})}},{key:"stop",value:function(){var e;null==(e=this.eventBus)||e.off(tt.METRICS_MESSAGE,this.handleMetricsMessageEvent,{scope:this})}},{key:"destroy",value:function(){var e;null==(e=this.eventBus)||e.offAll({scope:this})}},{key:"handleMetricsMessageEvent",value:function(e){return s6(this,arguments,void 0,function(e){var n=this,r=e.metrics;return p().mark(function e(){var i,o,a,s;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.settings.apiKey.metricSinkUrl){e.next=1;break}return n.logger.logOnce("metricSinkError","PolyNetInternalError: metricSinkUrl not correctly configured",eW.ERROR),e.abrupt("return");case 1:if((i=new sV.Message).type=sV.Message.Type.METRICS,i.metrics=n.normalizeMetrics(r),!(a=sV.Metrics.verify(i.metrics))){e.next=2;break}return e_.throw(n.logger,"Unable to send metrics due to ".concat(a)),e.abrupt("return");case 2:return o=sV.Message.encode(i).finish(),e.next=3,n.send(o);case 3:if(s=e.sent){e.next=4;break}return e.abrupt("return");case 4:if(s.status!==t.FORBIDDEN_STATUS){e.next=5;break}return n.eventBus.emit(tt.COLLECT_POLYNET_STATS,{revokedStatus:rD.RevokedStatus.NOT_ALLOWED}),n.eventBus.emit(tt.REQUEST_NO_RECOVERY,{target:n}),n.stop(),eN.throw(n.logger),e.abrupt("return");case 5:case"end":return e.stop()}},e)})()})}},{key:"normalizeMetrics",value:function(e){var t=this,n=function(e,r,i){if(nk(r)){var o=eE.transform(r,n,{});eE.isEmpty(r)||(e[i]=o)}else{if(Array.isArray(r)){var a=eE.transform(r,n,[]);return a=a.filter(function(e){return!eE.isNil(e)}),void(e[i]=a)}if("number"==typeof r&&!eE.isFinite(r))return t.logger.warn("Not valid protobuf value for metrics.".concat(i,", value=").concat(r)),void(e[i]=void 0);e[i]=r}};return eE.transform(e,n,{})}},{key:"send",value:function(e){return s6(this,void 0,void 0,p().mark(function t(){var n,r,i,o,a;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i={Authorization:this.settings.apiKey.hashedKey,"Content-Type":"application/octet-stream"},t.prev=1,t.next=2,s2().post(this.settings.apiKey.metricSinkUrl,s0.Buffer.from(e),{headers:i,responseType:"arraybuffer"});case 2:return o=t.sent,t.abrupt("return",o);case 3:return t.prev=3,a=t.catch(1),eI.throw(this.logger,"HTTP co
1de: ".concat((null==(n=a.response)?void 0:n.status)||""," URL: ").concat(this.settings.apiKey.metricSinkUrl)),t.abrupt("return",null!=(r=a.response)?r:void 0);case 4:case"end":return t.stop()}},t,this,[[1,3]])}))}}])}(ez);s8.polyNetFactoryName="MetricsMessageSender",s8.FORBIDDEN_STATUS=403;var s5=eU.getInstanceFactory(s8);function s4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s4=function(){return!!e})()}var s7=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,s4()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o)))._enabled=!1,e.metrics=sX(e.context).createInstance(),e.publicMetricsService=sQ(e.context).createInstance(),e.metricsMessageSender=s5(e.context).createInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){this.isEnabled||(this.metricsMessageSender.start(),this.publicMetricsService.start(),this.metrics.start(),this.setEnabled(!0))}},{key:"stop",value:function(){this.metricsMessageSender.stop(),this.publicMetricsService.stop(),this.metrics.stop(),this.setEnabled(!1)}},{key:"setEnabled",value:function(e){this._enabled=e}},{key:"isEnabled",get:function(){return this._enabled}},{key:"destroy",value:function(){this.stop(),this.publicMetricsService.destroy(),this.metricsMessageSender.destroy(),this.metrics.destroy(),this.publicMetricsService=null,this.metricsMessageSender=null,this.metrics=null}}])}(ez);s7.polyNetFactoryName="MetricsService";var s9=eU.getSingletonFactory(s7);function ce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ce=function(){return!!e})()}var ct=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,ce()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).polyNet=nK(e.context).getInstance(),e.metricsService=s9(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){this.metricsService.start()}},{key:"destroy",value:function(){this.polyNet=null,this.metricsService=null,this.settings=null}},{key:"enableP2P",value:function(){this.metricsService.isEnabled&&this.polyNet.updateAbility(!0)}},{key:"disableP2P",value:function(){this.polyNet.updateAbility(!1)}},{key:"enableCs",value:function(){this.settings.setup({cs:{enableCs:!0}})}},{key:"disableCs",value:function(){this.settings.setup({cs:{enableCs:!1}})}}])}(ez);ct.polyNetFactoryName="FeatureManager";var cn=eU.getSingletonFactory(ct),cr=s(function e(){r(this,e)});function ci(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ci=function(){return!!e})()}var co=function(e){function t(){var e,n,i,o;return r(this,t),n=this,o=arguments,i=u(i=t),(e=c(n,ci()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).readyState=0,e.responseText=null,e}return f(t,e),s(t)}(eC(EventTarget)),ca=function(){return s(function e(){r(this,e)},[{key:"isInit",get:function(){return"init"===this.id}}])}(),cs=function(){return s(function e(){r(this,e)},[{key:"initFragment",get:function(){return this.findFragmentById("init")}},{key:"update",value:function(e){Object.assign(this,e)}},{key:"findFragmentByUrl",value:function(e,t){if(this.fragments)return this.fragments.findByUrl(e,t)}},{key:"findFragmentById",value:function(e){if(this.fragments)return this.fragments.findById(e)}}])}(),cc=function(){return s(function e(){r(this,e),this.levels=[]},[{key:"findLevelByUrl",value:function(e,t){if(t){var n=new RegExp(t),r=n.exec(e);return r&&r[1]?this.levels.find(function(e){var t=n.exec(e.url);return!(!t||!t[1])&&r[1]===t[1]}):void 0}return this.levels.find(function(t){return t.url===e})}},{key:"findLevelById",value:function(e){return this.levels.find(function(t){return t.id===e})}}])}(),cu=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,cl=function(){return s(function e(){r(this,e)},null,[{key:"parseAttrList",value:function(e){var t,n={};for(cu.lastIndex=0,t=cu.exec(e);null!==t;){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r,t=cu.exec(e)}return n}}])}(),cf=__nested_webpack_require_888620__(86295);function ch(e,t){return cf.buildAbsoluteURL(e,t,{alwaysNormalize:!0})}function cd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cd=function(){return!!e})()}var cp=function(e){function t(){var e,n,i;return r(this,t),e=this,i=arguments,n=u(n=t),c(e,cd()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i))}return f(t,e),s(t)}(eC(Array));function cv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cv=function(){return!!e})()}
1var cg={LEVEL_PLAYLIST_REGEX_FAST:RegExp(/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?|(?!#)(\S+)|#EXT-X-BYTERANGE:*(.+)|#EXT-X-PROGRAM-DATE-TIME:(.+)|#.*/,"g"),LEVEL_PLAYLIST_REGEX_SLOW:/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,MASTER_PLAYLIST_MEDIA_REGEX:/#EXT-X-MEDIA:(.*)/g,MASTER_PLAYLIST_REGEX:/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,RESOLUTION_REGEX:/(\d+)x(\d+)/},cy=function(){function e(){r(this,e)}return s(e,[{key:"parse",value:function(t,n,r,i){if(n.indexOf("#EXTM3U")>=0)return t.absType="HLS",n.indexOf("#EXTINF:")>=0?e.parseLevelPlaylist(t,n,r,i):e.parseMasterPlaylist(t,n,r)}}],[{key:"parseMasterPlaylist",value:function(t,n,r){function i(e){var t=cg.RESOLUTION_REGEX.exec(e);if(!t)return{width:void 0,height:void 0};var n=Number(t[1]),r=Number(t[2]);return{width:eE.isFinite(n)?n:void 0,height:eE.isFinite(r)?r:void 0}}var o,a=new cc;for(a.url=r,a.levels=[],cg.MASTER_PLAYLIST_REGEX.lastIndex=0,o=cg.MASTER_PLAYLIST_REGEX.exec(n);null!==o;){var s=new cs,c=cl.parseAttrList(o[1]);s.url=ch(r,o[2]),s.bitrate=parseInt(c.BANDWIDTH),s.resolution=i(c.RESOLUTION),s.mediaType="VIDEO",o=cg.MASTER_PLAYLIST_REGEX.exec(n),a.levels.push(s)}for(var u=eE.sortBy(a.levels,function(e){return-e.bitrate}),l=0;l<u.length;l++)u[l].id="".concat(l+1," of ").concat(u.length);return e.parseMasterPlaylistMedia(n,r).forEach(function(e){return a.levels.push(e)}),t.manifest=a,t}},{key:"parseMasterPlaylistMedia",value:function(e,t){var n,r,i,o=[];for(cg.MASTER_PLAYLIST_MEDIA_REGEX.lastIndex=0,i=cg.MASTER_PLAYLIST_MEDIA_REGEX.exec(e);null!==i;){var a=cl.parseAttrList(i[1]),s=new cs;s.mediaType=a.TYPE,a.URI&&(s.url=ch(t,a.URI)),(a["GROUP-ID"]||a.NAME)&&(s.id="".concat(null!=(n=a["GROUP-ID"])?n:"").concat(null!=(r=a.NAME)?r:"")),o.push(s),i=cg.MASTER_PLAYLIST_MEDIA_REGEX.exec(e)}return o}},{key:"parseLevelPlaylist",value:function(e,t,n,i){var o,a,l=0;(a=new cs).url=n;var h,d,p=new ca,v=i||{},g=v.blacklistedFragmentUrlRegex,y=v.fragmentUrlSnRegex,m=v.fragmentUrlSubcontentRegex,b=v.urlLookupFilterRegex;for(a.fragments=new(function(e){function t(){var e,n,i;return r(this,t),e=this,i=arguments,n=u(n=t),c(e,cv()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i))}return f(t,e),s(t,[{key:"findById",value:function(e){return this.find(function(t){return t.id===e})}},{key:"findByUrl",value:function(e,t){if(t){var n=new RegExp(t),r=n.exec(e);return r&&r[1]?this.find(function(e){var t=n.exec(e.url);return!(!t||!t[1])&&r[1]===t[1]}):void 0}return this.find(function(t){return t.url===e})}}])}(cp)),d=cg.LEVEL_PLAYLIST_REGEX_FAST.exec(t),cg.LEVEL_PLAYLIST_REGEX_FAST.lastIndex=0;null!==d;){var S=d[1];if(S)p.duration=1e3*parseFloat(S);else if(d[3]){if(!isNaN(p.duration)){var E=l++;p.sn=E,a.targetDuration&&(p.presentationTime=E*a.targetDuration);var C=(" "+d[3]).slice(1);if(p.url=ch(n,C),g&&g.test(p.url))p.id="unknown";else if(y){var w=y.exec(p.url);if(w&&w[1]){var T=parseInt(w[1]);if(m){var k=m.exec(p.url);if(k&&k[1]){var _=k[1],R=1e7,O=Math.floor(Number.MAX_SAFE_INTEGER/1e7),I=iJ.crc32FromString(_)%O;p.id=I*R+T%R}else p.id="unknown"}else p.id=T}else p.id="unknown"}else p.id=E;"unknown"!==p.id&&a.fragments.push(p),p=new ca}}else{for(d=d[0].match(cg.LEVEL_PLAYLIST_REGEX_SLOW),h=1;h<d.length&&void 0===d[h];h++);var N=(" "+d[h+1]).slice(1);switch(d[h]){case"PLAYLIST-TYPE":var x=N.toUpperCase();switch(x){case"VOD":case"LIVE":case"EVENT":e.streamType=x}break;case"MEDIA-SEQUENCE":l=parseInt(N);break;case"TARGETDURATION":a.targetDuration=1e3*parseFloat(N);break;case"ENDLIST":e.isLive=!1}}d=cg.LEVEL_PLAYLIST_REGEX_FAST.exec(t)}if(e.manifest&&e.manifest.url){var A=e.manifest.findLevelByUrl(a.url,b);a.mediaType=A.mediaType,A.update(a)}else e.manifest=new cc,a.id="monobitrate",a.mediaType="VIDEO",e.manifest.levels.push(a);if(e.isLive=null==(o=e.isLive)||o,a.targetDuration&&a.fragments.length){var P=a.fragments[a.fragments.length-1];P&&eE.isFinite(P.sn)&&"VIDEO"==a.mediaType&&(e.manifest.startTime=Date.now()-Number(P.sn)*a.targetDuration)}return e}}])}(),cm=__nested_webpack_require_888620__(8367);function cb(e,t,n,r,i){null!=i&&"number"==typeof i&&(i=Math.round(i));var o={Bandwidth:r,Number:n,RepresentationID:t,Time:i};return e.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(e,t,n,r){if("$$"===e)return"$";var i,a=o[t];if(null==a)return e;switch("RepresentationID"===t&&n&&(n=void 0),r){case void 0:case"d":case"i":case"u":default:i=a.toString();break;case"o":i=a.toString(8);break;case"x":i=a.toString(16);break;case"X":i=a.toString(16).toUpperCase()}return Array(Math.max(0,(window.parseInt(n,10)||1)-i.length)+1).join("0")+i})}function cS(e,t,n){return t=u(t),c(e,cE()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function cE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cE=function(){return!!e})()}function cC(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return cw(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cw(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function cw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function cT(e){var t=/^PT(?:([1-9][0-9]*)H)?(?:([1-9][0-9]*)M)?(?:([0-9]+(?:\.[0-9]+)?)S)?$/.exec(e),n=0;return t&&(t[1]&&(n+=36e5*Number.parseInt(t[1])),t[2]&&(n+=6e4*Number.parseInt(t[2])),t[3]&&(n+=1e3*Number.parseFloat(t[3]))),n}var ck=function(){return s(function e(){r(this,e)},[{key:"parse",value:function(e,t,n){e.absType="DASH",e.url||(e.url=n);var r=["S","BaseURL"],i=new cm.XMLParser({ignoreAttributes:!1,attributeNamePrefix:"",isArray:function(e){return -1!==r.indexOf(e)}}).parse(t),o=new cc;o.url=i.MPD.Location||n,e.url&&o.url!==n&&(e.url=n),e.streamType="dynamic"===i.MPD.type?"LIVE":"VOD",o.startTime=i.MPD.availabilityStartTime&&new Date(i.MPD.availabilityStartTime).getTime();var a=n;if(i.MPD.BaseURL&&(a=ch(a,function(e){var t="";return Array.isArray(e.BaseURL)&&e.BaseURL[0]&&(t=e.BaseURL[0]["#text"]||e.BaseURL[0]),t}(i.MPD))),i.MPD.Period.BaseURL&&(a=ch(a,i.MPD.Period.BaseURL)),i.MPD.Period.AdaptationSet&&i.MPD.Period.AdaptationSet[Symbol.iterator]){var s,c=cC(i.MPD.Period.AdaptationSet);try{for(c.s();!(s=c.n()).done;){var u,l=s.value,f=cC(Array.isArray(l.Representation)?l.Representation:[l.Representation]);try{for(f.s();!(u=f.n()).done;){var h=u.value,d=new cs;d.id=h.id,d.bitrate=parseInt(h.bandwidth),d.mediaType=cN(h.mimeType||l.mimeType||l.contentType),d.resolution=cP(l,h);var p=cT(i.MPD.Period.start),v=h.SegmentTemplate||l.SegmentTemplate,g=h.SegmentList||l.SegmentList;v&&(d.fragments=cR(v,d.id,h,a,p)),g&&(d.fragments=c_(g,a,p)),o.levels.push(d)}}catch(e){f.e(e)}finally{f.f()}}}catch(e){c.e(e)}finally{c.f()}}return e.manifest=o,e}}])}();function c_(e,t,n){var i=new(function(e){function t(){return r(this,t),cS(this,t,arguments)}return f(t,e),s(t,[{key:"findById",value:function(e){return this.find(function(t){return t.id===e})}},{key:"findByUrl",value:function(e){return this.find(function(t){return t.url===e})}}])}(cp)),o=Number(e.timescale),a=cI(e).segmentDuration,c=a&&cO(a,o);if(e.SegmentURL)for(var u=cx(e),l=0;l<e.SegmentURL.length;l++){var h=e.SegmentURL[l].media,d=new ca;d.url=ch(t,h),d.id=u+l,d.duration=c,d.presentationTime=cA({segmentNumber:u+l,startNumber:1,segmentDuration:a,segmentTimescale:o})+n,i.push(d)}return i}function cR(e,t,n,i,o){return new(function(a){function c(){return r(this,c),cS(this,c,arguments)}return f(c,a),s(c,[{key:"findByUrl",value:function(t){var r=function(e,t,n,r){for(var i=function(e){return e.replace(/[.*+?^{}()|[\]\\]/g,"\\$&")},o=cb(e.media,t.id,null,t.bandwidth,null),a=ch(r,o),s={N:void 0,T:void 0},c=/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,u=c.exec(o);u;){var l=new RegExp(i(a).replace(u[0],"(\\w+)").replace(/\$\w+\$/g,"\\w+")).exec(n);if(l)switch(u[1]){case"Number":s.N=l[1];break;case"Time":s.T=l[1]}u=c.exec(o)}if(s.N||s.T)return s}(e,n,t,i);if(r){var a=r.N?r.N:r.T;a=Number.isNaN(Number.parseInt(a))?a:parseInt(a);var s,c=Number(e.timescale),u=cx(e),l=cI(e,a,u),f=l.segmentDuration,h=l.segmentPts;f&&(s=cO(f,c));var d=new ca;return d.url=t,d.id=a,d.duration=s,d.presentationTime=(h?cO(h,c):cA({segmentNumber:a,segmentDuration:f,startNumber:u,segmentTimescale:c}))+o,d}}},{key:"findById",value:function(r){var a,s=cb(e.media,t,r,n.bandwidth,r),c=cx(e),u=Number(e.timescale),l=cI(e,r,c),f=l.segmentDuration,h=l.segmentPts;f&&(a=cO(f,u));var d=new ca;return d.url=ch(i,s),d.id=r,d.duration=a,d.presentationTime=(h?cO(h,u):cA({segmentNumber:r,startNumber:c,segmentDuration:f,segmentTimescale:u}))+o,d}}])}(cp))}function cO(e,t){return Math.round(e/(t||1)*1e3)}function cI(e,t,n){if(e.SegmentTimeline&&e.SegmentTimeline.S){var r=e.SegmentTimeline.S,i=new Map,o=new Map,a=0,s=n;return r.forEach(function(e){e.t&&(a=parseInt(e.t));for(var t=parseInt(e.d),n=e.r?parseInt(e.r)+1:1,r=0;r<n;r++){var c={segmentDuration:t,segmentPts:a};i.set(a,c),o.set(s,c),a+=t,s++}}),i.get(t)||o.get(t)||{}}return e.duration?{segmentDuration:Number(e.duration)}:{}}
1function cN(e){var t=e.toLowerCase();return t.includes("video")?"VIDEO":t.includes("audio")?"AUDIO":"APPLICATION"}function cx(e){var t=Number.parseInt(e.startNumber);return Number.isFinite(t)?t:1}function cA(e){var t=e.segmentNumber,n=e.segmentDuration,r=e.segmentTimescale;return cO((t-e.startNumber)*n,r)}function cP(e,t){function n(e){return"number"==typeof e&&isFinite(e)}var r=Number(t.width||e.width),i=Number(t.height||e.height);return{width:n(r)?r:void 0,height:n(i)?i:void 0}}function cD(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return cM(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cM(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function cM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var cB=function(){function e(){r(this,e)}return s(e,null,[{key:"getStreamInfoFromUrl",value:function(e,t,n){if(!e||!t)return{stream:void 0,manifest:void 0,level:void 0,fragment:void 0};var r=e.manifest;if(!r)return e.url===t?{stream:e,manifest:void 0,level:void 0,fragment:void 0}:{stream:void 0,manifest:void 0,level:void 0,fragment:void 0};if(r.url===t)return{stream:e,manifest:r,level:void 0,fragment:void 0};var i=r.findLevelByUrl(t,n);if(i)return{stream:e,manifest:r,level:i,fragment:void 0};var o,a=cD(r.levels);try{for(a.s();!(o=a.n()).done;){var s=o.value,c=s.findFragmentByUrl(t,n);if(c)return{stream:e,manifest:r,level:s,fragment:c}}}catch(e){a.e(e)}finally{a.f()}return{stream:void 0,manifest:void 0,level:void 0,fragment:void 0}}},{key:"updateStreamWithUrl",value:function(t,n,r){var i=this.extractAbsTypeFromUrl(n);return t||(t=new oY),t.url||(t.url=n,t.absType=i),!e.getStreamInfoFromUrl(t,n,r).stream&&i&&((t=new oY).url=n,t.absType=i),t}},{key:"updateStreamWithContent",value:function(t,n,r,i){if("string"!=typeof r)return t;var o=e.getParser(n);return o?o.parse(t,r,n,i):t}},{key:"extractAbsTypeFromUrl",value:function(e){if(e){var t=eB(e.split("?"),1)[0];switch(t.substring(t.lastIndexOf(".")+1)){case"m3u8":case"m3u":return"HLS";case"mpd":return"DASH"}}}},{key:"getParser",value:function(e){if(e){var t=eB(e.split("?"),1)[0];switch(t.substring(t.lastIndexOf(".")+1)){case"m3u8":case"m3u":return new cy;case"mpd":return new ck}}}}])}();function cL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cL=function(){return!!e})()}var cj=function(e){function t(e,n,i){var o,a,s,l;return r(this,t),a=this,l=["progress",i],s=u(s=t),(o=c(a,cL()?Reflect.construct(s,l||[],u(a).constructor):s.apply(a,l))).loaded=e,o.total=n,o}return f(t,e),s(t)}(eC(Event)),cF=s(function e(){r(this,e)});function cU(e,t,n){if(n.completed){var r=n.status,i=200===n.status,o=i?"OK":"Bad Request",a=n.contentData,s=n.contentLength,c=e.responseType,u=n.url,l=n.headers||{};t.responseText=e.responseText=a,t.byteLength=s,t.responseType=c,t.response=e.response=a,t.ok=i,t.statusCode=t.status=e.status=r,t.statusText=e.statusText=o,t.headers=l,t.url=u,t.data=a}}var cq=__nested_webpack_require_888620__(40837),cH=__nested_webpack_require_888620__.n(cq);function cW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cW=function(){return!!e})()}var cV=function(e){function t(){var e,n,i;return r(this,t),e=this,i=arguments,n=u(n=t),c(e,cW()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i))}return f(t,e),s(t,[{key:"save",value:function(e){this.normalized=nR(e)}},{key:"ttl",get:function(){var e;return(null==(e=this.normalized)?void 0:e.ttl)||6}},{key:"reloadUri",get:function(){var e;return null==(e=this.normalized)?void 0:e.reloadUri}},{key:"pathwayPriority",get:function(){var e;return(null==(e=this.normalized)?void 0:e.pathwayPriority)||[]}},{key:"pathwayClones",get:function(){return this.normalized.pathwayClones||[]}}])}(ez);cV.polyNetFactoryName="SteeringManifest";var cG=eU.getSingletonFactory(cV);function cz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cz=function(){return!!e})()}
1var cK=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},cX=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,cz()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).settings=nA(e.context).getInstance(),e.eventBus=eG(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("ManifestService"),e.fetchManifestTimer=ok(e.context).createInstance(),e.polyNet=nK(e.context).getInstance(),e.manifest=cG(e.context).getInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){this.fetchManifest()}},{key:"stop",value:function(){var e,t;(null==(e=this.fetchManifestTimer)?void 0:e.isRunning)&&(null==(t=this.fetchManifestTimer)||t.cancel())}},{key:"destroy",value:function(){this.stop(),this.fetchManifestTimer=null,this.settings=null,this.eventBus=null,this.logger=null,this.polyNet=null,this.manifest=null}},{key:"isEnabled",get:function(){return!this.polyNet.isInNoRecovery&&this.settings.cs.enableCs&&!this.settings.cs.isRevoked}},{key:"fetchManifest",value:function(){return cK(this,void 0,void 0,p().mark(function e(){var t;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.manifestUrl&&this.isEnabled){e.next=1;break}return e.abrupt("return");case 1:return this.logger.trace(tr.fetchingSteeringManifest()),e.next=2,this.fetch(this.manifestUrl);case 2:if(t=e.sent){e.next=3;break}return e.abrupt("return");case 3:(null==t?void 0:t.data)&&(this.logger.trace(tr.contentSteeringManifestResponse(JSON.stringify(t.data))),this.manifest.save(t.data),this.eventBus.emit(tt.COLLECT_CS_STATS,Object.assign({},this.collectStats()))),this.scheduleNextRequest();case 4:case"end":return e.stop()}},e,this)}))}},{key:"fetch",value:function(e){return cK(this,void 0,void 0,p().mark(function t(){var n,r,i;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=1,s2().get(e,{headers:{accept:"application/json"}});case 1:return t.abrupt("return",t.sent);case 2:if(t.prev=2,!((null==(n=(i=t.catch(0)).response)?void 0:n.status)>=400&&(null==(r=i.response)?void 0:r.status)<=499)){t.next=3;break}return eA.throw(this.logger),this.settings.setup({cs:{isRevoked:!0}}),this.stop(),t.abrupt("return");case 3:this.logger.error(tr.genericErrorFetchingSteeringManifest(e));case 4:case"end":return t.stop()}},t,this,[[0,2]])}))}},{key:"manifestUrl",get:function(){var e=this.manifest.reloadUri?this.manifest.reloadUri:this.settings.contentSteeringEndpoint;if(e){var t=new URLSearchParams(cH()(e).query);return this.polyNet.deviceId&&t.set("device_id",this.polyNet.deviceId),this.polyNet.nodeId&&t.set("node_id",this.polyNet.nodeId),cH()(e).set("query",t.toString()).toString()}}},{key:"scheduleNextRequest",value:function(){var e,t=this,n=1e3*this.manifest.ttl;null==(e=this.fetchManifestTimer)||e.setTimeout("Timer-Fetch-CS",n,function(){return t.fetchManifest()},!0)}},{key:"collectStats",value:function(){var e=this.manifestUrl;if(e)return{resourceId:Number(new URLSearchParams(cH()(e).query).get("resource_id")),pathwayPriority:eL(this.manifest.pathwayPriority)}}}])}(ez);cX.polyNetFactoryName="ManifestService";var cY=eU.getSingletonFactory(cX);function cZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cZ=function(){return!!e})()}var c$=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,cZ()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).manifestService=cY(e.context).getInstance(),e.manifest=cG(e.context).getInstance(),e.eventBus=eG(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("ContentSteeringService"),e.settings=nA(e.context).getInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){var e=this;this.eventBus.on(tt.SETTINGS_CHANGED,function(t){return e.handleSettingsChanged(t)},{scope:this}),this.manifestService.isEnabled&&this.manifestService.start()}},{key:"stop",value:function(){var e;null==(e=this.eventBus)||e.offAll({scope:this}),this.manifestService.stop()}},{key:"destroy",value:function(){var e,n,r,i,o;(e=t,n="destroy",r=this,o=l(u(1&(i=3)?e.prototype:e),n,r),2&i&&"function"==typeof o?function(e){return o.apply(r,e)}:o)([]),this.stop()}},{key:"isEnabled",get:function(){return this.settings.cs.enableCs&&!this.settings.cs.isRevoked&&!eE.isEmpty(this.settings.contentSteeringEndpoint)}},{key:"replaceBaseUrl",value:function(e){return this.manifestService.isEnabled&&this.firstCdnHostname?(this.eventBus.emit(tt.COLLECT_CS_STATS,{pathwayName:this.firstPathwayId}),this.replaceHostname(e,this.firstCdnHostname)):e}},{key:"firstPathwayId",get:function(){return this.manifest.pathwayPriority[0]}},{key:"firstCdnHostname",get:function(){var e=this.firstPathwayId;if(e){var t=this.manifest.pathwayClones.find(function(t){return t.id===e});if(t)return t.uriReplacement.host}}},{key:"replaceHostname",value:function(e,t){var n=cH()(e).set("hostname",t).toString();return this.logger.trace(tr.replacedUrlByHostname(e,n)),n}},{key:"handleSettingsChanged",value:function(e){var t;eE.isNil(null==(t=e.diffSettings)?void 0:t.cs)||(this.stop(),this.start())}}])}(ez);c$.polyNetFactoryName="ContentSteeringService";var cJ=eU.getSingletonFactory(c$);
1function cQ(e,t,n){return t=u(t),c(e,c0()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function c0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c0=function(){return!!e})()}var c1=function(e){function t(e){var n,i=e.message,o=e.url,a=void 0===o?"":o,s=e.headers,c=void 0===s?{}:s,u=e.errorCode,l=void 0===u?500:u,f=e.errorReason,h=void 0===f?"":f,d=e.aborted,p=void 0!==d&&d;return r(this,t),(n=cQ(this,t,[i])).url=a,n.headers=c,n.errorCode=l,n.errorReason=h,n.aborted=p,n}return f(t,e),s(t)}(ek),c2=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"internal";return r(this,t),(e=cQ(this,t)).id=n,e.logger=e0(e.context).getInstance().getLogger("PolyNetRequester-".concat(e.id)),e.settings=nA(e.context).getInstance(),e.eventBus=eG(e.context).getInstance(),e.contentCacheService=o6(e.context).getInstance(),e.contentRequestService=aF(e.context).getInstance(),e.contentSteeringService=cJ(e.context).getInstance(),e.completed=!1,e}return f(t,e),s(t,[{key:"request",value:function(e){var n=this;return this.options=e,!eE.isNil(this.options.id)&&this.options.cachePolicy===i2.Policy.CACHEABLE&&(this.options.isLive||this.settings.p2pAllowVod)||(this.options.id=--t.nonCachableSeq),this.options.withCredentials=this.settings.withCredentials,this.options.external=!0,this.originalHost=new(cH())(this.options.url).hostname,this.settings.transformRequest(this.options),this.options.url=this.contentSteeringService.replaceBaseUrl(this.options.url),this.stats={timeFirst:void 0,timeRequest:performance.now(),timeResponse:void 0},this.contentCache=this.contentRequestService.request(this.options),this.logger.trace("Request url: ".concat(this.options.url," - contentId: ").concat(this.options.id," - cacheSeq: ").concat(this.contentCache.seq," - retries: ").concat(this.contentCache.retries)),new iS(function(e){n.contentCache.asObservable.subscribe({next:function(){n.emitProgress(e,n.contentCache)},complete:function(){n.emitComplete(e,n.contentCache)},error:function(){n.emitError(e,n.contentCache)}})})}},{key:"abort",value:function(){var e;clearTimeout(this.fetchTimeout),this.fetchTimeout=null,this.completed||this.abortCache(),null==(e=this.eventBus)||e.offAll({scope:this}),this.context=null,this.options=null,this.eventBus=null,this.contentCacheService=null,this.contentRequestService=null}},{key:"abortCache",value:function(){if(!this.completed){this.completed=!0;var e=this.contentCacheService.findOneContentCacheByFullId({representationId:this.options.representationId,id:this.options.id});this.logger.trace("Abort content cache: contentId: ".concat(e.id," - cacheSeq: ").concat(e.seq," - retries: ").concat(e.retries," - representationId: ").concat(e.representationId," / ").concat(e.url)),this.contentCacheService.errorContentCache(e,!0,"player-abort")}}},{key:"isInternal",get:function(){return"internal"===this.id}},{key:"buildResponseFromCache",value:function(e){var t=this;return{completed:!1,contentData:"arraybuffer"===this.options.responseType?e.contentData:n9.toString(e.contentData),contentLength:e.contentLength,contentLoaded:e.loaded,status:200,url:function(e){return t.contentSteeringService.isEnabled?e?new(cH())(e).set("hostname",t.originalHost).toString():void 0:e}(e.responseUrl),headers:e.headers}}},{key:"computeContentFetchDelay",value:function(e,t,n,r){var i=e.end-e.start,o=t.end-t.start,a=eE.isFinite(r)&&r>0?Math.min(r,o):o;return!n||i>=a?{delay:0,downloadDuration:o,fetchDuration:i,expectedTotalDuration:a}:{delay:a-i,downloadDuration:o,fetchDuration:i,expectedTotalDuration:a}}},{key:"emitProgress",value:function(e,t){this.stats.timeFirst||(this.stats.timeFirst=performance.now()),this.reportStatsRequestResponseTime(t);var n=this.buildResponseFromCache(this.contentCache);e.next(n)}},{key:"emitComplete",value:function(e,t){var n=this,r=t.duration,i=t.id,o=t.isCacheable,a=t.timeFirst,s=t.timeResponse;this.stats.timeFirst||(this.stats.timeFirst=performance.now());var c=this.settings.playerContentThrottlingMode,u=c!==tT.OFF,l=c===tT.DURATION?r||this.settings.defaultContentDuration:void 0,f=this.computeContentFetchDelay({start:this.stats.timeRequest,end:performance.now()},{start:a,end:s},o,l),h=f.delay,d=f.fetchDuration,p=f.downloadDuration,v=f.expectedTotalDuration,g=this.buildResponseFromCache(t);this.reportStatsCdn(t),this.reportStatsEstimatedBitrate(g),this.completed=!0;var y=u?h:0;y>0&&this.logger.trace("Delaying ".concat(y," ms for contentId: ").concat(i," - cacheSeq: ").concat(t.seq," - retries: ").concat(t.retries,": fetch duration ").concat(d,", download duration ").concat(p,", expected total duration ").concat(v)),this.fetchTimeout=setTimeout(function(){g.completed=!0,g.status=200,n.logger.debug(tr.finishedRequest(g.url,t.origin,n.stats.timeRequest,n.stats.timeFirst,n.stats.timeResponse=performance.now(),i,t.duration)),e.next(g),e.complete()},y)}},{key:"emitError",value:function(e,t){if(!t.isResourceFromP2P||this.isInternal){this.completed=!0,this.logger.trace("Error fetching: ".concat(this.options.url," / contentId: ").concat(this.options.id," - cacheSeq: ").concat(t.seq," - retries: ").concat(t.retries," - Reason: ").concat(t.isAborted?"Aborted":"Internal Error"));var n=new c1({aborted:t.isAborted,errorCode:t.errorCode,errorReason:t.isAborted?"Aborted":"Internal Error",message:"Error fetching: ".concat(this.options.url," / ").concat(this.options.id),url:t.responseUrl||t.url});e.error(n)}else this.logger.trace("Ignoring error fetching P2P content: ".concat(this.options.url," / contentId: ").concat(this.options.id," - cacheSeq: ").concat(t.seq," - retries: ").concat(t.retries," - Reason: ").concat(t.isAborted?"Aborted":"Internal Error"))}},{key:"reportStatsRequestResponseTime",value:function(e){if(e.isCacheable&&e.loaded&&!this.fetchProgressStartTime){this.fetchProgressStartTime=performance.now();var t={contentRequestResponseTime:Math.floor(this.fetchProgressStartTime-this.stats.timeRequest),origin:e.origin};this.eventBus.emit(tt.COLLECT_POLYNET_STATS,{contentRequestResponseTimes:t})}}},{key:"reportStatsCdn",value:function(e){var t=(null==e?void 0:e.headers)&&e.headers["x-cdn"]?e.headers["x-cdn"]:void 0;this.eventBus.emit(tt.COLLECT_CS_STATS,{responseCdn:t})}},{key:"reportStatsEstimatedBitrate",value:function(e){var t=this.options.representationId;if(t&&(!this.options.cachePolicy||this.options.cachePolicy===i2.Policy.CACHEABLE)&&this.options.duration&&e.contentLoaded){var n=Math.floor(e.contentLoaded/this.options.duration*8e3);this.eventBus.emit(tt.COLLECT_STREAMING_STATS,{stats:{estimatedBitrate:{representationId:t,bitrate:n}}})}}}])}(ez);c2.nonCachableSeq=0;var c3=eU.getInstanceFactory(c2);function c6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c6=function(){return!!e})()}var c8=function(e){function t(){var e,n,i,o,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"internal";return r(this,t),n=this,i=u(i=t),(e=c(n,c6()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).id=a,e.streamInfoService=oJ(e.context).getInstance(),e.eventBus=eG(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("Requester-".concat(e.id)),e.contentCacheService=o6(e.context).getInstance(),e.parserConfig={},e.eventBus.on(tt.SETTINGS_CHANGED,function(t){return e.handleSettingsChangedEvent(t)},{scope:e}),e}return f(t,e),s(t,[{key:"handleSettingsChangedEvent",value:function(e){var t=null==e?void 0:e.diffSettings;function n(e){if(!e)return null;try{var t=tC(e)?tE(e):null;return t?new RegExp(t):null}catch(e){return null}}eE.isNil(null==t?void 0:t.hlsParser)||(eE.merge(this.parserConfig,function(e){for(var t=JSON.parse(JSON.stringify(e)),r=0,i=Object.keys(t);r<i.length;r++){var o=i[r];t[o]=n(t[o])}return t}(null==t?void 0:t.hlsParser)),this.contentCacheService.findAllCacheable().forEac
1h(function(e){e.unsafe=!0}))}},{key:"isInternal",get:function(){return"internal"===this.id}},{key:"get",value:function(e){var t=this,n=this.getInfoFromOptions(e),r=n.streamInfo,i=n.polyNetOptions;return this.logger.debug(tr.requestCreated(i.url,i.id)),this.eventBus.emit(tt.STREAM_INFO,{polyNetOptions:i,streamInfo:r}),c3(this.context).createInstance(this.id).request(i).pipe(iO(function(e){return e.completed&&t.parseResponses(e)&&t.printPlaylistSummary(r),e}))}},{key:"parseResponses",value:function(e){var t=this.streamInfoService.stream;try{this.streamInfoService.stream=cB.updateStreamWithContent(t,e.url,e.contentData,this.parserConfig)}catch(e){this.logger.error("Error while trying to parse the playlist: ".concat(e))}return e.completed&&"string"==typeof e.contentData&&this.logger.logOnce(e.url,tr.printPlaylist(e.url,e.contentData)),e}},{key:"printPlaylistSummary",value:function(e){var t,n,r;if(eE.isNil(e.fragment)&&!eE.isEmpty(null==(t=e.level)?void 0:t.fragments)){var i=e.level,o=i.fragments,a=i.targetDuration,s=i.url,c=null==(n=o[0])?void 0:n.id,u=null==(r=o[o.length-1])?void 0:r.id;this.logger.debug(tr.printHlsMediaPlaylistSummary(s,a,o.length,c,u))}}},{key:"getInfoFromOptions",value:function(e){var t,n,r=function(e){var t=function(e){try{return new(cH())(e).toString()}catch(t){return e}}(e.url||e.uri);return Object.assign(Object.assign({},e),{url:t})}(e);this.streamInfoService.stream=cB.updateStreamWithUrl(this.streamInfoService.stream,r.url,null==(t=this.parserConfig)?void 0:t.urlLookupFilterRegex);var i=cB.getStreamInfoFromUrl(this.streamInfoService.stream,r.url,null==(n=this.parserConfig)?void 0:n.urlLookupFilterRegex),o=function(e,t){var n,r,i,o,a,s,c,u=new cF;u.url=t.url||t.uri,u.method=t.method||"GET",u.data=t.body||t.data,u.headers=t.headers||{};var l=e.fragment&&"VIDEO"===(null==(n=e.level)?void 0:n.mediaType),f=(null==(r=e.fragment)?void 0:r.isInit)||u.headers.Range;return u.cachePolicy=l&&!f?i2.Policy.CACHEABLE:i2.Policy.NO_CACHEABLE,u.isLive=null==(i=e.stream)?void 0:i.isLive,u.responseType=t.responseType||(null==e?void 0:e.fragment)&&"arraybuffer",u.id=null==(o=e.fragment)?void 0:o.id,u.representationId="VIDEO"===(null==(a=e.level)?void 0:a.mediaType)&&(null==(s=e.level)?void 0:s.id),u.duration=null==(c=e.fragment)?void 0:c.duration,u}(i,r);return{streamInfo:i,playerOptions:r,polyNetOptions:o}}},{key:"fetch",value:function(e,t){n=e,"string"==typeof e&&(n=Object.assign(Object.assign({},t),{url:e}));var n,r=this.get(Object.assign(Object.assign({},n),{responseType:n.responseType,url:n.url,headers:n.headers}));return new Promise(function(e,t){var i=new cr,o=r.subscribe({complete:function(){return e(i)},error:function(e){var n=new Response(e.message,{status:e.errorCode||418,statusText:e.errorReason});return Object.defineProperty(n,"url",{value:e.url}),t(n)},next:function(e){return cU(n,i,e)}});n.signal&&(n.signal.onabort=function(){null==o||o.unsubscribe()})})}},{key:"xhr",value:function(e,t){var n,r=this,i=new cr,o=Object.assign(Object.assign({},e),{responseType:e.responseType,url:e.url||e.uri}),a=new co;return a.abort=function(){return null==n?void 0:n.unsubscribe()},a.send=function(){n=r.get(o).subscribe({complete:function(){a.readyState=4,a.dispatchEvent(new Event("readystate")),t(null,i)},error:function(e){var n=new Response(e.message,{status:e.errorCode||418,statusText:e.errorReason});return Object.defineProperty(n,"url",{value:e.url}),a.readyState=4,a.aborted=e.aborted,t(e,n)},next:function(e){a.dispatchEvent(new cj(e.contentLoaded,e.contentLength)),cU(a,i,e)}})},a}}])}(ez);c8.polyNetFactoryName="Requester";var c5=eU.getInstanceFactory(c8);function c4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c4=function(){return!!e})()}var c7=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},c9=/^http(?:s)?:\/\/(?:[\w.%-])+\//;function ue(e){var t=c9.exec(e);return t?t[0]:null}var ut=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,c4()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("ContentResolver"),e.eventBus=eG(e.context).getInstance(),e.requester=c5(e.context).createInstance(),e.contentRequestService=aF(e.context).getInstance(),e.streamInfoService=oJ(e.context).getInstance(),e.settings=nA(e.context).getInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){this.eventBus.on(tt.CONTENT_URL_MISSING,this.handleContentUrlMissing,{scope:this}),this.eventBus.on(tt.MANIFEST_INFO_MISSING,this.handleManifestInfoMissing,{scope:this}),this.eventBus.on(tt.STREAM_INFO,this.handleStreamInfoEvent,{scope:this})}},{key:"destroy",value:function(){this.eventBus.offAll({scope:this})}},{key:"handleContentUrlMissing",value:function(e){return c7(this,void 0,void 0,p().mark(function t(){var n,r,i;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.options){t.next=1;break}return t.abrupt("return");case 1:if(r=n.representationId,i=n.id,!eE.isNil(r)&&!eE.isNil(i)){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=3,this.resolveFragment(n);case 3:t.next=5;break;case 4:t.prev=4,t.catch(2),this.logger.error("Unable to resolve URL for contentId: ".concat(i));case 5:case"end":return t.stop()}},t,this,[[2,4]])}))}},{key:"fetchFragment",value:function(e){return c7(this,void 0,void 0,p().mark(function t(){return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.url){t.next=2;break}return this.settings.modifyInternalCdnRequestDomainToMatchPlayer&&this.lastRequestedBaseFragmentDomain&&(e.url=e.url.replace(c9,this.lastRequestedBaseFragmentDomain)),this.logger.trace("Fetched contentId: ".concat(e.id," - url: ").concat(e.url)),t.next=1,this.contentRequestService.request(e,!0);case 1:t.next=3;break;case 2:this.logger.trace("Failed fetching contentId: ".concat(e.id," - url: ").concat(e.url));case 3:case"end":return t.stop()}},t,this)}))}},{key:"fetchManifest",value:function(e){return c7(this,void 0,void 0,p().mark(function t(){return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.debug(tr.fetchingMediaPlaylist()),t.next=1,this.requester.fetch({url:e.url});case 1:case"end":return t.stop()}},t,this)}))}},{key:"fetchLevel",value:function(e){return c7(this,void 0,void 0,p().mark(function t(){var n;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.url,this.settings.modifyInternalCdnRequestDomainToMatchPlayer&&this.lastRequestedBaseLevelDomain&&(n=n.replace(c9,this.lastRequestedBaseLevelDomain)),this.logger.debug(tr.fetchingMediaPlaylist()),t.next=1,this.requester.fetch({url:n});case 1:case"end":return t.stop()}},t,this)}))}},{key:"resolveFragment",value:function(e){return c7(this,void 0,void 0,p().mark(function t(){var n,r,i,o,a,s=this;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(e){return s.streamInfoService.stream.manifest.findLevelById(e)},r=this.streamInfoService.stream,i=n(e.representationId)){t.next=1;break}return t.abrupt("return");case 1:if(t.prev=1,o=i.findFragmentById(e.id)){t.next=5;break}if(!i.url){t.next=3;break}return t.next=2,this.fetchLevel(i);case 2:t.next=4;break;case 3:return t.next=4,this.fetchManifest(r);case 4:o=(i=n(e.representationId)).findFragmentById(e.id);case 5:if(o){t.next=6;break}return this.logger.error("Unable to find fragment with contentId: ".concat(e.id)),t.abrupt("return");case 6:return e.url=o.url,e.duration=o.duration,this.logger.trace("Resolved contentId: ".concat(e.id," - url: ").concat(e.url)),t.next=7,this.fetchFragment(e);case 7:t.next=9;break;case 8:t.prev=8,a=t.catch(1),this.logger.error("".concat(a.message),a);case 9:case"end":return t.stop()}},t,this,[[1,8]])}))}},{key:"handleManifestInfoMissing",value:function(e){return c7(this,void 0,void 0,p().mark(function t(){var n;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.url){t.next=1;break}return t.abrupt("return");case 1:return this.logger.debug("Fetching manifest with URL ".concat(n)),t.next=2,this.requester.fetch({url:n});case 2:case"end":return t.stop()}},t,this)}))}},{key:"handleStreamInfoEvent",value:function(e){var t=e.streamInfo,n=e.polyNetOptions;if(this.settings.modifyInternalCdnRequestDomainToMatchPlayer){if(t.fragment){var r=ue(n.url);r&&this.lastRequestedBaseFragmentDomain!=r&&(this.lastRequestedBaseFragmentDomain=r,this.logger.trace("Observed new level base domain: ".concat(this.lastRequestedBaseFragmentDomain)))}else if(t.level){var i=ue(n.url);i&&this.lastRequestedBaseLevelDomain!=i&&(this.lastRequestedBaseLevelDomain=i,this.logger.trace("Observed new fragment base domain: ".concat(this.lastRequestedBaseLevelDomain)))}}}}])}(ez);ut.polyNetFactoryName="ContentResolver";var un=eU.getInstanceFactory(ut);function ur(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ur=function(){return!!e})()}var ui=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,ur()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).settings=nA(e.context).getInstance(),e.logger=e0(e.context).getInstance().getLogger("Auditor"),e}return f(t,e),s(t,[{key:"updateWindow",value:function(e){var t,n,r,i,o,a=null==(t=e.manifest)?void 0:t.startTime,s=null!=(r=null==(n=e.level)?void 0:n.targetDuration)?r:null==(i=e.fragment)?void 0:i.duration;if((null==(o=e.stream)?void 0:o.isLive)&&!eE.isNil(a)&&!eE.isNil(s)){var c=this.settings.liveCacheDuration,u=Date.now()-a-s,l=Math.round(c/s);return this.logger.logWhenChange("liveWindowChanged",tr.liveWindowChanged(l)),u-c}}},{key:"isAuditable",value:function(e,t){var n,r;return t.fragment&&!(null==(n=t.fragment)?void 0:n.isInit)&&e.cachePolicy===i2.Policy.CACHEABLE&&"VIDEO"===(null==(r=t.level)?void 0:r.mediaType)}},{key:"audit",value:function(e){var t,n,r=this.updateWindow(e);if(!(null==(t=e.stream)?void 0:t.isLive))return this.logger.logWhenChange("auditor",tr.vodMode()),{p2pAllowed:this.settings.p2pAllowVod,isInsideLiveWindow:!1};var i=null==(n=e.fragment)?void 0:n.presentationTime;return eE.isNil(i)||eE.isNil(r)?(this.logger.logWhenChange("auditor",tr.insideWindow()),{p2pAllowed:this.settings.p2pAllowDvr,isInsideLiveWindow:!1}):i>r?(this.logger.logWhenChange("auditor",tr.insideWindow()),{p2pAllowed:!0,isInsideLiveWindow:!0}
1):(this.logger.logWhenChange("auditor",tr.outsideWindow()),{p2pAllowed:this.settings.p2pAllowDvr,isInsideLiveWindow:!1})}}])}(ez);ui.polyNetFactoryName="Auditor";var uo=eU.getSingletonFactory(ui);function ua(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ua=function(){return!!e})()}var us=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,ua()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).eventBus=eG(e.context).getInstance(),e}return f(t,e),s(t,[{key:"updateRepresentation",value:function(e){if(eE.isNil(this.currentRepresentation))this.currentRepresentation=e;else if(!this.currentRepresentation.equals(e)){var t=this.currentRepresentation.streamUri===e.streamUri;this.eventBus.emit(tt.REPRESENTATION_CHANGE,{oldRepresentation:this.currentRepresentation,newRepresentation:e,sameStreamUri:t}),this.currentRepresentation=e}}}])}(ez);us.polyNetFactoryName="RepresentationService";var uc=eU.getSingletonFactory(us),uu=function(){return s(function e(t,n,i){r(this,e),this.streamUri=t,this.representationId=n,this.bitrate=i},[{key:"equals",value:function(e){return this.streamUri===e.streamUri&&this.representationId===e.representationId}}])}();function ul(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ul=function(){return!!e})()}var uf=function(e){function t(){var e,n,i,o;return r(this,t),n=this,i=u(i=t),(e=c(n,ul()?Reflect.construct(i,o||[],u(n).constructor):i.apply(n,o))).logger=e0(e.context).getInstance().getLogger("FeaturesFlagsSettings"),e.eventBus=eG(e.context).getInstance(),e.polyNetSettings=nA(e.context).getInstance(),e}return f(t,e),s(t,[{key:"start",value:function(){var e=this;this.eventBus.on(tt.SETTINGS_CHANGED,function(t){return e.handleSettingsChanged(t)},{scope:this})}},{key:"destroy",value:function(){var e;null==(e=this.eventBus)||e.offAll({scope:this}),this.eventBus=null}},{key:"setup",value:function(e){var t=this.decode(e);this.logger.trace(tr.receivedFeatureFlags(t)),this.polyNetSettings.setup(t)}},{key:"decode",value:function(e){if(!eE.isString(e)||eE.isEmpty(e))return{};var t=tC(e)?tE(e):e,n={};try{n=nR(JSON.parse(t))}catch(e){}return eE.isNil(n.sdkFeatureFlags)?n:{}}},{key:"handleSettingsChanged",value:function(e){var t,n=null==(t=null==e?void 0:e.diffSettings)?void 0:t.sdkFeatureFlags;eE.isNil(n)||this.setup(n)}}])}(ez);uf.polyNetFactoryName="FeaturesFlagsSettings";var uh=eU.getSingletonFactory(uf);function ud(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ud=function(){return!!e})()}var up,uv=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},ug=function(e){function t(e){var n,i,o,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{defaultContext:!0};return r(this,t),i=this,o=u(o=t),(n=c(i,ud()?Reflect.construct(o,a||[],u(i).constructor):o.apply(i,a))).lastAuditableStreamInfo=null,n.context=s,n.polyNet=nK(n.context).getInstance(),n.eventBus=eG(n.context).getInstance(),n.settings=nA(n.context).getInstance(),n.requester=c5(n.context).createInstance("player"),n.contentResolver=un(n.context).createInstance(),n.contentResolver.start(),n.settings.setup(e),n.createLoggers(),n.settings.isValidApiKey?(n.logger.debug(tr.trackerURL(n.settings.apiKey.signalServerUrl)),n.logger.debug(tr.trackerMetricsURL(n.settings.apiKey.metricSinkUrl)),n.settings.apiKey.stunServerUrl.forEach(function(e){return n.logger.debug(tr.stunURL(e))}),n.logger.debug(tr.channelIdentifier(n.settings.channelId||""))):n.logger.error("The PolyNet SDK has failed to initialize due to an error in your API Key. If problem persists, contact support at [email protected]."),n.stats=of(n.context).getInstance(),n.stats.start(),n.featureManager=cn(n.context).getInstance(),n.featureManager.start(),n.tracker=sB(n.context).getInstance(),n.tracker.start(),n.connectionManager=sU(n.context).createInstance(),n.contentSteeringService=cJ(n.context).getInstance(),n.contentSteeringService.start(),n.auditor=uo(n.context).getInstance(),n.representationService=uc(n.context).getInstance(),n.handleStreamInfoEvent=n.handleStreamInfoEvent.bind(n),n.eventBus.on(tt.STREAM_INFO,n.handleStreamInfoEvent,{scope:n}),n.handleSettingsChanged=n.handleSettingsChanged.bind(n),n.eventBus.on(tt.SETTINGS_CHANGED,n.handleSettingsChanged,{scope:n}),n.logger.debug(tr.systemInfo(n.stats.platform.browser,n.stats.platform.os)),n.featureFlags=uh(n.context).getInstance(),n.featureFlags.start(),Object.seal(n),n}
1return f(t,e),s(t,[{key:"connectToPolyNet",value:function(e,t){return uv(this,void 0,void 0,p().mark(function n(){return p().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(this.polyNet.isEnabled){n.next=1;break}return n.abrupt("return");case 1:return n.next=2,this.connectionManager.connectToPolyNet(e,t);case 2:case"end":return n.stop()}},n,this)}))}},{key:"disconnectFromPolyNet",value:function(){return uv(this,void 0,void 0,p().mark(function e(){return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.connectionManager.disconnectFromPolyNet();case 1:case"end":return e.stop()}},e,this)}))}},{key:"p2p",get:function(){var e=this;return{enable:function(){e.featureManager.enableP2P()},disable:function(){e.featureManager.disableP2P(),e.disconnectFromPolyNet()}}}},{key:"contentSteering",get:function(){var e=this;return{enable:function(){e.featureManager.enableCs()},disable:function(){e.featureManager.disableCs()}}}},{key:"dimensions",get:function(){var e=this;return{setCustomDimension1:function(t){return e.setCustomDimension1(t)},setCustomDimension2:function(t){return e.setCustomDimension2(t)},setCustomDimension3:function(t){return e.setCustomDimension3(t)}}}},{key:"enable",value:function(){this.p2p.enable(),this.contentSteering.enable()}},{key:"disable",value:function(){this.p2p.disable(),this.contentSteering.disable()}},{key:"destroy",value:function(){eU.destroyContext(this.context),this.polyNet=null,this.eventBus=null,this.logger=null,this.tracker=null,this.settings=null,this.featureManager=null,this.stats=null,this.connectionManager=null,this.featureManager=null,this.contentResolver=null,this.auditor=null,this.lastAuditableStreamInfo=null}},{key:"setup",value:function(e){this.settings.setup(e)}},{key:"transformRequest",set:function(e){this.setup({transformRequest:e})}},{key:"setCustomDimension1",value:function(e){this.setup({customDimension1:this.validateCustomDimensionLength(e)})}},{key:"setCustomDimension2",value:function(e){this.setup({customDimension2:this.validateCustomDimensionLength(e)})}},{key:"setCustomDimension3",value:function(e){this.setup({customDimension3:this.validateCustomDimensionLength(e)})}},{key:"validateCustomDimensionLength",value:function(e){return eE.isString(e)&&e.length>256?(this.logger.warn("Your string is trimmed down to 256 characters"),e.slice(0,256)):e}},{key:"createLoggers",value:function(){this.logger=e0(this.context).getInstance().getLogger("PolyNetSDK");var e=this.polyNet,t={channelId:this.settings.channelId,deviceId:this.polyNet.deviceId,get nodeId(){var n;return null!=(n=e.nodeId)?n:void 0},platform:"Web",sessionId:this.polyNet.sessionId},r=e0(this.context).getInstance();r.registerAppender(e8(this.context).createInstance("console")),r.registerAppender(tn(this.context).createInstance("remote",t)),r.registerAppender(tn(this.context).createInstance("http",t))}},{key:"get",value:function(e){return this.requester.get(e)}},{key:"fetch",value:function(e,t){return this.logger.trace(tr.requestCreatedFromPlayer(e)),this.requester.fetch(e,t)}},{key:"xhr",value:function(e,t){return this.logger.trace(tr.requestCreatedFromPlayer(e.url||e.uri)),this.requester.xhr(e,t)}},{key:"videoElementReader",set:function(e){this.eventBus.emit(tt.COLLECT_VIDEO_STATS,{videoElementReader:e})}},{key:"playerInfo",set:function(e){this.eventBus.emit(tt.COLLECT_PLATFORM_STATS,{player:e})}},{key:"playerUri",set:function(e){this.eventBus.emit(tt.COLLECT_STREAMING_STATS,{stats:{playerUri:e}})}},{key:"reportStreamingStats",value:function(e,t,n){var r={isLive:t,isInsideLiveWindow:n,streamUri:null==e?void 0:e.streamUri,representationId:null==e?void 0:e.representationId,bitrate:null==e?void 0:e.bitrate};this.eventBus.emit(tt.COLLECT_STREAMING_STATS,{stats:r})}},{key:"handleStreamInfoEvent",value:function(e){return uv(this,void 0,void 0,p().mark(function t(){var n,r,i,o,a,s,c,u,l;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.polyNetOptions,a=e.streamInfo,eE.isNil(this.stats.stream.playerUri)||this.stats.stream.playerUri===a.stream.url){t.next=1;break}return this.eventBus.emit(tt.MANIFEST_INFO_MISSING,{url:this.stats.stream.playerUri}),t.abrupt("return");case 1:if(this.auditor.isAuditable(o,a)){t.next=2;break}return t.abrupt("return");case 2:if(this.lastAuditableStreamInfo=e,c=(s=this.auditor.audit(a)).p2pAllowed,u=s.isInsideLiveWindow,l=new uu(null==(n=a.stream)?void 0:n.url,null==(r=a.level)?void 0:r.id,null==(i=a.level)?void 0:i.bitrate),this.reportStreamingStats(l,!!a.stream.isLive,u),this.representationService.updateRepresentation(l),c){t.next=4;break}return this.eventBus.emit(tt.COLLECT_POLYNET_STATS,{revokedStatus:rD.RevokedStatus.OUT_OF_LIVE_WINDOW}),t.next=3,this.disconnectFromPolyNet();case 3:return t.abrupt("return");case 4:return t.next=5,this.connectWithRepresentation(l);case 5:case"end":return t.stop()}},t,this)}))}},{key:"handleSettingsChanged",value:function(e){var t,n,r=!eE.isNil(null==(t=e.diffSettings)?void 0:t.p2pAllowVod)||!eE.isNil(null==(n=e.diffSettings)?void 0:n.p2pAllowDvr);!eE.isNil(this.lastAuditableStreamInfo)&&r&&this.handleStreamInfoEvent(this.lastAuditableStreamInfo)}},{key:"connectWithRepresentation",value:function(e){return uv(this,void 0,void 0,p().mark(function t(){return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((null==e?void 0:e.streamUri)&&(null==e?void 0:e.representationId)){t.next=1;break}return t.abrupt("return");case 1:return t.next=2,this.connectToPolyNet(e.streamUri,e.representationId);case 2:case"end":return t.stop()}},t,this)}))}}])}(ez),uy=function(){return s(function e(t,n){r(this,e),h(this,"polyNetConfig",void 0),h(this,"polyNet",void 0),h(this,"playerClass",void 0),h(this,"player",void 0),h(this,"playerConfig",void 0),h(this,"wrapperConfig",void 0),this.polyNetConfig=t,this.polyNet=new ug(this.polyNetConfig),this.__buildConfig(n)},[{key:"__buildConfig",value:function(e){this.wrapperConfig=z()({},this.__defaultWrapperConfig,e),this.playerClass=this.wrapperConfig.playerClass}},{key:"__defaultWrapperConfig",get:function(){return{playerClass:void 0}}},{key:"p2p",get:function(){return this.polyNet.p2p}},{key:"contentSteering",get:function(){return this.polyNet.contentSteering}},{key:"dimensions",get:function(){return this.polyNet.dimensions}},{key:"enable",value:function(){this.polyNet.enable()}},{key:"disable",value:function(){this.polyNet.disable()}},{key:"wrapPlayerConfig",value:function(e){this.playerConfig=e}},{key:"wrapPlayer",value:function(e){this.player=e}},{key:"destroy",value:function(){var e;null==(e=this.polyNet)||e.destroy(),this.polyNet=null,this.polyNetConfig=null,this.player=null,this.playerClass=null,this.playerConfig=null}}])}();function um(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}var ub=new Uint8Array(16);function uS(){if(!up&&!(up="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return up(ub)}let uE=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,uC=function(e){return"string"==typeof e&&uE.test(e)};for(var uw=[],uT=0;uT<256;++uT)uw.push((uT+256).toString(16).substr(1));let uk=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(uw[e[t+0]]+uw[e[t+1]]+uw[e[t+2]]+uw[e[t+3]]+"-"+uw[e[t+4]]+uw[e[t+5]]+"-"+uw[e[t+6]]+uw[e[t+7]]+"-"+uw[e[t+8]]+uw[e[t+9]]+"-"+uw[e[t+10]]+uw[e[t+11]]+uw[e[t+12]]+uw[e[t+13]]+uw[e[t+14]]+uw[e[t+15]]).toLowerCase();
1if(!uC(n))throw TypeError("Stringified UUID is invalid");return n},u_=function(e,t,n){var r=(e=e||{}).random||(e.rng||uS)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return uk(r)};function uR(e){for(var t=new Map,n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];t.set(i,e[i])}return t}var uO=function(){var e,t;function n(e){r(this,n),h(this,"polyNet",void 0),h(this,"id",void 0),this.id=u_(),this.polyNet=e}return s(n,[{key:"destroy",value:function(){this.polyNet=null}},{key:"parse",value:function(e,t,r,i,o){var a={};uR(t.headers).forEach(function(e,t){a[t]=e});var s=new AbortController,c={canceled:!1,timedOut:!1},u={body:t.body||void 0,headers:a,responseType:0===r?"text":"arraybuffer",abortStatus:c,method:t.method,signal:s.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},l=this.request_(e,r,u,c,i,o,t.streamDataCallback),f=new n.shaka.util.AbortableOperation(l,function(){return c.canceled=!0,s.abort(),Promise.resolve()}),h=t.retryParameters.timeout;if(h){var d=new n.shaka.util.Timer(function(){c.timedOut=!0,s.abort()});d.tickAfter(h/1e3),f.finally(function(){d.stop()})}return f}},{key:"request_",value:(e=p().mark(function e(t,r,i,o,a,s,c){var u,l,f,h;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,this.polyNet.fetch(t,i);case 1:u=e.sent,s&&s(n.headersToGenericObject_(u.headers)),l=this._processResponseData(u.data),e.next=6;break;case 2:if(e.prev=2,418==(h=e.catch(0)).status){e.next=3;break}return e.abrupt("return",n.makeResponse(this._processHeaders(h.headers),this._processResponseData(h.statusText),h.status,t,h.url,r));case 3:if(!o.canceled){e.next=4;break}throw new n.shaka.util.Error(n.shaka.util.Error.Severity.RECOVERABLE,n.shaka.util.Error.Category.NETWORK,n.shaka.util.Error.Code.OPERATION_ABORTED,t,r);case 4:if(!o.timedOut){e.next=5;break}throw new n.shaka.util.Error(n.shaka.util.Error.Severity.RECOVERABLE,n.shaka.util.Error.Category.NETWORK,n.shaka.util.Error.Code.TIMEOUT,t,r);case 5:throw new n.shaka.util.Error(n.shaka.util.Error.Severity.RECOVERABLE,n.shaka.util.Error.Category.NETWORK,n.shaka.util.Error.Code.HTTP_ERROR,t,h,r);case 6:return f=this._processHeaders(u.headers),e.abrupt("return",n.makeResponse(f,l,u.status,t,u.url,r));case 7:case"end":return e.stop()}},e,this,[[0,2]])}),t=function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){um(o,r,i,a,s,"next",e)}function s(e){um(o,r,i,a,s,"throw",e)}a(void 0)})},function(e,n,r,i,o,a,s){return t.apply(this,arguments)})},{key:"_processHeaders",value:function(e){var t={};return uR(e).forEach(function(e,n){t[n.trim()]=e}),t}},{key:"_processResponseData",value:function(e){var t;return"string"==typeof e?(new TextEncoder).encode(e):e}}],[{key:"headersToGenericObject_",value:function(e){var t={};return Object.entries(e).forEach(function(e){var n=eB(e,2),r=n[0];t[n[1].trim()]=r}),t}},{key:"makeResponse",value:function(e,t,r,i,o,a){if(r>=200&&r<=299&&202!=r)return{uri:o||i,originalUri:i,data:t,status:r,headers:e,fromCache:!!e["x-shaka-from-cache"]};var s,c,u=null;try{u=n.shaka.util.StringUtils.fromBytesAutoDetect(t)}catch(e){null==(s=n.shaka)||null==(s=s.log)||s.debug("Unable to decode error:",u)}null==(c=n.shaka)||null==(c=c.log)||c.debug("HTTP error text:",u);var l=401===r||403===r?n.shaka.util.Error.Severity.CRITICAL:n.shaka.util.Error.Severity.RECOVERABLE;throw new n.shaka.util.Error(l,n.shaka.util.Error.Category.NETWORK,n.shaka.util.Error.Code.BAD_HTTP_STATUS,i,r,u,e,a)}}])}();h(uO,"shaka",void 0);var uI=function(){function e(){r(this,e)}return s(e,null,[{key:"fallbackPlugin",get:function(){return e.isFetchSupported?e.shaka.net.HttpFetchPlugin:e.shaka.net.HttpXHRPlugin}},{key:"createFetchPlugin",value:function(t){var n=new uO(t);return e.plugins.set(n.id,n),n}},{key:"destroyFetchPlugin",value:function(t){var n=e.plugins.get(t);n&&(e.plugins.delete(t),n.destroy())}},{key:"scheme",value:function(t,n,r,i,o){return(e.plugins.get(n.__pluginId)||e.fallbackPlugin).parse(t,n,r,i,o)}},{key:"isFetchSupported",get:function(){if(!window.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!window.fetch||!window.AbortController)}}])}();function uN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ux(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?uN(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(uA=function(){return!!e})()}function uP(e,t,n,r){var i=l(u(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}h(uI,"shaka",void 0),h(uI,"plugins",new Map);var uD=function(e){function t(e,n){var i,o,a,s;return r(this,t),o=this,a=t,s=[e,ux(ux({},n),{},{playerClass:null==n?void 0:n.shaka})],a=u(a),h(i=c(o,uA()?Reflect.construct(a,s||[],u(o).constructor):a.apply(o,s)),"pluginId",void 0),h(i,"requestFilter",void 0),h(i,"originalPlayerDestroy",void 0),i}return f(t,e),s(t,[{key:"__defaultWrapperConfig",get:function(){return{playerClass:window.shaka}}},{key:"wrapPlayerConfig",value:function(e){uP(t,"wrapPlayerConfig",this,3)([e]);var n=z()({},{streaming:{useNativeHlsForFairPlay:!1}},e);return z()(e,n)}},{key:"wrapPlayer",value:function(e){var n=this;uP(t,"wrapPlayer",this,3)([e]),this.playerClass||(this.playerClass=window.shaka),this.polyNet.playerInfo=this.playerClass&&{name:"shakaplayer",version:this.playerClass.Player.version},uO.shaka=this.playerClass,uI.shaka=this.playerClass,this.polyNet.videoElementReader=function(){return e&&e.getMediaElement&&e.getMediaElement()},this.originalPlayerDestroy=e.destroy.bind(e),e.destroy=function(){return n.destroy(),n.originalPlayerDestroy()},this.pluginId=uI.createFetchPlugin(this.polyNet).id,this.requestFilter=function(e,t){return t.__pluginId=n.pluginId},e.getNetworkingEngine().registerRequestFilter(this.requestFilter),this.playerClass.net.NetworkingEngine.registerScheme("http",uI.scheme,this.playerClass.net.NetworkingEngine.PluginPriority.APPLICATION),this.playerClass.net.NetworkingEngine.registerScheme("https",uI.scheme,this.playerClass.net.NetworkingEngine.PluginPriority.APPLICATION)}},{key:"destroy",value:function(){this.polyNet&&this.playerClass&&this.player&&(this.player.getNetworkingEngine().unregisterRequestFilter(this.requestFilter),uI.destroyFetchPlugin(this.pluginId),0===uI.plugins.size&&(this.playerClass.net.NetworkingEngine.registerScheme("http",uI.fallbackPlugin.parse,this.playerClass.net.NetworkingEngine.PluginPriority.APPLICATION),this.playerClass.net.NetworkingEngine.registerScheme("https",uI.fallbackPlugin.parse,this.playerClass.net.NetworkingEngine.PluginPriority.APPLICATION)),uP(t,"destroy",this,3)([]))}}])}(uy);function uM(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n(uD,t)}})(),__nested_webpack_exports__=__nested_webpack_exports__.default})())}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.