/*! For license information please see 5~822476cfa479836ac73f.js.LICENSE.txt */ (self.webpackChunkhybrid_client=self.webpackChunkhybrid_client||[]).push([[5],{"./node_modules/mediasoup-client/lib/Consumer.js":(e,t,r)=>{"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)}function i(){i=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",d=s.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),s=new A(n||[]);return a(o,"_invoke",{value:R(e,r,s)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",m="executing",_="completed",v={};function y(){}function g(){}function b(){}var w={};l(w,c,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(D([])));x&&x!==r&&o.call(x,c)&&(w=x);var k=b.prototype=y.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,s,c){var u=f(e[i],e,a);if("throw"!==u.type){var d=u.arg,l=d.value;return l&&"object"==n(l)&&o.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(l).then((function(e){d.value=e,s(d)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}})}function R(t,r,n){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===_){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var c=O(s,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var u=f(t,r,n);if("normal"===u.type){if(i=n.done?_:"suspendedYield",u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=_,n.method="throw",n.arg=u.arg)}}}function O(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function D(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function o(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function a(e,t){for(var r=0;r{"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)}function i(e,t){for(var r=0;r{"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)}function i(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function i(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r=111",chromium:">=111","microsoft edge":">=111"}))return"Chrome111";if(t.satisfies({chrome:">=74",chromium:">=74","microsoft edge":">=88"}))return"Chrome74";if(t.satisfies({chrome:">=70",chromium:">=70"}))return"Chrome70";if(t.satisfies({chrome:">=67",chromium:">=67"}))return"Chrome67";if(t.satisfies({chrome:">=55",chromium:">=55"}))return"Chrome55";if(t.satisfies({firefox:">=60"}))return"Firefox60";if(t.satisfies({ios:{OS:">=14.3",firefox:">=30.0"}}))return"Safari12";if(t.satisfies({safari:">=12.0"})&&"undefined"!=typeof RTCRtpTransceiver&&RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection"))return"Safari12";if(t.satisfies({safari:">=11"}))return"Safari11";if(t.satisfies({"microsoft edge":">=11"})&&t.satisfies({"microsoft edge":"<=18"}))return"Edge11";if(r.name&&"blink"===r.name.toLowerCase()){var n=e.match(/(?:(?:Chrome|Chromium))[ /](\w+)/i);if(n){var i=Number(n[1]);return i>=111?"Chrome111":i>=74?"Chrome74":i>=70?"Chrome70":i>=67?"Chrome67":"Chrome55"}return"Chrome111"}A.warn("this._detectDevice() | browser not supported [name:%s, version:%s]",t.getBrowserName(),t.getBrowserVersion())}}t.detectDevice=D;var C=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.handlerName,n=t.handlerFactory,i=t.Handler;if(o(this,e),this._loaded=!1,this._observer=new m.EnhancedEventEmitter,A.debug("constructor()"),i){if(A.warn("constructor() | Handler option is DEPRECATED, use handlerName or handlerFactory instead"),"string"!=typeof i)throw new TypeError("non string Handler option no longer supported, use handlerFactory instead");r=i}if(r&&n)throw new TypeError("just one of handlerName or handlerInterface can be given");if(n)this._handlerFactory=n;else{if(r)A.debug("constructor() | handler given: %s",r);else{if(!(r=D()))throw new _.UnsupportedError("device not supported");A.debug("constructor() | detected handler: %s",r)}switch(r){case"Chrome111":this._handlerFactory=b.Chrome111.createFactory();break;case"Chrome74":this._handlerFactory=w.Chrome74.createFactory();break;case"Chrome70":this._handlerFactory=S.Chrome70.createFactory();break;case"Chrome67":this._handlerFactory=x.Chrome67.createFactory();break;case"Chrome55":this._handlerFactory=k.Chrome55.createFactory();break;case"Firefox60":this._handlerFactory=j.Firefox60.createFactory();break;case"Safari12":this._handlerFactory=E.Safari12.createFactory();break;case"Safari11":this._handlerFactory=R.Safari11.createFactory();break;case"Edge11":this._handlerFactory=O.Edge11.createFactory();break;case"ReactNativeUnifiedPlan":this._handlerFactory=T.ReactNativeUnifiedPlan.createFactory();break;case"ReactNative":this._handlerFactory=P.ReactNative.createFactory();break;default:throw new TypeError('unknown handlerName "'.concat(r,'"'))}}var a=this._handlerFactory();this._handlerName=a.name,a.close(),this._extendedRtpCapabilities=void 0,this._recvRtpCapabilities=void 0,this._canProduceByKind={audio:!1,video:!1},this._sctpCapabilities=void 0}var t,r;return function(e,t,r){t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1})}(e,[{key:"handlerName",get:function(){return this._handlerName}},{key:"loaded",get:function(){return this._loaded}},{key:"rtpCapabilities",get:function(){if(!this._loaded)throw new _.InvalidStateError("not loaded");return this._recvRtpCapabilities}},{key:"sctpCapabilities",get:function(){if(!this._loaded)throw new _.InvalidStateError("not loaded");return this._sctpCapabilities}},{key:"observer",get:function(){return this._observer}},{key:"load",value:(t=n().mark((function e(t){var r,i,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.routerRtpCapabilities,A.debug("load() [routerRtpCapabilities:%o]",r),r=v.clone(r,void 0),e.prev=3,!this._loaded){e.next=6;break}throw new _.InvalidStateError("already loaded");case 6:return y.validateRtpCapabilities(r),i=this._handlerFactory(),e.next=10,i.getNativeRtpCapabilities();case 10:return o=e.sent,A.debug("load() | got native RTP capabilities:%o",o),y.validateRtpCapabilities(o),this._extendedRtpCapabilities=y.getExtendedRtpCapabilities(o,r),A.debug("load() | got extended RTP capabilities:%o",this._extendedRtpCapabilities),this._canProduceByKind.audio=y.canSend("audio",this._extendedRtpCapabilities),this._canProduceByKind.video=y.canSend("video",this._extendedRtpCapabilities),this._recvRtpCapabilities=y.getRecvRtpCapabilities(this._extendedRtpCapabilities),y.validateRtpCapabilities(this._recvRtpCapabilities),A.debug("load() | got receiving RTP capabilities:%o",this._recvRtpCapabilities),e.next=22,i.getNativeSctpCapabilities();case 22:this._sctpCapabilities=e.sent,A.debug("load() | got native SCTP capabilities:%o",this._sctpCapabilities),y.validateSctpCapabilities(this._sctpCapabilities),A.debug("load() succeeded"),this._loaded=!0,i.close(),e.next=34;break;case 30:throw e.prev=30,e.t0=e.catch(3),i&&i.close(),e.t0;case 34:case"end":return e.stop()}}),e,this,[[3,30]])})),r=function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(e){i(a,n,o,s,c,"next",e)}function c(e){i(a,n,o,s,c,"throw",e)}s(void 0)}))},function(e){return r.apply(this,arguments)})},{key:"canProduce",value:function(e){if(!this._loaded)throw new _.InvalidStateError("not loaded");if("audio"!==e&&"video"!==e)throw new TypeError('invalid kind "'.concat(e,'"'));return this._canProduceByKind[e]}},{key:"createSendTransport",value:function(e){var t=e.id,r=e.iceParameters,n=e.iceCandidates,i=e.dtlsParameters,o=e.sctpParameters,a=e.iceServers,s=e.iceTransportPolicy,c=e.additionalSettings,u=e.proprietaryConstraints,d=e.appData;return A.debug("createSendTransport()"),this.createTransport({direction:"send",id:t,iceParameters:r,iceCandidates:n,dtlsParameters:i,sctpParameters:o,iceServers:a,iceTransportPolicy:s,additionalSettings:c,proprietaryConstraints:u,appData:d})}},{key:"createRecvTransport",value:function(e){var t=e.id,r=e.iceParameters,n=e.iceCandidates,i=e.dtlsParameters,o=e.sctpParameters,a=e.iceServers,s=e.iceTransportPolicy,c=e.additionalSettings,u=e.proprietaryConstraints,d=e.appData;return A.debug("createRecvTransport()"),this.createTransport({direction:"recv",id:t,iceParameters:r,iceCandidates:n,dtlsParameters:i,sctpParameters:o,iceServers:a,iceTransportPolicy:s,additionalSettings:c,proprietaryConstraints:u,appData:d})}},{key:"createTransport",value:function(e){var t=e.direction,r=e.id,n=e.iceParameters,i=e.iceCandidates,o=e.dtlsParameters,a=e.sctpParameters,s=e.iceServers,u=e.iceTransportPolicy,d=e.additionalSettings,l=e.proprietaryConstraints,p=e.appData;if(!this._loaded)throw new _.InvalidStateError("not loaded");if("string"!=typeof r)throw new TypeError("missing id");if("object"!==c(n))throw new TypeError("missing iceParameters");if(!Array.isArray(i))throw new TypeError("missing iceCandidates");if("object"!==c(o))throw new TypeError("missing dtlsParameters");if(a&&"object"!==c(a))throw new TypeError("wrong sctpParameters");if(p&&"object"!==c(p))throw new TypeError("if given, appData must be an object");var f=new g.Transport({direction:t,id:r,iceParameters:n,iceCandidates:i,dtlsParameters:o,sctpParameters:a,iceServers:s,iceTransportPolicy:u,additionalSettings:d,proprietaryConstraints:l,appData:p,handlerFactory:this._handlerFactory,extendedRtpCapabilities:this._extendedRtpCapabilities,canProduceByKind:this._canProduceByKind});return this._observer.safeEmit("newtransport",f),f}}]),e}();t.Device=C},"./node_modules/mediasoup-client/lib/EnhancedEventEmitter.js":(e,t,r)=>{"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)}function i(e,t){for(var r=0;r1?t-1:0),n=1;n1?r-1:0),i=1;i{"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)}function i(){i=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",d=s.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),s=new A(n||[]);return a(o,"_invoke",{value:R(e,r,s)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",m="executing",_="completed",v={};function y(){}function g(){}function b(){}var w={};l(w,c,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(D([])));x&&x!==r&&o.call(x,c)&&(w=x);var k=b.prototype=y.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,s,c){var u=f(e[i],e,a);if("throw"!==u.type){var d=u.arg,l=d.value;return l&&"object"==n(l)&&o.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(l).then((function(e){d.value=e,s(d)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}})}function R(t,r,n){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===_){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var c=O(s,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var u=f(t,r,n);if("normal"===u.type){if(i=n.done?_:"suspendedYield",u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=_,n.method="throw",n.arg=u.arg)}}}function O(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function D(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function o(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,c,"next",e)}function c(e){o(a,n,i,s,c,"throw",e)}s(void 0)}))}}function s(e,t){for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/mediasoup-client/lib/SctpParameters.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/mediasoup-client/lib/Transport.js":function(e,t,r){"use strict";function n(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}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(){o=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",d=s.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),s=new A(n||[]);return a(o,"_invoke",{value:R(e,r,s)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",m="executing",_="completed",v={};function y(){}function g(){}function b(){}var w={};l(w,c,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(D([])));x&&x!==r&&n.call(x,c)&&(w=x);var k=b.prototype=y.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,a,s,c){var u=f(e[o],e,a);if("throw"!==u.type){var d=u.arg,l=d.value;return l&&"object"==i(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(l).then((function(e){d.value=e,s(d)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function R(t,r,n){var i=h;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===_){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var c=O(s,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var u=f(t,r,n);if("normal"===u.type){if(i=n.done?_:"suspendedYield",u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=_,n.method="throw",n.arg=u.arg)}}}function O(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function D(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function a(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,c,"next",e)}function c(e){a(o,n,i,s,c,"throw",e)}s(void 0)}))}}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==i[0]?i[0]:{},r=t.iceServers,L.debug("updateIceServers()"),!this._closed){e.next=6;break}throw new R.InvalidStateError("closed");case 6:if(Array.isArray(r)){e.next=8;break}throw new TypeError("missing iceServers");case 8:return e.abrupt("return",this._awaitQueue.push(s(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n._handler.updateIceServers(r));case 1:case"end":return e.stop()}}),e)}))),"transport.updateIceServers()"));case 9:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"produce",value:(d=s(o().mark((function e(){var t,r,n,a,c,u,d,l,p,f,h,m,_,v=this,y=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=y.length>0&&void 0!==y[0]?y[0]:{},r=t.track,n=t.encodings,a=t.codecOptions,c=t.codec,u=t.stopTracks,d=void 0===u||u,l=t.disableTrackOnPause,p=void 0===l||l,f=t.zeroRtpOnPause,h=void 0!==f&&f,m=t.appData,_=void 0===m?{}:m,L.debug("produce() [track:%o]",r),!this._closed){e.next=6;break}throw new R.InvalidStateError("closed");case 6:if(r){e.next=10;break}throw new TypeError("missing track");case 10:if("send"===this._direction){e.next=14;break}throw new R.UnsupportedError("not a sending Transport");case 14:if(this._canProduceByKind[r.kind]){e.next=18;break}throw new R.UnsupportedError("cannot produce ".concat(r.kind));case 18:if("ended"!==r.readyState){e.next=22;break}throw new R.InvalidStateError("track ended");case 22:if(0!==this.listenerCount("connect")||"new"!==this._connectionState){e.next=26;break}throw new TypeError('no "connect" listener set into this transport');case 26:if(0!==this.listenerCount("produce")){e.next=30;break}throw new TypeError('no "produce" listener set into this transport');case 30:if(!_||"object"===i(_)){e.next=32;break}throw new TypeError("if given, appData must be an object");case 32:return e.abrupt("return",this._awaitQueue.push(s(o().mark((function e(){var t,i,s,u,l,f,m,y;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||Array.isArray(n)){e.next=4;break}throw TypeError("encodings must be an array");case 4:n&&0===n.length?t=void 0:n&&(t=n.map((function(e){var t={active:!0};return!1===e.active&&(t.active=!1),"boolean"==typeof e.dtx&&(t.dtx=e.dtx),"string"==typeof e.scalabilityMode&&(t.scalabilityMode=e.scalabilityMode),"number"==typeof e.scaleResolutionDownBy&&(t.scaleResolutionDownBy=e.scaleResolutionDownBy),"number"==typeof e.maxBitrate&&(t.maxBitrate=e.maxBitrate),"number"==typeof e.maxFramerate&&(t.maxFramerate=e.maxFramerate),"boolean"==typeof e.adaptivePtime&&(t.adaptivePtime=e.adaptivePtime),"string"==typeof e.priority&&(t.priority=e.priority),"string"==typeof e.networkPriority&&(t.networkPriority=e.networkPriority),t})));case 5:return e.next=7,v._handler.send({track:r,encodings:t,codecOptions:a,codec:c});case 7:return i=e.sent,s=i.localId,u=i.rtpParameters,l=i.rtpSender,e.prev=11,T.validateRtpParameters(u),e.next=15,new Promise((function(e,t){v.safeEmit("produce",{kind:r.kind,rtpParameters:u,appData:_},e,t)}));case 15:return f=e.sent,m=f.id,y=new P.Producer({id:m,localId:s,rtpSender:l,track:r,rtpParameters:u,stopTracks:d,disableTrackOnPause:p,zeroRtpOnPause:h,appData:_}),v._producers.set(y.id,y),v.handleProducer(y),v._observer.safeEmit("newproducer",y),e.abrupt("return",y);case 24:throw e.prev=24,e.t0=e.catch(11),v._handler.stopSending(s).catch((function(){})),e.t0;case 28:case"end":return e.stop()}}),e,null,[[11,24]])}))),"transport.produce()").catch((function(e){if(d)try{r.stop()}catch(e){}throw e})));case 33:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"consume",value:(u=s(o().mark((function e(t){var r,n,a,s,c,u,d,l,p=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.id,n=t.producerId,a=t.kind,s=t.rtpParameters,c=t.streamId,u=t.appData,d=void 0===u?{}:u,L.debug("consume()"),s=O.clone(s,void 0),!this._closed){e.next=7;break}throw new R.InvalidStateError("closed");case 7:if("recv"===this._direction){e.next=11;break}throw new R.UnsupportedError("not a receiving Transport");case 11:if("string"==typeof r){e.next=15;break}throw new TypeError("missing id");case 15:if("string"==typeof n){e.next=19;break}throw new TypeError("missing producerId");case 19:if("audio"===a||"video"===a){e.next=23;break}throw new TypeError("invalid kind '".concat(a,"'"));case 23:if(0!==this.listenerCount("connect")||"new"!==this._connectionState){e.next=27;break}throw new TypeError('no "connect" listener set into this transport');case 27:if(!d||"object"===i(d)){e.next=29;break}throw new TypeError("if given, appData must be an object");case 29:if(T.canReceive(s,this._extendedRtpCapabilities)){e.next=32;break}throw new R.UnsupportedError("cannot consume this Producer");case 32:return l=new I({id:r,producerId:n,kind:a,rtpParameters:s,streamId:c,appData:d}),this._pendingConsumerTasks.push(l),(0,k.default)((function(){p._closed||!1===p._consumerCreationInProgress&&p.createPendingConsumers()})),e.abrupt("return",l.promise);case 36:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"produceData",value:(a=s(o().mark((function e(){var t,r,n,a,c,u,d,l,p,f,h,m=this,_=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=_.length>0&&void 0!==_[0]?_[0]:{},r=t.ordered,n=void 0===r||r,a=t.maxPacketLifeTime,c=t.maxRetransmits,u=t.label,d=void 0===u?"":u,l=t.protocol,p=void 0===l?"":l,f=t.appData,h=void 0===f?{}:f,L.debug("produceData()"),!this._closed){e.next=6;break}throw new R.InvalidStateError("closed");case 6:if("send"===this._direction){e.next=10;break}throw new R.UnsupportedError("not a sending Transport");case 10:if(this._maxSctpMessageSize){e.next=14;break}throw new R.UnsupportedError("SCTP not enabled by remote Transport");case 14:if(0!==this.listenerCount("connect")||"new"!==this._connectionState){e.next=18;break}throw new TypeError('no "connect" listener set into this transport');case 18:if(0!==this.listenerCount("producedata")){e.next=22;break}throw new TypeError('no "producedata" listener set into this transport');case 22:if(!h||"object"===i(h)){e.next=24;break}throw new TypeError("if given, appData must be an object");case 24:return(a||c)&&(n=!1),e.abrupt("return",this._awaitQueue.push(s(o().mark((function e(){var t,r,i,s,u,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m._handler.sendDataChannel({ordered:n,maxPacketLifeTime:a,maxRetransmits:c,label:d,protocol:p});case 2:return t=e.sent,r=t.dataChannel,i=t.sctpStreamParameters,T.validateSctpStreamParameters(i),e.next=8,new Promise((function(e,t){m.safeEmit("producedata",{sctpStreamParameters:i,label:d,protocol:p,appData:h},e,t)}));case 8:return s=e.sent,u=s.id,l=new D.DataProducer({id:u,dataChannel:r,sctpStreamParameters:i,appData:h}),m._dataProducers.set(l.id,l),m.handleDataProducer(l),m._observer.safeEmit("newdataproducer",l),e.abrupt("return",l);case 15:case"end":return e.stop()}}),e)}))),"transport.produceData()"));case 26:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"consumeData",value:(r=s(o().mark((function e(t){var r,n,a,c,u,d,l,p,f,h=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.id,n=t.dataProducerId,a=t.sctpStreamParameters,c=t.label,u=void 0===c?"":c,d=t.protocol,l=void 0===d?"":d,p=t.appData,f=void 0===p?{}:p,L.debug("consumeData()"),a=O.clone(a,void 0),!this._closed){e.next=7;break}throw new R.InvalidStateError("closed");case 7:if("recv"===this._direction){e.next=11;break}throw new R.UnsupportedError("not a receiving Transport");case 11:if(this._maxSctpMessageSize){e.next=15;break}throw new R.UnsupportedError("SCTP not enabled by remote Transport");case 15:if("string"==typeof r){e.next=19;break}throw new TypeError("missing id");case 19:if("string"==typeof n){e.next=23;break}throw new TypeError("missing dataProducerId");case 23:if(0!==this.listenerCount("connect")||"new"!==this._connectionState){e.next=27;break}throw new TypeError('no "connect" listener set into this transport');case 27:if(!f||"object"===i(f)){e.next=29;break}throw new TypeError("if given, appData must be an object");case 29:return T.validateSctpStreamParameters(a),e.abrupt("return",this._awaitQueue.push(s(o().mark((function e(){var t,i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h._handler.receiveDataChannel({sctpStreamParameters:a,label:u,protocol:l});case 2:return t=e.sent,i=t.dataChannel,s=new C.DataConsumer({id:r,dataProducerId:n,dataChannel:i,sctpStreamParameters:a,appData:f}),h._dataConsumers.set(s.id,s),h.handleDataConsumer(s),h._observer.safeEmit("newdataconsumer",s),e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)}))),"transport.consumeData()"));case 31:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"createPendingConsumers",value:(t=s(o().mark((function e(){var t=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._consumerCreationInProgress=!0,this._awaitQueue.push(s(o().mark((function e(){var r,i,a,s,u,d,l,p,f,h,m,_,v,y,g,b,w,S,x,k,j,E,R,O,P,D,C,I;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t._pendingConsumerTasks.length){e.next=3;break}return L.debug("createPendingConsumers() | there is no Consumer to be created"),e.abrupt("return");case 3:r=n(t._pendingConsumerTasks),t._pendingConsumerTasks=[],i=void 0,a=[],s=c(r);try{for(s.s();!(u=s.n()).done;)d=u.value,l=d.consumerOptions,p=l.id,f=l.kind,h=l.rtpParameters,m=l.streamId,a.push({trackId:p,kind:f,rtpParameters:h,streamId:m})}catch(e){s.e(e)}finally{s.f()}return e.prev=9,e.next=12,t._handler.receive(a);case 12:for(_=e.sent,v=0;v<_.length;++v)y=r[v],g=_[v],b=y.consumerOptions,w=b.id,S=b.producerId,x=b.kind,k=b.rtpParameters,j=b.appData,E=g.localId,R=g.rtpReceiver,O=g.track,P=new A.Consumer({id:w,localId:E,producerId:S,rtpReceiver:R,track:O,rtpParameters:k,appData:j}),t._consumers.set(P.id,P),t.handleConsumer(P),t._probatorConsumerCreated||i||"video"!==x||(i=P),t._observer.safeEmit("newconsumer",P),y.resolve(P);e.next=20;break;case 16:e.prev=16,e.t0=e.catch(9),D=c(r);try{for(D.s();!(C=D.n()).done;)C.value.reject(e.t0)}catch(e){D.e(e)}finally{D.f()}case 20:if(!i){e.next=32;break}return e.prev=21,I=T.generateProbatorRtpParameters(i.rtpParameters),e.next=25,t._handler.receive([{trackId:"probator",kind:"video",rtpParameters:I}]);case 25:L.debug("createPendingConsumers() | Consumer for RTP probation created"),t._probatorConsumerCreated=!0,e.next=32;break;case 29:e.prev=29,e.t1=e.catch(21),L.error("createPendingConsumers() | failed to create Consumer for RTP probation:%o",e.t1);case 32:case"end":return e.stop()}}),e,null,[[9,16],[21,29]])}))),"transport.createPendingConsumers()").then((function(){t._consumerCreationInProgress=!1,t._pendingConsumerTasks.length>0&&t.createPendingConsumers()})).catch((function(){}));case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"pausePendingConsumers",value:function(){var e=this;this._consumerPauseInProgress=!0,this._awaitQueue.push(s(o().mark((function t(){var r,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==e._pendingPauseConsumers.size){t.next=3;break}return L.debug("pausePendingConsumers() | there is no Consumer to be paused"),t.abrupt("return");case 3:return r=Array.from(e._pendingPauseConsumers.values()),e._pendingPauseConsumers.clear(),t.prev=5,n=r.map((function(e){return e.localId})),t.next=9,e._handler.pauseReceiving(n);case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(5),L.error("pausePendingConsumers() | failed to pause Consumers:",t.t0);case 14:case"end":return t.stop()}}),t,null,[[5,11]])}))),"transport.pausePendingConsumers").then((function(){e._consumerPauseInProgress=!1,e._pendingPauseConsumers.size>0&&e.pausePendingConsumers()})).catch((function(){}))}},{key:"resumePendingConsumers",value:function(){var e=this;this._consumerResumeInProgress=!0,this._awaitQueue.push(s(o().mark((function t(){var r,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==e._pendingResumeConsumers.size){t.next=3;break}return L.debug("resumePendingConsumers() | there is no Consumer to be resumed"),t.abrupt("return");case 3:return r=Array.from(e._pendingResumeConsumers.values()),e._pendingResumeConsumers.clear(),t.prev=5,n=r.map((function(e){return e.localId})),t.next=9,e._handler.resumeReceiving(n);case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(5),L.error("resumePendingConsumers() | failed to resume Consumers:",t.t0);case 14:case"end":return t.stop()}}),t,null,[[5,11]])}))),"transport.resumePendingConsumers").then((function(){e._consumerResumeInProgress=!1,e._pendingResumeConsumers.size>0&&e.resumePendingConsumers()})).catch((function(){}))}},{key:"closePendingConsumers",value:function(){var e=this;this._consumerCloseInProgress=!0,this._awaitQueue.push(s(o().mark((function t(){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==e._pendingCloseConsumers.size){t.next=3;break}return L.debug("closePendingConsumers() | there is no Consumer to be closed"),t.abrupt("return");case 3:return r=Array.from(e._pendingCloseConsumers.values()),e._pendingCloseConsumers.clear(),t.prev=5,t.next=8,e._handler.stopReceiving(r.map((function(e){return e.localId})));case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(5),L.error("closePendingConsumers() | failed to close Consumers:",t.t0);case 13:case"end":return t.stop()}}),t,null,[[5,10]])}))),"transport.closePendingConsumers").then((function(){e._consumerCloseInProgress=!1,e._pendingCloseConsumers.size>0&&e.closePendingConsumers()})).catch((function(){}))}},{key:"handleHandler",value:function(){var e=this,t=this._handler;t.on("@connect",(function(t,r,n){var i=t.dtlsParameters;e._closed?n(new R.InvalidStateError("closed")):e.safeEmit("connect",{dtlsParameters:i},r,n)})),t.on("@connectionstatechange",(function(t){t!==e._connectionState&&(L.debug("connection state changed to %s",t),e._connectionState=t,e._closed||e.safeEmit("connectionstatechange",t))}))}},{key:"handleProducer",value:function(e){var t=this;e.on("@close",(function(){t._producers.delete(e.id),t._closed||t._awaitQueue.push(s(o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",t._handler.stopSending(e.localId));case 1:case"end":return r.stop()}}),r)}))),"producer @close event").catch((function(e){return L.warn("producer.close() failed:%o",e)}))})),e.on("@pause",(function(r,n){t._awaitQueue.push(s(o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",t._handler.pauseSending(e.localId));case 1:case"end":return r.stop()}}),r)}))),"producer @pause event").then(r).catch(n)})),e.on("@resume",(function(r,n){t._awaitQueue.push(s(o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",t._handler.resumeSending(e.localId));case 1:case"end":return r.stop()}}),r)}))),"producer @resume event").then(r).catch(n)})),e.on("@replacetrack",(function(r,n,i){t._awaitQueue.push(s(o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",t._handler.replaceTrack(e.localId,r));case 1:case"end":return n.stop()}}),n)}))),"producer @replacetrack event").then(n).catch(i)})),e.on("@setmaxspatiallayer",(function(r,n,i){t._awaitQueue.push(s(o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",t._handler.setMaxSpatialLayer(e.localId,r));case 1:case"end":return n.stop()}}),n)}))),"producer @setmaxspatiallayer event").then(n).catch(i)})),e.on("@setrtpencodingparameters",(function(r,n,i){t._awaitQueue.push(s(o().mark((function n(){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",t._handler.setRtpEncodingParameters(e.localId,r));case 1:case"end":return n.stop()}}),n)}))),"producer @setrtpencodingparameters event").then(n).catch(i)})),e.on("@getstats",(function(r,n){if(t._closed)return n(new R.InvalidStateError("closed"));t._handler.getSenderStats(e.localId).then(r).catch(n)}))}},{key:"handleConsumer",value:function(e){var t=this;e.on("@close",(function(){t._consumers.delete(e.id),t._pendingPauseConsumers.delete(e.id),t._pendingResumeConsumers.delete(e.id),t._closed||(t._pendingCloseConsumers.set(e.id,e),!1===t._consumerCloseInProgress&&t.closePendingConsumers())})),e.on("@pause",(function(){t._pendingResumeConsumers.has(e.id)&&t._pendingResumeConsumers.delete(e.id),t._pendingPauseConsumers.set(e.id,e),(0,k.default)((function(){t._closed||!1===t._consumerPauseInProgress&&t.pausePendingConsumers()}))})),e.on("@resume",(function(){t._pendingPauseConsumers.has(e.id)&&t._pendingPauseConsumers.delete(e.id),t._pendingResumeConsumers.set(e.id,e),(0,k.default)((function(){t._closed||!1===t._consumerResumeInProgress&&t.resumePendingConsumers()}))})),e.on("@getstats",(function(r,n){if(t._closed)return n(new R.InvalidStateError("closed"));t._handler.getReceiverStats(e.localId).then(r).catch(n)}))}},{key:"handleDataProducer",value:function(e){var t=this;e.on("@close",(function(){t._dataProducers.delete(e.id)}))}},{key:"handleDataConsumer",value:function(e){var t=this;e.on("@close",(function(){t._dataConsumers.delete(e.id)}))}}]),g}(E.EnhancedEventEmitter);t.Transport=M},"./node_modules/mediasoup-client/lib/errors.js":(e,t)=>{"use strict";function r(e){return(r="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 n(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){for(var r=0;r1){n.forEach((function(e,t){e.rid="r".concat(t)})),c=1,d=1,l=i(n);try{for(l.s();!(p=l.n()).done;)f=p.value,(h=f.scalabilityMode?(0,P.parse)(f.scalabilityMode).temporalLayers:3)>d&&(d=h)}catch(e){l.e(e)}finally{l.f()}m=i(n);try{for(m.s();!(_=m.n()).done;)(v=_.value).rid="r".concat(c++),v.scalabilityMode="L1T".concat(d)}catch(e){m.e(e)}finally{m.f()}}return(y=x.clone(this._sendingRtpParametersByKind[r.kind],{})).codecs=k.reduceCodecs(y.codecs,a),(g=x.clone(this._sendingRemoteRtpParametersByKind[r.kind],{})).codecs=k.reduceCodecs(g.codecs,a),b=this._remoteSdp.getNextMediaSectionIdx(),S=this._pc.addTransceiver(r,{direction:"sendonly",streams:[this._sendStream],sendEncodings:n}),e.next=12,this._pc.createOffer();case 12:if(R=e.sent,O=w.parse(R.sdp),this._transportReady){e.next=17;break}return e.next=17,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:O});case 17:return A.debug("send() | calling pc.setLocalDescription() [offer:%o]",R),e.next=20,this._pc.setLocalDescription(R);case 20:return T=S.mid,y.mid=T,O=w.parse(this._pc.localDescription.sdp),D=O.media[b.idx],y.rtcp.cname=j.getCname({offerMediaObject:D}),n?1===n.length?(C=E.getRtpEncodings({offerMediaObject:D}),Object.assign(C[0],n[0]),y.encodings=C):y.encodings=n:y.encodings=E.getRtpEncodings({offerMediaObject:D}),this._remoteSdp.send({offerMediaObject:D,reuseMid:b.reuseMid,offerRtpParameters:y,answerRtpParameters:g,codecOptions:o,extmapAllowMixed:!0}),L={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("send() | calling pc.setRemoteDescription() [answer:%o]",L),e.next=31,this._pc.setRemoteDescription(L);case 31:return this._mapMidTransceiver.set(T,S),e.abrupt("return",{localId:T,rtpParameters:y,rtpSender:S.sender});case 33:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"stopSending",value:(I=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("stopSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:if(r.sender.replaceTrack(null),this._pc.removeTrack(r.sender),this._remoteSdp.closeMediaSection(r.mid))try{r.stop()}catch(e){}return e.next=11,this._pc.createOffer();case 11:return n=e.sent,A.debug("stopSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=15,this._pc.setLocalDescription(n);case 15:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("stopSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=19,this._pc.setRemoteDescription(i);case 19:this._mapMidTransceiver.delete(t);case 20:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"pauseSending",value:(L=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("pauseSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return r.direction="inactive",this._remoteSdp.pauseMediaSection(t),e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("pauseSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("pauseSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"resumeSending",value:(C=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("resumeSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t),this._remoteSdp.resumeSendingMediaSection(t),r){e.next=6;break}throw new Error("associated RTCRtpTransceiver not found");case 6:return r.direction="sendonly",e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("resumeSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("resumeSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return C.apply(this,arguments)})},{key:"replaceTrack",value:(O=l(u().mark((function e(t,r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r?A.debug("replaceTrack() [localId:%s, track.id:%s]",t,r.id):A.debug("replaceTrack() [localId:%s, no track]",t),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return e.next=7,n.sender.replaceTrack(r);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"setMaxSpatialLayer",value:(S=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("setMaxSpatialLayer() [localId:%s, spatialLayer:%s]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){e.active=t<=r})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,A.debug("setMaxSpatialLayer() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("setMaxSpatialLayer() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"setRtpEncodingParameters",value:(b=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("setRtpEncodingParameters() [localId:%s, params:%o]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){i.encodings[t]=s(s({},e),r)})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,A.debug("setRtpEncodingParameters() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("setRtpEncodingParameters() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getSenderStats",value:(g=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.sender.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"sendDataChannel",value:(y=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.ordered,n=t.maxPacketLifeTime,i=t.maxRetransmits,o=t.label,a=t.protocol,this.assertSendDirection(),c={negotiated:!0,id:this._nextSendSctpStreamId,ordered:r,maxPacketLifeTime:n,maxRetransmits:i,protocol:a},A.debug("sendDataChannel() [options:%o]",c),d=this._pc.createDataChannel(o,c),this._nextSendSctpStreamId=++this._nextSendSctpStreamId%D.MIS,this._hasDataChannelMediaSection){e.next=24;break}return e.next=9,this._pc.createOffer();case 9:if(l=e.sent,p=w.parse(l.sdp),f=p.media.find((function(e){return"application"===e.type})),this._transportReady){e.next=15;break}return e.next=15,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:p});case 15:return A.debug("sendDataChannel() | calling pc.setLocalDescription() [offer:%o]",l),e.next=18,this._pc.setLocalDescription(l);case 18:return this._remoteSdp.sendSctpAssociation({offerMediaObject:f}),h={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=23,this._pc.setRemoteDescription(h);case 23:this._hasDataChannelMediaSection=!0;case 24:return m={streamId:c.id,ordered:c.ordered,maxPacketLifeTime:c.maxPacketLifeTime,maxRetransmits:c.maxRetransmits},e.abrupt("return",{dataChannel:d,sctpStreamParameters:m});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"receive",value:(v=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p,f,h,m,_,v,y,g,b,S,x,k,E=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),n=[],o=new Map,a=i(t);try{for(a.s();!(s=a.n()).done;)c=s.value,d=c.trackId,l=c.kind,p=c.rtpParameters,f=c.streamId,A.debug("receive() [trackId:%s, kind:%s]",d,l),h=p.mid||String(this._mapMidTransceiver.size),o.set(d,h),this._remoteSdp.receive({mid:h,kind:l,offerRtpParameters:p,streamId:f||p.rtcp.cname,trackId:d})}catch(e){a.e(e)}finally{a.f()}return m={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("receive() | calling pc.setRemoteDescription() [offer:%o]",m),e.next=9,this._pc.setRemoteDescription(m);case 9:return e.next=11,this._pc.createAnswer();case 11:_=e.sent,v=w.parse(_.sdp),y=i(t),e.prev=14,b=u().mark((function e(){var t,r,n,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=g.value,r=t.trackId,n=t.rtpParameters,i=o.get(r),a=v.media.find((function(e){return String(e.mid)===i})),j.applyCodecParameters({offerRtpParameters:n,answerMediaObject:a});case 5:case"end":return e.stop()}}),e)})),y.s();case 17:if((g=y.n()).done){e.next=21;break}return e.delegateYield(b(),"t0",19);case 19:e.next=17;break;case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(14),y.e(e.t1);case 26:return e.prev=26,y.f(),e.finish(26);case 29:if(_={type:"answer",sdp:w.write(v)},this._transportReady){e.next=33;break}return e.next=33,this.setupTransport({localDtlsRole:null!==(r=this._forcedLocalDtlsRole)&&void 0!==r?r:"client",localSdpObject:v});case 33:return A.debug("receive() | calling pc.setLocalDescription() [answer:%o]",_),e.next=36,this._pc.setLocalDescription(_);case 36:S=i(t),e.prev=37,k=u().mark((function e(){var t,r,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=x.value,r=t.trackId,i=o.get(r),a=E._pc.getTransceivers().find((function(e){return e.mid===i}))){e.next=8;break}throw new Error("new RTCRtpTransceiver not found");case 8:E._mapMidTransceiver.set(i,a),n.push({localId:i,track:a.receiver.track,rtpReceiver:a.receiver});case 10:case"end":return e.stop()}}),e)})),S.s();case 40:if((x=S.n()).done){e.next=44;break}return e.delegateYield(k(),"t2",42);case 42:e.next=40;break;case 44:e.next=49;break;case 46:e.prev=46,e.t3=e.catch(37),S.e(e.t3);case 49:return e.prev=49,S.f(),e.finish(49);case 52:return e.abrupt("return",n);case 53:case"end":return e.stop()}}),e,this,[[14,23,26,29],[37,46,49,52]])}))),function(e){return v.apply(this,arguments)})},{key:"stopReceiving",value:(_=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=13;break}if(o=n.value,A.debug("stopReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:this._remoteSdp.closeMediaSection(a.mid);case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("stopReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=25,this._pc.setRemoteDescription(s);case 25:return e.next=27,this._pc.createAnswer();case 27:return c=e.sent,A.debug("stopReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=31,this._pc.setLocalDescription(c);case 31:d=i(t);try{for(d.s();!(l=d.n()).done;)p=l.value,this._mapMidTransceiver.delete(p)}catch(e){d.e(e)}finally{d.f()}case 33:case"end":return e.stop()}}),e,this,[[2,15,18,21]])}))),function(e){return _.apply(this,arguments)})},{key:"pauseReceiving",value:(f=l(u().mark((function e(t){var r,n,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}if(o=n.value,A.debug("pauseReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:a.direction="inactive",this._remoteSdp.pauseMediaSection(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=26,this._pc.setRemoteDescription(s);case 26:return e.next=28,this._pc.createAnswer();case 28:return c=e.sent,A.debug("pauseReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=32,this._pc.setLocalDescription(c);case 32:case"end":return e.stop()}}),e,this,[[2,16,19,22]])}))),function(e){return f.apply(this,arguments)})},{key:"resumeReceiving",value:(d=l(u().mark((function e(t){var r,n,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}if(o=n.value,A.debug("resumeReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:a.direction="recvonly",this._remoteSdp.resumeReceivingMediaSection(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=26,this._pc.setRemoteDescription(s);case 26:return e.next=28,this._pc.createAnswer();case 28:return c=e.sent,A.debug("resumeReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=32,this._pc.setLocalDescription(c);case 32:case"end":return e.stop()}}),e,this,[[2,16,19,22]])}))),function(e){return d.apply(this,arguments)})},{key:"getReceiverStats",value:(c=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertRecvDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.receiver.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"receiveDataChannel",value:(a=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.sctpStreamParameters,n=t.label,i=t.protocol,this.assertRecvDirection(),a=r.streamId,s=r.ordered,c=r.maxPacketLifeTime,d=r.maxRetransmits,l={negotiated:!0,id:a,ordered:s,maxPacketLifeTime:c,maxRetransmits:d,protocol:i},A.debug("receiveDataChannel() [options:%o]",l),p=this._pc.createDataChannel(n,l),this._hasDataChannelMediaSection){e.next=23;break}return this._remoteSdp.receiveSctpAssociation(),f={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]",f),e.next=12,this._pc.setRemoteDescription(f);case 12:return e.next=14,this._pc.createAnswer();case 14:if(h=e.sent,this._transportReady){e.next=19;break}return m=w.parse(h.sdp),e.next=19,this.setupTransport({localDtlsRole:null!==(o=this._forcedLocalDtlsRole)&&void 0!==o?o:"client",localSdpObject:m});case 19:return A.debug("receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=22,this._pc.setLocalDescription(h);case 22:this._hasDataChannelMediaSection=!0;case 23:return e.abrupt("return",{dataChannel:p});case 24:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setupTransport",value:(o=l(u().mark((function e(t){var r,n,i,o=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.localDtlsRole,(n=t.localSdpObject)||(n=w.parse(this._pc.localDescription.sdp)),(i=j.extractDtlsParameters({sdpObject:n})).role=r,this._remoteSdp.updateDtlsRole("client"===r?"server":"client"),e.next=7,new Promise((function(e,t){o.safeEmit("@connect",{dtlsParameters:i},e,t)}));case 7:this._transportReady=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"assertSendDirection",value:function(){if("send"!==this._direction)throw new Error('method can just be called for handlers with "send" direction')}},{key:"assertRecvDirection",value:function(){if("recv"!==this._direction)throw new Error('method can just be called for handlers with "recv" direction')}}],n=[{key:"createFactory",value:function(){return function(){return new z}}}],r&&p(t.prototype,r),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),z}(O.HandlerInterface);t.Chrome111=C},"./node_modules/mediasoup-client/lib/handlers/Chrome55.js":function(e,t,r){"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)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function u(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){u(o,n,i,a,s,"next",e)}function s(e){u(o,n,i,a,s,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r1&&(T.debug("send() | enabling simulcast"),d=b.parse(u.sdp),l=d.media.find((function(e){return"video"===e.type})),E.addLegacySimulcast({offerMediaObject:l,track:r,numStreams:n.length}),u={type:"offer",sdp:b.write(d)}),T.debug("send() | calling pc.setLocalDescription() [offer:%o]",u),e.next=21,this._pc.setLocalDescription(u);case 21:if(d=b.parse(this._pc.localDescription.sdp),l=d.media.find((function(e){return e.type===r.kind})),p.rtcp.cname=j.getCname({offerMediaObject:l}),p.encodings=E.getRtpEncodings({offerMediaObject:l,track:r}),n)for(h=0;h1&&"video/vp8"===p.codecs[0].mimeType.toLowerCase()){m=i(p.encodings);try{for(m.s();!(_=m.n()).done;)_.value.scalabilityMode="L1T3"}catch(e){m.e(e)}finally{m.f()}}return this._remoteSdp.send({offerMediaObject:l,offerRtpParameters:p,answerRtpParameters:f,codecOptions:o}),v={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("send() | calling pc.setRemoteDescription() [answer:%o]",v),e.next=32,this._pc.setRemoteDescription(v);case 32:return y=String(this._nextSendLocalId),this._nextSendLocalId++,this._mapSendLocalIdTrack.set(y,r),e.abrupt("return",{localId:y,rtpParameters:p});case 36:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"stopSending",value:(I=d(c().mark((function e(t){var r,n,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),T.debug("stopSending() [localId:%s]",t),r=this._mapSendLocalIdTrack.get(t)){e.next=5;break}throw new Error("track not found");case 5:return this._mapSendLocalIdTrack.delete(t),this._sendStream.removeTrack(r),this._pc.addStream(this._sendStream),e.next=10,this._pc.createOffer();case 10:return n=e.sent,T.debug("stopSending() | calling pc.setLocalDescription() [offer:%o]",n),e.prev=12,e.next=15,this._pc.setLocalDescription(n);case 15:e.next=23;break;case 17:if(e.prev=17,e.t0=e.catch(12),0!==this._sendStream.getTracks().length){e.next=22;break}return T.warn("stopSending() | ignoring expected error due no sending tracks: %s",e.t0.toString()),e.abrupt("return");case 22:throw e.t0;case 23:if("stable"!==this._pc.signalingState){e.next=25;break}return e.abrupt("return");case 25:return i={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("stopSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=29,this._pc.setRemoteDescription(i);case 29:case"end":return e.stop()}}),e,this,[[12,17]])}))),function(e){return I.apply(this,arguments)})},{key:"pauseSending",value:(L=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return L.apply(this,arguments)})},{key:"resumeSending",value:(C=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return C.apply(this,arguments)})},{key:"replaceTrack",value:(D=d(c().mark((function e(t,r){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new S.UnsupportedError("not implemented");case 1:case"end":return e.stop()}}),e)}))),function(e,t){return D.apply(this,arguments)})},{key:"setMaxSpatialLayer",value:(A=d(c().mark((function e(t,r){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new S.UnsupportedError(" not implemented");case 1:case"end":return e.stop()}}),e)}))),function(e,t){return A.apply(this,arguments)})},{key:"setRtpEncodingParameters",value:(R=d(c().mark((function e(t,r){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new S.UnsupportedError("not supported");case 1:case"end":return e.stop()}}),e)}))),function(e,t){return R.apply(this,arguments)})},{key:"getSenderStats",value:(w=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new S.UnsupportedError("not implemented");case 1:case"end":return e.stop()}}),e)}))),function(e){return w.apply(this,arguments)})},{key:"sendDataChannel",value:(g=d(c().mark((function e(t){var r,n,i,o,a,s,u,d,l,p,f,h,m;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.ordered,n=t.maxPacketLifeTime,i=t.maxRetransmits,o=t.label,a=t.protocol,this.assertSendDirection(),u={negotiated:!0,id:this._nextSendSctpStreamId,ordered:r,maxPacketLifeTime:n,maxRetransmitTime:n,maxRetransmits:i,protocol:a},T.debug("sendDataChannel() [options:%o]",u),d=this._pc.createDataChannel(o,u),this._nextSendSctpStreamId=++this._nextSendSctpStreamId%P.MIS,this._hasDataChannelMediaSection){e.next=24;break}return e.next=9,this._pc.createOffer();case 9:if(l=e.sent,p=b.parse(l.sdp),f=p.media.find((function(e){return"application"===e.type})),this._transportReady){e.next=15;break}return e.next=15,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:p});case 15:return T.debug("sendDataChannel() | calling pc.setLocalDescription() [offer:%o]",l),e.next=18,this._pc.setLocalDescription(l);case 18:return this._remoteSdp.sendSctpAssociation({offerMediaObject:f}),h={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=23,this._pc.setRemoteDescription(h);case 23:this._hasDataChannelMediaSection=!0;case 24:return m={streamId:u.id,ordered:u.ordered,maxPacketLifeTime:u.maxPacketLifeTime,maxRetransmits:u.maxRetransmits},e.abrupt("return",{dataChannel:d,sctpStreamParameters:m});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"receive",value:(y=d(c().mark((function e(t){var r,n,o,a,s,u,d,l,p,f,h,m,_,v,y,g,w,S,x,k=this;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),n=[],o=i(t);try{for(o.s();!(a=o.n()).done;)s=a.value,u=s.trackId,d=s.kind,l=s.rtpParameters,p=s.streamId,T.debug("receive() [trackId:%s, kind:%s]",u,d),f=d,this._remoteSdp.receive({mid:f,kind:d,offerRtpParameters:l,streamId:p||l.rtcp.cname,trackId:u})}catch(e){o.e(e)}finally{o.f()}return h={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("receive() | calling pc.setRemoteDescription() [offer:%o]",h),e.next=8,this._pc.setRemoteDescription(h);case 8:return e.next=10,this._pc.createAnswer();case 10:m=e.sent,_=b.parse(m.sdp),v=i(t),e.prev=13,g=c().mark((function e(){var t,r,n,i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=y.value,r=t.kind,n=t.rtpParameters,i=r,o=_.media.find((function(e){return String(e.mid)===i})),j.applyCodecParameters({offerRtpParameters:n,answerMediaObject:o});case 5:case"end":return e.stop()}}),e)})),v.s();case 16:if((y=v.n()).done){e.next=20;break}return e.delegateYield(g(),"t0",18);case 18:e.next=16;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(13),v.e(e.t1);case 25:return e.prev=25,v.f(),e.finish(25);case 28:if(m={type:"answer",sdp:b.write(_)},this._transportReady){e.next=32;break}return e.next=32,this.setupTransport({localDtlsRole:null!==(r=this._forcedLocalDtlsRole)&&void 0!==r?r:"client",localSdpObject:_});case 32:return T.debug("receive() | calling pc.setLocalDescription() [answer:%o]",m),e.next=35,this._pc.setLocalDescription(m);case 35:w=i(t),e.prev=36,x=c().mark((function e(){var t,r,i,o,a,s,u,d,l;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=S.value,r=t.kind,i=t.trackId,o=t.rtpParameters,a=r,s=i,u=t.streamId||o.rtcp.cname,d=k._pc.getRemoteStreams().find((function(e){return e.id===u})),l=d.getTrackById(s)){e.next=9;break}throw new Error("remote track not found");case 9:k._mapRecvLocalIdInfo.set(s,{mid:a,rtpParameters:o}),n.push({localId:s,track:l});case 11:case"end":return e.stop()}}),e)})),w.s();case 39:if((S=w.n()).done){e.next=43;break}return e.delegateYield(x(),"t2",41);case 41:e.next=39;break;case 43:e.next=48;break;case 45:e.prev=45,e.t3=e.catch(36),w.e(e.t3);case 48:return e.prev=48,w.f(),e.finish(48);case 51:return e.abrupt("return",n);case 52:case"end":return e.stop()}}),e,this,[[13,22,25,28],[36,45,48,51]])}))),function(e){return y.apply(this,arguments)})},{key:"stopReceiving",value:(v=d(c().mark((function e(t){var r,n,o,a,s,u,d,l;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t);try{for(r.s();!(n=r.n()).done;)o=n.value,T.debug("stopReceiving() [localId:%s]",o),a=this._mapRecvLocalIdInfo.get(o)||{},s=a.mid,u=a.rtpParameters,this._mapRecvLocalIdInfo.delete(o),this._remoteSdp.planBStopReceiving({mid:s,offerRtpParameters:u})}catch(e){r.e(e)}finally{r.f()}return d={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("stopReceiving() | calling pc.setRemoteDescription() [offer:%o]",d),e.next=7,this._pc.setRemoteDescription(d);case 7:return e.next=9,this._pc.createAnswer();case 9:return l=e.sent,T.debug("stopReceiving() | calling pc.setLocalDescription() [answer:%o]",l),e.next=13,this._pc.setLocalDescription(l);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"pauseReceiving",value:(_=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return _.apply(this,arguments)})},{key:"resumeReceiving",value:(m=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return m.apply(this,arguments)})},{key:"getReceiverStats",value:(p=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new S.UnsupportedError("not implemented");case 1:case"end":return e.stop()}}),e)}))),function(e){return p.apply(this,arguments)})},{key:"receiveDataChannel",value:(u=d(c().mark((function e(t){var r,n,i,o,a,s,u,d,l,p,f,h,m;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.sctpStreamParameters,n=t.label,i=t.protocol,this.assertRecvDirection(),a=r.streamId,s=r.ordered,u=r.maxPacketLifeTime,d=r.maxRetransmits,l={negotiated:!0,id:a,ordered:s,maxPacketLifeTime:u,maxRetransmitTime:u,maxRetransmits:d,protocol:i},T.debug("receiveDataChannel() [options:%o]",l),p=this._pc.createDataChannel(n,l),this._hasDataChannelMediaSection){e.next=23;break}return this._remoteSdp.receiveSctpAssociation({oldDataChannelSpec:!0}),f={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]",f),e.next=12,this._pc.setRemoteDescription(f);case 12:return e.next=14,this._pc.createAnswer();case 14:if(h=e.sent,this._transportReady){e.next=19;break}return m=b.parse(h.sdp),e.next=19,this.setupTransport({localDtlsRole:null!==(o=this._forcedLocalDtlsRole)&&void 0!==o?o:"client",localSdpObject:m});case 19:return T.debug("receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=22,this._pc.setLocalDescription(h);case 22:this._hasDataChannelMediaSection=!0;case 23:return e.abrupt("return",{dataChannel:p});case 24:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"setupTransport",value:(o=d(c().mark((function e(t){var r,n,i,o=this;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.localDtlsRole,(n=t.localSdpObject)||(n=b.parse(this._pc.localDescription.sdp)),(i=j.extractDtlsParameters({sdpObject:n})).role=r,this._remoteSdp.updateDtlsRole("client"===r?"server":"client"),e.next=7,new Promise((function(e,t){o.safeEmit("@connect",{dtlsParameters:i},e,t)}));case 7:this._transportReady=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"assertSendDirection",value:function(){if("send"!==this._direction)throw new Error('method can just be called for handlers with "send" direction')}},{key:"assertRecvDirection",value:function(){if("recv"!==this._direction)throw new Error('method can just be called for handlers with "recv" direction')}}],n=[{key:"createFactory",value:function(){return function(){return new z}}}],r&&l(t.prototype,r),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),z}(R.HandlerInterface);t.Chrome55=A},"./node_modules/mediasoup-client/lib/handlers/Chrome67.js":function(e,t,r){"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)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){for(var r=0;r1&&(T.debug("send() | enabling simulcast"),d=w.parse(c.sdp),l=d.media.find((function(e){return"video"===e.type})),E.addLegacySimulcast({offerMediaObject:l,track:r,numStreams:n.length}),c={type:"offer",sdp:w.write(d)}),T.debug("send() | calling pc.setLocalDescription() [offer:%o]",c),e.next=21,this._pc.setLocalDescription(c);case 21:if(d=w.parse(this._pc.localDescription.sdp),l=d.media.find((function(e){return e.type===r.kind})),p.rtcp.cname=j.getCname({offerMediaObject:l}),p.encodings=E.getRtpEncodings({offerMediaObject:l,track:r}),n)for(h=0;h1&&"video/vp8"===p.codecs[0].mimeType.toLowerCase()){m=i(p.encodings);try{for(m.s();!(_=m.n()).done;)_.value.scalabilityMode="L1T3"}catch(e){m.e(e)}finally{m.f()}}return this._remoteSdp.send({offerMediaObject:l,offerRtpParameters:p,answerRtpParameters:f,codecOptions:o}),v={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("send() | calling pc.setRemoteDescription() [answer:%o]",v),e.next=32,this._pc.setRemoteDescription(v);case 32:return y=String(this._nextSendLocalId),this._nextSendLocalId++,g=this._pc.getSenders().find((function(e){return e.track===r})),this._mapSendLocalIdRtpSender.set(y,g),e.abrupt("return",{localId:y,rtpParameters:p,rtpSender:g});case 37:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"stopSending",value:(C=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),T.debug("stopSending() [localId:%s]",t),r=this._mapSendLocalIdRtpSender.get(t)){e.next=5;break}throw new Error("associated RTCRtpSender not found");case 5:return this._pc.removeTrack(r),r.track&&this._sendStream.removeTrack(r.track),this._mapSendLocalIdRtpSender.delete(t),e.next=10,this._pc.createOffer();case 10:return n=e.sent,T.debug("stopSending() | calling pc.setLocalDescription() [offer:%o]",n),e.prev=12,e.next=15,this._pc.setLocalDescription(n);case 15:e.next=23;break;case 17:if(e.prev=17,e.t0=e.catch(12),0!==this._sendStream.getTracks().length){e.next=22;break}return T.warn("stopSending() | ignoring expected error due no sending tracks: %s",e.t0.toString()),e.abrupt("return");case 22:throw e.t0;case 23:if("stable"!==this._pc.signalingState){e.next=25;break}return e.abrupt("return");case 25:return i={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("stopSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=29,this._pc.setRemoteDescription(i);case 29:case"end":return e.stop()}}),e,this,[[12,17]])}))),function(e){return C.apply(this,arguments)})},{key:"pauseSending",value:(D=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return D.apply(this,arguments)})},{key:"resumeSending",value:(A=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"replaceTrack",value:(R=l(u().mark((function e(t,r){var n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r?T.debug("replaceTrack() [localId:%s, track.id:%s]",t,r.id):T.debug("replaceTrack() [localId:%s, no track]",t),n=this._mapSendLocalIdRtpSender.get(t)){e.next=5;break}throw new Error("associated RTCRtpSender not found");case 5:return i=n.track,e.next=8,n.replaceTrack(r);case 8:i&&this._sendStream.removeTrack(i),r&&this._sendStream.addTrack(r);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"setMaxSpatialLayer",value:(S=l(u().mark((function e(t,r){var n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),T.debug("setMaxSpatialLayer() [localId:%s, spatialLayer:%s]",t,r),n=this._mapSendLocalIdRtpSender.get(t)){e.next=5;break}throw new Error("associated RTCRtpSender not found");case 5:return(i=n.getParameters()).encodings.forEach((function(e,t){e.active=t<=r})),e.next=9,n.setParameters(i);case 9:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"setRtpEncodingParameters",value:(b=l(u().mark((function e(t,r){var n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),T.debug("setRtpEncodingParameters() [localId:%s, params:%o]",t,r),n=this._mapSendLocalIdRtpSender.get(t)){e.next=5;break}throw new Error("associated RTCRtpSender not found");case 5:return(i=n.getParameters()).encodings.forEach((function(e,t){i.encodings[t]=s(s({},e),r)})),e.next=9,n.setParameters(i);case 9:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getSenderStats",value:(g=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r=this._mapSendLocalIdRtpSender.get(t)){e.next=4;break}throw new Error("associated RTCRtpSender not found");case 4:return e.abrupt("return",r.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"sendDataChannel",value:(y=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.ordered,n=t.maxPacketLifeTime,i=t.maxRetransmits,o=t.label,a=t.protocol,this.assertSendDirection(),c={negotiated:!0,id:this._nextSendSctpStreamId,ordered:r,maxPacketLifeTime:n,maxRetransmitTime:n,maxRetransmits:i,protocol:a},T.debug("sendDataChannel() [options:%o]",c),d=this._pc.createDataChannel(o,c),this._nextSendSctpStreamId=++this._nextSendSctpStreamId%P.MIS,this._hasDataChannelMediaSection){e.next=24;break}return e.next=9,this._pc.createOffer();case 9:if(l=e.sent,p=w.parse(l.sdp),f=p.media.find((function(e){return"application"===e.type})),this._transportReady){e.next=15;break}return e.next=15,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:p});case 15:return T.debug("sendDataChannel() | calling pc.setLocalDescription() [offer:%o]",l),e.next=18,this._pc.setLocalDescription(l);case 18:return this._remoteSdp.sendSctpAssociation({offerMediaObject:f}),h={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=23,this._pc.setRemoteDescription(h);case 23:this._hasDataChannelMediaSection=!0;case 24:return m={streamId:c.id,ordered:c.ordered,maxPacketLifeTime:c.maxPacketLifeTime,maxRetransmits:c.maxRetransmits},e.abrupt("return",{dataChannel:d,sctpStreamParameters:m});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"receive",value:(v=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p,f,h,m,_,v,y,g,b,S,x,k=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),n=[],o=i(t);try{for(o.s();!(a=o.n()).done;)s=a.value,c=s.trackId,d=s.kind,l=s.rtpParameters,p=s.streamId,T.debug("receive() [trackId:%s, kind:%s]",c,d),f=d,this._remoteSdp.receive({mid:f,kind:d,offerRtpParameters:l,streamId:p||l.rtcp.cname,trackId:c})}catch(e){o.e(e)}finally{o.f()}return h={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("receive() | calling pc.setRemoteDescription() [offer:%o]",h),e.next=8,this._pc.setRemoteDescription(h);case 8:return e.next=10,this._pc.createAnswer();case 10:m=e.sent,_=w.parse(m.sdp),v=i(t),e.prev=13,g=u().mark((function e(){var t,r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=y.value,r=t.kind,n=t.rtpParameters,i=r,o=_.media.find((function(e){return String(e.mid)===i})),j.applyCodecParameters({offerRtpParameters:n,answerMediaObject:o});case 5:case"end":return e.stop()}}),e)})),v.s();case 16:if((y=v.n()).done){e.next=20;break}return e.delegateYield(g(),"t0",18);case 18:e.next=16;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(13),v.e(e.t1);case 25:return e.prev=25,v.f(),e.finish(25);case 28:if(m={type:"answer",sdp:w.write(_)},this._transportReady){e.next=32;break}return e.next=32,this.setupTransport({localDtlsRole:null!==(r=this._forcedLocalDtlsRole)&&void 0!==r?r:"client",localSdpObject:_});case 32:return T.debug("receive() | calling pc.setLocalDescription() [answer:%o]",m),e.next=35,this._pc.setLocalDescription(m);case 35:b=i(t),e.prev=36,x=u().mark((function e(){var t,r,i,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=S.value,r=t.kind,i=t.trackId,o=t.rtpParameters,a=i,s=r,c=k._pc.getReceivers().find((function(e){return e.track&&e.track.id===a}))){e.next=7;break}throw new Error("new RTCRtpReceiver not");case 7:k._mapRecvLocalIdInfo.set(a,{mid:s,rtpParameters:o,rtpReceiver:c}),n.push({localId:a,track:c.track,rtpReceiver:c});case 9:case"end":return e.stop()}}),e)})),b.s();case 39:if((S=b.n()).done){e.next=43;break}return e.delegateYield(x(),"t2",41);case 41:e.next=39;break;case 43:e.next=48;break;case 45:e.prev=45,e.t3=e.catch(36),b.e(e.t3);case 48:return e.prev=48,b.f(),e.finish(48);case 51:return e.abrupt("return",n);case 52:case"end":return e.stop()}}),e,this,[[13,22,25,28],[36,45,48,51]])}))),function(e){return v.apply(this,arguments)})},{key:"stopReceiving",value:(_=l(u().mark((function e(t){var r,n,o,a,s,c,d,l;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t);try{for(r.s();!(n=r.n()).done;)o=n.value,T.debug("stopReceiving() [localId:%s]",o),a=this._mapRecvLocalIdInfo.get(o)||{},s=a.mid,c=a.rtpParameters,this._mapRecvLocalIdInfo.delete(o),this._remoteSdp.planBStopReceiving({mid:s,offerRtpParameters:c})}catch(e){r.e(e)}finally{r.f()}return d={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("stopReceiving() | calling pc.setRemoteDescription() [offer:%o]",d),e.next=7,this._pc.setRemoteDescription(d);case 7:return e.next=9,this._pc.createAnswer();case 9:return l=e.sent,T.debug("stopReceiving() | calling pc.setLocalDescription() [answer:%o]",l),e.next=13,this._pc.setLocalDescription(l);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return _.apply(this,arguments)})},{key:"pauseReceiving",value:(f=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)})},{key:"resumeReceiving",value:(d=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return d.apply(this,arguments)})},{key:"getReceiverStats",value:(c=l(u().mark((function e(t){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertRecvDirection(),r=this._mapRecvLocalIdInfo.get(t)||{},n=r.rtpReceiver){e.next=4;break}throw new Error("associated RTCRtpReceiver not found");case 4:return e.abrupt("return",n.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"receiveDataChannel",value:(a=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.sctpStreamParameters,n=t.label,i=t.protocol,this.assertRecvDirection(),a=r.streamId,s=r.ordered,c=r.maxPacketLifeTime,d=r.maxRetransmits,l={negotiated:!0,id:a,ordered:s,maxPacketLifeTime:c,maxRetransmitTime:c,maxRetransmits:d,protocol:i},T.debug("receiveDataChannel() [options:%o]",l),p=this._pc.createDataChannel(n,l),this._hasDataChannelMediaSection){e.next=23;break}return this._remoteSdp.receiveSctpAssociation({oldDataChannelSpec:!0}),f={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]",f),e.next=12,this._pc.setRemoteDescription(f);case 12:return e.next=14,this._pc.createAnswer();case 14:if(h=e.sent,this._transportReady){e.next=19;break}return m=w.parse(h.sdp),e.next=19,this.setupTransport({localDtlsRole:null!==(o=this._forcedLocalDtlsRole)&&void 0!==o?o:"client",localSdpObject:m});case 19:return T.debug("receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=22,this._pc.setLocalDescription(h);case 22:this._hasDataChannelMediaSection=!0;case 23:return e.abrupt("return",{dataChannel:p});case 24:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setupTransport",value:(o=l(u().mark((function e(t){var r,n,i,o=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.localDtlsRole,(n=t.localSdpObject)||(n=w.parse(this._pc.localDescription.sdp)),(i=j.extractDtlsParameters({sdpObject:n})).role=r,this._remoteSdp.updateDtlsRole("client"===r?"server":"client"),e.next=7,new Promise((function(e,t){o.safeEmit("@connect",{dtlsParameters:i},e,t)}));case 7:this._transportReady=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"assertSendDirection",value:function(){if("send"!==this._direction)throw new Error('method can just be called for handlers with "send" direction')}},{key:"assertRecvDirection",value:function(){if("recv"!==this._direction)throw new Error('method can just be called for handlers with "recv" direction')}}],n=[{key:"createFactory",value:function(){return function(){return new F}}}],r&&p(t.prototype,r),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),F}(R.HandlerInterface);t.Chrome67=A},"./node_modules/mediasoup-client/lib/handlers/Chrome70.js":function(e,t,r){"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)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){for(var r=0;r1&&(P.debug("send() | enabling legacy simulcast"),h=w.parse(f.sdp),m=h.media[l.idx],E.addLegacySimulcast({offerMediaObject:m,numStreams:n.length}),f={type:"offer",sdp:w.write(h)}),_=!1,v=(0,T.parse)((n||[{}])[0].scalabilityMode),n&&1===n.length&&v.spatialLayers>1&&"video/vp9"===c.codecs[0].mimeType.toLowerCase()&&(P.debug("send() | enabling legacy simulcast for VP9 SVC"),_=!0,h=w.parse(f.sdp),m=h.media[l.idx],E.addLegacySimulcast({offerMediaObject:m,numStreams:v.spatialLayers}),f={type:"offer",sdp:w.write(h)}),P.debug("send() | calling pc.setLocalDescription() [offer:%o]",f),e.next=23,this._pc.setLocalDescription(f);case 23:if(!n){e.next=38;break}P.debug("send() | applying given encodings"),y=p.sender.getParameters(),g=0;case 27:if(!(g<(y.encodings||[]).length)){e.next=36;break}if(b=y.encodings[g],S=n[g]){e.next=32;break}return e.abrupt("break",36);case 32:y.encodings[g]=Object.assign(b,S);case 33:++g,e.next=27;break;case 36:return e.next=38,p.sender.setParameters(y);case 38:if(R=p.mid,c.mid=R,h=w.parse(this._pc.localDescription.sdp),m=h.media[l.idx],c.rtcp.cname=j.getCname({offerMediaObject:m}),c.encodings=E.getRtpEncodings({offerMediaObject:m}),n)for(O=0;O1&&("video/vp8"===c.codecs[0].mimeType.toLowerCase()||"video/h264"===c.codecs[0].mimeType.toLowerCase())){A=i(c.encodings);try{for(A.s();!(D=A.n()).done;)D.value.scalabilityMode="L1T3"}catch(e){A.e(e)}finally{A.f()}}return this._remoteSdp.send({offerMediaObject:m,reuseMid:l.reuseMid,offerRtpParameters:c,answerRtpParameters:d,codecOptions:o}),C={type:"answer",sdp:this._remoteSdp.getSdp()},P.debug("send() | calling pc.setRemoteDescription() [answer:%o]",C),e.next=52,this._pc.setRemoteDescription(C);case 52:return this._mapMidTransceiver.set(R,p),e.abrupt("return",{localId:R,rtpParameters:c,rtpSender:p.sender});case 54:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"stopSending",value:(L=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),P.debug("stopSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:if(r.sender.replaceTrack(null),this._pc.removeTrack(r.sender),this._remoteSdp.closeMediaSection(r.mid))try{r.stop()}catch(e){}return e.next=11,this._pc.createOffer();case 11:return n=e.sent,P.debug("stopSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=15,this._pc.setLocalDescription(n);case 15:return i={type:"answer",sdp:this._remoteSdp.getSdp()},P.debug("stopSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=19,this._pc.setRemoteDescription(i);case 19:this._mapMidTransceiver.delete(t);case 20:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"pauseSending",value:(C=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return C.apply(this,arguments)})},{key:"resumeSending",value:(D=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return D.apply(this,arguments)})},{key:"replaceTrack",value:(R=l(u().mark((function e(t,r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r?P.debug("replaceTrack() [localId:%s, track.id:%s]",t,r.id):P.debug("replaceTrack() [localId:%s, no track]",t),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return e.next=7,n.sender.replaceTrack(r);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"setMaxSpatialLayer",value:(S=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),P.debug("setMaxSpatialLayer() [localId:%s, spatialLayer:%s]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){e.active=t<=r})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,P.debug("setMaxSpatialLayer() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},P.debug("setMaxSpatialLayer() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"setRtpEncodingParameters",value:(b=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),P.debug("setRtpEncodingParameters() [localId:%s, params:%o]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){i.encodings[t]=s(s({},e),r)})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,P.debug("setRtpEncodingParameters() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},P.debug("setRtpEncodingParameters() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getSenderStats",value:(g=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.sender.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"sendDataChannel",value:(y=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.ordered,n=t.maxPacketLifeTime,i=t.maxRetransmits,o=t.label,a=t.protocol,this.assertSendDirection(),c={negotiated:!0,id:this._nextSendSctpStreamId,ordered:r,maxPacketLifeTime:n,maxRetransmitTime:n,maxRetransmits:i,protocol:a},P.debug("sendDataChannel() [options:%o]",c),d=this._pc.createDataChannel(o,c),this._nextSendSctpStreamId=++this._nextSendSctpStreamId%A.MIS,this._hasDataChannelMediaSection){e.next=24;break}return e.next=9,this._pc.createOffer();case 9:if(l=e.sent,p=w.parse(l.sdp),f=p.media.find((function(e){return"application"===e.type})),this._transportReady){e.next=15;break}return e.next=15,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:p});case 15:return P.debug("sendDataChannel() | calling pc.setLocalDescription() [offer:%o]",l),e.next=18,this._pc.setLocalDescription(l);case 18:return this._remoteSdp.sendSctpAssociation({offerMediaObject:f}),h={type:"answer",sdp:this._remoteSdp.getSdp()},P.debug("sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=23,this._pc.setRemoteDescription(h);case 23:this._hasDataChannelMediaSection=!0;case 24:return m={streamId:c.id,ordered:c.ordered,maxPacketLifeTime:c.maxPacketLifeTime,maxRetransmits:c.maxRetransmits},e.abrupt("return",{dataChannel:d,sctpStreamParameters:m});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"receive",value:(v=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p,f,h,m,_,v,y,g,b,S,x,k,E=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),n=[],o=new Map,a=i(t);try{for(a.s();!(s=a.n()).done;)c=s.value,d=c.trackId,l=c.kind,p=c.rtpParameters,f=c.streamId,P.debug("receive() [trackId:%s, kind:%s]",d,l),h=p.mid||String(this._mapMidTransceiver.size),o.set(d,h),this._remoteSdp.receive({mid:h,kind:l,offerRtpParameters:p,streamId:f||p.rtcp.cname,trackId:d})}catch(e){a.e(e)}finally{a.f()}return m={type:"offer",sdp:this._remoteSdp.getSdp()},P.debug("receive() | calling pc.setRemoteDescription() [offer:%o]",m),e.next=9,this._pc.setRemoteDescription(m);case 9:return e.next=11,this._pc.createAnswer();case 11:_=e.sent,v=w.parse(_.sdp),y=i(t),e.prev=14,b=u().mark((function e(){var t,r,n,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=g.value,r=t.trackId,n=t.rtpParameters,i=o.get(r),a=v.media.find((function(e){return String(e.mid)===i})),j.applyCodecParameters({offerRtpParameters:n,answerMediaObject:a});case 5:case"end":return e.stop()}}),e)})),y.s();case 17:if((g=y.n()).done){e.next=21;break}return e.delegateYield(b(),"t0",19);case 19:e.next=17;break;case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(14),y.e(e.t1);case 26:return e.prev=26,y.f(),e.finish(26);case 29:if(_={type:"answer",sdp:w.write(v)},this._transportReady){e.next=33;break}return e.next=33,this.setupTransport({localDtlsRole:null!==(r=this._forcedLocalDtlsRole)&&void 0!==r?r:"client",localSdpObject:v});case 33:return P.debug("receive() | calling pc.setLocalDescription() [answer:%o]",_),e.next=36,this._pc.setLocalDescription(_);case 36:S=i(t),e.prev=37,k=u().mark((function e(){var t,r,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=x.value,r=t.trackId,i=o.get(r),a=E._pc.getTransceivers().find((function(e){return e.mid===i}))){e.next=6;break}throw new Error("new RTCRtpTransceiver not found");case 6:E._mapMidTransceiver.set(i,a),n.push({localId:i,track:a.receiver.track,rtpReceiver:a.receiver});case 8:case"end":return e.stop()}}),e)})),S.s();case 40:if((x=S.n()).done){e.next=44;break}return e.delegateYield(k(),"t2",42);case 42:e.next=40;break;case 44:e.next=49;break;case 46:e.prev=46,e.t3=e.catch(37),S.e(e.t3);case 49:return e.prev=49,S.f(),e.finish(49);case 52:return e.abrupt("return",n);case 53:case"end":return e.stop()}}),e,this,[[14,23,26,29],[37,46,49,52]])}))),function(e){return v.apply(this,arguments)})},{key:"stopReceiving",value:(_=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=13;break}if(o=n.value,P.debug("stopReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:this._remoteSdp.closeMediaSection(a.mid);case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return s={type:"offer",sdp:this._remoteSdp.getSdp()},P.debug("stopReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=25,this._pc.setRemoteDescription(s);case 25:return e.next=27,this._pc.createAnswer();case 27:return c=e.sent,P.debug("stopReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=31,this._pc.setLocalDescription(c);case 31:d=i(t);try{for(d.s();!(l=d.n()).done;)p=l.value,this._mapMidTransceiver.delete(p)}catch(e){d.e(e)}finally{d.f()}case 33:case"end":return e.stop()}}),e,this,[[2,15,18,21]])}))),function(e){return _.apply(this,arguments)})},{key:"pauseReceiving",value:(f=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)})},{key:"resumeReceiving",value:(d=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return d.apply(this,arguments)})},{key:"getReceiverStats",value:(c=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertRecvDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.receiver.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"receiveDataChannel",value:(a=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.sctpStreamParameters,n=t.label,i=t.protocol,this.assertRecvDirection(),a=r.streamId,s=r.ordered,c=r.maxPacketLifeTime,d=r.maxRetransmits,l={negotiated:!0,id:a,ordered:s,maxPacketLifeTime:c,maxRetransmitTime:c,maxRetransmits:d,protocol:i},P.debug("receiveDataChannel() [options:%o]",l),p=this._pc.createDataChannel(n,l),this._hasDataChannelMediaSection){e.next=23;break}return this._remoteSdp.receiveSctpAssociation(),f={type:"offer",sdp:this._remoteSdp.getSdp()},P.debug("receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]",f),e.next=12,this._pc.setRemoteDescription(f);case 12:return e.next=14,this._pc.createAnswer();case 14:if(h=e.sent,this._transportReady){e.next=19;break}return m=w.parse(h.sdp),e.next=19,this.setupTransport({localDtlsRole:null!==(o=this._forcedLocalDtlsRole)&&void 0!==o?o:"client",localSdpObject:m});case 19:return P.debug("receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=22,this._pc.setLocalDescription(h);case 22:this._hasDataChannelMediaSection=!0;case 23:return e.abrupt("return",{dataChannel:p});case 24:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setupTransport",value:(o=l(u().mark((function e(t){var r,n,i,o=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.localDtlsRole,(n=t.localSdpObject)||(n=w.parse(this._pc.localDescription.sdp)),(i=j.extractDtlsParameters({sdpObject:n})).role=r,this._remoteSdp.updateDtlsRole("client"===r?"server":"client"),e.next=7,new Promise((function(e,t){o.safeEmit("@connect",{dtlsParameters:i},e,t)}));case 7:this._transportReady=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"assertSendDirection",value:function(){if("send"!==this._direction)throw new Error('method can just be called for handlers with "send" direction')}},{key:"assertRecvDirection",value:function(){if("recv"!==this._direction)throw new Error('method can just be called for handlers with "recv" direction')}}],n=[{key:"createFactory",value:function(){return function(){return new V}}}],r&&p(t.prototype,r),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),V}(R.HandlerInterface);t.Chrome70=D},"./node_modules/mediasoup-client/lib/handlers/Chrome74.js":function(e,t,r){"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)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){for(var r=0;r1&&n.forEach((function(e,t){e.rid="r".concat(t)})),(c=x.clone(this._sendingRtpParametersByKind[r.kind],{})).codecs=k.reduceCodecs(c.codecs,a),(d=x.clone(this._sendingRemoteRtpParametersByKind[r.kind],{})).codecs=k.reduceCodecs(d.codecs,a),l=this._remoteSdp.getNextMediaSectionIdx(),p=this._pc.addTransceiver(r,{direction:"sendonly",streams:[this._sendStream],sendEncodings:n}),e.next=12,this._pc.createOffer();case 12:if(f=e.sent,h=w.parse(f.sdp),this._transportReady){e.next=17;break}return e.next=17,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:h});case 17:return _=!1,v=(0,P.parse)((n||[{}])[0].scalabilityMode),n&&1===n.length&&v.spatialLayers>1&&"video/vp9"===c.codecs[0].mimeType.toLowerCase()&&(A.debug("send() | enabling legacy simulcast for VP9 SVC"),_=!0,h=w.parse(f.sdp),m=h.media[l.idx],E.addLegacySimulcast({offerMediaObject:m,numStreams:v.spatialLayers}),f={type:"offer",sdp:w.write(h)}),A.debug("send() | calling pc.setLocalDescription() [offer:%o]",f),e.next=23,this._pc.setLocalDescription(f);case 23:if(y=p.mid,c.mid=y,h=w.parse(this._pc.localDescription.sdp),m=h.media[l.idx],c.rtcp.cname=j.getCname({offerMediaObject:m}),n?1===n.length?(g=E.getRtpEncodings({offerMediaObject:m}),Object.assign(g[0],n[0]),_&&(g=[g[0]]),c.encodings=g):c.encodings=n:c.encodings=E.getRtpEncodings({offerMediaObject:m}),c.encodings.length>1&&("video/vp8"===c.codecs[0].mimeType.toLowerCase()||"video/h264"===c.codecs[0].mimeType.toLowerCase())){b=i(c.encodings);try{for(b.s();!(S=b.n()).done;)(R=S.value).scalabilityMode?R.scalabilityMode="L1T".concat(v.temporalLayers):R.scalabilityMode="L1T3"}catch(e){b.e(e)}finally{b.f()}}return this._remoteSdp.send({offerMediaObject:m,reuseMid:l.reuseMid,offerRtpParameters:c,answerRtpParameters:d,codecOptions:o,extmapAllowMixed:!0}),O={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("send() | calling pc.setRemoteDescription() [answer:%o]",O),e.next=35,this._pc.setRemoteDescription(O);case 35:return this._mapMidTransceiver.set(y,p),e.abrupt("return",{localId:y,rtpParameters:c,rtpSender:p.sender});case 37:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"stopSending",value:(I=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("stopSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:if(r.sender.replaceTrack(null),this._pc.removeTrack(r.sender),this._remoteSdp.closeMediaSection(r.mid))try{r.stop()}catch(e){}return e.next=11,this._pc.createOffer();case 11:return n=e.sent,A.debug("stopSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=15,this._pc.setLocalDescription(n);case 15:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("stopSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=19,this._pc.setRemoteDescription(i);case 19:this._mapMidTransceiver.delete(t);case 20:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"pauseSending",value:(L=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("pauseSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return r.direction="inactive",this._remoteSdp.pauseMediaSection(t),e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("pauseSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("pauseSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"resumeSending",value:(C=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("resumeSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t),this._remoteSdp.resumeSendingMediaSection(t),r){e.next=6;break}throw new Error("associated RTCRtpTransceiver not found");case 6:return r.direction="sendonly",e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("resumeSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("resumeSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return C.apply(this,arguments)})},{key:"replaceTrack",value:(O=l(u().mark((function e(t,r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r?A.debug("replaceTrack() [localId:%s, track.id:%s]",t,r.id):A.debug("replaceTrack() [localId:%s, no track]",t),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return e.next=7,n.sender.replaceTrack(r);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"setMaxSpatialLayer",value:(S=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("setMaxSpatialLayer() [localId:%s, spatialLayer:%s]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){e.active=t<=r})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,A.debug("setMaxSpatialLayer() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("setMaxSpatialLayer() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"setRtpEncodingParameters",value:(b=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("setRtpEncodingParameters() [localId:%s, params:%o]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){i.encodings[t]=s(s({},e),r)})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,A.debug("setRtpEncodingParameters() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("setRtpEncodingParameters() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getSenderStats",value:(g=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.sender.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"sendDataChannel",value:(y=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.ordered,n=t.maxPacketLifeTime,i=t.maxRetransmits,o=t.label,a=t.protocol,this.assertSendDirection(),c={negotiated:!0,id:this._nextSendSctpStreamId,ordered:r,maxPacketLifeTime:n,maxRetransmits:i,protocol:a},A.debug("sendDataChannel() [options:%o]",c),d=this._pc.createDataChannel(o,c),this._nextSendSctpStreamId=++this._nextSendSctpStreamId%D.MIS,this._hasDataChannelMediaSection){e.next=24;break}return e.next=9,this._pc.createOffer();case 9:if(l=e.sent,p=w.parse(l.sdp),f=p.media.find((function(e){return"application"===e.type})),this._transportReady){e.next=15;break}return e.next=15,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:p});case 15:return A.debug("sendDataChannel() | calling pc.setLocalDescription() [offer:%o]",l),e.next=18,this._pc.setLocalDescription(l);case 18:return this._remoteSdp.sendSctpAssociation({offerMediaObject:f}),h={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=23,this._pc.setRemoteDescription(h);case 23:this._hasDataChannelMediaSection=!0;case 24:return m={streamId:c.id,ordered:c.ordered,maxPacketLifeTime:c.maxPacketLifeTime,maxRetransmits:c.maxRetransmits},e.abrupt("return",{dataChannel:d,sctpStreamParameters:m});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"receive",value:(v=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p,f,h,m,_,v,y,g,b,S,x,k,E=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),n=[],o=new Map,a=i(t);try{for(a.s();!(s=a.n()).done;)c=s.value,d=c.trackId,l=c.kind,p=c.rtpParameters,f=c.streamId,A.debug("receive() [trackId:%s, kind:%s]",d,l),h=p.mid||String(this._mapMidTransceiver.size),o.set(d,h),this._remoteSdp.receive({mid:h,kind:l,offerRtpParameters:p,streamId:f||p.rtcp.cname,trackId:d})}catch(e){a.e(e)}finally{a.f()}return m={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("receive() | calling pc.setRemoteDescription() [offer:%o]",m),e.next=9,this._pc.setRemoteDescription(m);case 9:return e.next=11,this._pc.createAnswer();case 11:_=e.sent,v=w.parse(_.sdp),y=i(t),e.prev=14,b=u().mark((function e(){var t,r,n,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=g.value,r=t.trackId,n=t.rtpParameters,i=o.get(r),a=v.media.find((function(e){return String(e.mid)===i})),j.applyCodecParameters({offerRtpParameters:n,answerMediaObject:a});case 5:case"end":return e.stop()}}),e)})),y.s();case 17:if((g=y.n()).done){e.next=21;break}return e.delegateYield(b(),"t0",19);case 19:e.next=17;break;case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(14),y.e(e.t1);case 26:return e.prev=26,y.f(),e.finish(26);case 29:if(_={type:"answer",sdp:w.write(v)},this._transportReady){e.next=33;break}return e.next=33,this.setupTransport({localDtlsRole:null!==(r=this._forcedLocalDtlsRole)&&void 0!==r?r:"client",localSdpObject:v});case 33:return A.debug("receive() | calling pc.setLocalDescription() [answer:%o]",_),e.next=36,this._pc.setLocalDescription(_);case 36:S=i(t),e.prev=37,k=u().mark((function e(){var t,r,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=x.value,r=t.trackId,i=o.get(r),a=E._pc.getTransceivers().find((function(e){return e.mid===i}))){e.next=8;break}throw new Error("new RTCRtpTransceiver not found");case 8:E._mapMidTransceiver.set(i,a),n.push({localId:i,track:a.receiver.track,rtpReceiver:a.receiver});case 10:case"end":return e.stop()}}),e)})),S.s();case 40:if((x=S.n()).done){e.next=44;break}return e.delegateYield(k(),"t2",42);case 42:e.next=40;break;case 44:e.next=49;break;case 46:e.prev=46,e.t3=e.catch(37),S.e(e.t3);case 49:return e.prev=49,S.f(),e.finish(49);case 52:return e.abrupt("return",n);case 53:case"end":return e.stop()}}),e,this,[[14,23,26,29],[37,46,49,52]])}))),function(e){return v.apply(this,arguments)})},{key:"stopReceiving",value:(_=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=13;break}if(o=n.value,A.debug("stopReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:this._remoteSdp.closeMediaSection(a.mid);case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("stopReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=25,this._pc.setRemoteDescription(s);case 25:return e.next=27,this._pc.createAnswer();case 27:return c=e.sent,A.debug("stopReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=31,this._pc.setLocalDescription(c);case 31:d=i(t);try{for(d.s();!(l=d.n()).done;)p=l.value,this._mapMidTransceiver.delete(p)}catch(e){d.e(e)}finally{d.f()}case 33:case"end":return e.stop()}}),e,this,[[2,15,18,21]])}))),function(e){return _.apply(this,arguments)})},{key:"pauseReceiving",value:(f=l(u().mark((function e(t){var r,n,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}if(o=n.value,A.debug("pauseReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:a.direction="inactive",this._remoteSdp.pauseMediaSection(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=26,this._pc.setRemoteDescription(s);case 26:return e.next=28,this._pc.createAnswer();case 28:return c=e.sent,A.debug("pauseReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=32,this._pc.setLocalDescription(c);case 32:case"end":return e.stop()}}),e,this,[[2,16,19,22]])}))),function(e){return f.apply(this,arguments)})},{key:"resumeReceiving",value:(d=l(u().mark((function e(t){var r,n,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}if(o=n.value,A.debug("resumeReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:a.direction="recvonly",this._remoteSdp.resumeReceivingMediaSection(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=26,this._pc.setRemoteDescription(s);case 26:return e.next=28,this._pc.createAnswer();case 28:return c=e.sent,A.debug("resumeReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=32,this._pc.setLocalDescription(c);case 32:case"end":return e.stop()}}),e,this,[[2,16,19,22]])}))),function(e){return d.apply(this,arguments)})},{key:"getReceiverStats",value:(c=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertRecvDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.receiver.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"receiveDataChannel",value:(a=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.sctpStreamParameters,n=t.label,i=t.protocol,this.assertRecvDirection(),a=r.streamId,s=r.ordered,c=r.maxPacketLifeTime,d=r.maxRetransmits,l={negotiated:!0,id:a,ordered:s,maxPacketLifeTime:c,maxRetransmits:d,protocol:i},A.debug("receiveDataChannel() [options:%o]",l),p=this._pc.createDataChannel(n,l),this._hasDataChannelMediaSection){e.next=23;break}return this._remoteSdp.receiveSctpAssociation(),f={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]",f),e.next=12,this._pc.setRemoteDescription(f);case 12:return e.next=14,this._pc.createAnswer();case 14:if(h=e.sent,this._transportReady){e.next=19;break}return m=w.parse(h.sdp),e.next=19,this.setupTransport({localDtlsRole:null!==(o=this._forcedLocalDtlsRole)&&void 0!==o?o:"client",localSdpObject:m});case 19:return A.debug("receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=22,this._pc.setLocalDescription(h);case 22:this._hasDataChannelMediaSection=!0;case 23:return e.abrupt("return",{dataChannel:p});case 24:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setupTransport",value:(o=l(u().mark((function e(t){var r,n,i,o=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.localDtlsRole,(n=t.localSdpObject)||(n=w.parse(this._pc.localDescription.sdp)),(i=j.extractDtlsParameters({sdpObject:n})).role=r,this._remoteSdp.updateDtlsRole("client"===r?"server":"client"),e.next=7,new Promise((function(e,t){o.safeEmit("@connect",{dtlsParameters:i},e,t)}));case 7:this._transportReady=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"assertSendDirection",value:function(){if("send"!==this._direction)throw new Error('method can just be called for handlers with "send" direction')}},{key:"assertRecvDirection",value:function(){if("recv"!==this._direction)throw new Error('method can just be called for handlers with "recv" direction')}}],n=[{key:"createFactory",value:function(){return function(){return new z}}}],r&&p(t.prototype,r),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),z}(O.HandlerInterface);t.Chrome74=C},"./node_modules/mediasoup-client/lib/handlers/Edge11.js":function(e,t,r){"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)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function c(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){c(o,n,i,a,s,"next",e)}function s(e){c(o,n,i,a,s,"throw",e)}a(void 0)}))}}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){for(var r=0;r1&&(n.forEach((function(e,t){e.rid="r".concat(t)})),n.reverse()),(s=k.clone(this._sendingRtpParametersByKind[r.kind],{})).codecs=j.reduceCodecs(s.codecs,a),(c=k.clone(this._sendingRemoteRtpParametersByKind[r.kind],{})).codecs=j.reduceCodecs(c.codecs,a),d=this._pc.addTransceiver(r,{direction:"sendonly",streams:[this._sendStream]}),!n){e.next=14;break}return(l=d.sender.getParameters()).encodings=n,e.next=14,d.sender.setParameters(l);case 14:return e.next=16,this._pc.createOffer();case 16:if(p=e.sent,f=w.parse(p.sdp),this._transportReady){e.next=21;break}return e.next=21,this.setupTransport({localDtlsRole:"client",localSdpObject:f});case 21:return h=(0,P.parse)((n||[{}])[0].scalabilityMode),A.debug("send() | calling pc.setLocalDescription() [offer:%o]",p),e.next=25,this._pc.setLocalDescription(p);case 25:if(m=d.mid,s.mid=m,f=w.parse(this._pc.localDescription.sdp),_=f.media[f.media.length-1],s.rtcp.cname=E.getCname({offerMediaObject:_}),n?1===n.length?(v=R.getRtpEncodings({offerMediaObject:_}),Object.assign(v[0],n[0]),s.encodings=v):s.encodings=n.reverse():s.encodings=R.getRtpEncodings({offerMediaObject:_}),s.encodings.length>1&&("video/vp8"===s.codecs[0].mimeType.toLowerCase()||"video/h264"===s.codecs[0].mimeType.toLowerCase())){y=i(s.encodings);try{for(y.s();!(g=y.n()).done;)(b=g.value).scalabilityMode?b.scalabilityMode="L1T".concat(h.temporalLayers):b.scalabilityMode="L1T3"}catch(e){y.e(e)}finally{y.f()}}return this._remoteSdp.send({offerMediaObject:_,offerRtpParameters:s,answerRtpParameters:c,codecOptions:o,extmapAllowMixed:!0}),S={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("send() | calling pc.setRemoteDescription() [answer:%o]",S),e.next=37,this._pc.setRemoteDescription(S);case 37:return this._mapMidTransceiver.set(m,d),e.abrupt("return",{localId:m,rtpParameters:s,rtpSender:d.sender});case 39:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"stopSending",value:(I=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A.debug("stopSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated transceiver not found");case 4:return r.sender.replaceTrack(null),this._pc.removeTrack(r.sender),this._remoteSdp.disableMediaSection(r.mid),e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("stopSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("stopSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:this._mapMidTransceiver.delete(t);case 18:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"pauseSending",value:(L=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("pauseSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return r.direction="inactive",this._remoteSdp.pauseMediaSection(t),e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("pauseSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("pauseSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"resumeSending",value:(C=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("resumeSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return r.direction="sendonly",this._remoteSdp.resumeSendingMediaSection(t),e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("resumeSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("resumeSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return C.apply(this,arguments)})},{key:"replaceTrack",value:(O=l(u().mark((function e(t,r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r?A.debug("replaceTrack() [localId:%s, track.id:%s]",t,r.id):A.debug("replaceTrack() [localId:%s, no track]",t),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return e.next=7,n.sender.replaceTrack(r);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"setMaxSpatialLayer",value:(S=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("setMaxSpatialLayer() [localId:%s, spatialLayer:%s]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated transceiver not found");case 5:return i=n.sender.getParameters(),r=i.encodings.length-1-r,i.encodings.forEach((function(e,t){e.active=t>=r})),e.next=10,n.sender.setParameters(i);case 10:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=13,this._pc.createOffer();case 13:return o=e.sent,A.debug("setMaxSpatialLayer() | calling pc.setLocalDescription() [offer:%o]",o),e.next=17,this._pc.setLocalDescription(o);case 17:return a={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("setMaxSpatialLayer() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=21,this._pc.setRemoteDescription(a);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"setRtpEncodingParameters",value:(b=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("setRtpEncodingParameters() [localId:%s, params:%o]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){i.encodings[t]=s(s({},e),r)})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,A.debug("setRtpEncodingParameters() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("setRtpEncodingParameters() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getSenderStats",value:(g=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.sender.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"sendDataChannel",value:(y=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.ordered,n=t.maxPacketLifeTime,i=t.maxRetransmits,o=t.label,a=t.protocol,this.assertSendDirection(),s={negotiated:!0,id:this._nextSendSctpStreamId,ordered:r,maxPacketLifeTime:n,maxRetransmits:i,protocol:a},A.debug("sendDataChannel() [options:%o]",s),c=this._pc.createDataChannel(o,s),this._nextSendSctpStreamId=++this._nextSendSctpStreamId%D.MIS,this._hasDataChannelMediaSection){e.next=24;break}return e.next=9,this._pc.createOffer();case 9:if(d=e.sent,l=w.parse(d.sdp),p=l.media.find((function(e){return"application"===e.type})),this._transportReady){e.next=15;break}return e.next=15,this.setupTransport({localDtlsRole:"client",localSdpObject:l});case 15:return A.debug("sendDataChannel() | calling pc.setLocalDescription() [offer:%o]",d),e.next=18,this._pc.setLocalDescription(d);case 18:return this._remoteSdp.sendSctpAssociation({offerMediaObject:p}),f={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]",f),e.next=23,this._pc.setRemoteDescription(f);case 23:this._hasDataChannelMediaSection=!0;case 24:return h={streamId:s.id,ordered:s.ordered,maxPacketLifeTime:s.maxPacketLifeTime,maxRetransmits:s.maxRetransmits},e.abrupt("return",{dataChannel:c,sctpStreamParameters:h});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"receive",value:(v=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p,f,h,m,_,v,y,g,b,S,x,k=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=[],n=new Map,o=i(t);try{for(o.s();!(a=o.n()).done;)s=a.value,c=s.trackId,d=s.kind,l=s.rtpParameters,p=s.streamId,A.debug("receive() [trackId:%s, kind:%s]",c,d),f=l.mid||String(this._mapMidTransceiver.size),n.set(c,f),this._remoteSdp.receive({mid:f,kind:d,offerRtpParameters:l,streamId:p||l.rtcp.cname,trackId:c})}catch(e){o.e(e)}finally{o.f()}return h={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("receive() | calling pc.setRemoteDescription() [offer:%o]",h),e.next=9,this._pc.setRemoteDescription(h);case 9:return e.next=11,this._pc.createAnswer();case 11:m=e.sent,_=w.parse(m.sdp),v=i(t),e.prev=14,g=u().mark((function e(){var t,r,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=y.value,r=t.trackId,i=t.rtpParameters,o=n.get(r),a=_.media.find((function(e){return String(e.mid)===o})),E.applyCodecParameters({offerRtpParameters:i,answerMediaObject:a}),m={type:"answer",sdp:w.write(_)};case 6:case"end":return e.stop()}}),e)})),v.s();case 17:if((y=v.n()).done){e.next=21;break}return e.delegateYield(g(),"t0",19);case 19:e.next=17;break;case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(14),v.e(e.t1);case 26:return e.prev=26,v.f(),e.finish(26);case 29:if(this._transportReady){e.next=32;break}return e.next=32,this.setupTransport({localDtlsRole:"client",localSdpObject:_});case 32:return A.debug("receive() | calling pc.setLocalDescription() [answer:%o]",m),e.next=35,this._pc.setLocalDescription(m);case 35:b=i(t),e.prev=36,x=u().mark((function e(){var t,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=S.value,i=t.trackId,o=n.get(i),a=k._pc.getTransceivers().find((function(e){return e.mid===o}))){e.next=6;break}throw new Error("new RTCRtpTransceiver not found");case 6:k._mapMidTransceiver.set(o,a),r.push({localId:o,track:a.receiver.track,rtpReceiver:a.receiver});case 8:case"end":return e.stop()}}),e)})),b.s();case 39:if((S=b.n()).done){e.next=43;break}return e.delegateYield(x(),"t2",41);case 41:e.next=39;break;case 43:e.next=48;break;case 45:e.prev=45,e.t3=e.catch(36),b.e(e.t3);case 48:return e.prev=48,b.f(),e.finish(48);case 51:return e.abrupt("return",r);case 52:case"end":return e.stop()}}),e,this,[[14,23,26,29],[36,45,48,51]])}))),function(e){return v.apply(this,arguments)})},{key:"stopReceiving",value:(_=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=13;break}if(o=n.value,A.debug("stopReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:this._remoteSdp.closeMediaSection(a.mid);case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("stopReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=25,this._pc.setRemoteDescription(s);case 25:return e.next=27,this._pc.createAnswer();case 27:return c=e.sent,A.debug("stopReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=31,this._pc.setLocalDescription(c);case 31:d=i(t);try{for(d.s();!(l=d.n()).done;)p=l.value,this._mapMidTransceiver.delete(p)}catch(e){d.e(e)}finally{d.f()}case 33:case"end":return e.stop()}}),e,this,[[2,15,18,21]])}))),function(e){return _.apply(this,arguments)})},{key:"pauseReceiving",value:(f=l(u().mark((function e(t){var r,n,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}if(o=n.value,A.debug("pauseReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:a.direction="inactive",this._remoteSdp.pauseMediaSection(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=26,this._pc.setRemoteDescription(s);case 26:return e.next=28,this._pc.createAnswer();case 28:return c=e.sent,A.debug("pauseReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=32,this._pc.setLocalDescription(c);case 32:case"end":return e.stop()}}),e,this,[[2,16,19,22]])}))),function(e){return f.apply(this,arguments)})},{key:"resumeReceiving",value:(d=l(u().mark((function e(t){var r,n,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}if(o=n.value,A.debug("resumeReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:a.direction="recvonly",this._remoteSdp.resumeReceivingMediaSection(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=26,this._pc.setRemoteDescription(s);case 26:return e.next=28,this._pc.createAnswer();case 28:return c=e.sent,A.debug("resumeReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=32,this._pc.setLocalDescription(c);case 32:case"end":return e.stop()}}),e,this,[[2,16,19,22]])}))),function(e){return d.apply(this,arguments)})},{key:"getReceiverStats",value:(c=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertRecvDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.receiver.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"receiveDataChannel",value:(a=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.sctpStreamParameters,n=t.label,i=t.protocol,this.assertRecvDirection(),o=r.streamId,a=r.ordered,s=r.maxPacketLifeTime,c=r.maxRetransmits,d={negotiated:!0,id:o,ordered:a,maxPacketLifeTime:s,maxRetransmits:c,protocol:i},A.debug("receiveDataChannel() [options:%o]",d),l=this._pc.createDataChannel(n,d),this._hasDataChannelMediaSection){e.next=23;break}return this._remoteSdp.receiveSctpAssociation(),p={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]",p),e.next=12,this._pc.setRemoteDescription(p);case 12:return e.next=14,this._pc.createAnswer();case 14:if(f=e.sent,this._transportReady){e.next=19;break}return h=w.parse(f.sdp),e.next=19,this.setupTransport({localDtlsRole:"client",localSdpObject:h});case 19:return A.debug("receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]",f),e.next=22,this._pc.setLocalDescription(f);case 22:this._hasDataChannelMediaSection=!0;case 23:return e.abrupt("return",{dataChannel:l});case 24:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setupTransport",value:(o=l(u().mark((function e(t){var r,n,i,o=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.localDtlsRole,(n=t.localSdpObject)||(n=w.parse(this._pc.localDescription.sdp)),(i=E.extractDtlsParameters({sdpObject:n})).role=r,this._remoteSdp.updateDtlsRole("client"===r?"server":"client"),e.next=7,new Promise((function(e,t){o.safeEmit("@connect",{dtlsParameters:i},e,t)}));case 7:this._transportReady=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"assertSendDirection",value:function(){if("send"!==this._direction)throw new Error('method can just be called for handlers with "send" direction')}},{key:"assertRecvDirection",value:function(){if("recv"!==this._direction)throw new Error('method can just be called for handlers with "recv" direction')}}],n=[{key:"createFactory",value:function(){return function(){return new z}}}],r&&p(t.prototype,r),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),z}(O.HandlerInterface);t.Firefox60=C},"./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js":(e,t,r)=>{"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)}function i(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function u(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){u(o,n,i,a,s,"next",e)}function s(e){u(o,n,i,a,s,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r1&&(T.debug("send() | enabling simulcast"),d=b.parse(u.sdp),l=d.media.find((function(e){return"video"===e.type})),E.addLegacySimulcast({offerMediaObject:l,track:r,numStreams:n.length}),u={type:"offer",sdp:b.write(d)}),T.debug("send() | calling pc.setLocalDescription() [offer:%o]",u),e.next=21,this._pc.setLocalDescription(u);case 21:if(d=b.parse(this._pc.localDescription.sdp),l=d.media.find((function(e){return e.type===r.kind})),p.rtcp.cname=j.getCname({offerMediaObject:l}),p.encodings=E.getRtpEncodings({offerMediaObject:l,track:r}),n)for(h=0;h1&&("video/vp8"===p.codecs[0].mimeType.toLowerCase()||"video/h264"===p.codecs[0].mimeType.toLowerCase())){m=i(p.encodings);try{for(m.s();!(_=m.n()).done;)_.value.scalabilityMode="L1T3"}catch(e){m.e(e)}finally{m.f()}}return this._remoteSdp.send({offerMediaObject:l,offerRtpParameters:p,answerRtpParameters:f,codecOptions:o}),v={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("send() | calling pc.setRemoteDescription() [answer:%o]",v),e.next=32,this._pc.setRemoteDescription(v);case 32:return y=String(this._nextSendLocalId),this._nextSendLocalId++,this._mapSendLocalIdTrack.set(y,r),e.abrupt("return",{localId:y,rtpParameters:p});case 36:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"stopSending",value:(I=d(c().mark((function e(t){var r,n,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),T.debug("stopSending() [localId:%s]",t),r=this._mapSendLocalIdTrack.get(t)){e.next=5;break}throw new Error("track not found");case 5:return this._mapSendLocalIdTrack.delete(t),this._sendStream.removeTrack(r),this._pc.addStream(this._sendStream),e.next=10,this._pc.createOffer();case 10:return n=e.sent,T.debug("stopSending() | calling pc.setLocalDescription() [offer:%o]",n),e.prev=12,e.next=15,this._pc.setLocalDescription(n);case 15:e.next=23;break;case 17:if(e.prev=17,e.t0=e.catch(12),0!==this._sendStream.getTracks().length){e.next=22;break}return T.warn("stopSending() | ignoring expected error due no sending tracks: %s",e.t0.toString()),e.abrupt("return");case 22:throw e.t0;case 23:if("stable"!==this._pc.signalingState){e.next=25;break}return e.abrupt("return");case 25:return i={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("stopSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=29,this._pc.setRemoteDescription(i);case 29:case"end":return e.stop()}}),e,this,[[12,17]])}))),function(e){return I.apply(this,arguments)})},{key:"pauseSending",value:(L=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return L.apply(this,arguments)})},{key:"resumeSending",value:(C=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return C.apply(this,arguments)})},{key:"replaceTrack",value:(D=d(c().mark((function e(t,r){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new S.UnsupportedError("not implemented");case 1:case"end":return e.stop()}}),e)}))),function(e,t){return D.apply(this,arguments)})},{key:"setMaxSpatialLayer",value:(A=d(c().mark((function e(t,r){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new S.UnsupportedError("not implemented");case 1:case"end":return e.stop()}}),e)}))),function(e,t){return A.apply(this,arguments)})},{key:"setRtpEncodingParameters",value:(R=d(c().mark((function e(t,r){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new S.UnsupportedError("not implemented");case 1:case"end":return e.stop()}}),e)}))),function(e,t){return R.apply(this,arguments)})},{key:"getSenderStats",value:(w=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new S.UnsupportedError("not implemented");case 1:case"end":return e.stop()}}),e)}))),function(e){return w.apply(this,arguments)})},{key:"sendDataChannel",value:(g=d(c().mark((function e(t){var r,n,i,o,a,s,u,d,l,p,f,h,m;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.ordered,n=t.maxPacketLifeTime,i=t.maxRetransmits,o=t.label,a=t.protocol,this.assertSendDirection(),u={negotiated:!0,id:this._nextSendSctpStreamId,ordered:r,maxPacketLifeTime:n,maxRetransmitTime:n,maxRetransmits:i,protocol:a},T.debug("sendDataChannel() [options:%o]",u),d=this._pc.createDataChannel(o,u),this._nextSendSctpStreamId=++this._nextSendSctpStreamId%P.MIS,this._hasDataChannelMediaSection){e.next=24;break}return e.next=9,this._pc.createOffer();case 9:if(l=e.sent,p=b.parse(l.sdp),f=p.media.find((function(e){return"application"===e.type})),this._transportReady){e.next=15;break}return e.next=15,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:p});case 15:return T.debug("sendDataChannel() | calling pc.setLocalDescription() [offer:%o]",l),e.next=18,this._pc.setLocalDescription(l);case 18:return this._remoteSdp.sendSctpAssociation({offerMediaObject:f}),h={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=23,this._pc.setRemoteDescription(h);case 23:this._hasDataChannelMediaSection=!0;case 24:return m={streamId:u.id,ordered:u.ordered,maxPacketLifeTime:u.maxPacketLifeTime,maxRetransmits:u.maxRetransmits},e.abrupt("return",{dataChannel:d,sctpStreamParameters:m});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"receive",value:(y=d(c().mark((function e(t){var r,n,o,a,s,u,d,l,p,f,h,m,_,v,y,g,w,S,k,E,R=this;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),n=[],o=new Map,a=i(t);try{for(a.s();!(s=a.n()).done;)u=s.value,d=u.trackId,l=u.kind,p=u.rtpParameters,T.debug("receive() [trackId:%s, kind:%s]",d,l),f=l,h=u.streamId||p.rtcp.cname,T.debug("receive() | forcing a random remote streamId to avoid well known bug in react-native-webrtc"),h+="-hack-".concat(x.generateRandomNumber()),o.set(d,h),this._remoteSdp.receive({mid:f,kind:l,offerRtpParameters:p,streamId:h,trackId:d})}catch(e){a.e(e)}finally{a.f()}return m={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("receive() | calling pc.setRemoteDescription() [offer:%o]",m),e.next=9,this._pc.setRemoteDescription(m);case 9:return e.next=11,this._pc.createAnswer();case 11:_=e.sent,v=b.parse(_.sdp),y=i(t),e.prev=14,w=c().mark((function e(){var t,r,n,i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=g.value,r=t.kind,n=t.rtpParameters,i=r,o=v.media.find((function(e){return String(e.mid)===i})),j.applyCodecParameters({offerRtpParameters:n,answerMediaObject:o});case 5:case"end":return e.stop()}}),e)})),y.s();case 17:if((g=y.n()).done){e.next=21;break}return e.delegateYield(w(),"t0",19);case 19:e.next=17;break;case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(14),y.e(e.t1);case 26:return e.prev=26,y.f(),e.finish(26);case 29:if(_={type:"answer",sdp:b.write(v)},this._transportReady){e.next=33;break}return e.next=33,this.setupTransport({localDtlsRole:null!==(r=this._forcedLocalDtlsRole)&&void 0!==r?r:"client",localSdpObject:v});case 33:return T.debug("receive() | calling pc.setLocalDescription() [answer:%o]",_),e.next=36,this._pc.setLocalDescription(_);case 36:S=i(t),e.prev=37,E=c().mark((function e(){var t,r,i,a,s,u,d,l,p;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=k.value,r=t.kind,i=t.trackId,a=t.rtpParameters,s=i,u=r,d=o.get(i),l=R._pc.getRemoteStreams().find((function(e){return e.id===d})),p=l.getTrackById(s)){e.next=9;break}throw new Error("remote track not found");case 9:R._mapRecvLocalIdInfo.set(s,{mid:u,rtpParameters:a}),n.push({localId:s,track:p});case 11:case"end":return e.stop()}}),e)})),S.s();case 40:if((k=S.n()).done){e.next=44;break}return e.delegateYield(E(),"t2",42);case 42:e.next=40;break;case 44:e.next=49;break;case 46:e.prev=46,e.t3=e.catch(37),S.e(e.t3);case 49:return e.prev=49,S.f(),e.finish(49);case 52:return e.abrupt("return",n);case 53:case"end":return e.stop()}}),e,this,[[14,23,26,29],[37,46,49,52]])}))),function(e){return y.apply(this,arguments)})},{key:"stopReceiving",value:(v=d(c().mark((function e(t){var r,n,o,a,s,u,d,l;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t);try{for(r.s();!(n=r.n()).done;)o=n.value,T.debug("stopReceiving() [localId:%s]",o),a=this._mapRecvLocalIdInfo.get(o)||{},s=a.mid,u=a.rtpParameters,this._mapRecvLocalIdInfo.delete(o),this._remoteSdp.planBStopReceiving({mid:s,offerRtpParameters:u})}catch(e){r.e(e)}finally{r.f()}return d={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("stopReceiving() | calling pc.setRemoteDescription() [offer:%o]",d),e.next=7,this._pc.setRemoteDescription(d);case 7:return e.next=9,this._pc.createAnswer();case 9:return l=e.sent,T.debug("stopReceiving() | calling pc.setLocalDescription() [answer:%o]",l),e.next=13,this._pc.setLocalDescription(l);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"pauseReceiving",value:(_=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return _.apply(this,arguments)})},{key:"resumeReceiving",value:(m=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return m.apply(this,arguments)})},{key:"getReceiverStats",value:(p=d(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new S.UnsupportedError("not implemented");case 1:case"end":return e.stop()}}),e)}))),function(e){return p.apply(this,arguments)})},{key:"receiveDataChannel",value:(u=d(c().mark((function e(t){var r,n,i,o,a,s,u,d,l,p,f,h,m;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.sctpStreamParameters,n=t.label,i=t.protocol,this.assertRecvDirection(),a=r.streamId,s=r.ordered,u=r.maxPacketLifeTime,d=r.maxRetransmits,l={negotiated:!0,id:a,ordered:s,maxPacketLifeTime:u,maxRetransmitTime:u,maxRetransmits:d,protocol:i},T.debug("receiveDataChannel() [options:%o]",l),p=this._pc.createDataChannel(n,l),this._hasDataChannelMediaSection){e.next=23;break}return this._remoteSdp.receiveSctpAssociation({oldDataChannelSpec:!0}),f={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]",f),e.next=12,this._pc.setRemoteDescription(f);case 12:return e.next=14,this._pc.createAnswer();case 14:if(h=e.sent,this._transportReady){e.next=19;break}return m=b.parse(h.sdp),e.next=19,this.setupTransport({localDtlsRole:null!==(o=this._forcedLocalDtlsRole)&&void 0!==o?o:"client",localSdpObject:m});case 19:return T.debug("receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=22,this._pc.setLocalDescription(h);case 22:this._hasDataChannelMediaSection=!0;case 23:return e.abrupt("return",{dataChannel:p});case 24:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"setupTransport",value:(o=d(c().mark((function e(t){var r,n,i,o=this;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.localDtlsRole,(n=t.localSdpObject)||(n=b.parse(this._pc.localDescription.sdp)),(i=j.extractDtlsParameters({sdpObject:n})).role=r,this._remoteSdp.updateDtlsRole("client"===r?"server":"client"),e.next=7,new Promise((function(e,t){o.safeEmit("@connect",{dtlsParameters:i},e,t)}));case 7:this._transportReady=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"assertSendDirection",value:function(){if("send"!==this._direction)throw new Error('method can just be called for handlers with "send" direction')}},{key:"assertRecvDirection",value:function(){if("recv"!==this._direction)throw new Error('method can just be called for handlers with "recv" direction')}}],n=[{key:"createFactory",value:function(){return function(){return new z}}}],r&&l(t.prototype,r),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),z}(R.HandlerInterface);t.ReactNative=A},"./node_modules/mediasoup-client/lib/handlers/ReactNativeUnifiedPlan.js":function(e,t,r){"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)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){for(var r=0;r1&&n.forEach((function(e,t){e.rid="r".concat(t)})),(c=x.clone(this._sendingRtpParametersByKind[r.kind],{})).codecs=k.reduceCodecs(c.codecs,a),(d=x.clone(this._sendingRemoteRtpParametersByKind[r.kind],{})).codecs=k.reduceCodecs(d.codecs,a),l=this._remoteSdp.getNextMediaSectionIdx(),p=this._pc.addTransceiver(r,{direction:"sendonly",streams:[this._sendStream],sendEncodings:n}),e.next=12,this._pc.createOffer();case 12:if(f=e.sent,h=w.parse(f.sdp),this._transportReady){e.next=17;break}return e.next=17,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:h});case 17:return _=!1,v=(0,P.parse)((n||[{}])[0].scalabilityMode),n&&1===n.length&&v.spatialLayers>1&&"video/vp9"===c.codecs[0].mimeType.toLowerCase()&&(A.debug("send() | enabling legacy simulcast for VP9 SVC"),_=!0,h=w.parse(f.sdp),m=h.media[l.idx],E.addLegacySimulcast({offerMediaObject:m,numStreams:v.spatialLayers}),f={type:"offer",sdp:w.write(h)}),A.debug("send() | calling pc.setLocalDescription() [offer:%o]",f),e.next=23,this._pc.setLocalDescription(f);case 23:if(y=p.mid,c.mid=y,h=w.parse(this._pc.localDescription.sdp),m=h.media[l.idx],c.rtcp.cname=j.getCname({offerMediaObject:m}),n?1===n.length?(g=E.getRtpEncodings({offerMediaObject:m}),Object.assign(g[0],n[0]),_&&(g=[g[0]]),c.encodings=g):c.encodings=n:c.encodings=E.getRtpEncodings({offerMediaObject:m}),c.encodings.length>1&&("video/vp8"===c.codecs[0].mimeType.toLowerCase()||"video/h264"===c.codecs[0].mimeType.toLowerCase())){b=i(c.encodings);try{for(b.s();!(S=b.n()).done;)(R=S.value).scalabilityMode?R.scalabilityMode="L1T".concat(v.temporalLayers):R.scalabilityMode="L1T3"}catch(e){b.e(e)}finally{b.f()}}return this._remoteSdp.send({offerMediaObject:m,reuseMid:l.reuseMid,offerRtpParameters:c,answerRtpParameters:d,codecOptions:o,extmapAllowMixed:!0}),O={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("send() | calling pc.setRemoteDescription() [answer:%o]",O),e.next=35,this._pc.setRemoteDescription(O);case 35:return this._mapMidTransceiver.set(y,p),e.abrupt("return",{localId:y,rtpParameters:c,rtpSender:p.sender});case 37:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"stopSending",value:(I=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("stopSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:if(r.sender.replaceTrack(null),this._pc.removeTrack(r.sender),this._remoteSdp.closeMediaSection(r.mid))try{r.stop()}catch(e){}return e.next=11,this._pc.createOffer();case 11:return n=e.sent,A.debug("stopSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=15,this._pc.setLocalDescription(n);case 15:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("stopSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=19,this._pc.setRemoteDescription(i);case 19:this._mapMidTransceiver.delete(t);case 20:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"pauseSending",value:(L=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("pauseSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return r.direction="inactive",this._remoteSdp.pauseMediaSection(t),e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("pauseSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("pauseSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"resumeSending",value:(C=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("resumeSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t),this._remoteSdp.resumeSendingMediaSection(t),r){e.next=6;break}throw new Error("associated RTCRtpTransceiver not found");case 6:return r.direction="sendonly",e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("resumeSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("resumeSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return C.apply(this,arguments)})},{key:"replaceTrack",value:(O=l(u().mark((function e(t,r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r?A.debug("replaceTrack() [localId:%s, track.id:%s]",t,r.id):A.debug("replaceTrack() [localId:%s, no track]",t),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return e.next=7,n.sender.replaceTrack(r);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"setMaxSpatialLayer",value:(S=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("setMaxSpatialLayer() [localId:%s, spatialLayer:%s]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){e.active=t<=r})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,A.debug("setMaxSpatialLayer() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("setMaxSpatialLayer() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"setRtpEncodingParameters",value:(b=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("setRtpEncodingParameters() [localId:%s, params:%o]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){i.encodings[t]=s(s({},e),r)})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,A.debug("setRtpEncodingParameters() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("setRtpEncodingParameters() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getSenderStats",value:(g=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.sender.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"sendDataChannel",value:(y=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.ordered,n=t.maxPacketLifeTime,i=t.maxRetransmits,o=t.label,a=t.protocol,this.assertSendDirection(),c={negotiated:!0,id:this._nextSendSctpStreamId,ordered:r,maxPacketLifeTime:n,maxRetransmits:i,protocol:a},A.debug("sendDataChannel() [options:%o]",c),d=this._pc.createDataChannel(o,c),this._nextSendSctpStreamId=++this._nextSendSctpStreamId%D.MIS,this._hasDataChannelMediaSection){e.next=24;break}return e.next=9,this._pc.createOffer();case 9:if(l=e.sent,p=w.parse(l.sdp),f=p.media.find((function(e){return"application"===e.type})),this._transportReady){e.next=15;break}return e.next=15,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:p});case 15:return A.debug("sendDataChannel() | calling pc.setLocalDescription() [offer:%o]",l),e.next=18,this._pc.setLocalDescription(l);case 18:return this._remoteSdp.sendSctpAssociation({offerMediaObject:f}),h={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=23,this._pc.setRemoteDescription(h);case 23:this._hasDataChannelMediaSection=!0;case 24:return m={streamId:c.id,ordered:c.ordered,maxPacketLifeTime:c.maxPacketLifeTime,maxRetransmits:c.maxRetransmits},e.abrupt("return",{dataChannel:d,sctpStreamParameters:m});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"receive",value:(v=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p,f,h,m,_,v,y,g,b,S,x,k,E=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),n=[],o=new Map,a=i(t);try{for(a.s();!(s=a.n()).done;)c=s.value,d=c.trackId,l=c.kind,p=c.rtpParameters,f=c.streamId,A.debug("receive() [trackId:%s, kind:%s]",d,l),h=p.mid||String(this._mapMidTransceiver.size),o.set(d,h),this._remoteSdp.receive({mid:h,kind:l,offerRtpParameters:p,streamId:f||p.rtcp.cname,trackId:d})}catch(e){a.e(e)}finally{a.f()}return m={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("receive() | calling pc.setRemoteDescription() [offer:%o]",m),e.next=9,this._pc.setRemoteDescription(m);case 9:return e.next=11,this._pc.createAnswer();case 11:_=e.sent,v=w.parse(_.sdp),y=i(t),e.prev=14,b=u().mark((function e(){var t,r,n,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=g.value,r=t.trackId,n=t.rtpParameters,i=o.get(r),a=v.media.find((function(e){return String(e.mid)===i})),j.applyCodecParameters({offerRtpParameters:n,answerMediaObject:a});case 5:case"end":return e.stop()}}),e)})),y.s();case 17:if((g=y.n()).done){e.next=21;break}return e.delegateYield(b(),"t0",19);case 19:e.next=17;break;case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(14),y.e(e.t1);case 26:return e.prev=26,y.f(),e.finish(26);case 29:if(_={type:"answer",sdp:w.write(v)},this._transportReady){e.next=33;break}return e.next=33,this.setupTransport({localDtlsRole:null!==(r=this._forcedLocalDtlsRole)&&void 0!==r?r:"client",localSdpObject:v});case 33:return A.debug("receive() | calling pc.setLocalDescription() [answer:%o]",_),e.next=36,this._pc.setLocalDescription(_);case 36:S=i(t),e.prev=37,k=u().mark((function e(){var t,r,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=x.value,r=t.trackId,i=o.get(r),a=E._pc.getTransceivers().find((function(e){return e.mid===i}))){e.next=8;break}throw new Error("new RTCRtpTransceiver not found");case 8:E._mapMidTransceiver.set(i,a),n.push({localId:i,track:a.receiver.track,rtpReceiver:a.receiver});case 10:case"end":return e.stop()}}),e)})),S.s();case 40:if((x=S.n()).done){e.next=44;break}return e.delegateYield(k(),"t2",42);case 42:e.next=40;break;case 44:e.next=49;break;case 46:e.prev=46,e.t3=e.catch(37),S.e(e.t3);case 49:return e.prev=49,S.f(),e.finish(49);case 52:return e.abrupt("return",n);case 53:case"end":return e.stop()}}),e,this,[[14,23,26,29],[37,46,49,52]])}))),function(e){return v.apply(this,arguments)})},{key:"stopReceiving",value:(_=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=13;break}if(o=n.value,A.debug("stopReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:this._remoteSdp.closeMediaSection(a.mid);case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("stopReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=25,this._pc.setRemoteDescription(s);case 25:return e.next=27,this._pc.createAnswer();case 27:return c=e.sent,A.debug("stopReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=31,this._pc.setLocalDescription(c);case 31:d=i(t);try{for(d.s();!(l=d.n()).done;)p=l.value,this._mapMidTransceiver.delete(p)}catch(e){d.e(e)}finally{d.f()}case 33:case"end":return e.stop()}}),e,this,[[2,15,18,21]])}))),function(e){return _.apply(this,arguments)})},{key:"pauseReceiving",value:(f=l(u().mark((function e(t){var r,n,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}if(o=n.value,A.debug("pauseReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:a.direction="inactive",this._remoteSdp.pauseMediaSection(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=26,this._pc.setRemoteDescription(s);case 26:return e.next=28,this._pc.createAnswer();case 28:return c=e.sent,A.debug("pauseReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=32,this._pc.setLocalDescription(c);case 32:case"end":return e.stop()}}),e,this,[[2,16,19,22]])}))),function(e){return f.apply(this,arguments)})},{key:"resumeReceiving",value:(d=l(u().mark((function e(t){var r,n,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}if(o=n.value,A.debug("resumeReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:a.direction="recvonly",this._remoteSdp.resumeReceivingMediaSection(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=26,this._pc.setRemoteDescription(s);case 26:return e.next=28,this._pc.createAnswer();case 28:return c=e.sent,A.debug("resumeReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=32,this._pc.setLocalDescription(c);case 32:case"end":return e.stop()}}),e,this,[[2,16,19,22]])}))),function(e){return d.apply(this,arguments)})},{key:"getReceiverStats",value:(c=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertRecvDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.receiver.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"receiveDataChannel",value:(a=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.sctpStreamParameters,n=t.label,i=t.protocol,this.assertRecvDirection(),a=r.streamId,s=r.ordered,c=r.maxPacketLifeTime,d=r.maxRetransmits,l={negotiated:!0,id:a,ordered:s,maxPacketLifeTime:c,maxRetransmits:d,protocol:i},A.debug("receiveDataChannel() [options:%o]",l),p=this._pc.createDataChannel(n,l),this._hasDataChannelMediaSection){e.next=23;break}return this._remoteSdp.receiveSctpAssociation(),f={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]",f),e.next=12,this._pc.setRemoteDescription(f);case 12:return e.next=14,this._pc.createAnswer();case 14:if(h=e.sent,this._transportReady){e.next=19;break}return m=w.parse(h.sdp),e.next=19,this.setupTransport({localDtlsRole:null!==(o=this._forcedLocalDtlsRole)&&void 0!==o?o:"client",localSdpObject:m});case 19:return A.debug("receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=22,this._pc.setLocalDescription(h);case 22:this._hasDataChannelMediaSection=!0;case 23:return e.abrupt("return",{dataChannel:p});case 24:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setupTransport",value:(o=l(u().mark((function e(t){var r,n,i,o=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.localDtlsRole,(n=t.localSdpObject)||(n=w.parse(this._pc.localDescription.sdp)),(i=j.extractDtlsParameters({sdpObject:n})).role=r,this._remoteSdp.updateDtlsRole("client"===r?"server":"client"),e.next=7,new Promise((function(e,t){o.safeEmit("@connect",{dtlsParameters:i},e,t)}));case 7:this._transportReady=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"assertSendDirection",value:function(){if("send"!==this._direction)throw new Error('method can just be called for handlers with "send" direction')}},{key:"assertRecvDirection",value:function(){if("recv"!==this._direction)throw new Error('method can just be called for handlers with "recv" direction')}}],n=[{key:"createFactory",value:function(){return function(){return new z}}}],r&&p(t.prototype,r),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),z}(O.HandlerInterface);t.ReactNativeUnifiedPlan=C},"./node_modules/mediasoup-client/lib/handlers/Safari11.js":function(e,t,r){"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)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){for(var r=0;r1&&(T.debug("send() | enabling simulcast"),d=w.parse(c.sdp),l=d.media.find((function(e){return"video"===e.type})),E.addLegacySimulcast({offerMediaObject:l,track:r,numStreams:n.length}),c={type:"offer",sdp:w.write(d)}),T.debug("send() | calling pc.setLocalDescription() [offer:%o]",c),e.next=21,this._pc.setLocalDescription(c);case 21:if(d=w.parse(this._pc.localDescription.sdp),l=d.media.find((function(e){return e.type===r.kind})),p.rtcp.cname=j.getCname({offerMediaObject:l}),p.encodings=E.getRtpEncodings({offerMediaObject:l,track:r}),n)for(h=0;h1&&"video/vp8"===p.codecs[0].mimeType.toLowerCase()){m=i(p.encodings);try{for(m.s();!(_=m.n()).done;)_.value.scalabilityMode="L1T3"}catch(e){m.e(e)}finally{m.f()}}return this._remoteSdp.send({offerMediaObject:l,offerRtpParameters:p,answerRtpParameters:f,codecOptions:o}),v={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("send() | calling pc.setRemoteDescription() [answer:%o]",v),e.next=32,this._pc.setRemoteDescription(v);case 32:return y=String(this._nextSendLocalId),this._nextSendLocalId++,g=this._pc.getSenders().find((function(e){return e.track===r})),this._mapSendLocalIdRtpSender.set(y,g),e.abrupt("return",{localId:y,rtpParameters:p,rtpSender:g});case 37:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"stopSending",value:(C=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r=this._mapSendLocalIdRtpSender.get(t)){e.next=4;break}throw new Error("associated RTCRtpSender not found");case 4:return r.track&&this._sendStream.removeTrack(r.track),this._mapSendLocalIdRtpSender.delete(t),e.next=8,this._pc.createOffer();case 8:return n=e.sent,T.debug("stopSending() | calling pc.setLocalDescription() [offer:%o]",n),e.prev=10,e.next=13,this._pc.setLocalDescription(n);case 13:e.next=21;break;case 15:if(e.prev=15,e.t0=e.catch(10),0!==this._sendStream.getTracks().length){e.next=20;break}return T.warn("stopSending() | ignoring expected error due no sending tracks: %s",e.t0.toString()),e.abrupt("return");case 20:throw e.t0;case 21:if("stable"!==this._pc.signalingState){e.next=23;break}return e.abrupt("return");case 23:return i={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("stopSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=27,this._pc.setRemoteDescription(i);case 27:case"end":return e.stop()}}),e,this,[[10,15]])}))),function(e){return C.apply(this,arguments)})},{key:"pauseSending",value:(D=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return D.apply(this,arguments)})},{key:"resumeSending",value:(A=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"replaceTrack",value:(R=l(u().mark((function e(t,r){var n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r?T.debug("replaceTrack() [localId:%s, track.id:%s]",t,r.id):T.debug("replaceTrack() [localId:%s, no track]",t),n=this._mapSendLocalIdRtpSender.get(t)){e.next=5;break}throw new Error("associated RTCRtpSender not found");case 5:return i=n.track,e.next=8,n.replaceTrack(r);case 8:i&&this._sendStream.removeTrack(i),r&&this._sendStream.addTrack(r);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"setMaxSpatialLayer",value:(S=l(u().mark((function e(t,r){var n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),T.debug("setMaxSpatialLayer() [localId:%s, spatialLayer:%s]",t,r),n=this._mapSendLocalIdRtpSender.get(t)){e.next=5;break}throw new Error("associated RTCRtpSender not found");case 5:return(i=n.getParameters()).encodings.forEach((function(e,t){e.active=t<=r})),e.next=9,n.setParameters(i);case 9:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"setRtpEncodingParameters",value:(b=l(u().mark((function e(t,r){var n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),T.debug("setRtpEncodingParameters() [localId:%s, params:%o]",t,r),n=this._mapSendLocalIdRtpSender.get(t)){e.next=5;break}throw new Error("associated RTCRtpSender not found");case 5:return(i=n.getParameters()).encodings.forEach((function(e,t){i.encodings[t]=s(s({},e),r)})),e.next=9,n.setParameters(i);case 9:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getSenderStats",value:(g=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r=this._mapSendLocalIdRtpSender.get(t)){e.next=4;break}throw new Error("associated RTCRtpSender not found");case 4:return e.abrupt("return",r.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"sendDataChannel",value:(y=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.ordered,n=t.maxPacketLifeTime,i=t.maxRetransmits,o=t.label,a=t.protocol,this.assertSendDirection(),c={negotiated:!0,id:this._nextSendSctpStreamId,ordered:r,maxPacketLifeTime:n,maxRetransmits:i,protocol:a},T.debug("sendDataChannel() [options:%o]",c),d=this._pc.createDataChannel(o,c),this._nextSendSctpStreamId=++this._nextSendSctpStreamId%P.MIS,this._hasDataChannelMediaSection){e.next=24;break}return e.next=9,this._pc.createOffer();case 9:if(l=e.sent,p=w.parse(l.sdp),f=p.media.find((function(e){return"application"===e.type})),this._transportReady){e.next=15;break}return e.next=15,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:p});case 15:return T.debug("sendDataChannel() | calling pc.setLocalDescription() [offer:%o]",l),e.next=18,this._pc.setLocalDescription(l);case 18:return this._remoteSdp.sendSctpAssociation({offerMediaObject:f}),h={type:"answer",sdp:this._remoteSdp.getSdp()},T.debug("sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=23,this._pc.setRemoteDescription(h);case 23:this._hasDataChannelMediaSection=!0;case 24:return m={streamId:c.id,ordered:c.ordered,maxPacketLifeTime:c.maxPacketLifeTime,maxRetransmits:c.maxRetransmits},e.abrupt("return",{dataChannel:d,sctpStreamParameters:m});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"receive",value:(v=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p,f,h,m,_,v,y,g,b,S,x,k=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),n=[],o=i(t);try{for(o.s();!(a=o.n()).done;)s=a.value,c=s.trackId,d=s.kind,l=s.rtpParameters,p=s.streamId,T.debug("receive() [trackId:%s, kind:%s]",c,d),f=d,this._remoteSdp.receive({mid:f,kind:d,offerRtpParameters:l,streamId:p||l.rtcp.cname,trackId:c})}catch(e){o.e(e)}finally{o.f()}return h={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("receive() | calling pc.setRemoteDescription() [offer:%o]",h),e.next=8,this._pc.setRemoteDescription(h);case 8:return e.next=10,this._pc.createAnswer();case 10:m=e.sent,_=w.parse(m.sdp),v=i(t),e.prev=13,g=u().mark((function e(){var t,r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=y.value,r=t.kind,n=t.rtpParameters,i=r,o=_.media.find((function(e){return String(e.mid)===i})),j.applyCodecParameters({offerRtpParameters:n,answerMediaObject:o});case 5:case"end":return e.stop()}}),e)})),v.s();case 16:if((y=v.n()).done){e.next=20;break}return e.delegateYield(g(),"t0",18);case 18:e.next=16;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(13),v.e(e.t1);case 25:return e.prev=25,v.f(),e.finish(25);case 28:if(m={type:"answer",sdp:w.write(_)},this._transportReady){e.next=32;break}return e.next=32,this.setupTransport({localDtlsRole:null!==(r=this._forcedLocalDtlsRole)&&void 0!==r?r:"client",localSdpObject:_});case 32:return T.debug("receive() | calling pc.setLocalDescription() [answer:%o]",m),e.next=35,this._pc.setLocalDescription(m);case 35:b=i(t),e.prev=36,x=u().mark((function e(){var t,r,i,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=S.value,r=t.kind,i=t.trackId,o=t.rtpParameters,a=r,s=i,c=k._pc.getReceivers().find((function(e){return e.track&&e.track.id===s}))){e.next=7;break}throw new Error("new RTCRtpReceiver not");case 7:k._mapRecvLocalIdInfo.set(s,{mid:a,rtpParameters:o,rtpReceiver:c}),n.push({localId:s,track:c.track,rtpReceiver:c});case 9:case"end":return e.stop()}}),e)})),b.s();case 39:if((S=b.n()).done){e.next=43;break}return e.delegateYield(x(),"t2",41);case 41:e.next=39;break;case 43:e.next=48;break;case 45:e.prev=45,e.t3=e.catch(36),b.e(e.t3);case 48:return e.prev=48,b.f(),e.finish(48);case 51:return e.abrupt("return",n);case 52:case"end":return e.stop()}}),e,this,[[13,22,25,28],[36,45,48,51]])}))),function(e){return v.apply(this,arguments)})},{key:"stopReceiving",value:(_=l(u().mark((function e(t){var r,n,o,a,s,c,d,l;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t);try{for(r.s();!(n=r.n()).done;)o=n.value,T.debug("stopReceiving() [localId:%s]",o),a=this._mapRecvLocalIdInfo.get(o)||{},s=a.mid,c=a.rtpParameters,this._mapRecvLocalIdInfo.delete(o),this._remoteSdp.planBStopReceiving({mid:s,offerRtpParameters:c})}catch(e){r.e(e)}finally{r.f()}return d={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("stopReceiving() | calling pc.setRemoteDescription() [offer:%o]",d),e.next=7,this._pc.setRemoteDescription(d);case 7:return e.next=9,this._pc.createAnswer();case 9:return l=e.sent,T.debug("stopReceiving() | calling pc.setLocalDescription() [answer:%o]",l),e.next=13,this._pc.setLocalDescription(l);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return _.apply(this,arguments)})},{key:"getReceiverStats",value:(f=l(u().mark((function e(t){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertRecvDirection(),r=this._mapRecvLocalIdInfo.get(t)||{},n=r.rtpReceiver){e.next=4;break}throw new Error("associated RTCRtpReceiver not found");case 4:return e.abrupt("return",n.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{key:"pauseReceiving",value:(d=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return d.apply(this,arguments)})},{key:"resumeReceiving",value:(c=l(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(e){return c.apply(this,arguments)})},{key:"receiveDataChannel",value:(a=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.sctpStreamParameters,n=t.label,i=t.protocol,this.assertRecvDirection(),a=r.streamId,s=r.ordered,c=r.maxPacketLifeTime,d=r.maxRetransmits,l={negotiated:!0,id:a,ordered:s,maxPacketLifeTime:c,maxRetransmits:d,protocol:i},T.debug("receiveDataChannel() [options:%o]",l),p=this._pc.createDataChannel(n,l),this._hasDataChannelMediaSection){e.next=23;break}return this._remoteSdp.receiveSctpAssociation({oldDataChannelSpec:!0}),f={type:"offer",sdp:this._remoteSdp.getSdp()},T.debug("receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]",f),e.next=12,this._pc.setRemoteDescription(f);case 12:return e.next=14,this._pc.createAnswer();case 14:if(h=e.sent,this._transportReady){e.next=19;break}return m=w.parse(h.sdp),e.next=19,this.setupTransport({localDtlsRole:null!==(o=this._forcedLocalDtlsRole)&&void 0!==o?o:"client",localSdpObject:m});case 19:return T.debug("receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=22,this._pc.setLocalDescription(h);case 22:this._hasDataChannelMediaSection=!0;case 23:return e.abrupt("return",{dataChannel:p});case 24:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setupTransport",value:(o=l(u().mark((function e(t){var r,n,i,o=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.localDtlsRole,(n=t.localSdpObject)||(n=w.parse(this._pc.localDescription.sdp)),(i=j.extractDtlsParameters({sdpObject:n})).role=r,this._remoteSdp.updateDtlsRole("client"===r?"server":"client"),e.next=7,new Promise((function(e,t){o.safeEmit("@connect",{dtlsParameters:i},e,t)}));case 7:this._transportReady=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"assertSendDirection",value:function(){if("send"!==this._direction)throw new Error('method can just be called for handlers with "send" direction')}},{key:"assertRecvDirection",value:function(){if("recv"!==this._direction)throw new Error('method can just be called for handlers with "recv" direction')}}],n=[{key:"createFactory",value:function(){return function(){return new F}}}],r&&p(t.prototype,r),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),F}(R.HandlerInterface);t.Safari11=A},"./node_modules/mediasoup-client/lib/handlers/Safari12.js":function(e,t,r){"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)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function d(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)}))}}function p(e,t){for(var r=0;r1&&(A.debug("send() | enabling legacy simulcast"),h=w.parse(f.sdp),m=h.media[l.idx],E.addLegacySimulcast({offerMediaObject:m,numStreams:n.length}),f={type:"offer",sdp:w.write(h)}),A.debug("send() | calling pc.setLocalDescription() [offer:%o]",f),e.next=21,this._pc.setLocalDescription(f);case 21:if(v=p.mid,c.mid=v,h=w.parse(this._pc.localDescription.sdp),m=h.media[l.idx],c.rtcp.cname=j.getCname({offerMediaObject:m}),c.encodings=E.getRtpEncodings({offerMediaObject:m}),n)for(y=0;y1&&("video/vp8"===c.codecs[0].mimeType.toLowerCase()||"video/h264"===c.codecs[0].mimeType.toLowerCase())){g=i(c.encodings);try{for(g.s();!(b=g.n()).done;)(S=b.value).scalabilityMode?S.scalabilityMode="L1T".concat(_.temporalLayers):S.scalabilityMode="L1T3"}catch(e){g.e(e)}finally{g.f()}}return this._remoteSdp.send({offerMediaObject:m,reuseMid:l.reuseMid,offerRtpParameters:c,answerRtpParameters:d,codecOptions:o}),R={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("send() | calling pc.setRemoteDescription() [answer:%o]",R),e.next=34,this._pc.setRemoteDescription(R);case 34:return this._mapMidTransceiver.set(v,p),e.abrupt("return",{localId:v,rtpParameters:c,rtpSender:p.sender});case 36:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"stopSending",value:(I=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("stopSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:if(r.sender.replaceTrack(null),this._pc.removeTrack(r.sender),this._remoteSdp.closeMediaSection(r.mid))try{r.stop()}catch(e){}return e.next=11,this._pc.createOffer();case 11:return n=e.sent,A.debug("stopSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=15,this._pc.setLocalDescription(n);case 15:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("stopSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=19,this._pc.setRemoteDescription(i);case 19:this._mapMidTransceiver.delete(t);case 20:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"pauseSending",value:(L=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("pauseSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return r.direction="inactive",this._remoteSdp.pauseMediaSection(t),e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("pauseSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("pauseSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"resumeSending",value:(C=l(u().mark((function e(t){var r,n,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("resumeSending() [localId:%s]",t),r=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return r.direction="sendonly",this._remoteSdp.resumeSendingMediaSection(t),e.next=9,this._pc.createOffer();case 9:return n=e.sent,A.debug("resumeSending() | calling pc.setLocalDescription() [offer:%o]",n),e.next=13,this._pc.setLocalDescription(n);case 13:return i={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("resumeSending() | calling pc.setRemoteDescription() [answer:%o]",i),e.next=17,this._pc.setRemoteDescription(i);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return C.apply(this,arguments)})},{key:"replaceTrack",value:(O=l(u().mark((function e(t,r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r?A.debug("replaceTrack() [localId:%s, track.id:%s]",t,r.id):A.debug("replaceTrack() [localId:%s, no track]",t),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return e.next=7,n.sender.replaceTrack(r);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"setMaxSpatialLayer",value:(S=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("setMaxSpatialLayer() [localId:%s, spatialLayer:%s]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){e.active=t<=r})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,A.debug("setMaxSpatialLayer() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("setMaxSpatialLayer() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"setRtpEncodingParameters",value:(b=l(u().mark((function e(t,r){var n,i,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),A.debug("setRtpEncodingParameters() [localId:%s, params:%o]",t,r),n=this._mapMidTransceiver.get(t)){e.next=5;break}throw new Error("associated RTCRtpTransceiver not found");case 5:return(i=n.sender.getParameters()).encodings.forEach((function(e,t){i.encodings[t]=s(s({},e),r)})),e.next=9,n.sender.setParameters(i);case 9:return this._remoteSdp.muxMediaSectionSimulcast(t,i.encodings),e.next=12,this._pc.createOffer();case 12:return o=e.sent,A.debug("setRtpEncodingParameters() | calling pc.setLocalDescription() [offer:%o]",o),e.next=16,this._pc.setLocalDescription(o);case 16:return a={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("setRtpEncodingParameters() | calling pc.setRemoteDescription() [answer:%o]",a),e.next=20,this._pc.setRemoteDescription(a);case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getSenderStats",value:(g=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertSendDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.sender.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"sendDataChannel",value:(y=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.ordered,n=t.maxPacketLifeTime,i=t.maxRetransmits,o=t.label,a=t.protocol,this.assertSendDirection(),c={negotiated:!0,id:this._nextSendSctpStreamId,ordered:r,maxPacketLifeTime:n,maxRetransmits:i,protocol:a},A.debug("sendDataChannel() [options:%o]",c),d=this._pc.createDataChannel(o,c),this._nextSendSctpStreamId=++this._nextSendSctpStreamId%D.MIS,this._hasDataChannelMediaSection){e.next=24;break}return e.next=9,this._pc.createOffer();case 9:if(l=e.sent,p=w.parse(l.sdp),f=p.media.find((function(e){return"application"===e.type})),this._transportReady){e.next=15;break}return e.next=15,this.setupTransport({localDtlsRole:null!==(s=this._forcedLocalDtlsRole)&&void 0!==s?s:"client",localSdpObject:p});case 15:return A.debug("sendDataChannel() | calling pc.setLocalDescription() [offer:%o]",l),e.next=18,this._pc.setLocalDescription(l);case 18:return this._remoteSdp.sendSctpAssociation({offerMediaObject:f}),h={type:"answer",sdp:this._remoteSdp.getSdp()},A.debug("sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=23,this._pc.setRemoteDescription(h);case 23:this._hasDataChannelMediaSection=!0;case 24:return m={streamId:c.id,ordered:c.ordered,maxPacketLifeTime:c.maxPacketLifeTime,maxRetransmits:c.maxRetransmits},e.abrupt("return",{dataChannel:d,sctpStreamParameters:m});case 26:case"end":return e.stop()}}),e,this)}))),function(e){return y.apply(this,arguments)})},{key:"receive",value:(v=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p,f,h,m,_,v,y,g,b,S,x,k,E=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),n=[],o=new Map,a=i(t);try{for(a.s();!(s=a.n()).done;)c=s.value,d=c.trackId,l=c.kind,p=c.rtpParameters,f=c.streamId,A.debug("receive() [trackId:%s, kind:%s]",d,l),h=p.mid||String(this._mapMidTransceiver.size),o.set(d,h),this._remoteSdp.receive({mid:h,kind:l,offerRtpParameters:p,streamId:f||p.rtcp.cname,trackId:d})}catch(e){a.e(e)}finally{a.f()}return m={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("receive() | calling pc.setRemoteDescription() [offer:%o]",m),e.next=9,this._pc.setRemoteDescription(m);case 9:return e.next=11,this._pc.createAnswer();case 11:_=e.sent,v=w.parse(_.sdp),y=i(t),e.prev=14,b=u().mark((function e(){var t,r,n,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=g.value,r=t.trackId,n=t.rtpParameters,i=o.get(r),a=v.media.find((function(e){return String(e.mid)===i})),j.applyCodecParameters({offerRtpParameters:n,answerMediaObject:a});case 5:case"end":return e.stop()}}),e)})),y.s();case 17:if((g=y.n()).done){e.next=21;break}return e.delegateYield(b(),"t0",19);case 19:e.next=17;break;case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(14),y.e(e.t1);case 26:return e.prev=26,y.f(),e.finish(26);case 29:if(_={type:"answer",sdp:w.write(v)},this._transportReady){e.next=33;break}return e.next=33,this.setupTransport({localDtlsRole:null!==(r=this._forcedLocalDtlsRole)&&void 0!==r?r:"client",localSdpObject:v});case 33:return A.debug("receive() | calling pc.setLocalDescription() [answer:%o]",_),e.next=36,this._pc.setLocalDescription(_);case 36:S=i(t),e.prev=37,k=u().mark((function e(){var t,r,i,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=x.value,r=t.trackId,i=o.get(r),a=E._pc.getTransceivers().find((function(e){return e.mid===i}))){e.next=6;break}throw new Error("new RTCRtpTransceiver not found");case 6:E._mapMidTransceiver.set(i,a),n.push({localId:i,track:a.receiver.track,rtpReceiver:a.receiver});case 8:case"end":return e.stop()}}),e)})),S.s();case 40:if((x=S.n()).done){e.next=44;break}return e.delegateYield(k(),"t2",42);case 42:e.next=40;break;case 44:e.next=49;break;case 46:e.prev=46,e.t3=e.catch(37),S.e(e.t3);case 49:return e.prev=49,S.f(),e.finish(49);case 52:return e.abrupt("return",n);case 53:case"end":return e.stop()}}),e,this,[[14,23,26,29],[37,46,49,52]])}))),function(e){return v.apply(this,arguments)})},{key:"stopReceiving",value:(_=l(u().mark((function e(t){var r,n,o,a,s,c,d,l,p;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=13;break}if(o=n.value,A.debug("stopReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:this._remoteSdp.closeMediaSection(a.mid);case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("stopReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=25,this._pc.setRemoteDescription(s);case 25:return e.next=27,this._pc.createAnswer();case 27:return c=e.sent,A.debug("stopReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=31,this._pc.setLocalDescription(c);case 31:d=i(t);try{for(d.s();!(l=d.n()).done;)p=l.value,this._mapMidTransceiver.delete(p)}catch(e){d.e(e)}finally{d.f()}case 33:case"end":return e.stop()}}),e,this,[[2,15,18,21]])}))),function(e){return _.apply(this,arguments)})},{key:"pauseReceiving",value:(f=l(u().mark((function e(t){var r,n,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}if(o=n.value,A.debug("pauseReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:a.direction="inactive",this._remoteSdp.pauseMediaSection(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=26,this._pc.setRemoteDescription(s);case 26:return e.next=28,this._pc.createAnswer();case 28:return c=e.sent,A.debug("pauseReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=32,this._pc.setLocalDescription(c);case 32:case"end":return e.stop()}}),e,this,[[2,16,19,22]])}))),function(e){return f.apply(this,arguments)})},{key:"resumeReceiving",value:(d=l(u().mark((function e(t){var r,n,o,a,s,c;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.assertRecvDirection(),r=i(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=14;break}if(o=n.value,A.debug("resumeReceiving() [localId:%s]",o),a=this._mapMidTransceiver.get(o)){e.next=10;break}throw new Error("associated RTCRtpTransceiver not found");case 10:a.direction="recvonly",this._remoteSdp.resumeReceivingMediaSection(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return s={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]",s),e.next=26,this._pc.setRemoteDescription(s);case 26:return e.next=28,this._pc.createAnswer();case 28:return c=e.sent,A.debug("resumeReceiving() | calling pc.setLocalDescription() [answer:%o]",c),e.next=32,this._pc.setLocalDescription(c);case 32:case"end":return e.stop()}}),e,this,[[2,16,19,22]])}))),function(e){return d.apply(this,arguments)})},{key:"getReceiverStats",value:(c=l(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertRecvDirection(),r=this._mapMidTransceiver.get(t)){e.next=4;break}throw new Error("associated RTCRtpTransceiver not found");case 4:return e.abrupt("return",r.receiver.getStats());case 5:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"receiveDataChannel",value:(a=l(u().mark((function e(t){var r,n,i,o,a,s,c,d,l,p,f,h,m;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.sctpStreamParameters,n=t.label,i=t.protocol,this.assertRecvDirection(),a=r.streamId,s=r.ordered,c=r.maxPacketLifeTime,d=r.maxRetransmits,l={negotiated:!0,id:a,ordered:s,maxPacketLifeTime:c,maxRetransmits:d,protocol:i},A.debug("receiveDataChannel() [options:%o]",l),p=this._pc.createDataChannel(n,l),this._hasDataChannelMediaSection){e.next=23;break}return this._remoteSdp.receiveSctpAssociation(),f={type:"offer",sdp:this._remoteSdp.getSdp()},A.debug("receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]",f),e.next=12,this._pc.setRemoteDescription(f);case 12:return e.next=14,this._pc.createAnswer();case 14:if(h=e.sent,this._transportReady){e.next=19;break}return m=w.parse(h.sdp),e.next=19,this.setupTransport({localDtlsRole:null!==(o=this._forcedLocalDtlsRole)&&void 0!==o?o:"client",localSdpObject:m});case 19:return A.debug("receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]",h),e.next=22,this._pc.setLocalDescription(h);case 22:this._hasDataChannelMediaSection=!0;case 23:return e.abrupt("return",{dataChannel:p});case 24:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setupTransport",value:(o=l(u().mark((function e(t){var r,n,i,o=this;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.localDtlsRole,(n=t.localSdpObject)||(n=w.parse(this._pc.localDescription.sdp)),(i=j.extractDtlsParameters({sdpObject:n})).role=r,this._remoteSdp.updateDtlsRole("client"===r?"server":"client"),e.next=7,new Promise((function(e,t){o.safeEmit("@connect",{dtlsParameters:i},e,t)}));case 7:this._transportReady=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"assertSendDirection",value:function(){if("send"!==this._direction)throw new Error('method can just be called for handlers with "send" direction')}},{key:"assertRecvDirection",value:function(){if("recv"!==this._direction)throw new Error('method can just be called for handlers with "recv" direction')}}],n=[{key:"createFactory",value:function(){return function(){return new z}}}],r&&p(t.prototype,r),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),z}(O.HandlerInterface);t.Safari12=C},"./node_modules/mediasoup-client/lib/handlers/ortc/edgeUtils.js":function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{"use strict";function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r1&&(t.encoding=e.channels),n._mediaObject.rtp.push(t);var r=g.clone(e.parameters,{}),i=g.clone(e.rtcpFeedback,[]);if(_){var o=_.opusStereo,a=_.opusFec,s=_.opusDtx,c=_.opusMaxPlaybackRate,d=_.opusMaxAverageBitrate,l=_.opusPtime,p=_.opusNack,f=_.videoGoogleStartBitrate,m=_.videoGoogleMaxBitrate,v=_.videoGoogleMinBitrate,y=h.codecs.find((function(t){return t.payloadType===e.payloadType}));switch(e.mimeType.toLowerCase()){case"audio/opus":case"audio/multiopus":void 0!==o&&(y.parameters["sprop-stereo"]=o?1:0,r.stereo=o?1:0),void 0!==a&&(y.parameters.useinbandfec=a?1:0,r.useinbandfec=a?1:0),void 0!==s&&(y.parameters.usedtx=s?1:0,r.usedtx=s?1:0),void 0!==c&&(r.maxplaybackrate=c),void 0!==d&&(r.maxaveragebitrate=d),void 0!==l&&(y.parameters.ptime=l,r.ptime=l),p||(y.rtcpFeedback=y.rtcpFeedback.filter((function(e){return"nack"!==e.type||e.parameter})),i=i.filter((function(e){return"nack"!==e.type||e.parameter})));break;case"video/vp8":case"video/vp9":case"video/h264":case"video/h265":void 0!==f&&(r["x-google-start-bitrate"]=f),void 0!==m&&(r["x-google-max-bitrate"]=m),void 0!==v&&(r["x-google-min-bitrate"]=v)}}for(var w={payload:e.payloadType,config:""},S=0,k=Object.keys(r);S1&&(k.encoding=S.channels),n._mediaObject.rtp.push(k);for(var j={payload:S.payloadType,config:""},E=0,R=Object.keys(S.parameters);E1&&(f.encoding=p.channels),this._mediaObject.rtp.push(f);for(var h={payload:p.payloadType,config:""},m=0,_=Object.keys(p.parameters);m<_.length;m++){var v=_[m];h.config&&(h.config+=";"),h.config+="".concat(v,"=").concat(p.parameters[v])}h.config&&this._mediaObject.fmtp.push(h);var y,g=u(p.rtcpFeedback);try{for(g.s();!(y=g.n()).done;){var b=y.value;this._mediaObject.rtcpFb.push({payload:p.payloadType,type:b.type,subtype:b.parameter})}}catch(e){g.e(e)}finally{g.f()}}}}catch(e){l.e(e)}finally{l.f()}this._mediaObject.payloads+=" ".concat(n.codecs.filter((function(e){return!r._mediaObject.payloads.includes(e.payloadType)})).map((function(e){return e.payloadType})).join(" ")),this._mediaObject.payloads=this._mediaObject.payloads.trim(),n.rtcp.cname&&this._mediaObject.ssrcs.push({id:s,attribute:"cname",value:n.rtcp.cname}),this._mediaObject.ssrcs.push({id:s,attribute:"msid",value:"".concat(i||"-"," ").concat(o)}),c&&(n.rtcp.cname&&this._mediaObject.ssrcs.push({id:c,attribute:"cname",value:n.rtcp.cname}),this._mediaObject.ssrcs.push({id:c,attribute:"msid",value:"".concat(i||"-"," ").concat(o)}),this._mediaObject.ssrcGroups.push({semantics:"FID",ssrcs:"".concat(s," ").concat(c)}))}},{key:"planBStopReceiving",value:function(e){var t=e.offerRtpParameters.encodings[0],r=t.ssrc,n=t.rtx&&t.rtx.ssrc?t.rtx.ssrc:void 0;this._mediaObject.ssrcs=this._mediaObject.ssrcs.filter((function(e){return e.id!==r&&e.id!==n})),n&&(this._mediaObject.ssrcGroups=this._mediaObject.ssrcGroups.filter((function(e){return e.ssrcs!=="".concat(r," ").concat(n)})))}}]),r}(b);function x(e){var t=new RegExp("^(audio|video)/(.+)","i").exec(e.mimeType);if(!t)throw new TypeError("invalid codec.mimeType");return t[2]}t.OfferMediaSection=S},"./node_modules/mediasoup-client/lib/handlers/sdp/RemoteSdp.js":function(e,t,r){"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)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.oldDataChannelSpec,r=void 0!==t&&t,n=new f.OfferMediaSection({iceParameters:this._iceParameters,iceCandidates:this._iceCandidates,dtlsParameters:this._dtlsParameters,sctpParameters:this._sctpParameters,plainRtpParameters:this._plainRtpParameters,mid:"datachannel",kind:"application",oldDataChannelSpec:r});this._addMediaSection(n)}},{key:"getSdp",value:function(){return this._sdpObject.origin.sessionVersion++,l.write(this._sdpObject)}},{key:"_addMediaSection",value:function(e){this._firstMid||(this._firstMid=e.mid),this._mediaSections.push(e),this._midToIndex.set(e.mid,this._mediaSections.length-1),this._sdpObject.media.push(e.getObject()),this._regenerateBundleMids()}},{key:"_replaceMediaSection",value:function(e,t){if("string"==typeof t){var r=this._midToIndex.get(t);if(void 0===r)throw new Error("no media section found for reuseMid '".concat(t,"'"));var n=this._mediaSections[r];this._mediaSections[r]=e,this._midToIndex.delete(n.mid),this._midToIndex.set(e.mid,r),this._sdpObject.media[r]=e.getObject(),this._regenerateBundleMids()}else{var i=this._midToIndex.get(e.mid);if(void 0===i)throw new Error("no media section found with mid '".concat(e.mid,"'"));this._mediaSections[i]=e,this._sdpObject.media[i]=e.getObject()}}},{key:"_findMediaSection",value:function(e){var t=this._midToIndex.get(e);if(void 0===t)throw new Error("no media section found with mid '".concat(e,"'"));return this._mediaSections[t]}},{key:"_regenerateBundleMids",value:function(){this._dtlsParameters&&(this._sdpObject.groups[0].mids=this._mediaSections.filter((function(e){return!e.closed})).map((function(e){return e.mid})).join(" "))}}])&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.RemoteSdp=m},"./node_modules/mediasoup-client/lib/handlers/sdp/commonUtils.js":function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new 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(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&void 0!==arguments[2]?arguments[2]:{},n=r.strict,i=void 0!==n&&n,o=r.modify,a=void 0!==o&&o,s=e.mimeType.toLowerCase(),c=t.mimeType.toLowerCase();if(s!==c)return!1;if(e.clockRate!==t.clockRate)return!1;if(e.channels!==t.channels)return!1;switch(s){case"video/h264":if(i){var d,l=e.parameters["packetization-mode"]||0,p=t.parameters["packetization-mode"]||0;if(l!==p)return!1;if(!u.isSameProfile(e.parameters,t.parameters))return!1;try{d=u.generateProfileLevelIdForAnswer(e.parameters,t.parameters)}catch(e){return!1}a&&(d?(e.parameters["profile-level-id"]=d,t.parameters["profile-level-id"]=d):(delete e.parameters["profile-level-id"],delete t.parameters["profile-level-id"]))}break;case"video/vp9":if(i){var f=e.parameters["profile-id"]||0,h=t.parameters["profile-id"]||0;if(f!==h)return!1}}return!0}function S(e,t){var r,i=[],o=n(e.rtcpFeedback||[]);try{var a=function(){var e=r.value,n=(t.rtcpFeedback||[]).find((function(t){return t.type===e.type&&(t.parameter===e.parameter||!t.parameter&&!e.parameter)}));n&&i.push(n)};for(o.s();!(r=o.n()).done;)a()}catch(e){o.e(e)}finally{o.f()}return i}t.validateRtpCapabilities=function(e){if("object"!==o(e))throw new TypeError("caps is not an object");if(e.codecs&&!Array.isArray(e.codecs))throw new TypeError("caps.codecs is not an array");e.codecs||(e.codecs=[]);var t,r=n(e.codecs);try{for(r.s();!(t=r.n()).done;){l(t.value)}}catch(e){r.e(e)}finally{r.f()}if(e.headerExtensions&&!Array.isArray(e.headerExtensions))throw new TypeError("caps.headerExtensions is not an array");e.headerExtensions||(e.headerExtensions=[]);var i,a=n(e.headerExtensions);try{for(a.s();!(i=a.n()).done;){f(i.value)}}catch(e){a.e(e)}finally{a.f()}},t.validateRtpCodecCapability=l,t.validateRtcpFeedback=p,t.validateRtpHeaderExtension=f,t.validateRtpParameters=h,t.validateRtpCodecParameters=m,t.validateRtpHeaderExtensionParameters=_,t.validateRtpEncodingParameters=v,t.validateRtcpParameters=y,t.validateSctpCapabilities=function(e){if("object"!==o(e))throw new TypeError("caps is not an object");if(!e.numStreams||"object"!==o(e.numStreams))throw new TypeError("missing caps.numStreams");g(e.numStreams)},t.validateNumSctpStreams=g,t.validateSctpParameters=function(e){if("object"!==o(e))throw new TypeError("params is not an object");if("number"!=typeof e.port)throw new TypeError("missing params.port");if("number"!=typeof e.OS)throw new TypeError("missing params.OS");if("number"!=typeof e.MIS)throw new TypeError("missing params.MIS");if("number"!=typeof e.maxMessageSize)throw new TypeError("missing params.maxMessageSize")},t.validateSctpStreamParameters=function(e){if("object"!==o(e))throw new TypeError("params is not an object");if("number"!=typeof e.streamId)throw new TypeError("missing params.streamId");var t=!1;if("boolean"==typeof e.ordered?t=!0:e.ordered=!0,e.maxPacketLifeTime&&"number"!=typeof e.maxPacketLifeTime)throw new TypeError("invalid params.maxPacketLifeTime");if(e.maxRetransmits&&"number"!=typeof e.maxRetransmits)throw new TypeError("invalid params.maxRetransmits");if(e.maxPacketLifeTime&&e.maxRetransmits)throw new TypeError("cannot provide both maxPacketLifeTime and maxRetransmits");if(t&&e.ordered&&(e.maxPacketLifeTime||e.maxRetransmits))throw new TypeError("cannot be ordered with maxPacketLifeTime or maxRetransmits");if(t||!e.maxPacketLifeTime&&!e.maxRetransmits||(e.ordered=!1),e.label&&"string"!=typeof e.label)throw new TypeError("invalid params.label");if(e.protocol&&"string"!=typeof e.protocol)throw new TypeError("invalid params.protocol")},t.getExtendedRtpCapabilities=function(e,t){var r,i={codecs:[],headerExtensions:[]},o=n(t.codecs||[]);try{var a=function(){var t=r.value;if(b(t))return"continue";var n=(e.codecs||[]).find((function(e){return w(e,t,{strict:!0,modify:!0})}));if(!n)return"continue";var o={mimeType:n.mimeType,kind:n.kind,clockRate:n.clockRate,channels:n.channels,localPayloadType:n.preferredPayloadType,localRtxPayloadType:void 0,remotePayloadType:t.preferredPayloadType,remoteRtxPayloadType:void 0,localParameters:n.parameters,remoteParameters:t.parameters,rtcpFeedback:S(n,t)};i.codecs.push(o)};for(o.s();!(r=o.n()).done;)a()}catch(e){o.e(e)}finally{o.f()}var s,c=n(i.codecs);try{var u=function(){var r=s.value,n=e.codecs.find((function(e){return b(e)&&e.parameters.apt===r.localPayloadType})),i=t.codecs.find((function(e){return b(e)&&e.parameters.apt===r.remotePayloadType}));n&&i&&(r.localRtxPayloadType=n.preferredPayloadType,r.remoteRtxPayloadType=i.preferredPayloadType)};for(c.s();!(s=c.n()).done;)u()}catch(e){c.e(e)}finally{c.f()}var d,l=n(t.headerExtensions);try{var p=function(){var t=d.value,r=e.headerExtensions.find((function(e){return function(e,t){if(e.kind&&t.kind&&e.kind!==t.kind)return!1;if(e.uri!==t.uri)return!1;return!0}(e,t)}));if(!r)return"continue";var n={kind:t.kind,uri:t.uri,sendId:r.preferredId,recvId:t.preferredId,encrypt:r.preferredEncrypt,direction:"sendrecv"};switch(t.direction){case"sendrecv":n.direction="sendrecv";break;case"recvonly":n.direction="sendonly";break;case"sendonly":n.direction="recvonly";break;case"inactive":n.direction="inactive"}i.headerExtensions.push(n)};for(l.s();!(d=l.n()).done;)p()}catch(e){l.e(e)}finally{l.f()}return i},t.getRecvRtpCapabilities=function(e){var t,r={codecs:[],headerExtensions:[]},i=n(e.codecs);try{for(i.s();!(t=i.n()).done;){var o=t.value,a={mimeType:o.mimeType,kind:o.kind,preferredPayloadType:o.remotePayloadType,clockRate:o.clockRate,channels:o.channels,parameters:o.localParameters,rtcpFeedback:o.rtcpFeedback};if(r.codecs.push(a),o.remoteRtxPayloadType){var s={mimeType:"".concat(o.kind,"/rtx"),kind:o.kind,preferredPayloadType:o.remoteRtxPayloadType,clockRate:o.clockRate,parameters:{apt:o.remotePayloadType},rtcpFeedback:[]};r.codecs.push(s)}}}catch(e){i.e(e)}finally{i.f()}var c,u=n(e.headerExtensions);try{for(u.s();!(c=u.n()).done;){var d=c.value;if("sendrecv"===d.direction||"recvonly"===d.direction){var l={kind:d.kind,uri:d.uri,preferredId:d.recvId,preferredEncrypt:d.encrypt,direction:d.direction};r.headerExtensions.push(l)}}}catch(e){u.e(e)}finally{u.f()}return r},t.getSendingRtpParameters=function(e,t){var r,i={mid:void 0,codecs:[],headerExtensions:[],encodings:[],rtcp:{}},o=n(t.codecs);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a.kind===e){var s={mimeType:a.mimeType,payloadType:a.localPayloadType,clockRate:a.clockRate,channels:a.channels,parameters:a.localParameters,rtcpFeedback:a.rtcpFeedback};if(i.codecs.push(s),a.localRtxPayloadType){var c={mimeType:"".concat(a.kind,"/rtx"),payloadType:a.localRtxPayloadType,clockRate:a.clockRate,parameters:{apt:a.localPayloadType},rtcpFeedback:[]};i.codecs.push(c)}}}}catch(e){o.e(e)}finally{o.f()}var u,d=n(t.headerExtensions);try{for(d.s();!(u=d.n()).done;){var l=u.value;if(!(l.kind&&l.kind!==e||"sendrecv"!==l.direction&&"sendonly"!==l.direction)){var p={uri:l.uri,id:l.sendId,encrypt:l.encrypt,parameters:{}};i.headerExtensions.push(p)}}}catch(e){d.e(e)}finally{d.f()}return i},t.getSendingRemoteRtpParameters=function(e,t){var r,i={mid:void 0,codecs:[],headerExtensions:[],encodings:[],rtcp:{}},o=n(t.codecs);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a.kind===e){var s={mimeType:a.mimeType,payloadType:a.localPayloadType,clockRate:a.clockRate,channels:a.channels,parameters:a.remoteParameters,rtcpFeedback:a.rtcpFeedback};if(i.codecs.push(s),a.localRtxPayloadType){var c={mimeType:"".concat(a.kind,"/rtx"),payloadType:a.localRtxPayloadType,clockRate:a.clockRate,parameters:{apt:a.localPayloadType},rtcpFeedback:[]};i.codecs.push(c)}}}}catch(e){o.e(e)}finally{o.f()}var u,d=n(t.headerExtensions);try{for(d.s();!(u=d.n()).done;){var l=u.value;if(!(l.kind&&l.kind!==e||"sendrecv"!==l.direction&&"sendonly"!==l.direction)){var p={uri:l.uri,id:l.sendId,encrypt:l.encrypt,parameters:{}};i.headerExtensions.push(p)}}}catch(e){d.e(e)}finally{d.f()}if(i.headerExtensions.some((function(e){return"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"===e.uri}))){var f,h=n(i.codecs);try{for(h.s();!(f=h.n()).done;){var m=f.value;m.rtcpFeedback=(m.rtcpFeedback||[]).filter((function(e){return"goog-remb"!==e.type}))}}catch(e){h.e(e)}finally{h.f()}}else if(i.headerExtensions.some((function(e){return"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"===e.uri}))){var _,v=n(i.codecs);try{for(v.s();!(_=v.n()).done;){var y=_.value;y.rtcpFeedback=(y.rtcpFeedback||[]).filter((function(e){return"transport-cc"!==e.type}))}}catch(e){v.e(e)}finally{v.f()}}else{var g,b=n(i.codecs);try{for(b.s();!(g=b.n()).done;){var w=g.value;w.rtcpFeedback=(w.rtcpFeedback||[]).filter((function(e){return"transport-cc"!==e.type&&"goog-remb"!==e.type}))}}catch(e){b.e(e)}finally{b.f()}}return i},t.reduceCodecs=function(e,t){var r=[];if(t){for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;var r=new RegExp("^[LS]([1-9]\\d{0,1})T([1-9]\\d{0,1})");t.parse=function(e){var t=r.exec(e||"");return t?{spatialLayers:Number(t[1]),temporalLayers:Number(t[2])}:{spatialLayers:1,temporalLayers:1}}},"./node_modules/mediasoup-client/lib/types.js":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r("./node_modules/mediasoup-client/lib/Device.js"),t),i(r("./node_modules/mediasoup-client/lib/Transport.js"),t),i(r("./node_modules/mediasoup-client/lib/Producer.js"),t),i(r("./node_modules/mediasoup-client/lib/Consumer.js"),t),i(r("./node_modules/mediasoup-client/lib/DataProducer.js"),t),i(r("./node_modules/mediasoup-client/lib/DataConsumer.js"),t),i(r("./node_modules/mediasoup-client/lib/RtpParameters.js"),t),i(r("./node_modules/mediasoup-client/lib/SctpParameters.js"),t),i(r("./node_modules/mediasoup-client/lib/handlers/HandlerInterface.js"),t),i(r("./node_modules/mediasoup-client/lib/errors.js"),t)},"./node_modules/mediasoup-client/lib/utils.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRandomNumber=t.clone=void 0,t.clone=function(e,t){return void 0===e?t:JSON.parse(JSON.stringify(e))},t.generateRandomNumber=function(){return Math.round(1e7*Math.random())}},"./node_modules/ieee754/index.js":(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<>1,d=-7,l=r?i-1:0,p=r?-1:1,f=e[t+l];for(l+=p,o=f&(1<<-d)-1,f>>=-d,d+=s;d>0;o=256*o+e[t+l],l+=p,d-=8);for(a=o&(1<<-d)-1,o>>=-d,d+=n;d>0;a=256*a+e[t+l],l+=p,d-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,d=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+l>=1?p/c:p*Math.pow(2,1-l))*c>=2&&(a++,c/=2),a+l>=d?(s=0,a=d):a+l>=1?(s=(t*c-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=h,s/=256,i-=8);for(a=a<0;e[r+f]=255&a,f+=h,a/=256,u-=8);e[r+f-h]|=128*m}},"./node_modules/inherits/inherits_browser.js":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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},"./node_modules/inversify/lib/annotation/decorator_utils.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tagProperty=t.tagParameter=t.decorate=void 0;var n=r("./node_modules/inversify/lib/constants/error_msgs.js"),i=r("./node_modules/inversify/lib/constants/metadata_keys.js");function o(e,t,r,i,o){var a={},s="number"==typeof o,c=void 0!==o&&s?o.toString():r;if(s&&void 0!==r)throw new Error(n.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(e,t)&&(a=Reflect.getMetadata(e,t));var u=a[c];if(Array.isArray(u))for(var d=0,l=u;d{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inject=t.LazyServiceIdentifer=void 0;var n=r("./node_modules/inversify/lib/constants/error_msgs.js"),i=r("./node_modules/inversify/lib/constants/metadata_keys.js"),o=r("./node_modules/inversify/lib/planning/metadata.js"),a=r("./node_modules/inversify/lib/annotation/decorator_utils.js"),s=function(){function e(e){this._cb=e}return e.prototype.unwrap=function(){return this._cb()},e}();t.LazyServiceIdentifer=s,t.inject=function(e){return function(t,r,s){if(void 0===e)throw new Error(n.UNDEFINED_INJECT_ANNOTATION(t.name));var c=new o.Metadata(i.INJECT_TAG,e);"number"==typeof s?a.tagParameter(t,r,s,c):a.tagProperty(t,r,c)}}},"./node_modules/inversify/lib/annotation/injectable.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectable=void 0;var n=r("./node_modules/inversify/lib/constants/error_msgs.js"),i=r("./node_modules/inversify/lib/constants/metadata_keys.js");t.injectable=function(){return function(e){if(Reflect.hasOwnMetadata(i.PARAM_TYPES,e))throw new Error(n.DUPLICATED_INJECTABLE_DECORATOR);var t=Reflect.getMetadata(i.DESIGN_PARAM_TYPES,e)||[];return Reflect.defineMetadata(i.PARAM_TYPES,t,e),e}}},"./node_modules/inversify/lib/annotation/multi_inject.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiInject=void 0;var n=r("./node_modules/inversify/lib/constants/metadata_keys.js"),i=r("./node_modules/inversify/lib/planning/metadata.js"),o=r("./node_modules/inversify/lib/annotation/decorator_utils.js");t.multiInject=function(e){return function(t,r,a){var s=new i.Metadata(n.MULTI_INJECT_TAG,e);"number"==typeof a?o.tagParameter(t,r,a,s):o.tagProperty(t,r,s)}}},"./node_modules/inversify/lib/annotation/named.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.named=void 0;var n=r("./node_modules/inversify/lib/constants/metadata_keys.js"),i=r("./node_modules/inversify/lib/planning/metadata.js"),o=r("./node_modules/inversify/lib/annotation/decorator_utils.js");t.named=function(e){return function(t,r,a){var s=new i.Metadata(n.NAMED_TAG,e);"number"==typeof a?o.tagParameter(t,r,a,s):o.tagProperty(t,r,s)}}},"./node_modules/inversify/lib/annotation/optional.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.optional=void 0;var n=r("./node_modules/inversify/lib/constants/metadata_keys.js"),i=r("./node_modules/inversify/lib/planning/metadata.js"),o=r("./node_modules/inversify/lib/annotation/decorator_utils.js");t.optional=function(){return function(e,t,r){var a=new i.Metadata(n.OPTIONAL_TAG,!0);"number"==typeof r?o.tagParameter(e,t,r,a):o.tagProperty(e,t,a)}}},"./node_modules/inversify/lib/annotation/post_construct.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postConstruct=void 0;var n=r("./node_modules/inversify/lib/constants/error_msgs.js"),i=r("./node_modules/inversify/lib/constants/metadata_keys.js"),o=r("./node_modules/inversify/lib/planning/metadata.js");t.postConstruct=function(){return function(e,t,r){var a=new o.Metadata(i.POST_CONSTRUCT,t);if(Reflect.hasOwnMetadata(i.POST_CONSTRUCT,e.constructor))throw new Error(n.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(i.POST_CONSTRUCT,a,e.constructor)}}},"./node_modules/inversify/lib/annotation/tagged.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tagged=void 0;var n=r("./node_modules/inversify/lib/planning/metadata.js"),i=r("./node_modules/inversify/lib/annotation/decorator_utils.js");t.tagged=function(e,t){return function(r,o,a){var s=new n.Metadata(e,t);"number"==typeof a?i.tagParameter(r,o,a,s):i.tagProperty(r,o,s)}}},"./node_modules/inversify/lib/annotation/target_name.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.targetName=void 0;var n=r("./node_modules/inversify/lib/constants/metadata_keys.js"),i=r("./node_modules/inversify/lib/planning/metadata.js"),o=r("./node_modules/inversify/lib/annotation/decorator_utils.js");t.targetName=function(e){return function(t,r,a){var s=new i.Metadata(n.NAME_TAG,e);o.tagParameter(t,r,a,s)}}},"./node_modules/inversify/lib/annotation/unmanaged.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unmanaged=void 0;var n=r("./node_modules/inversify/lib/constants/metadata_keys.js"),i=r("./node_modules/inversify/lib/planning/metadata.js"),o=r("./node_modules/inversify/lib/annotation/decorator_utils.js");t.unmanaged=function(){return function(e,t,r){var a=new i.Metadata(n.UNMANAGED_TAG,!0);o.tagParameter(e,t,r,a)}}},"./node_modules/inversify/lib/bindings/binding.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Binding=void 0;var n=r("./node_modules/inversify/lib/constants/literal_types.js"),i=r("./node_modules/inversify/lib/utils/id.js"),o=function(){function e(e,t){this.id=i.id(),this.activated=!1,this.serviceIdentifier=e,this.scope=t,this.type=n.BindingTypeEnum.Invalid,this.constraint=function(e){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return e.prototype.clone=function(){var t=new e(this.serviceIdentifier,this.scope);return t.activated=t.scope===n.BindingScopeEnum.Singleton&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.factory=this.factory,t.provider=this.provider,t.constraint=this.constraint,t.onActivation=this.onActivation,t.cache=this.cache,t},e}();t.Binding=o},"./node_modules/inversify/lib/bindings/binding_count.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingCount=void 0;t.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}},"./node_modules/inversify/lib/constants/error_msgs.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STACK_OVERFLOW=t.CIRCULAR_DEPENDENCY_IN_FACTORY=t.POST_CONSTRUCT_ERROR=t.MULTIPLE_POST_CONSTRUCT_METHODS=t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=t.ARGUMENTS_LENGTH_MISMATCH=t.INVALID_DECORATOR_OPERATION=t.INVALID_TO_SELF_VALUE=t.INVALID_FUNCTION_BINDING=t.INVALID_MIDDLEWARE_RETURN=t.NO_MORE_SNAPSHOTS_AVAILABLE=t.INVALID_BINDING_TYPE=t.NOT_IMPLEMENTED=t.CIRCULAR_DEPENDENCY=t.UNDEFINED_INJECT_ANNOTATION=t.MISSING_INJECT_ANNOTATION=t.MISSING_INJECTABLE_ANNOTATION=t.NOT_REGISTERED=t.CANNOT_UNBIND=t.AMBIGUOUS_MATCH=t.KEY_NOT_FOUND=t.NULL_ARGUMENT=t.DUPLICATED_METADATA=t.DUPLICATED_INJECTABLE_DECORATOR=void 0,t.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",t.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",t.NULL_ARGUMENT="NULL argument",t.KEY_NOT_FOUND="Key Not Found",t.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",t.CANNOT_UNBIND="Could not unbind serviceIdentifier:",t.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",t.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",t.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";t.UNDEFINED_INJECT_ANNOTATION=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},t.CIRCULAR_DEPENDENCY="Circular dependency found:",t.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",t.INVALID_BINDING_TYPE="Invalid binding type:",t.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",t.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",t.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",t.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",t.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";t.ARGUMENTS_LENGTH_MISMATCH=function(){for(var e=[],t=0;t= than the number of constructor arguments of its base class."},t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",t.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";t.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TargetTypeEnum=t.BindingTypeEnum=t.BindingScopeEnum=void 0;t.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};t.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};t.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}},"./node_modules/inversify/lib/constants/metadata_keys.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NON_CUSTOM_TAG_KEYS=t.POST_CONSTRUCT=t.DESIGN_PARAM_TYPES=t.PARAM_TYPES=t.TAGGED_PROP=t.TAGGED=t.MULTI_INJECT_TAG=t.INJECT_TAG=t.OPTIONAL_TAG=t.UNMANAGED_TAG=t.NAME_TAG=t.NAMED_TAG=void 0,t.NAMED_TAG="named",t.NAME_TAG="name",t.UNMANAGED_TAG="unmanaged",t.OPTIONAL_TAG="optional",t.INJECT_TAG="inject",t.MULTI_INJECT_TAG="multi_inject",t.TAGGED="inversify:tagged",t.TAGGED_PROP="inversify:tagged_props",t.PARAM_TYPES="inversify:paramtypes",t.DESIGN_PARAM_TYPES="design:paramtypes",t.POST_CONSTRUCT="post_construct",t.NON_CUSTOM_TAG_KEYS=[t.INJECT_TAG,t.MULTI_INJECT_TAG,t.NAME_TAG,t.UNMANAGED_TAG,t.NAMED_TAG,t.OPTIONAL_TAG]},"./node_modules/inversify/lib/container/container.js":function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=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++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.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]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncContainerModule=t.ContainerModule=void 0;var n=r("./node_modules/inversify/lib/utils/id.js"),i=function(e){this.id=n.id(),this.registry=e};t.ContainerModule=i;var o=function(e){this.id=n.id(),this.registry=e};t.AsyncContainerModule=o},"./node_modules/inversify/lib/container/container_snapshot.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerSnapshot=void 0;var r=function(){function e(){}return e.of=function(t,r){var n=new e;return n.bindings=t,n.middleware=r,n},e}();t.ContainerSnapshot=r},"./node_modules/inversify/lib/container/lookup.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lookup=void 0;var n=r("./node_modules/inversify/lib/constants/error_msgs.js"),i=function(){function e(){this._map=new Map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(e,t){if(null==e)throw new Error(n.NULL_ARGUMENT);if(null==t)throw new Error(n.NULL_ARGUMENT);var r=this._map.get(e);void 0!==r?(r.push(t),this._map.set(e,r)):this._map.set(e,[t])},e.prototype.get=function(e){if(null==e)throw new Error(n.NULL_ARGUMENT);var t=this._map.get(e);if(void 0!==t)return t;throw new Error(n.KEY_NOT_FOUND)},e.prototype.remove=function(e){if(null==e)throw new Error(n.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(n.KEY_NOT_FOUND)},e.prototype.removeByCondition=function(e){var t=this;this._map.forEach((function(r,n){var i=r.filter((function(t){return!e(t)}));i.length>0?t._map.set(n,i):t._map.delete(n)}))},e.prototype.hasKey=function(e){if(null==e)throw new Error(n.NULL_ARGUMENT);return this._map.has(e)},e.prototype.clone=function(){var t=new e;return this._map.forEach((function(e,r){e.forEach((function(e){return t.add(r,e.clone())}))})),t},e.prototype.traverse=function(e){this._map.forEach((function(t,r){e(r,t)}))},e}();t.Lookup=i},"./node_modules/inversify/lib/inversify.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiBindToService=t.getServiceIdentifierAsString=t.typeConstraint=t.namedConstraint=t.taggedConstraint=t.traverseAncerstors=t.decorate=t.id=t.MetadataReader=t.postConstruct=t.targetName=t.multiInject=t.unmanaged=t.optional=t.LazyServiceIdentifer=t.inject=t.named=t.tagged=t.injectable=t.ContainerModule=t.AsyncContainerModule=t.TargetTypeEnum=t.BindingTypeEnum=t.BindingScopeEnum=t.Container=t.METADATA_KEY=void 0;var n=r("./node_modules/inversify/lib/constants/metadata_keys.js");t.METADATA_KEY=n;var i=r("./node_modules/inversify/lib/container/container.js");Object.defineProperty(t,"Container",{enumerable:!0,get:function(){return i.Container}});var o=r("./node_modules/inversify/lib/constants/literal_types.js");Object.defineProperty(t,"BindingScopeEnum",{enumerable:!0,get:function(){return o.BindingScopeEnum}}),Object.defineProperty(t,"BindingTypeEnum",{enumerable:!0,get:function(){return o.BindingTypeEnum}}),Object.defineProperty(t,"TargetTypeEnum",{enumerable:!0,get:function(){return o.TargetTypeEnum}});var a=r("./node_modules/inversify/lib/container/container_module.js");Object.defineProperty(t,"AsyncContainerModule",{enumerable:!0,get:function(){return a.AsyncContainerModule}}),Object.defineProperty(t,"ContainerModule",{enumerable:!0,get:function(){return a.ContainerModule}});var s=r("./node_modules/inversify/lib/annotation/injectable.js");Object.defineProperty(t,"injectable",{enumerable:!0,get:function(){return s.injectable}});var c=r("./node_modules/inversify/lib/annotation/tagged.js");Object.defineProperty(t,"tagged",{enumerable:!0,get:function(){return c.tagged}});var u=r("./node_modules/inversify/lib/annotation/named.js");Object.defineProperty(t,"named",{enumerable:!0,get:function(){return u.named}});var d=r("./node_modules/inversify/lib/annotation/inject.js");Object.defineProperty(t,"inject",{enumerable:!0,get:function(){return d.inject}}),Object.defineProperty(t,"LazyServiceIdentifer",{enumerable:!0,get:function(){return d.LazyServiceIdentifer}});var l=r("./node_modules/inversify/lib/annotation/optional.js");Object.defineProperty(t,"optional",{enumerable:!0,get:function(){return l.optional}});var p=r("./node_modules/inversify/lib/annotation/unmanaged.js");Object.defineProperty(t,"unmanaged",{enumerable:!0,get:function(){return p.unmanaged}});var f=r("./node_modules/inversify/lib/annotation/multi_inject.js");Object.defineProperty(t,"multiInject",{enumerable:!0,get:function(){return f.multiInject}});var h=r("./node_modules/inversify/lib/annotation/target_name.js");Object.defineProperty(t,"targetName",{enumerable:!0,get:function(){return h.targetName}});var m=r("./node_modules/inversify/lib/annotation/post_construct.js");Object.defineProperty(t,"postConstruct",{enumerable:!0,get:function(){return m.postConstruct}});var _=r("./node_modules/inversify/lib/planning/metadata_reader.js");Object.defineProperty(t,"MetadataReader",{enumerable:!0,get:function(){return _.MetadataReader}});var v=r("./node_modules/inversify/lib/utils/id.js");Object.defineProperty(t,"id",{enumerable:!0,get:function(){return v.id}});var y=r("./node_modules/inversify/lib/annotation/decorator_utils.js");Object.defineProperty(t,"decorate",{enumerable:!0,get:function(){return y.decorate}});var g=r("./node_modules/inversify/lib/syntax/constraint_helpers.js");Object.defineProperty(t,"traverseAncerstors",{enumerable:!0,get:function(){return g.traverseAncerstors}}),Object.defineProperty(t,"taggedConstraint",{enumerable:!0,get:function(){return g.taggedConstraint}}),Object.defineProperty(t,"namedConstraint",{enumerable:!0,get:function(){return g.namedConstraint}}),Object.defineProperty(t,"typeConstraint",{enumerable:!0,get:function(){return g.typeConstraint}});var b=r("./node_modules/inversify/lib/utils/serialization.js");Object.defineProperty(t,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return b.getServiceIdentifierAsString}});var w=r("./node_modules/inversify/lib/utils/binding_utils.js");Object.defineProperty(t,"multiBindToService",{enumerable:!0,get:function(){return w.multiBindToService}})},"./node_modules/inversify/lib/planning/context.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;var n=r("./node_modules/inversify/lib/utils/id.js"),i=function(){function e(e){this.id=n.id(),this.container=e}return e.prototype.addPlan=function(e){this.plan=e},e.prototype.setCurrentRequest=function(e){this.currentRequest=e},e}();t.Context=i},"./node_modules/inversify/lib/planning/metadata.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r("./node_modules/inversify/lib/constants/metadata_keys.js"),i=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===n.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}();t.Metadata=i},"./node_modules/inversify/lib/planning/metadata_reader.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataReader=void 0;var n=r("./node_modules/inversify/lib/constants/metadata_keys.js"),i=function(){function e(){}return e.prototype.getConstructorMetadata=function(e){return{compilerGeneratedMetadata:Reflect.getMetadata(n.PARAM_TYPES,e),userGeneratedMetadata:Reflect.getMetadata(n.TAGGED,e)||{}}},e.prototype.getPropertiesMetadata=function(e){return Reflect.getMetadata(n.TAGGED_PROP,e)||[]},e}();t.MetadataReader=i},"./node_modules/inversify/lib/planning/plan.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Plan=void 0;var r=function(e,t){this.parentContext=e,this.rootRequest=t};t.Plan=r},"./node_modules/inversify/lib/planning/planner.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBindingDictionary=t.createMockRequest=t.plan=void 0;var n=r("./node_modules/inversify/lib/bindings/binding_count.js"),i=r("./node_modules/inversify/lib/constants/error_msgs.js"),o=r("./node_modules/inversify/lib/constants/literal_types.js"),a=r("./node_modules/inversify/lib/constants/metadata_keys.js"),s=r("./node_modules/inversify/lib/utils/exceptions.js"),c=r("./node_modules/inversify/lib/utils/serialization.js"),u=r("./node_modules/inversify/lib/planning/context.js"),d=r("./node_modules/inversify/lib/planning/metadata.js"),l=r("./node_modules/inversify/lib/planning/plan.js"),p=r("./node_modules/inversify/lib/planning/reflection_utils.js"),f=r("./node_modules/inversify/lib/planning/request.js"),h=r("./node_modules/inversify/lib/planning/target.js");function m(e){return e._bindingDictionary}function _(e,t,r,o,a){var s=v(r.container,a.serviceIdentifier),u=[];return s.length===n.BindingCount.NoBindingsAvailable&&r.container.options.autoBindInjectable&&"function"==typeof a.serviceIdentifier&&e.getConstructorMetadata(a.serviceIdentifier).compilerGeneratedMetadata&&(r.container.bind(a.serviceIdentifier).toSelf(),s=v(r.container,a.serviceIdentifier)),u=t?s:s.filter((function(e){var t=new f.Request(e.serviceIdentifier,r,o,e,a);return e.constraint(t)})),function(e,t,r,o){switch(t.length){case n.BindingCount.NoBindingsAvailable:if(r.isOptional())return t;var a=c.getServiceIdentifierAsString(e),s=i.NOT_REGISTERED;throw s+=c.listMetadataForTarget(a,r),s+=c.listRegisteredBindingsForServiceIdentifier(o,a,v),new Error(s);case n.BindingCount.OnlyOneBindingAvailable:if(!r.isArray())return t;case n.BindingCount.MultipleBindingsAvailable:default:if(r.isArray())return t;a=c.getServiceIdentifierAsString(e),s=i.AMBIGUOUS_MATCH+" "+a;throw s+=c.listRegisteredBindingsForServiceIdentifier(o,a,v),new Error(s)}}(a.serviceIdentifier,u,a,r.container),u}function v(e,t){var r=[],n=m(e);return n.hasKey(t)?r=n.get(t):null!==e.parent&&(r=v(e.parent,t)),r}t.getBindingDictionary=m,t.plan=function(e,t,r,n,m,v,y,g){void 0===g&&(g=!1);var b=new u.Context(t),w=function(e,t,r,n,i,o){var s=e?a.MULTI_INJECT_TAG:a.INJECT_TAG,c=new d.Metadata(s,r),u=new h.Target(t,n,r,c);if(void 0!==i){var l=new d.Metadata(i,o);u.metadata.push(l)}return u}(r,n,m,"",v,y);try{return function e(t,r,n,a,s,c){var u,d;if(null===s){u=_(t,r,a,null,c),d=new f.Request(n,a,null,u,c);var h=new l.Plan(a,d);a.addPlan(h)}else u=_(t,r,a,s,c),d=s.addChildRequest(c.serviceIdentifier,u,c);u.forEach((function(r){var n=null;if(c.isArray())n=d.addChildRequest(r.serviceIdentifier,r,c);else{if(r.cache)return;n=d}if(r.type===o.BindingTypeEnum.Instance&&null!==r.implementationType){var s=p.getDependencies(t,r.implementationType);if(!a.container.options.skipBaseClassChecks){var u=p.getBaseClassDependencyCount(t,r.implementationType);if(s.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryableString=void 0;var r=function(){function e(e){this.str=e}return e.prototype.startsWith=function(e){return 0===this.str.indexOf(e)},e.prototype.endsWith=function(e){var t,r=e.split("").reverse().join("");return t=this.str.split("").reverse().join(""),this.startsWith.call({str:t},r)},e.prototype.contains=function(e){return-1!==this.str.indexOf(e)},e.prototype.equals=function(e){return this.str===e},e.prototype.value=function(){return this.str},e}();t.QueryableString=r},"./node_modules/inversify/lib/planning/reflection_utils.js":function(e,t,r){"use strict";var n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r0,_=h.length>r.length,v=function(e,t,r,n,i){for(var o=[],a=0;a0?u:e(t,n)}return 0}},"./node_modules/inversify/lib/planning/request.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Request=void 0;var n=r("./node_modules/inversify/lib/utils/id.js"),i=function(){function e(e,t,r,i,o){this.id=n.id(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=r,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=null===r?new Map:null}return e.prototype.addChildRequest=function(t,r,n){var i=new e(t,this.parentContext,this,r,n);return this.childRequests.push(i),i},e}();t.Request=i},"./node_modules/inversify/lib/planning/target.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Target=void 0;var n=r("./node_modules/inversify/lib/constants/metadata_keys.js"),i=r("./node_modules/inversify/lib/utils/id.js"),o=r("./node_modules/inversify/lib/planning/metadata.js"),a=r("./node_modules/inversify/lib/planning/queryable_string.js"),s=function(){function e(e,t,r,s){this.id=i.id(),this.type=e,this.serviceIdentifier=r,this.name=new a.QueryableString(t||""),this.metadata=new Array;var c=null;"string"==typeof s?c=new o.Metadata(n.NAMED_TAG,s):s instanceof o.Metadata&&(c=s),null!==c&&this.metadata.push(c)}return e.prototype.hasTag=function(e){for(var t=0,r=this.metadata;t0){var d=t.filter((function(e){return null!==e.target&&e.target.type===o.TargetTypeEnum.ConstructorArgument})).map(r);c=d,u=function(e,t,r){var n=t.filter((function(e){return null!==e.target&&e.target.type===o.TargetTypeEnum.ClassProperty})),i=n.map(r);return n.forEach((function(t,r){var n;n=t.target.name.value();var o=i[r];e[n]=o})),e}(u=new((s=e).bind.apply(s,n([void 0],c))),t,r)}else u=new e;return function(e,t){if(Reflect.hasMetadata(a.POST_CONSTRUCT,e)){var r=Reflect.getMetadata(a.POST_CONSTRUCT,e);try{t[r.value]()}catch(t){throw new Error(i.POST_CONSTRUCT_ERROR(e.name,t.message))}}}(e,u),u}},"./node_modules/inversify/lib/resolution/resolver.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolve=void 0;var n=r("./node_modules/inversify/lib/constants/error_msgs.js"),i=r("./node_modules/inversify/lib/constants/literal_types.js"),o=r("./node_modules/inversify/lib/utils/exceptions.js"),a=r("./node_modules/inversify/lib/utils/serialization.js"),s=r("./node_modules/inversify/lib/resolution/instantiation.js"),c=function(e,t,r){try{return r()}catch(r){throw o.isStackOverflowExeption(r)?new Error(n.CIRCULAR_DEPENDENCY_IN_FACTORY(e,t.toString())):r}},u=function(e){return function(t){t.parentContext.setCurrentRequest(t);var r=t.bindings,o=t.childRequests,d=t.target&&t.target.isArray(),l=!(t.parentRequest&&t.parentRequest.target&&t.target&&t.parentRequest.target.matchesArray(t.target.serviceIdentifier));if(d&&l)return o.map((function(t){return u(e)(t)}));var p=null;if(!t.target.isOptional()||0!==r.length){var f=r[0],h=f.scope===i.BindingScopeEnum.Singleton,m=f.scope===i.BindingScopeEnum.Request;if(h&&f.activated)return f.cache;if(m&&null!==e&&e.has(f.id))return e.get(f.id);if(f.type===i.BindingTypeEnum.ConstantValue)p=f.cache,f.activated=!0;else if(f.type===i.BindingTypeEnum.Function)p=f.cache,f.activated=!0;else if(f.type===i.BindingTypeEnum.Constructor)p=f.implementationType;else if(f.type===i.BindingTypeEnum.DynamicValue&&null!==f.dynamicValue)p=c("toDynamicValue",f.serviceIdentifier,(function(){return f.dynamicValue(t.parentContext)}));else if(f.type===i.BindingTypeEnum.Factory&&null!==f.factory)p=c("toFactory",f.serviceIdentifier,(function(){return f.factory(t.parentContext)}));else if(f.type===i.BindingTypeEnum.Provider&&null!==f.provider)p=c("toProvider",f.serviceIdentifier,(function(){return f.provider(t.parentContext)}));else{if(f.type!==i.BindingTypeEnum.Instance||null===f.implementationType){var _=a.getServiceIdentifierAsString(t.serviceIdentifier);throw new Error(n.INVALID_BINDING_TYPE+" "+_)}p=s.resolveInstance(f.implementationType,o,u(e))}return"function"==typeof f.onActivation&&(p=f.onActivation(t.parentContext,p)),h&&(f.cache=p,f.activated=!0),m&&null!==e&&!e.has(f.id)&&e.set(f.id,p),p}}};t.resolve=function(e){return u(e.plan.rootRequest.requestScope)(e.plan.rootRequest)}},"./node_modules/inversify/lib/syntax/binding_in_syntax.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingInSyntax=void 0;var n=r("./node_modules/inversify/lib/constants/literal_types.js"),i=r("./node_modules/inversify/lib/syntax/binding_when_on_syntax.js"),o=function(){function e(e){this._binding=e}return e.prototype.inRequestScope=function(){return this._binding.scope=n.BindingScopeEnum.Request,new i.BindingWhenOnSyntax(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=n.BindingScopeEnum.Singleton,new i.BindingWhenOnSyntax(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=n.BindingScopeEnum.Transient,new i.BindingWhenOnSyntax(this._binding)},e}();t.BindingInSyntax=o},"./node_modules/inversify/lib/syntax/binding_in_when_on_syntax.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingInWhenOnSyntax=void 0;var n=r("./node_modules/inversify/lib/syntax/binding_in_syntax.js"),i=r("./node_modules/inversify/lib/syntax/binding_on_syntax.js"),o=r("./node_modules/inversify/lib/syntax/binding_when_syntax.js"),a=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new o.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new i.BindingOnSyntax(this._binding),this._bindingInSyntax=new n.BindingInSyntax(e)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();t.BindingInWhenOnSyntax=a},"./node_modules/inversify/lib/syntax/binding_on_syntax.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingOnSyntax=void 0;var n=r("./node_modules/inversify/lib/syntax/binding_when_syntax.js"),i=function(){function e(e){this._binding=e}return e.prototype.onActivation=function(e){return this._binding.onActivation=e,new n.BindingWhenSyntax(this._binding)},e}();t.BindingOnSyntax=i},"./node_modules/inversify/lib/syntax/binding_to_syntax.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingToSyntax=void 0;var n=r("./node_modules/inversify/lib/constants/error_msgs.js"),i=r("./node_modules/inversify/lib/constants/literal_types.js"),o=r("./node_modules/inversify/lib/syntax/binding_in_when_on_syntax.js"),a=r("./node_modules/inversify/lib/syntax/binding_when_on_syntax.js"),s=function(){function e(e){this._binding=e}return e.prototype.to=function(e){return this._binding.type=i.BindingTypeEnum.Instance,this._binding.implementationType=e,new o.BindingInWhenOnSyntax(this._binding)},e.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+n.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},e.prototype.toConstantValue=function(e){return this._binding.type=i.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},e.prototype.toDynamicValue=function(e){return this._binding.type=i.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new o.BindingInWhenOnSyntax(this._binding)},e.prototype.toConstructor=function(e){return this._binding.type=i.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},e.prototype.toFactory=function(e){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},e.prototype.toFunction=function(e){if("function"!=typeof e)throw new Error(n.INVALID_FUNCTION_BINDING);var t=this.toConstantValue(e);return this._binding.type=i.BindingTypeEnum.Function,this._binding.scope=i.BindingScopeEnum.Singleton,t},e.prototype.toAutoFactory=function(e){return this._binding.type=i.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(){return t.container.get(e)}},this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},e.prototype.toProvider=function(e){return this._binding.type=i.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=i.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},e.prototype.toService=function(e){this.toDynamicValue((function(t){return t.container.get(e)}))},e}();t.BindingToSyntax=s},"./node_modules/inversify/lib/syntax/binding_when_on_syntax.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingWhenOnSyntax=void 0;var n=r("./node_modules/inversify/lib/syntax/binding_on_syntax.js"),i=r("./node_modules/inversify/lib/syntax/binding_when_syntax.js"),o=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new i.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new n.BindingOnSyntax(this._binding)}return e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();t.BindingWhenOnSyntax=o},"./node_modules/inversify/lib/syntax/binding_when_syntax.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingWhenSyntax=void 0;var n=r("./node_modules/inversify/lib/syntax/binding_on_syntax.js"),i=r("./node_modules/inversify/lib/syntax/constraint_helpers.js"),o=function(){function e(e){this._binding=e}return e.prototype.when=function(e){return this._binding.constraint=e,new n.BindingOnSyntax(this._binding)},e.prototype.whenTargetNamed=function(e){return this._binding.constraint=i.namedConstraint(e),new n.BindingOnSyntax(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){return null!==e.target&&!e.target.isNamed()&&!e.target.isTagged()},new n.BindingOnSyntax(this._binding)},e.prototype.whenTargetTagged=function(e,t){return this._binding.constraint=i.taggedConstraint(e)(t),new n.BindingOnSyntax(this._binding)},e.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return i.typeConstraint(e)(t.parentRequest)},new n.BindingOnSyntax(this._binding)},e.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return i.namedConstraint(e)(t.parentRequest)},new n.BindingOnSyntax(this._binding)},e.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(r){return i.taggedConstraint(e)(t)(r.parentRequest)},new n.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,i.typeConstraint(e))},new n.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,i.typeConstraint(e))},new n.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,i.namedConstraint(e))},new n.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,i.namedConstraint(e))},new n.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(r){return i.traverseAncerstors(r,i.taggedConstraint(e)(t))},new n.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(r){return!i.traverseAncerstors(r,i.taggedConstraint(e)(t))},new n.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return i.traverseAncerstors(t,e)},new n.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!i.traverseAncerstors(t,e)},new n.BindingOnSyntax(this._binding)},e}();t.BindingWhenSyntax=o},"./node_modules/inversify/lib/syntax/constraint_helpers.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typeConstraint=t.namedConstraint=t.taggedConstraint=t.traverseAncerstors=void 0;var n=r("./node_modules/inversify/lib/constants/metadata_keys.js"),i=r("./node_modules/inversify/lib/planning/metadata.js"),o=function(e,t){var r=e.parentRequest;return null!==r&&(!!t(r)||o(r,t))};t.traverseAncerstors=o;var a=function(e){return function(t){var r=function(r){return null!==r&&null!==r.target&&r.target.matchesTag(e)(t)};return r.metaData=new i.Metadata(e,t),r}};t.taggedConstraint=a;var s=a(n.NAMED_TAG);t.namedConstraint=s;t.typeConstraint=function(e){return function(t){var r=null;if(null!==t){if(r=t.bindings[0],"string"==typeof e)return r.serviceIdentifier===e;var n=t.bindings[0].implementationType;return e===n}return!1}}},"./node_modules/inversify/lib/utils/binding_utils.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiBindToService=void 0;t.multiBindToService=function(e){return function(t){return function(){for(var r=[],n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStackOverflowExeption=void 0;var n=r("./node_modules/inversify/lib/constants/error_msgs.js");t.isStackOverflowExeption=function(e){return e instanceof RangeError||e.message===n.STACK_OVERFLOW}},"./node_modules/inversify/lib/utils/id.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=void 0;var r=0;t.id=function(){return r++}},"./node_modules/inversify/lib/utils/serialization.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.circularDependencyToException=t.listMetadataForTarget=t.listRegisteredBindingsForServiceIdentifier=t.getServiceIdentifierAsString=t.getFunctionName=void 0;var n=r("./node_modules/inversify/lib/constants/error_msgs.js");function i(e){return"function"==typeof e?e.name:"symbol"==typeof e?e.toString():e}function o(e){if(e.name)return e.name;var t=e.toString(),r=t.match(/^function\s*([^\s(]+)/);return r?r[1]:"Anonymous function: "+t}t.getServiceIdentifierAsString=i,t.listRegisteredBindingsForServiceIdentifier=function(e,t,r){var n="",i=r(e,t);return 0!==i.length&&(n="\nRegistered bindings:",i.forEach((function(e){var t="Object";null!==e.implementationType&&(t=o(e.implementationType)),n=n+"\n "+t,e.constraint.metaData&&(n=n+" - "+e.constraint.metaData)}))),n},t.circularDependencyToException=function e(t){t.childRequests.forEach((function(t){if(function e(t,r){return null!==t.parentRequest&&(t.parentRequest.serviceIdentifier===r||e(t.parentRequest,r))}(t,t.serviceIdentifier)){var r=function(e){return function e(t,r){void 0===r&&(r=[]);var n=i(t.serviceIdentifier);return r.push(n),null!==t.parentRequest?e(t.parentRequest,r):r}(e).reverse().join(" --\x3e ")}(t);throw new Error(n.CIRCULAR_DEPENDENCY+" "+r)}e(t)}))},t.listMetadataForTarget=function(e,t){if(t.isTagged()||t.isNamed()){var r="",n=t.getNamedTag(),i=t.getCustomTags();return null!==n&&(r+=n.toString()+"\n"),null!==i&&i.forEach((function(e){r+=e.toString()+"\n"}))," "+e+"\n "+e+" - "+r}return" "+e},t.getFunctionName=o},"./node_modules/io-ts-reporters/target/src/index.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reporter=t.formatValidationErrors=t.formatValidationError=t.TYPE_MAX_LEN=void 0;var n=r("./node_modules/fp-ts/lib/Array.js"),i=r("./node_modules/fp-ts/lib/Either.js"),o=r("./node_modules/fp-ts/lib/NonEmptyArray.js"),a=r("./node_modules/fp-ts/lib/Option.js"),s=r("./node_modules/fp-ts/lib/Record.js"),c=r("./node_modules/fp-ts/lib/pipeable.js"),u=r("./node_modules/io-ts/es6/index.js"),d=r("./node_modules/io-ts-reporters/target/src/utils.js"),l=function(e){return e.type instanceof u.UnionType},p=function(e){return void 0===e?"undefined":JSON.stringify(e)},f=function(e){return e.map((function(e){return e.key})).filter(Boolean).join(".")},h=function(e){return n.last(e.context)},m=function(e){return e.context};t.TYPE_MAX_LEN=160;var _=function(e,r){void 0===r&&(r={});var n=r.truncateLongTypes;return(void 0===n||n)&&e.length>t.TYPE_MAX_LEN?e.slice(0,t.TYPE_MAX_LEN-3)+"...":e},v=function(e){return c.pipe(e,n.findIndex(l),a.chain((function(t){return n.lookup(t+1,e)})))},y=function(e,t,r){var i=c.pipe(t,n.map(m),n.map(v),n.compact),o=c.pipe(i,n.head,a.map((function(e){return e.actual})),a.getOrElse((function(){}))),s=i.map((function(e){return e.type.name}));return s.length>0?a.some(function(e,t,r,n){return["Expecting one of:\n",e.map((function(e){return" "+_(e,n)})).join("\n"),""===t?"\n":"\nat "+t+" ","but instead got: "+p(r)].filter(Boolean).join("")}(s,e,o,r)):a.none},g=function(e,t,r){return c.pipe(t,h,a.map((function(n){return function(e,t,r,n){return["Expecting "+_(e,n),""===t?"":"at "+t,"but instead got: "+p(r.value),r.message?"("+r.message+")":""].filter(Boolean).join(" ")}(n.type.name,e,t,r)})))},b=o.groupBy((function(e){return c.pipe(e.context,d.takeUntil(l),f)}));t.formatValidationError=function(e,t){return g(f(e.context),e,t)},t.formatValidationErrors=function(e,t){return c.pipe(e,b,s.mapWithIndex((function(e,r){return function(e,t,r){return o.tail(t).length>0?y(e,t,r):g(e,o.head(t),r)}(e,r,t)})),s.compact,s.toArray,n.map((function(e){e[0];return e[1]})))},t.reporter=function(e,r){return c.pipe(e,i.mapLeft((function(e){return t.formatValidationErrors(e,r)})),i.fold((function(e){return e}),(function(){return[]})))};var w={report:t.reporter};t.default=w},"./node_modules/io-ts-reporters/target/src/utils.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0,t.takeUntil=function(e){return function(t){for(var r=[],n=0;n{"use strict";r.r(t),r.d(t,{AnyArrayType:()=>X,AnyDictionaryType:()=>Z,AnyType:()=>Ie,Array:()=>Q,ArrayType:()=>de,BigIntType:()=>K,BooleanType:()=>$,Dictionary:()=>ze,DictionaryType:()=>_e,ExactType:()=>Te,Function:()=>De,FunctionType:()=>Ae,Int:()=>se,Integer:()=>Ne,InterfaceType:()=>pe,IntersectionType:()=>be,KeyofType:()=>ne,LiteralType:()=>te,NeverType:()=>Ce,NullType:()=>I,NumberType:()=>W,ObjectType:()=>qe,PartialType:()=>he,ReadonlyArrayType:()=>Ee,ReadonlyType:()=>ke,RecursiveType:()=>ce,RefinementType:()=>oe,StrictType:()=>Ke,StringType:()=>z,TaggedUnionType:()=>Ue,TupleType:()=>Se,Type:()=>l,UndefinedType:()=>B,UnionType:()=>ye,UnknownArray:()=>Q,UnknownRecord:()=>ee,UnknownType:()=>F,VoidType:()=>U,alias:()=>$e,any:()=>Me,appendContext:()=>m,array:()=>le,bigint:()=>Y,boolean:()=>J,brand:()=>ae,clean:()=>Ye,dictionary:()=>He,emptyTags:()=>E,exact:()=>Pe,failure:()=>u,failures:()=>c,getContextEntry:()=>h,getDefaultContext:()=>Ve,getDomainKeys:()=>S,getFunctionName:()=>f,getIndex:()=>L,getTags:()=>C,getValidationError:()=>Fe,identity:()=>p,interface:()=>fe,intersection:()=>we,keyof:()=>ie,literal:()=>re,mergeAll:()=>k,never:()=>Le,null:()=>M,nullType:()=>M,number:()=>H,object:()=>We,partial:()=>me,readonly:()=>je,readonlyArray:()=>Re,record:()=>ve,recursion:()=>ue,refinement:()=>Be,strict:()=>Oe,string:()=>q,success:()=>d,taggedUnion:()=>Ge,tuple:()=>xe,type:()=>fe,undefined:()=>N,union:()=>ge,unknown:()=>V,void:()=>G,voidType:()=>G});var n,i=r("./node_modules/fp-ts/es6/Either.js"),o=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r")}function h(e,t){return{key:e,type:t}}function m(e,t,r,n){for(var i=e.length,o=Array(i+1),a=0;a")}function S(e){var t;if(T(e)){var r=e.value;if(q.is(r))return(t={})[r]=null,t}else{if("KeyofType"===e._tag)return e.keys;if(A(e)){var n=e.types.map((function(e){return S(e)}));return n.some(N.is)?void 0:Object.assign.apply(Object,s([{}],n,!1))}}}function x(e){return"("+e.map((function(e){return e.name})).join(" | ")+")"}function k(e,t){for(var r=!0,n=!0,i=!ee.is(e),o=0,a=t;o0)){r=E;break}r[n]=i}else r[n]=t[n];return r}(e,C(t))}),E);if(A(e))return e.types.slice(1).reduce((function(e,t){return function(e,t){if(e===E||t===E)return E;var r=E;for(var n in e){if(v.call(t,n))0===R(e[n],t[n]).length&&(r===E&&(r={}),r[n]=e[n].concat(t[n]))}return r}(e,C(t))}),C(e.types[0]));if(function(e){return"RecursiveType"===e._tag}(e)){D.push(e);var i=C(e.type);return D.pop(),i}return E}function L(e){var t=C(e[0]),r=Object.keys(t),n=e.length,i=function(r){for(var i=t[r].slice(),o=[t[r]],a=1;a")),new de(t,(function(t){return Q.is(t)&&t.every(e.is)}),(function(t,r){var n=Q.validate(t,r);if((0,i.OC)(n))return n;for(var o=n.right,a=o.length,s=o,u=[],l=0;l0?c(u):d(s)}),e.encode===p?p:function(t){return t.map(e.encode)},e)}var pe=function(e){function t(t,r,n,i,o){var a=e.call(this,t,r,n,i)||this;return a.props=o,a._tag="InterfaceType",a}return o(t,e),t}(l);function fe(e,t){void 0===t&&(t=b(e));var r=Object.keys(e),n=r.map((function(t){return e[t]})),o=r.length;return new pe(t,(function(e){if(ee.is(e)){for(var t=0;t0?c(p):d(l)}),g(n)?p:function(e){for(var t=a({},e),i=0;i0?c(p):d(l)}),g(n)?p:function(e){for(var t=a({},e),i=0;i0?c(l):d(p||Object.keys(s).length!==o?u:s)}),r.encode===p?p:function(t){for(var n={},i=0;i0?c(a):d(p?o:r)}return O(t)&&Array.isArray(r)?d(r):u(r,n)}),e.encode===p&&t.encode===p?p:function(r){for(var n={},i=Object.keys(r),o=i.length,a=0;a0){var n=r[0],o=r[1],a=o.length,s=function(e){for(var t=0;t0?c(a):d(k(t,o))},0===e.length?p:function(t){return k(t,e.map((function(e){return e.encode(t)})))},e)}var Se=function(e){function t(t,r,n,i,o){var a=e.call(this,t,r,n,i)||this;return a.types=o,a._tag="TupleType",a}return o(t,e),t}(l);function xe(e,t){void 0===t&&(t="[".concat(e.map((function(e){return e.name})).join(", "),"]"));var r=e.length;return new Se(t,(function(t){return Q.is(t)&&t.length===r&&e.every((function(e,r){return e.is(t[r])}))}),(function(t,n){var o=Q.validate(t,n);if((0,i.OC)(o))return o;for(var a=o.right,s=a.length>r?a.slice(0,r):a,u=[],l=0;l0?c(u):d(s)}),g(e)?p:function(t){return e.map((function(e,r){return e.encode(t[r])}))},e)}var ke=function(e){function t(t,r,n,i,o){var a=e.call(this,t,r,n,i)||this;return a.type=o,a._tag="ReadonlyType",a}return o(t,e),t}(l);function je(e,t){return void 0===t&&(t="Readonly<".concat(e.name,">")),new ke(t,e.is,e.validate,e.encode,e)}var Ee=function(e){function t(t,r,n,i,o){var a=e.call(this,t,r,n,i)||this;return a.type=o,a._tag="ReadonlyArrayType",a}return o(t,e),t}(l);function Re(e,t){void 0===t&&(t="ReadonlyArray<".concat(e.name,">"));var r=le(e);return new Ee(t,r.is,r.validate,r.encode,e)}var Oe=function(e,t){return Pe(fe(e),t)},Te=function(e){function t(t,r,n,i,o){var a=e.call(this,t,r,n,i)||this;return a.type=o,a._tag="ExactType",a}return o(t,e),t}(l);function Pe(e,t){void 0===t&&(t=function(e){return P(e)?"{| ".concat(y(e.props)," |}"):function(e){return"PartialType"===e._tag}(e)?w("{| ".concat(y(e.props)," |}")):"Exact<".concat(e.name,">")}(e));var r=function e(t){switch(t._tag){case"RefinementType":case"ReadonlyType":return e(t.type);case"InterfaceType":case"StrictType":case"PartialType":return t.props;case"IntersectionType":return t.types.reduce((function(t,r){return Object.assign(t,e(r))}),{})}}(e);return new Te(t,e.is,(function(t,n){var o=ee.validate(t,n);if((0,i.OC)(o))return o;var a=e.validate(t,n);return(0,i.OC)(a)?a:(0,i.pG)(j(a.right,r))}),(function(t){return e.encode(j(t,r))}),e)}var Ae=function(e){function t(){var t=e.call(this,"Function",(function(e){return"function"==typeof e}),(function(e,r){return t.is(e)?d(e):u(e,r)}),p)||this;return t._tag="FunctionType",t}return o(t,e),t}(l),De=new Ae,Ce=function(e){function t(){var t=e.call(this,"never",(function(e){return!1}),(function(e,t){return u(e,t)}),(function(){throw new Error("cannot encode never")}))||this;return t._tag="NeverType",t}return o(t,e),t}(l),Le=new Ce,Ie=function(e){function t(){var t=e.call(this,"any",(function(e){return!0}),d,p)||this;return t._tag="AnyType",t}return o(t,e),t}(l),Me=new Ie;function Be(e,t,r){return void 0===r&&(r="(".concat(e.name," | ").concat(f(t),")")),new oe(r,(function(r){return e.is(r)&&t(r)}),(function(r,n){var o=e.validate(r,n);if((0,i.OC)(o))return o;var a=o.right;return t(a)?d(a):u(a,n)}),e.encode,e,t)}var Ne=Be(H,Number.isInteger,"Integer"),Ue=function(e){function t(t,r,n,i,o,a){var s=e.call(this,t,r,n,i,o)||this;return s.tag=a,s}return o(t,e),t}(ye),Ge=function(e,t,r){void 0===r&&(r=x(t));var n=ge(t,r);return n instanceof Ue?n:(console.warn("[io-ts] Cannot build a tagged union for ".concat(r,", returning a de-optimized union")),new Ue(r,n.is,n.validate,n.encode,t,e))},Fe=function(e,t){return{value:e,context:t}},Ve=function(e){return[{key:"",type:e}]},ze=ee,qe=function(e){function t(){var t=e.call(this,"object",(function(e){return null!==e&&"object"==typeof e}),(function(e,r){return t.is(e)?d(e):u(e,r)}),p)||this;return t._tag="ObjectType",t}return o(t,e),t}(l),We=new qe,He=ve,Ke=function(e){function t(t,r,n,i,o){var a=e.call(this,t,r,n,i)||this;return a.props=o,a._tag="StrictType",a}return o(t,e),t}(l);function Ye(e){return e}function $e(e){return function(){return e}}},"./node_modules/is-in-browser/dist/module.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var 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};const i="object"===("undefined"==typeof window?"undefined":n(window))&&"object"===("undefined"==typeof document?"undefined":n(document))&&9===document.nodeType},"./node_modules/isarray/index.js":e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},"./node_modules/isomorphic-ws/browser.js":(e,t,r)=>{var n=null;"undefined"!=typeof WebSocket?n=WebSocket:"undefined"!=typeof MozWebSocket?n=MozWebSocket:void 0!==r.g?n=r.g.WebSocket||r.g.MozWebSocket:"undefined"!=typeof window?n=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(n=self.WebSocket||self.MozWebSocket),e.exports=n},"./node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r("./node_modules/hyphenate-style-name/index.js");function i(e){var t={};for(var r in e){t[0===r.indexOf("--")?r:(0,n.A)(r)]=e[r]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(i):t.fallbacks=i(e.fallbacks)),t}const o=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r("./node_modules/jss/dist/jss.esm.js"),i=n.hasCSSTOMSupport&&CSS?CSS.px:"px",o=n.hasCSSTOMSupport&&CSS?CSS.ms:"ms",a=n.hasCSSTOMSupport&&CSS?CSS.percent:"%";function s(e){var t=/(-[a-z])/g,r=function(e){return e[1].toUpperCase()},n={};for(var i in e)n[i]=e[i],n[i.replace(t,r)]=e[i];return n}var c=s({"animation-delay":o,"animation-duration":o,"background-position":i,"background-position-x":i,"background-position-y":i,"background-size":i,border:i,"border-bottom":i,"border-bottom-left-radius":i,"border-bottom-right-radius":i,"border-bottom-width":i,"border-left":i,"border-left-width":i,"border-radius":i,"border-right":i,"border-right-width":i,"border-top":i,"border-top-left-radius":i,"border-top-right-radius":i,"border-top-width":i,"border-width":i,"border-block":i,"border-block-end":i,"border-block-end-width":i,"border-block-start":i,"border-block-start-width":i,"border-block-width":i,"border-inline":i,"border-inline-end":i,"border-inline-end-width":i,"border-inline-start":i,"border-inline-start-width":i,"border-inline-width":i,"border-start-start-radius":i,"border-start-end-radius":i,"border-end-start-radius":i,"border-end-end-radius":i,margin:i,"margin-bottom":i,"margin-left":i,"margin-right":i,"margin-top":i,"margin-block":i,"margin-block-end":i,"margin-block-start":i,"margin-inline":i,"margin-inline-end":i,"margin-inline-start":i,padding:i,"padding-bottom":i,"padding-left":i,"padding-right":i,"padding-top":i,"padding-block":i,"padding-block-end":i,"padding-block-start":i,"padding-inline":i,"padding-inline-end":i,"padding-inline-start":i,"mask-position-x":i,"mask-position-y":i,"mask-size":i,height:i,width:i,"min-height":i,"max-height":i,"min-width":i,"max-width":i,bottom:i,left:i,top:i,right:i,inset:i,"inset-block":i,"inset-block-end":i,"inset-block-start":i,"inset-inline":i,"inset-inline-end":i,"inset-inline-start":i,"box-shadow":i,"text-shadow":i,"column-gap":i,"column-rule":i,"column-rule-width":i,"column-width":i,"font-size":i,"font-size-delta":i,"letter-spacing":i,"text-decoration-thickness":i,"text-indent":i,"text-stroke":i,"text-stroke-width":i,"word-spacing":i,motion:i,"motion-offset":i,outline:i,"outline-offset":i,"outline-width":i,perspective:i,"perspective-origin-x":a,"perspective-origin-y":a,"transform-origin":a,"transform-origin-x":a,"transform-origin-y":a,"transform-origin-z":a,"transition-delay":o,"transition-duration":o,"vertical-align":i,"flex-basis":i,"shape-margin":i,size:i,gap:i,grid:i,"grid-gap":i,"row-gap":i,"grid-row-gap":i,"grid-column-gap":i,"grid-template-rows":i,"grid-template-columns":i,"grid-auto-rows":i,"grid-auto-columns":i,"box-shadow-x":i,"box-shadow-y":i,"box-shadow-blur":i,"box-shadow-spread":i,"font-line-height":i,"text-shadow-x":i,"text-shadow-y":i,"text-shadow-blur":i});function u(e,t,r){if(null==t)return t;if(Array.isArray(t))for(var n=0;n{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r("./node_modules/@babel/runtime/helpers/esm/extends.js"),i=/\s*,\s*/g,o=/&/g,a=/\$([\w-]+)/g;const s=function(){function e(e,t){return function(r,n){var i=e.getRule(n)||t&&t.getRule(n);return i?i.selector:n}}function t(e,t){for(var r=t.split(i),n=e.split(i),a="",s=0;s{"use strict";r.d(t,{A:()=>G});var n=r("./node_modules/jss/dist/jss.esm.js"),i=Date.now(),o="fnValues"+i,a="fnStyle"+ ++i;const s=function(){return{onCreateRule:function(e,t,r){if("function"!=typeof t)return null;var i=(0,n.createRule)(e,{},r);return i[a]=t,i},onProcessStyle:function(e,t){if(o in t||a in t)return e;var r={};for(var n in e){var i=e[n];"function"==typeof i&&(delete e[n],r[n]=i)}return t[o]=r,e},onUpdate:function(e,t,r,n){var i=t,s=i[a];s&&(i.style=s(e)||{});var c=i[o];if(c)for(var u in c)i.prop(u,c[u](e),n)}}};var c=r("./node_modules/symbol-observable/es/index.js"),u=function(e){return e&&e[c.A]&&e===e[c.A]()};const d=function(e){return{onCreateRule:function(t,r,i){if(!u(r))return null;var o=r,a=(0,n.createRule)(t,{},i);return o.subscribe((function(t){for(var r in t)a.prop(r,t[r],e)})),a},onProcessRule:function(t){if(!t||"style"===t.type){var r=t,n=r.style,i=function(t){var i=n[t];if(!u(i))return"continue";delete n[t],i.subscribe({next:function(n){r.prop(t,n,e)}})};for(var o in n)i(o)}}}};var l=/;\n/,p=function(e){"string"==typeof e.style&&(e.style=function(e){for(var t={},r=e.split(l),n=0;n-1)return e(t,r.split(" "));var i=t.options.parent;if("$"===r[0]){var o=i.getRule(r.substr(1));return!!o&&(o!==t&&(i.classes[t.key]+=" "+i.classes[o.key],!0))}return i.classes[t.key]+=" "+r,!0}(t,e.composes),delete e.composes,e):e}}};var R=r("./node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js"),O=r("./node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js"),T={"background-size":!0,"background-position":!0,border:!0,"border-bottom":!0,"border-left":!0,"border-top":!0,"border-right":!0,"border-radius":!0,"border-image":!0,"border-width":!0,"border-style":!0,"border-color":!0,"box-shadow":!0,flex:!0,margin:!0,padding:!0,outline:!0,"transform-origin":!0,transform:!0,transition:!0},P={position:!0,size:!0},A={padding:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0},background:{attachment:null,color:null,image:null,position:null,repeat:null},border:{width:null,style:null,color:null},"border-top":{width:null,style:null,color:null},"border-right":{width:null,style:null,color:null},"border-bottom":{width:null,style:null,color:null},"border-left":{width:null,style:null,color:null},outline:{width:null,style:null,color:null},"list-style":{type:null,position:null,image:null},transition:{property:null,duration:null,"timing-function":null,timingFunction:null,delay:null},animation:{name:null,duration:null,"timing-function":null,timingFunction:null,delay:null,"iteration-count":null,iterationCount:null,direction:null,"fill-mode":null,fillMode:null,"play-state":null,playState:null},"box-shadow":{x:0,y:0,blur:0,spread:0,color:null,inset:null},"text-shadow":{x:0,y:0,blur:null,color:null}},D={border:{radius:"border-radius",image:"border-image",width:"border-width",style:"border-style",color:"border-color"},"border-bottom":{width:"border-bottom-width",style:"border-bottom-style",color:"border-bottom-color"},"border-top":{width:"border-top-width",style:"border-top-style",color:"border-top-color"},"border-left":{width:"border-left-width",style:"border-left-style",color:"border-left-color"},"border-right":{width:"border-right-width",style:"border-right-style",color:"border-right-color"},background:{size:"background-size",image:"background-image"},font:{style:"font-style",variant:"font-variant",weight:"font-weight",stretch:"font-stretch",size:"font-size",family:"font-family",lineHeight:"line-height","line-height":"line-height"},flex:{grow:"flex-grow",basis:"flex-basis",direction:"flex-direction",wrap:"flex-wrap",flow:"flex-flow",shrink:"flex-shrink"},align:{self:"align-self",items:"align-items",content:"align-content"},grid:{"template-columns":"grid-template-columns",templateColumns:"grid-template-columns","template-rows":"grid-template-rows",templateRows:"grid-template-rows","template-areas":"grid-template-areas",templateAreas:"grid-template-areas",template:"grid-template","auto-columns":"grid-auto-columns",autoColumns:"grid-auto-columns","auto-rows":"grid-auto-rows",autoRows:"grid-auto-rows","auto-flow":"grid-auto-flow",autoFlow:"grid-auto-flow",row:"grid-row",column:"grid-column","row-start":"grid-row-start",rowStart:"grid-row-start","row-end":"grid-row-end",rowEnd:"grid-row-end","column-start":"grid-column-start",columnStart:"grid-column-start","column-end":"grid-column-end",columnEnd:"grid-column-end",area:"grid-area",gap:"grid-gap","row-gap":"grid-row-gap",rowGap:"grid-row-gap","column-gap":"grid-column-gap",columnGap:"grid-column-gap"}};function C(e,t,r,n){return null==r[t]?e:0===e.length?[]:Array.isArray(e[0])?C(e[0],t,r,n):"object"==typeof e[0]?function(e,t,r){return e.map((function(e){return L(e,t,r,!1,!0)}))}(e,t,n):[e]}function L(e,t,r,n,i){if(!A[t]&&!D[t])return[];var o=[];if(D[t]&&(e=function(e,t,r,n){for(var i in r){var o=r[i];if(void 0!==e[i]&&(n||!t.prop(o))){var a,s=I((a={},a[o]=e[i],a),t)[o];n?t.style.fallbacks[o]=s:t.style[o]=s}delete e[i]}return e}(e,r,D[t],n)),Object.keys(e).length)for(var a in A[t])e[a]?Array.isArray(e[a])?o.push(null===P[a]?e[a]:e[a].join(" ")):o.push(e[a]):null!=A[t][a]&&o.push(A[t][a]);return!o.length||i?o:[o]}function I(e,t,r){for(var n in e){var i=e[n];if(Array.isArray(i)){if(!Array.isArray(i[0])){if("fallbacks"===n){for(var o=0;ot?1:-1:e.length-t.length};return{onProcessStyle:function(t,r){if("style"!==r.type)return t;for(var n={},i=Object.keys(t).sort(e),o=0;o{"use strict";r.r(t),r.d(t,{RuleList:()=>$,SheetsManager:()=>ye,SheetsRegistry:()=>Q,create:()=>ve,createGenerateId:()=>ne,createRule:()=>p,default:()=>we,getDynamicStyles:()=>be,hasCSSTOMSupport:()=>ge,sheets:()=>Z,toCssValue:()=>h});var n=r("./node_modules/@babel/runtime/helpers/esm/extends.js"),i=r("./node_modules/is-in-browser/dist/module.js"),o=r("./node_modules/tiny-warning/dist/tiny-warning.esm.js"),a=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=r("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"),c=r("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"),u=r("./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"),d={}.constructor;function l(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(l);if(e.constructor!==d)return e;var t={};for(var r in e)t[r]=l(e[r]);return t}function p(e,t,r){void 0===e&&(e="unnamed");var n=r.jss,i=l(t),o=n.plugins.onCreateRule(e,i,r);return o||(e[0],null)}var f=function(e,t){for(var r="",n=0;n<+~=|^:(),"'`\s])/g,g="undefined"!=typeof CSS&&CSS.escape,b=function(e){return g?g(e):e.replace(y,"\\$1")},w=function(){function e(e,t,r){this.type="style",this.isProcessed=!1;var n=r.sheet,i=r.Renderer;this.key=e,this.options=r,this.style=t,n?this.renderer=n.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,r){if(void 0===t)return this.style[e];var n=!!r&&r.force;if(!n&&this.style[e]===t)return this;var i=t;r&&!1===r.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!n)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var c=this.options.sheet;return c&&c.attached,this},e}(),S=function(e){function t(t,r,n){var i;i=e.call(this,t,r,n)||this;var o=n.selector,a=n.scoped,s=n.sheet,u=n.generateId;return o?i.selectorText=o:!1!==a&&(i.id=u((0,c.A)((0,c.A)(i)),s),i.selectorText="."+b(i.id)),i}(0,s.A)(t,e);var r=t.prototype;return r.applyTo=function(e){var t=this.renderer;if(t){var r=this.toJSON();for(var n in r)t.setProperty(e,n,r[n])}return this},r.toJSON=function(){var e={};for(var t in this.style){var r=this.style[t];"object"!=typeof r?e[t]=r:Array.isArray(r)&&(e[t]=h(r))}return e},r.toString=function(e){var t=this.options.sheet,r=!!t&&t.options.link?(0,n.A)({},e,{allowEmpty:!0}):e;return v(this.selectorText,this.style,r)},(0,a.A)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,r=this.renderable;if(r&&t)t.setSelector(r,e)||t.replaceRule(r,this)}},get:function(){return this.selectorText}}]),t}(w),x={onCreateRule:function(e,t,r){return"@"===e[0]||r.parent&&"keyframes"===r.parent.type?null:new S(e,t,r)}},k={indent:1,children:!0},j=/@([\w-]+)/,E=function(){function e(e,t,r){this.type="conditional",this.isProcessed=!1,this.key=e;var i=e.match(j);for(var o in this.at=i?i[1]:"unknown",this.query=r.name||"@"+this.at,this.options=r,this.rules=new $((0,n.A)({},r,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n?(this.options.jss.plugins.onProcessRule(n),n):null},t.replaceRule=function(e,t,r){var n=this.rules.replace(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.toString=function(e){void 0===e&&(e=k);var t=m(e).linebreak;if(null==e.indent&&(e.indent=k.indent),null==e.children&&(e.children=k.children),!1===e.children)return this.query+" {}";var r=this.rules.toString(e);return r?this.query+" {"+t+r+t+"}":""},e}(),R=/@container|@media|@supports\s+/,O={onCreateRule:function(e,t,r){return R.test(e)?new E(e,t,r):null}},T={indent:1,children:!0},P=/@keyframes\s+([\w-]+)/,A=function(){function e(e,t,r){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=e.match(P);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=r;var o=r.scoped,a=r.sheet,s=r.generateId;for(var c in this.id=!1===o?this.name:b(s(this,a)),this.rules=new $((0,n.A)({},r,{parent:this})),t)this.rules.add(c,t[c],(0,n.A)({},r,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=T);var t=m(e).linebreak;if(null==e.indent&&(e.indent=T.indent),null==e.children&&(e.children=T.children),!1===e.children)return this.at+" "+this.id+" {}";var r=this.rules.toString(e);return r&&(r=""+t+r+t),this.at+" "+this.id+" {"+r+"}"},e}(),D=/@keyframes\s+/,C=/\$([\w-]+)/g,L=function(e,t){return"string"==typeof e?e.replace(C,(function(e,r){return r in t?t[r]:e})):e},I=function(e,t,r){var n=e[t],i=L(n,r);i!==n&&(e[t]=i)},M={onCreateRule:function(e,t,r){return"string"==typeof e&&D.test(e)?new A(e,t,r):null},onProcessStyle:function(e,t,r){return"style"===t.type&&r?("animation-name"in e&&I(e,"animation-name",r.keyframes),"animation"in e&&I(e,"animation",r.keyframes),e):e},onChangeValue:function(e,t,r){var n=r.options.sheet;if(!n)return e;switch(t){case"animation":case"animation-name":return L(e,n.keyframes);default:return e}}},B=function(e){function t(){return e.apply(this,arguments)||this}return(0,s.A)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,r=!!t&&t.options.link?(0,n.A)({},e,{allowEmpty:!0}):e;return v(this.key,this.style,r)},t}(w),N={onCreateRule:function(e,t,r){return r.parent&&"keyframes"===r.parent.type?new B(e,t,r):null}},U=function(){function e(e,t,r){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=r}return e.prototype.toString=function(e){var t=m(e).linebreak;if(Array.isArray(this.style)){for(var r="",n=0;n=this.index)t.push(e);else for(var n=0;nr)return void t.splice(n,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,r=t.attached,n=(0,u.A)(t,["attached"]),i=m(n).linebreak,o="",a=0;a-1?n.substr(0,i-1):n;e.style.setProperty(t,o,i>-1?"important":"")}}catch(e){return!1}return!0},se=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},ce=function(e,t){return e.selectorText=t,e.selectorText===t},ue=ie((function(){return document.querySelector("head")}));function de(e){var t=Z.registry;if(t.length>0){var r=function(e,t){for(var r=0;rt.index&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if((r=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.attached&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e))&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=e.insertionPoint;if(n&&"string"==typeof n){var i=function(e){for(var t=ue(),r=0;rr?r:t},he=function(){function e(e){this.getPropertyValue=oe,this.setProperty=ae,this.removeProperty=se,this.setSelector=ce,this.hasInsertedRules=!1,this.cssRules=[],e&&Z.add(e),this.sheet=e;var t,r=this.sheet?this.sheet.options:{},n=r.media,i=r.meta,o=r.element;this.element=o||((t=document.createElement("style")).textContent="\n",t),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),i&&this.element.setAttribute("data-meta",i);var a=le();a&&this.element.setAttribute("nonce",a)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var r=t.insertionPoint,n=de(t);if(!1!==n&&n.parent)n.parent.insertBefore(e,n.node);else if(r&&"number"==typeof r.nodeType){var i=r,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else ue().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var r=0;r0&&(t.refs--,0===t.refs&&t.sheet.detach()):(0,o.A)(!1,"SheetsManager: can't find sheet to unmanage")},(0,a.A)(e,[{key:"size",get:function(){return this.length}}]),e}(),ge="object"==typeof CSS&&null!=CSS&&"number"in CSS;function be(e){var t=null;for(var r in e){var n=e[r],i=typeof n;if("function"===i)t||(t={}),t[r]=n;else if("object"===i&&null!==n&&!Array.isArray(n)){var o=be(n);o&&(t||(t={}),t[r]=o)}}return t}const we=ve()},"./node_modules/lodash.merge/index.js":(e,t,r)=>{e=r.nmd(e);var n=/^\[object .+?Constructor\]$/,i=/^(?:0|[1-9]\d*)$/,o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;var a="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,s="object"==typeof self&&self&&self.Object===Object&&self,c=a||s||Function("return this")(),u=t&&!t.nodeType&&t,d=u&&e&&!e.nodeType&&e,l=d&&d.exports===u,p=l&&a.process,f=function(){try{var e=d&&d.require&&d.require("util").types;return e||p&&p.binding&&p.binding("util")}catch(e){}}(),h=f&&f.isTypedArray;function m(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var _,v,y,g=Array.prototype,b=Function.prototype,w=Object.prototype,S=c["__core-js_shared__"],x=b.toString,k=w.hasOwnProperty,j=(_=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"",E=w.toString,R=x.call(Object),O=RegExp("^"+x.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=l?c.Buffer:void 0,P=c.Symbol,A=c.Uint8Array,D=T?T.allocUnsafe:void 0,C=(v=Object.getPrototypeOf,y=Object,function(e){return v(y(e))}),L=Object.create,I=w.propertyIsEnumerable,M=g.splice,B=P?P.toStringTag:void 0,N=function(){try{var e=ue(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),U=T?T.isBuffer:void 0,G=Math.max,F=Date.now,V=ue(c,"Map"),z=ue(Object,"create"),q=function(){function e(){}return function(t){if(!we(t))return{};if(L)return L(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function W(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1},H.prototype.set=function(e,t){var r=this.__data__,n=Q(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},K.prototype.clear=function(){this.size=0,this.__data__={hash:new W,map:new(V||H),string:new W}},K.prototype.delete=function(e){var t=ce(this,e).delete(e);return this.size-=t?1:0,t},K.prototype.get=function(e){return ce(this,e).get(e)},K.prototype.has=function(e){return ce(this,e).has(e)},K.prototype.set=function(e,t){var r=ce(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Y.prototype.clear=function(){this.__data__=new H,this.size=0},Y.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Y.prototype.get=function(e){return this.__data__.get(e)},Y.prototype.has=function(e){return this.__data__.has(e)},Y.prototype.set=function(e,t){var r=this.__data__;if(r instanceof H){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new K(n)}return r.set(e,t),this.size=r.size,this};var ee,te=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),a=o.length;a--;){var s=o[ee?a:++n];if(!1===t(i[s],s,i))break}return e};function re(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":B&&B in Object(e)?function(e){var t=k.call(e,B),r=e[B];try{e[B]=void 0;var n=!0}catch(e){}var i=E.call(e);n&&(t?e[B]=r:delete e[B]);return i}(e):function(e){return E.call(e)}(e)}function ne(e){return Se(e)&&"[object Arguments]"==re(e)}function ie(e){return!(!we(e)||function(e){return!!j&&j in e}(e))&&(ge(e)?O:n).test(function(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function oe(e){if(!we(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=le(e),r=[];for(var n in e)("constructor"!=n||!t&&k.call(e,n))&&r.push(n);return r}function ae(e,t,r,n,i){e!==t&&te(t,(function(o,a){if(i||(i=new Y),we(o))!function(e,t,r,n,i,o,a){var s=pe(e,r),c=pe(t,r),u=a.get(c);if(u)return void J(e,r,u);var d=o?o(s,c,r+"",e,t,a):void 0,l=void 0===d;if(l){var p=_e(c),f=!p&&ye(c),h=!p&&!f&&xe(c);d=c,p||f||h?_e(s)?d=s:Se(g=s)&&ve(g)?d=function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(N?function(e,t){return N(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Re);function he(e,t){return e===t||e!=e&&t!=t}var me=ne(function(){return arguments}())?ne:function(e){return Se(e)&&k.call(e,"callee")&&!I.call(e,"callee")},_e=Array.isArray;function ve(e){return null!=e&&be(e.length)&&!ge(e)}var ye=U||function(){return!1};function ge(e){if(!we(e))return!1;var t=re(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function we(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Se(e){return null!=e&&"object"==typeof e}var xe=h?function(e){return function(t){return e(t)}}(h):function(e){return Se(e)&&be(e.length)&&!!o[re(e)]};function ke(e){return ve(e)?$(e,!0):oe(e)}var je,Ee=(je=function(e,t,r){ae(e,t,r)},se((function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=je.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!we(r))return!1;var n=typeof t;return!!("number"==n?ve(r)&&de(t,r.length):"string"==n&&t in r)&&he(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r{var n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),l=Object.prototype.toString,p=Math.max,f=Math.min,h=function(){return d.Date.now()};function m(e,t,r){var n,i,o,a,s,c,u=0,d=!1,l=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=n,o=i;return n=i=void 0,u=t,a=e.apply(o,r)}function g(e){return u=e,s=setTimeout(w,t),d?y(e):a}function b(e){var r=e-c;return void 0===c||r>=t||r<0||l&&e-u>=o}function w(){var e=h();if(b(e))return S(e);s=setTimeout(w,function(e){var r=t-(e-c);return l?f(r,o-(e-u)):r}(e))}function S(e){return s=void 0,m&&n?y(e):(n=i=void 0,a)}function x(){var e=h(),r=b(e);if(n=arguments,i=this,c=e,r){if(void 0===s)return g(c);if(l)return s=setTimeout(w,t),y(c)}return void 0===s&&(s=setTimeout(w,t)),a}return t=v(t)||0,_(r)&&(d=!!r.leading,o=(l="maxWait"in r)?p(v(r.maxWait)||0,t):o,m="trailing"in r?!!r.trailing:m),x.cancel=function(){void 0!==s&&clearTimeout(s),u=0,n=c=i=s=void 0},x.flush=function(){return void 0===s?a:S(h())},x}function _(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(_(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=_(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var r=o.test(e);return r||a.test(e)?s(e.slice(2),r?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return _(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),m(e,t,{leading:n,maxWait:t,trailing:i})}},"./node_modules/lodash/_DataView.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(r("./node_modules/lodash/_root.js"),"DataView");e.exports=n},"./node_modules/lodash/_Hash.js":(e,t,r)=>{var n=r("./node_modules/lodash/_hashClear.js"),i=r("./node_modules/lodash/_hashDelete.js"),o=r("./node_modules/lodash/_hashGet.js"),a=r("./node_modules/lodash/_hashHas.js"),s=r("./node_modules/lodash/_hashSet.js");function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r("./node_modules/lodash/_baseCreate.js"),i=r("./node_modules/lodash/_baseLodash.js");function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},"./node_modules/lodash/_ListCache.js":(e,t,r)=>{var n=r("./node_modules/lodash/_listCacheClear.js"),i=r("./node_modules/lodash/_listCacheDelete.js"),o=r("./node_modules/lodash/_listCacheGet.js"),a=r("./node_modules/lodash/_listCacheHas.js"),s=r("./node_modules/lodash/_listCacheSet.js");function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r("./node_modules/lodash/_baseCreate.js"),i=r("./node_modules/lodash/_baseLodash.js");function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},"./node_modules/lodash/_Map.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(r("./node_modules/lodash/_root.js"),"Map");e.exports=n},"./node_modules/lodash/_MapCache.js":(e,t,r)=>{var n=r("./node_modules/lodash/_mapCacheClear.js"),i=r("./node_modules/lodash/_mapCacheDelete.js"),o=r("./node_modules/lodash/_mapCacheGet.js"),a=r("./node_modules/lodash/_mapCacheHas.js"),s=r("./node_modules/lodash/_mapCacheSet.js");function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r("./node_modules/lodash/_getNative.js")(r("./node_modules/lodash/_root.js"),"Promise");e.exports=n},"./node_modules/lodash/_Set.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(r("./node_modules/lodash/_root.js"),"Set");e.exports=n},"./node_modules/lodash/_SetCache.js":(e,t,r)=>{var n=r("./node_modules/lodash/_MapCache.js"),i=r("./node_modules/lodash/_setCacheAdd.js"),o=r("./node_modules/lodash/_setCacheHas.js");function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r("./node_modules/lodash/_ListCache.js"),i=r("./node_modules/lodash/_stackClear.js"),o=r("./node_modules/lodash/_stackDelete.js"),a=r("./node_modules/lodash/_stackGet.js"),s=r("./node_modules/lodash/_stackHas.js"),c=r("./node_modules/lodash/_stackSet.js");function u(e){var t=this.__data__=new n(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},"./node_modules/lodash/_Symbol.js":(e,t,r)=>{var n=r("./node_modules/lodash/_root.js").Symbol;e.exports=n},"./node_modules/lodash/_Uint8Array.js":(e,t,r)=>{var n=r("./node_modules/lodash/_root.js").Uint8Array;e.exports=n},"./node_modules/lodash/_WeakMap.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(r("./node_modules/lodash/_root.js"),"WeakMap");e.exports=n},"./node_modules/lodash/_apply.js":e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},"./node_modules/lodash/_arrayEach.js":e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r{var n=r("./node_modules/lodash/_baseIndexOf.js");e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},"./node_modules/lodash/_arrayLikeKeys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseTimes.js"),i=r("./node_modules/lodash/isArguments.js"),o=r("./node_modules/lodash/isArray.js"),a=r("./node_modules/lodash/isBuffer.js"),s=r("./node_modules/lodash/_isIndex.js"),c=r("./node_modules/lodash/isTypedArray.js"),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),d=!r&&i(e),l=!r&&!d&&a(e),p=!r&&!d&&!l&&c(e),f=r||d||l||p,h=f?n(e.length,String):[],m=h.length;for(var _ in e)!t&&!u.call(e,_)||f&&("length"==_||l&&("offset"==_||"parent"==_)||p&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||s(_,m))||h.push(_);return h}},"./node_modules/lodash/_arrayMap.js":e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{var n=r("./node_modules/lodash/_baseAssignValue.js"),i=r("./node_modules/lodash/eq.js"),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];o.call(e,t)&&i(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},"./node_modules/lodash/_assocIndexOf.js":(e,t,r)=>{var n=r("./node_modules/lodash/eq.js");e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},"./node_modules/lodash/_baseAssign.js":(e,t,r)=>{var n=r("./node_modules/lodash/_copyObject.js"),i=r("./node_modules/lodash/keys.js");e.exports=function(e,t){return e&&n(t,i(t),e)}},"./node_modules/lodash/_baseAssignIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_copyObject.js"),i=r("./node_modules/lodash/keysIn.js");e.exports=function(e,t){return e&&n(t,i(t),e)}},"./node_modules/lodash/_baseAssignValue.js":(e,t,r)=>{var n=r("./node_modules/lodash/_defineProperty.js");e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},"./node_modules/lodash/_baseClone.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Stack.js"),i=r("./node_modules/lodash/_arrayEach.js"),o=r("./node_modules/lodash/_assignValue.js"),a=r("./node_modules/lodash/_baseAssign.js"),s=r("./node_modules/lodash/_baseAssignIn.js"),c=r("./node_modules/lodash/_cloneBuffer.js"),u=r("./node_modules/lodash/_copyArray.js"),d=r("./node_modules/lodash/_copySymbols.js"),l=r("./node_modules/lodash/_copySymbolsIn.js"),p=r("./node_modules/lodash/_getAllKeys.js"),f=r("./node_modules/lodash/_getAllKeysIn.js"),h=r("./node_modules/lodash/_getTag.js"),m=r("./node_modules/lodash/_initCloneArray.js"),_=r("./node_modules/lodash/_initCloneByTag.js"),v=r("./node_modules/lodash/_initCloneObject.js"),y=r("./node_modules/lodash/isArray.js"),g=r("./node_modules/lodash/isBuffer.js"),b=r("./node_modules/lodash/isMap.js"),w=r("./node_modules/lodash/isObject.js"),S=r("./node_modules/lodash/isSet.js"),x=r("./node_modules/lodash/keys.js"),k=r("./node_modules/lodash/keysIn.js"),j={};j["[object Arguments]"]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j["[object Object]"]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j["[object Function]"]=j["[object WeakMap]"]=!1,e.exports=function e(t,r,E,R,O,T){var P,A=1&r,D=2&r,C=4&r;if(E&&(P=O?E(t,R,O,T):E(t)),void 0!==P)return P;if(!w(t))return t;var L=y(t);if(L){if(P=m(t),!A)return u(t,P)}else{var I=h(t),M="[object Function]"==I||"[object GeneratorFunction]"==I;if(g(t))return c(t,A);if("[object Object]"==I||"[object Arguments]"==I||M&&!O){if(P=D||M?{}:v(t),!A)return D?l(t,s(P,t)):d(t,a(P,t))}else{if(!j[I])return O?t:{};P=_(t,I,A)}}T||(T=new n);var B=T.get(t);if(B)return B;T.set(t,P),S(t)?t.forEach((function(n){P.add(e(n,r,E,n,t,T))})):b(t)&&t.forEach((function(n,i){P.set(i,e(n,r,E,i,t,T))}));var N=L?void 0:(C?D?f:p:D?k:x)(t);return i(N||t,(function(n,i){N&&(n=t[i=n]),o(P,i,e(n,r,E,i,t,T))})),P}},"./node_modules/lodash/_baseCreate.js":(e,t,r)=>{var n=r("./node_modules/lodash/isObject.js"),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},"./node_modules/lodash/_baseFindIndex.js":e=>{e.exports=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o{e.exports=function(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}},"./node_modules/lodash/_baseFlatten.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayPush.js"),i=r("./node_modules/lodash/_isFlattenable.js");e.exports=function e(t,r,o,a,s){var c=-1,u=t.length;for(o||(o=i),s||(s=[]);++c0&&o(d)?r>1?e(d,r-1,o,a,s):n(s,d):a||(s[s.length]=d)}return s}},"./node_modules/lodash/_baseFor.js":(e,t,r)=>{var n=r("./node_modules/lodash/_createBaseFor.js")();e.exports=n},"./node_modules/lodash/_baseForOwn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseFor.js"),i=r("./node_modules/lodash/keys.js");e.exports=function(e,t){return e&&n(e,t,i)}},"./node_modules/lodash/_baseGet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_castPath.js"),i=r("./node_modules/lodash/_toKey.js");e.exports=function(e,t){for(var r=0,o=(t=n(t,e)).length;null!=e&&r{var n=r("./node_modules/lodash/_arrayPush.js"),i=r("./node_modules/lodash/isArray.js");e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},"./node_modules/lodash/_baseGetTag.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Symbol.js"),i=r("./node_modules/lodash/_getRawTag.js"),o=r("./node_modules/lodash/_objectToString.js"),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},"./node_modules/lodash/_baseHasIn.js":e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},"./node_modules/lodash/_baseIndexOf.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseFindIndex.js"),i=r("./node_modules/lodash/_baseIsNaN.js"),o=r("./node_modules/lodash/_strictIndexOf.js");e.exports=function(e,t,r){return t==t?o(e,t,r):n(e,i,r)}},"./node_modules/lodash/_baseIsArguments.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),i=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},"./node_modules/lodash/_baseIsEqual.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsEqualDeep.js"),i=r("./node_modules/lodash/isObjectLike.js");e.exports=function e(t,r,o,a,s){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!=t&&r!=r:n(t,r,o,a,e,s))}},"./node_modules/lodash/_baseIsEqualDeep.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Stack.js"),i=r("./node_modules/lodash/_equalArrays.js"),o=r("./node_modules/lodash/_equalByTag.js"),a=r("./node_modules/lodash/_equalObjects.js"),s=r("./node_modules/lodash/_getTag.js"),c=r("./node_modules/lodash/isArray.js"),u=r("./node_modules/lodash/isBuffer.js"),d=r("./node_modules/lodash/isTypedArray.js"),l="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,f,h,m){var _=c(e),v=c(t),y=_?"[object Array]":s(e),g=v?"[object Array]":s(t),b=(y="[object Arguments]"==y?l:y)==l,w=(g="[object Arguments]"==g?l:g)==l,S=y==g;if(S&&u(e)){if(!u(t))return!1;_=!0,b=!1}if(S&&!b)return m||(m=new n),_||d(e)?i(e,t,r,f,h,m):o(e,t,y,r,f,h,m);if(!(1&r)){var x=b&&p.call(e,"__wrapped__"),k=w&&p.call(t,"__wrapped__");if(x||k){var j=x?e.value():e,E=k?t.value():t;return m||(m=new n),h(j,E,r,f,m)}}return!!S&&(m||(m=new n),a(e,t,r,f,h,m))}},"./node_modules/lodash/_baseIsMap.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getTag.js"),i=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return i(e)&&"[object Map]"==n(e)}},"./node_modules/lodash/_baseIsMatch.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Stack.js"),i=r("./node_modules/lodash/_baseIsEqual.js");e.exports=function(e,t,r,o){var a=r.length,s=a,c=!o;if(null==e)return!s;for(e=Object(e);a--;){var u=r[a];if(c&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a{e.exports=function(e){return e!=e}},"./node_modules/lodash/_baseIsNative.js":(e,t,r)=>{var n=r("./node_modules/lodash/isFunction.js"),i=r("./node_modules/lodash/_isMasked.js"),o=r("./node_modules/lodash/isObject.js"),a=r("./node_modules/lodash/_toSource.js"),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,d=c.toString,l=u.hasOwnProperty,p=RegExp("^"+d.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?p:s).test(a(e))}},"./node_modules/lodash/_baseIsSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getTag.js"),i=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return i(e)&&"[object Set]"==n(e)}},"./node_modules/lodash/_baseIsTypedArray.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),i=r("./node_modules/lodash/isLength.js"),o=r("./node_modules/lodash/isObjectLike.js"),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[n(e)]}},"./node_modules/lodash/_baseIteratee.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseMatches.js"),i=r("./node_modules/lodash/_baseMatchesProperty.js"),o=r("./node_modules/lodash/identity.js"),a=r("./node_modules/lodash/isArray.js"),s=r("./node_modules/lodash/property.js");e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):n(e):s(e)}},"./node_modules/lodash/_baseKeys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_isPrototype.js"),i=r("./node_modules/lodash/_nativeKeys.js"),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},"./node_modules/lodash/_baseKeysIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/isObject.js"),i=r("./node_modules/lodash/_isPrototype.js"),o=r("./node_modules/lodash/_nativeKeysIn.js"),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=i(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},"./node_modules/lodash/_baseLodash.js":e=>{e.exports=function(){}},"./node_modules/lodash/_baseMatches.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsMatch.js"),i=r("./node_modules/lodash/_getMatchData.js"),o=r("./node_modules/lodash/_matchesStrictComparable.js");e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},"./node_modules/lodash/_baseMatchesProperty.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsEqual.js"),i=r("./node_modules/lodash/get.js"),o=r("./node_modules/lodash/hasIn.js"),a=r("./node_modules/lodash/_isKey.js"),s=r("./node_modules/lodash/_isStrictComparable.js"),c=r("./node_modules/lodash/_matchesStrictComparable.js"),u=r("./node_modules/lodash/_toKey.js");e.exports=function(e,t){return a(e)&&s(t)?c(u(e),t):function(r){var a=i(r,e);return void 0===a&&a===t?o(r,e):n(t,a,3)}}},"./node_modules/lodash/_basePick.js":(e,t,r)=>{var n=r("./node_modules/lodash/_basePickBy.js"),i=r("./node_modules/lodash/hasIn.js");e.exports=function(e,t){return n(e,t,(function(t,r){return i(e,r)}))}},"./node_modules/lodash/_basePickBy.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGet.js"),i=r("./node_modules/lodash/_baseSet.js"),o=r("./node_modules/lodash/_castPath.js");e.exports=function(e,t,r){for(var a=-1,s=t.length,c={};++a{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},"./node_modules/lodash/_basePropertyDeep.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGet.js");e.exports=function(e){return function(t){return n(t,e)}}},"./node_modules/lodash/_baseSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_assignValue.js"),i=r("./node_modules/lodash/_castPath.js"),o=r("./node_modules/lodash/_isIndex.js"),a=r("./node_modules/lodash/isObject.js"),s=r("./node_modules/lodash/_toKey.js");e.exports=function(e,t,r,c){if(!a(e))return e;for(var u=-1,d=(t=i(t,e)).length,l=d-1,p=e;null!=p&&++u{var n=r("./node_modules/lodash/identity.js"),i=r("./node_modules/lodash/_metaMap.js"),o=i?function(e,t){return i.set(e,t),e}:n;e.exports=o},"./node_modules/lodash/_baseSetToString.js":(e,t,r)=>{var n=r("./node_modules/lodash/constant.js"),i=r("./node_modules/lodash/_defineProperty.js"),o=r("./node_modules/lodash/identity.js"),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=a},"./node_modules/lodash/_baseTimes.js":e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{var n=r("./node_modules/lodash/_Symbol.js"),i=r("./node_modules/lodash/_arrayMap.js"),o=r("./node_modules/lodash/isArray.js"),a=r("./node_modules/lodash/isSymbol.js"),s=n?n.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 r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},"./node_modules/lodash/_baseTrim.js":(e,t,r)=>{var n=r("./node_modules/lodash/_trimmedEndIndex.js"),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},"./node_modules/lodash/_baseUnary.js":e=>{e.exports=function(e){return function(t){return e(t)}}},"./node_modules/lodash/_cacheHas.js":e=>{e.exports=function(e,t){return e.has(t)}},"./node_modules/lodash/_castPath.js":(e,t,r)=>{var n=r("./node_modules/lodash/isArray.js"),i=r("./node_modules/lodash/_isKey.js"),o=r("./node_modules/lodash/_stringToPath.js"),a=r("./node_modules/lodash/toString.js");e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(a(e))}},"./node_modules/lodash/_cloneArrayBuffer.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Uint8Array.js");e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},"./node_modules/lodash/_cloneBuffer.js":(e,t,r)=>{e=r.nmd(e);var n=r("./node_modules/lodash/_root.js"),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},"./node_modules/lodash/_cloneDataView.js":(e,t,r)=>{var n=r("./node_modules/lodash/_cloneArrayBuffer.js");e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},"./node_modules/lodash/_cloneRegExp.js":e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},"./node_modules/lodash/_cloneSymbol.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Symbol.js"),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},"./node_modules/lodash/_cloneTypedArray.js":(e,t,r)=>{var n=r("./node_modules/lodash/_cloneArrayBuffer.js");e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},"./node_modules/lodash/_composeArgs.js":e=>{var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=n.length,c=-1,u=r.length,d=t(a-s,0),l=Array(u+d),p=!i;++c{var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=-1,c=n.length,u=-1,d=r.length,l=t(a-c,0),p=Array(l+d),f=!i;++o{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{var n=r("./node_modules/lodash/_assignValue.js"),i=r("./node_modules/lodash/_baseAssignValue.js");e.exports=function(e,t,r,o){var a=!r;r||(r={});for(var s=-1,c=t.length;++s{var n=r("./node_modules/lodash/_copyObject.js"),i=r("./node_modules/lodash/_getSymbols.js");e.exports=function(e,t){return n(e,i(e),t)}},"./node_modules/lodash/_copySymbolsIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_copyObject.js"),i=r("./node_modules/lodash/_getSymbolsIn.js");e.exports=function(e,t){return n(e,i(e),t)}},"./node_modules/lodash/_coreJsData.js":(e,t,r)=>{var n=r("./node_modules/lodash/_root.js")["__core-js_shared__"];e.exports=n},"./node_modules/lodash/_countHolders.js":e=>{e.exports=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}},"./node_modules/lodash/_createBaseFor.js":e=>{e.exports=function(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===r(o[c],c,o))break}return t}}},"./node_modules/lodash/_createBind.js":(e,t,r)=>{var n=r("./node_modules/lodash/_createCtor.js"),i=r("./node_modules/lodash/_root.js");e.exports=function(e,t,r){var o=1&t,a=n(e);return function t(){var n=this&&this!==i&&this instanceof t?a:e;return n.apply(o?r:this,arguments)}}},"./node_modules/lodash/_createCtor.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseCreate.js"),i=r("./node_modules/lodash/isObject.js");e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=n(e.prototype),o=e.apply(r,t);return i(o)?o:r}}},"./node_modules/lodash/_createCurry.js":(e,t,r)=>{var n=r("./node_modules/lodash/_apply.js"),i=r("./node_modules/lodash/_createCtor.js"),o=r("./node_modules/lodash/_createHybrid.js"),a=r("./node_modules/lodash/_createRecurry.js"),s=r("./node_modules/lodash/_getHolder.js"),c=r("./node_modules/lodash/_replaceHolders.js"),u=r("./node_modules/lodash/_root.js");e.exports=function(e,t,r){var d=i(e);return function i(){for(var l=arguments.length,p=Array(l),f=l,h=s(i);f--;)p[f]=arguments[f];var m=l<3&&p[0]!==h&&p[l-1]!==h?[]:c(p,h);if((l-=m.length){var n=r("./node_modules/lodash/_baseIteratee.js"),i=r("./node_modules/lodash/isArrayLike.js"),o=r("./node_modules/lodash/keys.js");e.exports=function(e){return function(t,r,a){var s=Object(t);if(!i(t)){var c=n(r,3);t=o(t),r=function(e){return c(s[e],e,s)}}var u=e(t,r,a);return u>-1?s[c?t[u]:u]:void 0}}},"./node_modules/lodash/_createFlow.js":(e,t,r)=>{var n=r("./node_modules/lodash/_LodashWrapper.js"),i=r("./node_modules/lodash/_flatRest.js"),o=r("./node_modules/lodash/_getData.js"),a=r("./node_modules/lodash/_getFuncName.js"),s=r("./node_modules/lodash/isArray.js"),c=r("./node_modules/lodash/_isLaziable.js");e.exports=function(e){return i((function(t){var r=t.length,i=r,u=n.prototype.thru;for(e&&t.reverse();i--;){var d=t[i];if("function"!=typeof d)throw new TypeError("Expected a function");if(u&&!l&&"wrapper"==a(d))var l=new n([],!0)}for(i=l?i:r;++i{var n=r("./node_modules/lodash/_composeArgs.js"),i=r("./node_modules/lodash/_composeArgsRight.js"),o=r("./node_modules/lodash/_countHolders.js"),a=r("./node_modules/lodash/_createCtor.js"),s=r("./node_modules/lodash/_createRecurry.js"),c=r("./node_modules/lodash/_getHolder.js"),u=r("./node_modules/lodash/_reorder.js"),d=r("./node_modules/lodash/_replaceHolders.js"),l=r("./node_modules/lodash/_root.js");e.exports=function e(t,r,p,f,h,m,_,v,y,g){var b=128&r,w=1&r,S=2&r,x=24&r,k=512&r,j=S?void 0:a(t);return function E(){for(var R=arguments.length,O=Array(R),T=R;T--;)O[T]=arguments[T];if(x)var P=c(E),A=o(O,P);if(f&&(O=n(O,f,h,x)),m&&(O=i(O,m,_,x)),R-=A,x&&R1&&O.reverse(),b&&y{var n=r("./node_modules/lodash/_apply.js"),i=r("./node_modules/lodash/_createCtor.js"),o=r("./node_modules/lodash/_root.js");e.exports=function(e,t,r,a){var s=1&t,c=i(e);return function t(){for(var i=-1,u=arguments.length,d=-1,l=a.length,p=Array(l+u),f=this&&this!==o&&this instanceof t?c:e;++d{var n=r("./node_modules/lodash/_isLaziable.js"),i=r("./node_modules/lodash/_setData.js"),o=r("./node_modules/lodash/_setWrapToString.js");e.exports=function(e,t,r,a,s,c,u,d,l,p){var f=8&t;t|=f?32:64,4&(t&=~(f?64:32))||(t&=-4);var h=[e,t,s,f?c:void 0,f?u:void 0,f?void 0:c,f?void 0:u,d,l,p],m=r.apply(void 0,h);return n(e)&&i(m,h),m.placeholder=a,o(m,e,t)}},"./node_modules/lodash/_createWrap.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseSetData.js"),i=r("./node_modules/lodash/_createBind.js"),o=r("./node_modules/lodash/_createCurry.js"),a=r("./node_modules/lodash/_createHybrid.js"),s=r("./node_modules/lodash/_createPartial.js"),c=r("./node_modules/lodash/_getData.js"),u=r("./node_modules/lodash/_mergeData.js"),d=r("./node_modules/lodash/_setData.js"),l=r("./node_modules/lodash/_setWrapToString.js"),p=r("./node_modules/lodash/toInteger.js"),f=Math.max;e.exports=function(e,t,r,h,m,_,v,y){var g=2&t;if(!g&&"function"!=typeof e)throw new TypeError("Expected a function");var b=h?h.length:0;if(b||(t&=-97,h=m=void 0),v=void 0===v?v:f(p(v),0),y=void 0===y?y:p(y),b-=m?m.length:0,64&t){var w=h,S=m;h=m=void 0}var x=g?void 0:c(e),k=[e,t,r,h,m,w,S,_,v,y];if(x&&u(k,x),e=k[0],t=k[1],r=k[2],h=k[3],m=k[4],!(y=k[9]=void 0===k[9]?g?0:e.length:f(k[9]-b,0))&&24&t&&(t&=-25),t&&1!=t)j=8==t||16==t?o(e,t,y):32!=t&&33!=t||m.length?a.apply(void 0,k):s(e,t,r,h);else var j=i(e,t,r);return l((x?n:d)(j,k),e,t)}},"./node_modules/lodash/_defineProperty.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js"),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},"./node_modules/lodash/_equalArrays.js":(e,t,r)=>{var n=r("./node_modules/lodash/_SetCache.js"),i=r("./node_modules/lodash/_arraySome.js"),o=r("./node_modules/lodash/_cacheHas.js");e.exports=function(e,t,r,a,s,c){var u=1&r,d=e.length,l=t.length;if(d!=l&&!(u&&l>d))return!1;var p=c.get(e),f=c.get(t);if(p&&f)return p==t&&f==e;var h=-1,m=!0,_=2&r?new n:void 0;for(c.set(e,t),c.set(t,e);++h{var n=r("./node_modules/lodash/_Symbol.js"),i=r("./node_modules/lodash/_Uint8Array.js"),o=r("./node_modules/lodash/eq.js"),a=r("./node_modules/lodash/_equalArrays.js"),s=r("./node_modules/lodash/_mapToArray.js"),c=r("./node_modules/lodash/_setToArray.js"),u=n?n.prototype:void 0,d=u?u.valueOf:void 0;e.exports=function(e,t,r,n,u,l,p){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!l(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 f=s;case"[object Set]":var h=1&n;if(f||(f=c),e.size!=t.size&&!h)return!1;var m=p.get(e);if(m)return m==t;n|=2,p.set(e,t);var _=a(f(e),f(t),n,u,l,p);return p.delete(e),_;case"[object Symbol]":if(d)return d.call(e)==d.call(t)}return!1}},"./node_modules/lodash/_equalObjects.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getAllKeys.js"),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,a,s){var c=1&r,u=n(e),d=u.length;if(d!=n(t).length&&!c)return!1;for(var l=d;l--;){var p=u[l];if(!(c?p in t:i.call(t,p)))return!1}var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var m=!0;s.set(e,t),s.set(t,e);for(var _=c;++l{var n=r("./node_modules/lodash/flatten.js"),i=r("./node_modules/lodash/_overRest.js"),o=r("./node_modules/lodash/_setToString.js");e.exports=function(e){return o(i(e,void 0,n),e+"")}},"./node_modules/lodash/_freeGlobal.js":(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},"./node_modules/lodash/_getAllKeys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetAllKeys.js"),i=r("./node_modules/lodash/_getSymbols.js"),o=r("./node_modules/lodash/keys.js");e.exports=function(e){return n(e,o,i)}},"./node_modules/lodash/_getAllKeysIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetAllKeys.js"),i=r("./node_modules/lodash/_getSymbolsIn.js"),o=r("./node_modules/lodash/keysIn.js");e.exports=function(e){return n(e,o,i)}},"./node_modules/lodash/_getData.js":(e,t,r)=>{var n=r("./node_modules/lodash/_metaMap.js"),i=r("./node_modules/lodash/noop.js"),o=n?function(e){return n.get(e)}:i;e.exports=o},"./node_modules/lodash/_getFuncName.js":(e,t,r)=>{var n=r("./node_modules/lodash/_realNames.js"),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],o=i.call(n,t)?r.length:0;o--;){var a=r[o],s=a.func;if(null==s||s==e)return a.name}return t}},"./node_modules/lodash/_getHolder.js":e=>{e.exports=function(e){return e.placeholder}},"./node_modules/lodash/_getMapData.js":(e,t,r)=>{var n=r("./node_modules/lodash/_isKeyable.js");e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},"./node_modules/lodash/_getMatchData.js":(e,t,r)=>{var n=r("./node_modules/lodash/_isStrictComparable.js"),i=r("./node_modules/lodash/keys.js");e.exports=function(e){for(var t=i(e),r=t.length;r--;){var o=t[r],a=e[o];t[r]=[o,a,n(a)]}return t}},"./node_modules/lodash/_getNative.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsNative.js"),i=r("./node_modules/lodash/_getValue.js");e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},"./node_modules/lodash/_getPrototype.js":(e,t,r)=>{var n=r("./node_modules/lodash/_overArg.js")(Object.getPrototypeOf,Object);e.exports=n},"./node_modules/lodash/_getRawTag.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Symbol.js"),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},"./node_modules/lodash/_getSymbols.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayFilter.js"),i=r("./node_modules/lodash/stubArray.js"),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},"./node_modules/lodash/_getSymbolsIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayPush.js"),i=r("./node_modules/lodash/_getPrototype.js"),o=r("./node_modules/lodash/_getSymbols.js"),a=r("./node_modules/lodash/stubArray.js"),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=i(e);return t}:a;e.exports=s},"./node_modules/lodash/_getTag.js":(e,t,r)=>{var n=r("./node_modules/lodash/_DataView.js"),i=r("./node_modules/lodash/_Map.js"),o=r("./node_modules/lodash/_Promise.js"),a=r("./node_modules/lodash/_Set.js"),s=r("./node_modules/lodash/_WeakMap.js"),c=r("./node_modules/lodash/_baseGetTag.js"),u=r("./node_modules/lodash/_toSource.js"),d=u(n),l=u(i),p=u(o),f=u(a),h=u(s),m=c;(n&&"[object DataView]"!=m(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||o&&"[object Promise]"!=m(o.resolve())||a&&"[object Set]"!=m(new a)||s&&"[object WeakMap]"!=m(new s))&&(m=function(e){var t=c(e),r="[object Object]"==t?e.constructor:void 0,n=r?u(r):"";if(n)switch(n){case d:return"[object DataView]";case l:return"[object Map]";case p:return"[object Promise]";case f:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=m},"./node_modules/lodash/_getValue.js":e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},"./node_modules/lodash/_getWrapDetails.js":e=>{var t=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;e.exports=function(e){var n=e.match(t);return n?n[1].split(r):[]}},"./node_modules/lodash/_hasPath.js":(e,t,r)=>{var n=r("./node_modules/lodash/_castPath.js"),i=r("./node_modules/lodash/isArguments.js"),o=r("./node_modules/lodash/isArray.js"),a=r("./node_modules/lodash/_isIndex.js"),s=r("./node_modules/lodash/isLength.js"),c=r("./node_modules/lodash/_toKey.js");e.exports=function(e,t,r){for(var u=-1,d=(t=n(t,e)).length,l=!1;++u{var n=r("./node_modules/lodash/_nativeCreate.js");e.exports=function(){this.__data__=n?n(null):{},this.size=0}},"./node_modules/lodash/_hashDelete.js":e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},"./node_modules/lodash/_hashGet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_nativeCreate.js"),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},"./node_modules/lodash/_hashHas.js":(e,t,r)=>{var n=r("./node_modules/lodash/_nativeCreate.js"),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},"./node_modules/lodash/_hashSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_nativeCreate.js");e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},"./node_modules/lodash/_initCloneArray.js":e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},"./node_modules/lodash/_initCloneByTag.js":(e,t,r)=>{var n=r("./node_modules/lodash/_cloneArrayBuffer.js"),i=r("./node_modules/lodash/_cloneDataView.js"),o=r("./node_modules/lodash/_cloneRegExp.js"),a=r("./node_modules/lodash/_cloneSymbol.js"),s=r("./node_modules/lodash/_cloneTypedArray.js");e.exports=function(e,t,r){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return i(e,r);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,r);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return o(e);case"[object Set]":return new c;case"[object Symbol]":return a(e)}}},"./node_modules/lodash/_initCloneObject.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseCreate.js"),i=r("./node_modules/lodash/_getPrototype.js"),o=r("./node_modules/lodash/_isPrototype.js");e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(i(e))}},"./node_modules/lodash/_insertWrapDetails.js":e=>{var t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,r){var n=r.length;if(!n)return e;var i=n-1;return r[i]=(n>1?"& ":"")+r[i],r=r.join(n>2?", ":" "),e.replace(t,"{\n/* [wrapped with "+r+"] */\n")}},"./node_modules/lodash/_isFlattenable.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Symbol.js"),i=r("./node_modules/lodash/isArguments.js"),o=r("./node_modules/lodash/isArray.js"),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},"./node_modules/lodash/_isIndex.js":e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r("./node_modules/lodash/isArray.js"),i=r("./node_modules/lodash/isSymbol.js"),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},"./node_modules/lodash/_isKeyable.js":e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},"./node_modules/lodash/_isLaziable.js":(e,t,r)=>{var n=r("./node_modules/lodash/_LazyWrapper.js"),i=r("./node_modules/lodash/_getData.js"),o=r("./node_modules/lodash/_getFuncName.js"),a=r("./node_modules/lodash/wrapperLodash.js");e.exports=function(e){var t=o(e),r=a[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var s=i(r);return!!s&&e===s[0]}},"./node_modules/lodash/_isMasked.js":(e,t,r)=>{var n,i=r("./node_modules/lodash/_coreJsData.js"),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},"./node_modules/lodash/_isPrototype.js":e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},"./node_modules/lodash/_isStrictComparable.js":(e,t,r)=>{var n=r("./node_modules/lodash/isObject.js");e.exports=function(e){return e==e&&!n(e)}},"./node_modules/lodash/_listCacheClear.js":e=>{e.exports=function(){this.__data__=[],this.size=0}},"./node_modules/lodash/_listCacheDelete.js":(e,t,r)=>{var n=r("./node_modules/lodash/_assocIndexOf.js"),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():i.call(t,r,1),--this.size,!0)}},"./node_modules/lodash/_listCacheGet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_assocIndexOf.js");e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},"./node_modules/lodash/_listCacheHas.js":(e,t,r)=>{var n=r("./node_modules/lodash/_assocIndexOf.js");e.exports=function(e){return n(this.__data__,e)>-1}},"./node_modules/lodash/_listCacheSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_assocIndexOf.js");e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},"./node_modules/lodash/_mapCacheClear.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Hash.js"),i=r("./node_modules/lodash/_ListCache.js"),o=r("./node_modules/lodash/_Map.js");e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},"./node_modules/lodash/_mapCacheDelete.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getMapData.js");e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},"./node_modules/lodash/_mapCacheGet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getMapData.js");e.exports=function(e){return n(this,e).get(e)}},"./node_modules/lodash/_mapCacheHas.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getMapData.js");e.exports=function(e){return n(this,e).has(e)}},"./node_modules/lodash/_mapCacheSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getMapData.js");e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},"./node_modules/lodash/_mapToArray.js":e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},"./node_modules/lodash/_matchesStrictComparable.js":e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},"./node_modules/lodash/_memoizeCapped.js":(e,t,r)=>{var n=r("./node_modules/lodash/memoize.js");e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},"./node_modules/lodash/_mergeData.js":(e,t,r)=>{var n=r("./node_modules/lodash/_composeArgs.js"),i=r("./node_modules/lodash/_composeArgsRight.js"),o=r("./node_modules/lodash/_replaceHolders.js"),a=Math.min;e.exports=function(e,t){var r=e[1],s=t[1],c=r|s,u=c<131,d=128==s&&8==r||128==s&&256==r&&e[7].length<=t[8]||384==s&&t[7].length<=t[8]&&8==r;if(!u&&!d)return e;1&s&&(e[2]=t[2],c|=1&r?0:4);var l=t[3];if(l){var p=e[3];e[3]=p?n(p,l,t[4]):l,e[4]=p?o(e[3],"__lodash_placeholder__"):t[4]}return(l=t[5])&&(p=e[5],e[5]=p?i(p,l,t[6]):l,e[6]=p?o(e[5],"__lodash_placeholder__"):t[6]),(l=t[7])&&(e[7]=l),128&s&&(e[8]=null==e[8]?t[8]:a(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=c,e}},"./node_modules/lodash/_metaMap.js":(e,t,r)=>{var n=r("./node_modules/lodash/_WeakMap.js"),i=n&&new n;e.exports=i},"./node_modules/lodash/_nativeCreate.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(Object,"create");e.exports=n},"./node_modules/lodash/_nativeKeys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_overArg.js")(Object.keys,Object);e.exports=n},"./node_modules/lodash/_nativeKeysIn.js":e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},"./node_modules/lodash/_nodeUtil.js":(e,t,r)=>{e=r.nmd(e);var n=r("./node_modules/lodash/_freeGlobal.js"),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&n.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},"./node_modules/lodash/_objectToString.js":e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},"./node_modules/lodash/_overArg.js":e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},"./node_modules/lodash/_overRest.js":(e,t,r)=>{var n=r("./node_modules/lodash/_apply.js"),i=Math.max;e.exports=function(e,t,r){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{e.exports={}},"./node_modules/lodash/_reorder.js":(e,t,r)=>{var n=r("./node_modules/lodash/_copyArray.js"),i=r("./node_modules/lodash/_isIndex.js"),o=Math.min;e.exports=function(e,t){for(var r=e.length,a=o(t.length,r),s=n(e);a--;){var c=t[a];e[a]=i(c,r)?s[c]:void 0}return e}},"./node_modules/lodash/_replaceHolders.js":e=>{e.exports=function(e,t){for(var r=-1,n=e.length,i=0,o=[];++r{var n=r("./node_modules/lodash/_freeGlobal.js"),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},"./node_modules/lodash/_setCacheAdd.js":e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},"./node_modules/lodash/_setCacheHas.js":e=>{e.exports=function(e){return this.__data__.has(e)}},"./node_modules/lodash/_setData.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseSetData.js"),i=r("./node_modules/lodash/_shortOut.js")(n);e.exports=i},"./node_modules/lodash/_setToArray.js":e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},"./node_modules/lodash/_setToString.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseSetToString.js"),i=r("./node_modules/lodash/_shortOut.js")(n);e.exports=i},"./node_modules/lodash/_setWrapToString.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getWrapDetails.js"),i=r("./node_modules/lodash/_insertWrapDetails.js"),o=r("./node_modules/lodash/_setToString.js"),a=r("./node_modules/lodash/_updateWrapDetails.js");e.exports=function(e,t,r){var s=t+"";return o(e,i(s,a(n(s),r)))}},"./node_modules/lodash/_shortOut.js":e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},"./node_modules/lodash/_stackClear.js":(e,t,r)=>{var n=r("./node_modules/lodash/_ListCache.js");e.exports=function(){this.__data__=new n,this.size=0}},"./node_modules/lodash/_stackDelete.js":e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},"./node_modules/lodash/_stackGet.js":e=>{e.exports=function(e){return this.__data__.get(e)}},"./node_modules/lodash/_stackHas.js":e=>{e.exports=function(e){return this.__data__.has(e)}},"./node_modules/lodash/_stackSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_ListCache.js"),i=r("./node_modules/lodash/_Map.js"),o=r("./node_modules/lodash/_MapCache.js");e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(e,t),this.size=r.size,this}},"./node_modules/lodash/_strictIndexOf.js":e=>{e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n{var n=r("./node_modules/lodash/_memoizeCapped.js"),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)})),t}));e.exports=a},"./node_modules/lodash/_toKey.js":(e,t,r)=>{var n=r("./node_modules/lodash/isSymbol.js");e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},"./node_modules/lodash/_toSource.js":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""}},"./node_modules/lodash/_trimmedEndIndex.js":e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},"./node_modules/lodash/_updateWrapDetails.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayEach.js"),i=r("./node_modules/lodash/_arrayIncludes.js"),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return n(o,(function(r){var n="_."+r[0];t&r[1]&&!i(e,n)&&e.push(n)})),e.sort()}},"./node_modules/lodash/_wrapperClone.js":(e,t,r)=>{var n=r("./node_modules/lodash/_LazyWrapper.js"),i=r("./node_modules/lodash/_LodashWrapper.js"),o=r("./node_modules/lodash/_copyArray.js");e.exports=function(e){if(e instanceof n)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},"./node_modules/lodash/ary.js":(e,t,r)=>{var n=r("./node_modules/lodash/_createWrap.js");e.exports=function(e,t,r){return t=r?void 0:t,t=e&&null==t?e.length:t,n(e,128,void 0,void 0,void 0,void 0,t)}},"./node_modules/lodash/clone.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseClone.js");e.exports=function(e){return n(e,4)}},"./node_modules/lodash/cloneDeep.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseClone.js");e.exports=function(e){return n(e,5)}},"./node_modules/lodash/constant.js":e=>{e.exports=function(e){return function(){return e}}},"./node_modules/lodash/curry.js":(e,t,r)=>{var n=r("./node_modules/lodash/_createWrap.js");function i(e,t,r){var o=n(e,8,void 0,void 0,void 0,void 0,void 0,t=r?void 0:t);return o.placeholder=i.placeholder,o}i.placeholder={},e.exports=i},"./node_modules/lodash/debounce.js":(e,t,r)=>{var n=r("./node_modules/lodash/isObject.js"),i=r("./node_modules/lodash/now.js"),o=r("./node_modules/lodash/toNumber.js"),a=Math.max,s=Math.min;e.exports=function(e,t,r){var c,u,d,l,p,f,h=0,m=!1,_=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=c,n=u;return c=u=void 0,h=t,l=e.apply(n,r)}function g(e){return h=e,p=setTimeout(w,t),m?y(e):l}function b(e){var r=e-f;return void 0===f||r>=t||r<0||_&&e-h>=d}function w(){var e=i();if(b(e))return S(e);p=setTimeout(w,function(e){var r=t-(e-f);return _?s(r,d-(e-h)):r}(e))}function S(e){return p=void 0,v&&c?y(e):(c=u=void 0,l)}function x(){var e=i(),r=b(e);if(c=arguments,u=this,f=e,r){if(void 0===p)return g(f);if(_)return clearTimeout(p),p=setTimeout(w,t),y(f)}return void 0===p&&(p=setTimeout(w,t)),l}return t=o(t)||0,n(r)&&(m=!!r.leading,d=(_="maxWait"in r)?a(o(r.maxWait)||0,t):d,v="trailing"in r?!!r.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,c=f=u=p=void 0},x.flush=function(){return void 0===p?l:S(i())},x}},"./node_modules/lodash/eq.js":e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},"./node_modules/lodash/find.js":(e,t,r)=>{var n=r("./node_modules/lodash/_createFind.js")(r("./node_modules/lodash/findIndex.js"));e.exports=n},"./node_modules/lodash/findIndex.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseFindIndex.js"),i=r("./node_modules/lodash/_baseIteratee.js"),o=r("./node_modules/lodash/toInteger.js"),a=Math.max;e.exports=function(e,t,r){var s=null==e?0:e.length;if(!s)return-1;var c=null==r?0:o(r);return c<0&&(c=a(s+c,0)),n(e,i(t,3),c)}},"./node_modules/lodash/findKey.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseFindKey.js"),i=r("./node_modules/lodash/_baseForOwn.js"),o=r("./node_modules/lodash/_baseIteratee.js");e.exports=function(e,t){return n(e,o(t,3),i)}},"./node_modules/lodash/flatten.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseFlatten.js");e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},"./node_modules/lodash/flowRight.js":(e,t,r)=>{var n=r("./node_modules/lodash/_createFlow.js")(!0);e.exports=n},"./node_modules/lodash/fp/_baseConvert.js":(e,t,r)=>{var n=r("./node_modules/lodash/fp/_mapping.js"),i=r("./node_modules/lodash/fp/placeholder.js"),o=Array.prototype.push;function a(e,t){return 2==t?function(t,r){return e(t,r)}:function(t){return e(t)}}function s(e){for(var t=e?e.length:0,r=Array(t);t--;)r[t]=e[t];return r}function c(e,t){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=t.apply(void 0,n);return e.apply(void 0,n),i}}}e.exports=function e(t,r,u,d){var l="function"==typeof r,p=r===Object(r);if(p&&(d=u,u=r,r=void 0),null==u)throw new TypeError;d||(d={});var f=!("cap"in d)||d.cap,h=!("curry"in d)||d.curry,m=!("fixed"in d)||d.fixed,_=!("immutable"in d)||d.immutable,v=!("rearg"in d)||d.rearg,y=l?u:i,g="curry"in d&&d.curry,b="fixed"in d&&d.fixed,w="rearg"in d&&d.rearg,S=l?u.runInContext():void 0,x=l?u:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},k=x.ary,j=x.assign,E=x.clone,R=x.curry,O=x.forEach,T=x.isArray,P=x.isError,A=x.isFunction,D=x.isWeakMap,C=x.keys,L=x.rearg,I=x.toInteger,M=x.toPath,B=C(n.aryMethod),N={castArray:function(e){return function(){var t=arguments[0];return T(t)?e(s(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],r=arguments[1],n=e(t,r),i=n.length;return f&&"number"==typeof r?(r=r>2?r-2:1,i&&i<=r?n:a(n,r)):n}},mixin:function(e){return function(t){var r=this;if(!A(r))return e(r,Object(t));var n=[];return O(C(t),(function(e){A(t[e])&&n.push([e,r.prototype[e]])})),e(r,Object(t)),O(n,(function(e){var t=e[1];A(t)?r.prototype[e[0]]=t:delete r.prototype[e[0]]})),r}},nthArg:function(e){return function(t){var r=t<0?1:I(t)+1;return R(e(t),r)}},rearg:function(e){return function(t,r){var n=r?r.length:0;return R(e(t,r),n)}},runInContext:function(r){return function(n){return e(t,r(n),d)}}};function U(e,t){if(f){var r=n.iterateeRearg[e];if(r)return function(e,t){return q(e,(function(e){var r=t.length;return function(e,t){return 2==t?function(t,r){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}(L(a(e,r),t),r)}))}(t,r);var i=!l&&n.iterateeAry[e];if(i)return function(e,t){return q(e,(function(e){return"function"==typeof e?a(e,t):e}))}(t,i)}return t}function G(e,t,r){if(m&&(b||!n.skipFixed[e])){var i=n.methodSpread[e],a=i&&i.start;return void 0===a?k(t,r):function(e,t){return function(){for(var r=arguments.length,n=r-1,i=Array(r);r--;)i[r]=arguments[r];var a=i[t],s=i.slice(0,t);return a&&o.apply(s,a),t!=n&&o.apply(s,i.slice(t+1)),e.apply(this,s)}}(t,a)}return t}function F(e,t,r){return v&&r>1&&(w||!n.skipRearg[e])?L(t,n.methodRearg[e]||n.aryRearg[r]):t}function V(e,t){for(var r=-1,n=(t=M(t)).length,i=n-1,o=E(Object(e)),a=o;null!=a&&++r1?R(t,r):t}(0,i=U(o,i),e),!1}})),!i})),i||(i=a),i==t&&(i=g?R(i,1):function(){return t.apply(this,arguments)}),i.convert=z(o,t),i.placeholder=t.placeholder=r,i}if(!p)return W(r,u,y);var H=u,K=[];return O(B,(function(e){O(n.aryMethod[e],(function(e){var t=H[n.remap[e]||e];t&&K.push([e,W(e,t,H)])}))})),O(C(H),(function(e){var t=H[e];if("function"==typeof t){for(var r=K.length;r--;)if(K[r][0]==e)return;t.convert=z(e,t),K.push([e,t])}})),O(K,(function(e){H[e[0]]=e[1]})),H.convert=function(e){return H.runInContext.convert(e)(void 0)},H.placeholder=H,O(C(H),(function(e){O(n.realToAlias[e]||[],(function(t){H[t]=H[e]}))})),H}},"./node_modules/lodash/fp/_mapping.js":(e,t)=>{t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,r=t.aliasToReal,n={};for(var i in r){var o=r[i];e.call(n,o)?n[o].push(i):n[o]=[i]}return n}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},"./node_modules/lodash/fp/_util.js":(e,t,r)=>{e.exports={ary:r("./node_modules/lodash/ary.js"),assign:r("./node_modules/lodash/_baseAssign.js"),clone:r("./node_modules/lodash/clone.js"),curry:r("./node_modules/lodash/curry.js"),forEach:r("./node_modules/lodash/_arrayEach.js"),isArray:r("./node_modules/lodash/isArray.js"),isError:r("./node_modules/lodash/isError.js"),isFunction:r("./node_modules/lodash/isFunction.js"),isWeakMap:r("./node_modules/lodash/isWeakMap.js"),iteratee:r("./node_modules/lodash/iteratee.js"),keys:r("./node_modules/lodash/_baseKeys.js"),rearg:r("./node_modules/lodash/rearg.js"),toInteger:r("./node_modules/lodash/toInteger.js"),toPath:r("./node_modules/lodash/toPath.js")}},"./node_modules/lodash/fp/compose.js":(e,t,r)=>{e.exports=r("./node_modules/lodash/fp/flowRight.js")},"./node_modules/lodash/fp/convert.js":(e,t,r)=>{var n=r("./node_modules/lodash/fp/_baseConvert.js"),i=r("./node_modules/lodash/fp/_util.js");e.exports=function(e,t,r){return n(i,e,t,r)}},"./node_modules/lodash/fp/flowRight.js":(e,t,r)=>{var n=r("./node_modules/lodash/fp/convert.js")("flowRight",r("./node_modules/lodash/flowRight.js"));n.placeholder=r("./node_modules/lodash/fp/placeholder.js"),e.exports=n},"./node_modules/lodash/fp/getOr.js":(e,t,r)=>{var n=r("./node_modules/lodash/fp/convert.js")("getOr",r("./node_modules/lodash/get.js"));n.placeholder=r("./node_modules/lodash/fp/placeholder.js"),e.exports=n},"./node_modules/lodash/fp/placeholder.js":e=>{e.exports={}},"./node_modules/lodash/get.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGet.js");e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},"./node_modules/lodash/hasIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseHasIn.js"),i=r("./node_modules/lodash/_hasPath.js");e.exports=function(e,t){return null!=e&&i(e,t,n)}},"./node_modules/lodash/identity.js":e=>{e.exports=function(e){return e}},"./node_modules/lodash/isArguments.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsArguments.js"),i=r("./node_modules/lodash/isObjectLike.js"),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},"./node_modules/lodash/isArray.js":e=>{var t=Array.isArray;e.exports=t},"./node_modules/lodash/isArrayLike.js":(e,t,r)=>{var n=r("./node_modules/lodash/isFunction.js"),i=r("./node_modules/lodash/isLength.js");e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},"./node_modules/lodash/isBuffer.js":(e,t,r)=>{e=r.nmd(e);var n=r("./node_modules/lodash/_root.js"),i=r("./node_modules/lodash/stubFalse.js"),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?n.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;e.exports=c},"./node_modules/lodash/isEmpty.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseKeys.js"),i=r("./node_modules/lodash/_getTag.js"),o=r("./node_modules/lodash/isArguments.js"),a=r("./node_modules/lodash/isArray.js"),s=r("./node_modules/lodash/isArrayLike.js"),c=r("./node_modules/lodash/isBuffer.js"),u=r("./node_modules/lodash/_isPrototype.js"),d=r("./node_modules/lodash/isTypedArray.js"),l=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)||d(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!n(e).length;for(var r in e)if(l.call(e,r))return!1;return!0}},"./node_modules/lodash/isEqual.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsEqual.js");e.exports=function(e,t){return n(e,t)}},"./node_modules/lodash/isError.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),i=r("./node_modules/lodash/isObjectLike.js"),o=r("./node_modules/lodash/isPlainObject.js");e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!o(e)}},"./node_modules/lodash/isFunction.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),i=r("./node_modules/lodash/isObject.js");e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},"./node_modules/lodash/isLength.js":e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"./node_modules/lodash/isMap.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsMap.js"),i=r("./node_modules/lodash/_baseUnary.js"),o=r("./node_modules/lodash/_nodeUtil.js"),a=o&&o.isMap,s=a?i(a):n;e.exports=s},"./node_modules/lodash/isObject.js":e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"./node_modules/lodash/isObjectLike.js":e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},"./node_modules/lodash/isPlainObject.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),i=r("./node_modules/lodash/_getPrototype.js"),o=r("./node_modules/lodash/isObjectLike.js"),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,d=c.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=i(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==d}},"./node_modules/lodash/isSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsSet.js"),i=r("./node_modules/lodash/_baseUnary.js"),o=r("./node_modules/lodash/_nodeUtil.js"),a=o&&o.isSet,s=a?i(a):n;e.exports=s},"./node_modules/lodash/isSymbol.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),i=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},"./node_modules/lodash/isTypedArray.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsTypedArray.js"),i=r("./node_modules/lodash/_baseUnary.js"),o=r("./node_modules/lodash/_nodeUtil.js"),a=o&&o.isTypedArray,s=a?i(a):n;e.exports=s},"./node_modules/lodash/isWeakMap.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getTag.js"),i=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return i(e)&&"[object WeakMap]"==n(e)}},"./node_modules/lodash/iteratee.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseClone.js"),i=r("./node_modules/lodash/_baseIteratee.js");e.exports=function(e){return i("function"==typeof e?e:n(e,1))}},"./node_modules/lodash/keys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayLikeKeys.js"),i=r("./node_modules/lodash/_baseKeys.js"),o=r("./node_modules/lodash/isArrayLike.js");e.exports=function(e){return o(e)?n(e):i(e)}},"./node_modules/lodash/keysIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayLikeKeys.js"),i=r("./node_modules/lodash/_baseKeysIn.js"),o=r("./node_modules/lodash/isArrayLike.js");e.exports=function(e){return o(e)?n(e,!0):i(e)}},"./node_modules/lodash/memoize.js":(e,t,r)=>{var n=r("./node_modules/lodash/_MapCache.js");function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},"./node_modules/lodash/negate.js":e=>{e.exports=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}},"./node_modules/lodash/noop.js":e=>{e.exports=function(){}},"./node_modules/lodash/now.js":(e,t,r)=>{var n=r("./node_modules/lodash/_root.js");e.exports=function(){return n.Date.now()}},"./node_modules/lodash/omitBy.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIteratee.js"),i=r("./node_modules/lodash/negate.js"),o=r("./node_modules/lodash/pickBy.js");e.exports=function(e,t){return o(e,i(n(t)))}},"./node_modules/lodash/pick.js":(e,t,r)=>{var n=r("./node_modules/lodash/_basePick.js"),i=r("./node_modules/lodash/_flatRest.js")((function(e,t){return null==e?{}:n(e,t)}));e.exports=i},"./node_modules/lodash/pickBy.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayMap.js"),i=r("./node_modules/lodash/_baseIteratee.js"),o=r("./node_modules/lodash/_basePickBy.js"),a=r("./node_modules/lodash/_getAllKeysIn.js");e.exports=function(e,t){if(null==e)return{};var r=n(a(e),(function(e){return[e]}));return t=i(t),o(e,r,(function(e,r){return t(e,r[0])}))}},"./node_modules/lodash/property.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseProperty.js"),i=r("./node_modules/lodash/_basePropertyDeep.js"),o=r("./node_modules/lodash/_isKey.js"),a=r("./node_modules/lodash/_toKey.js");e.exports=function(e){return o(e)?n(a(e)):i(e)}},"./node_modules/lodash/rearg.js":(e,t,r)=>{var n=r("./node_modules/lodash/_createWrap.js"),i=r("./node_modules/lodash/_flatRest.js"),o=i((function(e,t){return n(e,256,void 0,void 0,void 0,t)}));e.exports=o},"./node_modules/lodash/set.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseSet.js");e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},"./node_modules/lodash/stubArray.js":e=>{e.exports=function(){return[]}},"./node_modules/lodash/stubFalse.js":e=>{e.exports=function(){return!1}},"./node_modules/lodash/throttle.js":(e,t,r)=>{var n=r("./node_modules/lodash/debounce.js"),i=r("./node_modules/lodash/isObject.js");e.exports=function(e,t,r){var o=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),n(e,t,{leading:o,maxWait:t,trailing:a})}},"./node_modules/lodash/toFinite.js":(e,t,r)=>{var n=r("./node_modules/lodash/toNumber.js");e.exports=function(e){return e?(e=n(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},"./node_modules/lodash/toInteger.js":(e,t,r)=>{var n=r("./node_modules/lodash/toFinite.js");e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},"./node_modules/lodash/toNumber.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseTrim.js"),i=r("./node_modules/lodash/isObject.js"),o=r("./node_modules/lodash/isSymbol.js"),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=n(e);var r=s.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):a.test(e)?NaN:+e}},"./node_modules/lodash/toPath.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayMap.js"),i=r("./node_modules/lodash/_copyArray.js"),o=r("./node_modules/lodash/isArray.js"),a=r("./node_modules/lodash/isSymbol.js"),s=r("./node_modules/lodash/_stringToPath.js"),c=r("./node_modules/lodash/_toKey.js"),u=r("./node_modules/lodash/toString.js");e.exports=function(e){return o(e)?n(e,c):a(e)?[e]:i(s(u(e)))}},"./node_modules/lodash/toString.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseToString.js");e.exports=function(e){return null==e?"":n(e)}},"./node_modules/lodash/wrapperLodash.js":(e,t,r)=>{var n=r("./node_modules/lodash/_LazyWrapper.js"),i=r("./node_modules/lodash/_LodashWrapper.js"),o=r("./node_modules/lodash/_baseLodash.js"),a=r("./node_modules/lodash/isArray.js"),s=r("./node_modules/lodash/isObjectLike.js"),c=r("./node_modules/lodash/_wrapperClone.js"),u=Object.prototype.hasOwnProperty;function d(e){if(s(e)&&!a(e)&&!(e instanceof n)){if(e instanceof i)return e;if(u.call(e,"__wrapped__"))return c(e)}return new i(e)}d.prototype=o.prototype,d.prototype.constructor=d,e.exports=d},"./node_modules/lscache/lscache.js":function(e,t){var r,n,i;n=[],void 0===(i="function"==typeof(r=function(){var e,t,r=6e4,n=y(r),i="",o=!1;function a(){var t="__lscachetest__";if(void 0!==e)return e;try{if(!localStorage)return!1}catch(e){return!1}try{p(t,"__lscachetest__"),f(t),e=!0}catch(t){e=!(!s(t)||!localStorage.length)}return e}function s(e){return e&&("QUOTA_EXCEEDED_ERR"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||"QuotaExceededError"===e.name)}function c(){return void 0===t&&(t=null!=window.JSON),t}function u(e){return e+"-cacheexpiration"}function d(){return Math.floor((new Date).getTime()/r)}function l(e){return localStorage.getItem("lscache-"+i+e)}function p(e,t){localStorage.removeItem("lscache-"+i+e),localStorage.setItem("lscache-"+i+e,t)}function f(e){localStorage.removeItem("lscache-"+i+e)}function h(e){var t,r,n=new RegExp("^lscache-"+i.replace(/[[\]{}()*+?.\\^$|]/g,"\\$&")+"(.*)"),o=[];for(r=0;r=n)return f(e),f(t),!0}}function v(e,t){o&&"console"in window&&"function"==typeof window.console.warn&&(window.console.warn("lscache - "+e),t&&window.console.warn("lscache - The error was: "+t.message))}function y(e){return Math.floor(864e13/e)}return{set:function(e,t,r){if(!a())return!1;if(!c())return!1;try{t=JSON.stringify(t)}catch(e){return!1}try{p(e,t)}catch(r){if(!s(r))return v("Could not add item with key '"+e+"'",r),!1;var i,o=[];h((function(e,t){var r=l(t);r=r?parseInt(r,10):n,o.push({key:e,size:(l(e)||"").length,expiration:r})})),o.sort((function(e,t){return t.expiration-e.expiration}));for(var _=(t||"").length;o.length&&_>0;)v("Cache is full, removing item with key '"+(i=o.pop()).key+"'"),m(i.key),_-=i.size;try{p(e,t)}catch(t){return v("Could not add item with key '"+e+"', perhaps it's too big?",t),!1}}return r?p(u(e),(d()+r).toString(10)):f(u(e)),!0},get:function(e){if(!a())return null;if(_(e))return null;var t=l(e);if(!t||!c())return t;try{return JSON.parse(t)}catch(e){return t}},remove:function(e){a()&&m(e)},supported:function(){return a()},flush:function(){a()&&h((function(e){m(e)}))},flushExpired:function(){a()&&h((function(e){_(e)}))},setBucket:function(e){i=e},resetBucket:function(){i=""},getExpiryMilliseconds:function(){return r},setExpiryMilliseconds:function(e){n=y(r=e)},enableWarnings:function(e){o=e}}})?r.apply(t,n):r)||(e.exports=i)},"./node_modules/memoize-one/dist/memoize-one.esm.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function i(e,t){if(e.length!==t.length)return!1;for(var r=0;r{"use strict";function n(e){return Object.prototype.toString.call(e).slice(8,-1)}function i(e){return"Undefined"===n(e)}function o(e){return"Null"===n(e)}function a(e){return"Object"===n(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function s(e){return"Array"===n(e)}function c(e){return"Symbol"===n(e)}r.d(t,{Ay:()=>v});var u,d,l,p,f;u=o,d=i;function h(){for(var e=0,t=0,r=arguments.length;t{"use strict";r.r(t),r.d(t,{Observer:()=>E,clearTimers:()=>D,enableStaticRendering:()=>h,isObserverBatched:()=>u,isUsingStaticRendering:()=>m,observer:()=>k,observerBatching:()=>c,useAsObservableSource:()=>P,useLocalObservable:()=>R,useLocalStore:()=>A,useObserver:()=>C,useStaticRendering:()=>L});var n=r("./node_modules/mobx/dist/mobx.esm.js"),i=r("webpack/sharing/consume/default/react/react"),o=r.n(i);if(!i.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!n.makeObservable)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var a=r("webpack/sharing/consume/default/react-dom/react-dom");function s(e){e()}function c(e){e||(e=s),(0,n.configure)({reactionScheduler:e})}var u=function(){return!0};function d(e){return(0,n.getDependencyTree)(e)}var l=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var r=Date.now();t.registrations.forEach((function(n,i){r-n.registeredAt>=e&&(t.finalize(n.value),t.registrations.delete(i))})),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),p=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:l)((function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null})),f=!1;function h(e){f=e}function m(){return f}var _=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function v(e){return"observer".concat(e)}var y=function(){};function g(){return new y}function b(e,t){if(void 0===t&&(t="observed"),m())return e();var r=_(o().useState(g),1)[0],i=_(o().useState(),2)[1],a=function(){return i([])},s=o().useRef(null);s.current||(s.current={reaction:null,mounted:!1,changedBeforeMount:!1});var c,u,l=s.current;if(l.reaction||(l.reaction=new n.Reaction(v(t),(function(){l.mounted?a():l.changedBeforeMount=!0})),p.register(r,l,l)),o().useDebugValue(l.reaction,d),o().useEffect((function(){return p.unregister(l),l.mounted=!0,l.reaction?l.changedBeforeMount&&(l.changedBeforeMount=!1,a()):(l.reaction=new n.Reaction(v(t),(function(){a()})),a()),function(){l.reaction.dispose(),l.reaction=null,l.mounted=!1,l.changedBeforeMount=!1}}),[]),l.reaction.track((function(){try{c=e()}catch(e){u=e}})),u)throw u;return c}var w="function"==typeof Symbol&&Symbol.for,S=w?Symbol.for("react.forward_ref"):"function"==typeof i.forwardRef&&(0,i.forwardRef)((function(e){return null})).$$typeof,x=w?Symbol.for("react.memo"):"function"==typeof i.memo&&(0,i.memo)((function(e){return null})).$$typeof;function k(e,t){var r;if(x&&e.$$typeof===x)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(m())return e;var n=null!==(r=null==t?void 0:t.forwardRef)&&void 0!==r&&r,o=e,a=e.displayName||e.name;if(S&&e.$$typeof===S&&(n=!0,"function"!=typeof(o=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var s,c,u=function(e,t){return b((function(){return o(e,t)}),a)};return""!==a&&(u.displayName=a),e.contextTypes&&(u.contextTypes=e.contextTypes),n&&(u=(0,i.forwardRef)(u)),u=(0,i.memo)(u),s=e,c=u,Object.keys(s).forEach((function(e){j[e]||Object.defineProperty(c,e,Object.getOwnPropertyDescriptor(s,e))})),u}var j={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function E(e){var t=e.children,r=e.render,n=t||r;return"function"!=typeof n?null:b(n)}function R(e,t){return(0,i.useState)((function(){return(0,n.observable)(e(),t,{autoBind:!0})}))[0]}E.displayName="Observer";var O,T=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};function P(e){var t=T((0,i.useState)((function(){return(0,n.observable)(e,{},{deep:!1})})),1)[0];return(0,n.runInAction)((function(){Object.assign(t,e)})),t}function A(e,t){var r=t&&P(t);return(0,i.useState)((function(){return(0,n.observable)(e(r),void 0,{autoBind:!0})}))[0]}c(a.unstable_batchedUpdates);var D=null!==(O=p.finalizeAllImmediately)&&void 0!==O?O:function(){};function C(e,t){return void 0===t&&(t="observed"),b(e,t)}function L(e){h(e)}},"./node_modules/mobx/dist/mobx.esm.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{$mobx:()=>q,FlowCancellationError:()=>ir,ObservableMap:()=>pn,ObservableSet:()=>mn,Reaction:()=>Ot,_allowStateChanges:()=>We,_allowStateChangesInsideComputed:()=>Vt,_allowStateReadsEnd:()=>pt,_allowStateReadsStart:()=>lt,_autoAction:()=>Ft,_endAction:()=>qe,_getAdministration:()=>Bn,_getGlobalState:()=>gt,_interceptReads:()=>pr,_isComputingDerivation:()=>it,_resetGlobalState:()=>bt,_startAction:()=>ze,action:()=>Gt,autorun:()=>qt,comparer:()=>Y,computed:()=>Ie,configure:()=>Xt,createAtom:()=>K,defineProperty:()=>Rr,entries:()=>Sr,extendObservable:()=>Qt,flow:()=>cr,flowResult:()=>dr,get:()=>Er,getAtom:()=>Mn,getDebugName:()=>Nn,getDependencyTree:()=>Zt,getObserverTree:()=>tr,has:()=>jr,intercept:()=>fr,isAction:()=>zt,isBoxedObservable:()=>Je,isComputed:()=>mr,isComputedProp:()=>_r,isFlow:()=>lr,isFlowCancellationError:()=>or,isObservable:()=>yr,isObservableArray:()=>sn,isObservableMap:()=>fn,isObservableObject:()=>Sn,isObservableProp:()=>gr,isObservableSet:()=>_n,keys:()=>br,makeAutoObservable:()=>Kr,makeObservable:()=>Wr,observable:()=>De,observe:()=>Tr,onBecomeObserved:()=>Yt,onBecomeUnobserved:()=>$t,onReactionError:()=>Tt,override:()=>X,ownKeys:()=>Or,reaction:()=>Kt,remove:()=>kr,runInAction:()=>Vt,set:()=>xr,spy:()=>Lt,toJS:()=>Ar,trace:()=>Dr,transaction:()=>Cr,untracked:()=>ct,values:()=>wr,when:()=>Lr});function n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var G=Symbol("mobx-stored-annotations");function F(e){return Object.assign((function(t,r){if(z(r))return e.decorate_20223_(t,r);V(t,r,e)}),e)}function V(e,t,r){P(e,G)||S(e,G,L({},e[G])),function(e){return"override"===e.annotationType_}(r)||(e[G][t]=r)}function z(e){return"object"==typeof e&&"string"==typeof e.kind}var q=Symbol("mobx administration"),W=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Xe.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.reportObserved=function(){return Et(this)},t.reportChanged=function(){kt(),Rt(this),jt()},t.toString=function(){return this.name_},e}(),H=k("Atom",W);function K(e,t,r){void 0===t&&(t=_),void 0===r&&(r=_);var n=new W(e);return t!==_&&Yt(n,t),r!==_&&$t(n,r),n}var Y={identity:function(e,t){return e===t},structural:function(e,t){return Fn(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t},shallow:function(e,t){return Fn(e,t,1)}};function $(e,t,r){return yr(e)?e:Array.isArray(e)?De.array(e,{name:r}):b(e)?De.object(e,void 0,{name:r}):j(e)?De.map(e,{name:r}):E(e)?De.set(e,{name:r}):"function"!=typeof e||zt(e)||lr(e)?e:w(e)?cr(e):Ft(r,e)}function J(e){return e}var X=F({annotationType_:"override",make_:function(e,t){0;0;return 0},extend_:function(e,t,r,i){n("'"+this.annotationType_+"' can only be used with 'makeObservable'")},decorate_20223_:function(e,t){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}});function Q(e,t){return{annotationType_:e,options_:t,make_:Z,extend_:ee,decorate_20223_:te}}function Z(e,t,r,n){var i;if(null!=(i=this.options_)&&i.bound)return null===this.extend_(e,t,r,!1)?0:1;if(n===e.target_)return null===this.extend_(e,t,r,!1)?0:2;if(zt(r.value))return 1;var o=re(e,this,t,r,!1);return c(n,t,o),2}function ee(e,t,r,n){var i=re(e,this,t,r);return e.defineProperty_(t,i,n)}function te(e,t){var r=t.kind,i=t.name,o=t.addInitializer,a=this;if("field"!=r){var s,c,u,d,l,p;if("method"==r)return zt(e)||(c=e,e=Fe(null!=(u=null==(d=a.options_)?void 0:d.name)?u:i.toString(),c,null!=(l=null==(p=a.options_)?void 0:p.autoAction)&&l)),null!=(s=this.options_)&&s.bound&&o((function(){var e=this[i].bind(this);e.isMobxAction=!0,this[i]=e})),e;n("Cannot apply '"+a.annotationType_+"' to '"+String(i)+"' (kind: "+r+"):\n'"+a.annotationType_+"' can only be used on properties with a function value.")}else o((function(){V(this,i,a)}))}function re(e,t,r,n,i){var o,a,s,c,u,d,l,p;void 0===i&&(i=yt.safeDescriptors),p=n,t.annotationType_,p.value;var f,h=n.value;null!=(o=t.options_)&&o.bound&&(h=h.bind(null!=(f=e.proxy_)?f:e.target_));return{value:Fe(null!=(a=null==(s=t.options_)?void 0:s.name)?a:r.toString(),h,null!=(c=null==(u=t.options_)?void 0:u.autoAction)&&c,null!=(d=t.options_)&&d.bound?null!=(l=e.proxy_)?l:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ne(e,t){return{annotationType_:e,options_:t,make_:ie,extend_:oe,decorate_20223_:ae}}function ie(e,t,r,n){var i;if(n===e.target_)return null===this.extend_(e,t,r,!1)?0:2;if(null!=(i=this.options_)&&i.bound&&(!P(e.target_,t)||!lr(e.target_[t]))&&null===this.extend_(e,t,r,!1))return 0;if(lr(r.value))return 1;var o=se(e,this,t,r,!1,!1);return c(n,t,o),2}function oe(e,t,r,n){var i,o=se(e,this,t,r,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,o,n)}function ae(e,t){var r;var n=t.name,i=t.addInitializer;return lr(e)||(e=cr(e)),null!=(r=this.options_)&&r.bound&&i((function(){var e=this[n].bind(this);e.isMobXFlow=!0,this[n]=e})),e}function se(e,t,r,n,i,o){var a;void 0===o&&(o=yt.safeDescriptors),a=n,t.annotationType_,a.value;var s,c=n.value;(lr(c)||(c=cr(c)),i)&&((c=c.bind(null!=(s=e.proxy_)?s:e.target_)).isMobXFlow=!0);return{value:c,configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function ce(e,t){return{annotationType_:e,options_:t,make_:ue,extend_:de,decorate_20223_:le}}function ue(e,t,r){return null===this.extend_(e,t,r,!1)?0:1}function de(e,t,r,n){return function(e,t,r,n){t.annotationType_,n.get;0}(0,this,0,r),e.defineComputedProperty_(t,L({},this.options_,{get:r.get,set:r.set}),n)}function le(e,t){var r=this,n=t.name;return(0,t.addInitializer)((function(){var t=gn(this)[q],i=L({},r.options_,{get:e,context:this});i.name||(i.name="ObservableObject."+n.toString()),t.values_.set(n,new Ze(i))})),function(){return this[q].getObservablePropValue_(n)}}function pe(e,t){return{annotationType_:e,options_:t,make_:fe,extend_:he,decorate_20223_:me}}function fe(e,t,r){return null===this.extend_(e,t,r,!1)?0:1}function he(e,t,r,n){var i,o;return function(e,t,r,n){t.annotationType_;0}(0,this),e.defineObservableProperty_(t,r.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:$,n)}function me(e,t){var r=this,n=t.kind,i=t.name,o=new WeakSet;function a(e,t){var n,a,s=gn(e)[q],c=new $e(t,null!=(n=null==(a=r.options_)?void 0:a.enhancer)?n:$,"ObservableObject."+i.toString(),!1);s.values_.set(i,c),o.add(e)}if("accessor"==n)return{get:function(){return o.has(this)||a(this,e.get.call(this)),this[q].getObservablePropValue_(i)},set:function(e){return o.has(this)||a(this,e),this[q].setObservablePropValue_(i,e)},init:function(e){return o.has(this)||a(this,e),e}}}var _e=ve();function ve(e){return{annotationType_:"true",options_:e,make_:ye,extend_:ge,decorate_20223_:be}}function ye(e,t,r,n){var i,o,a,s;if(r.get)return Ie.make_(e,t,r,n);if(r.set){var u=Fe(t.toString(),r.set);return n===e.target_?null===e.defineProperty_(t,{configurable:!yt.safeDescriptors||e.isPlainObject_,set:u})?0:2:(c(n,t,{configurable:!0,set:u}),2)}if(n!==e.target_&&"function"==typeof r.value)return w(r.value)?(null!=(s=this.options_)&&s.autoBind?cr.bound:cr).make_(e,t,r,n):(null!=(a=this.options_)&&a.autoBind?Ft.bound:Ft).make_(e,t,r,n);var d,l=!1===(null==(i=this.options_)?void 0:i.deep)?De.ref:De;"function"==typeof r.value&&null!=(o=this.options_)&&o.autoBind&&(r.value=r.value.bind(null!=(d=e.proxy_)?d:e.target_));return l.make_(e,t,r,n)}function ge(e,t,r,n){var i,o,a;if(r.get)return Ie.extend_(e,t,r,n);if(r.set)return e.defineProperty_(t,{configurable:!yt.safeDescriptors||e.isPlainObject_,set:Fe(t.toString(),r.set)},n);"function"==typeof r.value&&null!=(i=this.options_)&&i.autoBind&&(r.value=r.value.bind(null!=(a=e.proxy_)?a:e.target_));return(!1===(null==(o=this.options_)?void 0:o.deep)?De.ref:De).extend_(e,t,r,n)}function be(e,t){n("'"+this.annotationType_+"' cannot be used as a decorator")}var we={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Se(e){return e||we}Object.freeze(we);var xe=pe("observable"),ke=pe("observable.ref",{enhancer:J}),je=pe("observable.shallow",{enhancer:function(e,t,r){return null==e||Sn(e)||sn(e)||fn(e)||_n(e)?e:Array.isArray(e)?De.array(e,{name:r,deep:!1}):b(e)?De.object(e,void 0,{name:r,deep:!1}):j(e)?De.map(e,{name:r,deep:!1}):E(e)?De.set(e,{name:r,deep:!1}):void 0}}),Ee=pe("observable.struct",{enhancer:function(e,t){return Fn(e,t)?t:e}}),Re=F(xe);function Oe(e){return!0===e.deep?$:!1===e.deep?J:(t=e.defaultDecorator)&&null!=(r=null==(n=t.options_)?void 0:n.enhancer)?r:$;var t,r,n}function Te(e,t,r){return z(t)?xe.decorate_20223_(e,t):y(t)?void V(e,t,xe):yr(e)?e:b(e)?De.object(e,t,r):Array.isArray(e)?De.array(e,t):j(e)?De.map(e,t):E(e)?De.set(e,t):"object"==typeof e&&null!==e?e:De.box(e,t)}a(Te,Re);var Pe,Ae,De=a(Te,{box:function(e,t){var r=Se(t);return new $e(e,Oe(r),r.name,!0,r.equals)},array:function(e,t){var r=Se(t);return(!1===yt.useProxies||!1===r.proxy?In:Xr)(e,Oe(r),r.name)},map:function(e,t){var r=Se(t);return new pn(e,Oe(r),r.name)},set:function(e,t){var r=Se(t);return new mn(e,Oe(r),r.name)},object:function(e,t,r){return Un((function(){return Qt(!1===yt.useProxies||!1===(null==r?void 0:r.proxy)?gn({},r):function(e,t){var r,n;return h(),e=gn(e,t),null!=(n=(r=e[q]).proxy_)?n:r.proxy_=new Proxy(e,Nr)}({},r),e,t)}))},ref:F(ke),shallow:F(je),deep:Re,struct:F(Ee)}),Ce=ce("computed"),Le=ce("computed.struct",{equals:Y.structural}),Ie=function(e,t){if(z(t))return Ce.decorate_20223_(e,t);if(y(t))return V(e,t,Ce);if(b(e))return F(ce("computed",e));var r=b(t)?t:{};return r.get=e,r.name||(r.name=e.name||""),new Ze(r)};Object.assign(Ie,Ce),Ie.struct=F(Le);var Me,Be=0,Ne=1,Ue=null!=(Pe=null==(Ae=s((function(){}),"name"))?void 0:Ae.configurable)&&Pe,Ge={value:"action",configurable:!0,writable:!1,enumerable:!1};function Fe(e,t,r,n){function i(){return Ve(e,r,t,n||this,arguments)}return void 0===r&&(r=!1),i.isMobxAction=!0,i.toString=function(){return t.toString()},Ue&&(Ge.value=e,c(i,"name",Ge)),i}function Ve(e,t,r,n,i){var o=ze(e,t,n,i);try{return r.apply(n,i)}catch(e){throw o.error_=e,e}finally{qe(o)}}function ze(e,t,r,n){var i=yt.trackingDerivation,o=!t||!i;kt();var a=yt.allowStateChanges;o&&(ut(),a=He(!0));var s={runAsAction_:o,prevDerivation_:i,prevAllowStateChanges_:a,prevAllowStateReads_:lt(!0),notifySpy_:!1,startTime_:0,actionId_:Ne++,parentActionId_:Be};return Be=s.actionId_,s}function qe(e){Be!==e.actionId_&&n(30),Be=e.parentActionId_,void 0!==e.error_&&(yt.suppressReactionErrors=!0),Ke(e.prevAllowStateChanges_),pt(e.prevAllowStateReads_),jt(),e.runAsAction_&&dt(e.prevDerivation_),yt.suppressReactionErrors=!1}function We(e,t){var r=He(e);try{return t()}finally{Ke(r)}}function He(e){var t=yt.allowStateChanges;return yt.allowStateChanges=e,t}function Ke(e){yt.allowStateChanges=e}Me=Symbol.toPrimitive;var Ye,$e=function(e){function t(t,r,n,i,o){var a;return void 0===n&&(n="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=Y.default),(a=e.call(this,n)||this).enhancer=void 0,a.name_=void 0,a.equals=void 0,a.hasUnreportedChange_=!1,a.interceptors_=void 0,a.changeListeners_=void 0,a.value_=void 0,a.dehancer=void 0,a.enhancer=r,a.name_=n,a.equals=o,a.value_=r(t,void 0,n),a}I(t,e);var r=t.prototype;return r.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},r.set=function(e){this.value_;if((e=this.prepareNewValue_(e))!==yt.UNCHANGED){0,this.setNewValue_(e)}},r.prepareNewValue_=function(e){if(ot(this),Ur(this)){var t=Fr(this,{object:this,type:Yr,newValue:e});if(!t)return yt.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?yt.UNCHANGED:e},r.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Vr(this)&&qr(this,{type:Yr,object:this,newValue:e,oldValue:t})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(e){return Gr(this,e)},r.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:Yr,newValue:this.value_,oldValue:void 0}),zr(this,e)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return T(this.get())},r[Me]=function(){return this.valueOf()},t}(W),Je=k("ObservableValue",$e);Ye=Symbol.toPrimitive;var Xe,Qe,Ze=function(){function e(e){this.dependenciesState_=Xe.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Xe.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new tt(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Qe.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||n(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=Fe("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Y.structural:Y.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Xe.UP_TO_DATE_)return;e.lowestObserverState_=Xe.POSSIBLY_STALE_,e.observers_.forEach((function(e){e.dependenciesState_===Xe.UP_TO_DATE_&&(e.dependenciesState_=Xe.POSSIBLY_STALE_,e.onBecomeStale_())}))}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.get=function(){if(this.isComputing_&&n(32,this.name_,this.derivation),0!==yt.inBatch||0!==this.observers_.size||this.keepAlive_){if(Et(this),nt(this)){var e=yt.trackingContext;this.keepAlive_&&!e&&(yt.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Xe.STALE_)return;e.lowestObserverState_=Xe.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Xe.POSSIBLY_STALE_?t.dependenciesState_=Xe.STALE_:t.dependenciesState_===Xe.UP_TO_DATE_&&(e.lowestObserverState_=Xe.UP_TO_DATE_)}))}(this),yt.trackingContext=e}}else nt(this)&&(this.warnAboutUntrackedRead_(),kt(),this.value_=this.computeValue_(!1),jt());var t=this.value_;if(rt(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter_&&n(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else n(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Xe.NOT_TRACKING_,r=this.computeValue_(!0),n=t||rt(e)||rt(r)||!this.equals_(e,r);return n&&(this.value_=r),n},t.computeValue_=function(e){this.isComputing_=!0;var t,r=He(!1);if(e)t=at(this,this.derivation,this.scope_);else if(!0===yt.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new tt(e)}return Ke(r),this.isComputing_=!1,t},t.suspend_=function(){this.keepAlive_||(st(this),this.value_=void 0)},t.observe_=function(e,t){var r=this,n=!0,i=void 0;return qt((function(){var o=r.get();if(!n||t){var a=ut();e({observableKind:"computed",debugObjectName:r.name_,type:Yr,object:r,newValue:o,oldValue:i}),dt(a)}n=!1,i=o}))},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return T(this.get())},t[Ye]=function(){return this.valueOf()},e}(),et=k("ComputedValue",Ze);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Xe||(Xe={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Qe||(Qe={}));var tt=function(e){this.cause=void 0,this.cause=e};function rt(e){return e instanceof tt}function nt(e){switch(e.dependenciesState_){case Xe.UP_TO_DATE_:return!1;case Xe.NOT_TRACKING_:case Xe.STALE_:return!0;case Xe.POSSIBLY_STALE_:for(var t=lt(!0),r=ut(),n=e.observing_,i=n.length,o=0;on&&(n=s.dependenciesState_)}r.length=i,e.newObserving_=null,o=t.length;for(;o--;){var c=t[o];0===c.diffValue_&&St(c,e),c.diffValue_=0}for(;i--;){var u=r[i];1===u.diffValue_&&(u.diffValue_=0,wt(u,e))}n!==Xe.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}(e),pt(n),i}function st(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)St(t[r],e);e.dependenciesState_=Xe.NOT_TRACKING_}function ct(e){var t=ut();try{return e()}finally{dt(t)}}function ut(){var e=yt.trackingDerivation;return yt.trackingDerivation=null,e}function dt(e){yt.trackingDerivation=e}function lt(e){var t=yt.allowStateReads;return yt.allowStateReads=e,t}function pt(e){yt.allowStateReads=e}function ft(e){if(e.dependenciesState_!==Xe.UP_TO_DATE_){e.dependenciesState_=Xe.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=Xe.UP_TO_DATE_}}var ht=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],mt=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},_t=!0,vt=!1,yt=function(){var e=o();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(_t=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new mt).version&&(_t=!1),_t?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new mt):(setTimeout((function(){vt||n(35)}),1),new mt)}();function gt(){return yt}function bt(){var e=new mt;for(var t in e)-1===ht.indexOf(t)&&(yt[t]=e[t]);yt.allowStateChanges=!yt.enforceActions}function wt(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function St(e,t){e.observers_.delete(t),0===e.observers_.size&&xt(e)}function xt(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,yt.pendingUnobservations.push(e))}function kt(){yt.inBatch++}function jt(){if(0==--yt.inBatch){At();for(var e=yt.pendingUnobservations,t=0;t0&&xt(e),!1)}function Rt(e){e.lowestObserverState_!==Xe.STALE_&&(e.lowestObserverState_=Xe.STALE_,e.observers_.forEach((function(e){e.dependenciesState_===Xe.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Xe.STALE_})))}var Ot=function(){function e(e,t,r,n){void 0===e&&(e="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Xe.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Qe.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=r,this.requiresObservable_=n}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,yt.pendingReactions.push(this),At())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){kt(),this.isScheduled_=!1;var e=yt.trackingContext;if(yt.trackingContext=this,nt(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}yt.trackingContext=e,jt()}},t.track=function(e){if(!this.isDisposed_){kt();0,this.isRunning_=!0;var t=yt.trackingContext;yt.trackingContext=this;var r=at(this,e,void 0);yt.trackingContext=t,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&st(this),rt(r)&&this.reportExceptionInDerivation_(r.cause),jt()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(yt.disableErrorBoundaries)throw e;var r="[mobx] uncaught error in '"+this+"'";yt.suppressReactionErrors||console.error(r,e),yt.globalReactionErrorHandlers.forEach((function(r){return r(e,t)}))}},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(kt(),st(this),jt()))},t.getDisposer_=function(e){var t=this,r=function r(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",r)};return null==e||null==e.addEventListener||e.addEventListener("abort",r),r[q]=this,r},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),Dr(this,e)},e}();function Tt(e){return yt.globalReactionErrorHandlers.push(e),function(){var t=yt.globalReactionErrorHandlers.indexOf(e);t>=0&&yt.globalReactionErrorHandlers.splice(t,1)}}var Pt=function(e){return e()};function At(){yt.inBatch>0||yt.isRunningReactions||Pt(Dt)}function Dt(){yt.isRunningReactions=!0;for(var e=yt.pendingReactions,t=0;e.length>0;){100==++t&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,i=r.length;n",t,e):v(r)?Fe(t,r,e):z(r)?(e?Bt:It).decorate_20223_(t,r):y(r)?V(t,r,e?Bt:It):y(t)?F(Q(e?"autoAction":"action",{name:t,autoAction:e})):void 0}}var Gt=Ut(!1);Object.assign(Gt,It);var Ft=Ut(!0);function Vt(e){return Ve(e.name||"",!1,e,this,void 0)}function zt(e){return v(e)&&!0===e.isMobxAction}function qt(e,t){var r,n,i,o,a;void 0===t&&(t=l);var s,c=null!=(r=null==(n=t)?void 0:n.name)?r:"Autorun";if(!t.scheduler&&!t.delay)s=new Ot(c,(function(){this.track(p)}),t.onError,t.requiresObservable);else{var u=Ht(t),d=!1;s=new Ot(c,(function(){d||(d=!0,u((function(){d=!1,s.isDisposed_||s.track(p)})))}),t.onError,t.requiresObservable)}function p(){e(s)}return null!=(i=t)&&null!=(o=i.signal)&&o.aborted||s.schedule_(),s.getDisposer_(null==(a=t)?void 0:a.signal)}Object.assign(Ft,Bt),Gt.bound=F(Mt),Ft.bound=F(Nt);var Wt=function(e){return e()};function Ht(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Wt}function Kt(e,t,r){var n,i,o,a;void 0===r&&(r=l);var s,c,u,d=null!=(n=r.name)?n:"Reaction",p=Gt(d,r.onError?(s=r.onError,c=t,function(){try{return c.apply(this,arguments)}catch(e){s.call(this,e)}}):t),f=!r.scheduler&&!r.delay,h=Ht(r),m=!0,_=!1,v=r.compareStructural?Y.structural:r.equals||Y.default,y=new Ot(d,(function(){m||f?g():_||(_=!0,h(g))}),r.onError,r.requiresObservable);function g(){if(_=!1,!y.isDisposed_){var t=!1,n=u;y.track((function(){var r=We(!1,(function(){return e(y)}));t=m||!v(u,r),u=r})),(m&&r.fireImmediately||!m&&t)&&p(u,n,y),m=!1}}return null!=(i=r)&&null!=(o=i.signal)&&o.aborted||y.schedule_(),y.getDisposer_(null==(a=r)?void 0:a.signal)}function Yt(e,t,r){return Jt("onBO",e,t,r)}function $t(e,t,r){return Jt("onBUO",e,t,r)}function Jt(e,t,r,n){var i="function"==typeof n?Mn(t,r):Mn(t),o=v(n)?n:r,a=e+"L";return i[a]?i[a].add(o):i[a]=new Set([o]),function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function Xt(e){!0===e.isolateGlobalState&&function(){if((yt.pendingReactions.length||yt.inBatch||yt.isRunningReactions)&&n(36),vt=!0,_t){var e=o();0==--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),yt=new mt}}();var t,r,i=e.useProxies,a=e.enforceActions;if(void 0!==i&&(yt.useProxies="always"===i||"never"!==i&&"undefined"!=typeof Proxy),"ifavailable"===i&&(yt.verifyProxies=!0),void 0!==a){var s="always"===a?"always":"observed"===a;yt.enforceActions=s,yt.allowStateChanges=!0!==s&&"always"!==s}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach((function(t){t in e&&(yt[t]=!!e[t])})),yt.allowStateReads=!yt.observableRequiresReaction,e.reactionScheduler&&(t=e.reactionScheduler,r=Pt,Pt=function(e){return t((function(){return r(e)}))})}function Qt(e,t,r,n){var i=A(t);return Un((function(){var t=gn(e,n)[q];O(i).forEach((function(e){t.extend_(e,i[e],!r||(!(e in r)||r[e]))}))})),e}function Zt(e,t){return er(Mn(e,t))}function er(e){var t,r={name:e.name_};return e.observing_&&e.observing_.length>0&&(r.dependencies=(t=e.observing_,Array.from(new Set(t))).map(er)),r}function tr(e,t){return rr(Mn(e,t))}function rr(e){var t={name:e.name_};return function(e){return e.observers_&&e.observers_.size>0}(e)&&(t.observers=Array.from(function(e){return e.observers_}(e)).map(rr)),t}var nr=0;function ir(){this.message="FLOW_CANCELLED"}function or(e){return e instanceof ir}ir.prototype=Object.create(Error.prototype);var ar=ne("flow"),sr=ne("flow.bound",{bound:!0}),cr=Object.assign((function(e,t){if(z(t))return ar.decorate_20223_(e,t);if(y(t))return V(e,t,ar);var r=e,n=r.name||"",i=function(){var e,t=this,i=arguments,o=++nr,a=Gt(n+" - runid: "+o+" - init",r).apply(t,i),s=void 0,c=new Promise((function(t,r){var i=0;function c(e){var t;s=void 0;try{t=Gt(n+" - runid: "+o+" - yield "+i++,a.next).call(a,e)}catch(e){return r(e)}d(t)}function u(e){var t;s=void 0;try{t=Gt(n+" - runid: "+o+" - yield "+i++,a.throw).call(a,e)}catch(e){return r(e)}d(t)}function d(e){if(!v(null==e?void 0:e.then))return e.done?t(e.value):(s=Promise.resolve(e.value)).then(c,u);e.then(d,r)}e=r,c(void 0)}));return c.cancel=Gt(n+" - runid: "+o+" - cancel",(function(){try{s&&ur(s);var t=a.return(void 0),r=Promise.resolve(t.value);r.then(_,_),ur(r),e(new ir)}catch(t){e(t)}})),c};return i.isMobXFlow=!0,i}),ar);function ur(e){v(e.cancel)&&e.cancel()}function dr(e){return e}function lr(e){return!0===(null==e?void 0:e.isMobXFlow)}function pr(e,t,r){var n;return fn(e)||sn(e)||Je(e)?n=Bn(e):Sn(e)&&(n=Bn(e,t)),n.dehancer="function"==typeof t?t:r,function(){n.dehancer=void 0}}function fr(e,t,r){return v(r)?function(e,t,r){return Bn(e,t).intercept_(r)}(e,t,r):function(e,t){return Bn(e).intercept_(t)}(e,t)}function hr(e,t){if(void 0===t)return et(e);if(!1===Sn(e))return!1;if(!e[q].values_.has(t))return!1;var r=Mn(e,t);return et(r)}function mr(e){return hr(e)}function _r(e,t){return hr(e,t)}function vr(e,t){return!!e&&(void 0!==t?!!Sn(e)&&e[q].values_.has(t):Sn(e)||!!e[q]||H(e)||Ct(e)||et(e))}function yr(e){return vr(e)}function gr(e,t){return vr(e,t)}function br(e){return Sn(e)?e[q].keys_():fn(e)||_n(e)?Array.from(e.keys()):sn(e)?e.map((function(e,t){return t})):void n(5)}function wr(e){return Sn(e)?br(e).map((function(t){return e[t]})):fn(e)?br(e).map((function(t){return e.get(t)})):_n(e)?Array.from(e.values()):sn(e)?e.slice():void n(6)}function Sr(e){return Sn(e)?br(e).map((function(t){return[t,e[t]]})):fn(e)?br(e).map((function(t){return[t,e.get(t)]})):_n(e)?Array.from(e.entries()):sn(e)?e.map((function(e,t){return[t,e]})):void n(7)}function xr(e,t,r){if(2!==arguments.length||_n(e))Sn(e)?e[q].set_(t,r):fn(e)?e.set(t,r):_n(e)?e.add(t):sn(e)?("number"!=typeof t&&(t=parseInt(t,10)),t<0&&n("Invalid index: '"+t+"'"),kt(),t>=e.length&&(e.length=t+1),e[t]=r,jt()):n(8);else{kt();var i=t;try{for(var o in i)xr(e,o,i[o])}finally{jt()}}}function kr(e,t){Sn(e)?e[q].delete_(t):fn(e)||_n(e)?e.delete(t):sn(e)?("number"!=typeof t&&(t=parseInt(t,10)),e.splice(t,1)):n(9)}function jr(e,t){return Sn(e)?e[q].has_(t):fn(e)||_n(e)?e.has(t):sn(e)?t>=0&&t0}function Gr(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),m((function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}))}function Fr(e,t){var r=ut();try{for(var i=[].concat(e.interceptors_||[]),o=0,a=i.length;o0}function zr(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),m((function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}))}function qr(e,t){var r=ut(),n=e.changeListeners_;if(n){for(var i=0,o=(n=n.slice()).length;i0?e.map(this.dehancer):e},t.intercept_=function(e){return Gr(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),zr(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&n("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var r=new Array(e-t),i=0;i0&&Ln(e+t+1)},t.spliceWithArray_=function(e,t,r){var n=this;this.atom_;var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===r&&(r=d),Ur(this)){var o=Fr(this,{object:this.proxy_,type:"splice",index:e,removedCount:t,added:r});if(!o)return d;t=o.removedCount,r=o.added}if(r=0===r.length?r:r.map((function(e){return n.enhancer_(e,void 0)})),this.legacyMode_){var a=r.length-t;this.updateArrayLength_(i,a)}var s=this.spliceItemsIntoValues_(e,t,r);return 0===t&&0===r.length||this.notifyArraySplice_(e,r,s),this.dehanceValues_(s)},t.spliceItemsIntoValues_=function(e,t,r){var n;if(r.length<1e4)return(n=this.values_).splice.apply(n,[e,t].concat(r));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=r.length-t;for(var a=0;a=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var r=this.values_;if(this.legacyMode_&&e>r.length&&n(17,e,r.length),e2?r-2:0),i=2;i-1&&(this.splice(r,1),!0)}};function Zr(e,t){"function"==typeof Array.prototype[e]&&(Qr[e]=t(e))}function en(e){return function(){var t=this[q];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function tn(e){return function(t,r){var n=this,i=this[q];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e]((function(e,i){return t.call(r,e,i,n)}))}}function rn(e){return function(){var t=this,r=this[q];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),i=arguments[0];return arguments[0]=function(e,r,n){return i(e,r,n,t)},n[e].apply(n,arguments)}}Zr("at",en),Zr("concat",en),Zr("flat",en),Zr("includes",en),Zr("indexOf",en),Zr("join",en),Zr("lastIndexOf",en),Zr("slice",en),Zr("toString",en),Zr("toLocaleString",en),Zr("toSorted",en),Zr("toSpliced",en),Zr("with",en),Zr("every",tn),Zr("filter",tn),Zr("find",tn),Zr("findIndex",tn),Zr("findLast",tn),Zr("findLastIndex",tn),Zr("flatMap",tn),Zr("forEach",tn),Zr("map",tn),Zr("some",tn),Zr("toReversed",tn),Zr("reduce",rn),Zr("reduceRight",rn);var nn,on,an=k("ObservableArrayAdministration",Jr);function sn(e){return g(e)&&an(e[q])}var cn={},un="add";nn=Symbol.iterator,on=Symbol.toStringTag;var dn,ln,pn=function(){function e(e,t,r){var i=this;void 0===t&&(t=$),void 0===r&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[q]=cn,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=r,v(Map)||n(18),Un((function(){i.keysAtom_=K("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,e&&i.merge(e)}))}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!yt.trackingDerivation)return this.has_(e);var r=this.hasMap_.get(e);if(!r){var n=r=new $e(this.has_(e),J,"ObservableMap.key?",!1);this.hasMap_.set(e,n),$t(n,(function(){return t.hasMap_.delete(e)}))}return r.get()},t.set=function(e,t){var r=this.has_(e);if(Ur(this)){var n=Fr(this,{type:r?Yr:un,object:this,newValue:t,name:e});if(!n)return this;t=n.newValue}return r?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((this.keysAtom_,Ur(this))&&!Fr(this,{type:"delete",object:this,name:e}))return!1;if(this.has_(e)){var r=Vr(this),n=r?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(e).value_,name:e}:null;return Cr((function(){var r;t.keysAtom_.reportChanged(),null==(r=t.hasMap_.get(e))||r.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),r&&qr(this,n),!0}return!1},t.updateValue_=function(e,t){var r=this.data_.get(e);if((t=r.prepareNewValue_(t))!==yt.UNCHANGED){var n=Vr(this),i=n?{observableKind:"map",debugObjectName:this.name_,type:Yr,object:this,oldValue:r.value_,name:e,newValue:t}:null;0,r.setNewValue_(t),n&&qr(this,i)}},t.addValue_=function(e,t){var r=this;this.keysAtom_,Cr((function(){var n,i=new $e(t,r.enhancer_,"ObservableMap.key",!1);r.data_.set(e,i),t=i.value_,null==(n=r.hasMap_.get(e))||n.setNewValue_(!0),r.keysAtom_.reportChanged()}));var n=Vr(this),i=n?{observableKind:"map",debugObjectName:this.name_,type:un,object:this,name:e,newValue:t}:null;n&&qr(this,i)},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return zn({next:function(){var r=t.next(),n=r.done,i=r.value;return{done:n,value:n?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return zn({next:function(){var r=t.next(),n=r.done,i=r.value;return{done:n,value:n?void 0:[i,e.get(i)]}}})},t[nn]=function(){return this.entries()},t.forEach=function(e,t){for(var r,n=U(this);!(r=n()).done;){var i=r.value,o=i[0],a=i[1];e.call(t,a,o,this)}},t.merge=function(e){var t=this;return fn(e)&&(e=new Map(e)),Cr((function(){b(e)?function(e){var t=Object.keys(e);if(!R)return t;var r=Object.getOwnPropertySymbols(e);return r.length?[].concat(t,r.filter((function(t){return u.propertyIsEnumerable.call(e,t)}))):t}(e).forEach((function(r){return t.set(r,e[r])})):Array.isArray(e)?e.forEach((function(e){var r=e[0],n=e[1];return t.set(r,n)})):j(e)?(e.constructor!==Map&&n(19,e),e.forEach((function(e,r){return t.set(r,e)}))):null!=e&&n(20,e)})),this},t.clear=function(){var e=this;Cr((function(){ct((function(){for(var t,r=U(e.keys());!(t=r()).done;){var n=t.value;e.delete(n)}}))}))},t.replace=function(e){var t=this;return Cr((function(){for(var r,i=function(e){if(j(e)||fn(e))return e;if(Array.isArray(e))return new Map(e);if(b(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}return n(21,e)}(e),o=new Map,a=!1,s=U(t.data_.keys());!(r=s()).done;){var c=r.value;if(!i.has(c))if(t.delete(c))a=!0;else{var u=t.data_.get(c);o.set(c,u)}}for(var d,l=U(i.entries());!(d=l()).done;){var p=d.value,f=p[0],h=p[1],m=t.data_.has(f);if(t.set(f,h),t.data_.has(f)){var _=t.data_.get(f);o.set(f,_),m||(a=!0)}}if(!a)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var v=t.data_.keys(),y=o.keys(),g=v.next(),w=y.next();!g.done;){if(g.value!==w.value){t.keysAtom_.reportChanged();break}g=v.next(),w=y.next()}t.data_=o})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return zr(this,e)},t.intercept_=function(e){return Gr(this,e)},C(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:on,get:function(){return"Map"}}]),e}(),fn=k("ObservableMap",pn);var hn={};dn=Symbol.iterator,ln=Symbol.toStringTag;var mn=function(){function e(e,t,r){var i=this;void 0===t&&(t=$),void 0===r&&(r="ObservableSet"),this.name_=void 0,this[q]=hn,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,v(Set)||n(22),this.enhancer_=function(e,n){return t(e,n,r)},Un((function(){i.atom_=K(i.name_),e&&i.replace(e)}))}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;Cr((function(){ct((function(){for(var t,r=U(e.data_.values());!(t=r()).done;){var n=t.value;e.delete(n)}}))}))},t.forEach=function(e,t){for(var r,n=U(this);!(r=n()).done;){var i=r.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if((this.atom_,Ur(this))&&!Fr(this,{type:un,object:this,newValue:e}))return this;if(!this.has(e)){Cr((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var r=Vr(this),n=r?{observableKind:"set",debugObjectName:this.name_,type:un,object:this,newValue:e}:null;0,r&&qr(this,n)}return this},t.delete=function(e){var t=this;if(Ur(this)&&!Fr(this,{type:"delete",object:this,oldValue:e}))return!1;if(this.has(e)){var r=Vr(this),n=r?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:e}:null;return Cr((function(){t.atom_.reportChanged(),t.data_.delete(e)})),r&&qr(this,n),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),r=Array.from(this.values());return zn({next:function(){var n=e;return e+=1,nTn){for(var t=Tn;t=0&&n++}t=Vn(t),r=Vn(r);var c="[object Array]"===s;if(!c){if("object"!=typeof t||"object"!=typeof r)return!1;var u=t.constructor,d=r.constructor;if(u!==d&&!(v(u)&&u instanceof u&&v(d)&&d instanceof d)&&"constructor"in t&&"constructor"in r)return!1}if(0===n)return!1;n<0&&(n=-1);o=o||[];var l=(i=i||[]).length;for(;l--;)if(i[l]===t)return o[l]===r;if(i.push(t),o.push(r),c){if((l=t.length)!==r.length)return!1;for(;l--;)if(!e(t[l],r[l],n-1,i,o))return!1}else{var p,f=Object.keys(t);if(l=f.length,Object.keys(r).length!==l)return!1;for(;l--;)if(p=f[l],!P(r,p)||!e(t[p],r[p],n-1,i,o))return!1}return i.pop(),o.pop(),!0}(e,t,r)}function Vn(e){return sn(e)?e.slice():j(e)||fn(e)||E(e)||_n(e)?Array.from(e.entries()):e}function zn(e){return e[Symbol.iterator]=qn,e}function qn(){return this}["Symbol","Map","Set"].forEach((function(e){void 0===o()[e]&&n("MobX requires global '"+e+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Lt,extras:{getDebugName:Nn},$mobx:q})},"./node_modules/mpegts.js/dist/mpegts.js":e=>{window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t,r){"use strict";var n=r(6),i=r.n(n),o=function(){function e(){}return e.e=function(t,r){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+r;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",n),e.ENABLE_ERROR&&(console.error?console.error(n):console.warn?console.warn(n):console.log(n))},e.i=function(t,r){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+r;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",n),e.ENABLE_INFO&&(console.info?console.info(n):console.log(n))},e.w=function(t,r){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+r;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",n),e.ENABLE_WARN&&(console.warn?console.warn(n):console.log(n))},e.d=function(t,r){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+r;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",n),e.ENABLE_DEBUG&&(console.debug?console.debug(n):console.log(n))},e.v=function(t,r){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+r;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",n),e.ENABLE_VERBOSE&&console.log(n)},e}();o.GLOBAL_TAG="mpegts.js",o.FORCE_GLOBAL_TAG=!1,o.ENABLE_ERROR=!0,o.ENABLE_INFO=!0,o.ENABLE_WARN=!0,o.ENABLE_DEBUG=!0,o.ENABLE_VERBOSE=!0,o.ENABLE_CALLBACK=!1,o.emitter=new i.a,t.a=o},function(e,t,r){"use strict";t.a={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"}},function(e,t,r){"use strict";r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return a}));var n=r(3),i={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},o={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},a=function(){function e(e){this._type=e||"undefined",this._status=i.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return e.prototype.destroy=function(){this._status=i.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},e.prototype.isWorking=function(){return this._status===i.kConnecting||this._status===i.kBuffering},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),e.prototype.open=function(e,t){throw new n.c("Unimplemented abstract function!")},e.prototype.abort=function(){throw new n.c("Unimplemented abstract function!")},e}()},function(e,t,r){"use strict";r.d(t,"d",(function(){return o})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return c}));var n,i=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(){function e(e){this._message=e}return Object.defineProperty(e.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this.name+": "+this.message},e}(),a=function(e){function t(t){return e.call(this,t)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),t}(o),s=function(e){function t(t){return e.call(this,t)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),t}(o),c=function(e){function t(t){return e.call(this,t)||this}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),t}(o)},function(e,t,r){"use strict";var n={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],r=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],i={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:r[0]||""},o={};if(i.browser){o[i.browser]=!0;var a=i.majorVersion.split(".");o.version={major:parseInt(i.majorVersion,10),string:i.version},a.length>1&&(o.version.minor=parseInt(a[1],10)),a.length>2&&(o.version.build=parseInt(a[2],10))}for(var s in i.platform&&(o[i.platform]=!0),(o.chrome||o.opr||o.safari)&&(o.webkit=!0),(o.rv||o.iemobile)&&(o.rv&&delete o.rv,i.browser="msie",o.msie=!0),o.edge&&(delete o.edge,i.browser="msedge",o.msedge=!0),o.opr&&(i.browser="opera",o.opera=!0),o.safari&&o.android&&(i.browser="android",o.android=!0),o.name=i.browser,o.platform=i.platform,n)n.hasOwnProperty(s)&&delete n[s];Object.assign(n,o)}(),t.a=n},function(e,t,r){"use strict";t.a={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},function(e,t,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,a,s;if(u(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=d(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new 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 p(){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 f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=p.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,d=_(c,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";r.d(t,"d",(function(){return n})),r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return a}));var n=function(e,t,r,n,i){this.dts=e,this.pts=t,this.duration=r,this.originalDts=n,this.isSyncPoint=i,this.fileposition=null},i=function(){function e(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return e.prototype.appendSyncPoint=function(e){e.isSyncPoint=!0,this.syncPoints.push(e)},e}(),o=function(){function e(){this._list=[]}return e.prototype.clear=function(){this._list=[]},e.prototype.appendArray=function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts=t[i].dts&&et[n].lastSample.originalDts&&e=t[n].lastSample.originalDts&&(n===t.length-1||n0&&(i=this._searchNearestSegmentBefore(r.originalBeginDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,r)},e.prototype.getLastSegmentBefore=function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null},e.prototype.getLastSampleBefore=function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null},e.prototype.getLastSyncPointBefore=function(e){for(var t=this._searchNearestSegmentBefore(e),r=this._list[t].syncPoints;0===r.length&&t>0;)t--,r=this._list[t].syncPoints;return r.length>0?r[r.length-1]:null},e}()},function(e,t,r){"use strict";var n=function(){function e(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return e.prototype.isComplete=function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&e&&t},e.prototype.isSeekable=function(){return!0===this.hasKeyframesIndex},e.prototype.getNearestKeyframe=function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,r=this._search(t.times,e);return{index:r,milliseconds:t.times[r],fileposition:t.filepositions[r]}},e.prototype._search=function(e,t){var r=0,n=e.length-1,i=0,o=0,a=n;for(t=e[i]&&t0){var r=e.getConfig();t.emit("change",r)}},e.registerListener=function(t){e.emitter.addListener("change",t)},e.removeListener=function(t){e.emitter.removeListener("change",t)},e.addLogListener=function(t){o.a.emitter.addListener("log",t),o.a.emitter.listenerCount("log")>0&&(o.a.ENABLE_CALLBACK=!0,e._notifyChange())},e.removeLogListener=function(t){o.a.emitter.removeListener("log",t),0===o.a.emitter.listenerCount("log")&&(o.a.ENABLE_CALLBACK=!1,e._notifyChange())},e}();a.emitter=new i.a,t.a=a},function(e,t,r){"use strict";var n=r(6),i=r.n(n),o=r(0),a=r(4),s=r(8);function c(e,t,r){var n=e;if(t+r=128){t.push(String.fromCharCode(65535&o)),n+=2;continue}}else if(r[n]<240){if(c(r,n,2)&&(o=(15&r[n])<<12|(63&r[n+1])<<6|63&r[n+2])>=2048&&55296!=(63488&o)){t.push(String.fromCharCode(65535&o)),n+=3;continue}}else if(r[n]<248){var o;if(c(r,n,3)&&(o=(7&r[n])<<18|(63&r[n+1])<<12|(63&r[n+2])<<6|63&r[n+3])>65536&&o<1114112){o-=65536,t.push(String.fromCharCode(o>>>10|55296)),t.push(String.fromCharCode(1023&o|56320)),n+=4;continue}}t.push(String.fromCharCode(65533)),++n}return t.join("")},l=r(3),p=(u=new ArrayBuffer(2),new DataView(u).setInt16(0,256,!0),256===new Int16Array(u)[0]),f=function(){function e(){}return e.parseScriptData=function(t,r,n){var i={};try{var a=e.parseValue(t,r,n),s=e.parseValue(t,r+a.size,n-a.size);i[a.data]=s.data}catch(e){o.a.e("AMF",e.toString())}return i},e.parseObject=function(t,r,n){if(n<3)throw new l.a("Data not enough when parse ScriptDataObject");var i=e.parseString(t,r,n),o=e.parseValue(t,r+i.size,n-i.size),a=o.objectEnd;return{data:{name:i.data,value:o.data},size:i.size+o.size,objectEnd:a}},e.parseVariable=function(t,r,n){return e.parseObject(t,r,n)},e.parseString=function(e,t,r){if(r<2)throw new l.a("Data not enough when parse String");var n=new DataView(e,t,r).getUint16(0,!p);return{data:n>0?d(new Uint8Array(e,t+2,n)):"",size:2+n}},e.parseLongString=function(e,t,r){if(r<4)throw new l.a("Data not enough when parse LongString");var n=new DataView(e,t,r).getUint32(0,!p);return{data:n>0?d(new Uint8Array(e,t+4,n)):"",size:4+n}},e.parseDate=function(e,t,r){if(r<10)throw new l.a("Data size invalid when parse Date");var n=new DataView(e,t,r),i=n.getFloat64(0,!p),o=n.getInt16(8,!p);return{data:new Date(i+=60*o*1e3),size:10}},e.parseValue=function(t,r,n){if(n<1)throw new l.a("Data not enough when parse Value");var i,a=new DataView(t,r,n),s=1,c=a.getUint8(0),u=!1;try{switch(c){case 0:i=a.getFloat64(1,!p),s+=8;break;case 1:i=!!a.getUint8(1),s+=1;break;case 2:var d=e.parseString(t,r+1,n-1);i=d.data,s+=d.size;break;case 3:i={};var f=0;for(9==(16777215&a.getUint32(n-4,!p))&&(f=3);s32)throw new l.b("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var r=this._current_word_bits_left?this._current_word:0;r>>>=32-this._current_word_bits_left;var n=e-this._current_word_bits_left;this._fillCurrentWord();var i=Math.min(n,this._current_word_bits_left),o=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,r<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()},e.prototype.readUEG=function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1},e.prototype.readSEG=function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)},e}(),m=function(){function e(){}return e._ebsp2rbsp=function(e){for(var t=e,r=t.byteLength,n=new Uint8Array(r),i=0,o=0;o=2&&3===t[o]&&0===t[o-1]&&0===t[o-2]||(n[i]=t[o],i++);return new Uint8Array(n.buffer,0,i)},e.parseSPS=function(t){for(var r=t.subarray(1,4),n="avc1.",i=0;i<3;i++){var o=r[i].toString(16);o.length<2&&(o="0"+o),n+=o}var a=e._ebsp2rbsp(t),s=new h(a);s.readByte();var c=s.readByte();s.readByte();var u=s.readByte();s.readUEG();var d=e.getProfileString(c),l=e.getLevelString(u),p=1,f=420,m=8,_=8;if((100===c||110===c||122===c||244===c||44===c||83===c||86===c||118===c||128===c||138===c||144===c)&&(3===(p=s.readUEG())&&s.readBits(1),p<=3&&(f=[0,420,422,444][p]),m=s.readUEG()+8,_=s.readUEG()+8,s.readBits(1),s.readBool()))for(var v=3!==p?8:12,y=0;y0&&I<16?(T=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][I-1],P=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][I-1]):255===I&&(T=s.readByte()<<8|s.readByte(),P=s.readByte()<<8|s.readByte())}if(s.readBool()&&s.readBool(),s.readBool()&&(s.readBits(4),s.readBool()&&s.readBits(24)),s.readBool()&&(s.readUEG(),s.readUEG()),s.readBool()){var M=s.readBits(32),B=s.readBits(32);D=s.readBool(),A=(C=B)/(L=2*M)}}var N=1;1===T&&1===P||(N=T/P);var U=0,G=0;0===p?(U=1,G=2-k):(U=3===p?1:2,G=(1===p?2:1)*(2-k));var F=16*(S+1),V=16*(x+1)*(2-k);F-=(j+E)*U,V-=(R+O)*G;var z=Math.ceil(F*N);return s.destroy(),s=null,{codec_mimetype:n,profile_idc:c,level_idc:u,profile_string:d,level_string:l,chroma_format_idc:p,bit_depth:m,bit_depth_luma:m,bit_depth_chroma:_,ref_frames:w,chroma_format:f,chroma_format_string:e.getChromaFormatString(f),frame_rate:{fixed:D,fps:A,fps_den:L,fps_num:C},sar_ratio:{width:T,height:P},codec_size:{width:F,height:V},present_size:{width:z,height:V}}},e._skipScalingList=function(e,t){for(var r=8,n=8,i=0;i=2&&3===t[o]&&0===t[o-1]&&0===t[o-2]||(n[i]=t[o],i++);return new Uint8Array(n.buffer,0,i)},e.parseVPS=function(t){var r=e._ebsp2rbsp(t),n=new h(r);return n.readByte(),n.readByte(),n.readBits(4),n.readBits(2),n.readBits(6),{num_temporal_layers:n.readBits(3)+1,temporal_id_nested:n.readBool()}},e.parseSPS=function(t){var r=e._ebsp2rbsp(t),n=new h(r);n.readByte(),n.readByte();for(var i=0,o=0,a=0,s=0,c=(n.readBits(4),n.readBits(3)),u=(n.readBool(),n.readBits(2)),d=n.readBool(),l=n.readBits(5),p=n.readByte(),f=n.readByte(),m=n.readByte(),_=n.readByte(),v=n.readByte(),y=n.readByte(),g=n.readByte(),b=n.readByte(),w=n.readByte(),S=n.readByte(),x=n.readByte(),k=[],j=[],E=0;E0)for(E=c;E<8;E++)n.readBits(2);for(E=0;E1&&n.readSEG(),E=0;E0&&Q<=16?(K=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][Q-1],Y=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][Q-1]):255===Q&&(K=n.readBits(16),Y=n.readBits(16))}if(n.readBool()&&n.readBool(),n.readBool()&&(n.readBits(3),n.readBool(),n.readBool()&&(n.readByte(),n.readByte(),n.readByte())),n.readBool()&&(n.readUEG(),n.readUEG()),n.readBool(),n.readBool(),n.readBool(),n.readBool()&&(n.readUEG(),n.readUEG(),n.readUEG(),n.readUEG()),n.readBool()&&(J=n.readBits(32),X=n.readBits(32),n.readBool()&&(n.readUEG(),n.readBool()))){var Z,ee,te=!1;for(Z=n.readBool(),ee=n.readBool(),(Z||ee)&&((te=n.readBool())&&(n.readByte(),n.readBits(5),n.readBool(),n.readBits(5)),n.readBits(4),n.readBits(4),te&&n.readBits(4),n.readBits(5),n.readBits(5),n.readBits(5)),E=0;E<=c;E++){var re=n.readBool();$=re;var ne=!1,ie=1;re||(ne=n.readBool());var oe=!1;if(ne?n.readSEG():oe=n.readBool(),oe||(ie=n.readUEG()+1),Z)for(G=0;G>>2!=0,o=0!=(1&t[4]),a=(n=t)[5]<<24|n[6]<<16|n[7]<<8|n[8];return a<9?r:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:i,hasVideoTrack:o}},e.prototype.bindDataSource=function(e){return e.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(e.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(e){this._timestampBase=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedDuration",{get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedHasAudio",{set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedHasVideo",{set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e},enumerable:!1,configurable:!0}),e.prototype.resetMediaInfo=function(){this._mediaInfo=new s.a},e.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},e.prototype.parseChunks=function(t,r){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new l.a("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var n=0,i=this._littleEndian;if(0===r){if(!(t.byteLength>13))return 0;n=e.probe(t).dataOffset}for(this._firstParse&&(this._firstParse=!1,r+n!==this._dataOffset&&o.a.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==(a=new DataView(t,n)).getUint32(0,!i)&&o.a.w(this.TAG,"PrevTagSize0 !== 0 !!!"),n+=4);nt.byteLength)break;var s=a.getUint8(0),c=16777215&a.getUint32(0,!i);if(n+11+c+4>t.byteLength)break;if(8===s||9===s||18===s){var u=a.getUint8(4),d=a.getUint8(5),p=a.getUint8(6)|d<<8|u<<16|a.getUint8(7)<<24;0!=(16777215&a.getUint32(7,!i))&&o.a.w(this.TAG,"Meet tag which has StreamID != 0!");var f=n+11;switch(s){case 8:this._parseAudioData(t,f,c,p);break;case 9:this._parseVideoData(t,f,c,p,r+n);break;case 18:this._parseScriptData(t,f,c)}var h=a.getUint32(11+c,!i);h!==11+c&&o.a.w(this.TAG,"Invalid PrevTagSize "+h),n+=11+c+4}else o.a.w(this.TAG,"Unsupported tag type "+s+", skipped"),n+=11+c+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),n},e.prototype._parseScriptData=function(e,t,r){var n=f.parseScriptData(e,t,r);if(n.hasOwnProperty("onMetaData")){if(null==n.onMetaData||"object"!=typeof n.onMetaData)return void o.a.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&o.a.w(this.TAG,"Found another onMetaData tag!"),this._metadata=n;var i=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},i)),"boolean"==typeof i.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=i.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof i.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=i.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof i.audiodatarate&&(this._mediaInfo.audioDataRate=i.audiodatarate),"number"==typeof i.videodatarate&&(this._mediaInfo.videoDataRate=i.videodatarate),"number"==typeof i.width&&(this._mediaInfo.width=i.width),"number"==typeof i.height&&(this._mediaInfo.height=i.height),"number"==typeof i.duration){if(!this._durationOverrided){var a=Math.floor(i.duration*this._timescale);this._duration=a,this._mediaInfo.duration=a}}else this._mediaInfo.duration=0;if("number"==typeof i.framerate){var s=Math.floor(1e3*i.framerate);if(s>0){var c=s/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=c,this._referenceFrameRate.fps_num=s,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=c}}if("object"==typeof i.keyframes){this._mediaInfo.hasKeyframesIndex=!0;var u=i.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(u),i.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=i,o.a.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(n).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},n))},e.prototype._parseKeyframesIndex=function(e){for(var t=[],r=[],n=1;n>>4;if(2===a||10===a){var s=0,c=(12&i)>>>2;if(c>=0&&c<=4){s=this._flvSoundRateTable[c];var u=1&i,d=this._audioMetadata,l=this._audioTrack;if(d||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(d=this._audioMetadata={}).type="audio",d.id=l.id,d.timescale=this._timescale,d.duration=this._duration,d.audioSampleRate=s,d.channelCount=0===u?1:2),10===a){var p=this._parseAACAudioData(e,t+1,r-1);if(null==p)return;if(0===p.packetType){if(d.config){if(S(p.data.config,d.config))return;o.a.w(this.TAG,"AudioSpecificConfig has been changed, re-generate initialization segment")}var f=p.data;d.audioSampleRate=f.samplingRate,d.channelCount=f.channelCount,d.codec=f.codec,d.originalCodec=f.originalCodec,d.config=f.config,d.refSampleDuration=1024/d.audioSampleRate*d.timescale,o.a.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",d),(v=this._mediaInfo).audioCodec=d.originalCodec,v.audioSampleRate=d.audioSampleRate,v.audioChannelCount=d.channelCount,v.hasVideo?null!=v.videoCodec&&(v.mimeType='video/x-flv; codecs="'+v.videoCodec+","+v.audioCodec+'"'):v.mimeType='video/x-flv; codecs="'+v.audioCodec+'"',v.isComplete()&&this._onMediaInfo(v)}else if(1===p.packetType){var h=this._timestampBase+n,m={unit:p.data,length:p.data.byteLength,dts:h,pts:h};l.samples.push(m),l.length+=p.data.length}else o.a.e(this.TAG,"Flv: Unsupported AAC data type "+p.packetType)}else if(2===a){if(!d.codec){var v;if(null==(f=this._parseMP3AudioData(e,t+1,r-1,!0)))return;d.audioSampleRate=f.samplingRate,d.channelCount=f.channelCount,d.codec=f.codec,d.originalCodec=f.originalCodec,d.refSampleDuration=1152/d.audioSampleRate*d.timescale,o.a.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",d),(v=this._mediaInfo).audioCodec=d.codec,v.audioSampleRate=d.audioSampleRate,v.audioChannelCount=d.channelCount,v.audioDataRate=f.bitRate,v.hasVideo?null!=v.videoCodec&&(v.mimeType='video/x-flv; codecs="'+v.videoCodec+","+v.audioCodec+'"'):v.mimeType='video/x-flv; codecs="'+v.audioCodec+'"',v.isComplete()&&this._onMediaInfo(v)}var y=this._parseMP3AudioData(e,t+1,r-1,!1);if(null==y)return;h=this._timestampBase+n;var g={unit:y,length:y.byteLength,dts:h,pts:h};l.samples.push(g),l.length+=y.length}}else this._onError(_.a.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+c)}else this._onError(_.a.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a)}},e.prototype._parseAACAudioData=function(e,t,r){if(!(r<=1)){var n={},i=new Uint8Array(e,t,r);return n.packetType=i[0],0===i[0]?n.data=this._parseAACAudioSpecificConfig(e,t+1,r-1):n.data=i.subarray(1),n}o.a.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},e.prototype._parseAACAudioSpecificConfig=function(e,t,r){var n,i,o=new Uint8Array(e,t,r),a=null,s=0,c=null;if(s=n=o[0]>>>3,(i=(7&o[0])<<1|o[1]>>>7)<0||i>=this._mpegSamplingRates.length)this._onError(_.a.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var u=this._mpegSamplingRates[i],d=(120&o[1])>>>3;if(!(d<0||d>=8)){5===s&&(c=(7&o[1])<<1|o[2]>>>7,o[2]);var l=self.navigator.userAgent.toLowerCase();return-1!==l.indexOf("firefox")?i>=6?(s=5,a=new Array(4),c=i-3):(s=2,a=new Array(2),c=i):-1!==l.indexOf("android")?(s=2,a=new Array(2),c=i):(s=5,c=i,a=new Array(4),i>=6?c=i-3:1===d&&(s=2,a=new Array(2),c=i)),a[0]=s<<3,a[0]|=(15&i)>>>1,a[1]=(15&i)<<7,a[1]|=(15&d)<<3,5===s&&(a[1]|=(15&c)>>>1,a[2]=(1&c)<<7,a[2]|=8,a[3]=0),{config:a,samplingRate:u,channelCount:d,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+n}}this._onError(_.a.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},e.prototype._parseMP3AudioData=function(e,t,r,n){if(!(r<4)){this._littleEndian;var i=new Uint8Array(e,t,r),a=null;if(n){if(255!==i[0])return;var s=i[1]>>>3&3,c=(6&i[1])>>1,u=(240&i[2])>>>4,d=(12&i[2])>>>2,l=3!=(i[3]>>>6&3)?2:1,p=0,f=0;switch(s){case 0:p=this._mpegAudioV25SampleRateTable[d];break;case 2:p=this._mpegAudioV20SampleRateTable[d];break;case 3:p=this._mpegAudioV10SampleRateTable[d]}switch(c){case 1:u>>4;if(0!=(128&a)){var c=15&a,u=String.fromCharCode.apply(String,new Uint8Array(e,t,r).slice(1,5));if("hvc1"!==u)return void this._onError(_.a.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+u);this._parseEnhancedHEVCVideoPacket(e,t+5,r-5,n,i,s,c)}else{var d=15&a;if(7===d)this._parseAVCVideoPacket(e,t+1,r-1,n,i,s);else{if(12!==d)return void this._onError(_.a.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+d);this._parseHEVCVideoPacket(e,t+1,r-1,n,i,s)}}}},e.prototype._parseAVCVideoPacket=function(e,t,r,n,i,a){if(r<4)o.a.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var s=this._littleEndian,c=new DataView(e,t,r),u=c.getUint8(0),d=(16777215&c.getUint32(0,!s))<<8>>8;if(0===u)this._parseAVCDecoderConfigurationRecord(e,t+4,r-4);else if(1===u)this._parseAVCVideoData(e,t+4,r-4,n,i,a,d);else if(2!==u)return void this._onError(_.a.FORMAT_ERROR,"Flv: Invalid video packet type "+u)}},e.prototype._parseHEVCVideoPacket=function(e,t,r,n,i,a){if(r<4)o.a.w(this.TAG,"Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");else{var s=this._littleEndian,c=new DataView(e,t,r),u=c.getUint8(0),d=(16777215&c.getUint32(0,!s))<<8>>8;if(0===u)this._parseHEVCDecoderConfigurationRecord(e,t+4,r-4);else if(1===u)this._parseHEVCVideoData(e,t+4,r-4,n,i,a,d);else if(2!==u)return void this._onError(_.a.FORMAT_ERROR,"Flv: Invalid video packet type "+u)}},e.prototype._parseEnhancedHEVCVideoPacket=function(e,t,r,n,i,a,s){if(r<4)o.a.w(this.TAG,"Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");else{var c=this._littleEndian,u=new DataView(e,t,r);if(0===s)this._parseHEVCDecoderConfigurationRecord(e,t,r);else if(1===s){var d=(4294967040&u.getUint32(0,!c))>>8;this._parseHEVCVideoData(e,t+3,r-3,n,i,a,d)}else if(3===s)this._parseHEVCVideoData(e,t,r,n,i,a,0);else if(2!==s)return void this._onError(_.a.FORMAT_ERROR,"Flv: Invalid video packet type "+s)}},e.prototype._parseAVCDecoderConfigurationRecord=function(e,t,r){if(r<7)o.a.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,i=this._videoTrack,a=this._littleEndian,s=new DataView(e,t,r);if(n){if(void 0!==n.avcc){var c=new Uint8Array(e,t,r);if(S(c,n.avcc))return;o.a.w(this.TAG,"AVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=i.id,n.timescale=this._timescale,n.duration=this._duration;var u=s.getUint8(0),d=s.getUint8(1);if(s.getUint8(2),s.getUint8(3),1===u&&0!==d)if(this._naluLengthSize=1+(3&s.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var l=31&s.getUint8(5);if(0!==l){l>1&&o.a.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+l);for(var p=6,f=0;f1&&o.a.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+R),p++,f=0;f=r){o.a.w(this.TAG,"Malformed Nalu near timestamp "+h+", offset = "+p+", dataSize = "+r);break}var _=u.getUint32(p,!c);if(3===f&&(_>>>=8),_>r-f)return void o.a.w(this.TAG,"Malformed Nalus near timestamp "+h+", NaluSize > DataSize!");var v=31&u.getUint8(p+f);5===v&&(m=!0);var y=new Uint8Array(e,t+p,f+_),g={type:v,data:y};d.push(g),l+=y.byteLength,p+=f+_}if(d.length){var b=this._videoTrack,w={units:d,length:l,isKeyframe:m,dts:h,cts:s,pts:h+s};m&&(w.fileposition=i),b.samples.push(w),b.length+=l}},e.prototype._parseHEVCVideoData=function(e,t,r,n,i,a,s){for(var c=this._littleEndian,u=new DataView(e,t,r),d=[],l=0,p=0,f=this._naluLengthSize,h=this._timestampBase+n,m=1===a;p=r){o.a.w(this.TAG,"Malformed Nalu near timestamp "+h+", offset = "+p+", dataSize = "+r);break}var _=u.getUint32(p,!c);if(3===f&&(_>>>=8),_>r-f)return void o.a.w(this.TAG,"Malformed Nalus near timestamp "+h+", NaluSize > DataSize!");var v=31&u.getUint8(p+f);19!==v&&20!==v||(m=!0);var y=new Uint8Array(e,t+p,f+_),g={type:v,data:y};d.push(g),l+=y.byteLength,p+=f+_}if(d.length){var b=this._videoTrack,w={units:d,length:l,isKeyframe:m,dts:h,cts:s,pts:h+s};m&&(w.fileposition=i),b.samples.push(w),b.length+=l}},e}(),k=function(){function e(){}return e.prototype.destroy=function(){this.onError=null,this.onMediaInfo=null,this.onMetaDataArrived=null,this.onTrackMetadata=null,this.onDataAvailable=null,this.onTimedID3Metadata=null,this.onSMPTE2038Metadata=null,this.onSCTE35Metadata=null,this.onPESPrivateData=null,this.onPESPrivateDataDescriptor=null},e}(),j=function(){this.program_pmt_pid={}};!function(e){e[e.kMPEG1Audio=3]="kMPEG1Audio",e[e.kMPEG2Audio=4]="kMPEG2Audio",e[e.kPESPrivateData=6]="kPESPrivateData",e[e.kADTSAAC=15]="kADTSAAC",e[e.kLOASAAC=17]="kLOASAAC",e[e.kAC3=129]="kAC3",e[e.kID3=21]="kID3",e[e.kSCTE35=134]="kSCTE35",e[e.kH264=27]="kH264",e[e.kH265=36]="kH265"}(w||(w={}));var E,R=function(){this.pid_stream_type={},this.common_pids={h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,mp3:void 0},this.pes_private_data_pids={},this.timed_id3_pids={},this.scte_35_pids={},this.smpte2038_pids={}},O=function(){},T=function(){},P=function(){this.slices=[],this.total_length=0,this.expected_length=0,this.file_position=0};!function(e){e[e.kUnspecified=0]="kUnspecified",e[e.kSliceNonIDR=1]="kSliceNonIDR",e[e.kSliceDPA=2]="kSliceDPA",e[e.kSliceDPB=3]="kSliceDPB",e[e.kSliceDPC=4]="kSliceDPC",e[e.kSliceIDR=5]="kSliceIDR",e[e.kSliceSEI=6]="kSliceSEI",e[e.kSliceSPS=7]="kSliceSPS",e[e.kSlicePPS=8]="kSlicePPS",e[e.kSliceAUD=9]="kSliceAUD",e[e.kEndOfSequence=10]="kEndOfSequence",e[e.kEndOfStream=11]="kEndOfStream",e[e.kFiller=12]="kFiller",e[e.kSPSExt=13]="kSPSExt",e[e.kReserved0=14]="kReserved0"}(E||(E={}));var A,D,C=function(){},L=function(e){var t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t),new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)},I=function(){function e(e){this.TAG="H264AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=e,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&o.a.e(this.TAG,"Could not find H264 startcode until payload end!")}return e.prototype.findNextStartCodeOffset=function(e){for(var t=e,r=this.data_;;){if(t+3>=r.byteLength)return this.eof_flag_=!0,r.byteLength;var n=r[t+0]<<24|r[t+1]<<16|r[t+2]<<8|r[t+3],i=r[t+0]<<16|r[t+1]<<8|r[t+2];if(1===n||1===i)return t;t++}},e.prototype.readNextNaluPayload=function(){for(var e=this.data_,t=null;null==t&&!this.eof_flag_;){var r=this.current_startcode_offset_,n=31&e[r+=1==(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3])?4:3],i=(128&e[r])>>>7,o=this.findNextStartCodeOffset(r);if(this.current_startcode_offset_=o,!(n>=E.kReserved0)&&0===i){var a=e.subarray(r,o);(t=new C).type=n,t.data=a}}return t},e}(),M=function(){function e(e,t,r){var n=8+e.byteLength+1+2+t.byteLength,i=!1;66!==e[3]&&77!==e[3]&&88!==e[3]&&(i=!0,n+=4);var o=this.data=new Uint8Array(n);o[0]=1,o[1]=e[1],o[2]=e[2],o[3]=e[3],o[4]=255,o[5]=225;var a=e.byteLength;o[6]=a>>>8,o[7]=255&a;var s=8;o.set(e,8),o[s+=a]=1;var c=t.byteLength;o[s+1]=c>>>8,o[s+2]=255&c,o.set(t,s+3),s+=3+c,i&&(o[s]=252|r.chroma_format_idc,o[s+1]=248|r.bit_depth_luma-8,o[s+2]=248|r.bit_depth_chroma-8,o[s+3]=0,s+=4)}return e.prototype.getData=function(){return this.data},e}();!function(e){e[e.kNull=0]="kNull",e[e.kAACMain=1]="kAACMain",e[e.kAAC_LC=2]="kAAC_LC",e[e.kAAC_SSR=3]="kAAC_SSR",e[e.kAAC_LTP=4]="kAAC_LTP",e[e.kAAC_SBR=5]="kAAC_SBR",e[e.kAAC_Scalable=6]="kAAC_Scalable",e[e.kLayer1=32]="kLayer1",e[e.kLayer2=33]="kLayer2",e[e.kLayer3=34]="kLayer3"}(A||(A={})),function(e){e[e.k96000Hz=0]="k96000Hz",e[e.k88200Hz=1]="k88200Hz",e[e.k64000Hz=2]="k64000Hz",e[e.k48000Hz=3]="k48000Hz",e[e.k44100Hz=4]="k44100Hz",e[e.k32000Hz=5]="k32000Hz",e[e.k24000Hz=6]="k24000Hz",e[e.k22050Hz=7]="k22050Hz",e[e.k16000Hz=8]="k16000Hz",e[e.k12000Hz=9]="k12000Hz",e[e.k11025Hz=10]="k11025Hz",e[e.k8000Hz=11]="k8000Hz",e[e.k7350Hz=12]="k7350Hz"}(D||(D={}));var B,N,U=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],G=(B=function(e,t){return(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),F=function(){},V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t}(F),z=function(){function e(e){this.TAG="AACADTSParser",this.data_=e,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&o.a.e(this.TAG,"Could not found ADTS syncword until payload end")}return e.prototype.findNextSyncwordOffset=function(e){for(var t=e,r=this.data_;;){if(t+7>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if(4095==(r[t+0]<<8|r[t+1])>>>4)return t;t++}},e.prototype.readNextAACFrame=function(){for(var e=this.data_,t=null;null==t&&!this.eof_flag_;){var r=this.current_syncword_offset_,n=(8&e[r+1])>>>3,i=(6&e[r+1])>>>1,o=1&e[r+1],a=(192&e[r+2])>>>6,s=(60&e[r+2])>>>2,c=(1&e[r+2])<<2|(192&e[r+3])>>>6,u=(3&e[r+3])<<11|e[r+4]<<3|(224&e[r+5])>>>5;if(e[r+6],r+u>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var d=1===o?7:9,l=u-d;r+=d;var p=this.findNextSyncwordOffset(r+l);if(this.current_syncword_offset_=p,(0===n||1===n)&&0===i){var f=e.subarray(r,r+l);(t=new F).audio_object_type=a+1,t.sampling_freq_index=s,t.sampling_frequency=U[s],t.channel_config=c,t.data=f}}return t},e.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},e.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},e}(),q=function(){function e(e){this.TAG="AACLOASParser",this.data_=e,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&o.a.e(this.TAG,"Could not found LOAS syncword until payload end")}return e.prototype.findNextSyncwordOffset=function(e){for(var t=e,r=this.data_;;){if(t+1>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if(695==(r[t+0]<<3|r[t+1]>>>5))return t;t++}},e.prototype.getLATMValue=function(e){for(var t=e.readBits(2),r=0,n=0;n<=t;n++)r<<=8,r|=e.readByte();return r},e.prototype.readNextAACFrame=function(e){for(var t=this.data_,r=null;null==r&&!this.eof_flag_;){var n=this.current_syncword_offset_,i=(31&t[n+1])<<8|t[n+2];if(n+3+i>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var a=new h(t.subarray(n+3,n+3+i)),s=null;if(a.readBool()){if(null==e){o.a.w(this.TAG,"StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(n+3+i),a.destroy();continue}s=e}else{var c=a.readBool();if(c&&a.readBool()){o.a.e(this.TAG,"audioMuxVersionA is Not Supported"),a.destroy();break}if(c&&this.getLATMValue(a),!a.readBool()){o.a.e(this.TAG,"allStreamsSameTimeFraming zero is Not Supported"),a.destroy();break}if(0!==a.readBits(6)){o.a.e(this.TAG,"more than 2 numSubFrames Not Supported"),a.destroy();break}if(0!==a.readBits(4)){o.a.e(this.TAG,"more than 2 numProgram Not Supported"),a.destroy();break}if(0!==a.readBits(3)){o.a.e(this.TAG,"more than 2 numLayer Not Supported"),a.destroy();break}var u=c?this.getLATMValue(a):0,d=a.readBits(5);u-=5;var l=a.readBits(4);u-=4;var p=a.readBits(4);u-=4,a.readBits(3),(u-=3)>0&&a.readBits(u);var f=a.readBits(3);if(0!==f){o.a.e(this.TAG,"frameLengthType = "+f+". Only frameLengthType = 0 Supported"),a.destroy();break}a.readByte();var m=a.readBool();if(m)if(c)this.getLATMValue(a);else{for(var _=0;;){_<<=8;var v=a.readBool();if(_+=a.readByte(),!v)break}console.log(_)}a.readBool()&&a.readByte(),(s=new V).audio_object_type=d,s.sampling_freq_index=l,s.sampling_frequency=U[s.sampling_freq_index],s.channel_config=p,s.other_data_present=m}for(var y=0;;){var g=a.readByte();if(y+=g,255!==g)break}for(var b=new Uint8Array(y),w=0;w=6?(n=5,t=new Array(4),a=i-3):(n=2,t=new Array(2),a=i):-1!==s.indexOf("android")?(n=2,t=new Array(2),a=i):(n=5,a=i,t=new Array(4),i>=6?a=i-3:1===o&&(n=2,t=new Array(2),a=i)),t[0]=n<<3,t[0]|=(15&i)>>>1,t[1]=(15&i)<<7,t[1]|=(15&o)<<3,5===n&&(t[1]|=(15&a)>>>1,t[2]=(1&a)<<7,t[2]|=8,t[3]=0),this.config=t,this.sampling_rate=U[i],this.channel_count=o,this.codec_mimetype="mp4a.40."+n,this.original_codec_mimetype="mp4a.40."+r},H=function(){},K=function(){};!function(e){e[e.kSpliceNull=0]="kSpliceNull",e[e.kSpliceSchedule=4]="kSpliceSchedule",e[e.kSpliceInsert=5]="kSpliceInsert",e[e.kTimeSignal=6]="kTimeSignal",e[e.kBandwidthReservation=7]="kBandwidthReservation",e[e.kPrivateCommand=255]="kPrivateCommand"}(N||(N={}));var Y,$=function(e){var t=e.readBool();return t?(e.readBits(6),{time_specified_flag:t,pts_time:4*e.readBits(31)+e.readBits(2)}):(e.readBits(7),{time_specified_flag:t})},J=function(e){var t=e.readBool();return e.readBits(6),{auto_return:t,duration:4*e.readBits(31)+e.readBits(2)}},X=function(e,t){var r=t.readBits(8);return e?{component_tag:r}:{component_tag:r,splice_time:$(t)}},Q=function(e){return{component_tag:e.readBits(8),utc_splice_time:e.readBits(32)}},Z=function(e){var t=e.readBits(32),r=e.readBool();e.readBits(7);var n={splice_event_id:t,splice_event_cancel_indicator:r};if(r)return n;if(n.out_of_network_indicator=e.readBool(),n.program_splice_flag=e.readBool(),n.duration_flag=e.readBool(),e.readBits(5),n.program_splice_flag)n.utc_splice_time=e.readBits(32);else{n.component_count=e.readBits(8),n.components=[];for(var i=0;i=r.byteLength)return this.eof_flag_=!0,r.byteLength;var n=r[t+0]<<24|r[t+1]<<16|r[t+2]<<8|r[t+3],i=r[t+0]<<16|r[t+1]<<8|r[t+2];if(1===n||1===i)return t;t++}},e.prototype.readNextNaluPayload=function(){for(var e=this.data_,t=null;null==t&&!this.eof_flag_;){var r=this.current_startcode_offset_,n=e[r+=1==(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3])?4:3]>>1&63,i=(128&e[r])>>>7,o=this.findNextStartCodeOffset(r);if(this.current_startcode_offset_=o,0===i){var a=e.subarray(r,o);(t=new se).type=n,t.data=a}}return t},e}(),de=function(){function e(e,t,r,n){var i=23+(5+e.byteLength)+(5+t.byteLength)+(5+r.byteLength),o=this.data=new Uint8Array(i);o[0]=1,o[1]=(3&n.general_profile_space)<<6|(n.general_tier_flag?1:0)<<5|31&n.general_profile_idc,o[2]=n.general_profile_compatibility_flags_1,o[3]=n.general_profile_compatibility_flags_2,o[4]=n.general_profile_compatibility_flags_3,o[5]=n.general_profile_compatibility_flags_4,o[6]=n.general_constraint_indicator_flags_1,o[7]=n.general_constraint_indicator_flags_2,o[8]=n.general_constraint_indicator_flags_3,o[9]=n.general_constraint_indicator_flags_4,o[10]=n.general_constraint_indicator_flags_5,o[11]=n.general_constraint_indicator_flags_6,o[12]=n.general_level_idc,o[13]=240|(3840&n.min_spatial_segmentation_idc)>>8,o[14]=255&n.min_spatial_segmentation_idc,o[15]=252|3&n.parallelismType,o[16]=252|3&n.chroma_format_idc,o[17]=248|7&n.bit_depth_luma_minus8,o[18]=248|7&n.bit_depth_chroma_minus8,o[19]=0,o[20]=0,o[21]=(3&n.constant_frame_rate)<<6|(7&n.num_temporal_layers)<<3|(n.temporal_id_nested?1:0)<<2|3,o[22]=3,o[23]=128|Y.kSliceVPS,o[24]=0,o[25]=1,o[26]=(65280&e.byteLength)>>8,o[27]=(255&e.byteLength)>>0,o.set(e,28),o[23+(5+e.byteLength)+0]=128|Y.kSliceSPS,o[23+(5+e.byteLength)+1]=0,o[23+(5+e.byteLength)+2]=1,o[23+(5+e.byteLength)+3]=(65280&t.byteLength)>>8,o[23+(5+e.byteLength)+4]=(255&t.byteLength)>>0,o.set(t,23+(5+e.byteLength)+5),o[23+(5+e.byteLength+5+t.byteLength)+0]=128|Y.kSlicePPS,o[23+(5+e.byteLength+5+t.byteLength)+1]=0,o[23+(5+e.byteLength+5+t.byteLength)+2]=1,o[23+(5+e.byteLength+5+t.byteLength)+3]=(65280&r.byteLength)>>8,o[23+(5+e.byteLength+5+t.byteLength)+4]=(255&r.byteLength)>>0,o.set(r,23+(5+e.byteLength+5+t.byteLength)+5)}return e.prototype.getData=function(){return this.data},e}(),le=function(){},pe=function(){},fe=function(){},he=[[64,64,80,80,96,96,112,112,128,128,160,160,192,192,224,224,256,256,320,320,384,384,448,448,512,512,640,640,768,768,896,896,1024,1024,1152,1152,1280,1280],[69,70,87,88,104,105,121,122,139,140,174,175,208,209,243,244,278,279,348,349,417,418,487,488,557,558,696,697,835,836,975,976,1114,1115,1253,1254,1393,1394],[96,96,120,120,144,144,168,168,192,192,240,240,288,288,336,336,384,384,480,480,576,576,672,672,768,768,960,960,1152,1152,1344,1344,1536,1536,1728,1728,1920,1920]],me=function(){function e(e){this.TAG="AC3Parser",this.data_=e,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&o.a.e(this.TAG,"Could not found AC3 syncword until payload end")}return e.prototype.findNextSyncwordOffset=function(e){for(var t=e,r=this.data_;;){if(t+7>=r.byteLength)return this.eof_flag_=!0,r.byteLength;if(2935==(r[t+0]<<8|r[t+1]<<0))return t;t++}},e.prototype.readNextAC3Frame=function(){for(var e=this.data_,t=null;null==t&&!this.eof_flag_;){var r=this.current_syncword_offset_,n=e[r+4]>>6,i=[48e3,44200,33e3][n],o=63&e[r+4],a=2*he[n][o];if(r+a>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}var s=this.findNextSyncwordOffset(r+a);this.current_syncword_offset_=s;var c=e[r+5]>>3,u=7&e[r+5],d=e[r+6]>>5,l=0;0!=(1&d)&&1!==d&&(l+=2),0!=(4&d)&&(l+=2),2===d&&(l+=2);var p=(e[r+6]<<8|e[r+7]<<0)>>12-l&1,f=[2,1,2,3,3,4,4,5][d]+p;(t=new fe).sampling_frequency=i,t.channel_count=f,t.channel_mode=d,t.bit_stream_identification=c,t.low_frequency_effects_channel_on=p,t.bit_stream_mode=u,t.frame_size_code=o,t.data=e.subarray(r,r+a)}return t},e.prototype.hasIncompleteData=function(){return this.has_last_incomplete_data},e.prototype.getIncompleteData=function(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null},e}(),_e=function(e){var t;t=[e.sampling_rate_code<<6|e.bit_stream_identification<<1|e.bit_stream_mode>>2,(3&e.bit_stream_mode)<<6|e.channel_mode<<3|e.low_frequency_effects_channel_on<<2|e.frame_size_code>>4,e.frame_size_code<<4&224],this.config=t,this.sampling_rate=e.sampling_frequency,this.bit_stream_identification=e.bit_stream_identification,this.bit_stream_mode=e.bit_stream_mode,this.low_frequency_effects_channel_on=e.low_frequency_effects_channel_on,this.channel_count=e.channel_count,this.channel_mode=e.channel_mode,this.codec_mimetype="ac-3",this.original_codec_mimetype="ac-3"},ve=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ye=function(){return(ye=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=4?(o.a.v("TSDemuxer","ts_packet_size = 192, m2ts mode"),r-=4):204===n&&o.a.v("TSDemuxer","ts_packet_size = 204, RS encoded MPEG2-TS stream"),{match:!0,consumed:0,ts_packet_size:n,sync_offset:r})},t.prototype.bindDataSource=function(e){return e.onDataArrival=this.parseChunks.bind(this),this},t.prototype.resetMediaInfo=function(){this.media_info_=new s.a},t.prototype.parseChunks=function(e,t){if(!(this.onError&&this.onMediaInfo&&this.onTrackMetadata&&this.onDataAvailable))throw new l.a("onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var r=0;for(this.first_parse_&&(this.first_parse_=!1,r=this.sync_offset_);r+this.ts_packet_size_<=e.byteLength;){var n=t+r;192===this.ts_packet_size_&&(r+=4);var i=new Uint8Array(e,r,188),a=i[0];if(71!==a){o.a.e(this.TAG,"sync_byte = "+a+", not 0x47");break}var s=(64&i[1])>>>6,c=(i[1],(31&i[1])<<8|i[2]),u=(48&i[3])>>>4,d=15&i[3],p={},f=4;if(2==u||3==u){var h=i[4];if(5+h===188){r+=188,204===this.ts_packet_size_&&(r+=16);continue}h>0&&(p=this.parseAdaptationField(e,r+4,1+h)),f=5+h}if(1==u||3==u)if(0===c||c===this.current_pmt_pid_||null!=this.pmt_&&this.pmt_.pid_stream_type[c]===w.kSCTE35){var m=188-f;this.handleSectionSlice(e,r+f,m,{pid:c,file_position:n,payload_unit_start_indicator:s,continuity_conunter:d,random_access_indicator:p.random_access_indicator})}else if(null!=this.pmt_&&null!=this.pmt_.pid_stream_type[c]){m=188-f;var _=this.pmt_.pid_stream_type[c];c!==this.pmt_.common_pids.h264&&c!==this.pmt_.common_pids.h265&&c!==this.pmt_.common_pids.adts_aac&&c!==this.pmt_.common_pids.loas_aac&&c!==this.pmt_.common_pids.ac3&&c!==this.pmt_.common_pids.opus&&c!==this.pmt_.common_pids.mp3&&!0!==this.pmt_.pes_private_data_pids[c]&&!0!==this.pmt_.timed_id3_pids[c]||this.handlePESSlice(e,r+f,m,{pid:c,stream_type:_,file_position:n,payload_unit_start_indicator:s,continuity_conunter:d,random_access_indicator:p.random_access_indicator})}r+=188,204===this.ts_packet_size_&&(r+=16)}return this.dispatchAudioVideoMediaSegment(),r},t.prototype.parseAdaptationField=function(e,t,r){var n=new Uint8Array(e,t,r),i=n[0];return i>0?i>183?(o.a.w(this.TAG,"Illegal adaptation_field_length: "+i),{}):{discontinuity_indicator:(128&n[1])>>>7,random_access_indicator:(64&n[1])>>>6,elementary_stream_priority_indicator:(32&n[1])>>>5}:{}},t.prototype.handleSectionSlice=function(e,t,r,n){var i=new Uint8Array(e,t,r),o=this.section_slice_queues_[n.pid];if(n.payload_unit_start_indicator){var a=i[0];if(null!=o&&0!==o.total_length){var s=new Uint8Array(e,t+1,Math.min(r,a));o.slices.push(s),o.total_length+=s.byteLength,o.total_length===o.expected_length?this.emitSectionSlices(o,n):this.clearSlices(o,n)}for(var c=1+a;c=o.expected_length&&this.clearSlices(o,n),c+=s.byteLength}}else null!=o&&0!==o.total_length&&(s=new Uint8Array(e,t,Math.min(r,o.expected_length-o.total_length)),o.slices.push(s),o.total_length+=s.byteLength,o.total_length===o.expected_length?this.emitSectionSlices(o,n):o.total_length>=o.expected_length&&this.clearSlices(o,n))},t.prototype.handlePESSlice=function(e,t,r,n){var i=new Uint8Array(e,t,r),a=i[0]<<16|i[1]<<8|i[2],s=(i[3],i[4]<<8|i[5]);if(n.payload_unit_start_indicator){if(1!==a)return void o.a.e(this.TAG,"handlePESSlice: packet_start_code_prefix should be 1 but with value "+a);var c=this.pes_slice_queues_[n.pid];c&&(0===c.expected_length||c.expected_length===c.total_length?this.emitPESSlices(c,n):this.clearSlices(c,n)),this.pes_slice_queues_[n.pid]=new P,this.pes_slice_queues_[n.pid].file_position=n.file_position,this.pes_slice_queues_[n.pid].random_access_indicator=n.random_access_indicator}if(null!=this.pes_slice_queues_[n.pid]){var u=this.pes_slice_queues_[n.pid];u.slices.push(i),n.payload_unit_start_indicator&&(u.expected_length=0===s?0:s+6),u.total_length+=i.byteLength,u.expected_length>0&&u.expected_length===u.total_length?this.emitPESSlices(u,n):u.expected_length>0&&u.expected_length>>6,s=t[8],c=void 0,u=void 0;2!==a&&3!==a||(c=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,u=3===a?536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2:c);var d=9+s,l=void 0;if(0!==i){if(i<3+s)return void o.a.v(this.TAG,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");l=i-3-s}else l=t.byteLength-d;var p=t.subarray(d,d+l);switch(e.stream_type){case w.kMPEG1Audio:case w.kMPEG2Audio:this.parseMP3Payload(p,c);break;case w.kPESPrivateData:this.pmt_.common_pids.opus===e.pid?this.parseOpusPayload(p,c):this.pmt_.common_pids.ac3===e.pid?this.parseAC3Payload(p,c):this.pmt_.smpte2038_pids[e.pid]?this.parseSMPTE2038MetadataPayload(p,c,u,e.pid,n):this.parsePESPrivateDataPayload(p,c,u,e.pid,n);break;case w.kADTSAAC:this.parseADTSAACPayload(p,c);break;case w.kLOASAAC:this.parseLOASAACPayload(p,c);break;case w.kAC3:this.parseAC3Payload(p,c);break;case w.kID3:this.parseTimedID3MetadataPayload(p,c,u,e.pid,n);break;case w.kH264:this.parseH264Payload(p,c,u,e.file_position,e.random_access_indicator);break;case w.kH265:this.parseH265Payload(p,c,u,e.file_position,e.random_access_indicator)}}else 188!==n&&191!==n&&240!==n&&241!==n&&255!==n&&242!==n&&248!==n||e.stream_type!==w.kPESPrivateData||(d=6,l=void 0,l=0!==i?i:t.byteLength-d,p=t.subarray(d,d+l),this.parsePESPrivateDataPayload(p,void 0,void 0,e.pid,n));else o.a.e(this.TAG,"parsePES: packet_start_code_prefix should be 1 but with value "+r)},t.prototype.parsePAT=function(e){var t=e[0];if(0===t){var r=(15&e[1])<<8|e[2],n=(e[3],e[4],(62&e[5])>>>1),i=1&e[5],a=e[6],s=(e[7],null);if(1===i&&0===a)(s=new j).version_number=n;else if(null==(s=this.pat_))return;for(var c=r-5-4,u=-1,d=-1,l=8;l<8+c;l+=4){var p=e[l]<<8|e[l+1],f=(31&e[l+2])<<8|e[l+3];0===p?s.network_pid=f:(s.program_pmt_pid[p]=f,-1===u&&(u=p),-1===d&&(d=f))}1===i&&0===a&&(null==this.pat_&&o.a.v(this.TAG,"Parsed first PAT: "+JSON.stringify(s)),this.pat_=s,this.current_program_=u,this.current_pmt_pid_=d)}else o.a.e(this.TAG,"parsePAT: table_id "+t+" is not corresponded to PAT!")},t.prototype.parsePMT=function(e){var t=e[0];if(2===t){var r=(15&e[1])<<8|e[2],n=e[3]<<8|e[4],i=(62&e[5])>>>1,a=1&e[5],s=e[6],c=(e[7],null);if(1===a&&0===s)(c=new R).program_number=n,c.version_number=i,this.program_pmt_map_[n]=c;else if(null==(c=this.program_pmt_map_[n]))return;e[8],e[9];for(var u=(15&e[10])<<8|e[11],d=12+u,l=r-9-u-4,p=d;p0){for(var y=p+5;y1&&(o.a.w(this.TAG,"AAC: Detected pts overlapped, expected: "+a+"ms, PES pts: "+i+"ms"),i=a)}}for(var s,c=new z(e),u=null,d=i;null!=(u=c.readNextAACFrame());){n=1024/u.sampling_frequency*1e3;var l={codec:"aac",data:u};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"aac",audio_object_type:u.audio_object_type,sampling_freq_index:u.sampling_freq_index,sampling_frequency:u.sampling_frequency,channel_config:u.channel_config},this.dispatchAudioInitSegment(l)):this.detectAudioMetadataChange(l)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(l)),s=d;var p=Math.floor(d),f={unit:u.data,length:u.data.byteLength,pts:p,dts:p};this.audio_track_.samples.push(f),this.audio_track_.length+=u.data.byteLength,d+=n}c.hasIncompleteData()&&(this.aac_last_incomplete_data_=c.getIncompleteData()),s&&(this.aac_last_sample_pts_=s)}},t.prototype.parseLOASAACPayload=function(e,t){var r;if(!this.has_video_||this.video_init_segment_dispatched_){if(this.aac_last_incomplete_data_){var n=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength);n.set(this.aac_last_incomplete_data_,0),n.set(e,this.aac_last_incomplete_data_.byteLength),e=n}var i,a;if(null!=t&&(a=t/this.timescale_),"aac"===this.audio_metadata_.codec){if(null==t&&null!=this.aac_last_sample_pts_)i=1024/this.audio_metadata_.sampling_frequency*1e3,a=this.aac_last_sample_pts_+i;else if(null==t)return void o.a.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.aac_last_sample_pts_){i=1024/this.audio_metadata_.sampling_frequency*1e3;var s=this.aac_last_sample_pts_+i;Math.abs(s-a)>1&&(o.a.w(this.TAG,"AAC: Detected pts overlapped, expected: "+s+"ms, PES pts: "+a+"ms"),a=s)}}for(var c,u=new q(e),d=null,l=a;null!=(d=u.readNextAACFrame(null!==(r=this.loas_previous_frame)&&void 0!==r?r:void 0));){this.loas_previous_frame=d,i=1024/d.sampling_frequency*1e3;var p={codec:"aac",data:d};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"aac",audio_object_type:d.audio_object_type,sampling_freq_index:d.sampling_freq_index,sampling_frequency:d.sampling_frequency,channel_config:d.channel_config},this.dispatchAudioInitSegment(p)):this.detectAudioMetadataChange(p)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(p)),c=l;var f=Math.floor(l),h={unit:d.data,length:d.data.byteLength,pts:f,dts:f};this.audio_track_.samples.push(h),this.audio_track_.length+=d.data.byteLength,l+=i}u.hasIncompleteData()&&(this.aac_last_incomplete_data_=u.getIncompleteData()),c&&(this.aac_last_sample_pts_=c)}},t.prototype.parseAC3Payload=function(e,t){if(!this.has_video_||this.video_init_segment_dispatched_){var r,n;if(null!=t&&(n=t/this.timescale_),"ac-3"===this.audio_metadata_.codec)if(null==t&&null!=this.aac_last_sample_pts_)r=1536/this.audio_metadata_.sampling_frequency*1e3,n=this.aac_last_sample_pts_+r;else if(null==t)return void o.a.w(this.TAG,"Opus: Unknown pts");for(var i,a=new me(e),s=null,c=n;null!=(s=a.readNextAC3Frame());){r=1536/s.sampling_frequency*1e3;var u={codec:"ac-3",data:s};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"ac-3",sampling_frequency:s.sampling_frequency,bit_stream_identification:s.bit_stream_identification,bit_stream_mode:s.bit_stream_mode,low_frequency_effects_channel_on:s.low_frequency_effects_channel_on,channel_mode:s.channel_mode},console.log(JSON.stringify(this.audio_metadata_)),this.dispatchAudioInitSegment(u)):this.detectAudioMetadataChange(u)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(u)),i=c;var d=Math.floor(c),l={unit:s.data,length:s.data.byteLength,pts:d,dts:d};this.audio_track_.samples.push(l),this.audio_track_.length+=s.data.byteLength,c+=r}i&&(this.aac_last_sample_pts_=i)}},t.prototype.parseOpusPayload=function(e,t){if(!this.has_video_||this.video_init_segment_dispatched_){var r,n;if(null!=t&&(n=t/this.timescale_),"opus"===this.audio_metadata_.codec)if(null==t&&null!=this.aac_last_sample_pts_)r=20,n=this.aac_last_sample_pts_+r;else if(null==t)return void o.a.w(this.TAG,"Opus: Unknown pts");for(var i,a=n,s=0;s>>3&3,n=(6&e[1])>>1,i=(e[2],(12&e[2])>>>2),o=3!=(e[3]>>>6&3)?2:1,a=0,s=34;switch(r){case 0:a=[11025,12e3,8e3,0][i];break;case 2:a=[22050,24e3,16e3,0][i];break;case 3:a=[44100,48e3,32e3,0][i]}switch(n){case 1:s=34;break;case 2:s=33;break;case 3:s=32}var c=new pe;c.object_type=s,c.sample_rate=a,c.channel_count=o,c.data=e;var u={codec:"mp3",data:c};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"mp3",object_type:s,sample_rate:a,channel_count:o},this.dispatchAudioInitSegment(u)):this.detectAudioMetadataChange(u)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(u));var d={unit:e,length:e.byteLength,pts:t/this.timescale_,dts:t/this.timescale_};this.audio_track_.samples.push(d),this.audio_track_.length+=e.byteLength}},t.prototype.detectAudioMetadataChange=function(e){if(e.codec!==this.audio_metadata_.codec)return o.a.v(this.TAG,"Audio: Audio Codecs changed from "+this.audio_metadata_.codec+" to "+e.codec),!0;if("aac"===e.codec&&"aac"===this.audio_metadata_.codec){if((t=e.data).audio_object_type!==this.audio_metadata_.audio_object_type)return o.a.v(this.TAG,"AAC: AudioObjectType changed from "+this.audio_metadata_.audio_object_type+" to "+t.audio_object_type),!0;if(t.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return o.a.v(this.TAG,"AAC: SamplingFrequencyIndex changed from "+this.audio_metadata_.sampling_freq_index+" to "+t.sampling_freq_index),!0;if(t.channel_config!==this.audio_metadata_.channel_config)return o.a.v(this.TAG,"AAC: Channel configuration changed from "+this.audio_metadata_.channel_config+" to "+t.channel_config),!0}else if("ac-3"===e.codec&&"ac-3"===this.audio_metadata_.codec){var t;if((t=e.data).sampling_frequency!==this.audio_metadata_.sampling_frequency)return o.a.v(this.TAG,"AC3: Sampling Frequency changed from "+this.audio_metadata_.sampling_frequency+" to "+t.sampling_frequency),!0;if(t.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return o.a.v(this.TAG,"AC3: Bit Stream Identification changed from "+this.audio_metadata_.bit_stream_identification+" to "+t.bit_stream_identification),!0;if(t.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return o.a.v(this.TAG,"AC3: BitStream Mode changed from "+this.audio_metadata_.bit_stream_mode+" to "+t.bit_stream_mode),!0;if(t.channel_mode!==this.audio_metadata_.channel_mode)return o.a.v(this.TAG,"AC3: Channel Mode changed from "+this.audio_metadata_.channel_mode+" to "+t.channel_mode),!0;if(t.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return o.a.v(this.TAG,"AC3: Low Frequency Effects Channel On changed from "+this.audio_metadata_.low_frequency_effects_channel_on+" to "+t.low_frequency_effects_channel_on),!0}else if("opus"===e.codec&&"opus"===this.audio_metadata_.codec){if((r=e.meta).sample_rate!==this.audio_metadata_.sample_rate)return o.a.v(this.TAG,"Opus: SamplingFrequencyIndex changed from "+this.audio_metadata_.sample_rate+" to "+r.sample_rate),!0;if(r.channel_count!==this.audio_metadata_.channel_count)return o.a.v(this.TAG,"Opus: Channel count changed from "+this.audio_metadata_.channel_count+" to "+r.channel_count),!0}else if("mp3"===e.codec&&"mp3"===this.audio_metadata_.codec){var r;if((r=e.data).object_type!==this.audio_metadata_.object_type)return o.a.v(this.TAG,"MP3: AudioObjectType changed from "+this.audio_metadata_.object_type+" to "+r.object_type),!0;if(r.sample_rate!==this.audio_metadata_.sample_rate)return o.a.v(this.TAG,"MP3: SamplingFrequencyIndex changed from "+this.audio_metadata_.sample_rate+" to "+r.sample_rate),!0;if(r.channel_count!==this.audio_metadata_.channel_count)return o.a.v(this.TAG,"MP3: Channel count changed from "+this.audio_metadata_.channel_count+" to "+r.channel_count),!0}return!1},t.prototype.dispatchAudioInitSegment=function(e){var t={type:"audio"};if(t.id=this.audio_track_.id,t.timescale=1e3,t.duration=this.duration_,"aac"===this.audio_metadata_.codec){var r="aac"===e.codec?e.data:null,n=new W(r);t.audioSampleRate=n.sampling_rate,t.channelCount=n.channel_count,t.codec=n.codec_mimetype,t.originalCodec=n.original_codec_mimetype,t.config=n.config,t.refSampleDuration=1024/t.audioSampleRate*t.timescale}else if("ac-3"===this.audio_metadata_.codec){var i="ac-3"===e.codec?e.data:null,a=new _e(i);t.audioSampleRate=a.sampling_rate,t.channelCount=a.channel_count,t.codec=a.codec_mimetype,t.originalCodec=a.original_codec_mimetype,t.config=a.config,t.refSampleDuration=1536/t.audioSampleRate*t.timescale}else"opus"===this.audio_metadata_.codec?(t.audioSampleRate=this.audio_metadata_.sample_rate,t.channelCount=this.audio_metadata_.channel_count,t.channelConfigCode=this.audio_metadata_.channel_config_code,t.codec="opus",t.originalCodec="opus",t.config=void 0,t.refSampleDuration=20):"mp3"===this.audio_metadata_.codec&&(t.audioSampleRate=this.audio_metadata_.sample_rate,t.channelCount=this.audio_metadata_.channel_count,t.codec="mp3",t.originalCodec="mp3",t.config=void 0);0==this.audio_init_segment_dispatched_&&o.a.v(this.TAG,"Generated first AudioSpecificConfig for mimeType: "+t.codec),this.onTrackMetadata("audio",t),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;var s=this.media_info_;s.hasAudio=!0,s.audioCodec=t.originalCodec,s.audioSampleRate=t.audioSampleRate,s.audioChannelCount=t.channelCount,s.hasVideo&&s.videoCodec?s.mimeType='video/mp2t; codecs="'+s.videoCodec+","+s.audioCodec+'"':s.mimeType='video/mp2t; codecs="'+s.audioCodec+'"',s.isComplete()&&this.onMediaInfo(s)},t.prototype.dispatchPESPrivateDataDescriptor=function(e,t,r){var n=new K;n.pid=e,n.stream_type=t,n.descriptor=r,this.onPESPrivateDataDescriptor&&this.onPESPrivateDataDescriptor(n)},t.prototype.parsePESPrivateDataPayload=function(e,t,r,n,i){var o=new H;if(o.pid=n,o.stream_id=i,o.len=e.byteLength,o.data=e,null!=t){var a=Math.floor(t/this.timescale_);o.pts=a}else o.nearest_pts=this.aac_last_sample_pts_;if(null!=r){var s=Math.floor(r/this.timescale_);o.dts=s}this.onPESPrivateData&&this.onPESPrivateData(o)},t.prototype.parseTimedID3MetadataPayload=function(e,t,r,n,i){var o=new H;if(o.pid=n,o.stream_id=i,o.len=e.byteLength,o.data=e,null!=t){var a=Math.floor(t/this.timescale_);o.pts=a}if(null!=r){var s=Math.floor(r/this.timescale_);o.dts=s}this.onTimedID3Metadata&&this.onTimedID3Metadata(o)},t.prototype.parseSMPTE2038MetadataPayload=function(e,t,r,n,i){var o=new le;if(o.pid=n,o.stream_id=i,o.len=e.byteLength,o.data=e,null!=t){var a=Math.floor(t/this.timescale_);o.pts=a}if(o.nearest_pts=this.aac_last_sample_pts_,null!=r){var s=Math.floor(r/this.timescale_);o.dts=s}o.ancillaries=function(e){for(var t=new h(e),r=0,n=[];r+=6,0===t.readBits(6);){var i=t.readBool();r+=1;var o=t.readBits(11);r+=11;var a=t.readBits(12);r+=12;var s=255&t.readBits(10);r+=10;var c=255&t.readBits(10);r+=10;var u=255&t.readBits(10);r+=10;for(var d=new Uint8Array(u),l=0;l>>24&255,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r.set(e,4);var a=8;for(o=0;o>>24&255,t>>>16&255,t>>>8&255,255&t,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))},e.trak=function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.tkhd=function(t){var r=t.id,n=t.duration,i=t.presentWidth,o=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,o>>>8&255,255&o,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))},e.mdhd=function(t){var r=t.timescale,n=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))},e.hdlr=function(t){var r;return r="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,r)},e.minf=function(t){var r;return r="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,r,e.dinf(),e.stbl(t))},e.dinf=function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))},e.stsd=function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):"ac-3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.ac3(t)):"opus"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.Opus(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):"video"===t.type&&t.codec.startsWith("hvc1")?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.hvc1(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))},e.mp3=function(t){var r=t.channelCount,n=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return e.box(e.types[".mp3"],i)},e.mp4a=function(t){var r=t.channelCount,n=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return e.box(e.types.mp4a,i,e.esds(t))},e.ac3=function(t){var r=t.channelCount,n=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return e.box(e.types["ac-3"],i,e.box(e.types.dac3,new Uint8Array(t.config)))},e.esds=function(t){var r=t.config||[],n=r.length,i=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(r).concat([6,1,2]));return e.box(e.types.esds,i)},e.Opus=function(t){var r=t.channelCount,n=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return e.box(e.types.Opus,i,e.dOps(t))},e.dOps=function(t){var r=t.channelCount,n=t.channelConfigCode,i=t.audioSampleRate;if(t.config)return e.box(e.types.dOps,a);var o=[];switch(n){case 1:case 2:o=[0];break;case 0:o=[255,1,1,0,1];break;case 128:o=[255,2,0,0,1];break;case 3:o=[1,2,1,0,2,1];break;case 4:o=[1,2,2,0,1,2,3];break;case 5:o=[1,3,2,0,4,1,2,3];break;case 6:o=[1,4,2,0,4,1,2,3,5];break;case 7:o=[1,4,2,0,4,1,2,3,5,6];break;case 8:o=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:o=[1,1,2,0,1];break;case 131:o=[1,1,3,0,1,2];break;case 132:o=[1,1,4,0,1,2,3];break;case 133:o=[1,1,5,0,1,2,3,4];break;case 134:o=[1,1,6,0,1,2,3,4,5];break;case 135:o=[1,1,7,0,1,2,3,4,5,6];break;case 136:o=[1,1,8,0,1,2,3,4,5,6,7]}var a=new Uint8Array(function(){for(var e=0,t=0,r=arguments.length;t>>24&255,i>>>17&255,i>>>8&255,i>>>0&255,0,0],o));return e.box(e.types.dOps,a)},e.avc1=function(t){var r=t.avcc,n=t.codecWidth,i=t.codecHeight,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,o,e.box(e.types.avcC,r))},e.hvc1=function(t){var r=t.hvcc,n=t.codecWidth,i=t.codecHeight,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.hvc1,o,e.box(e.types.hvcC,r))},e.mvex=function(t){return e.box(e.types.mvex,e.trex(t))},e.trex=function(t){var r=t.id,n=new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,n)},e.moof=function(t,r){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,r))},e.mfhd=function(t){var r=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,r)},e.traf=function(t,r){var n=t.id,i=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),o=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),a=e.sdtp(t),s=e.trun(t,a.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,i,o,s,a)},e.sdtp=function(t){for(var r=t.samples||[],n=r.length,i=new Uint8Array(4+n),o=0;o>>24&255,i>>>16&255,i>>>8&255,255&i,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0);for(var s=0;s>>24&255,c>>>16&255,c>>>8&255,255&c,u>>>24&255,u>>>16&255,u>>>8&255,255&u,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.isNonSync,0,0,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*s)}return e.box(e.types.trun,a)},e.mdat=function(t){return e.box(e.types.mdat,t)},e}();be.init();var we=be,Se=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}(),xe=r(7),ke=function(){function e(e){this.TAG="MP4Remuxer",this._config=e,this._isLive=!0===e.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new xe.c("audio"),this._videoSegmentInfoList=new xe.c("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!a.a.chrome||!(a.a.version.major<50||50===a.a.version.major&&a.a.version.build<2661)),this._fillSilentAfterSeek=a.a.msedge||a.a.msie,this._mp3UseMpegAudio=!a.a.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return e.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},e.prototype.bindDataSource=function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(e.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e},enumerable:!1,configurable:!0}),e.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},e.prototype.seek=function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},e.prototype.remux=function(e,t){if(!this._onMediaSegment)throw new l.a("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),t&&this._remuxVideo(t),e&&this._remuxAudio(e)},e.prototype._onTrackMetadataReceived=function(e,t){var r=null,n="mp4",i=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(n="mpeg",i="",r=new Uint8Array):r=we.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,r=we.generateInitSegment(t)}if(!this._onInitSegment)throw new l.a("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:r.buffer,codec:i,container:e+"/"+n,mediaDuration:t.duration})},e.prototype._calculateDtsBase=function(e,t){this._dtsBaseInited||(e&&e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t&&t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},e.prototype.getTimestampBase=function(){if(this._dtsBaseInited)return this._dtsBase},e.prototype.flushStashedSamples=function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,r={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(r.samples.push(e),r.length=e.length);var n={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(n.samples.push(t),n.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(r,!0),this._remuxAudio(n,!0)},e.prototype._remuxAudio=function(e,t){if(null!=this._audioMeta){var r,n=e,i=n.samples,s=void 0,c=-1,u=this._audioMeta.refSampleDuration,d="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,l=this._dtsBaseInited&&void 0===this._audioNextDts,p=!1;if(i&&0!==i.length&&(1!==i.length||t)){var f=0,h=null,m=0;d?(f=0,m=n.length):(f=8,m=8+n.length);var _=null;if(i.length>1&&(m-=(_=i.pop()).length),null!=this._audioStashedLastSample){var v=this._audioStashedLastSample;this._audioStashedLastSample=null,i.unshift(v),m+=v.length}null!=_&&(this._audioStashedLastSample=_);var y=i[0].dts-this._dtsBase;if(this._audioNextDts)s=y-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())s=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(p=!0);else{var g=this._audioSegmentInfoList.getLastSampleBefore(y);if(null!=g){var b=y-(g.originalDts+g.duration);b<=3&&(b=0),s=y-(g.dts+g.duration+b)}else s=0}if(p){var w=y-s,S=this._videoSegmentInfoList.getLastSegmentBefore(y);if(null!=S&&S.beginDts=3*u&&this._fillAudioTimestampGap&&!a.a.safari){T=!0;var C,L=Math.floor(s/u);o.a.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\noriginalDts: "+O+" ms, curRefDts: "+D+" ms, dtsCorrection: "+Math.round(s)+" ms, generate: "+L+" frames"),x=Math.floor(D),A=Math.floor(D+u)-x,null==(C=Se.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount))&&(o.a.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),C=R),P=[];for(var I=0;I=1?j[j.length-1].duration:Math.floor(u),this._audioNextDts=x+A;-1===c&&(c=x),j.push({dts:x,pts:x,cts:0,unit:v.unit,size:v.unit.byteLength,duration:A,originalDts:O,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),T&&j.push.apply(j,P)}}if(0===j.length)return n.samples=[],void(n.length=0);for(d?h=new Uint8Array(m):((h=new Uint8Array(m))[0]=m>>>24&255,h[1]=m>>>16&255,h[2]=m>>>8&255,h[3]=255&m,h.set(we.types.mdat,4)),E=0;E1&&(l-=(p=o.pop()).length),null!=this._videoStashedLastSample){var f=this._videoStashedLastSample;this._videoStashedLastSample=null,o.unshift(f),l+=f.length}null!=p&&(this._videoStashedLastSample=p);var h=o[0].dts-this._dtsBase;if(this._videoNextDts)a=h-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())a=0;else{var m=this._videoSegmentInfoList.getLastSampleBefore(h);if(null!=m){var _=h-(m.originalDts+m.duration);_<=3&&(_=0),a=h-(m.dts+m.duration+_)}else a=0}for(var v=new xe.b,y=[],g=0;g=1?y[y.length-1].duration:Math.floor(this._videoMeta.refSampleDuration),w){var E=new xe.d(S,k,j,f.dts,!0);E.fileposition=f.fileposition,v.appendSyncPoint(E)}y.push({dts:S,pts:k,cts:x,units:f.units,size:f.length,isKeyframe:w,duration:j,originalDts:b,flags:{isLeading:0,dependsOn:w?2:1,isDependedOn:w?1:0,hasRedundancy:0,isNonSync:w?0:1}})}for((d=new Uint8Array(l))[0]=l>>>24&255,d[1]=l>>>16&255,d[2]=l>>>8&255,d[3]=255&l,d.set(we.types.mdat,4),g=0;g0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,n=this._demuxer.parseChunks(e,t);else{var i=null;(i=x.probe(e)).match&&(this._setupFLVDemuxerRemuxer(i),n=this._demuxer.parseChunks(e,t)),i.match||i.needMoreData||(i=ge.probe(e)).match&&(this._setupTSDemuxerRemuxer(i),n=this._demuxer.parseChunks(e,t)),i.match||i.needMoreData||(i=null,o.a.e(this.TAG,"Non MPEG-TS/FLV, Unsupported media type!"),Promise.resolve().then((function(){r._internalAbort()})),this._emitter.emit(Ee.a.DEMUX_ERROR,_.a.FORMAT_UNSUPPORTED,"Non MPEG-TS/FLV, Unsupported media type!"))}return n},e.prototype._setupFLVDemuxerRemuxer=function(e){this._demuxer=new x(e,this._config),this._remuxer||(this._remuxer=new ke(this._config));var t=this._mediaDataSource;null==t.duration||isNaN(t.duration)||(this._demuxer.overridedDuration=t.duration),"boolean"==typeof t.hasAudio&&(this._demuxer.overridedHasAudio=t.hasAudio),"boolean"==typeof t.hasVideo&&(this._demuxer.overridedHasVideo=t.hasVideo),this._demuxer.timestampBase=t.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)},e.prototype._setupTSDemuxerRemuxer=function(e){var t=this._demuxer=new ge(e,this._config);this._remuxer||(this._remuxer=new ke(this._config)),t.onError=this._onDemuxException.bind(this),t.onMediaInfo=this._onMediaInfo.bind(this),t.onMetaDataArrived=this._onMetaDataArrived.bind(this),t.onTimedID3Metadata=this._onTimedID3Metadata.bind(this),t.onSMPTE2038Metadata=this._onSMPTE2038Metadata.bind(this),t.onSCTE35Metadata=this._onSCTE35Metadata.bind(this),t.onPESPrivateDataDescriptor=this._onPESPrivateDataDescriptor.bind(this),t.onPESPrivateData=this._onPESPrivateData.bind(this),this._remuxer.bindDataSource(this._demuxer),this._demuxer.bindDataSource(this._ioctl),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)},e.prototype._onMediaInfo=function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,s.a.prototype));var r=Object.assign({},e);Object.setPrototypeOf(r,s.a.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=r,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))},e.prototype._onMetaDataArrived=function(e){this._emitter.emit(Ee.a.METADATA_ARRIVED,e)},e.prototype._onScriptDataArrived=function(e){this._emitter.emit(Ee.a.SCRIPTDATA_ARRIVED,e)},e.prototype._onTimedID3Metadata=function(e){var t=this._remuxer.getTimestampBase();null!=t&&(null!=e.pts&&(e.pts-=t),null!=e.dts&&(e.dts-=t),this._emitter.emit(Ee.a.TIMED_ID3_METADATA_ARRIVED,e))},e.prototype._onSMPTE2038Metadata=function(e){var t=this._remuxer.getTimestampBase();null!=t&&(null!=e.pts&&(e.pts-=t),null!=e.dts&&(e.dts-=t),null!=e.nearest_pts&&(e.nearest_pts-=t),this._emitter.emit(Ee.a.SMPTE2038_METADATA_ARRIVED,e))},e.prototype._onSCTE35Metadata=function(e){var t=this._remuxer.getTimestampBase();null!=t&&(null!=e.pts&&(e.pts-=t),null!=e.nearest_pts&&(e.nearest_pts-=t),this._emitter.emit(Ee.a.SCTE35_METADATA_ARRIVED,e))},e.prototype._onPESPrivateDataDescriptor=function(e){this._emitter.emit(Ee.a.PES_PRIVATE_DATA_DESCRIPTOR,e)},e.prototype._onPESPrivateData=function(e){var t=this._remuxer.getTimestampBase();null!=t&&(null!=e.pts&&(e.pts-=t),null!=e.nearest_pts&&(e.nearest_pts-=t),null!=e.dts&&(e.dts-=t),this._emitter.emit(Ee.a.PES_PRIVATE_DATA_ARRIVED,e))},e.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},e.prototype._onIOComplete=function(e){var t=e+1;t0&&r[0].originalDts===n&&(n=r[0].pts),this._emitter.emit(Ee.a.RECOMMEND_SEEKPOINT,n)}},e.prototype._enableStatisticsReporter=function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},e.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype._reportSegmentMediaInfo=function(e){var t=this._mediaInfo.segments[e],r=Object.assign({},t);r.duration=this._mediaInfo.duration,r.segmentCount=this._mediaInfo.segmentCount,delete r.segments,delete r.keyframesIndex,this._emitter.emit(Ee.a.MEDIA_INFO,r)},e.prototype._reportStatisticsInfo=function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Ee.a.STATISTICS_INFO,e)},e}();t.a=Re},function(e,t,r){"use strict";var n,i=r(0),o=function(){function e(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return e.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},e.prototype.addBytes=function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())},Object.defineProperty(e.prototype,"currentKBps",{get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"averageKBps",{get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024},enumerable:!1,configurable:!0}),e}(),a=r(2),s=r(4),c=r(3),u=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),d=function(e){function t(t,r){var n=e.call(this,"fetch-stream-loader")||this;return n.TAG="FetchStreamLoader",n._seekHandler=t,n._config=r,n._needStash=!0,n._requestAbort=!1,n._abortController=null,n._contentLength=null,n._receivedLength=0,n}return u(t,e),t.isSupported=function(){try{var e=s.a.msedge&&s.a.version.minor>=15048,t=!s.a.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}},t.prototype.destroy=function(){this.isWorking()&&this.abort(),e.prototype.destroy.call(this)},t.prototype.open=function(e,t){var r=this;this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL);var i=this._seekHandler.getConfig(n,t),o=new self.Headers;if("object"==typeof i.headers){var s=i.headers;for(var u in s)s.hasOwnProperty(u)&&o.append(u,s[u])}var d={method:"GET",headers:o,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(var u in this._config.headers)o.append(u,this._config.headers[u]);!1===e.cors&&(d.mode="same-origin"),e.withCredentials&&(d.credentials="include"),e.referrerPolicy&&(d.referrerPolicy=e.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,d.signal=this._abortController.signal),this._status=a.c.kConnecting,self.fetch(i.url,d).then((function(e){if(r._requestAbort)return r._status=a.c.kIdle,void e.body.cancel();if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==i.url&&r._onURLRedirect){var t=r._seekHandler.removeURLParameters(e.url);r._onURLRedirect(t)}var n=e.headers.get("Content-Length");return null!=n&&(r._contentLength=parseInt(n),0!==r._contentLength&&r._onContentLengthKnown&&r._onContentLengthKnown(r._contentLength)),r._pump.call(r,e.body.getReader())}if(r._status=a.c.kError,!r._onError)throw new c.d("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);r._onError(a.b.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(!r._abortController||!r._abortController.signal.aborted){if(r._status=a.c.kError,!r._onError)throw e;r._onError(a.b.EXCEPTION,{code:-1,msg:e.message})}}))},t.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==a.c.kBuffering||!s.a.chrome)&&this._abortController)try{this._abortController.abort()}catch(e){}},t.prototype._pump=function(e){var t=this;return e.read().then((function(r){if(r.done)if(null!==t._contentLength&&t._receivedLength299)){if(this._status=a.c.kError,!this._onError)throw new c.d("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(a.b.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=a.c.kBuffering}},t.prototype._onProgress=function(e){if(this._status!==a.c.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,r,this._receivedLength)}},t.prototype._onLoadEnd=function(e){!0!==this._requestAbort?this._status!==a.c.kError&&(this._status=a.c.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1},t.prototype._onXhrError=function(e){this._status=a.c.kError;var t=0,r=null;if(this._contentLength&&e.loaded=this._contentLength&&(r=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:r},this._internalOpen(this._dataSource,this._currentRequestRange)},t.prototype._internalOpen=function(e,t){this._lastTimeLoaded=0;var r=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?r=this._currentRedirectedURL:null!=e.redirectedURL&&(r=e.redirectedURL));var n=this._seekHandler.getConfig(r,t);this._currentRequestURL=n.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",n.url,!0),i.responseType="arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onload=this._onLoad.bind(this),i.onerror=this._onXhrError.bind(this),e.withCredentials&&(i.withCredentials=!0),"object"==typeof n.headers){var o=n.headers;for(var a in o)o.hasOwnProperty(a)&&i.setRequestHeader(a,o[a])}if("object"==typeof this._config.headers)for(var a in o=this._config.headers)o.hasOwnProperty(a)&&i.setRequestHeader(a,o[a]);i.send()},t.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=a.c.kComplete},t.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},t.prototype._onReadyStateChange=function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var r=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&r!==this._currentRedirectedURL&&(this._currentRedirectedURL=r,this._onURLRedirect&&this._onURLRedirect(r))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=a.c.kBuffering}else{if(this._status=a.c.kError,!this._onError)throw new c.d("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(a.b.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}},t.prototype._onProgress=function(e){if(this._status!==a.c.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var r=e.total;this._internalAbort(),null!=r&0!==r&&(this._totalLength=r)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var n=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(n)}},t.prototype._normalizeSpeed=function(e){var t=this._chunkSizeKBList,r=t.length-1,n=0,i=0,o=r;if(e=t[n]&&e=3&&(t=this._speedSampler.currentKBps)),0!==t){var r=this._normalizeSpeed(t);this._currentSpeedNormalized!==r&&(this._currentSpeedNormalized=r,this._currentChunkSizeKB=r)}var n=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=n.byteLength;var o=!1;null!=this._contentLength&&this._receivedLength0&&this._receivedLength0)for(var o=r.split("&"),a=0;a0;s[0]!==this._startName&&s[0]!==this._endName&&(c&&(i+="&"),i+=o[a])}return 0===i.length?t:t+"?"+i},e}(),g=function(){function e(e,t,r){this.TAG="IOController",this._config=t,this._extraData=r,this._stashInitialSize=65536,null!=t.stashInitialSize&&t.stashInitialSize>0&&(this._stashInitialSize=t.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===t.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(e.url),this._refTotalLength=e.filesize?e.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new o,this._speedNormalizeList=[32,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return e.prototype.destroy=function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},e.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},e.prototype.isPaused=function(){return this._paused},Object.defineProperty(e.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extraData",{get:function(){return this._extraData},set:function(e){this._extraData=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(e){this._onSeeked=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(e){this._onRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasRedirect",{get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentSpeed",{get:function(){return this._loaderClass===h?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),e.prototype._selectSeekHandler=function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new v(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",r=e.seekParamEnd||"bend";this._seekHandler=new y(t,r)}else{if("custom"!==e.seekType)throw new c.b("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new c.b("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}},e.prototype._selectLoader=function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=_;else if(d.isSupported())this._loaderClass=d;else if(p.isSupported())this._loaderClass=p;else{if(!h.isSupported())throw new c.d("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=h}},e.prototype._createLoader=function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)},e.prototype.open=function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))},e.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},e.prototype.pause=function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},e.prototype.resume=function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}},e.prototype.seek=function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)},e.prototype._internalSeek=function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var r={from:e,to:-1};this._currentRange={from:r.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,r),this._onSeeked&&this._onSeeked()},e.prototype.updateUrl=function(e){if(!e||"string"!=typeof e||0===e.length)throw new c.b("Url must be a non-empty string!");this._dataSource.url=e},e.prototype._expandBuffer=function(e){for(var t=this._stashSize;t+10485760){var n=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(r,0,t).set(n,0)}this._stashBuffer=r,this._bufferSize=t}},e.prototype._normalizeSpeed=function(e){var t=this._speedNormalizeList,r=t.length-1,n=0,i=0,o=r;if(e=t[n]&&e=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var r=1024*t+1048576;this._bufferSize0){var o=this._stashBuffer.slice(0,this._stashUsed);(u=this._dispatchChunks(o,this._stashByteStart))0&&(d=new Uint8Array(o,u),s.set(d,0),this._stashUsed=d.byteLength,this._stashByteStart+=u):(this._stashUsed=0,this._stashByteStart+=u),this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),s=new Uint8Array(this._stashBuffer,0,this._bufferSize)),s.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else(u=this._dispatchChunks(e,t))this._bufferSize&&(this._expandBuffer(a),s=new Uint8Array(this._stashBuffer,0,this._bufferSize)),s.set(new Uint8Array(e,u),0),this._stashUsed+=a,this._stashByteStart=t+u);else if(0===this._stashUsed){var a;(u=this._dispatchChunks(e,t))this._bufferSize&&this._expandBuffer(a),(s=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(e,u),0),this._stashUsed+=a,this._stashByteStart=t+u)}else{var s,u;if(this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength),(s=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength,(u=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))0){var d=new Uint8Array(this._stashBuffer,u);s.set(d,0)}this._stashUsed-=u,this._stashByteStart+=u}}},e.prototype._flushStashBuffer=function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),r=this._dispatchChunks(t,this._stashByteStart),n=t.byteLength-r;if(r0){var o=new Uint8Array(this._stashBuffer,0,this._bufferSize),a=new Uint8Array(t,r);o.set(a,0),this._stashUsed=a.byteLength,this._stashByteStart+=r}return 0}i.a.w(this.TAG,n+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,n}return 0},e.prototype._onLoaderComplete=function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},e.prototype._onLoaderError=function(e,t){switch(i.a.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=a.b.UNRECOVERABLE_EARLY_EOF),e){case a.b.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var r=this._currentRange.to+1;return void(r0}),!1)}e.exports=function(e,t){t=t||{};var i={main:r.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var r={main:[t]},n={main:[]},i={main:{}};a(r);)for(var s=Object.keys(r),c=0;c1)for(var r=1;r0&&(n+=";codecs="+r.codec);var i=!1;if(l.a.v(this.TAG,"Received Initialization Segment, mimeType: "+n),this._lastInitSegments[r.type]=r,n!==this._mimeTypes[r.type]){if(this._mimeTypes[r.type])l.a.v(this.TAG,"Notice: "+r.type+" mimeType changed, origin: "+this._mimeTypes[r.type]+", target: "+n);else{i=!0;try{var o=this._sourceBuffers[r.type]=this._mediaSource.addSourceBuffer(n);o.addEventListener("error",this.e.onSourceBufferError),o.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return l.a.e(this.TAG,e.message),void this._emitter.emit(w,{code:e.code,msg:e.message})}}this._mimeTypes[r.type]=n}t||this._pendingSegments[r.type].push(r),i||this._sourceBuffers[r.type]&&!this._sourceBuffers[r.type].updating&&this._doAppendSegments(),p.a.safari&&"audio/mpeg"===r.container&&r.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=r.mediaDuration/1e3,this._updateMediaSourceDuration())},e.prototype.appendMediaSegment=function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var r=this._sourceBuffers[t.type];!r||r.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},e.prototype.seek=function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var r=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{r.abort()}catch(e){l.a.e(this.TAG,e.message)}this._idrList.clear();var n=this._pendingSegments[t];if(n.splice(0,n.length),"closed"!==this._mediaSource.readyState){for(var i=0;i=1&&e-n.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},e.prototype._doCleanupSourceBuffer=function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var r=this._sourceBuffers[t];if(r){for(var n=r.buffered,i=!1,o=0;o=this._config.autoCleanupMaxBackwardDuration){i=!0;var c=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:a,end:c})}}else s0&&(isNaN(t)||r>t)&&(l.a.v(this.TAG,"Update MediaSource duration from "+t+" to "+r),this._mediaSource.duration=r),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},e.prototype._doRemoveRanges=function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],r=this._pendingRemoveRanges[e];r.length&&!t.updating;){var n=r.shift();t.remove(n.start,n.end)}},e.prototype._doAppendSegments=function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var r=e[t].shift();if(r.timestampOffset){var n=this._sourceBuffers[t].timestampOffset,i=r.timestampOffset/1e3;Math.abs(n-i)>.1&&(l.a.v(this.TAG,"Update MPEG audio timestampOffset from "+n+" to "+i),this._sourceBuffers[t].timestampOffset=i),delete r.timestampOffset}if(!r.data||0===r.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(r.data),this._isBufferFull=!1,"video"===t&&r.hasOwnProperty("info")&&this._idrList.appendArray(r.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(r),22===e.code?(this._isBufferFull||this._emitter.emit(k),this._isBufferFull=!0):(l.a.e(this.TAG,e.message),this._emitter.emit(w,{code:e.code,msg:e.message}))}}},e.prototype._onSourceOpen=function(){if(l.a.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(S)},e.prototype._onSourceEnded=function(){l.a.v(this.TAG,"MediaSource onSourceEnded")},e.prototype._onSourceClose=function(){l.a.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},e.prototype._hasPendingSegments=function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0},e.prototype._hasPendingRemoveRanges=function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0},e.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(x)},e.prototype._onSourceBufferError=function(e){l.a.e(this.TAG,"SourceBuffer Error: "+e)},e}(),O=r(5),T={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},P={NETWORK_EXCEPTION:c.b.EXCEPTION,NETWORK_STATUS_CODE_INVALID:c.b.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:c.b.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:c.b.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:O.a.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:O.a.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:O.a.CODEC_UNSUPPORTED},A=function(){function e(e,t){this.TAG="MSEPlayer",this._type="MSEPlayer",this._emitter=new d.a,this._config=a(),"object"==typeof t&&Object.assign(this._config,t);var r=e.type.toLowerCase();if("mse"!==r&&"mpegts"!==r&&"m2ts"!==r&&"flv"!==r)throw new E.b("MSEPlayer requires an mpegts/m2ts/flv MediaDataSource input!");!0===e.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=e,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var n=p.a.chrome&&(p.a.version.major<50||50===p.a.version.major&&p.a.version.build<2661);this._alwaysSeekKeyframe=!!(n||p.a.msedge||p.a.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return e.prototype.destroy=function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){var r=this;e===f.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){r._emitter.emit(f.MEDIA_INFO,r.mediaInfo)})):e===f.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){r._emitter.emit(f.STATISTICS_INFO,r.statisticsInfo)})),this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new R(this._config),this._msectl.on(x,this._onmseUpdateEnd.bind(this)),this._msectl.on(k,this._onmseBufferFull.bind(this)),this._msectl.on(S,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(w,(function(e){t._emitter.emit(f.ERROR,T.MEDIA_ERROR,P.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}},e.prototype.detachMediaElement=function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},e.prototype.load=function(){var e=this;if(!this._mediaElement)throw new E.a("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new E.a("MSEPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new b(this._mediaDataSource,this._config),this._transmuxer.on(y.a.INIT_SEGMENT,(function(t,r){e._msectl.appendInitSegment(r)})),this._transmuxer.on(y.a.MEDIA_SEGMENT,(function(t,r){if(e._msectl.appendMediaSegment(r),e._config.lazyLoad&&!e._config.isLive){var n=e._mediaElement.currentTime;r.info.endDts>=1e3*(n+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(l.a.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(y.a.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(f.LOADING_COMPLETE)})),this._transmuxer.on(y.a.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(f.RECOVERED_EARLY_EOF)})),this._transmuxer.on(y.a.IO_ERROR,(function(t,r){e._emitter.emit(f.ERROR,T.NETWORK_ERROR,t,r)})),this._transmuxer.on(y.a.DEMUX_ERROR,(function(t,r){e._emitter.emit(f.ERROR,T.MEDIA_ERROR,t,{code:-1,msg:r})})),this._transmuxer.on(y.a.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(f.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(y.a.METADATA_ARRIVED,(function(t){e._emitter.emit(f.METADATA_ARRIVED,t)})),this._transmuxer.on(y.a.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(f.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(y.a.TIMED_ID3_METADATA_ARRIVED,(function(t){e._emitter.emit(f.TIMED_ID3_METADATA_ARRIVED,t)})),this._transmuxer.on(y.a.SMPTE2038_METADATA_ARRIVED,(function(t){e._emitter.emit(f.SMPTE2038_METADATA_ARRIVED,t)})),this._transmuxer.on(y.a.SCTE35_METADATA_ARRIVED,(function(t){e._emitter.emit(f.SCTE35_METADATA_ARRIVED,t)})),this._transmuxer.on(y.a.PES_PRIVATE_DATA_DESCRIPTOR,(function(t){e._emitter.emit(f.PES_PRIVATE_DATA_DESCRIPTOR,t)})),this._transmuxer.on(y.a.PES_PRIVATE_DATA_ARRIVED,(function(t){e._emitter.emit(f.PES_PRIVATE_DATA_ARRIVED,t)})),this._transmuxer.on(y.a.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(f.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(y.a.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)})),this._transmuxer.open()))},e.prototype.unload=function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)},e.prototype.play=function(){return this._mediaElement.play()},e.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statisticsInfo",{get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),e.prototype._fillStatisticsInfo=function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,r=0,n=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();r=i.totalVideoFrames,n=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(r=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=r,e.droppedFrames=n),e},e.prototype._onmseUpdateEnd=function(){var e=this._mediaElement.buffered,t=this._mediaElement.currentTime;if(this._config.isLive&&this._config.liveBufferLatencyChasing&&e.length>0&&!this._mediaElement.paused){var r=e.end(e.length-1);if(r>this._config.liveBufferLatencyMaxLatency&&r-t>this._config.liveBufferLatencyMaxLatency){var n=r-this._config.liveBufferLatencyMinRemain;this.currentTime=n}}if(this._config.lazyLoad&&!this._config.isLive){for(var i=0,o=0;o=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(l.a.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},e.prototype._onmseBufferFull=function(){l.a.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()},e.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},e.prototype._checkProgressAndResume=function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,r=!1,n=0;n=i&&e=o-this._config.lazyLoadRecoverDuration&&(r=!0);break}}r&&(window.clearInterval(this._progressChecker),this._progressChecker=null,r&&(l.a.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))},e.prototype._isTimepointBuffered=function(e){for(var t=this._mediaElement.buffered,r=0;r=n&&e0){var i=this._mediaElement.buffered.start(0);(i<1&&e0&&t.currentTime0){var n=r.start(0);if(n<1&&t0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},e.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype.play=function(){return this._mediaElement.play()},e.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaInfo",{get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statisticsInfo",{get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,r=0,n=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();r=i.totalVideoFrames,n=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(r=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=r,e.droppedFrames=n),e},enumerable:!1,configurable:!0}),e.prototype._onvLoadedMetadata=function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(f.MEDIA_INFO,this.mediaInfo)},e.prototype._reportStatisticsInfo=function(){this._emitter.emit(f.STATISTICS_INFO,this.statisticsInfo)},e}();n.a.install();var C={createPlayer:function(e,t){var r=e;if(null==r||"object"!=typeof r)throw new E.b("MediaDataSource must be an javascript object!");if(!r.hasOwnProperty("type"))throw new E.b("MediaDataSource must has type field to indicate video file type!");switch(r.type){case"mse":case"mpegts":case"m2ts":case"flv":return new A(r,t);default:return new D(r,t)}},isSupported:function(){return s.supportMSEH264Playback()},getFeatureList:function(){return s.getFeatureList()}};C.BaseLoader=c.a,C.LoaderStatus=c.c,C.LoaderErrors=c.b,C.Events=f,C.ErrorTypes=T,C.ErrorDetails=P,C.MSEPlayer=A,C.NativePlayer=D,C.LoggingControl=_.a,Object.defineProperty(C,"version",{enumerable:!0,get:function(){return"1.7.3"}}),t.default=C}])},"./node_modules/ms/index.js":e=>{var t=1e3,r=6e4,n=60*r,i=24*n;function o(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,a){a=a||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!o)return;var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===s&&isFinite(e))return a.long?function(e){var a=Math.abs(e);if(a>=i)return o(e,a,i,"day");if(a>=n)return o(e,a,n,"hour");if(a>=r)return o(e,a,r,"minute");if(a>=t)return o(e,a,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=i)return Math.round(e/i)+"d";if(o>=n)return Math.round(e/n)+"h";if(o>=r)return Math.round(e/r)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},"./node_modules/jwt-decode/build/cjs/index.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jwtDecode=t.InvalidTokenError=void 0;class r extends Error{}function n(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}(t)}catch(e){return atob(t)}}t.InvalidTokenError=r,r.prototype.name="InvalidTokenError",t.jwtDecode=function(e,t){if("string"!=typeof e)throw new r("Invalid token specified: must be a string");t||(t={});const i=!0===t.header?0:1,o=e.split(".")[i];if("string"!=typeof o)throw new r("Invalid token specified: missing part #"+(i+1));let a;try{a=n(o)}catch(e){throw new r(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(a)}catch(e){throw new r(`Invalid token specified: invalid json for part #${i+1} (${e.message})`)}}}}]); //# sourceMappingURL=https://hybridclient.naiadsystems.com/dist/hybrid/27.5.9/5~822476cfa479836ac73f.js.map