PageSourceSearch

https://www.net4dev.org/_next/static/chunks/75e9221f-2be189cdaae071c4.js

js net4dev.org collected 2026-09-26 02:54:21 UTC 828,698 bytes, 41 lines download raw bytes

vendor: 5,390 bytes, line 1
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1380],{65444:(module,__unused_webpack_exports,__webpack_require__)=>{!function(e,t){module.exports=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,(function(t){return e[t]}).bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=324)}([function(e,t,n){(function(t){!function(t){e.exports=t()}(function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function n(e){return"function"==typeof e}var r=void 0,i=r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,s=void 0,a=void 0,c=function(e,t){E[o]=e,E[o+1]=t,2===(o+=2)&&(a?a(T):R())};function u(e){a=e}function d(e){c=e}var l="u">typeof window?window:void 0,p=l||{},f=p.MutationObserver||p.WebKitMutationObserver,h="u"<typeof self&&void 0!==t&&"[object process]"===({}).toString.call(t),m="u">typeof Uint8ClampedArray&&"u">typeof importScripts&&"u">typeof MessageChannel;function b(){return function(){return t.nextTick(T)}}function g(){return void 0!==s?function(){s(T)}:S()}function v(){var e=0,t=new f(T),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function y(){var e=new MessageChannel;return e.port1.onmessage=T,function(){return e.port2.postMessage(0)}}function S(){var e=setTimeout;return function(){return e(T,1)}}var E=Array(1e3);function T(){for(var e=0;e<o;e+=2)(0,E[e])(E[e+1]),E[e]=void 0,E[e+1]=void 0;o=0}function C(){try{var e=Function("return this")().require("vertx");return s=e.runOnLoop||e.runOnContext,g()}catch(e){return S()}}var R=void 0;function I(e,t){var n=this,r=new this.constructor(x);void 0===r[w]&&J(r);var i=n._state;if(i){var o=arguments[i-1];c(function(){return F(i,r,o,n._result)})}else j(n,r,e,t);return r}function _(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(x);return P(n,e),n}R=h?b():f?v():m?y():void 0===l?C():S();var w=Math.random().toString(36).substring(2);function x(){}var O=void 0,N=1,k=2;function Z(){return TypeError("You cannot resolve a promise with itself")}function A(){return TypeError("A promises callback cannot return that same promise.")}function L(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function V(e,t,n){c(function(e){var r=!1,i=L(n,t,function(n){r||(r=!0,t!==n?P(e,n):D(e,n))},function(t){r||(r=!0,X(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,X(e,i))},e)}function W(e,t){t._state===N?D(e,t._result):t._state===k?X(e,t._result):j(t,void 0,function(t){return P(e,t)},function(t){return X(e,t)})}function G(e,t,r){t.constructor===e.constructor&&r===I&&t.constructor.resolve===_?W(e,t):void 0===r?D(e,t):n(r)?V(e,t,r):D(e,t)}function P(t,n){if(t===n)X(t,Z());else if(e(n)){var r=void 0;try{r=n.then}catch(e){X(t,e);return}G(t,n,r)}else D(t,n)}function M(e){e._onerror&&e._onerror(e._result),U(e)}function D(e,t){e._state===O&&(e._result=t,e._state=N,0!==e._subscribers.length&&c(U,e))}function X(e,t){e._state===O&&(e._state=k,e._result=t,c(M,e))}function j(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+N]=n,i[o+k]=r,0===o&&e._state&&c(U,e)}function U(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,o=e._result,s=0;s<t.length;s+=3)r=t[s],i=t[s+n],r?F(n,r,i,o):i(o);e._subscribers.length=0}}function F(e,t,r,i){var o=n(r),s=void 0,a=void 0,c=!0;if(o){try{s=r(i)}catch(e){c=!1,a=e}if(t===s)return void X(t,A())}else s=i;t._state!==O||(o&&c?P(t,s):!1===c?X(t,a):e===N?D(t,s):e===k&&X(t,s))}function Y(e,t){try{t(function(t){P(e,t)},function(t){X(e,t)})}catch(t){X(e,t)}}var B=0;function H(){return B++}function J(e){e[w]=B++,e._state=void 0,e._result=void 0,e._subscribers=[]}function K(){return Error("Array Methods must be provided an Array")}var z=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(x),this.promise[w]||J(this.promise),i(t)?(this.length=t.length,this._remaining=t.length,this._result=Array(this.length),0===this.length?D(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&D(this.promise,this._result))):X(this.promise,K())}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===_){var i=void 0,o=void 0,s=!1;try{i=e.then}catch(e){s=!0,o=e}if(i===I&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===en){var a=new n(x);s?X(a,o):G(a,e,i),this._willSettleAt(a,t)}
1else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===O&&(this._remaining--,e===k?X(r,n):this._result[t]=n),0===this._remaining&&D(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;j(e,void 0,function(e){return n._settledAt(N,t,e)},function(e){return n._settledAt(k,t,e)})},e}();function Q(e){return new z(this,e).promise}function $(e){var t=this;return new t(i(e)?function(n,r){for(var i=e.length,o=0;o<i;o++)t.resolve(e[o]).then(n,r)}:function(e,t){return t(TypeError("You must pass an array to race."))})}function q(e){var t=this,n=new t(x);return X(n,e),n}function ee(){throw TypeError("You must pass a resolver function as the first argument to the promise constructor")}function et(){throw TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var en=function(){function e(t){this[w]=H(),this._result=this._state=void 0,this._subscribers=[],x!==t&&("function"!=typeof t&&ee(),this instanceof e?Y(this,t):et())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this,r=t.constructor;return n(e)?t.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})}):t.then(e,e)},e}();function er(){var e=void 0;if("u">typeof window)e=window;else if("u">typeof self)e=self;else try{e=Function("return this")()}catch(e){throw Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=en}return en.prototype.then=I,en.all=Q,en.race=$,en.resolve=_,en.reject=q,en._setScheduler=u,en._setAsap=d,en._asap=c,en.polyfill=er,en.Promise=en,en})}).call(this,n(43))},function(e,t,n){"use strict";let r=n(392),i=n(191),o=n(119),s=i(e=>{let t={};return(()=>{Object.keys(o).forEach(n=>{let i=o[n].method,s=r(`OpenTok:${e}:${n.toLowerCase()}`);s.log=console[i].bind(console),t[n.toLowerCase()]=s})})(),t});s.setLogLevel=e=>{let t;try{t=window.localStorage.debug}catch(e){t=""}let n=[...Object.keys(o).map(t=>`${e>=o[t].priority?"":"-"}(autogen)?OpenTok:*:${t.toLowerCase()}`),...(t||"").split(/[\s,]/).filter(e=>-1===e.indexOf("(autogen)?"))].filter(e=>e).join(",");r.enable(n)},e.exports=s},function(e,t,n){"use strict";e.exports=n(531).parse()},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";e.exports={AUTHENTICATION_ERROR:"OT_AUTHENTICATION_ERROR",BADLY_FORMED_RESPONSE:"OT_BADLY_FORMED_RESPONSE",CHROME_MICROPHONE_ACQUISITION_ERROR:"OT_CHROME_MICROPHONE_ACQUISITION_ERROR",CONNECT_FAILED:"OT_CONNECT_FAILED",CONNECTION_LIMIT_EXCEEDED:"OT_CONNECTION_LIMIT_EXCEEDED",CONSTRAINTS_NOT_SATISFIED:"OT_CONSTRAINTS_NOT_SATISFIED",CREATE_PEER_CONNECTION_FAILED:"OT_CREATE_PEER_CONNECTION_FAILED",DISCONNECTED:"OT_DISCONNECTED",EMPTY_RESPONSE_BODY:"OT_EMPTY_RESPONSE_BODY",GET_RTC_STATS_REPORT_NOT_SUPPORTED:"OT_GET_RTC_STATS_REPORT_NOT_SUPPORTED",HARDWARE_UNAVAILABLE:"OT_HARDWARE_UNAVAILABLE",ICE_WORKFLOW_FAILED:"OT_ICE_WORKFLOW_FAILED",INVALID_HTTP_STATUS:"OT_INVALID_HTTP_STATUS",INVALID_PARAMETER:"OT_INVALID_PARAMETER",INVALID_SESSION_ID:"OT_INVALID_SESSION_ID",MEDIA_ERR_ABORTED:"OT_MEDIA_ERR_ABORTED",MEDIA_ERR_DECODE:"OT_MEDIA_ERR_DECODE",MEDIA_ERR_NETWORK:"OT_MEDIA_ERR_NETWORK",MEDIA_ERR_SRC_NOT_SUPPORTED:"OT_MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ENDED:"OT_MEDIA_ENDED",NO_DEVICES_FOUND:"OT_NO_DEVICES_FOUND",NO_VALID_CONSTRAINTS:"OT_NO_VALID_CONSTRAINTS",NOT_CONNECTED:"OT_NOT_CONNECTED",NOT_FOUND:"OT_NOT_FOUND",NOT_SUPPORTED:"OT_NOT_SUPPORTED",PEER_CONNECTION_NOT_CONNECTED:"OT_PEER_CONNECTION_NOT_CONNECTED",PERMISSION_DENIED:"OT_PERMISSION_DENIED",RATE_LIMIT_EXCEEDED:"OT_RATE_LIMIT_EXCEEDED",REPORT_ISSUE_FAILED:"OT_REPORT_ISSUE_FAILED",SCREEN_SHARING_EXTENSION_NOT_INSTALLED:"OT_SCREEN_SHARING_EXTENSION_NOT_INSTALLED",SCREEN_SHARING_EXTENSION_NOT_REGISTERED:"OT_SCREEN_SHARING_EXTENSION_NOT_REGISTERED",SCREEN_SHARING_NOT_SUPPORTED:"OT_SCREEN_SHARING_NOT_SUPPORTED",SET_REMOTE_DESCRIPTION_FAILED:"OT_SET_REMOTE_DESCRIPTION_FAILED",SOCKET_ALREADY_CONNECTED_CONNECTING:"OT_SOCKET_ALREADY_CONNECTED_CONNECTING",SOCKET_CLOSE_ABNORMAL:"OT_SOCKET_CLOSE_ABNORMAL",SOCKET_CLOSE_CONNECT_EXCEPTION:"OT_SOCKET_CLOSE_CONNECT_EXCEPTION",SOCKET_CLOSE_CONNECTIVITY_LOSS:"OT_SOCKET_CLOSE_CONNECTIVITY_LOSS",SOCKET_CLOSE_FA
1LLBACK_CODE:"OT_SOCKET_CLOSE_FALLBACK_CODE",SOCKET_CLOSE_INCONSISTENT_DATA:"OT_SOCKET_CLOSE_INCONSISTENT_DATA",SOCKET_CLOSE_NO_STATUS:"OT_SOCKET_CLOSE_NO_STATUS",SOCKET_CLOSE_POLICY_VIOLATION:"OT_SOCKET_CLOSE_POLICY_VIOLATION",SOCKET_CLOSE_GOING_AWAY:"OT_SOCKET_CLOSE_GOING_AWAY",SOCKET_CLOSE_PROTOCOL_ERROR:"OT_SOCKET_CLOSE_PROTOCOL_ERROR",SOCKET_CLOSE_TIMEOUT:"OT_SOCKET_CLOSE_TIMEOUT",SOCKET_CLOSE_TOO_LARGE:"OT_SOCKET_CLOSE_TOO_LARGE",SOCKET_CLOSE_UNEXPECTED_CONDITION:"OT_SOCKET_CLOSE_UNEXPECTED_CONDITION",SOCKET_CLOSE_UNSUPPORTED:"OT_SOCKET_CLOSE_UNSUPPORTED",STREAM_CREATE_FAILED:"OT_STREAM_CREATE_FAILED",STREAM_DESTROYED:"OT_STREAM_DESTROYED",STREAM_LIMIT_EXCEEDED:"OT_STREAM_LIMIT_EXCEEDED",STREAM_NOT_FOUND:"OT_STREAM_NOT_FOUND",UNABLE_TO_SUBSCRIBE:"OT_UNABLE_TO_SUBSCRIBE",TERMS_OF_SERVICE_FAILURE:"OT_TERMS_OF_SERVICE_FAILURE",TIMEOUT:"OT_TIMEOUT",CANCEL:"OT_CANCEL",UNABLE_TO_CAPTURE_MEDIA:"OT_UNABLE_TO_CAPTURE_MEDIA",UNABLE_TO_CAPTURE_SCREEN:"OT_UNABLE_TO_CAPTURE_SCREEN",UNEXPECTED_ERROR_CODE:"OT_UNEXPECTED_ERROR_CODE",UNEXPECTED_HTTP_STATUS:"OT_UNEXPECTED_HTTP_STATUS",UNEXPECTED_SERVER_RESPONSE:"OT_UNEXPECTED_SERVER_RESPONSE",UNKNOWN_HTTP_ERROR:"OT_UNKNOWN_HTTP_ERROR",UNSUPPORTED_BROWSER:"OT_UNSUPPORTED_BROWSER",USER_MEDIA_ACCESS_DENIED:"OT_USER_MEDIA_ACCESS_DENIED",XDOMAIN_OR_PARSING_ERROR:"OT_XDOMAIN_OR_PARSING_ERROR",API_KEY_DISABLED:"OT_API_KEY_DISABLED",UNABLE_TO_ACCESS_MEDIA_ENGINE:"OT_UNABLE_TO_ACCESS_MEDIA_ENGINE",SET_PROXY_URL_TIMING_ERROR:"OT_SET_PROXY_URL_TIMING_ERROR",PROXY_URL_ALREADY_SET_ERROR:"OT_PROXY_URL_ALREADY_SET_ERROR",SET_VIDEO_SOURCE_FAILURE:"OT_SET_VIDEO_SOURCE_FAILURE",INVALID_VIDEO_SOURCE:"OT_INVALID_VIDEO_SOURCE",REQUESTED_DEVICE_PERMISSION_DENIED:"OT_REQUESTED_DEVICE_PERMISSION_DENIED",INVALID_AUDIO_OUTPUT_SOURCE:"OT_INVALID_AUDIO_OUTPUT_SOURCE"}},function(e,t,n){"use strict";let r=n(246),i=n(250),o=n(6),s=n(1);r.logging=s("OT.$"),r.ElementCollection=n(247),r.env=n(2),r.ajax=n(245),r.statable=n(540),r.Analytics=n(244),r.Collection=n(249),r.domExtras=n(541),r.Error=n(251),i(r,"useLogHelpers",{value(e){let t=s("useLogHelpersDeprecatedMixin");return Object.keys(t).forEach(n=>{e[n]=t[n]}),e},name:"OT.useLogHelpers",getWarning:"Please use an external library for your debugging needs"}),r.defaults=n(140),i(r,"eventing",{value:o,name:"OT.$.eventing",getWarning:"Please use an external library to create an event emitter."}),Object.keys(r).forEach(e=>{let t=r[e]._attachToOTHelpers||{};Object.keys(t).forEach(n=>{Object.hasOwnProperty.call(r,n)&&("util"!==e||"bind"!==n)&&console.warn(`More than one module is trying to define ${n} on OTHelpers.`),r[n]=t[n]})}),e.exports=r},function(e,t,n){"use strict";let r=n(42),i=n(15),o=n(1)("Events"),s=n(7),a=n(397);e.exports=function(e){let t=new r;t.on("newListener",e=>{t.emit(`${e}:added`)}),t.on("removeListener",e=>{t.emit(`${e}:removed`)});let n={on(e,n,r){return"string"==typeof e&&n?e.split(" ").forEach(e=>{t.on(e,a(n,r))}):Object.keys(e).forEach(r=>{t.on(r,a(e[r],n))}),this},off(e,n,r){return"string"==typeof e?this.off(e.split(" "),n,r):Array.isArray(e)?e.forEach(e=>{n&&i(n)?t.removeListener(e,a(n,r)):t.removeAllListeners(e)}):e?Object.keys(e).forEach(r=>{t.removeListener(r,a(e[r],n))}):t.removeAllListeners(),this},once(e,n,r){return"string"==typeof e&&n?e.split(" ").forEach(e=>{t.once(e,a(n,r))}):Object.keys(e).forEach(r=>{t.once(r,a(e[r],n))}),this},dispatchEvent(e){if(!e.type)throw Error("dispatchEvent: Event has no type");return e.target||(e.target=this),this.trigger(e.type,e),this},trigger(e){try{for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit(e,...r)}catch(e){o.error("An error occurred in an event handler",e)}return this},emit(){return e.trigger(...arguments)},addEventListener:(t,n,r)=>(o.warn("The addEventListener() method is deprecated. Use on() or once() instead."),e.on(t,n,r)),removeEventListener:(t,n,r)=>(o.warn("The removeEventListener() method is deprecated. Use off() instead."),e.off(t,n,r)),listenerCount:e=>t.listenerCount(e)};return s(e,n)}},function(e,t,n){var r=n(83),i=n(40),o=n(192),s=n(25),a=n(69),c=n(30),u=Object.prototype.hasOwnProperty;e.exports=o(function(e,t){if(a(t)||s(t))return void i(t,c(t),e);for(var n in t)u.call(t,n)&&r(e,n,t[n])})},function(e,t,n){"use strict";e.exports={JS_EXCEPTION:2e3,AUTHENTICATION_ERROR:1004,INVALID_SESSION_ID:1005,CONNECT_FAILED:1006,CONNECT_REJECTED:1007,CONNECTION_TIMEOUT:1008,NOT_CONNECTED:1010,INVALID_PARAMETER:1011,P2P_CONNECTION_FAILED:1013,API_RESPONSE_FAILURE:1014,PEER_CONNECTION_NOT_CONNECTED:1015,TERMS_OF_SERVICE_FAILURE:1026,CONNECTION_LIMIT_EXCEEDED:1027,UNABLE_TO_PUBLISH:1500,UNABLE_TO_SUBSCRIBE:1
1501,UNSUPPORTED_VIDEO_CODEC:1502,UNABLE_TO_FORCE_DISCONNECT:1520,UNABLE_TO_FORCE_UNPUBLISH:1530,UNABLE_TO_FORCE_MUTE:1540,PUBLISHER_ICE_WORKFLOW_FAILED:1553,SUBSCRIBER_ICE_WORKFLOW_FAILED:1554,STREAM_LIMIT_EXCEEDED:1605,UNEXPECTED_SERVER_RESPONSE:2001,REPORT_ISSUE_ERROR:2011,SET_PROXY_URL_TIMING_ERROR:2021,PROXY_URL_ALREADY_SET_ERROR:2022,GET_RTC_STATS_REPORT_NOT_SUPPORTED:2031,ANVIL_BADLY_FORMED_RESPONSE:3001,ANVIL_INVALID_HTTP_STATUS:3002,ANVIL_XDOMAIN_OR_PARSING_ERROR:3003,ANVIL_UNKNOWN_HTTP_ERROR:3004,ANVIL_UNEXPECTED_ERROR_CODE:3005,ANVIL_EMPTY_RESPONSE_BODY:3006,ANVIL_CONNECT_FAILED:3007,UNABLE_TO_ACCESS_MEDIA_ENGINE:5001}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){e.exports=Array.isArray},function(e,t,n){"use strict";e.exports=function(e){void 0===e&&(e={});let t=e.Errors||n(4),r=e.OTErrorClass||n(22),i=Object.keys(t).map(e=>t[e]);return function(e,t,n){if(-1===i.indexOf(e))return Error(`Attempt to use invalid error name (${e}). Original message: ${t.message}`);if(!(t instanceof Error||/^\[object .*Error\]$/.test(Object.prototype.toString.call(t))))return Error(`Did not pass Error as second argument: ${t}`);let o=new r(void 0,t.message);if(o.name=e,!t.stack)try{throw t}catch(e){}return o.stack=t.stack,n&&(o.code=n),o}}},function(e,t,n){e.exports=n(603)},function(e,t,n){(function(t){function n(e,n,r,i,o,s,a){try{var c=e[s](a),u=c.value}catch(e){r(e);return}c.done?n(u):t.resolve(u).then(i,o)}e.exports=function(e){return function(){var r=this,i=arguments;return new t(function(t,o){var s=e.apply(r,i);function a(e){n(s,t,o,a,c,"next",e)}function c(e){n(s,t,o,a,c,"throw",e)}a(void 0)})}}}).call(this,n(0))},function(e,t,n){var r=n(174),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=r||i||Function("return this")()},function(e,t,n){var r=n(29),i=n(9),o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",c="[object Proxy]";e.exports=function(e){if(!i(e))return!1;var t=r(e);return t==s||t==a||t==o||t==c}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=n(208),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===i.call(e)}function d(e){return a(e)&&u(e.pipe)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function p(){var e={};function t(t,n){c(e[n])&&c(t)?e[n]=p(e[n],t):c(t)?e[n]=p({},t):o(t)?e[n]=t.slice():e[n]=t}for(var n=0,r=arguments.length;n<r;n++)l(arguments[n],t);return e}function f(e,t,n){return l(t,function(t,i){n&&"function"==typeof t?e[i]=r(t,n):e[i]=t}),e}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"u">typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){var t;return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:c,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:d,isURLSearchParams:function(e){return"u">typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return(!("u">typeof navigator)||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"u">typeof window&&"u">typeof document},forEach:l,merge:p,extend:f,trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var r=n(526),i=n(527),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}
1e.exports=n},function(e,t,n){"use strict";let r=n(249);e.exports={publishers:new r("guid"),subscribers:new r("widgetId"),sessions:new r}},function(e,t,n){"use strict";let r=n(1)("GlobalExceptionHandler"),i=n(6),o=n(26),s=n(539),a=n(23)(),c=function(e,t){Error.call(this),this.code=e,this.message=t};c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,e.exports=c,i(c),c.getTitleByCode=function(e){return s[+e]},c.handleJsException=e=>{let t=e.error,n=e.errorMsg,i=e.code,s=e.target,u=e.analytics;if(!s)throw Error("handleJsException requires target");let d=()=>void 0!==i?i:t&&t.code,l=()=>void 0!==n?n:t&&t.message,p=c.getTitleByCode(d());r.error(`OT.exception :: title: ${p} (${d()}) msg: ${l()}`);try{let e={partnerId:s.session?s.session.apiKey:s.apiKey,sessionId:s.session?s.session.sessionId:s.sessionId};u.logError(d(),"tb.exception",p,{details:l()},e);let n=new a.ExceptionEvent(o.EXCEPTION,l(),p,d(),s,s,t);if(t)n.stack=t.stack;else try{throw Error()}catch(e){n.stack=e.stack}c.dispatchEvent(n)}catch(e){r.error(`OT.exception :: Failed to dispatch exception - ${e.toString()}`)}}},function(e,t,n){"use strict";var r=n(3),i=r(n(46)),o=r(n(60));let s=n(126),a=n(26);e.exports=function(e){void 0===e&&(e={});let t=e.logging||n(1)("Events"),r={};r.ExceptionEvent=function(e,t,n,r,i,o,a){return new s(e,!1,{error:a,message:t,title:n,code:r,component:i,target:o})},r.IssueReportedEvent=function(e,t){return new s(e,!1,{issueId:t})},r.EnvLoadedEvent=function(e){return new s(e,!1)};let c=!1;r.ConnectionEvent=function(e){function n(t,n,r){return e.call(this,t,!1,{connection:n,reason:r})||this}return(0,o.default)(n,e),(0,i.default)(n,[{key:"connections",get:function(){return c||(t.warn("OT.ConnectionEvent connections property is deprecated, use connection instead."),c=!0),[this.connection]}}]),n}(s);let u=!1;r.StreamEvent=function(e){function n(t,n,r,i){return e.call(this,t,i,{stream:n,reason:r})||this}return(0,o.default)(n,e),(0,i.default)(n,[{key:"streams",get:function(){return u||(t.warn("OT.StreamEvent streams property is deprecated, use stream instead."),u=!0),[this.stream]}}]),n}(s);let d=!1,l=!1,p=!1;return r.SessionConnectEvent=function(e){function n(t){return e.call(this,t,!1)||this}return(0,o.default)(n,e),(0,i.default)(n,[{key:"connections",get:function(){return d||(t.warn("OT.SessionConnectedEvent no longer includes connections. Listen for connectionCreated events instead."),d=!0),[]}},{key:"streams",get:function(){return l||(t.warn("OT.SessionConnectedEvent no longer includes streams. Listen for streamCreated events instead."),l=!0),[]}},{key:"archives",get:function(){return p||(t.warn("OT.SessionConnectedEvent no longer includes archives. Listen for archiveStarted events instead."),p=!0),[]}}]),n}(s),r.SessionReconnectingEvent=function(){return new s(a.SESSION_RECONNECTING,!1)},r.SessionReconnectedEvent=function(){return new s(a.SESSION_RECONNECTED)},r.SessionDisconnectEvent=function(e,t,n){return new s(e,n,{reason:t})},r.StreamPropertyChangedEvent=function(e,t,n,r,i){return new s(e,!1,{stream:t,changedProperty:n,oldValue:r,newValue:i})},r.VideoDimensionsChangedEvent=function(e,t,n){return new s("videoDimensionsChanged",!1,{target:e,oldValue:t,newValue:n})},r.ArchiveEvent=function(e,t){return new s(e,!1,{id:t.id,name:t.name,status:t.status,archive:t})},r.ArchiveUpdatedEvent=function(e,t,n,r){return new s("updated",!1,{target:e,changedProperty:t,oldValue:n,newValue:r})},r.SignalEvent=function(e,t,n){return new s(e?`signal:${e}`:a.SIGNAL,!1,{data:t,from:n})},r.StreamUpdatedEvent=function(e,t,n,r){return new s("updated",!1,{target:e,changedProperty:t,oldValue:n,newValue:r})},r.DestroyedEvent=function(e,t,n){return new s(e,!1,{target:t,reason:n})},r.ConnectionStateChangedEvent=function(e,t){return new s(e,!1,{target:t})},r.VideoEnabledChangedEvent=function(e,t){return new s(e,!1,{reason:t.reason})},r.VideoDisableWarningEvent=function(e){return new s(e,!1)},r.AudioLevelUpdatedEvent=function(e){return new s(a.AUDIO_LEVEL_UPDATED,!1,{audioLevel:e})},r.MediaStoppedEvent=function(e,t){return new s(a.MEDIA_STOPPED,!0,{target:e,track:t})},r.MuteForcedEvent=function(e){return new s(a.MUTE_FORCED,!1,e)},r.VideoElementCreatedEvent=function(e){return new s(a.VIDEO_ELEMENT_CREATED,!1,{element:e})},r}},function(e,t,n){"use strict";(function(t){var r=n(3),i=r(n(12)),o=r(n(13));e.exports=function(e){void 0===e&&(e={});
1let r=e.getNativeEnumerateDevices||n(286)(),s=e.getNativeMediaDevices||n(627)(),a=(e.currentAudioOutputDevice||n(105)).getCurrentAudioOutputDeviceId,c=e.env||n(2),u=e.global||window,d={},l={audio:"audioInput",video:"videoInput",audioinput:"audioInput",videoinput:"videoInput",audiooutput:"audioOutput",audioInput:"audioInput",videoInput:"videoInput",audioOutput:"audioOutput"},p=()=>r()();return d.getNativeMediaDevices=()=>s(),d.hasEnumerateDevicesCapability=()=>"function"==typeof r(),d.hasDeviceChangeCapability=()=>{let e=s();return!!(e&&"ondevicechange"in e)},d.hasSetSinkIdCapability=()=>"setSinkId"in(null==u?void 0:u.HTMLMediaElement.prototype),d.hasAudioOutputApiSupport=()=>d.hasSetSinkIdCapability()&&d.hasDeviceChangeCapability(),d.hasEnumerateDevicesBug=()=>c.isSafari&&13.1===c.version,d.getMediaDevices=()=>d.hasEnumerateDevicesCapability()?p().then(e=>e.map(e=>({deviceId:e.deviceId||e.id,label:e.label,kind:l[e.kind]}))):t.reject(Error("This browser does not support enumerateDevices APIs")),d.getInputMediaDevices=()=>d.getMediaDevices().then(e=>e.filter(e=>/^(audio|video)Input$/.test(e.kind))),d.getAudioOutputMediaDevices=()=>d.getMediaDevices().then(e=>e.filter(e=>"audioOutput"===e.kind).map(e=>({deviceId:e.deviceId,label:e.label}))),d.shouldAskForDevices=()=>d.hasEnumerateDevicesCapability()?d.getInputMediaDevices().then(e=>{if(0===e.length)return{video:!0,audio:!0};let t=e.filter(e=>"audioInput"===e.kind),n=e.filter(e=>"videoInput"===e.kind);return d.hasEnumerateDevicesBug()&&0===n.length?{audio:!0,video:!0}:{video:n.length>0,audio:t.length>0,videoDevices:n,audioDevices:t}}).catch(()=>({video:!0,audio:!0})):t.resolve({video:!0,audio:!0}),d.getDefaultAudioOutputDeviceId=e=>Array.isArray(e)&&0!==e.length?(e.find(e=>"default"===e.deviceId)||e[0]).deviceId:"",d.hasDevice=(e,t)=>{let n=e;return Array.isArray(n)||(n=[]),n.some(e=>e.deviceId===t)},d.getActiveAudioOutputDevice=(0,o.default)(i.default.mark(function e(){var t,n,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d.getAudioOutputMediaDevices();case 3:t=e.sent,e.next=9;break;case 6:throw e.prev=6,e.t0=e.catch(0),e.t0;case 9:if(0!==t.length){e.next=11;break}return e.abrupt("return",{deviceId:null,label:null});case 11:return(n=t.find(e=>e.deviceId===a()))||(r=d.getDefaultAudioOutputDeviceId(t),n=t.find(e=>e.deviceId===r)),e.abrupt("return",n);case 14:case"end":return e.stop()}},e,null,[[0,6]])})),d}}).call(this,n(0))},function(e,t,n){var r=n(15),i=n(112);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){"use strict";e.exports={ACTIVE:"active",INACTIVE:"inactive",UNKNOWN:"unknown",PER_SESSION:"perSession",PER_STREAM:"perStream",EXCEPTION:"exception",ISSUE_REPORTED:"issueReported",SESSION_CONNECTED:"sessionConnected",SESSION_RECONNECTING:"sessionReconnecting",SESSION_RECONNECTED:"sessionReconnected",SESSION_DISCONNECTED:"sessionDisconnected",STREAM_CREATED:"streamCreated",STREAM_DESTROYED:"streamDestroyed",CONNECTION_CREATED:"connectionCreated",CONNECTION_DESTROYED:"connectionDestroyed",SIGNAL:"signal",STREAM_PROPERTY_CHANGED:"streamPropertyChanged",MICROPHONE_LEVEL_CHANGED:"microphoneLevelChanged",RESIZE:"resize",SETTINGS_BUTTON_CLICK:"settingsButtonClick",DEVICE_INACTIVE:"deviceInactive",INVA
1LID_DEVICE_NAME:"invalidDeviceName",ACCESS_ALLOWED:"accessAllowed",ACCESS_DENIED:"accessDenied",ACCESS_DIALOG_OPENED:"accessDialogOpened",ACCESS_DIALOG_CLOSED:"accessDialogClosed",ECHO_CANCELLATION_MODE_CHANGED:"echoCancellationModeChanged",MEDIA_STOPPED:"mediaStopped",PUBLISHER_DESTROYED:"destroyed",MUTE_FORCED:"muteForced",SUBSCRIBER_DESTROYED:"destroyed",SUBSCRIBER_CONNECTED:"connected",SUBSCRIBER_DISCONNECTED:"disconnected",DEVICES_DETECTED:"devicesDetected",DEVICES_SELECTED:"devicesSelected",CLOSE_BUTTON_CLICK:"closeButtonClick",MICLEVEL:"microphoneActivityLevel",MICGAINCHANGED:"microphoneGainChanged",ENV_LOADED:"envLoaded",ENV_UNLOADED:"envUnloaded",AUDIO_LEVEL_UPDATED:"audioLevelUpdated",VIDEO_ELEMENT_CREATED:"videoElementCreated"}},function(e,t,n){"use strict";var r=n(3),i=r(n(20)),o=r(n(46)),s=r(n(18));let a=n(241),c=n(244),u=n(141),d=n(34)(),l=n(6),p=n(542),f="2",h=function(){function e(e){let t=void 0===e?{}:e,n=t.staticConfig,r=void 0===n?d.onlyLocal():n,i=t.sessionInfo,o=void 0===i?new u:i,a=t.ajax,c=t.queue;(0,s.default)(this,"getTurnServerName",e=>{let t,n;return e&&"object"==typeof e?((Array.isArray(e)?e:[e]).forEach(e=>{let r=e.urls||e.url;(Array.isArray(r)?r:[r]).forEach(e=>{let r=e.indexOf(":")+1,i=e.lastIndexOf(":");e.includes("turns")?n=e.substring(r,i):t=e.substring(r,i)})}),n||t):t}),this.ajax=a,this.queue=c,this.sessionInfo=o,this.staticConfig=r}var t=e.prototype;return t._getCommon=function(){return{clientVersion:this.staticConfig.clientVersion,buildHash:this.staticConfig.buildHash,source:window.location&&window.location.href,logVersion:f,apiServer:this.staticConfig.apiUrl,clientSystemTime:new Date().getTime(),sessionId:this.sessionInfo.sessionId,mediaServerName:this.sessionInfo.mediaServerName,relayServer:this.getTurnServerName(this.sessionInfo.iceServers),p2p:this.sessionInfo.p2pEnabled,messagingServer:this.sessionInfo.messagingServer,messagingUrl:this.sessionInfo.messagingURL,version:this.staticConfig.version,partnerId:this.sessionInfo.partnerId}},t.logError=function(t,n,r,o,s){void 0===s&&(s={}),a.get((a,c)=>{if(a)return;let u=[t,n,r,o,(0,i.default)({guid:c},this.combineWithCommon(s))];e.emit("logError",...u),this._analytics.logError(...u)})},t.combineWithCommon=function(e){return(0,i.default)({},this._getCommon(),e)},t.logEvent=function(t,n,r){void 0===t&&(t={}),a.get((o,s)=>{if(o)return;let a=(0,i.default)({guid:s},this.combineWithCommon(t));e.emit("logEvent",a),this._analytics.logEvent(a,!1,n,r)})},t.logQOS=function(t){void 0===t&&(t={}),a.get((n,r)=>{if(n)return;let o=(0,i.default)({guid:r,duration:0},this.combineWithCommon(t));p(o),e.emit("logQOS",o),this._analytics.logQOS(o)})},(0,o.default)(e,[{key:"staticConfig",get:function(){return this._staticConfig},set:function(e){this._staticConfig=e,this._analytics=new c({loggingUrl:this.staticConfig.loggingUrl,ajax:this.ajax,queue:this.queue})}}]),e}();l(h),e.exports=h},function(e,t,n){"use strict";var r=!0,i=!0;function o(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}e.exports={extractVersion:o,wrapPeerConnectionEvent:function(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);var o=function(e){var t=n(e);t&&r(t)};return this._eventMap=this._eventMap||{},this._eventMap[r]=o,i.apply(this,[e,o])};var o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[n])return o.apply(this,arguments);var r=this._eventMap[n];return delete this._eventMap[n],o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}},disableLog:function(e){return"boolean"!=typeof e?Error("Argument type: "+typeof e+". Please use a boolean."):(r=e,e?"adapter.js logging disabled":"adapter.js logging enabled")},disableWarnings:function(e){return"boolean"!=typeof e?Error("Argument type: "+typeof e+". Please use a boolean."):(i=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))},log:function(){"object"==typeof window&&!r&&"u">typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)},deprecated:function(e,t){i&&console.warn(e+" is deprecated, please use "+t+" instead.")},detectBrowser:function(e){var t=e&&e.navigator,n={};return(n.browser=null,n.version=null,void 0!==e&&e.navigator)?t.mozGetUserMedia?(n.browser="firefox",n.version=o(t.userAgent,/Firefox\/(\d+)\./,1)):t.webkitGetUserMedia?(n.browser="chrome",n.version=o(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2)):t.mediaDevices&&t.userAgent.match(/Edge\/(\d+).(\d+)$/)?(n.browser="edge",n.version=o(t.userAgent,/Edge\/(\d+).(\d+)$/,2)):e.RTCPeerConnection&&t.userAgent.match(/AppleWeb
1Kit\/(\d+)\./)?(n.browser="safari",n.version=o(t.userAgent,/AppleWebKit\/(\d+)\./,1)):n.browser="Not a supported browser.":n.browser="Not a browser.",n}}},function(e,t,n){var r=n(39),i=n(353),o=n(354),s="[object Null]",a="[object Undefined]",c=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?a:s:c&&c in Object(e)?i(e):o(e)}},function(e,t,n){var r=n(178),i=n(114),o=n(25);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){"use strict";var r=n(44);e.exports=function(e){if(!r(e))throw TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var r=n(55),i=n(199),o=n(125),s=n(200),a=n(201);(e.exports=function(e,t){var n,i,c,u,d;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],r(e)?(n=a.call(e,"c"),i=a.call(e,"e"),c=a.call(e,"w")):(n=c=!0,i=!1),d={value:t,configurable:n,enumerable:i,writable:c},u?o(s(u),d):d}).gs=function(e,t,n){var c,u,d,l;return"string"!=typeof e?(d=n,n=t,t=e,e=null):d=arguments[3],r(t)?i(t)?r(n)?i(n)||(d=n,n=void 0):n=void 0:(d=t,t=n=void 0):t=void 0,r(e)?(c=a.call(e,"c"),u=a.call(e,"e")):(c=!0,u=!1),l={get:t,set:n,configurable:c,enumerable:u},d?o(s(d),l):l}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){"use strict";(function(t){var r=n(3),i=r(n(20)),o=r(n(46));let s=n(207),a=n(56),c=n(471),u=n(518),d=n(1)("StaticConfig"),l=n(138).prependProxyToUrlIfNeeded,p=a({version:"v2.22.2",buildHash:"eb4bb5146",minimumVersion:{firefox:52,chrome:49},debug:"false",websiteURL:"http://www.tokbox.com",configURL:"https://config.opentok.com",ipWhitelistConfigURL:"https://config-enterprise.opentok.com",cdnURL:"https://static.opentok.com",loggingURL:"https://enterprise-hlg.tokbox.com/prod",apiURL:"https://anvil.opentok.com"}),f=c(["apiURL","assetURL","cdnURL","sessionInfoOverrides","loggingURL"]),h={apiUrl:"apiURL",loggingUrl:"loggingURL"},m=u(e=>h[e]);e.exports=function(e){let n=(void 0===e?{}:e).axios,r=void 0===n?s:n;return function(){function e(e){Object.defineProperty(this,"config",{value:Object.freeze(a(e))})}return e.onlyLocal=function(){let t=a(window.OTProperties);return new e((0,i.default)({},p,f(t)))},e.get=function(n){let o=n.partnerId,s=n.token,c=n.useIpWhitelistConfigUrl,u=n.proxyUrl;return(()=>{let e=this.onlyLocal();if(!e.configUrl||!0===c&&!e.ipWhitelistConfigUrl)return t.resolve({});let n=!0===c?e.ipWhitelistConfigUrl:e.configUrl;return n=l(n,u),r.get(`${n}/project/${o}/config.json`,{headers:{"X-TB-TOKEN-AUTH":s}}).then(e=>e.data)})().catch(e=>(d.error("could not reach live config service",e),{})).then(t=>{let n=a(window.OTProperties);return new e((0,i.default)({},p,f(n),m(t)))})},(0,o.default)(e,[{key:"configUrl",get:function(){return this.config.configURL}},{key:"ipWhitelistConfigUrl",get:function(){return this.config.ipWhitelistConfigURL}},{key:"apiUrl",get:function(){return this.config.apiURL}},{key:"loggingUrl",get:function(){return this.config.loggingURL}},{key:"apiEnabled",get:function(){return void 0===this.config.apiEnabled||this.config.apiEnabled}},{key:"version",get:function(){return this.config.version}},{key:"clientVersion",get:function(){return`js-${(this.version||"unknown").replace("v","")}`}},{key:"buildHash",get:function(){return this.config.buildHash}},{key:"minimumVersion",get:function(){return this.config.minimumVersion}},{key:"websiteUrl",get:function(){return this.config.websiteURL}},{key:"debug",get:function(){return"true"===this.config.debug||!0===this.config.debug}},{key:"sessionInfoOverrides",get:function(){return this.config.sessionInfoOverrides}},{key:"cdnUrl",get:function(){return this.config.cdnURL||`${window.location.protocol}//${window.location.host}`}},{key:"assetUrl",get:function(){return this.config.assetURL||`${this.cdnUrl}/webrtc/${this.version}`}}]),e}()}}).call(this,n(0))},function(e,t,n){var r=n(497),i=n(503),o=n(88),s=n(10),a=n(508);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?i(e[0],e[1]):r(e):a(e)}},function(e,t,n){"use strict";let r=n(5);e.exports=function(e,t){let n,i=t||{};e.setDisplayMode=function(e){let t=e||"auto";n!==t&&(r.removeClass(this.domElement,`OT_mode-${n}`),r.addClass(this.domElement,`OT_mode-${t}`),n=t)},e.getDisplayMode=function(){return n},e.showAfterLoading=function(){r.removeClass(this.domElement,"OT_hide-forced")},e.hideWhileLoading=function(){r.addClass(this.domElement,"OT_hide-forced")},e.destroy=function(){return i.onDestroy&&i.onDestroy(this.domElement),this.domElement&&r.removeElement(this.domElement),e},e.appendTo=function(t){return this.domElement=r.createElement(i.nodeName||"div",i.htmlAttributes,i.htmlContent),i.onCreate&&i.onCreate(this.domElement),e.setDisplayMode(i.mode),"auto"===i.mode&&(r.addClass(e.domElement,"OT_mode-on-hold"),setTimeout(()=>{r.removeClass(e.domElement,"OT_mode-on-hold")},2e3)),t.appendChild(this.domElement),e}}},function(e,t,n){var r=n(77),i=4;e.exports=function(e){return r(e,i)}},function(e,t,n){var r=n(352),i=n(357);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){e.exports=n(14).Symbol},function(e,t,n){var r=n(83),i=n(64);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,c=t.length;++a<c;){var u=t[a],d=o?o(n[u],e[u],u,n,e):void 0;void 0===d&&(d=e[u]),s?i(n,u,d):r(n,u,d)}return n}},function(e,t,n){var r=n(381),i=n(109),o=n(382),s=n(186),a=n(187),c=n(29),u=n(175),d="[object Map]",l="[object Object]",p="[object Promise]",f="[object Set]",h="[object WeakMap]",m="[object DataView]",b=u(r),g=u(i),v=u(o),y=u(s),S=u(a),E=c;(r&&E(new r(new ArrayBuffer(1)))!=m||i&&E(new i)!=d||o&&E(o.resolve())!=p||s&&E(new s)!=f||a&&E(new a)!=h)&&(E=function(e){var t=c(e),n=t==l?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case b:return m;case g:return d;case v:return p;case y:return f;case S:return h}return t}),e.exports=E},function(e,t,n){"use strict";(function(t){var n,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};function o(e){console&&console.warn&&console.warn(e)}n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=y,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){if(u(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),a=s[t]),void 0===a)a=s[t]=n,++e._eventsCount;else if("function"==typeof a?a=s[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=d(e))>0&&a.length>i&&!a.warned){a.warned=!0;var i,s,a,c=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,o(c)}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,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?v(i):b(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function b(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,n){return new t(function(t,r){var i;function o(){void 0!==i&&e.removeListener("error",i),t([].slice.call(arguments))}"error"!==n&&(i=function(t){e.removeListener(n,o),r(t)},e.once("error",i)),e.once(n,o)})}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||s(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),a.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return d(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var s,a=Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else for(var u=c.length,d=b(c,u),n=0;n<u;++n)i(d[n],this,t);return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return u(t),this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,o,s;if(u(t),void 0===(r=this._events)||void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit
1("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():g(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0==arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}).call(this,n(0))},function(e,t){var n,r,i,o=e.exports={};function s(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}function u(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var d=[],l=!1,p=-1;function f(){l&&i&&(l=!1,i.length?d=i.concat(d):p=-1,d.length&&h())}function h(){if(!l){var e=c(f);l=!0;for(var t=d.length;t;){for(i=d,d=[];++p<t;)i&&i[p].run();p=-1,t=d.length}i=null,l=!1,u(e)}}function m(e,t){this.fun=e,this.array=t}function b(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new m(e,t)),1!==d.length||l||c(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=b,o.addListener=b,o.once=b,o.off=b,o.removeListener=b,o.removeAllListeners=b,o.emit=b,o.prependListener=b,o.prependOnceListener=b,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(400)();e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){"use strict";e.exports=n(414)()?n(91).Symbol:n(417)},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(71),i=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},function(e,t,n){var r=n(515);e.exports=n(137)(function(e,t){return null==e?{}:r(e,t)})},function(e,t,n){"use strict";let r=window.performance||{};e.exports=function(){return r.now?r.timing.navigationStart+r.now():Date.now()}},function(e,t,n){var r=n(575);e.exports=function(e){return r(2,e)}},function(e,t,n){"use strict";let r=n(7),i=n(62),o=n(272),s=n(127),a=n(273),c=n(1)("SDPHelpers"),u=1e4,d=2e4,l={getSections:e=>e.split(/\r\n|\r|\n/).reduce((e,t)=>{let n=t.match(/^m=(\w+) \d+/);return n&&(e.sections[e.section=n[1]]=[]),e.sections[e.section].push(t),e},{sections:{header:[]},section:"header"}).sections,getCodecsAndCodecMap(e,t){let n=l.getSections(e)[t];if(!n)throw Error(`no mediaType ${t}`);return{codecs:n[0].match(/m=\w+ \d+ [A-Z/]+ ([\d ]+)$/)[1].split(" "),codecMap:r(...n.filter(e=>e.match(/^a=rtpmap:\d+/)).map(e=>e.match(/^a=rtpmap:(\d+) ([\w-]+)/).splice(1)).map(e=>({[e[0]]:e[1]})))}},getCodecs(e,t){let n=l.getCodecsAndCodecMap(e,t);return n.codecs.map(e=>n.codecMap[e]||"Unknown codec")},mediaDirections:{INACTIVE:"inactive",RECVONLY:"recvonly"}};e.exports=l,l.getMLineIndex=function(e,t){let n=`m=${t}`;return o(e,e=>-1!==e.indexOf(n))},l.getMLine=function(e,t){let n=l.getMLineIndex(e,t);return n>-1?e[n]:void 0},l.hasMediaType=(e,t)=>{let n=RegExp(`^m=${t}`);return o(e.split("\r\n"),e=>n.test(e))>=0},l.hasMLinePayloadType=function(e,t,n){let r=l.getMLine(e,t);return l.getMLinePayloadTypes(r,t).indexOf(n)>-1},l.getMLinePayloadTypes=function(e,t){let n=RegExp(`^m=${t} \\d+(/\\d+)? [a-zA-Z0-9/]+(( [a-zA-Z0-9/]+)+)$`,"i"),r=e.match(n);return!r||r.length<2?[]:r[2].trim().split(" ")},l.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},l.changeMediaDirection=function(e,t){let n=e=>{let n=RegExp(t===l.mediaDirections.RECVONLY?"a=inactive":"a=recvonly","g");return e.replace(n,`a=${t}`)},r=l.splitSections(e);return r.shift()+n(r.join(""))},l.removeTypesFromMLine=function(e,t){let n=/[0-9 ]*$/.exec(e)[0],r=n.split(" ").filter(e=>""!==e&&-1===t.indexOf(e));return e.replace(n,` ${r.join(" ")}`)},l.removeMediaEncoding=function(e,t,n){let r,i,o,s=e.split("\r\n"),a=l.getMLineIndex(s,t),c=a>-1?s[a]:void 0,u=[];
1if(-1===a||0===l.getMLinePayloadTypes(c,t).length)return s.join("\r\n");for(r=a;r<s.length;r++){let e=RegExp(n,"i");0===s[r].indexOf("a=rtpmap:")&&2===(o=s[r].split(" ")).length&&e.test(o[1])&&u.push(o[0].substr(9))}if(!u.length)return s.join("\r\n");for(r=a;r<s.length;r++)if(0===s[r].indexOf("a=fmtp:"))for(i=0,o=s[r].split(" ");i<u.length;i++)2===o.length&&o[1]===`apt=${u[i]}`&&u.push(o[0].substr(7));return s=s.filter(e=>{for(let t=0;t<u.length;t++)if(0===e.indexOf(`a=rtpmap:${u[t]} `)||0===e.indexOf(`a=fmtp:${u[t]} `)||0===e.indexOf(`a=rtcp-fb:${u[t]} `))return!1;return!0}),u.length>0&&a>-1&&(s[a]=l.removeTypesFromMLine(c,u)),s.join("\r\n")},l.disableMediaType=function(e,t){let n,r=e.split("\r\n"),i=[];r.forEach(e=>{let t=e;/^m=/.test(t)&&(n=void 0),n||(n=[],i.push(n)),n.push(t)});let o=RegExp(`^m=${t} \\d+ ([^ ]+) [0-9 ]+$`);return[].concat(...i.map(e=>{let n=e[0].match(o);return n?[`m=${t} 0 ${n[1]} 0`,"a=inactive",...e.filter(e=>/^c=/.test(e)||/^a=mid:/.test(e)||""===e)]:e})).join("\r\n")},l.removeVideoCodec=function(e,t){return l.removeMediaEncoding(e,"video",t)};let p=function(e,t){let n=t.filterByName("ssrc-group:FID");switch((n=0===n.length?[]:n[0].value.split(" ")).length){case 0:case 1:var r=t.find(e=>0===e.name.indexOf("rtpmap:")&&e.value.indexOf("rtx/90000")>-1);if(!r)return!1;var i=r.name.split(":")[1];return i.indexOf("/")>-1&&(i=i.split("/")[0]),l.hasMLinePayloadType(e,"video",i);default:return c.debug("SDP Helpers: There are more than two FIDs, RTX is definitely enabled"),!0}};l.getAttributesForMediaType=function(e,t){let n,r,o,s,a,c,u,d,f,h,m=l.getMLineIndex(e,t),b=RegExp(`m=(?!${t}).+ `,"i"),g=RegExp("a=ssrc:\\d+ .*","i"),v=RegExp("a=ssrc-group:(SIM|FID) (\\d+).*?","i"),y=RegExp("a=([a-z0-9:/-]+) (.*)","i"),S=[];for(let t=m+1;t<e.length;t++){if(b.test(e[t])){void 0!==n&&(r=t-1);break}a=e[t].match(v),c=e[t].match(g),void 0===n&&(a||c)&&(n=t,a&&(s=/^(FID|SIM)$/.test(a[1])?a[2]:a[1])),(u=e[t].match(`a=ssrc:${s} msid:(.+)`))&&(d=u[1]);let i=g.test(e[t]),l=v.test(e[t]);void 0!==n&&(void 0!==r||i||l?t===e.length-1&&(r=t):r=t-1);let p=e[t].match(/a=mid:(.+)/);p&&(f=p[1],h=t),(o=y.exec(e[t]))&&3===o.length&&S.push({lineIndex:t,name:o[1],value:o[2]})}return S.ssrcStartIndex=n,S.ssrcEndIndex=r,S.msid=d,S.mid=f,S.midIndex=h,S.isUsingRTX=p.bind(null,e,S),S.filterByName=function(e){return this.filter(t=>t.name===e)},S.getRtpNumber=e=>{let t=RegExp("rtpmap:(.+)");return i(S.map(n=>{let r=n.name.match(t);return r&&n.value.indexOf(e)>=0?r[1]:null}),e=>null!==e)},S},l.modifyDtx=(e,t)=>{let n=e.split("\r\n");if(!l.getMLine(n,"audio"))return c.debug("No audio m-line, not enabling dtx."),e;let r=l.getAttributesForMediaType(n,"audio"),i=r.getRtpNumber("opus");if(!i)return c.debug("Could not find rtp number for opus, not enabling dtx."),e;let o=r.find(e=>e.name===`fmtp:${i}`);if(!o)return c.debug("Could not find a=fmtp line for opus, not enabling dtx."),e;let s=n[o.lineIndex],a=/usedtx=\d+([\s;]*)/;return a.test(o.value)?s=s.replace(a,t?"usedtx=1$1":""):t&&(s+="; usedtx=1"),s=s.replace(/[;\s]*$/,""),n[o.lineIndex]=s,n.join("\r\n")};let f=(e,t,n)=>{let r,i=t.split("\r\n");if(!l.getMLine(i,"audio"))return c.debug("No audio m-line, not enabling stereo."),t;let o=l.getAttributesForMediaType(i,"audio"),s=o.getRtpNumber("opus");if(!s)return c.debug("Could not find rtp number for opus, not enabling stereo."),t;let a=o.find(e=>e.name===`fmtp:${s}`);if(!a)return c.debug("Could not find a=fmtp line for opus, not enabling stereo."),t;let u=i[a.lineIndex];switch(e){case"send":(r=/sprop-stereo=\d+([\s;]*)/).test(a.value)?u=u.replace(r,n?"sprop-stereo=1$1":""):n&&(u+="; sprop-stereo=1");break;case"receive":(r=/([^-])stereo=\d+([\s;]*)/).test(a.value)?u=u.replace(r,n?"$1stereo=1$2":"$1"):n&&(u+="; stereo=1");break;default:throw Error(`Invalid type ${e} passed into enableStereo`)}return u=u.replace(/[;\s]*$/,""),i[a.lineIndex]=u,i.join("\r\n")};l.modifySendStereo=f.bind(null,"send"),l.modifyReceiveStereo=f.bind(null,"receive"),l.setAudioBitrate=(e,t)=>
1{let n=l.getAudioBitrate(e);if(void 0!==n)return c.debug(`Audio bitrate already set to ${n}, not setting audio bitrate`),e;let r=e.split("\r\n");if(!l.getMLine(r,"audio"))return c.debug("No audio m-line, not setting audio bitrate"),e;let i=l.getAttributesForMediaType(r,"audio"),o=i.getRtpNumber("opus");if(!o)return c.debug("Could not find rtp number for opus, not setting audio bitrate."),e;let s=i.find(e=>e.name===`fmtp:${o}`);if(!s)return c.debug("Could not find a=fmtp line for opus, not setting audio bitrate."),e;let a=r[s.lineIndex];return a+=`; maxaveragebitrate=${t}`,a=a.replace(/[;\s]*$/,""),r[s.lineIndex]=a,r.join("\r\n")},l.hasSendStereo=e=>/[\s;]sprop-stereo=1/.test(e),l.hasSendDtx=e=>/[\s;]usedtx=1/.test(e),l.getAudioBitrate=e=>{let t=e.match(/[\s;]maxaveragebitrate=(\d+)/);if(t)return Number(t[1])},l.MAX_SSRCS=10,l.getSSRCGroupType=e=>["SIM","FID"].find(t=>e.filterByName(`ssrc-group:${t}`)[0]),l.getSSRCGroup=e=>{let t=l.getSSRCGroupType(e);return e.filterByName(`ssrc-group:${t}`)[0]},l.getSSRCGroupSSRCs=e=>{let t=l.getSSRCGroup(e);return t?t.value.split(" ").slice(0,l.MAX_SSRCS):[]},l.getAllowedSSRCs=(e,t)=>{let n=t.slice();return e.filterByName("ssrc-group:FID").forEach(e=>{let t=e.value.split(" ");s(n,t).length&&Array.prototype.push.apply(n,t)}),a(n)},l.filterExcessSSRCs=e=>{let t,n=e.split("\r\n"),r=l.getAttributesForMediaType(n,"video"),i=l.getSSRCGroupType(r),o=r.ssrcStartIndex;if(void 0===o)return e;let s=e=>{let t=null;return e.match(/^a=ssrc:(\d+)/)&&(t=RegExp.$1),t};if(i){let e=l.getSSRCGroupSSRCs(r),o=[`a=ssrc-group:${i}`,...e].join(" ");n[r.find(e=>e.name.startsWith("ssrc-group:")).lineIndex]=o,t=l.getAllowedSSRCs(r,e)}else t=[],r.ssrcStartIndex&&t.push(s(n[r.ssrcStartIndex]));return n.filter((e,n)=>{if(n<o||n>r.ssrcEndIndex)return!0;if(n===o){if(!i){let n=s(e);return n?t.includes(n):!/^a=ssrc:(\d+)/.test(e)}return!0}let a=s(e);if(a)return t.includes(a);if(e.match(/^a=ssrc-group:FID (\d+)/)){let e=RegExp.$1;return t.includes(e)}return!e.match(/^a=ssrc-group:SIM /)}).join("\r\n")},l.enableSimulcast=function(e,t){let n,r,i=e.split("\r\n");if(!l.getMLine(i,"video"))return c.debug("No video m-line, not enabling simulcast."),e;let o=l.getAttributesForMediaType(i,"video");if(o.filterByName("ssrc-group:SIM").length>0)return c.debug("Simulcast is already enabled in this SDP, not attempting to enable again."),l.filterExcessSSRCs(e);if(!o.msid)return c.debug("No local stream attached, not enabling simulcast."),e;let s=o.isUsingRTX(),a=[],p=[];for(r=0;r<t;++r)a.push(u+r),s&&p.push(d+r);if(n=[`a=ssrc-group:SIM ${a.join(" ")}`],s)for(r=0;r<t;++r)n.push(`a=ssrc-group:FID ${a[r]} ${p[r]}`);for(r=0;r<t;++r)n.push(`a=ssrc:${a[r]} cname:localCname`,`a=ssrc:${a[r]} msid:${o.msid}`);if(s)for(r=0;r<t;++r)n.push(`a=ssrc:${p[r]} cname:localCname`,`a=ssrc:${p[r]} msid:${o.msid}`);return n.unshift(o.ssrcStartIndex,o.ssrcEndIndex-o.ssrcStartIndex+1),i.splice(...n),i.join("\r\n")},l.reprioritizeVideoCodec=function(e,t,n){let r=e.split("\r\n"),i=l.getMLineIndex(r,"video");if(-1===i)return e;let o=l.getMLinePayloadTypes(r[i],"video"),s=RegExp(`^a=rtpmap:(\\d+).* ${t}`,"i"),a=r.map(e=>e.match(s)).filter(e=>null!==e);if(0===a.length)return e;let u=a.map(e=>e[1]),d=o.filter(e=>-1===u.indexOf(e));"top"===n?d.unshift(...u):"bottom"===n?d.push(...u):(c.error(`Unexpected location param: ${n}; not changing ${t} priority`),d=o);let p=r[i].replace(o.join(" "),d.join(" "));return r[i]=p,r.join("\r\n")}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(178),i=n(376),o=n(25);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){"use strict";var r=void 0;e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){var r=n(77),i=1,o=4;e.exports=function(e){return r(e,i|o)}},function(e,t,n){var r=n(98);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){var r=n(10),i=n(136),o=n(236),s=n(59);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},function(e,t,n){var r=n(505);e.exports=function(e){return null==e?"":r(e)}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";let r=n(50),i=n(34)();t.check=function(e){void 0===e&&(e={});let t=e.env||n(2),r=e.hasGetUserMediaCapability||n(584),o=e.hasPeerConnectionCapability||n(585),s=e.logging||n(1)("hasOpenTokSupport"),a=((e.staticConfig||i.onlyLocal()).minimumVersion||{}
1)[t.name.toLowerCase()];return a&&a>t.version?(s.debug("Support for",t.name,"is disabled because we require",a,"but this is",t.version),!1):"Node"===t.name||r()&&o()},t.once=r(()=>t.check())},function(e,t,n){e.exports=n(599)(n(272))},function(e,t,n){"use strict";e.exports=function(e){let t=[];return{on(n,r){for(var i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];if(t.push({eventName:n,handler:r,args:o}),e.on)e.on(n,r);else if(e.addEventListener)e.addEventListener(n,r,...o);else throw Error("Object does not support events",e)},off(t,n){if(e.off)e.off(t,n);else if(e.removeEventListener){for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];e.removeEventListener(t,n,...i)}else throw Error("Object does not support events",e)},once(n,r){for(var i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];t.push({eventName:n,handler:r,args:o}),e.once(n,r)},removeAll(){t.forEach(e=>{let t=e.eventName,n=e.handler,r=e.args;this.off(t,n,...r)}),t.splice(0,t.length)}}}},function(e,t,n){var r=n(176);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(371),i=n(16),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable;e.exports=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")}},function(e,t,n){(function(e){var r=n(14),i=n(372),o=t&&!t.nodeType&&t,s=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0;e.exports=(a?a.isBuffer:void 0)||i}).call(this,n(84)(e))},function(e,t){var n=0x1fffffffffffff,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=typeof e;return!!(t=null==t?n:t)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return e}},function(e,t,n){var r=n(29),i=n(16),o="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||i(e)&&r(e)==o}},function(e,t,n){"use strict";if("Node"===n(5).env.name)e.exports={value:""};else{var r,i;let t=null==(r=Array.prototype.slice.call(document.getElementsByTagName("script")))||null==(i=r.pop())?void 0:i.getAttribute("src");e.exports={value:(t&&t.match(/[?&]apikey=([^&]+)/i)||[])[1]||""}}},function(e,t,n){"use strict";let r=n(2),i=()=>(r.isChrome||r.isElectron)&&r.version>=90||r.isOpera&&r.version>=76;e.exports=()=>!i()&&(r.isChrome&&r.version>71||r.isChromiumEdge&&r.version<90||r.isOpera&&r.version>58)},function(e,t,n){"use strict";e.exports=function(e,t,n){void 0===n&&(n=1/0);let r=null,i=!1,o=1,s=1e3/t,a=()=>{i&&!(o>n)&&(o+=1,e(),r=setTimeout(a,s))};this.start=()=>{i||(i=!0,setTimeout(a,s))},this.stop=()=>{window.clearTimeout(r),i=!1}}},function(e,t,n){"use strict";let r=n(48),i=n(642),o=n(9),s=n(158),a={};function c(e){return Number(e.framerateMean||e.googFrameRateSent||e.googFrameRateReceived||e.googFrameRateInput||e.googFrameRateOutput||0)}function u(e){return Number(e.framesEncoded||e.framesDecoded)}function d(e,t){if(c(e))return c(e);if(!u(e))return;
1let n=0,r=a[e.id]?a[e.id].frames:0,i=a[e.id]?a[e.id].timestamp:t;return n=s({currentStatFrames:u(e),currentTimestamp:e.timestamp,prevStatFrames:r,prevTimestamp:i}),a[e.id]={frames:u(e),timestamp:e.timestamp},n}function l(e,t){if(!t)return{};let n=t.filter(t=>t.id===e.mediaTrackId);return n.length?n[0]:{}}function p(e,t){return"packetsLost"in t?e+t.packetsLost:e}let f={isVideoStat(e,t){let n=l(e,t);return"video"===e.kind&&["outbound-rtp","inbound-rtp"].includes(e.type)||"video"===e.mediaType||"googFrameWidthReceived"in e||"googFrameWidthInput"in e||"inbound-rtp"===e.type&&-1!==e.id.indexOf("Video")||"inboundrtp"===e.type&&0!==n.frameWidth},isAudioStat(e,t){let n=l(e,t);return"audio"===e.kind&&["outbound-rtp","inbound-rtp"].includes(e.type)||"audio"===e.mediaType||"audioInputLevel"in e||"audioOutputLevel"in e||"inbound-rtp"===e.type&&-1!==e.id.indexOf("Audio")||"inboundrtp"===e.type&&0===n.frameWidth},isInboundStat:e=>"bytesReceived"in e||"packetsReceived"in e,isOutboundStat:e=>"bytesSent"in e||"packetsSent"in e,isVideoTrackStat:e=>"track"===e.type&&(e.frameHeight>0||e.frameWidth>0||e.framesCorrupted>0||e.framesDecoded>0||e.framesPerSecond>0||e.framesSent>0||e.framesReceived>0),isVideoRemoteInboundRtpStat:e=>"remote-inbound-rtp"===e.type&&"video"===e.kind,isAudioRemoteInboundRtpStat:e=>"remote-inbound-rtp"===e.type&&"audio"===e.kind,isVideoInboundRtpStat:e=>"inbound-rtp"===e.type&&"video"===e.kind,parseStatCategory(e){let t={packetsLost:0,packetsReceived:0,bytesReceived:0};return"packetsReceived"in e&&(t.packetsReceived=parseInt(e.packetsReceived,10)),"packetsLost"in e&&(t.packetsLost=parseInt(e.packetsLost,10)),"bytesReceived"in e&&(t.bytesReceived=parseInt(e.bytesReceived,10)),this.isVideoStat(e)&&("framerateMean"in e?t.frameRate=Number(e.framerateMean):"googFrameRateOutput"in e?t.frameRate=Number(e.googFrameRateOutput):"googFrameRateInput"in e&&(t.frameRate=Number(e.googFrameRateInput))),t},getVideoPacketsLost(e){return e.filter(t=>this.isVideoRemoteInboundRtpStat(t,e)).reduce(p,0)},getAudioPacketsLost(e){return e.filter(t=>this.isAudioRemoteInboundRtpStat(t,e)).reduce(p,0)},normalizeTimestamp:(e,t)=>(void 0===t&&(t=Date.now()),o(e)&&"getTime"in e)?e.getTime():.05>Math.abs(e/(1e3*t)-1)?e/1e3:e,normalizeStats(e,t,n){void 0===t&&(t=!0);let o=e.filter(t=>f.isVideoStat(t,e)).filter(e=>f.isInboundStat(e)===t),s=e.filter(t=>this.isAudioStat(t,e)).filter(e=>this.isInboundStat(e)===t)[0],a=o[0];if(!s&&!a)throw Error("could not find stats for either audio or video");let c=f.normalizeTimestamp(a?a.timestamp:s.timestamp),u={timestamp:c};a&&!t&&void 0===a.packetsLost&&(a.packetsLost=this.getVideoPacketsLost(e)),s&&!t&&void 0===s.packetsLost&&(s.packetsLost=this.getAudioPacketsLost(e));let l=["packetsSent","packetsLost","bytesSent"],p=e=>r(e,l),h=e=>r(e,["packetsReceived","packetsLost","bytesReceived"]),m=t?h:p,b=e=>{let t=["framerateMean","googFrameRateSent","googFrameRateReceived","googFrameRateInput","googFrameRateOutput","framesEncoded","framesDecoded"],n=l.concat(t),r={timestamp:c,id:a.id};return n.forEach(t=>{r[t]=e.map(e=>Number(e[t]||0)).reduce((e,t)=>e+t,0)}),r};if(o&&o.length>0){let e=b(o);u.video=Object.assign({frameRate:d(e,n)},i(m(e),Number))}return s&&(u.audio=i(m(s),Number)),u}};e.exports=f},function(e,t,n){"use strict";t.__esModule=!0,t.codes=t.messages=void 0,t.messages={1001:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.",1002:"The endpoint is terminating the connection due to a protocol error. (CLOSE_PROTOCOL_ERROR)",1003:"The connection is being terminated because the endpoint has indicated that reconnections are not available. (CLOSE_UNSUPPORTED)",1005:"Indicates that no status code was provided even though one was expected. (CLOSE_NO_STATUS)",1006:"Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected. (CLOSE_ABNORMAL)",1007:"Indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message)",1008:"Indicates that an endpoint is terminating the connection because it has received a message that violates its policy.  This is a generic status code that can be returned when there is no other more suitable status code (e.g., 1003 or 1009) or if there is a need to hide specific details about the policy",1009:"Indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process (CLOSE_TOO_LARGE)",1011:"Indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request",4001:"Connectivity loss was detected as it was too long since the socket received the last PONG message",4010:"Timed out while waiting for the Rumor socket to connect.",4020:"Error code unavailable.",4030:"Exception was thrown during Rumor connection, possibly because of a blocked port."},t.codes={CLOSE_NORMAL:1e3,CLOSE_GOING_AWAY:1001,CLOSE_PROTOCOL_ERROR:1002,CLOSE_UNSUPPORTED:1003,CLOSE_NO_STATUS:1005,CLOSE_ABNORMAL:1006,CLOSE_INCONSISTENT_DATA:1007,CLOSE_POLICY_VIOLATION:1008,CLOSE_TOO_LARGE:1009,CLOSE_UNEXPECTED_CONDITION:1011,CLOSE_CONNECTIVITY_LOSS:4001,CLOSE_TIMEOUT:4010,CLOSE_FA
vendor: 2,245 bytes, line 1
1LLBACK_CODE:4020,CLOSE_CONNECT_EXCEPTION:4030,ALREADY_CONNECTED_CONNECTING:null}},function(e,t,n){var r=n(78),i=n(111),o=n(83),s=n(177),a=n(375),c=n(180),u=n(54),d=n(378),l=n(380),p=n(183),f=n(185),h=n(41),m=n(383),b=n(384),g=n(190),v=n(10),y=n(66),S=n(388),E=n(9),T=n(390),C=n(30),R=n(53),I=1,_=2,w=4,x="[object Arguments]",O="[object Array]",N="[object Boolean]",k="[object Date]",Z="[object Error]",A="[object Function]",L="[object GeneratorFunction]",V="[object Map]",W="[object Number]",G="[object Object]",P="[object RegExp]",M="[object Set]",D="[object String]",X="[object Symbol]",j="[object WeakMap]",U="[object ArrayBuffer]",F="[object DataView]",Y="[object Float32Array]",B="[object Float64Array]",H="[object Int8Array]",J="[object Int16Array]",K="[object Int32Array]",z="[object Uint8Array]",Q="[object Uint8ClampedArray]",$="[object Uint16Array]",q="[object Uint32Array]",ee={};function et(e,t,n,O,N,k){var Z,V=t&I,W=t&_,P=t&w;if(n&&(Z=N?n(e,O,N,k):n(e)),void 0!==Z)return Z;if(!E(e))return e;var M=v(e);if(M){if(Z=m(e),!V)return u(e,Z)}else{var D=h(e),X=D==A||D==L;if(y(e))return c(e,V);if(D==G||D==x||X&&!N){if(Z=W||X?{}:g(e),!V)return W?l(e,a(Z,e)):d(e,s(Z,e))}else{if(!ee[D])return N?e:{};Z=b(e,D,V)}}k||(k=new r);var j=k.get(e);if(j)return j;k.set(e,Z),T(e)?e.forEach(function(r){Z.add(et(r,t,n,r,e,k))}):S(e)&&e.forEach(function(r,i){Z.set(i,et(r,t,n,i,e,k))});var U=P?W?f:p:W?R:C,F=M?void 0:U(e);return i(F||e,function(r,i){F&&(r=e[i=r]),o(Z,i,et(r,t,n,i,e,k))}),Z}ee[x]=ee[O]=ee[U]=ee[F]=ee[N]=ee[k]=ee[Y]=ee[B]=ee[H]=ee[J]=ee[K]=ee[V]=ee[W]=ee[G]=ee[P]=ee[M]=ee[D]=ee[X]=ee[z]=ee[Q]=ee[$]=ee[q]=!0,ee[Z]=ee[A]=ee[j]=!1,e.exports=et},function(e,t,n){var r=n(79),i=n(347),o=n(348),s=n(349),a=n(350),c=n(351);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=a,u.prototype.set=c,e.exports=u},function(e,t,n){var r=n(342),i=n(343),o=n(344),s=n(345),a=n(346);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},function(e,t,n){var r=n(52);e.exports=function(e,t){for(var n=e.length;n--;
1)if(r(e[n][0],t))return n;return -1}},function(e,t,n){e.exports=n(38)(Object,"create")},function(e,t,n){var r=n(366);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(64),i=n(52),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(373),i=n(68),o=n(113),s=o&&o.isTypedArray;e.exports=s?i(s):r},function(e,t,n){var r=n(9),i=Object.create;e.exports=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()},function(e,t,n){var r=n(88),i=n(193),o=n(121);e.exports=function(e,t){return o(i(e,t,r),e+"")}},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";var r=Object.prototype.toString,i=r.call(function(){return arguments}());e.exports=function(e){return r.call(e)===i}},function(e,t,n){"use strict";var r=Object.prototype.toString,i=r.call("");e.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||r.call(e)===i)||!1}},function(e,t,n){"use strict";e.exports=n(415)()?globalThis:n(416)},function(e,t,n){var r=n(110),i=n(448),o=n(449);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},function(e,t,n){var r=n(450);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(86),i=n(9);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 n=r(e.prototype),o=e.apply(n,t);return i(o)?o:n}}},function(e,t,n){var r=n(490);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},function(e,t,n){var r=n(58),i=n(47);e.exports=function(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},function(e,t,n){var r=n(239),i=n(30);e.exports=function(e,t){return e&&r(e,t,i)}},function(e,t,n){"use strict";t.adaptIceServers=function(e){return e.map(e=>({url:e.url,urls:e.urls||[e.url],username:e.username,credential:e.credential}))},t.parseIceServers=function(e){let n;try{n=JSON.parse(e.data).content.iceServers}catch(e){return[]}return t.adaptIceServers(n)}},function(e,t,n){"use strict";(function(t){let r=n(154),i=n(49),o=n(7),s=n(56),a=n(127),c=n(147),u=n(271),d=n(19),l=n(6),p=n(251),f=n(155),h=n(51),m=n(73);e.exports=function(e){void 0===e&&(e={});let b=e.hasValidPeerConnection||n(602),g=e.applySdpTransform||n(156),v=e.createPeerConnection||n(605),y=e.env||n(2),S=e.sdpTransformDefaults||n(607),E=e.getStatsAdapter||n(274),T=e.getRtcStatsReportAdapter||n(277),C=e.getSynchronizationSources||n(611),R=e.IceCandidateProcessor||n(612),I=e.logging||n(1),_=e.offerProcessor||n(614),w=e.PeerConnectionChannels||n(616),x=e.subscribeProcessor||n(618),O=e.changeMediaDirection||n(619),N=O.changeMediaDirectionToInactive,k=O.changeMediaDirectionToRecvOnly,Z=e.Qos||n(278).default,A=e.global||window,L=e.debounce||n(623),V=e.needsToSwapH264Profiles||n(625).once,W=()=>b(A.RTCPeerConnection),G=e.NativeRTCIceCandidate||A.RTCIceCandidate,P=e.NativeRTCSessionDescription||A.RTCSessionDescription,M=e.Errors||n(4),D=e.OTErrorClass||n(22),X=e.ExceptionCodes||n(8),j=1e4,U=e=>{let t=e.sendMessage,n=e.logging,r={};return e=>{e.candidate?(r[e.candidate.sdpMid]=e.candidate.sdpMLineIndex,t("
1candidate",{candidate:e.candidate.candidate,sdpMid:e.candidate.sdpMid||"",sdpMLineIndex:e.candidate.sdpMLineIndex||0})):n.debug("IceCandidateForwarder: No more ICE candidates.")}},F=()=>{};return function(e){let n,b,O,Y,B,H;void 0===e&&(e={});let J=!1,K=e,z=K.iceConfig,Q=void 0===z?{servers:[]}:z,$=K.isPublisher,q=K.logAnalyticsEvent,ee=void 0===q?F:q,et=K.offerOverrides,en=K.answerOverrides,er=K.sdpTransformOptions,ei=K.sendMessage,eo=K.p2p,es=K.codecFlags,ea=K.sourceStreamId,ec=!1,eu=!1,ed=!1,el=V(),ep=0,ef=!1,eh=f();function em(e,t){!J&&["candidate","offer","answer","pranswer"].indexOf(e)>-1&&(J=-1!==("candidate"===e?t.candidate:t.sdp).indexOf("typ relay")),ei(e,t)}let eb=i();ee("createPeerConnection","Attempt");let eg={};eg.id=d();let ev=I(`PeerConnection:${eg.id}`);ev.debug("construct",{id:eg.id,options:e});let ey=c({},S,er),eS=e=>"relay"===Q.transportPolicy&&null!=e&&-1===e.candidate.indexOf("typ relay"),eE=u(e,["isPublisher","logAnalyticsEvent","offerOverrides","answerOverrides","sendMessage","sdpTransformOptions"]),eT=[],eC=(()=>{let e=eE.overrideSimulcastEnabled||!1;return{get:()=>e,set(t){let n=!!t&&eE.capableSimulcastStreams>1;n!==e&&void 0===eE.overrideSimulcastEnabled&&(e=n,eg.generateOffer())}}})(),eR=(()=>{let e=!1;return{get:()=>e,set(t){let n=!!t;n!==e&&((e=n)&&!eg.iceConnectionStateIsConnected()?eg.generateOffer():ev.debug("iceRestart is going to wait until we disconnect and then restart ice"))}}})(),eI={clean(){delete this.promise,delete this.resolve,delete this.reject}};eI.promise=new t((e,t)=>
1{eI.resolve=e,eI.reject=t});let e_=new R,ew="new";Object.defineProperty(eg,"signalingState",{get:()=>b.signalingState,set:e=>(b.signalingState=e,e)}),l(eg),eg.once("iceConnected",()=>{let e="",t={pcc:parseInt(i()-eb,10),hasRelayCandidates:J,proxyInfo:e};b&&b.proxyInfo&&(t.proxyInfo=b.proxyInfo),ee("createPeerConnection","Success",t)}),eI.resolve();let ex=e=>{if(ev.debug("internalCreatePeerConnection: called"),b){ev.debug("internalCreatePeerConnection: resolving synchronously"),e.call(null,null,b);return}if(eT.push(e),eT.length>1)return;let t={optional:[{DtlsSrtpKeyAgreement:!0}]};if(ev.debug(`Creating peer connection config "${JSON.stringify(eE)}".`),0===Q.servers.length&&(ev.error("No ice servers present"),ee("Error","noIceServers")),"relay"===Q.transportPolicy){let e=e=>e&&0===e.indexOf("turn");Q.servers=Q.servers.map(t=>{let n=s(t);return Array.isArray(n.urls)||(n.urls=[n.urls]),n.urls=n.urls.filter(e),0===n.urls.length?void 0:n}).filter(e=>void 0!==e)}eE.iceTransportPolicy=Q.transportPolicy,eE.iceServers=Q.servers,W().then(e=>{if(!e)throw ev.error("createPeerConnection: Invalid RTCPeerConnection object"),Error("Failed to create valid RTCPeerConnection object");return v({window:A,config:eE,constraints:t})}).then(e=>eO(null,e),e=>eO(e))},eO=(e,t)=>{if(e){eX({reason:`Failed to create PeerConnection, exception: ${e}`,prefix:"NewPeerConnection"}),eT=[];return}ev.debug("OT attachEventsToPeerConnection"),b=t,e_&&e_.setPeerConnection(t),O=new w(b),eE.channels&&O.addMany(eE.channels);let n=U({sendMessage:em,logging:ev}),r=e=>{(eI.resolve(),eS(e.candidate))?ev.debug("Ignore candidate",e.candidate.candidate):n(e)},i=b.iceConnectionState,o=e=>{b?(ev.debug("iceconnectionstatechange",b.iceConnectionState),"connected"===b.iceConnectionState?("disconnected"===i&&eg.clearFailedTimeout(),eg.emit("iceConnected"),eR.set(!1)):"completed"===b.iceConnectionState&&y.isLegacyEdge&&setTimeout(()=>eF.startCollecting(b),1e3)):ev.debug("iceconnectionstatechange on peerConnection that no longer exists",eg);let t=e.target.iceConnectionState;eg.trigger("iceConnectionStateChange",t),ee("attachEventsToPeerConnection","iceconnectionstatechange",t),"disconnected"===t&&(eR.get()?(ev.debug("Restarting ice!"),eg.generateOffer()):m()||(H=setTimeout(()=>{let e="failed";ee("attachEventsToPeerConnection","iceconnectionstatechange",e),i=e,eg.trigger("iceConnectionStateChange",e)},j))),"disconnected"!==i&&"failed"===t&&eX({reason:"The stream was unable to connect due to a network error. Make sure your connection isn't blocked by a firewall.",prefix:"ICEWorkflow"}),i=t},s=()=>{ee("peerConnection:negotiationNeeded","Event"),$&&eg.generateOffer()};b.onaddstream=F,b.addEventListener("icecandidate",r),b.addEventListener("addstream",eV),b.addEventListener("removestream",eW),b.addEventListener("signalingstatechange",eZ),b.addEventListener("negotiationneeded",s),b.addEventListener("iceconnectionstatechange",o),eh.add(()=>{b&&(b.onaddstream=null,b.removeEventListener("icecandidate",r),b.removeEventListener("addstream",eV),b.removeEventListener("removestream",eW),b.removeEventListener("signalingstatechange",eZ),b.removeEventListener("negotiationneeded",s),b.removeEventListener("iceconnectionstatechange",o))}),eN(null)},eN=()=>{for(;eT.length;)eT.shift().call(null)},ek=()=>{e_&&(e_.destroy(),e_=null),eT=[],eF.stopCollecting(),eh.releaseAll(),eI.clean(),null!==b&&(b.destroy&&b.destroy(),b=null,eg.trigger("close")),eg.off()},eZ=e=>{let t=e.target.signalingState;eg.emit("signalingStateChange",t),"stable"===t&&eg.emit("signalingStateStable"),t&&t!==ew&&(ew=t,ev.debug(`stateChange: ${ew}`),"closed"===ew&&ek())},eA=e=>{e.dataChannels=O.sampleQos(),eg.trigger("qos",{parsedStats:e,simulcastEnabled:eC.get()})},eL=()=>{let e;if(b.getRemoteStreams)e=b.getRemoteStreams();else if(b.remoteStreams)e=b.remoteStreams;else throw Error("Invalid Peer Connection object implements no method for retrieving remote streams");return Array.prototype.slice.call(e)},eV=e=>{ee("createPeerConnection","StreamAdded"),eg.trigger("streamAdded",e.stream)},eW=e=>{ee("peerConnection:streamRemoved","Event"),eg.trigger("streamRemoved",e.stream)},eG=(e,t,n)=>{ed=!1,eX({reason:`PeerConnection.offerProcessor ${e}: ${t}`,prefix:n})},eP=e=>{if(ed){n=e;return}ed=!0,ee("peerConnection:processOffer","Event");let t=new P({type:"offer",sdp:e.content.sdp}),r=e=>{ed=!1,e_&&e_.process(),em("answer",e),y.isLegacyEdge||eF.startCollecting(b,$),n&&(eP(n),n=null)},i=e=>eg.trigger("remoteVideoSupported",e);ex(()=>{_(b,A.RTCPeerConnection,A.RTCSessionDescription,P,ey,t,es,eo,r,eG,i,el)})},eM=e=>{ee("peerConnection:processAnswer","Event");let t=e=>{eX({reason:`Error while setting RemoteDescription ${e}`,prefix:"SetRemoteDescription"})};e.content.sdp?(B=new P({type:"answer",sdp:g(ey,"remote","answer",o({replaceBaselineProfile:el},en),e.content.sdp).local}),(()=>{let e=()=>{ev.debug("processAnswer: setRemoteDescription Success"),e_&&e_.process()};b.setRemoteDescription(B).then(e).catch(t),ec=!1,eu&&(eu=!1,eg.generateOffer())})(),y.isLegacyEdge||eF.startCollecting(b,$)):t("Weird answer message, no SDP.")},eD=()=>{var e,t;if((null==(e=b)||null==(t=e.signalingState)?void 0:t.toLowerCase())==="closed")return;ec=!0,ee("peerConnection:processSubscribe","Event"),ev.debug("processSubscribe: Sending offer to subscriber.");let n=eC.get()?eE.capableSimulcastStreams:1;"P2P"!==ea||eo||(n=1),ex(()=>{x({peerConnection:b,NativeRTCSessionDescription:P,sdpTransforms:ey,numSimulcastStreams:n,offerOverrides:et,offerConstraints:{iceRestart:eR.get()},replaceBaselineProfile:el}).then(e=>{ev.debug("processSubscribe: got offer, waiting for _readyToSendOffer"),Y=e,eI.promise.then(()=>{ev.debug("processSubscribe: sending offer"),em("offer",Y)})},e=>{eX({reason:`subscribeProcessor ${e.message}: ${e.reason}`,prefix:e.prefix})}),eR.set(!1)})};eg.generateOffer=L(()=>{ec?eu=!0:eD()},100);let eX=e=>{let t=e.reason,n=e.prefix;ev.error(t,"in state",b?{connectionState:b.connectionState,iceConnectionState:b.iceConnectionState,iceGatheringState:b.iceGatheringState,signalingState:b.signalingState}:"(none)"),eg.trigger("error",{reason:t,prefix:n})};function ej(e){this.track=e}eg.addTrack=(e,n)=>r(new t((e,t)=>
1{ex(n=>{if(n)return t(n);e()})}).then(()=>{if(b.addTrack)return b.addTrack(e,n);let t=b.getLocalStreams()[0];if(void 0===t)throw Error("PeerConnection has no existing streams, cannot addTrack");t.addTrack(e),eg.generateOffer()}).then(()=>new t(e=>{eg.once("signalingStateStable",()=>{e()})})),15e3,"Renegotiation timed out"),eg.removeTrack=e=>r(t.resolve().then(()=>{if(e instanceof ej){b.getLocalStreams()[0].removeTrack(e.track),eg.generateOffer();return}return b.removeTrack(e)}).then(()=>new t(e=>{eg.once("signalingStateStable",()=>{e()})})),15e3,"Renegotiation timed out"),eg.addLocalStream=e=>new t((t,n)=>{ex(r=>{if(r)return void n(r);try{b.addStream(e)}catch(e){n(e);return}t()},e)}),eg.getLocalStreams=()=>b.getLocalStreams(),eg.getSenders=()=>b.getSenders?b.getSenders():b.getLocalStreams()[0].getTracks().map(e=>new ej(e)),eg.disconnect=()=>{var e;e_&&(e_.destroy(),e_=null),(null==(e=b)?void 0:e.signalingState)&&"closed"!==b.signalingState.toLowerCase()&&(b.close(),setTimeout(ek))},eg.iceRestart=()=>eR.set(!0),eg.clearFailedTimeout=()=>clearTimeout(H),eg.changeMediaDirectionToRecvOnly=()=>k(b),eg.changeMediaDirectionToInactive=()=>N(b),eg.processMessage=(e,t)=>{switch(ev.debug(`processMessage: Received ${e} from ${t.fromAddress}`,t),ev.debug(t),e){case"generateoffer":t.content&&void 0!==t.content.simulcastEnabled&&eC.set(t.content.simulcastEnabled),eg.generateOffer(),r();break;case"offer":eP(t),r();break;case"answer":case"pranswer":eM(t);break;case"candidate":var n=new G(t.content);if(eS(n))return ev.debug("Ignore candidate",n.candidate),eg;e_&&e_.addIceCandidate(n).catch(e=>{ev.warn(`Error while adding ICE candidate: ${JSON.stringify(n)}: ${e.toString()}`)});break;default:ev.debug(`processMessage: Received an unexpected message of type ${e} from ${t.fromAddress}: ${JSON.stringify(t)}`)}function r(){ep+=1,eF.handleOfferMessageReceived(),ep>1&&(ee("Renegotiation","Attempt"),ef=!0)}return eg},eg.remoteStreams=()=>b?eL():[],eg.remoteTracks=()=>b?b.getReceivers?Array.prototype.slice.apply(b.getReceivers()).map(e=>e.track):Array.prototype.concat.apply([],eL().map(e=>e.getTracks())):[],eg.remoteDescription=()=>b.remoteDescription,eg.getStats=e=>{if(!b){let t=X.PEER_CONNECTION_NOT_CONNECTED;e(new p(D.getTitleByCode(t),M.PEER_CONNECTION_NOT_CONNECTED,{code:t}));return}E(b,e)},eg.getRtcStatsReport=e=>{if(!b){let t=X.PEER_CONNECTION_NOT_CONNECTED;e(new p(D.getTitleByCode(t),M.PEER_CONNECTION_NOT_CONNECTED,{code:t}));return}T(b,e)},eg.getSynchronizationSources=e=>{if(!$){if(!b){let t=X.PEER_CONNECTION_NOT_CONNECTED;e(new p(D.getTitleByCode(t),M.PEER_CONNECTION_NOT_CONNECTED,{code:t}));return}C(b,e)}};let eU=function e(t,n,r,i){let o,s=O.get(n,r);if(!s){if(t>0)return void setTimeout(e.bind(null,t-1,n,r,i),200);o=new p(`A channel with that label and options could not be found. Label:${n}. Options: ${JSON.stringify(r)}`)}i(o,s)};eg.getDataChannel=(e,t,n)=>{b?eU(100,e,t,n):n(new p("Cannot create a DataChannel before there is a connection."))},eg.getSourceStreamId=()=>ea,eg.iceConnectionStateIsConnected=()=>b&&["connected","completed"].indexOf(b.iceConnectionState)>-1,eg.findAndReplaceTrack=(e,n)=>t.resolve().then(()=>{let r=b.getSenders().filter(t=>t.track===e)[0];if(!r)return t.resolve();if("function"!=typeof r.replaceTrack)throw Error("Sender does not support replaceTrack");return r.replaceTrack(n)}),eg.hasRelayCandidates=()=>J,eg.getNegotiatedCodecs=()=>{if(!b.localDescription||!b.remoteDescription)return null;let e=e=>a(h.getCodecs(b.localDescription.sdp,e),h.getCodecs(b.remoteDescription.sdp,e));return{audio:e("audio"),video:e("video")}},eg.on("signalingStateStable",()=>{ef&&(ef=!1,ee("Renegotiation","Success",eg.getNegotiatedCodecs()))}),eg.on("error",e=>{let t=e.prefix;ef&&-1!==["CreateOffer","SetRemoteDescription"].indexOf(t)&&(ef=!1,ee("Renegotiation","Failure"))}),eg.on("close",()=>{ef&&(ef=!1,ee("Renegotiation","Cancel"))});let eF=new Z;return eF.on("stats",eA),eg}}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(2);e.exports=()=>"Chrome"===r.name&&r.version>=58||-1!==["Firefox","Edge","Safari","Opera"].indexOf(r.name)},function(e,t,n){"use strict";e.exports=function(e){let t=null,n=!1,r=()=>{n&&(e(),t=window.requestAnimationFrame(r))};this.start=()=>{n||(n=!0,window.requestAnimationFrame(r))},this.stop=()=>{window.cancelAnimationFrame(t),n=!1}}},function(e,t,n){"use strict";let r=n(7),i=(e,t,n)=>t&&!n?()=>t.call(e):t&&n?r=>(void 0!==r&&n.call(e,r),t.call(e)):t=>{void 0!==t&&n.call(e,t)};e.exports=(e,t)=>{let n={};Object.keys(t).forEach(r=>{n[r]=i(e,t[r].get,t[r].set)}),r(e,n)}},function(e,t,n){"use strict";let r="";e.exports={getCurrentAudioOutputDeviceId:()=>r,setCurrentAudioOutputDeviceId:e=>{r=e}}},function(e,t,n){"use strict";(function(t){e.exports=function(e){return new t(t=>setTimeout(t,e))}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(293);e.exports=function(e){let t=(void 0===e?{}:e).NativeVideoElementWrapper,n=void 0===t?r():t,i=50;return function(e){let t=void 0===e?{}:e,r=t.fallbackText,o=void 0===r?"Sorry, Web RTC is not available in your browser":r,s=t.fitMode,a=t.muted;return new n({fallbackText:o,fitMode:s,muted:a,defaultAudioVolume:i,_inject:t._inject,widgetType:t.widgetType})}}}
1,function(e,t){e.exports=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}}return t.default=e,t}},function(e,t,n){e.exports=n(38)(n(14),"Map")},function(e,t,n){var r=n(358),i=n(365),o=n(367),s=n(368),a=n(369);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t){var n=0x1fffffffffffff;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t,n){(function(e){var r=n(174),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process;e.exports=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return s&&s.binding&&s.binding("util")}catch(e){}}()}).call(this,n(84)(e))},function(e,t,n){var r=n(69),i=n(374),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(379),i=n(181),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;e.exports=s?function(e){return null==e?[]:r(s(e=Object(e)),function(t){return o.call(e,t)})}:i},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){e.exports=n(179)(Object.getPrototypeOf,Object)},function(e,t,n){var r=n(188);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){"use strict";e.exports={error:{priority:1,method:"error"},warn:{priority:2,method:"warn"},info:{priority:3,method:"info"},log:{priority:4,method:"log"},debug:{priority:5,method:"debug"},spam:{priority:6,method:"log"}}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(395);e.exports=n(194)(r)},function(e,t,n){var r=n(52),i=n(25),o=n(67),s=n(9);e.exports=function(e,t,n){if(!s(n))return!1;var a=typeof t;return("number"==a?!!(i(n)&&o(t,n.length)):"string"==a&&t in n)&&r(n[t],e)}},function(e,t,n){"use strict";e.exports=n(196)()?Object.setPrototypeOf:n(197)},function(e,t,n){"use strict";var r=n(55),i={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!r(e)&&hasOwnProperty.call(i,typeof e)}},function(e,t,n){"use strict";e.exports=n(406)()?Object.assign:n(407)},function(e,t,n){"use strict";let r=n(1)("Event"),i=n(7),o=n(127);e.exports=function(){function e(e,t,n){void 0===t&&(t=!0),void 0===n&&(n={}),this.type=e,this.cancelable=t,this._defaultPrevented=!1;let r=o(Object.keys(this),Object.keys(n));if(r.length>0)throw Error(`Cannot used reserved property names: ${r.join(",")}`);i(this,n)}var t=e.prototype;return t.preventDefault=function(){this.cancelable?this._defaultPrevented=!0:r.warn("Event.preventDefault :: Trying to preventDefault on an event that isn't cancelable")},t.isDefaultPrevented=function(){return this._defaultPrevented},e}()},function(e,t,n){var r=n(33),i=n(447),o=n(87),s=n(453);e.exports=o(function(e){var t=r(e,s);return t.length&&t[0]===e[0]?i(t):[]})},function(e,t){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){var r=n(25),i=n(16);e.exports=function(e){return i(e)&&r(e)}},function(e,t){e.exports={}},function(e,t,n){var r=n(217),i=n(476),o=n(477),s=n(219),a=n(488),c=n(223),u=n(489),d=n(226),l=n(227),p=n(96),f="Expected a function",h=1,m=2,b=8,g=16,v=32,y=64,S=Math.max;e.exports=function(e,t,n,E,T,C,R,I){var _=t&m;if(!_&&"function"!=typeof e)throw TypeError(f);var w=E?E.length:0;if(w||(t&=~(v|y),E=T=void 0),R=void 0===R?R:S(p(R),0),I=void 0===I?I:p(I),w-=T?T.length:0,t&y){var x=E,O=T;E=T=void 0}var N=_?void 0:c(e),k=[e,t,n,E,T,x,O,C,R,I];if(N&&u(k,N),e=k[0],t=k[1],n=k[2],E=k[3],T=k[4],(I=k[9]=void 0===k[9]?_?0:e.length:S(k[9]-w,0))||!(t&(b|g))||(t&=~(b|g)),t&&t!=h)Z=t==b||t==g?o(e,t,I):t!=v&&t!=(h|v)||T.length?s.apply(void 0,k):a(e,t,n,E);else var Z=i(e,t,n);return l((N?r:d)(Z,k),e,t)}},function(e,t,n){var r=n(86),i=n(133),o=0xffffffff;function s(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=o,this.__views__=[]}s.prototype=r(i.prototype),s.prototype.constructor=s,e.exports=s},function(e,t){e.exports=function(){}},function(e,t){var n="__lodash_placeholder__";e.exports=function(e,t){for(var r=-1,i=e.length,o=0,s=[];++r<i;){var a=e[r];(a===t||a===n)&&(e[r]=n,s[o++]=r)}return s}},function(e,t,n){var r=n(29),i=n(117),o=n(16),s="[object Object]",a=Object.prototype,c=Function.prototype.toString,u=a.hasOwnProperty,d=c.call(Object);e.exports=function(e){if(!o(e)||r(e)!=s)return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;
1return"function"==typeof n&&n instanceof n&&c.call(n)==d}},function(e,t,n){var r=n(10),i=n(71),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},function(e,t,n){var r=n(512),i=n(193),o=n(121);e.exports=function(e){return o(i(e,void 0,r),e+"")}},function(e,t,n){"use strict";let r=n(240),i=e=>e.replace(/\/$/,"");e.exports={prependProxyToUrlIfNeeded:(e,t)=>{if(!t)return e;let n=r.parse(t),o=r.parse(e);if(!n.protocol||!o.protocol)return e;let s=n.protocol.match(/^https/),a=(o.protocol.match(/^ws/i)?"ws":"http")+(s?"s":""),c=i(`${a}://${n.host}${n.pathname}`),u=i(`${o.host}${o.pathname}${o.search||""}`);return`${c}/${u}`}}},function(e,t,n){"use strict";let r,i=n(21),o=n(11),s=n(4),a=n(8),c=n(22),u={SET_PROXY_URL_TIMING_ERROR:"The proxyUrl was set after a session or publisher was created.",PROXY_URL_ALREADY_SET_ERROR:"The proxyUrl has already been set. Setting it again will not have any effect."};e.exports={errorMessages:u,setProxyUrl:e=>{let t,d=n(27),l=n(72),p=new d,f=i.sessions.length()>0,h=i.publishers.length()>0;if(f){let e=i.sessions.find(e=>"connected"===e.currentState);t=e?e.sessionId:i.sessions.find().sessionId}else t="";let m={sessionId:t,apiKey:l.value};if(h||f){let e=o()(s.SET_PROXY_URL_TIMING_ERROR,Error(u.SET_PROXY_URL_TIMING_ERROR),a.SET_PROXY_URL_TIMING_ERROR);c.handleJsException({error:e,target:m,analytics:p})}else if(r){let e=o()(s.PROXY_URL_ALREADY_SET_ERROR,Error(u.PROXY_URL_ALREADY_SET_ERROR),a.PROXY_URL_ALREADY_SET_ERROR);c.handleJsException({error:e,target:m,analytics:p})}else r=e},getProxyUrl:()=>r,clearProxyUrl:()=>{r=null}}},function(e,t,n){var r=n(87),i=n(52),o=n(122),s=n(53),a=Object.prototype,c=a.hasOwnProperty;e.exports=r(function(e,t){e=Object(e);var n=-1,r=t.length,u=r>2?t[2]:void 0;for(u&&o(t[0],t[1],u)&&(r=1);++n<r;)for(var d=t[n],l=s(d),p=-1,f=l.length;++p<f;){var h=l[p],m=e[h];(void 0===m||i(m,a[h])&&!c.call(e,h))&&(e[h]=d[h])}return e})},function(e,t,n){"use strict";var r=n(3)(n(46));let i=n(57),o=n(56);e.exports=function(){function e(e){void 0===e&&(e={}),Object.defineProperty(this,"_rawSessionInfo",{value:o(e)})}return(0,r.default)(e,[{key:"sessionId",get:function(){return this._rawSessionInfo.session_id}},{key:"partnerId",get:function(){return this._rawSessionInfo.partner_id}},{key:"messagingServer",get:function(){return this._rawSessionInfo.messaging_server_url}},{key:"mediaServerName",get:function(){return this._rawSessionInfo.media_server_hostname}},{key:"messagingURL",get:function(){return this._rawSessionInfo.messaging_url}},{key:"symphonyAddress",get:function(){return this._rawSessionInfo.symphony_address}},{key:"iceServers",get:function(){return this._rawSessionInfo.ice_servers}},{key:"simulcast",get:function(){return i(this._rawSessionInfo,"properties.simulcast")}},{key:"reconnection",get:function(){return i(this._rawSessionInfo,"properties.reconnection",!1)}},{key:"renegotiation",get:function(){return i(this._rawSessionInfo,"properties.renegotiation",!1)}},{key:"p2pEnabled",get:function(){return"enabled"===i(this._rawSessionInfo,"properties.p2p.preference.value")}},{key:"hybridSession",get:function(){return i(this._rawSessionInfo,"properties.hybridSession",!1)}},{key:"isAdaptiveEnabled",get:function(){return"adaptive"===i(this._rawSessionInfo,"properties.p2p.preference.value")}},{key:"priorityVideoCodec",get:function(){return i(this._rawSessionInfo,"properties.priorityVideoCodec","")}},{key:"h264",get:function(){return i(this._rawSessionInfo,"properties.h264",!0)}},{key:"vp8",get:function(){return i(this._rawSessionInfo,"properties.vp8",!0)}},{key:"vp9",get:function(){return i(this._rawSessionInfo,"properties.vp9",!0)}},{key:"clientCandidates",get:function(){let e=i(this._rawSessionInfo,"properties.clientCandidates");return"relayed"===e?"relay":e}}]),e}()},function(module,exports,__nested_webpack_require_485077__){"use strict";let extendES5Native=__nested_webpack_require_485077__(548),webrtcAdapter=__nested_webpack_require_485077__(549),logging=__nested_webpack_require_485077__(1)("createWindowMock"),env=__nested_webpack_require_485077__(2),windowKeys=[{key:"location",type:"object"},{key:"setTimeout",type:"function"},{key:"requestAnimationFrame",type:"function"},{key:"URL",type:"function"},{key:"MediaStream",type:"class"},{key:"webkitMediaStream",type:"class"},{key:"RTCIceCandidate",type:"class"},{key:"mozRTCIceCandidate",type:"class"},{key:"RTCSessionDescription",type:"class"},{key:"mozRTCSessionDescription",type:"class"},{key:"RTCIceGatherer",type:"class"},{key:"RTCIceTransport",type:"class"}
1,{key:"RTCDtlsTransport",type:"class"},{key:"RTCSctpTransport",type:"class"},{key:"RTCRtpReceiver",type:"class"},{key:"HTMLMediaElement",type:"class"},{key:"RTCPeerConnection",type:"class"},{key:"webkitRTCPeerConnection",type:"class"},{key:"mozRTCPeerConnection",type:"class"},{key:"MediaStreamTrack",type:"class"},{key:"RTCRtpSender",type:"class"},{key:"RTCTrackEvent",type:"class"},{key:"RTCTransceiver",type:"class"},{key:"RTCDtmfSender",type:"class"},{key:"RTCDTMFSender",type:"class"},{key:"MediaStreamTrackEvent",type:"class"}],navigatorKeys=[{key:"userAgent",type:"string"},{key:"getUserMedia",type:"function"},{key:"getDisplayMedia",type:"function"},{key:"webkitGetUserMedia",type:"function"},{key:"mozGetUserMedia",type:"function"}],mediaDevicesKeys=[{key:"getUserMedia",type:"function"},{key:"getDisplayMedia",type:"function"},{key:"enumerateDevices",type:"function"},{key:"getSupportedConstraints",type:"function"},{key:"addEventListener",type:"function"},{key:"removeEventListener",type:"function"}],bindWithStaticProperties=(e,t)=>{if("function"!=typeof t)return logging.warn("Non-function passed into bindWithStaticProperties()"),t;let n=t.bind(e);return Object.keys(t).forEach(e=>{n[e]=t[e]}),n},extendParentClass=ParentClass=>{try{let ChildClass=eval(`
2      "use strict"; // Chrome<49 requires strict mode
3
4      const getOwnProperties = (target) => {
5        const properties = {};
6        Object.getOwnPropertyNames(target).forEach((key) => {
7          properties[key] = Object.getOwnPropertyDescriptor(target, key);
8        });
9        return properties;
10      };
11
12      class ChildClass extends ParentClass {
13        constructor(...args) {
14          super(...args);
15          try {
16            this.__proto__ = ChildClass.prototype;
17          } catch (e) {}
18        }
19      };
20
21      Object.defineProperties(ChildClass.prototype, getOwnProperties(ParentClass.prototype));
22      Object.keys(ParentClass)
23        .forEach((staticKey) => {
24          ChildClass[staticKey] = ParentClass[staticKey];
25        });
26
27      ChildClass; // Ensure the final statement is returned in FF
28    `);if(ChildClass&&ChildClass.prototype instanceof ParentClass)return ChildClass}catch(e){}return null},canUseES6Class=e=>{let t=extendParentClass(e.RTCPeerConnection||e.webkitRTCPeerConnection||e.mozRTCPeerConnection);if(t)try{t.prototype.foo="bar";let e=new t({iceServers:[]}),n="bar"===e.foo;try{e.close()}catch(e){}return n}catch(e){}return!1},extendClass=(e,t,n)=>{if("function"!=typeof e)return logging.warn("Non-function passed into extendClass()"),e;let r=n&&extendParentClass(e);return r||(r=extendES5Native(e)),r},getCopyProperties=e=>(t,n,r)=>{r.forEach(r=>{let i=r.key,o=r.type,s=n[i];if(void 0!==s){switch(o){case"function":s=bindWithStaticProperties(n,s);break;case"class":s=extendClass(s,i,e);break;case"string":case"object":break;default:throw Error(`Invalid type of window key: ${o}`)}t[i]=s}})},cloneWindow=e=>{let t={},n=getCopyProperties(canUseES6Class(e));return n(t,e,windowKeys),void 0!==e.navigator&&(t.navigator={},n(t.navigator,e.navigator,navigatorKeys),void 0!==e.navigator.mediaDevices&&(t.navigator.mediaDevices={},n(t.navigator.mediaDevices,e.navigator.mediaDevices,mediaDevicesKeys))),t};module.exports=function(e){if(void 0!==e.adapter||env.isLegacyEdge)return e;let t=cloneWindow(e);return webrtcAdapter({window:t}),t}},function(e,t,n){"use strict";e.exports=function(){let e=null;this.transform=t=>Math.min(Math.max(Math.log(e=null===e||t>=e?t:.3*t+.7*e)/Math.LN10/1.5+1,0),1)}},function(e,t,n){"use strict";let r=n(6),i=e=>Object.keys(e).map(t=>e[t]),o=n(7);e.exports=function(e){let t={},n=(n,r)=>{o(r,{parent:this}),r.appendTo(e.parent),t[n]=r,this[n]=r};e.parent&&(r(this),this.destroy=()=>{this.off(),this.hideWhileLoading(),i(t).forEach(e=>e.destroy())},this.showAfterLoading=()=>{i(t).forEach(e=>e.showAfterLoading())},this.hideWhileLoading=()=>{i(t).forEach(e=>e.hideWhileLoading())},this.set=(e,t)=>("string"==typeof e&&t?n(e,t):Object.keys(e).forEach(t=>{n(t,e[t])}),this))}},function(e,t,n){"use strict";var r=n(3)(n(18));e.exports=function(){function e(e){(0,r.default)(this,"_analyser",null),(0,r.default)(this,"_timeDomainData",null),(0,r.default)(this,"_sourceNode",null),this._audioContext=e}var t=e.prototype;return t._initAudioAnalyser=function(e){this._analyser=this._audioContext.createAnalyser(),this._sourceNode=this._audioContext.createMediaStreamSource(e),this._sourceNode.connect(this._analyser),this._timeDomainData=new Uint8Array(this._analyser.frequencyBinCount)},t.webRTCStream=function(e){this._sourceNode&&this._sourceNode.disconnect(this._analyser),"suspended"===this._audioContext.state&&this._audioContext.resume(),this._initAudioAnalyser(e)},t.destroy=function(){this._sourceNode&&this._sourceNode.disconnect(this._analyser),this._timeDomainData=null},t.sample=function(e){if("function"==typeof e)throw Error("sample no longer takes a callback");if(this._analyser&&this._timeDomainData){this._analyser.getByteTimeDomainData(this._timeDomainData);let e=0;for(let t=this._timeDomainData.length-1;t>=0;t-=1)e=Math.max(e,Math.abs(this._timeDomainData[t]-128));return e/128}return null},e}()},function(e,t,n){"use strict";let r=n(560),i=n(26),o=n(6),s=n(23)();e.exports=new function(){let e=this;function t(){return r.isDomLoaded()&&!r.isDomUnloaded()}function n(){t()&&e.dispatchEvent(new s.EnvLoadedEvent(i.ENV_LOADED))}function a(){r.whenUnloaded.then(c),n()}function c(){e.dispatchEvent(new s.EnvLoadedEvent(i.ENV_UNLOADED))}o(e),r.whenLoaded.then(a),this.onLoad=function(n,r){t()?n.call(r):e.on(i.ENV_LOADED,n,r)},this.onUnload=function(t,n){this.isUnloaded()?t.call(n):e.on(i.ENV_UNLOADED,t,n)},this.isUnloaded=function(){return r.isDomUnloaded()}}},function(e,t,n){var r=n(561);e.exports=n(192)(function(e,t,n){r(e,t,n)})},function(e,t,n){"use strict";var r=n(565);function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)}function o(e){return window.Buffer&&"function"==typeof window.Buffer.isBuffer?window.Buffer.isBuffer(e):!!(null!=e&&e._isBuffer)}var s=n(566),a=Object.prototype.hasOwnProperty,c=Array.prototype.slice,u=function(){return"foo"===(function(){}).name}();function d(e){return Object.prototype.toString.call(e)}function l(e){return!o(e)&&"function"==typeof window.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&!!(e instanceof DataView||e.buffer&&e.buffer instanceof ArrayBuffer))}var p=e.exports=y,f=/\s*function\s+([^\(\s]*)\s*/;function h(e){if(s.isFunction(e)){if(u)return e.name;var t=e.toString(),n=t.match(f);return n&&n[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function b(e){if(u||!s.isFunction(e))return s.inspect(e);var t=h(e);return"[Function"+(t?": "+t:"")+"]"}function g(e){return m(b(e.actual),128)+" "+e.operator+" "+m(b(e.expected),128)}function v(e,t,n,r,i){throw new p.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function y(e,t){e||v(e,!0,t,"==",p.ok)}function S(e,t,n,r){if(e===t)return!0;
28if(o(e)&&o(t))return 0===i(e,t);if(s.isDate(e)&&s.isDate(t))return e.getTime()===t.getTime();if(s.isRegExp(e)&&s.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if((null===e||"object"!=typeof e)&&(null===t||"object"!=typeof t))return n?e===t:e==t;if(l(e)&&l(t)&&d(e)===d(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var a=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return -1!==a&&a===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),T(e,t,n,r))}function E(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function T(e,t,n,r){if(null==e||null==t)return!1;if(s.isPrimitive(e)||s.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i,o,a=E(e),u=E(t);if(a&&!u||!a&&u)return!1;if(a)return S(e=c.call(e),t=c.call(t),n);var d=x(e),l=x(t);if(d.length!==l.length)return!1;for(d.sort(),l.sort(),o=d.length-1;o>=0;o--)if(d[o]!==l[o])return!1;for(o=d.length-1;o>=0;o--)if(!S(e[i=d[o]],t[i],n,r))return!1;return!0}function C(e,t,n){S(e,t,!0)&&v(e,t,n,"notDeepStrictEqual",C)}function R(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function I(e){var t;try{e()}catch(e){t=e}return t}function _(e,t,n,r){if("function"!=typeof t)throw TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=I(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&v(i,n,"Missing expected exception"+r);var i,o="string"==typeof r,a=!e&&s.isError(i),c=!e&&i&&!n;if((a&&o&&R(i,n)||c)&&v(i,n,"Got unwanted exception"+r),e&&i&&n&&!R(i,n)||!e&&i)throw i}function w(e,t){e||v(e,!0,t,"==",w)}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=g(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=Error();if(n.stack){var r=n.stack,i=h(t),o=r.indexOf("\n"+i);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}},s.inherits(p.AssertionError,Error),p.fail=v,p.ok=y,p.equal=function(e,t,n){e!=t&&v(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&v(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){S(e,t,!1)||v(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){S(e,t,!0)||v(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){S(e,t,!1)&&v(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=C,p.strictEqual=function(e,t,n){e!==t&&v(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&v(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){_(!0,e,t,n)},p.doesNotThrow=function(e,t,n){_(!1,e,t,n)},p.ifError=function(e){if(e)throw e},p.strict=r(w,p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual}),p.strict.strict=p.strict;var x=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";let r=n(573),i=n(265),o=n(2);e.exports=e=>o.isElectron?"screen"===e||i(e):r.indexOf(e)>-1},function(e,t,n){"use strict";let r=n(268),i=n(6),o=n(1)("StreamChannel"),s=n(151)();e.exports=function(e){this.id=e.id,this.type=e.type,this.active=r(e.active),this.orientation=e.orientation||s.ROTATED_NORMAL,e.frameRate&&(this.frameRate=parseFloat(e.frameRate)),e.preferredFrameRate&&(this.preferredFrameRate=parseFloat(e.preferredFrameRate)),e.preferredWidth&&(this.preferredWidth=parseInt(e.preferredWidth,10)),e.preferredHeight&&(this.preferredHeight=parseInt(e.preferredHeight,10)),this.width=parseInt(e.width,10),this.height=parseInt(e.height,10),this.source=e.source||"camera",this.fitMode=e.fitMode||"cover",i(this),this.update=function(e){let t={},n={};for(let i in e){if(!e.hasOwnProperty(i))continue;let s=this[i];switch(i){case"active":this.active=r(e[i]);break;case"disableWarning":this.disableWarning=r(e[i]);break;case"frameRate":this.frameRate=parseFloat(e[i],10);break;case"width":case"height":this[i]=parseInt(e[i],10),t[i]=this[i],n[i]=s;break;case"orientation":this[i]=e[i],t[i]=this[i],n[i]=s;break;case"fitMode":case"source":this[i]=e[i];break;default:return o.warn(`Tried to update unknown key ${i} on ${this.type} channel ${this.id}`),!1}this.trigger("update",this,i,s,this[i])}return Object.keys(t).length&&this.trigger("update",this,"videoDimensions",n,t),!0}}},function(e,t,n){"use strict";e.exports=function(){return{ROTATED_NORMAL:0,ROTATED_LEFT:270,ROTATED_RIGHT:90,ROTATED_UPSIDE_DOWN:180}}},function(e,t,n){"use strict";let r=n(581),i=n(1)("StylableComponent"),o=n(582),s=n(583);e.exports=function(e,t,n,a){if(!e.trigger)throw Error("OT.StylableComponent is dependent on the eventing mixin. Ensure that this is included in the object before StylableComponent.");a=a||function(){};let c=!1,u=function(t,n,r){r?e.trigger("styleValueChanged",t,n,r):e.trigger("styleValueChanged",t,n)};!1===n&&(t={buttonDisplayMode:"off",nameDisplayMode:"off",audioLevelDisplayMode:"off",videoDisabledDisplayMode:"off",audioBlockedDisplayMode:"off"},c=!0,a({showControls:!1}));let d=new o(t,u);e.getStyle=function(e){return d.get(e)},e.setStyle=function(e,t,n){let o;return c?i.warn("Calling setStyle() has no effect because theshowControls option was set to false"):("string"!=typeof e?o=e:(o={})[e]=t,o.backgroundImageURI&&(o.backgroundImageURI=r(o.backgroundImageURI)),d.setAll(o,n),a(s(o))),this}}},function(e,t,n){"use strict";let r=n(50),i=n(34)(),o=n(27),s=n(72),a=n(146),c=n(61).once,u=n(586),d=n(5),l=n(1)("systemRequirements"),p=n(587),f=n(588),h=i.onlyLocal(),m=new o,b=r(()=>{m.logEvent({action:"checkSystemRequirements",variation:"notHasRequirements",partnerId:s.value,payload:{userAgent:d.env.userAgent}})}),g=r(()=>{n(589)()}),v=!1;e.exports={check(){l.debug("OT.checkSystemRequirements()");let e=Number(u&&c());return g(),e||b(),e},upgrade(e){let t=void 0===e?{}:e,n=t.isSupportedButOld,r=void 0===n?d.env.name.toLowerCase()in h.minimumVersion:n,i=t.userAgent,o=void 0===i?navigator.userAgent:i;a.onLoad(()=>{let e;if(v)return;let t=new f(p);v=!0,t.on("close",()=>{v=!1}),t.open(),e=o.match(/(iPad|iPhone|iPod|android|webOS)/i)?`${r?"supported-":""}mobile-browser`:`${r?"upgrade":"normal"}-install`,t.el(`#section-${e}`).style.display="block"})}}},function(e,t,n){"use strict";(function(t){var r=n(3),i=r(n(60)),o=r(n(590));let s=n(594),a=function(e){function t(t){var n;return(n=e.call(this,t)||this).name="TimeoutError",n}return(0,i.default)(t,e),t}((0,o.default)(Error));e.exports=(e,n,r)=>new t((t,i)=>{if("number"!=typeof n||n<0)throw TypeError("Expected `ms` to be a positive number");let o=setTimeout(()=>{if("function"==typeof r){try{t(r())}catch(e){i(e)}return}let o="string"==typeof r?r:`Promise timed out after ${n} milliseconds`,s=r instanceof Error?r:new a(o);"function"==typeof e.cancel&&e.cancel(),i(s)},n);s(e.then(t,i),()=>{clearTimeout(o)})}),e.exports.TimeoutError=a}).call(this,n(0))},function(e,t,n){"use strict";e.exports=function(){let e=[];return{add(t){e.push(t)},remove(t){let n=e.indexOf(t);n>=0&&e.splice(n,1)},releaseAll(){let t=[];for(;e.length>0;){let n=e.pop();try{n()}catch(e){t.push(e)}}let n=t.length;if(n>0)throw Error(`Failed to complete ${n} cleanup job${1===n?"":"s"}: ${t.map(e=>`<${e}>`).join(", ")}`)}}}},function(e,t,n){"use strict";let r=n(1)("applySdpTransform");e.exports=(e,t,n,i,o)=>{let s=e[t][n],a=`${t} ${n}`,c="local offer"===a||"remote answer"===a?"publisher":"subscriber",u=`sdpTransforms (${c}): ${t} ${n}`,d="local"===t?"created":"received";r.debug(`${u}: ${d}:
29${o}`);let l=s(i,o);return l.local===o?r.debug(`${u}: not modified`):r.debug(`${u}: modified to:
30${l.local}`),l}},function(e,t){e.exports=function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";e.exports=function(e){if(void 0===e&&(e={}),!e)return 0;let t=e,n=t.currentStatFrames,r=void 0===n?0:n,i=t.prevStatFrames,o=void 0===i?0:i,s=t.currentTimestamp,a=void 0===s?0:s,c=t.prevTimestamp,u=void 0===c?0:c;return r>=o&&a>
30u?Math.round((r-o)/((a-u)/1e3)*100)/100:0}},function(e,t,n){"use strict";let r;e.exports=function(e){void 0===e&&(e={});let t=e.AudioContext||window.AudioContext||window.webkitAudioContext;return function(){if(null==(r=r||t&&new t))throw Error("AudioContext could not be created, hardware limit reached.");return r}}},function(e,t,n){"use strict";var r=n(3);t.__esModule=!0,t.default=void 0;var i=r(n(57));t.default="function"==typeof(0,i.default)(window,"navigator.getDisplayMedia",(0,i.default)(window,"navigator.mediaDevices.getDisplayMedia"))},function(e,t,n){"use strict";let r=n(37);e.exports=function(){return function(e,t,n){let i=t.slice(),o=r(n),s=function(e){return -1!==i.indexOf(e)},a=function(e,t){return o[e]&&-1!==o[e].indexOf(t)};return function(t){let n=e,r=null;function i(e,i){t({message:e,newState:i,currentState:n,previousState:r})}function o(e){return s(e)?!!a(n,e)||(i(`'${n}' cannot transition to '${e}'`,e),!1):(i(`'${e}' is not a valid state`,e),!1)}this.current=n,this.set=function(e){o(e)&&(r=n,this.current=e,n=e)}}}}},function(e,t,n){"use strict";(function(t){let r=n(62);e.exports=function(e){void 0===e&&(e={});let i=e.chromeExtensionHelper||n(280)(),o=e.electronExtensionHelper||n(630)(),s=e.Errors||n(4),a=e.firefoxExtensionHelper||n(632),c=e.getDisplayMediaExtensionHelper||n(287),u=e.otError||n(11)(),d=e.OTHelpers||n(5),l={};l.extensionByKind={},l.extensionClasses={},l.registerExtensionHelper=(e,t)=>{l.extensionClasses[e]=t,t.autoRegisters&&t.isSupportedInThisBrowser&&l.registerExtension(e)},l.registerExtension=function(e){if(null==l.extensionClasses[e])throw Error("Unsupported kind passed to OT.registerScreenSharingExtension");for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let i=l.extensionClasses[e].register(...n);l.extensionByKind[e]=i};let p=()=>{let e=r(Object.keys(l.extensionClasses).sort(e=>"electron"===e?-1:1),e=>l.extensionClasses[e].isSupportedInThisBrowser);return void 0===e?{}:{name:e,proto:l.extensionClasses[e],instance:l.extensionByKind[e]}};l.pickHelper=()=>p(),l.checkCapability=e=>{let t={supported:!1,extensionRequired:void 0,extensionRegistered:void 0,extensionInstalled:void 0,supportedSources:{}},n=p();if(void 0===n.name)return void setTimeout(e.bind(null,t));if(t.supported=!0,t.extensionRequired=n.proto.extensionRequired?n.name:void 0,t.supportedSources={screen:n.proto.sources.screen,application:n.proto.sources.application,window:n.proto.sources.window,browser:n.proto.sources.browser},!n.instance){t.extensionRegistered=!1,t.extensionRequired&&(t.extensionInstalled=!1),setTimeout(e.bind(null,t));return}t.extensionRegistered=!!t.extensionRequired||void 0,n.instance.isInstalled(n=>{t.extensionInstalled=t.extensionRequired||"Firefox"===d.env.name?n:void 0,e(t)})},l.registerExtensionHelper("electron",o),l.registerExtensionHelper("getDisplayMedia",c),l.registerExtensionHelper("chrome",i),l.registerExtensionHelper("firefox",a);let f=()=>{};return l.getConstraints=e=>{let n=e.onAccessDialogOpened,r=void 0===n?f:n,i=e.onAccessDialogClosed,o=void 0===i?f:i,a=e.videoSource,c=e.constraints;return new t((e,t)=>{l.checkCapability(n=>{if(n.supported)if(!1===n.extensionRegistered)t(u(s.SCREEN_SHARING_EXTENSION_NOT_REGISTERED,Error("Screen Sharing support in this browser requires an extension, but one has not been registered.")));else if(n.extensionRequired&&!1===n.extensionInstalled)t(u(s.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,Error("Screen Sharing support in this browser requires an extension, but the extension is not installed.")));else{let n=l.pickHelper();n.proto.getConstraintsShowsPermissionUI&&r(),n.instance.getConstraints(a,c,(r,i)=>{n.proto.getConstraintsShowsPermissionUI&&o(),r?t(r):e(i)})}else{let e="Screen Sharing is not supported in this browser";d.env.isElectron?e="Set the webPreferences.contextIsolation option of the Electron BrowserWindow to false or use a preload script to access the desktop capturer. For more information, see https://tokbox.com/developer/guides/screen-sharing/js/.":"Chrome"===d.env.name&&d.env.version>73&&"https:"!==window.location.protocol&&(e="https:// is required for screen sharing"),t(u(s.SCREEN_SHARING_NOT_SUPPORTED,Error(e)))}})})},l}}).call(this,n(0))},function(e,t,n){"use strict";e.exports=function(e){void 0===e&&(e={});let t=e.Errors||n(4),r=e.ExceptionCodes||n(8),i=e.otError||n(11)(),o={ICEWorkflow:t.ICE_WORKFLOW_FAILED,NewPeerConnection:t.CREATE_PEER_CONNECTION_FAILED,SetRemoteDescription:t.SET_REMOTE_DESCRIPTION_FAILED,Subscribe:{404:t.STREAM_NOT_FOUND,[r.STREAM_LIMIT_EXCEEDED]:t.STREAM_LIMIT_EXCEEDED}};return function(e,n,s,a,c){let u=`${(s?`${s}: `:"")+c} PeerConnection with connection ${a} failed: ${n}`,d=o[s]||{},l="string"==typeof d?d:d[e],p="Publisher"===c?r.UNABLE_TO_PUBLISH:r.UNABLE_TO_SUBSCRIBE;if(!l){let e=Error(u);return e.code=p,e}let f="ICEWorkflow"===s?"Publisher"===c?r.PUBLISHER_ICE_WORKFLOW_FAILED:r.SUBSCRIBER_ICE_WORKFLOW_FAILED:l===t.STREAM_LIMIT_EXCEEDED?r.STREAM_LIMIT_EXCEEDED:p;return i(l,Error(u),f)}}},function(e,t,n){"use strict";e.exports=function(e){void 0===e&&(e={});let t=e.OTHelpers||n(5),r=(e.global||window).RTCPeerConnection;return function(e,n){"Firefox"===t.env.name&&r&&r.generateCertificate?r.generateCertificate({name:"RSASSA-PKCS1-v1_5",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])}).catch(e=>{n(e)}).then(t=>{e.certificates=[t],n(void 0,e)}):setTimeout(()=>{n(void 0,e)})}}},function(e,t,n){"use strict";var r=n(3),i=r(n(12)),o=r(n(13)),s=r(n(46)),a=r(n(18));let c=n(6),u=n(646),d=n(1)("WidgetView"),l=n(5),p=n(2),f=n(166),h=f.default,m=f.CancellationError,b=n(167),g=n(648),v=n(649),y=n(650),S=n(651),E=n(652),T=n(63),C=n(107);C(),e.exports=function(e){let t=void 0===e?{}:e,n=t.logging,r=void 0===n?d:n,f=t.OTHelpers,R=void 0===f?l:f,I=t.waitForVideoToBePlaying,_=void 0===I?v:I,w=t.VideoElementFacade,x=void 0===w?C():w,O=t.env,N=void 0===O?p:O,k=u({window:window}),Z=e=>{if(e.isCanceled())throw r.debug("bindVideo bailing due to cancellation"),new m("CANCEL")};return function(){function e(e,t){let n=void 0===t?{}:t,i=n.insertDefaultUI,o=void 0===i||i,s=n.width,u=void 0===s?264:s,d=n.height,l=void 0===d?198:d,p=n.fitMode,f=void 0===p?"cover":p,h=n.mirror,m=void 0!==h&&h,b=n.insertMode,g=n.classNames,v=n.style,C=n.widgetType;(0,a.default)(this,"_videoElementFacade",void 0),(0,a.default)(this,"_container",void 0),(0,a.default)(this,"_posterContainer",document.createElement("div")),(0,a.default)(this,"_widgetContainer",document.createElement("div")),(0,a.default)(this,"_loading",!0),(0,a.default)(this,"_audioOnly",!1),(0,a.default)(this,"_showPoster",void 0),(0,a.default)(this,"_poster",void 0),(0,a.default)(this,"_cancelBind",void 0),c(this),!1===/^(contain|cover)$/.test(f)&&r.w
30arn(`Invalid fit value "${f}" passed. Only "contain" and "cover" can be used.`),this._widgetType=C,this._fitMode=f,this._insertDefaultUI=o;let I=T(this._widgetContainer);if(I.on("click",this.userGesture.bind(this)),I.on("touchstart",this.userGesture.bind(this),!!k&&{passive:!0}),this.once("destroy",()=>I.removeAll()),this._widgetContainer.classList.add("OT_widget-container"),this._widgetContainer.style.width="100%",this._widgetContainer.style.height="100%",!1!==o){this._container=S(e,b),N.isSafari&&N.isiOS&&N.iOSVersion&&N.iOSVersion<11.2&&this._container.classList.add("OT_ForceContain"),this._container.style.width=E(u),this._container.style.height=E(l),this._container.style.overflow="hidden",y(this._container),m&&R.addClass(this._container,"OT_mirrored"),g&&g.trim().split(/\s+/).forEach(e=>this._container.classList.add(e)),this._container.classList.add("OT_loading"),this._container.classList.add(`OT_fit-mode-${f}`),this._container.appendChild(this._widgetContainer);let t=R(this._container).observeSize(()=>y(this._container))[0],n=R.observeNodeOrChildNodeRemoval(this._container,e=>{!this._videoElementFacade||e.some(e=>e===this._widgetContainer||e===this._videoElementFacade.domElement())&&this.destroyVideo()});this.once("destroy",()=>{r.debug("disconnecting observers"),t.disconnect(),n.disconnect()})}this._posterContainer.classList.add("OT_video-poster"),this._widgetContainer.appendChild(this._posterContainer);let _=document.createElement("div");_.classList.add("OT_video-loading");let w=document.createElement("div");w.classList.add("OT_video-loading-spinner"),_.appendChild(w),this._widgetContainer.appendChild(_),v&&v.backgroundImageURI&&this.setBackgroundImageURI(v.backgroundImageURI)}var t=e.prototype;return t.addError=function(e,t,n){this._container&&(this._container.innerHTML=`<p>${e}${t?` <span class="ot-help-message">${t}</span>`:""}</p>`,R.addClass(this._container,n||"OT_subscriber_error"),this._container.querySelector("p").offsetHeight>this._container.offsetHeight&&(this._container.querySelector("span").style.display="none"))},t.destroy=function(){this.emit("destroy"),this.destroyVideo(),this._container&&(R.removeElement(this._container),this._container=null)},t.setBackgroundImageURI=function(e){R.css(this._posterContainer,"backgroundImage",`url(${e})`),R.css(this._posterContainer,"backgroundSize","contain"),R.css(this._posterContainer,"opacity","1.0")},t.isAudioBlocked=function(){return!!(this._videoElementFacade&&this._videoElementFacade.isAudioBlocked())},t.unblockAudio=function(){return this._videoElementFacade.unblockAudio()},t.userGesture=function(){this.isAudioBlocked()&&b().then(()=>r.debug("Successfully unblocked audio"),e=>r.error("Error retrying audio on user interaction:",e))},t.setAudioBlockedUi=function(e){this._container&&(e?this._container.classList.add("OT_container-audio-blocked"):this._container.classList.remove("OT_container-audio-blocked"))},t.rebindSrcObject=function(){this._videoElementFacade&&this._videoElementFacade._rebindSrcObject()},t.pauseAndPlayVideoElement=function(){this._videoElementFacade&&this._videoElementFacade._pauseAndPlay()},t._createVideoElementFacade=function(e){let t=e._inject,n=e.audioVolume,i=e.fallbackText,o=e.muted;this._videoElementFacade=new x({defaultAudioVolume:parseFloat(n),fallbackText:i,fitMode:this._fitMode,_inject:t,muted:o,widgetType:this._widgetType});let s=T(this._videoElementFacade);if(this._videoFacadeEvents=s,s.on("error",()=>{this.trigger("error")}),s.on("videoDimensionsChanged",(e,t)=>{this.trigger("videoDimensionsChanged",e,t)}),s.on("mediaStopped",e=>{this.trigger("mediaStopped",e)}),s.on("audioBlocked",()=>this.trigger("audioBlocked")),s.on("audioUnblocked",()=>this.trigger("audioUnblocked")),this._videoElementFacade.audioChannelType("telephony"),r.debug("Appending the video facade"),this._videoElementFacade.appendTo(this._widgetContainer),void 0!==n)try{this._videoElementFacade.setAudioVolume(n)}catch(e){r.warn(`bindVideo ${e}`)}},t._bindToStream=function(){var e=(0,o.default)(i.default.mark(function e(t,n){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._videoElementFacade.bindToStream(t);case 3:e.next=14;break;
30case 5:if(e.prev=5,e.t0=e.catch(0),!n.isCanceled()){e.next=12;break}throw r.debug("Refusing to destroyVideo as bindVideo was cancelled"),new m("CANCEL");case 12:throw this.destroyVideo(),e.t0;case 14:case"end":return e.stop()}},e,this,[[0,5]])}));return function(t,n){return e.apply(this,arguments)}}(),t._getNewBindCancellation=function(){this._cancelBind&&(r.debug("Cancelling last bindVideo request"),this._cancelBind.cancel());let e=new h;return this._cancelBind=e,this.once("destroy",()=>e.cancel()),e},t._triggerVideoElementCreated=function(){let e=e=>{this.trigger("videoElementCreated",e),this._insertDefaultUI&&R.addClass(e,"OT_video-element")};this._videoElementFacade.domElement()?e(this._videoElementFacade.domElement()):this._videoFacadeEvents.on("videoElementCreated",t=>{e(t)})},t._waitForVideoResolution=function(){var e=(0,o.default)(i.default.mark(function e(t){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!(this.audioOnly()&&"subscriber"===this._widgetType)&&t.getVideoTracks().length>0)){e.next=6;break}return r.debug("Waiting for correct resolution"),e.next=5,g(this._videoElementFacade,5e3);case 5:r.debug(`Resolution: ${this._videoElementFacade.videoWidth()}x${this._videoElementFacade.videoHeight()}`);case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.bindVideo=function(){var e=(0,o.default)(i.default.mark(function e(t,n){var o,s,a,c,u,d,l;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.audioVolume,s=n.muted,a=n.fallbackText,c=n._inject,r.debug("bindVideo ",{webRTCStream:t}),u=!!this._videoElementFacade,d=this._getNewBindCancellation(),u||this._createVideoElementFacade({_inject:c,audioVolume:o,fallbackText:a,muted:s}),e.next=7,this._bindToStream(t,d);case 7:return u||this._triggerVideoElementCreated(),Z(d),l=_(this._videoElementFacade,5e3),e.next=12,this._waitForVideoResolution(t);case 12:return r.debug("Waiting for video to be playing"),e.next=15,l;case 15:r.debug("Video is playing"),Z(d);case 17:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),t.bindAudioTrackOnly=function(){this._videoElementFacade&&this._videoElementFacade.bindAudioTrackOnly()},t.destroyVideo=function(){this._videoElementFacade&&(this._videoElementFacade.destroy(),this._videoElementFacade=null)},t.video=function(){return this._videoElementFacade},t.showPoster=function(e){return void 0===e?!R.isDisplayNone(this._posterContainer):(this._showPoster=e,R[e?"show":"hide"](this._posterContainer),this.showPoster())},t.poster=function(e){return void 0===e?R.css(this._posterContainer,"backgroundImage"):(this._poster=e,R.css(this._posterContainer,"backgroundImage",`url(${e})`),this.poster())},t.loading=function(e){return void 0===e?this._loading:(this._loading=!!e,this._container&&this._container.classList[e?"add":"remove"]("OT_loading"),this.loading())},t.audioOnly=function(e){return void 0===e?this._audioOnly:(this._audioOnly=e,this._container&&this._container.classList[e?"add":"remove"]("OT_audio-only"),this.audioOnly())},t.domId=function(){return this._container&&this._container.getAttribute("id")},t.setSinkId=function(e){if(this._videoElementFacade)return this._videoElementFacade.setSinkId(e)},(0,s.default)(e,[{key:"domElement",get:function(){return this._container}},{key:"videoElement",get:function(){return this._videoElementFacade&&this._videoElementFacade.domElement()||void 0}},{key:"width",get:function(){return this.videoElement&&this.videoElement.offsetWidth}},{key:"height",get:function(){return this.videoElement&&this.videoElement.offsetHeight}}]),e}()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationError=t.default=void 0;var r=o(n(647)),i=o(n(298));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,t.CancellationError=i.default},function(e,t,n){"use strict";(function(t){let r=n(21);e.exports=()=>t.all(r.subscribers.where().map(e=>{if(e.isAudioBlocked())return e._.unblockAudio()}))}).call(this,n(0))},function(e,t,n){"use strict";e.exports=e=>"P2P"===e?"RELAYED":"ROUTED"},function(e,t,n){"use strict";(function(t){var r=n(3),i=r(n(12)),o=r(n(13)),s=r(n(20));let a=n(57),c=n(148),u=n(7),d=n(56),l=n(62),p=n(275),f=n(48),h=n(50),m=n(666),b=n(19),g=n(259),v=n(195),y=n(166),S=y.CancellationError,E=y.default,T=n(2),C=n(676),R=n(307),I=n(75),_=n(26),w=n(6),x=n(106),O=n(126),N=n(27),k=n(74),Z=n(155),A=n(677),L=n(165)(),V=n(678),W=n(679),G=n(167),P=n(24)().getInputMediaDevices,M=n(680),D=n(269),X=n(306),j=n(681),U=n(682),F=n(290),Y=F.setVideoContentHint,B=F.getVideoContentHint,H=n(168),J=3e3,K=3e4;e.exports=function(e){void 0===e&&(e={});let r=e,y=(0,s.default)({},r);
30["processPubOptions"].forEach(e=>{c(y[e],`${e} dependency must be injected into Publisher`)});let F=y.AnalyticsHelper||N,z=y.calculateCapableSimulcastStreams||n(253),Q=y.createChromeMixin||n(281)(),$=y.deviceHelpers||n(24)(),q=y.EnvironmentLoader||n(146),ee=y.Errors||n(4),et=y.Events||n(23)(),en=y.ExceptionCodes||n(8),er=y.interpretPeerConnectionError||n(163)(),ei=y.IntervalRunner||k,eo=y.logging||n(1)("Publisher"),es=y.Microphone||n(291)(),ea=y.otError||n(11)(),ec=y.OTErrorClass||n(22),eu=y.OTHelpers||n(5),ed=y.parseIceServers||n(100).parseIceServers,el=y.PUBLISH_MAX_DELAY||n(267),ep=y.PublisherPeerConnection||n(295)(),ef=y.PublishingState||n(297)(),eh=y.StreamChannel||n(150),em=y.systemRequirements||n(153),eb=y.VideoOrientation||n(151)(),eg=y.WidgetView||L,ev=y.global||window,ey=y.createSendMethod||n(304),eS=y.setEncodersActiveState||C,eE=y.MediaProcessor||n(683),eT=y.processPubOptions;return function(e){let n,r,c,y,C,N,k,L,eC,eR,eI,e_,ew,ex,eO,eN,ek,eZ,eA,eL,eV,eW;var eG=this;void 0===e&&(e={});let eP=w({}),eM=new v,eD=e=>eM.get(e),eX=(e,t)=>eM.set(e,t);w(this);let ej=Z(),eU=new F;em.check()||em.upgrade();let eF=!1,eY={},eB={},eH=5e3,eJ=()=>this.session||eZ||{isConnected:()=>!1},eK=[],ez=new eE;function eQ(){return{connectionId:eJ().isConnected()?eJ().connection.connectionId:null,streamId:r,widgetType:"Publisher"}}this.once("publishComplete",e=>{if(!e){var t;eF=!0,ew=(null==(t=this.session)?void 0:t.sessionInfo.p2pEnabled)?"P2P":"MANTIS"}}),this.on("sourceStreamIdChanged",e=>{ew=e}),this.on("audioAcquisitionProblem",e=>{let t=e.method;td("publisher:audioAcquisitionProblem","Event",{didPublishComplete:eF,method:t})});let e$=e=>{let t=ea(Object.keys(ee).map(e=>ee[e]).indexOf(e.name)>-1?e.name:ee.MEDIA_ERR_ABORTED,e,en.UNABLE_TO_PUBLISH);eo.error(`onStreamAvailableError ${t.name}: ${t.message}`),N.set("Failed"),n&&(n.destroy(),n=null);let r={failureReason:"GetUserMedia",failureCode:en.UNABLE_TO_PUBLISH,failureMessage:`OT.Publisher failed to access camera/mic: ${t.message}`};tl("Failure",{},r),ec.handleJsException({error:t,errorMsg:r.failureReason,code:r.failureCode,target:this,analytics:eU}),this.trigger("publishComplete",t)},eq=e=>{let t=d(e);t.code=en.UNABLE_TO_PUBLISH,eo.error(`OT.Publisher.onScreenSharingError ${t.message}`),N.set("Failed"),t.message=`Screensharing: ${t.message}`,this.trigger("publishComplete",t),tl("Failure",{},{failureReason:"ScreenSharing",failureMessage:t.message}),n&&(n.destroy(),n=null)},e0=e=>{let t,r=d(e);try{t=window.self!==window.top}catch(e){}"https:"!==window.location.protocol&&(tt?r.message+=" Note: https:// is required for screen sharing.":D()&&"localhost"!==eu.env.hostName&&(r.message+=` Note: ${eu.env.name} requires HTTPS for camera and microphone access.`)),t&&!tt&&(r.message+=" Note: Check that the iframe has the allow attribute for camera and microphone"),eo.error(r.message),N.set("Failed"),r.message=`OT.Publisher Access Denied: Permission Denied: ${r.message}`,r.code=en.UNABLE_TO_PUBLISH,n&&(n.destroy(),n=null),tl("Cancel",{reason:"AccessDenied"}),this.trigger("publishComplete",r),this.dispatchEvent(new O(_.ACCESS_DENIED))},e1=e=>{throw e.name===ee.USER_MEDIA_ACCESS_DENIED||e.name===ee.NOT_SUPPORTED&&e.originalMessage.match(/Only secure origins/)?e0(e):eT.isScreenSharing?eq(e):e$(e),e},e2=()=>{td("accessDialog","Opened"),this.dispatchEvent(new O(_.ACCESS_DIALOG_OPENED,!0))},e3=()=>{td("accessDialog","Closed"),this.dispatchEvent(new O(_.ACCESS_DIALOG_CLOSED,!1))},e5=b(),e9={},e4=!1,e6={},e8=!1,e7=eT(e,"OT.Publisher",()=>N&&N.isDestroyed());e7.on({accessDialogOpened:e2,accessDialogClosed:e3});let te=e7,tt=te.isScreenSharing,tn=te.isCustomAudioTrack,tr=te.isCustomVideoTrack,ti=te.shouldAllowAudio,to=te.properties,ts=te.getUserMedia;function ta(e){e.forEach(e=>e())}Object.defineProperty(this,"loudness",{writable:!1,value:void 0,configurable:!0});let tc=(e,t,n)=>e.addEventListener?(e.addEventListener(t,n),()=>e.removeEventListener(t,n)):()=>{};(function(){let e=[];eP.on("streamDestroy",()=>ta(e)),eP.on("streamChange",()=>{ta(e);let t=c.getAudioTracks().map(e=>tc(e,"ended",()=>{e8=!0,this.trigger("audioAcquisitionProblem",{method:"trackEndedEvent"})}));e.splice(0,e.length,...t)})}).call(this),function(){let e=[];eP.on("streamDestroy",()=>ta(e)),eP.on("streamChange",()=>
30{ta(e),tu()||c.getTracks().forEach(t=>{t.addEventListener&&(e.push(tc(t,"mute",()=>{tK()})),e.push(tc(t,"unmute",()=>{tK()})))})})}();let tu=()=>{if(tt)return!0;let e=["text","detail"].includes(to.videoContentHint);return tr&&e},td=e.logAnalyticsEvent||((e,t,n,r,i)=>{let o=u({action:e,variation:t,payload:n},eQ(),r);"Failure"===t&&(o=u(e6,o)),e6=f(o,"sessionId","connectionId","partnerId"),eU.logEvent(o,i)}),tl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),"Non-fatal"!==n.failureReason&&("Attempt"===e&&(L=new Date().getTime(),ek&&(ek.stop(),eo.error("_connectivityAttemptPinger should have been cleaned up")),ek=new ei(()=>{td("Publish","Attempting",t,(0,s.default)({},eQ(),n))},.2,6)),"Failure"===e||"Success"===e||"Cancel"===e?(ek?(ek.stop(),ek=void 0):eo.warn(`Received connectivity event: "${e}" without "Attempt"`),td("Publish",e,(0,s.default)({videoInputDevices:eR,audioInputDevices:eC,videoInputDeviceCount:eR?eR.length:void 0,audioInputDeviceCount:eC?eC.length:void 0,selectedVideoInputDeviceId:eI,selectedAudioInputDeviceId:e_},t),(0,s.default)({attemptDuration:new Date().getTime()-L},n))):td("Publish",e,t,n))},tp=(e,t)=>{td("ICERestart",e,t)},tf=(e,t,n)=>{"Attempt"===t?(eY[e]=new Date().getTime(),td(e,t,n)):("Failure"===t||"Success"===t)&&td(e,t,n,{attemptDuration:new Date().getTime()-eY[e]})},th=function(e,t){void 0===t&&(t={}),tf("RoutedToRelayedTransition",e,t)},tm=function(e,t){void 0===t&&(t={}),tf("RelayedToRoutedTransition",e,t)},tb=h(()=>{td("GetStats","Called")}),tg=h(()=>{td("GetRtcStatsReport","Called")}),tv=t=>{let i=t.parsedStats,o=t.simulcastEnabled,s=t.remoteConnectionId,a=t.peerId,d=t.sourceStreamId,l={peerId:a,widgetType:"Publisher",connectionId:this.session&&this.session.isConnected()?this.session.connection.connectionId:null,streamId:r,width:n.width,height:n.height,audioTrack:c&&c.getAudioTracks().length>0,hasAudio:tJ(),publishAudio:to.publishAudio,videoTrack:c&&c.getVideoTracks().length>0,hasVideo:tH(),publishVideo:to.publishVideo,audioSource:tn?"Custom"
30:void 0,duration:y?Math.round((new Date().getTime()-y.getTime())/1e3):0,remoteConnectionId:s,scalableVideo:o,sourceStreamId:H(d)},f=tt&&tr&&"Screen"||tt&&e.videoSource||tr&&"Custom"||to.constraints.video&&"Camera"||null;p(f)&&(f=m(f)),l.videoSource=f;let h=u({},l,i,{videoWidth:this.videoWidth(),videoHeight:this.videoHeight()});eU.logQOS(h),this.trigger("qos",h)},ty=()=>{let e,t,r=n&&n.video();return to.videoDimensions?(e=Math.min(to.videoDimensions.width,r&&r.videoWidth()||640),t=Math.min(to.videoDimensions.height,r&&r.videoHeight()||480)):(e=r&&r.videoWidth()||640,t=r&&r.videoHeight()||480),{width:e,height:t}},tS=e=>{eo.error("OT.Publisher State Change Failed: ",e.message),eo.debug(e)},tE=()=>{if(N.isDestroyed()){n&&n.destroyVideo();return}eo.debug("OT.Publisher.onLoaded; resolution:",`${this.videoWidth()}x${this.videoHeight()}`),N.set("MediaBound"),G().catch(eo.error),n.loading(!!this.session&&!this.stream),e4=!0},tT=e=>{let t=ea(ee.CONNECT_FAILED,e,en.P2P_CONNECTION_FAILED);t.message=`OT.Publisher PeerConnection Error: ${t.message}`,tl("Failure",{},{failureReason:"PeerConnectionError",failureCode:t.code,failureMessage:t.message}),N.set("Failed"),this.trigger("publishComplete",t),ec.handleJsException({error:t,target:this,analytics:eU})},tC=()=>{c&&(eP.emit("streamDestroy"),ev.MediaStreamTrack&&ev.MediaStreamTrack.prototype.stop?c.getTracks().forEach(e=>e.stop()):c.stop())},tR=()=>{let e=T.isiOS&&T.iOSVersion>=15,t=c.getVideoTracks()[0];if(!e||!t)return;let r=()=>{!document.hidden&&n&&n.rebindSrcObject()};document.addEventListener("visibilitychange",r)},tI=()=>{let e=T.isiOS&&T.iOSVersion>=13.3,t=c.getAudioTracks()[0];e&&t&&(t.onmute=()=>nd(t),t.onunmute=()=>nl(t))},t_=function(){var e=(0,o.default)(i.default.mark(function e(){var t;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t={muted:!0},n){e.next=3;break}throw Error("Cannot bind video after widget view has been destroyed");case 3:return e.abrupt("return",n.bindVideo(c,t));case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),tw=function(){var e=(0,o.default)(i.default.mark(function e(t){var n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(eo.debug("OT.Publisher.onStreamAvailable"),N.set("BindingMedia"),void 0!==to.videoContentHint&&Y(t,to.videoContentHint),tC(),c=t,!to.videoFilter){e.next=14;break}return e.prev=6,e.next=9,eG.applyVideoFilter(to.videoFilter);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),eo.error(`Error applying video filter: ${e.t0}`);case 14:eP.emit("streamChange"),tI(),tR(),eI=(n=(e,t)=>{let n;return e.forEach(e=>{if(e.deviceId)n=e.deviceId.toString();else if(e.label&&t){let r=l(t,t=>t.label===e.label);r&&(n=r.deviceId)}}),n})(c.getVideoTracks(),eR),e_=n(c.getAudioTracks(),eC),C=new es(c,!to.publishAudio),t7(),t6(),eG.accessAllowed=!0,eG.dispatchEvent(new O(_.ACCESS_ALLOWED,!1));case 25:case"end":return e.stop()}},e,null,[[6,11]])}));return function(t){return e.apply(this,arguments)}}(),tx=e=>{let t,n;eo.error("OT.Publisher.onPublishingTimeout"),e8?(t=ee.CHROME_MICROPHONE_ACQUISITION_ERROR,n="Unable to publish because your browser failed to get access to your microphone. You may need to fully quit and restart your browser to get it to work. See https://bugs.chromium.org/p/webrtc/issues/detail?id=4799 for more details."):(t=ee.TIMEOUT,n="Could not publish in a reasonable amount of time");let r={failureReason:"ICEWorkflow",failureCode:en.UNABLE_TO_PUBLISH,failureMessage:"OT.Publisher failed to publish in a reasonable amount of time (timeout)"};tl("Failure",{},r),ec.handleJsException({errorMsg:r.failureReason,code:r.failureCode,target:this,analytics:eU}),e.isConnected()&&this.streamId&&e._.streamDestroy(this.streamId),this.disconnect(),this.session=null,N.isDestroyed()||N.set("MediaBound"),this.trigger("publishComplete",ea(t,Error(n),en.UNABLE_TO_PUBLISH))},tO=e=>{let t=ea(ee.MEDIA_ERR_DECODE,e,en.UNABLE_TO_PUBLISH);t.message=`OT.Publisher while playing stream: ${t.message}`,eo.error("OT.Publisher.onVideoError:",t),td("stream",null,{reason:t.message});let n=N.isAttemptingToPublish();N.set("Failed"),n?this.trigger("publishComplete",t):this.trigger("error",t.message),ec.handleJsException({error:t,target:this,analytics:eU})};this._setWebRTCStream=e=>{c=e},this._setCurrentVideoFilter=e=>{eV=e},this._getCurrentVideoFilter=()=>eV,this._removePeerConnection=e=>{let t=eD(e).peerConnectionId;delete e9[t],e.destroy()},this._removeSubscriber=e=>{this.session.sessionInfo.isAdaptiveEnabled&&"P2P"===ew&&this._.startRelayedToRoutedTransition(),tD(e).then(e=>
30{e.forEach(e=>this._removePeerConnection(e))})};let tN=e=>{let t=eD(e),n=t.remoteSubscriberId,r=t.peerConnectionId;eo.debug("Subscriber has been disconnected from the Publisher's PeerConnection"),td("disconnect","PeerConnection",{subscriberConnection:r}),this._removeSubscriber(n)},tk=function(){var e=(0,o.default)(i.default.mark(function e(t,n){var r,o,s,a,c,u,d,l,p,f;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.reason,o=n.prefix,s=eG.session&&eG.session.sessionInfo,!("ICEWorkflow"===o&&s&&s.reconnection&&e4)){e.next=5;break}return eo.debug("Ignoring peer connection failure due to possibility of reconnection."),e.abrupt("return");case 5:return u=void 0===(c=(a=eD(t)||{}).remoteConnectionId)?"(not found)":c,d=a.peerConnectionId,l=er(void 0,r,o,u,"Publisher"),p={hasRelayCandidates:t&&t.hasRelayCandidates()},f={failureReason:o||"PeerConnectionError",failureCode:l.code,failureMessage:l.message},N.isPublishing()?f.reason="Non-fatal":eG.trigger("publishComplete",l),tl("Failure",p,f),ec.handleJsException({errorMsg:`OT.Publisher PeerConnection Error: ${r}`,code:l.code,target:eG,analytics:eU}),e.next=14,e9[d];case 14:e.sent.destroy(),delete e9[d];case 17:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),tZ=e=>this.session.sessionInfo.isAdaptiveEnabled&&"P2P"===e.getSourceStreamId(),tA=e=>{tp("Success",{remoteConnectionId:eD(e).remoteConnectionId})},tL=e=>{tp("Failure",{reason:"ICEWorkflow",message:"OT.Publisher PeerConnection Error: The stream was unable to connect due to a network error. Make sure your connection isn't blocked by a firewall.",remoteConnectionId:eD(e).remoteConnectionId})},tV=function(){var e=(0,o.default)(i.default.mark(function e(t,n){var r,o,s,a,c;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=eG.session.sessionInfo.isAdaptiveEnabled,eB[o=n.getSourceStreamId()]=t,"disconnected"===t&&setTimeout(()=>{let e=eG.session._.isSocketReconnecting,t=eG.session._.getSocket().is("connected")&&!e();"disconnected"===eB[o]&&t&&(tp("Attempt",{remoteConnectionId:eD(n).remoteConnectionId}),n.iceRestart())},2e3),"connected"!==t||(clearTimeout(eN),!r)){e.next=14;break}return e.next=9,tU();case 9:return s=e.sent.iceConnectionStateIsConnected(),e.next=12,tF();case 12:a=e.sent.iceConnectionStateIsConnected(),s&&a&&t0();case 14:if("failed"!==t){e.next=21;break}if(c=eG.session._.isSocketReconnecting,eG.session._.getSocket().is("connected")&&!c()){e.next=20;break}return e.abrupt("return");case 20:r&&o===ew&&"P2P"===o?eG._.startRelayedToRoutedTransition():eN=setTimeout(()=>{eG.session._.streamDestroy(eG.streamId,o)},eH);case 21:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),tW=e=>{tZ(e)&&th("Success")},tG=e=>{if("PublishingToSession"!==N.current)throw Error("assignStream called when publisher is not successfully publishing");ej.releaseAll(),this.stream=e,this.stream.on("destroyed",this.disconnect,this),ej.add(()=>{this.stream&&this.stream.off("destroyed",this.disconnect,this)}),N.set("Publishing"),n.loading(!e4),y=new Date,this.dispatchEvent(new et.StreamEvent("streamCreated",e,null,!1)),tl("Success"),this.trigger("publishComplete",null,this)},tP=n=>{let r=n.peerConnectionId,i=n.send,o=n.log,s=n.logQoS,a=n.sourceStreamId;if(tX(r))return t.reject(Error("PeerConnection already exists"));let u=z({isChromiumEdge:eu.env.isChromiumEdge,browserName:eu.env.name,isScreenSharing:tt,isCustomVideoTrack:tr,sessionInfo:this.session.sessionInfo,constraints:to.constraints,videoDimensions:ty(),capableSimulcastScreenshare:to.capableSimulcastScreenshare});return e9[r]=t.all([this.session._.getIceConfig(),this.session._.getVideoCodecsCompatible(c)]).then(n=>{let r=n[0],d=n[1],l=c;if(!d){let e=(l=c.clone()).getVideoTracks()[0];e&&(e.stop(),l.removeTrack(e))}let p=new ep({iceConfig:r,sendMessage:(e,t)=>{"offer"===e&&this.trigger("connected"),i(e,t)},webRTCStream:l,channels:to.channels,capableSimulcastStreams:u,overrideSimulcastEnabled:e._enableSimulcast,logAnalyticsEvent:o,offerOverrides:{enableDtx:to.enableDtx,enableStereo:to.enableStereo,audioBitrate:to.audioBitrate,priorityVideoCodec:to._priorityVideoCodec||this.session.sessionInfo.priorityVideoCodec,codecFlags:to._codecFlags||this.session._.getCodecFlags()},answerOverrides:this.session.sessionInfo.p2pEnabled?void 0:{audioBitrate:to.audioBitrate},sourceStreamId:a,isP2pEnabled:this.session.sessionInfo.p2pEnabled});return p.on({disconnected:()=>tN(p),error:e=>tk(p,{reason:e.reason,prefix:e.prefix}),qos:s,iceRestartSuccess:()=>tA(p),iceRestartFailure:()=>tL(p),iceConnectionStateChange:e=>tV(e,p),audioAcquisitionProblem:()=>{e8=!0,this.trigger("audioAcquisitionProblem",{method:"getStats"})}}),p.once("connected",()=>tW(p)),new t((e,t)=>
30{let n=e=>{t(e)};p.once("error",n),p.init(k,r=>{if(r)return t(r);p.off("error",n),e(p)})})}),tX(r)},tM=()=>t.all(Object.keys(e9).map(tX)),tD=e=>tM().then(t=>t.filter(t=>eD(t).remoteSubscriberId===e)),tX=e=>e9[e],tj=e=>{let t=Object.keys(e9).find(t=>t.endsWith(`~${e}`));return e9[t]},tU=()=>tj("MANTIS"),tF=()=>tj("P2P"),tY=Q(this,{name:to.name,publishAudio:to.publishAudio,publishVideo:to.publishVideo,audioSource:to.audioSource,showControls:to.showControls,shouldAllowAudio:ti,logAnalyticsEvent:td}),tB=()=>{this.off("publishComplete",tK),tY&&tY.reset(),ej.releaseAll(),this.disconnect(),C=null,tC(),c=null,n&&(n.destroy(),n=null),this.session&&this._.unpublishFromSession(this.session,"reset"),this.id=null,this.stream=null,e4=!1,this.session=null,N.isDestroyed()||N.set("NotPublishing")},tH=()=>{if(!c||0===c.getVideoTracks().length)return!1;let e=["text","detail"].includes(to.videoContentHint),t=tr&&e,n=eu.env.isChrome&&(tt||t);return c.getVideoTracks().reduce((e,t)=>e&&(!t.muted||!!n)&&t.enabled&&"ended"!==t.readyState,to.publishVideo)},tJ=()=>!!c&&0!==c.getAudioTracks().length&&c.getAudioTracks().length>0&&c.getAudioTracks().reduce((e,t)=>e&&!t.muted&&t.enabled&&"ended"!==t.readyState,to.publishAudio),tK=e=>{n&&(n.audioOnly(!tH()),n.showPoster(!tH())),tY&&tY.setAudioOnly(!tH()&&tJ()),this.stream?(this.stream.setChannelActiveState("audio",tJ(),e),this.stream.setChannelActiveState("video",tH(),e)):this.once("publishComplete",tK)},tz=(e,n)=>{let r=!1;if("function"==typeof e?n=e:r="rtcStatsReport"===e,r?tg():tb(),r&&!X){let e=en.GET_RTC_STATS_REPORT_NOT_SUPPORTED;n(ea(ee.GET_RTC_STATS_REPORT_NOT_SUPPORTED,Error(ec.getTitleByCode(e)),e));return}tM().then(e=>{if(0===e.length){let e=en.PEER_CONNECTION_NOT_CONNECTED;throw ea(ee.PEER_CONNECTION_NOT_CONNECTED,Error(ec.getTitleByCode(e)),e)}return e}).then(e=>this.session.sessionInfo.isAdaptiveEnabled?e.filter(e=>e.getSourceStreamId()===ew):e).then(e=>t.all(e.map(e=>(r?R(e.getRtcStatsReport.bind(e)):R(e.getStats.bind(e)))().then(t=>({pc:e,stats:t}))))).then(e=>{let t=y?y.getTime():Date.now(),i=e.map(e=>{let n=e.pc,i=e.stats,o=eD(n),s=o.remoteConnectionId,a=o.remoteSubscriberId;return u(s.match(/^symphony\./)?{}:{subscriberId:a,connectionId:s},r?{rtcStatsReport:i}:{stats:I.normalizeStats(i,!1,t)})});n(null,i)}).catch(n)},tQ=e=>tz(e),t$=e=>tz("rtcStatsReport",e),tq=(e,t)=>{this.session._.streamCreate(to.name||"",this.streamId,to.audioFallbackEnabled,eK,to.minVideoBitrate,e,t)},t0=function(){var e=(0,o.default)(i.default.mark(function e(){var t;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return eO=!1,e.next=3,tU();case 3:if(!(t=e.sent)){e.next=16;break}return eG.trigger("sourceStreamIdChanged","P2P"),e.next=8,x(J);case 8:if(!eO){e.next=11;break}return eo.debug("Cancelling stop sending RTP to MANTIS."),e.abrupt("return");case 11:return e.next=13,t.changeMediaDirectionToInactive();case 13:if(!(eu.env.isFirefox&&eu.env.version<96)){e.next=16;break}return e.next=16,t2();case 16:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),t1=function(){var e=(0,o.default)(i.default.mark(function e(){var t;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return eO=!0,e.next=3,tU();case 3:if(!(t=e.sent)){e.next=9;break}return e.next=7,t.changeMediaDirectionToRecvOnly();case 7:ex&&clearTimeout(ex),eG.trigger("sourceStreamIdChanged","MANTIS");case 9:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),t2=function(){var e=(0,o.default)(i.default.mark(function e(){var t;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tU();case 2:(t=e.sent)&&(ex=setTimeout((0,o.default)(i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("P2P"!==ew){e.next=9;break}return e.next=3,t.changeMediaDirectionToRecvOnly();case 3:return e.next=5,x(J);case 5:return e.next=7,t.changeMediaDirectionToInactive();case 7:return e.next=9,t2();case 9:case"end":return e.stop()}},e)})),K));case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();this.publish=e=>(eo.debug("OT.Publisher: publish"),(N.isAttemptingToPublish()||N.isPublishing())&&tB(),N.set("GetUserMedia"),to.style&&this.setStyle(to.style,null,!0),to.classNames="OT_root OT_publisher",q.onLoad(()=>{eo.debug("OT.Publisher: publish: environment loaded"),n=new eg(e,(0,s.default)({},to,{widgetType:"publisher"})),ti&&V({publisher:this,widgetView:n}),n.on("error",tO),this.id=n.domId(),this.element=n.domElement,this.element&&tY&&tY.init(n),n.on("videoDimensionsChanged",(e,t)=>{this.stream&&this.stream.setVideoDimensions(t.width,t.height),this.dispatchEvent(new et.VideoDimensionsChangedEvent(this,e,t))}),n.on("mediaStopped",e=>{let t=new et.MediaStoppedEvent(this,e);
30if(this.dispatchEvent(t),!t.isDefaultPrevented()){if(e){let t=String(e.kind).toLowerCase();"audio"===t?t6():"video"===t?t7():eo.warn(`Track with invalid kind has ended: ${e.kind}`);return}this.session?this._.unpublishFromSession(this.session,"mediaStopped"):this.destroy("mediaStopped")}}),n.on("videoElementCreated",e=>{let t=new et.VideoElementCreatedEvent(e);this.dispatchEvent(t)}),ts().catch(e1).then(function(){var e=(0,o.default)(i.default.mark(function e(t){var n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return eC=e7.audioDevices,eR=e7.videoDevices,(n=!!to.videoFilter)&&(eL=j(t,eR)),e.next=6,tw(t);case 6:return to.publishVideo||eG._toggleVideo(to.publishVideo),tt||tr||n||(eL=j(t,eR)),e.abrupt("return",t_().catch(e=>{if(!(e instanceof S))throw e}).then(()=>{tE(),N.isDestroyed()||(eG.trigger("initSuccess"),eG.trigger("loaded",eG))},e=>{eo.error(`OT.Publisher.publish failed to bind video: ${e}`),tT(e)}));case 9:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())}),this),this._setScalableValues=function(){var e=(0,o.default)(i.default.mark(function e(t,n){var r,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tM().then(e=>e[0].getSenders().filter(e=>"video"===e.track.kind));
30case 2:return(o=(r=e.sent[0]).getParameters()).encodings.forEach((e,r)=>{e[t]=n[r]}),e.next=8,r.setParameters(o);case 8:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),this._setScalableFramerates=function(){var e=(0,o.default)(i.default.mark(function e(t){var n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!((n=t9(t))&&t3(n))){e.next=4;break}return e.next=4,eG._setScalableValues("maxFramerate",n);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),this._setScalableVideoLayers=function(){var e=(0,o.default)(i.default.mark(function e(t){var n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!((n=t9(t))&&t5(n))){e.next=4;break}return e.next=4,eG._setScalableValues("scaleResolutionDownBy",n);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();let t3=e=>{let t=0;return e.every(e=>(15===e||30===e)&&!(e<t)&&(t=e,!0))},t5=e=>{let t=17;return e.every(e=>!(e<1)&&!(e>=t)&&(t=e,!0))},t9=e=>{let t;if("string"!=typeof e)return t;let n=e.split(":");return 0===n.length||n.length>3||!n.every(e=>!isNaN(e))?t:t=n.map(e=>parseInt(e,10)).reverse()},t4=e=>c&&c[`get${g(e)}Tracks`]().length>0&&c[`get${g(e)}Tracks`]().every(e=>"ended"!==e.readyState),t6=e=>{let t=t4("audio")&&to.publishAudio;tY&&tY.setMuted(!t),C&&C.muted(!t),tK(e)};this.publishAudio=e=>{td("publishAudio","Attempt",{publishAudio:e}),to.publishAudio=e;try{t6(),td("publishAudio","Success",{publishAudio:e})}catch(e){td("publishAudio","Failure",{message:e.message})}return this};let t8=!1,t7=()=>{let e=t4("video")&&to.publishVideo;"Chrome"===T.name&&T.version>=69&&(0,o.default)(i.default.mark(function t(){var n,r;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return eA&&eA.cancel(),n=eA=new E,t.next=5,tM();case 5:r=t.sent,n.isCanceled()||r.forEach(t=>{eS(t,e)});case 7:case"end":return t.stop()}},t)}))(),c&&c.getVideoTracks().forEach(t=>{t.enabled=e,t.isCreatedCanvas&&(t.enabled=!1)}),tK()},ne=function(){var e=(0,o.default)(i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return ez.getOriginalVideoTrack().stop(),e.next=3,ez.destroy();case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();this._toggleVideo=W(function(){var e=(0,o.default)(i.default.mark(function e(t){var n,r,o,s,a,u,d;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(tt||tr||t8)){e.next=2;break}return e.abrupt("return");case 2:if(n=ns()){e.next=5;break}throw ea(ee.NOT_SUPPORTED,Error("Publisher._toggleVideo cannot toggleVideo when you have no video source."));case 5:if("ended"!==n.readyState){e.next=8;break}return t8=!0,e.abrupt("return");case 8:o=void 0===(r=to.videoDimensions)?ty():r,e.prev=9,s=M(o),e.next=16;break;case 13:return e.prev=13,e.t0=e.catch(9),e.abrupt("return");case 16:return e.next=18,na();case 18:if(a=e.sent,t&&eu.env.isAndroid&&eu.env.isChrome&&n&&n.stop&&n.stop(),t){e.next=27;break}try{eL=a.find(e=>e.label===n.label).deviceId}catch(e){}if(!(u=ez.getVideoFilter())){e.next=27;break}return eV=u,e.next=27,ne();case 27:if(!(eL&&-1===a.findIndex(e=>e.deviceId===eL))){e.next=29;break}throw ea(ee.NO_DEVICES_FOUND,Error("Previous device no longer available - deviceId not found"));case 29:if(eP.emit("streamDestroy"),d=s,!t){e.next=43;break}return e.next=34,no(eL);case 34:if(d=e.sent,!eV){e.next=43;break}return e.next=38,ez.setVideoFilter(eV);case 38:return e.next=40,ez.setMediaStream(c);case 40:return e.next=42,ez.setVideoTrack(d);case 42:d=e.sent;case 43:return e.prev=43,e.next=46,ni(n,d);case 46:e.next=51;break;case 48:throw e.prev=48,e.t1=e.catch(43),e.t1;case 51:case"end":return e.stop()}},e,null,[[9,13],[43,48]])}));return function(t){return e.apply(this,arguments)}}()),this.publishVideo=e=>{td("publishVideo","Attempt",{publishVideo:e}),to.publishVideo=e;try{this._toggleVideo(to.publishVideo),t7(),td("publishVideo","Success",{publishVideo:e})}catch(e){td("publishVideo","Failure",{message:e.message})}return this},this.setVideoContentHint=e=>Y(c,e),this.getVideoContentHint=()=>B(c),this.destroy=function(e,t){return N.isAttemptingToPublish()&&this.session&&tl("Cancel",{reason:"destroy"}),N.isDestroyed()||(N.set("Destroyed"),tB(),e7&&(e7.off(),e7=null),tY&&(tY.destroy(),tY=null),eP&&(eP.off(),eP=null),!0!==t&&this.dispatchEvent(new et.De
30stroyedEvent(_.PUBLISHER_DESTROYED,this,e)),this.off()),this},this.disconnect=()=>{Object.keys(e9).forEach(e=>{let t=tX(e);delete e9[e],t.then(e=>this._removePeerConnection(e))})},this.processMessage=(e,t,n)=>{let r=a(n,"params.subscriber",t).replace(/^INVALID-STREAM$/,t),i=a(n,"content.peerId"),o=a(n,"content.sourceStreamId","MANTIS"),c=`${r}~${i}~${o}`;eo.debug(`OT.Publisher.processMessage: Received ${e} from ${t} for ${c}`),eo.debug(n);let u=tX(c),d=()=>{tP({peerConnectionId:c,send:ey({socket:this.session._.getSocket(),uri:n.uri,content:{peerId:i,sourceStreamId:o}}),log:function(e,t,n,r,a){return void 0===r&&(r={}),td(e,t,n,(0,s.default)({peerId:i,sourceStreamId:H(o)},r),a)},logQoS:e=>{o===ew&&tv((0,s.default)({},e,{peerId:i,remoteConnectionId:t,sourceStreamId:o}))},sourceStreamId:o}).then(s=>(eX(s,{remoteConnectionId:t,remoteSubscriberId:r,peerId:i,sourceStreamId:o,peerConnectionId:c}),s.processMessage(e,n),null)).catch(e=>{eo.error("OT.Publisher failed to create a peerConnection",e)})},l=this.session.sessionInfo.isAdaptiveEnabled;if("unsubscribe"===e)this._removeSubscriber(r);else if(u)u.then(t=>t.processMessage(e,n));else{if(l&&tF())return;d()}},this.getImgData=function(){if(!e4)return eo.error("OT.Publisher.getImgData: Cannot getImgData before the Publisher is publishing."),null;let e=n&&n.video();return e?e.imgData():null};let nt=e=>{tC(),c=e,eP.emit("streamChange"),C=new es(c,!to.publishAudio)},nn=e=>{e.getSenders().forEach(e=>"audio"===e.track.kind&&c.getAudioTracks().length?e.replaceTrack(c.getAudioTracks()[0]):"video"===e.track.kind&&c.getVideoTracks().length?e.replaceTrack(c.getVideoTracks()[0]):void 0)},nr=function(e){return void 0===e&&(e=nn),tM().then(n=>{let r=[];return n.map(e),t.all(r)})};{let e=0,t=function(){var t=(0,o.default)(i.default.mark(function t(){var n,r,o;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(eu.env.isLegacyEdge||!ev.RTCRtpSender||"function"!=typeof ev.RTCRtpSender.prototype.replaceTrack)){t.next=2;break}throw ea(ee.UNSUPPORTED_BROWSER,Error("Publisher#cycleVideo is not supported in your browser."),en.UNABLE_TO_PUBLISH);case 2:if(!(tr||tt)){t.next=4;break}throw ea(ee.NOT_SUPPORTED,Error("Publisher#cycleVideo: The publisher is not using a camera video source"));case 4:if(n=ns()){t.next=7;break}throw ea(ee.NOT_SUPPORTED,Error("Publisher#cycleVideo cannot cycleVideo when you have no video source."));case 7:return e+=1,t.next=10,na();case 10:if((r=t.sent).filter(e=>e.label!==n.label).length>0)for(;r[e%r.length].label===n.label;)e+=1;return eP.emit("streamDestroy"),o=r[e%r.length].deviceId,t.next=18,nh(o);case 18:return t.abrupt("return",eL);case 19:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}();this.cycleVideo=W((0,o.default)(i.default.mark(function e(){var n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t();case 3:n=e.sent,e.next=10;break;case 6:throw e.prev=6,e.t0=e.catch(0),eo.error(`Publisher#cycleVideo: could not cycle video: ${e.t0}`),e.t0;case 10:return e.abrupt("return",{deviceId:n});case 11:case"end":return e.stop()}},e,null,[[0,6]])})))}let ni=function(){var e=(0,o.default)(i.default.mark(function e(r,o){var s,a,u;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tM();case 2:return s=e.sent,e.next=5,t.all(s.map(e=>e.findAndReplaceTrack(r,o)));case 5:if(c.addTrack(o),c.removeTrack(r),r&&r.stop){try{a=o instanceof MediaStreamTrackGenerator}catch(e){a=!1}a||r.stop()}("Firefox"===eu.env.name||"Safari"===eu.env.name)&&(eG.videoElement().srcObject=null,eG.videoElement().srcObject=c),(u=n&&n.video())&&u.refreshTracks(),eP.emit("streamChange"),t7();case 13:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),no=function(){var t=(0,o.default)(i.default.mark(function t(n){var r,o,s;return i.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(r=d(e)).audioSource=null,r.videoSource=n,(e7=eT(r,"OT.Publisher.getTrackFromDeviceId",()=>N&&N.isDestroyed())).on({accessDialogOpened:e2,accessDialogClosed:e3}),o=e7.getUserMedia,t.prev=6,t.next=9,o();case 9:s=t.sent,t.next=15;break;case 12:t.prev=12,t.t0=t.catch(6),eo.error(t.t0);case 15:return t.abrupt("return",s&&s.getVideoTracks()[0]);case 16:case"end":return t.stop()}},t,null,[[6,12]])}));return function(e){return t.apply(this,arguments)}}(),ns=()=>c.getVideoTracks()[0],na=function(){var e=(0,o.default)(i.default.mark(function e(){var t,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.shouldAskForDevices();case 2:if(n=(t=e.sent).videoDevices,!(!t.video||!n||!n.length)){e.next=6;break}throw ea(ee.NO_DEVICES_FOUND,Error("No video devices available"),en.UNABLE_TO_PUBLISH);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),nc=(e,t)=>{t&&c.addTrack(t),e&&c.removeTrack(e);let r=n&&n.video();r&&r.refreshTracks(),tY&&(t&&!e&&tY.addAudioTrack(),e&&!t&&tY.removeAudioTrack()),e&&e.stop&&e.stop(),t&&(t6(),C=new es(c,!to.publishAudio)),eP.emit("streamChange"),tK()},nu=function(){var e=(0,o.default)(i.default.mark(function e(t){var n,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.getSettings().deviceId,e.prev=1,e.next=4,eG.setAudioSource(n);case 4:(r=c.getAudioTracks()[0])&&(r.onmute=()=>nd(r),r.onunmute=()=>nl(r)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),eo.error(e.t0);case 11:case"end":return e.stop()}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}(),nd=e=>{let t=!1;to.publishVideo&&document.hidden&&(t=!0,this.publishVideo(!1));let n=function(){var r=(0,o.default)(i.default.mark(function r(){return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(document.hidden){r.next=5;break}return r.next=3,nu(e);case 3:t&&eG.publishVideo(!0),document.removeEventListener("visibilitychange",n);case 5:case"end":return r.stop()}},r)}));return function(){return r.apply(this,arguments)}}();document.addEventListener("visibilitychange",n)},nl=e=>{tJ()&&(tH()?this.videoElement().pause():nu(e)),this.session.trigger("gsmCallEnded")},np=function(){var n=(0,o.default)(i.default.mark(function n(r){var o,s,a,c,u,l,p,f,h,m,b,g;return i.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(o="Operation did not succeed due to a new request.",eW&&eW.cancel(),s=eW=new E,a=e=>{if(s.isCanceled())throw e.getTracks(e=>e.stop()),ea(ee.CANCEL,Error(o));return np(e.getAudioTracks()[0])},!(eu.env.isLegacyEdge||!ev.RTCRtpSender||"function"!=typeof ev.RTCRtpSender.prototype.replaceTrack)){n.next=7;break}throw ea(ee.UNSUPPORTED_BROWSER,Error("Publisher#setAudioSource is not supported in your browser."));case 7:if(c=eG.getAudioSource()){n.next=10;break}throw ea(ee.NOT_SUPPORTED,Error("Publisher#setAudioSource cannot add an audio source when you started without one."));case 10:if(!(r instanceof MediaStreamTrack)){n.next=21;break}return n.next=13,tM();case 13:if(u=n.sent,!s.isCanceled()){n.next=16;break}throw ea(ee.CANCEL,Error(o));case 16:return n.next=18,t.all(u.map(e=>e.findAndReplaceTrack(c,r)));case 18:return n.abrupt("return",nc(c,r));case 21:if("string"!=typeof r){n.next=68;break}return(l=d(e)).audioSource=r,l.videoSource=null,(e7=eT(l,"OT.Publisher.setAudioSource",()=>s.isCanceled()||N&&N.isDestroyed())).on({accessDialogOpened:e2,accessDialogClosed:e3}),p=c.label,f=c.getConstraints&&c.getSettings().deviceId||void 0,c&&c.stop(),h=e7.getUserMedia,n.prev=31,n.t0=a,n.next=35,h();case 35:return n.t1=n.sent,n.next=38,(0,n.t0)(n.t1);case 38:return n.abrupt("return",n.sent);case 41:if(n.prev=41,n.t2=n.catch(31),!s.isCanceled()){n.next=45;break}throw ea(ee.CANCEL,Error(o));case 45:if((m=d(e)).videoSource=null,m.audioSource=f,!(!m.audioSource&&p)){n.next=55;break}return n.next=51,P();case 51:if(b=n.sent.find(e=>e.label===p),!s.isCanceled()){n.next=54;break}throw ea(ee.CANCEL,Error(o));case 54:b&&(m.audioSource=b.deviceId);case 55:if(m.audioSource){n.next=58;break}throw n.t2.message+=" (could not determine previous audio device)",ea(ee.NOT_FOUND,n.t2);case 58:return e7=eT(m,"OT.Publisher.setAudioSource",()=>s.isCanceled()||N&&N.isDestroyed()),n.next=61,e7.getUserMedia().catch(e=>{throw e.message+=" (could not obtain previous audio device)",e});case 61:return g=n.sent,n.next=64,a(g);case 64:throw n.t2.message+=" (reverted to previous audio device)",n.t2;case 66:n.next=69;break;case 68:throw ea(ee.INVALID_PARAMETER,Error("Invalid parameter passed to OT.Publisher.setAudioSource(). Expected string or MediaStreamTrack."));case 69:case"end":return n.stop()}},n,null,[[31,41]])}));return function(e){return n.apply(this,arguments)}}();this.setAudioSource=np,this.getAudioSource=()=>c&&c.getAudioTracks().length>0?c.getAudioTracks()[0]:null;let nf=function(){var e=(0,o.default)(i.default.mark(function e(t){var n,r,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ea(ee.INVALID_VIDEO_SOURCE,Error("Invalid video source. Video source must be a valid video input deviceId"),1041),r=ea(ee.SET_VIDEO_SOURCE_FAILURE,Error("You cannot reset the video source on a publisher that does not currently use a camera source."),1040),!(eu.env.isLegacyEdge||!ev.RTCRtpSender||"function"!=typeof ev.RTCRtpSender.prototype.replaceTrack)){e.next=4;break}throw ea(ee.UNSUPPORTED_BROWSER,Error("setVideoSource is not supported in your browser."),en.UNABLE_TO_PUBLISH);case 4:if("string"==typeof t){e.next=6;break}throw n;case 6:if(o=!c||0===c.getVideoTracks().length,!(tr||tt||o)){e.next=9;break}throw r;case 9:return e.next=11,P();case 11:if(e.sent.find(e=>"videoInput"===e.kind&&e.deviceId===t)){e.next=15;break}throw n;case 15:return e.next=17,nh(t);case 17:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();this.setVideoSource=nf;let nh=function(){var e=(0,o.default)(i.default.mark(function e(t){var n,r,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=eL,eL=t,to.publishVideo){e.next=4;break}return e.abrupt("return");case 4:return r=ns(),to.publishVideo&&eu.env.isAndroid&&(eu.env.isChrome||eu.env.isFirefox)&&r&&r.stop&&r.stop(),e.prev=6,e.next=9,no(t);case 9:o=e.sent,e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(6),eL=n,eo.error(e.t0),e.abrupt("return");case 17:if(o){e.next=20;break}return console.warn("Unable to aquire video track. Moving to next device."),e.abrupt("return");case 20:if(!eV){e.next=24;break}return e.next=23,ez.setVideoTrack(o);case 23:o=e.sent;case 24:return e.next=26,ni(r,o);case 26:to.publishVideo&&(t8=!1);case 27:case"end":return e.stop()}},e,null,[[6,12]])}));return function(t){return e.apply(this,arguments)}}();this.getVideoSource=()=>{let e={},t=!c||0===c.getVideoTracks().length;return e.track=c&&to.publishVideo&&c.getVideoTracks()[0]||null,e.deviceId=tt||tr||!eL?null:eL,tr?e.type="custom":tt?e.type="screen":t?e.type=null:e.type="camera",e},this._={publishToSession:(e,i)=>{i&&(eU=i),eZ=e,this.session=e;let o=b();r=o,this.streamId=o,tl("Attempt",{dataChannels:to.channels,properties:A(to)});let s=new t((e,t)=>
30{e4?e():(this.once("initSuccess",e),this.once("destroyed",e=>{let n=e.reason,r="";n&&(r=` Reason: ${n}`),t(Error(`Publisher destroyed before it finished loading.${r}`))}))});eo.debug("publishToSession: waiting for publishComplete, which is triggered by stream#created from rumor");let a=new t((e,t)=>{this.once("publishComplete",n=>{n?t(n):(this._setScalableFramerates(to.scalableFramerates),this._setScalableVideoLayers(to.scalableVideoLayers),eo.debug("publishToSession: got publishComplete"),e())})}),u=e=>{let t=U(e);throw tl("Failure",{},{failureReason:"Publish",failureCode:t.code,failureMessage:t.message}),N.isAttemptingToPublish()&&this.trigger("publishComplete",t),ec.handleJsException({errorMsg:e.message,code:t.code,target:this,error:e,analytics:eU}),t};eo.debug("publishToSession: waiting for loaded");let d=s.then(()=>e._.getVideoCodecsCompatible(c)).then(r=>{if(eo.debug("publishToSession: loaded"),!this.session)return;let i=setTimeout(()=>{tx(e)},el);this.once("publishComplete",()=>{clearTimeout(i)}),N.set("PublishingToSession");let o=r&&n&&n.video(),s=c.getVideoTracks().length>0,a=null!==to.videoSource&&!1!==to.videoSource;o&&s&&a&&eK.push(new eh({id:"video1",type:"video",active:to.publishVideo,orientation:eb.ROTATED_NORMAL,frameRate:to.frameRate,width:o.videoWidth(),height:o.videoHeight(),source:tt?"screen":tr?"custom":"camera",fitMode:to.fitMode}));let d=c.getAudioTracks().length>0;return null!==to.audioSource&&!1!==to.audioSource&&d&&eK.push(new eh({id:"audio1",type:"audio",active:to.publishAudio})),eo.debug("publishToSession: creating rumor stream id"),new t((e,t)=>{tq(null,(n,r,i)=>{n?t(u(n)):e({streamId:r,message:i})})})}).then(e=>{if(void 0===e)return;let t=e.streamId,n=e.message;if(eo.debug("publishToSession: rumor stream id created:",t,"(this is different from stream#created, which requires media to actually be flowing for mantis sessions)"),t!==o)throw Error("streamId response does not match request");this.streamId=t,k=ed(n)}).catch(e=>{throw this.trigger("publishComplete",e),e});return t.all([d,a])},unpublishFromSession:(e,t)=>{if(!this.session||e.id!==this.session.id){if("unpublished"===t){let t=this.session&&this.session.id||"no session";eo.warn(`The publisher ${e5} is trying to unpublish from a session ${e.id} it is not attached to (it is attached to ${t})`)}return this}if(e.isConnected()&&(this.stream||N.isAttemptingToPublish())&&e._.streamDestroy(this.streamId),ej.releaseAll(),this.disconnect(),N.isAttemptingToPublish()){tl("Cancel",{reason:"unpublish"});let e=Error((()=>{switch(t){case"mediaStopped":return"The video element fired the ended event, indicating there is an issue with the media";case"unpublished":return"The publisher was unpublished before it could be published";case"reset":return"The publisher was reset";default:return`The publisher was destroyed due to ${t}`}})());this.trigger("publishComplete",ea("mediaStopped"===t?ee.MEDIA_ENDED:ee.CANCEL,e))}return this.session=null,td("unpublish","Success"),this._.streamDestroyed(t),this},unpublishStreamFromSession:(e,t,n)=>r&&e.id===r?this._.unpublishFromSession(t,n):(eo.warn(`The publisher ${e5} is trying to destroy a stream ${e.id} that is not attached to it (it has ${r||"no stream"} attached to it)`),this),streamDestroyed:e=>{0>["reset"].indexOf(e)&&!N.isDestroyed()&&N.set("MediaBound");let t=new et.StreamEvent("streamDestroyed",this.stream,e,!0);this.dispatchEvent(t),t.isDefaultPrevented()||this.destroy()},archivingStatus:e=>(tY&&tY.setArchivingStatus(e),e),webRtcStream:()=>c,switchTracks:()=>(0,o.default)(i.default.mark(function e(){var t;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ts().catch(e1);case 3:t=e.sent,e.next=10;break;case 6:throw e.prev=6,e.t0=e.catch(0),eo.error(`OT.Publisher.switchTracks failed to getUserMedia: ${e.t0}`),e.t0;case 10:nt(t),e.prev=11,t_(),e.next=21;break;case 15:if(e.prev=15,e.t1=e.catch(11),!(e.t1 instanceof S)){e.next=19;break}return e.abrupt("return");case 19:throw eo.error("Error while binding video",e.t1),e.t1;case 21:e.prev=21,nr(),e.next=29;break;case 25:throw e.prev=25,e.t2=e.catch(21),eo.error("Error replacing tracks",e.t2),e.t2;case 29:case"end":return e.stop()}},e,null,[[0,6],[11,15],[21,25]])}
30))(),getDataChannel(e,t,n){let r=tX(Object.keys(e9)[0]);r?r.then(r=>{r.getDataChannel(e,t,n)}):n(new eu.Error("Cannot create a DataChannel before there is a subscriber."))},iceRestart(){tM().then(e=>{e.forEach(e=>{tp("Attempt",{remoteConnectionId:eD(e).remoteConnectionId}),eo.debug("Publisher: ice restart attempt"),e.iceRestart()})})},getState:()=>N,demoOnlyCycleVideo:this.cycleVideo,testOnlyGetFramesEncoded:()=>(0,o.default)(i.default.mark(function e(){var t;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tM();case 2:if((t=e.sent).length){e.next=5;break}throw Error("No established PeerConnections yet");case 5:return e.abrupt("return",t[0]._testOnlyGetFramesEncoded());case 6:case"end":return e.stop()}},e)}))(),onStreamAvailable:tw,startRoutedToRelayedTransition:()=>{th("Attempt");let e=e=>{let t=U(e);this.trigger("streamCreateForP2PComplete",t),th("Failure",{reason:t.message})};if(!this.session)return void th("Failure",{reason:"Not connected to the session."});let t=setTimeout(()=>{th("Failure",{reason:"Timeout"})},el);this.once("streamCreateForP2PComplete",()=>{clearTimeout(t)}),eo.debug(`streamCreateWithSource: send a message to RUMOR for creating the stream with the sourceStreaId P2P and stream ${this.streamId}`),tq("P2P",t=>{t?e(t):this.trigger("streamCreateForP2PComplete")})},startRelayedToRoutedTransition:function(){var e=(0,o.default)(i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(tm("Attempt"),eG.session){e.next=4;break}return tm("Failure",{reason:"Not connected to the session."}),e.abrupt("return");case 4:if(eG.streamId){e.next=7;break}return tm("Failure",{reason:"No streamId available"}),e.abrupt("return");case 7:if(tF()){e.next=10;break}return tm("Failure",{reason:"There is no Relayed Peer connection created."}),e.abrupt("return");case 10:return eG.session._.streamDestroy(eG.streamId,"P2P"),e.t0=eG,e.next=14,tF();case 14:return e.t1=e.sent,e.t0._removePeerConnection.call(e.t0,e.t1),e.next=18,t1();case 18:tm("Success"),eG.trigger("streamDestroyForP2PComplete");case 20:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),forceMuteAudio:(function(){td("publishAudio","Attempt",{publishAudio:!1}),to.publishAudio=!1;try{t6("auto"),this.dispatchEvent(new et.MuteForcedEvent),td("publishAudio","Success",{publishAudio:!1})}catch(e){td("publishAudio","Failure",{message:e.message})}}).bind(this)},this.detectDevices=function(){eo.warn("Publisher.detectDevices() is not implemented.")},this.detectMicActivity=function(){eo.warn("Publisher.detectMicActivity() is not implemented.")},this.getEchoCancellationMode=function(){return eo.warn("Publisher.getEchoCancellationMode() is not implemented."),"fullDuplex"},this.setMicrophoneGain=function(){eo.warn("Publisher.setMicrophoneGain() is not implemented.")},this.getMicrophoneGain=function(){return eo.warn("Publisher.getMicrophoneGain() is not implemented."),.5},this.setCamera=function(){eo.warn("Publisher.setCamera() is not implemented.")},this.setMicrophone=function(){eo.warn("Publisher.setMicrophone() is not implemented.")},this.guid=function(){return e5},this.videoElement=function(){let e=n&&n.video();return e?e.domElement():null},this.setStream=tG,this.isWebRTC=!0,this.isLoading=function(){return n&&n.loading()},this.videoWidth=function(){let e=n&&n.video();return e?e.videoWidth():void 0},this.videoHeight=function(){let e=n&&n.video();return e?e.videoHeight():void 0}
30,this.getStats=function(e){tQ((t,n)=>{t?e(t):e(null,n)})},this.getRtcStatsReport=()=>new t((e,t)=>{t$((n,r)=>{n?t(n):e(r)})}),N=new ef(tS),this.accessAllowed=!1,this.applyVideoFilter=function(){var e=(0,o.default)(i.default.mark(function e(t){var n,r,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(td("applyVideoFilter","Attempt",{videoFilter:t}),e.prev=1,eE.isSupported()){e.next=5;break}throw ea(ee.NOT_SUPPORTED,Error("Browser does not support video filters (Insertable Streams and Worker APIs are required)"));case 5:if(ez.isValidVideoFilter(t)){e.next=7;break}throw ea(ee.INVALID_PARAMETER,Error("Video filter has invalid configuration"));case 7:if(c){e.next=12;break}return td("applyVideoFilter","Failure",{message:n="Ignoring. No mediaStream"}),eo.warn(n),e.abrupt("return");case 12:if(!(tt||tr)){e.next=14;break}throw ea(ee.INVALID_PARAMETER,Error("Video filters can not be applied to screen shares or custom video sources"));case 14:if(!eG.getVideoFilter()){e.next=17;break}return e.next=17,eG.clearVideoFilter();case 17:if(r=c.getVideoTracks()[0]){e.next=23;break}return td("applyVideoFilter","Failure",{message:n="Ignoring. No video"}),eo.warn(n),e.abrupt("return");case 23:return e.next=25,ez.setVideoFilter(t);case 25:return e.next=27,ez.setMediaStream(c);case 27:if(!(o=e.sent)){e.next=31;break}return e.next=31,ni(r,o);case 31:e.next=38;break;case 33:throw e.prev=33,e.t0=e.catch(1),eo.error(`Error applying video filter: ${e.t0}`),td("applyVideoFilter","Failure",{message:e.t0.message}),e.t0;case 38:eV=t,td("applyVideoFilter","Success",{videoFilter:t});case 40:case"end":return e.stop()}},e,null,[[1,33]])}));return function(t){return e.apply(this,arguments)}}(),this.getVideoFilter=()=>{td("getVideoFilter","Attempt");let e=ez.getVideoFilter();return td("getVideoFilter","Success"),e},this.clearVideoFilter=(0,o.default)(i.default.mark(function e(){var t,n,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(td("clearVideoFilter","Attempt"),eG.getVideoFilter()){e.next=6;break}return td("clearVideoFilter","Success",{message:t="Ignoring. No video filter applied"}),eo.debug(t),e.abrupt("return");case 6:if(eE.isSupported()){e.next=11;break}return td("clearVideoFilter","Success",{message:t='Ignoring. "clearVideoFilter" not supported.'}),eo.warn(t),e.abrupt("return");case 11:if(c){e.next=16;break}return td("clearVideoFilter","Success",{message:t="Ignoring. No mediaStream"}),eo.warn(t),e.abrupt("return");case 16:if(!eV){e.next=26;break}return n=c.getVideoTracks()[0],e.next=20,no(eL);case 20:return r=e.sent,e.next=23,ni(n,r);case 23:return e.next=25,ne();case 25:eV=null;case 26:case"end":return e.stop()}},e)}))}}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(61).once;e.exports=function(e){this.publish=+(-1!==e.indexOf("publish")),this.subscribe=+(-1!==e.indexOf("subscribe")),this.forceUnpublish=+(-1!==e.indexOf("forceunpublish")),this.forceDisconnect=+(-1!==e.indexOf("forcedisconnect")),this.forceMute=+(-1!==e.indexOf("forcemute")),this.supportsWebRTC=+!!r(),this.permittedTo=e=>Object.prototype.hasOwnProperty.call(this,e)&&1===this[e]}},function(e,t,n){"use strict";let r=n(1)("Stream"),i=n(5),o=n(21),s=n(6),a=n(23)(),c=["name","archiving"];e.exports=function(e,t,n,u,d,l){let p,f=this;this.id=e,this.streamId=e,this.name=t,this.creationTime=Number(n),this.connection=u,this.channel=l,this.publisher=o.publishers.find({streamId:this.id}),s(this);let h=function(e,t,n,r){let i=t;switch(i){case"active":f[i="audio"===e.type?"hasAudio":"hasVideo"]=r;break;case"disableWarning":if(f[i="audio"===e.type?"audioDisableWarning":"videoDisableWarning"]=r,!f["audio"===e.type?"hasAudio":"hasVideo"])return;break;case"fitMode":f[i="defaultFitMode"]=r;break;case"source":f[i="audio"===e.type?"audioType":"videoType"]=r;break;case"videoDimensions":f.videoDimensions=r;break;case"orientation":case"width":case"height":return}("screen"!==f.videoType||"hasVideo"!==i||!1!==r)&&f.dispatchEvent(new a.StreamUpdatedEvent(f,
30i,n,r))},m=function(){return f.publisher?f.publisher:o.subscribers.find(e=>e.stream&&e.stream.id===f.id&&e.session.id===d.id)},b=function(){return!f.publisher};this.getChannelsOfType=function(e){return f.channel.filter(t=>t.type===e)},this.getChannel=function(e){for(let t=0;t<f.channel.length;++t)if(f.channel[t].id===e)return f.channel[t];return null};let g=this.getChannelsOfType("audio")[0],v=this.getChannelsOfType("video")[0];this.hasAudio=null!=g&&g.active,this.hasVideo=null!=v&&v.active,this.videoType=v&&v.source,this.defaultFitMode=v&&v.fitMode,this.videoDimensions={},v&&(this.videoDimensions.width=v.width,this.videoDimensions.height=v.height,this.videoDimensions.orientation=v.orientation,v.on("update",h),this.frameRate=v.frameRate),g&&g.on("update",h),this.setChannelActiveState=function(e,t,n){let r={active:t};n&&(r.activeReason=n),y(e,r)},this.setVideoDimensions=function(e,t){y("video",{width:e,height:t,orientation:0})},this.setRestrictFrameRate=function(e){y("video",{restrictFrameRate:e})},this.setPreferredResolution=function(e){if(!b())return void r.warn("setPreferredResolution has no affect when called by a publisher");if(d.sessionInfo.p2pEnabled)return void r.warn("Stream.setPreferredResolution will not work in a P2P Session");if(e&&void 0===e.width&&void 0===e.height)return;let t=f.getChannelsOfType("video")[0];if(t){if(e&&e.width){if(isNaN(parseInt(e.width,10)))throw new i.Error("stream preferred width must be an integer","Subscriber");t.preferredWidth=parseInt(e.width,10)}else t.preferredWidth=void 0;if(e&&e.height){if(isNaN(parseInt(e.height,10)))throw new i.Error("stream preferred height must be an integer","Subscriber");t.preferredHeight=parseInt(e.height,10)}else t.preferredHeight=void 0;d._.subscriberChannelUpdate(f,m(),t,{preferredWidth:t.preferredWidth||0,preferredHeight:t.preferredHeight||0})}},this.getPreferredResolution=function(){let e=f.getChannelsOfType("video")[0];if(e&&(e.preferredWidth||e.preferredHeight))return{width:e.preferredWidth,height:e.preferredHeight}},this.setPreferredFrameRate=function(e){if(!b())return void r.warn("setPreferredFrameRate has no affect when called by a publisher");if(d.sessionInfo.p2pEnabled)return void r.warn("Stream.setPreferredFrameRate will not work in a P2P Session");if(e&&isNaN(parseFloat(e)))throw new i.Error("stream preferred frameRate must be a number","Subscriber");let t=f.getChannelsOfType("video")[0];t&&(t.preferredFrameRate=e?parseFloat(e):null,d._.subscriberChannelUpdate(f,m(),t,{preferredFrameRate:t.preferredFrameRate||0}))},this.getPreferredFrameRate=function(){let e=f.getChannelsOfType("video")[0];return e?e.preferredFrameRate:null};let y=function(e,t){let n;if(f.publisher)n=e=>d._.streamChannelUpdate(f,e,t);else{let e=m();n=n=>d._.subscriberChannelUpdate(f,e,n,t)}f.getChannelsOfType(e).forEach(n)};this.destroyed=!1,this.destroyedReason=void 0,this.destroy=function(e,t){void 0===e&&(e="clientDisconnected"),p=e,f.destroyed=!0,f.destroyedReason=p,!0!==t&&f.dispatchEvent(new a.DestroyedEvent("destroyed",f,p))},this._={},this._.updateProperty=function(e,t){if(-1===c.indexOf(e))return void r.warn(`Unknown stream property "${e}" was modified to "${t}".`);let n=f[e],i=t;switch(e){case"name":f[e]=i;break;case"archiving":var o=m();f.publisher&&o&&o._.archivingStatus(i),f[e]=i}let s=new a.StreamUpdatedEvent(f,e,n,i);f.dispatchEvent(s)},this._.update=function(e){for(let t in e)e.hasOwnProperty(t)&&f._.updateProperty(t,e[t])},this._.forceMute=function(e){e.hasOwnProperty("channels")&&e.channels.includes("audio")&&f.publisher&&f.publisher._.forceMuteAudio()},this._.updateChannel=function(e,t){let n=f.getChannel(e);n&&n.update(t)}}},function(e,t,n){"use strict";t.__esModule=!0,t.STATUS=t.PONG=t.PING=t.DISCONNECT=t.CONNECT=t.MESSAGE=t.UNSUBSCRIBE=t.SUBSCRIBE=void 0,t.SUBSCRIBE=0,t.UNSUBSCRIBE=1,t.MESSAGE=2,t.CONNECT=3,t.DISCONNECT=4,t.PING=7,t.PONG=8,t.STATUS=9},function(e,t,n){"use strict";let r=n(7),i=n(170),o=n(6),s=n(23)(),a=n(719);function c(e,t,n,r,c){let u;this.id=e,this.connectionId=e,this.creationTime=t?Number(t):null,this.data=n,this.capabilities=a(r),this.permissions=new i(c),this.qual
30ity=null,o(this),this.destroy=(e,t)=>{u=e||"clientDisconnected",!0!==t&&this.dispatchEvent(new s.DestroyedEvent("destroyed",this,u))},this.destroyed=()=>void 0!==u,this.destroyedReason=()=>u}c.fromHash=e=>{let t=e.id,n=e.creationTime,i=e.data,o=e.capablities,s=e.permissions;return new c(t,n,i,r(o||{},{supportsWebRTC:!0}),s||[])},e.exports=c},function(e,t){e.exports="object"==typeof window&&window&&window.Object===Object&&window},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(38);e.exports=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},function(e,t,n){var r=n(40),i=n(30);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(370),i=n(65),o=n(10),s=n(66),a=n(67),c=n(85),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),d=!n&&i(e),l=!n&&!d&&s(e),p=!n&&!d&&!l&&c(e),f=n||d||l||p,h=f?r(e.length,String):[],m=h.length;for(var b in e)(t||u.call(e,b))&&!(f&&("length"==b||l&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||a(b,m)))&&h.push(b);return h}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){(function(e){var r=n(14),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(84)(e))},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(116),i=n(117),o=n(115),s=n(181);e.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:s},function(e,t,n){var r=n(184),i=n(115),o=n(30);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(116),i=n(10);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t,n){var r=n(184),i=n(182),o=n(53);e.exports=function(e){return r(e,o,i)}},function(e,t,n){e.exports=n(38)(n(14),"Set")},function(e,t,n){e.exports=n(38)(n(14),"WeakMap")},function(e,t,n){e.exports=n(14).Uint8Array},function(e,t,n){var r=n(118);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(86),i=n(117),o=n(69);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},function(e,t,n){var r=n(110),i="Expected a function";function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(87),i=n(122);e.exports=function(e){return r(function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(n[0],n[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++r<o;){var c=n[r];c&&e(t,c,r,s)}return t})}},function(e,t,n){var r=n(120),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),c=Array(a);++s<a;)c[s]=o[t+s];s=-1;for(var u=Array(t+1);++s<t;)u[s]=o[s];return u[t]=n(c),r(e,this,u)}}},function(e,t){var n=800,r=16,i=Date.now;e.exports=function(e){var t=0,o=0;return function(){var s=i(),a=r-(s-o);if(o=s,a>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){"use strict";e.exports=n(398)()?WeakMap:n(399)},function(e,t,n){"use strict";var r=Object.create,i=Object.getPrototypeOf,o={};e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||r;return"function"==typeof e&&i(e(t(null),o))===o}},function(e,t,n){"use strict";var r,i=n(198),o=n(31),s=Object.prototype.isPrototypeOf,a=Object.defineProperty,c={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(e,t){if(o(e),null===t||i(t))return e;throw TypeError("Prototype must be null or an object")},e.exports=function(e){var t,n;return e?(2===e.level?e.set?(n=e.set,t=function(e,t){return n.call(r(e,t),t),e}):t=function(e,t){return r(e,t).__proto__=t,e}:t=function e(t,n){var i;return r(t,n),(i=s.call(e.nullPolyfill,t))&&delete e.nullPolyfill.__proto__,null===n&&(n=e.nullPolyfill),t.__proto__=n,i&&a(e.nullPolyfill,"__proto__",c),t},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e,t=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");
30if(r){try{(e=r.set).call(t,n)}catch(e){}if(Object.getPrototypeOf(t)===n)return{set:e,level:2}}return(t.__proto__=n,Object.getPrototypeOf(t)===n)?{level:2}:((t={}).__proto__=n,Object.getPrototypeOf(t)===n&&{level:1})}()),n(401)},function(e,t,n){"use strict";var r=n(44),i={function:!0,object:!0};e.exports=function(e){return r(e)&&i[typeof e]||!1}},function(e,t,n){"use strict";var r=n(404),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!(!r(e)||i.test(o.call(e)))}},function(e,t,n){"use strict";var r=n(44),i=Array.prototype.forEach,o=Object.create,s=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=o(null);return i.call(arguments,function(e){r(e)&&s(Object(e),t)}),t}},function(e,t,n){"use strict";e.exports=n(411)()?String.prototype.contains:n(412)},function(e,t,n){"use strict";var r=n(89),i=n(90),o=n(413),s=n(442),a=n(443),c=n(45).iterator;e.exports=function(e){return"function"==typeof a(e)[c]?e[c]():r(e)?new o(e):i(e)?new s(e):new o(e)}},function(e,t,n){"use strict";var r=n(418);e.exports=function(e){if(!r(e))throw TypeError(e+" is not a symbol");return e}},function(e,t,n){"use strict";var r,i=n(422),o=n(125),s=n(70),a=n(31),c=n(32),u=n(423),d=n(45),l=Object.defineProperty,p=Object.defineProperties;e.exports=r=function(e,t){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");p(this,{__list__:c("w",a(e)),__context__:c("w",t),__nextIndex__:c("w",0)}),t&&(s(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete r.prototype.constructor,p(r.prototype,o({_next:c(function(){var e;if(this.__list__){if(this.__redo__&&void 0!==(e=this.__redo__.shift()))return e;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:c(function(){return this._createResult(this._next())}),_createResult:c(function(e){return void 0===e?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}}),_resolve:c(function(e){return this.__list__[e]}),_unBind:c(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:c(function(){return"[object "+(this[d.toStringTag]||"Object")+"]"})},u({_onAdd:c(function(e){if(!(e>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void l(this,"__redo__",c("c",[e]));this.__redo__.forEach(function(t,n){t>=e&&(this.__redo__[n]=++t)},this),this.__redo__.push(e)}}),_onDelete:c(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,n){t>e&&(this.__redo__[n]=--t)},this)))}),_onClear:c(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),l(r.prototype,d.iterator,c(function(){return this}))},function(e,t,n){"use strict";var r=n(55),i=n(124),o=n(425),s=n(426),a=function(e,t){return e.replace("%v",s(t))};e.exports=function(e,t,n){if(!i(n))throw TypeError(a(t,e));if(!r(e)){if("default"in n)return n.default;if(n.isOptional)return null}var s=o(n.errorMessage);throw r(s)||(s=t),TypeError(a(s,e))}},function(e,t){e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return -1}},function(e,t,n){e.exports=n(454)},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(17);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var o,s=[];r.forEach(t,function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))}))}),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e){return!!(e&&e.__CANCEL__)}},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(459),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a={adapter:function(){var e;return"u">typeof XMLHttpRequest?e=n(212):void 0!==t&&"[object process]"===Object.prototype.toString.call(t)&&(e=n(212)),e}(),transformRequest:[function(e,t){return(i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){a.headers[e]={}}),r.forEach(["post","put","patch"],function(e){a.headers[e]=r.merge(o)}),e.exports=a}).call(this,n(43))},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(460),o=n(462),s=n(209),a=n(463),c=n(466),u=n(467),d=n(213);e.exports=function(e){return new t(function(t,n){var l=e.data,p=e.headers;r.isFormData(l)&&delete p["Content-Type"];var f=new XMLHttpRequest;e.auth&&(p.Authorization="Basic "+btoa((e.auth.username||"")+":"+(e.auth.password?unescape(encodeURIComponent(e.auth.password)):"")));var h=a(e.baseURL,e.url);if(f.open(e.method.toUpperCase(),s(h,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in f?c(f.getAllResponseHeaders()):null,o=e.responseType&&"text"!==e.responseType?f.response:f.responseText,s={data:o,status:f.status,statusText:f.statusText,headers:r,config:e,request:f};i(t,n,s),f=null}},f.onabort=function(){f&&(n(d("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){n(d("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(d(t,e,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var m=(e.withCredentials||u(h))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;m&&(p[e.xsrfHeaderName]=m)}if("setRequestHeader"in f&&r.forEach(p,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){f&&(f.abort(),n(e),f=null)}),l||(l=null),f.send(l)})}}).call(this,n(0))},function(e,t,n){"use strict";var r=n(461);e.exports=function(e,t,n,i,o){return r(Error(e),t,n,i,o)}},function(e,t,n){"use strict";var r=n(17);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function u(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(e[i],t[i])}r.forEach(i,function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))}),r.forEach(o,u),r.forEach(s,function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(void 0,t[i])}),r.forEach(a,function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))});var d=i.concat(o).concat(s).concat(a),l=Object.keys(e).concat(Object.keys(t)).filter(function(e){return -1===d.indexOf(e)});return r.forEach(l,u),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")}
30,r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){var r=n(472),i=n(474);e.exports=function(e,t,n){return r(i,e,t,n)}},function(e,t,n){var r=n(88),i=n(218);e.exports=i?function(e,t){return i.set(e,t),e}:r},function(e,t,n){var r=n(187);e.exports=r&&new r},function(e,t,n){var r=n(220),i=n(221),o=n(478),s=n(95),a=n(222),c=n(228),u=n(487),d=n(134),l=n(14),p=1,f=2,h=8,m=16,b=128,g=512;function v(e,t,n,y,S,E,T,C,R,I){var _=t&b,w=t&p,x=t&f,O=t&(h|m),N=t&g,k=x?void 0:s(e);function Z(){for(var p=arguments.length,f=Array(p),h=p;h--;)f[h]=arguments[h];if(O)var m=c(Z),b=o(f,m);if(y&&(f=r(f,y,S,O)),E&&(f=i(f,E,T,O)),p-=b,O&&p<I){var g=d(f,m);return a(e,t,v,Z.placeholder,n,f,g,C,R,I-p)}var A=w?n:this,L=x?A[e]:e;return p=f.length,C?f=u(f,C):N&&p>1&&f.reverse(),_&&R<p&&(f.length=R),this&&this!==l&&this instanceof Z&&(L=k||s(L)),L.apply(A,f)}return Z}e.exports=v},function(e,t){var n=Math.max;e.exports=function(e,t,r,i){for(var o=-1,s=e.length,a=r.length,c=-1,u=t.length,d=n(s-a,0),l=Array(u+d),p=!i;++c<u;)l[c]=t[c];for(;++o<a;)(p||o<s)&&(l[r[o]]=e[o]);for(;d--;)l[c++]=e[o++];return l}},function(e,t){var n=Math.max;e.exports=function(e,t,r,i){for(var o=-1,s=e.length,a=-1,c=r.length,u=-1,d=t.length,l=n(s-c,0),p=Array(l+d),f=!i;++o<l;)p[o]=e[o];for(var h=o;++u<d;)p[h+u]=t[u];for(;++a<c;)(f||o<s)&&(p[h+r[a]]=e[o++]);return p}},function(e,t,n){var r=n(479),i=n(226),o=n(227),s=1,a=2,c=4,u=8,d=32,l=64;e.exports=function(e,t,n,p,f,h,m,b,g,v){var y=t&u,S=y?m:void 0,E=y?void 0:m,T=y?h:void 0,C=y?void 0:h;t|=y?d:l,(t&=~(y?l:d))&c||(t&=~(s|a));var R=[e,t,f,T,S,C,E,b,g,v],I=n.apply(void 0,R);return r(e)&&i(I,R),I.placeholder=p,o(I,e,t)}},function(e,t,n){var r=n(218),i=n(224);e.exports=r?function(e){return r.get(e)}:i},function(e,t){e.exports=function(){}},function(e,t,n){function r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}r.prototype=n(86)(n(133).prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){var r=n(217);e.exports=n(194)(r)},function(e,t,n){var r=n(484),i=n(485),o=n(121),s=n(486);e.exports=function(e,t,n){var a=t+"";return o(e,i(a,s(r(a),n)))}},function(e,t){e.exports=function(e){return e.placeholder}},function(e,t,n){var r=n(491),i=n(9),o=n(71),s=0/0,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return s;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=c.test(e);return n||u.test(e)?d(e.slice(2),n?2:8):a.test(e)?s:+e}},function(e,t,n){var r=n(499),i=n(16);function o(e,t,n,s,a){return e===t||(null!=e&&null!=t&&(i(e)||i(t))?r(e,t,n,s,o,a):e!=e&&t!=t)}e.exports=o},function(e,t,n){var r=n(92),i=n(232),o=n(94),s=1,a=2;e.exports=function(e,t,n,c,u,d){var l=n&s,p=e.length,f=t.length;if(p!=f&&!(l&&f>p))return!1;var h=d.get(e),m=d.get(t);if(h&&m)return h==t&&m==e;var b=-1,g=!0,v=n&a?new r:void 0;for(d.set(e,t),d.set(t,e);++b<p;){var y=e[b],S=t[b];if(c)var E=l?c(S,y,b,t,e,d):c(y,S,b,e,t,d);if(void 0!==E){if(E)continue;g=!1;break}if(v){if(!i(t,function(e,t){if(!o(v,t)&&(y===e||u(y,e,n,c,d)))return v.push(t)})){g=!1;break}}else if(!(y===S||u(y,S,n,c,d))){g=!1;break}}return d.delete(e),d.delete(t),g}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},function(e,t,n){var r=n(9);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},function(e,t,n){var r=n(504),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g;e.exports=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t})},function(e,t,n){var r=n(506),i=n(507);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t,n){var r=n(116),i=n(513);function o(e,t,n,s,a){var c=-1,u=e.length;for(n||(n=i),a||(a=[]);++c<u;){var d=e[c];t>0&&n(d)?t>1?o(d,t-1,n,s,a):r(a,d):s||(a[a.length]=d)}return a}e.exports=o},function(e,t,n){e.exports=n(520)()},function(e,t,n){"use strict";var r=n(521),i=n(522);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=E,t.resolveObject=T,t.format=S,t.Url=o;
vendor: 5,458 bytes, line 30
30var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["'"].concat(["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","	"])),d=["%","/","?",";","#"].concat(u),l=["/","?","#"],p=255,f=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n(523);function y(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}function S(e){return(i.isString(e)&&(e=y(e)),e instanceof o)?e.format():o.prototype.format.call(e)}function E(e,t){return y(e,!1,!0).resolve(t)}function T(e,t){return e?y(e,!1,!0).resolveObject(t):t}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",y=e.split(a),S=/\\/g;y[0]=y[0].replace(S,"/");var E=e=y.join(a);if(E=E.trim(),!n&&1===e.split("#").length){var T=c.exec(E);if(T)return this.path=E,this.href=E,this.pathname=T[1],T[2]?(this.search=T[2],t?this.query=v.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var C=s.exec(E);if(C){var R=(C=C[0]).toLowerCase();this.protocol=R,E=E.substr(C.length)}if(n||C||E.match(/^\/\/[^@\/]+@[^@\/]+/)){var I="//"===E.substr(0,2);I&&!(C&&b[C])&&(E=E.substr(2),this.slashes=!0)}if(!b[C]&&(I||C&&!g[C])){for(var _,w,x=-1,O=0;O<l.length;O++){var N=E.indexOf(l[O]);-1!==N&&(-1===x||N<x)&&(x=N)}-1!==(w=-1===x?E.lastIndexOf("@"):E.lastIndexOf("@",x))&&(_=E.slice(0,w),E=E.slice(w+1),this.auth=decodeURIComponent(_)),x=-1;for(var O=0;O<d.length;O++){var N=E.indexOf(d[O]);-1!==N&&(-1===x||N<x)&&(x=N)}-1===x&&(x=E.length),this.host=E.slice(0,x),E=E.slice(x),this.parseHost(),this.hostname=this.hostname||"";var k="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!k)for(var Z=this.hostname.split(/\./),O=0,A=Z.length;O<A;O++){var L=Z[O];if(L&&!L.match(f)){for(var V="",W=0,G=L.length;W<G;W++)L.charCodeAt(W)>127?V+="x":V+=L[W];if(!V.match(f)){var P=Z.slice(0,O),M=Z.slice(O+1),D=L.match(h);D&&(P.push(D[1]),M.unshift(D[2])),M.length&&(E="/"+M.join(".")+E),this.hostname=P.join(".");break}}}this.hostname.length>p?this.hostname="":this.hostname=this.hostname.toLowerCase(),k||(this.hostname=r.toASCII(this.hostname));var X=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+X,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==E[0]&&(E="/"+E))}if(!m[R])for(var O=0,A=u.length;O<A;O++){var U=u[O];if(-1!==E.indexOf(U)){var F=encodeURIComponent(U);F===U&&(F=escape(U)),E=E.split(U).join(F)}}var Y=E.indexOf("#");-1!==Y&&(this.hash=E.substr(Y),E=E.slice(0,Y));var B=E.indexOf("?");if(-1!==B?(this.search=E.substr(B),this.query=E.substr(B+1),t&&(this.query=v.parse(this.query)),E=E.slice(0,B)):t&&(this.search="",this.query={}),E&&(this.pathname=E),g[R]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var X=this.pathname||"",H=this.search||"";this.path=X+H}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":")+"@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=v.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var c=Object.keys(e),u=0;u<c.length;u++){var d=c[u];"protocol"!==d&&(n[d]=e[d])}return g[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!g[e.protocol]){for(var l=Object.keys(e),p=0;p<l.length;p++){var f=l[p];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||b[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",v=n.search||"";n.path=m+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),S=e.host||e.pathname&&"/"===e.pathname.charAt(0),E=S||y||n.host&&e.pathname,T=E,C=n.pathname&&n.pathname.split("/")||[],h=e.pathname&&e.pathname.split("/")||[],R=n.protocol&&!g[n.protocol];if(R&&(n.hostname="",n.port=null,n.host&&(""===C[0]?C[0]=n.host:C.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[
300]?h[0]=e.host:h.unshift(e.host)),e.host=null),E=E&&(""===h[0]||""===C[0])),S)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,C=h;else if(h.length)C||(C=[]),C.pop(),C=C.concat(h),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(R){n.hostname=n.host=C.shift();var I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");I&&(n.auth=I.shift(),n.host=n.hostname=I.shift())}return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!C.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var _=C.slice(-1)[0],w=(n.host||e.host||C.length>1)&&("."===_||".."===_)||""===_,x=0,O=C.length;O>=0;O--)"."===(_=C[O])?C.splice(O,1):".."===_?(C.splice(O,1),x++):x&&(C.splice(O,1),x--);if(!E&&!T)for(;x--;)C.unshift("..");E&&""!==C[0]&&(!C[0]||"/"!==C[0].charAt(0))&&C.unshift(""),w&&"/"!==C.join("/").substr(-1)&&C.push("");var N=""===C[0]||C[0]&&"/"===C[0].charAt(0);if(R){n.hostname=n.host=N?"":C.length?C.shift():"";var I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");I&&(n.auth=I.shift(),n.host=n.hostname=I.shift())}return(E=E||n.host&&C.length)&&!N&&C.unshift(""),C.length?n.pathname=C.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";let r,i,o=n(15),s=n(19),a=n(1)("guidStorage"),c={};e.exports=c;let u=function(e){return!(o(e.get)&&o(e.set))},d=function(e){i?e(null,i):r.get(e)};c.override=e=>{if(u(e))throw Error("The storageInterface argument does not seem to be valid, it must implement get and set methods");r!==e&&(r=e,i&&r.set(i,e=>{e&&a.error(`Failed to send initial Guid value (${i}) to the newly assigned Guid Storage. The error was: ${e}`)}))},c.get=e=>{d((t,n)=>{t?e(t):(n?i||(i=n):(n=s(),r.set(n,t=>{t?e(t):i=n})),e(null,i))})},c.override({get(e){let t;try{t=window.localStorage.getItem("opentok_client_id")}catch(e){t||(t=s())}e(null,t)},set(e,t){try{window.localStorage.setItem("opentok_client_id",e)}catch(e){}t(null)}}),c.set=e=>{i=e}},function(e,t){var n="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"u">typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=Array(16);e.exports=function(){for(var e,t=0;t<16;t++)(3&t)==0&&(e=0x100000000*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return""+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]}},function(e,t,n){"use strict";let r=n(7),i=n(1)("analytics"),o=n(528),s=n(19),a=n(245),c=n(138).prependProxyToUrlIfNeeded,u=n(139).getProxyUrl,d=s(),l=new o;e.exports=function(e){var t=this;let n=e.loggingUrl,o=e.queue,s=void 0===o?l:o,p=e.ajax,f=void 0===p?a:p;this.loggingUrl=n,this.updateEndPoints=()=>{if(!this.proxyUrl){this.proxyUrl=u();let e=c(this.loggingUrl,this.proxyUrl);this.loggingUrl=e}this.endPoint=`${this.loggingUrl}/logging/ClientEvent`,this.endPointQos=`${this.loggingUrl}/logging/ClientQos`},this.updateEndPoints();let h={},m=function(e,n,r){void 0===n&&(n=()=>{}),s.add(o=>{i.debug("sending analytics:",t.loggingUrl,e),f.post(r?t.endPointQos:t.endPoint,{body:e,overrideMimeType:"text/plain",headers:{Accept:"text/plain","Content-Type":"application/json"}},e=>{e&&i.debug("Failed to send ClientEvent, moving on to the next item."),n(e||void 0),o()})})},b=(e,t,n)=>{if(!n)return!1;let r=[n,t,e].join("_"),i=100;
30return(h[r]||0)>=i};this.logError=function(e,n,i,o,s){void 0===o&&(o=null),void 0===s&&(s={});let a=s.partnerId;if(b(e,n,a))return;let c=[a,n,e].join("_"),u=o;h[c]=void 0!==h[c]?h[c]+1:1,t.logEvent(r(s,{action:`${n}.${e}`,payload:u}),!1)},this.logEvent=function(e,n,r,o){let s;if(void 0===n&&(n=!1),void 0===o&&(o=()=>{}),t.updateEndPoints(),e.clientInstanceId=d,r&&!isNaN(r)&&Math.random()>r)return void i.debug("skipping sending analytics due to throttle:",e);i.debug("queueing analytics:",t.loggingUrl,e);try{s=JSON.stringify(e)}catch(e){o(e);return}m(s,o,n)},this.logQOS=e=>this.logEvent(e,!0)}},function(e,t,n){"use strict";let r=n(246),i=n(2),o=n(248),s=n(7),a={};function c(e){if("string"==typeof e)return e;let t=[];return Object.keys(e).forEach(n=>{t.push(`${encodeURIComponent(n)}=${encodeURIComponent(e[n])}`)}),t.join("&").replace(/\+/g,"%20")}e.exports=a,"Node"!==i.name&&(a.request=function(e,t,n){let i=new window.XMLHttpRequest,o=t||{};if(!o.method)return void n(Error("No HTTP method specified in options"));for(let s in t.overrideMimeType&&(i.overrideMimeType&&i.overrideMimeType(t.overrideMimeType),delete t.overrideMimeType),n&&(r(i).on("load",e=>{let t=e.target.status;t>=200&&(t<300||304===t)?n(null,e):n(e)}),r(i).on("error",n)),i.open(t.method,e,!0),o.headers||(o.headers={}),o.headers)Object.prototype.hasOwnProperty.call(o.headers,s)&&i.setRequestHeader(s,o.headers[s]);i.send(t.body&&c(t.body))},a.get=function(e,t,n){let r=s(t||{},{method:"GET"});a.request(e,r,n)},a.post=function(e,t,n){let r=s(t||{},{method:"POST"});a.request(e,r,n)},a.getJSON=function(e,t,n){let r=function(e,t){if(e)n(e,t&&t.target&&t.target.responseText);else{let e;try{e=JSON.parse(t.target.responseText)}catch(e){n(e,t&&t.target&&t.target.responseText);return}n(null,e,t)}},i=s({Accept:"application/json"},(t=t||{}).headers||{});a.get(e,s(t||{},{headers:i}),r)},o(a))},function(e,t,n){"use strict";let r=n(247);e.exports=function(e,t){return new r(e,t)}},function(e,t,n){"use strict";let r=n(15),i={attributes:n(529),css:n(530),classNames:n(535),observers:n(537)},o=/^#([\w-]*)$/,s=function(e){return Array.prototype.slice.call(e)},a=function(e,t){let n;if(void 0===e)return[];if("string"==typeof e){n=[];let r=o.exec(e);if(t=t||document,r&&r[1]){let e=t.getElementById(r[1]);e&&n.push(e)}else n=t.querySelectorAll(e)}else e&&(e.nodeType||window.XMLHttpRequest&&e instanceof window.XMLHttpRequest||e===window)?(n=[e],t=e):Array.isArray(e)?(n=e.slice(),t=null):n=s(n);return n},c=function(e,t){let n=a(e,t);this.context=t,this.toArray=function(){return n},this.length=n.length,this.first=n[0],this.last=n[n.length-1],this.get=function(e){return void 0===e?n:n[e]}};e.exports=c,c._attachToOTHelpers={},c._attachToOTHelpers.removeElement=function(e){return new c(e).remove()},c.prototype.getAsArray=function(){let e=this.get();return r(e.forEach)||(e=s(e)),e},c.prototype.some=function(e,t){return this.getAsArray().some(e,t)},c.prototype.forEach=function(e,t){return this.getAsArray().forEach(e,t),this},c.prototype.map=function(e,t){return new c(this.getAsArray().map(e,t),this.context)},c.prototype.filter=function(e,t){return new c(this.getAsArray().filter(e,t),this.context)},c.prototype.find=function(e){return new c(e,this.first)},c.prototype.on=function(e,t){return this.forEach(n=>{n.addEventListener(e,t,!1)})},c.prototype.off=function(e,t){return this.forEach(n=>{n.removeEventListener(e,t,!1)})},c.prototype.once=function(e,t){let n=(function(){this.off(e,n),t(...arguments)}).bind(this);return this.on(e,n)},c.prototype.appendTo=function(e){if(!e)throw Error("appendTo requires a DOMElement to append to.");return this.forEach(t=>{e.appendChild(t)})},c.prototype.append=function(){let e=this.first;return e&&Array.prototype.forEach.call(arguments,t=>{e.appendChild(t)}),this},c.prototype.prepend=function(){let e;if(0==arguments.length)return this;let t=this.first;return t&&(e=Array.prototype.slice.call(arguments),t.firstElementChild||t.appendChild(e.shift()),e.forEach(e=>{t.insertBefore(e,t.firstElementChild)})),this},c.prototype.after=function(e){if(!e)throw Error("after requires a DOMElement to insert after");return this.forEach(t=>{t.parentElement&&(e!==t.parentNode.lastChild?t.parentElement.insertBefore(t,e):t.parentElement.appendChild(t))})},c.prototype.before=function(e){if(!e)throw Error("before requires a DOMElement to insert before");return this.forEach(t=>{t.parentElement&&t.parentElement.insertBefore(t,e)})}
30,c.prototype.remove=function(){return this.forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)})},c.prototype.empty=function(){return this.forEach(e=>{for(;e.firstChild;)e.removeChild(e.firstChild)})},c.prototype.isDisplayNone=function(){return this.some(e=>(0===e.offsetWidth||0===e.offsetHeight)&&"none"===new c(e).css("display")||!!e.parentNode&&!!e.parentNode.style&&new c(e.parentNode).isDisplayNone())};let u=function e(t){return(0===t.offsetWidth||0===t.offsetHeight)&&"none"===new c(t).css("display")?t:t.parentNode&&t.parentNode.style?e(t.parentNode):null};c._attachToOTHelpers.emptyElement=function(e){return new c(e).empty()},c._attachToOTHelpers._findElementWithDisplayNone=u,i.css(c,u),i.attributes(c),i.classNames(c),i.observers(c),["on","off","isDisplayNone","show","hide","css","makeVisibleAndYield","addClass","removeClass"].forEach(e=>{c._attachToOTHelpers[e]=function(){let t=Array.prototype.slice.apply(arguments),n=new c(t.shift());return c.prototype[e].apply(n,t)}})},function(e,t,n){"use strict";e.exports=function(e){let t={};Object.keys(e).forEach(n=>{t[n]=e[n]}),e._attachToOTHelpers=t}},function(e,t,n){"use strict";let r=n(15),i=n(6),o=n(1)("Collection");e.exports=function(e){let t=[],n={},s=e||"id";i(this);let a=function(e,t){return r(e[t])?e[t]():e[t]},c=(function(e){this.trigger("update",e),this.trigger(`update:${e.target.id}`,e)}).bind(this),u=(function(e){this.remove(e.target,e.reason)}).bind(this);this.reset=function(){t.forEach(function(e){e.off("updated",c,this),e.off("destroyed",u,this)},this),t=[],n={}},this.destroy=function(e){t.forEach(t=>{t&&"function"==typeof t.destroy&&t.destroy(e,!0)}),this.reset(),this.off()},this.get=function(e){return e&&void 0!==n[e]?t[n[e]]:void 0},this.has=function(e){return e&&void 0!==n[e]},this.toString=function(){return t.toString()},this.where=function(e,n){return r(e)?t.filter(e,n):t.filter(t=>{for(let n in e)if(e.hasOwnProperty(n)&&a(t,n)!==e[n])return!1;return!0})},this.find=function(e,n){let i;i=(i=r(e)?e:function(t){for(let n in e)if(e.hasOwnProperty(n)&&a(t,n)!==e[n])return!1;return!0}).bind(n);for(let e=0;e<t.length;++e)if(!0===i(t[e]))return t[e];return null},this.forEach=function(e,n){return t.forEach(e,n),this},this.map=function(e){return t.map(e)},this.add=function(e){let r=a(e,s);return this.has(r)?o.warn(`Model ${r} is already in the collection`,t):(n[r]=t.push(e)-1,e.on("updated",c,this),e.on("destroyed",u,this),this.trigger("add",e),this.trigger(`add:${r}`,e)),this},this.remove=function(e,r){let i=a(e,s);t.splice(n[i],1);for(let e=n[i];e<t.length;++e)n[a(t[e],s)]=e;return delete n[i],e.off("updated",c,this),e.off("destroyed",u,this),this.trigger("remove",e,r),this.trigger(`remove:${i}`,e,r),this},this._triggerAddEvents=function(){this.where.apply(this,arguments).forEach(function(e){this.trigger("add",e),this.trigger(`add:${a(e,s)}`,e)},this)},this.length=function(){return t.length}}},function(e,t,n){"use strict";let r=n(1)("deprecation");e.exports=function(e,t,n){let i=void 0===n?{}:n,o=i.value,s=i.name,a=void 0===s?`${t}`:s,c=i.getWarning,u=void 0===c?"":c,d=i.setWarning,l=void 0===d?"":d,p=i.canSet,f=void 0!==p&&p,h=i.warnOnSet,m=o,b=!1,g=!(void 0!==h&&h);Object.defineProperty(e,t,{get:()=>(b||(b=!0,r.warn(`${a} is deprecated, and will be removed in the future. ${u}`.trim())),m),set(e){f&&(m=e),g||(g=!0,f?r.warn(`${a} is deprecated. ${l}`.trim()):r.warn(`${a} is deprecated, and will be removed in the future. ${l}`.trim()))}})}},function(e,t,n){"use strict";let r,i=n(2),o=n(9),s=["description","fileName","lineNumber","message","name","number","stack"],a=function(e,t,n){switch(arguments.length){case 1:o(e)&&(n=e,t=void 0,e=void 0);break;case 2:o(t)&&(n=t,t=void 0)}if(n instanceof Error)for(let e=0,t=s.length;e<t;++e)this[s[e]]=n[s[e]];else if(o(n))for(let e in n)n.hasOwnProperty(e)&&(this[e]=n[e]);if(!(this.fileName&&this.lineNumber&&this.columnNumber&&this.stack)){let e=r();!this.fileName&&e.fileName&&(this.fileName=e.fileName),!this.lineNumber&&e.lineNumber&&(this.lineNumber=e.lineNumber),!this.columnNumber&&e.columnNumber&&(this.columnNumber=e.columnNumber),!this.stack&&e.stack&&(this.stack=e.stack)}
30!this.message&&e&&(this.message=e),(!this.name||"Error"===this.name)&&t&&(this.name=t)};e.exports=a,a.prototype=Object.create(Error.prototype),a.prototype.toString=function(){let e="";return this.fileName&&(e+=` ${this.fileName}`),this.lineNumber&&(e+=` ${this.lineNumber}`,this.columnNumber&&(e+=`:${this.columnNumber}`)),`<${this.name?`${this.name} `:""}${this.message}${e}>`},a.prototype.valueOf=a.prototype.toString;let c=function(e,t){return t.slice(2).map(e=>{let t={fileName:e.getFileName(),linenumber:e.getLineNumber(),columnNumber:e.getColumnNumber()};return e.getFunctionName()&&(t.functionName=e.getFunctionName()),e.getMethodName()&&(t.methodName=e.getMethodName()),e.getThis()&&(t.self=e.getThis()),t})};r=function(){let e,t,n,r={};switch(i.name){case"Firefox":case"Safari":try{window.call.js.is.explody()}catch(e){n=e}(e=(n.stack||"").split("\n")).shift(),e.shift(),r.stack=e,(t=/@(.+?):([0-9]+)(:([0-9]+))?$/.exec(e[0]))&&(r.fileName=t[1],r.lineNumber=parseInt(t[2],10),t.length>3&&(r.columnNumber=parseInt(t[4],10)));break;case"Chrome":case"Node":case"Opera":var o=Error.prepareStackTrace;Error.prepareStackTrace=c,r.stack=(n=Error()).stack,Error.prepareStackTrace=o;var s=r.stack[0];r.lineNumber=s.lineNumber,r.columnNumber=s.columnNumber,r.fileName=s.fileName,s.functionName&&(r.functionName=s.functionName),s.methodName&&(r.methodName=s.methodName),s.self&&(r.self=s.self);break;default:(n=Error()).stack&&(r.stack=n.stack.split("\n"))}return n.message&&(r.message=n.message),r}},function(e,t,n){"use strict";var r={};r.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},r.localCName=r.generateIdentifier(),r.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},r.splitSections=function(e){return e.split("\nm=").map(function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"})},r.getDescription=function(e){var t=r.splitSections(e);return t&&t[0]},r.getMediaSections=function(e){var t=r.splitSections(e);return t.shift(),t},r.matchPrefix=function(e,t){return r.splitLines(e).filter(function(e){return 0===e.indexOf(t)})},r.parseCandidate=function(e){for(var t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "),n={foundation:t[0],component:parseInt(t[1],10),protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]},r=8;r<t.length;r+=2)switch(t[r]){case"raddr":n.relatedAddress=t[r+1];break;case"rport":n.relatedPort=parseInt(t[r+1],10);break;case"tcptype":n.tcpType=t[r+1];break;case"ufrag":n.ufrag=t[r+1],n.usernameFragment=t[r+1];break;default:n[t[r]]=t[r+1]}return n},r.writeCandidate=function(e){var t=[];t.push(e.foundation),t.push(e.component),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);var n=e.type;return t.push("typ"),t.push(n),"host"!==n&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.pu
vendor: 5,879 bytes, line 30
30sh(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},r.parseIceOptions=function(e){return e.substr(14).split(" ")},r.parseRtpMap=function(e){var t=e.substr(9).split(" "),n={payloadType:parseInt(t.shift(),10)};return n.name=(t=t[0].split("/"))[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},r.writeRtpMap=function(e){var t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);var n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},r.parseExtmap=function(e){var t=e.substr(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},r.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},r.parseFmtp=function(e){for(var t,n={},r=e.substr(e.indexOf(" ")+1).split(";"),i=0;i<r.length;i++)n[(t=r[i].trim().split("="))[0].trim()]=t[1];return n},r.writeFmtp=function(e){var t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){var r=[];Object.keys(e.parameters).forEach(function(t){e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},r.parseRtcpFb=function(e){var t=e.substr(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},r.writeRtcpFb=function(e){var t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(function(e){t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},r.parseSsrcMedia=function(e){var t=e.indexOf(" "),n={ssrc:parseInt(e.substr(7,t-7),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},r.parseSsrcGroup=function(e){var t=e.substr(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(function(e){return parseInt(e,10)})}},r.getMid=function(e){var t=r.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)},r.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},r.getDtlsParameters=function(e,t){return{role:"auto",fingerprints:r.matchPrefix(e+t,"a=fingerprint:").map(r.parseFingerprint)}},r.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},r.parseCryptoLine=function(e){var t=e.substr(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},r.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?r.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},r.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;var t=e.substr(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},r.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},r.getCryptoParameters=function(e,t){return r.matchPrefix(e+t,"a=crypto:").map(r.parseCryptoLine)},r.getIceParameters=function(e,t){var n=r.matchPrefix(e+t,"a=ice-ufrag:")[0],i=r.matchPrefix(e+t,"a=ice-pwd:")[0];return n&&i?{usernameFragment:n.substr(12),password:i.substr(10)}:null},r.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},r.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(e)[0].split(" "),i=3;i<n.length;i++){var o=n[i],s=r.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(s){var a=r.parseRtpMap(s),c=r.matchPrefix(e,"a=fmtp:"+o+" ");switch(a.parameters=c.length?r.parseFmtp(c[0]):{},a.rtcpFeedback=r.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(r.parseRtcpFb),t.codecs.push(a),a.name.toUpperCase()){case"RED":case"ULPFEC":t.fecMechanisms.push(a.name.toUpperCase())}}}return r.matchPrefix(e,"a=extmap:").forEach(function(e){t.headerExtensions.push(r.parseExtmap(e))}),t},r.writeRtpDescription=function(e,t){var n="";n+="m="+e+" ",n+=t.codecs.length>0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=t.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(function(e){n+=r.writeRtpMap(e),n+=r.writeFmtp(e),n+=r.writeRtcpFb(e)});var i=0;return t.codecs.forEach(function(e){e.maxptime>i&&(i=e.maxptime)}),i>0&&(n+="a=maxptime:"+i+"\r\n"),n+="a=rtcp-mux\r\n",t.headerExtensions&&t.headerExtensions.forEach(function(e){n+=r.writeExtmap(e)}),n},r.parseRtpEncodingParameters=function(e){var t,n=[],i=r.parseRtpParameters(e),o=-1!==i.fecMechanisms.indexOf("RED"),s=-1!==i.fecMechanisms.indexOf("ULPFEC"),a=r.matchPrefix(e,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),c=a.length>0&&a[0].ssrc,u=r.matchPrefix(e,"a=ssrc-group:FID").map(function(e){return e.substr(17).split(" ").map(function(e){return parseInt(e,10)})});u.length>0&&u[0].length>1&&u[0][0]===c&&(t=u[0][1]),i.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var r={ssrc:c,codecPayloadType:parseInt(e.parameters.apt,10)};c&&t&&(r.rtx={ssrc:t}),n.push(r),o&&((r=JSON.parse(JSON.stringify(r))).fec={ssrc:c,mechanism:s?"red+ulpfec":"red"},n.push(r))}}),0===n.length&&c&&n.push({ssrc:c});var d=r.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substr(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substr(5),10)*.95-16e3:void 0,n.forEac
30h(function(e){e.maxBitrate=d})),n},r.parseRtcpParameters=function(e){var t={},n=r.matchPrefix(e,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];n&&(t.cname=n.value,t.ssrc=n.ssrc);var i=r.matchPrefix(e,"a=rtcp-rsize");return t.reducedSize=i.length>0,t.compound=0===i.length,t.mux=r.matchPrefix(e,"a=rtcp-mux").length>0,t},r.parseMsid=function(e){var t,n=r.matchPrefix(e,"a=msid:");if(1===n.length)return{stream:(t=n[0].substr(7).split(" "))[0],track:t[1]};var i=r.matchPrefix(e,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});if(i.length>0)return{stream:(t=i[0].value.split(" "))[0],track:t[1]}},r.parseSctpDescription=function(e){var t,n=r.parseMLine(e),i=r.matchPrefix(e,"a=max-message-size:");i.length>0&&(t=parseInt(i[0].substr(19),10)),isNaN(t)&&(t=65536);var o=r.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substr(12),10),protocol:n.fmt,maxMessageSize:t};if(r.matchPrefix(e,"a=sctpmap:").length>0){var s=r.matchPrefix(e,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(s[0],10),protocol:s[1],maxMessageSize:t}}},r.writeSctpDescription=function(e,t){var n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},r.generateSessionId=function(){return Math.random().toString().substr(2,21)},r.writeSessionBoilerplate=function(e,t,n){var i,o=void 0!==t?t:2;return"v=0\r\no="+(n||"thisisadapterortc")+" "+(i=e||r.generateSessionId())+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.writeMediaSection=function(e,t,n,i){var o=r.writeRtpDescription(e.kind,t);if(o+=r.writeIceParameters(e.iceGatherer.getLocalParameters()),o+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),o+="a=mid:"+e.mid+"\r\n",e.direction?o+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?o+="a=sendrecv\r\n":e.rtpSender?o+="a=sendonly\r\n":e.rtpReceiver?o+="a=recvonly\r\n":o+="a=inactive\r\n",e.rtpSender){var s="msid:"+i.id+" "+e.rtpSender.track.id+"\r\n";o+="a="+s,o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+s,e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+s,o+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),o},r.getDirection=function(e,t){for(var n=r.splitLines(e),i=0;i<n.length;i++)switch(n[i]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[i].substr(2)}return t?r.getDirection(t):"sendrecv"},r.getKind=function(e){return r.splitLines(e)[0].split(" ")[0].substr(2)},r.isRejected=function(e){return"0"===e.split(" ",2)[1]},r.parseMLine=function(e){var t=r.splitLines(e)[0].substr(2).split(" ");return{kind:t[0],port:parseInt(t[1],10),protocol:t[2],fmt:t.slice(3).join(" ")}},r.parseOLine=function(e){var t=r.matchPrefix(e,"o=")[0].substr(2).split(" ");return{username:t[0],sessionId:t[1],sessionVersion:parseInt(t[2],10),netType:t[3],addressType:t[4],address:t[5]}},r.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;for(var t=r.splitLines(e),n=0;n<t.length;n++)if(t[n].length<2||"="!==t[n].charAt(1))return!1;return!0},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return -1!==["Chrome","Safari","Edge","Opera"].indexOf(e.browserName)&&("Edge"!==e.browserName||e.isChromiumEdge)&&(!e.isScreenSharing||e.capableSimulcastScreenshare)&&!e.sessionInfo.p2pEnabled&&(e.constraints.video||e.isCustomVideoTrack)?e.videoDimensions.width>640&&e.videoDimensions.height>480?3:2:1}},function(e,t,n){"use strict";var r=n(3)(n(18));let i=n(49);e.exports=function(){function e(e,t){var n;let o=(void 0===t?{}:t).requestAnimationFrame,s=void 0===o?(n=window).requestAnimationFrame.bind(n):o;(0,r.default)(this,"_lastCalled",i()),(0,r.default)(this,"_audioLevel",void 0),(0,r.default)(this,"_running",!1),this._requestAnimationFrame=s,this._getAudioLevel=e,this._startLoop()}var t=e.prototype;return t._startLoop=function(){this._running||(this._running=!0,this._requestAnimationFrame(this._loop.bind(this)))},t._loop=function(){this._getAudioLevel((e,t)=>{let n=null;if(!e){for(let e=0;e<t.length;e+=1){let r=t[e],i=null;if(void 0!==r.audioOutputLevel){let e=parseFloat(r.audioOutputLevel)/32768;isNaN(e)||(i=e)}else void 0!==r.audioLevel&&(i=r.audioLevel);null!==i&&(null===n||i>n)&&(n=i)}this._audioLevel=n,this._running&&i()-this._lastCalled<1e4?this._requestAnimationFrame(this._loop.bind(this)):this._running=!1}})},t.destroy=function(){this._running=!1},t.sample=function(e){if("function"==typeof e)throw Error("sample no longer takes a callback");return this._startLoop(),this._lastCalled=i(),this._audioLevel},e}()},function(e,t,n){"use strict";let r=n(147),i=n(564),o=n(149);function s(e,t,n){return(!!e.publish||!t)&&("boolean"==typeof e.source?e.source:n?{mandatory:{sourceId:e.source}}:o(e.source)?{}:{deviceId:{exact:e.source}})}function a(e){let t=s(e.audio,e.enableRenegotiation,e.usingOptionalMandatoryStyle);if(!1===t)return!1;let n=e.usingOptionalMandatoryStyle,i=e.enableStereo,o=e.echoCancellation,a=e.noiseSuppression,c=e.autoGainControl,u=e.disableAudioProcessing,d=e
30=>{"object"==typeof t&&(n?(r(t,{optional:[]}),t.optional.push(e)):r(t,e))};return!i&&!u&&o&&a&&c||!0!==t||(t={}),i&&d({channelCount:2}),["echoCancellation","autoGainControl","noiseSuppression"].forEach(t=>{let n=!u&&e[t];d({[t]:n})}),t}function c(e){let t=s(e.video,e.enableRenegotiation,e.usingOptionalMandatoryStyle);if(!1===t)return!1;let n=e.videoDimensions,i=e.frameRate,o=e.maxResolution,a=e.facingMode,c=e.usingOptionalMandatoryStyle;if((n||i||o||a)&&!0===t&&(t={}),n){let e=n.width,i=n.height;c?(r(t,{optional:[]}),t.optional.push({minWidth:e},{maxWidth:e},{minHeight:i},{maxHeight:i})):r(t,{width:{ideal:e},height:{ideal:i}})}return i&&(c?(r(t,{optional:[]}),t.optional.push({minFrameRate:i},{maxFrameRate:i})):r(t,{frameRate:{ideal:i}})),o&&(c?r(t,{mandatory:{maxWidth:o.width,maxHeight:o.height}}):r(t,{width:{max:o.width},height:{max:o.height}})),a&&(c?(r(t,{optional:[]}),t.optional.push({facingMode:a})):r(t,{facingMode:{ideal:a}})),t}function u(e){return{audio:a(e),video:c(e)}}e.exports=function(e){let t=i(e);return{constraints:u(t),publishAudio:t.audio.publish,publishVideo:t.video.publish,frameRate:t.frameRate,videoDimensions:t.videoDimensions,audioDeviceId:"string"==typeof t.audio.source?t.audio.source:void 0,videoDeviceId:"string"==typeof t.video.source?t.video.source:void 0}}},function(e,t,n){var r=n(64),i=n(52);e.exports=function(e,t,n){(void 0===n||i(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,n){"use strict";let r=n(2),i=r.name,o=r.version;e.exports=r.isChromiumEdge||"Chrome"===i&&o>=72||"Firefox"===i&&o>=66||"Opera"===i&&o>=60||"Safari"===i},function(e,t,n){var r=n(59),i=n(260);e.exports=function(e){return i(r(e).toLowerCase())}},function(e,t,n){e.exports=n(569)("toUpperCase")},function(e,t){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t,n){var r=n(571),i=n(262),o=n(572);e.exports=function(e){return i(e)?o(e):r(e)}},function(e,t,n){"use strict";let r=n(2);e.exports=!!(r.isChrome&&r.version>=74||r.isEdge&&r.version>=79)},function(e,t,n){"use strict";let r=n(2);e.exports=e=>!!r.isElectron&&e instanceof MediaStreamTrack&&"Screen"===e.label},function(e,t,n){var r=n(99);e.exports=n(578)(r)},function(e,t,n){"use strict";e.exports=15e3},function(e,t,n){"use strict";e.exports=function(e,t){return void 0===t&&(t=!1),void 0===e?t:"true"===e||!0===e}},function(e,t,n){"use strict";let r=n(2);e.exports=()=>!!(!r.isNode&&!r.isElectron)&&((r.isChrome||r.isOpera||r.isChromiumEdge)&&r.version>=74||r.isFirefox&&r.version>=68||r.isSafari&&r.version>=11)},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){var r=n(33),i=n(77),o=n(595),s=n(58),a=n(40),c=n(598),u=n(137),d=n(185),l=1,p=2,f=4;e.exports=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,function(t){return t=s(t,e),u||(u=t.length>1),t}),a(e,d(e),n),u&&(n=i(n,l|p|f,c));for(var h=t.length;h--;)o(n,t[h]);return n})},function(e,t,n){var r=n(206),i=n(35),o=n(96),s=Math.max;e.exports=function(e,t,n){var a=null==e?0:e.length;if(!a)return -1;var c=null==n?0:o(n);return c<0&&(c=s(a+c,0)),r(e,i(t,3),c)}},function(e,t,n){var r=n(600);e.exports=function(e){return e&&e.length?r(e):[]}},function(e,t,n){"use strict";let r=n(608),i=n(277),o=n(102)();e.exports=(e,t)=>{i(e,(e,n)=>{let i=[];o?"function"==typeof n.values?i=r(n.values()):"function"!=typeof n.forEach?i=Object.keys(n).map(e=>n[e]):n.forEach(e=>{i.push(e)}):n.result().forEach(e=>{let t={};e.names().forEach(n=>{t[n]=e.stat(n)}),t.id=e.id,t.type=e.type,t.timestamp=e.timestamp,i.push(t)}),t(null,i)})}},function(e,t,n){var r=n(29),i=n(10),o=n(16),s="[object String]";e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&r(e)==s}},function(e,t,n){var r=n(610),i=n(30);e.exports=function(e){return null==e?[]:r(e,i(e))}},function(e,t,n){"use strict";let r=n(102)(),i=(e,t)=>{e.getStats(null).then(e=>t(null,e)).catch(t)},o=(e,t)=>{e.getStats(e=>{t(null,e)},t)};e.exports=(e,t)=>{(r?i:o)(e,t)}},function(e,t,n){"use strict";var r=n(3);t.__esModule=!0,t.default=void 0;var i=r(n(157)),o=r(n(60)),s=r(n(18)),a=n(42),c=r(n(37)),u=r(n(620)),d=r(n(622)),l=r(n(49));let p=(0,r(n(1)).default)("QoS"),f=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call(this,...r)||this,(0,s.default)((0,i.default)(t),"_peerConnection",void 0),(0,s.default)((0,i.default)(t),"_isPublisher",void 0),(0,s.default)((0,i.default)(t),"timeoutId",void 0),(0,s.default)((0,i.default)(t),"_creationTime",(0,l.default)()),(0,s.default)((0,i.default)(t),"offerMessagesReceived",0),(0,s.default)((0,i.default)(t),"prevStats",{timeStamp:(0,l.default)()}),(0,s.default)((0,i.default)(t),"changeCounters",{videoCodec:new d.default,audioCodec:new d.default}),t}(0,o.default)(t,e);var n=t.prototype;return n.startCollecting=function(e,n){if(!e||!e.getStats)return;this._isPublisher=n;let r=!!this._peerConnection;if(this._peerConnection=e,r)return;let i=e=>{let n=(0,l.default)(),r={timeStamp:n,duration:Math.round((n-this._creationTime)/1e3),period:Math.round((n-this.prevStats.timeStamp)/1e3)};(0,u.default)(this._peerConnection,this.prevStats,r,this._isPublisher,(n,r)=>
30{n?p.error("Failed to Parse QOS Stats:",n):(this.handleParsedStats(r),clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>i(t.INTERVAL),e))})};this.timeoutId=setTimeout(()=>i(t.INTERVAL-t.INITIAL_INTERVAL),t.INITIAL_INTERVAL)},n.stopCollecting=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this._peerConnection=null},n.handleOfferMessageReceived=function(){this.offerMessagesReceived+=1},n.handleParsedStats=function(e){Object.keys(this.changeCounters).forEach(t=>{this.changeCounters[t].onValue(e[t]),e[`${t}ChangeCount`]=this.changeCounters[t].changeCount}),e.offerMessagesReceived=this.offerMessagesReceived;let t=(0,c.default)(e);["audioSentBytes","audioSentPackets","audioSentPacketsLost","videoSentBytes","videoSentPackets","videoSentPacketsLost","audioRecvBytes","audioRecvPackets","audioRecvPacketsLost","videoRecvBytes","videoRecvPackets","videoRecvPacketsLost"].forEach(n=>{t[n]=this.prevStats&&this.prevStats[n]?e[n]-this.prevStats[n]:e[n]}),this.prevStats&&this.prevStats.videoFramesReceived&&(t.videoFrameRateReceived=Math.round((e.videoFramesReceived-this.prevStats.videoFramesReceived)/e.period)),this.prevStats=e,delete t.framesDecoded,delete t.framesEncoded,this.emit("stats",t)},t}(a.EventEmitter);f.INITIAL_INTERVAL=1e3,f.INTERVAL=3e4,t.default=f},function(e,t,n){"use strict";e.exports=e=>{switch(e>>24){case 0:return"TURN/TLS";case 1:return"TURN/TCP";case 2:return"TURN/UDP";default:return""}}},function(e,t,n){"use strict";let r=n(19),i=n(160).default,o=n(4),s=n(11);e.exports=function(e){let t=void 0===e?{}:e,n=t.haveGetDisplayMedia,a=void 0===n?i:n,c=t.global,u=void 0===c?window:c,d=t.Errors,l=void 0===d?o:d,p=t.otError,f=void 0===p?s():p,h=!a&&!!u.navigator.webkitGetUserMedia&&!u.navigator.userAgent.match(/android/i)&&void 0!==u.chrome;return{isSupportedInThisBrowser:h,autoRegisters:!1,extensionRequired:!0,getConstraintsShowsPermissionUI:!0,sources:{screen:!0,application:!1,window:!0,browser:!0},register(e,t){return 2===t?this.registerVersion2(e):this.registerVersion1(e)},registerVersion1(e){let t;if(!e)throw Error("initChromeScreenSharingExtensionHelper: extensionID is required.");let n=h,i={},o=`com.tokbox.screenSharing.${e}`,s=function(e,t){let n={payload:t,from:"jsapi"};return n[o]=e,n},a=function(e,t){let n,o=r();return i[o]=function(){clearTimeout(n),n=null,e(...arguments)},t&&(n=setTimeout(()=>{delete i[o],e(f(l.TIMEOUT,Error("Timeout waiting for response to screensharing request.")))},t)),o},c=function(e){if(!e)throw Error("isAvailable: callback is required.");if(!n)return void setTimeout(e.bind(null,!1));if(void 0!==t)setTimeout(e.bind(null,t));else{let n=s("isExtensionInstalled",{requestId:a(n=>{!0!==t&&(t="extensionLoaded"===n),e(t)},2e3)});u.postMessage(n,"*")}},d=function(e,t,n){if(!n)throw Error("getSourceId: callback is required");c(r=>{if(!r)return n(f(l.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,Error("Extension is not installed")));let i=a((e,r)=>{"object"==typeof e&&e.name&&e.stack?n(e):"permissionDenied"===e?n(f(l.USER_MEDIA_ACCESS_DENIED,Error("User denied access to screensharing"))):(t.video||(t.video={}),t.video.mandatory||(t.video.mandatory={}),t.video.mandatory.chromeMediaSource="desktop",t.video.mandatory.chromeMediaSourceId=r.sourceId,n(void 0,t))});u.postMessage(s("getSourceId",{requestId:i,source:e}),"*")})};return u.addEventListener("message",e=>{if(e.origin!==u.location.origin||null==e.data||"object"!=typeof e.data||"extension"!==e.data.from)return;let n=e.data[o],r=e.data.payload;if(r&&r.requestId){let e=i[r.requestId];delete i[r.requestId],e&&e(n,r)}"extensionLoaded"===n&&(t=!0)}),{extensionAPIVersion:1,extensionID:e,isInstalled:c,getConstraints:d}},registerVersion2(e){let t=h&&void 0!==u.chrome.runtime,n=function(n){if(!n)throw Error("isAvailable: callback is required.");t?u.chrome.runtime.sendMessage(e,{type:"isInstalled"},null,e=>{setTimeout(n.bind(null,!!e))}):setTimeout(n.bind(null,!1))},r=function(t,r,i){if(!i)throw Error("getSourceId: callback is required");n(n=>{if(!n)return i(f(l.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,Error("Extension is not installed")));u.chrome.runtime.sendMessage(e,{type:"getSourceId",source:t},null,e=>{"permissionDenied"===e.error?i(f(l.USER_MEDIA_ACCESS_DENIED,Error("User denied access to screensharing"))):e.error?i(Error(`UnexpectError: ${e.error}`)):(r.video||(r.video={}),r.video.mandatory||(r.video.mandatory={}),r.video.mandatory.chromeMediaSource="desktop",r.video.mandatory.chromeMediaSourceId=e.sourceId,i(void 0,r))})})};return{extensionAPIVersion:2,extensionID:e,isInstalled:n,getConstraints:r}}}}},function(e,t,n){"use strict";(function(t){let r=n(155),i=n(103);e.exports=function(e){void 0===e&&(e={});
30let o=e.Archiving||n(626),s=e.AudioLevelMeter||n(282),a=e.AudioLevelTransformer||n(143),c=e.BackingBar||n(283),u=e.Chrome||n(144),d=e.MuteButton||n(284)(),l=e.NamePanel||n(285),p=e.StylableComponent||n(152),f=e.logging||n(1)("createChromeMixin");return function(e,n){let h,m,b,g=void 0===n?{}:n,v=g.name,y=g.publishAudio,S=g.publishVideo,E=g.audioSource,T=g.showControls,C=g.shouldAllowAudio,R=g.logAnalyticsEvent,I={},_=r(),w=t=>{if(!1===t)return"off";let n=e.getStyle("buttonDisplayMode");return!1===n?"on":n},x=new t((t,n)=>{I.init=n=>{e.getStyle("showArchiveStatus")||R("showArchiveStatus","createChrome",{mode:"off"});let r={backingBar:new c({nameMode:v?e.getStyle("nameDisplayMode"):"off",muteMode:w(e.getStyle("buttonDisplayMode"))}),name:new l({name:v,mode:e.getStyle("nameDisplayMode")}),archive:new o({show:!!e.getStyle("showArchiveStatus")&&"off"!==e.getStyle("archiveStatusDisplayMode"),archiving:!1}),muteButton:new d({muted:!1===y,mode:w.call(null,e.getStyle("buttonDisplayMode"))})};h=new s({mode:e.getStyle("audioLevelDisplayMode")});let p=new a,f=new i(()=>{let t=y?p.transform(e.loudness):0;h.setValue(t)});h.watchVisibilityChanged(e=>{e?f.start():f.stop()}),h.audioOnly(!S&&y),r.audioLevel=h,n&&n.domElement&&(m=new u({parent:(b=n).domElement}).set(r).on({muted:()=>e.publishAudio(!1),unmuted:()=>e.publishAudio(!0)}),(null===E||!1===E)&&I.removeAudioTrack(),t())},I.reset=()=>{n(Error("Chrome still being created")),m&&(m.destroy(),m=null)},I.destroy=()=>{I.reset(),_.releaseAll(),x=null}});x.catch(e=>{e&&"Chrome still being created"===e.message||f.error("createChromeMixin failed to setup UI",e)}),I.setAudioOnly=e=>{h&&h.audioOnly(e)},I.setArchivingStatus=e=>{m&&m.archive.setArchiving(e)},I.setMuted=e=>{m&&m.muteButton&&m.muteButton.muted(e)},I.removeAudioTrack=()=>{m&&m.muteButton&&m.muteButton.remove()},I.addAudioTrack=()=>{m&&m.muteButton&&m.muteButton.add()},p(e,{showArchiveStatus:!0,nameDisplayMode:"auto",buttonDisplayMode:"auto",audioLevelDisplayMode:C?"auto":"off",archiveStatusDisplayMode:"auto",backgroundImageURI:null},T,e=>{R("SetStyle","Publisher",e,null,.1)});let O=(e,t)=>{x.then(()=>{switch(e){case"nameDisplayMode":m.name.setDisplayMode(t),m.backingBar.setNameMode(t);break;case"showArchiveStatus":R("showArchiveStatus","styleChange",{mode:t?"on":"off"}),m.archive.setShowArchiveStatus(!!t);break;case"archiveStatusDisplayMode":m.archive.setShowArchiveStatus("off"!==t);break;case"buttonDisplayMode":m.muteButton.setDisplayMode(t),m.backingBar.setMuteMode(t);break;case"audioLevelDisplayMode":m.audioLevel.setDisplayMode(t);break;case"backgroundImageURI":b.setBackgroundImageURI(t)}})};return e.on("styleValueChanged",O),_.add(()=>e.off("styleValueChanged",O)),I}}}).call(this,n(0))},function(e,t,n){"use strict";(function(t){let r=n(104),i=n(36),o=n(5),s=n(42);e.exports=function(e){let n,a,c,u,d=this,l=new s,p=!0,f=!1,h="auto",m=e.maxValue||1,b=e.minValue||0;function g(){a=o.createElement("div",{className:"OT_audio-level-meter__value"},""),n=o.createElement("div",{className:"OT_audio-level-meter__audio-only-img"},"");let e=d.domElement;e.appendChild(n),e.appendChild(a),d.watchVisibilityChanged(e=>{e?o.removeClass(d.domElement,"OT_hide-forced"):o.addClass(d.domElement,"OT_hide-forced")})}function v(){l.removeAllListeners("visibilityChanged")}function y(){let e=(c-b)/(m-b);a.style.transform=`scale(${Math.sqrt(e)})`}function S(){let e=(f&&"auto"===h||"on"===h)&&p;u!==e&&(u=e,l.emit("visibilityChanged",e))}r(d,{audioOnly:{get:()=>f,set(e){f=e,S()}}}),d.setValue=function(e){c=e,y()},d.watchVisibilityChanged=function(e){return l.on("visibilityChanged",e),t.resolve().then(()=>{e(u)}),function(){l.removeListener("visibilityChanged",e)}},i(this,{mode:e?e.mode:"auto",nodeName:"div",htmlAttributes:{className:"OT_audio-level-meter"},onCreate:g,onDestroy:v}),d.setDisplayMode=function(e){h=e,S()},d.getDisplayMode=function(){return h},d.showAfterLoading=function(){p=!0,S()},d.hideWhileLoading=function(){p=!1,S()},S()}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(36);e.exports=function(e){let t=e.nameMode,n=e.muteMode;function i(){return"on"===t||"on"===n?"on":"mini"===t||"mini"===n?"mini":"mini-auto"===t||"mini-auto"===n?"mini-auto":"auto"===t||"auto"===n?"auto":"off"}r(this,{mode:i(),nodeName:"div",htmlContent:"",htmlAttributes:{className:"OT_bar OT_edge-bar-item"}}),this.setNameMode=function(e){t=e,this.setDisplayMode(i())},this.setMuteMode=function(e){n=e,this.setDisplayMode(i())}}},function(e,t,n){"use strict";let r=n(5),i=n(36),o=n(104);e.exports=function(e){void 0===e&&(e={});let t=e.OTHelpers||r,n=e.Widget||i;return function(e){let r,i=e.muted||!1,s=()=>{i?t.addClass(this.domElement,"OT_active"):t.removeClass(this.domElement,"OT_active ")},a=()=>(i=!i,s(),i?this.parent.trigger("muted",this):this.parent.trigger("unmuted",this),!1),c=e=>{t.on(e,"click",a)},u=e=>{t.off(e,"click",a)};o(this,{muted:{get:()=>i,set(e){i=e,s()}}});let d=i?"OT_edge-bar-item OT_mute OT_active":"OT_edge-bar-item OT_mute";n(this,{mode:e.mode,nodeName:"button",htmlContent:"Mute",htmlAttributes:{className:d,type:"button"},onCreate:c,onDestroy:u}),this.remove=()=>{this.domElement&&this.domElement.parentNode&&(r=this.domElement.parentNode,this.domElement.parentNode.removeChild(this.domElement))},this.add=()=>{r&&this.domElement&&!this.domElement.parentNode&&r.appendChild(this.domElement)}}}},function(e,t,n){"use strict";let r=n(36),i=e=>{let t=document.createElement("div");return t.textContent=e,t.innerHTML};e.exports=function(e){let t=e.name;t&&""!==t.trim().length||(t=null,e.mode="off"),this.setName=(function(e){t||this.setDisplayMode("auto"),t=i(e),this.domElement.innerHTML=t}).bind(this),t=i(t),r(this,{mode:e.mode,nodeName:"h1",htmlContent:t,htmlAttributes:{className:"OT_name OT_edge-bar-item"}})}},function(e,t,n){"use strict";e.exports=function(e){void 0===e&&(e={});let t=e.global||window;return function(){if(t.navigator.mediaDevices){let e=t.navigator.mediaDevices;return e.enumerateDevices&&e.enumerateDevices.bind(e)}}}},function(e,t,n){"use strict";let r=n(2),i=n(160).default;e.exports={isSupportedInThisBrowser:!r.isLegacyEdge&&!r.isElectron&&i&&!r.isAndroid,autoRegisters:!0,extensionRequired:!1,getConstraintsShowsPermissionUI:!1,sources:{screen:!0,application:!1,window:"Safari"!==r.name,browser:"Safari"!==r.name},register:()=>({isInstalled(e){e(void 0)}
30,getConstraints(e,t,n){n(void 0,{video:t.video,audio:t.audio})}})}},function(e,t,n){"use strict";t.isMediaStreamTrack=e=>e&&"object"==typeof e&&"string"==typeof e.kind&&"function"==typeof e.stop&&"boolean"==typeof e.enabled},function(e,t,n){"use strict";n.r(t),(function(e){var n=function(t,n,r,i){return new(r||(r=e))(function(e,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(t){t.done?e(t.value):new r(function(e){e(t.value)}).then(s,a)}c((i=i.apply(t,n||[])).next())})},r=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(o){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};function i(){return window}var o="onFailure must return boolean, or delay in ms";t.default=function(t,s,a){return void 0===a&&(a=10),function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return n(this,void 0,void 0,function(){var n,u,d;return r(this,function(l){switch(l.label){case 0:n=0,u=function(){var u,d,l;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,6]),u={},[4,t.apply(void 0,c)];case 1:return[2,(u.value=r.sent(),u)];case 2:if(!1===(l=s(d=r.sent(),n))||null==l||n>=a)throw d;if("number"!=typeof l)return[3,4];return[4,new e(function(e){return i().setTimeout(e,l)})];case 3:return r.sent(),[3,5];case 4:if(!0!==l)throw Error(o);r.label=5;case 5:return[3,6];case 6:return[2]}})},l.label=1;case 1:if(!(n+=1))return[3,3];return[5,u()];case 2:if("object"==typeof(d=l.sent()))return[2,d.value];return[3,1];case 3:return[2]}})})}}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(1)("videoContentHint"),i=["","text","motion","detail"],o=e=>i.includes(e),s=e=>{var t;return null==e||null==(t=e.getVideoTracks())?void 0:t[0]},a=(e,t)=>{if(!o(t))return void r.warn('Invalid content hint. Valid content hints are "text", "detail", "motion", or ""');let n=s(e);n?void 0===n.contentHint?r.warn("contentHint not supported by this browser"):n.contentHint=t:r.warn("Tried to set contentHint but no video track is present")};e.exports={isValidVideoContentHint:o,setVideoContentHint:a,getVideoContentHint:e=>{let t=s(e);return(null==t?void 0:t.contentHint)||""}}},function(e,t,n){"use strict";let r=n(104);e.exports=function(){return function(e,t){let n;r(this,{muted:{get:()=>n,set(t){if(n===t)return;n=t;let r=e.getAudioTracks();for(let e=0,t=r.length;e<t;++e)r[e].enabled=!n}}}),void 0!==t?this.muted(!0===t):e.getAudioTracks().length?this.muted(!e.getAudioTracks()[0].enabled):this.muted(!1)}}},function(e,t,n){"use strict";e.exports=function(e){void 0===e&&(e={});let t=e.Errors||n(4),r=e.otError||n(11)(),i={};return window.MediaError&&(i[window.MediaError.MEDIA_ERR_ABORTED]={name:t.MEDIA_ERR_ABORTED,message:"The fetching process for the media resource was aborted by the user agent at the user's request."},i[window.MediaError.MEDIA_ERR_NETWORK]={name:t.MEDIA_ERR_NETWORK,message:"A network error of some description caused the user agent to stop fetching the media resource, after the resource was established to be usable."},i[window.MediaError.MEDIA_ERR_DECODE]={name:t.MEDIA_ERR_DECODE,message:"An error of some description occurred while decoding the media resource, after the resource was established to be usable."},i[window.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]={name:t.MEDIA_ERR_SRC_NOT_SUPPORTED,message:"The media resource indicated by the src attribute was not suitable."}),function(e){let t=i[e.code];return t?r(t.name,Error(`There was an unexpected problem with the Video Stream: ${t.message}`)):Error(`An unknown error occurred${e.message?`: ${e.message}`:"."}`)}}},function(e,t,n){"use strict";(function(t){var r=n(3),i=r(n(20)),o=r(n(12)),s=r(n(13)),a=r(n(18));let c=n(6),u=n(63),d=n(637),l=n(638),p=n(639),f=n(106),h=n(2),m=n(24)().hasAudioOutputApiSupport,b=n(294),g=n(105).getCurrentAudioOutputDeviceId;function v(e,t){let n=document.createElement("video");return l(n),n.autoplay=!0,n.playsinline=!0,n.innerHTML=e,n.setAttribute("autoplay",""),n.setAttribute("playsinline",""),!0===t&&(n.muted="true"),n}function y(){let e=v("");return e.setAttribute("style","display:none"),e}e.exports=function(e){void 0===e&&(e={});let r=e.audioContext||n(159)(),l=e.canBeOrientatedMixin||n(640),S=e.document||window.document,E=e.listenForTracksEnded||n(641)(),T=e.logging||n(1),C=e.OTHelpers||n(5),R=e.videoElementErrorMap||n(292)(),I=e.WebaudioAudioLevelSampler||n(145),_=e.global||window,w=1;return function(){function e(e,t){var n=this;
30let r=e._inject,i=void 0===r?{}:r,d=i.createVideoElement,p=void 0===d?v:d,f=i.createAudioOnlyVideoElement,m=void 0===f?y:f,g=e.muted,S=e.fallbackText,E=e.widgetType;(0,a.default)(this,"_domElement",void 0),(0,a.default)(this,"_domAudioOnlyVideoElement",void 0),(0,a.default)(this,"_blockedVolume",void 0),(0,a.default)(this,"_mediaStoppedListener",void 0),(0,a.default)(this,"_audioLevelSampler",void 0),(0,a.default)(this,"_playInterrupts",0),(0,a.default)(this,"_isVideoLoadedMetaData",!1),(0,a.default)(this,"_audioOnlyVideoElementWatcher",void 0),this.logging=T(`NativeVideoElementWrapper:${w}`),w+=1,c(this),this._defaultAudioVolume=t,this._widgetType=E;let C=!1,I=()=>{C||(this.logging.warn("Video element paused, auto-resuming. If you intended to do this, use publishVideo(false) or subscribeToVideo(false) instead."),C=!0),this.play()};this._domElement=p(S,g),this.trigger("videoElementCreated",this._domElement),this._domElementEvents=u(this._domElement),this._domElementEvents.on("loadstart",()=>this._onDomElementLoadStart()),this._domElementEvents.on("timeupdate",function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.trigger("timeupdate",...t)}),this._domElementEvents.on("loadedmetadata",(0,s.default)(o.default.mark(function e(){var t,r,i,s,a=arguments;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n._isVideoLoadedMetaData=!0,r=Array(t=a.length),i=0;i<t;i++)r[i]=a[i];if(n.trigger("loadedmetadata",...r),!n._domAudioOnlyVideoElement||(s=n._domAudioOnlyVideoElement.srcObject,n._removeAudioOnlyVideoElement(),!s)){e.next=10;break}return e.next=9,b();case 9:n.play();case 10:case"end":return e.stop()}},e)})));let _=e=>{this.trigger("error",R(e.target.error))};this._domElementEvents.on("error",_,!1),this._domElementEvents.on("pause",I),this.on("destroyed",()=>{this._domElementEvents.removeAll(),this._domAudioOnlyVideoElementEvents&&this._domAudioOnlyVideoElementEvents.removeAll()}),l(this,()=>this._domElement),"Safari"===h.name&&"subscriber"===this._widgetType&&(this._domAudioOnlyVideoElement=m(),this._bindAudioOnlyVideoElementEvents())}var n=e.prototype;return n._onDomElementLoadStart=function(){var e=(0,s.default)(o.default.mark(function e(){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!("subscriber"===this._widgetType&&m())){e.next=3;break}return e.next=3,this._setActiveAudioOutputDevice();case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),n._setActiveAudioOutputDevice=function(){var e=(0,s.default)(o.default.mark(function e(){var t;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==(t=g())&&"default"!==t){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this.setSinkId(t);case 5:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),n._rebindSrcObject=function(){this._domElement&&(this._domElement.srcObject=this._domElement.srcObject)},n._pauseAndPlay=function(){this._domElement&&(this._domElement.pause(),this._domElement.play())},n._startAudioOnlyVideoElementWatcher=function(){var e=(0,s.default)(o.default.mark(function e(){var t,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=1e3,n=h.isiOS,this._audioOnlyVideoElementWatcher=setInterval(()=>{this._domAudioOnlyVideoElement&&this._domAudioOnlyVideoElement.paused&&(this._domAudioOnlyVideoElement.srcObject=this._domAudioOnlyVideoElement.srcObject,n&&this._domAudioOnlyVideoElement.play())},100),e.next=5,f(t);case 5:clearInterval(this._audioOnlyVideoElementWatcher),this._audioOnlyVideoElementWatcher=null;case 7:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),n._removeAudioOnlyVideoElement=function(){var e=(0,s.default)(o.default.mark(function e(){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this._domAudioOnlyVideoElement.srcObject=null,this._domAudioOnlyVideoElement.parentNode.removeChild(this._domAudioOnlyVideoElement),this._domAudioOnlyVideoElementEvents&&this._domAudioOnlyVideoElementEvents.removeAll(),this._domAudioOnlyVideoElement=null;case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),n.bindAudioTrackOnly=function(){var e=(0,s.default)(o.default.mark(function e(){var t,n,r,i,s,a,c;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this._stream.getVideoTracks(),n=this._stream.getAudioTracks(),i=void 0===(r=t[0])?{}:r,a=void 0===(s=n[0])?{}:s,e.next=6,b();case 6:c=!i.enabled&&a.enabled,!this._isVideoLoadedMetaData&&c&&this._domAudioOnlyVideoElement&&(this._domAudioOnlyVideoElement.srcObject=ne
30w _.MediaStream(n),this._startAudioOnlyVideoElementWatcher());case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),n._bindAudioOnlyVideoElementEvents=function(){var e=this;this._domAudioOnlyVideoElementEvents=u(this._domAudioOnlyVideoElement),this._domAudioOnlyVideoElementEvents.on("pause",()=>this.play()),this._domAudioOnlyVideoElementEvents.on("timeupdate",function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.trigger("timeupdate",...n)}),this._domAudioOnlyVideoElementEvents.on("loadedmetadata",function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.trigger("loadedmetadata",...n)})},n.whenTimeIncrements=function(e,t){this.once("timeupdate",()=>{e.call(t,this)})},n.domElement=function(){return this._domElement},n.videoWidth=function(){return this._domElement?Number(this._domElement[`video${this.isRotated()?"Height":"Width"}`]):0},n.videoHeight=function(){return this._domElement?Number(this._domElement[`video${this.isRotated()?"Width":"Height"}`]):0},n.aspectRatio=function(){return this.videoWidth()/this.videoHeight()},n.imgData=function(){let e=C.createElement("canvas",{width:this.videoWidth(),height:this.videoHeight(),style:{display:"none"}});S.body.appendChild(e);let t=null;try{e.getContext("2d").drawImage(this._domElement,0,0,e.width,e.height),t=e.toDataURL("image/png")}catch(e){}return(C.removeElement(e),null===t||"data:,"===t)?(this.logging.warn("Cannot get image data yet"),null):t.replace("data:image/png;base64,","").trim()},n.appendTo=function(e){return e.appendChild(this._domElement),this._domAudioOnlyVideoElement&&e.appendChild(this._domAudioOnlyVideoElement),this},n.isAudioBlocked=function(){return void 0!==this._blockedVolume},n.unblockAudio=function(){var e=(0,s.default)(o.default.mark(function e(){var t;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isAudioBlocked()){e.next=3;break}return this.logging.warn("Unexpected call to unblockAudio() without blocked audio"),e.abrupt("return");case 3:return t=this._blockedVolume,this._blockedVolume=void 0,this.setAudioVolume(t),e.prev=6,e.next=9,this.play();case 9:e.next=16;break;case 11:throw e.prev=11,e.t0=e.catch(6),this._blockedVolume=t,this._domElement.muted=!0,e.t0;case 16:this.trigger("audioUnblocked");case 17:case"end":return e.stop()}},e,this,[[6,11]])}));return function(){return e.apply(this,arguments)}}(),n.rebind=function(){var e=(0,s.default)(o.default.mark(function e(){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._domElement){e.next=2;break}throw Error("Can't rebind because _domElement no longer exists");case 2:this._playInterrupts++,this._domElement.srcObject=this._domElement.srcObject,this._hasAudioOnlyVideoElement()&&(this._domAudioOnlyVideoElement.srcObject=this._domAudioOnlyVideoElement.srcObject);case 5:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),n._createAudioLevelSampler=function(){if(this._removeAudioLevelSampler(),this._stream.getAudioTracks().length>0){try{this._audioContext=r()}catch(e){this.logging.warn("Failed to get AudioContext(), audio level visualisation will not work",e)}this._audioContext&&(this._audioLevelSampler=new I(this._audioContext),this._audioLevelSampler.webRTCStream(this._stream))}},n._removeAudioLevelSampler=function(){this._audioContext&&(delete this._audioContext,delete this._audioLevelSampler)},n._toggleVideoTracks=function(){var e=(0,s.default)(o.default.mark(function e(){var t,n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!((t=this._domElement.srcObject.getTracks().filter(e=>e.enabled)).length>1)){e.next=8;break}return(n=t.filter(e=>"video"===e.kind)).forEach(e=>{e.enabled=!1}),e.next=7,b();case 7:n.forEach(e=>{e.enabled=!0});case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),n._hasAudioOnlyVideoElement=function(){return this._domAudioOnlyVideoElement&&this._domAudioOnlyVideoElement.srcObject},n.play=function(){var e=(0,s.default)(o.default.mark(function e(){var t,n,r,i,s,a,c,u;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._playInterrupts,n="Safari"===h.name,r=this._hasAudioOnlyVideoElement()?this._domAudioOnlyVideoElement:this._domElement,!n){e.next=6;break}return e.next=6,b();case 6:if(!(h.isiOS&&h.isSafari)){e.next=16;break}if("publisher"!==this._widgetType){e.next=15;break}if(i=h.iOSVersion>=14&&h.iOSVersion<=14.2,a=void 0===(s=this._stream.getVideoTracks()[0])?{}:s,u=void 0===(c=this._stream.getAudioTracks()[0])?{}:c,!(i&&!p(r)&&a.enabled)){e.next=13;break}return e.abrupt("return");case 13:if(!u.muted){e.next=15;break}return e.abrupt("return");case 15:this._toggleVideoTracks();case 16:return e.prev=16,e.next=19,r.play();case 19:case 30:return e.abrupt("return");case 22:if(e.prev=22,e.t0=e.catch(16),"AbortError"===(e.t0||{}).name&&this._playInterrupts++,!(this._playInterrupts>t)){e.next=31;break}return e.next=30,this.play();case 31:throw e.t0;case 32:case"end":return e.stop()}},e,this,[[16,22]])}));return function(){return e.apply(this,arguments)}}
30(),n._bindToStream=function(e){this._stream=e,this._domElement.srcObject=e,this._domAudioOnlyVideoElement&&this.bindAudioTrackOnly()},n.bindToStream=function(){var e=(0,s.default)(o.default.mark(function e(t){var n,r,a,c=this;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._domElement){e.next=2;break}throw Error("Can't bind because _domElement no longer exists");case 2:return this._bindToStream(t),(0,s.default)(o.default.mark(function e(){var n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.play();case 3:e.next=26;break;case 5:if(e.prev=5,e.t0=e.catch(0),n=!!t.getAudioTracks().length,!(c._hasAudioOnlyVideoElement()&&"NotAllowedError"===e.t0.name)){e.next=15;break}return c._domAudioOnlyVideoElement.muted=!0,e.next=12,c.play();case 12:c._domAudioOnlyVideoElement.muted=!1,e.next=26;break;case 15:if(!n){e.next=23;break}return c._blockedVolume=c.getAudioVolume(),c._domElement.muted=!0,e.next=20,c.play();case 20:c.trigger("audioBlocked"),e.next=26;break;case 23:return c._domElement.muted=!0,e.next=26,c.play();case 26:case"end":return e.stop()}},e,null,[[0,5]])}))().catch(e=>{this.logging.debug(".play() failed: ",e)}),n={width:this._domElement.videoWidth,height:this._domElement.videoHeight},this.trigger("videoDimensionsChanged",(0,i.default)({},n),(0,i.default)({},n)),this._domElementEvents.on("resize",()=>{let e=this._domElement,t=e.videoWidth,r=e.videoHeight,o=t!==n.width,s=r!==n.height;(o||s)&&(this.trigger("videoDimensionsChanged",(0,i.default)({},n),{width:t,height:r}),n.width=t,n.height=r)}),r=()=>{this._mediaStoppedListener.stop(),this._domElement&&(this._domElement.onended=null),this.trigger("mediaStopped")},a=e=>{this.trigger("mediaStopped",e)},this._domElement.onended=()=>r(),this._mediaStoppedListener=E(t,r,a),this._createAudioLevelSampler(),e.abrupt("return",void 0);case 13:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),n.unbindStream=function(){return this._domElement&&(this._domElement.srcObject=null),this._domAudioOnlyVideoElement&&(this._domAudioOnlyVideoElement.srcObject=null),this._removeAudioLevelSampler(),this},n.setAudioVolume=function(e){if(this.isAudioBlocked()){this._blockedVolume=e;return}let t=parseFloat(e)/100,n=[this.domElement()];this._domAudioOnlyVideoElement&&n.push(this._domAudioOnlyVideoElement),n.forEach(e=>{e&&(e.volume=t,e.muted=0===t)})},n.getAudioVolume=function(){if(this.isAudioBlocked())return this._blockedVolume;let e=this.domElement();return e?e.muted?0:100*e.volume:this._defaultAudioVolume},n.audioChannelType=function(e){let t=this.domElement();return(void 0!==e&&(t.mozAudioChannelType=e),"mozAudioChannelType"in this._domElement)?t.mozAudioChannelType:"unknown"},n.getAudioInputLevel=function(){return this._audioLevelSampler.sample()},n.refreshTracks=function(){this._mediaStoppedListener&&this._mediaStoppedListener.refresh(),this._createAudioLevelSampler()},n.destroy=function(){this._mediaStoppedListener&&this._mediaStoppedListener.stop(),this.logging.debug("removing domElementEvents"),this._domElementEvents.removeAll(),this._domAudioOnlyVideoElementEvents&&this._domAudioOnlyVideoElementEvents.removeAll(),this._audioOnlyVideoElementWatcher&&clearInterval(this._audioOnlyVideoElementWatcher),this.unbindStream(),this._domElement&&(C.removeElement(this._domElement),this._domElement=null),this._domAudioOnlyVideoElement&&(C.removeElement(this._domAudioOnlyVideoElement),this._domAudioOnlyVideoElement=null),this.trigger("destroyed"),d("NativeVideoElementWrapper",this)},n.setSinkId=function(e){let n=[this._domElement,this._domAudioOnlyVideoElement].map(t=>{if(t)return t.setSinkId(e)});return t.all(n)},e}()}}).call(this,n(0))},function(e,t,n){"use strict";(function(t){e.exports=()=>new t(e=>setTimeout(e))}).call(this,n(0))},function(e,t,n){"use strict";(function(t){let r=n(7),i=n(48),o=n(62),s=n(6);e.exports=function(e){void 0===e&&(e={});let a=e.getStatsHelpers||n(75),c=e.OTHelpers||n(5),u=e.PeerConnection||n(101)(),d=e.setCertificates||n(164)(),l=e.watchAudioAcquisition||n(643);return function(e){let n,p,f=e.iceConfig,h=e.webRTCStream,m=e.channels,b=e.sendMessage,g
30=e.capableSimulcastStreams,v=e.overrideSimulcastEnabled,y=e.logAnalyticsEvent,S=e.offerOverrides,E=e.answerOverrides,T=e.sourceStreamId,C=e.isP2pEnabled,R=!1,I=function(){this.destroy(),R&&(R=!1,this.trigger("iceRestartFailure")),this.trigger("disconnected")},_=function(e){let t=e.reason,n=e.prefix;this.trigger("error",{reason:t,prefix:n})},w=function(e){R&&n.iceConnectionStateIsConnected()&&(R=!1,this.trigger("iceRestartSuccess")),"connected"===e&&("Chrome"===c.env.name&&(p&&p(),p=l(n.getStats.bind(n),()=>this.trigger("audioAcquisitionProblem"))),this.trigger("connected")),this.trigger("iceConnectionStateChange",e)};s(this),this.changeMediaDirectionToInactive=()=>{n&&n.changeMediaDirectionToInactive()},this.changeMediaDirectionToRecvOnly=()=>{n&&n.changeMediaDirectionToRecvOnly()},this.getDataChannel=function(e,t,r){n.getDataChannel(e,t,r)},this.getSourceStreamId=()=>n.getSourceStreamId(),this.destroy=function(){p&&(p(),p=null),n&&(n.disconnect(),n=null),this.off()},this.processMessage=function(e,t){n.processMessage(e,t)},this.addTrack=function(e,t,r){return n.addTrack(e,t,r)},this.removeTrack=function(e){return n.removeTrack(e)},this.getLocalStreams=function(){return n.getLocalStreams()},this.init=function(e,t){d({iceConfig:f.needRumorIceServersFallback?r(f,{servers:[...e,...f.servers]}):f,channels:m,capableSimulcastStreams:g,overrideSimulcastEnabled:v},(e,i)=>{if(e)return void t(e);let o=r({logAnalyticsEvent:y,isPublisher:!0,offerOverrides:S,answerOverrides:E,sourceStreamId:T,p2p:C},i);(n=new u(r({sendMessage:b},o))).on({close:I,error:_,qos:e=>this.trigger("qos",e),iceConnectionStateChange:w},this),n.addLocalStream(h).then(()=>{t(void 0)}).catch(t)})},this.getSenders=function(){return n.getSenders()},this.iceRestart=function(){n&&(R=!0,n.iceRestart())},this.hasRelayCandidates=()=>n.hasRelayCandidates(),this.iceConnectionStateIsConnected=function(){return n.iceConnectionStateIsConnected()},this.findAndReplaceTrack=(e,t)=>n.findAndReplaceTrack(e,t),this._testOnlyGetFramesEncoded=()=>new t((e,t)=>
30{n.getStats((n,r)=>{if(n)return void t(n);let s=o(r,e=>a.isVideoStat(e,r)&&a.isOutboundStat(e));s?e(i(s,["timestamp","framesEncoded"])):t(Error("Could not find framesEncoded in getStats report"))})}),this.getStats=e=>n.getStats(e),this.getRtcStatsReport=e=>n.getRtcStatsReport(e)}}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(7),i=n(6);e.exports=function(e){void 0===e&&(e={});let t=e.OTHelpers||n(5),o=e.PeerConnection||n(101)(),s=e.setCertificates||n(164)(),a=e.Errors||n(4),c=e.ExceptionCodes||n(8),u=e.OTErrorClass||n(22),d=e.watchSubscriberAudio||n(644);return function(e){let n,l=e.clientCandidates,p=e.iceConfig,f=e.send,h=e.logAnalyticsEvent,m=e.p2p,b=e.codecFlags,g=e.sourceStreamId,v=this,y=!1,S=!1,E=null,T=function(){this.destroy(),S&&this.trigger("iceRestartFailure",this),this.trigger("disconnected",this)},C=function(e){this.trigger("remoteStreamAdded",e,this)},R=function(e){this.trigger("remoteStreamRemoved",e,this)},I=e=>{this.trigger("remoteVideoSupported",e)},_=function(e){let t=e.reason,n=e.prefix;this.trigger("error",null,t,this,n)},w=function(e){S&&("connected"===e||"completed"===e)&&(S=!1,this.trigger("iceRestartSuccess")),"connected"===e&&this.trigger("connected"),this.trigger("iceConnectionStateChange",e)},x=function(e){this.trigger("signalingStateChange",e)},O=function(e){this.trigger("signalingStateStable",e)},N=(e,t)=>{("answer"===e||"pranswer"===e)&&this.trigger("connected"),f(e,t)};i(this),this.close=function(){y||(y=!0,n&&(n.disconnect(),n=null),this.off())},this.destroy=function(){this.stopAudioStatsWatcher(),y||this.close()},this.getDataChannel=function(e,t,r){n.getDataChannel(e,t,r)},this.getSourceStreamId=()=>n.getSourceStreamId(),this.processMessage=function(e,t){n.processMessage(e,t)},this.remoteDescription=function(){return n.remoteDescription()}
30,this.getStats=function(e){if(n)n.getStats(e);else{let n=c.PEER_CONNECTION_NOT_CONNECTED;e(new t.Error(u.getTitleByCode(n),a.PEER_CONNECTION_NOT_CONNECTED,{code:n}))}},this.getSynchronizationSources=function(e){if(!n){let n=c.PEER_CONNECTION_NOT_CONNECTED;e(new t.Error(u.getTitleByCode(n),a.PEER_CONNECTION_NOT_CONNECTED,{code:n}));return}n.getSynchronizationSources(e)},this.getRtcStatsReport=function(e){if(n)n.getRtcStatsReport(e);else{let n=c.PEER_CONNECTION_NOT_CONNECTED;e(new t.Error(u.getTitleByCode(n),a.PEER_CONNECTION_NOT_CONNECTED,{code:n}))}},this.startAudioStatsWatcher=function(e){E||(E=d(n.getStats.bind(n),e=>{this.stopAudioStatsWatcher(),this.trigger("audioLevelStuckWarning",e)},e))},this.stopAudioStatsWatcher=function(){E&&E.stop(),E=null};let k=function(e){return function(t){n&&n.remoteTracks().forEach(n=>{n.kind===e&&n.enabled!==t&&(n.enabled=t)})}};this.subscribeToAudio=k("audio"),this.subscribeToVideo=k("video"),this.hasRelayCandidates=function(){return n.hasRelayCandidates()},this.iceRestart=function(){return S=!0,n.iceRestart()},this.iceConnectionStateIsConnected=function(){return n.iceConnectionStateIsConnected()},this.init=function(e){s({iceConfig:p},(t,i)=>{if(t)return void e(t);let s=r({logAnalyticsEvent:h,clientCandidates:l,codecFlags:b,sourceStreamId:g},i);(n=new o(r({sendMessage:N,p2p:m},s))).on({iceConnected:()=>v.emit("iceConnected"),close:T,streamAdded:C,streamRemoved:R,signalingStateChange:x,signalingStateStable:O,error:_,qos:e=>this.trigger("qos",e),iceConnectionStateChange:w,remoteVideoSupported:I},v),n.remoteTracks().length>0?n.remoteStreams().forEach(C,v):e(void 0,v)})}}}},function(e,t,n){"use strict";e.exports=function(e){void 0===e&&(e={});let t=(e.generateSimpleStateMachine||n(161)())("NotPublishing",["NotPublishing","GetUserMedia","BindingMedia","MediaBound","PublishingToSession","Publishing","Failed","Destroyed"],{NotPublishing:["NotPublishing","GetUserMedia","Destroyed"],GetUserMedia:["BindingMedia","Failed","NotPublishing","Destroyed"],BindingMedia:["MediaBound","Failed","NotPublishing","Destroyed"],MediaBound:["NotPublishing","PublishingToSession","Failed","Destroyed"],PublishingToSession:["NotPublishing","Publishing","Failed","Destroyed","MediaBound"],Publishing:["NotPublishing","MediaBound","Failed","Destroyed"],Failed:["Destroyed"],Destroyed:[]});return t.prototype.isDestroyed=function(){return"Destroyed"===this.current},t.prototype.isAttemptingToPublish=function(){return -1!==["GetUserMedia","BindingMedia","MediaBound","PublishingToSession"].indexOf(this.current)},t.prototype.isPublishing=function(){return"Publishing"===this.current},t}},function(e,t,n){"use strict";function r(e){this.message=e||"Operation has been canceled.",this.name="CancellationError",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype=Object.create(Error.prototype),r.prototype.constructor=r},function(e,t,n){var r=n(0);"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return r.resolve(e).then(e=>r.resolve(t()).then(()=>e),e=>r.resolve(t()).then(()=>r.reject(e)))}},function(e,t,n){"use strict";(function(t){var r=n(3),i=r(n(20)),o=r(n(12)),s=r(n(13));let a=n(140),c=n(147),u=n(7),d=n(276),l=n(57),p=n(50),f=n(166).CancellationError,h=n(19),m=n(42),b=n(49),g=n(268),v=n(26),y=n(6),S=n(653),E=n(103),T=n(63),C=n(654),R=n(4),I=n(165)(),_=n(655),w=n(282),x=n(143),O=n(283),N=n(144),k=n(2),Z=n(4),A=n(23)(),L=n(8),V=n(75),W=n(301),G=n(302),P=n(656),M=n(163)(),D=n(1)("Subscriber"),X=n(284)(),j=n(285),U=n(11)(),F=n(22),Y=n(5),B=n(152),H=n(142)(window),J=n(101)({global:H}),K=n(296)({PeerConnection:J}),z=n(303),Q=n(659),$=n(660),q=n(661),ee=n(662),et=n(304),en=n(100).parseIceServers,er=n(663),ei=n(664),eo=n(665),es=n(306),ea=n(168),ec=100,eu=(e,t)=>e.connection.id===t.connection.id,ed=e=>["/v2/partner",e.apiKey,"session",e.sessionId,"stream",e.streamId,"subscriber",e.subscriberId].join("/");function el(e,t){let n=t&&t.hasVideo&&e&&0===e.getVideoTracks().length,r=t&&t.hasAudio&&e&&0===e.getAudioTracks().length;return!(n||r)}function ep(e){return Math.max(0,Math.min(100,parseInt(e,10)))}function ef(e){return void 0!==e.audioVolume?e.audioVolume:!1===e.subscribeToAudio?0:ec}e.exports=function(e){let n=void 0===e?{}:e,r=n.AudioLevelMeter,H=void 0===r?w:r,J=n.AudioLevelTransformer,eh=void 0===J?x:J,em=n.BackingBar,eb=void 0===em?O:em,eg=n.Chrome,ev=void 0===eg?N:eg,ey=n.env,eS=void 0===ey?k:ey,eE=n.Errors,eT=void 0===eE?Z:eE,eC=n.Events,eR=void 0===eC?A:eC,eI=n.ExceptionCodes,e_=void 0===eI?L:eI,ew=n.audioLevelSampler,ex=void 0===ew?P:ew,eO=n.getStatsHelpers,eN=void 0===eO?V:eO,ek=n.hasAudioOutputLevelStatCapability,eZ=void 0===ek?W:ek,eA=n.hasRemoteStreamsWithWebAudio,eL=void 0===eA?G:eA,eV=n.interpretPeerConnectionError,eW=void 0===eV?M:eV,eG=n.logging,eP=void 0===eG?D:eG,eM=n.MuteButton,eD=void 0===eM?X:eM,eX=n.NamePanel,ej=void 0===eX?j:eX,eU=n.otError,eF=void 0===eU?U:eU,eY=n.OTErrorClass,eB=void 0===eY?F:eY,eH=n.OTHelpers,eJ=void 0===eH?Y:eH,eK=n.StylableComponent,ez=void 0===eK?B:eK,eQ=n.SubscriberPeerConnection,e$=void 0===eQ?K:eQ,eq=n.SubscribingState,e0=void 0===eq?z:eq,e1=n.VideoDisabledIndicator,e2=void 0===e1?Q:e1,e3=n.AudioBlockedIndicator,e5=void 0===e3?$:e3,e9=n.VideoUnsupportedIndicator,e4=void 0===e9?q:e9,e6=n.watchFrameRate,e8=void 0===e6?ee:e6,e7=n.createSendMethod,te=void 0===e7?et:e7,tt=n.parseIceServers,tn=void 0===tt?en:tt,tr=n.document,ti=void 0===tr?window.document:tr,to=n.WidgetView,ts=void 0===to?I:to,ta=3e4,tc=15e3,tu=function e(n,r,I){let w,x,O,N,k,Z,A,L,V,W,G,P,M,D,X,j,U,F;var Y=this;if(void 0===r&&(r={}),void 0===I&&(I=()=>{}),void 0===r.analytics)throw Error("Subscriber requires an instance of analytics");let B=r.analytics,J=h(),K=e.hasAudioOutputLevelStatCapability()||eL(),z=this,Q={},$={},q={},ee={},et={},en=!1,em=n||J,eg=r.session,ey=r.stream,eE=!1,eC={},eI=null,ew=!1,eO=!0,ek=[],eZ=a({},r,{showControls:!0,testNetwork:!1,fitMode:ey.defaultFitMode||"cover",insertDefaultUI:!0}),eA={P2P:v.SUBSCRIBER_DISCONNECTED,MANTIS:v.SUBSCRIBER_DISCONNECTED},eV="Chrome"===eS.name&&eS.version>=58||eS.isChromiumEdge||eS.isOpera,eG=eg._.getSocket(),eM=()=>d($),eX=e=>$[e],eU=()=>$[F],eY=function(){var e=(0,s.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$[t];case 2:e.sent.close(),delete $[t];case 5:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),eH=e=>{delete q[e]},eK=function(){var e=(0,s.default)(o.default.mark(function e(t){var n;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return n={error:tg,audioVolume:X},e.prev=3,e.next=6,w.bindVideo(t,n);case 6:e.next=14;break;case 8:if(e.prev=8,e.t0=e.catch(3),!(e.t0 instanceof f||Z.isDestroyed())){e.next=12;break}return e.abrupt("return");case 12:throw tg(e.t0),e.t0;case 14:case"end":return e.stop()}},e,null,[[3,8]])}));return function(t){return e.apply(this,arguments)}}(),eQ=function(){var e=(0,s.default)(o.default.mark(function e(t,n){var r,i,s;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!1,"function"==typeof t?n=t:r="rtcStatsReport"===t,r?tV():tL(),!(r&&!es)){e.next=7;break}
30return i=e_.GET_RTC_STATS_REPORT_NOT_SUPPORTED,n(eF(R.GET_RTC_STATS_REPORT_NOT_SUPPORTED,Error(eB.getTitleByCode(i)),i)),e.abrupt("return");case 7:if(eU()){e.next=11;break}return i=e_.PEER_CONNECTION_NOT_CONNECTED,n(eF(eT.PEER_CONNECTION_NOT_CONNECTED,Error(eB.getTitleByCode(i)),i)),e.abrupt("return");case 11:return e.next=13,eU();case 13:s=e.sent,(r?s.getRtcStatsReport:s.getStats)((e,t)=>{e?(e.code===e_.PEER_CONNECTION_NOT_CONNECTED&&(e=eF(eT.PEER_CONNECTION_NOT_CONNECTED,e,e_.PEER_CONNECTION_NOT_CONNECTED)),n(e)):n(null,t)});case 16:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),e$=e=>eQ(e),eq=e=>eQ("rtcStatsReport",e),e1=(e,t,n,r,i)=>{let o=u({action:e,variation:t,payload:n,streamId:ey?ey.id:null,sessionId:eg?eg.sessionId:null,connectionId:eg&&eg.isConnected()?eg.connection.connectionId:null,partnerId:eg&&eg.sessionInfo?eg.sessionInfo.partnerId:null,subscriberId:J,widgetType:"Subscriber"},r);("Failure"===t||"iceconnectionstatechange"===t&&"closed"===n)&&(o=u(o,eC));let s=[o];i&&s.push(i),B.logEvent(...s)},e3=(e,t,n)=>{"Attempt"===t?(ee[e]=new Date().getTime(),e1(e,t,n)):("Failure"===t||"Success"===t)&&e1(e,t,n,{attemptDuration:new Date().getTime()-ee[e]})},e9=function(e,t){void 0===t&&(t={}),e3("RoutedToRelayedTransition",e,t)},e6=function(e,t){void 0===t&&(t={}),e3("RelayedToRoutedTransition",e,t)},e7=ei({onInvalidTransition(e,t){let n=`Invalid state transition: Event '${e}' not possible in state '${t}'`;eP.error(n),e1("Subscriber:InvalidStateTransition","Event",{details:n})}});{let e="Unable to subscribe to stream in a reasonable amount of time";er({connectivityState:e7,onWarning(){tr("Warning",{})},onTimeout:()=>{if(w&&w.addError(e),Z.isAttemptingToSubscribe()){Z.set("Failed"),this._disconnect({noStateTransition:!0});let t=eF(R.TIMEOUT,Error(e),e_.UNABLE_TO_SUBSCRIBE);e7.fail({options:{failureReason:"Subscribe",failureMessage:e,failureCode:e_.UNABLE_TO_SUBSCRIBE},error:t})}},warningMs:tc,timeoutMs:ta})}if(Q.promise=new t((e,t)=>
30{Q.resolve=e,Q.reject=t}),eZ.testNetwork&&eg.sessionInfo.p2pEnabled&&eP.warn("You cannot test your network with a relayed session. Use a routed session."),this.id=em,this.widgetId=J,this.session=eg,this.stream=eZ.stream,ey=eZ.stream,this.streamId=ey.id,!eg)return eB.handleJsException({errorMsg:"OT.Subscriber must be passed a session option",code:2e3,target:this,analytics:B}),null;y(this),z.once("subscribeComplete",function(){try{I(...arguments)}catch(e){eP.error("Completion handler threw an exception",e)}});let tt=e=>{let t=e.transition,n=e.from;return"fail"===t?"connected"===n?"Disconnect":"Failure":"disconnect"===t&&"connected"===n?"Disconnect":"Cancel"};e7.observe({onEnterConnecting(){tr("Attempt",null,{})},onEnterConnected(){tr("Success",null,{})},onEnterDisconnected(e,t){let n=void 0===t?{}:t,r=n.options,i=void 0===r?{}:r,o=n.payload,s=void 0===o?null:o;tr(tt(e),s,i)}}),e7.observe({onEnterConnected:()=>{this.trigger("subscribeComplete",void 0,this)},onEnterDisconnected:function(e,t){let n=e.from,r=(void 0===t?{}:t).error;"connecting"===n&&Y.trigger("subscribeComplete",r||Error("An unknown error occurred"),Y)}}),eo({connectivityState:e7,logAttempt(){e1("Subscribe","Attempting",null,{connectionId:eg&&eg.isConnected()?eg.connection.connectionId:null})}});let tr=(e,t,n)=>{"Attempt"===e&&(P=new Date().getTime()),"Failure"===e||"Success"===e||"Cancel"===e?e1("Subscribe",e,t,(0,i.default)({},n,{attemptDuration:new Date().getTime()-P})):e1("Subscribe",e,t,n)},to=(e,t)=>{e1("ICERestart",e,t)},ts=e=>{var t,n;let r=e.parsedStats,i=e.remoteConnectionId,o=e.peerId,s=e.sourceStreamId,a={widgetType:"Subscriber",width:w.width,height:w.height,audioTrack:V&&V.getAudioTracks().length>0,hasAudio:ey&&ey.hasAudio,subscribeToAudio:D,audioVolume:this.getAudioVolume(),videoTrack:V&&V.getVideoTracks().length>0,connectionId:eg?eg.connection.connectionId:null,hasVideo:ey&&ey.hasVideo,subscribeToVideo:eZ.subscribeToVideo,congestionLevel:eI,streamId:ey.id,subscriberId:J,duration:Math.round((b()-k)/1e3),remoteConnectionId:i,peerId:o,sourceStreamId:ea(s),preferredResolutionHeight:null==(t=eZ.preferredResolution)?void 0:t.height,preferredResolutionWidth:null==(n=eZ.preferredResolution)?void 0:n.width,preferredFrameRate:eZ.preferredFrameRate,audioFallback:!W&&"auto"===G},c=u(a,r);B.logQOS(c),this.trigger("qos",B.combineWithCommon(c))},tu=e=>{eP.error("OT.Subscriber State Change Failed: ",e.message),eP.debug(e)},td=()=>{!Z.isSubscribing()&&w&&w.video()&&(en=!0,ew||(e7.connect(),ew=!0),eP.debug("OT.Subscriber.onLoaded"),Z.set("Subscribing"),k=b(),w.loading(!1),x&&x.showAfterLoading(),eE&&ey.setRestrictFrameRate(!0),N&&N.audioOnly(w.audioOnly()),this.setAudioVolume(X),this.trigger("loaded",this))},tl=()=>ey&&ey.hasAudio&&D&&this.getAudioVolume()>0&&!this.isAudioBlocked(),tp=()=>ey&&ey.hasVideo,tf=e=>{let t="audioLevelStuckAt0"===e&&(!tl()||tp()),n=!1;if(!t&&(e1("subscriber:onAudioWarning","Event",{reason:e}),w)){if(w.rebindSrcObject(),e1("subscriber:rebindSrcObject","Called"),"audioLevelStuck"===e)return;n=!0}th(n)},th=function(){var e=(0,s.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t=!1),!eV){e.next=6;break}return e.next=4,eU();case 4:e.sent.startAudioStatsWatcher(t);case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),tm=e=>{eg.sessionInfo.isAdaptiveEnabled&&"P2P"===e.getSourceStreamId()&&e9("Success")},tb=()=>{eP.debug("OT.Subscriber has been disconnected from the Publisher's PeerConnection"),e7.fail({options:{failureReason:"PeerConnectionError",failureCode:e_.UNABLE_TO_PUBLISH,failureMessage:"PeerConnection disconnected"},error:eF(eT.DISCONNECTED,Error("ClientDisconnected"))}),this._disconnect({noStateTransition:!0}),(Z.isAttemptingToSubscribe()||Z.isSubscribing())&&Z.set("Failed")},tg=e=>{let t=eF(eT.MEDIA_ERR_DECODE,e,e.code||e_.P2P_CONNECTION_FAILED);t.message=`OT.Subscriber while playing stream: ${t.message}`,eP.error("OT.Subscriber.onVideoError"),e7.fail({options:{failureReason:"VideoElement",failureMessage:t.message,failureCode:t.code||e_.P2P_CONNECTION_FAILED},error:t});let n=Z.isAttemptingToSubscribe();Z.set("Failed"),n||z.trigger("error",t.message),eB.handleJsException({error:t,code:e_.UNABLE_TO_SUBSCRIBE,target:z,analytics:B})},tv=e=>{let t=C(e);eB.handleJsException({error:t,code:t.code,target:z,analytics:B}
30),this._disconnect({noStateTransition:!0});let n={failureReason:"Subscribe",failureMessage:`OT.Subscriber PeerConnection Error: ${t.message}`,failureCode:e_.P2P_CONNECTION_FAILED};tZ(t.code),e7.fail({options:n,error:eF(t.name,Error(`Subscribe: Subscriber PeerConnection with connection (not found) failed: ${t.message}`),t.code)}),t.name===R.STREAM_NOT_FOUND&&this._destroy({reason:"streamNotFound",noStateTransition:!0})},ty=(e,t,n,r)=>{let i;if("SetRemoteDescription"===r&&!eO&&t.match(/Unsupported video without audio for fallback/)){let e;w&&w.addError("The stream is unable to be played.","Your browser does not support the video format."),(e="Safari"===eJ.env.name?Error("VP8 is not supported in this version of Safari. You might want to consider switching to an H264 project. See https://tokbox.com/safari for more information."):Error("Video format not supported in this browser.")).code=e_.UNSUPPORTED_VIDEO_CODEC,tg(e);return}if("ICEWorkflow"===r&&eg.sessionInfo.reconnection&&en)return void eP.debug("Ignoring peer connection failure due to possibility of reconnection.");i="ICEWorkflow"===r?e_.SUBSCRIBER_ICE_WORKFLOW_FAILED:e===e_.STREAM_LIMIT_EXCEEDED?e:e_.P2P_CONNECTION_FAILED;let o={failureReason:r||"PeerConnectionError",failureMessage:`OT.Subscriber PeerConnection Error: ${t}`,failureCode:i},s=eW(e,t,r,"(not found)","Subscriber");e7.fail({options:o,error:s}),Z.isAttemptingToSubscribe()?(e1("createPeerConnection","Failure",{hasRelayCandidates:n&&n.hasRelayCandidates()},o),Z.set("Failed")):Z.isSubscribing()&&(Z.set("Failed"),this.trigger("error",t)),this._disconnect({noStateTransition:!0}),404===Number(e)&&this._destroy({noStateTransition:!0}),eB.handleJsException({errorMsg:`OT.Subscriber PeerConnection Error: ${t}`,errorCode:i,target:this,analytics:B}),tZ(e)},tS=function(){var e=(0,s.default)(o.default.mark(function e(n,r){var i,s,a,c,u,d,l;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=1===Object.keys(q).length,s=null==r?void 0:r.getSourceStreamId(),a=eg.sessionInfo,V=n,s&&(q[s]=n),eP.debug("OT.Subscriber.onRemoteStreamAdded with sourceStreamId",s),e.prev=6,e.next=9,S(()=>el(V,ey));case 9:e.next=18;break;case 11:if(e.prev=11,e.t0=e.catch(6),"TIMEOUT"!==e.t0.message){e.next=17;break}eP.error("The expected tracks never arrived"),e.next=18;break;case 17:throw e.t0;case 18:return Z.set("BindingRemoteStream"),Y.subscribeToAudio(D),G="loading",Y.subscribeToVideo(eZ.subscribeToVideo,"loading"),a.p2pEnabled||"P2P"===s||(Y.setPreferredResolution(eZ.preferredResolution),Y.setPreferredFrameRate(eZ.preferredFrameRate)),n.getVideoTracks().forEach(e=>{window.webkitMediaStream?e.enabled=!1:e.enabled=ey.hasVideo&&eZ.subscribeToVideo}),e.next=26,eK(n);case 26:if(th(),!Z.isDestroyed()){e.next=29;break}throw Error("Subscriber destroyed");case 29:return window.webkitMediaStream&&n.getVideoTracks().forEach(e=>{e.enabled=ey.hasVideo&&eZ.subscribeToVideo}),(c=w&&w.video())&&c.orientation({width:ey.videoDimensions.width,height:ey.videoDimensions.height,videoOrientation:ey.videoDimensions.orientation}),(u=x&&x.videoUnsupportedIndicator)&&u.setVideoUnsupported(!eO),d=new t((e,t)=>
30{let n=w&&w.video();n&&n.domElement()?e():(w.once("videoElementCreated",e),z.once("destroyed",t))}),e.next=37,d;case 37:return e.next=39,Q.promise;case 39:if(i?Z.set("Subscribing"):td(),A&&"webRTCStream"in A&&n.getAudioTracks().length>0&&A.webRTCStream(n),!((l=eJ.env).isSafari||l.isChromiumEdge||l.isOpera||"Chrome"===l.name&&l.version>=58||l.isFirefox&&l.version>=96)){e.next=48;break}return U&&(U.destroy(),U=null),e.next=46,eU();case 46:(r=e.sent)&&(U=e8(r.getStats.bind(r)));case 48:i||Y.trigger("streamAdded",Y);case 49:case"end":return e.stop()}},e,null,[[6,11]])}));return function(t,n){return e.apply(this,arguments)}}(),tE=e=>{V=null,eP.debug("OT.Subscriber.onStreamRemoved");let t=w&&w.video();t&&t.stream===e&&w.destroyVideo(),eH(F),this.trigger("streamRemoved",this)},tT=e=>{eO!==e&&this.dispatchEvent(new eR.VideoEnabledChangedEvent(e?"videoEnabled":"videoDisabled",{reason:e?"codecChanged":"codecNotSupported"})),eO=e},tC=e=>{w.setAudioBlockedUi(e);let t=x&&x.audioBlockedIndicator;t&&t.setAudioBlocked(e);let n=x&&x.videoUnsupportedIndicator;n&&n.setVideoUnsupported(!e&&!eO)};this.on("audioBlocked",()=>{tC(!0)}),this.on("audioUnblocked",()=>{tC(!1)});let tR={new:v.SUBSCRIBER_DISCONNECTED,checking:v.SUBSCRIBER_DISCONNECTED,connected:v.SUBSCRIBER_CONNECTED,completed:v.SUBSCRIBER_CONNECTED,disconnected:v.SUBSCRIBER_DISCONNECTED},tI=(e,t)=>{let n=tR[e],r=t.getSourceStreamId(),i=eA[r];n&&n!==i&&(eA[r]=n,"disconnected"===e&&"P2P"!==r&&setTimeout((0,s.default)(o.default.mark(function e(){var t;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=eg._.isSocketReconnecting,!("disconnected"===eA[r]&&eG.is("connected")&&!t())){e.next=4;break}return e.next=4,Y._.iceRestart("peer connection disconnected");case 4:case"end":return e.stop()}},e)})),2e3),w&&w.loading(n!==v.SUBSCRIBER_CONNECTED),eP.debug(`OT.Subscriber.connectionStateChanged to ${e}`),this.dispatchEvent(new eR.ConnectionStateChangedEvent(n,this)))},t_=()=>{to("Success")},tw=()=>{to("Failure",{reason:"ICEWorkflow",message:"OT.Subscriber PeerConnection Error: The stream was unable to connect due to a network error. Make sure your connection isn't blocked by a firewall."})},tx=e=>{let t=w&&w.video();switch(e.changedProperty){case"videoDimensions":if(!t)break;t.orientation({width:e.newValue.width,height:e.newValue.height,videoOrientation:e.newValue.orientation}),this.dispatchEvent(new eR.VideoDimensionsChangedEvent(this,e.oldValue,e.newValue));break;case"videoDisableWarning":x&&x.videoDisabledIndicator.setWarning(e.newValue),this.dispatchEvent(new eR.VideoDisableWarningEvent(e.newValue?"videoDisableWarning":"videoDisableWarningLifted")),eI="videoDisableWarning"===e.newValue?1:null;break;case"hasVideo":tA(!ey.hasVideo||!eZ.subscribeToVideo),"Safari"===eS.name&&!ey.hasVideo&&w&&w.bindAudioTrackOnly(),this.dispatchEvent(new eR.VideoEnabledChangedEvent(ey.hasVideo?"videoEnabled":"videoDisabled",{reason:"publishVideo"}));break;case"hasAudio":O.update()}},tO=()=>ey.getChannelsOfType("audio").length>0;O={get:()=>tO()?z.getStyle("buttonDisplayMode"):"off",update(){let e=O.get();x&&(x.muteButton.setDisplayMode(e),x.backingBar.setMuteMode(e))}};let tN=(e,t)=>{if(x)switch(e){case"nameDisplayMode":x.name.setDisplayMode(t),x.backingBar.setNameMode(t);break;case"videoUnsupportedDisplayMode":x.videoUnsupportedIndicator.setDisplayMode(t);break;case"videoDisabledDisplayMode":x.videoDisabledIndicator.setDisplayMode(t);break;case"audioBlockedDisplayMode":x.audioBlockedIndicator.setDisplayMode(t);break;case"showArchiveStatus":x.archive.setShowArchiveStatus(t);break;case"buttonDisplayMode":O.update();break;case"audioLevelDisplayMode":x.audioLevel.setDisplayMode(t);break;case"bugDisplayMode":break;case"backgroundImageURI":w.setBackgroundImageURI(t)}},tk=()=>{let e={backingBar:new eb({nameMode:eZ.name?this.getStyle("nameDisplayMode"):"off",muteMode:O.get()}),name:new ej({name:eZ.name,mode:this.getStyle("nameDisplayMode")}),muteButton:new eD({muted:0===X,mode:O.get()})};if(K){let t=new eh;N=new H({mode:z.getStyle("audioLevelDisplayMode")});let n=new E(()=>{N.setValue(t.transform(this.loudness))});N.watchVisibilityChanged(e=>{e?n.start():n.stop()}),N.setDisplayMode(this.getStyle("audioLevelDisplayMode")),N.audioOnly(!1),e.audioLevel=N}e.videoDisabledIndicator=new e2({mode:this.getStyle("videoDisabledDisplayMode")}),e.audioBlockedIndicator=new e5({mode:this.getStyle("audioBlockedDisplayMode")}),e.videoUnsupportedIndicator=new e4({mode:this.getStyle("videoUnsupportedDisplayMode")}),w&&w.domElement&&(x=new ev({parent:w.domElement}).set(e).on({muted(){z.setAudioVolume(0)},unmuted(){z.setAudioVolume(j)}},this)).hideWhileLoading()},tZ=e=>{let t,n;w&&(e===e_.STREAM_LIMIT_EXCEEDED?(t="The stream was unable to connect.",n="The limit for the number of media streams has been reached."):(t="The stream was unable to connect due to a network error.",n=ew?"Ensure you have a stable connection and try again.":"Make sure you have a stable network connection and that it isn't blocked by a firewall."),w.addError(t,n))};
30function tA(e){eM().forEach(function(){var t=(0,s.default)(o.default.mark(function t(n){return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n;case 2:t.sent.subscribeToVideo(!e);case 3:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),w&&(w.audioOnly(e),w.showPoster(e)),N&&N.audioOnly(e)}ez(this,{nameDisplayMode:"auto",buttonDisplayMode:"auto",audioLevelDisplayMode:"auto",videoDisabledDisplayMode:"auto",audioBlockedDisplayMode:"auto",backgroundImageURI:null,showArchiveStatus:!0,showMicButton:!0},eZ.showControls,e=>{e1("SetStyle","Subscriber",e,null,.1)});let tL=p(()=>{e1("GetStats","Called")}),tV=p(()=>{e1("GetRtcStatsReport","Called")}),tW=e=>{L&&(L.destroy(),L=void 0),V.getAudioTracks().length&&((A=ex(e))?L=_({subscriber:this,audioLevelSampler:A}):Object.prototype.hasOwnProperty.call(this,"loudness")||(Object.defineProperty(this,"loudness",{value:void 0,configurable:!0,writable:!1}),eP.error("No suitable audio level samplers found, audio level visualisation will not work")))},tG=(e,t)=>{if(et[t]){et[t].removeAll();let n=()=>{e.off("error",n),e.off("disconnected",n)};e.on("error",n),e.on("disconnected",n)}let n=T(e);n.once("connected",()=>tm(e)),n.on("disconnected",tb),n.on("error",ty),n.on("remoteStreamAdded",(0,s.default)(o.default.mark(function e(){var t=arguments;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,tS(...t);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),eP.error(e.t0);case 8:case"end":return e.stop()}},e,null,[[0,5]])}))),n.on("audioLevelStuckWarning",tf),n.on("remoteStreamRemoved",tE),n.on("signalingStateStable",(0,s.default)(o.default.mark(function e(){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:z.trigger("signalingStateStable"),w&&w.video()&&V&&A&&"webRTCStream"in A&&V.getAudioTracks().length>0&&A.webRTCStream(V);case 3:case"end":return e.stop()}},e)}))),n.on("iceConnectionStateChange",t=>tI(t,e)),n.on("iceRestartSuccess",t_),n.on("iceRestartFailure",tw),n.on("remoteVideoSupported",tT),n.once("remoteStreamAdded",tW.bind(this,e)),et[t]=et};this._destroy=e=>{let t=e.reason,n=void 0===t?"Unknown":t,r=e.quiet,i=e.noStateTransition,o=void 0!==i&&i;return Z.isDestroyed()||(Z.set("Destroyed"),U&&(U.destroy(),U=null),eC={sessionId:eg.sessionId,connectionId:eg&&eg.isConnected()?eg.connection.connectionId:null,partnerId:eg&&eg.sessionInfo?eg.sessionInfo.partnerId:null,streamId:ey&&!ey.destroyed?ey.id:null},this._disconnect({reason:n,noStateTransition:o}),x&&(x.destroy(),x=null),w&&(w.destroy(),w.off(),w=null,this.element=null),ey&&!ey.destroyed&&e1("unsubscribe",null,{streamId:ey.id}),ey.off(M,this),this.id=null,em=null,this.stream=null,ey=null,this.streamId=null,this.session=null,eg=null,eZ=null,!0!==r&&(this.dispatchEvent(new eR.DestroyedEvent(v.SUBSCRIBER_DESTROYED,this,n)),this.off())),this},this.destroy=function(e,t){void 0===e&&(e="Unsubscribe"),eP.warn("Subscriber#destroy is deprecated and will be removed. Please use Session#unsubscribe instead"),Y._destroy({reason:e,quiet:t})},this._disconnect=function(e){let t=void 0===e?{}:e,n=t.reason,r=void 0===n?"Unknown":n;if(!t.noStateTransition&&!e7.is("disconnected")){let e="Unsubscribe"===r?void 0:eF(eT.STREAM_DESTROYED,Error("Stream was destroyed before it could be subscribed to"));e7.disconnect({payload:{reason:r},error:e})}Z.isDestroyed()||Z.isFailed()||Z.set("NotSubscribing"),w&&w.destroyVideo(),eM().forEach(function(){var e=(0,s.default)(o.default.mark(function e(t){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:e.sent.destroy();case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),Object.keys($).forEach(e=>{delete $[e]}),eG.is("connected")&&ey&&!ey.destroyed&&eG.subscriberDestroy(ey.id,Y.widgetId)},this.disconnect=()=>{eP.warn("Subscriber#disconnect is deprecated and will be removed. Please use Session#unsubscribe instead"),this._disconnect({reason:"Unsubscribe"})};let tP=function(){var e=(0,s.default)(o.default.mark(function e(t){var n,r,s,a,c,u,d;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.peerId,r=t.fromConnectionId,s=t.sourceStreamId,a=ed({apiKey:eg.apiKey,sessionId:eg.sessionId,streamId:ey.id,subscriberId:Y.widgetId}),c=te({socket:Y.session._.getSocket(),uri:a,content:{peerId:n,sourceStreamId:s}}),u=function(e,t,r,o,a){return void 0===o&&(o={}),e1(e,t,r,(0,i.default)({peerId:n,sourceStreamId:ea(s)},o),a)},d=e=>{F===s&&ts((0,i.default)({},e,{peerId:n,remoteConnectionId:r,sourceStreamId:s}))},e.abrupt("return",Y._setupPeerConnection({send:c,log:u,logQoS:d,sourceStreamId:s}));case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();function tM(e){let t=w&&w.video();if(t)try{t.setAudioVolume(e)}catch(e){eP.warn(`setAudioVolume: ${e}`),0===X&&(eP.info("Using subscribeToAudio to mute Audio because setAudioVolume(0) failed"),z.subscribeToAudio(!1))}x&&x.muteButton.muted(0===e)}this.processMessage=function(){var e=(0,s.default)(o.default.mark(function e(t,n,r){var i,s,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return eP.debug(`OT.Subscriber.processMessage: Received ${t} message from ${n}`),eP.debug(r),i=l(r,"content.peerId"),s=l(r,"content.sourceStreamId"),e.next=6,eX(s);case 6:if(!(a=e.sent)){e.next=11;break}a.processMessage(t,r),e.next=16;break;case 11:if("offer"!==t){e.next=16;break}return e.next=14,tP({peerId:i,fromConnectionId:n,sourceStreamId:s});case 14:a=e.sent,Y.session._.addSubscriberToPeerConnectionsQueue(a,r);case 16:case"end":return e.stop()}},e)}));return function(t,n,r){return e.apply(this,arguments)}}(),this.disableVideo=e=>{if(e)if("auto"!==G)return void eP.info("Video was not re-enabled because it was manually disabled");else eP.info("Video has been re-enabled");else eP.warn("Due to high packet loss and low bandwidth, video has been disabled");this.subscribeToVideo(e,"auto"),e1("updateQuality","video",e?{videoEnabled:!0}:{videoDisabled:!0})},this.getImgData=()=>
30{if(!this.isSubscribing())return eP.error("OT.Subscriber.getImgData: Cannot getImgData before the Subscriber is subscribing."),null;let e=w&&w.video();return e?e.imgData():null},this.getStats=e=>{e$((t,n)=>{if(t)return void e(t);let r={timestamp:0};n.forEach(e=>{if(eN.isInboundStat(e)){let t=eN.isVideoStat(e,n),i=eN.isAudioStat(e,n);(i||t)&&(r.timestamp=eN.normalizeTimestamp(e.timestamp)),t?(c(r,{video:eN.parseStatCategory(e)}),U&&c(r,{video:{frameRate:U.getFrameRateFromStat(e)}})):i&&c(r,{audio:eN.parseStatCategory(e)})}}),e(null,r)})},this.getRtcStatsReport=()=>new t((e,t)=>{eq((n,r)=>{n?t(n):e(r)})}),this.setAudioVolume=e=>{let t=ep(e);return(e1("setAudioVolume","Attempt",{audioVolume:t}),isNaN(t))?(eP.error("OT.Subscriber.setAudioVolume: value should be an integer between 0 and 100"),e1("setAudioVolume","Failure",{message:"value should be an integer between 0 and 100"})):(t!==e&&eP.warn("OT.Subscriber.setAudioVolume: value should be an integer between 0 and 100"),t===X)?(tM(X),e1("setAudioVolume","Success",{audioVolume:X,message:"Requested volume is same as already set audioVolume"})):(X>0&&(j=X),tM(X=t),X>0&&!D&&(j=X,this.subscribeToAudio(!0)),e1("setAudioVolume","Success",{audioVolume:X})),this},this.getAudioVolume=()=>{let e=w&&w.video();if(e)try{return e.getAudioVolume()}catch(e){eP.warn(`getAudioVolume ${e}`)}return X},this.subscribeToAudio=e=>{let t=g(e,!0);eM().forEach(function(){var e=(0,s.default)(o.default.mark(function e(n){return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n;case 2:e.sent.subscribeToAudio(t);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),ey&&0!==eM().length&&ey.setChannelActiveState("audio",t);let n=D!==t;return D=t,n&&this.setAudioVolume(t?j:0),e1("subscribeToAudio","Event",{subscribeToAudio:t}),this};let tD={auto:"quality",publishVideo:"publishVideo",subscribeToVideo:"subscribeToVideo"};if("Safari"===eS.name){let e=()=>{!ti.hidden&&eZ.subscribeToVideo&&(eP.debug("document visibility restored in Safari - resubscribing to video"),this.subscribeToVideo(!1),this.subscribeToVideo(!0))};ti.addEventListener("visibilitychange",e),this.once("destroyed",()=>{ti.removeEventListener("visibilitychange",e)})}if(this.subscribeToVideo=(e,t)=>{let n=g(e,!0);return(e1("subscribeToVideo","Attempt",{subscribeToVideo:n,reason:t}),tA(!n||!ey.hasVideo||!(V&&V.getVideoTracks().length>0)),ey.hasVideo&&V&&0===V.getVideoTracks().length)?(n&&eP.info("Subscriber is audio-only due to incompatibility, can't subscribeToVideo."),eZ.subscribeToVideo=!1,e1("subscribeToVideo","Failure",{message:"No video tracks available"})):(x&&x.videoDisabledIndicator&&x.videoDisabledIndicator.disableVideo("auto"===t&&!n),eM().length>0&&eg&&ey&&(n!==eZ.subscribeToVideo||t!==G)&&ey.setChannelActiveState("video",n,t),eZ.subscribeToVideo=n,G=t,W=n,e1("subscribeToVideo","Success",{subscribeToVideo:n,reason:t}),"loading"!==t&&(this.dispatchEvent(new eR.VideoEnabledChangedEvent(n?"videoEnabled":"videoDisabled",{reason:tD[t]||"subscribeToVideo"})),"videoDisabled"===n&&"auto"===t&&(eI=2))),this},this.setPreferredResolution=e=>{if(Z.isDestroyed()||0===eM().length&&(Z.current,0))return void eP.warn("Cannot set the max Resolution when not subscribing to a publisher");if(eZ.preferredResolution=e,eg.sessionInfo.p2pEnabled)return void eP.warn("OT.Subscriber.setPreferredResolution will not work in a P2P Session");if(!Z.isStreamAdded())return;let t=ey.getPreferredResolution();t&&e&&t.width===e.width&&t.height===e.height||!t&&!e||ey.setPreferredResolution(e)},this.setPreferredFrameRate=e=>{if(Z.isDestroyed()||0===eM().length&&(Z.current,0))return void eP.warn("Cannot set the max frameRate when not subscribing to a publisher");if(eZ.preferredFrameRate=e,eg.sessionInfo.p2pEnabled)return void eP.warn("OT.Subscriber.setPreferredFrameRate will not work in a P2P Session");let t=ey.getPreferredFrameRate();e&&t&&t===e||!t&&!e||ey.setPreferredFrameRate(e)},this.isSubscribing=()=>Z.isSubscribing(),this.isWebRTC=!0,this.isLoading=()=>w&&w.loading(),this.isAudioBlocked=()=>!!(w&&w.isAudioBlocked()),this.videoElement=()=>{let e=w&&w.video();return e?e.domElement():null},this.videoWidth=()=>{let e=w&&w.video();return e?e.videoWidth():void 0},this.videoHeight=()=>{let e=w&&w.video();return e?e.videoHeight():void 0},this._subscribeToSelf=(0,s.default)(o.default.mark(function e(){var t;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((t=eg.getPublisherForStream(ey))&&t._.webRtcStream()){e.next=5;break}e7.fail({payload:{reason:"streamNotFound"},error:eF(eT.STREAM_DESTROYED,Error("Tried to subscribe to a local publisher, but its stream no longer exists"))}),e.next=14;break;case 5:return Q.resolve(),e.prev=6,e.next=9,tS(t._.webRtcStream());case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),eP.error(e.t0);case 14:case"end":return e.stop()}},e,null,[[6,11]])})),this._setupPeerConnection=function(){var n=(0,s.default)(o.default.mark(function n(r){var i,s,a,c;return o.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return i=r.send,s=r.log,a=r.logQoS,c=r.sourceStreamId,eZ.testNetwork&&Y.setAudioVolume(0),0===eM().length&&Z.set("Connecting"),F=c,$[c]=new t((t,n)=>{eg._.getIceConfig().then(r=>{r.needRumorIceServersFallback&&(r.servers=[...ek||[],...r.servers||[]]);let o={iceConfig:r,subscriberId:Y.widgetId,send:i,logAnalyticsEvent:s,p2p:eg.sessionInfo.p2pEnabled,sourceStreamId:c};Object.prototype.hasOwnProperty.call(eZ,"codecFlags")&&(o.codecFlags=eZ.codecFlags);let u=new e.SubscriberPeerConnection(o);u.once("iceConnected",Q.resolve),u.once("error",Q.reject),u.on("qos",a),tG(u,c),u.init(e=>{e?n(e):t(u)})})}),n.abrupt("return",$[c]);case 6:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}(),this.restrictFrameRate=e=>(eP.debug(`OT.Subscriber.restrictFrameRate(${e})`),e1("restrictFrameRate",e.toString(),{streamId:ey.id}),eg.sessionInfo.p2pEnabled&&eP.warn("OT.Subscriber.restrictFrameRate: Cannot restrictFrameRate on a P2P session"),"boolean"!=typeof e?eP.error(`OT.Subscriber.restrictFrameRate: expected a boolean value got a ${typeof e}`):(eE=e,ey.setRestrictFrameRate(e)),this),this.on("styleValueChanged",tN,this),this._={getDataChannel:(e,t,n
30)=>(0,s.default)(o.default.mark(function r(){return o.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(eU()){r.next=3;break}return n(new eJ.Error("Cannot create a DataChannel before there is a publisher connection.")),r.abrupt("return");case 3:return r.next=5,eU();case 5:r.sent.getDataChannel(e,t,n);case 6:case"end":return r.stop()}},r)}))(),iceRestart:e=>(0,s.default)(o.default.mark(function t(){var n;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,eX("MANTIS");case 2:(n=t.sent)?(to("Attempt",{reason:e}),eP.debug("Subscriber: iceRestart attempt"),n.iceRestart()):eP.debug("Subscriber: Skipping ice restart, we have no peer connection");case 4:case"end":return t.stop()}},t)}))(),unblockAudio:()=>w&&w.unblockAudio(),webRtcStream:()=>V,privateEvents:new m,startRoutedToRelayedTransition:()=>(0,s.default)(o.default.mark(function e(){var t;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(eZ.testNetwork||eu(ey,eg))){e.next=2;break}return e.abrupt("return");case 2:return e9("Attempt"),e.next=5,eX("MANTIS");case 5:if(null==(t=e.sent)?void 0:t.iceConnectionStateIsConnected()){e.next=9;break}return e9("Failure",{reason:"Attempted to transition to Relayed without being connected in Routed mode."}),e.abrupt("return");case 9:eG.subscriberCreate(ey.id,J,tU,"P2P",(e,t)=>{e&&!e7.is("disconnected")&&e9("Failure",e),eP.debug("message received when created a subscriber with source",t)});case 10:case"end":return e.stop()}},e)}))(),startRelayedToRoutedTransition:()=>(0,s.default)(o.default.mark(function e(){var t;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(eZ.testNetwork||eu(ey,eg))){e.next=2;break}return e.abrupt("return");case 2:return e6("Attempt"),V=t=q.MANTIS,e.next=7,eK(t);case 7:return w.loading(!1),eY("P2P"),F="MANTIS",eH("P2P"),e.next=13,eU();case 13:tW(e.sent),e6("Success");case 16:case"end":return e.stop()}},e)}))(),setSinkId(e){if(w&&w.video())return w.setSinkId(e);eP.debug("Called setAudioOutputDevice on a subscriber without a video element")},pauseAndPlayVideoElement(){w&&w.pauseAndPlayVideoElement()}},Z=new e0(tu),eP.debug(`OT.Subscriber: subscribe to ${ey.id}`),Z.set("Init"),!ey)return eP.error("OT.Subscriber: No stream parameter."),!1;M={updated:tx},ey.on(M,this),eZ.name=eZ.name||ey.name,eZ.classNames="OT_root OT_subscriber",eZ.style&&this.setStyle(eZ.style,null,!0),j=ec,eZ.subscribeToVideo=g(eZ.subscribeToVideo,!0),eZ.subscribeToAudio=g(eZ.subscribeToAudio,!0),this.subscribeToAudio(eZ.subscribeToAudio),this.setAudioVolume(ef(eZ)),(w=new e.WidgetView(n,(0,i.default)({},eZ,{widgetType:"subscriber"}))).on("error",tg),w.on("audioBlocked",()=>this.trigger("audioBlocked")),w.on("audioUnblocked",()=>this.trigger("audioUnblocked")),this.id=w.domId(),em=w.domId(),this.element=w.domElement,w.on("videoElementCreated",e=>{let t=new eR.VideoElementCreatedEvent(e),n=this;en?this.dispatchEvent(t):this.once("loaded",()=>{n.dispatchEvent(t)})}),this.element&&tk.call(this);let tX=ey.getChannelsOfType("audio"),tj=ey.getChannelsOfType("video"),tU=tX.map(e=>({id:e.id,type:e.type,active:eZ.subscribeToAudio})).concat(tj.map(e=>{let t={id:e.id,type:e.type,active:eZ.subscribeToVideo,restrictFrameRate:void 0!==eZ.restrictFrameRate&&eZ.restrictFrameRate};return void 0!==eZ.preferredFrameRate&&(t.preferredFrameRate=parseFloat(eZ.preferredFrameRate)),void 0!==eZ.preferredHeight&&(t.preferredHeight=parseInt(eZ.preferredHeight,10)),void 0!==eZ.preferredWidth&&(t.preferredWidth=parseInt(eZ.preferredWidth,10)),t})),tF=!eZ.testNetwork&&eu(ey,eg);return(e7.beginConnect(),tF)?this._subscribeToSelf():eG.subscriberCreate(ey.id,J,tU,null,(e,t)=>{e&&!e7.is("disconnected")&&tv(e),ek=tn(t)}),this};return tu.hasAudioOutputLevelStatCapability=eZ,tu.WidgetView=ts,tu.SubscriberPeerConnection=e$,tu}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(2);e.exports=()=>["Chrome","Opera","Safari"].indexOf(r.name)>-1},function(e,t,n){"use strict";let r=n(2).name;e.exports=()=>["Firefox","Safari","Edge","Chrome","Opera"].indexOf(r)>-1},function(e,t,n){"use strict";let r=n(161)()("NotSubscribing",["NotSubscribing","Init","Connecting","BindingRemoteStream","Subscribing","Failed","Destroyed"],{NotSubscribing:["NotSubscribing","Init","Destroyed"],Init:["NotSubscribing","Connecting","BindingRemoteStream","Destroyed"],Connecting:["NotSubscribing","BindingRemoteStream","Failed","Destroyed"],BindingRemoteStream:["NotSubscribing","Subscribing","Failed","Destroyed","BindingRemoteStream"],Subscribing:["NotSubscribing","Failed","Destroyed","BindingRemoteStream"],Failed:["Destroyed"],Destroyed:[]});r.prototype.isDestroyed=function(){return"Destroyed"===this.current},r.prototype.isFailed=function(){return"Failed"===this.current},r.prototype.isSubscribing=function(){return"Subscribing"===this.current},r.prototype.isAttemptingToSubscribe=function(){return -1!==["Init","Connecting","BindingRemoteStream"].indexOf(this.current)},r.prototype.isStreamAdded=function(){return"BindingRemoteStream"===this.current||this.isSubscribing()},e.exports=r},function(e,t,n){"use strict";var r=n(3)(n(20));e.exports=e=>{let t=e.socket,n=e.uri,i=e.content;return(e,o)=>t.send({uri:n,method:e,content:(0,r.default)({},i,o)})}},function(e,t,n){!function(t){e.exports=t()}(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})}
vendor: 6,364 bytes, line 30
30,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";e.exports=function(e,t){var n,r,i;for(n=1;n<arguments.length;n++)for(i in r=arguments[n])r.hasOwnProperty(i)&&(e[i]=r[i]);return e}},function(e,t,n){"use strict";var r=n(0);e.exports={build:function(e,t){var n,i,o,s=t.plugins;for(n=0,i=s.length;n<i;n++)(o=s[n]).methods&&r(e,o.methods),o.properties&&Object.defineProperties(e,o.properties)},hook:function(e,t,n){var r,i,o,s,a=e.config.plugins,c=[e.context];for(n&&(c=c.concat(n)),r=0,i=a.length;r<i;r++)s=a[r],(o=a[r][t])&&o.apply(s,c)}}},function(e,t,n){"use strict";function r(e){if(0===e.length)return e;var t,n,r=e.split(/[_-]/);if(1===r.length&&r[0][0].toLowerCase()===r[0][0])return e;for(t=1,n=r[0].toLowerCase();t<r.length;t++)n=n+r[t].charAt(0).toUpperCase()+r[t].substring(1).toLowerCase();return n}r.prepended=function(e,t){return e+(t=r(t))[0].toUpperCase()+t.substring(1)},e.exports=r},function(e,t,n){"use strict";var r=n(0),i=n(2);function o(e,t){e=e||{},this.options=e,this.defaults=t.defaults,this.states=[],this.transitions=[],this.map={},this.lifecycle=this.configureLifecycle(),this.init=this.configureInitTransition(e.init),this.data=this.configureData(e.data),this.methods=this.configureMethods(e.methods),this.map[this.defaults.wildcard]={},this.configureTransitions(e.transitions||[]),this.plugins=this.configurePlugins(e.plugins,t.plugin)}r(o.prototype,{addState:function(e){this.map[e]||(this.states.push(e),this.addStateLifecycleNames(e),this.map[e]={})},addStateLifecycleNames:function(e){this.lifecycle.onEnter[e]=i.prepended("onEnter",e),this.lifecycle.onLeave[e]=i.prepended("onLeave",e),this.lifecycle.on[e]=i.prepended("on",e)},addTransition:function(e){0>this.transitions.indexOf(e)&&(this.transitions.push(e),this.addTransitionLifecycleNames(e))},addTransitionLifecycleNames:function(e){this.lifecycle.onBefore[e]=i.prepended("onBefore",e),this.lifecycle.onAfter[e]=i.prepended("onAfter",e),this.lifecycle.on[e]=i.prepended("on",e)},mapTransition:function(e){var t=e.name,n=e.from,r=e.to;return this.addState(n),"function"!=typeof r&&this.addState(r),this.addTransition(t),this.map[n][t]=e,e},configureLifecycle:function(){return{onBefore:{transition:"onBeforeTransition"},onAfter:{transition:"onAfterTransition"},onEnter:{state:"onEnterState"},onLeave:{state:"onLeaveState"},on:{transition:"onTransition"}}},configureInitTransition:function(e){return"string"==typeof e?this.mapTransition(r({},this.defaults.init,{to:e,active:!0})):"object"==typeof e?this.mapTransition(r({},this.defaults.init,e,{active:!0})):(this.addState(this.defaults.init.from),this.defaults.init)},configureData:function(e){return"function"==typeof e?e:"object"==typeof e?function(){return e}:function(){return{}}},configureMethods:function(e){return e||{}},configurePlugins:function(e,t){var n,r,i;for(n=0,r=(e=e||[]).length;n<r;n++)"function"==typeof(i=e[n])&&(e[n]=i=i()),i.configure&&i.configure(this);return e},configureTransitions:function(e){var t,n,r,i,o,s=this.defaults.wildcard;for(n=0;n<e.length;n++)for(t=0,i=Array.isArray((r=e[n]).from)?r.from:[r.from||s],o=r.to||s;t<i.length;t++)this.mapTransition({name:r.name,from:i[t],to:o})},transitionFor:function(e,t){var n=this.defaults.wildcard;return this.map[e][t]||this.map[n][t]},transitionsFor:function(e){var t=this.defaults.wildcard;return Object.keys(this.map[e]).concat(Object.keys(this.map[t]))},allStates:function(){return this.states},allTransitions:function(){return this.transitions}}),e.exports=o},function(e,t,n){var r=n(0),i=n(6),o=n(1),s=[null,[]];function a(e,t){this.context=e,this.config=t,this.state=t.init.from,this.observers=[e]}r(a.prototype,{init:function(e){if(r(this.context,this.config.data.apply(this.context,e)),o.hook(this,"init"),this.config.init.active)return this.fire(this.config.init.name,[])},is:function(e){return Array.isArray(e)?e.indexOf(this.state)>=0:this.state===e},isPending:function(){return this.pending},can:function(e){return!this.isPending()&&!!this.seek(e)},cannot:function(e){return!this.can(e)},allStates:function(){return this.config.allStates()},allTransitions:function(){return this.config.allTransitions()},transitions:function(){return this.config.transitionsFor(this.state)},seek:function(e,t){var n=this.config.defaults.wildcard,r=this.config.transitionFor(this.state,e),i=r&&r.to;return"function"==typeof i?i.apply(this.context,t):i===n?this.state:i},fire:function(e,t){return this.transit(e,this.state,this.seek(e,t),t)},transit:function(e,t,n,r){var i=this.config.lifecycle,o=this.config.options.observeUnchangedState||t!==n;return n?this.isPending()?this.context.onPendingTransition(e,t,n):(this.config.addState(n),this.beginTransit(),r.unshift({transition:e,from:t,to:n,fsm:this.context}),this.observeEvents([this.observersForEvent(i.onBefore.transition),this.observersForEvent(i.onBefore[e]),o?this.observersForEvent(i.onLeave.state):s,o?this.observersForEvent(i.onLeave[t]):s,this.observersForEvent(i.on.transition),o?["doTransit",[this]]:s,o?this.observersForEvent(i.onEnter.state):s,o?this.observersForEvent(i.onEnter[n]):s,o?this.observersForEvent(i.on[n]):s,this.observersForEvent(i.onAfter.transition),this.observersForEvent(i.onAfter[e]),this.observersForEvent(i.on[e])],r)):this.context.onInvalidTransition(e,t,n)},beginTransit:function(){this.pending=!0},endTransit:function(e){return this.pending=!1,e},failTransit:function(e){throw this.pending=!1,e},doTransit:function(e){this.state=e.to},observe:function(e){if(2===e.length){var t={};t[e[0]]=e[1],this.observers.push(t)}else this.observers.push(e[0])},observersForEvent:function(e){for(var t,n=0,r=this.observers.length,i=[];n<r;n++)(t=this.observers[n])[e]&&i.push(t);return[e,i,!0]},observeEvents:function(e,t,n,r){if(0===e.length)return this.endTransit(void 0===r||r);var i=e[0][0],s=e[0][1],a=e[0][2];if(t[0].event=i,i&&a&&i!==n&&o.hook(this,"lifecycle",t),0===s.length)return e.shift(),this.observeEvents(e,t,i,r);var c=s.shift(),u=c[i].apply(c,t);return u&&"function"==typeof u.then?u.then(this.observeEvents.bind(this,e,t,i)).catch(this.failTransit.bind(this)):!1===u?this.endTransit(!1):this.observeEvents(e,t,i,u)},onInvalidTransition:function(e,t,n){throw new i("transition is invali
30d in current state",e,t,n,this.state)},onPendingTransition:function(e,t,n){throw new i("transition is invalid while previous transition is still in progress",e,t,n,this.state)}}),e.exports=a},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(1),s=n(3),a=n(4),c={is:function(e){return this._fsm.is(e)},can:function(e){return this._fsm.can(e)},cannot:function(e){return this._fsm.cannot(e)},observe:function(){return this._fsm.observe(arguments)},transitions:function(){return this._fsm.transitions()},allTransitions:function(){return this._fsm.allTransitions()},allStates:function(){return this._fsm.allStates()},onInvalidTransition:function(e,t,n){return this._fsm.onInvalidTransition(e,t,n)},onPendingTransition:function(e,t,n){return this._fsm.onPendingTransition(e,t,n)}},u={state:{configurable:!1,enumerable:!0,get:function(){return this._fsm.state},set:function(e){throw Error("use transitions to change state")}}};function d(e){return p(this||{},e)}function l(){"function"==typeof arguments[0]?(e=arguments[0],t=arguments[1]||{}):(e=function(){this._fsm.apply(this,arguments)},t=arguments[0]||{});var e,t,n=new s(t,d);return f(e.prototype,n),e.prototype._fsm.config=n,e}function p(e,t){return f(e,new s(t,d)),e._fsm(),e}function f(e,t){if("object"!=typeof e||Array.isArray(e))throw Error("StateMachine can only be applied to objects");o.build(e,t),Object.defineProperties(e,u),r(e,c),r(e,t.methods),t.allTransitions().forEach(function(t){e[i(t)]=function(){return this._fsm.fire(t,[].slice.call(arguments))}}),e._fsm=function(){this._fsm=new a(this,t),this._fsm.init(arguments)}}d.version="3.0.1",d.factory=l,d.apply=p,d.defaults={wildcard:"*",init:{name:"init",from:"none"}},e.exports=d},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){this.message=e,this.transition=t,this.from=n,this.to=r,this.current=i}}])})},function(e,t,n){"use strict";e.exports=n(102)()},function(e,t,n){"use strict";(function(t){e.exports=function(e){return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return new t((t,n)=>{e(...r,function(e){if(e)return void n(e);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];1===i.length?t(i[0]):t(i)})})}}}).call(this,n(0))},function(e,t,n){"use strict";n.r(t),(function(e,r){let i;function o(){return new e((e,t)=>{"u"<typeof MediaStreamTrackProcessor||"u"<typeof MediaStreamTrackGenerator?t("Your browser does not support the MediaStreamTrack API for Insertable Streams of Media."):e()})}n.d(t,"BlurRadius",function(){return a}),n.d(t,"createVonageMediaProcessorConnector",function(){return tM}),n.d(t,"getVonageEventEmitter",function(){return tG}),n.d(t,"isSupported",function(){return tV}),n.d(t,"setTrackExpectedRate",function(){return tP});var s,a,c={exports:{}},u=function(e,t){return function(){for(var n=Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},d=u,l=Object.prototype.toString;function p(e){return Array.isArray(e)}function f(e){return void 0===e}function h(e){return"[object ArrayBuffer]"===l.call(e)}function m(e){var t;return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer)}function b(e){return null!==e&&"object"==typeof e}function g(e){if("[object Object]"!==l.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function v(e){return"[object Function]"===l.call(e)}function y(e){return b(e)&&v(e.pipe)}function S(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),p(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function E(){var e={};function t(t,n){g(e[n])&&g(t)?e[n]=E(e[n],t):g(t)?e[n]=E({},t):p(t)?e[n]=t.slice():e[n]=t}for(var n=0,r=arguments.length;n<r;n++)S(arguments[n],t);return e}function T(e,t,n){return S(t,function(t,r){n&&"function"==typeof t?e[r]=d(t,n):e[r]=t}),e}var C={isArray:p,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===l.call(e)},isArrayBufferView:m,isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:b,isPlainObject:g,isUndefined:f,isDate:function(e){return"[object Date]"===l.call(e)},isFile:function(e){return"[object File]"===l.call(e)},isBlob:function(e){return"[object Blob]"===l.call(e)},isFunction:v,isStream:y,isURLSearchParams:function(e){return"[object URLSearchParams]"===l.call(e)},isStandardBrowserEnv:function(){return(!("u">typeof navigator)||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"u">typeof window&&"u">typeof document},forEach:S,merge:E,extend:T,trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},R=C;function I(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var _=function(e,t,n){if(!t)return e;if(n)r=n(t);else if(R.isURLSearchParams(t))r=t.toString();else{var r,i=[];R.forEach(t,function(e,t){null!=e&&(R.isArray(e)?t+="[]":e=[e],R.forEach(e,function(e){R.isDate(e)?e=e.toISOString():R.isObject(e)&&(e=JSON.stringify(e)),i.push(I(t)+"="+I(e))}))}),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},w=C;function x(){this.handlers=[]}x.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},x.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)}
30,x.prototype.forEach=function(e){w.forEach(this.handlers,function(t){null!==t&&e(t)})};var O=x,N=C,k=function(e,t){N.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})},Z=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},A=Z,L=function(e,t,n,r,i){return A(Error(e),t,n,r,i)},V=L,W=function(e,t,n){var r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(V("Request failed with status code "+n.status,n.config,null,n.request,n))},G=C,P=G.isStandardBrowserEnv()?function(){return{write:function(e,t,n,r,i,o){var s=[];s.push(e+"="+encodeURIComponent(t)),G.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),G.isString(r)&&s.push("path="+r),G.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),M=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},D=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},X=function(e,t){return e&&!M(t)?D(e,t):t},j=C,U=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],F=function(e){var t,n,r,i={};return e&&j.forEach(e.split("\n"),function(e){r=e.indexOf(":"),t=j.trim(e.substr(0,r)).toLowerCase(),n=j.trim(e.substr(r+1)),t&&(i[t]&&U.indexOf(t)>=0||("set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n))}),i},Y=C,B=Y.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=Y.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return function(){return!0}}();function H(e){this.message=e}H.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},H.prototype.__CANCEL__=!0;var J=H,K=C,z=W,Q=P,$=_,q=X,ee=F,et=B,en=L,er=ef,ei=J,eo=function(t){return new e(function(e,n){var r,i=t.data,o=t.headers,s=t.responseType;function a(){t.cancelToken&&t.cancelToken.unsubscribe(r),t.signal&&t.signal.removeEventListener("abort",r)}K.isFormData(i)&&delete o["Content-Type"];var c=new XMLHttpRequest;t.auth&&(o.Authorization="Basic "+btoa((t.auth.username||"")+":"+(t.auth.password?unescape(encodeURIComponent(t.auth.password)):"")));var u=q(t.baseURL,t.url);function d(){if(c){var r="getAllResponseHeaders"in c?ee(c.getAllResponseHeaders()):null,i=s&&"text"!==s&&"json"!==s?c.response:c.responseText,o={data:i,status:c.status,statusText:c.statusText,headers:r,config:t,request:c};z(function(t){e(t),a()},function(e){n(e),a()},o),c=null}}if(c.open(t.method.toUpperCase(),$(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||4!==c.readyState||(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(n(en("Request aborted",t,"ECONNABORTED",c)),c=null)},c.onerror=function(){n(en("Network Error",t,null,c)),c=null},c.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||er.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(en(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},K.isStandardBrowserEnv()){var l=(t.withCredentials||et(u))&&t.xsrfCookieName?Q.read(t.xsrfCookieName):void 0;l&&(o[t.xsrfHeaderName]=l)}
30"setRequestHeader"in c&&K.forEach(o,function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete o[t]:c.setRequestHeader(t,e)}),K.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&"json"!==s&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(r=function(e){c&&(n(!e||e&&e.type?new ei("canceled"):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(r),t.signal&&(t.signal.aborted?r():t.signal.addEventListener("abort",r))),i||(i=null),c.send(i)})},es=C,ea=k,ec=Z,eu={"Content-Type":"application/x-www-form-urlencoded"};function ed(e,t){!es.isUndefined(e)&&es.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function el(e,t,n){if(es.isString(e))try{return(t||JSON.parse)(e),es.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}var ep={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var e;return"u">typeof XMLHttpRequest?e=eo:void 0!==r&&"[object process]"===Object.prototype.toString.call(r)&&(e=eo),e}(),transformRequest:[function(e,t){return(ea(t,"Accept"),ea(t,"Content-Type"),es.isFormData(e)||es.isArrayBuffer(e)||es.isBuffer(e)||es.isStream(e)||es.isFile(e)||es.isBlob(e))?e:es.isArrayBufferView(e)?e.buffer:es.isURLSearchParams(e)?(ed(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):es.isObject(e)||t&&"application/json"===t["Content-Type"]?(ed(t,"application/json"),el(e)):e}],transformResponse:[function(e){var t=this.transitional||ep.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&es.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw ec(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};es.forEach(["delete","get","head"],function(e){ep.headers[e]={}}
30),es.forEach(["post","put","patch"],function(e){ep.headers[e]=es.merge(eu)});var ef=ep,eh=C,em=ef,eb=function(e){return!!(e&&e.__CANCEL__)},eg=C,ev=function(e,t,n){var r=this||em;return eh.forEach(n,function(n){e=n.call(r,e,t)}),e},ey=eb,eS=ef,eE=J;function eT(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eE("canceled")}var eC=function(t){return eT(t),t.headers=t.headers||{},t.data=ev.call(t,t.data,t.headers,t.transformRequest),t.headers=eg.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),eg.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||eS.adapter)(t).then(function(e){return eT(t),e.data=ev.call(t,e.data,e.headers,t.transformResponse),e},function(n){return!ey(n)&&(eT(t),n&&n.response&&(n.response.data=ev.call(t,n.response.data,n.response.headers,t.transformResponse))),e.reject(n)})},eR=C,eI=function(e,t){t=t||{};var n={};function r(e,t){return eR.isPlainObject(e)&&eR.isPlainObject(t)?eR.merge(e,t):eR.isPlainObject(t)?eR.merge({},t):eR.isArray(t)?t.slice():t}function i(n){return eR.isUndefined(t[n])?eR.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function o(e){if(!eR.isUndefined(t[e]))return r(void 0,t[e])}function s(n){return eR.isUndefined(t[n])?eR.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function a(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return eR.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=c[e]||i,r=t(e);eR.isUndefined(r)&&t!==a||(n[e]=r)}),n},e_="0.25.0",ew=e_,ex={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){ex[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var eO={};ex.transitional=function(e,t,n){function r(e,t){return"[Axios v"+ew+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,o){if(!1===e)throw Error(r(i," has been removed"+(t?" in "+t:"")));return t&&!eO[i]&&(eO[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};var eN=C,ek=_,eZ=O,eA=eC,eL=eI,eV=function(e,t,n){if("object"!=typeof e)throw TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],s=t[o];if(s){var a=e[o],c=void 0===a||s(a,o,e);if(!0!==c)throw TypeError("option "+o+" must be "+c);continue}if(!0!==n)throw Error("Unknown option "+o)}},eW=ex,eG=eW;function eP(e){this.defaults=e,this.interceptors={request:new eZ,response:new eZ}}eP.prototype.request=function(t,n){if("string"==typeof t?(n=n||{}).url=t:n=t||{},!n.url)throw Error("Provided config url is not valid");(n=eL(this.defaults,n)).method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var r,i=n.transitional;void 0!==i&&eV(i,{silentJSONParsing:eG.transitional(eG.boolean),forcedJSONParsing:eG.transitional(eG.boolean),clarifyTimeoutError:eG.transitional(eG.boolean)},!1);var o=[],s=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(n))&&(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});var a=[];if(this.interceptors.response.forEach(function(e){a.push(e.fulfilled,e.rejected)}),!s){var c=[eA,void 0];for(Array.prototype.unshift.apply(c,o),c=c.concat(a),r=e.resolve(n);c.length;)r=r.then(c.shift(),c.shift());return r}for(var u=n;o.length;){var d=o.shift(),l=o.shift();try{u=d(u)}catch(e){l(e);break}}try{r=eA(u)}catch(t){return e.reject(t)}for(;a.length;)r=r.then(a.shift(),a.shift());return r},eP.prototype.getUri=function(e){if(!e.url)throw Error("Provided config url is not valid");return ek((e=eL(this.defaults,e)).url,e.params,e.paramsSerializer).replace(/^\?/,"")}
30,eN.forEach(["delete","get","head","options"],function(e){eP.prototype[e]=function(t,n){return this.request(eL(n||{},{method:e,url:t,data:(n||{}).data}))}}),eN.forEach(["post","put","patch"],function(e){eP.prototype[e]=function(t,n,r){return this.request(eL(r||{},{method:e,url:t,data:n}))}});var eM=eP,eD=J;function eX(t){if("function"!=typeof t)throw TypeError("executor must be a function.");this.promise=new e(function(e){n=e});var n,r=this;this.promise.then(function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}}),this.promise.then=function(t){var n,i=new e(function(e){r.subscribe(e),n=e}).then(t);return i.cancel=function(){r.unsubscribe(n)},i},t(function(e){r.reason||(r.reason=new eD(e),n(r.reason))})}eX.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},eX.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},eX.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},eX.source=function(){var e;return{token:new eX(function(t){e=t}),cancel:e}};var ej=eX,eU=function(e){return function(t){return e.apply(null,t)}},eF=C,eY=function(e){return eF.isObject(e)&&!0===e.isAxiosError},eB=C,eH=u,eJ=eM,eK=eI;function ez(e){var t=new eJ(e),n=eH(eJ.prototype.request,t);return eB.extend(n,eJ.prototype,t),eB.extend(n,t),n.create=function(t){return ez(eK(e,t))},n}var eQ=ez(ef);function e$(){return globalThis._vonageMediaProcessorMetadata}eQ.Axios=eJ,eQ.Cancel=J,eQ.CancelToken=ej,eQ.isCancel=eb,eQ.VERSION=e_,eQ.all=function(t){return e.all(t)},eQ.spread=eU,eQ.isAxiosError=eY,c.exports=eQ,c.exports.default=eQ;for(var eq=[],e0=0;e0<256;++e0)eq.push((e0+256).toString(16).substr(1));let e1=new WeakMap,e2=new WeakMap,e3=new WeakMap,e5=Symbol("anyProducer"),e9=e.resolve(),e4=Symbol("listenerAdded"),e6=Symbol("listenerRemoved"),e8=!1;function e7(e){if("string"!=typeof e&&"symbol"!=typeof e)throw TypeError("eventName must be a string or a symbol")}function te(e){if("function"!=typeof e)throw TypeError("listener must be a function")}function tt(e,t){let n=e2.get(e);return n.has(t)||n.set(t,new Set),n.get(t)}function tn(e,t){let n="string"==typeof t||"symbol"==typeof t?t:e5,r=e3.get(e);return r.has(n)||r.set(n,new Set),r.get(n)}function tr(t,n,r){let i=e3.get(t);if(i.has(n))for(let e of i.get(n))e.enqueue(r);if(i.has(e5)){let t=e.all([n,r]);for(let e of i.get(e5))e.enqueue(t)}}function ti(t,n){n=Array.isArray(n)?n:[n];let r=!1,i=()=>{},o=[],s={enqueue(e){o.push(e),i()},finish(){r=!0,i()}};for(let e of n)tn(t,e).add(s);return{async next(){return o?0===o.length?(r?o=void 0:await new e(e=>{i=e}),this.next()):{done:!1,value:await o.shift()}:{done:!0}},async return(e){for(let e of(o=void 0,n))tn(t,e).delete(s);return i(),arguments.length>0?{done:!0,value:await e}:{done:!0}},[Symbol.asyncIterator](){return this}}}function to(e){if(void 0===e)return tc;if(!Array.isArray(e))throw TypeError("`methodNames` must be an array of strings");for(let t of e)if(!tc.includes(t)){if("string"!=typeof t)throw TypeError("`methodNames` element must be a string");throw Error(`${t} is not Emittery method`)}return e}let ts=e=>e===e4||e===e6;class ta{static mixin(e,t){return t=to(t),n=>{if("function"!=typeof n)throw TypeError("`target` must be function");for(let e of t)if(void 0!==n.prototype[e])throw Error(`The property \`${e}\` already exists on \`target\``);function r(){return Object.defineProperty(this,e,{enumerable:!1,value:new ta}),this[e]}Object.defineProperty(n.prototype,e,{enumerable:!1,get:r});let i=t=>function(...n){return this[e][t](...n)};for(let e of t)Object.defineProperty(n.prototype,e,{enumerable:!1,value:i(e)});return n}}static get isDebugEnabled(){if("object"!=typeof r)return e8;let{env:e}=r||{env:{}};return"emittery"===e.DEBUG||"*"===e.DEBUG||e8}static set isDebugEnabled(e){e8=e}constructor(e={}){e1.set(this,new Set),e2.set(this,new Map),e3.set(this,new Map),this.debug=e.debug||{},void 0===this.debug.enabled&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(e,t,n,r)=>{r=JSON.stringify(r),"symbol"==typeof n&&(n=n.toString());let i=new Date,o=`${i.getHours()}:${i.getMinutes()}:${i.getSeconds()}.${i.getMilliseconds()}`;console.log(`[${o}][emittery:${e}][${t}] Event Name: ${n}
31	data: ${r}`)})}logIfDebugEnabled(e,t,n){(ta.isDebugEnabled||this.debug.enabled)&&this.debug.logger(e,this.debug.name,t,n)}on(e,t){for(let n of(te(t),e=Array.isArray(e)?e:[e]))e7(n),tt(this,n).add(t),this.logIfDebugEnabled("subscribe",n,void 0),ts(n)||this.emit
31(e4,{eventName:n,listener:t});return this.off.bind(this,e,t)}off(e,t){for(let n of(te(t),e=Array.isArray(e)?e:[e]))e7(n),tt(this,n).delete(t),this.logIfDebugEnabled("unsubscribe",n,void 0),ts(n)||this.emit(e6,{eventName:n,listener:t})}once(t){return new e(e=>{let n=this.on(t,t=>{n(),e(t)})})}events(e){for(let t of e=Array.isArray(e)?e:[e])e7(t);return ti(this,e)}async emit(t,n){e7(t),this.logIfDebugEnabled("emit",t,n),tr(this,t,n);let r=tt(this,t),i=e1.get(this),o=[...r],s=ts(t)?[]:[...i];await e9,await e.all([...o.map(async e=>{if(r.has(e))return e(n)}),...s.map(async e=>{if(i.has(e))return e(t,n)})])}async emitSerial(e,t){e7(e),this.logIfDebugEnabled("emitSerial",e,t);let n=tt(this,e),r=e1.get(this),i=[...n],o=[...r];for(let e of(await e9,i))n.has(e)&&await e(t);for(let n of o)r.has(n)&&await n(e,t)}onAny(e){return te(e),this.logIfDebugEnabled("subscribeAny",void 0,void 0),e1.get(this).add(e),this.emit(e4,{listener:e}),this.offAny.bind(this,e)}anyEvent(){return ti(this)}offAny(e){te(e),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),this.emit(e6,{listener:e}),e1.get(this).delete(e)}clearListeners(e){for(let t of e=Array.isArray(e)?e:[e])if(this.logIfDebugEnabled("clear",t,void 0),"string"==typeof t||"symbol"==typeof t){tt(this,t).clear();let e=tn(this,t);for(let t of e)t.finish();e.clear()}else{for(let e of(e1.get(this).clear(),e2.get(this).values()))e.clear();for(let e of e3.get(this).values()){for(let t of e)t.finish();e.clear()}}}listenerCount(e){e=Array.isArray(e)?e:[e];let t=0;for(let n of e){if("string"==typeof n){t+=e1.get(this).size+tt(this,n).size+tn(this,n).size+tn(this).size;continue}for(let e of(void 0!==n&&e7(n),t+=e1.get(this).size,e2.get(this).values()))t+=e.size;for(let e of e3.get(this).values())t+=e.size}return t}bindMethods(e,t){if("object"!=typeof e||null===e)throw TypeError("`target` must be an object");for(let n of t=to(t)){if(void 0!==e[n])throw Error(`The property \`${n}\` already exists on \`target\``);Object.defineProperty(e,n,{enumerable:!1,value:this[n].bind(this)})}}}let tc=Object.getOwnPropertyNames(ta.prototype).filter(e=>"constructor"!==e);Object.defineProperty(ta,"listenerAdded",{value:e4,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(ta,"listenerRemoved",{value:e6,writable:!1,enumerable:!0,configurable:!1}),function(e){e.FPS_DROP="fps_drop"}(s||(s={}));class tu{constructor(){this.processor_=null,this.generator_=null}init(t){return new e((e,n)=>{try{this.processor_=new MediaStreamTrackProcessor(t)}catch(e){console.log(`[InsertableStreamHelper] MediaStreamTrackProcessor failed: ${e}`),n(e)}try{"audio"===t.kind?this.generator_=new MediaStreamTrackGenerator({kind:"audio"}):"video"===t.kind?this.generator_=new MediaStreamTrackGenerator({kind:"video"}):n("kind not supported")}catch(e){console.log(`[InsertableStreamHelper] MediaStreamTrackGenerator failed: ${e}`),n(e)}e()})}getReadable(){return this.processor_.readable}getWriteable(){return this.generator_.writable}getProccesorTrack(){return this.generator_}}class td{constructor(e){this.insertableStreamHelper_=new tu,this.mediaProcessor_=e}setTrack(t){return new e((e,n)=>{this.insertableStreamHelper_.init(t).then(()=>{this.mediaProcessor_.transform(this.insertableStreamHelper_.getReadable(),this.insertableStreamHelper_.getWriteable()).then(()=>{e(this.insertableStreamHelper_.getProccesorTrack())}).catch(e=>{n(e)})}).catch(e=>{n(e)})})}destroy(){return new e((e,t)=>{this.mediaProcessor_?this.mediaProcessor_.destroy().then(()=>{e()}).catch(e=>{t(e)}):t("no processor")})}}let tl="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NsYXNzICR7fSQudXBkYXRlcz17dHJhbnNmb3JtZXJfbmV3OiJOZXcgdHJhbnNmb3JtZXIiLHRyYW5zZm9ybWVyX251bGw6Ik51bGwgdHJhbnNmb3JtZXIifSwkLmVycm9ycz17dHJhbnNmb3JtZXJfbm9uZToiTm8gdHJhbnNmb3JtZXJzIHByb3ZpZGVkIix0cmFuc2Zvcm1lcl9zdGFydDoiQ2Fubm90IHN0YXJ0IHRyYW5zZm9ybWVyIix0cmFuc2Zvcm1lcl90cmFuc2Zvcm06IkNhbm5vdCB0cmFuc2Zvcm0gZnJhbWUiLHRyYW5zZm9ybWVyX2ZsdXNoOiJDYW5ub3QgZmx1c2ggdHJhbnNmb3JtZXIifTt2YXIgUGU9e2V4cG9ydHM6e319LFhlPWZ1bmN0aW9uKGUsdCl7cmV0dXJuIGZ1bmN0aW9uKCl7Zm9yKHZhciBzPW5ldyBBcnJheShhcmd1bWVudHMubGVuZ3RoKSxvPTA7bzxzLmxlbmd0aDtvKyspc1tvXT1hcmd1bWVudHNbb107cmV0dXJuIGUuYXBwbHkodCxzKX19LER0PVhlLEI9T2JqZWN0LnByb3RvdHlwZS50b1N0cmluZztmdW5jdGlvbiBPZShyKXtyZXR1cm4gQXJyYXkuaXNBcnJheShyKX1mdW5jdGlvbiBTZShyKXty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gpLnRoZW4oKCk9PntfLnB1c2goZiksZS5zZXRUcmFuc2Zvcm1lcnMoXykudGhlbigoKT0+e2UudHJhbnNmb3JtKHMsbykudGhlbigoKT0+e2NvbnN0IGQ9e2NhbGxiYWNrVHlwZToic3VjY2VzcyIsbWVzc2FnZToidHJhbnNmb3JtIn07cG9zdE1lc3NhZ2UoSlNPTi5zdHJpbmdpZnkoZCkpfSkuY2F0Y2goZD0+e2NvbnN0IHY9e2NhbGxiYWNrVHlwZToiZXJyb3IiLG1lc3NhZ2U6VmUoZCl9O3Bvc3RNZXNzYWdlKEpTT04uc3RyaW5naWZ5KHYpKX0pfSl9KS5jYXRjaChkPT57Y29uc3Qgdj17Y2FsbGJhY2tUeXBlOiJlcnJvciIsbWVzc2FnZTpWZShkKX07cG9zdE1lc3NhZ2UoSlNPTi5zdHJpbmdpZnkodikpfSl9ZWxzZSBuPT09ImRlc3Ryb3kiP2UuZGVzdHJveSgpLnRoZW4oKCk9Pntjb25zdCBzPXtjYWxsYmFja1R5cGU6InN1Y2Nlc3MiLG1lc3NhZ2U6ImRlc3Ryb3kifTtwb3N0TWVzc2FnZShKU09OLnN0cmluZ2lmeShzKSl9KS5jYXRjaChzPT57Y29uc3Qgbz17Y2FsbGJhY2tUeXBlOiJlcnJvciIsbWVzc2FnZTpWZShzKX07cG9zdE1lc3NhZ2UoSlNPTi5zdHJpbmdpZnkobykpfSk6bj09PSJzZXRUcmFja0V4cGVjdGVkUmF0ZSImJmUuc2V0VHJhY2tFeHBlY3RlZFJhdGUodC5kYXRhLnJhdGUpfX19KSgpOwo=",tp="u">typeof window&&window.Blob&&new Blob([atob(tl)],{type:"text/javascript;charset=utf-8"});function tf(){let e=tp&&(window.URL||window.webkitURL).createObjectURL(tp);try{return e?new Worker(e):new Worker("data:application/javascript;base64,"+tl,{type:"module"})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}let th=new WeakMap,tm=new WeakMap,tb=new WeakMap,tg=Symbol("anyProducer"),tv=e.resolve(),ty=Symbol("listenerAdded"),tS=Symbol("listenerRemoved"),tE=!1;function tT(e){if("string"!=typeof e&&"symbol"!=typeof e)throw TypeError("eventName must be a string or a symbol")}function tC(e){if("function"!=typeof e)throw TypeError("listener must be a function")}function tR(e,t){let n=tm.get(e);return n.has(t)||n.set(t,new Set),n.get(t)}function tI(e,t){let n="string"==typeof t||"symbol"==typeof t?t:tg,r=tb.get(e);return r.has(n)||r.set(n,new Set),r.get(n)}function t_(t,n,r){let i=tb.get(t);if(i.has(n))for(let e of i.get(n))e.enqueue(r);if(i.has(tg)){let t=e.all([n,r]);for(let e of i.get(tg))e.enqueue(t)}}function tw(t,n){n=Array.isArray(n)?n:[n];let r=!1,i=()=>{},o=[],s={enqueue(e){o.push(e),i()},finish(){r=!0,i()}};for(let e of n)tI(t,e).add(s);return{async next(){return o?0===o.length?(r?o=void 0:await new e(e=>{i=e}),this.next()):{done:!1,value:await o.shift()}:{done:!0}},async return(e){for(let e of(o=void 0,n))tI(t,e).delete(s);return i(),arguments.length>0?{done:!0,value:await e}:{done:!0}},[Symbol.asyncIterator](){return this}}}function tx(e){if(void 0===e)return tk;if(!Array.isArray(e))throw TypeError("`methodNames` must be an array of strings");for(let t of e)if(!tk.includes(t)){if("string"!=typeof t)throw TypeError("`methodNames` element must be a string");throw Error(`${t} is not Emittery method`)}return e}let tO=e=>e===ty||e===tS;class tN{static mixin(e,t){return t=tx(t),n=>
31{if("function"!=typeof n)throw TypeError("`target` must be function");for(let e of t)if(void 0!==n.prototype[e])throw Error(`The property \`${e}\` already exists on \`target\``);function r(){return Object.defineProperty(this,e,{enumerable:!1,value:new tN}),this[e]}Object.defineProperty(n.prototype,e,{enumerable:!1,get:r});let i=t=>function(...n){return this[e][t](...n)};for(let e of t)Object.defineProperty(n.prototype,e,{enumerable:!1,value:i(e)});return n}}static get isDebugEnabled(){if("object"!=typeof r)return tE;let{env:e}=r||{env:{}};return"emittery"===e.DEBUG||"*"===e.DEBUG||tE}static set isDebugEnabled(e){tE=e}constructor(e={}){th.set(this,new Set),tm.set(this,new Map),tb.set(this,new Map),this.debug=e.debug||{},void 0===this.debug.enabled&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(e,t,n,r)=>{r=JSON.stringify(r),"symbol"==typeof n&&(n=n.toString());let i=new Date,o=`${i.getHours()}:${i.getMinutes()}:${i.getSeconds()}.${i.getMilliseconds()}`;console.log(`[${o}][emittery:${e}][${t}] Event Name: ${n}
32	data: ${r}`)})}logIfDebugEnabled(e,t,n){(tN.isDebugEnabled||this.debug.enabled)&&this.debug.logger(e,this.debug.name,t,n)}on(e,t){for(let n of(tC(t),e=Array.isArray(e)?e:[e]))tT(n),tR(this,n).add(t),this.logIfDebugEnabled("subscribe",n,void 0),tO(n)||this.emit(ty,{eventName:n,listener:t});return this.off.bind(this,e,t)}off(e,t){for(let n of(tC(t),e=Array.isArray(e)?e:[e]))tT(n),tR(this,n).delete(t),this.logIfDebugEnabled("unsubscribe",n,void 0),tO(n)||this.emit(tS,{eventName:n,listener:t})}once(t){return new e(e=>{let n=this.on(t,t=>{n(),e(t)})})}events(e){for(let t of e=Array.isArray(e)?e:[e])tT(t);return tw(this,e)}async emit(t,n){tT(t),this.logIfDebugEnabled("emit",t,n),t_(this,t,n);let r=tR(this,t),i=th.get(this),o=[...r],s=tO(t)?[]:[...i];await tv,await e.all([...o.map(async e=>{if(r.has(e))return e(n)}),...s.map(async e=>{if(i.has(e))return e(t,n)})])}async emitSerial(e,t){tT(e),this.logIfDebugEnabled("emitSerial",e,t);let n=tR(this,e),r=th.get(this),i=[...n],o=[...r];for(let e of(await tv,i))n.has(e)&&await e(t);for(let n of o)r.has(n)&&await n(e,t)}onAny(e){return tC(e),this.logIfDebugEnabled("subscribeAny",void 0,void 0),th.get(this).add(e),this.emit(ty,{listener:e}),this.offAny.bind(this,e)}anyEvent(){return tw(this)}offAny(e){tC(e),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),this.emit(tS,{listener:e}),th.get(this).delete(e)}clearListeners(e){for(let t of e=Array.isArray(e)?e:[e])if(this.logIfDebugEnabled("clear",t,void 0),"string"==typeof t||"symbol"==typeof t){tR(this,t).clear();let e=tI(this,t);for(let t of e)t.finish();e.clear()}else{for(let e of(th.get(this).clear(),tm.get(this).values()))e.clear();for(let e of tb.get(this).values()){for(let t of e)t.finish();e.clear()}}}listenerCount(e){e=Array.isArray(e)?e:[e];let t=0;for(let n of e){if("string"==typeof n){t+=th.get(this).size+tR(this,n).size+tI(this,n).size+tI(this).size;continue}for(let e of(void 0!==n&&tT(n),t+=th.get(this).size,tm.get(this).values()))t+=e.size;for(let e of tb.get(this).values())t+=e.size}return t}bindMethods(e,t){if("object"!=typeof e||null===e)throw TypeError("`target` must be an object");for(let n of t=tx(t)){if(void 0!==e[n])throw Error(`The property \`${n}\` already exists on \`target\``);Object.defineProperty(e,n,{enumerable:!1,value:this[n].bind(this)})}}}let tk=Object.getOwnPropertyNames(tN.prototype).filter(e=>"constructor"!==e);Object.defineProperty(tN,"listenerAdded",{value:ty,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(tN,"listenerRemoved",{value:tS,writable:!1,enumerable:!0,configurable:!1});var tZ=tN;class tA extends tZ{constructor(t){super(),this.config_=t,this.worker_=new tf,this.trackExpectedRate_=-1,this.workerInited_=!1,this.onMessage_=new e((e,t)=>{this.worker_.addEventListener("message",n=>{let r=JSON.parse(n.data);"success"===r.callbackType?e():"error"===r.callbackType?t(r.message):"media_processor_error_event"===r.callbackType?this.emit("error",r.message):"media_processor_warn_event"===r.callbackType&&this.emit("warn",r.message)})})}transform(t,n){return new e(async(e,r)=>{let i=JSON.stringify(e$());if("string"!=typeof i&&(i=JSON.stringify({}
32)),"VideoBackground"===this.config_.transformerType){let e=document.createElement("video");e.src=this.config_.backgroundAssetUri,e.muted=!0;try{await e.play()}catch(e){r(e);return}let o=new MediaStreamTrackProcessor(e.captureStream().getVideoTracks()[0]).readable;this.worker_.postMessage({operation:"transform",readable:t,writable:n,config:JSON.stringify(this.config_),videoBGReadable:o,metaData:i},[t,n,o])}else this.worker_.postMessage({operation:"transform",readable:t,writable:n,config:JSON.stringify(this.config_),metaData:i},[t,n]);this.onMessage_.then(()=>{console.log("Worker inited"),this.workerInited_=!0,-1!=this.trackExpectedRate_&&this.postTrackExpectedRate(),e()}).catch(e=>{console.log("Worker inited error"),r(e)})})}destroy(){return new e(async(e,t)=>{this.worker_.postMessage({operation:"destroy"}),this.onMessage_.then(()=>{console.log("Worker destroyed"),e()}).catch(e=>{console.log("Worker destroy error"),t(e)})})}setTrackExpectedRate(e){this.trackExpectedRate_=e,this.postTrackExpectedRate()}postTrackExpectedRate(){this.workerInited_&&this.worker_.postMessage({operation:"setTrackExpectedRate",rate:this.trackExpectedRate_})}}!function(e){e.Low="Low",e.High="High"}(a||(a={}));let tL=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));function tV(){return new e(async(e,t)=>{try{await o()}catch(e){t(e);return}tL().then(n=>{!1===n?t("Your browser does not support WebAssembly features."):e()}).catch(e=>{t(e)})})}let tW=-1;function tG(){return i}function tP(e){tW=e,void 0!==i&&i.setTrackExpectedRate(tW)}function tM(t){return new e(async(e,n)=>{i=new tA(t),-1!=tW&&i.setTrackExpectedRate(tW),e(new td(i))})}}).call(this,n(0),n(43))},function(e,t,n){"use strict";let r=n(15),i=n(9),o=n(689),s=n(690),a=n(691);e.exports=function(e){void 0===e&&(e={});let t=e.Errors||n(4),c=e.ExceptionCodes||n(8),u=e.logging||n(1)("publisherInit"),d=e.otError||n(11)(),l=e.OTHelpers||n(5),p=e.Publisher||n(169)(),f=e.sessionObjects||n(21);return function(e,n,h){let m;u.debug(`OT.initPublisher(${e})`),"string"!=typeof e||document.getElementById(e)||(e=n,n=h,h=arguments[3]),"function"==typeof e?(h=e,n=void 0,e=void 0):i(e)&&!l.isElementNode(e)&&(h=n,n=e,e=void 0),"function"==typeof n&&(h=n,n=void 0),n&&(i(n)?!1===n.insertDefaultUI&&e?m="You cannot specify a target element if insertDefaultUI is false":o(n.audioSource)&&o(n.videoSource)&&(m="You cannot specify both audioSource and videoSource as null or false"):(m="properties argument to Publisher constructor, if provided, should be an object",n=void 0)),s(n),a(n);let b=new p(n||{});f.publishers.add(b);let g=function(){h&&r(h)&&(h(...arguments),h=void 0)};void 0!==m&&(u.error(m),g(d(t.INVALID_PARAMETER,Error(m),c.INVALID_PARAMETER)));let v=function(e){b.off("publishComplete",y),g(e)},y=function(e){b.off("initSuccess",v),e&&g(e)};return b.once("initSuccess",v),b.once("publishComplete",y),b.publish(e),b}}},function(e,t,n){"use strict";(function(t){var r=n(3)(n(20));let i=n(42),o=n(692),s=n(9),a=n(15),c=n(7),u=n(26),d=n(6),l=n(27),p=n(34)(),f=n(74),h=n(307),m=n(694),b=n(695),g=n(138).prependProxyToUrlIfNeeded,v=n(139).getProxyUrl;e.exports=function(e){void 0===e&&(e={});let y=e.adaptIceServers||n(100).adaptIceServers,S=e.AnalyticsHelper||l,E=e.APIKEY||n(72),T=e.Capabilities||n(170),C=e.convertAnvilErrorCode||n(696),R=e.convertRumorError||n(311),I=e.Errors||n(4),_=e.Events||n(23)(),w=e.Stream||n(171),x=e.ExceptionCodes||n(8),O=e.hasIceRestartsCapability||n(312),N=e.logging||n(1)("Session"),k=e.otError||n(11)(),Z=e.OTErrorClass||n(22),A=e.OTHelpers||n(5),L=n(697),V=e.StaticConfig||p,W=e.staticConfig||V.onlyLocal(),G=e.Publisher||n(169)(),P=e.RaptorSocket||n(698).default(),M=e.SessionDispatcher||n(319),D=e.sessionObjects||n(21),X=e.sessionTag||n(318),j=e.socketCloseCodes||n(76),U=e.Subscriber||n(300)(),F=e.systemRequirements||n(153),Y=e.uuid||n(19),B=b({otError:k}),H=e.global||window,J=e.getSessionInfo||n(722)(),K=n(141),z=e.initPublisher||n(309)({Publisher:G});return function(e,n,l){let p,b,Q,$,q,ee,et,en,er,ei,eo,es;var ea=this;let ec=void 0===l?{}:l,eu=ec.iceConfig,ed=ec.connectionEventsSuppressed,el=ec.ipWhitelist,ep=void 0!==el&&el,ef=v(),eh=new S,em=e=>"string"==typeof e?this.streams.get(e)||{id:e}:e;d(this),this._tag=X,F.check()||F.upgrade(),null==n&&(n=e,e=null),B(eu),this.id=n,this.sessionId=n;let eb=!0,eg=!1,ev=e,ey=this,eS=n,eE=Y(),eT=Y(),eC=N,eR=!1,eI=[],e_=null,ew=A.statable(this,["disconnected","connecting","connected","disconnecting"],"disconnected");this.connection=null,this.connections=new A.Collection,this.streams=new A.Collection,this.archives=new A.Collection;let ex=function(e){ew("disconnected"),e.code||(e.code=x.CONNECT_FAILED),eC.error(`${e.name||"Unknown Error"}: ${e.message}`),Z.handleJsException({error:e,target:this,analytics:eh}),this.trigger("sessionConnectFailed",e)},eO=function(e){eg=!1;let t=e.reason;this.logEvent("Connect","Disconnected",{reason:e.reason});let n=new _.SessionDisconnectEvent("sessionDisconnected",t.replace("networkTimedout","networkDisconnected"));this.isConnected()&&this.disconnect(),ei(),er.call(this,t),setTimeout(()=>{this.dispatchEvent(n),eo.call(this,n.reason),n.isDefaultPrevented()||es.call(this,n.reason)})},eN=function(e){ed||e.id.match(/^symphony\./)||this.dispatchEvent(new _.ConnectionEvent(u.CONNECTION_CREATED,e))},ek=function(e,t){e.id.match(/^symphony\./)||p&&e.id===p.id()||this.dispatchEvent(new _.ConnectionEvent(u.CONNECTION_DESTROYED,e,t))},eZ=function(e){e&&e.connection&&(!this.connection||e.connection.id!==this.connection.id)&&this.dispatchEvent(new _.StreamEvent(u.STREAM_CREATED,e,null,!1))},eA=function(e){let t=e.target,n=e.changedProperty,r=e.newValue;"videoDisableWarning"!==n&&"audioDisableWarning"!==n&&("videoDimensions"===n&&(r={width:r.width,height:r.height}),this.dispatchEvent(new _.StreamPropertyChangedEvent(u.STREAM_PROPERTY_CHANGED,t,n,e.oldValue,r)))},eL=function(e,t){void 0===t&&(t="clientDisconnected");let n=new _.StreamEvent("streamDestroyed",e,t,!0),r=()=>{D.subscribers.where({streamId:e.id}).filter(e=>
32e.session.id===this.id&&e.stream).forEach(e=>{e._disconnect({reason:t}),n.isDefaultPrevented()||e._destroy({reason:t,noStateTransition:!0})})};e.connection.id===this.connection.id?D.publishers.where({streamId:e.id}).forEach(function(n){n._.unpublishStreamFromSession(e,this,t)},this):this.dispatchEvent(n),r()},eV=function(e){this.dispatchEvent(new _.ArchiveEvent("archiveStarted",e))},eW=function(e){this.dispatchEvent(new _.ArchiveEvent("archiveDestroyed",e))},eG=function(e){let t=e.target,n=e.changedProperty,r=e.newValue;"status"===n&&"stopped"===r?this.dispatchEvent(new _.ArchiveEvent("archiveStopped",t)):this.dispatchEvent(new _.ArchiveEvent("archiveUpdated",t))},eP=()=>D.subscribers.forEach(e=>e._.pauseAndPlayVideoElement()),eM=function(){ey.token=null,Q=null,ew("disconnected"),p=null,b&&(b.stop(),b=null),ey.connection=null,ey.capabilities=new T([]),ey.connections.destroy(),ey.streams.destroy(),ey.archives.destroy()};ei=function(){eT=Y(),eM()},er=function(e){D.publishers.where({session:this}).forEach(t=>{t.disconnect(e)}),D.subscribers.where({session:this}).forEach(e=>{e._disconnect()})},eo=function(e){D.publishers.where({session:this}).forEach(t=>{t._.streamDestroyed(e)})},es=function(e){D.subscribers.where({session:this}).forEach(t=>{t._destroy({reason:e})})};let eD=function(){eC.debug("OT.Session: connecting to Raptor");let e=g(this.sessionInfo.messagingURL,ef),t=["forceMute","adaptive"];function n(e,t){let n;switch(e){case"WebSocketConnection":if(n=o(j.codes,e=>e===t))return I[`SOCKET_${n}`];break;case"ConnectToSession":case"GetSessionState":switch(t){case x.CONNECT_FAILED:return I.CONNECT_FAILED;case x.UNEXPECTED_SERVER_RESPONSE:return I.UNEXPECTED_SERVER_RESPONSE;case x.CONNECTION_LIMIT_EXCEEDED:return I.CONNECTION_LIMIT_EXCEEDED}}}(p=new P(eT,eE,e,this.sessionInfo.symphonyAddress,M(this,{connectionEventsSuppressed:ed}),eh,t)).connect(Q,this.sessionInfo,{connectionEventsSuppressed:ed},(e,t)=>{if(e){let t,r={};if("ConnectToSession"===e.reason||"GetSessionState"===e.reason){let t=R(e);c(r,{originalMessage:e.message,originalCode:e.code}),e.code=t.code,e.message=t.message}(e.code||e.message||e.reason)&&(t={failureCode:e.code,failureMessage:e.message,failureReason:e.reason,socketId:p.socketId}),p=null,this.logConnectivityEvent("Failure",r,t);let i=n(e.reason,e.code);i&&(e=k(i,Error(e.message),e.code)),ex.call(this,e);return}eC.debug("OT.Session: Received session state from Raptor",t),this.connection=this.connections.get(p.id()),this.connection&&(this.capabilities=this.connection.permissions),ew("connected"),this.logConnectivityEvent("Success",{connectionId:this.connection.id}),this.connection.on("destroyed",eO,this),this.dispatchEvent(new _.SessionConnectEvent(u.SESSION_CONNECTED)),this.connections.on({add:eN,remove:ek},this),this.streams.on({add:eZ,remove:eL,update:eA},this),this.archives.on({add:eV,remove:eW,update:eG},this),this.connections._triggerAddEvents(),this.streams._triggerAddEvents(),this.archives._triggerAddEvents(),A.env.isiOS&&A.env.iOSVersion>=13.3&&this.on("gsmCallEnded",eP)})},eX=e=>this.capabilities.permittedTo(e),ej=(e,t)=>{N.error(`${e.name}: ${e.message}`),"function"==typeof t&&t(e),Z.handleJsException({error:e,target:this,analytics:eh})},eU=e=>{let t=k(e.code,Error(e.message),e.exceptionCode);return ej(t),t},eF=()=>this.isNot("connected")?eU(L.NOT_CONNECTED):eX("forceMute")?null:eU(L.PERMISSION_DENIED),eY=e=>"404"===e.code?eU(L.NOT_FOUND):"403"===e.code?eU(L.PERMISSION_DENIED):eU(L.UNEXPECTED_SERVER_RESPONSE);this.reportIssue=e=>{let t=e.id;return h(eh.logEvent.bind(eh))({action:"ReportIssue",variation:"Event",connectionId:eT,payload:{reportIssueId:t}},null)},this.logEvent=function(e,t,n,r){let i={action:e,variation:t,payload:n,sessionId:eS,messagingServer:q,p2p:$,partnerId:ev,connectionId:eT};r&&(i=c(r,i)),eh.logEvent(i)},this.logConfigurationFileEvent=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n={}),"Attempt"===e?et=new Date().getTime():("Failure"===e||"Success"===e)&&c(n,{attemptDuration:new Date().getTime()-et}),ef&&(n.proxyUrl=ef),this.logEvent("ConfigurationFile",e,t,(0,r.default)({},n))},this.logConnectivityEvent=function(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n={}),ef&&(n.proxyUrl=ef),"Attempt"===e&&(b&&(b.stop(),N.error("_connectivityAttemptPinger should have been cleaned up")),ee=new Date().getTime(),(b=ne
32w f(()=>{this.logEvent("Connect","Attempting",t,(0,r.default)({},n))},.2,6)).start()),"Failure"===e||"Success"===e||"Cancel"===e){let i=i=>{b&&(b.stop(),b=void 0),this.logEvent("Connect",e,t,(0,r.default)({},n,{attemptDuration:new Date().getTime()-ee,iceConfig:i,ipWhitelist:ep}))};"Success"===e?this._.getIceConfig().then(e=>{let t={includeServers:eu&&eu.includeServers||"all",transportPolicy:e.transportPolicy};t.servers=e.servers?e.servers.map(e=>({url:e.urls})):[],i(t)}):i()}else this.logEvent("Connect",e,t,n)},this.connect=function(){let r;for(var i=arguments.length,o=Array(i),c=0;c<i;c++)o[c]=arguments[c];o.length>1&&("string"==typeof o[0]||"number"==typeof o[0])&&"string"==typeof o[1]?(null==e&&(ev=o[0].toString()),r=o[1]):r=o[0];let u=o[o.length-1];if(ea.is("connecting","connected"))return eC.warn(`OT.Session: Cannot connect, the session is already ${ea.state}`),ea;eh.sessionInfo=new K,eM(),ew("connecting");let d=eT;function l(){let e=eT!==d;return e&&N.debug("Connection was interrupted"),e}if(ea.token=!a(r)&&r,Q=!a(r)&&r,eb?eb=!1:eE=Y(),u&&a(u)){let e,t=function(){e();for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];u(void 0,...n)},n=function(){e(),u(...arguments)};e=()=>{ea.off("sessionConnected",t),ea.off("sessionConnectFailed",n)},ea.once("sessionConnected",t),ea.once("sessionConnectFailed",n)}if(null==ev||a(ev))return setTimeout(ex.bind(ea,k(I.AUTHENTICATION_ERROR,Error("API Key is undefined. You must pass an API Key to initSession."),x.AUTHENTICATION_ERROR))),ea;if(!eS||s(eS)||Array.isArray(eS)){let e;return eS?(e="SessionID is not a string. You must use string as the session ID passed into OT.initSession().",eS=eS.toString()):e="SessionID is undefined. You must pass a sessionID to initSession.",setTimeout(ex.bind(ea,k(I.INVALID_SESSION_ID,Error(e),x.INVALID_SESSION_ID))),ea.logConnectivityEvent("Attempt"),ea.logConnectivityEvent("Failure",null,{failureReason:"ConnectToSession",failureCode:x.INVALID_SESSION_ID,failureMessage:e}),ea}ea.apiKey=ev.toString(),ev=ev.toString(),0===E.value.length&&(E.value=ev);let p=!!V.onlyLocal().configUrl,f=!0===ep&&!!V.onlyLocal().ipWhitelistConfigUrl;return p||f?ea.logConfigurationFileEvent("Attempt"):ea.logConfigurationFileEvent("Event",{message:"No configUrl, using local config only"}),(p||f?V.get({partnerId:ev,token:r,useIpWhitelistConfigUrl:f,proxyUrl:ef}):t.resolve(V.onlyLocal())).then(e=>((p||f)&&ea.logConfigurationFileEvent("Success"),e),e=>((p||f)&&ea.logConfigurationFileEvent("Failure",{failureMessage:e.message,failureStack:e.stack}),V.onlyLocal())).then(e=>{if(ea.staticConfig=e,eh.staticConfig=e,!1===e.apiEnabled)throw k(I.API_KEY_DISABLED,Error("The API KEY has been disabled. Access to the service is currently being restricted. Please contact support."));if(l())return;ea.logConnectivityEvent("Attempt"),ef?ea.logEvent("SessionInfo","Attempt",null,{proxyUrl:ef}):ea.logEvent("SessionInfo","Attempt");let t=e=>{e.code=C(e.code),ea.logConnectivityEvent("Failure",null,{failureReason:"GetSessionInfo",failureCode:e.code||"No code",failureMessage:e.message,failureName:e.name}),e.name&&(e=k(e.name,Error(`${e.message}${e.code?` (${e.code})`:""}`),e.code)),ex.call(ea,e)},r=n=>{if(l())return;if(n.partnerId&&n.partnerId!==ev){let e="Authentication Error: The API key does not match the token or session.";t(k(I.AUTHENTICATION_ERROR,Error(e),x.AUTHENTICATION_ERROR));return}eh.sessionInfo=n;let r={features:{reconnection:n.reconnection,renegotiation:O()&&n.renegotiation,simulcast:void 0!==n.simulcast&&n.simulcast&&"Chrome"===A.env.name}};if(ef&&(r.proxyUrl=ef),ea.is("connecting")){ea.sessionInfo=n,ea._.setIceServers(ea.sessionInfo.iceServers),$=n.p2pEnabled,q=n.messagingServer,ea.logEvent("SessionInfo","Success",null,r,{messagingServer:n.messagingServer});let t=e.sessionInfoOverrides;null!=t&&"object"==typeof t&&Object.keys(t).forEach(e=>{Object.defineProperty(ea.sessionInfo,e,{value:t[e]})}),eD.call(ea)}};return J({anvilUrl:g(e.apiUrl,ef),sessionId:n,token:Q,connectionId:eT,clientVersion:e.clientVersion}).then(r,t)}).catch(e=>{ex.call(ea,e)}),ea},this.disconnect=function(){p&&p.isNot("disconnected")?p.isNot("disconnecting")&&(p.isNot("connecting")||this.logConnectivityEvent("Cancel"),ew("disconnecting"),p.disconnect(),this.off("gsmCallEnded",eP)):ei()},this.destroy=function(){this.streams.destroy(),this.connections.destroy(),this.archives.destroy(),this.disconnect()},this.publish=function(e,t,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),n=n||function(){},this.isNot("connected"))return eh.logError(1010,"OT.exception","We need to be connected before you can publish",null,{action:"Publish",variation:"Failure",failureReason:"unconnected",failureCode:x.NOT_CONNECTED,failureMessage:"We need to be connected before you can publish",sessionId:eS,streamId:e&&e.stream?e.stream.id:null,p2p:this.sessionInfo?this.sessionInfo.p2pEnabled:void 0,messagingServer:this.sessionInfo?this.sessionInfo.messagingServer:null,partnerId:ev}),ej(k(I.NOT_CONNECTED,Error("We need to be connected before you can publish"),x.NOT_CONNECTED),n),null;if(!eX("publish")){let e="This token does not allow publishing. The role must be at least `publisher` to enable this functionality",t={failureReason:"Permission",failureCode:x.UNABLE_TO_PUBLISH,failureMessage:e};return this.logEvent("Publish","Failure",null,t),ej(k(I.PERMISSION_DENIED,Error(e),x.UNABLE_TO_PUBLISH),n),null}if(!e||"string"==typeof e||A.isElementNode(e))e=z(e,t);else{if(!(e instanceof G))return void ej(k(I.INVALID_PARAMETER,Error("Session.publish :: First parameter passed in is neither a string nor an instance of the Publisher"),x.UNABLE_TO_PUBLISH),n);"session"in e&&e.session&&"sessionId"in e.session&&(e.session.sessionId===this.sessionId?eC.warn(`Cannot publish ${e.guid()} again to ${this.sessionId}. Please call session.unpublish(publisher) first.`):eC.warn(`Cannot publish ${e.guid()} publisher already attached to ${e.session.sessionId}. Please call session.unpublish(publisher) first.`))}return eR&&e._.forceMuteAudio(),e._.publishToSession(this,eh).catch(e=>{throw e.message=`Session.publish :: ${e.message}`,eC.error(e.code,e.message),e}).then(()=>e).then(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n(null,...t)},e=>n(e)),e},this.unpublish=function(e){e?e._.unpublishFromSession(this,"unpublished"):eC.error("OT.Session.unpublish: publisher parameter missing.")},this.subscribe=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0,n=void 0),"function"==typeof n&&(r=n,n=void 0),r=r||function(){},!this.connection||!this.connection.connectionId)return void ej(k(I.NOT_CONNECTED,Error("Session.subscribe :: Connection required to subscribe"),x.UNABLE_TO_SUBSCRIBE),r);if(!e)return void ej(k(I.INVALID_PARAMETER,Error("Session.subscribe :: stream cannot be null"),x.UNABLE_TO_SUBSCRIBE),r);if(!Object.prototype.hasOwnProperty.call(e,"streamId"))return void ej(k(I.INVALID_PARAMETER,Error("Session.subscribe :: invali
32d stream object"),x.UNABLE_TO_SUBSCRIBE),r);if(n&&!1===n.insertDefaultUI&&t)return void ej(k(I.INVALID_PARAMETER,Error("You cannot specify a target element if insertDefaultUI is false"),x.INVALID_PARAMETER),r);t&&!1===t.insertDefaultUI&&(n=t,t=void 0);let i=new U(t,c(n||{},{stream:e,session:this,analytics:eh}),e=>{e?ej(e,r):r(null,i)});return D.subscribers.add(i),i},this.unsubscribe=function(e){if(!e){let e="OT.Session.unsubscribe: subscriber cannot be null";throw eC.error(e),Error(e)}return e.stream?(eC.debug(`OT.Session.unsubscribe: subscriber ${e.id}`),e._destroy({reason:"Unsubscribe"}),!0):(eC.warn("OT.Session.unsubscribe:: tried to unsubscribe a subscriber that had no stream"),!1)},this.getSubscribersForStream=function(e){return D.subscribers.where({streamId:e.id})},this.getPublisherForStream=function(e){let t,n;if("string"==typeof e)t=e;else if("object"==typeof e&&e&&Object.hasOwnProperty.call(e,"id"))t=e.id;else throw n="Session.getPublisherForStream :: Invalid stream type",eC.error(n),Error(n);return D.publishers.where({streamId:t})[0]},this._={getProxyUrl:()=>ef,isSocketReconnecting:()=>eg,getSocket:()=>p,reconnecting:(function(){eg=!0,this.dispatchEvent(new _.SessionReconnectingEvent)}).bind(this),reconnected:(function(){eg=!1,this.dispatchEvent(new _.SessionReconnectedEvent),this.sessionInfo.reconnection&&(D.publishers.where({session:this}).forEach(e=>{e._.iceRestart()}),this.sessionInfo.p2pEnabled||D.subscribers.where({session:this}).forEach(e=>{e._.iceRestart("socket reconnected")}))}).bind(this),dispatchSignal:(function(e,t,n){let r=new _.SignalEvent(t,n,e);r.target=this,this.trigger(u.SIGNAL,r),t&&this.dispatchEvent(r)}).bind(this),subscriberChannelUpdate:(e,t,n,r)=>p?p.subscriberChannelUpdate(e.id,t.widgetId,n.id,r):(eC.warn("You are disconnected, cannot update subscriber properties ",r),null),streamCreate(e,t,n,r,i,o,s){p?p.streamCreate(e,t,n,r,i,void 0,o,s):eC.warn("You are disconnected, cannot create stream ",t)},streamDestroy(e,t){p?p.streamDestroy(e,t):eC.warn("You are disconnected, cannot destroy stream ",e)},streamChannelUpdate(e,t,n){p?p.streamChannelUpdate(e.id,t.id,n):eC.warn("You are disconnected, cannot update stream properties ",n)},setSocket(e){p=e},setLogging(e){eC=e},setState:ew,setIceServers(e){e&&(en={iceServers:y(e),timestamp:Date.now()})},getOtIceServerInfo(){if(864e5-(en?Date.now()-en.timestamp:1/0)>3e5)return t.resolve({transportPolicy:ey&&ey.sessionInfo&&ey.sessionInfo.clientCandidates,servers:en&&en.iceServers});if(!Q)return t.resolve({transportPolicy:ey&&ey.sessionInfo&&ey.sessionInfo.clientCandidates,servers:[],needRumorIceServersFallback:!0});let e=W.clientVersion;return J({anvilUrl:(this.staticConfig||W).apiUrl,sessionId:n,token:Q,connectionId:eT,clientVersion:e}).then(e=>(ey._.setIceServers(e.iceServers),en)?{transportPolicy:ey&&ey.sessionInfo&&ey.sessionInfo.clientCandidates,servers:en&&en.iceServers}:{transportPolicy:ey.sessionInfo.clientCandidates,servers:[],needRumorIceServersFallback:!0})},getCodecFlags:()=>({h264:ey.sessionInfo.h264,vp9:ey.sessionInfo.vp9,vp8:ey.sessionInfo.vp8}),getVideoCodecsCompatible:e=>m({RTCPeerConnection:H.RTCPeerConnection,env:A.env,stream:e,codecFlags:ey._.getCodecFlags()}),getIceConfig:()=>{if(!eu)return ey._.getOtIceServerInfo();let e=eu&&"relay"===eu.transportPolicy?"relay":ey.sessionInfo.clientCandidates;return("custom"===eu.includeServers?t.resolve({servers:[]}):ey._.getOtIceServerInfo()).then(t=>c(t,{transportPolicy:e,servers:[...t.servers,...eu.customServers]}))},forceMute:(function(e){this.dispatchEvent(new _.MuteForcedEvent(e))}).bind(this),enableMuteOnEntry:()=>{eR=!0},addSubscriberToPeerConnectionsQueue:(e,t)=>{eI.push({pc:e,message:t}),e_||(e_=setInterval(()=>{let e=eI.pop();e?e.pc.processMessage("offer",e.message):(clearInterval(e_),e_=null)},100))},disableMuteOnEntry:()=>{eR=!1},privateEvents:new i},this.signal=function(e,t){let n=e,r=t||function(){};if(a(n)&&(r=n,n=null),this.isNot("connected")){let e="Unable to send signal - you are not connected to the session.";ej(k(I.NOT_CONNECTED,Error(e),500),r);return}function i(e){switch(e){case 400:case 413:return I.INVALID_PARAMETER;case 429:return I.RATE_LIMIT_EXCEEDED;case 404:return I.NOT_FOUND;case 500:return I.NOT_CONNECTED;case 403:return I.PERMISSION_DENIED;case 2001:return I.UNEXPECTED_SERVER_RESPONSE;default:return}}p.signal(n,function(e){if(e){let t=i(e.code);t&&(e=k(t,Error(e.message),e.code)),r(e);return}for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r(e,...n)},this.logEvent),e&&e.data&&"string"!=typeof e.data&&eC.warn("Signaling of anything other than Strings is deprecated. Please update the data property to be a string.")},this.forceDisconnect=function(e,t){if(this.isNot("connected")){let e="Cannot call forceDisconnect(). You are not connected to the session.";ej(k(I.NOT_CONNECTED,Error(e),x.NOT_CONNECTED),t);return}let n="string"==typeof e?e:e.id,r="Invalid Parameter. Check that you have passed valid parameter values into the method call.";if(!n)return void ej(k(I.INVALID_PARAMETER,Error(r),x.INVALID_PARAMETER),t);let i="This token does not allow forceDisconnect. The role must be at least `moderator` to enable this functionality";eX("forceDisconnect")?p.forceDisconnect(n,function(e){if(e)ej(k(I.INVALID_PARAMETER,Error(r),x.INVALID_PARAMETER),t);else if(t&&a(t)){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];t(e,...i)}}):ej(k(I.PERMISSION_DENIED,Error(i),x.UNABLE_TO_FORCE_DISCONNECT),t)},this.forceUnpublish=function(e,t){void 0===t&&(t=()=>{});let n=e=>ej(k(e.name,Error(e.msg),e.code),t),r={msg:"Invalid Parameter. Check that you have passed valid parameter values into the method call.",code:x.INVALID_PARAMETER,name:I.INVALID_PARAMETER},i={msg:"Cannot call forceUnpublish(). You are not connected to the session.",code:x.NOT_CONNECTED,name:I.NOT_CONNECTED},o={msg:"This token does not allow forceUnpublish. The role must be at least `moderator` to enable this functionality",code:x.UNABLE_TO_FORCE_UNPUBLISH,name:I.PERMISSION_DENIED},s={msg:"The stream does not exist.",name:I.NOT_FOUND},a={msg:"An unexpected error occurred.",name:I.UNEXPECTED_SERVER_RESPONSE,code:x.UNEXPECTED_SERVER_RESPONSE};if(!e)return void n(r);if(ea.isNot("connected"))return void n(i);let c=em(e);
32eX("forceUnpublish")?p.forceUnpublish(c.id,e=>{e?"404"===e.code?n(s):"403"===e.code?n(o):n(a):t(null)}):n(o)},this.forceMuteStream=e=>new t((t,n)=>{let r=eF();r?n(r):e&&e.id?p.forceMuteStream(e.id,e=>{e?n(eY(e)):t()}):n(eU(L.INVALID_PARAMETER))}),this.forceMuteAll=e=>new t((t,n)=>{let r=eF();if(r)return void n(r);if(Array.isArray(e)&&!e.every(e=>e instanceof w)||e&&!Array.isArray(e))return void n(eU(L.INVALID_PARAMETER));let i=(e||[]).map(e=>e.id);p.forceMuteAll(i,!0,e=>{e?n(eY(e)):t()})}),this.disableForceMute=()=>new t((e,t)=>{let n=eF();n?t(n):p.forceMuteAll([],!1,n=>{n?t(eY(n)):e()})}),this.isConnected=()=>this.is("connected"),this.capabilities=new T([])}}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(8),i=n(22),o=[400,403,409,r.CONNECTION_LIMIT_EXCEEDED],s="ConnectToSession",a="GetSessionState";e.exports=function(e){let t,n;if(e.reason===s&&e.code===r.CONNECT_FAILED)t=e.code,n=i.getTitleByCode(e.code);else if(e.code&&o.indexOf(Number(e.code))>-1)switch(t=r.CONNECT_FAILED,e.reason){case s:e.code===r.CONNECTION_LIMIT_EXCEEDED?(t=e.code,n="Cannot connect -- the limit for concurrent connections to the session has been reached"):n="Received error response to connection create message.";break;case a:n="Received error response to session read";break;default:n=""}else t=r.UNEXPECTED_SERVER_RESPONSE,n="Unexpected server response. Try this operation again later.";return{code:t,message:n}}},function(e,t,n){"use strict";let r=n(2),i=n(61).once;e.exports=()=>i()&&(r.isChromiumEdge||["Chrome","Safari","Firefox","Opera"].includes(r.name))},function(e,t,n){"use strict";e.exports=function(e){return JSON.stringify(e)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,t.default=e=>{let t=e.logger,n=e.obj;e.eventNames.forEach(e=>{n.on(e,function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.spam("emitted",e,r)})})}},function(e,t,n){"use strict";let r=n(15),i=n(22),o=n(6),s=n(1)("Dispatcher"),a=n(172),c=n(713),u=function(){o(this),this.callbacks={}};e.exports=u,u.prototype.registerCallback=function(e,t){this.callbacks[e]=t},u.prototype.triggerCallback=function(e){if(!e)return;let t=this.callbacks[e];if(t&&r(t)){let e=Array.prototype.slice.call(arguments);e.shift(),t(...e)}delete this.callbacks[e]},u.prototype.onClose=function(e){this.emit("close",e)},u.prototype.onReconnected=function(){this.emit("reconnected")},u.prototype.onReconnecting=function(){this.emit("reconnecting")},u.prototype.dispatch=function(e){if(e.type===a.STATUS){var t;let n;if(s.debug(e),e.isError){let t;if("string"==typeof e.data)try{let n=JSON.parse(e.data);n&&"object"==typeof n&&(t=n.reason)}catch(e){s.warn("Failed to parse rumorMessage.data",e)}n=new i(e.status,t)}let r=e.data?JSON.parse(e.data):"";(null==r||null==(t=r.mute)?void 0:t.active)&&this.dispatchMuteOnEntry(),this.triggerCallback(e.transactionId,n,e);return}let n=c(e);switch(s.debug(`${n.signature}:`,n),n.resource){case"session":this.dispatchSession(n);break;case"connection":this.dispatchConnection(n);break;case"stream":this.dispatchStream(n);break;case"stream_channel":this.dispatchStreamChannel(n);break;case"subscriber":this.dispatchSubscriber(n);break;case"subscriber_channel":this.dispatchSubscriberChannel(n);break;case"signal":this.dispatchSignal(n);break;case"archive":this.dispatchArchive(n);break;case"source":this.dispatchSource(n);break;default:s.debug(`Type ${n.resource} is not currently implemented`)}},u.prototype.dispatchSession=function(e){switch(e.method){case"read":this.emit("session#read",e.content,e.transactionId);break;
vendor: 2,504 bytes, line 32
32case"update":this.emit("session#update",e.content);break;default:s.debug(`${e.signature} is not currently implemented`)}},u.prototype.dispatchMuteOnEntry=function(){this.emit("session#muted")},u.prototype.dispatchConnection=function(e){switch(e.method){case"created":this.emit("connection#created",e.content);break;case"deleted":this.emit("connection#deleted",e.params.connection,e.reason);break;default:s.debug(`${e.signature} is not currently implemented`)}},u.prototype.dispatchStream=function(e){switch(e.method){case"created":this.emit("stream#created",e.content,e.transactionId);break;case"deleted":this.emit("stream#deleted",e.params.stream,e.reason,e.content);break;case"updated":this.emit("stream#updated",e.params.stream,e.content);break;case"update":this.emit("stream#update",e.params.stream,e.content);break;case"generateoffer":case"answer":case"pranswer":case"offer":case"candidate":this.dispatchJsep(e.method,e);break;default:s.debug(`${e.signature} is not currently implemented`)}},u.prototype.dispatchStreamChannel=function(e){"updated"===e.method?this.emit("streamChannel#updated",e.params.stream,e.params.channel,e.content):s.debug(`${e.signature} is not currently implemented`)},u.prototype.dispatchJsep=function(e,t){this.emit(`jsep#${e}`,t.params.stream,t.fromAddress,t)},u.prototype.dispatchSubscriberChannel=function(e){switch(e.method){case"updated":this.emit("subscriberChannel#updated",e.params.stream,e.params.channel,e.content);break;case"update":this.emit("subscriberChannel#update",e.params.subscriber,e.params.stream,e.content);break;default:s.debug(`${e.signature} is not currently implemented`)}},u.prototype.dispatchSubscriber=function(e){switch(e.method){case"created":this.emit("subscriber#created",e.params.stream,e.fromAddress,e.content.id);break;case"deleted":this.dispatchJsep("unsubscribe",e),this.emit("subscriber#deleted",e.params.stream,e.fromAddress);break;case"generateoffer":case"answer":case"pranswer":case"offer":case"candidate":this.dispatchJsep(e.method,e);break;default:s.debug(`${e.signature} is not currently implemented`)}},u.prototype.dispatchSignal=function(e){"signal"!==e.method?s.debug(`${e.signature} is not currently implemented`):this.emit("signal",e.fromAddress,e.content)},u.prototype.dispatchArchive=function(e){switch(e.method){case"created":this.emit("archive#created",e.content);break;case"updated":this.emit("archive#updated",e.params.archive,e.content)}},u.prototype.dispatchSource=function(e){switch(e.method){case"create":this.emit
32("source#create",e.params.source,e.params.stream,e.reason);break;case"delete":this.emit("source#delete",e.params.source,e.params.stream,e.reason);break;default:s.debug(`${e.signature} is not currently implemented`)}}},function(e,t,n){"use strict";let r=n(19),i=n(5),o=n(716),s=n(717),a=n(313),c=n(718),u=n(34)().onlyLocal(),d={};e.exports=d,d.connections={},d.connections.create=function(e){let t=e.apiKey,n=e.sessionId,r=e.connectionId,o=e.connectionEventsSuppressed,s=e.capabilities;return a({method:"create",uri:`/v2/partner/${t}/session/${n}/connection/${r}`,content:{userAgent:i.env.userAgent,clientVersion:u.clientVersion,capabilities:s||[],connectionEventsSuppressed:o}})},d.connections.destroy=function(e){let t=e.apiKey,n=e.sessionId,r=e.connectionId;return a({method:"delete",uri:`/v2/partner/${t}/session/${n}/connection/${r}`,content:{}})},d.sessions={},d.sessions.get=function(e,t){return a({method:"read",uri:`/v2/partner/${e}/session/${t}`,content:{}})},d.streams={},d.streams.get=function(e,t,n){return a({method:"read",uri:`/v2/partner/${e}/session/${t}/stream/${n}`,content:{}})},d.streams.channelFromOTChannel=function(e){let t={id:e.id,type:e.type,active:e.active};return"video"===e.type&&(t.width=e.width,t.height=e.height,t.orientation=e.orientation,t.frameRate=e.frameRate,"default"!==e.source&&(t.source=e.source),t.fitMode=e.fitMode),t},d.streams.create=function(e){void 0===e&&(e={});let t=e,n=t.apiKey,r=t.sessionId,i=t.streamId,o=t.name,s=t.audioFallbackEnabled,c=t.channels,u=t.minBitrate,l=t.maxBitrate,p=t.sourceStreamId,f={id:i,name:o,audioFallbackEnabled:s,channel:c.map(e=>d.streams.channelFromOTChannel(e))};return u&&(f.minBitrate=Math.round(u)),l&&(f.maxBitrate=Math.round(l)),p&&(f.sourceStreamId=p),a({method:"create",uri:`/v2/partner/${n}/session/${r}/stream/${i}`,content:f})},d.streams.destroy=function(e,t,n,r){let i={};return r&&(i.sourceStreamId=r),a({method:"delete",uri:`/v2/partner/${e}/session/${t}/stream/${n}`,content:i})},d.streamChannels={},d.streamChannels.update=function(e,t,n,r,i){return a({method:"update",uri:`/v2/partner/${e}/session/${t}/stream/${n}/channel/${r}`,content:i})},d.subscribers={},d.subscribers.create=function(e){void 0===e&&(e={});let t=e,n=t.apiKey,r=t.sessionId,i=t.streamId,u=t.subscriberId,d=t.connectionId,l=t.channelsToSubscribeTo,p=t.sourceStreamId,f={id:u,connection:d,keyManagementMethod:c,bundleSupport:o(),rtcpMuxSupport:s()};return l&&(f.channel=l),p&&(f.sourceStreamId=p),a({method:"create",uri:`/v2/partner/${n}/session/${r}/stream/${i}/subscriber/${u}`,content:f})},d.subscribers.destroy=function(e,t,n,r){return a({method:"delete",uri:`/v2/partner/${e}/session/${t}/stream/${n}/subscriber/${r}`,content:{}})},d.subscribers.update=function(e,t,n,r,i){return a({method:"update",uri:`/v2/partner/${e}/session/${t}/stream/${n}/subscriber/${r}`,content:i})},d.subscriberChannels={},d.subscriberChannels.update=function(e,t,n,r,i,o){return a({method:"update",uri:`/v2/partner/${e}/session/${t}/stream/${n}/subscriber/${r}/channel/${i}`,content:o})},d.signals={},d.signals.create=function(e,t,n,i,o){let s={};return void 0!==i&&(s.type=i),void 0!==o&&(s.data=o),a({method:"signal",uri:`/v2/partner/${e}/session/${t}${void 0!==n?`/connection/${n}`:""}/signal/${r()}`,content:s})},d.forceMute={},d.forceMute.update=e=>{let t=e.apiKey,n=e.sessionId,r=e.streamId,i=e.active,o=e.excludedStreamIds,s={reason:"mute",channels:["audio"],active:i,locked:!1};return o&&(s.exclusion=o),a({method:"update",uri:`/v2/partner/${t}/session/${n}${r?`/stream/${r}`:""}`,content:s})}},function(e,t,n){"use strict";let r=n(37),i=n(72),o=n(173),s=n(316),a=n(318),c=8192,u=128;e.exports=function(e,t,n){let d=function(e){return!/^[a-zA-Z0-9\-\._~]+$/.exec(e)},l=function(e){return e?e instanceof o||e._tag===a?null:{code:400,reason:"The To field was invalid"}:{code:400,reason:"The signal to field was invalid. Either set it to a OT.Connection, OT.Session, or omit it entirely"}},p=function(e){let t=null;return null==e?t={code:400,reason:"The signal type was null or undefined. Either set it to a String value or omit it"}:e.length>u?t={code:413,reason:`The signal type was too long, the maximum length of it is ${u} characters`}
32:d(e)&&(t={code:400,reason:"The signal type was invalid, it can only contain letters, numbers, '-', '_', and '~'."}),t},f=function(e){let t=null;if(null==e)t={code:400,reason:"The signal data was null or undefined. Either set it to a String value or omit it"};else try{JSON.stringify(e).length>c&&(t={code:413,reason:`The data field was too long, the maximum size of it is ${c} characters`})}catch(e){t={code:400,reason:"The data field was not valid JSON"}}return t},h=function(e){let t=null;return!0!==e&&!1!==e&&(t={code:400,reason:"The signal retryAfterReconnect was not true or false. Either set it to a Boolean value or omit it"}),t};this.toRaptorMessage=function(){let t=this.to;return t&&"string"!=typeof t&&(t=t.id),s.signals.create(i.value,e,t,this.type,this.data)},this.toHash=function(){return n},this.error=null,this.retryAfterReconnect=!0,n&&(n.hasOwnProperty("data")&&(this.data=r(n.data),this.error=f(this.data)),n.hasOwnProperty("to")&&(this.to=n.to,this.error||(this.error=l(this.to))),n.hasOwnProperty("type")&&(this.error||(this.error=p(n.type)),this.type=n.type),n.hasOwnProperty("retryAfterReconnect")&&(this.error||(this.error=h(n.retryAfterReconnect)),this.retryAfterReconnect=n.retryAfterReconnect)),this.valid=null===this.error}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var r=n(3),i=r(n(12)),o=r(n(13));let s=n(320),a=n(49),c=n(173),u=n(721),d=n(315),l=n(1)("SessionDispatcher"),p=n(21),f=n(171),h=n(150),m=n(168);function b(e){return{id:e,creationTime:new Date().getTime(),data:{},capablities:{},permissions:[]}}function g(e,t){let n=e.channel.map(e=>new h(e)),r=e.connectionId?e.connectionId:e.connection.id;return new f(e.id,e.name,e.creationTime,t.connections.get(r),t,n)}function v(e,t){if(t.streams.has(e.id))return;let n=g(e,t);return t.streams.add(n),n}function y(e){return new s(e.id,e.name,e.status)}function S(e,t){if(t.archives.has(e.id))return;let n=y(e);return t.archives.add(n),n}let E=function(e){let t={};this.enqueue=function(){let n=arguments[0],r=Array.prototype.slice.call(arguments,1);t[n]||(t[n]=new u(e)),t[n].enqueue.apply(t[n],r)},this.triggerConnectionCreated=function(e){t[`connectionCreated${e.id}`]&&t[`connectionCreated${e.id}`].triggerAll()},this.triggerSessionConnected=function(e){t.sessionConnected&&t.sessionConnected.triggerAll(),e.forEach(function(e){this.triggerConnectionCreated(e)},this)}},T={};e.exports=function(e,t){let n=(void 0===t?{}:t).connectionEventsSuppressed,r=new d,s=!1,u=new E(r);r.on("reconnecting",()=>{e._.reconnecting()}),r.on("reconnected",()=>{e._.reconnected()}),r.on("close",t=>{let n=e.connection;if(n){if(n.destroyedReason())return void l.debug(`Socket was closed but the connection had already been destroyed. Reason: ${n.destroyedReason()}`);n.destroy(t)}});let f=function(t,n){return e.connections.has(t.id)?e.connections.get(t.id):(t=c.fromHash(t),(n||e.connection&&t.id!==e.connection.id)&&(e.connections.add(t),u.triggerConnectionCreated(t)),Object.keys(T).forEach(r=>{let i=T[r];if(i&&t.id===i.connection.id){v(i,e),delete T[i.id];let r={debug:n?"connection came in session#read":"connection came in connection#created",streamId:i.id,connectionId:t.id};e.logEvent("streamCreated","warning",r)}}),t)};r.on("session#read",(t,n)=>{let i,o={};o.streams=[],o.connections=[],o.archives=[],t.connection.forEach(e=>{i=f(e,!0),o.connections.push(i)}),t.stream.forEach(t=>{o.streams.push(v(t,e))}),(t.archive||t.archives).forEach(t=>{o.archives.push(S(t,e))}),r.triggerCallback(n,null,o),s=!0,u.triggerSessionConnected(e.connections)}),r.on("session#update",t=>{if("mute"!==t.reason)return void l.debug("session#update that handle this reason is not currently implemented");let n=!0===t.active;e._.forceMute({active:n}),n?e._.enableMuteOnEntry():e._.disableMuteOnEntry()}),r.on("session#muted",()=>{e._.enableMuteOnEntry(),e._.forceMute({active:!0})}),r.on("connection#created",e=>{f(e)}),r.on("connection#deleted",(t,n)=>{(t=e.connections.get(t))?t.destroy(n):l.warn("A connection was deleted that we do not know about")}),r.on("stream#created",(t,i)=>{let o,s=t.id,a=t.sourceStreamId,c=t.connection;if(n){if(null==c||null==c.id)return void e.logEvent("SessionDispatcher:stream#created","Event",{connection:c,info:"Stream did not contain a connection object. Event ignored"});f(c)}let u=t.connectionId||c.id;if(e.connections.has(u))o=v(t,e);else{T[s]=t;let n={debug:"eventOrderError -- streamCreated event before connectionCreated",streamId:s,sourceStreamId:m(a
32)};e.logEvent("streamCreated","warning",n)}o?(o.publisher&&o.publisher.setStream(o),r.triggerCallback(i,null,o)):e.sessionInfo.isAdaptiveEnabled&&"P2P"===a&&p.subscribers.where({streamId:s}).forEach(e=>{e._.startRoutedToRelayedTransition()})}),r.on("stream#deleted",(t,n,r)=>{let i=e.streams.get(t),o=r.sourceStreamId,s=p.subscribers,a=e.sessionInfo.isAdaptiveEnabled&&"P2P"===o;(i||a)&&(a?s.where({streamId:t}).forEach(e=>{e._.startRelayedToRoutedTransition()}):i.destroy(n))}),r.on("stream#updated",(t,n)=>{let r=e.streams.get(t);r?r._.update(n):l.error(`A stream does not exist with the id of ${t}, for stream#updated message!`)}),r.on("stream#update",(t,n)=>{let r=e.streams.get(t),i=n.reason,o=n.active;r?"mute"!==i?l.debug("stream#update that handle this reason is not currently implemented"):o&&r._.forceMute(n):l.error(`A stream does not exist with the id of ${t}, for stream#updated message!`)}),r.on("streamChannel#updated",(t,n,r)=>{let i;t&&(i=e.streams.get(t))?i._.updateChannel(n,r):l.error("Unable to determine streamId, or the stream does not exist, for streamChannel message!")});let h=(t,n,r,s)=>{let u,d,f={streamId:n},h=p.subscribers,m=p.publishers;switch(u=s.params.subscriber?{widgetId:s.params.subscriber}:f,t){case"offer":d=[].concat(h.where(u),m.where(f)).slice(0,1);break;case"answer":case"pranswer":d=[].concat(m.where(f),h.where(u)).slice(0,1);break;case"generateoffer":case"unsubscribe":d=m.where(f);break;case"candidate":d=[].concat(h.where(u),m.where(f));break;default:l.debug(`jsep#${t} is not currently implemented`);return}if(0===d.length)return;let b=e.connections.get(r);!b&&r.match(/^symphony\./)&&(b=c.fromHash({id:r,creationTime:Math.floor(a())}),e.connections.add(b)),d.forEach(function(){var e=(0,o.default)(i.default.mark(function e(n){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.processMessage(t,r,s);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),l.error("Error occurred during processMessage",e.t0);case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(t){return e.apply(this,arguments)}}())};return r.on("jsep#offer",h.bind(null,"offer")),r.on("jsep#answer",h.bind(null,"answer")),r.on("jsep#pranswer",h.bind(null,"pranswer")),r.on("jsep#generateoffer",h.bind(null,"generateoffer")),r.on("jsep#unsubscribe",h.bind(null,"unsubscribe")),r.on("jsep#candidate",h.bind(null,"candidate")),r.on("subscriberChannel#updated",(t,n,r)=>{t&&e.streams.has(t)?e.streams.get(t)._.updateChannel(n,r):l.error("Unable to determine streamId, or the stream does not exist, for subscriberChannel#updated message!")}),r.on("subscriberChannel#update",(t,n,r)=>{n&&e.streams.has(n)?p.subscribers.has(t)?p.subscribers.get(t).disableVideo(r.active):l.error("Unable to determine subscriberId, or the subscriber does not exist, for subscriberChannel#update message!"):l.error("Unable to determine streamId, or the stream does not exist, for subscriberChannel#update message!")}),r.on("signal",(t,r)=>{if(n){let n=r.connection||r.fromConnection;(null==n||null==n.id)&&(n=b(t),e.logEvent("SessionDispatcher:Signal","Event",{fromAddress:t,connection:r.connection,fromConnection:r.fromConnection,info:"Signal did not contain a connection object. One has been constructed",constructedConnection:n})),f(n)}let i=r.type,o=r.data,a=e.connections.get(t);e.connection&&t===e.connection.connectionId?s?e._.dispatchSignal(a,i,o):u.enqueue("sessionConnected","signal",t,i,o):e.connections.get(t)?e._.dispatchSignal(a,i,o):""===t?e._.dispatchSignal(null,i,o):u.enqueue(`connectionCreated${t}`,"signal",t,i,o)}),r.on("archive#created",t=>{S(t,e)}),r.on("archive#updated",(t,n)=>{let r=e.archives.get(t);r?r._.update(n):l.error(`An archive does not exist with the id of ${t}, for archive#updated message!`)}),r.on("source#create",(t,n,r)=>{let i=m(t);e.logEvent("SessionDispatcher:source#create","Event",{sourceStreamId:i,streamId:n,reason:r}),l.debug(`Received a request from RUMOR to start a transition to ${t} for the stream ID ${n} with the reason: ${r}`),p.publishers.where({streamId:n}).forEach(e=>{e._.startRoutedToRelayedTransition()})}),r.on("source#delete",(t,n,r)=>{e.logEvent("SessionDispatcher:source#delete","Event",{sourceStreamId:m(t),streamId:n,reason:r}),l.debug(`Received a request from RUMOR to start a transition from P2P to MANTIS for the stream ID ${n} with the reason: ${r}`),p.publishers.where({streamId:n}
32).forEach(e=>{e._.startRelayedToRoutedTransition()})}),r}},function(e,t,n){"use strict";let r=n(23)(),i=n(6);e.exports=function(e,t,n){this.id=e,this.name=t,this.status=n,this._={},i(this),this._.update=e=>{Object.keys(e).forEach(t=>{let n=this[t];this[t]=e[t];let i=new r.ArchiveUpdatedEvent(this,t,n,this[t]);this.dispatchEvent(i)})},this.destroy=()=>{}}},function(e,t,n){"use strict";let r=n(24)().getAudioOutputMediaDevices;e.exports=()=>r()},function(e,t,n){"use strict";let r=n(24)().getActiveAudioOutputDevice;e.exports=()=>r()},function(e,t,n){"use strict";(function(t){var r=n(3),i=r(n(12)),o=r(n(13));let s=n(21),a=n(105).setCurrentAudioOutputDeviceId,c=n(322),u=n(24)(),d=u.getDefaultAudioOutputDeviceId,l=u.getAudioOutputMediaDevices,p=n(294),f=new(n(27)),h=(e,t)=>{f.logEvent({action:"updateSubscribersSinkId",variation:e,payload:t})},m=e=>{let n=s.subscribers.map(t=>t._.setSinkId(e));return t.all(n)},b=function(){var e=(0,o.default)(i.default.mark(function e(t){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p();case 2:return e.prev=2,h("Attempt",{deviceId:t}),e.next=6,m(t);case 6:h("Success",{deviceId:t}),e.next=13;break;case 9:throw e.prev=9,e.t0=e.catch(2),h("Failure",{deviceId:t,error:null==e.t0?void 0:e.t0.message}),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=(0,o.default)(i.default.mark(function e(){var t;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l();case 2:return t=d(e.sent),e.prev=4,e.next=7,b(t);case 7:a(t),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(4);case 12:case"end":return e.stop()}},e,null,[[4,10]])}));return function(){return e.apply(this,arguments)}}(),v=function(){var e=(0,o.default)(i.default.mark(function e(){var t;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c();case 2:return t=e.sent,e.prev=3,e.next=6,b(t.deviceId);case 6:e.next=12;break;case 8:return e.prev=8,e.t0=e.catch(3),e.next=12,g();case 12:case"end":return e.stop()}},e,null,[[3,8]])}));return function(){return e.apply(this,arguments)}}();e.exports=function(){var e=(0,o.default)(i.default.mark(function e(t){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,h("Attempt",{deviceId:t}),e.next=4,m(t);case 4:h("Success",{deviceId:t}),a(t),e.next=14;break;case 8:return e.prev=8,e.t0=e.catch(0),h("Failure",{deviceId:t,error:null==e.t0?void 0:e.t0.message}),e.next=13,v();case 13:throw e.t0;case 14:case"end":return e.stop()}},e,null,[[0,8]])}));return function(t){return e.apply(this,arguments)}}()}).call(this,n(0))},function(e,t,n){"use strict";n(325);let r=n(37),i=n(26),o=n(6),s=n(126),a=n(34)(),c=n(27),u=n(250),d=n(545),l=n(546),p=a.onlyLocal(),f={};f.noConflict=n(547)(),window.OT=f,e.exports=f,(()=>{let e=f;Object.defineProperty(window,"TB",{get:()=>(e===f&&console.warn("window.TB is deprecated, and will be removed in the future. Please access via window.OT"),e),set:t=>{e=t},configurable:!0})})();let h=n(142)(window),m=n(5),b=n(72),g=n(143),v=n(253),y=n(144),S=n(145),E=n(254),T=n(146),C=n(4),R=n(8),I=n(255),_=n(241),w=n(1)("OT"),x=n(119),O=n(574),N=n(22),k=n(100).parseIceServers,Z=n(267),A=n(21),L=n(150),V=n(152),W=n(153),G=n(101)({global:h}),P=n(11)({}),M=n(159)(),D=n(280)({otError:P}),X=n(281)(),j=n(286)({global:h}),U=n(24)({getNativeEnumerateDevices:j}),F=n(23)(),Y=n(161)(),B=n(628)({otError:P,global:h}),H=n(162)({chromeExtensionHelper:D,otError:P}),J=n(633)({deviceHelpers:U,generateConstraintInfo:I,getUserMediaHelper:B,global:h,OTHelpers:m,screenSharing:H}),K=n(636)({otError:P,processPubOptions:J}),z=n(163)({otError:P}),Q=n(74),$=n(291)(),q=n(292)({otError:P}),ee=n(293)({global:h,videoElementErrorMap:q}),et=n(164)({global:h}),en=n(295)({PeerConnection:G,setCertificates:et}),er=n(296)({PeerConnection:G,setCertificates:et}),ei=n(297)(),eo=n(645)({otError:P}),es=n(107)({NativeVideoElementWrapper:ee}),ea=n(151)(),ec=n(165)({VideoElementFacade:es}),eu=n(300)({interpretPeerConnectionError:z,otError:P,SubscriberPeerConnection:er,WidgetView:ec}),ed=n(169)({APIKEY:b,createChromeMixin:X,deviceHelpers:U,EnvironmentLoader:T,Errors:C,Events:F,ExceptionCodes:R,calculateCapableSimulcastStreams:v,global:h,interpretPeerConnectionError:z,IntervalRunner:Q,Microphone:$,otError:P,OTErrorClass:N,OTHelpers:m,parseIceServers:k,processPubOptions:J,PUBLISH_MAX_DELAY:Z,PublisherPeerConnection:en,PublishingState:ei,StreamChannel:L,systemRequirements:W,VideoOrientation:ea,WidgetView:ec}),el=n(309)({otError:P,Publisher:ed}),ep=n(310)({global:h,initPublisher:el,otError:P,Publisher:ed,Subscriber:eu}),ef=n(725)({Session:ep});o(f);let eh=n(726);u(f,"$",{name:"OT.$",getMessage:"Please use an external library like jQuery to select elements from the page.",value:m}),f.APIKEY=b.value,f.AnalyserAudioLevelSampler=S,f.Archive=n(320),f.ArchiveEvent=F.ArchiveEvent,f.ArchiveUpdatedEvent=F.ArchiveUpdatedEvent,f.AudioLevelTransformer=g,f.AudioLevelUpdatedEvent=F.AudioLevelUpdatedEvent,f.Capabilities=n(170),f.Chrome=y,f.Connection=n(173),f.ConnectionCapabilities=f.Connection.Capabilities,f.ConnectionEvent=F.ConnectionEvent,Object.keys(x).forEac
32h(e=>{f[e.toUpperCase()]=x[e].priority}),f.NONE=0,f.debug=w.debug,f.error=w.error,f.info=w.info,f.log=w.log,f.warn=w.warn,f.DestroyedEvent=F.DestroyedEvent,f.EnvLoadedEvent=F.EnvLoadedEvent,f.Error=N,f.Error.on(i.EXCEPTION,e=>{if(e.target===f.Error){let t=r(e);t.target=f,f.dispatchEvent(t)}else f.dispatchEvent(e)}),f.Event=s,f.ExceptionCodes=R,f.ExceptionEvent=F.ExceptionEvent,f.getDevices=n(729),f.getAudioOutputDevices=n(321),f.getActiveAudioOutputDevice=n(322),f.setAudioOutputDevice=n(730)(),f.GetAudioLevelSampler=E,f.HAS_REQUIREMENTS=1,f.IntervalRunner=Q,f.IssueReportedEvent=F.IssueReportedEvent,f.MediaStoppedEvent=F.MediaStoppedEvent,f.Microphone=$,f.NOT_HAS_REQUIREMENTS=0,f.PeerConnection=G,f.PeerConnection.QOS=n(278).default,f.Publisher=ed,f.PublisherPeerConnection=en,f.PublishingState=ei,f.MuteForcedEvent=F.MuteForcedEvent,f.Session=ep,f.SessionConnectEvent=F.SessionConnectEvent,f.SessionDisconnectEvent=F.SessionDisconnectEvent,f.SessionDispatcher=n(319),f.Signal=n(317),f.SignalEvent=F.SignalEvent,f.Stream=n(171),f.StreamChannel=L,f.StreamEvent=F.StreamEvent,f.StreamPropertyChangedEvent=F.StreamPropertyChangedEvent,f.StreamUpdatedEvent=F.StreamUpdatedEvent,f.StylableComponent=V,f.Subscriber=eu,f.SubscriberPeerConnection=er,f.SubscribingState=n(303),f.VideoDimensionsChangedEvent=F.VideoDimensionsChangedEvent,f.VideoDisableWarningEvent=F.VideoDisableWarningEvent,f.VideoElement=es,f.VideoEnabledChangedEvent=F.VideoEnabledChangedEvent,f.VideoOrientation=ea,f.WidgetView=ec,f.getSupportedCodecs=eh,f._={AnalyticsHelper:c,getClientGuid:_.get,StaticConfig:a},Object.defineProperty(f,"version",{value:p.version});let em={},eb=e=>l.includes(e);u(em,"version",{value:p.version,name:"OT.properties.version",getWarning:"Please use OT.version instead",warnOnSet:!0,setWarning:"Mutating version has no effect"}),d.forEach(e=>{let t,n;if(Array.isArray(e)){let r=e[0],i=e[1];n=r,t=p[i]||i}else t=p[e],n=e;let r=eb(n);u(em,n,{value:t,name:`OT.properties.${n}`,warnOnSet:!0,canSet:r,setWarning:r?`Mutating ${n} can cause side effects`:`Mutating ${n} has no effect`})}),f.properties=em,f.audioContext=M,f.checkScreenSharingCapability=H.checkCapability,f.checkSystemRequirements=W.check,f.components={},f.generateSimpleStateMachine=Y,f.getErrorTitleByCode=N.getTitleByCode,f.getLogs=w.getLogs,f.getStatsAdpater=n(274),f.getStatsHelpers=n(75),f.getUserMedia=K,f.handleJsException=N.handleJsException,f.initPublisher=el,f.setProxyUrl=n(139).setProxyUrl,f.initSession=function(e,t,n){return null==t&&(t=e,e=null),0===b.value.length&&e&&(b.value=e,f.APIKEY=e),ef(e,t,n)};let eg=e=>`${e} is deprecated and will be removed in a future version of OpenTok`,ev=(e,t)=>()=>(console.warn(eg(e)),t);Object.defineProperties(f,{isUnloaded:{get:ev("OT.isUnloaded",T.isUnloaded)},onLoad:{get:ev("OT.onLoad",T.onLoad)},onUnload:{get:ev("OT.onUnload",T.onUnload)},overrideGuidStorage:{get:ev("OT.overrideGuidStorage",_.override)}}),f.pickScreenSharingHelper=H.pickHelper,f.publishers=A.publishers,f.registerScreenSharingExtension=H.registerExtension,f.registerScreenSharingExtensionHelper=H.registerExtensionHelper,f.reportIssue=eo,f.sessions=A.sessions,f.setLogLevel=O,f.shouldLog=w.shouldLog,f.subscribers=A.subscribers,f.unblockAudio=n(167),f.upgradeSystemRequirements=W.upgrade,T.onUnload(()=>{A.publishers.destroy(),A.subscribers.destroy(),A.sessions.destroy("unloaded")}),n(731)()},function(e,t,n){var r,i=n(326);"string"==typeof i&&(i=[[e.i,i,""]]);var o={hmr:!0};o.transform=r,o.insertInto=void 0,n(340)(i,o),i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(327)(!1);var r=n(328),i=r(n(329)),o=r(n(330)),s=r(n(331)),a=r(n(332)),c=r(n(333)),u=r(n(334)),d=r(n(335)),l=r(n(336)),p=r(n(337)),f=r(n(338)),h=r(n(339));t.push([e.i,"/*!\n * Copyright (c) 2017 TokBox, Inc.\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n */\n\n/**\n * OT Base styles\n */\n\n/* Root OT object, this is where our CSS reset happens */\n.OT_root,\n.OT_root * {\n  color: #ffffff;\n  margin: 0;\n  padding: 0;\n  border: 0;\n  font-size: 100%;\n  font-family: Arial, Helvetica, sans-serif;\n  vertical-align: baseline;\n}\n\n/**\n * Specific Element Reset\n */\n\n.OT_root h1,\n.OT_root h2,\n.OT_root h3,\n.OT_root h4,\n.OT_root h5,\n.OT_root h6 {\n  color: #ffffff;\n  font-family: Arial, Helvetica, sans-serif;\n  font-size: 100%;\n  font-weight: bold;\n}\n\n.OT_root header {\n\n}\n\n.OT_root footer {\n\n}\n\n.OT_root div {\n\n}\n\n.OT_root section {\n\n}\n\n.OT_root video {\n\n}\n\n.OT_root button {\n\n}\n\n.OT_root strong {\n  font-weight: bold;\n}\n\n.OT_root em {\n  font-style: italic;\n}\n\n.OT_root a,\n.OT_root a:link,\n.OT_root a:visited,\n.OT_root a:hover,\n.OT_root a:active {\n  font-family: Arial, Helvetica, sans-serif;\n}\n\n.OT_root ul, .OT_root ol {\n  margin: 1em 1em 1em 2em;\n}\n\n.OT_root ol {\n  list-style: decimal outside;\n}\n\n.OT_root ul {\n  list-style: disc outside;\n}\n\n.OT_root dl {\n  margin: 4px;\n}\n\n.OT_root dl dt,\n.OT_root dl dd {\n  float: left;\n  margin: 0;\n  padding: 0;\n}\n\n.OT_root dl dt {\n  clear: left;\n  text-align: right;\n  width: 50px;\n}\n\n.OT_root dl dd {\n  margin-left: 10px;\n}\n\n.OT_root img {\n  border: 0 none;\n}\n\n/* Modal dialog styles */\n\n/* Modal dialog styles */\n\n.OT_dialog-centering {\n  display: table;\n  width: 100%;\n  height: 100%;\n}\n\n.OT_dialog-centering-child {\n  display: table-cell;\n  vertical-align: middle;\n}\n\n.OT_dialog {\n  position: relative;\n\n  box-sizing: border-box;\n  max-width: 576px;\n  margin-right: auto;\n  margin-left: auto;\n  padding: 36px;\n  text-align: center; /* centers all the inline content */\n\n  background-color: #363636;\n  color: #fff;\n  box-shadow: 2px 4px 6px #999;\n  font-family: 'Didact Gothic', sans-serif;\n  font-size: 13px;\n  line-height: 1.4;\n}\n\n.OT_dialog * {\n  font-family: inherit;\n  box-sizing: inherit;\n}\n\n.OT_closeButton {\n  color: #999999;\n  cursor: pointer;\n  font-size: 32px;\n  line-height: 36px;\n  position: absolute;\n  right: 18px;\n  top: 0;\n}\n\n.OT_dialog-messages {\n  text-align: center;\n}\n\n.OT_dialog-messages-main {\n  margin-bottom: 36px;\n  line-height: 36px;\n\n  font-weight: 300;\n  font-size: 24px;\n}\n\n.OT_dialog-messages-minor {\n  margin-bottom: 18px;\n\n  font-size: 13px;\n  line-height: 18px;\n  color: #A4A4A4;\n}\n\n.OT_dialog-messages-minor strong {\n  color: #ffffff;\n}\n\n.OT_dialog-actions-card {\n  display: inline-block;\n}\n\n.OT_dialog-button-title {\n  margin-bottom: 18px;\n  line-height: 18px;\n\n  font-weight: 300;\n  text-align: center;\n  font-size: 14px;\n  color: #999999;\n}\n.OT_dialog-button-title label {\n  color: #999999;\n}\n\n.OT_dialog-button-title a,\n.OT_dialog-button-title a:link,\n.OT_dialog-button-title a:active {\n  color: #02A1DE;\n}\n\n.OT_dialog-button-title strong {\n  color: #ffffff;\n  font-weight: 100;\n  display: block;\n}\n\n.OT_dialog-button {\n  display: inline-block;\n\n  margin-bottom: 18px;\n  padding: 0 1em;\n\n  background-color: #1CA3DC;\n  text-align: center;
32\n  cursor: pointer;\n}\n\n.OT_dialog-button:disabled {\n  cursor: not-allowed;\n  opacity: 0.5;\n}\n\n.OT_dialog-button-large {\n  line-height: 36px;\n  padding-top: 9px;\n  padding-bottom: 9px;\n\n  font-weight: 100;\n  font-size: 24px;\n}\n\n.OT_dialog-button-small {\n  line-height: 18px;\n  padding-top: 9px;\n  padding-bottom: 9px;\n\n  background-color: #444444;\n  color: #999999;\n  font-size: 16px;\n}\n\n.OT_dialog-progress-bar {\n  display: inline-block; /* prevents margin collapse */\n  width: 100%;\n  margin-top: 5px;\n  margin-bottom: 41px;\n\n  border: 1px solid #4E4E4E;\n  height: 8px;\n}\n\n.OT_dialog-progress-bar-fill {\n  height: 100%;\n\n  background-color: #29A4DA;\n}\n\n/* Helpers */\n\n.OT_centered {\n  position: fixed;\n  left: 50%;\n  top: 50%;\n  margin: 0;\n}\n\n.OT_dialog-hidden {\n  display: none;\n}\n\n.OT_dialog-button-block {\n  display: block;\n}\n\n.OT_dialog-no-natural-margin {\n  margin-bottom: 0;\n}\n\n/* Publisher and Subscriber styles */\n\n.OT_publisher, .OT_subscriber {\n  position: relative;\n  min-width: 48px;\n  min-height: 48px;\n}\n\n.OT_publisher .OT_video-element,\n.OT_subscriber .OT_video-element {\n  display: block;\n  position: absolute;\n  width: 100%;\n  height: 100%;\n\n  transform-origin: 0 0;\n}\n\n/* Styles that are applied when the video element should be mirrored */\n.OT_publisher.OT_mirrored .OT_video-element {\n  transform: scale(-1, 1);\n  transform-origin: 50% 50%;\n}\n\n.OT_subscriber_error {\n  background-color: #000;\n  color: #fff;\n  text-align: center;\n}\n\n.OT_subscriber_error > p {\n  padding: 20px;\n}\n\n/* The publisher/subscriber name/mute background */\n.OT_publisher .OT_bar,\n.OT_subscriber .OT_bar,\n.OT_publisher .OT_name,\n.OT_subscriber .OT_name,\n.OT_publisher .OT_archiving,\n.OT_subscriber .OT_archiving,\n.OT_publisher .OT_archiving-status,\n.OT_subscriber .OT_archiving-status,\n.OT_publisher .OT_archiving-light-box,\n.OT_subscriber .OT_archiving-light-box {\n  -ms-box-sizing: border-box;\n  box-sizing: border-box;\n  top: 0;\n  left: 0;\n  right: 0;\n  display: block;\n  height: 34px;\n  position: absolute;\n}\n\n.OT_publisher .OT_bar,\n.OT_subscriber .OT_bar {\n  background: rgba(0, 0, 0, 0.4);\n}\n\n.OT_publisher .OT_edge-bar-item,\n.OT_subscriber .OT_edge-bar-item {\n  z-index: 1; /* required to get audio level meter underneath */\n}\n\n/* The publisher/subscriber name panel/archiving status bar */\n.OT_publisher .OT_name,\n.OT_subscriber .OT_name {\n  background-color: transparent;\n  color: #ffffff;\n  font-size: 15px;\n  line-height: 34px;\n  font-weight: normal;\n  padding: 0 4px 0 36px;\n  letter-spacing: normal;\n}\n\n.OT_publisher .OT_archiving-status,\n.OT_subscriber .OT_archiving-status {\n  background: rgba(0, 0, 0, 0.4);\n  top: auto;\n  bottom: 0;\n  left: 34px;\n  padding: 0 4px;\n  color: rgba(255, 255, 255, 0.8);\n  font-size: 15px;\n  line-height: 34px;\n  font-weight: normal;\n  letter-spacing: normal;\n}\n\n.OT_micro .OT_archiving-status,\n.OT_micro:hover .OT_archiving-status,\n.OT_mini .OT_archiving-status,\n.OT_mini:hover .OT_archiving-status {\n  display: none;\n}\n\n.OT_publisher .OT_archiving-light-box,\n.OT_subscriber .OT_archiving-light-box {\n  background: rgba(0, 0, 0, 0.4);\n  top: auto;\n  bottom: 0;\n  right: auto;\n  width: 34px;\n  height: 34px;\n}\n\n.OT_archiving-light {\n  width: 7px;\n  height: 7px;\n  border-radius: 30px;\n  position: absolute;\n  top: 14px;\n  left: 14px;\n  background-color: #575757;\n  box-shadow: 0 0 5px 1px #575757;\n}\n\n.OT_archiving-light.OT_active {\n  background-color: #970d13;\n  -webkit-animation: OT_pulse 1.3s ease-in;\n  -moz-animation: OT_pulse 1.3s ease-in;\n  -webkit-animation: OT_pulse 1.3s ease-in;\n  -webkit-animation-iteration-count: infinite;\n  -moz-animation-iteration-count: infinite;\n  -webkit-animation-iteration-count: infinite;\n}\n\n.OT_mini .OT_bar,\n.OT_bar.OT_mode-mini,\n.OT_bar.OT_mode-mini-auto {\n  bottom: 0;\n  height: auto;\n}\n\n.OT_mini .OT_name.OT_mode-off,\n.OT_mini .OT_name.OT_mode-on,\n.OT_mini .OT_name.OT_mode-auto,\n.OT_mini:hover .OT_name.OT_mode-auto {\n  display: none;\n}\n\n.OT_publisher .OT_name,\n.OT_subscriber .OT_name {\n    left: 10px;\n    right: 37px;\n    height: 34px;\n    padding-left: 0;\n}\n\n.OT_publisher .OT_mute,\n.OT_subscriber .OT_mute {\n    border: none;\n    cursor: pointer;\n    display: block;\n    position: absolute;\n    text-align: center;\n    text-indent: -9999em;\n    background-color: transparent;\n    background-repeat: no-repeat;\n}\n\n.OT_publisher .OT_mute,\n.OT_subscriber .OT_mute {\n  right: 0;\n  top: 0;\n  border-left: 1px solid rgba(255, 255, 255, 0.2);\n  height: 36px;\n  width: 37px;\n}\n\n.OT_mini .OT_mute,\n.OT_publisher.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold,\n.OT_subscriber.OT_mini .OT_mute.OT_mode-auto.OT_mode-on-hold {\n  top: 50%;\n  left: 50%;\n  right: auto;\n  margin-top: -18px;\n  margin-left: -18.5px;\n  border-left: none;\n}\n\n.OT_publisher .OT_mute {\n  background-image: url("+i+");\n  background-position: 9px 5px;\n}\n\n.OT_publisher .OT_mute.OT_active {\n  background-image: url("+o+");\n  background-position: 9px 4px;\n}\n\n.OT_subscriber .OT_mute {\n  background-image: url("+s+");\n  background-position: 8px 7px;\n}\n\n.OT_subscriber .OT_mute.OT_active {\n  background-image: url("+a+");\n  background-position: 7px 7px;\n}\n\n/**\n * Styles for display modes\n *\n * Note: It's important that these completely control the display and opacity\n * attributes, no other selectors should atempt to change them.\n */\n\n/* Default display mode transitions for various chrome elements */\n.OT_publisher .OT_edge-bar-item,\n.OT_subscriber .OT_edge-bar-item {\n  transition-property: to
32p, bottom, opacity;\n  transition-duration: 0.5s;\n  transition-timing-function: ease-in;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\n.OT_subscriber .OT_edge-bar-item.OT_mode-off,\n.OT_publisher .OT_edge-bar-item.OT_mode-auto,\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto,\n.OT_publisher .OT_edge-bar-item.OT_mode-mini-auto,\n.OT_subscriber .OT_edge-bar-item.OT_mode-mini-auto {\n  top: -25px;\n  opacity: 0;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-off,\n.OT_subscriber .OT_edge-bar-item.OT_mode-off {\n  display: none;\n}\n\n.OT_mini .OT_mute.OT_mode-auto,\n.OT_publisher .OT_mute.OT_mode-mini-auto,\n.OT_subscriber .OT_mute.OT_mode-mini-auto {\n  top: 50%;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-off,\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-mini-auto {\n  top: auto;\n  bottom: -25px;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_mode-on,\n.OT_subscriber .OT_edge-bar-item.OT_mode-on,\n.OT_publisher .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\n.OT_subscriber .OT_edge-bar-item.OT_mode-auto.OT_mode-on-hold,\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-auto,\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-auto,\n.OT_publisher:hover .OT_edge-bar-item.OT_mode-mini-auto,\n.OT_subscriber:hover .OT_edge-bar-item.OT_mode-mini-auto {\n  top: 0;\n  opacity: 1;\n}\n\n.OT_mini .OT_mute.OT_mode-on,\n.OT_mini:hover .OT_mute.OT_mode-auto,\n.OT_mute.OT_mode-mini,\n.OT_root:hover .OT_mute.OT_mode-mini-auto {\n  top: 50%;\n}\n\n.OT_publisher .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\n.OT_subscriber .OT_edge-bar-item.OT_edge-bottom.OT_mode-on,\n.OT_publisher:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto,\n.OT_subscriber:hover .OT_edge-bar-item.OT_edge-bottom.OT_mode-auto {\n  top: auto;\n  bottom: 0;\n  opacity: 1;\n}\n\n\n/* Contains the video element, used to fix video letter-boxing */\n.OT_widget-container {\n  position: absolute;\n  background-color: #000000;\n  overflow: hidden;\n}\n\n.OT_hidden-audio {\n  position: absolute !important;\n  height: 1px !important;\n  width: 1px !important;\n}\n\n/* Load animation */\n.OT_root .OT_video-loading {\n  position: absolute;\n  z-index: 1;\n  width: 100%;\n  height: 100%;\n  display: none;\n\n  background-color: rgba(0, 0, 0, .75);\n}\n\n.OT_root .OT_video-loading .OT_video-loading-spinner {\n  background: url("+c+") no-repeat;\n  position: absolute;\n  width: 32px;\n  height: 32px;\n  left: 50%;\n  top: 50%;\n  margin-left: -16px;\n  margin-top: -16px;\n  animation: OT_spin 2s linear infinite;\n}\n@keyframes OT_spin {\n  100% {\n    transform: rotate(360deg);\n  }\n}\n\n.OT_publisher.OT_loading .OT_video-loading,\n.OT_subscriber.OT_loading .OT_video-loading {\n  display: block;\n}\n\n.OT_publisher.OT_loading .OT_video-element,\n.OT_subscriber.OT_loading .OT_video-element {\n  /*display: none;*/\n}\n\n.OT_video-centering {\n  display: table;\n  width: 100%;\n  height: 100%;\n}\n\n.OT_video-container {\n  display: table-cell;\n  vertical-align: middle;\n}\n\n.OT_video-poster {\n  position: absolute;\n  z-index: 1;\n  width: 100%;\n  height: 100%;\n  display: none;\n\n  opacity: .25;\n\n  background-repeat: no-repeat;\n  background-image: url("+u+");\n  background-size: auto 76%;\n}\n\n.OT_fit-mode-cover .OT_video-element {\n  -o-object-fit: cover;\n     object-fit: cover;\n}\n\n/* Workaround for iOS freezing issue when cropping videos */\n/* https://bugs.webkit.org/show_bug.cgi?id=176439 */\n@media only screen\n  and (orientation: portrait) {\n  .OT_subscriber.OT_ForceContain.OT_fit-mode-cover .OT_video-element {\n    -o-object-fit: contain !important;\n       object-fit: contain !important;\n  }\n}\n\n.OT_fit-mode-contain .OT_video-element {\n  -o-object-fit: contain;\n     object-fit: contain;\n}\n\n.OT_fit-mode-cover .OT_video-poster {\n  background-position: center bottom;\n}\n\n.OT_fit-mode-contain .OT_video-poster {\n  background-position: center;\n}\n\n.OT_audio-level-meter {\n  position: absolute;\n  width: 25%;\n  max-width: 224px;\n  min-width: 21px;\n  top: 0;\n  right: 0;\n  overflow: hidden;\n}\n\n.OT_audio-level-meter:before {\n  /* makes the height of the container equals its width */\n  content: '';\n  display: block;\n  padding-top: 100%;\n}\n\n.OT_audio-level-meter__audio-only-img {\n  position: absolute;\n  top: 22%;\n  right: 15%;\n  width: 40%;\n\n  opacity: .7;\n\n  background: url("+d+") no-repeat center;\n}\n\n.OT_audio-level-meter__audio-only-img:before {\n  /* makes the height of the container equals its width */\n  content: '';\n  display: block;\n  padding-top: 100%;\n}\n\n.OT_audio-level-meter__value {\n  will-change: transform;\n  position: absolute;\n  top: -100%;\n  right: -100%;\n  width: 200%;\n  height: 200%;\n  transform: scale(0);\n  border-radius: 50%;\n  background-image: radial-gradient(circle, rgba(151, 206, 0, 1) 0%, rgba(151, 206, 0, 0) 100%);\n}\n\n.OT_audio-level-meter.OT_mode-off {\n    display: none;\n}\n\n.OT_audio-level-meter.OT_mode-on,\n.OT_audio-only .OT_audio-level-meter.OT_mode-auto {\n  display: block;\n}\n\n.OT_audio-only.OT_publisher .OT_video-element,\n.OT_audio-only.OT_subscriber .OT_video-element {\n  display: none;\n}\n\n\n.OT_video-disabled-indicator {\n  opacity: 1;\n  border: none;\n  display: none;\n  position: absolute;\n  background-color: transparent;\n  background-repeat: no-repeat;\n  background-position: bottom right;\n  pointer-events: none;\n  top: 0;\n  left: 0;\n  bottom: 3px;\n  right: 3px;\n}\n\n.OT_video-disabled {\n  background-image: url("+l+");\n  background-size: 33px auto;\n}\n\n.OT_video-disabled-warning {\n  background-image: url("+p+");\n  background-size: 33px auto;\n}\n\n.OT_video-disabled-indicator.OT_active {\n  display: block;\n}\n\n.OT_audio-blocked-indicator {\n  opacity: 1;\n  border: none;\n  display: none;\n  position: absolute;\n  background-color: transparent;\n  background-repeat: no-repeat;\n  background-position: center;\n  pointer-events: none;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n}\n\n.OT_audio-blocked {\n  background-image: url("+f+");\n  background-size: 90px auto;\n}\n\n.OT_container-audio-blocked {\n  cursor: pointer;\n}\n\n.OT_container-audio-blocked.OT_mini .OT_edge-bar-item {\n  display: none;\n}\n\n.OT_container-audio-blocked .OT_mute {\n  display: none;\n}\n\n.OT_audio-blocked-indicator.OT_active {\n  display: block;\n}\n\n.OT_video-unsupported {\n  opacity: 1;\n  border: none;\n  display: none;\n  position: absolute;\n  background-color: transparent;\n  background-repeat: no-repeat;\n  background-position: center;\n  background-image: url("+h+");\n  background-size: 58px auto;\n  pointer-events: none;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  margin-top: -30px;\n}\n\n.OT_video-unsupported-bar {\n  display: none;\n  position: absolute;\n  width: 192%; /* copy the size of the audio meter bar for symmetry */\n  height: 192%;\n  top: -96% /* half of the size */;\n  left: -96%;\n  border-radius: 50%;\n\n  background-color: rgba(0, 0, 0, .8);\n}\n\n.OT_video-unsupported-img {\n  display: none;\n  position: absolute;\n  top: 11%;\n  left: 15%;\n  width: 70%;\n  opacity: .7;\n  background-image: url("+h+");\n  background-repeat: no-repeat;\n  background-position: center;\n  background-size: 100% auto;\n}\n\n.OT_video-unsupported-img:before {\n  /* makes the height of the container 93% of its width (90/97 px) */\n  content: '';\n  display: block;\n  padding-top: 93%;\n}\n\n.OT_video-unsupported-text {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  text-align: center;\n  height: 100%;\n  margin-top: 40px;\n}\n\n.OT_video-unsupported.OT_active {\n  display: block;\n}\n\n.OT_mini .OT_video-unsupported,\n.OT_micro .OT_video-unsupported {\n  position: absolute;\n  width: 25%;\n  max-width: 224px;\n  min-width: 21px;\n  top: 0;\n  left: 0;\n  overflow: hidden;\n  background: none;\n  bottom: auto;\n  right: auto;\n  margin: auto;\n}\n\n.OT_mini .OT_video-unsupported:before,\n.OT_micro .OT_video-unsupported:before {\n  /* makes the height of the container equals its width */\n  content: '';\n  display: block;\n  padding-top: 100%;\n}\n\n.OT_mini .OT_video-unsupported-bar,\n.OT_micro .OT_video-unsupported-bar,\n.OT_mini .OT_video-unsupported-img,\n.OT_micro .OT_video-unsupported-img {\n  display: block;\n}\n\n.OT_mini .OT_video-unsupported-text,\n.OT_micro .OT_video-unsupported-text {\n  display: none;\n}\n\n.OT_hide-forced {\n  display: none;\n}\n\n.OT_ModalDialog {\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  right: 0px;\n  bottom: 0px;\n  z-index: 1000;\n  background-color: rgba(0, 0, 0, 0.2);\n}\n\n#tb_alert {\n  position: fixed;\n  width: 570px;\n  font-family: \"Lucida Grande\", Arial;\n  top: 50%;\n  left: 50%;\n  margin-top: -75px;\n  margin-left: -285px;\n}\n\n#tb_alert * {\n  box-sizing: border-box;\n}\n\n#tb_alert .OT_alert {\n  border-top-right-radius: 5px;\n  border-bottom-right-radius: 5px;\n  background-color: #333;\n  position: relative;\n  padding: 30px;\n  overflow: visible;\n  margin-left: 70px;\n  border-bottom-color: rgba(255, 255, 255, 0.1);\n  border-left-color: rgba(255, 255, 255, 0.1);\n\n  background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2)), linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2));
32\n\n  background-image: -ms-linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2)), -ms-linear-gradient(45deg, rgba(0, 0, 0, 0.2) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.2) 75%, rgba(0, 0, 0, 0.2));\n\n  background-size: 4px 4px;\n  background-position: 0 0, 2px 2px;\n  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);\n  border: 1px solid rgba(255, 255, 255, 0.3);\n}\n\n#tb_alert .OT_alert-exclamation {\n  background-color: #9c1408;\n  background-image: linear-gradient(0deg, #dd0c0a 0%, #9c1408 100%);\n  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.15);\n  border: 1px solid rgba(255, 255, 255, 0.3);\n\n  margin: -1px 0;\n\n  font-family: MS Trebuchet;\n  font-weight: bold;\n  font-size: 60px;\n  text-shadow: -1px -1px 2px rgba(0, 0, 0, 0.5);\n\n  color: white;\n  width: 65px;\n  position: absolute;\n  padding: 42px 0;\n  text-align: center;\n  left: -70px;\n  top: 0;\n  bottom: 0;\n  border-top-left-radius: 5px;\n  border-bottom-left-radius: 5px;\n\n  border-bottom-color: transparent;\n  border-left: none;\n  border-right: none;\n}\n\n#tb_alert .OT_alert-exclamation:after,\n#tb_alert .OT_alert-exclamation:before {\n  content: \" \";\n  position: absolute;\n  right: -24px;\n  top: 40%;\n  border: 12px solid transparent;\n  border-left-color: #9c1408;\n}\n\n#tb_alert .OT_alert-exclamation:before {\n  border-left-color: #bc3428;\n  top: 39%;\n}\n\n#tb_alert .OT_alert-body {\n  color: #c8c5c5;\n  margin: 0;\n  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);\n  font-size: 14px;\n  line-height: 1.3em;\n}\n\n#tb_alert .continue-text {\n  margin-top: 12px\n}\n\n#tb_alert > * a {\n  color: #a7d8df;\n  text-decoration: none;\n}\n\n#tb_alert .OT_alert-header {\n  font-size: 24px;\n  padding-bottom: 5px;\n  color: #aaa;\n  font-weight: bold;\n  position: relative;\n  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);\n  margin: 0;\n}\n\n#tb_alert .OT_alert-header::before {\n  content: attr(data-text);\n  position: absolute;\n  left: 0;\n  color: white;\n  -webkit-mask-image: -webkit-gradient(\n    linear,\n    left top, left bottom,\n    from(rgba(0, 0, 0, 1)),\n    color-stop(60%, rgba(0, 0, 0, 0)),\n    to(rgba(0, 0, 0, 0))\n  );\n}\n\n#tb_alert .OT_alert-close-button {\n  position: absolute;\n  right: 8px;\n  top: 5px;\n  background-color: #000;\n  color: #666;\n  border: none;\n  font-size: 20px;\n  /** Hack to bring it up to the proper line top */\n  line-height: 14px;\n  padding: 0;\n  padding-bottom: 3px;\n  cursor: pointer;\n}\n\n#tb_alert #section-mobile-browser,\n#tb_alert #section-supported-mobile-browser {\n  width: 200px;\n  top: 0px;\n  left: 25%;\n  margin-top: 0;\n  margin-left: 0;\n}\n\n@media all and (max-height: 300px) {\n  #tb_alert {\n    width: 100%;\n    height: 100%;\n    left: 0;\n    top: 0;\n    margin-left: 0;\n    margin-top: 0;\n  }\n  #tb_alert #section-mobile-browser,\n  #tb_alert #section-supported-mobile-browser {\n    margin-left: 0;\n    margin-top: 10px;\n    left: 0;\n  }\n}\n\n#tb_alert #section-normal-install,\n#tb_alert #section-upgrade-install,\n#tb_alert #section-mobile-browser,\n#tb_alert #section-supported-mobile-browser {\n  display: none;\n}\n",""])},function(e,t,n){"use strict";function r(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=i(r);return[n].concat(r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"})).concat([o]).join("\n")}return[n].join("\n")}function i(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];null!=o&&(r[o]=!0)}for(i=0;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g9njqpl9aWYTrmXCImA7sCWb9lK/jj9TrwkrgA1AH3AQuKsSwkzbrLfxpgpsBtYDxf/R3xm2ExirhNCuHHZXTsmRwiat+S/zSt06eysVA/4pmGr/G3qm6ik28v29FKgCg8BS6pvS0KNRGgZ+Bb4FpsxsOkfUlMuwDcBWYOUZOHYM2AU8WQmhBifDv70O7PjX7KZ+4G7g3FM8zd6uBIaBy4AqxnIcZwFLCovPAhE4Sj38b4BDwEeVEFKD9S94Khjn486v3QAAAABJRU5ErkJggg=="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAATCAYAAAB7u5a2AAABx0lEQVQ4jaWUv48NURiGn3ONmCs32ZBd28ht1gqyZAkF21ylQkEiSp2ehpDlD1BoFGqqVdJohYKI7MaPxMoVNghCWMF+7ybLUewnOXfcMWO9yeQ857zne8+XmZOBGjJpr0kvTIomvTZpS526UCO4DUwD64FjwCFgqZnnR+oc8LfgzKQ73vGsr42ZtGjSQFV9o8KfBCacZwCaef4YmAf2rzjcpN3A2WSpm/AssKcqPDNpDBjs410CViXzTwk/A7b1C4wxDgOngAsZcAXY2buDfp/6S4F3lDS8DjgBzDWAjX/Y/e/QgYS/AhsKHa+OMQ6GEJ4Cj4BOAxgq6aCowyZtdf4OtAr+FHDO+R4wWnVbihr3cQnICt4boO38GWj9a/icjwOACt4m4K3zEPA+AxaAtTWCnwN3lzHkEL8V/OPAGud9wK2GF9XR1Wae/1zG2AI+pGYI4VUIoRtjHAc2A9cz4LRPevYCZ+i9/4sJt4GXJU10gaPAzdI2TTro/5Tfz8XEe2LSZGmxq/SDNvP8BnA5WRrx4BwYBe6vONx1EnjovGvBLAAd4Adwuyq8UiaNmDTvr+a8SQ9MuvbfwckBHZPe+QEfTdpep+4XZmPBHiHgz74AAAAASUVORK5CYII="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAACtklEQVQ4jZ2VSYiURxTHf+/T9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exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTciIGhlaWdodD0iOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik03MCAxMkw5LjQ0OCA3Mi41NTIgMCA2MmwzLTQ0TDI5IDBsNDEgMTJ6bTggMmwxIDUyLTI5IDE4LTM1LjUwMi02LjQ5OEw3OCAxNHoiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOCAzKSI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHBhdGggZD0iTTkuMTEgMjAuOTY4SDQ4LjFhNSA1IDAgMDE1IDVWNTguMThhNSA1IDAgMDEtNSA1SDkuMTFhNSA1IDAgMDEtNS01VjI1Ljk3YTUgNSAwIDAxNS01em00Ny4wOCAxMy4zOTRjMC0uMzQ1IDUuNDcyLTMuMTU5IDE2LjQxNS04LjQ0M2EzIDMgMCAwMTQuMzA0IDIuNzAydjI2LjgzNWEzIDMgMCAwMS00LjMwNSAyLjcwMWMtMTAuOTQyLTUuMjg2LTE2LjQxMy04LjEtMTYuNDEzLTguNDQ2VjM0LjM2MnoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48L2c+PHBhdGggZD0iTTgxLjUgMTYuNUwxOS45OTggNzguMDAyIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9nPjwvc3ZnPg=="},function(e,t,n){var r={},i=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),o=function(e,t){return t?t.querySelector(e):document.querySelector(e)},s=function(){var e={};return function(t,n){if("function"==typeof t)return t();
32if(void 0===e[t]){var r=o.call(this,t,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),a=null,c=0,u=[],d=n(341);function l(e,t){for(var n=0;n<e.length;n++){var i=e[n],o=r[i.id];if(o){o.refs++;for(var s=0;s<o.parts.length;s++)o.parts[s](i.parts[s]);for(;s<i.parts.length;s++)o.parts.push(y(i.parts[s],t))}else{for(var a=[],s=0;s<i.parts.length;s++)a.push(y(i.parts[s],t));r[i.id]={id:i.id,refs:1,parts:a}}}}function p(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],s=t.base?o[0]+t.base:o[0],a={css:o[1],media:o[2],sourceMap:o[3]};r[s]?r[s].parts.push(a):n.push(r[s]={id:s,parts:[a]})}return n}function f(e,t){var n=s(e.insertInto);if(!n)throw Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=u[u.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),u.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else if("object"==typeof e.insertAt&&e.insertAt.before){var i=s(e.insertAt.before,n);n.insertBefore(t,i)}else throw Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n")}function h(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=u.indexOf(e);t>=0&&u.splice(t,1)}function m(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=v();n&&(e.attrs.nonce=n)}return g(t,e.attrs),f(e,t),t}function b(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),f(e,t),t}function g(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function v(){return n.nc}function y(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var s=c++;r=E.bind(null,n=a||(a=m(t)),s,!1),i=E.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=C.bind(null,n=b(t),t),i=function(){h(n),n.href&&URL.revokeObjectURL(n.href)}):(r=T.bind(null,n=m(t)),i=function(){h(n)});return r(e),function(t){t?(t.css!==e.css||t.media!==e.media||t.sourceMap!==e.sourceMap)&&r(e=t):i()}}e.exports=function(e,t){if("u">typeof DEBUG&&DEBUG&&"object"!=typeof document)throw Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return l(n,t),function(e){for(var i=[],o=0;o<n.length;o++){var s=r[n[o].id];s.refs--,i.push(s)}e&&l(p(e,t),t);for(var o=0;o<i.length;o++){var s=i[o];if(0===s.refs){for(var a=0;a<s.parts.length;a++)s.parts[a]();delete r[s.id]}}}};var S=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function E(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=S(t,i);else{var o=document.createTextNode(i),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}function T(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function C(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=d(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var s=new Blob([r],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}},function(e,t){e.exports=function(e){var t="u">typeof window&&window.location;if(!t)throw Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:"url("+JSON.stringify(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""))+")"})}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(80),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);
vendor: 4,197 bytes, line 32
32return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(80);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(80);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(80);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(79),i=n(109),o=n(110),s=200;e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<s-1)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(15),i=n(355),o=n(9),s=n(175),a=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,u=Object.prototype,d=Function.prototype.toString,l=u.hasOwnProperty,p=RegExp("^"+d.call(l).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?p:c).test(s(e))}},function(e,t,n){var r=n(39),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(356),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},function(e,t,n){e.exports=n(14)["__core-js_shared__"]},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(359),i=n(79),o=n(109);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(e,t,n){var r=n(360),i=n(361),o=n(362),s=n(363),a=n(364);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},function(e,t,n){var r=n(81);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},function(e,t,n){var r=n(81),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return n===i?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(81),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(81),i="__lodash_hash_undefined__";e.exports=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=r&&void 0===t?i:t,this}},function(e,t,n){var r=n(82);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=!!t,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(82);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(82);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(82);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=+(n.size!=i),this}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(29),i=n(16),o="[object Arguments]";e.exports=function(e){return i(e)&&r(e)==o}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(29),i=n(112),o=n(16),s="[object Arguments]",a="[object Array]",c="[object Boolean]",u="[object Date]",d="[object Error]",l="[object Function]",p="[object Map]",f="[object Number]",h="[object Object]",m="[object RegExp]",b="[object Set]",g="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",S="[object DataView]",E="[object Float64Array
32]",T="[object Int8Array]",C="[object Int16Array]",R="[object Int32Array]",I="[object Uint8Array]",_="[object Uint8ClampedArray]",w="[object Uint16Array]",x="[object Uint32Array]",O={};O["[object Float32Array]"]=O[E]=O[T]=O[C]=O[R]=O[I]=O[_]=O[w]=O[x]=!0,O[s]=O[a]=O[y]=O[c]=O[S]=O[u]=O[d]=O[l]=O[p]=O[f]=O[h]=O[m]=O[b]=O[g]=O[v]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!O[r(e)]}},function(e,t,n){e.exports=n(179)(Object.keys,Object)},function(e,t,n){var r=n(40),i=n(53);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(9),i=n(69),o=n(377),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var a in e)"constructor"==a&&(t||!s.call(e,a))||n.push(a);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){var r=n(40),i=n(115);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},function(e,t,n){var r=n(40),i=n(182);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t,n){e.exports=n(38)(n(14),"DataView")},function(e,t,n){e.exports=n(38)(n(14),"Promise")},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(118),i=n(385),o=n(386),s=n(387),a=n(189),c="[object Boolean]",u="[object Date]",d="[object Map]",l="[object Number]",p="[object RegExp]",f="[object Set]",h="[object String]",m="[object Symbol]",b="[object ArrayBuffer]",g="[object DataView]",v="[object Float32Array]",y="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",T="[object Int32Array]",C="[object Uint8Array]",R="[object Uint8ClampedArray]",I="[object Uint16Array]",_="[object Uint32Array]";e.exports=function(e,t,n){var w=e.constructor;switch(t){case b:return r(e);case c:case u:return new w(+e);case g:return i(e,n);case v:case y:case S:case E:case T:case C:case R:case I:case _:return a(e,n);case d:return new w;case l:case h:return new w(e);case p:return o(e);case f:return new w;case m:return s(e)}}},function(e,t,n){var r=n(118);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(39),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},function(e,t,n){var r=n(389),i=n(68),o=n(113),s=o&&o.isMap;e.exports=s?i(s):r},function(e,t,n){var r=n(41),i=n(16),o="[object Map]";e.exports=function(e){return i(e)&&r(e)==o}},function(e,t,n){var r=n(391),i=n(68),o=n(113),s=o&&o.isSet;e.exports=s?i(s):r},function(e,t,n){var r=n(41),i=n(16),o="[object Set]";e.exports=function(e){return i(e)&&r(e)==o}},function(e,t,n){(function(r){function i(){var e=c("colors");return!/^(no|off|false|disabled)$/i.test(e)&&("u">typeof window&&!!window.process&&"renderer"===window.process.type||!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&!!("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)))}function o(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.exports.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),t.splice(o,0,r)}}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.setItem("debug",e)}catch(e){}}function a(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}function c(e){var n="debug_"+e.toLowerCase();try{return t.storage.getItem(n)}catch(e){if(void 0!==r&&"env"in r)return r.env[n.toUpperCase()];return}}function u(){try{return localStorage}catch(e){}}t.log=function e(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=o,t.save=s,t.load=a,t.useColors=i,t.storage=u(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33
32CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(393)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(43))},function(e,t,n){e.exports=function(e){function t(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t)|0;return r.colors[Math.abs(n)%r.colors.length]}function r(e){var n;function o(){if(o.enabled){var e=o,t=+new Date,i=t-(n||t);e.diff=i,e.prev=n,e.curr=t,n=t;for(var s=Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=r.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;c++;var i=r.formatters[n];if("function"==typeof i){var o=s[c];t=i.call(e,o),s.splice(c,1),c--}return t}),r.formatArgs.call(e,s);var u=e.log||r.log;u.apply(e,s)}}return o.namespace=e,o.enabled=r.enabled(e),o.useColors=r.useColors(),o.color=t(e),o.destroy=i,"function"==typeof r.init&&r.init(o),r.instances.push(o),o}function i(){var e=r.instances.indexOf(this);return -1!==e&&(r.instances.splice(e,1),!0)}function o(e){r.save(e),r.names=[],r.skips=[];var t,n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(RegExp("^"+e.substr(1)+"$")):r.names.push(RegExp("^"+e+"$")));for(t=0;t<r.instances.length;t++){var o=r.instances[t];o.enabled=r.enabled(o.namespace)}}function s(){r.enable("")}function a(e){var t,n;if("*"===e[e.length-1])return!0;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}return r.debug=r.default=r,r.coerce=c,r.disable=s,r.enable=o,r.enabled=a,r.humanize=n(394),Object.keys(e).forEach(function(t){r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}},function(e,t){var n=1e3,r=6e4,i=36e5,o=864e5,s=6048e5,a=315576e5;function c(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\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(t){var c=parseFloat(t[1]),u=(t[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*s;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}function u(e){var t=Math.abs(e);return t>=o?Math.round(e/o)+"d":t>=i?Math.round(e/i)+"h":t>=r?Math.round(e/r)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}function d(e){var t=Math.abs(e);return t>=o?l(e,t,o,"day"):t>=i?l(e,t,i,"hour"):t>=r?l(e,t,r,"minute"):t>=n?l(e,t,n,"second"):e+" ms"}function l(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return c(e);if("number"===n&&isFinite(e))return t.long?d(e):u(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(396),i=n(176),o=n(88);e.exports=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t,n){"use strict";let r=n(195),i=new r;e.exports=function(e,t){if(void 0===t)return e;i.has(t)||i.set(t,new r);let n=i.get(t);return n.has(e)||n.set(e,e.bind(t)),n.get(e)}},function(e,t,n){"use strict";e.exports=function(){var e,t;if("function"!=typeof WeakMap)return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(e){return!1}return"[object WeakMap]"===String(e)&&"function"==typeof e.set&&e.set({},1)===e&&"function"==typeof e.delete&&"function"==typeof e.has&&"one"===e.get(t)}},function(e,t,n){"use strict";var r,i=n(44),o=n(123),s=n(402),a=n(31),c=n(403),u=n(32),d=n(202),l=n(445),p=n(45).toStringTag,f=n(446),h=Array.isArray,m=Object.defineProperty,b=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf;e.exports=r=function(){var e,t=arguments[0];if(!(this instanceof r))throw TypeError("Constructor requires 'new'");return e=f&&o&&WeakMap!==r?o(new WeakMap,g(this)):this,i(t)&&!h(t)&&(t=d(t)),m(e,"__weakMapData__",u("c","$weakMap$"+c())),t&&l(t,function(t){a(t),e.set(t[0],t[1])}),e},f&&(o&&o(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:u(r)})),Object.defineProperties(r.prototype,{delete:u(function(e){return!!b.call(s(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)}),get:u(function(e){if(b.call(s(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:u(function(e){return b.call(s(e),this.__weakMapData__)}),set:u(function(e,t){return m(s(e),this.__weakMapData__,u("c",t)),this}),toString:u(function(){return"[object WeakMap]"})}),m(r.prototype,p,u("c","WeakMap"))},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r,i=Object.create;n(196)()||(r=n(197)),e.exports=function(){var e,t,n;return r&&1===r.level?(e={},t={},n={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){if("__proto__"===e){t[e]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[e]=n}),Object.defineProperties(e,t),Object.defineProperty(r,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(t,n){return i(null===t?e:t,n)}):i}()},function(e,t,n){"use strict";var r=n(198);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an Object");return e}},function(e,t,n){"use strict";var r=Object.create(null),i=Math.random;e.exports=function(){var e;do e=i().toString(36).slice(2);while(r[e]);return e}},function(e,t,n){"use strict";var r=n(405);e.exports=function(e){if("function"!=typeof e||!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length||"function"!=typeof e.call||"function"!=typeof e.apply)return!1}catch(e){return!1}return!r(e)}},function(e,t,n){"use strict";var r=n(124);e.exports=function(e){if(!r(e))return!1;try{if(!e.constructor)return!1;return e.constructor.prototype===e}catch(e){return!1}}},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(408),i=n(31),o=Math.max;e.exports=function(e,t){var n,s,a,c=o(arguments.length,2);for(s=1,e=Object(i(e)),a=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}};s<c;++s)t=arguments[s],r(t).forEach(a);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=n(409)()?Object.keys:n(410)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(44),i=Object.keys;e.exports=function(e){return i(r(e)?Object(e):e)}},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&!0===r.contains("dwa")&&!1===r.contains("foo")}},function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return r.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";var r,i=n(123),o=n(201),s=n(32),a=n(45),c=n(204),u=Object.defineProperty;r=e.exports=function(e,t){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");c.call(this,e),u(this,"__kind__",s("",t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value"))},i&&i(r,c),delete r.prototype.constructor,r.prototype=Object.create(c.prototype,{_resolve:s(function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e})}),u(r.prototype,a.toStringTag,s("c","Array Iterator"))},function(e,t,n){"use strict";var r=n(91),i={object:!0,symbol:!0};e.exports=function(){var e,t=r.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!i[typeof t.iterator]&&!!i[typeof t.toPrimitive]&&!!i[typeof t.toStringTag]}},function(e,t,n){"use strict";e.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},function(e,t){var n=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{if(!__global__)return n();return __global__}finally{delete Object.prototype.__global__}}()},function(e,t,n){"use strict";var r,i,o,s=n(32),a=n(203),c=n(91).Symbol,u=n(419),d=n(420),l=n(421),p=Object.create,f=Object.defineProperties,h=Object.defineProperty;if("function"==typeof c)try{String(c()),o=!0}catch(e){}else c=null;i=function(e){if(this instanceof i)throw TypeError("Symbol is not a constructor");return r(e)},e.exports=r=function e(t){if(this instanceof e)throw TypeError("Symbol is not a constructor");return o?c(t):f(p(i.prototype),{__description__:s("",t=void 0===t?"":String(t)),__name__:s("",u(t))})},d(r),l(r),f(i.prototype,{constructor:s(r),toString:s("",function(){return this.__name__})}),f(r.prototype,{toString:s(function(){return"Symbol ("+a(this).__description__+")"}
32),valueOf:s(function(){return a(this)})}),h(r.prototype,r.toPrimitive,s("",function(){var e=a(this);return"symbol"==typeof e?e:e.toString()})),h(r.prototype,r.toStringTag,s("c","Symbol")),h(i.prototype,r.toStringTag,s("c",r.prototype[r.toStringTag])),h(i.prototype,r.toPrimitive,s("c",r.prototype[r.toPrimitive]))},function(e,t,n){"use strict";e.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}},function(e,t,n){"use strict";var r=n(32),i=Object.defineProperty,o=Object.prototype,s=(0,Object.create)(null);e.exports=function(e){for(var t,n,a=0;s[e+(a||"")];)++a;return s[e+=a||""]=!0,i(o,t="@@"+e,r.gs(null,function(e){n||(n=!0,i(this,t,r(e)),n=!1)})),t}},function(e,t,n){"use strict";var r=n(32),i=n(91).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:r("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:r("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:r("",i&&i.iterator||e("iterator")),match:r("",i&&i.match||e("match")),replace:r("",i&&i.replace||e("replace")),search:r("",i&&i.search||e("search")),species:r("",i&&i.species||e("species")),split:r("",i&&i.split||e("split")),toPrimitive:r("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:r("",i&&i.toStringTag||e("toStringTag")),unscopables:r("",i&&i.unscopables||e("unscopables"))})}},function(e,t,n){"use strict";var r=n(32),i=n(203),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:r(function(t){return o[t]?o[t]:o[t]=e(String(t))}),keyFor:r(function(e){var t;for(t in i(e),o)if(o[t]===e)return t})})}},function(e,t,n){"use strict";var r=n(31);e.exports=function(){return r(this).length=0,this}},function(e,t,n){"use strict";var r,i=n(55),o=n(424),s=n(428),a=n(429),c=n(200),u=n(439),d=Function.prototype.bind,l=Object.defineProperty,p=Object.prototype.hasOwnProperty;r=function(e,t,n){var r,i=o(t)&&s(t.value);return r=a(t),delete r.writable,delete r.value,r.get=function(){return!n.overwriteDefinition&&p.call(this,e)?i:(t.value=d.call(i,n.resolveContext?n.resolveContext(this):this),l(this,e,t),this[e])},r},e.exports=function(e){var t=c(arguments[1]);return i(t.resolveContext)&&s(t.resolveContext),u(e,function(e,n){return r(n,e,t)})}},function(e,t,n){"use strict";var r=n(205),i=n(55);e.exports=function(e){return i(e)?e:r(e,"Cannot use %v",arguments[1])}},function(e,t,n){"use strict";var r=n(55),i=n(124),o=Object.prototype.toString;e.exports=function(e){if(!r(e))return null;if(i(e)){var t=e.toString;if("function"!=typeof t||t===o)return null}try{return""+e}catch(e){return null}}},function(e,t,n){"use strict";var r=n(427),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=r(e);return null===t?"<Non-coercible to string value>":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("Unexpected character")}}))}},function(e,t,n){"use strict";e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(e){return null}}}},function(e,t,n){"use strict";var r=n(205),i=n(199);e.exports=function(e){return i(e)?e:r(e,"%v is not a plain function",arguments[1])}},function(e,t,n){"use strict";var r=n(430),i=n(125),o=n(31);e.exports=function(e){var t=Object(o(e)),n=arguments[1],s=Object(arguments[2]);if(t!==e&&!n)return t;var a={};return n?r(n,function(t){(s.ensure||t in e)&&(a[t]=e[t])}):i(a,e),a}},function(e,t,n){"use strict";e.exports=n(431)()?Array.from:n(432)},function(e,t,n){"use strict";e.exports=function(){var e,t,n=Array.from;return"function"==typeof n&&!!((t=n(e=["raz","dwa"]))&&t!==e&&"dwa"===t[1])}},function(e,t,n){"use strict";var r=n(45).iterator,i=n(89),o=n(433),s=n(434),a=n(70),c=n(31),u=n(44),d=n(90),l=Array.isArray,p=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(e){var t,n,m,b,g,v,y,S,E,T,C=arguments[1],R=arguments[2];if(e=Object(c(e)),u(C)&&a(C),this&&this!==Array&&o(this))t=this;else{if(!C){if(i(e))return 1!==(g=e.length)?Array.apply(null,e):((b=[,])[0]=e[0],b);if(l(e)){for(n=0,b=Array(g=e.length);n<g;++n)b[n]=e[n];return b}}b=[]}if(!l(e)){if(void 0!==(E=e[r])){for(y=a(E).call(e),t&&(b=new t),S=y.next(),n=0;!S.done;)T=C?p.call(C,R,S.value,n):S.value,t?(f.value=T,h(b,n,f)):b[n]=T,S=y.next(),++n;g=n}else if(d(e)){for(g=e.length,t&&(b=new t),n=0,m=0;n<g;++n)T=e[n],n+1<g&&(v=T.charCodeAt(0))>=55296&&v<=56319&&(T+=e[++n]),T=C?p.call(C,R,T,m):T,t?(f.value=T,h(b,m,f)):b[m]=T,++m;g=m}}if(void 0===g)for(g=s(e.length),t&&(b=new t(g)),n=0;n<g;++n)T=C?p.call(C,R,e[n],n):e[n],t?(f.value=T,h(b,n,f)):b[n]=T;return t&&(f.value=null,b.length=g),b}},function(e,t,n){"use strict";var r=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"==typeof e&&i(r.call(e))}},function(e,t,n){"use strict";var r=n(435),i=Math.max;e.exports=function(e){return i(0,r(e))}},function(e,t,n){"use strict";var r=n(436),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?r(e)*o(i(e)):e}},function(e,t,n){"use strict";e.exports=n(437)()?Math.sign:n(438)},function(e,t,n){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}},function(e,t,n){"use strict";e.exports=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1}},function(e,t,n){"use strict";var r=n(70),i=n(440),o=Function.prototype.call;e.exports=function(e,t){var n={},s=arguments[2];return r(t),i(e,function(e,r,i,a){n[r]=o.call(t,s,e,r,i,a)}),n}},function(e,t,n){"use strict";
32e.exports=n(441)("forEach")},function(e,t,n){"use strict";var r=n(70),i=n(31),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,c=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(n,u){var d,l=arguments[2],p=arguments[3];return n=Object(i(n)),r(u),d=a(n),p&&d.sort("function"==typeof p?o.call(p,n):void 0),"function"!=typeof e&&(e=d[e]),s.call(e,d,function(e,r){return c.call(n,e)?s.call(u,l,n[e],e,n,r):t})}}},function(e,t,n){"use strict";var r,i=n(123),o=n(32),s=n(45),a=n(204),c=Object.defineProperty;r=e.exports=function(e){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");e=String(e),a.call(this,e),c(this,"__length__",o("",e.length))},i&&i(r,a),delete r.prototype.constructor,r.prototype=Object.create(a.prototype,{_next:o(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:o(function(e){var t,n=this.__list__[e];return this.__nextIndex__===this.__length__?n:(t=n.charCodeAt(0))>=55296&&t<=56319?n+this.__list__[this.__nextIndex__++]:n})}),c(r.prototype,s.toStringTag,o("c","String Iterator"))},function(e,t,n){"use strict";var r=n(444);e.exports=function(e){if(!r(e))throw TypeError(e+" is not iterable");return e}},function(e,t,n){"use strict";var r=n(89),i=n(44),o=n(90),s=n(45).iterator,a=Array.isArray;e.exports=function(e){return!!i(e)&&(!!(a(e)||o(e)||r(e))||"function"==typeof e[s])}},function(e,t,n){"use strict";var r=n(89),i=n(70),o=n(90),s=n(202),a=Array.isArray,c=Function.prototype.call,u=Array.prototype.some;e.exports=function(e,t){var n,d,l,p,f,h,m,b,g=arguments[2];if(a(e)||r(e)?n="array":o(e)?n="string":e=s(e),i(t),l=function(){p=!0},"array"===n)return void u.call(e,function(e){return c.call(t,g,e,l),p});if("string"===n){for(f=0,h=e.length;f<h&&(m=e[f],f+1<h&&(b=m.charCodeAt(0))>=55296&&b<=56319&&(m+=e[++f]),c.call(t,g,m,l),!p);++f);return}for(d=e.next();!d.done;){if(c.call(t,g,d.value,l),p)return;d=e.next()}}},function(e,t,n){"use strict";e.exports=function(){return"function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)}()},function(e,t,n){var r=n(92),i=n(93),o=n(128),s=n(33),a=n(68),c=n(94),u=Math.min;e.exports=function(e,t,n){for(var d=n?o:i,l=e[0].length,p=e.length,f=p,h=Array(p),m=1/0,b=[];f--;){var g=e[f];f&&t&&(g=s(g,a(t))),m=u(g.length,m),h[f]=!n&&(t||l>=120&&g.length>=120)?new r(f&&g):void 0}g=e[0];var v=-1,y=h[0];e:for(;++v<l&&b.length<m;){var S=g[v],E=t?t(S):S;if(S=n||0!==S?S:0,!(y?c(y,E):d(b,E,n))){for(f=p;--f;){var T=h[f];if(!(T?c(T,E):d(e[f],E,n)))continue e}y&&y.push(E),b.push(S)}}return b}},function(e,t){var n="__lodash_hash_undefined__";e.exports=function(e){return this.__data__.set(e,n),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(206),i=n(451),o=n(452);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return -1}},function(e,t,n){var r=n(129);e.exports=function(e){return r(e)?e:[]}},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(208),o=n(455),s=n(214);function a(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var c=a(n(211));c.Axios=o,c.create=function(e){return a(s(c.defaults,e))},c.Cancel=n(215),c.CancelToken=n(468),c.isCancel=n(210),c.all=function(e){return t.all(e)},c.spread=n(469),c.isAxiosError=n(470),e.exports=c,e.exports.default=c}).call(this,n(0))},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(209),o=n(456),s=n(457),a=n(214);function c(e){this.defaults=e,this.interceptors={request:new o,response:new o}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var n=[s,void 0],r=t.resolve(e);for(this.interceptors.request.forEach(function(e){n.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){n.push(e.fulfilled,e.rejected)});n.length;)r=r.then(n.shift(),n.shift());return r},c.prototype.getUri=function(e){return i((e=a(this.defaults,e)).url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}}),r.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}}),e.exports=c}).call(this,n(0))},function(e,t,n){"use strict";var r=n(17);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},function(e,t,n){"use strict";(function(t){var r=n(17),i=n(458),o=n(210),s=n(211);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return a(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(n){return!o(n)&&(a(e),n&&n.response&&(n.response.data=i(n.response.data,n.response.headers,e.transformResponse))),t.reject(n)})}}).call(this,n(0))},function(e,t,n){"use strict";var r=n(17);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";var r=n(17);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(213);e.exports=function(e,t,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(17);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";var r=n(464),i=n(465);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(17),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,s={};return e&&r.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t&&(s[t]&&i.indexOf(t)>=0||("set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n))}),s}},function(e,t,n){"use strict";var r=n(17);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";(function(t){var r=n(215);function i(e){if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new t(function(e){n=e});var n,i=this;e(function(e){i.reason||(i.reason=new r(e),n(i.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i}).call(this,n(0))},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){var r=n(216)("pick",n(48));r.placeholder=n(130),e.exports=r},function(e,t,n){var r=n(473),i=n(130),o=Array.prototype.push;function s(e,t){return 2==t?function(t,n){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}function a(e,t){return 2==t?function(t,n){return e(t,n)}:function(t){return e(t)}}function c(e){for(var t=e?e.length:0,n=Array(t);t--;)n[t]=e[t];return n}function u(e){return function(t){return e({},t)}}function d(e,t){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var s=i[t],a=i.slice(0,t);return s&&o.apply(a,s),t!=r&&o.apply(a,i.slice(t+1)),e.apply(this,a)}}function l(e,t){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=t.apply(void 0,r);return e.apply(void 0,r),i}}}function p(e,t,n,o){var f="function"==typeof t,h=t===Object(t);if(h&&(o=n,n=t,t=void 0),null==n)throw TypeError();o||(o={});var m={cap:!("cap"in o)||o.cap,curry:!("curry"in o)||o.curry,fixed:!("fixed"in o)||o.fixed,immutable:!("immutable"in o)||o.immutable,rearg:!("rearg"in o)||o.rearg},b=f?n:i,g="curry"in o&&o.curry,v="fixed"in o&&o.fixed,y="rearg"in o&&o.rearg,S=f?n.runInContext():void 0,E=f?n:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEac
vendor: 5,049 bytes, line 32
32h:e.forEach,isArray:e.isArray,isError:e.isError,isFunction:e.isFunction,isWeakMap:e.isWeakMap,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,toInteger:e.toInteger,toPath:e.toPath},T=E.ary,C=E.assign,R=E.clone,I=E.curry,_=E.forEach,w=E.isArray,x=E.isError,O=E.isFunction,N=E.isWeakMap,k=E.keys,Z=E.rearg,A=E.toInteger,L=E.toPath,V=k(r.aryMethod),W={castArray:function(e){return function(){var t=arguments[0];return w(t)?e(c(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],n=arguments[1],r=e(t,n),i=r.length;return m.cap&&"number"==typeof n?(n=n>2?n-2:1,i&&i<=n?r:a(r,n)):r}},mixin:function(e){return function(t){var n=this;if(!O(n))return e(n,Object(t));var r=[];return _(k(t),function(e){O(t[e])&&r.push([e,n.prototype[e]])}),e(n,Object(t)),_(r,function(e){var t=e[1];O(t)?n.prototype[e[0]]=t:delete n.prototype[e[0]]}),n}},nthArg:function(e){return function(t){var n=t<0?1:A(t)+1;return I(e(t),n)}},rearg:function(e){return function(t,n){var r=n?n.length:0;return I(e(t,n),r)}},runInContext:function(t){return function(n){return p(e,t(n),o)}}};function G(e,t){if(m.cap){var n=r.iterateeRearg[e];if(n)return Y(t,n);var i=!f&&r.iterateeAry[e];if(i)return F(t,i)}return t}function P(e,t,n){return g||m.curry&&n>1?I(t,n):t}function M(e,t,n){if(m.fixed&&(v||!r.skipFixed[e])){var i=r.methodSpread[e],o=i&&i.start;return void 0===o?T(t,n):d(t,o)}return t}function D(e,t,n){return m.rearg&&n>1&&(y||!r.skipRearg[e])?Z(t,r.methodRearg[e]||r.aryRearg[n]):t}function X(e,t){t=L(t);for(var n=-1,r=t.length,i=r-1,o=R(Object(e)),s=o;null!=s&&++n<r;){var a=t[n],c=s[a];null==c||O(c)||x(c)||N(c)||(s[a]=R(n==i?c:Object(c))),s=s[a]}return o}function j(e){return J.runInContext.convert(e)(void 0)}function U(e,t){var n=r.aliasToReal[e]||e,i=r.remap[n]||n,s=o;return function(e){return p(f?S:E,n,f?S[i]:t,C(C({},s),e))}}function F(e,t){return B(e,function(e){return"function"==typeof e?a(e,t):e})}function Y(e,t){return B(e,function(e){var n=t.length;return s(Z(a(e,n),t),n)})}function B(e,t){return function(){var n=arguments.length;if(!n)return e();for(var r=Array(n);n--;)r[n]=arguments[n];var i=m.rearg?0:n-1;return r[i]=t(r[i]),e.apply(void 0,r)}}function H(e,t,n){var i,o=r.aliasToReal[e]||e,s=t,a=W[o];return a?s=a(t):m.immutable&&(r.mutate.array[o]?s=l(t,c):r.mutate.object[o]?s=l(t,u(t)):r.mutate.set[o]&&(s=l(t,X))),_(V,function(e){return _(r.aryMethod[e],function(t){if(o==t){var n=r.methodSpread[o];return i=n&&n.afterRearg?M(o,D(o,s,e),e):D(o,M(o,s,e),e),i=G(o,i),i=P(o,i,e),!1}}),!i}),i||(i=s),i==t&&(i=g?I(i,1):function(){return t.apply(this,arguments)}),i.convert=U(o,t),i.placeholder=t.placeholder=n,i}if(!h)return H(t,n,b);var J=n,K=[];return _(V,function(e){_(r.aryMethod[e],function(e){var t=J[r.remap[e]||e];t&&K.push([e,H(e,t,J)])})}),_(k(J),function(e){var t=J[e];if("function"==typeof t){for(var n=K.length;n--;)if(K[n][0]==e)return;t.convert=U(e,t),K.push([e,t])}}),_(K,function(e){J[e[0]]=e[1]}),J.convert=j,J.placeholder=J,_(k(J),function(e){_(r.realToAlias[e]||[],function(t){J[t]=J[e]})}),J}e.exports=p},function(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","flatten
32Depth","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,n=t.aliasToReal,r={};for(var i in n){var o=n[i];e.call(r,o)?r[o].push(i):r[o]=[i]}return r}(),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}},function(e,t,n){e.exports={ary:n(475),assign:n(177),clone:n(37),curry:n(493),forEach:n(111),isArray:n(10),isError:n(494),isFunction:n(15),isWeakMap:n(495),iteratee:n(496),keys:n(114),rearg:n(511),toInteger:n(96),toPath:n(
vendor: 10,280 bytes, line 32
32514)}},function(e,t,n){var r=n(131),i=128;e.exports=function(e,t,n){return t=n?void 0:t,t=e&&null==t?e.length:t,r(e,i,void 0,void 0,void 0,void 0,t)}},function(e,t,n){var r=n(95),i=n(14),o=1;e.exports=function(e,t,n){var s=t&o,a=r(e);function c(){return(this&&this!==i&&this instanceof c?a:e).apply(s?n:this,arguments)}return c}},function(e,t,n){var r=n(120),i=n(95),o=n(219),s=n(222),a=n(228),c=n(134),u=n(14);e.exports=function(e,t,n){var d=i(e);function l(){for(var i=arguments.length,p=Array(i),f=i,h=a(l);f--;)p[f]=arguments[f];var m=i<3&&p[0]!==h&&p[i-1]!==h?[]:c(p,h);return(i-=m.length)<n?s(e,t,o,l.placeholder,void 0,p,m,void 0,void 0,n-i):r(this&&this!==u&&this instanceof l?d:e,this,p)}return l}},function(e,t){e.exports=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}},function(e,t,n){var r=n(132),i=n(223),o=n(480),s=n(482);e.exports=function(e){var t=o(e),n=s[t];if("function"!=typeof n||!(t in r.prototype))return!1;if(e===n)return!0;var a=i(n);return!!a&&e===a[0]}},function(e,t,n){var r=n(481),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",n=r[t],o=i.call(r,t)?n.length:0;o--;){var s=n[o],a=s.func;if(null==a||a==e)return s.name}return t}},function(e,t){e.exports={}},function(e,t,n){var r=n(132),i=n(225),o=n(133),s=n(10),a=n(16),c=n(483),u=Object.prototype.hasOwnProperty;function d(e){if(a(e)&&!s(e)&&!(e instanceof r)){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},function(e,t,n){var r=n(132),i=n(225),o=n(54);e.exports=function(e){if(e instanceof r)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}},function(e,t){var n=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;e.exports=function(e){var t=e.match(n);return t?t[1].split(r):[]}},function(e,t){var n=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(n,"{\n/* [wrapped with "+t+"] */\n")}},function(e,t,n){var r=n(111),i=n(93),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 r(o,function(n){var r="_."+n[0];t&n[1]&&!i(e,r)&&e.push(r)}),e.sort()}},function(e,t,n){var r=n(54),i=n(67),o=Math.min;e.exports=function(e,t){for(var n=e.length,s=o(t.length,n),a=r(e);s--;){var c=t[s];e[s]=i(c,n)?a[c]:void 0}return e}},function(e,t,n){var r=n(120),i=n(95),o=n(14),s=1;e.exports=function(e,t,n,a){var c=t&s,u=i(e);function d(){for(var t=-1,i=arguments.length,s=-1,l=a.length,p=Array(l+i),f=this&&this!==o&&this instanceof d?u:e;++s<l;)p[s]=a[s];for(;i--;)p[s++]=arguments[++t];return r(f,c?n:this,p)}return d}},function(e,t,n){var r=n(220),i=n(221),o=n(134),s="__lodash_placeholder__",a=1,c=2,u=4,d=8,l=128,p=256,f=Math.min;e.exports=function(e,t){var n=e[1],h=t[1],m=n|h,b=m<(a|c|l),g=h==l&&n==d||h==l&&n==p&&e[7].length<=t[8]||h==(l|p)&&t[7].length<=t[8]&&n==d;if(!(b||g))return e;h&a&&(e[2]=t[2],m|=n&a?0:u);var v=t[3];if(v){var y=e[3];e[3]=y?r(y,v,t[4]):v,e[4]=y?o(e[3],s):t[4]}return(v=t[5])&&(y=e[5],e[5]=y?i(y,v,t[6]):v,e[6]=y?o(e[5],s):t[6]),(v=t[7])&&(e[7]=v),h&l&&(e[8]=null==e[8]?t[8]:f(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=m,e}},function(e,t,n){var r=n(229),i=1/0,o=17976931348623157e292;e.exports=function(e){return e?(e=r(e))===i||e===-i?(e<0?-1:1)*o:e==e?e:0:0===e?e:0}},function(e,t,n){var r=n(492),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},function(e,t){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},function(e,t,n){var r=n(131),i=8;function o(e,t,n){var s=r(e,i,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return s.placeholder=o.placeholder,s}o.placeholder={},e.exports=o},function(e,t,n){var r=n(29),i=n(16),o=n(135),s="[object DOMException]",a="[object Error]";e.exports=function(e){if(!i(e))return!1;var t=r(e);return t==a||t==s||"string"==typeof e.message&&"string"==typeof e.name&&!o(e)}},function(e,t,n){var r=n(41),i=n(16),o="[object WeakMap]";e.exports=function(e){return i(e)&&r(e)==o}},function(e,t,n){var r=n(77),i=n(35),o=1;e.exports=function(e){return i("function"==typeof e?e:r(e,o))}},function(e,t,n){var r=n(498),i=n(502),o=n(235);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(78),i=n(230),o=1,s=2;e.exports=function(e,t,n,a){var c=n.length,u=c,d=!a;if(null==e)return!u;for(e=Object(e);c--;){var l=n[c];if(d&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++c<u;){var p=(l=n[c])[0],f=e[p],h=l[1];if(d&&l[2]){if(void 0===f&&!(p in e))return!1}else{var m=new r;if(a)var b=a(f,h,p,e,t,m);if(!(void 0===b?i(h,f,o|s,a,m):b))return!1}}return!0}},function(e,t,n){var r=n(78),i=n(231),o=n(500),s=n(501),a=n(41),c=n(10),u=n(66),d=n(85),l=1,p="[object Arguments]",f="[object Array]",h="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,b,g,v){var y=c(e),S=c(t),E=y?f:a(e),T=S?f:a(t);E=E==p?h:E,T=T==p?h:T;var C=E==h,R=T==h,I=E==T;if(I&&u(e)){if(!u(t))return!1;y=!0,C=!1}if(I&&!C)return v||(v=new r),y||d(e)?i(e,t,n,b,g,v):o(e,t,E,n,b,g,v);if(!(n&l)){var _=C&&m.call(e,"__wrapped__"),w=R&&m.call(t,"__wrapped__");if(_||w){var x=_?e.value():e,O=w?t.value():t;return v||(v=new r),g(x,O,n,b,v)}}return!!I&&(v||(v=new r),s(e,t,n,b,g,v))}},function(e,t,n){var r=n(39),i=n(188),o=n(52),s=n(231),a=n(233),c=n(97),u=1,d=2,l="[object Boolean]",p="[object Date]",f="[object Error]",h="[object Map]",m="[object Number]",b="[object RegExp]",g="[object Set]",v="[object String]",y="[object Symbol]",S="[object ArrayBuffer]",E="[object DataView]",T=r?r.prototype:void 0,C=T?T.valueOf:void 0;e.exports=function(e,t,n,r,T,R,I){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case S:if(e.byteLength!=t.byteLength||!R(new i(e),new i(t)))break;return!0;case l:case p:case m:return o(+e,+t);case f:return e.name==t.name&&e.message==t.message;case b:case v:return e==t+"";case h:var _=a;case g:var w=r&u;if(_||(_=c),e.size!=t.size&&!w)break;var x=I.get(e);if(x)return x==t;r|=d,I.set(e,t);var O=s(_(e),_(t),r,T,R,I);return I.delete(e),O;case y:if(C)return C.call(e)==C.call(t)}return!1}},function(e,t,n){var r=n(183),i=1,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,s,a,c){var u=n&i,d=r(e),l=d.length;if(l!=r(t).length&&!u)return!1;for(var p=l;p--;){var f=d[p];if(!(u?f in t:o.call(t,f)))return!1}var h=c.get(e),m=c.get(t);if(h&&m)return h==t&&m==e;var b=!0;c.set(e,t),c.set(t,e);for(var g=u;++p<l;){var v=e[f=d[p]],y=t[f];if(s)var S=u?s(y,v,f,t,e,c):s(v,y,f,e,t,c);if(!(void 0===S?v===y||a(v,y,n,s,c):S)){b=!1;break}g||(g="constructor"==f)}if(b&&!g){var E=e.constructor,T=t.constructor;E!=T&&"constructor"in e&&"constructor"in t&&!("function"==typeof E&&E instanceof E&&"function"==typeof T&&T instanceof T)&&(b=!1)}return c.delete(e),c.delete(t),b}},function(e,t,n){var r=n(234),i=n(30);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],s=e[o];t[n]=[o,s,r(s)]}return t}},function(e,t,n){var r=n(230),i=n(57),o=n(237),s=n(136),a=n(234),c=n(235),u=n(47),d=1,l=2;e.exports=function(e,t){return s(e)&&a(t)?c(u(e),t):function(n){var s=i(n,e);return void 0===s&&s===t?o(n,e):r(t,s,d|l)}}},function(e,t,n){var r=n(191),i=500;e.exports=function(e){var t=r(e,function(e){return n.size===i&&n.clear(),e}),n=t.cache;return t}},function(e,t,n){var r=n(39),i=n(33),o=n(10),s=n(71),a=1/0,c=r?r.prototype:void 0,u=c?c.toString:void 0;function d(e){if("string"==typeof e)return e;if(o(e))return i(e,d)+"";if(s(e))return u?u.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}e.exports=d},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(58),i=n(65),o=n(10),s=n(67),a=n(112),c=n(47);e.exports=function(e,t,n){t=r(t,e);for(var u=-1,d=t.length,l=!1;++u<d;){var p=c(t[u]);if(!(l=null!=e&&n(e,p)))break;e=e[p]}return l||++u!=d?l:!!(d=null==e?0:e.length)&&a(d)&&s(p,d)&&(o(e)||i(e))}},function(e,t,n){var r=n(509),i=n(510),o=n(136),s=n(47);e.exports=function(e){return o(e)?r(s(e)):i(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(98);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(131),i=n(137),o=256;e.exports=i(function(e,t){return r(e,o,void 0,void 0,void 0,t)})},function(e,t,n){var r=n(238);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t,n){var r=n(39),i=n(65),o=n(10),s=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},function(e,t,n){var r=n(33),i=n(54),o=n(10),s=n(71),a=n(236),c=n(47),u=n(59);e.exports=function(e){return o(e)?r(e,c):s(e)?[e]:i(a(u(e)))}},function(e,t,n){var r=n(516),i=n(237);e.exports=function(e,t){return r(e,t,function(t,n){return i(e,n)})}},function(e,t,n){var r=n(98),i=n(517),o=n(58);e.exports=function(e,t,n){for(var s=-1,a=t.length,c={};++s<a;){var u=t[s],d=r(e,u);n(d,u)&&i(c,o(u,e),d)}return c}},function(e,t,n){var r=n(83),i=n(58),o=n(67),s=n(9),a=n(47);e.exports=function(e,t,n,c){if(!s(e))return e;t=i(t,e);for(var u=-1,d=t.length,l=d-1,p=e;null!=p&&++u<d;){var f=a(t[u]),h=n;if("__proto__"===f||"constructor"===f||"prototype"===f)break;if(u!=l){var m=p[f];void 0===(h=c?c(m,f,p):void 0)&&(h=s(m)?m:o(t[u+1])?[]:{})}r(p,f,h),p=p[f]}return e}},function(e,t,n){var r=n(216)("mapKeys",n(519));r.placeholder=n(130),e.exports=r},function(e,t,n){var r=n(64),i=n(99),o=n(35);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,t(e,i,o),e)}),n}},function(e,t){e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===n(o[c],c,o))break}return t}}},function(e,t,n){(function(e){var r;!function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof window&&window;(o.global===o||o.window===o||o.self===o)&&(i=o);var s,a=0x7fffffff,c=36,u=1,d=26,l=38,p=700,f=72,h=128,m="-",b=/^xn--/,g=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >
32= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=35,E=Math.floor,T=String.fromCharCode;function C(e){throw RangeError(y[e])}function R(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function I(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+R((e=e.replace(v,".")).split("."),t).join(".")}function _(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?(64512&(n=e.charCodeAt(i++)))==56320?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function w(e){return R(e,function(e){var t="";return e>65535&&(e-=65536,t+=T(e>>>10&1023|55296),e=56320|1023&e),t+=T(e)}).join("")}function x(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function N(e,t,n){var r=0;for(e=n?E(e/p):e>>1,e+=E(e/t);e>S*d>>1;r+=c)e=E(e/S);return E(r+(S+1)*e/(e+l))}function k(e){var t,n,r,i,o,s,l,p,b,g,v=[],y=e.length,S=0,T=h,R=f;for((n=e.lastIndexOf(m))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&C("not-basic"),v.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<y;){for(o=S,s=1,l=c;i>=y&&C("invalid-input"),((p=x(e.charCodeAt(i++)))>=c||p>E((a-S)/s))&&C("overflow"),S+=p*s,!(p<(b=l<=R?u:l>=R+d?d:l-R));l+=c)s>E(a/(g=c-b))&&C("overflow"),s*=g;R=N(S-o,t=v.length+1,0==o),E(S/t)>a-T&&C("overflow"),T+=E(S/t),S%=t,v.splice(S++,0,T)}return w(v)}function Z(e){var t,n,r,i,o,s,l,p,b,g,v,y,S,R,I,w=[];for(s=0,y=(e=_(e)).length,t=h,n=0,o=f;s<y;++s)(v=e[s])<128&&w.push(T(v));for(r=i=w.length,i&&w.push(m);r<y;){for(l=a,s=0;s<y;++s)(v=e[s])>=t&&v<l&&(l=v);for(l-t>E((a-n)/(S=r+1))&&C("overflow"),n+=(l-t)*S,t=l,s=0;s<y;++s)if((v=e[s])<t&&++n>a&&C("overflow"),v==t){for(p=n,b=c;!(p<(g=b<=o?u:b>=o+d?d:b-o));b+=c)I=p-g,R=c-g,w.push(T(O(g+I%R,0))),p=E(I/R);w.push(T(O(p,0))),o=N(n,S,r==i),n=0,++r}++n,++t}return w.join("")}function A(e){return I(e,function(e){return b.test(e)?k(e.slice(4).toLowerCase()):e})}function L(e){return I(e,function(e){return g.test(e)?"xn--"+Z(e):e})}s={version:"1.4.1",ucs2:{decode:_,encode:w},decode:k,encode:Z,toASCII:L,toUnicode:A},void 0===(r=(function(){return s}).call(t,n,t,e))||(e.exports=r)}(this)}).call(this,n(84)(e))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(524),t.encode=t.stringify=n(525)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var d=0;d<u;++d){var l,p,f,h,m=e[d].replace(a,"%20"),b=m.indexOf(n);b>=0?(l=m.substr(0,b),p=m.substr(b+1)):(l=m,p=""),f=decodeURIComponent(l),h=decodeURIComponent(p),r(s,f)?i(s[f])?s[f].push(h):s[f]=[s[f],h]:s[f]=h}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,a){return(t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e)?o(s(e),function(s){var a=encodeURIComponent(r(s))+n;return i(e[s])?o(e[s],function(e){return a+encodeURIComponent(r(e))}).join(t):a+encodeURIComponent(r(e[s]))}).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){var r,i,o=n(242),s=n(243),a=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,d=t||[],l=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:i;if(null==l||null==p){var f=o();null==l&&(l=r=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==p&&(p=i=(f[6]<<8|f[7])&16383)}var h=void 0!==e.msecs?e.msecs:new Date().getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,b=h-a+(m-c)/1e4;if(b<0&&void 0===e.clockseq&&(p=p+1&16383),(b<0||h>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");a=h,c=m,i=p;var g=((0xfffffff&(h+=122192928e5))*1e4+m)%0x100000000;d[u++]=g>>>24&255,d[u++]=g>>>16&255,d[u++]=g>>>8&255,d[u++]=255&g;var v=h/0x100000000*1e4&0xfffffff;d[u++]=v>>>8&255,d[u++]=255&v,d[u++]=v>>>
3224&15|16,d[u++]=v>>>16&255,d[u++]=p>>>8|128,d[u++]=255&p;for(var y=0;y<6;++y)d[u+y]=l[y];return t||s(d)}},function(e,t,n){var r=n(242),i=n(243);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,n){"use strict";var r=n(3)(n(18));e.exports=function(){function e(e){let t=(void 0===e?{}:e).waitTime,n=void 0===t?50:t;(0,r.default)(this,"queue",[]),(0,r.default)(this,"running",!1),this.waitTime=n}var t=e.prototype;return t.add=function(e){this.queue.push(e),this.run()},t.run=function(){if(this.running)return;this.running=!0;let e=()=>{if(0===this.queue.length){this.running=!1;return}this.queue.shift()(()=>{setTimeout(e,this.waitTime)})};e()},e}()},function(e,t,n){"use strict";let r=n(9),i={for:"htmlFor",class:"className"};e.exports=function(e){e.prototype.attr=function(e,t){if(r(e)){let t;Object.keys(e).forEach(n=>{t=i[n]||n,this.first.setAttribute(t,e[n])})}else{if(void 0===t)return this.first.getAttribute(i[e]||e);this.first.setAttribute(i[e]||e,t)}return this},e.prototype.removeAttr=function(e){let t=i[e]||e;return this.forEach(e=>{e.removeAttribute(t)}),this},e.prototype.html=function(e){return void 0!==e&&(this.first.innerHTML=e),this.first.innerHTML},e.prototype.center=function(t,n){let r;return this.forEach(i=>{r=new e(i),t=t||parseInt(r.width(),10),n=n||parseInt(r.height(),10);let o=`${-.5*t}px`,s=`${-.5*n}px`;r.css("margin",`${s} 0 0 ${o}`).addClass("OT_centered")}),this},e._attachToOTHelpers.centerElement=function(t,n,r){return new e(t).center(n,r)};let t=function(t){return t.offsetWidth>0?`${t.offsetWidth}px`:new e(t).css("width")},n=function(t){return t.offsetHeight>0?`${t.offsetHeight}px`:new e(t).css("height")};e.prototype.width=function(e){return e?(this.css("width",e),this):this.isDisplayNone()?this.makeVisibleAndYield(e=>t(e))[0]:t(this.get(0))},e._attachToOTHelpers.width=function(t,n){let r=new e(t).width(n);return n?e._attachToOTHelpers:r},e.prototype.height=function(e){return e?(this.css("height",e),this):this.isDisplayNone()?this.makeVisibleAndYield(e=>n(e))[0]:n(this.get(0))},e._attachToOTHelpers.height=function(t,n){let r=new e(t).height(n);return n?e._attachToOTHelpers:r}}},function(e,t,n){"use strict";let r=n(2),i=window.getComputedStyle,o={Firefox:"moz",Opera:"O",Chrome:"Webkit",Safari:"Webkit"};function s(){return o[r.name]}e.exports=function(e,t){let n={},r={},o=function(t){let n;if(r[t.ownerDocument]&&r[t.ownerDocument][t.nodeName])return r[t.ownerDocument][t.nodeName];r[t.ownerDocument]||(r[t.ownerDocument]={});let i=t.ownerDocument.createElement(t.nodeName);return t.ownerDocument.body.appendChild(i),n=new e(i).css("display"),r[t.ownerDocument][t.nodeName]=n,new e(i).remove(),i=null,n},a=function(e){return"none"===i(e).getPropertyValue("display")},c=function(e,t){if(t in e.style)return t;let n=s()+t[0].toUpperCase()+t.slice(1);return n in e.style?n:t},u=function(e,t){let n=e.style;for(let r in t)t.hasOwnProperty(r)&&(n[c(e,r)]=t[r])},d=function(e,t,n){e.style[c(e,t)]=n},l=function(e,t){let n=c(e,t),r=i(e).getPropertyValue(n);return""===r&&(r=e.style[n]),r},p=function(t,n,r){let i,o,s=new e(t),a={};for(i in n)n.hasOwnProperty(i)&&(a[i]=t.style[i],s.css(i,n[i]));for(i in o=r(t),n)n.hasOwnProperty(i)&&s.css(i,a[i]||"");return o};e.prototype.show=function(){return this.forEach(e=>{let t=e.style.display;(""===t||"none"===t)&&(e.style.display=n[e]||"",delete n[e]),a(e)&&(n[e]="none",e.style.display=o(e))})},e.prototype.hide=function(){return this.forEach(e=>{"none"!==e.style.display&&(n[e]=e.style.display,e.style.display="none")})},e.prototype.css=function(e,t){if(0!==this.length)return"string"!=typeof e?this.forEach(t=>{u(t,e)}):void 0!==t?this.forEach(n=>{d(n,e,t)}):l(this.first,e,t)},e.prototype.makeVisibleAndYield=function(e){let n={display:"block",visibility:"hidden"},r=[];return this.forEach(i=>{let o=t(i);o?r.push(p(o,n,e)):r.push(void 0)}),r}}},function(e,t,n){"use strict";(function(t){let r=n(532),i=r.isiPhone,o=r.isiPad,s=r.isiOS,a=n(533),c=n(534),u=e=>{var t,n;return(null==(n=e=e||(null==(t=window)?void 0:t.navigator))?void 0:n.userAgent.toLowerCase().indexOf("electron"))>=0},d=()=>{var e,t,n;return"string"==typeof(null==(e=window)||null==(t=e.process)||null==(n=t.versions)?void 0:n.node)&&!u()}
32,l={version:-1,name:"unknown"},p=()=>{l.name="Node",l.isNode=!0,l.version=parseInt(t.versions.node,10),l.userAgent=`${l.name} ${l.version}`},f=e=>{l.userAgent=(e=e||window.navigator).userAgent.toLowerCase(),l.name="unknown",l.userAgent.indexOf("opera")>-1||l.userAgent.indexOf("opr/")>-1?(l.name="Opera",l.isOpera=!0,null!==/opr\/([0-9]{1,}[.0-9]{0,})/.exec(l.userAgent)&&(l.version=parseFloat(RegExp.$1))):l.userAgent.indexOf("firefox")>-1?(l.name="Firefox",l.isFirefox=!0,null!==/firefox\/([0-9]{1,}[.0-9]{0,})/.exec(l.userAgent)&&(l.version=parseFloat(RegExp.$1))):l.userAgent.match(/edge?\/(\d+)(?:\.\d+)+$/)?(l.name="Edge",l.isEdge=!0,l.version=parseInt(RegExp.$1,10)):l.userAgent.indexOf("chrome")>-1?(l.name="Chrome",l.isElectron=u(e),l.isElectron?l.electronVersion=c(e.userAgent):l.isChrome=!0,null!==/chrome\/([0-9]{1,}[.0-9]{0,})/.exec(l.userAgent)&&(l.version=parseFloat(RegExp.$1))):e.vendor&&e.vendor.toLowerCase().indexOf("apple")>-1?(l.name="Safari",l.isSafari=!0,l.isiPhone=i(e.userAgent),l.isiPad=o(e.userAgent),l.isiOS=s(e.userAgent),l.isiOS&&(l.iOSVersion=a(e.userAgent)),null!==/version\/([0-9]{1,}[.0-9]{0,})/.exec(l.userAgent)||null!==/fxios\/([0-9]{1,}[.0-9]{0,})/.exec(l.userAgent)?l.version=parseFloat(RegExp.$1):null!==/crios\/([0-9]{1,}[.0-9]{0,})/.exec(l.userAgent)&&(l.version=parseFloat(RegExp.$1))):l.userAgent.indexOf("applewebkit")>-1&&-1===l.userAgent.indexOf("version")&&(l.isIosWebView=!0),l.isChromiumEdge="Edge"===l.name&&l.version>=79,l.isLegacyEdge="Edge"===l.name&&l.version<79,l.isLegacyElectron=l.isElectron&&l.electronVersion<2,l.isLegacyChrome=l.isChrome&&l.version<50,l.isAndroid=l.userAgent.indexOf("android")>-1,l.userAgent=e.userAgent,l.protocol=location.protocol,l.hostName=location.hostName,(-1===l.version||"unknown"===l.name||l.isiOS&&!l.iOSVersion)&&(l.error=!0)};e.exports={parse:e=>(d()?p():f(e),l),isNode:d}}).call(this,n(43))},function(e,t,n){"use strict";let r=e=>/iPhone/.test(e),i=e=>{try{return e.includes("Mac")&&"ontouchend"in document}catch(e){return!1}},o=e=>/iPad/.test(e)||i(e),s=e=>r(e)||o(e);e.exports={isiPhone:r,isiPad:o,isiOS:s}},function(e,t,n){"use strict";e.exports=function(e){let t=e.match(/OS (\d+_\d+).* like Mac/);if(null!==t&&t[1])return parseFloat(t[1].replace("_","."))}},function(e,t,n){"use strict";let r=/(Electron)\/([0-9]{1,}[.0-9]{0,})/;e.exports=e=>{let t=e.match(r);return t&&parseFloat(t[2])}},function(e,t,n){"use strict";let r=n(536);function i(e,t){return!!t&&(r()?e.classList.contains(t):e.className.indexOf(t)>-1)}function o(e,t){if(!t||0===t.length||1!==e.nodeType)return;let n=t.length,o=0;if(r()){for(;o<n;++o)e.classList.toggle(t[o]);return}let s=` ${e.className} `.replace(/[\s+]/," ");for(;o<n;++o)i(e,t[o])?s=s.replace(` ${t[o]} `," "):s+=`${t[o]} `;e.className=s.trim()}function s(e,t){if(!t||0===t.length||1!==e.nodeType)return;let n=t.length,i=0;if(r()){for(;i<n;++i)e.classList.add(t[i]);return}if(e.className||1!==t.length){let r=` ${e.className} `;for(;i<n;++i)~r.indexOf(` ${t[i]} `)||(r+=`${t[i]} `);e.className=r.trim()}else e.className=t.join(" ")}function a(e,t){if(!t||0===t.length||1!==e.nodeType)return;let n=t.length,i=0;if(r()){for(;i<n;++i)e.classList.remove(t[i]);return}let o=` ${e.className} `.replace(/[\s+]/," ");for(;i<n;++i)o=o.replace(` ${t[i]} `," ");e.className=o.trim()}e.exports=function(e){e.prototype.addClass=function(e){if(e){let t=e.trim().split(/\s+/);this.forEach(e=>{s(e,t)})}return this},e.prototype.removeClass=function(e){if(e){let t=e.trim().split(/\s+/);this.forEach(e=>{a(e,t)})}return this},e.prototype.toggleClass=function(e){if(e){let t=e.trim().split(/\s+/);this.forEach(e=>{o(e,t)})}return this},e.prototype.hasClass=function(e){return this.some(t=>i(t,e))}}},function(e,t,n){"use strict";e.exports=()=>"u">typeof document&&"classList"in document.createElement("a")},function(e,t,n){"use strict";let r=n(538);e.exports=function(e){let t=0,n=0,i=function(t,n,i){let o={},s=function(n){switch(n){case"width":return new e(t).width();case"height":return new e(t).height();default:return new e(t).css(n)}};n.forEach(e=>{o[e]=s(e)});let a=new window.MutationObserver(a=>{let c={};a.forEach(r=>{if("style"!==r.attributeName)return;let i=new e(t).isDisplayNone();
32n.forEach(e=>{if(i&&("width"===e||"height"===e))return;let t=s(e);t!==o[e]&&(c[e]=[o[e],t],o[e]=t)})}),r(c)||setTimeout(()=>{i.call(null,c)})});return a.observe(t,{attributes:!0,attributeFilter:["style"],childList:!1,characterData:!1,subtree:!1}),a},o=function(t,r){let i=new window.MutationObserver(t=>{let n=[];t.forEach(e=>{e.removedNodes.length&&(n=n.concat(Array.prototype.slice.call(e.removedNodes)))}),n.length&&setTimeout(()=>{r(new e(n))})});i.observe(t,{attributes:!1,childList:!0,characterData:!1,subtree:!0}),n++;let o=i.disconnect;return i.disconnect=function(){o.apply(i,arguments),n--},i},s=function(e,n){let r={width:0,height:0},i=setInterval(()=>{let t=e.getBoundingClientRect();(r.width!==t.width||r.height!==t.height)&&(n(t,r),r={width:t.width,height:t.height})},200);return t++,{disconnect(){clearInterval(i),t--}}};e.prototype.observeStyleChanges=function(e,t){let n=[];return this.forEach(r=>{n.push(i(r,e,t))}),n},e.prototype.observeNodeOrChildNodeRemoval=function(e){let t=[];return this.forEach(n=>{t.push(o(n,e))}),t},e.prototype.observeSize=function(e){let t=[];return this.forEach(n=>{t.push(s(n,e))}),t},e._attachToOTHelpers.observeStyleChanges=function(t,n,r){return new e(t).observeStyleChanges(n,r)[0]},e._attachToOTHelpers.observeNodeOrChildNodeRemoval=function(t,n){return new e(t).observeNodeOrChildNodeRemoval(n)[0]},e.__testOnly||(e.__testOnly={}),e.__testOnly.sizeObserverCount=function(){return t},e.__testOnly.nodeRemovalObserverCount=function(){return n}}},function(e,t,n){var r=n(114),i=n(41),o=n(65),s=n(10),a=n(25),c=n(66),u=n(69),d=n(85),l="[object Map]",p="[object Set]",f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||d(e)||o(e)))return!e.length;var t=i(e);if(t==l||t==p)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t,n){"use strict";e.exports={1004:"Authentication error",1005:"Invalid Session ID",1006:"Connect Failed",1007:"Connect Rejected",1008:"Connect Time-out",1009:"Security Error",1010:"Not Connected",1011:"Invalid Parameter",1012:"Peer-to-peer Stream Play Failed",1013:"Connection Failed",1014:"API Response Failure",1015:"PeerConnection not connected, cannot call this method",1021:"Request Timeout",1026:"Terms of Service Violation: Export Compliance",1027:"Connection Limit Exceeded",1040:"Set Video Source Failure",1041:"Invalid Video Source",1500:"Unable to Publish",1501:"Unable to Subscribe",1502:"Unsupported Video Codec",1503:"No TURN server found",1520:"Unable to Force Disconnect",1530:"Unable to Force Unpublish",1540:"Unable to Force Mute",1553:"ICEWorkflow failed",1600:"createOffer, createAnswer, setLocalDescription, setRemoteDescription",1605:"Stream Limit Exceeded",2e3:"Internal Error",2001:"Unexpected Server Response",2021:"Proxy URL Timing Error",2022:"Proxy URL Already Set Error",2031:"getRtcStatsReport is not supported in this browser",4e3:"WebSocket Connection Failed",4001:"WebSocket Network Disconnected",5001:"Unable to access media engine"}},function(e,t,n){"use strict";let r=n(15);e.exports=function(e,t,n,i,o){let s,a=n;e.currentState=n;let c=function(n){if(a!==n){if(-1===t.indexOf(n)){o&&r(o)&&o("invalidState",n);return}e.previousState=a,s=a,e.currentState=n,a=n,i&&r(i)&&i(n,s)}};return e.is=function(){return -1!==Array.prototype.indexOf.call(arguments,a)},e.isNot=function(){return -1===Array.prototype.indexOf.call(arguments,a)},c}},function(e,t,n){"use strict";let r=n(248),i={};e.exports=i,i.isElementNode=function(e){return e&&"object"==typeof e&&1===e.nodeType},i.createElement=function(e,t,n,r){let i=(r||document).createElement(e);Object.keys(t=t||{}).forEach(e=>{if("object"==typeof t[e]){i[e]||(i[e]={});let n=t[e];Object.keys(n).forEach(t=>{i[e][t]=n[t]})}else"className"===e?i.className=t[e]:i.setAttribute(e,t[e])});let o=function(e){"string"==typeof e?i.innerHTML+=e:i.appendChild(e)};return Array.isArray(n)?n.forEach(o):n&&o(n),i},r(i)},function(e,t,n){"use strict";let r=n(543);e.exports=function(e){void 0===e&&(e={}),(e.isSessionProxied||n(544))(e.sessionId)&&r.forEach(t=>{t in e&&(e[t]="")})}},function(e,t,n){"use strict";e.exports=["audioLocalAddress","audioRemoteAddress","videoLocalAddress","videoRemoteAddress"]},function(e,t,n){"use strict";let r=n(21).sessions;e.exports=e=>{let t=r.get(e);return!!t&&!!t._.getProxyUrl()}},function(e,t,n){"use strict";e.exports=["buildHash","minimumVersion","debug",["websiteURL","websiteUrl"],["cdnURL","cdnUrl"],["loggingURL","loggingUrl"],["apiURL","apiUrl"],["supportSSL",!0],["cdnURLSSL","cdnUrl"],["loggingURLSSL","loggingUrl"],["apiURLSSL","apiUrl"],["assetURL","assetUrl"]]},function(e,t,n){"use strict";e.exports=["apiUrl","apiURL","apiURLSSL"]},function(e,t,n){"use strict";e.exports=function(){let e=window.OT,t=window.TB;return()=>{let n=window.OT;return window.OT=e,window.TB=t,n}}},function(e,t,n){"use strict";let r=e=>{let t={};return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=Object.getOwnPropertyDescriptor(e,n)}),t};e.exports=function(e){function t(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];let o=new e(...r);return Object.setPrototypeOf(o,t.prototype),o}return t.prototype=Object.create(e.prototype),Object.defineProperties(t.prototype,r(e.prototype)),Object.keys(e).forEach(n=>{t[n]=e[n]}),t}},function(e,t,n){"use strict";var r=n(28);
32e.exports=function(e,t){var i=e&&e.window,o={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);var a=r.log,c=r.detectBrowser(i),u=n(550)||null,d=n(552)||null,l=n(556)||null,p=n(558)||null,f=n(559)||null,h={browserDetails:c,commonShim:f,extractVersion:r.extractVersion,disableLog:r.disableLog,disableWarnings:r.disableWarnings};switch(c.browser){case"chrome":if(!u||!u.shimPeerConnection||!o.shimChrome){a("Chrome shim is not included in this adapter release.");break}a("adapter.js shimming chrome."),h.browserShim=u,f.shimCreateObjectURL(i),u.shimGetUserMedia(i),u.shimMediaStream(i),u.shimSourceObject(i),u.shimPeerConnection(i),u.shimOnTrack(i),u.shimAddTrackRemoveTrack(i),u.shimGetSendersWithDtmf(i),u.shimSenderReceiverGetStats(i),u.fixNegotiationNeeded(i),f.shimRTCIceCandidate(i),f.shimMaxMessageSize(i),f.shimSendThrowTypeError(i);break;case"firefox":if(!l||!l.shimPeerConnection||!o.shimFirefox){a("Firefox shim is not included in this adapter release.");break}a("adapter.js shimming firefox."),h.browserShim=l,f.shimCreateObjectURL(i),l.shimGetUserMedia(i),l.shimSourceObject(i),l.shimPeerConnection(i),l.shimOnTrack(i),l.shimRemoveStream(i),l.shimSenderGetStats(i),l.shimReceiverGetStats(i),l.shimRTCDataChannel(i),f.shimRTCIceCandidate(i),f.shimMaxMessageSize(i),f.shimSendThrowTypeError(i);break;case"edge":if(!d||!d.shimPeerConnection||!o.shimEdge){a("MS edge shim is not included in this adapter release.");break}a("adapter.js shimming edge."),h.browserShim=d,f.shimCreateObjectURL(i),d.shimGetUserMedia(i),d.shimPeerConnection(i),d.shimReplaceTrack(i),d.shimGetDisplayMedia(i),f.shimMaxMessageSize(i),f.shimSendThrowTypeError(i);break;case"safari":if(!p||!o.shimSafari){a("Safari shim is not included in this adapter release.");break}a("adapter.js shimming safari."),h.browserShim=p,f.shimCreateObjectURL(i),p.shimRTCIceServerUrls(i),p.shimCreateOfferLegacy(i),p.shimCallbacksAPI(i),p.shimLocalStreamsAPI(i),p.shimRemoteStreamsAPI(i),p.shimTrackEventTransceiver(i),p.shimGetUserMedia(i),f.shimRTCIceCandidate(i),f.shimMaxMessageSize(i),f.shimSendThrowTypeError(i);break;default:a("Unsupported browser!")}return h}},function(e,t,n){"use strict";(function(t){var r=n(28),i=r.log;function o(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(function(r){r.endsWith("Id")?o(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(function(t){o(e,e.get(t),n)})}))}function s(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;var s=[];return e.forEach(function(e){"track"===e.type&&e.trackIdentifier===t.id&&s.push(e)}),s.forEach(function(t){e.forEach(function(n){n.type===r&&n.trackId===t.id&&o(e,n,i)})}),i}e.exports={shimGetUserMedia:n(551),shimMediaStream:function(e){e.MediaStream=e.MediaStream||e.webkitMediaStream},shimOnTrack:function(e){if("object"!=typeof e||!e.RTCPeerConnection||"ontrack"in e.RTCPeerConnection.prototype)r.wrapPeerConnectionEvent(e,"track",function(e){return e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e});else{Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var n=this;return n._ontrackpoly||(n._ontrackpoly=function(t){t.stream.addEventListener("addtrack",function(r){var i=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find(function(e){return e.track&&e.track.id===r.track.id}):{track:r.track},o=new Event("track");o.track=r.track,o.receiver=i,o.transceiver={receiver:i},o.streams=[t.stream],n.dispatchEvent(o)}),t.stream.getTracks().forEach(function(r){var i=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find(function(e){return e.track&&e.track.id===r.id}):{track:r},o=new Event("track");o.track=r,o.receiver=i,o.transceiver={receiver:i},o.streams=[t.stream],n.dispatchEvent(o)})},n.addEventListener("addstream",n._ontrackpoly)),t.apply(n,arguments)}}},shimGetSendersWithDtmf:function(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){var i=this,o=n.apply(i,arguments);return o||(o=t(i,e),i._senders.push(o)),o};var r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;r.apply(t,arguments);var n=t._senders.indexOf(e);-1!==n&&t._senders.splice(n,1)}}var i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;
32n._senders=n._senders||[],i.apply(n,[e]),e.getTracks().forEach(function(e){n._senders.push(t(n,e))})};var o=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;t._senders=t._senders||[],o.apply(t,[e]),e.getTracks().forEach(function(e){var n=t._senders.find(function(t){return t.track===e});n&&t._senders.splice(t._senders.indexOf(n),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var s=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=s.apply(e,[]);return t.forEach(function(t){t._pc=e}),t},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}},shimSenderReceiverGetStats:function(e){if("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver){if(!("getStats"in e.RTCRtpSender.prototype)){var n=e.RTCPeerConnection.prototype.getSenders;n&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=n.apply(e,[]);return t.forEach(function(t){t._pc=e}),t});var i=e.RTCPeerConnection.prototype.addTrack;i&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=i.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){var e=this;return this._pc.getStats().then(function(t){return s(t,e.track,!0)})}}if(!("getStats"in e.RTCRtpReceiver.prototype)){var o=e.RTCPeerConnection.prototype.getReceivers;o&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,t=o.apply(e,[]);return t.forEach(function(t){t._pc=e}),t}),r.wrapPeerConnectionEvent(e,"track",function(e){return e.receiver._pc=e.srcElement,e}),e.RTCRtpReceiver.prototype.getStats=function(){var e=this;return this._pc.getStats().then(function(t){return s(t,e.track,!1)})}}if("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype){var a=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var n=this;if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){var r,i,o,s=arguments[0];return(n.getSenders().forEach(function(e){e.track===s&&(r?o=!0:r=e)}),n.getReceivers().forEach(function(e){return e.track===s&&(i?o=!0:i=e),e.track===s}),o||r&&i)?t.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):r?r.getStats():i?i.getStats():t.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return a.apply(n,arguments)}}}},shimSourceObject:function(e){var t=e&&e.URL;"object"!=typeof e||!e.HTMLMediaElement||"srcObject"in e.HTMLMediaElement.prototype||Object.defineProperty(e.HTMLMediaElement.prototype,"srcObject",{get:function(){return this._srcObject},set:function(e){var n=this;if(this._srcObject=e,this.src&&t.revokeObjectURL(this.src),!e){this.src="";return}this.src=t.createObjectURL(e),e.addEventListener("addtrack",function(){n.src&&t.revokeObjectURL(n.src),n.src=t.createObjectURL(e)}),e.addEventListener("removetrack",function(){n.src&&t.revokeObjectURL(n.src),n.src=t.createObjectURL(e)})}})},shimAddTrackRemoveTrackWithNative:function(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(t){return e._shimmedLocalStreams[t][0]})};var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};var n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{}
32,e.getTracks().forEach(function(e){if(t.getSenders().find(function(t){return t.track===e}))throw new DOMException("Track already exists.","InvalidAccessError")});var r=t.getSenders();n.apply(this,arguments);var i=t.getSenders().filter(function(e){return -1===r.indexOf(e)});this._shimmedLocalStreams[e.id]=[e].concat(i)};var r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};var i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(function(n){var r=t._shimmedLocalStreams[n].indexOf(e);-1!==r&&t._shimmedLocalStreams[n].splice(r,1),1===t._shimmedLocalStreams[n].length&&delete t._shimmedLocalStreams[n]}),i.apply(this,arguments)}},shimAddTrackRemoveTrack:function(e){if(e.RTCPeerConnection){var n=r.detectBrowser(e);if(e.RTCPeerConnection.prototype.addTrack&&n.version>=65)return this.shimAddTrackRemoveTrackWithNative(e);var i=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this,t=i.apply(this);return e._reverseStreams=e._reverseStreams||{},t.map(function(t){return e._reverseStreams[t.id]})};var o=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var n=this;if(n._streams=n._streams||{},n._reverseStreams=n._reverseStreams||{},t.getTracks().forEach(function(e){if(n.getSenders().find(function(t){return t.track===e}))throw new DOMException("Track already exists.","InvalidAccessError")}),!n._reverseStreams[t.id]){var r=new e.MediaStream(t.getTracks());n._streams[t.id]=r,n._reverseStreams[r.id]=t,t=r}o.apply(n,[t])};var s=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;t._streams=t._streams||{},t._reverseStreams=t._reverseStreams||{},s.apply(t,[t._streams[e.id]||e]),delete t._reverseStreams[t._streams[e.id]?t._streams[e.id].id:e.id],delete t._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(n,r){var i=this;if("closed"===i.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var o=[].slice.call(arguments,1);if(1!==o.length||!o[0].getTracks().find(function(e){return e===n}))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");if(i.getSenders().find(function(e){return e.track===n}))throw new DOMException("Track already exists.","InvalidAccessError");i._streams=i._streams||{},i._reverseStreams=i._reverseStreams||{};var s=i._streams[r.id];if(s)s.addTrack(n),t.resolve().then(function(){i.dispatchEvent(new Event("negotiationneeded"))});else{var a=new e.MediaStream([n]);i._streams[r.id]=a,i._reverseStreams[a.id]=r,i.addStream(a)}return i.getSenders().find(function(e){return e.track===n})},["createOffer","createAnswer"].forEach(function(t){var n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=function(){var e=this,t=arguments,r=arguments.length&&"function"==typeof arguments[0];return r?n.apply(e,[function(n){var r=u(e,n);t[0].apply(null,[r])},function(e){t[1]&&t[1].apply(null,e)},arguments[2]]):n.apply(e,arguments).then(function(t){return u(e,t)})}});var a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){var e=this;return arguments.length&&arguments[0].type&&(arguments[0]=d(e,arguments[0])),a.apply(e,arguments)};var c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=this,t=c.get.apply(this);return""===t.type?t:u(e,t)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){var t,n=this;if("closed"===n.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");
32if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(e._pc!==n)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");n._streams=n._streams||{},Object.keys(n._streams).forEach(function(r){n._streams[r].getTracks().find(function(t){return e.track===t})&&(t=n._streams[r])}),t&&(1===t.getTracks().length?n.removeStream(n._reverseStreams[t.id]):t.removeTrack(e.track),n.dispatchEvent(new Event("negotiationneeded")))}}function u(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(function(t){var r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}function d(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(function(t){var r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}},shimPeerConnection:function(e){var n=r.detectBrowser(e);if(!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=function(t,n){return i("PeerConnection"),t&&t.iceTransportPolicy&&(t.iceTransports=t.iceTransportPolicy),new e.webkitRTCPeerConnection(t,n)},e.RTCPeerConnection.prototype=e.webkitRTCPeerConnection.prototype,e.webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return e.webkitRTCPeerConnection.generateCertificate}})),e.RTCPeerConnection){var o=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(e,n,r){var i=this,s=arguments;if(arguments.length>0&&"function"==typeof e)return o.apply(this,arguments);if(0===o.length&&(0==arguments.length||"function"!=typeof arguments[0]))return o.apply(this,[]);var a=function(e){var t={};return e.result().forEach(function(e){var n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach(function(t){n[t]=e.stat(t)}),t[n.id]=n}),t},c=function(e){return new Map(Object.keys(e).map(function(t){return[t,e[t]]}))};if(arguments.length>=2){var u=function(e){s[1](c(a(e)))};return o.apply(this,[u,arguments[0]])}return new t(function(e,t){o.apply(i,[function(t){e(c(a(t)))},t])}).then(n,r)},n.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(n){var r=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=function(){var e=arguments,n=this,i=new t(function(t,i){r.apply(n,[e[0],t,i])});return e.length<2?i:i.then(function(){e[1].apply(null,[])},function(t){e.length>=3&&e[2].apply(null,[t])})}}),n.version<52&&["createOffer","createAnswer"].forEach(function(n){var r=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=function(){var e=this;if(arguments.length<1||1==arguments.length&&"object"==typeof arguments[0]){var n=1==arguments.length?arguments[0]:void 0;return new t(function(t,i){r.apply(e,[t,i,n])})}return r.apply(this,arguments)}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){var n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}});var s=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?s.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),t.resolve())}}},fixNegotiationNeeded:function(e){r.wrapPeerConnectionEvent(e,"negotiationneeded",function(e){if("stable"===e.target.signalingState)return e})},shimGetDisplayMedia:function(e,t){if(e.navigator&&e.navigator.mediaDevices&&!("getDisplayMedia"in e.navigator.mediaDevices)){if("function"!=typeof t)return void console.error("shimGetDisplayMedia: getSourceId argument is not a function");e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then(function(t){var r=n.video&&n.video.width,i=n.video&&n.video.height,o=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:o||3}},r&&(n.video.mandatory.maxWidth=r),i&&(n.video.mandatory.maxHeight=i),e.navigator.mediaDevices.getUserMedia(n)})},e.navigator.getDisplayMedia=function(t){return r.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia"),e.navigator.mediaDevices.getDisplayMedia(t)}}}}}).call(this,n(0))},function(e,t,n){"use strict";(function(t){var r=n(28),i=r.log;e.exports=function(e){var n=r.detectBrowser(e),o=e&&e.navigator,s=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];var o={};
32"number"==typeof r.ideal?(o[i("min",n)]=r.ideal,t.optional.push(o),(o={})[i("max",n)]=r.ideal):o[i("",n)]=r.ideal,t.optional.push(o)}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(function(e){void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},a=function(e,t){if(n.version>=61)return t(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){var r=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};r((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),r(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=s(e.audio)}if(e&&"object"==typeof e.video){var a,c=e.video.facingMode;c=c&&("object"==typeof c?c:{ideal:c});var u=n.version<66;if(c&&("user"===c.exact||"environment"===c.exact||"user"===c.ideal||"environment"===c.ideal)&&!(o.mediaDevices.getSupportedConstraints&&o.mediaDevices.getSupportedConstraints().facingMode&&!u)&&(delete e.video.facingMode,"environment"===c.exact||"environment"===c.ideal?a=["back","rear"]:("user"===c.exact||"user"===c.ideal)&&(a=["front"]),a))return o.mediaDevices.enumerateDevices().then(function(n){var r=(n=n.filter(function(e){return"videoinput"===e.kind})).find(function(e){return a.some(function(t){return -1!==e.label.toLowerCase().indexOf(t)})});return!r&&n.length&&-1!==a.indexOf("back")&&(r=n[n.length-1]),r&&(e.video.deviceId=c.exact?{exact:r.deviceId}:{ideal:r.deviceId}),e.video=s(e.video),i("chrome: "+JSON.stringify(e)),t(e)});e.video=s(e.video)}return i("chrome: "+JSON.stringify(e)),t(e)},c=function(e){return n.version>=64?e:{name:({PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"})[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},u=function(e,t,n){a(e,function(e){o.webkitGetUserMedia(e,t,function(e){n&&n(c(e))})})};o.getUserMedia=u;var d=function(e){return new t(function(t,n){o.getUserMedia(e,t,n)})};if(o.mediaDevices||(o.mediaDevices={getUserMedia:d,enumerateDevices:function(){return new t(function(t){var n={audio:"audioinput",video:"videoinput"};return e.MediaStreamTrack.getSources(function(e){t(e.map(function(e){return{label:e.label,kind:n[e.kind],deviceId:e.id,groupId:""}}))})})},getSupportedConstraints:function(){return{deviceId:!0,echoCancellation:!0,facingMode:!0,frameRate:!0,height:!0,width:!0}}}),o.mediaDevices.getUserMedia){var l=o.mediaDevices.getUserMedia.bind(o.mediaDevices);o.mediaDevices.getUserMedia=function(e){return a(e,function(e){return l(e).then(function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach(function(e){e.stop()}),new DOMException("","NotFoundError");return t},function(e){return t.reject(c(e))})})}}else o.mediaDevices.getUserMedia=function(e){return d(e)};void 0===o.mediaDevices.addEventListener&&(o.mediaDevices.addEventListener=function(){i("Dummy mediaDevices.addEventListener called.")}),void 0===o.mediaDevices.removeEventListener&&(o.mediaDevices.removeEventListener=function(){i("Dummy mediaDevices.removeEventListener called.")})}}).call(this,n(0))},function(e,t,n){"use strict";var r=n(28),i=n(553),o=n(554);e.exports={shimGetUserMedia:n(555),shimPeerConnection:function(e){var t=r.detectBrowser(e);if(e.RTCIceGatherer&&(e.RTCIceCandidate||(e.RTCIceCandidate=function(e){return e}),e.RTCSessionDescription||(e.RTCSessionDescription=function(e){return e}),t.version<15025)){var n=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set:function(e){n.set.call(this,e);var t=new Event("enabled");t.enabled=e,this.dispatchEvent(t)}})}
32!e.RTCRtpSender||"dtmf"in e.RTCRtpSender.prototype||Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new e.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),e.RTCDtmfSender&&!e.RTCDTMFSender&&(e.RTCDTMFSender=e.RTCDtmfSender);var s=o(e,t.version);e.RTCPeerConnection=function(e){return e&&e.iceServers&&(e.iceServers=i(e.iceServers)),new s(e)},e.RTCPeerConnection.prototype=s.prototype},shimReplaceTrack:function(e){!e.RTCRtpSender||"replaceTrack"in e.RTCRtpSender.prototype||(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)},shimGetDisplayMedia:function(e,t){if("getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&!("getDisplayMedia"in e.navigator.mediaDevices)){var n=e.navigator.getDisplayMedia;e.navigator.mediaDevices.getDisplayMedia=function(t){return n.call(e.navigator,t)},e.navigator.getDisplayMedia=function(t){return r.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia"),n.call(e.navigator,t)}}}}},function(e,t,n){"use strict";var r=n(28);e.exports=function(e,t){var n=!1;return(e=JSON.parse(JSON.stringify(e))).filter(function(e){if(e&&(e.urls||e.url)){var i=e.urls||e.url;e.url&&!e.urls&&r.deprecated("RTCIceServer.url","RTCIceServer.urls");var o="string"==typeof i;return o&&(i=[i]),i=i.filter(function(e){return 0!==e.indexOf("turn:")||-1===e.indexOf("transport=udp")||-1!==e.indexOf("turn:[")||n?0===e.indexOf("stun:")&&t>=14393&&-1===e.indexOf("?transport=udp"):(n=!0,!0)}),delete e.url,e.urls=o?i[0]:i,!!i.length}})}},function(e,t,n){"use strict";(function(t){var r=n(252);function i(e){return({inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"})[e.type]||e.type}function o(e,t,n,i,o){var s=r.writeRtpDescription(e.kind,t);if(s+=r.writeIceParameters(e.iceGatherer.getLocalParameters()),s+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":o||"active"),s+="a=mid:"+e.mid+"\r\n",e.rtpSender&&e.rtpReceiver?s+="a=sendrecv\r\n":e.rtpSender?s+="a=sendonly\r\n":e.rtpReceiver?s+="a=recvonly\r\n":s+="a=inactive\r\n",e.rtpSender){var a=e.rtpSender._initialTrackId||e.rtpSender.track.id;e.rtpSender._initialTrackId=a;var c="msid:"+(i?i.id:"-")+" "+a+"\r\n";s+="a="+c,s+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+c,e.sendEncodingParameters[0].rtx&&(s+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+c,s+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return s+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(s+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),s}function s(e,t){var n=!1;return(e=JSON.parse(JSON.stringify(e))).filter(function(e){if(e&&(e.urls||e.url)){var r=e.urls||e.url;e.url&&!e.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var i="string"==typeof r;return i&&(r=[r]),r=r.filter(function(e){return 0!==e.indexOf("turn:")||-1===e.indexOf("transport=udp")||-1!==e.indexOf("turn:[")||n?0===e.indexOf("stun:")&&t>=14393&&-1===e.indexOf("?transport=udp"):(n=!0,!0)}),delete e.url,e.urls=i?r[0]:r,!!r.length}})}function a(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]},r=function(e,t){e=parseInt(e,10);for(var n=0;n<t.length;n++)if(t[n].payloadType===e||t[n].preferredPayloadType===e)return t[n]},i=function(e,t,n,i){var o=r(e.parameters.apt,n),s=r(t.parameters.apt,i);return o&&s&&o.name.toLowerCase()===s.name.toLowerCase()};return e.codecs.forEach(function(r){for(var o=0;o<t.codecs.length;o++){var s=t.codecs[o];if(r.name.toLowerCase()===s.name.toLowerCase()&&r.clockRate===s.clockRate){if("rtx"===r.name.toLowerCase()&&r.parameters&&s.parameters.apt&&!i(r,s,e.codecs,t.codecs))continue;(s=JSON.parse(JSON.stringify(s))).numChannels=Math.min(r.numChannels,s.numChannels),n.codecs.push(s),s.rtcpFeedback=s.rtcpFeedback.filter(function(e){for(var t=0;t<r.rtcpFeedback.length;t++)if(r.rtcpFeedback[t].type===e.type&&r.rtcpFeedback[t].parameter===e.parameter)return!0;return!1});break}}}),e.headerExtensions.forEach(function(e){for(var r=0;r<t.headerExtensions.length;r++){var i=t.headerExtensions[r];if(e.uri===i.uri){n.headerExtensions.push(i);break}}}),n}
32function c(e,t,n){return -1!==({offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}})[t][e].indexOf(n)}function u(e,t){var n=e.getRemoteCandidates().find(function(e){return t.foundation===e.foundation&&t.ip===e.ip&&t.port===e.port&&t.priority===e.priority&&t.protocol===e.protocol&&t.type===e.type});return n||e.addRemoteCandidate(t),!n}function d(e,t){var n=Error(t);return n.name=e,n.code=({NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:void 0,OperationError:void 0})[e],n}e.exports=function(e,n){function l(t,n){n.addTrack(t),n.dispatchEvent(new e.MediaStreamTrackEvent("addtrack",{track:t}))}function p(t,n){n.removeTrack(t),n.dispatchEvent(new e.MediaStreamTrackEvent("removetrack",{track:t}))}function f(t,n,r,i){var o=new Event("track");o.track=n,o.receiver=r,o.transceiver={receiver:r},o.streams=i,e.setTimeout(function(){t._dispatchEvent("track",o)})}var h=function(t){var i=this,o=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){i[e]=o[e].bind(o)}),this.canTrickleIceCandidates=null,this.needNegotiation=!1,this.localStreams=[],this.remoteStreams=[],this._localDescription=null,this._remoteDescription=null,this.signalingState="stable",this.iceConnectionState="new",this.connectionState="new",this.iceGatheringState="new",t=JSON.parse(JSON.stringify(t||{})),this.usingBundle="max-bundle"===t.bundlePolicy,"negotiate"===t.rtcpMuxPolicy)throw d("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(t.rtcpMuxPolicy||(t.rtcpMuxPolicy="require"),t.iceTransportPolicy){case"all":case"relay":break;default:t.iceTransportPolicy="all"}switch(t.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:t.bundlePolicy="balanced"}if(t.iceServers=s(t.iceServers||[],n),this._iceGatherers=[],t.iceCandidatePoolSize)for(var a=t.iceCandidatePoolSize;a>0;a--)this._iceGatherers.push(new e.RTCIceGatherer({iceServers:t.iceServers,gatherPolicy:t.iceTransportPolicy}));else t.iceCandidatePoolSize=0;this._config=t,this.transceivers=[],this._sdpSessionId=r.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(h.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(h.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),h.prototype.onicecandidate=null,h.prototype.onaddstream=null,h.prototype.ontrack=null,h.prototype.onremovestream=null,h.prototype.onsignalingstatechange=null,h.prototype.oniceconnectionstatechange=null,h.prototype.onconnectionstatechange=null,h.prototype.onicegatheringstatechange=null,h.prototype.onnegotiationneeded=null,h.prototype.ondatachannel=null,h.prototype._dispatchEvent=function(e,t){this._isClosed||(this.dispatchEvent(t),"function"==typeof this["on"+e]&&this["on"+e](t))},h.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",e)},h.prototype.getConfiguration=function(){return this._config},h.prototype.getLocalStreams=function(){return this.localStreams},h.prototype.getRemoteStreams=function(){return this.remoteStreams},h.prototype._createTransceiver=function(e,t){var n=this.transceivers.length>0,r={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:e,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};
32if(this.usingBundle&&n)r.iceTransport=this.transceivers[0].iceTransport,r.dtlsTransport=this.transceivers[0].dtlsTransport;else{var i=this._createIceAndDtlsTransports();r.iceTransport=i.iceTransport,r.dtlsTransport=i.dtlsTransport}return t||this.transceivers.push(r),r},h.prototype.addTrack=function(t,n){if(this._isClosed)throw d("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");if(this.transceivers.find(function(e){return e.track===t}))throw d("InvalidAccessError","Track already exists.");for(var r,i=0;i<this.transceivers.length;i++)this.transceivers[i].track||this.transceivers[i].kind!==t.kind||(r=this.transceivers[i]);return r||(r=this._createTransceiver(t.kind)),this._maybeFireNegotiationNeeded(),-1===this.localStreams.indexOf(n)&&this.localStreams.push(n),r.track=t,r.stream=n,r.rtpSender=new e.RTCRtpSender(t,r.dtlsTransport),r.rtpSender},h.prototype.addStream=function(e){var t=this;if(n>=15025)e.getTracks().forEach(function(n){t.addTrack(n,e)});else{var r=e.clone();e.getTracks().forEach(function(e,t){var n=r.getTracks()[t];e.addEventListener("enabled",function(e){n.enabled=e.enabled})}),r.getTracks().forEach(function(e){t.addTrack(e,r)})}},h.prototype.removeTrack=function(t){if(this._isClosed)throw d("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(t instanceof e.RTCRtpSender))throw TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var n=this.transceivers.find(function(e){return e.rtpSender===t});if(!n)throw d("InvalidAccessError","Sender was not created by this connection.");var r=n.stream;n.rtpSender.stop(),n.rtpSender=null,n.track=null,n.stream=null,-1===this.transceivers.map(function(e){return e.stream}).indexOf(r)&&this.localStreams.indexOf(r)>-1&&this.localStreams.splice(this.localStreams.indexOf(r),1),this._maybeFireNegotiationNeeded()},h.prototype.removeStream=function(e){var t=this;e.getTracks().forEach(function(e){var n=t.getSenders().find(function(t){return t.track===e});n&&t.removeTrack(n)})},h.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},h.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},h.prototype._createIceGatherer=function(t,n){var r=this;if(n&&t>
320)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var i=new e.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(i,"state",{value:"new",writable:!0}),this.transceivers[t].bufferedCandidateEvents=[],this.transceivers[t].bufferCandidates=function(e){i.state=e.candidate&&0!==Object.keys(e.candidate).length?"gathering":"completed",null!==r.transceivers[t].bufferedCandidateEvents&&r.transceivers[t].bufferedCandidateEvents.push(e)},i.addEventListener("localcandidate",this.transceivers[t].bufferCandidates),i},h.prototype._gather=function(t,n){var i=this,o=this.transceivers[n].iceGatherer;if(!o.onlocalcandidate){var s=this.transceivers[n].bufferedCandidateEvents;this.transceivers[n].bufferedCandidateEvents=null,o.removeEventListener("localcandidate",this.transceivers[n].bufferCandidates),o.onlocalcandidate=function(e){if(!i.usingBundle||!(n>0)){var s=new Event("icecandidate");s.candidate={sdpMid:t,sdpMLineIndex:n};var a=e.candidate,c=!a||0===Object.keys(a).length;if(c)("new"===o.state||"gathering"===o.state)&&(o.state="completed");else{"new"===o.state&&(o.state="gathering"),a.component=1,a.ufrag=o.getLocalParameters().usernameFragment;var u=r.writeCandidate(a);s.candidate=Object.assign(s.candidate,r.parseCandidate(u)),s.candidate.candidate=u,s.candidate.toJSON=function(){return{candidate:s.candidate.candidate,sdpMid:s.candidate.sdpMid,sdpMLineIndex:s.candidate.sdpMLineIndex,usernameFragment:s.candidate.usernameFragment}}}var d=r.getMediaSections(i._localDescription.sdp);c?d[s.candidate.sdpMLineIndex]+="a=end-of-candidates\r\n":d[s.candidate.sdpMLineIndex]+="a="+s.candidate.candidate+"\r\n",i._localDescription.sdp=r.getDescription(i._localDescription.sdp)+d.join("");var l=i.transceivers.every(function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state});"gathering"!==i.iceGatheringState&&(i.iceGatheringState="gathering",i._emitGatheringStateChange()),c||i._dispatchEvent("icecandidate",s),l&&(i._dispatchEvent("icecandidate",new Event("icecandidate")),i.iceGatheringState="complete",i._emitGatheringStateChange())}},e.setTimeout(function(){s.forEach(function(e){o.onlocalcandidate(e)})},0)}},h.prototype._createIceAndDtlsTransports=function(){var t=this,n=new e.RTCIceTransport(null);n.onicestatechange=function(){t._updateIceConnectionState(),t._updateConnectionState()};var r=new e.RTCDtlsTransport(n);return r.ondtlsstatechange=function(){t._updateConnectionState()},r.onerror=function(){Object.defineProperty(r,"state",{value:"failed",writable:!0}),t._updateConnectionState()},{iceTransport:n,dtlsTransport:r}},h.prototype._disposeIceAndDtlsTransports=function(e){var t=this.transceivers[e].iceGatherer;t&&(delete t.onlocalcandidate,delete this.transceivers[e].iceGatherer);var n=this.transceivers[e].iceTransport;n&&(delete n.onicestatechange,delete this.transceivers[e].iceTransport);var r=this.transceivers[e].dtlsTransport;r&&(delete r.ondtlsstatechange,delete r.onerror,delete this.transceivers[e].dtlsTransport)},h.prototype._transceive=function(e,t,i){var o=a(e.localCapabilities,e.remoteCapabilities);t&&e.rtpSender&&(o.encodings=e.sendEncodingParameters,o.rtcp={cname:r.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(o.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(o)),i&&e.rtpReceiver&&o.codecs.length>0&&("video"===e.kind&&e.recvEncodingParameters&&n<15019&&e.recvEncodingParameters.forEach(function(e){delete e.rtx}),e.recvEncodingParameters.length?o.encodings=e.recvEncodingParameters:o.encodings=[{}],o.rtcp={compound:e.rtcpParameters.compound},e.rtcpParameters.cname&&(o.rtcp.cname=e.rtcpParameters.cname),e.sendEncodingParameters.length&&(o.rtcp.ssrc=e.sendEncodingParameters[0].ssrc),e.rtpReceiver.receive(o))},h.prototype.setLocalDescription=function(e){var n,i,o=this;if(-1===["offer","answer"].indexOf(e.type))return t.reject(d("TypeError",'Unsupported type "'+e.type+'"'));if(!c("setLocalDescription",e.type,o.signalingState)||o._isClosed)return t.reject(d("InvalidStateError","Can not set local "+e.type+" in state "+o.signalingState));if("offer"===e.type)i=(n=r.splitSections(e.sdp)).shift(),n.forEac
32h(function(e,t){var n=r.parseRtpParameters(e);o.transceivers[t].localCapabilities=n}),o.transceivers.forEach(function(e,t){o._gather(e.mid,t)});else if("answer"===e.type){i=(n=r.splitSections(o._remoteDescription.sdp)).shift();var s=r.matchPrefix(i,"a=ice-lite").length>0;n.forEach(function(e,t){var n=o.transceivers[t],c=n.iceGatherer,u=n.iceTransport,d=n.dtlsTransport,l=n.localCapabilities,p=n.remoteCapabilities;if(!(r.isRejected(e)&&0===r.matchPrefix(e,"a=bundle-only").length)&&!n.rejected){var f=r.getIceParameters(e,i),h=r.getDtlsParameters(e,i);s&&(h.role="server"),o.usingBundle&&0!==t||(o._gather(n.mid,t),"new"===u.state&&u.start(c,f,s?"controlling":"controlled"),"new"===d.state&&d.start(h));var m=a(l,p);o._transceive(n,m.codecs.length>0,!1)}})}return o._localDescription={type:e.type,sdp:e.sdp},"offer"===e.type?o._updateSignalingState("have-local-offer"):o._updateSignalingState("stable"),t.resolve()},h.prototype.setRemoteDescription=function(i){var o=this;if(-1===["offer","answer"].indexOf(i.type))return t.reject(d("TypeError",'Unsupported type "'+i.type+'"'));if(!c("setRemoteDescription",i.type,o.signalingState)||o._isClosed)return t.reject(d("InvalidStateError","Can not set remote "+i.type+" in state "+o.signalingState));var s={};o.remoteStreams.forEach(function(e){s[e.id]=e});var h=[],m=r.splitSections(i.sdp),b=m.shift(),g=r.matchPrefix(b,"a=ice-lite").length>0,v=r.matchPrefix(b,"a=group:BUNDLE ").length>0;o.usingBundle=v;var y=r.matchPrefix(b,"a=ice-options:")[0];return y?o.canTrickleIceCandidates=y.substr(14).split(" ").indexOf("trickle")>=0:o.canTrickleIceCandidates=!1,m.forEach(function(t,c){var d=r.splitLines(t),f=r.getKind(t),m=r.isRejected(t)&&0===r.matchPrefix(t,"a=bundle-only").length,y=d[0].substr(2).split(" ")[2],S=r.getDirection(t,b),E=r.parseMsid(t),T=r.getMid(t)||r.generateIdentifier();if(m||"application"===f&&("DTLS/SCTP"===y||"UDP/DTLS/SCTP"===y)){o.transceivers[c]={mid:T,kind:f,protocol:y,rejected:!0};return}!m&&o.transceivers[c]&&o.transceivers[c].rejected&&(o.transceivers[c]=o._createTransceiver(f,!0));var C=r.parseRtpParameters(t);m||(V=r.getIceParameters(t,b),(W=r.getDtlsParameters(t,b)).role="client"),Z=r.parseRtpEncodingParameters(t);var R=r.parseRtcpParameters(t),I=r.matchPrefix(t,"a=end-of-candidates",b).length>0,_=r.matchPrefix(t,"a=candidate:").map(function(e){return r.parseCandidate(e)}).filter(function(e){return 1===e.component});if(("offer"===i.type||"answer"===i.type)&&!m&&v&&c>0&&o.transceivers[c]&&(o._disposeIceAndDtlsTransports(c),o.transceivers[c].iceGatherer=o.transceivers[
320].iceGatherer,o.transceivers[c].iceTransport=o.transceivers[0].iceTransport,o.transceivers[c].dtlsTransport=o.transceivers[0].dtlsTransport,o.transceivers[c].rtpSender&&o.transceivers[c].rtpSender.setTransport(o.transceivers[0].dtlsTransport),o.transceivers[c].rtpReceiver&&o.transceivers[c].rtpReceiver.setTransport(o.transceivers[0].dtlsTransport)),"offer"!==i.type||m)"answer"!==i.type||m||(x=(w=o.transceivers[c]).iceGatherer,O=w.iceTransport,N=w.dtlsTransport,k=w.rtpReceiver,P=w.sendEncodingParameters,A=w.localCapabilities,o.transceivers[c].recvEncodingParameters=Z,o.transceivers[c].remoteCapabilities=C,o.transceivers[c].rtcpParameters=R,_.length&&"new"===O.state&&((g||I)&&(!v||0===c)?O.setRemoteCandidates(_):_.forEach(function(e){u(w.iceTransport,e)})),v&&0!==c||("new"===O.state&&O.start(x,V,"controlling"),"new"===N.state&&N.start(W)),!a(w.localCapabilities,w.remoteCapabilities).codecs.filter(function(e){return"rtx"===e.name.toLowerCase()}).length&&w.sendEncodingParameters[0].rtx&&delete w.sendEncodingParameters[0].rtx,o._transceive(w,"sendrecv"===S||"recvonly"===S,"sendrecv"===S||"sendonly"===S),k&&("sendrecv"===S||"sendonly"===S)?(L=k.track,E?(s[E.stream]||(s[E.stream]=new e.MediaStream),l(L,s[E.stream]),h.push([L,k,s[E.stream]])):(s.default||(s.default=new e.MediaStream),l(L,s.default),h.push([L,k,s.default]))):delete w.rtpReceiver);else{(w=o.transceivers[c]||o._createTransceiver(f)).mid=T,w.iceGatherer||(w.iceGatherer=o._createIceGatherer(c,v)),_.length&&"new"===w.iceTransport.state&&(I&&(!v||0===c)?w.iceTransport.setRemoteCandidates(_):_.forEach(function(e){u(w.iceTransport,e)})),A=e.RTCRtpReceiver.getCapabilities(f),n<15019&&(A.codecs=A.codecs.filter(function(e){return"rtx"!==e.name}));var w,x,O,N,k,Z,A,L,V,W,G,P=w.sendEncodingParameters||[{ssrc:(2*c+2)*1001}],M=!1;"sendrecv"===S||"sendonly"===S?(M=!w.rtpReceiver,k=w.rtpReceiver||new e.RTCRtpReceiver(w.dtlsTransport,f),M&&(L=k.track,E&&"-"===E.stream||(E?(s[E.stream]||(s[E.stream]=new e.MediaStream,Object.defineProperty(s[E.stream],"id",{get:function(){return E.stream}})),Object.defineProperty(L,"id",{get:function(){return E.track}}),G=s[E.stream]):(s.default||(s.default=new e.MediaStream),G=s.default)),G&&(l(L,G),w.associatedRemoteMediaStreams.push(G)),h.push([L,k,G]))):w.rtpReceiver&&w.rtpReceiver.track&&(w.associatedRemoteMediaStreams.forEach(function(e){var t=e.getTracks().find(function(e){return e.id===w.rtpReceiver.track.id});t&&p(t,e)}),w.associatedRemoteMediaStreams=[]),w.localCapabilities=A,w.remoteCapabilities=C,w.rtpReceiver=k,w.rtcpParameters=R,w.sendEncodingParameters=P,w.recvEncodingParameters=Z,o._transceive(o.transceivers[c],!1,M)}}),void 0===o._dtlsRole&&(o._dtlsRole="offer"===i.type?"active":"passive"),o._remoteDescription={type:i.type,sdp:i.sdp},"offer"===i.type?o._updateSignalingState("have-remote-offer"):o._updateSignalingState("stable"),Object.keys(s).forEach(function(t){var n=s[t];if(n.getTracks().length){if(-1===o.remoteStreams.indexOf(n)){o.remoteStreams.push(n);var r=new Event("addstream");r.stream=n,e.setTimeout(function(){o._dispatchEvent("addstream",r)})}h.forEach(function(e){var t=e[0],r=e[1];n.id===e[2].id&&f(o,t,r,[n])})}}),h.forEach(function(e){e[2]||f(o,e[0],e[1],[])}),e.setTimeout(function(){o&&o.transceivers&&o.transceivers.forEach(function(e){e.iceTransport&&"new"===e.iceTransport.state&&e.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),e.iceTransport.addRemoteCandidate({}))})},4e3),t.resolve()},h.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},h.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",t)},h.prototype._maybeFireNegotiationNeeded=function(){var t=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,e.setTimeout(function(){if(t.needNegotiation){t.needNegotiation=!1;var e=new Event("negotiationneeded");t._dispatchEvent("negotiationneeded",e)}},0))},h.prototype._updateIceConnectionState=function(){var e,t={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};
32if(this.transceivers.forEach(function(e){e.iceTransport&&!e.rejected&&t[e.iceTransport.state]++}),e="new",t.failed>0?e="failed":t.checking>0?e="checking":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0?e="connected":t.completed>0&&(e="completed"),e!==this.iceConnectionState){this.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",n)}},h.prototype._updateConnectionState=function(){var e,t={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(e){e.iceTransport&&e.dtlsTransport&&!e.rejected&&(t[e.iceTransport.state]++,t[e.dtlsTransport.state]++)}),t.connected+=t.completed,e="new",t.failed>0?e="failed":t.connecting>0?e="connecting":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0&&(e="connected"),e!==this.connectionState){this.connectionState=e;var n=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",n)}},h.prototype.createOffer=function(){var i=this;if(i._isClosed)return t.reject(d("InvalidStateError","Can not call createOffer after close"));var s=i.transceivers.filter(function(e){return"audio"===e.kind}).length,a=i.transceivers.filter(function(e){return"video"===e.kind}).length,c=arguments[0];if(c){if(c.mandatory||c.optional)throw TypeError("Legacy mandatory/optional constraints not supported.");void 0!==c.offerToReceiveAudio&&(s=!0===c.offerToReceiveAudio?1:!1===c.offerToReceiveAudio?0:c.offerToReceiveAudio),void 0!==c.offerToReceiveVideo&&(a=!0===c.offerToReceiveVideo?1:!1===c.offerToReceiveVideo?0:c.offerToReceiveVideo)}for(i.transceivers.forEach(function(e){"audio"===e.kind?--s<0&&(e.wantReceive=!1):"video"===e.kind&&--a<0&&(e.wantReceive=!1)});s>0||a>0;)s>0&&(i._createTransceiver("audio"),s--),a>0&&(i._createTransceiver("video"),a--);var u=r.writeSessionBoilerplate(i._sdpSessionId,i._sdpSessionVersion++);i.transceivers.forEach(function(t,o){var s=t.track,a=t.kind,c=t.mid||r.generateIdentifier();t.mid=c,t.iceGatherer||(t.iceGatherer=i._createIceGatherer(o,i.usingBundle));var u=e.RTCRtpSender.getCapabilities(a);n<15019&&(u.codecs=u.codecs.filter(function(e){return"rtx"!==e.name})),u.codecs.forEach(function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1"),t.remoteCapabilities&&t.remoteCapabilities.codecs&&t.remoteCapabilities.codecs.forEach(function(t){e.name.toLowerCase()===t.name.toLowerCase()&&e.clockRate===t.clockRate&&(e.preferredPayloadType=t.payloadType)})}),u.headerExtensions.forEach(function(e){(t.remoteCapabilities&&t.remoteCapabilities.headerExtensions||[]).forEach(function(t){e.uri===t.uri&&(e.id=t.id)})});var d=t.sendEncodingParameters||[{ssrc:(2*o+1)*1001}];s&&n>=15019&&"video"===a&&!d[0].rtx&&(d[0].rtx={ssrc:d[0].ssrc+1}),t.wantReceive&&(t.rtpReceiver=new e.RTCRtpReceiver(t.dtlsTransport,a)),t.localCapabilities=u,t.sendEncodingParameters=d}),"max-compat"!==i._config.bundlePolicy&&(u+="a=group:BUNDLE "+i.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),u+="a=ice-options:trickle\r\n",i.transceivers.forEach(function(e,t){u+=o(e,e.localCapabilities,"offer",e.stream,i._dtlsRole),u+="a=rtcp-rsize\r\n",e.iceGatherer&&"new"!==i.iceGatheringState&&(0===t||!i.usingBundle)&&(e.iceGatherer.getLocalCandidates().forEac
32h(function(e){e.component=1,u+="a="+r.writeCandidate(e)+"\r\n"}),"completed"===e.iceGatherer.state&&(u+="a=end-of-candidates\r\n"))});var l=new e.RTCSessionDescription({type:"offer",sdp:u});return t.resolve(l)},h.prototype.createAnswer=function(){var i=this;if(i._isClosed)return t.reject(d("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==i.signalingState&&"have-local-pranswer"!==i.signalingState)return t.reject(d("InvalidStateError","Can not call createAnswer in signalingState "+i.signalingState));var s=r.writeSessionBoilerplate(i._sdpSessionId,i._sdpSessionVersion++);i.usingBundle&&(s+="a=group:BUNDLE "+i.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),s+="a=ice-options:trickle\r\n";var c=r.getMediaSections(i._remoteDescription.sdp).length;i.transceivers.forEach(function(e,t){if(!(t+1>c)){if(e.rejected){"application"===e.kind?"DTLS/SCTP"===e.protocol?s+="m=application 0 DTLS/SCTP 5000\r\n":s+="m=application 0 "+e.protocol+" webrtc-datachannel\r\n":"audio"===e.kind?s+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===e.kind&&(s+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),s+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+e.mid+"\r\n";return}if(e.stream){var r;"audio"===e.kind?r=e.stream.getAudioTracks()[0]:"video"===e.kind&&(r=e.stream.getVideoTracks()[0]),r&&n>=15019&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1})}var u=a(e.localCapabilities,e.remoteCapabilities),d=u.codecs.filter(function(e){return"rtx"===e.name.toLowerCase()}).length;!d&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,s+=o(e,u,"answer",e.stream,i._dtlsRole),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(s+="a=rtcp-rsize\r\n")}});var u=new e.RTCSessionDescription({type:"answer",sdp:s});return t.resolve(u)},h.prototype.addIceCandidate=function(e){var n,i=this;return e&&!(void 0!==e.sdpMLineIndex||e.sdpMid)?t.reject(TypeError("sdpMLineIndex or sdpMid required")):new t(function(t,o){if(!i._remoteDescription)return o(d("InvalidStateError","Can not add ICE candidate without a remote description"));if(e&&""!==e.candidate){var s=e.sdpMLineIndex;if(e.sdpMid){for(var a=0;a<i.transceivers.length;a++)if(i.transceivers[a].mid===e.sdpMid){s=a;break}}var c=i.transceivers[s];if(!c)return o(d("OperationError","Can not add ICE candidate"));if(c.rejected)return t();var l=Object.keys(e.candidate).length>0?r.parseCandidate(e.candidate):{};if("tcp"===l.protocol&&(0===l.port||9===l.port)||l.component&&1!==l.component)return t();if((0===s||s>
320&&c.iceTransport!==i.transceivers[0].iceTransport)&&!u(c.iceTransport,l))return o(d("OperationError","Can not add ICE candidate"));var p=e.candidate.trim();0===p.indexOf("a=")&&(p=p.substr(2)),n=r.getMediaSections(i._remoteDescription.sdp),n[s]+="a="+(l.type?p:"end-of-candidates")+"\r\n",i._remoteDescription.sdp=r.getDescription(i._remoteDescription.sdp)+n.join("")}else for(var f=0;f<i.transceivers.length&&(i.transceivers[f].rejected||(i.transceivers[f].iceTransport.addRemoteCandidate({}),n=r.getMediaSections(i._remoteDescription.sdp),n[f]+="a=end-of-candidates\r\n",i._remoteDescription.sdp=r.getDescription(i._remoteDescription.sdp)+n.join(""),!i.usingBundle));f++);t()})},h.prototype.getStats=function(n){if(n&&n instanceof e.MediaStreamTrack){var r=null;if(this.transceivers.forEach(function(e){e.rtpSender&&e.rtpSender.track===n?r=e.rtpSender:e.rtpReceiver&&e.rtpReceiver.track===n&&(r=e.rtpReceiver)}),!r)throw d("InvalidAccessError","Invalid selector.");return r.getStats()}var i=[];return this.transceivers.forEach(function(e){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(t){e[t]&&i.push(e[t].getStats())})}),t.all(i).then(function(e){var t=new Map;return e.forEach(function(e){e.forEach(function(e){t.set(e.id,e)})}),t})},["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"].forEach(function(t){var n=e[t];if(n&&n.prototype&&n.prototype.getStats){var r=n.prototype.getStats;n.prototype.getStats=function(){return r.apply(this).then(function(e){var t=new Map;return Object.keys(e).forEach(function(n){e[n].type=i(e[n]),t.set(n,e[n])}),t})}}});var m=["createOffer","createAnswer"];return m.forEach(function(e){var t=h.prototype[e];h.prototype[e]=function(){var e=arguments;return"function"==typeof e[0]||"function"==typeof e[1]?t.apply(this,[arguments[2]]).then(function(t){"function"==typeof e[0]&&e[0].apply(null,[t])},function(t){"function"==typeof e[1]&&e[1].apply(null,[t])}):t.apply(this,arguments)}}),(m=["setLocalDescription","setRemoteDescription","addIceCandidate"]).forEach(function(e){var t=h.prototype[e];h.prototype[e]=function(){var e=arguments;return"function"==typeof e[1]||"function"==typeof e[2]?t.apply(this,arguments).then(function(){"function"==typeof e[1]&&e[1].apply(null)},function(t){"function"==typeof e[2]&&e[2].apply(null,[t])}):t.apply(this,arguments)}}),["getStats"].forEach(function(e){var t=h.prototype[e];h.prototype[e]=function(){var e=arguments;return"function"==typeof e[1]?t.apply(this,arguments).then(function(){"function"==typeof e[1]&&e[1].apply(null)}):t.apply(this,arguments)}}),h}}).call(this,n(0))},function(e,t,n){"use strict";(function(t){e.exports=function(e){var n=e&&e.navigator,r=function(e){return{name:({PermissionDeniedError:"NotAllowedError"})[e.name]||e.name,message:e.message,constraint:e.constraint,toString:function(){return this.name}}},i=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(e){return i(e).catch(function(e){return t.reject(r(e))})}}}).call(this,n(0))},function(e,t,n){"use strict";(function(t){var r=n(28);e.exports={shimGetUserMedia:n(557),shimOnTrack:function(e){"object"!=typeof e||!e.RTCPeerConnection||"ontrack"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=(function(e){e.stream.getTracks().forEach((function(t){var n=new Event("track");n.track=t,n.receiver={track:t},n.transceiver={receiver:n.receiver},n.streams=[e.stream],this.dispatchEvent(n)}).bind(this))}).bind(this))},enumerable:!0,configurable:!0}),"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimSourceObject:function(e){"object"!=typeof e||!e.HTMLMediaElement||"srcObject"in e.HTMLMediaElement.prototype||Ob
32ject.defineProperty(e.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}})},shimPeerConnection:function(e){var n=r.detectBrowser(e);if("object"==typeof e&&(e.RTCPeerConnection||e.mozRTCPeerConnection)){e.RTCPeerConnection||(e.RTCPeerConnection=function(t,r){if(n.version<38&&t&&t.iceServers){for(var i=[],o=0;o<t.iceServers.length;o++){var s=t.iceServers[o];if(s.hasOwnProperty("urls"))for(var a=0;a<s.urls.length;a++){var c={url:s.urls[a]};0===s.urls[a].indexOf("turn")&&(c.username=s.username,c.credential=s.credential),i.push(c)}else i.push(t.iceServers[o])}t.iceServers=i}return new e.mozRTCPeerConnection(t,r)},e.RTCPeerConnection.prototype=e.mozRTCPeerConnection.prototype,e.mozRTCPeerConnection.generateCertificate&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return e.mozRTCPeerConnection.generateCertificate}}),e.RTCSessionDescription=e.mozRTCSessionDescription,e.RTCIceCandidate=e.mozRTCIceCandidate),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){var n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}});var i=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?i.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),t.resolve())};var o=function(e){var t=new Map;return Object.keys(e).forEach(function(n){t.set(n,e[n]),t[n]=e[n]}),t},s={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},a=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(e,t,r){return a.apply(this,[e||null]).then(function(e){if(n.version<48&&(e=o(e)),n.version<53&&!t)try{e.forEach(function(e){e.type=s[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach(function(t,n){e.set(n,Object.assign({},t,{type:s[t.type]||t.type}))})}return e}).then(t,r)}}},shimSenderGetStats:function(e){if("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpSender.prototype))){var n=e.RTCPeerConnection.prototype.getSenders;n&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=n.apply(e,[]);return t.forEach(function(t){t._pc=e}),t});var r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=r.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):t.resolve(new Map)}}},shimReceiverGetStats:function(e){if("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpReceiver.prototype))){var t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,n=t.apply(e,[]);return n.forEach(function(t){t._pc=e}),n}),r.wrapPeerConnectionEvent(e,"track",function(e){return e.receiver._pc=e.srcElement,e}),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}},shimRemoveStream:function(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;r.deprecated("removeStream","removeTrack"),this.getSenders().forEach(function(n){n.track&&-1!==e.getTracks().indexOf(n.track)&&t.removeTrack(n)})})},shimRTCDataChannel:function(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)},shimGetDisplayMedia:function(e,n){!e.navigator||!e.navigator.mediaDevices||"getDisplayMedia"in e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=function(r){if(!(r&&r.video)){var i=new DOMException("getDisplayMedia without video constraints is undefined");return i.name="NotFoundError",i.code=8,t.reject(i)}return!0===r.video?r.video={mediaSource:n}:r.video.mediaSource=n,e.navigator.mediaDevices.getUserMedia(r)},e.navigator.getDisplayMedia=function(t){return r.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia"),e.navigator.mediaDevices.getDisplayMedia(t)})}}}).call(this,n(0))},function(e,t,n){"use strict";(function(t){var r=n(28),i=r.log;e.exports=function(e){var n=r.detectBrowser(e),o=e&&e.navigator,s=e&&e.MediaStreamTrack,a=function(e){return{name:({InternalError:"NotReadableError",NotSupportedError:"TypeError",PermissionDeniedError:"NotAllowedError",SecurityError:"NotAllowedError"})[e.name]||e.name,message:({"The operation is insecure.":"The request is not allowed by the user agent or the platform in the current context."})[e.message]||e.message,constraint:e.constraint,toString:function(){return this.name+(this.message&&": ")+this.message}}},c=function(e,t,r){var s=function(e){if("object"!=typeof e||e.require)return e;var t=[];return Object.keys(e).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r=e[n]="object"==typeof e[n]?e[n]:{ideal:e[n]};if((void 0!==r.min||void 0!==r.max||void 0!==r.exact)&&t.push(n),void 0!==r.exact&&("number"==typeof r.exact?r.min=r.max=r.exact:e[n]=r.exact,delete r.exact),void 0!==r.ideal){e.advanced=e.advanced||[];var i={};"number"==typeof r.ideal?i[n]={min:r.ideal,max:r.ideal}:i[n]=r.ideal,e.advanced.push(i),delete r.ideal,Object.keys(r).length||delete e[n]}}}),t.length&&(e.require=t),e};return e=JSON.parse(JSON.stringify(e)),n.version<38&&(i("spec: "+JSON.stringify(e)),e.audio&&(e.audio=s(e.audio)),e.video&&(e.video=s(e.video)),i("ff37: "+JSON.stringify(e))),o.mozGetUserMedia(e,t,function(e){r(a(e))})}
32,u=function(e){return new t(function(t,n){c(e,t,n)})};if(o.mediaDevices||(o.mediaDevices={getUserMedia:u,addEventListener:function(){},removeEventListener:function(){}}),o.mediaDevices.enumerateDevices=o.mediaDevices.enumerateDevices||function(){return new t(function(e){e([{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}])})},n.version<41){var d=o.mediaDevices.enumerateDevices.bind(o.mediaDevices);o.mediaDevices.enumerateDevices=function(){return d().then(void 0,function(e){if("NotFoundError"===e.name)return[];throw e})}}if(n.version<49){var l=o.mediaDevices.getUserMedia.bind(o.mediaDevices);o.mediaDevices.getUserMedia=function(e){return l(e).then(function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach(function(e){e.stop()}),new DOMException("The object can not be found here.","NotFoundError");return t},function(e){return t.reject(a(e))})}}if(!(n.version>55&&"autoGainControl"in o.mediaDevices.getSupportedConstraints())){var p=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},f=o.mediaDevices.getUserMedia.bind(o.mediaDevices);if(o.mediaDevices.getUserMedia=function(e){return"object"==typeof e&&"object"==typeof e.audio&&(p((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","mozAutoGainControl"),p(e.audio,"noiseSuppression","mozNoiseSuppression")),f(e)},s&&s.prototype.getSettings){var h=s.prototype.getSettings;s.prototype.getSettings=function(){var e=h.apply(this,arguments);return p(e,"mozAutoGainControl","autoGainControl"),p(e,"mozNoiseSuppression","noiseSuppression"),e}}if(s&&s.prototype.applyConstraints){var m=s.prototype.applyConstraints;s.prototype.applyConstraints=function(e){return"audio"===this.kind&&"object"==typeof e&&(p(e=JSON.parse(JSON.stringify(e)),"autoGainControl","mozAutoGainControl"),p(e,"noiseSuppression","mozNoiseSuppression")),m.apply(this,[e])}}}o.getUserMedia=function(e,t,i){if(n.version<44)return c(e,t,i);r.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),o.mediaDevices.getUserMedia(e).then(t,i)}}}).call(this,n(0))},function(e,t,n){"use strict";(function(t){var r=n(28);e.exports={shimLocalStreamsAPI:function(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),"getStreamById"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getStreamById=function(e){var t=null;return this._localStreams&&this._localStreams.forEach(function(n){n.id===e&&(t=n)}),this._remoteStreams&&this._remoteStreams.forEach(function(n){n.id===e&&(t=n)}),t}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),-1===this._localStreams.indexOf(e)&&this._localStreams.push(e);var n=this;e.getTracks().forEach(function(r){t.call(n,r,e)})},e.RTCPeerConnection.prototype.addTrack=function(e,n){return n&&(this._localStreams?-1===this._localStreams.indexOf(n)&&this._localStreams.push(n):this._localStreams=[n]),t.call(this,e,n)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);var t=this._localStreams.indexOf(e);if(-1!==t){this._localStreams.splice(t,1);var n=this,r=e.getTracks();this.getSenders().forEach(function(e){-1!==r.indexOf(e.track)&&n.removeTrack(e)})}})}},shimRemoteStreamsAPI:function(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(e){this._onaddstream&&this.removeEventListener("addstream",this._onaddstream),this.addEventListener("addstream",this._onaddstream=e)}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEac
vendor: 4,933 bytes, line 32
32h(function(t){if(e._remoteStreams||(e._remoteStreams=[]),!(e._remoteStreams.indexOf(t)>=0)){e._remoteStreams.push(t);var n=new Event("addstream");n.stream=t,e.dispatchEvent(n)}})}),t.apply(e,arguments)}}},shimCallbacksAPI:function(e){if("object"==typeof e&&e.RTCPeerConnection){var n=e.RTCPeerConnection.prototype,r=n.createOffer,i=n.createAnswer,o=n.setLocalDescription,s=n.setRemoteDescription,a=n.addIceCandidate;n.createOffer=function(e,n){var i=arguments.length>=2?arguments[2]:arguments[0],o=r.apply(this,[i]);return n?(o.then(e,n),t.resolve()):o},n.createAnswer=function(e,n){var r=arguments.length>=2?arguments[2]:arguments[0],o=i.apply(this,[r]);return n?(o.then(e,n),t.resolve()):o};var c=function(e,n,r){var i=o.apply(this,[e]);return r?(i.then(n,r),t.resolve()):i};n.setLocalDescription=c,c=function(e,n,r){var i=s.apply(this,[e]);return r?(i.then(n,r),t.resolve()):i},n.setRemoteDescription=c,c=function(e,n,r){var i=a.apply(this,[e]);return r?(i.then(n,r),t.resolve()):i},n.addIceCandidate=c}},shimGetUserMedia:function(e){var t=e&&e.navigator;!t.getUserMedia&&(t.webkitGetUserMedia?t.getUserMedia=t.webkitGetUserMedia.bind(t):t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}).bind(t)))},shimRTCIceServerUrls:function(e){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){for(var i=[],o=0;o<e.iceServers.length;o++){var s=e.iceServers[o];!s.hasOwnProperty("urls")&&s.hasOwnProperty("url")?(r.deprecated("RTCIceServer.url","RTCIceServer.urls"),(s=JSON.parse(JSON.stringify(s))).urls=s.url,delete s.url,i.push(s)):i.push(e.iceServers[o])}e.iceServers=i}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in e.RTCPeerConnection&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})},shimTrackEventTransceiver:function(e){"object"==typeof e&&e.RTCPeerConnection&&"receiver"in e.RTCTrackEvent.prototype&&!e.RTCTransceiver&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimCreateOfferLegacy:function(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){var n=this;if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);var r=n.getTransceivers().find(function(e){return e.sender.track&&"audio"===e.sender.track.kind});!1===e.offerToReceiveAudio&&r?"sendrecv"===r.direction?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":"recvonly"===r.direction&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):!0!==e.offerToReceiveAudio||r||n.addTransceiver("audio"),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);var i=n.getTransceivers().find(function(e){return e.sender.track&&"video"===e.sender.track.kind});!1===e.offerToReceiveVideo&&i?"sendrecv"===i.direction?i.setDirection("sendonly"):"recvonly"===i.direction&&i.setDirection("inactive"):!0!==e.offerToReceiveVideo||i||n.addTransceiver("video")}return t.apply(n,arguments)}}}}).call(this,n(0))},function(e,t,n){"use strict";var r=n(252),i=n(28);e.exports={shimRTCIceCandidate:function(e){if(e.RTCIceCandidate&&(!e.RTCIceCandidate||!("foundation"in e.RTCIceCandidate.prototype))){var t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substr(2)),e.candidate&&e.candidate.length){var n=Object.assign(new t(e),r.parseCandidate(e.candidate));return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,i.wrapPeerConnectionEvent(e,"icecandidate",function(t){return t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t})}},shimCreateObjectURL:function(e){var t=e&&e.URL;if("object"==typeof e&&e.HTMLMediaElement&&"srcObject"in e.HTMLMediaElement.prototype&&t.createObjectURL&&t.revokeObjectURL){var n=t.createObjectURL.bind(t),r=t.revokeObjectURL.bind(t),o=new Map,s=0;t.createObjectURL=function(e){if("getTracks"in e){var t="polyblob:"+ ++s;return o.set(t,e),i.deprecated("URL.createObjectURL(stream)","elem.srcObject = stream"),t}return n(e)},t.revokeObjectURL=function(e){r(e),o.delete(e)};var a=Object.getOwnPropertyDescriptor(e.HTMLMediaElement.prototype,"src");Object.defineProperty(e.HTMLMediaElement.prototype,"src",{get:function(){return a.get.apply(this)},set:function(e){return this.srcObject=o.get(e)||null,a.set.apply(this,[e])}});var c=e.HTMLMediaElement.prototype.setAttribute;e.HTMLMediaElement.prototype.setAttribute=function(){return 2==arguments.length&&"src"===(""+arguments[0]).toLowerCase()&&(this.srcObject=o.get(arguments[1])||null),
32c.apply(this,arguments)}}},shimMaxMessageSize:function(e){if(!e.RTCSctpTransport&&e.RTCPeerConnection){var t=i.detectBrowser(e);"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp}});var n=function(e){var t=r.splitSections(e.sdp);return t.shift(),t.some(function(e){var t=r.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})},o=function(e){var t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return -1;var n=parseInt(t[1],10);return n!=n?-1:n},s=function(e){var n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:0x7ffffff5:t.version<60?57===t.version?65535:65536:0x7ffffff5),n},a=function(e,n){var i=65536;"firefox"===t.browser&&57===t.version&&(i=65535);var o=r.matchPrefix(e.sdp,"a=max-message-size:");return o.length>0?i=parseInt(o[0].substr(19),10):"firefox"===t.browser&&-1!==n&&(i=0x7ffffff5),i},c=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var e=this;if(e._sctp=null,n(arguments[0])){var t,r=o(arguments[0]),i=s(r),u=a(arguments[0],r);t=0===i&&0===u?1/0:0===i||0===u?Math.max(i,u):Math.min(i,u);var d={};Object.defineProperty(d,"maxMessageSize",{get:function(){return t}}),e._sctp=d}return c.apply(e,arguments)}}},shimSendThrowTypeError:function(e){if(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype){var t=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){var e=this,r=t.apply(e,arguments);return n(r,e),r},i.wrapPeerConnectionEvent(e,"datachannel",function(e){return n(e.channel,e.target),e})}function n(e,t){var n=e.send;e.send=function(){var r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}}}},function(e,t,n){"use strict";(function(t){let r=n(6);function i(){return"u"<typeof document||"complete"===document.readyState||"interactive"===document.readyState&&document.body}let o=!1,s={isDomLoaded:i,isDomUnloaded:()=>o,whenUnloaded:new t(e=>{if("u">typeof window){let t=()=>{o=!0,s.emit("unload"),e()};window.addEventListener("unload",t)}}),whenLoaded:new t(e=>{if(i())return void e();let t=()=>{document.removeEventListener("DOMContentLoaded",t),document.removeEventListener("load",t),s.emit("load"),e(
32)};document.addEventListener("DOMContentLoaded",t),document.addEventListener("load",t)})};r(s),e.exports=s}).call(this,n(0))},function(e,t,n){var r=n(78),i=n(256),o=n(239),s=n(562),a=n(9),c=n(53),u=n(257);function d(e,t,n,l,p){e!==t&&o(t,function(o,c){if(p||(p=new r),a(o))s(e,t,c,n,d,l,p);else{var f=l?l(u(e,c),o,c+"",e,t,p):void 0;void 0===f&&(f=o),i(e,c,f)}},c)}e.exports=d},function(e,t,n){var r=n(256),i=n(180),o=n(189),s=n(54),a=n(190),c=n(65),u=n(10),d=n(129),l=n(66),p=n(15),f=n(9),h=n(135),m=n(85),b=n(257),g=n(563);e.exports=function(e,t,n,v,y,S,E){var T=b(e,n),C=b(t,n),R=E.get(C);if(R)return void r(e,n,R);var I=S?S(T,C,n+"",e,t,E):void 0,_=void 0===I;if(_){var w=u(C),x=!w&&l(C),O=!w&&!x&&m(C);I=C,w||x||O?u(T)?I=T:d(T)?I=s(T):x?(_=!1,I=i(C,!0)):O?(_=!1,I=o(C,!0)):I=[]:h(C)||c(C)?(I=T,c(T)?I=g(T):(!f(T)||p(T))&&(I=a(C))):_=!1}_&&(E.set(C,I),y(I,C,v,S,E),E.delete(C)),r(e,n,I)}},function(e,t,n){var r=n(40),i=n(53);e.exports=function(e){return r(e,i(e))}},function(e,t,n){"use strict";let r=n(148),i=n(258),o=n(259),s=n(264),a=n(1)("normalizeConstraintInput"),c={"320x240":{width:320,height:240},"320x180":{width:320,height:180},"640x480":{width:640,height:480},"640x360":{width:640,height:360},"1280x720":{width:1280,height:720},"1280x960":{width:1280,height:960},"1920x1080":{width:1920,height:1080}},u=[1,7,15,30];function d(e){return e._inject&&e._inject.logging||a}function l(e,t,n,r,i){if(void 0===t)return;let o=n(t);return o||i.warn(`Invalid ${e} passed to the Publisher. Got: ${t}, expecting one of ${r}`),o}function p(e,t){let n=d(t),r=(()=>{let n=t[`publish${o(e)}`];return void 0===n||!!n})(),i=(()=>{let r=t[`${e}Source`];return void 0===r||null!==r&&!1!==r&&("object"==typeof r?!t[`isCustom${o(e)}Track`]&&("string"!=typeof r.deviceId?(n.warn(`Invalid ${e}Source passed to Publisher. Expected either a device ID or device.`),!0):r.deviceId):"string"!=typeof r?(n.warn(`Ignoring invalid ${e}Source parameter`),!0):r)})();return"audio"===e&&t.isScreenSharing&&!s&&!1!==i&&(t.audioSource&&d(t).warn("Invalid audioSource passed to Publisher - when using screen sharing no audioSource may be used"),i=!1),{source:i,publish:r}}function f(e,t){return"Chrome"===e.name&&-1!==e.userAgent.indexOf("Mac OS X")&&1===t?2:t}let h=["user","environment","left","right"],m=(e,t)=>{if(void 0===e||h.indexOf(e)>=0)return e;d(t).warn(`Invalid facingMode passed to Publisher. Expected one of: ${h.join(", ")}`)};e.exports=function(e){let t=d(e),n=e.env||{},o=e.isScreenSharing,s=e.isCustomAudioTrack,a=e.isCustomVideoTrack;return o&&!i&&r(e.usingOptionalMandatoryStyle,"Screensharing only uses optional-mandatory constraints right now"),["echoCancellation","autoGainControl","noiseSuppression"].forEach(t=>{!1!==e[t]&&Object.assign(e,{[t]:!0})}),{isScreenSharing:o,isCustomAudioTrack:s,isCustomVideoTrack:a,audio:p("audio",e),video:p("video",e),usingOptionalMandatoryStyle:e.usingOptionalMandatoryStyle,enableRenegotiation:e.enableRenegotiation,enableStereo:e.enableStereo,noiseSuppression:e.noiseSuppression,autoGainControl:e.autoGainControl,echoCancellation:e.echoCancellation,disableAudioProcessing:e.disableAudioProcessing,videoDimensions:l("resolution",e.resolution,e=>c[e],`"${Object.keys(c).join('", "')}"`,t),frameRate:f(n,l("frameRate",e.frameRate,e=>-1!==u.indexOf(e)?e:void 0,u.join(","),t)),maxResolution:function(){if(void 0===e.maxResolution)return o?{width:1920,height:1920}:void 0;let n={width:e.maxResolution.width,height:e.maxResolution.height};return Object.keys(n).forEach(e=>{let r=n[e];("number"!=typeof r||r>1920)&&(t.warn(`Invalid maxResolution passed to the Publisher. maxResolution.${e} must be less than or equal to 1920`),n[e]=1920)}),n}(),facingMode:m(e.facingMode,e)}}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var i={};if("abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},i)).join(""))return!1;return!0}catch(e){return!1}}()?function(e,t){for(var n,a,c=s(e),u=1;u<arguments.length;u++){for(var d in n=Object(arguments[u]))i.call(n,d)&&(c[d]=n[d]);if(r){a=r(n);for(var l=0;l<a.length;l++)o.call(n,a[l])&&(c[a[l]]=n[a[l]])}}return c}:Object.assign},function(e,t,n){(function(e,r){var i,o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},s=/%[sdj%]/g;t.format=function(e){if(!T(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(c(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,i=r.length,o=String(e).replace(s,function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),a=r[n];n<i;a=r[++n])S(a)||!I(a)?o+=" "+a:o+=" "+c(a);return o},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var a={};function c(e,n){var r={seen:[],stylize:d};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(n)?r.showHidden=n:n&&t._extend(r,n),
32C(r.showHidden)&&(r.showHidden=!1),C(r.depth)&&(r.depth=2),C(r.colors)&&(r.colors=!1),C(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),p(r,e,r.depth)}function u(e,t){var n=c.styles[t];return n?"\x1b["+c.colors[n][0]+"m"+e+"\x1b["+c.colors[n][1]+"m":e}function d(e,t){return e}function l(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function p(e,n,r){if(e.customInspect&&n&&x(n.inspect)&&n.inspect!==t.inspect&&!(n.constructor&&n.constructor.prototype===n)){var i,o=n.inspect(r,e);return T(o)||(o=p(e,o,r)),o}var s=f(e,n);if(s)return s;var a=Object.keys(n),c=l(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),w(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(n);if(0===a.length){if(x(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(R(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return e.stylize(Date.prototype.toString.call(n),"date");if(w(n))return h(n)}var d="",y=!1,S=["{","}"];if(v(n)&&(y=!0,S=["[","]"]),x(n)&&(d=" [Function"+(n.name?": "+n.name:"")+"]"),R(n)&&(d=" "+RegExp.prototype.toString.call(n)),_(n)&&(d=" "+Date.prototype.toUTCString.call(n)),w(n)&&(d=" "+h(n)),0===a.length&&(!y||0==n.length))return S[0]+d+S[1];if(r<0)if(R(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");else return e.stylize("[Object]","special");return e.seen.push(n),i=y?m(e,n,r,c,a):a.map(function(t){return b(e,n,r,c,t,y)}),e.seen.pop(),g(i,d,S)}function f(e,t){if(C(t))return e.stylize("undefined","undefined");if(T(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return E(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):S(t)?e.stylize("null","null"):void 0}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function m(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)A(t,String(s))?o.push(b(e,t,n,r,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(b(e,t,n,r,i,!0))}),o}function b(e,t,n,r,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),A(r,i)||(s="["+i+"]"),!a&&(0>e.seen.indexOf(c.value)?(a=S(n)?p(e,c.value,null):p(e,c.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return"   "+e}).join("\n")):a=e.stylize("[Circular]","special")),C(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function g(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function v(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function S(e){return null===e}function E(e){return"number"==typeof e}function T(e){return"string"==typeof e}function C(e){return void 0===e}function R(e){return I(e)&&"[object RegExp]"===O(e)}function I(e){return"object"==typeof e&&null!==e}function _(e){return I(e)&&"[object Date]"===O(e)}function w(e){return I(e)&&("[object Error]"===O(e)||e instanceof Error)}function x(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function N(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(C(i)&&(i=e.env.NODE_DEBUG||""),!a[n=n.toUpperCase()])if(RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=v,t.isBoolean=y,t.isNull=S,t.isNullOrUndefined=function(e){return null==e}
32,t.isNumber=E,t.isString=T,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=C,t.isRegExp=R,t.isObject=I,t.isDate=_,t.isError=w,t.isFunction=x,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(567);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Z(){var e=new Date,t=[N(e.getHours()),N(e.getMinutes()),N(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",Z(),t.format.apply(t,arguments))},t.inherits=n(568),t._extend=function(e,t){if(!t||!I(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var L="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function V(e,t){if(!e){var n=Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(L&&e[L]){var t=e[L];if("function"!=typeof t)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,i=new r(function(e,r){t=e,n=r}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(e,r){e?n(e):t(r)});try{e.apply(this,o)}catch(e){n(e)}return i}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),L&&Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=L,t.callbackify=function(t){if("function"!=typeof t)throw TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};t.apply(this,n).then(function(t){e.nextTick(s,null,t)},function(t){e.nextTick(V,t,s)})}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,o(t)),n}}).call(this,n(43),n(0))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(570),i=n(262),o=n(263),s=n(59);e.exports=function(e){return function(t){var n=i(t=s(t))?o(t):void 0,a=n?n[0]:t.charAt(0),c=n?r(n,1).join(""):t.slice(1);return a[e]()+c}}},function(e,t,n){var r=n(261);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var n="\\ud800-\\udfff",r="["+n+"]",i="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",s="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+i+"|"+o+")?",d="[\\ufe0e\\ufe0f]?",l="(?:\\u200d(?:"+[s,a,c].join("|")+")"+d+u+")*",p=d+u+l,f=RegExp(o+"(?="+o+")|"+("(?:"+[s+i+"?",i,a,c,r].join("|"))+")"+p,"g");e.exports=function(e){return e.match(f)||[]}},function(e,t,n){"use strict";e.exports=["screen","window","tab","browser","application"]},function(e,t,n){"use strict";let r=n(1),i=n(34)(),o=n(50),s=n(119),a=n(576),c=n(579),u="/opentok/webrtc/docs/js/release-notes.html",d=i.onlyLocal(),l=r("setLogLevel"),p=`
33 ██████╗ ██████╗ ███████╗███╗   ██╗████████╗ ██████╗ ██╗  ██╗
34██╔═══██╗██╔══██╗██╔════╝████╗  ██║╚══██╔══╝██╔═══██╗██║ ██╔╝
35██║   ██║██████╔╝█████╗  ██╔██╗ ██║   ██║   ██║   ██║█████╔╝
36██║   ██║██╔═══╝ ██╔══╝  ██║╚██╗██║   ██║   ██║   ██║██╔═██╗
37╚██████╔╝██║     ███████╗██║ ╚████║   ██║   ╚██████╔╝██║  ██╗
38 ╚═════╝ ╚═╝     ╚══════╝╚═╝  ╚═══╝   ╚═╝    ╚═════╝ ╚═╝  ╚═╝`,f=o(()=>{l.info(`%c${p}`,'font-family: "Fire Code", Courier, "Courier New", Consolas, "De
38jaVu Sans Mono"'),l.info(`OpenTok JS SDK ${d.version}`),l.info(`Release notes: ${d.websiteUrl}${u}`),l.info(`Known issues: ${d.websiteUrl}${u}l#knownIssues`)});function h(e){if(void 0===e||!a(s,{priority:e})&&0!==e){let t=c(s,(e,t)=>`OT.${t.toUpperCase()} = ${e.priority}`).join(", ");l.error(`level must be one of: OT.NONE = 0, ${t}`),l.warn("Using OT.WARN instead"),e=s.warn.priority}r.setLogLevel(e),e>=s.debug.priority&&f();let t="https://www.npmjs.com/package/debug#browser-support";return l.info(`OpenTok JS SDK now uses the debug library. More info at ${t}`),l.info(`Changed log level to: ${e}`),e}h(d.debug?s.debug.priority:s.warn.priority),e.exports=h},function(e,t,n){var r=n(96),i="Expected a function";e.exports=function(e,t){var n;if("function"!=typeof t)throw TypeError(i);return e=r(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}},function(e,t,n){var r=n(232),i=n(35),o=n(577),s=n(10),a=n(122);e.exports=function(e,t,n){var c=s(e)?r:o;return n&&a(e,t,n)&&(t=void 0),c(e,i(t,3))}},function(e,t,n){var r=n(266);e.exports=function(e,t){var n;return r(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}},function(e,t,n){var r=n(25);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,s=t?o:-1,a=Object(n);(t?s--:++s<o)&&!1!==i(a[s],s,a););return n}}},function(e,t,n){var r=n(33),i=n(35),o=n(580),s=n(10);e.exports=function(e,t){return(s(e)?r:o)(e,i(t,3))}},function(e,t,n){var r=n(266),i=n(25);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,function(e,r,i){o[++n]=t(e,r,i)}),o}},function(e,t,n){"use strict";e.exports=function(e){return"http:"!==e.substr(0,5)&&"https:"!==e.substr(0,6)&&"data:image/png;base64,"!==e.substr(0,22)?`data:image/png;base64,${e}`:e}},function(e,t,n){"use strict";let r=n(56),i=n(1)("Style");e.exports=function(e,t){let n=this,o={},s={buttonDisplayMode:["auto","mini","mini-auto","off","on"],nameDisplayMode:["auto","off","on"],audioLevelDisplayMode:["auto","off","on"],showSettingsButton:[!0,!1],showSpeakerButton:null,showMicButton:[!0,!1],backgroundImageURI:null,showControlBar:[!0,!1],showArchiveStatus:[!0,!1],archiveStatusDisplayMode:["auto","off","on"],videoDisabledDisplayMode:["auto","off","on"],audioBlockedDisplayMode:["auto","off","on"]},a=function(e,t){let n=s[e];return void 0!==n&&(null===n||-1!==n.indexOf(t))},c=function(e){switch(e){case"true":return!0;case"false":return!1;default:return e}};n.getAll=function(){return r(o)},n.get=function(e){return e?o[e]:n.getAll()},n.setAll=function(e,t){return Object.keys(e).forEach(r=>{n.set(r,e[r],t)}),n},n.set=function(e,r,s){let u;i.debug(`setStyle: ${e.toString()}`);let d=c(r);return a(e,d)?d!==(u=o[e])&&(o[e]=d,s||t(e,r,u)):i.warn(`Style.set::Invalid style property passed ${e} : ${d}`),n},e&&n.setAll(e,!0)}},function(e,t,n){"use strict";let r=n(56);e.exports=function(e){let t=r(e);if(t.backgroundImageURI){let e=t.backgroundImageURI.split(":")[0];t.backgroundImageURI=-1!==["http","https","data"].indexOf(e)?e:"other"}return t}},function(e,t,n){"use strict";let r=n(2),i=n(269),o=()=>!r.isIosWebView&&(!!i()||window.navigator.mediaDevices&&window.navigator.mediaDevices.getUserMedia||window.navigator.webkitGetUserMedia||window.navigator.mozGetUserMedia);e.exports=()=>!!("Node"!==r.name&&o())},function(e,t,n){"use strict";let r=n(2);e.exports=()=>{if("Node"===r.name);else if("function"==typeof window.webkitRTCPeerConnection&&window.webkitRTCPeerConnection.prototype.addStream)return!0;else if("function"==typeof window.RTCPeerConnection)return!0;else if("function"==typeof window.mozRTCPeerConnection&&r.version>20)return!0;return!1}},function(e,t,n){"use strict";e.exports=void 0!==window.WebSocket},function(e,t){e.exports='<div id="tb_alert"><div id="section-normal-install" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application requires <a target="_blank" href="https://www.google.com/chrome/">Google Chrome</a>, <a target="_blank" href="http://www.mozilla.org/firefox">Firefox</a>
38, <a target="_blank" href="https://www.microsoft.com/en-us/edge">Edge</a>, or <a target="_blank" href="https://www.apple.com/safari/">Safari</a>.</div></div><div id="section-upgrade-install" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application requires a newer version of <a target="_blank" href="https://www.google.com/chrome/">Google Chrome</a>, <a target="_blank" href="http://www.mozilla.org/firefox">Firefox</a>, <a target="_blank" href="https://www.microsoft.com/en-us/edge">Edge</a>, or <a target="_blank" href="https://www.apple.com/safari/">Safari</a>.</div><div class="continue-text"><a href="#" role="OT_close">Continue at my own risk.</a></div></div><div id="section-supported-mobile-browser" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application requires a newer version of <a target="_blank" href="https://www.google.com.au/chrome/browser/mobile/">Google Chrome</a>.</div><div class="continue-text"><a href="#" role="OT_close">Continue at my own risk.</a></div></div><div id="section-mobile-browser" class="OT_alert"><div class="OT_alert-exclamation">!</div><button class="OT_alert-close-button" role="OT_close">&#x00D7;</button><div class="OT_alert-header" data-text="Incompatible Browser">Incompatible Browser</div><div class="OT_alert-body">The video component of this application is not supported on your mobile device\'s browser at this time.</div></div></div>'},function(e,t,n){"use strict";var r=n(3)(n(60));e.exports=function(e){function t(t,n){var r;let i=(void 0===n?{}:n).destroyOnClose,o=void 0===i||i;(r=e.call(this)||this).modalDiv=document.createElement("div"),r.modalDiv.classList.add("OT_ModalDialog"),r.modalDiv.innerHTML=t;let s=r.modalDiv.querySelectorAll("[role=OT_close]");return[].forEach.call(s,e=>e.addEventListener("click",e=>{e.preventDefault(),r.close()})),r.close(),document.body.appendChild(r.modalDiv),o&&r.on("closed",()=>r.destroy()),r}(0,r.default)(t,e);var n=t.prototype;return n.open=function(){this.modalDiv.style.display="block",this.emit("opened")},n.close=function(){this.modalDiv.style.display="none",this.emit("closed")},n.destroy=function(){this.modalDiv.innerHTML="",this.modalDiv.parentNode.removeChild(this.modalDiv),this.emit("destroyed")},n.el=function(e){return this.modalDiv.querySelector(e)},t}(n(42))},function(e,t,n){"use strict";let r=n(27);e.exports=function(e){void 0===e&&(e={});let t=e.env||n(2),i=e.analytics||new r;i.logEvent({action:"UserAgentParsing",variation:"Attempt",payload:{userAgent:t.userAgent}}),i.logEvent({action:"UserAgentParsing",variation:t.error?"Failure":"Success",payload:{userAgent:t.userAgent}})}},function(e,t,n){var r=n(591),i=n(270),o=n(592),s=n(593);function a(t){var n="function"==typeof Map?new Map:void 0;return e.exports=a=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return s(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},a(t)}e.exports=a},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(e){return -1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(270);function i(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function o(t,n,s){return i()?e.exports=o=Reflect.construct:e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},o.apply(null,arguments)}
38e.exports=o},function(e,t,n){"use strict";(function(t){e.exports=(e,n)=>(n=n||(()=>{}),e.then(e=>new t(e=>{e(n())}).then(()=>e),e=>new t(e=>{e(n())}).then(()=>{throw e})))}).call(this,n(0))},function(e,t,n){var r=n(58),i=n(596),o=n(597),s=n(47);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[s(i(t))]}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var r=n(98),i=n(261);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},function(e,t,n){var r=n(135);e.exports=function(e){return r(e)?void 0:e}},function(e,t,n){var r=n(35),i=n(25),o=n(30);e.exports=function(e){return function(t,n,s){var a=Object(t);if(!i(t)){var c=r(n,3);t=o(t),n=function(e){return c(a[e],e,a)}}var u=e(t,n,s);return u>-1?a[c?t[u]:u]:void 0}}},function(e,t,n){var r=n(92),i=n(93),o=n(128),s=n(94),a=n(601),c=n(97),u=200;e.exports=function(e,t,n){var d=-1,l=i,p=e.length,f=!0,h=[],m=h;if(n)f=!1,l=o;else if(p>=u){var b=t?null:a(e);if(b)return c(b);f=!1,l=s,m=new r}else m=t?[]:h;e:for(;++d<p;){var g=e[d],v=t?t(g):g;if(g=n||0!==g?g:0,f&&v==v){for(var y=m.length;y--;)if(m[y]===v)continue e;t&&m.push(v),h.push(g)}else l(m,v,n)||(m!==h&&m.push(v),h.push(g))}return h}},function(e,t,n){var r=n(186),i=n(224),o=n(97),s=1/0;e.exports=r&&1/o(new r([,-0]))[1]==s?function(e){return new r(e)}:i},function(e,t,n){"use strict";(function(t){var r=n(3),i=r(n(12)),o=r(n(13));let s=n(1)("hasValidPeerConnection");function a(e){return new t(t=>{e.addEventListener("signalingstatechange",()=>t(!0)),e.createOffer({offerToReceiveAudio:1}).then(t=>e.setLocalDescription(t)).then(()=>setTimeout(()=>{t(!1)},1e3))})}function c(){return(c=(0,o.default)(i.default.mark(function e(t){var n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,n=new t({iceServers:[]}),e.next=8;break;case 4:return e.prev=4,e.t0=e.catch(0),s.error("Error occurred creating PeerConnection",e.t0),e.abrupt("return",!1);case 8:return e.prev=8,e.next=11,a(n);case 11:e.next=18;break;case 13:e.prev=13,e.t1=e.catch(8),s.error("Error occurred checking the validity of the PeerConnection",e.t1);try{n.close()}catch(e){}return e.abrupt("return",!1);case 18:e.prev=18,n.close(),e.next=26;break;case 22:return e.prev=22,e.t2=e.catch(18),s.error("Error occurred closing PeerConnection",e.t2),e.abrupt("return",!1);case 26:return e.abrupt("return",!0);case 27:case"end":return e.stop()}},e,null,[[0,4],[8,13],[18,22]])}))).apply(this,arguments)}e.exports=function(e){return c.apply(this,arguments)}}).call(this,n(0))},function(e,t,n){var r=function(){return this||"object"==typeof self&&self}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(604),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t,n){(function(t){!function(n){"use strict";var r,i=Object.prototype,o=i.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag",d="object"==typeof e,l=n.regeneratorRuntime;if(l){d&&(e.exports=l);return}function p(e,t,n,r){var i=Object.create((t&&t.prototype instanceof y?t:y).prototype);return i._invoke=x(e,n,new Z(r||[])),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}(l=n.regeneratorRuntime=d?e.exports:{}).wrap=p;var h="suspendedStart",m="suspendedYield",b="executing",g="completed",v={};function y(){}function S(){}function E(){}var T={};T[a]=function(){return this};var C=Object.getPrototypeOf,R=C&&C(C(A([])));R&&R!==i&&o.call(R,a)&&(T=R);var I=E.prototype=y.prototype=Object.create(T);function _(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function w(e){var n;function r(n,i,s,a){var c=f(e[n],e,i);if("throw"===c.type)a(c.arg);else{var u=c.arg,d=u.value;return d&&"object"==typeof d&&o.call(d,"__await")?t.resolve(d.__await).then(function(e){r("next",e,s,a)},function(e){r("throw",e,s,a)}):t.resolve(d).then(function(e){u.value=e,s(u)},function(e){return r("throw",e,s,a)})}}function i(e,i){function o(){return new t(function(t,n){r(e,i,t,n)})}return n=n?n.then(o,o):o()}this._invoke=i}function x(e,t,n){var r=h;return function(i,o){if(r===b)throw Error("Generator is already running");if(r===g){if("throw"===i)throw o;return L()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=O(s,n);if(a){if(a===v)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=b;var c=f(e,t,n);if("normal"===c.type){if(r=n.done?g:m,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=g,n.method="throw",n.arg=c.arg)}}}function O(e,t){var n=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&
38(t.method="return",t.arg=r,O(e,t),"throw"===t.method))return v;t.method="throw",t.arg=TypeError("The iterator does not provide a 'throw' method")}return v}var i=f(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,v;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,v):o:(t.method="throw",t.arg=TypeError("iterator result is not an object"),t.delegate=null,v)}function N(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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Z(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function A(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}return{next:L}}function L(){return{value:r,done:!0}}S.prototype=I.constructor=E,E.constructor=S,E[u]=S.displayName="GeneratorFunction",l.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(I),e},l.awrap=function(e){return{__await:e}},_(w.prototype),w.prototype[c]=function(){return this},l.AsyncIterator=w,l.async=function(e,t,n,r){var i=new w(p(e,t,n,r));return l.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},_(I),I[u]="Generator",I[a]=function(){return this},I.toString=function(){return"[object Generator]"},l.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=A,Z.prototype={constructor:Z,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=r),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),u=o.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);else if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else if(u){if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else throw Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return(s.type=e,s.arg=t,i)?(this.method="next",this.next=i.finallyLoc,v):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),v}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())}).call(this,n(0))},function(e,t,n){"use strict";(function(t){let r=n(37),i=n(2),o=n(606),s=n(73),a=n(1)("createPeerConnection");e.exports=function(e){let n=e.window,c=e.config,u=e.constraints;a.debug("called");let d=r(c);d.iceServers=o(i,d.iceServers),s()&&(d.sdpSemantics="plan-b");let l=new n.RTCPeerConnection(d,u);return t.resolve(l)}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(7),i=n(271),o={Edge(e){let t=!1;return e.map(e=>{if(!e)return;let n=e.urls||e.url&&[e.url];
38if(!n)return;let o=n.filter(e=>0!==e.indexOf("turn:")||-1===e.indexOf("transport=udp")||-1!==e.indexOf("turn:[")||t?0===e.indexOf("stun:"):(t=!0,!0));if(0!==o.length)return r(i(e,["url","urls"]),{urls:o})}).filter(e=>void 0!==e)},Safari:e=>e.map(e=>{if(void 0!==e.urls&&void 0===e.url)return e;let t=e.urls||e.url&&[e.url];return r(i(e,["url","urls"]),{urls:t})})};e.exports=function(e,t){let n=e.name;e.isEdge&&(n=e.isLegacyEdge?"Edge":"ChromiumEdge");let r=o[n];return r?r(t):t}},function(e,t,n){"use strict";let r=n(51),i=n(2),o="42001f",s="42e01f",a=e=>{let t=e.sdp,n=e.from,r=e.to;return t.replace(RegExp(`^(a=fmtp:\\d+ .*profile-level-id=)${n}`,"gmi"),`$1${r}`)};e.exports={local:{offer:function(e,t){let n=void 0===e?{}:e,c=n.numSimulcastStreams,u=n.audioBitrate,d=n.priorityVideoCodec,l=void 0===d?"":d,p=n.codecFlags,f=void 0===p?{}:p,h=n.enableStereo,m=void 0!==h&&h,b=n.enableDtx,g=void 0!==b&&b,v=n.replaceBaselineProfile,y=void 0!==v&&v,S=r.filterExcessSSRCs(t);c>1&&(S=r.enableSimulcast(S,c)),u>0&&(S=r.setAudioBitrate(S,u)),S=r.modifyReceiveStereo(S,!1),S=r.modifySendStereo(S,!!m),S=r.modifyDtx(S,!!g),i.isLegacyEdge||Object.keys(f).filter(e=>!1===f[e]).forEach(e=>{S=r.removeVideoCodec(S,e)}),l&&!i.isLegacyEdge?S=r.reprioritizeVideoCodec(S,l,"top"):"h264"!==l&&(S=r.reprioritizeVideoCodec(S,"h264","bottom"));let E=S;return y&&(E=a({sdp:E,from:o,to:s})),{local:S,remote:E}},answer:function(e,t){let n=void 0===e?{}:e,i=n.audioBitrate,c=n.codecFlags,u=n.enableStereo,d=void 0!==u&&u,l=n.enableDtx,p=void 0!==l&&l,f=n.replaceBaselineProfile,h=void 0!==f&&f,m=t;i>0&&(m=r.setAudioBitrate(m,i)),m=r.modifyReceiveStereo(m,!!d),m=r.modifySendStereo(m,!1),m=r.modifyDtx(m,!!p),c&&Object.keys(c).filter(e=>!1===c[e]).forEach(e=>{m=r.removeVideoCodec(m,e)});let b=m;return h&&(b=a({sdp:b,from:o,to:s})),{local:m,remote:b}}},remote:{offer:(e,t)=>{let n=e.replaceBaselineProfile,r=void 0!==n&&n,i=t;if(-1===i.indexOf("a=rtcp-fb")){let e="a=rtcp-fb:* ccm fir\r\na=rtcp-fb:* nack ";i=i.replace(/^m=video(.*)$/gim,`m=video$1\r
39${e}`)}return r&&(i=a({sdp:i,from:s,to:o})),{local:i}},answer:function(e,t){let n=void 0===e?{}:e,i=n.audioBitrate,c=n.replaceBaselineProfile,u=void 0!==c&&c,d=t;return i>0&&(d=r.setAudioBitrate(d,i)),u&&(d=a({sdp:d,from:s,to:o})),{local:d}}}}},function(e,t,n){var r=n(39),i=n(54),o=n(41),s=n(25),a=n(275),c=n(609),u=n(233),d=n(97),l=n(263),p=n(276),f="[object Map]",h="[object Set]",m=r?r.iterator:void 0;e.exports=function(e){if(!e)return[];if(s(e))return a(e)?l(e):i(e);if(m&&e[m])return c(e[m]());var t=o(e);return(t==f?u:t==h?d:p)(e)}},function(e,t){e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},function(e,t,n){var r=n(33);e.exports=function(e,t){return r(t,function(t){return e[t]})}},function(e,t,n){"use strict";e.exports=(e,t)=>{let n=[],r=null;if("function"==typeof e.getReceivers){let t=e.getReceivers().find(e=>"audio"===e.track.kind);t&&(n=t.getSynchronizationSources())}else r=Error("peerConnection does not support getReceivers function");t&&t(r,n)}},function(e,t,n){"use strict";(function(t){let r=n(613),i=function(e){this.pending=[],this._processBinding=this.maybeProcessPending.bind(this),e&&this.setPeerConnection(e)};i.prototype.setPeerConnection=function(e){if(this.pc)throw Error("Peer connection already set");this.pc=e,this._forwardIceCandidate=r(this.pc,"addIceCandidate"),this.pc.addEventListener("signalingstatechange",this._processBinding),this.maybeProcessPending()},i.prototype.canAddCandidates=function(){return!!(this.pc&&"closed"!==this.pc.iceConnectionState&&this.pc.remoteDescription&&this.pc.remoteDescription.type&&this.pc.localDescription&&this.pc.localDescription.type)},i.prototype.addIceCandidate=function(e){if(this.canAddCandidates())return this._forwardIceCandidate(e);let n=this.pending;return new t((t,r)=>{n.push({iceCandidate:e,resolve:t,reject:r})})},i.prototype.maybeProcessPending=function(){this.canAddCandidates()&&this.process()},i.prototype.process=function(){for(;this.pending.length;){let e=this.pending.shift();
39this._forwardIceCandidate(e.iceCandidate).then(e.resolve).catch(e.reject)}},i.prototype.destroy=function(){this.pc&&this.pc.removeEventListener("signalingstatechange",this._processBinding),this._processBinding=null,this.pc=null},e.exports=i}).call(this,n(0))},function(e,t,n){"use strict";(function(t){e.exports=function(e,n){let r=e[n];return function(n){return new t((t,i)=>{let o=r.apply(e,[n,t,i]);o&&"function"==typeof o.then&&t(o)})}}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(156),i=n(2),o=n(1)("offerProcessor"),s=n(51),a=n(615);e.exports=function(e,t,n,c,u,d,l,p,f,h,m,b){let g=(e,t)=>n=>{o.error(e),o.error(n),h&&h(e,n,t)},v=t=>{let n=s.hasSendStereo(d.sdp),i=r(u,"local","answer",{enableStereo:n,enableDtx:s.hasSendDtx(d.sdp),audioBitrate:s.getAudioBitrate(d.sdp),replaceBaselineProfile:b,codecFlags:l},t.sdp),o=new c({type:t.type,sdp:i.local}),a={type:t.type,sdp:i.remote};return e.setLocalDescription(o).then(()=>f(a)).catch(g("Error while setting LocalDescription","SetLocalDescription"))},y=()=>e.createAnswer().then(v).catch(g("Error while setting createAnswer","CreateAnswer")),S=new c({type:d.type,sdp:r(u,"remote","offer",{replaceBaselineProfile:b},d.sdp).local}),E=g("Error while setting RemoteDescription","SetRemoteDescription");return a(S,p,i,t,n).then(()=>(m(!0),S)).catch(e=>{if(m(!1),!s.hasMediaType(S.sdp,"audio"))throw Error("Unsupported video without audio for fallback");o.debug("Couldn't set remote description",S,e,", trying without video");let t=new c({type:d.type,sdp:s.disableMediaType(S.sdp,"video")});return o.debug("offer without video",t.sdp),t}).then(t=>e.setRemoteDescription(t)).then(y).catch(E)}},function(e,t,n){"use strict";(function(t){let r=n(73);e.exports=(e,n,i,o,s)=>{if(!o)return t.resolve(!0);let a={iceServers:[]};r()&&(a.sdpSemantics="plan-b");let c=new o(a),u=()=>{try{c.close()}catch(e){}};return c.setRemoteDescription(new s(e)).then(()=>{u()}).catch(e=>{throw u(),e})}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(62),i=n(617);e.exports=function(e){let t=[],n={},o={sentMessages:0,recvMessages:0},s=function(e){t.filter(t=>e!==t)},a=function(e){let n=new i(e);return t.push(n),n.on("close",()=>{s(n)}),n};return n.add=function(t,n){return a(e.createDataChannel(t,n))},n.addMany=function(e){for(let t in e)e.hasOwnProperty(t)&&n.add(t,e[t])},n.get=function(e,n){return r(t,t=>t.equals(e,n))},n.getOrAdd=function(e,t){let r=n.get(e,t);return r||(r=n.add(e,t)),r},n.getQosData=function(){let e={sentMessages:0,recvMessages:0};return t.forEach(t=>{e.sentMessages+=t.getQosData().sentMessages,e.recvMessages+=t.getQosData().recvMessages}),e},n.sampleQos=function(){let e=n.getQosData(),t={sentMessages:e.sentMessages-o.sentMessages,recvMessages:e.recvMessages-o.recvMessages};return o=e,t},n.destroy=function(){t.forEach(e=>{e.close()}),t=[]},e.addEventListener("datachannel",e=>{a(e.channel)}),n}},function(e,t,n){"use strict";let r=n(6),i=n(1)("DataChannel"),o=function(e){this.data=e.data,this.source=e.source,this.lastEventId=e.lastEventId,this.origin=e.origin,this.timeStamp=e.timeStamp,this.type=e.type,this.ports=e.ports,this.path=e.path};e.exports=function(e){let t={},n=[],s={sentMessages:0,recvMessages:0},a=function(e){return n.push(e),t},c=function(n){return e.send(n),s.sentMessages++,t},u=function(){let e;for(;e=n.shift();)t.send(e)},d=function(){t.send=c,u()},l=function(e){t.send=a,t.trigger("close",e)},p=function(e){i.error(e)},f=function(e){let n=new o(e);s.recvMessages++,t.trigger("message",n)};return r(t,!0),t.label=e.label,t.id=e.id,t.reliable=e.reliable,t.negotiated=e.negotiated,t.ordered=e.ordered,t.protocol=e.protocol,t._channel=e,t.close=function(){e.close()},t.equals=function(e,n){if(t.label!==e)return!1;for(let e in n)if(n.hasOwnProperty(e)&&t[e]!==n[e])return!1;return!0},t.getQosData=function(){return s},t.send=a,e.addEventListener("open",d,!1),e.addEventListener("close",l,!1),e.addEventListener("error",p,!1),e.addEventListener("message",f,!1),t}},function(e,t,n){"use strict";let r=n(7),i=n(156),o=n(1)("subscribeProcessor");e.exports=function(e){let t=e.peerConnection,n=e.NativeRTCSessionDescription,s=e.sdpTransforms,a=e.numSimulcastStreams,c=e.offerOverrides,u=e.offerConstraints,d=e.replaceBaselineProfile,l=(e,t)=>
39n=>{o.error(e,n);let r=Error(e);throw r.reason=n,r.prefix=t,r},p=e=>{o.debug("subscribeProcessor: offer created",e);let u=i(s,"local","offer",r({numSimulcastStreams:a,replaceBaselineProfile:d},c),e.sdp),p=new n({type:e.type,sdp:u.local}),f=new n({type:e.type,sdp:u.remote});return o.debug("subscribeProcessor: setting local description"),t.setLocalDescription(p).then(()=>f,l("Error while setting LocalDescription","SetLocalDescription"))};return o.debug("subscribeProcessor: creating offer"),t.createOffer(u).then(p,l("Error while creating Offer","CreateOffer")).then(e=>({sdp:e.sdp,type:e.type}))}},function(e,t,n){"use strict";var r=n(3),i=r(n(12)),o=r(n(13));let s=n(51),a=s.mediaDirections,c=a.RECVONLY,u=a.INACTIVE,d=function(){var e=(0,o.default)(i.default.mark(function e(t,n){var r,o,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.createOffer();case 4:return r=e.sent,e.next=7,t.setLocalDescription(r);case 7:o=t.remoteDescription.sdp,a=s.changeMediaDirection(o,n),t.setRemoteDescription({type:t.remoteDescription.type,sdp:a});case 10:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();e.exports={changeMediaDirectionToInactive:e=>d(e,u),changeMediaDirectionToRecvOnly:e=>d(e,c)}},function(e,t,n){"use strict";function r(e,t){var n;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}t.__esModule=!0,t.parseStatsOldAPI=v,t.parseStatsNewAPI=y,t.default=S;let s=n(2),a=n(5),c=n(1)("QoS"),u=n(51),d=n(279),l=n(621),p=n(102)(),f=n(158),h=["audioCodec","audioSentBytes","audioSentPackets","audioSentPacketsLost","audioRtt","videoCodec","videoHeight","videoHeightInput","videoSentBytes","videoFrameRateSent","videoSentPackets","videoRtt","videoSentPacketsLost","videoWidthInput","videoWidth"],m=["audioCodec","audioRecvBytes","audioRecvPackets","audioRecvPacketsLost","videoCodec","videoHeight","videoRecvBytes","videoRecvPackets","videoRecvPacketsLost","videoFrameRateReceived","videoWidth"],b=(e,t)=>c.debug(`Raw stats for peer conn ${e.id}:`,t),g=e=>{let t=e.portNumber||e.port,n=e.ipAddress||e.address||e.ip;return`${n}:${t}`};function v(e,t,n,r,i){let o=e=>(Number(e.stat("googFrameRateSent"))>0?(n.videoSentBytes=Number(e.stat("bytesSent")),n.videoSentPackets=Number(e.stat("packetsSent")),n.videoSentPacketsLost=Number(e.stat("packetsLost")),n.videoRtt=Number(e.stat("googRtt"))/1e3,n.videoFrameRate=Number(e.stat("googFrameRateInput")),n.videoWidth=Number(e.stat("googFrameWidthSent")),n.videoHeight=Number(e.stat("googFrameHeightSent")),n.videoFrameRateSent=Number(e.stat("googFrameRateSent")),n.videoWidthInput=Number(e.stat("googFrameWidthInput")),n.videoHeightInput=Number(e.stat("googFrameHeightInput")),n.videoCodec=e.stat("googCodecName")):Number(e.stat("googFrameRateReceived"))>0&&(n.videoRecvBytes=Number(e.stat("bytesReceived")),n.videoRecvPackets=Number(e.stat("packetsReceived")),n.videoRecvPacketsLost=Number(e.stat("packetsLost")),n.videoFrameRate=Number(e.stat("googFrameRateOutput")),n.videoFrameRateReceived=Number(e.stat("googFrameRateReceived")),n.videoFrameRateDecoded=Number(e.stat("googFrameRateDecoded")),n.videoWidth=Number(e.stat("googFrameWidthReceived")),n.videoHeight=Number(e.stat("googFrameHeightReceived")),n.videoCodec=e.stat("googCodecName")),null),s=e=>
39{Number(e.stat("audioInputLevel"))>0?(n.audioSentPackets=Number(e.stat("packetsSent")),n.audioSentPacketsLost=Number(e.stat("packetsLost")),n.audioSentBytes=Number(e.stat("bytesSent")),n.audioCodec=e.stat("googCodecName"),n.audioRtt=Number(e.stat("googRtt"))/1e3):Number(e.stat("audioOutputLevel"))>0&&(n.audioRecvPackets=Number(e.stat("packetsReceived")),n.audioRecvPacketsLost=Number(e.stat("packetsLost")),n.audioRecvBytes=Number(e.stat("bytesReceived")),n.audioCodec=e.stat("googCodecName"))},a=t=>{if(t.result){let r=t.result();b(e,r);let i=(e,t)=>r.filter(n=>n.id===t.stat(e))[0],a=e=>i("localCandidateId",e),c=e=>i("remoteCandidateId",e);for(let e=0;e<r.length;e++){let t=r[e];t.stat&&("true"===t.stat("googActiveConnection")&&(t.stat("googChannelId").indexOf("audio")>-1?(n.audioLocalAddress=t.stat("googLocalAddress"),n.audioRemoteAddress=t.stat("googRemoteAddress"),n.audioLocalCandidateType=t.stat("googLocalCandidateType"),n.audioRemoteCandidateType=t.stat("googRemoteCandidateType"),n.audioTransportType=t.stat("googTrans
39portType"),n.audioLocalRelayProtocol=d(a(t).stat("priority")),n.audioRemoteRelayProtocol=d(c(t).stat("priority"))):t.stat("googChannelId").indexOf("video")>-1&&(n.videoLocalAddress=t.stat("googLocalAddress"),n.videoRemoteAddress=t.stat("googRemoteAddress"),n.videoLocalCandidateType=t.stat("googLocalCandidateType"),n.videoRemoteCandidateType=t.stat("googRemoteCandidateType"),n.videoTransportType=t.stat("googTransportType"),n.videoLocalRelayProtocol=d(a(t).stat("priority")),n.videoRemoteRelayProtocol=d(c(t).stat("priority")))),s(t),o(t))}"videoCodec"in n&&!n.videoLocalAddress&&["LocalAddress","RemoteAddress","LocalCandidateType","RemoteCandidateType","TransportType","LocalRelayProtocol","RemoteRelayProtocol"].forEach(e=>{n[`video${e}`]=n[`audio${e}`]})}i(null,n)};e.getStats(a)}function y(e,t,n,i,o){let c=function(e){o(e)},d=(t,r)=>{if("outboundrtp"===r?(n.audioSentPackets=t.packetsSent,n.audioSentPacketsLost=t.packetsLost,n.audioSentBytes=t.bytesSent):"inboundrtp"===r&&(n.audioRecvPackets=t.packetsReceived,n.audioRecvPacketsLost=t.packetsLost,n.audioRecvBytes=t.bytesReceived),void 0===n.audioCodec&&-1!==["Safari"].indexOf(a.env.name)&&void 0!==t.codecId){let r=("answer"===e.remoteDescription.type?e.remoteDescription:e.localDescription).sdp,i=t.codecId.lastIndexOf("_"),o=u.getCodecsAndCodecMap(r,"audio");-1!==i&&void 0!==o&&(n.audioCodec=o.codecMap[t.codecId.substring(i+1)])}},p=e=>{let t={packetsSent:"videoSentPackets",packetsLost:"videoSentPacketsLost",bytesSent:"videoSentBytes",framesPerSecond:"videoFrameRate",framesSent:"videoFrameRateSent",framesReceived:"videoFramesReceived",frameWidth:"videoWidth",frameHeight:"videoHeight"},r=["videoSentPackets","videoSentBytes"];for(let i in t)if(i in e){let o=t[i];r.includes(o)&&Number.isSafeInteger(n[o])?n[o]+=e[i]:n[o]=e[i]}},h=(r,o)=>{let c=()=>{if(!("videoSentBytes"in n?n.videoSentBytes>0:n.videoRecvBytes>0))return 0;let e=0;if(s.isFirefox&&s.version<96)e=Number(r.framerateMean);else{let i="outboundrtp"===o?"framesEncoded":"framesDecoded";n[i]=r[i],e=f({currentStatFrames:r[i],currentTimestamp:r.timestamp,prevStatFrames:t[i],prevTimestamp:t.timeStamp||Date.now()})}return e};if("outboundrtp"===o?p(r):"inboundrtp"===o&&(n.videoRecvPackets=r.packetsReceived,n.videoRecvPacketsLost=r.packetsLost,n.videoRecvBytes=r.bytesReceived),(s.isFirefox&&["outboundrtp","inboundrtp"].includes(o)||!i&&"inboundrtp"===o)&&(n.videoFrameRate=c()),void 0===n.videoCodec&&-1!==["Safari"].indexOf(a.env.name)&&void 0!==r.codecId){let t=("answer"===e.remoteDescription.type?e.remoteDescription:e.localDescription).sdp,i=r.codecId.lastIndexOf("_"),o=u.getCodecsAndCodecMap(t,"video");-1!==i&&void 0!==o&&(n.videoCodec=o.codecMap[r.codecId.substring(i+1)])}};e.getStats(null).then(t=>{let s,a,c,f,m,v,y,S,T=[],C=()=>{if(0===T.length)return null;let e=T.filter(e=>e>0),t=e.reduce((e,t)=>e+t,0);return e.length?t/e.length:0},R=e=>e.toLowerCase().replace(/[^a-z]/g,""),I=e=>{let r=R(e.type),i=e.id.toLowerCase();if(/(in|out)boundrtp$/.test(r)){let t=/rtp/.test(i),o=t&&/audio/.test(i),s=t&&/video/.test(i),a=o||"audio"===e.kind,c=s||"video"===e.kind;if(a?d(e,r):c&&h(e,r),e.hasOwnProperty("roundTripTime")){let t=e.mediaType||e.kind;"video"===t?T.push(e.roundTripTime):"audio"===t&&(n.audioRtt=e.roundTripTime)}if("remoteinboundrtp"===r&&e.hasOwnProperty("packetsLost")){let t=e.kind,r=`${t}SentPacketsLost`;n[r]||(n[r]=0),n[r]+=e.packetsLost}}else if("transport"===r){let n=e.selectedCandidatePairId;n&&(f=l(n,t))}else"localcandidate"===r?(s=e.candidateType,c=g(e),v=e.protocol||e.transport):"remotecandidate"===r?(a=e.candidateType,m=g(e)):"track"===r&&0!==i.indexOf("video")?(y=e.frameWidth,S=e.frameHeight,p(e)):"mediasource"===r&&(e.hasOwnProperty("framesPerSecond")&&(n.videoFrameRate=e.framesPerSecond),e.hasOwnProperty("width")&&(n.videoWidthInput=e.width),e.hasOwnProperty("height")&&(n.videoHeightInput=e.height))};if("function"==typeof t[Symbol.iterator]){b(e,Array.from(t));for(var _,w=r(t);!(_=w()).done;){let e=_.value;I(Array.isArray(e)?e[1]:e)}}else for(let n in b(e,t),t)t.hasOwnProperty(n)&&I(t[n]);if(e.currentRemoteDescription&&(n.useDtx=u.hasSendDtx(e.currentRemoteDescription.sdp)),i&&(n.videoRtt=C()),(n.audioRecvBytes||n.audioSentBytes)&&(n.audioLocalCandidateType=s,n.audioLocalAddress=c,n.audioRemoteCandidateType=a,n.audioRemoteAddress=m,n.audioTransportType=v,n.audioLocalRelayProtocol=f,void 0===n.audioCodec)){let t=("answer"===e.remoteDescription.type?e.remoteDescription:e.localDescription).sdp;n.audioCodec=u.getCodecs(t,"audio")[0]}if((n.videoRecvBytes||n.videoSentBytes)&&(n.videoLocalCandidateType=s,n.videoLocalAddress=c,n.videoRemoteCandidateType=a,n.videoRemoteAddress=m,n.videoTransportType=v,n.videoLocalRelayProtocol=f,void 0===n.videoCodec)){let t=("answer"===e.remoteDescription.type?e.remoteDescription:e.localDescription).sdp;n.videoCodec=u.getCodecs(t,"video")[0]}E(n,i),n.videoWidth=n.videoWidth||y,n.videoHeight=n.videoHeight||S,o(null,n)}).catch(c)}function S(e,t,n,r,i){return p?y(e,t,n,r,i):v(e,t,n,r,i)}function E(e,t){(t?h:m).forEach(t=>{e.hasOwnProperty(t)||(e[t]=null)})}},function(e,t,n){"use strict";let r=n(279);e.exports=(e,t)=>{let n="";if(!e||!t)return n;let i=t.get(e);if(i){let e=i.localCandidateId;if(e){let i=t.get(e);if(i){let e=i.relayProtocol,t=i.priority;if(e){let t=e.toUpperCase();n=`TURN/${t}`}else n=r(t)}}}return n}},function(e,t,n){"use strict";var r=n(3);t.__esModule=!0,t.default=void 0;var i=r(n(18));t.default=function(){function e(){(0,i.default)(this,"value",null),(0,i.default)(this,"changeCount",0)}return e.prototype.onValue=function(e){e&&e!==this.value&&(this.value&&(this.changeCount+=1),this.value=e)},e}()},function(e,t,n){var r=n(9),i=n(624),o=n(229),s="Expected a function",a=Math.max,c=Math.min;e.exports=function(e,t,n){var u,d,l,p,f,h,m=0,b=!1,g=!1,v=!0;if("function"!=typeof e)throw TypeError(s);function y(t){var n=u,r=d;return u=d=void 0,m=t,p=e.apply(r,n)}function S(e){return m=e,f=setTimeout(C,t),b?y(e):p}function E(e){var n=e-h,r=e-m,i=t-n;return g?c(i,l-r):i}function T(e){var n=e-h,r=e-m;return void 0===h||n>=t||n<0||g&&r>=l}function C(){var e=i();if(T(e))return R(e);f=setTimeout(C,E(e))}function R(e){return(f=void 0,v&&u)?y(e):(u=d=void 0,p)}function I(){return void 0===f?p:R(i())}function _(){var e=i(),n=T(e);if(u=arguments,d=this,h=e,n){if(void 0===f)return S(h);if(g)return clearTimeout(f),f=setTimeout(C,t),y(h)}return void 0===f&&(f=setTimeout(C,t)),p}return t=o(t)||0,r(n)&&(b=!!n.leading,l=(g="maxWait"in n)?a(o(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),_.cancel=function(){void 0!==f&&clearTimeout(f),m=0,u=h=d=f=void 0},_.flush=I,_}},function(e,t,n){var r=n(14);e.exports=function(){return r.Date.now()}},function(e,t,n){"use strict";let r=n(50);t.check=function(e){void 0===e&&(e={});let t=e.env||n(2);return"Chrome"===t.name&&t.userAgent.toLowerCase().indexOf("android")>-1&&t.version<65},t.once=r(()=>t.check())},function(e,t,n){"use strict";let r=n(36),i=n(5);e.exports=function(e){let t,n,o,s,a,c=this,u=e.archiving,d=e.archivingStarted||"Archiv
39ing on",l=e.archivingEnded||"Archiving off",p=!0,f=function(e){s.nodeValue=e,t.setAttribute("title",e)},h=function(){a&&(clearTimeout(a),a=null),u?i.addClass(n,"OT_active"):i.removeClass(n,"OT_active"),i.removeClass(c.domElement,`OT_archiving-${!u?"on":"off"}`),i.addClass(c.domElement,`OT_archiving-${u?"on":"off"}`),e.show&&u?(f(d),i.addClass(o,"OT_mode-on"),i.removeClass(o,"OT_mode-auto"),c.setDisplayMode("on"),a=setTimeout(()=>{i.addClass(o,"OT_mode-auto"),i.removeClass(o,"OT_mode-on")},5e3)):e.show&&!p?(i.addClass(o,"OT_mode-on"),i.removeClass(o,"OT_mode-auto"),c.setDisplayMode("on"),f(l),a=setTimeout(()=>{c.setDisplayMode("off")},5e3)):c.setDisplayMode("off")};r(this,{mode:u&&e.show&&"on"||"off",nodeName:"h1",htmlAttributes:{className:"OT_archiving OT_edge-bar-item OT_edge-bottom"},onCreate(){t=i.createElement("div",{className:"OT_archiving-light-box"},""),n=i.createElement("div",{className:"OT_archiving-light"},""),t.appendChild(n),o=i.createElement("div",{className:"OT_archiving-status OT_mode-on OT_edge-bar-item OT_edge-bottom"},""),s=document.createTextNode(""),o.appendChild(s),c.domElement.appendChild(t),c.domElement.appendChild(o),h()}}),this.setShowArchiveStatus=function(t){e.show=t,c.domElement&&h.call(c)},this.setArchiving=function(e){u=e,p=!1,c.domElement&&h.call(c)}}},function(e,t,n){"use strict";e.exports=function(e){void 0===e&&(e={});let t=e.global||window;return()=>t.navigator&&t.navigator.mediaDevices}},function(e,t,n){"use strict";(function(t){let r=n(7),i=n(9),o=n(106),s=n(629),a=n(27),c=n(22),u=n(6);e.exports=function(e){void 0===e&&(e={});let d=e.env||n(2),l=e.Errors||n(4),p=e.otError||n(11)(),f=e.logging||n(1)("getUserMedia"),h=e.screenSharing||n(162)(),m=e.getDisplayMediaExtensionHelper||n(287),b=e.customGetUserMedia,g=e.global||window,v=e.analytics||new a,y=g.navigator,S=g.location,E=()=>{if(b)return b;if(y.mediaDevices){var e;return(e=y.mediaDevices).getUserMedia.bind(e)}},T=function(){let e=E();return e?e(...arguments):t.reject(Error("Cannot find getUserMedia"))},C=()=>{if(b)return b;if(y.mediaDevices&&y.getDisplayMedia)return y.getDisplayMedia.bind(y);if(y.mediaDevices&&y.mediaDevices.getDisplayMedia){var e;return(e=y.mediaDevices).getDisplayMedia.bind(e)}},R=function(){let e=C();return e?e(...arguments):t.reject(Error("Cannot find getDisplayMedia"))},I=(()=>{let e={name:l.USER_MEDIA_ACCESS_DENIED,message:"End-user denied permission to hardware devices"},t={name:l.NOT_SUPPORTED,message:"A constraint specified is not supported by the browser."},n={name:l.CONSTRAINTS_NOT_SATISFIED,message:"It's not possible to satisfy one or more constraints passed into the getUserMedia function"},i={name:l.NO_DEVICES_FOUND,message:"No voice or video input devices are available on this machine."},o={name:l.HARDWARE_UNAVAILABLE,message:"The selected voice or video devices are unavailable. Verify that the chosen devices are not in use by another application."},a={name:l.UNABLE_TO_CAPTURE_SCREEN,message:"Unable to capture screen. Unknown error occurred"},c={AbortError:{name:l.UNABLE_TO_CAPTURE_MEDIA,message:"Unable to capture media. Unknown error occurred"},NotAllowedError:e,NotFoundError:i,NotReadableError:o,OverconstrainedError:n,SecurityError:r({},e,{message:"End-user denied permission to hardware devices or user media support may be disabled on this page"}),TypeError:n,PermissionDeniedError:e,PermissionDismissedError:e,NotSupportedError:t,ConstraintNotSatisfiedError:n,MandatoryUnsatisfiedError:n,OverConstrainedError:n,DevicesNotFoundError:i,NoDevicesFoundError:i,HardwareUnavailableError:o,SourceUnavailableError:o,TrackStartError:o,ScreenCaptureError:a,TabCaptureError:a};return s({objectToTrack:c,keys:["PermissionDeniedError","PermissionDismissedError","NotSupportedError","ConstraintNotSatisfiedError","MandatoryUnsatisfiedError","OverConstrainedError","DevicesNotFoundError","NoDevicesFoundError","HardwareUnavailableError","SourceUnavailableError","TrackStartError","ScreenCaptureError","TabCaptureError"],onUsage(e){v.logEvent({action:"DeprecatedPropertyUsage:getUserMedia:errorMap",variation:"Event",payload:{key:e}})}}),c})(),_=(e,t)=>
39{let n,r=e;"AbortError"===r&&"string"==typeof t&&t.match(/(screen|tab).?capture/i)&&(r="ScreenCaptureError");let i=I[r];return(n=i?p(i.name,Error(`${i.message} (getUserMedia error: ${e})`)):Error(`Unknown error while getting user media: ${e}`)).originalMessage=t,n.originalName=e,n},w=e=>{if(i(e)&&e.name){let t=e.name,n=e.message;if(("Cannot find getUserMedia"===n||"Cannot find getDisplayMedia"===n)&&(t="Chrome"===d.name&&d.version>73&&"https:"!==g.location.protocol?"NotAllowedError":"NotSupportedError"),"Safari"===d.name&&"Error"===t){let n=Object.prototype.toString.call(e).match(/^\[object (\w+Error)\]$/);n&&(t=n[1])}let r=_(t,n);return r.constraintName=e.constraint||e.constraintName,r instanceof c||v.logEvent({action:"UnexpectedError:getUserMedia:parseErrorEvent",variation:"Event",payload:{name:r.name,message:r.message,originalMessage:r.originalMessage}}),r}if("string"==typeof e){let t=_(e);return v.logEvent({action:"CheckUnreachable:getUserMedia:parseErrorEvent",variation:"Event",payload:{info:"error is string",error:e}}),t}return v.logEvent({action:"CheckUnreachable:getUserMedia:parseErrorEvent",variation:"Event",payload:{info:"error was not string or object with name property",error:e}}),Error("Unknown error type while getting media")},x=function(e){if(!e||!i(e))return!0;for(let t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0};return function(e,n){if(void 0===n&&(n=!1),f.debug("getUserMedia wrapper called with",e),x(e))return f.error("Couldn't get UserMedia: All constraints were false"),u(t.reject(p(l.NO_VALID_CONSTRAINTS,Error("Video and Audio was disabled, you need to enable at least one"))));let r=u((n&&m.isSupportedInThisBrowser?R:T)(e).catch(e=>{let n=w(e);if(n.name===l.UNABLE_TO_CAPTURE_SCREEN)return new t((e,t)=>{h.checkCapability(e=>{if("chrome"===e.extensionRequired){if(e.extensionRegistered&&!e.extensionInstalled){let e=p(l.SCREEN_SHARING_EXTENSION_NOT_INSTALLED,n);e.message="Screen sharing extension not installed see https://tokbox.com/developer/guides/screen-sharing/js/#chrome-extension",t(e)}else if(!e.extensionRegistered){let e=p(l.SCREEN_SHARING_EXTENSION_NOT_REGISTERED,n);e.message="Screen sharing extension not registered see https://tokbox.com/developer/guides/screen-sharing/js/#chrome-extension",t(e)}}else t(n)})});throw n}).then(e=>(f.debug("got stream:",{stream:e,tracks:e.getTracks(),trackLabels:e.getTracks().map(e=>e.label)}),e))),i=-1!==S.protocol.indexOf("https")?500:100,s=!0,a=()=>{s=!1};return r.then(a,a),o(i).then(()=>{if(!s)return;let e=()=>r.emit("accessDialogClosed");r.emit("accessDialogOpened"),r.then(e,e)}),r}}}).call(this,n(0))},function(e,t,n){"use strict";e.exports=function(e){let t=void 0===e?{}:e,n=t.objectToTrack,r=t.keys,i=t.onUsage;if(!Array.isArray(r)&&void 0!==r)throw Error("keys must be an array, or undefined");if("function"!=typeof i)throw Error("onUsage must be a function");if(null==n)throw Error("Expected objectToTrack to be a trackable object");Object.keys(n).forEach(e=>{if(void 0!==r&&-1===r.indexOf(e))return;let t=n[e];Object.defineProperty(n,e,{get:()=>(i(e),t),set(n){i(e,t=n)},enumerable:!0})})}},function(e,t,n){"use strict";let r=n(2),i=n(631).isCallbackBasedAPI,o=n(265),s=null,a=(e,t)=>{s.getSources(e,t)},c=(e,t)=>{s.getSources(e).then(e=>{t(void 0,e)},t)},u=()=>i?a:c,d=(e,t)=>{u()({types:[e]},(n,r)=>{if(n)return void t(n);let i=r[0];i?t(void 0,{audio:!1,video:{mandatory:{chromeMediaSource:e,chromeMediaSourceId:i.id}}}):t(Error("Could not find Electron source for screensharing"))})};e.exports=function(e){void 0===e&&(e={});try{let t=()=>{let e=window;for(;"function"!=typeof e.require&&e.parent&&e.parent!==e;)e=e.parent;return e},n=()=>{let e=t();return(e.require?e.require("electron"):e.electron).desktopCapturer};s=e.desktopCapturer||(r.isElectron?n():null),o=e.isElectronScreenSharingSource||o}catch(e){}return{isSupportedInThisBrowser:null!==s,autoRegisters:!0,extensionRequired:!1,getConstraintsShowsPermissionUI:!1,sources:{screen:!0,application:!0,window:!0,browser:!0},register:()=>({isInstalled:e=>e(!0),getConstraints(e,t,n){o(e)?n(void 0,{audio:!0,video:!1}):d(e,n)}})}}},function(e,t,n){"use strict";let r=n(2).version<78,i=!r;e.exports={isCallbackBasedAPI:r,isPromiseBasedAPI:i}},function(e,t,n){"use strict";let r=n(2),i=n(160).default;e.exports={isSupportedInThisBrowser:!!r.isFirefox&&!i,autoRegisters:!0,extensionRequired:!1,extensionInstalled:!1,getConstraintsShowsPermissionUI:!1,sources:{screen:!0,application:!1,window:!0,browser:!1},register:()=>({isInstalled(e){e("object"==typeof OTScreenSharing)}
39,getConstraints(e,t,n){t.video={mediaSource:e},t.browserWindow&&(t.video.browserWindow=t.browserWindow,delete t.browserWindow),void 0!==t.scrollWithPage&&(t.video.scrollWithPage=t.scrollWithPage,delete t.scrollWithPage),n(void 0,t)}})}},function(e,t,n){"use strict";var r=n(3),i=r(n(12)),o=r(n(13)),s=r(n(20));let a=n(634).normaliseOptions,c=n(288).isMediaStreamTrack,u=n(148),d=n(7),l=n(140),p=n(289).default,f=n(4),h=n(48),m=n(11),b=n(290).isValidVideoContentHint,g=n(6),v=n(149),y=n(2),S=n(264),E="getUserMedia request was aborted";e.exports=function(e){void 0===e&&(e={}),["deviceHelpers","getUserMediaHelper"].forEach(t=>{u(e[t],`${t} dependency must be injected into processPubOptions`)});let t=e.generateConstraintInfo||n(255),r=e.global||window,T=e.logging||n(1)("processPubOptions"),C=e.navigator||r.navigator,R=e.screenSharing||n(162)(),I=e.env||y,_=n(635)({navigator:C||{}}),w=e,x=w.deviceHelpers,O=w.getUserMediaHelper;return(e,n,u)=>{let y=a(e,n,T),C="screen"===y.customVideoType||v(y.videoSource),w=c(y.audioSource),N=c(y.videoSource),k=!w&&null!==y.audioSource,Z=!N&&null!==y.videoSource,A=k||Z,L=e=>"boolean"==typeof e,V=!C||w||S,W=l(y,{mirror:!C&&!N,publishAudio:!0,publishVideo:!0,showControls:!0,fitMode:C?"contain":"cover",audioFallbackEnabled:V,insertDefaultUI:!0,enableRenegotiation:!1,enableStereo:!1,enableDtx:!1,disableAudioProcessing:!1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0});if(void 0===W.videoContentHint||b(W.videoContentHint)||(T.warn(`${n}: Invalid content hint. Valid content hints are "text", "detail", "motion", or ""`),W.videoContentHint=""),W.name&&(W.name=String(W.name)),L(W.enableDtx)||(W.enableDtx=!1),L(W.enableStereo)||(W.enableStereo=!1),W.constraints)T.warn(`${n}: You have passed your own constraints not using ours`);else{let e=t((0,s.default)({isScreenSharing:C,isCustomAudioTrack:w,isCustomVideoTrack:N},h(W,["audioSource","publishAudio","videoSource","publishVideo","resolution","maxResolution","frameRate","facingMode","enableRenegotiation","enableStereo","disableAudioProcessing","echoCancellation","noiseSuppression","autoGainControl"]),{env:I,usingOptionalMandatoryStyle:_(C)}));d(W,e)}let G={isScreenSharing:C,isCustomAudioTrack:w,isCustomVideoTrack:N,shouldAllowAudio:V,properties:W};return g(G),G.getUserMedia=(0,o.default)(i.default.mark(function e(){var t,s,a,c,d,l,h,b,g;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return G.emit("accessDialogOpened",...t)},s=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return G.emit("accessDialogClosed",...t)},A){e.next=7;break}return a=new r.MediaStream,w&&a.addTrack(y.audioSource),N&&a.addTrack(y.videoSource),e.abrupt("return",a);case 7:if(!C){e.next=15;break}return e.next=10,R.getConstraints({onAccessDialogOpened:t,onAccessDialogClosed:s,videoSource:y.videoSource,constraints:W.constraints});case 10:if(W.constraints=e.sent,!u()){e.next=13;break}throw m(f.CANCEL,Error(E));case 13:e.next=25;break;case 15:return e.next=17,x.shouldAskForDevices();case 17:if(c=e.sent,!u()){e.next=20;break}throw m(f.CANCEL,Error(E));case 20:T.debug(`${n}: shouldAskForDevices:`,c),c.video||(T.warn(`${n}: Setting video constraint to false, there are no video sources`),W.constraints.video=!1),c.audio||(T.warn(`${n}: Setting audio constraint to false, there are no audio sources`),W.constraints.audio=!1),G.videoDevices=c.videoDevices,G.audioDevices=c.audioDevices;case 25:if(d=W.constraints,T.debug(`${n}: onConstraintsFound`,d),!u()){e.next=29;break}throw m(f.CANCEL,Error(E));case 29:return l="Failed to acquire functional stream, this might be caused by the following iOS bug: https://bugs.webkit.org/show_bug.cgi?id=188088",h="Failed to acquire functional stream, this might be caused by the following iOS bug: https://bugs.webkit.org/show_bug.cgi?id=204106",b=e=>"NotReadableError"===e.originalName&&"Failed starting capture of a video track"===e.originalMessage,g=function(){var e=(0,o.default)(i.default.mark(function e(){var r,o,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=O(d,C)).on("accessDialogOpened",t),r.on("accessDialogClosed",s),e.prev=3,e.next=6,r;case 6:if(o=e.sent,!(I.isiOS&&W.publishVideo&&o.getVideoTracks().length&&"ended"===o.getVideoTracks()[0].readyState)){e.next=11;break}
39throw o.getTracks().forEach(e=>e.stop()),Error(l);case 11:return e.abrupt("return",o);case 14:if(e.prev=14,e.t0=e.catch(3),!I.isiOS){e.next=34;break}if(!(b(e.t0)&&I.iOSVersion>=13&&I.iOSVersion<14)){e.next=32;break}return e.prev=18,a=O({audio:!0,video:!1},!1),e.next=22,a;case 22:e.sent.getTracks().forEach(e=>e.stop()),e.next=29;break;case 26:e.prev=26,e.t1=e.catch(18),T.debug(`${n}: error disposing audio track`,e.t1);case 29:throw Error(h);case 32:if(e.t0.name!==f.HARDWARE_UNAVAILABLE){e.next=34;break}throw Error(l);case 34:throw e.t0;case 35:return e.prev=35,setTimeout(()=>{r.off("accessDialogOpened",t),r.off("accessDialogClosed",s)}),e.finish(35);case 38:case"end":return e.stop()}},e,null,[[3,14,35,38],[18,26]])}));return function(){return e.apply(this,arguments)}}(),e.next=35,p(g,(e,t)=>!(![l,h].includes(e.message)||1!==t||u())&&1e3)();case 35:if(a=e.sent,!u()){e.next=39;break}throw a.getTracks().forEach(e=>{e.stop()}),m(f.CANCEL,Error(E));case 39:return w&&a.addTrack(y.audioSource),N&&a.addTrack(y.videoSource),e.abrupt("return",a);case 42:case"end":return e.stop()}},e)})),G}}},function(e,t,n){"use strict";let r=n(288).isMediaStreamTrack,i=n(37),o=n(2);t.normaliseOptions=(e,t,n)=>{let s=e&&"object"==typeof e?i(e):{};if(!1===s.audioSource&&(s.audioSource=null),!1===s.videoSource&&(s.videoSource=null),void 0===s.minVideoBitrate||"number"==typeof s.minVideoBitrate&&s.minVideoBitrate>0||(n.warn(`${t}: Invalid minVideoBitrate in publisher properties. minVideoBitrate must be a positive number`),delete s.minVideoBitrate),void 0===s.audioBitrate||s.audioBitrate>=6e3&&s.audioBitrate<=51e4||(n.warn(`${t}: Invalid audioBitrate in publisher properties. audioBitrate must be a number between 6000 and 510000 bits per second`),delete s.audioBitrate),"Firefox"===o.name&&o.version<49){let e="Firefox 48 and below";r(s.audioSource)&&(s.audioSource=null,n.warn(`${t}: Cannot use custom tracks with ${e}. Setting audioSource to null`)),r(s.videoSource)&&(s.videoSource=null,n.warn(`${t}: Cannot use custom tracks with ${e}. Setting videoSource to null`))}return s}},function(e,t,n){"use strict";let r=n(2),i=r.name,o=r.version,s=n(258);e.exports=function(e){let t=(void 0===e?{}:e).navigator,n=void 0===t?window.navigator:t;return function(e){return e&&!s||!(n.mediaDevices&&n.mediaDevices.getUserMedia)||"Chrome"===i&&o<61}}},function(e,t,n){"use strict";e.exports=function(e){void 0===e&&(e={}),["processPubOptions"].forEach(t=>{if(!e[t])throw Error(`${t} dependency must be injected into OT.getUserMedia`)});let t=e.logging||n(1)("getUserMedia"),r=e.processPubOptions;return function(e){return void 0===e&&(e={}),r(e,"OT.getUserMedia",()=>!1).getUserMedia().catch(e=>{throw t.error(`OT.getUserMedia failed to getUserMedia: ${e}`),e})}}},function(e,t,n){"use strict";e.exports=function(e,t){let n=(t,n)=>()=>{throw Error(`Cannot ${t} ${n}, ${e} is destroyed`)};Object.keys(t).forEach(e=>{"function"==typeof t[e]?t[e]=n("call",e):Object.defineProperty(t,e,{get:n("get",e),set:n("set",e)})})}},function(e,t,n){"use strict";e.exports=e=>{if("srcObject"in e)return;let t=window&&window.URL;"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(e,"srcObject",{get(){return this._srcObject},set(e){let n=this;if(this._srcObject=e,this.src&&t.revokeObjectURL(this.src),!e){this.src="";return}return this.src=t.createObjectURL(e),e.addEventListener("addtrack",()=>{n.src&&t.revokeObjectURL(n.src),n.src=t.createObjectURL(e)}),e.addEventListener("removetrack",()=>{n.src&&t.revokeObjectURL(n.src),n.src=t.createObjectURL(e)}),this._srcObject}})}},function(e,t,n){"use strict";let r=e=>!!e&&"function"==typeof e.getBoundingClientRect,i=e=>{let t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth,i=t.top<=n&&t.top+t.height>=0,o=t.left<=r&&t.left+t.width>=0;return i&&o},o=e=>{let t=e=>!!e.style&&"hidden"===e.style.visibility||!!e.parentNode&&t(e.parentNode);return null!==e.offsetParent&&!t(e)};e.exports=e=>r(e)&&i(e)&&o(e)},function(e,t,n){"use strict";let r=n(104),i=n(5),o={0:"rotate(0deg)",270:"rotate(90deg)",90:"rotate(-90deg)",180:"rotate(180deg)"};e.exports=function(e,t,n){let s=n;r(e,{isRotated:{get(){return this.orientation()&&(270===this.orientation().videoOrientation||90===this.orientation().videoOrientation)}},orientation:{get:()=>s,set(n){s=n;let r=o[n.videoOrientation]||o.ROTATED_NORMAL;switch(i.env.name){case"Chrome":case"Safari":t().style.webkitTransform=r;break;default:t().style.transform=r}e.trigger("orientationChanged",s)}},audioChannelType:{get(){return"mozAudioChannelType"in this.domElement?this.domElement.mozAudioChannelType:"unknown"},set(e){"mozAudioChannelType"in this.domElement&&(this.domElement.mozAudioChannelType=e)}}})}},function(e,t,n){"use strict";e.exports=function(){function e(e){return e.getTracks().every(e=>"ended"===e.readyState)}return function(t,n,r){let i=[];function o(o){setTimeout(()=>{if(i.length)if(e(t))a(),"function"==typeof n&&n();else{let e=o.target;s(e),"function"==typeof r&&r(e)}},100)}function s(e){e.removeEventListener&&e.removeEventListener("ended",o),e.onended===o&&(e.onended=null);let t=i.indexOf(e);t>=0&&i.splice(t,1)}
39function a(){i.slice().forEach(s)}function c(){t.getTracks().forEach(e=>{i.push(e),e.onended=o,e.addEventListener&&e.addEventListener("ended",o)})}return c(),{stop:a,refresh:()=>{a(),c()}}}}},function(e,t,n){var r=n(64),i=n(99),o=n(35);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,i,t(e,i,o))}),n}},function(e,t,n){"use strict";e.exports=function(e,t){let n=setTimeout(()=>{e((e,n)=>{if(!e)for(let e=0;e<n.length;e+=1){let r=n[e];-1!==r.id.indexOf("_send")&&"ssrc"===r.type&&("audio"===r.kind||"audio"===r.mediaType)&&0===parseInt(r.bytesSent,10)&&t()}})},3e3);return function(){clearTimeout(n)}}},function(e,t,n){"use strict";let r=3e3;e.exports=function(e,t,n){void 0===n&&(n=!1);let i=null,o=0,s=null,a=n,c=e=>"inbound-rtp"===e.type&&"audio"===(e.kind||e.mediaType),u=e=>e.id===s&&"track"===e.type&&"audio"===(e.kind||e.mediaType),d=(e,t)=>e===i&&t===o,l=(e,t)=>!a&&0===e&&0===i&&t>o,p=()=>{setTimeout(()=>{a=!0},r)},f=setInterval(()=>{e((e,n)=>{if(e)return;s=(n.find(c)||{}).trackId;let r=n.find(u);if(r){let e=r.audioLevel,n=r.totalSamplesReceived;if(void 0===e)return;d(e,n)?(clearInterval(f),t("audioLevelStuck")):l(e,n)&&(clearInterval(f),t("audioLevelStuckAt0")),i=e,o=n}})},500);return n||p(),{stop:()=>{clearInterval(f)}}}},function(e,t,n){"use strict";(function(t){let r=new(n(27));e.exports=function(e){void 0===e&&(e={});let i=e.analytics||r,o=e.errors||n(4),s=e.ExceptionCodes||n(8),a=e.otError||n(11)(),c=e.sessionObjects||n(21),u=e.uuid||n(19);return function(e){void 0===e&&(e=()=>{});let n=u();function r(t){t?e(a(o.REPORT_ISSUE_FAILED,Error("Error calling OT.reportIssue(). Check the client's network connection."),s.REPORT_ISSUE_ERROR)):e(null,n)}0===c.sessions.length()?i.logEvent({action:"ReportIssue",variation:"Event",payload:{reportIssueId:n}},null,r):t.all(c.sessions.map(e=>e.reportIssue({id:n}))).then(()=>r(),e=>r(e))}}}).call(this,n(0))},function(e,t,n){"use strict";e.exports=e=>{let t=e.window,n=!1;try{let e=Object.defineProperty({},"passive",{get(){n=!0}});t.addEventListener("testPassive",null,e),t.removeEventListener("testPassive",null,e)}catch(e){}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=o(n(298));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var a=function(){},c=function(){function e(){s(this,e),this.internalIsCanceled=!1,this.listeners=[]}return r(e,[{key:"isCanceled",value:function(){return this.internalIsCanceled}},{key:"cancel",value:function(){this.internalIsCanceled||(this.internalIsCanceled=!0,this.listeners.forEach(function(e){return e()}),this.listeners=null)}},{key:"throwIfCanceled",value:function(){if(this.internalIsCanceled)throw new i.default("Operation has been canceled.")}},{key:"onCancel",value:function(e){var t=this;return this.internalIsCanceled?a:(this.listeners.push(e),function(){if(t.listeners){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)}})}},{key:"fork",value:function(){if(this.internalIsCanceled)return e.CANCELED;var t=new e;return this.onCancel(function(){return t.cancel()}),t}}]),e}();t.default=c,c.CANCELED=new c,c.CANCELED.internalIsCanceled=!0},function(e,t,n){"use strict";(function(t){let r=n(63),i=n(299).default,o=n(154);n(107)(),e.exports=function(e,n){let s=r(e);return i(o(new t(t=>{let n=()=>{(e.videoWidth()>2||e.videoHeight()>2)&&t(!0)};s.on("videoDimensionsChanged",n),n()}),n,()=>!1),()=>s.removeAll())}}).call(this,n(0))},function(e,t,n){"use strict";(function(t){let r=n(63),i=n(299).default,o=n(154);n(107)(),e.exports=function(e,n){void 0===n&&(n=5e3);let s=r(e);return i(o(new t(e=>{s.on("timeupdate",e),s.on("loadedmetadata",e)}),n,()=>!1),()=>s.removeAll())}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(1)("WidgetView:fixMini"),i=128,o=128,s=64,a=64;e.exports=function(e){let t=e.clientWidth,n=e.clientHeight;e.classList.remove("OT_micro"),e.classList.remove("OT_mini"),(t<s||n<a)&&(e.classList.add("OT_micro"),r.debug("OT_micro class added",{clientWidth:t,clientHeight:n,microWidth:s,microHeight:a})),(t<i||n<o)&&(e.classList.add("OT_mini"),r.debug("OT_mini class added",{clientWidth:t,clientHeight:n,miniWidth:i,miniHeight:o}))}},function(e,t,n){"use strict";let r=n(19);e.exports=function(e,t){let n,i;if(e&&e.nodeName?((n=e).getAttribute("id")&&0!==n.getAttribute("id").length||n.setAttribute("id",`OT_${r()}`),i=n.getAttribute("id")):e&&(n=document.getElementById(e))&&(i=e),i||(i=`OT_${r().replace(/-/g,"_")}`),!n)return(n=document.createElement("div")).id=i,n.setAttribute("id",i),n.style.backgroundColor="#000000",document.body.appendChild(n),n;let o=document.createElement("div");switch(o.id=`OT_${r()}`,t){case"append":return n.appendChild(o),o;case"before":return n.parentNode.insertBefore(o,n),o;case"after":return n.parentNode.insertBefore(o,n.nextSibling),o;default:for(;n.firstChild;)n.removeChild(n.firstChild);return n}}},function(e,t,n){"use strict";
39e.exports=function(e,t){return(void 0===t&&(t="px"),String(parseFloat(e,10))===String(e).trim())?`${String(e).trim()}${t}`:e}},function(e,t,n){"use strict";(function(t){let r=n(74);e.exports=function(e,n){let i=void 0===n?{}:n,o=i.frequency,s=void 0===o?60:o,a=i.timeout,c=void 0===a?2e3:a;return new t((t,n)=>{let i,o=new r(()=>{(function(){try{return e()}catch(e){return!1}})()&&(clearTimeout(i),o.stop(),t())},s);i=setTimeout(()=>{o.stop(),n(Error("TIMEOUT"))},c),o.start()})}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(11)(),i=n(4),o=n(8);e.exports=e=>"404"===String(e.code)?r(i.STREAM_NOT_FOUND,Error("stream not found"),o.UNABLE_TO_SUBSCRIBE):"409"===String(e.code)&&"streamLimitExceeded"===e.message?r(i.STREAM_LIMIT_EXCEEDED,Error("The limit for concurrent streams in the session has been reached"),o.STREAM_LIMIT_EXCEEDED):r(i.UNABLE_TO_SUBSCRIBE,Error(`subscriberCreate failed with unexpected code ${e.code}: ${e.message}`),o.UNEXPECTED_SERVER_RESPONSE)},function(e,t,n){"use strict";let r=n(26),i=n(49),o=n(103),s=n(23)();e.exports=e=>{let t=e.subscriber,n=e.audioLevelSampler,a=0,c=0,u=new o(()=>{let e=t.listenerCount(r.AUDIO_LEVEL_UPDATED);i()-c>1e4&&0===e?u.stop():(a=n.sample(),e>0&&t.dispatchEvent(new s.AudioLevelUpdatedEvent(a)))});return Object.defineProperty(t,"loudness",{get:()=>(u.start(),c=i(),a),set(){throw TypeError("Cannot set readonly property loudness")},configurable:!0}),t.listenerCount(r.AUDIO_LEVEL_UPDATED)&&u.start(),t.on("audioLevelUpdated:added",()=>{u.start()}),t.once(r.SUBSCRIBER_DESTROYED,()=>{u.stop()}),{destroy(){n.destroy(),u.stop()}}}},function(e,t,n){"use strict";let r=n(254),i=n(145),o=n(657),s=n(301),a=n(302),c=n(159)(),u=n(658),d=n(1)("Subscriber");e.exports=function(e,t){void 0===t&&(t={});let n=t.hasGetSynchronizationSupport;if(e){if(o({hasGetSynchronizationSupport:n}))return new r(e.getSynchronizationSources);if(s())return new r(e.getStats);if(a()){let e;try{e=t.audioContext||c()}catch(e){d.warn("Failed to get AudioContext()",e)}if(u(e))return new i(e)}}}},function(e,t,n){"use strict";let r=n(2),i=()=>window.RTCRtpReceiver&&"getSynchronizationSources"in window.RTCRtpReceiver.prototype;e.exports=function(e){return void 0===e&&(e={}),(e.hasGetSynchronizationSupport||i)()&&!r.isFirefox}},function(e,t,n){"use strict";e.exports=e=>window.AudioContext&&e instanceof window.AudioContext||window.webkitAudioContext&&e instanceof window.webkitAudioContext},function(e,t,n){"use strict";let r=n(36),i=n(5);e.exports=function(e){let t=!1,n=!1,o=(function(e){let r=["auto","on"].indexOf(this.getDisplayMode())>-1;i.removeClass(e,"OT_video-disabled OT_video-disabled-warning OT_active"),r&&(t?i.addClass(e,"OT_video-disabled"):n&&i.addClass(e,"OT_video-disabled-warning"),i.addClass(e,"OT_active"))}).bind(this);this.disableVideo=function(e){t=e,!0===e&&(n=!1),o(this.domElement)},this.setWarning=function(e){n=e,o(this.domElement)},r(this,{mode:e.mode||"auto",nodeName:"div",htmlAttributes:{className:"OT_video-disabled-indicator"}});let s=this.setDisplayMode.bind(this);this.setDisplayMode=function(e){s(e),o(this.domElement)}}},function(e,t,n){"use strict";let r=n(36),i=n(5);e.exports=function(e){let t=!1,n=e=>{let n=["auto","on"].indexOf(this.getDisplayMode())>-1;i.removeClass(e,"OT_audio-blocked OT_active"),n&&(t&&i.addClass(e,"OT_audio-blocked"),i.addClass(e,"OT_active"))};this.setAudioBlocked=e=>{t=e,n(this.domElement)},r(this,{mode:e.mode||"auto",nodeName:"div",htmlAttributes:{className:"OT_audio-blocked-indicator"}});let o=this.setDisplayMode.bind(this);this.setDisplayMode=e=>{o(e),n(this.domElement)}}},function(e,t,n){"use strict";let r=n(36),i=n(5);e.exports=function(e){let t=!1,n=e=>{let n=["auto","on"].indexOf(this.getDisplayMode())>-1;i.removeClass(e,"OT_active"),n&&t&&i.addClass(e,"OT_active")};this.setVideoUnsupported=e=>{t=e,n(this.domElement)},r(this,{mode:e.mode||"auto",nodeName:"div",htmlAttributes:{className:"OT_video-unsupported"},htmlContent:'<div class="OT_video-unsupported-bar"></div><div class="OT_video-unsupported-img"></div><span class="OT_video-unsupported-text">Video format not supported</span>'});let o=this.setDisplayMode.bind(this);this.setDisplayMode=e=>{o(e),n(this.domElement)}}},function(e,t,n){"use strict";let r=n(48),i=n(7),o=n(62),s=n(75),a=n(158);e.exports=function(e,t){let n;void 0===t&&(t=5e3);let c=!1,u={},d=function(e){return void 0===e&&(e=[]),o(e,e=>s.isVideoInboundRtpStat(e))},l=()=>{c||e((e,o)=>{if(!c){if(!e){let e=d(o);e?i(u,r(e,["timestamp","framesDecoded"])):u.timestamp||i(u,{timestamp:Date.now(),framesDecoded:0})}n=setTimeout(l,t)}})};return l(),{getFrameRateFromStat:e=>a({currentStatFrames:e.framesDecoded,currentTimestamp:e.timestamp,prevStatFrames:u.framesDecoded,prevTimestamp:u.timestamp}),destroy(){c=!0,n&&(clearTimeout(n),n=null)}}}},function(e,t,n){"use strict";e.exports=e=>{let t=e.connectivityState,n=e.onWarning,r=e.onTimeout,i=e.warningMs,o=e.timeoutMs,s=[],a=()=>
39{s.forEach(e=>clearTimeout(e))};t.observe({onEnterConnecting(){s.push(setTimeout(n,i),setTimeout(r,o))},onEnterConnected:a,onEnterDisconnected:a})}},function(e,t,n){"use strict";let r=n(305);e.exports=e=>new r({init:"disconnected",transitions:[{name:"beginConnect",from:"disconnected",to:"connecting"},{name:"connect",from:"connecting",to:"connected"},{name:"fail",from:["connecting","connected"],to:"disconnected"},{name:"cancel",from:["connecting","connected"],to:"disconnected"},{name:"disconnect",from:["connecting","connected"],to:"disconnected"}],methods:{onInvalidTransition:e.onInvalidTransition}})},function(e,t,n){"use strict";let r=n(74);e.exports=e=>{let t=e.connectivityState,n=new r(e.logAttempt,.2,6);t.observe({onEnterConnecting(){n.start()},onEnterDisconnected(){n.stop()},onEnterConnected(){n.stop()}})}},function(e,t,n){var r=n(667),i=n(260);e.exports=r(function(e,t,n){return e+(n?" ":"")+i(t)})},function(e,t,n){var r=n(668),i=n(669),o=n(672),s=RegExp("['’]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(s,"")),e,"")}}},function(e,t){e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}},function(e,t,n){var r=n(670),i=n(59),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
397f]/g,s=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(s,"")}},function(e,t,n){e.exports=n(671)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"})},function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e,t,n){var r=n(673),i=n(674),o=n(59),s=n(675);e.exports=function(e,t,n){return(e=o(e),void 0===(t=n?void 0:t))?i(e)?s(e):r(e):e.match(t)||[]}},function(e,t){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(n)||[]}},function(e,t){var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return n.test(e)}},function(e,t){var n="\\ud800-\\udfff",r="\\u2700-\\u27bf",i="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",s="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="['’]",c="["+s+"]",u="\\d+",d="["+r+"]",l="["+i+"]",p="[^"+n+s+u+r+i+o+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",m="["+o+"]",b="(?:"+l+"|"+p+")",g="(?:"+m+"|"+p+")",v="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",y="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",S="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",E="[\\ufe0e\\ufe0f]?",T="(?:\\u200d(?:"+["[^"+n+"]",f,h].join("|")+")"+E+S+")*",C="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",R="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",I=E+S+T,_="(?:"+[d,f,h].join("|")+")"+I,w=RegExp([m+"?"+l+"+"+v+"(?="+[c,m,"$"].join("|")+")",g+"+"+y+"(?="+[c,m+b,"$"].join("|")+")",m+"?"+b+"+"+v,m+"+"+y,R,C,u,_].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},function(e,t,n){"use strict";e.exports=(e,t)=>{let n=e.getSenders().find(e=>"video"===e.track.kind),r=n.getParameters();
39r.encodings.forEach(e=>{e.active=t}),n.setParameters(r)}},function(e,t,n){"use strict";let r=n(48);e.exports=e=>r(e,["audioDeviceId","audioFallbackEnabled","audioSource","channels","classNames","constraints","disableAudioProcessing","echoCancellation","noiseSuppression","autoGainControl","enableRenegotiation","enableStereo","facingMode","fitMode","frameRate","height","insertDefaultUI","insertMode","audioBitrate","maxResolution","minVideoBitrate","mirror","name","publishAudio","publishVideo","resolution","showControls","style","videoContentHint","videoDeviceId","videoDimensions","videoFilter","videoSource","width"])},function(e,t,n){"use strict";let r=n(26),i=n(49),o=n(103),s=n(23)();e.exports=e=>{let t=e.publisher,n=e.widgetView,a=0,c=0,u=new o(()=>{let e=t.listenerCount(r.AUDIO_LEVEL_UPDATED);if(i()-c>1e4&&0===e)return void u.stop();let o=n&&n.video();if(o){let n=o.getAudioInputLevel();a=n,e>0&&t.dispatchEvent(new s.AudioLevelUpdatedEvent(n))}});Object.defineProperty(t,"loudness",{get:()=>(u.start(),c=i(),a),set(){throw TypeError("Cannot set readonly property loudness")}}),t.listenerCount(r.AUDIO_LEVEL_UPDATED)&&u.start(),t.on("audioLevelUpdated:added",()=>{u.start()}),t.once(r.PUBLISHER_DESTROYED,()=>{u.stop()})}},function(e,t,n){"use strict";var r=n(3),i=r(n(12)),o=r(n(13));e.exports=function(e){let t=!1;return function(){var n=(0,o.default)(i.default.mark(function n(){var r,o,s,a=arguments;return i.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!t){n.next=2;break}throw Error("The previous call to this function has not yet completed.");case 2:for(t=!0,n.prev=3,o=Array(r=a.length),s=0;s<r;s++)o[s]=a[s];return n.next=7,e.call(this,...o);case 7:return n.abrupt("return",n.sent);case 8:return n.prev=8,t=!1,n.finish(8);case 11:case"end":return n.stop()}},n,this,[[3,,8,11]])}));return function(){return n.apply(this,arguments)}}()}},function(e,t,n){"use strict";let r=n(11)(),i=n(4);e.exports=function(e){let t=document.createElement("canvas");if(!t.captureStream)throw r(i.NOT_SUPPORTED,Error("Your browser does not support HTMLCanvasElement.captureStream()"));t.width=e.width,t.height=e.height,t.getContext("2d").fillRect(0,0,1,1);let n=t.captureStream().getVideoTracks()[0];return n.isCreatedCanvas=!0,n.enabled=!1,n}},function(e,t,n){"use strict";let r=e=>e.getSettings&&e.getSettings().deviceId,i=e=>{let t;return e.getConstraints&&e.getConstraints().deviceId&&(t=e.getConstraints().deviceId.exact),t},o=(e,t)=>{let n;if(t&&t.length){let r=t.find(t=>t.label===e.label);r&&(n=r.deviceId)}return n},s=(e,t)=>r(e)||i(e)||o(e,t);e.exports=(e,t)=>{if(!e)return null;let n=e.getVideoTracks()[0];return n?s(n,t):null}},function(e,t,n){"use strict";let r=n(4),i=n(8),o=n(11)();e.exports=e=>[403,404,409].includes(parseInt(e.code,10))?o(r.STREAM_CREATE_FAILED,Error(`Failed to create stream in server model: ${e.message}`),i.UNABLE_TO_PUBLISH):o(r.UNEXPECTED_SERVER_RESPONSE,Error(`Unexpected server response: ${e.message}`),i.UNEXPECTED_SERVER_RESPONSE)},function(e,t,n){"use strict";var r=n(3),i=r(n(12)),o=r(n(13));let s=n(2),a=n(684),c=n(686),u=n(1)("MediaProcessor");function d(e){let t,n,r;var s=this;void 0===e&&(e={});let d=e,l=d.ML,p=void 0===l?a:l,f=d.MediaTransform,h=void 0===f?c:f;this.isValidVideoFilter=e=>{let t=e.type;return h.isSupported(t)&&h.isValidConfig(e)},this.setVideoFilter=function(){var e=(0,o.default)(i.default.mark(function e(r){var o,a,c;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=r.type,a=h.getConfigurator(o)){e.next=5;break}return u.warn(`Ignoring: filter "${o}" isn't supported`),e.abrupt("return");case 5:if(c=a.getConfig(r)){e.next=9;break}return u.warn(`Ignoring: couldn't configure filter ${o}`),e.abrupt("return");case 9:if(!s.getVideoFilter()){e.next=20;break}return e.prev=11,e.next=14,s.destroy();case 14:e.next=20;break;case 16:return e.prev=16,e.t0=e.catch(11),u.warn(`Ignoring, couldn't remove previous filter: ${e.t0}`),e.abrupt("return");case 20:return e.next=22,p.createConnector(c);case 22:t=e.sent,n=r;case 24:case"end":return e.stop()}},e,null,[[11,16]])}));return function(t){return e.apply(this,arguments)}}(),this.getVideoFilter=()=>n,this.getOriginalVideoTrack=()=>r,this.setMediaStream=function(){var e=(0,o.default)(i.default.mark(function e(n){var o,s;return i.default.wrap(function(e){for(;;
39)switch(e.prev=e.next){case 0:if(o=n.getVideoTracks()[0]){e.next=4;break}return u.warn("Ignoring. No video track found"),e.abrupt("return",null);case 4:return s=null,e.prev=5,e.next=8,t.setTrack(o);case 8:s=e.sent,r=o,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),u.error(`Error setting media stream: ${e.t0}`);case 15:return e.abrupt("return",s);case 16:case"end":return e.stop()}},e,null,[[5,12]])}));return function(t){return e.apply(this,arguments)}}(),this.setVideoTrack=function(){var e=(0,o.default)(i.default.mark(function e(n){var o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=null,e.prev=1,e.next=4,t.setTrack(n);case 4:o=e.sent,r=n,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),u.err(`Error setting video track: ${e.t0}`);case 11:return e.abrupt("return",o);case 12:case"end":return e.stop()}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}(),this._setConnector=e=>{t=e},this.destroy=(0,o.default)(i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.destroy();case 2:t=null,n=null,r=null;case 5:case"end":return e.stop()}},e)}))}d.isSupported=function(e){void 0===e&&(e={});let t=e,n=t.env,r=void 0===n?s:n,i=t.ML,o=void 0===i?a:i;return r.isChrome&&o.isSupported()},e.exports=d},function(e,t,n){"use strict";e.exports={isSupported:()=>"u">typeof MediaStreamTrackProcessor&&"u">typeof MediaStreamTrackGenerator,setMetadata:n(685).setMetadata,createConnector:n(308).createVonageMediaProcessorConnector}},function(e,t,n){"use strict";n.r(t),(function(e,r){let i;function o(){return new e((e,t)=>{"u"<typeof MediaStreamTrackProcessor||"u"<typeof MediaStreamTrackGenerator?t("Your browser does not support the MediaStreamTrack API for Insertable Streams of Media."):e()})}n.d(t,"MediaProcessor",function(){return tA}),n.d(t,"MediaProcessorConnector",function(){return tV}),n.d(t,"isSupported",function(){return o}),n.d(t,"setMetadata",function(){return e5});class s{}s.updates={transformer_new:"New transformer",transformer_null:"Null transformer"},s.errors={transformer_none:"No transformers provided",transformer_start:"Cannot start transformer",transformer_transform:"Cannot transform frame",transformer_flush:"Cannot flush transformer"};var a,c,u={exports:{}},d=function(e,t){return function(){for(var n=Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},l=d,p=Object.prototype.toString;function f(e){return Array.isArray(e)}function h(e){return void 0===e}function m(e){return"[object ArrayBuffer]"===p.call(e)}function b(e){var t;return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer)}function g(e){return null!==e&&"object"==typeof e}function v(e){if("[object Object]"!==p.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function y(e){return"[object Function]"===p.call(e)}function S(e){return g(e)&&y(e.pipe)}function E(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),f(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function T(){var e={};function t(t,n){v(e[n])&&v(t)?e[n]=T(e[n],t):v(t)?e[n]=T({},t):f(t)?e[n]=t.slice():e[n]=t}for(var n=0,r=arguments.length;n<r;n++)E(arguments[n],t);return e}function C(e,t,n){return E(t,function(t,r){n&&"function"==typeof t?e[r]=l(t,n):e[r]=t}),e}var R={isArray:f,isArrayBuffer:m,isBuffer:function(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===p.call(e)},isArrayBufferView:b,isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:g,isPlainObject:v,isUndefined:h,isDate:function(e){return"[object Date]"===p.call(e)},isFile:function(e){return"[object File]"===p.call(e)},isBlob:function(e){return"[object Blob]"===p.call(e)},isFunction:y,isStream:S,isURLSearchParams:function(e){return"[object URLSearchParams]"===p.call(e)},isStandardBrowserEnv:function(){return(!("u">typeof navigator)||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"u">typeof window&&"u">typeof document},forEach:E,merge:T,extend:C,trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},I=R;function _(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var w=function(e,t,n){if(!t)return e;if(n)r=n(t);else if(I.isURLSearchParams(t))r=t.toString();else{var r,i=[];I.forEach(t,function(e,t){null!=e&&(I.isArray(e)?t+="[]":e=[e],I.forEach(e,function(e){I.isDate(e)?e=e.toISOString():I.isObject(e)&&(e=JSON.stringify(e)),i.push(_(t)+"="+_(e))}))}),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},x=R;function O(){this.handlers=[]}O.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},O.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},O.prototype.forEach=function(e){x.forEach(this.handlers,function(t){null!==t&&e(t)})};
39var N=O,k=R,Z=function(e,t){k.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})},A=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},L=A,V=function(e,t,n,r,i){return L(Error(e),t,n,r,i)},W=V,G=function(e,t,n){var r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(W("Request failed with status code "+n.status,n.config,null,n.request,n))},P=R,M=P.isStandardBrowserEnv()?function(){return{write:function(e,t,n,r,i,o){var s=[];s.push(e+"="+encodeURIComponent(t)),P.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),P.isString(r)&&s.push("path="+r),P.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),D=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},X=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},j=function(e,t){return e&&!D(t)?X(e,t):t},U=R,F=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Y=function(e){var t,n,r,i={};return e&&U.forEach(e.split("\n"),function(e){r=e.indexOf(":"),t=U.trim(e.substr(0,r)).toLowerCase(),n=U.trim(e.substr(r+1)),t&&(i[t]&&F.indexOf(t)>=0||("set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n))}),i},B=R,H=B.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=B.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return function(){return!0}}();function J(e){this.message=e}J.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},J.prototype.__CANCEL__=!0;var K=J,z=R,Q=G,$=M,q=w,ee=j,et=Y,en=H,er=V,ei=eh,eo=K,es=function(t){return new e(function(e,n){var r,i=t.data,o=t.headers,s=t.responseType;function a(){t.cancelToken&&t.cancelToken.unsubscribe(r),t.signal&&t.signal.removeEventListener("abort",r)}z.isFormData(i)&&delete o["Content-Type"];var c=new XMLHttpRequest;t.auth&&(o.Authorization="Basic "+btoa((t.auth.username||"")+":"+(t.auth.password?unescape(encodeURIComponent(t.auth.password)):"")));var u=ee(t.baseURL,t.url);function d(){if(c){var r="getAllResponseHeaders"in c?et(c.getAllResponseHeaders()):null,i=s&&"text"!==s&&"json"!==s?c.response:c.responseText,o={data:i,status:c.status,statusText:c.statusText,headers:r,config:t,request:c};Q(function(t){e(t),a()},function(e){n(e),a()},o),c=null}}if(c.open(t.method.toUpperCase(),q(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||4!==c.readyState||(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(n(er("Request aborted",t,"ECONNABORTED",c)),c=null)},c.onerror=function(){n(er("Network Error",t,null,c)),c=null},c.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||ei.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(er(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},z.isStandardBrowserEnv()){var l=(t.withCredentials||en(u))&&t.xsrfCookieName?$.read(t.xsrfCookieName):void 0;l&&(o[t.xsrfHeaderName]=l)}"setRequestHeader"in c&&z.forEach(o,function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete o[t]:c.setRequestHeader(t,e)}
39),z.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&"json"!==s&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(r=function(e){c&&(n(!e||e&&e.type?new eo("canceled"):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(r),t.signal&&(t.signal.aborted?r():t.signal.addEventListener("abort",r))),i||(i=null),c.send(i)})},ea=R,ec=Z,eu=A,ed={"Content-Type":"application/x-www-form-urlencoded"};function el(e,t){!ea.isUndefined(e)&&ea.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function ep(e,t,n){if(ea.isString(e))try{return(t||JSON.parse)(e),ea.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}var ef={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var e;return"u">typeof XMLHttpRequest?e=es:void 0!==r&&"[object process]"===Object.prototype.toString.call(r)&&(e=es),e}(),transformRequest:[function(e,t){return(ec(t,"Accept"),ec(t,"Content-Type"),ea.isFormData(e)||ea.isArrayBuffer(e)||ea.isBuffer(e)||ea.isStream(e)||ea.isFile(e)||ea.isBlob(e))?e:ea.isArrayBufferView(e)?e.buffer:ea.isURLSearchParams(e)?(el(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ea.isObject(e)||t&&"application/json"===t["Content-Type"]?(el(t,"application/json"),ep(e)):e}],transformResponse:[function(e){var t=this.transitional||ef.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||r&&ea.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw eu(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ea.forEach(["delete","get","head"],function(e){ef.headers[e]={}}),ea.forEach(["post","put","patch"],function(e){ef.headers[e]=ea.merge(ed)});var eh=ef,em=R,eb=eh,eg=function(e){return!!(e&&e.__CANCEL__)},ev=R,ey=function(e,t,n){var r=this||eb;return em.forEach(n,function(n){e=n.call(r,e,t)}),e},eS=eg,eE=eh,eT=K;function eC(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eT("canceled")}var eR=function(t){return eC(t),t.headers=t.headers||{},t.data=ey.call(t,t.data,t.headers,t.transformRequest),t.headers=ev.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),ev.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||eE.adapter)(t).then(function(e){return eC(t),e.data=ey.call(t,e.data,e.headers,t.transformResponse),e},function(n){return!eS(n)&&(eC(t),n&&n.response&&(n.response.data=ey.call(t,n.response.data,n.response.headers,t.transformResponse))),e.reject(n)})},eI=R,e_=function(e,t){t=t||{};var n={};function r(e,t){return eI.isPlainObject(e)&&eI.isPlainObject(t)?eI.merge(e,t):eI.isPlainObject(t)?eI.merge({},t):eI.isArray(t)?t.slice():t}function i(n){return eI.isUndefined(t[n])?eI.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function o(e){if(!eI.isUndefined(t[e]))return r(void 0,t[e])}function s(n){return eI.isUndefined(t[n])?eI.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function a(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return eI.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=c[e]||i,r=t(e);eI.isUndefined(r)&&t!==a||(n[e]=r)}),n},ew="0.25.0",ex=ew,eO={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){eO[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var eN={};eO.transitional=function(e,t,n){function r(e,t){return"[Axios v"+ex+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,o){if(!1===e)throw Error(r(i," has been removed"+(t?" in "+t:"")));return t&&!eN[i]&&(eN[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};var ek=R,eZ=w,eA=N,eL=eR,eV=e_,eW=function(e,t,n){if("object"!=typeof e)throw TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],s=t[o];if(s){var a=e[o],c=void 0===a||s(a,o,e);if(!0!==c)throw TypeError("option "+o+" must be "+c);continue}if(!0!==n)throw Error("Unknown option "+o)}},eG=eO,eP=eG;function eM(e){this.defaults=e,this.interceptors={request:new eA,response:new eA}}eM.prototype.request=function(t,n){if("string"==typeof t?(n=n||{}).url=t:n=t||{}
39,!n.url)throw Error("Provided config url is not valid");(n=eV(this.defaults,n)).method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var r,i=n.transitional;void 0!==i&&eW(i,{silentJSONParsing:eP.transitional(eP.boolean),forcedJSONParsing:eP.transitional(eP.boolean),clarifyTimeoutError:eP.transitional(eP.boolean)},!1);var o=[],s=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(n))&&(s=s&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});var a=[];if(this.interceptors.response.forEach(function(e){a.push(e.fulfilled,e.rejected)}),!s){var c=[eL,void 0];for(Array.prototype.unshift.apply(c,o),c=c.concat(a),r=e.resolve(n);c.length;)r=r.then(c.shift(),c.shift());return r}for(var u=n;o.length;){var d=o.shift(),l=o.shift();try{u=d(u)}catch(e){l(e);break}}try{r=eL(u)}catch(t){return e.reject(t)}for(;a.length;)r=r.then(a.shift(),a.shift());return r},eM.prototype.getUri=function(e){if(!e.url)throw Error("Provided config url is not valid");return eZ((e=eV(this.defaults,e)).url,e.params,e.paramsSerializer).replace(/^\?/,"")},ek.forEach(["delete","get","head","options"],function(e){eM.prototype[e]=function(t,n){return this.request(eV(n||{},{method:e,url:t,data:(n||{}).data}))}}),ek.forEach(["post","put","patch"],function(e){eM.prototype[e]=function(t,n,r){return this.request(eV(r||{},{method:e,url:t,data:n}))}});var eD=eM,eX=K;function ej(t){if("function"!=typeof t)throw TypeError("executor must be a function.");this.promise=new e(function(e){n=e});var n,r=this;this.promise.then(function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}}),this.promise.then=function(t){var n,i=new e(function(e){r.subscribe(e),n=e}).then(t);return i.cancel=function(){r.unsubscribe(n)},i},t(function(e){r.reason||(r.reason=new eX(e),n(r.reason))})}ej.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},ej.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},ej.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},ej.source=function(){var e;return{token:new ej(function(t){e=t}),cancel:e}};var eU=ej,eF=function(e){return function(t){return e.apply(null,t)}},eY=R,eB=function(e){return eY.isObject(e)&&!0===e.isAxiosError},eH=R,eJ=d,eK=eD,ez=e_;function eQ(e){var t=new eK(e),n=eJ(eK.prototype.request,t);return eH.extend(n,eK.prototype,t),eH.extend(n,t),n.create=function(t){return eQ(ez(e,t))},n}var e$=eQ(eh);e$.Axios=eK,e$.Cancel=K,e$.CancelToken=eU,e$.isCancel=eg,e$.VERSION=ew,e$.all=function(t){return e.all(t)},e$.spread=eF,e$.isAxiosError=eB,u.exports=e$,u.exports.default=e$;var eq=u.exports;class e0{isEmpty(){return!this.isPresent()}static of(e){if(null!=e)return new e1(e);throw TypeError("The passed value was null or undefined.")}static ofNonNull(e){return e0.of(e)}static ofNullable(e){return null!=e?new e1(e):new e2}static empty(){return new e2}static from(e){switch(e.kind){case"present":return e0.of(e.value);case"empty":return e0.empty();default:throw TypeError("The passed value was not an Option type.")}}}class e1 extends e0{constructor(e){super(),this.payload=e}isPresent(){return!0}get(){return this.payload}ifPresent(e){e(this.payload)}ifPresentOrElse(e,t){e(this.payload)}filter(e){return e(this.payload)?this:e0.empty()}map(e){let t=e(this.payload);return e0.ofNullable(t)}flatMap(e){return e(this.payload)}or(e){return this}orElse(e){return this.payload}orElseGet(e){return this.payload}orElseThrow(e){return this.payload}orNull(){return this.payload}orUndefined(){return this.payload}toOption(){return{kind:"present",value:this.payload}}matches(e){return e.present(this.payload)}toJSON(e){return this.payload}}class e2 extends e0{isPresent(){return!1}constructor(){super()}get(){throw TypeError("The optional is not present.")}ifPresent(e){}ifPresentOrElse(e,t){t()}filter(e){return this}map(e){return e0.empty()}flatMap(e){return e0.empty()}or(e){return e()}orElse(e){return e}orElseGet(e){return this.orElse(e())}orElseThrow(e){throw e()}
39orNull(){return null}orUndefined(){}toOption(){return{kind:"empty"}}matches(e){return e.empty()}toJSON(e){return null}}let e3="1.1.1";function e5(e){i=e}function e9(){return i}class e4{constructor(){const e=e9();this._report={action:e0.empty(),applicationId:e0.ofNullable(void 0!==e?e.appId:null),timestamp:Date.now(),fps:e0.empty(),framesTransformed:e0.empty(),guid:e0.empty(),highestFrameTransformCpu:e0.empty(),message:e0.empty(),source:e0.ofNullable(void 0!==e?e.sourceType:null),transformedFps:e0.empty(),transformerType:e0.empty(),variation:e0.empty(),videoHeight:e0.empty(),videoWidth:e0.empty(),version:e3,error:e0.empty()}}action(e){return this._report.action=e0.ofNullable(e),this}framesTransformed(e){return this._report.framesTransformed=e0.ofNullable(e),this}fps(e){return this._report.fps=e0.ofNullable(e),this}guid(e){return this._report.guid=e0.ofNullable(e),this}message(e){return this._report.message=e0.ofNullable(e),this}transformedFps(e){return this._report.transformedFps=e0.ofNullable(e),this}transformerType(e){return this._report.transformerType=e0.ofNullable(e),this}variation(e){return this._report.variation=e0.ofNullable(e),this}videoHeight(e){return this._report.videoHeight=e0.ofNullable(e),this}videoWidth(e){return this._report.videoWidth=e0.ofNullable(e),this}error(e){return this._report.error=e0.ofNullable(e),this}build(){return this._report}}let e6=e=>JSON.stringify(e,(e,t)=>{if(null!==t)return t});class e8{static report(t){return new e((e,n)=>{if(null===t.applicationId||null===t.source)return void e("success");let r=eq.create(),i={timeout:1e4,timeoutErrorMessage:"Request timeout",headers:{"Content-Type":"application/json"}},o="https://enterprise-hlg.tokbox.com/prod/logging/vcp_webrtc";r.post(o,e6(t),i).then(t=>{console.log(t),e("success")}).catch(e=>{console.log(e),n(e)})})}}var e7=new Uint8Array(16);function te(){if(!a&&!(a="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"u">typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(e7)}var tt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function tn(e){return"string"==typeof e&&tt.test(e)}for(var tr=[],ti=0;ti<256;++ti)tr.push((ti+256).toString(16).substr(1));function to(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(tr[e[t+0]]+tr[e[t+1]]+tr[e[t+2]]+tr[e[t+3]]+"-"+tr[e[t+4]]+tr[e[t+5]]+"-"+tr[e[t+6]]+tr[e[t+7]]+"-"+tr[e[t+8]]+tr[e[t+9]]+"-"+tr[e[t+10]]+tr[e[t+11]]+tr[e[t+12]]+tr[e[t+13]]+tr[e[t+14]]+tr[e[t+15]]).toLowerCase();if(!tn(n))throw TypeError("Stringified UUID is invalid");return n}function ts(e,t,n){var r=(e=e||{}).random||(e.rng||te)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return to(r)}let ta=new WeakMap,tc=new WeakMap,tu=new WeakMap,td=Symbol("anyProducer"),tl=e.resolve(),tp=Symbol("listenerAdded"),tf=Symbol("listenerRemoved"),th=!1;function tm(e){if("string"!=typeof e&&"symbol"!=typeof e)throw TypeError("eventName must be a string or a symbol")}function tb(e){if("function"!=typeof e)throw TypeError("listener must be a function")}function tg(e,t){let n=tc.get(e);return n.has(t)||n.set(t,new Set),n.get(t)}function tv(e,t){let n="string"==typeof t||"symbol"==typeof t?t:td,r=tu.get(e);return r.has(n)||r.set(n,new Set),r.get(n)}function ty(t,n,r){let i=tu.get(t);if(i.has(n))for(let e of i.get(n))e.enqueue(r);if(i.has(td)){let t=e.all([n,r]);for(let e of i.get(td))e.enqueue(t)}}function tS(t,n){n=Array.isArray(n)?n:[n];let r=!1,i=()=>{},o=[],s={enqueue(e){o.push(e),i()},finish(){r=!0,i()}};for(let e of n)tv(t,e).add(s);return{async next(){return o?0===o.length?(r?o=void 0:await new e(e=>{i=e}),this.next()):{done:!1,value:await o.shift()}:{done:!0}},async return(e){for(let e of(o=void 0,n))tv(t,e).delete(s);return i(),arguments.length>0?{done:!0,value:await e}:{done:!0}},[Symbol.asyncIterator](){return this}}}function tE(e){if(void 0===e)return tR;if(!Array.isArray(e))throw TypeError("`methodNames` must be an array of str
39ings");for(let t of e)if(!tR.includes(t)){if("string"!=typeof t)throw TypeError("`methodNames` element must be a string");throw Error(`${t} is not Emittery method`)}return e}let tT=e=>e===tp||e===tf;class tC{static mixin(e,t){return t=tE(t),n=>{if("function"!=typeof n)throw TypeError("`target` must be function");for(let e of t)if(void 0!==n.prototype[e])throw Error(`The property \`${e}\` already exists on \`target\``);function r(){return Object.defineProperty(this,e,{enumerable:!1,value:new tC}),this[e]}Object.defineProperty(n.prototype,e,{enumerable:!1,get:r});let i=t=>function(...n){return this[e][t](...n)};for(let e of t)Object.defineProperty(n.prototype,e,{enumerable:!1,value:i(e)});return n}}static get isDebugEnabled(){if("object"!=typeof r)return th;let{env:e}=r||{env:{}};return"emittery"===e.DEBUG||"*"===e.DEBUG||th}static set isDebugEnabled(e){th=e}constructor(e={}){ta.set(this,new Set),tc.set(this,new Map),tu.set(this,new Map),this.debug=e.debug||{},void 0===this.debug.enabled&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(e,t,n,r)=>{r=JSON.stringify(r),"symbol"==typeof n&&(n=n.toString());let i=new Date,o=`${i.getHours()}:${i.getMinutes()}:${i.getSeconds()}.${i.getMilliseconds()}`;console.log(`[${o}][emittery:${e}][${t}] Event Name: ${n}
40	data: ${r}`)})}logIfDebugEnabled(e,t,n){(tC.isDebugEnabled||this.debug.enabled)&&this.debug.logger(e,this.debug.name,t,n)}on(e,t){for(let n of(tb(t),e=Array.isArray(e)?e:[e]))tm(n),tg(this,n).add(t),this.logIfDebugEnabled("subscribe",n,void 0),tT(n)||this.emit(tp,{eventName:n,listener:t});return this.off.bind(this,e,t)}off(e,t){for(let n of(tb(t),e=Array.isArray(e)?e:[e]))tm(n),tg(this,n).delete(t),this.logIfDebugEnabled("unsubscribe",n,void 0),tT(n)||this.emit(tf,{eventName:n,listener:t})}once(t){return new e(e=>{let n=this.on(t,t=>{n(),e(t)})})}events(e){for(let t of e=Array.isArray(e)?e:[e])tm(t);return tS(this,e)}async emit(t,n){tm(t),this.logIfDebugEnabled("emit",t,n),ty(this,t,n);let r=tg(this,t),i=ta.get(this),o=[...r],s=tT(t)?[]:[...i];await tl,await e.all([...o.map(async e=>{if(r.has(e))return e(n)}),...s.map(async e=>{if(i.has(e))return e(t,n)})])}async emitSerial(e,t){tm(e),this.logIfDebugEnabled("emitSerial",e,t);let n=tg(this,e),r=ta.get(this),i=[...n],o=[...r];for(let e of(await tl,i))n.has(e)&&await e(t);for(let n of o)r.has(n)&&await n(e,t)}onAny(e){return tb(e),this.logIfDebugEnabled("subscribeAny",void 0,void 0),ta.get(this).add(e),this.emit(tp,{listener:e}),this.offAny.bind(this,e)}anyEvent(){return tS(this)}offAny(e){tb(e),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),this.emit(tf,{listener:e}),ta.get(this).delete(e)}clearListeners(e){for(let t of e=Array.isArray(e)?e:[e])if(this.logIfDebugEnabled("clear",t,void 0),"string"==typeof t||"symbol"==typeof t){tg(this,t).clear();let e=tv(this,t);for(let t of e)t.finish();e.clear()}else{for(let e of(ta.get(this).clear(),tc.get(this).values()))e.clear();for(let e of tu.get(this).values()){for(let t of e)t.finish();e.clear()}}}listenerCount(e){e=Array.isArray(e)?e:[e];let t=0;for(let n of e){if("string"==typeof n){t+=ta.get(this).size+tg(this,n).size+tv(this,n).size+tv(this).size;continue}for(let e of(void 0!==n&&tm(n),t+=ta.get(this).size,tc.get(this).values()))t+=e.size;for(let e of tu.get(this).values())t+=e.size}return t}bindMethods(e,t){if("object"!=typeof e||null===e)throw TypeError("`target` must be an object");for(let n of t=tE(t)){if(void 0!==e[n])throw Error(`The property \`${n}\` already exists on \`target\``);Object.defineProperty(e,n,{enumerable:!1,value:this[n].bind(this)})}}}let tR=Object.getOwnPropertyNames(tC.prototype).filter(e=>"constructor"!==e);Object.defineProperty(tC,"listenerAdded",{value:tp,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(tC,"listenerRemoved",{value:tf,writable:!1,enumerable:!0,configurable:!1});var tI=tC;function t_(e){return"object"==typeof e&&null!==e&&"message"in e&&"string"==typeof e.message}function tw(e){if(t_(e))return e;try{return Error(JSON.stringify(e))}catch{return Error(String(e))}}function tx(e){return tw(e).message}!function(e){e.FPS_DROP="fps_drop"}(c||(c={}));let tO=500,tN=.8;class tk extends tI{constructor(e,t){super(),this.index_=t,this.uuid_=ts(),this.framesTransformed_=0,this.transformer_=e,this.shouldStop_=!1,this.isFlashed_=!1,this.framesFromSource_=0,this.fps_=0,this.mediaTransformerQosReportStartTimestamp_=0,this.videoHeight_=0,this.videoWidth_=0,this.trackExpectedRate_=-1,this.transformerType_="Custom","getTransformerType"in e&&(this.transformerType_=e.getTransformerType());const n=new e4().action("MediaTransformer").guid(this.uuid_).transformerType(this.transformerType_).variation("Create").build();e8.report(n)}setTrackExpectedRate(e){this.trackExpectedRate_=e}async start(e){if(this.transformer_&&"function"==typeof this.transformer_.start)try{await this.transformer_.start(e)}catch(n){let e=new e4().action("MediaTransformer").guid(this.uuid_).message(s.errors.transformer_start).transformerType(this.transformerType_).variation("Error").error(tx(n)).build();e8.report(e);let t={eventMetaData:{transformerIndex:this.index_},error:n,function:"start"};
40this.emit("error",t)}}async transform(e,t){var n,r,i,o;if(0===this.mediaTransformerQosReportStartTimestamp_&&(this.mediaTransformerQosReportStartTimestamp_=Date.now()),this.videoHeight_=null!=(n=null==e?void 0:e.displayHeight)?n:0,this.videoWidth_=null!=(r=null==e?void 0:e.displayWidth)?r:0,++this.framesFromSource_,this.transformer_)if(this.shouldStop_)e.close(),this.flush(t),t.terminate();else try{await (null==(o=(i=this.transformer_).transform)?void 0:o.call(i,e,t)),++this.framesTransformed_,this.framesTransformed_===tO&&this.mediaTransformerQosReport()}catch(n){let e=new e4().action("MediaTransformer").guid(this.uuid_).message(s.errors.transformer_transform).transformerType(this.transformerType_).variation("Error").error(tx(n)).build();e8.report(e);let t={eventMetaData:{transformerIndex:this.index_},error:n,function:"transform"};this.emit("error",t)}}async flush(e){if(this.transformer_&&"function"==typeof this.transformer_.flush&&!this.isFlashed_){this.isFlashed_=!0;try{await this.transformer_.flush(e)}catch(n){let e=new e4().action("MediaTransformer").guid(this.uuid_).message(s.errors.transformer_flush).transformerType(this.transformerType_).variation("Error").error(tx(n)).build();e8.report(e);let t={eventMetaData:{transformerIndex:this.index_},error:n,function:"flush"};this.emit("error",t)}}this.mediaTransformerQosReport();let t=new e4().action("MediaTransformer").guid(this.uuid_).transformerType(this.transformerType_).variation("Delete").build();e8.report(t)}stop(){console.log("[Pipeline] Stop stream."),this.shouldStop_=!0}mediaTransformerQosReport(){let e=(Date.now()-this.mediaTransformerQosReportStartTimestamp_)/1e3,t=this.framesFromSource_/e,n=this.framesTransformed_/e;if(-1!=this.trackExpectedRate_&&this.trackExpectedRate_*tN>t){let e={eventMetaData:{transformerIndex:this.index_},warningType:c.FPS_DROP,dropInfo:{requested:this.trackExpectedRate_,current:t}};this.emit("warn",e)}let r=new e4().action("MediaTransformer").fps(t).transformedFps(n).framesTransformed(this.framesTransformed_).guid(this.uuid_).transformerType(this.transformerType_).videoHeight(this.videoHeight_).videoWidth(this.videoWidth_).variation("QoS").build();e8.report(r),this.mediaTransformerQosReportStartTimestamp_=0,this.framesFromSource_=0,this.framesTransformed_=0}}class tZ extends tI{constructor(e){super(),this.transformers_=[],this.trackExpectedRate_=-1;for(let t=0;t<e.length;t++){let n=new tk(e[t],t);n.on("error",e=>{this.emit("error",e)}),n.on("warn",e=>{this.emit("warn",e)}),this.transformers_.push(n)}}setTrackExpectedRate(e){for(let t of(this.trackExpectedRate_=e,this.transformers_))t.setTrackExpectedRate(this.trackExpectedRate_)}async start(e,t){if(!this.transformers_||0===this.transformers_.length)return void console.log("[Pipeline] No transformers.");try{let n=e;for(let t of this.transformers_)e=e.pipeThrough(new TransformStream(t));e.pipeTo(t).then(async()=>{console.log("[Pipeline] Setup."),await t.abort(),await n.cancel()}).catch(async r=>{e.cancel().then(()=>{console.log("[Pipeline] Shutting down streams after abort.")}).catch(e=>{console.error("[Pipeline] Error from stream transform:",e)}),await t.abort(r),await n.cancel(r)})}catch(e){this.destroy();return}console.log("[Pipeline] Pipeline started.")}async destroy(){for(let e of(console.log("[Pipeline] Destroying Pipeline."),this.transformers_))e.stop()}}class tA extends tI{constructor(){super(),this.uuid_=ts(),this.trackExpectedRate_=-1;const e=new e4().action("MediaProcessor").guid(this.uuid_).variation("Create").build();e8.report(e)}setTrackExpectedRate(e){this.trackExpectedRate_=e,this.pipeline_&&this.pipeline_.setTrackExpectedRate(this.trackExpectedRate_)}transform(e,t){return this.readable_=e,this.writable_=t,this.transformInternal()}transformInternal(){return new e((e,t)=>{if(!this.transformers_||0===this.transformers_.length){let e=new e4().action("MediaProcessor").guid(this.uuid_).message(s.errors.transformer_none).variation("Error").build();e8.report(e),t("[MediaProcessor] Need to set transformers.")}this.pipeline_&&this.pipeline_.destroy(),this.pipeline_=new tZ(this.transformers_),this.pipeline_.on("warn",e=>
40{this.emit("warn",e)}),this.pipeline_.on("error",e=>{this.emit("error",e)}),-1!=this.trackExpectedRate_&&this.pipeline_.setTrackExpectedRate(this.trackExpectedRate_),this.pipeline_.start(this.readable_,this.writable_).then(()=>{e()}).catch(e=>{t(e)})})}setTransformers(t){let n=new e4().action("MediaProcessor").guid(this.uuid_).message(s.updates.transformer_new).variation("Update").build();return(e8.report(n),this.transformers_=t,this.readable_&&this.writable_)?this.transformInternal():e.resolve()}destroy(){return new e(e=>{this.pipeline_&&this.pipeline_.destroy();let t=new e4().action("MediaProcessor").guid(this.uuid_).variation("Delete").build();e8.report(t),e()})}}class tL{constructor(){this.processor_=null,this.generator_=null}init(t){return new e((e,n)=>{try{this.processor_=new MediaStreamTrackProcessor(t)}catch(e){console.log(`[InsertableStreamHelper] MediaStreamTrackProcessor failed: ${e}`),n(e)}try{"audio"===t.kind?this.generator_=new MediaStreamTrackGenerator({kind:"audio"}):"video"===t.kind?this.generator_=new MediaStreamTrackGenerator({kind:"video"}):n("kind not supported")}catch(e){console.log(`[InsertableStreamHelper] MediaStreamTrackGenerator failed: ${e}`),n(e)}e()})}getReadable(){return this.processor_.readable}getWriteable(){return this.generator_.writable}getProccesorTrack(){return this.generator_}}class tV{constructor(e){this.insertableStreamHelper_=new tL,this.mediaProcessor_=e}setTrack(t){return new e((e,n)=>{this.insertableStreamHelper_.init(t).then(()=>{this.mediaProcessor_.transform(this.insertableStreamHelper_.getReadable(),this.insertableStreamHelper_.getWriteable()).then(()=>{e(this.insertableStreamHelper_.getProccesorTrack())}).catch(e=>{n(e)})}).catch(e=>{n(e)})})}destroy(){return new e((e,t)=>{this.mediaProcessor_?this.mediaProcessor_.destroy().then(()=>{e()}).catch(e=>{t(e)}):t("no processor")})}}}).call(this,n(0),n(43))},function(e,t,n){"use strict";let r={backgroundBlur:n(687)},i=e=>!!r[e],o=e=>i(e)?r[e]:null,s=e=>{let t=e.type;return!!i(t)&&o(t).isValidConfig(e)};e.exports={isSupported:i,getConfigurator:o,isValidConfig:s}},function(e,t,n){"use strict";var r=n(3)(n(20));let i=n(308).BlurRadius,o=n(688),s=i.High,a=()=>(0,r.default)({},o.getConfig(),{transformerType:"BackgroundBlur",radius:s}),c=e=>"low"===e||"high"===e,u=e=>"low"===e?i.Low:i.High;e.exports={isValidConfig:e=>{if((null==e?void 0:e.type)!=="backgroundBlur")return!1;let t=e.blurStrength;return!t||c(t)},getConfig:function(e){void 0===e&&(e={});let t=a(),n=e.blurStrength;return c(n)&&(t.radius=u(n)),t}}},function(e,t,n){"use strict";let r=n(34)().onlyLocal(),i=e=>{let t=e.apiUrl.includes("anvil.opentok.com")?"https://static.opentok.com":"https://www.dev.tokbox.com";return`${t}/v1.3.0/ml-transformers`};e.exports={getConfig:function(e){void 0===e&&(e={});let t=e.staticConfig,n=i(void 0===t?r:t);return{wasmAssetUriPath:`${n}/`,tfliteAssetUriPath:`${n}/models/`}}}},function(e,t,n){"use strict";e.exports=e=>null===e||!1===e},function(e,t,n){"use strict";e.exports=e=>{var t;let n=!!(e&&(null==(t=e.videoSource)?void 0:t.canvas)),r=!!(e&&"videoContentHint"in e);n&&!r&&(e.videoContentHint="detail")}},function(e,t,n){"use strict";let r=n(149),i=e=>!!(null==e?void 0:e.scalableScreenshare);e.exports=e=>{var t;e||(e={});let n=!!r(null==(t=e)?void 0:t.videoSource);e.capableSimulcastScreenshare=n&&i(e)}},function(e,t,n){var r=n(693),i=n(99),o=n(35);e.exports=function(e,t){return r(e,o(t,3),i)}},function(e,t){e.exports=function(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}},function(e,t,n){"use strict";(function(t){let r=n(51),i=n(73);e.exports=e=>{let n,o,s=e.RTCPeerConnection,a=e.env,c=e.stream,u=e.codecFlags;if(a.isLegacyEdge)return!0;let d=()=>{try{n.close()}catch(e){}try{o.close()}catch(e){}n=null,o=null};try{let e={iceServers:[]};i()&&(e.sdpSemantics="plan-b"),n=new s(e),o=new s(e),n.addStream(c)}catch(e){return d(),t.resolve(!1)}return n.createOffer().then(e=>{let t={type:e.type,sdp:e.sdp};return Object.keys(u).forEach(e=>{u[e]||(t.sdp=r.removeVideoCodec(t.sdp,e))}),o.setRemoteDescription(t)}).then(()=>!0).catch(()=>!1).then(e=>(d(),e))}}).call(this,n(0))},function(e,t,n){"use strict";let r=n(4).INVALID_PARAMETER;e.exports=e=>{let t=e.otError;return e=>{if(!e)return;let n=(e,n)=>{if(!e)throw t(r,Error(`iceConfig invalid: ${n}`))};"includeServers"in e&&n(-1!==["all","custom"].indexOf(e.includeServers),".includeServers must be all or custom"),"transportPolicy"in e&&n(-1!==["all","relay"].indexOf(e.transportPolicy),".transportPolicy must be all or relay"),n(Array.isArray(e.customServers),".customServers must be an array"),e.customServers.forEac
40h(e=>{n(e.urls||!("url"in e),"ice servers need .urls, not .url"),n("string"==typeof e.urls||Array.isArray(e.urls),"ice server .urls must be a string or an array"),n(!e.username||"string"==typeof e.username,"ice server .username must be a string if present"),n(!e.credential||"string"==typeof e.credential,"ice server .credential must be a string if present")})}}},function(e,t,n){"use strict";let r=n(8);e.exports=function(e){switch(e){case r.AUTHENTICATION_ERROR:case r.INVALID_SESSION_ID:case r.TERMS_OF_SERVICE_FAILURE:case r.UNEXPECTED_SERVER_RESPONSE:return e;case r.ANVIL_EMPTY_RESPONSE_BODY:case r.ANVIL_CONNECT_FAILED:return r.CONNECT_FAILED;case r.ANVIL_BADLY_FORMED_RESPONSE:case r.ANVIL_INVALID_HTTP_STATUS:case r.ANVIL_XDOMAIN_OR_PARSING_ERROR:case r.ANVIL_UNKNOWN_HTTP_ERROR:case r.ANVIL_UNEXPECTED_ERROR_CODE:default:return r.UNEXPECTED_SERVER_RESPONSE}}},function(e,t,n){"use strict";let r=n(8),i=n(4);e.exports={NOT_CONNECTED:{code:i.NOT_CONNECTED,message:"Cannot use forceMute functionality. You are not connected to the session.",exceptionCode:r.NOT_CONNECTED},PERMISSION_DENIED:{code:i.PERMISSION_DENIED,message:"This token does not allow forceMute usage. The role must be at least `moderator` to enable this functionality",exceptionCode:r.UNABLE_TO_FORCE_MUTE},INVALID_PARAMETER:{code:i.INVALID_PARAMETER,message:"Invalid Parameter. Check that you have passed valid parameter values into the method call.",exceptionCode:r.INVALID_PARAMETER},NOT_FOUND:{code:i.NOT_FOUND,message:"The stream does not exist."},UNEXPECTED_SERVER_RESPONSE:{code:i.UNEXPECTED_SERVER_RESPONSE,message:"An unexpected error occurred.",exceptionCode:r.UNEXPECTED_SERVER_RESPONSE}}},function(e,t,n){"use strict";(function(e){var r=n(3);t.__esModule=!0,t.default=l;var i=r(n(20)),o=r(n(15)),s=r(n(7)),a=r(n(50)),c=r(n(19)),u=r(n(313)),d=r(n(699));function l(t){void 0===t&&(t={});let r=t.convertRumorError||n(311),l=t.Dispatcher||n(315),p=t.ExceptionCodes||n(8),f=t.hasIceRestartsCapability||n(312),h=t.hasRenegotiationCapability||n(715),m=t.logging||n(1)("RaptorSocket"),b=t.Message||n(316),g=t.OTHelpers||n(5),v=t.RumorSocket||(0,d.default)(),y=t.Signal||n(317),S=t.SignalError||n(720),E=function t(n,d,f,h,E,T,C){let R,I,_,w,x,O,N,k;var Z=this;void 0===C&&(C=[]);let A=["disconnected","connecting","connected","error","disconnecting"],L=E||new l,V=g.statable(this,A,"disconnected"),W=function(e){e.action&&e.variation||m.debug("Expected action and variation"),T.logEvent((0,s.default)({sessionId:I,partnerId:R,p2p:O,messagingServer:N,connectionId:n},e))},G=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0]?V("error"):V("connected"),x(...t)},P=e=>{let t="clientDisconnected";!this.is("disconnecting")&&k&&(t="networkDisconnected"),e&&4001===e.code&&(t="networkTimedout"),V("disconnected"),L.onClose(t)},M=e=>{k=!0,m.error(e)},D=()=>{L.onReconnecting()},X=()=>{W({action:"Reconnect",variation:"Success",retries:this._rumor.reconnectRetriesCount(),messageQueueSize:this._rumor.messageQueueSize(),socketId:this.socketId}),L.onReconnected()},j=()=>{W({action:"Reconnect",variation:"Attempt",retries:this._rumor.reconnectRetriesCount(),messageQueueSize:this._rumor.messageQueueSize(),socketId:this.socketId})},U=e=>{"connectionLimitExceeded"===e.message&&(e.code=p.CONNECTION_LIMIT_EXCEEDED),e.reason="ConnectToSession";let t=r(e);W({action:"Reconnect",variation:"Failure",failureReason:e.reason,failureCode:t.code,failureMessage:t.message,messageQueueSize:this._rumor.messageQueueSize(),socketId:this.socketId})};Object.defineProperty(this,"socketId",{get(){return this._rumor.socketID}}),this.connect=function(r,i,o,s){if(!this.is("disconnected","error"))return void m.warn("Cannot connect the Raptor Socket as it is currently connected. You should disconnect first.");V("connecting"),R=i.partnerId,I=i.sessionId,O=i.p2pEnabled,N=i.messagingServer,_=r,x=s,w={apiKey:R,sessionId:I};let a=`/v2/partner/${R}/session/${I}`;this._rumor=new t.RumorSocket({messagingURL:f,notifyDisconnectAddress:h,connectionId:n,enableReconnection:i.reconnection}),this._rumor.on("close",P),this._rumor.on("error",M),this._rumor.on("reconnecting",D),this._rumor.on("reconnectAttempt",j),this._rumor.on("reconnectFailure",U),this._rumor.on("reconnected",X),this._rumor.on("message",L.dispatch.bind(L));let u=e=>{G({reason:"WebSocketConnection",code:e.code,message:e.message})};this._rumor.once("error",u),this._rumor.once("open",()=>{this._rumor.removeListener("error",u),m.debug(`connected. Subscribing to ${a} on ${f}`),this._rumor.subscribe([a]);let n=C;(t.hasIceRestartsCapability()||t.hasRenegotiationCapability())&&i.renegotiation&&n.push("renegotiation");let r=b.connections.create({apiKey:R,sessionId:I,connectionId:this._rumor.id,connectionEventsSuppressed:o.connectionEventsSuppressed,capabilities:n}),s=new e(e=>{let t=n=>{n.id===this._rumor.id&&(e(n),E.off("connection#created",t))};E.on("connection#created",t)});this.publish(r,{"X-TB-TOKEN-AUTH":_},!0,(e,t)=>{if(e){"connectionLimitExceeded"===e.message&&(e.code=p.CONNECTION_LIMIT_EXCEEDED),G({reason:"ConnectToSession",code:e.code,message:e.message,socketId:this.socketId});return}let n=t&&t.data?JSON.parse(t.data):null;n&&(!n.connection||0===n.connection.length)&&(n.connection=[],Array.isArray(n.stream)&&n.stream.forEach(e
40=>{let t=e.connection;return n.connection.push(t)}));let r=(e,t)=>{e?G({reason:"GetSessionState",code:e.code,message:e.message,socketId:this.socketId}):G(void 0,t)};s.then(e=>{n.connection.some(t=>t.id===e.id)||n.connection.unshift(e);let t=(0,c.default)();L.registerCallback(t,r),L.emit("session#read",n,t)})})})},this.disconnect=function(){this.is("disconnected")||(V("disconnecting"),this._rumor.disconnect())},this.publish=function(e,t,n,r){r=r||function(){};let i=(0,a.default)(r),o=(0,c.default)();if(m.debug(`Publish (ID:${o}) ${e}`),this._rumor.readyState!==v.OPEN||this._rumor.reconnecting&&!n){let e=Error("Not connected.");e.code=500,i(e),m.error("cannot publish until the socket is connected.");return}return L.registerCallback(o,i),this._rumor.publish([h],e,(0,s.default)({},t,{"Content-Type":"application/x-raptor+v2","TRANSACTION-ID":o,"X-TB-FROM-ADDRESS":this._rumor.id}),n,function(e){e&&i(...arguments)}),o},this.send=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=()=>{}),Z.publish((0,u.default)(e),t,n,r)},this.streamCreate=function(e,t,n,r,i,o,s,a){let c={apiKey:R,sessionId:I,streamId:t,name:e,audioFallbackEnabled:n,channels:r,minBitrate:i,maxBitrate:o,sourceStreamId:s},u=b.streams.create(c);this.publish(u,{},!0,(e,n)=>{a(e,t,n)})},this.streamDestroy=function(e,t){this.publish(b.streams.destroy(R,I,e,t),{},!0)},this.streamChannelUpdate=function(e,t,n){this.publish(b.streamChannels.update(R,I,e,t,n),{},!0)},this.subscriberCreate=function(e,t,n,r,i){let o={apiKey:R,sessionId:I,streamId:e,subscriberId:t,connectionId:this._rumor.id,channelsToSubscribeTo:n,sourceStreamId:r};this.publish(b.subscribers.create(o),{},!0,i)},this.subscriberDestroy=function(e,t){this.publish(b.subscribers.destroy(R,I,e,t),{},!0)},this.subscriberUpdate=function(e,t,n){this.publish(b.subscribers.update(R,I,e,t,n),{},!0)},this.subscriberChannelUpdate=function(e,t,n,r){this.publish(b.subscriberChannels.update(R,I,e,t,n,r),{},!0)},this.forceDisconnect=function(e,t){this.publish(b.connections.destroy({apiKey:R,sessionId:I,connectionId:e}),{},!0,t)},this.forceUnpublish=function(e,t){this.publish(b.streams.destroy(R,I,e),{},!0,t)},this.forceMuteStream=function(e,t){let n={streamId:e,active:!0};this.publish(b.forceMute.update((0,i.default)({},w,n)),{},!0,t)},this.forceMuteAll=function(e,t,n){let r={excludedStreamIds:e,active:t};this.publish(b.forceMute.update((0,i.default)({},w,r)),{},!0,n)},this.signal=function(e,t,n){let r=new y(I,this._rumor.id,e||{});if(!r.valid){t&&(0,o.default)(t)&&t(new S(r.error.code,r.error.reason),r.toHash());return}this.publish(r.toRaptorMessage(),{},r.retryAfterReconnect,e=>{let i,s,a,c=[400,403,404,413,500];if(e){let t=parseInt(e.code,10);c.includes(t)?(s=t,a=e.message):(s=p.UNEXPECTED_SERVER_RESPONSE,a="Unexpected server response. Try this operation again later."),i=new S(s,a)}else n("signal","send",{type:r.data?typeof r.data:null});t&&(0,o.default)(t)&&t(i,r.toHash())})},this.id=function(){return this._rumor&&this._rumor.id}};return E.hasIceRestartsCapability=f,E.hasRenegotiationCapability=h,E.RumorSocket=v,E}}).call(this,n(0))},function(e,t,n){"use strict";var r=n(3);t.__esModule=!0,t.default=d;var i=r(n(42)),o=r(n(700)),s=r(n(1)),a=r(n(701)),c=r(n(706)),u=r(n(711));function d(e){let t=(void 0===e?{}:e).WebSocket,n=void 0===t?u.default:t,r=(0,o.default)(),d=(0,a.default)({EventEmitter:i.default,WebSocket:n,logging:s.default,allocateId:r});return(0,c.default)({EventEmitter:i.default,ReconnectableSocket:d,logging:s.default,allocateId:r})}},function(e,t,n){"use strict";function r(){let e=0;return()=>e+=1}t.__esModule=!0,t.default=r},function(e,t,n){"use strict";var r=n(3);t.__esModule=!0,t.default=void 0;var i=r(n(12)),o=r(n(13)),s=r(n(157)),a=r(n(46)),c=r(n(60)),u=r(n(18)),d=r(n(314)),l=n(76),p=r(n(702)),f=r(n(63)),h=r(n(703)),m=r(n(705));let b=e=>function(){e(...arguments)},g=e=>1e3===e||e>=3e3&&e<=4999,v=l.codes.CLOSE_TIMEOUT;t.default=e=>{var t,n;let r=e.EventEmitter,l=e.WebSocket,y=e.logging,S=e.allocateId,E=e.BUFFER_DRAIN_INTERVAL,T=void 0===E?100:E,C=e.BUFFER_DRAIN_MAX_RETRIES,R=void 0===C?10:C;return n=t=function(e){function t(n){var r;let a="string"==typeof n?{url:n}:n,c=a.url,l=a.connectTimeout,f=void 0===l?15e3:l,m=a.pingThreshold,g=void 0===m?3e3:m,v=a.pingWarningDelay,E=void 0===v?100:v,T=a.disconnectThreshold,C=void 0===T?5900:T,R=a.reconnectMaxDuration,I=void 0===R?6e4:R;
40if(!c)throw Error("Must provide url");r=e.call(this)||this,(0,u.default)((0,s.default)(r),"_url",void 0),(0,u.default)((0,s.default)(r),"_id",S()),(0,u.default)((0,s.default)(r),"_logger",y(`ReconnectableSocket:${r._id}`)),(0,u.default)((0,s.default)(r),"_webSocket",void 0),(0,u.default)((0,s.default)(r),"_connectTimer",void 0),(0,u.default)((0,s.default)(r),"_pingTimer",void 0),(0,u.default)((0,s.default)(r),"_pingWarningTimer",void 0),(0,u.default)((0,s.default)(r),"_disconnectTimer",void 0),(0,u.default)((0,s.default)(r),"_queuedMessages",[]),(0,u.default)((0,s.default)(r),"_draining",!1),r.readyStateMachine=(0,h.default)({reconnectMaxDuration:I,CLOSED:t.CLOSED,CLOSING:t.CLOSING}),r._url=c,(0,d.default)({logger:r._logger,obj:(0,s.default)(r),eventNames:["error","open","message","needsPing","reconnecting","reconnectAttempt","reconnectFailure","reconnected","close"]}),r.readyStateMachine.observe("onEnterOpen",e=>{let t=e.from;r._resetPingTimers(),r._resetDisconnectTimer(),r._connectTimer.clear(),"reconnecting"===t?(r._queuedMessages.forEach(e=>r.send(e,!0)),r._queuedMessages=[],r.emit("reconnected")):r.emit("open")}),r.readyStateMachine.observe("onEnterClosed",(e,t)=>{r.emit("close",t)}),r.readyStateMachine.observe("onEnterClosing",b(function(){var e=(0,o.default)(i.default.mark(function e(t,n){var o,s,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.from,s=n.code,a=n.reason,r._clearTimers(),e.next=5,r._clearSocket({drain:"open"===o,code:s,reason:a});case 5:"reconnecting"===o&&r.emit("reconnectFailure",{code:s,reason:a}),setTimeout(()=>{r.readyStateMachine.closed({code:s,reason:a})});case 7:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}())),r.readyStateMachine.observe("onEnterReconnecting",()=>{r.emit("reconnecting")}),r.readyStateMachine.observe("onDisconnect",b(function(){var e=(0,o.default)(i.default.mark(function e(t,n){var o,s,a,c;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.from,s=t.to,a=n.code,c=n.reason,"reconnecting"!==s){e.next=10;break}if(!r._draining){e.next=5;break}return e.abrupt("return");case 5:return r._clearTimers(),r.emit("reconnectAttempt"),e.next=9,r._clearSocket({drain:"open"===o,code:a,reason:c});case 9:r._createSocket();case 10:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()));let _=(e,t)=>new p.default({name:e,duration:t,logger:r._logger});return r._connectTimer=_("connect",f),r._pingTimer=_("ping",g),r._pingWarningTimer=_("pingWarning",E),r._disconnectTimer=_("disconnect",C),r._createSocket(),r}(0,c.default)(t,e),(0,a.default)(t,[{key:"url",get:function(){return"function"==typeof this._url?this._url():this._url}},{key:"reconnecting",get:function(){return"reconnecting"===this.readyStateMachine.state}},{key:"binaryType",get:function(){return this._webSocket.binaryType}},{key:"bufferedAmount",get:function(){return this._webSocket.bufferedAmount}},{key:"protocol",get:function(){return this._webSocket.protocol}},{key:"extensions",get:function(){return this._webSocket.extensions}},{key:"readyState",get:function(){return({reconnecting:t.OPEN,open:t.OPEN,closing:t.CLOSING,closed:t.CLOSED,connecting:t.CONNECTING})[this.readyStateMachine.state]}}]);var n=t.prototype;return n._createSocket=function(){let e=new l(this.url);e.binaryType="arraybuffer";let n=(0,f.default)(e);n.on("open",()=>{this.readyStateMachine.open()}),n.on("close",e=>{let t=e.code,n=e.reason;this.readyStateMachine.disconnect({code:t,reason:n})}),n.on("error",e=>{this.emit("error",e)}),n.on("message",e=>{this.readyState!==t.CLOSING&&this._resetDisconnectTimer(),this.emit("message",e)}),this._webSocket=e,this._webSocketEvents=n,this._connectTimer.reset(()=>{let e={code:v,reason:"Timeout while opening connection"},t=Error(e.reason);t.code=v,this.emit("error",t),this.readyStateMachine.disconnect(e)})},n._clearSocket=function(){var e=(0,o.default)(i.default.mark(function e(n){var r,o,s,a,c;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=void 0!==(o=(r=void 0===n?{}:n).drain)&&o,a=r.code,c=r.reason,this._draining=!0,this._webSocketEvents&&this._webSocketEvents.removeAll(),this._webSocket.readyState===t.CLOSED){e.next=8;break}if(!s){e.next=7;break}return e.next=7,(0,m.default)(this._webSocket,{BUFFER_DRAIN_INTERVAL:T,BUFFER_DRAIN_MAX_RETRIES:R});case 7:try{g(a)&&(void 0!==a||void 0!==c)?this._webSocket.close(a,c):this._webSocket.close()}catch(e){y.error("Could not close websocket",e)}case 8:this._draining=!1;case 9:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),n.send=function(e,n){void 0===n&&(n=!0),this.readyState===t.OPEN&&this._resetPingTimers();let r=()=>{try{return this._webSocket.send(e),"sent"}catch(e){if(this._webSocket.readyState===l.OPEN)return this._logger.debug("webSocket.send threw exception even though it was open:",e),"dropped";throw e}};if("reconnecting"===this.readyStateMachine.state){if(this._webSocket.readyState===l.OPEN)try{r()}catch(e){}return n?(this._queuedMessages.push(e),"queued"):(this._logger.debug("Dropping message during reconnection since retryAfterReconnect is false:",e),"dropped")}return r()},n.close=function(e,n){if(this.readyState===t.CLOSING)throw Error("Can not call close on a closing ReconnectableSocket");if(this.readyState===t.CLOSED)throw Error("Can not call close on an already closed ReconnectableSocket");this.readyStateMachine.close({code:e,reason:n})},n._resetPingTimers=function(){this._pingWarningTimer.clear(),this._pingTimer.reset(()=>{this._pingWarningTimer.reset(()=>{this._logger.warn("Did not send message after needsPing event. Other side may disconnect.")}
40),this.emit("needsPing")})},n._resetDisconnectTimer=function(){this._disconnectTimer.reset(()=>this.readyStateMachine.disconnect({code:v,reason:"No activity"}))},n._clearTimers=function(){[this._disconnectTimer,this._connectTimer,this._pingTimer,this._pingWarningTimer].forEach(e=>e.clear())},t}(r),(0,u.default)(t,"CONNECTING",l.CONNECTING),(0,u.default)(t,"OPEN",l.OPEN),(0,u.default)(t,"CLOSING",l.CLOSING),(0,u.default)(t,"CLOSED",l.CLOSED),n}},function(e,t,n){"use strict";var r=n(3);t.__esModule=!0,t.default=void 0;var i=r(n(18));t.default=function(){function e(e){let t=e.name,n=e.logger,r=e.duration;(0,i.default)(this,"name",void 0),(0,i.default)(this,"logger",void 0),(0,i.default)(this,"duration",void 0),(0,i.default)(this,"currId",void 0),this.name=t,this.logger=n,this.duration=r}var t=e.prototype;return t.reset=function(e){this.clear();let t=setTimeout(()=>{void 0!==this.currId&&(this.logger.spam(`${this.name} timer with id ${this.currId} expired, entering callback`),this.currId=void 0,e())},this.duration);this.currId=t,this.logger.spam(`Started ${this.name} timer with id ${this.currId}, expires in ${this.duration}ms`)},t.clear=function(){void 0!==this.currId&&(clearTimeout(this.currId),this.logger.spam(`Cleared ${this.name} timer with id ${this.currId}`),this.currId=void 0)},t.isRunning=function(){return void 0!==this.currId},e}()},function(e,t,n){"use strict";var r=n(3);t.__esModule=!0,t.default=void 0;var i=r(n(305)),o=r(n(704)),s=n(76);let a=(0,r(n(1)).default)("ReconnectableSocketStateMachine"),c=s.codes.CLOSE_UNSUPPORTED,u=s.codes.CLOSE_UNEXPECTED_CONDITION;t.default=e=>{let t,n=e.reconnectMaxDuration,r=e.CLOSED,s=e.CLOSING;function d(e){let i=e.code;return("open"!==this.state&&t||(t=(0,o.default)(n)),n>0&&!t()&&-1===[c,u].indexOf(i)&&-1===[r,s].indexOf(this.readyState))?"reconnecting":"closing"}return new i.default({init:"connecting",methods:{onInvalidTransition(e,t,n){a.error("Invalid state transition",{transition:e,from:t,to:n})}},transitions:[{name:"open",from:["connecting","reconnecting"],to:"open"},{name:"close",from:["connecting","reconnecting","open"],to:"closing"},{name:"closed",from:"closing",to:"closed"},{name:"disconnect",from:["reconnecting","open","connecting"],to:d}]})}},function(e,t,n){"use strict";e.exports=e=>{let t=!1;return setTimeout(()=>{t=!0},e),()=>t}},function(e,t,n){"use strict";var r=n(3);t.__esModule=!0,t.default=void 0;var i=r(n(12)),o=r(n(13)),s=r(n(106));t.default=function(){var e=(0,o.default)(i.default.mark(function e(t,n){var r,o,a,c,u,d;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=void 0===(o=(r=void 0===n?{}:n).BUFFER_DRAIN_INTERVAL)?100:o,u=void 0===(c=r.BUFFER_DRAIN_MAX_RETRIES)?10:c,d=0;case 2:if(!(d<u)){e.next=10;break}if(0!==t.bufferedAmount){e.next=5;break}return e.abrupt("break",10);case 5:return e.next=7,(0,s.default)(a);case 7:d+=1,e.next=2;break;case 10:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()},function(e,t,n){"use strict";var r=n(108),i=n(3);t.__esModule=!0,t.default=void 0;var o=i(n(157)),s=i(n(46)),a=i(n(60)),c=i(n(18)),u=i(n(19)),d=i(n(314)),l=i(n(707)),p=r(n(172)),f=i(n(710)),h=n(76);t.default=e=>{var t,n;let r=e.EventEmitter,i=e.ReconnectableSocket,m=e.logging,b=e.allocateId;return n=t=function(e){function t(t){var n;let r=t.messagingURL,s=t.notifyDisconnectAddress,a=t.connectionId,p=t.enableReconnection,g=t.pingThreshold,v=void 0===g?2e3:g,y=t.disconnectThreshold,S=void 0===y?(p?3:25)*v-100:y,E=t.reconnectMaxDuration,T=void 0===E?6e4*!!p:E;n=e.call(this)||this,(0,c.default)((0,o.default)(n),"url",void 0),(0,c.default)((0,o.default)(n),"id",void 0),(0,c.default)((0,o.default)(n),"_opened",!1),(0,c.default)((0,o.default)(n),"_socket",void 0),(0,c.default)((0,o.default)(n),"_reconnectAttempts",0),(0,c.default)((0,o.default)(n),"_socketID",(0,u.default)()),(0,c.default)((0,o.default)(n),"_receivedTransactionIDs",[]),(0,c.default)((0,o.default)(n),"_notifyDisconnectAddress",void 0),(0,c.default)((0,o.default)(n),"_enableReconnection",void 0),(0,c.default)((0,o.default)(n),"_pendingMessages",[]),(0,c.default)((0,o.default)(n),"_logger",m(`RumorSocket:${b()}`)),(0,d.default)({logger:n._logger,obj:(0,o.default)(n),eventNames:["open","message","error","reconnecting","reconnectAttempt","reconnectFailure","reconnected","close"]}),n.url=r,n.id=a,n._notifyDisconnectAddress=s,n._enableReconnection=p,n.on("error",e=>{n._logger.error(e.message)});try{n._socket=new i({url:()=>n._enableReconnection?[n.url,n.url.indexOf("?")>=0?"&":"?",`socketId=${n._socketID}`,n._socket&&n._socket.reconnecting?"&reconnect=true":"",`&attempt=${(0,u.default)()}`].join(""):n.url,pingThreshold:v,disconnectThreshold:S,reconnectMaxDuration:T})}catch(e){n._logger.error(e),n.emit("error",new f.default(h.codes.CLOSE_CONNECT_EXCEPTION))}let C=()=>{n._opened=!0,n._socket.send(l.default.Connect(n.id,s).serialize()),n.emit("open",n.id)};return n._socket.once("open",C),n._socket.on("message",e=>n._receiveMessage(e)),n._socket.once("close",e=>{n._logger.debug(`ReconnectableSocket closed (code: ${e.code}
40)`),n._clearPendingMessages(),-1===[h.codes.CLOSE_NORMAL,h.codes.CLOSE_GOING_AWAY,h.codes.CLOSE_TIMEOUT].indexOf(e.code)&&n.emit("error",new f.default(e.code,e.reason||e.message)),n.emit("close",e)}),n._socket.on("error",e=>{let t=e.code;return n.emit("error",new f.default(t))}),n._socket.on("needsPing",()=>{n._socket.send(l.default.Ping().serialize())}),n._socket.on("reconnecting",()=>{n._opened&&(n._clearPendingMessagesWhichShouldntRetry(),n.emit("reconnecting"),n._reconnectAttempts=0)}),n._socket.on("reconnectAttempt",()=>{n._opened&&(n._reconnectAttempts+=1,n._socket.send(l.default.Disconnect("1").serialize(),!1),n.emit("reconnectAttempt"))}),n._socket.on("reconnected",()=>{n._opened?(n._pendingMessages.forEach(e=>{n._socket.send(e.rumorMessage.serialize())}),n.emit("reconnected")):C()}),n._socket.on("reconnectFailure",()=>{n._opened&&(n._logger.debug(`Reconnecting failed as connectivity was not restored within ${T}ms`),n.emit("reconnectFailure",new f.default))}),n}(0,a.default)(t,e),(0,s.default)(t,[{key:"readyState",get:function(){return this._socket?this._socket.readyState:i.CONNECTING}},{key:"reconnecting",get:function(){return this._opened&&this._socket&&this._socket.reconnecting}}]);var n=t.prototype;return n._clearPendingMessagesWhichShouldntRetry=function(){let e=this._pendingMessages.filter(e=>!e.retryAfterReconnect);this._pendingMessages=this._pendingMessages.filter(e=>e.retryAfterReconnect),e.forEach(e=>{let t=Error("Not connected.");t.code=500,e.completion(t)})},n._clearPendingMessages=function(){this._pendingMessages.forEach(e=>{let t=Error("Not connected.");t.code=500,e.completion(t)}),this._pendingMessages=[]},n._sendAck=function(e){this._socket.send(l.default.Status([e.fromAddress],{"TRANSACTION-ID":e.headers["TRANSACTION-ID"],"X-TB-FROM-ADDRESS":this.id}).serialize())},n._receiveMessage=function(e){let t=l.default.deserialize(e.data);if(t.type!==p.PONG){if(this._logger.debug("Received:",t),t.transactionId&&(this._pendingMessages=this._pendingMessages.filter(e=>(e.rumorMessage.transactionId===t.transactionId&&(this._logger.debug("Marking",t.transactionId," as received"),e.completion(void 0,t)),e.rumorMessage.transactionId!==t.transactionId))),t.transactionId&&t.type!==p.STATUS){if(this._sendAck(t),this._receivedTransactionIDs.indexOf(t.transactionId)>=0)return;this._receivedTransactionIDs.push(t.transactionId)}this.emit("message",t)}},n.publish=function(e,t,n,r,i){void 0===i&&(i=()=>{});let o=l.default.Publish(e,t,n);if("dropped"===this._socket.send(o.serialize(),!1)&&!r){let e=Error("Not connected.");e.code=500,i(e);return}
40this._pendingMessages.push({rumorMessage:o,retryAfterReconnect:r,completion:i})},n.subscribe=function(e){this._socket.send(l.default.Subscribe(e).serialize())},n.unsubscribe=function(e){this._socket.send(l.default.Unsubscribe(e).serialize())},n.disconnect=function(){if(this.readyState===t.OPEN&&this._socket.send(l.default.Disconnect().serialize()),this._socket.readyState!==i.CLOSED&&this._socket.readyState!==i.CLOSING){let e=h.codes.CLOSE_NORMAL;this._socket.close(e,h.messages[e])}},n.status=function(e,t){this._socket.send(l.default.Status(e,{"TRANSACTION-ID":t,"X-TB-FROM-ADDRESS":this.id}).serialize())},n.reconnectRetriesCount=function(){return this._reconnectAttempts},n.messageQueueSize=function(){return this._pendingMessages.length},(0,s.default)(t,[{key:"socketID",get:function(){return this._socketID}}]),t}(r),(0,c.default)(t,"CONNECTING",i.CONNECTING),(0,c.default)(t,"OPEN",i.OPEN),(0,c.default)(t,"CLOSING",i.CLOSING),(0,c.default)(t,"CLOSED",i.CLOSED),n}},function(e,t,n){"use strict";var r=n(108),i=n(3);t.__esModule=!0,t.default=void 0;var o=i(n(18)),s=i(n(19)),a=n(708),c=r(n(172));let u=e=>{let t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let t=0;t<e.length;++t)n[t]=e[t];return t};t.default=function(){function e(e,t,n,r){(0,o.default)(this,"type",void 0),(0,o.default)(this,"toAddress",void 0),(0,o.default)(this,"headers",void 0),(0,o.default)(this,"data",void 0),this.type=e,this.toAddress=t,this.headers=n,this.data=r,this.fromAddress=this.headers["X-TB-FROM-ADDRESS"],this.transactionId=this.headers["TRANSACTION-ID"],this.status=this.headers.STATUS,this.isError=this.status&&"2"!==this.status[0]}return e.prototype.serialize=function(){let e,t,n,r,i=8,o=7,s=[],c=[],u=[];for(o++,n=0;n<this.toAddress.length;n++)s.push(new a.TextEncoder("utf-8").encode(this.toAddress[n])),o+=2,o+=s[n].length;for(let e in o++,n=0,this.headers)this.headers.hasOwnProperty(e)&&(c.push(new a.TextEncoder("utf-8").encode(e)),u.push(new a.TextEncoder("utf-8").encode(this.headers[e])),o+=4,o+=c[n].length,o+=u[n].length,n++);let d=new ArrayBuffer(o+=(t=new a.TextEncoder("utf-8").encode(this.data)).length),l=new Uint8Array(d,0,o);for(o-=4,l[0]=(0xff000000&o)>>>24,l[1]=(0xff0000&o)>>>16,l[2]=(65280&o)>>>8,l[3]=(255&o)>>>0,l[4]=0,l[5]=0,l[6]=this.type,l[7]=this.toAddress.length,n=0;n<s.length;n++)for(r=0,e=s[n],l[i++]=e.length>>8&255,l[i++]=255&e.length;r<e.length;r++)l[i++]=e[r];for(n=0,l[i++]=c.length;n<c.length;n++){for(r=0,e=c[n],l[i++]=e.length>>8&255,l[i++]=255&e.length;r<e.length;r++)l[i++]=e[r];for(r=0,e=u[n],l[i++]=e.length>>8&255,l[i++]=255&e.length;r<e.length;r++)l[i++]=e[r]}for(n=0;n<t.length;n++)l[i++]=t[n];return d},e.deserialize=function(t){let n,r,i,o,s,c,d,l;window.Buffer&&window.Buffer.isBuffer(t)&&(t=u(t));let p=8,f=new Uint8Array(t);n=f[6];let h=[];for(l=0;l<f[7];l++)d=(f[p++]<<8)+f[p++],r=new Uint8Array(t,p,d),h[l]=new a.TextDecoder("utf-8").decode(r),p+=d;for(l=0,i=f[p++],o={};l<i;l++)d=(f[p++]<<8)+f[p++],r=new Uint8Array(t,p,d),s=new a.TextDecoder("utf-8").decode(r),p+=d,d=(f[p++]<<8)+f[p++],r=new Uint8Array(t,p,d),c=new a.TextDecoder("utf-8").decode(r),o[s]=c,p+=d;let m=new Uint8Array(t,p);return new e(n,h,o,new a.TextDecoder("utf-8").decode(m))},e.Connect=function(t,n){let r={uniqueId:t,"TRANSACTION-ID":(0,s.default)(),notifyDisconnectAddress:n};return new e(c.CONNECT,[],r,"")},e.Disconnect=function(t){return new e(c.DISCONNECT,[],{reconnect:t},"")},e.Subscribe=function(t){return new e(c.SUBSCRIBE,t,{},"")},e.Unsubscribe=function(t){return new e(c.UNSUBSCRIBE,t,{},"")},e.Publish=function(t,n,r){return new e(c.MESSAGE,t,r||{},n||"")},e.Status=function(t,n){return new e(c.STATUS,t,n||{},"")},e.Ping=function(){return new e(c.PING,[],{},"")},e}()},function(e,t,n){"use strict";var r=n(108);t.__esModule=!0,t.TextDecoder=t.TextEncoder=void 0;var i=r(n(709));t.TextEncoder=window.TextEncoder||i.TextEncoder,t.TextDecoder=window.TextDecoder||i.TextDecoder},function(e,t,n){"use strict";function r(e,t,n){return t<=e&&e<=n}function i(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function o(e){for(var t=String(e),n=t.length,r=0,i=[];r<n;){var o=t.charCodeAt(r);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319)if(r===n-1)i.push(65533);else{var s=e.charCodeAt(r+1);if(56320<=s&&s<=57343){var a=1023&o,c=1023&s;i.push(65536+(a<<10)+c),r+=1}else i.push(65533)}r+=1}return i}function s(e){for(var t="",n=0;n<e.length;++n){var r=e[n];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode((r>>10)+55296,(1023&r)+56320))}return t}n.r(t),n.d(t,"TextEncoder",function(){return f}),n.d(t,"TextDecoder",function(){return p});var a=-1;function c(e){this.tokens=[].slice.call(e)}
40c.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():a},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var u=-1;function d(e,t){if(e)throw TypeError("Decoder error");return t||65533}var l="utf-8";function p(e,t){if(!(this instanceof p))return new p(e,t);if((e=void 0!==e?String(e).toLowerCase():l)!==l)throw Error("Encoding not supported. Only utf-8 is supported");t=i(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function f(e,t){if(!(this instanceof f))return new f(e,t);if((e=void 0!==e?String(e).toLowerCase():l)!==l)throw Error("Encoding not supported. Only utf-8 is supported");t=i(t),this._streaming=!1,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function h(e){var t=e.fatal,n=0,i=0,o=0,s=128,c=191;this.handler=function(e,l){if(l===a&&0!==o)return o=0,d(t);if(l===a)return u;if(0===o){if(r(l,0,127))return l;if(r(l,194,223))o=1,n=l-192;else if(r(l,224,239))224===l&&(s=160),237===l&&(c=159),o=2,n=l-224;else{if(!r(l,240,244))return d(t);240===l&&(s=144),244===l&&(c=143),o=3,n=l-240}return n<<=6*o,null}if(!r(l,s,c))return n=o=i=0,s=128,c=191,e.prepend(l),d(t);if(s=128,c=191,i+=1,n+=l-128<<6*(o-i),i!==o)return null;var p=n;return n=o=i=0,p}}function m(e){e.fatal,this.handler=function(e,t){if(t===a)return u;if(r(t,0,127))return t;r(t,128,2047)?(n=1,i=192):r(t,2048,65535)?(n=2,i=224):r(t,65536,1114111)&&(n=3,i=240);for(var n,i,o=[(t>>6*n)+i];n>0;){var s=t>>6*(n-1);o.push(128|63&s),n-=1}return o}}p.prototype={decode:function(e,t){n="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=i(t),this._streaming||(this._decoder=new h({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var n,r,o=new c(n),a=[];!o.endOfStream()&&(r=this._decoder.handler(o,o.read()))!==u;)null!==r&&(Array.isArray(r)?a.push.apply(a,r):a.push(r));if(!this._streaming){do{if((r=this._decoder.handler(o,o.read()))===u)break;if(null===r)continue;Array.isArray(r)?a.push.apply(a,r):a.push(r)}while(!o.endOfStream());this._decoder=null}return!a.length||-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0,a.shift()):this._BOMseen=!0),s(a)}},f.prototype={encode:function(e,t){e=e?String(e):"",t=i(t),this._streaming||(this._encoder=new m(this._options)),this._streaming=!!t.stream;for(var n,r=[],s=new c(o(e));!s.endOfStream()&&(n=this._encoder.handler(s,s.read()))!==u;)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this._streaming){for(;(n=this._encoder.handler(s,s.read()))!==u;)Array.isArray(n)?r.push.apply(r,n):r.push(n);this._encoder=null}return new Uint8Array(r)}}},function(e,t,n){"use strict";var r=n(108),i=n(3);t.__esModule=!0,t.default=void 0;var o=i(n(18)),s=r(n(76));t.default=function(e,t){void 0===e&&(e=s.codes.CLOSE_FALLBACK_CODE),void 0===t&&(t=s.messages[e]||"No message available from code."),(0,o.default)(this,"code",void 0),(0,o.default)(this,"message",void 0),this.code=e,this.message=t}},function(e,t,n){"use strict";var r=n(3);t.__esModule=!0,t.default=void 0;var i=r(n(712));t.default=window.WebSocket?window.WebSocket:i.default},function(e,t,n){"use strict";e.exports=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(e,t,n){"use strict";let r=n(714);e.exports=function(e){let t=r(e.data);return t.transactionId=e.transactionId,t.fromAddress=e.headers["X-TB-FROM-ADDRESS"],t}},function(e,t,n){"use strict";e.exports=function(e){if(0===e.length)return{};let t=JSON.parse(e),n=t.uri.substr(1).split("/");n.shift(),""===n[n.length-1]&&n.pop(),t.params={};for(let e=0,r=n.length;e<r-1;e+=2)t.params[n[e]]=n[e+1];return n.length%2==0?"channel"===n[n.length-2]&&n.length>6?t.resource=`${n[n.length-4]}_${n[n.length-2]}`:t.resource=n[n.length-2]:"channel"===n[n.length-1]&&n.length>5?t.resource=`${n[n.length-3]}_${n[n.length-1]}`:t.resource=n[n.length-1],t.signature=`${t.resource}#${t.method}`,t}},function(e,t,n){"use strict";let r=n(2).name,i=n(61).once;e.exports=()=>i()&&["Chrome","Firefox","Safari"].indexOf(r)>-1},function(e,t,n){"use strict";let r=n(2),i=n(61).once;e.exports=()=>i()&&("Chrome"===r.name||"Firefox"===r.name||"Node"===r.name||"Safari"===r.name||"Edge"===r.name)},function(e,t,n){"use strict";let r=n(61).once;e.exports=()=>r()},function(e,t,n){"use strict";e.exports="DTLS_SRTP"},function(e,t,n){"use strict";e.exports=function(e){let t=e.supportsWebRTC;return{supportsWebRTC:"true"===t||!0===t}}},function(e,t,n){"use strict";
40e.exports=function(e,t){this.code=e,this.message=t,this.reason=t}},function(e,t,n){"use strict";e.exports=function(e){let t=[];this.enqueue=function(){t.push(Array.prototype.slice.call(arguments))},this.triggerAll=function(){let n;for(;n=t.shift();)e.trigger(...n)}}},function(e,t,n){"use strict";var r=n(3)(n(20));let i=n(207),o=n(240),s=n(57),a=n(7),c=n(141),u=n(8),d=n(723),l=n(724),p=n(289).default,f={EMPTY_RESPONSE:"Response body was empty, probably due to connectivity loss",BADLY_FORMED:"Unknown error: JSON response was badly formed",NO_ERROR:"No error message",UNEXPECTED_SERVER_RESPONSE:e=>`Unexpected server response (${e}). Try this operation again later.`},h=[0,600,1200];e.exports=function(e){let t=void 0===e?{}:e,n=t.axios,m=void 0===n?i:n,b=t.retryDelays,g=void 0===b?h:b;return p(function(e){let t=e.anvilUrl,n=e.sessionId,i=e.token,p=e.clientVersion,h=e.connectionId,b=o.parse(t,!0),g=o.format({protocol:b.protocol,auth:b.auth,host:b.host,pathname:o.resolve((b.pathname||"").replace(/\/?$/,"/"),`session/${n}`),query:(0,r.default)({},b.query,{extended:!0})});return m.get(g,{validateStatus:e=>e>=200&&e<300,headers:{"X-OPENTOK-AUTH":i,"X-TB-VERSION":1,"X-TB-CLIENT-VERSION":p,"X-TB-CONNECTIONID":h,Accept:"application/json"}}).catch(e=>{if(e.response){let t=Error(f.UNEXPECTED_SERVER_RESPONSE(`${e.response.statusCode}${e.response.status?` ${e.response.status}`:""}`));throw t.code=u.ANVIL_INVALID_HTTP_STATUS,t.name=d(t.code),t}if(e.request){let e=Error(f.CONNECT_FAILED);throw e.code=u.ANVIL_CONNECT_FAILED,e.name=d(e.code),e}{let t=u.ANVIL_UNKNOWN_HTTP_ERROR,n=d(e.code);throw a(e,{code:t,name:n}),e}}).then(e=>{let t=e.data;if("string"==typeof t){if(t.length>0)try{JSON.parse(t)}catch(e){throw e.message=f.UNEXPECTED_SERVER_RESPONSE(e.toString()),e.code=u.ANVIL_XDOMAIN_OR_PARSING_ERROR,e.name=d(e.code),e}let e=Error(0===t.length?f.EMPTY_RESPONSE:f.BADLY_FORMED);throw e.code=0===t.length?u.ANVIL_EMPTY_RESPONSE_BODY:u.ANVIL_BADLY_FORMED_RESPONSE,e.name=d(e.code),e}if(null===t||0===t.length){let e=Error(f.EMPTY_RESPONSE);throw e.code=u.ANVIL_EMPTY_RESPONSE_BODY,e.name=d(e.code),e}let n=t.filter(e=>null!=e.error)[0];if(n){let e=l(s(n,"error.code","500"));"Invalid token format"===s(n,"error.errorMessage.message")&&(n.error.errorMessage.message+=` Token: ${i}`);let t=Error(s(n,"error.errorMessage.message",void 0===e?`Unknown error: ${n.error.code}`:f.NO_ERROR));throw t.code=e||u.ANVIL_UNEXPECTED_ERROR_CODE,t.name=d(t.code),t}return new c(t[0])})},(e,t)=>e.code&&e.code>=3e3&&e.code<=3007&&g[t])}},function(e,t,n){"use strict";let r=n(8),i=n(4),o={[r.ANVIL_BADLY_FORMED_RESPONSE]:i.BADLY_FORMED_RESPONSE,[r.ANVIL_INVALID_HTTP_STATUS]:i.INVALID_HTTP_STATUS,[r.ANVIL_XDOMAIN_OR_PARSING_ERROR]:i.XDOMAIN_OR_PARSING_ERROR,[r.ANVIL_UNKNOWN_HTTP_ERROR]:i.UNKNOWN_HTTP_ERROR,[r.ANVIL_UNEXPECTED_ERROR_CODE]:i.UNEXPECTED_ERROR_CODE,[r.ANVIL_EMPTY_RESPONSE_BODY]:i.EMPTY_RESPONSE_BODY,[r.ANVIL_CONNECT_FAILED]:i.CONNECT_FAILED,[r.AUTHENTICATION_ERROR]:i.AUTHENTICATION_ERROR,[r.INVALID_SESSION_ID]:i.INVALID_SESSION_ID,[r.TERMS_OF_SERVICE_FAILURE]:i.TERMS_OF_SERVICE_FAILURE,[r.UNEXPECTED_SERVER_RESPONSE]:i.UNEXPECTED_SERVER_RESPONSE};e.exports=function(e){return o[e]}},function(e,t,n){"use strict";let r=n(8),i={400:r.INVALID_SESSION_ID,403:r.AUTHENTICATION_ERROR,404:r.INVALID_SESSION_ID,409:r.TERMS_OF_SERVICE_FAILURE,500:r.UNEXPECTED_SERVER_RESPONSE};e.exports=function(e){return i[e]}},function(e,t,n){"use strict";e.exports=function(e){void 0===e&&(e={});let t=e.Session||n(310)(),r=e.sessionObjects||n(21);return function(e,n,i){null==n&&(n=e,e=null),Array.isArray(n)&&1===n.length&&(n=n[0]);let o=r.sessions.get(n);return o||(o=new t(e,n,i),r.sessions.add(o)),o}}},function(e,t,n){"use strict";var r=n(3),i=r(n(12)),o=r(n(13));let s=n(727),a=n(273),c=n(2),u=n(4),d=n(8),l=n(11)(),p=n(51),f=n(73),h=n(142)(window);function m(e){return a(s(e,["AV1X","AV1","VP9","rtx","red","ulpfec","H265","X-H264UC","x-ulpfecuc"]))}e.exports=function(){var e=(0,o.default)(i.default.mark(function e(){var t,n,r,o,s,a,b;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("u">typeof window){e.next=2;break}return e.abrupt("return",{videoEncoders:[],videoDecoders:[]});case 2:if(t=h.RTCPeerConnection,!(window.RTCRtpSender&&"getCapabilities"in window.RTCRtpSender)){e.next=7;break}return n=m(n=window.RTCRtpSender.getCapabilities("video").codecs.map(e=>e.mimeType||e.name).map(e=>e.replace("video/",""))),e.abrupt("return",{videoEncoders:n,videoDecoders:n});case 7:if("Chrome"!==c.name||"captureStream"in window.HTMLCanvasElement.prototype){e.next=9;break}return e.abrupt("return",{videoEncoders:["VP8"],videoDecoders:["VP8"]});case 9:if(!c.isLegacyEdge){e.next=11;break}return e.abrupt("return",{videoEncoders:["H264","VP8"],videoDecoders:["H264","VP8"]});case 11:return(r=window.document.createElement("canvas")).getContext("2d"),o=r.captureStream(),e.prev=14,a={iceServers:[]},f()&&(a.sdpSemantics="plan-b"),(s=new t(a)).addTrack?s.addTrack(o.getVideoTracks()[0],o):s.addStream&&s.addStream(o),e.next=21,s.createOffer();case 21:return b=e.sent,n=m(n=p.getCodecs(b.sdp,"video")||[]),e.abrupt("return",{videoEncoders:n,videoDecoders:n});case 27:throw e.prev=27,e.t0=e.catch(14),l(u.UNABLE_TO_ACCESS_MEDIA_ENGINE,Error("OT.getSupp
40ortedCodecs was not able to get the list of supported codecs"),d.UNABLE_TO_ACCESS_MEDIA_ENGINE);case 30:return e.prev=30,s.close(),e.finish(30);case 33:case"end":return e.stop()}},e,null,[[14,27,30,33]])}));return function(){return e.apply(this,arguments)}}()},function(e,t,n){var r=n(728),i=n(238),o=n(87),s=n(129);e.exports=o(function(e,t){return s(e)?r(e,i(t,1,s,!0)):[]})},function(e,t,n){var r=n(92),i=n(93),o=n(128),s=n(33),a=n(68),c=n(94),u=200;e.exports=function(e,t,n,d){var l=-1,p=i,f=!0,h=e.length,m=[],b=t.length;if(!h)return m;n&&(t=s(t,a(n))),d?(p=o,f=!1):t.length>=u&&(p=c,f=!1,t=new r(t));e:for(;++l<h;){var g=e[l],v=null==n?g:n(g);if(g=d||0!==g?g:0,f&&v==v){for(var y=b;y--;)if(t[y]===v)continue e;m.push(g)}else p(t,v,d)||m.push(g)}return m}},function(e,t,n){"use strict";let r=n(24)().getInputMediaDevices;e.exports=function(e){r().then(t=>e(void 0,t),e)}},function(e,t,n){"use strict";var r=n(3),i=r(n(12)),o=r(n(13));e.exports=function(e){void 0===e&&(e={});let t=e.deviceHelpers||n(24)(),r=t.hasAudioOutputApiSupport,s=t.hasDevice,a=e.getAudioOutputDevices||n(321),c=e.updateSubscribersSinkId||n(323),u=n(11)(),d=n(4);return function(){var e=(0,o.default)(i.default.mark(function e(t){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r()){e.next=2;break}throw u(d.UNSUPPORTED_BROWSER,Error("setAudioOutputDevice is not supported in your browser."));case 2:return e.next=4,a();case 4:if(s(e.sent,t)){e.next=8;break}throw u(d.INVALID_AUDIO_OUTPUT_SOURCE,Error("The requested device is not valid."));case 8:return e.prev=8,e.next=11,c(t);case 11:e.next=16;break;case 13:throw e.prev=13,e.t0=e.catch(8),u(d.REQUESTED_DEVICE_PERMISSION_DENIED,Error("No permission to use the requested device."));case 16:case"end":return e.stop()}},e,null,[[8,13]])}));return function(t){return e.apply(this,arguments)}}()}},function(e,t,n){"use strict";var r=n(3),i=r(n(12)),o=r(n(13));let s=n(732)(),a=n(24)(),c=a.hasAudioOutputApiSupport,u=a.getNativeMediaDevices;e.exports=()=>{if(c()){let e=u(),t=!1;e.addEventListener("devicechange",(0,o.default)(i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=2;break}return e.abrupt("return");case 2:return t=!0,e.next=5,s();case 5:t=!1;case 6:case"end":return e.stop()}},e)})))}}},function(e,t,n){"use strict";var r=n(3),i=r(n(12)),o=r(n(13));e.exports=function(e){void 0===e&&(e={});let t=e.deviceHelpers||n(24)(),r=t.getAudioOutputMediaDevices,s=t.getDefaultAudioOutputDeviceId,a=t.hasDevice,c=e.currentAudioOutputDevice||n(105),u=c.getCurrentAudioOutputDeviceId,d=c.setCurrentAudioOutputDeviceId,l=e.updateSubscribersSinkId||n(323),p=e.logging||n(1)("currentAudioOutputDevice");return function(){var e=(0,o.default)(i.default.mark(function e(){var t,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:if(0!==(t=e.sent).length){e.next=6;break}return d(""),e.abrupt("return");case 6:if(!a(t,u())){e.next=9;break}return e.abrupt("return");case 9:return d(n=s(t)),e.prev=11,e.next=14,l(n);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(11),p.debug("Failed to set the default audio output device.",e.t0);case 19:case"end":return e.stop()}},e,null,[[11,16]])}));return function(){return e.apply(this,arguments)}}()}}])})}}]);
41//# sourceMappingURL=75e9221f-2be189cdaae071c4.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.