!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TRTC=t()}(this,(function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function t(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){u(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(){n=function(){return e};var e={},t=Object.prototype,i=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(A){u=function(e,t,n){return e[t]=n}}function d(e,t,n,i){var a=t&&t.prototype instanceof p?t:p,o=Object.create(a.prototype),s=new w(i||[]);return r(o,"_invoke",{value:k(e,n,s)}),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=d;var h={};function p(){}function f(){}function m(){}var v={};u(v,o,(function(){return this}));var _=Object.getPrototypeOf,g=_&&_(_(R([])));g&&g!==t&&i.call(g,o)&&(v=g);var y=m.prototype=p.prototype=Object.create(v);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(r,a,o,s){var c=l(e[r],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(d).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,s)}))}s(c.arg)}var a;r(this,"_invoke",{value:function(e,i){function r(){return new t((function(t,r){n(e,i,t,r)}))}return a=a?a.then(r,r):r()}})}function k(e,t,n){var i="suspendedStart";return function(r,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw a;return C()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=T(o,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=l(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function T(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,T(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var r=l(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function I(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function R(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=m,r(y,"constructor",{value:m,configurable:!0}),r(m,"constructor",{value:f,configurable:!0}),f.displayName=u(m,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},S(b.prototype),u(b.prototype,s,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,i,r,a){void 0===a&&(a=Promise);var o=new b(d(t,n,i,r),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(y),u(y,c,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=R,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},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 o.type="throw",o.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(o)},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),h},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),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function r(e,t,n,i,r,a,o){try{var s=e[a](o),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(i,r)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,c,"next",e)}function c(e){r(o,i,a,s,c,"throw",e)}s(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,R(i.key),i)}}function c(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function f(e,t,n){return f=p()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&h(r,n.prototype),r},f.apply(null,arguments)}function m(e){var t="function"==typeof Map?new Map:void 0;return m=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return f(e,arguments,l(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),h(i,e)},m(e)}function v(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){var t=p();return function(){var n,i=l(e);if(t){var r=l(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return _(this,n)}}function y(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}function S(){return S="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=y(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},S.apply(this,arguments)}function b(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a,o,s=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);c=!0);}catch(d){u=!0,r=d}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw r}}return s}}(e,t)||I(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function w(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=I(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function R(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function C(e,t,n,i,r){var a={};return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce((function(n,i){return i(e,t,n)||n}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}var A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},x=function(e){return e&&e.Math==Math&&e},P=x("object"==typeof globalThis&&globalThis)||x("object"==typeof window&&window)||x("object"==typeof self&&self)||x("object"==typeof A&&A)||function(){return this}()||Function("return this")(),D={},M=function(e){try{return!!e()}catch(t){return!0}},O=!M((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),N=!M((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),L=N,U=Function.prototype.call,V=L?U.bind(U):function(){return U.apply(U,arguments)},F={},j={}.propertyIsEnumerable,B=Object.getOwnPropertyDescriptor,H=B&&!j.call({1:2},1);F.f=H?function(e){var t=B(this,e);return!!t&&t.enumerable}:j;var G,z,W=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},J=N,q=Function.prototype,K=q.call,Q=J&&q.bind.bind(K,K),X=function(e){return J?Q(e):function(){return K.apply(e,arguments)}},$=X,Y=$({}.toString),Z=$("".slice),ee=function(e){return Z(Y(e),8,-1)},te=ee,ne=X,ie=function(e){if("Function"===te(e))return ne(e)},re=M,ae=ee,oe=Object,se=ie("".split),ce=re((function(){return!oe("z").propertyIsEnumerable(0)}))?function(e){return"String"==ae(e)?se(e,""):oe(e)}:oe,ue=function(e){return null==e},de=ue,le=TypeError,he=function(e){if(de(e))throw le("Can't call method on "+e);return e},pe=ce,fe=he,me=function(e){return pe(fe(e))},ve="object"==typeof document&&document.all,_e={all:ve,IS_HTMLDDA:void 0===ve&&void 0!==ve},ge=_e.all,ye=_e.IS_HTMLDDA?function(e){return"function"==typeof e||e===ge}:function(e){return"function"==typeof e},Se=ye,be=_e.all,ke=_e.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Se(e)||e===be}:function(e){return"object"==typeof e?null!==e:Se(e)},Te=P,Ie=ye,Ee=function(e){return Ie(e)?e:void 0},we=function(e,t){return arguments.length<2?Ee(Te[e]):Te[e]&&Te[e][t]},Re=ie({}.isPrototypeOf),Ce=we("navigator","userAgent")||"",Ae=P,xe=Ce,Pe=Ae.process,De=Ae.Deno,Me=Pe&&Pe.versions||De&&De.version,Oe=Me&&Me.v8;Oe&&(z=(G=Oe.split("."))[0]>0&&G[0]<4?1:+(G[0]+G[1])),!z&&xe&&(!(G=xe.match(/Edge\/(\d+)/))||G[1]>=74)&&(G=xe.match(/Chrome\/(\d+)/))&&(z=+G[1]);var Ne=z,Le=Ne,Ue=M,Ve=!!Object.getOwnPropertySymbols&&!Ue((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Le&&Le<41})),Fe=Ve&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,je=we,Be=ye,He=Re,Ge=Object,ze=Fe?function(e){return"symbol"==typeof e}:function(e){var t=je("Symbol");return Be(t)&&He(t.prototype,Ge(e))},We=String,Je=function(e){try{return We(e)}catch(t){return"Object"}},qe=ye,Ke=Je,Qe=TypeError,Xe=function(e){if(qe(e))return e;throw Qe(Ke(e)+" is not a function")},$e=Xe,Ye=ue,Ze=function(e,t){var n=e[t];return Ye(n)?void 0:$e(n)},et=V,tt=ye,nt=ke,it=TypeError,rt={exports:{}},at=P,ot=Object.defineProperty,st=function(e,t){try{ot(at,e,{value:t,configurable:!0,writable:!0})}catch(n){at[e]=t}return t},ct=st,ut="__core-js_shared__",dt=P[ut]||ct(ut,{}),lt=dt;(rt.exports=function(e,t){return lt[e]||(lt[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.25.5",mode:"global",copyright:"漏 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE",source:"https://github.com/zloirock/core-js"});var ht=he,pt=Object,ft=function(e){return pt(ht(e))},mt=ft,vt=ie({}.hasOwnProperty),_t=Object.hasOwn||function(e,t){return vt(mt(e),t)},gt=ie,yt=0,St=Math.random(),bt=gt(1..toString),kt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+bt(++yt+St,36)},Tt=P,It=rt.exports,Et=_t,wt=kt,Rt=Ve,Ct=Fe,At=It("wks"),xt=Tt.Symbol,Pt=xt&&xt.for,Dt=Ct?xt:xt&&xt.withoutSetter||wt,Mt=function(e){if(!Et(At,e)||!Rt&&"string"!=typeof At[e]){var t="Symbol."+e;Rt&&Et(xt,e)?At[e]=xt[e]:At[e]=Ct&&Pt?Pt(t):Dt(t)}return At[e]},Ot=V,Nt=ke,Lt=ze,Ut=Ze,Vt=function(e,t){var n,i;if("string"===t&&tt(n=e.toString)&&!nt(i=et(n,e)))return i;if(tt(n=e.valueOf)&&!nt(i=et(n,e)))return i;if("string"!==t&&tt(n=e.toString)&&!nt(i=et(n,e)))return i;throw it("Can't convert object to primitive value")},Ft=TypeError,jt=Mt("toPrimitive"),Bt=function(e,t){if(!Nt(e)||Lt(e))return e;var n,i=Ut(e,jt);if(i){if(void 0===t&&(t="default"),n=Ot(i,e,t),!Nt(n)||Lt(n))return n;throw Ft("Can't convert object to primitive value")}return void 0===t&&(t="number"),Vt(e,t)},Ht=Bt,Gt=ze,zt=function(e){var t=Ht(e,"string");return Gt(t)?t:t+""},Wt=ke,Jt=P.document,qt=Wt(Jt)&&Wt(Jt.createElement),Kt=function(e){return qt?Jt.createElement(e):{}},Qt=Kt,Xt=!O&&!M((function(){return 7!=Object.defineProperty(Qt("div"),"a",{get:function(){return 7}}).a})),$t=O,Yt=V,Zt=F,en=W,tn=me,nn=zt,rn=_t,an=Xt,on=Object.getOwnPropertyDescriptor;D.f=$t?on:function(e,t){if(e=tn(e),t=nn(t),an)try{return on(e,t)}catch(n){}if(rn(e,t))return en(!Yt(Zt.f,e,t),e[t])};var sn={},cn=O&&M((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),un=ke,dn=String,ln=TypeError,hn=function(e){if(un(e))return e;throw ln(dn(e)+" is not an object")},pn=O,fn=Xt,mn=cn,vn=hn,_n=zt,gn=TypeError,yn=Object.defineProperty,Sn=Object.getOwnPropertyDescriptor,bn="enumerable",kn="configurable",Tn="writable";sn.f=pn?mn?function(e,t,n){if(vn(e),t=_n(t),vn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Tn in n&&!n.writable){var i=Sn(e,t);i&&i.writable&&(e[t]=n.value,n={configurable:kn in n?n.configurable:i.configurable,enumerable:bn in n?n.enumerable:i.enumerable,writable:!1})}return yn(e,t,n)}:yn:function(e,t,n){if(vn(e),t=_n(t),vn(n),fn)try{return yn(e,t,n)}catch(i){}if("get"in n||"set"in n)throw gn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var In=sn,En=W,wn=O?function(e,t,n){return In.f(e,t,En(1,n))}:function(e,t,n){return e[t]=n,e},Rn={exports:{}},Cn=O,An=_t,xn=Function.prototype,Pn=Cn&&Object.getOwnPropertyDescriptor,Dn=An(xn,"name"),Mn={EXISTS:Dn,PROPER:Dn&&"something"===function(){}.name,CONFIGURABLE:Dn&&(!Cn||Cn&&Pn(xn,"name").configurable)},On=ye,Nn=dt,Ln=ie(Function.toString);On(Nn.inspectSource)||(Nn.inspectSource=function(e){return Ln(e)});var Un,Vn,Fn,jn=Nn.inspectSource,Bn=ye,Hn=P.WeakMap,Gn=Bn(Hn)&&/native code/.test(String(Hn)),zn=rt.exports,Wn=kt,Jn=zn("keys"),qn=function(e){return Jn[e]||(Jn[e]=Wn(e))},Kn={},Qn=Gn,Xn=P,$n=ke,Yn=wn,Zn=_t,ei=dt,ti=qn,ni=Kn,ii="Object already initialized",ri=Xn.TypeError,ai=Xn.WeakMap;if(Qn||ei.state){var oi=ei.state||(ei.state=new ai);oi.get=oi.get,oi.has=oi.has,oi.set=oi.set,Un=function(e,t){if(oi.has(e))throw ri(ii);return t.facade=e,oi.set(e,t),t},Vn=function(e){return oi.get(e)||{}},Fn=function(e){return oi.has(e)}}else{var si=ti("state");ni[si]=!0,Un=function(e,t){if(Zn(e,si))throw ri(ii);return t.facade=e,Yn(e,si,t),t},Vn=function(e){return Zn(e,si)?e[si]:{}},Fn=function(e){return Zn(e,si)}}var ci={set:Un,get:Vn,has:Fn,enforce:function(e){return Fn(e)?Vn(e):Un(e,{})},getterFor:function(e){return function(t){var n;if(!$n(t)||(n=Vn(t)).type!==e)throw ri("Incompatible receiver, "+e+" required");return n}}},ui=M,di=ye,li=_t,hi=O,pi=Mn.CONFIGURABLE,fi=jn,mi=ci.enforce,vi=ci.get,_i=Object.defineProperty,gi=hi&&!ui((function(){return 8!==_i((function(){}),"length",{value:8}).length})),yi=String(String).split("String"),Si=Rn.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!li(e,"name")||pi&&e.name!==t)&&(hi?_i(e,"name",{value:t,configurable:!0}):e.name=t),gi&&n&&li(n,"arity")&&e.length!==n.arity&&_i(e,"length",{value:n.arity});try{n&&li(n,"constructor")&&n.constructor?hi&&_i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(r){}var i=mi(e);return li(i,"source")||(i.source=yi.join("string"==typeof t?t:"")),e};Function.prototype.toString=Si((function(){return di(this)&&vi(this).source||fi(this)}),"toString");var bi=ye,ki=sn,Ti=Rn.exports,Ii=st,Ei=function(e,t,n,i){i||(i={});var r=i.enumerable,a=void 0!==i.name?i.name:t;if(bi(n)&&Ti(n,a,i),i.global)r?e[t]=n:Ii(t,n);else{try{i.unsafe?e[t]&&(r=!0):delete e[t]}catch(o){}r?e[t]=n:ki.f(e,t,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},wi={},Ri=Math.ceil,Ci=Math.floor,Ai=Math.trunc||function(e){var t=+e;return(t>0?Ci:Ri)(t)},xi=function(e){var t=+e;return t!=t||0===t?0:Ai(t)},Pi=xi,Di=Math.max,Mi=Math.min,Oi=function(e,t){var n=Pi(e);return n<0?Di(n+t,0):Mi(n,t)},Ni=xi,Li=Math.min,Ui=function(e){return e>0?Li(Ni(e),9007199254740991):0},Vi=Ui,Fi=function(e){return Vi(e.length)},ji=me,Bi=Oi,Hi=Fi,Gi=function(e){return function(t,n,i){var r,a=ji(t),o=Hi(a),s=Bi(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},zi={includes:Gi(!0),indexOf:Gi(!1)},Wi=_t,Ji=me,qi=zi.indexOf,Ki=Kn,Qi=ie([].push),Xi=function(e,t){var n,i=Ji(e),r=0,a=[];for(n in i)!Wi(Ki,n)&&Wi(i,n)&&Qi(a,n);for(;t.length>r;)Wi(i,n=t[r++])&&(~qi(a,n)||Qi(a,n));return a},$i=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Yi=Xi,Zi=$i.concat("length","prototype");wi.f=Object.getOwnPropertyNames||function(e){return Yi(e,Zi)};var er={};er.f=Object.getOwnPropertySymbols;var tr=we,nr=wi,ir=er,rr=hn,ar=ie([].concat),or=tr("Reflect","ownKeys")||function(e){var t=nr.f(rr(e)),n=ir.f;return n?ar(t,n(e)):t},sr=_t,cr=or,ur=D,dr=sn,lr=M,hr=ye,pr=/#|\.prototype\./,fr=function(e,t){var n=vr[mr(e)];return n==gr||n!=_r&&(hr(t)?lr(t):!!t)},mr=fr.normalize=function(e){return String(e).replace(pr,".").toLowerCase()},vr=fr.data={},_r=fr.NATIVE="N",gr=fr.POLYFILL="P",yr=fr,Sr=P,br=D.f,kr=wn,Tr=Ei,Ir=st,Er=function(e,t,n){for(var i=cr(t),r=dr.f,a=ur.f,o=0;o<i.length;o++){var s=i[o];sr(e,s)||n&&sr(n,s)||r(e,s,a(t,s))}},wr=yr,Rr=function(e,t){var n,i,r,a,o,s=e.target,c=e.global,u=e.stat;if(n=c?Sr:u?Sr[s]||Ir(s,{}):(Sr[s]||{}).prototype)for(i in t){if(a=t[i],r=e.dontCallGetSet?(o=br(n,i))&&o.value:n[i],!wr(c?i:s+(u?".":"#")+i,e.forced)&&void 0!==r){if(typeof a==typeof r)continue;Er(a,r)}(e.sham||r&&r.sham)&&kr(a,"sham",!0),Tr(n,i,a,e)}},Cr=Rr,Ar=M,xr=me,Pr=D.f,Dr=O,Mr=Ar((function(){Pr(1)}));Cr({target:"Object",stat:!0,forced:!Dr||Mr,sham:!Dr},{getOwnPropertyDescriptor:function(e,t){return Pr(xr(e),t)}});let Or=!0,Nr=!0;function Lr(e,t,n){const i=e.match(t);return i&&i.length>=n&&parseInt(i[n],10)}function Ur(e,t,n){if(!e.RTCPeerConnection)return;const i=e.RTCPeerConnection.prototype,r=i.addEventListener;i.addEventListener=function(e,i){if(e!==t)return r.apply(this,arguments);const a=e=>{const t=n(e);t&&(i.handleEvent?i.handleEvent(t):i(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(i,a),r.apply(this,[e,a])};const a=i.removeEventListener;i.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return a.apply(this,arguments);if(!this._eventMap[t].has(n))return a.apply(this,arguments);const i=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,a.apply(this,[e,i])},Object.defineProperty(i,"on"+t,{get(){return this["_on"+t]},set(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})}function Vr(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(Or=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function Fr(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(Nr=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function jr(){if("object"==typeof window){if(Or)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function Br(e,t){Nr&&console.warn(e+" is deprecated, please use "+t+" instead.")}function Hr(e){return"[object Object]"===Object.prototype.toString.call(e)}function Gr(e){return Hr(e)?Object.keys(e).reduce((function(t,n){const i=Hr(e[n]),r=i?Gr(e[n]):e[n],a=i&&!Object.keys(r).length;return void 0===r||a?t:Object.assign(t,{[n]:r})}),{}):e}function zr(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((i=>{i.endsWith("Id")?zr(e,e.get(t[i]),n):i.endsWith("Ids")&&t[i].forEach((t=>{zr(e,e.get(t),n)}))})))}function Wr(e,t,n){const i=n?"outbound-rtp":"inbound-rtp",r=new Map;if(null===t)return r;const a=[];return e.forEach((e=>{"track"===e.type&&e.trackIdentifier===t.id&&a.push(e)})),a.forEach((t=>{e.forEach((n=>{n.type===i&&n.trackId===t.id&&zr(e,n,r)}))})),r}const Jr=jr;function qr(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const i=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach((n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const i="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==i.exact&&"number"==typeof i.exact&&(i.min=i.max=i.exact);const r=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==i.ideal){t.optional=t.optional||[];let e={};"number"==typeof i.ideal?(e[r("min",n)]=i.ideal,t.optional.push(e),e={},e[r("max",n)]=i.ideal,t.optional.push(e)):(e[r("",n)]=i.ideal,t.optional.push(e))}void 0!==i.exact&&"number"!=typeof i.exact?(t.mandatory=t.mandatory||{},t.mandatory[r("",n)]=i.exact):["min","max"].forEach((e=>{void 0!==i[e]&&(t.mandatory=t.mandatory||{},t.mandatory[r(e,n)]=i[e])}))})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},r=function(e,r){if(t.version>=61)return r(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=i(e.audio)}if(e&&"object"==typeof e.video){let a=e.video.facingMode;a=a&&("object"==typeof a?a:{ideal:a});const o=t.version<66;if(a&&("user"===a.exact||"environment"===a.exact||"user"===a.ideal||"environment"===a.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||o)){let t;if(delete e.video.facingMode,"environment"===a.exact||"environment"===a.ideal?t=["back","rear"]:"user"!==a.exact&&"user"!==a.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then((n=>{let o=(n=n.filter((e=>"videoinput"===e.kind))).find((e=>t.some((t=>e.label.toLowerCase().includes(t)))));return!o&&n.length&&t.includes("back")&&(o=n[n.length-1]),o&&(e.video.deviceId=a.exact?{exact:o.deviceId}:{ideal:o.deviceId}),e.video=i(e.video),Jr("chrome: "+JSON.stringify(e)),r(e)}))}e.video=i(e.video)}return Jr("chrome: "+JSON.stringify(e)),r(e)},a=function(e){return t.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(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,i){r(e,(e=>{n.webkitGetUserMedia(e,t,(e=>{i&&i(a(e))}))}))}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return r(t,(t=>e(t).then((e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach((e=>{e.stop()})),new DOMException("","NotFoundError");return e}),(e=>Promise.reject(a(e))))))}}}function Kr(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function Qr(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",(n=>{let i;i=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===n.track.id)):{track:n.track};const r=new Event("track");r.track=n.track,r.receiver=i,r.transceiver={receiver:i},r.streams=[t.stream],this.dispatchEvent(r)})),t.stream.getTracks().forEach((n=>{let i;i=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===n.id)):{track:n};const r=new Event("track");r.track=n,r.receiver=i,r.transceiver={receiver:i},r.streams=[t.stream],this.dispatchEvent(r)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else Ur(e,"track",(e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e)))}function Xr(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const 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()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,i){let r=n.apply(this,arguments);return r||(r=t(this,e),this._senders.push(r)),r};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){i.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach((e=>{this._senders.push(t(this,e))}))};const i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],i.apply(this,[e]),e.getTracks().forEach((e=>{const t=this._senders.find((t=>t.track===e));t&&this._senders.splice(this._senders.indexOf(t),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)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function $r(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,n,i]=arguments;if(arguments.length>0&&"function"==typeof e)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof e))return t.apply(this,[]);const r=function(e){const t={};return e.result().forEach((e=>{const n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach((t=>{n[t]=e.stat(t)})),t[n.id]=n})),t},a=function(e){return new Map(Object.keys(e).map((t=>[t,e[t]])))};if(arguments.length>=2){const i=function(e){n(a(r(e)))};return t.apply(this,[i,e])}return new Promise(((e,n)=>{t.apply(this,[function(t){e(a(r(t)))},n])})).then(n,i)}}function Yr(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>Wr(t,e.track,!0)))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),Ur(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>Wr(t,e.track,!1)))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,i;return this.getSenders().forEach((n=>{n.track===e&&(t?i=!0:t=n)})),this.getReceivers().forEach((t=>(t.track===e&&(n?i=!0:n=t),t.track===e))),i||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function Zr(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((e=>this._shimmedLocalStreams[e][0]))};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const i=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(i)&&this._shimmedLocalStreams[n.id].push(i):this._shimmedLocalStreams[n.id]=[n,i],i};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")}));const t=this.getSenders();n.apply(this,arguments);const i=this.getSenders().filter((e=>-1===t.indexOf(e)));this._shimmedLocalStreams[e.id]=[e].concat(i)};const i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],i.apply(this,arguments)};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]})),r.apply(this,arguments)}}function ea(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return Zr(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map((e=>this._reverseStreams[e.id]))};const i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}i.apply(this,[t])};const r=e.RTCPeerConnection.prototype.removeStream;function a(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const i=e._reverseStreams[t],r=e._streams[i.id];n=n.replace(new RegExp(r.id,"g"),i.id)})),new RTCSessionDescription({type:t.type,sdp:n})}function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const i=e._reverseStreams[t],r=e._streams[i.id];n=n.replace(new RegExp(i.id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},r.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const i=[].slice.call(arguments,1);if(1!==i.length||!i[0].getTracks().find((e=>e===t)))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");const r=this.getSenders().find((e=>e.track===t));if(r)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const a=this._streams[n.id];if(a)a.addTrack(t),Promise.resolve().then((()=>{this.dispatchEvent(new Event("negotiationneeded"))}));else{const i=new e.MediaStream([t]);this._streams[n.id]=i,this._reverseStreams[i.id]=n,this.addStream(i)}return this.getSenders().find((e=>e.track===t))},["createOffer","createAnswer"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],i={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=a(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then((e=>a(this,e)))}};e.RTCPeerConnection.prototype[t]=i[t]}));const s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=o(this,arguments[0]),s.apply(this,arguments)):s.apply(this,arguments)};const c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=c.get.apply(this);return""===e.type?e:a(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach((n=>{this._streams[n].getTracks().find((t=>e.track===t))&&(t=this._streams[n])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function ta(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],i={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=i[t]}))}function na(e,t){Ur(e,"negotiationneeded",(e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e}))}var ia=Object.freeze({__proto__:null,shimMediaStream:Kr,shimOnTrack:Qr,shimGetSendersWithDtmf:Xr,shimGetStats:$r,shimSenderReceiverGetStats:Yr,shimAddTrackRemoveTrackWithNative:Zr,shimAddTrackRemoveTrack:ea,shimPeerConnection:ta,fixNegotiationNeeded:na,shimGetUserMedia:qr,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then((t=>{const i=n.video&&n.video.width,r=n.video&&n.video.height,a=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:a||3}},i&&(n.video.mandatory.maxWidth=i),r&&(n.video.mandatory.maxHeight=r),e.navigator.mediaDevices.getUserMedia(n)}))}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}});var ra={exports:{}};!function(e){var t={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map((function(e){return e.trim()}))},t.splitSections=function(e){return e.split("\nm=").map((function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"}))},t.getDescription=function(e){var n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){var n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter((function(e){return 0===e.indexOf(n)}))},t.parseCandidate=function(e){for(var t,n={foundation:(t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[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]},i=8;i<t.length;i+=2)switch(t[i]){case"raddr":n.relatedAddress=t[i+1];break;case"rport":n.relatedPort=parseInt(t[i+1],10);break;case"tcptype":n.tcpType=t[i+1];break;case"ufrag":n.ufrag=t[i+1],n.usernameFragment=t[i+1];break;default:n[t[i]]=t[i+1]}return n},t.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.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substr(14).split(" ")},t.parseRtpMap=function(e){var t=e.substr(9).split(" "),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.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"},t.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]}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},t.parseFmtp=function(e){for(var t,n={},i=e.substr(e.indexOf(" ")+1).split(";"),r=0;r<i.length;r++)n[(t=i[r].trim().split("="))[0].trim()]=t[1];return n},t.writeFmtp=function(e){var t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){var i=[];Object.keys(e.parameters).forEach((function(t){e.parameters[t]?i.push(t+"="+e.parameters[t]):i.push(t)})),t+="a=fmtp:"+n+" "+i.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){var t=e.substr(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.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},t.parseSsrcMedia=function(e){var t=e.indexOf(" "),n={ssrc:parseInt(e.substr(7,t-7),10)},i=e.indexOf(":",t);return i>-1?(n.attribute=e.substr(t+1,i-t-1),n.value=e.substr(i+1)):n.attribute=e.substr(t+1),n},t.parseSsrcGroup=function(e){var t=e.substr(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((function(e){return parseInt(e,10)}))}},t.getMid=function(e){var n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substr(6)},t.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.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},t.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)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.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}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){var i=t.matchPrefix(e+n,"a=ice-ufrag:")[0],r=t.matchPrefix(e+n,"a=ice-pwd:")[0];return i&&r?{usernameFragment:i.substr(12),password:r.substr(10)}:null},t.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},t.parseRtpParameters=function(e){for(var n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},i=t.splitLines(e)[0].split(" "),r=3;r<i.length;r++){var a=i[r],o=t.matchPrefix(e,"a=rtpmap:"+a+" ")[0];if(o){var s=t.parseRtpMap(o),c=t.matchPrefix(e,"a=fmtp:"+a+" ");switch(s.parameters=c.length?t.parseFmtp(c[0]):{},s.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+a+" ").map(t.parseRtcpFb),n.codecs.push(s),s.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(s.name.toUpperCase())}}}return t.matchPrefix(e,"a=extmap:").forEach((function(e){n.headerExtensions.push(t.parseExtmap(e))})),n},t.writeRtpDescription=function(e,n){var i="";i+="m="+e+" ",i+=n.codecs.length>0?"9":"0",i+=" UDP/TLS/RTP/SAVPF ",i+=n.codecs.map((function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType})).join(" ")+"\r\n",i+="c=IN IP4 0.0.0.0\r\n",i+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach((function(e){i+=t.writeRtpMap(e),i+=t.writeFmtp(e),i+=t.writeRtcpFb(e)}));var r=0;return n.codecs.forEach((function(e){e.maxptime>r&&(r=e.maxptime)})),r>0&&(i+="a=maxptime:"+r+"\r\n"),i+="a=rtcp-mux\r\n",n.headerExtensions&&n.headerExtensions.forEach((function(e){i+=t.writeExtmap(e)})),i},t.parseRtpEncodingParameters=function(e){var n,i=[],r=t.parseRtpParameters(e),a=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),s=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute})),c=s.length>0&&s[0].ssrc,u=t.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&&(n=u[0][1]),r.codecs.forEach((function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var t={ssrc:c,codecPayloadType:parseInt(e.parameters.apt,10)};c&&n&&(t.rtx={ssrc:n}),i.push(t),a&&((t=JSON.parse(JSON.stringify(t))).fec={ssrc:c,mechanism:o?"red+ulpfec":"red"},i.push(t))}})),0===i.length&&c&&i.push({ssrc:c});var d=t.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,i.forEach((function(e){e.maxBitrate=d}))),i},t.parseRtcpParameters=function(e){var n={},i=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute}))[0];i&&(n.cname=i.value,n.ssrc=i.ssrc);var r=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=r.length>0,n.compound=0===r.length;var a=t.matchPrefix(e,"a=rtcp-mux");return n.mux=a.length>0,n},t.parseMsid=function(e){var n,i=t.matchPrefix(e,"a=msid:");if(1===i.length)return{stream:(n=i[0].substr(7).split(" "))[0],track:n[1]};var r=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"msid"===e.attribute}));return r.length>0?{stream:(n=r[0].value.split(" "))[0],track:n[1]}:void 0},t.parseSctpDescription=function(e){var n,i=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");r.length>0&&(n=parseInt(r[0].substr(19),10)),isNaN(n)&&(n=65536);var a=t.matchPrefix(e,"a=sctp-port:");if(a.length>0)return{port:parseInt(a[0].substr(12),10),protocol:i.fmt,maxMessageSize:n};if(t.matchPrefix(e,"a=sctpmap:").length>0){var o=t.matchPrefix(e,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(o[0],10),protocol:o[1],maxMessageSize:n}}},t.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("")},t.generateSessionId=function(){return Math.random().toString().substr(2,21)},t.writeSessionBoilerplate=function(e,n,i){var r=void 0!==n?n:2;return"v=0\r\no="+(i||"thisisadapterortc")+" "+(e||t.generateSessionId())+" "+r+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.writeMediaSection=function(e,n,i,r){var a=t.writeRtpDescription(e.kind,n);if(a+=t.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=t.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===i?"actpass":"active"),a+="a=mid:"+e.mid+"\r\n",e.direction?a+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?a+="a=sendrecv\r\n":e.rtpSender?a+="a=sendonly\r\n":e.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",e.rtpSender){var o="msid:"+r.id+" "+e.rtpSender.track.id+"\r\n";a+="a="+o,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+o,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+o,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+t.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+t.localCName+"\r\n"),a},t.getDirection=function(e,n){for(var i=t.splitLines(e),r=0;r<i.length;r++)switch(i[r]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return i[r].substr(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substr(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){var n=t.splitLines(e)[0].substr(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){var n=t.matchPrefix(e,"o=")[0].substr(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;for(var n=t.splitLines(e),i=0;i<n.length;i++)if(n[i].length<2||"="!==n[i].charAt(1))return!1;return!0},e.exports=t}(ra);var aa=ra.exports,oa=ra.exports;function sa(e,t,n,i,r){var a=oa.writeRtpDescription(e.kind,t);if(a+=oa.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=oa.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":r||"active"),a+="a=mid:"+e.mid+"\r\n",e.rtpSender&&e.rtpReceiver?a+="a=sendrecv\r\n":e.rtpSender?a+="a=sendonly\r\n":e.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",e.rtpSender){var o=e.rtpSender._initialTrackId||e.rtpSender.track.id;e.rtpSender._initialTrackId=o;var s="msid:"+(i?i.id:"-")+" "+o+"\r\n";a+="a="+s,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+s,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+s,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+oa.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+oa.localCName+"\r\n"),a}function ca(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]},i=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]},r=function(e,t,n,r){var a=i(e.parameters.apt,n),o=i(t.parameters.apt,r);return a&&o&&a.name.toLowerCase()===o.name.toLowerCase()};return e.codecs.forEach((function(i){for(var a=0;a<t.codecs.length;a++){var o=t.codecs[a];if(i.name.toLowerCase()===o.name.toLowerCase()&&i.clockRate===o.clockRate){if("rtx"===i.name.toLowerCase()&&i.parameters&&o.parameters.apt&&!r(i,o,e.codecs,t.codecs))continue;(o=JSON.parse(JSON.stringify(o))).numChannels=Math.min(i.numChannels,o.numChannels),n.codecs.push(o),o.rtcpFeedback=o.rtcpFeedback.filter((function(e){for(var t=0;t<i.rtcpFeedback.length;t++)if(i.rtcpFeedback[t].type===e.type&&i.rtcpFeedback[t].parameter===e.parameter)return!0;return!1}));break}}})),e.headerExtensions.forEach((function(e){for(var i=0;i<t.headerExtensions.length;i++){var r=t.headerExtensions[i];if(e.uri===r.uri){n.headerExtensions.push(r);break}}})),n}function ua(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 da(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 la(e,t){var n=new Error(t);return n.name=e,n.code={NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:void 0,OperationError:void 0}[e],n}var ha=function(e,t){function n(t,n){n.addTrack(t),n.dispatchEvent(new e.MediaStreamTrackEvent("addtrack",{track:t}))}function i(t,n,i,r){var a=new Event("track");a.track=n,a.receiver=i,a.transceiver={receiver:i},a.streams=r,e.setTimeout((function(){t._dispatchEvent("track",a)}))}var r=function(n){var i=this,r=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach((function(e){i[e]=r[e].bind(r)})),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",n=JSON.parse(JSON.stringify(n||{})),this.usingBundle="max-bundle"===n.bundlePolicy,"negotiate"===n.rtcpMuxPolicy)throw la("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(n.rtcpMuxPolicy||(n.rtcpMuxPolicy="require"),n.iceTransportPolicy){case"all":case"relay":break;default:n.iceTransportPolicy="all"}switch(n.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:n.bundlePolicy="balanced"}if(n.iceServers=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&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var r="string"==typeof i;return r&&(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=r?i[0]:i,!!i.length}}))}(n.iceServers||[],t),this._iceGatherers=[],n.iceCandidatePoolSize)for(var a=n.iceCandidatePoolSize;a>0;a--)this._iceGatherers.push(new e.RTCIceGatherer({iceServers:n.iceServers,gatherPolicy:n.iceTransportPolicy}));else n.iceCandidatePoolSize=0;this._config=n,this.transceivers=[],this._sdpSessionId=oa.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(r.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(r.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),r.prototype.onicecandidate=null,r.prototype.onaddstream=null,r.prototype.ontrack=null,r.prototype.onremovestream=null,r.prototype.onsignalingstatechange=null,r.prototype.oniceconnectionstatechange=null,r.prototype.onconnectionstatechange=null,r.prototype.onicegatheringstatechange=null,r.prototype.onnegotiationneeded=null,r.prototype.ondatachannel=null,r.prototype._dispatchEvent=function(e,t){this._isClosed||(this.dispatchEvent(t),"function"==typeof this["on"+e]&&this["on"+e](t))},r.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",e)},r.prototype.getConfiguration=function(){return this._config},r.prototype.getLocalStreams=function(){return this.localStreams},r.prototype.getRemoteStreams=function(){return this.remoteStreams},r.prototype._createTransceiver=function(e,t){var n=this.transceivers.length>0,i={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};if(this.usingBundle&&n)i.iceTransport=this.transceivers[0].iceTransport,i.dtlsTransport=this.transceivers[0].dtlsTransport;else{var r=this._createIceAndDtlsTransports();i.iceTransport=r.iceTransport,i.dtlsTransport=r.dtlsTransport}return t||this.transceivers.push(i),i},r.prototype.addTrack=function(t,n){if(this._isClosed)throw la("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var i;if(this.transceivers.find((function(e){return e.track===t})))throw la("InvalidAccessError","Track already exists.");for(var r=0;r<this.transceivers.length;r++)this.transceivers[r].track||this.transceivers[r].kind!==t.kind||(i=this.transceivers[r]);return i||(i=this._createTransceiver(t.kind)),this._maybeFireNegotiationNeeded(),-1===this.localStreams.indexOf(n)&&this.localStreams.push(n),i.track=t,i.stream=n,i.rtpSender=new e.RTCRtpSender(t,i.dtlsTransport),i.rtpSender},r.prototype.addStream=function(e){var n=this;if(t>=15025)e.getTracks().forEach((function(t){n.addTrack(t,e)}));else{var i=e.clone();e.getTracks().forEach((function(e,t){var n=i.getTracks()[t];e.addEventListener("enabled",(function(e){n.enabled=e.enabled}))})),i.getTracks().forEach((function(e){n.addTrack(e,i)}))}},r.prototype.removeTrack=function(t){if(this._isClosed)throw la("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(t instanceof e.RTCRtpSender))throw new 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 la("InvalidAccessError","Sender was not created by this connection.");var i=n.stream;n.rtpSender.stop(),n.rtpSender=null,n.track=null,n.stream=null,-1===this.transceivers.map((function(e){return e.stream})).indexOf(i)&&this.localStreams.indexOf(i)>-1&&this.localStreams.splice(this.localStreams.indexOf(i),1),this._maybeFireNegotiationNeeded()},r.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)}))},r.prototype.getSenders=function(){return this.transceivers.filter((function(e){return!!e.rtpSender})).map((function(e){return e.rtpSender}))},r.prototype.getReceivers=function(){return this.transceivers.filter((function(e){return!!e.rtpReceiver})).map((function(e){return e.rtpReceiver}))},r.prototype._createIceGatherer=function(t,n){var i=this;if(n&&t>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var r=new e.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(r,"state",{value:"new",writable:!0}),this.transceivers[t].bufferedCandidateEvents=[],this.transceivers[t].bufferCandidates=function(e){var n=!e.candidate||0===Object.keys(e.candidate).length;r.state=n?"completed":"gathering",null!==i.transceivers[t].bufferedCandidateEvents&&i.transceivers[t].bufferedCandidateEvents.push(e)},r.addEventListener("localcandidate",this.transceivers[t].bufferCandidates),r},r.prototype._gather=function(t,n){var i=this,r=this.transceivers[n].iceGatherer;if(!r.onlocalcandidate){var a=this.transceivers[n].bufferedCandidateEvents;this.transceivers[n].bufferedCandidateEvents=null,r.removeEventListener("localcandidate",this.transceivers[n].bufferCandidates),r.onlocalcandidate=function(e){if(!(i.usingBundle&&n>0)){var a=new Event("icecandidate");a.candidate={sdpMid:t,sdpMLineIndex:n};var o=e.candidate,s=!o||0===Object.keys(o).length;if(s)"new"!==r.state&&"gathering"!==r.state||(r.state="completed");else{"new"===r.state&&(r.state="gathering"),o.component=1,o.ufrag=r.getLocalParameters().usernameFragment;var c=oa.writeCandidate(o);a.candidate=Object.assign(a.candidate,oa.parseCandidate(c)),a.candidate.candidate=c,a.candidate.toJSON=function(){return{candidate:a.candidate.candidate,sdpMid:a.candidate.sdpMid,sdpMLineIndex:a.candidate.sdpMLineIndex,usernameFragment:a.candidate.usernameFragment}}}var u=oa.getMediaSections(i._localDescription.sdp);u[a.candidate.sdpMLineIndex]+=s?"a=end-of-candidates\r\n":"a="+a.candidate.candidate+"\r\n",i._localDescription.sdp=oa.getDescription(i._localDescription.sdp)+u.join("");var d=i.transceivers.every((function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state}));"gathering"!==i.iceGatheringState&&(i.iceGatheringState="gathering",i._emitGatheringStateChange()),s||i._dispatchEvent("icecandidate",a),d&&(i._dispatchEvent("icecandidate",new Event("icecandidate")),i.iceGatheringState="complete",i._emitGatheringStateChange())}},e.setTimeout((function(){a.forEach((function(e){r.onlocalcandidate(e)}))}),0)}},r.prototype._createIceAndDtlsTransports=function(){var t=this,n=new e.RTCIceTransport(null);n.onicestatechange=function(){t._updateIceConnectionState(),t._updateConnectionState()};var i=new e.RTCDtlsTransport(n);return i.ondtlsstatechange=function(){t._updateConnectionState()},i.onerror=function(){Object.defineProperty(i,"state",{value:"failed",writable:!0}),t._updateConnectionState()},{iceTransport:n,dtlsTransport:i}},r.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 i=this.transceivers[e].dtlsTransport;i&&(delete i.ondtlsstatechange,delete i.onerror,delete this.transceivers[e].dtlsTransport)},r.prototype._transceive=function(e,n,i){var r=ca(e.localCapabilities,e.remoteCapabilities);n&&e.rtpSender&&(r.encodings=e.sendEncodingParameters,r.rtcp={cname:oa.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(r.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(r)),i&&e.rtpReceiver&&r.codecs.length>0&&("video"===e.kind&&e.recvEncodingParameters&&t<15019&&e.recvEncodingParameters.forEach((function(e){delete e.rtx})),e.recvEncodingParameters.length?r.encodings=e.recvEncodingParameters:r.encodings=[{}],r.rtcp={compound:e.rtcpParameters.compound},e.rtcpParameters.cname&&(r.rtcp.cname=e.rtcpParameters.cname),e.sendEncodingParameters.length&&(r.rtcp.ssrc=e.sendEncodingParameters[0].ssrc),e.rtpReceiver.receive(r))},r.prototype.setLocalDescription=function(e){var t,n,i=this;if(-1===["offer","answer"].indexOf(e.type))return Promise.reject(la("TypeError",'Unsupported type "'+e.type+'"'));if(!ua("setLocalDescription",e.type,i.signalingState)||i._isClosed)return Promise.reject(la("InvalidStateError","Can not set local "+e.type+" in state "+i.signalingState));if("offer"===e.type)t=oa.splitSections(e.sdp),n=t.shift(),t.forEach((function(e,t){var n=oa.parseRtpParameters(e);i.transceivers[t].localCapabilities=n})),i.transceivers.forEach((function(e,t){i._gather(e.mid,t)}));else if("answer"===e.type){t=oa.splitSections(i._remoteDescription.sdp),n=t.shift();var r=oa.matchPrefix(n,"a=ice-lite").length>0;t.forEach((function(e,t){var a=i.transceivers[t],o=a.iceGatherer,s=a.iceTransport,c=a.dtlsTransport,u=a.localCapabilities,d=a.remoteCapabilities;if(!(oa.isRejected(e)&&0===oa.matchPrefix(e,"a=bundle-only").length)&&!a.rejected){var l=oa.getIceParameters(e,n),h=oa.getDtlsParameters(e,n);r&&(h.role="server"),i.usingBundle&&0!==t||(i._gather(a.mid,t),"new"===s.state&&s.start(o,l,r?"controlling":"controlled"),"new"===c.state&&c.start(h));var p=ca(u,d);i._transceive(a,p.codecs.length>0,!1)}}))}return i._localDescription={type:e.type,sdp:e.sdp},"offer"===e.type?i._updateSignalingState("have-local-offer"):i._updateSignalingState("stable"),Promise.resolve()},r.prototype.setRemoteDescription=function(r){var a=this;if(-1===["offer","answer"].indexOf(r.type))return Promise.reject(la("TypeError",'Unsupported type "'+r.type+'"'));if(!ua("setRemoteDescription",r.type,a.signalingState)||a._isClosed)return Promise.reject(la("InvalidStateError","Can not set remote "+r.type+" in state "+a.signalingState));var o={};a.remoteStreams.forEach((function(e){o[e.id]=e}));var s=[],c=oa.splitSections(r.sdp),u=c.shift(),d=oa.matchPrefix(u,"a=ice-lite").length>0,l=oa.matchPrefix(u,"a=group:BUNDLE ").length>0;a.usingBundle=l;var h=oa.matchPrefix(u,"a=ice-options:")[0];return a.canTrickleIceCandidates=!!h&&h.substr(14).split(" ").indexOf("trickle")>=0,c.forEach((function(i,c){var h=oa.splitLines(i),p=oa.getKind(i),f=oa.isRejected(i)&&0===oa.matchPrefix(i,"a=bundle-only").length,m=h[0].substr(2).split(" ")[2],v=oa.getDirection(i,u),_=oa.parseMsid(i),g=oa.getMid(i)||oa.generateIdentifier();if(f||"application"===p&&("DTLS/SCTP"===m||"UDP/DTLS/SCTP"===m))a.transceivers[c]={mid:g,kind:p,protocol:m,rejected:!0};else{var y,S,b,k,T,I,E,w,R;!f&&a.transceivers[c]&&a.transceivers[c].rejected&&(a.transceivers[c]=a._createTransceiver(p,!0));var C,A,x=oa.parseRtpParameters(i);f||(C=oa.getIceParameters(i,u),(A=oa.getDtlsParameters(i,u)).role="client"),E=oa.parseRtpEncodingParameters(i);var P=oa.parseRtcpParameters(i),D=oa.matchPrefix(i,"a=end-of-candidates",u).length>0,M=oa.matchPrefix(i,"a=candidate:").map((function(e){return oa.parseCandidate(e)})).filter((function(e){return 1===e.component}));if(("offer"===r.type||"answer"===r.type)&&!f&&l&&c>0&&a.transceivers[c]&&(a._disposeIceAndDtlsTransports(c),a.transceivers[c].iceGatherer=a.transceivers[0].iceGatherer,a.transceivers[c].iceTransport=a.transceivers[0].iceTransport,a.transceivers[c].dtlsTransport=a.transceivers[0].dtlsTransport,a.transceivers[c].rtpSender&&a.transceivers[c].rtpSender.setTransport(a.transceivers[0].dtlsTransport),a.transceivers[c].rtpReceiver&&a.transceivers[c].rtpReceiver.setTransport(a.transceivers[0].dtlsTransport)),"offer"!==r.type||f){if("answer"===r.type&&!f){S=(y=a.transceivers[c]).iceGatherer,b=y.iceTransport,k=y.dtlsTransport,T=y.rtpReceiver,I=y.sendEncodingParameters,w=y.localCapabilities,a.transceivers[c].recvEncodingParameters=E,a.transceivers[c].remoteCapabilities=x,a.transceivers[c].rtcpParameters=P,M.length&&"new"===b.state&&(!d&&!D||l&&0!==c?M.forEach((function(e){da(y.iceTransport,e)})):b.setRemoteCandidates(M)),l&&0!==c||("new"===b.state&&b.start(S,C,"controlling"),"new"===k.state&&k.start(A)),!ca(y.localCapabilities,y.remoteCapabilities).codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length&&y.sendEncodingParameters[0].rtx&&delete y.sendEncodingParameters[0].rtx,a._transceive(y,"sendrecv"===v||"recvonly"===v,"sendrecv"===v||"sendonly"===v),!T||"sendrecv"!==v&&"sendonly"!==v?delete y.rtpReceiver:(R=T.track,_?(o[_.stream]||(o[_.stream]=new e.MediaStream),n(R,o[_.stream]),s.push([R,T,o[_.stream]])):(o.default||(o.default=new e.MediaStream),n(R,o.default),s.push([R,T,o.default])))}}else{(y=a.transceivers[c]||a._createTransceiver(p)).mid=g,y.iceGatherer||(y.iceGatherer=a._createIceGatherer(c,l)),M.length&&"new"===y.iceTransport.state&&(!D||l&&0!==c?M.forEach((function(e){da(y.iceTransport,e)})):y.iceTransport.setRemoteCandidates(M)),w=e.RTCRtpReceiver.getCapabilities(p),t<15019&&(w.codecs=w.codecs.filter((function(e){return"rtx"!==e.name}))),I=y.sendEncodingParameters||[{ssrc:1001*(2*c+2)}];var O,N=!1;if("sendrecv"===v||"sendonly"===v){if(N=!y.rtpReceiver,T=y.rtpReceiver||new e.RTCRtpReceiver(y.dtlsTransport,p),N)R=T.track,_&&"-"===_.stream||(_?(o[_.stream]||(o[_.stream]=new e.MediaStream,Object.defineProperty(o[_.stream],"id",{get:function(){return _.stream}})),Object.defineProperty(R,"id",{get:function(){return _.track}}),O=o[_.stream]):(o.default||(o.default=new e.MediaStream),O=o.default)),O&&(n(R,O),y.associatedRemoteMediaStreams.push(O)),s.push([R,T,O])}else y.rtpReceiver&&y.rtpReceiver.track&&(y.associatedRemoteMediaStreams.forEach((function(t){var n=t.getTracks().find((function(e){return e.id===y.rtpReceiver.track.id}));n&&function(t,n){n.removeTrack(t),n.dispatchEvent(new e.MediaStreamTrackEvent("removetrack",{track:t}))}(n,t)})),y.associatedRemoteMediaStreams=[]);y.localCapabilities=w,y.remoteCapabilities=x,y.rtpReceiver=T,y.rtcpParameters=P,y.sendEncodingParameters=I,y.recvEncodingParameters=E,a._transceive(a.transceivers[c],!1,N)}}})),void 0===a._dtlsRole&&(a._dtlsRole="offer"===r.type?"active":"passive"),a._remoteDescription={type:r.type,sdp:r.sdp},"offer"===r.type?a._updateSignalingState("have-remote-offer"):a._updateSignalingState("stable"),Object.keys(o).forEach((function(t){var n=o[t];if(n.getTracks().length){if(-1===a.remoteStreams.indexOf(n)){a.remoteStreams.push(n);var r=new Event("addstream");r.stream=n,e.setTimeout((function(){a._dispatchEvent("addstream",r)}))}s.forEach((function(e){var t=e[0],r=e[1];n.id===e[2].id&&i(a,t,r,[n])}))}})),s.forEach((function(e){e[2]||i(a,e[0],e[1],[])})),e.setTimeout((function(){a&&a.transceivers&&a.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),Promise.resolve()},r.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")},r.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",t)},r.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))},r.prototype._updateIceConnectionState=function(){var e,t={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(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)}},r.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)}},r.prototype.createOffer=function(){var n=this;if(n._isClosed)return Promise.reject(la("InvalidStateError","Can not call createOffer after close"));var i=n.transceivers.filter((function(e){return"audio"===e.kind})).length,r=n.transceivers.filter((function(e){return"video"===e.kind})).length,a=arguments[0];if(a){if(a.mandatory||a.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==a.offerToReceiveAudio&&(i=!0===a.offerToReceiveAudio?1:!1===a.offerToReceiveAudio?0:a.offerToReceiveAudio),void 0!==a.offerToReceiveVideo&&(r=!0===a.offerToReceiveVideo?1:!1===a.offerToReceiveVideo?0:a.offerToReceiveVideo)}for(n.transceivers.forEach((function(e){"audio"===e.kind?--i<0&&(e.wantReceive=!1):"video"===e.kind&&--r<0&&(e.wantReceive=!1)}));i>0||r>0;)i>0&&(n._createTransceiver("audio"),i--),r>0&&(n._createTransceiver("video"),r--);var o=oa.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.transceivers.forEach((function(i,r){var a=i.track,o=i.kind,s=i.mid||oa.generateIdentifier();i.mid=s,i.iceGatherer||(i.iceGatherer=n._createIceGatherer(r,n.usingBundle));var c=e.RTCRtpSender.getCapabilities(o);t<15019&&(c.codecs=c.codecs.filter((function(e){return"rtx"!==e.name}))),c.codecs.forEach((function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1"),i.remoteCapabilities&&i.remoteCapabilities.codecs&&i.remoteCapabilities.codecs.forEach((function(t){e.name.toLowerCase()===t.name.toLowerCase()&&e.clockRate===t.clockRate&&(e.preferredPayloadType=t.payloadType)}))})),c.headerExtensions.forEach((function(e){(i.remoteCapabilities&&i.remoteCapabilities.headerExtensions||[]).forEach((function(t){e.uri===t.uri&&(e.id=t.id)}))}));var u=i.sendEncodingParameters||[{ssrc:1001*(2*r+1)}];a&&t>=15019&&"video"===o&&!u[0].rtx&&(u[0].rtx={ssrc:u[0].ssrc+1}),i.wantReceive&&(i.rtpReceiver=new e.RTCRtpReceiver(i.dtlsTransport,o)),i.localCapabilities=c,i.sendEncodingParameters=u})),"max-compat"!==n._config.bundlePolicy&&(o+="a=group:BUNDLE "+n.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n"),o+="a=ice-options:trickle\r\n",n.transceivers.forEach((function(e,t){o+=sa(e,e.localCapabilities,"offer",e.stream,n._dtlsRole),o+="a=rtcp-rsize\r\n",!e.iceGatherer||"new"===n.iceGatheringState||0!==t&&n.usingBundle||(e.iceGatherer.getLocalCandidates().forEach((function(e){e.component=1,o+="a="+oa.writeCandidate(e)+"\r\n"})),"completed"===e.iceGatherer.state&&(o+="a=end-of-candidates\r\n"))}));var s=new e.RTCSessionDescription({type:"offer",sdp:o});return Promise.resolve(s)},r.prototype.createAnswer=function(){var n=this;if(n._isClosed)return Promise.reject(la("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==n.signalingState&&"have-local-pranswer"!==n.signalingState)return Promise.reject(la("InvalidStateError","Can not call createAnswer in signalingState "+n.signalingState));var i=oa.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.usingBundle&&(i+="a=group:BUNDLE "+n.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n"),i+="a=ice-options:trickle\r\n";var r=oa.getMediaSections(n._remoteDescription.sdp).length;n.transceivers.forEach((function(e,a){if(!(a+1>r)){if(e.rejected)return"application"===e.kind?"DTLS/SCTP"===e.protocol?i+="m=application 0 DTLS/SCTP 5000\r\n":i+="m=application 0 "+e.protocol+" webrtc-datachannel\r\n":"audio"===e.kind?i+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===e.kind&&(i+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(i+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+e.mid+"\r\n");var o;if(e.stream)"audio"===e.kind?o=e.stream.getAudioTracks()[0]:"video"===e.kind&&(o=e.stream.getVideoTracks()[0]),o&&t>=15019&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1});var s=ca(e.localCapabilities,e.remoteCapabilities);!s.codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,i+=sa(e,s,"answer",e.stream,n._dtlsRole),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(i+="a=rtcp-rsize\r\n")}}));var a=new e.RTCSessionDescription({type:"answer",sdp:i});return Promise.resolve(a)},r.prototype.addIceCandidate=function(e){var t,n=this;return e&&void 0===e.sdpMLineIndex&&!e.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise((function(i,r){if(!n._remoteDescription)return r(la("InvalidStateError","Can not add ICE candidate without a remote description"));if(e&&""!==e.candidate){var a=e.sdpMLineIndex;if(e.sdpMid)for(var o=0;o<n.transceivers.length;o++)if(n.transceivers[o].mid===e.sdpMid){a=o;break}var s=n.transceivers[a];if(!s)return r(la("OperationError","Can not add ICE candidate"));if(s.rejected)return i();var c=Object.keys(e.candidate).length>0?oa.parseCandidate(e.candidate):{};if("tcp"===c.protocol&&(0===c.port||9===c.port))return i();if(c.component&&1!==c.component)return i();if((0===a||a>0&&s.iceTransport!==n.transceivers[0].iceTransport)&&!da(s.iceTransport,c))return r(la("OperationError","Can not add ICE candidate"));var u=e.candidate.trim();0===u.indexOf("a=")&&(u=u.substr(2)),(t=oa.getMediaSections(n._remoteDescription.sdp))[a]+="a="+(c.type?u:"end-of-candidates")+"\r\n",n._remoteDescription.sdp=oa.getDescription(n._remoteDescription.sdp)+t.join("")}else for(var d=0;d<n.transceivers.length&&(n.transceivers[d].rejected||(n.transceivers[d].iceTransport.addRemoteCandidate({}),(t=oa.getMediaSections(n._remoteDescription.sdp))[d]+="a=end-of-candidates\r\n",n._remoteDescription.sdp=oa.getDescription(n._remoteDescription.sdp)+t.join(""),!n.usingBundle));d++);i()}))},r.prototype.getStats=function(t){if(t&&t instanceof e.MediaStreamTrack){var n=null;if(this.transceivers.forEach((function(e){e.rtpSender&&e.rtpSender.track===t?n=e.rtpSender:e.rtpReceiver&&e.rtpReceiver.track===t&&(n=e.rtpReceiver)})),!n)throw la("InvalidAccessError","Invalid selector.");return n.getStats()}var i=[];return this.transceivers.forEach((function(e){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach((function(t){e[t]&&i.push(e[t].getStats())}))})),Promise.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 i=n.prototype.getStats;n.prototype.getStats=function(){return i.apply(this).then((function(e){var t=new Map;return Object.keys(e).forEach((function(n){var i;e[n].type={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[(i=e[n]).type]||i.type,t.set(n,e[n])})),t}))}}}));var a=["createOffer","createAnswer"];return a.forEach((function(e){var t=r.prototype[e];r.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)}})),(a=["setLocalDescription","setRemoteDescription","addIceCandidate"]).forEach((function(e){var t=r.prototype[e];r.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=r.prototype[e];r.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)}})),r};function pa(e){const t=e&&e.navigator,n=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return n(e).catch((e=>Promise.reject(function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString(){return this.name}}}(e))))}}function fa(e){"getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=e.navigator.getDisplayMedia.bind(e.navigator)))}function ma(e,t){if(e.RTCIceGatherer&&(e.RTCIceCandidate||(e.RTCIceCandidate=function(e){return e}),e.RTCSessionDescription||(e.RTCSessionDescription=function(e){return e}),t.version<15025)){const t=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set(e){t.set.call(this,e);const n=new Event("enabled");n.enabled=e,this.dispatchEvent(n)}})}e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)&&Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){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);const n=ha(e,t.version);e.RTCPeerConnection=function(e){return e&&e.iceServers&&(e.iceServers=function(e,t){let n=!1;return(e=JSON.parse(JSON.stringify(e))).filter((e=>{if(e&&(e.urls||e.url)){let t=e.urls||e.url;e.url&&!e.urls&&Br("RTCIceServer.url","RTCIceServer.urls");const i="string"==typeof t;return i&&(t=[t]),t=t.filter((e=>{if(0===e.indexOf("stun:"))return!1;const t=e.startsWith("turn")&&!e.startsWith("turn:[")&&e.includes("transport=udp");return t&&!n?(n=!0,!0):t&&!n})),delete e.url,e.urls=i?t[0]:t,!!t.length}}))}(e.iceServers,t.version),jr("ICE servers after filtering:",e.iceServers)),new n(e)},e.RTCPeerConnection.prototype=n.prototype}function va(e){e.RTCRtpSender&&!("replaceTrack"in e.RTCRtpSender.prototype)&&(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)}var _a=Object.freeze({__proto__:null,shimPeerConnection:ma,shimReplaceTrack:va,shimGetUserMedia:pa,shimGetDisplayMedia:fa});function ga(e,t){const n=e&&e.navigator,i=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,i){Br("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,i)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},i&&i.prototype.getSettings){const t=i.prototype.getSettings;i.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(i&&i.prototype.applyConstraints){const t=i.prototype.applyConstraints;i.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function ya(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Sa(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],i={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=i[t]}));const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},i=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,r,a]=arguments;return i.apply(this,[e||null]).then((e=>{if(t.version<53&&!r)try{e.forEach((e=>{e.type=n[e.type]||e.type}))}catch(i){if("TypeError"!==i.name)throw i;e.forEach(((t,i)=>{e.set(i,Object.assign({},t,{type:n[t.type]||t.type}))}))}return e})).then(r,a)}}function ba(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function ka(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),Ur(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function Ta(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){Br("removeStream","removeTrack"),this.getSenders().forEach((t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)}))})}function Ia(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function Ea(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];const e=arguments[1],n=e&&"sendEncodings"in e;n&&e.sendEncodings.forEach((e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));const i=t.apply(this,arguments);if(n){const{sender:t}=i,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e.sendEncodings,t.sendEncodings=e.sendEncodings,this.setParametersPromises.push(t.setParameters(n).then((()=>{delete t.sendEncodings})).catch((()=>{delete t.sendEncodings}))))}return i})}function wa(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function Ra(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}function Ca(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}var Aa=Object.freeze({__proto__:null,shimOnTrack:ya,shimPeerConnection:Sa,shimSenderGetStats:ba,shimReceiverGetStats:ka,shimRemoveStream:Ta,shimRTCDataChannel:Ia,shimAddTransceiver:Ea,shimGetParameters:wa,shimCreateOffer:Ra,shimCreateAnswer:Ca,shimGetUserMedia:ga,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}});function shimLocalStreamsAPI(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}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((n=>t.call(this,n,e))),e.getVideoTracks().forEach((n=>t.call(this,n,e)))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach((e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]})),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach((e=>{n.includes(e.track)&&this.removeTrack(e)}))})}}function shimRemoteStreamsAPI(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(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach((e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)}))})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)}))}),t.apply(e,arguments)}}}function xa(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,i=t.createAnswer,r=t.setLocalDescription,a=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(e,t){const i=arguments.length>=2?arguments[2]:arguments[0],r=n.apply(this,[i]);return t?(r.then(e,t),Promise.resolve()):r},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],r=i.apply(this,[n]);return t?(r.then(e,t),Promise.resolve()):r};let s=function(e,t,n){const i=r.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i};t.setLocalDescription=s,s=function(e,t,n){const i=a.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i},t.setRemoteDescription=s,s=function(e,t,n){const i=o.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i},t.addIceCandidate=s}function Pa(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(Da(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,i){t.mediaDevices.getUserMedia(e).then(n,i)}.bind(t))}function Da(e){return e&&void 0!==e.video?Object.assign({},e,{video:Gr(e.video)}):e}function Ma(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let i=e.iceServers[n];!i.hasOwnProperty("urls")&&i.hasOwnProperty("url")?(Br("RTCIceServer.url","RTCIceServer.urls"),i=JSON.parse(JSON.stringify(i)),i.urls=i.url,delete i.url,t.push(i)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function Oa(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Na(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find((e=>"audio"===e.receiver.track.kind));!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio"),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find((e=>"video"===e.receiver.track.kind));!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video")}return t.apply(this,arguments)}}function La(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var Ua=Object.freeze({__proto__:null,shimLocalStreamsAPI:shimLocalStreamsAPI,shimRemoteStreamsAPI:shimRemoteStreamsAPI,shimCallbacksAPI:xa,shimGetUserMedia:Pa,shimConstraints:Da,shimRTCIceServerUrls:Ma,shimTrackEventTransceiver:Oa,shimCreateOfferLegacy:Na,shimAudioContext:La});function Va(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const 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){const n=new t(e),i=aa.parseCandidate(e.candidate),r=Object.assign(n,i);return r.toJSON=function(){return{candidate:r.candidate,sdpMid:r.sdpMid,sdpMLineIndex:r.sdpMLineIndex,usernameFragment:r.usernameFragment}},r}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,Ur(e,"icecandidate",(t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t)))}function Fa(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=function(e){if(!e||!e.sdp)return!1;const t=aa.splitSections(e.sdp);return t.shift(),t.some((e=>{const t=aa.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))},i=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n},r=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n},a=function(e,n){let i=65536;"firefox"===t.browser&&57===t.version&&(i=65535);const r=aa.matchPrefix(e.sdp,"a=max-message-size:");return r.length>0?i=parseInt(r[0].substr(19),10):"firefox"===t.browser&&-1!==n&&(i=2147483637),i},o=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){const e=i(arguments[0]),t=r(e),n=a(arguments[0],e);let o;o=0===t&&0===n?Number.POSITIVE_INFINITY:0===t||0===n?Math.max(t,n):Math.min(t,n);const s={};Object.defineProperty(s,"maxMessageSize",{get:()=>o}),this._sctp=s}return o.apply(this,arguments)}}function ja(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const i=arguments[0],r=i.length||i.size||i.byteLength;if("open"===e.readyState&&t.sctp&&r>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},Ur(e,"datachannel",(e=>(t(e.channel,e.target),e)))}function Ba(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}}))}function Ha(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t.version>=605)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter((e=>"a=extmap-allow-mixed"!==e.trim())).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function Ga(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}var za=Object.freeze({__proto__:null,shimRTCIceCandidate:Va,shimMaxMessageSize:Fa,shimSendThrowTypeError:ja,shimConnectionState:Ba,removeExtmapAllowMixed:Ha,shimAddIceCandidateNullOrEmpty:Ga});!function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0}){const n=jr,i=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.mozGetUserMedia)t.browser="firefox",t.version=Lr(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)t.browser="chrome",t.version=Lr(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(n.mediaDevices&&n.userAgent.match(/Edge\/(\d+).(\d+)$/))t.browser="edge",t.version=Lr(n.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=Lr(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}(e),r={browserDetails:i,commonShim:za,extractVersion:Lr,disableLog:Vr,disableWarnings:Fr};switch(i.browser){case"chrome":if(!ia||!ta||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),r;if(null===i.version)return n("Chrome shim can not determine version, not shimming."),r;n("adapter.js shimming chrome."),r.browserShim=ia,Ga(e,i),qr(e,i),Kr(e),ta(e,i),Qr(e),ea(e,i),Xr(e),$r(e),Yr(e),na(e,i),Va(e),Ba(e),Fa(e,i),ja(e),Ha(e,i);break;case"firefox":if(!Aa||!Sa||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),r;n("adapter.js shimming firefox."),r.browserShim=Aa,Ga(e,i),ga(e,i),Sa(e,i),ya(e),Ta(e),ba(e),ka(e),Ia(e),Ea(e),wa(e),Ra(e),Ca(e),Va(e),Ba(e),Fa(e,i),ja(e);break;case"edge":if(!_a||!ma||!t.shimEdge)return n("MS edge shim is not included in this adapter release."),r;n("adapter.js shimming edge."),r.browserShim=_a,pa(e),fa(e),ma(e,i),va(e),Fa(e,i),ja(e);break;case"safari":if(!Ua||!t.shimSafari)return n("Safari shim is not included in this adapter release."),r;n("adapter.js shimming safari."),r.browserShim=Ua,Ga(e,i),Ma(e),Na(e),xa(e),shimLocalStreamsAPI(e),shimRemoteStreamsAPI(e),Oa(e),Pa(e),La(e),Va(e),Fa(e,i),ja(e),Ha(e,i);break;default:n("Unsupported browser!")}}({window:"undefined"==typeof window?void 0:window});var Wa="4.15.9",Ja={},qa=Xi,Ka=$i,Qa=Object.keys||function(e){return qa(e,Ka)},Xa=O,$a=cn,Ya=sn,Za=hn,eo=me,to=Qa;Ja.f=Xa&&!$a?Object.defineProperties:function(e,t){Za(e);for(var n,i=eo(t),r=to(t),a=r.length,o=0;a>o;)Ya.f(e,n=r[o++],i[n]);return e};var no,io=we("document","documentElement"),ro=hn,ao=Ja,oo=$i,so=Kn,co=io,uo=Kt,lo=qn("IE_PROTO"),ho=function(){},po=function(e){return"<script>"+e+"</"+"script>"},fo=function(e){e.write(po("")),e.close();var t=e.parentWindow.Object;return e=null,t},mo=function(){try{no=new ActiveXObject("htmlfile")}catch(i){}var e,t;mo="undefined"!=typeof document?document.domain&&no?fo(no):((t=uo("iframe")).style.display="none",co.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(po("document.F=Object")),e.close(),e.F):fo(no);for(var n=oo.length;n--;)delete mo.prototype[oo[n]];return mo()};so[lo]=!0;var vo=Object.create||function(e,t){var n;return null!==e?(ho.prototype=ro(e),n=new ho,ho.prototype=null,n[lo]=e):n=mo(),void 0===t?n:ao.f(n,t)},_o=Mt,go=vo,yo=sn.f,So=_o("unscopables"),bo=Array.prototype;null==bo[So]&&yo(bo,So,{configurable:!0,value:go(null)});var ko,To,Io,Eo=function(e){bo[So][e]=!0},wo={},Ro=!M((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Co=_t,Ao=ye,xo=ft,Po=Ro,Do=qn("IE_PROTO"),Mo=Object,Oo=Mo.prototype,No=Po?Mo.getPrototypeOf:function(e){var t=xo(e);if(Co(t,Do))return t[Do];var n=t.constructor;return Ao(n)&&t instanceof n?n.prototype:t instanceof Mo?Oo:null},Lo=M,Uo=ye,Vo=ke,Fo=No,jo=Ei,Bo=Mt("iterator"),Ho=!1;[].keys&&("next"in(Io=[].keys())?(To=Fo(Fo(Io)))!==Object.prototype&&(ko=To):Ho=!0);var Go=!Vo(ko)||Lo((function(){var e={};return ko[Bo].call(e)!==e}));Go&&(ko={}),Uo(ko[Bo])||jo(ko,Bo,(function(){return this}));var zo={IteratorPrototype:ko,BUGGY_SAFARI_ITERATORS:Ho},Wo=sn.f,Jo=_t,qo=Mt("toStringTag"),Ko=function(e,t,n){e&&!n&&(e=e.prototype),e&&!Jo(e,qo)&&Wo(e,qo,{configurable:!0,value:t})},Qo=zo.IteratorPrototype,Xo=vo,$o=W,Yo=Ko,Zo=wo,es=function(){return this},ts=function(e,t,n,i){var r=t+" Iterator";return e.prototype=Xo(Qo,{next:$o(+!i,n)}),Yo(e,r,!1),Zo[r]=es,e},ns=ye,is=String,rs=TypeError,as=ie,os=hn,ss=function(e){if("object"==typeof e||ns(e))return e;throw rs("Can't set "+is(e)+" as a prototype")},cs=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=as(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return os(n),ss(i),t?e(n,i):n.__proto__=i,n}}():void 0),us=Rr,ds=V,ls=ye,hs=ts,ps=No,fs=cs,ms=Ko,vs=wn,_s=Ei,gs=wo,ys=Mn.PROPER,Ss=Mn.CONFIGURABLE,bs=zo.IteratorPrototype,ks=zo.BUGGY_SAFARI_ITERATORS,Ts=Mt("iterator"),Is="keys",Es="values",ws="entries",Rs=function(){return this},Cs=function(e,t,n,i,r,a,o){hs(n,t,i);var s,c,u,d=function(e){if(e===r&&m)return m;if(!ks&&e in p)return p[e];switch(e){case Is:case Es:case ws:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Ts]||p["@@iterator"]||r&&p[r],m=!ks&&f||d(r),v="Array"==t&&p.entries||f;if(v&&(s=ps(v.call(new e)))!==Object.prototype&&s.next&&(ps(s)!==bs&&(fs?fs(s,bs):ls(s[Ts])||_s(s,Ts,Rs)),ms(s,l,!0)),ys&&r==Es&&f&&f.name!==Es&&(Ss?vs(p,"name",Es):(h=!0,m=function(){return ds(f,this)})),r)if(c={values:d(Es),keys:a?m:d(Is),entries:d(ws)},o)for(u in c)(ks||h||!(u in p))&&_s(p,u,c[u]);else us({target:t,proto:!0,forced:ks||h},c);return p[Ts]!==m&&_s(p,Ts,m,{name:r}),gs[t]=m,c},As=function(e,t){return{value:e,done:t}},xs=me,Ps=Eo,Ds=wo,Ms=ci,Os=sn.f,Ns=Cs,Ls=As,Us=O,Vs="Array Iterator",Fs=Ms.set,js=Ms.getterFor(Vs),Bs=Ns(Array,"Array",(function(e,t){Fs(this,{type:Vs,target:xs(e),index:0,kind:t})}),(function(){var e=js(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,Ls(void 0,!0)):Ls("keys"==n?i:"values"==n?t[i]:[i,t[i]],!1)}),"values"),Hs=Ds.Arguments=Ds.Array;if(Ps("keys"),Ps("values"),Ps("entries"),Us&&"values"!==Hs.name)try{Os(Hs,"name",{value:"values"})}catch(IQ){}var Gs={};Gs[Mt("toStringTag")]="z";var zs="[object z]"===String(Gs),Ws=zs,Js=ye,qs=ee,Ks=Mt("toStringTag"),Qs=Object,Xs="Arguments"==qs(function(){return arguments}()),$s=Ws?qs:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(IQ){}}(t=Qs(e),Ks))?n:Xs?qs(t):"Object"==(i=qs(t))&&Js(t.callee)?"Arguments":i},Ys=$s,Zs=zs?{}.toString:function(){return"[object "+Ys(this)+"]"};zs||Ei(Object.prototype,"toString",Zs,{unsafe:!0});var ec={exports:{}},tc={},nc=zt,ic=sn,rc=W,ac=function(e,t,n){var i=nc(t);i in e?ic.f(e,i,rc(0,n)):e[i]=n},oc=Oi,sc=Fi,cc=ac,uc=Array,dc=Math.max,lc=function(e,t,n){for(var i=sc(e),r=oc(t,i),a=oc(void 0===n?i:n,i),o=uc(dc(a-r,0)),s=0;r<a;r++,s++)cc(o,s,e[r]);return o.length=s,o},hc=ee,pc=me,fc=wi.f,mc=lc,vc="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];tc.f=function(e){return vc&&"Window"==hc(e)?function(e){try{return fc(e)}catch(IQ){return mc(vc)}}(e):fc(pc(e))};var _c=M((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),gc=M,yc=ke,Sc=ee,bc=_c,kc=Object.isExtensible,Tc=gc((function(){kc(1)}))||bc?function(e){return!!yc(e)&&((!bc||"ArrayBuffer"!=Sc(e))&&(!kc||kc(e)))}:kc,Ic=!M((function(){return Object.isExtensible(Object.preventExtensions({}))})),Ec=Rr,wc=ie,Rc=Kn,Cc=ke,Ac=_t,xc=sn.f,Pc=wi,Dc=tc,Mc=Tc,Oc=Ic,Nc=!1,Lc=kt("meta"),Uc=0,Vc=function(e){xc(e,Lc,{value:{objectID:"O"+Uc++,weakData:{}}})},Fc=ec.exports={enable:function(){Fc.enable=function(){},Nc=!0;var e=Pc.f,t=wc([].splice),n={};n[Lc]=1,e(n).length&&(Pc.f=function(n){for(var i=e(n),r=0,a=i.length;r<a;r++)if(i[r]===Lc){t(i,r,1);break}return i},Ec({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Dc.f}))},fastKey:function(e,t){if(!Cc(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Ac(e,Lc)){if(!Mc(e))return"F";if(!t)return"E";Vc(e)}return e[Lc].objectID},getWeakData:function(e,t){if(!Ac(e,Lc)){if(!Mc(e))return!0;if(!t)return!1;Vc(e)}return e[Lc].weakData},onFreeze:function(e){return Oc&&Nc&&Mc(e)&&!Ac(e,Lc)&&Vc(e),e}};Rc[Lc]=!0;var jc=Xe,Bc=N,Hc=ie(ie.bind),Gc=function(e,t){return jc(e),void 0===t?e:Bc?Hc(e,t):function(){return e.apply(t,arguments)}},zc=wo,Wc=Mt("iterator"),Jc=Array.prototype,qc=function(e){return void 0!==e&&(zc.Array===e||Jc[Wc]===e)},Kc=$s,Qc=Ze,Xc=ue,$c=wo,Yc=Mt("iterator"),Zc=function(e){if(!Xc(e))return Qc(e,Yc)||Qc(e,"@@iterator")||$c[Kc(e)]},eu=V,tu=Xe,nu=hn,iu=Je,ru=Zc,au=TypeError,ou=function(e,t){var n=arguments.length<2?ru(e):t;if(tu(n))return nu(eu(n,e));throw au(iu(e)+" is not iterable")},su=V,cu=hn,uu=Ze,du=function(e,t,n){var i,r;cu(e);try{if(!(i=uu(e,"return"))){if("throw"===t)throw n;return n}i=su(i,e)}catch(IQ){r=!0,i=IQ}if("throw"===t)throw n;if(r)throw i;return cu(i),n},lu=Gc,hu=V,pu=hn,fu=Je,mu=qc,vu=Fi,_u=Re,gu=ou,yu=Zc,Su=du,bu=TypeError,ku=function(e,t){this.stopped=e,this.result=t},Tu=ku.prototype,Iu=function(e,t,n){var i,r,a,o,s,c,u,d=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=lu(t,d),v=function(e){return i&&Su(i,"normal",e),new ku(!0,e)},_=function(e){return l?(pu(e),f?m(e[0],e[1],v):m(e[0],e[1])):f?m(e,v):m(e)};if(h)i=e.iterator;else if(p)i=e;else{if(!(r=yu(e)))throw bu(fu(e)+" is not iterable");if(mu(r)){for(a=0,o=vu(e);o>a;a++)if((s=_(e[a]))&&_u(Tu,s))return s;return new ku(!1)}i=gu(e,r)}for(c=h?e.next:i.next;!(u=hu(c,i)).done;){try{s=_(u.value)}catch(IQ){Su(i,"throw",IQ)}if("object"==typeof s&&s&&_u(Tu,s))return s}return new ku(!1)},Eu=Re,wu=TypeError,Ru=function(e,t){if(Eu(t,e))return e;throw wu("Incorrect invocation")},Cu=Mt("iterator"),Au=!1;try{var xu=0,Pu={next:function(){return{done:!!xu++}},return:function(){Au=!0}};Pu[Cu]=function(){return this},Array.from(Pu,(function(){throw 2}))}catch(IQ){}var Du=function(e,t){if(!t&&!Au)return!1;var n=!1;try{var i={};i[Cu]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(IQ){}return n},Mu=ye,Ou=ke,Nu=cs,Lu=function(e,t,n){var i,r;return Nu&&Mu(i=t.constructor)&&i!==n&&Ou(r=i.prototype)&&r!==n.prototype&&Nu(e,r),e},Uu=Rr,Vu=P,Fu=ie,ju=yr,Bu=Ei,Hu=ec.exports,Gu=Iu,zu=Ru,Wu=ye,Ju=ue,qu=ke,Ku=M,Qu=Du,Xu=Ko,$u=Lu,Yu=function(e,t,n){var i=-1!==e.indexOf("Map"),r=-1!==e.indexOf("Weak"),a=i?"set":"add",o=Vu[e],s=o&&o.prototype,c=o,u={},d=function(e){var t=Fu(s[e]);Bu(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(r&&!qu(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return r&&!qu(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(r&&!qu(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(ju(e,!Wu(o)||!(r||s.forEach&&!Ku((function(){(new o).entries().next()})))))c=n.getConstructor(t,e,i,a),Hu.enable();else if(ju(e,!0)){var l=new c,h=l[a](r?{}:-0,1)!=l,p=Ku((function(){l.has(1)})),f=Qu((function(e){new o(e)})),m=!r&&Ku((function(){for(var e=new o,t=5;t--;)e[a](t,t);return!e.has(-0)}));f||((c=t((function(e,t){zu(e,s);var n=$u(new o,e,c);return Ju(t)||Gu(t,n[a],{that:n,AS_ENTRIES:i}),n}))).prototype=s,s.constructor=c),(p||m)&&(d("delete"),d("has"),i&&d("get")),(m||h)&&d(a),r&&s.clear&&delete s.clear}return u[e]=c,Uu({global:!0,constructor:!0,forced:c!=o},u),Xu(c,e),r||n.setStrong(c,e,i),c},Zu=Ei,ed=function(e,t,n){for(var i in t)Zu(e,i,t[i],n);return e},td=we,nd=sn,id=O,rd=Mt("species"),ad=function(e){var t=td(e),n=nd.f;id&&t&&!t[rd]&&n(t,rd,{configurable:!0,get:function(){return this}})},od=sn.f,sd=vo,cd=ed,ud=Gc,dd=Ru,ld=ue,hd=Iu,pd=Cs,fd=As,md=ad,vd=O,_d=ec.exports.fastKey,gd=ci.set,yd=ci.getterFor,Sd={getConstructor:function(e,t,n,i){var r=e((function(e,r){dd(e,a),gd(e,{type:t,index:sd(null),first:void 0,last:void 0,size:0}),vd||(e.size=0),ld(r)||hd(r,e[i],{that:e,AS_ENTRIES:n})})),a=r.prototype,o=yd(t),s=function(e,t,n){var i,r,a=o(e),s=c(e,t);return s?s.value=n:(a.last=s={index:r=_d(t,!0),key:t,value:n,previous:i=a.last,next:void 0,removed:!1},a.first||(a.first=s),i&&(i.next=s),vd?a.size++:e.size++,"F"!==r&&(a.index[r]=s)),e},c=function(e,t){var n,i=o(e),r=_d(t);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==t)return n};return cd(a,{clear:function(){for(var e=o(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,vd?e.size=0:this.size=0},delete:function(e){var t=this,n=o(t),i=c(t,e);if(i){var r=i.next,a=i.previous;delete n.index[i.index],i.removed=!0,a&&(a.next=r),r&&(r.previous=a),n.first==i&&(n.first=r),n.last==i&&(n.last=a),vd?n.size--:t.size--}return!!i},forEach:function(e){for(var t,n=o(this),i=ud(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!c(this,e)}}),cd(a,n?{get:function(e){var t=c(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),vd&&od(a,"size",{get:function(){return o(this).size}}),r},setStrong:function(e,t,n){var i=t+" Iterator",r=yd(t),a=yd(i);pd(e,t,(function(e,t){gd(this,{type:i,target:e,state:r(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?fd("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,fd(void 0,!0))}),n?"entries":"values",!n,!0),md(t)}};Yu("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Sd);var bd=$s,kd=String,Td=function(e){if("Symbol"===bd(e))throw TypeError("Cannot convert a Symbol value to a string");return kd(e)},Id=ie,Ed=xi,wd=Td,Rd=he,Cd=Id("".charAt),Ad=Id("".charCodeAt),xd=Id("".slice),Pd=function(e){return function(t,n){var i,r,a=wd(Rd(t)),o=Ed(n),s=a.length;return o<0||o>=s?e?"":void 0:(i=Ad(a,o))<55296||i>56319||o+1===s||(r=Ad(a,o+1))<56320||r>57343?e?Cd(a,o):i:e?xd(a,o,o+2):r-56320+(i-55296<<10)+65536}},Dd={codeAt:Pd(!1),charAt:Pd(!0)},Md=Dd.charAt,Od=Td,Nd=ci,Ld=Cs,Ud=As,Vd="String Iterator",Fd=Nd.set,jd=Nd.getterFor(Vd);Ld(String,"String",(function(e){Fd(this,{type:Vd,string:Od(e),index:0})}),(function(){var e,t=jd(this),n=t.string,i=t.index;return i>=n.length?Ud(void 0,!0):(e=Md(n,i),t.index+=e.length,Ud(e,!1))}));var Bd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Hd=Kt("span").classList,Gd=Hd&&Hd.constructor&&Hd.constructor.prototype,zd=Gd===Object.prototype?void 0:Gd,Wd=P,Jd=Bd,qd=zd,Kd=Bs,Qd=wn,Xd=Mt,$d=Xd("iterator"),Yd=Xd("toStringTag"),Zd=Kd.values,el=function(e,t){if(e){if(e[$d]!==Zd)try{Qd(e,$d,Zd)}catch(IQ){e[$d]=Zd}if(e[Yd]||Qd(e,Yd,t),Jd[t])for(var n in Kd)if(e[n]!==Kd[n])try{Qd(e,n,Kd[n])}catch(IQ){e[n]=Kd[n]}}};for(var tl in Jd)el(Wd[tl]&&Wd[tl].prototype,tl);el(qd,"DOMTokenList");var nl=N,il=Function.prototype,rl=il.apply,al=il.call,ol="object"==typeof Reflect&&Reflect.apply||(nl?al.bind(rl):function(){return al.apply(rl,arguments)}),sl=ie([].slice),cl=TypeError,ul=function(e,t){if(e<t)throw cl("Not enough arguments");return e},dl=P,ll=ol,hl=ye,pl=sl,fl=ul,ml=/MSIE .\./.test(Ce),vl=dl.Function,_l=function(e){return ml?function(t,n){var i=fl(arguments.length,1)>2,r=hl(t)?t:vl(t),a=i?pl(arguments,2):void 0;return e(i?function(){ll(r,this,a)}:r,n)}:e},gl={setTimeout:_l(dl.setTimeout),setInterval:_l(dl.setInterval)},yl=gl.setInterval;Rr({global:!0,bind:!0,forced:P.setInterval!==yl},{setInterval:yl});var Sl=gl.setTimeout;Rr({global:!0,bind:!0,forced:P.setTimeout!==Sl},{setTimeout:Sl}),Yu("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Sd);var bl=ee,kl=Array.isArray||function(e){return"Array"==bl(e)},Tl=ie,Il=M,El=ye,wl=$s,Rl=jn,Cl=function(){},Al=[],xl=we("Reflect","construct"),Pl=/^\s*(?:class|function)\b/,Dl=Tl(Pl.exec),Ml=!Pl.exec(Cl),Ol=function(e){if(!El(e))return!1;try{return xl(Cl,Al,e),!0}catch(IQ){return!1}},Nl=function(e){if(!El(e))return!1;switch(wl(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ml||!!Dl(Pl,Rl(e))}catch(IQ){return!0}};Nl.sham=!0;var Ll=!xl||Il((function(){var e;return Ol(Ol.call)||!Ol(Object)||!Ol((function(){e=!0}))||e}))?Nl:Ol,Ul=kl,Vl=Ll,Fl=ke,jl=Mt("species"),Bl=Array,Hl=function(e){var t;return Ul(e)&&(t=e.constructor,(Vl(t)&&(t===Bl||Ul(t.prototype))||Fl(t)&&null===(t=t[jl]))&&(t=void 0)),void 0===t?Bl:t},Gl=function(e,t){return new(Hl(e))(0===t?0:t)},zl=Gc,Wl=ce,Jl=ft,ql=Fi,Kl=Gl,Ql=ie([].push),Xl=function(e){var t=1==e,n=2==e,i=3==e,r=4==e,a=6==e,o=7==e,s=5==e||a;return function(c,u,d,l){for(var h,p,f=Jl(c),m=Wl(f),v=zl(u,d),_=ql(m),g=0,y=l||Kl,S=t?y(c,_):n||o?y(c,0):void 0;_>g;g++)if((s||g in m)&&(p=v(h=m[g],g,f),e))if(t)S[g]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return g;case 2:Ql(S,h)}else switch(e){case 4:return!1;case 7:Ql(S,h)}return a?-1:i||r?r:S}},$l={forEach:Xl(0),map:Xl(1),filter:Xl(2),some:Xl(3),every:Xl(4),find:Xl(5),findIndex:Xl(6),filterReject:Xl(7)},Yl=M,Zl=Ne,eh=Mt("species"),th=function(e){return Zl>=51||!Yl((function(){var t=[];return(t.constructor={})[eh]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},nh=$l.map;Rr({target:"Array",proto:!0,forced:!th("map")},{map:function(e){return nh(this,e,arguments.length>1?arguments[1]:void 0)}});var ih=O,rh=kl,ah=TypeError,oh=Object.getOwnPropertyDescriptor,sh=ih&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(IQ){return IQ instanceof TypeError}}(),ch=TypeError,uh=function(e){if(e>9007199254740991)throw ch("Maximum allowed index exceeded");return e},dh=Je,lh=TypeError,hh=function(e,t){if(!delete e[t])throw lh("Cannot delete property "+dh(t)+" of "+dh(e))},ph=Rr,fh=ft,mh=Oi,vh=xi,_h=Fi,gh=sh?function(e,t){if(rh(e)&&!oh(e,"length").writable)throw ah("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},yh=uh,Sh=Gl,bh=ac,kh=hh,Th=th("splice"),Ih=Math.max,Eh=Math.min;ph({target:"Array",proto:!0,forced:!Th},{splice:function(e,t){var n,i,r,a,o,s,c=fh(this),u=_h(c),d=mh(e,u),l=arguments.length;for(0===l?n=i=0:1===l?(n=0,i=u-d):(n=l-2,i=Eh(Ih(vh(t),0),u-d)),yh(u+n-i),r=Sh(c,i),a=0;a<i;a++)(o=d+a)in c&&bh(r,a,c[o]);if(r.length=i,n<i){for(a=d;a<u-i;a++)s=a+n,(o=a+i)in c?c[s]=c[o]:kh(c,s);for(a=u;a>u-i+n;a--)kh(c,a-1)}else if(n>i)for(a=u-i;a>d;a--)s=a+n-1,(o=a+i-1)in c?c[s]=c[o]:kh(c,s);for(a=0;a<n;a++)c[a+d]=arguments[a+2];return gh(c,u-i+n),r}});var wh=M,Rh=function(e,t){var n=[][e];return!!n&&wh((function(){n.call(null,t||function(){return 1},1)}))},Ch=$l.forEach,Ah=Rh("forEach")?[].forEach:function(e){return Ch(this,e,arguments.length>1?arguments[1]:void 0)};Rr({target:"Array",proto:!0,forced:[].forEach!=Ah},{forEach:Ah});var xh=P,Ph=Bd,Dh=zd,Mh=Ah,Oh=wn,Nh=function(e){if(e&&e.forEach!==Mh)try{Oh(e,"forEach",Mh)}catch(IQ){e.forEach=Mh}};for(var Lh in Ph)Ph[Lh]&&Nh(xh[Lh]&&xh[Lh].prototype);Nh(Dh);var Uh=Rr,Vh=ce,Fh=me,jh=Rh,Bh=ie([].join),Hh=Vh!=Object,Gh=jh("join",",");Uh({target:"Array",proto:!0,forced:Hh||!Gh},{join:function(e){return Bh(Fh(this),void 0===e?",":e)}});var zh=$l.filter;Rr({target:"Array",proto:!0,forced:!th("filter")},{filter:function(e){return zh(this,e,arguments.length>1?arguments[1]:void 0)}});var Wh=Rr,Jh=M,qh=kl,Kh=ke,Qh=ft,Xh=Fi,$h=uh,Yh=ac,Zh=Gl,ep=th,tp=Ne,np=Mt("isConcatSpreadable"),ip=tp>=51||!Jh((function(){var e=[];return e[np]=!1,e.concat()[0]!==e})),rp=ep("concat"),ap=function(e){if(!Kh(e))return!1;var t=e[np];return void 0!==t?!!t:qh(e)};Wh({target:"Array",proto:!0,arity:1,forced:!ip||!rp},{concat:function(e){var t,n,i,r,a,o=Qh(this),s=Zh(o,0),c=0;for(t=-1,i=arguments.length;t<i;t++)if(ap(a=-1===t?o:arguments[t]))for(r=Xh(a),$h(c+r),n=0;n<r;n++,c++)n in a&&Yh(s,c,a[n]);else $h(c+1),Yh(s,c++,a);return s.length=c,s}});var op=ie,sp=Ei,cp=Date.prototype,up="Invalid Date",dp="toString",lp=op(cp.toString),hp=op(cp.getTime);String(new Date(NaN))!=up&&sp(cp,dp,(function(){var e=hp(this);return e==e?lp(this):up}));var pp=xi,fp=Td,mp=he,vp=RangeError,_p=function(e){var t=fp(mp(this)),n="",i=pp(e);if(i<0||Infinity==i)throw vp("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n},gp=ie,yp=Ui,Sp=Td,bp=he,kp=gp(_p),Tp=gp("".slice),Ip=Math.ceil,Ep=function(e){return function(t,n,i){var r,a,o=Sp(bp(t)),s=yp(n),c=o.length,u=void 0===i?" ":Sp(i);return s<=c||""==u?o:((a=kp(u,Ip((r=s-c)/u.length))).length>r&&(a=Tp(a,0,r)),e?o+a:a+o)}},wp={start:Ep(!1),end:Ep(!0)},Rp=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Ce),Cp=wp.start;Rr({target:"String",proto:!0,forced:Rp},{padStart:function(e){return Cp(this,e,arguments.length>1?arguments[1]:void 0)}});var Ap=hn,xp=function(){var e=Ap(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Pp=M,Dp=P.RegExp,Mp=Pp((function(){var e=Dp("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Op=Mp||Pp((function(){return!Dp("a","y").sticky})),Np={BROKEN_CARET:Mp||Pp((function(){var e=Dp("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Op,UNSUPPORTED_Y:Mp},Lp=M,Up=P.RegExp,Vp=Lp((function(){var e=Up(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Fp=M,jp=P.RegExp,Bp=Fp((function(){var e=jp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Hp=V,Gp=ie,zp=Td,Wp=xp,Jp=Np,qp=rt.exports,Kp=vo,Qp=ci.get,Xp=Vp,$p=Bp,Yp=qp("native-string-replace",String.prototype.replace),Zp=RegExp.prototype.exec,ef=Zp,tf=Gp("".charAt),nf=Gp("".indexOf),rf=Gp("".replace),af=Gp("".slice),of=function(){var e=/a/,t=/b*/g;return Hp(Zp,e,"a"),Hp(Zp,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),sf=Jp.BROKEN_CARET,cf=void 0!==/()??/.exec("")[1];(of||cf||sf||Xp||$p)&&(ef=function(e){var t,n,i,r,a,o,s,c=this,u=Qp(c),d=zp(e),l=u.raw;if(l)return l.lastIndex=c.lastIndex,t=Hp(ef,l,d),c.lastIndex=l.lastIndex,t;var h=u.groups,p=sf&&c.sticky,f=Hp(Wp,c),m=c.source,v=0,_=d;if(p&&(f=rf(f,"y",""),-1===nf(f,"g")&&(f+="g"),_=af(d,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==tf(d,c.lastIndex-1))&&(m="(?: "+m+")",_=" "+_,v++),n=new RegExp("^(?:"+m+")",f)),cf&&(n=new RegExp("^"+m+"$(?!\\s)",f)),of&&(i=c.lastIndex),r=Hp(Zp,p?n:c,_),p?r?(r.input=af(r.input,v),r[0]=af(r[0],v),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:of&&r&&(c.lastIndex=c.global?r.index+r[0].length:i),cf&&r&&r.length>1&&Hp(Yp,r[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)})),r&&h)for(r.groups=o=Kp(null),a=0;a<h.length;a++)o[(s=h[a])[0]]=r[s[1]];return r});var uf=ef;Rr({target:"RegExp",proto:!0,forced:/./.exec!==uf},{exec:uf});var df=ie,lf=Ei,hf=uf,pf=M,ff=Mt,mf=wn,vf=ff("species"),_f=RegExp.prototype,gf=function(e,t,n,i){var r=ff(e),a=!pf((function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})),o=a&&!pf((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[vf]=function(){return n},n.flags="",n[r]=/./[r]),n.exec=function(){return t=!0,null},n[r](""),!t}));if(!a||!o||n){var s=df(/./[r]),c=t(r,""[e],(function(e,t,n,i,r){var o=df(e),c=t.exec;return c===hf||c===_f.exec?a&&!r?{done:!0,value:s(t,n,i)}:{done:!0,value:o(n,t,i)}:{done:!1}}));lf(String.prototype,e,c[0]),lf(_f,r,c[1])}i&&mf(_f[r],"sham",!0)},yf=Dd.charAt,Sf=function(e,t,n){return t+(n?yf(e,t).length:1)},bf=ie,kf=ft,Tf=Math.floor,If=bf("".charAt),Ef=bf("".replace),wf=bf("".slice),Rf=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Cf=/\$([$&'`]|\d{1,2})/g,Af=V,xf=hn,Pf=ye,Df=ee,Mf=uf,Of=TypeError,Nf=function(e,t){var n=e.exec;if(Pf(n)){var i=Af(n,e,t);return null!==i&&xf(i),i}if("RegExp"===Df(e))return Af(Mf,e,t);throw Of("RegExp#exec called on incompatible receiver")},Lf=ol,Uf=V,Vf=ie,Ff=gf,jf=M,Bf=hn,Hf=ye,Gf=ue,zf=xi,Wf=Ui,Jf=Td,qf=he,Kf=Sf,Qf=Ze,Xf=function(e,t,n,i,r,a){var o=n+e.length,s=i.length,c=Cf;return void 0!==r&&(r=kf(r),c=Rf),Ef(a,c,(function(a,c){var u;switch(If(c,0)){case"$":return"$";case"&":return e;case"`":return wf(t,0,n);case"'":return wf(t,o);case"<":u=r[wf(c,1,-1)];break;default:var d=+c;if(0===d)return a;if(d>s){var l=Tf(d/10);return 0===l?a:l<=s?void 0===i[l-1]?If(c,1):i[l-1]+If(c,1):a}u=i[d-1]}return void 0===u?"":u}))},$f=Nf,Yf=Mt("replace"),Zf=Math.max,em=Math.min,tm=Vf([].concat),nm=Vf([].push),im=Vf("".indexOf),rm=Vf("".slice),am="$0"==="a".replace(/./,"$0"),om=!!/./[Yf]&&""===/./[Yf]("a","$0"),sm=!jf((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));Ff("replace",(function(e,t,n){var i=om?"$":"$0";return[function(e,n){var i=qf(this),r=Gf(e)?void 0:Qf(e,Yf);return r?Uf(r,e,i,n):Uf(t,Jf(i),e,n)},function(e,r){var a=Bf(this),o=Jf(e);if("string"==typeof r&&-1===im(r,i)&&-1===im(r,"$<")){var s=n(t,a,o,r);if(s.done)return s.value}var c=Hf(r);c||(r=Jf(r));var u=a.global;if(u){var d=a.unicode;a.lastIndex=0}for(var l=[];;){var h=$f(a,o);if(null===h)break;if(nm(l,h),!u)break;""===Jf(h[0])&&(a.lastIndex=Kf(o,Wf(a.lastIndex),d))}for(var p,f="",m=0,v=0;v<l.length;v++){for(var _=Jf((h=l[v])[0]),g=Zf(em(zf(h.index),o.length),0),y=[],S=1;S<h.length;S++)nm(y,void 0===(p=h[S])?p:String(p));var b=h.groups;if(c){var k=tm([_],y,g,o);void 0!==b&&nm(k,b);var T=Jf(Lf(r,void 0,k))}else T=Xf(_,o,g,y,b,r);g>=m&&(f+=rm(o,m,g)+T,m=g+_.length)}return f+rm(o,m)}]}),!sm||!am||om);var cm=V,um=_t,dm=Re,lm=xp,hm=RegExp.prototype,pm=function(e){var t=e.flags;return void 0!==t||"flags"in hm||um(e,"flags")||!dm(hm,e)?t:cm(lm,e)},fm=Mn.PROPER,mm=Ei,vm=hn,_m=Td,gm=M,ym=pm,Sm="toString",bm=RegExp.prototype.toString,km=gm((function(){return"/a/b"!=bm.call({source:"a",flags:"b"})})),Tm=fm&&bm.name!=Sm;(km||Tm)&&mm(RegExp.prototype,Sm,(function(){var e=vm(this);return"/"+_m(e.source)+"/"+_m(ym(e))}),{unsafe:!0});var Im=M,Em=Mt("iterator"),wm=!Im((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,i){t.delete("b"),n+=i+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Em]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://褌械褋褌").host||"#%D0%B1"!==new URL("http://a#斜").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),Rm=lc,Cm=Math.floor,Am=function(e,t){var n=e.length,i=Cm(n/2);return n<8?xm(e,t):Pm(e,Am(Rm(e,0,i),t),Am(Rm(e,i),t),t)},xm=function(e,t){for(var n,i,r=e.length,a=1;a<r;){for(i=a,n=e[a];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==a++&&(e[i]=n)}return e},Pm=function(e,t,n,i){for(var r=t.length,a=n.length,o=0,s=0;o<r||s<a;)e[o+s]=o<r&&s<a?i(t[o],n[s])<=0?t[o++]:n[s++]:o<r?t[o++]:n[s++];return e},Dm=Am,Mm=Rr,Om=P,Nm=V,Lm=ie,Um=O,Vm=wm,Fm=Ei,jm=ed,Bm=Ko,Hm=ts,Gm=ci,zm=Ru,Wm=ye,Jm=_t,qm=Gc,Km=$s,Qm=hn,Xm=ke,$m=Td,Ym=vo,Zm=W,ev=ou,tv=Zc,nv=ul,iv=Dm,rv=Mt("iterator"),av="URLSearchParams",ov="URLSearchParamsIterator",sv=Gm.set,cv=Gm.getterFor(av),uv=Gm.getterFor(ov),dv=Object.getOwnPropertyDescriptor,lv=function(e){if(!Um)return Om[e];var t=dv(Om,e);return t&&t.value},hv=lv("fetch"),pv=lv("Request"),fv=lv("Headers"),mv=pv&&pv.prototype,vv=fv&&fv.prototype,_v=Om.RegExp,gv=Om.TypeError,yv=Om.decodeURIComponent,Sv=Om.encodeURIComponent,bv=Lm("".charAt),kv=Lm([].join),Tv=Lm([].push),Iv=Lm("".replace),Ev=Lm([].shift),wv=Lm([].splice),Rv=Lm("".split),Cv=Lm("".slice),Av=/\+/g,xv=Array(4),Pv=function(e){return xv[e-1]||(xv[e-1]=_v("((?:%[\\da-f]{2}){"+e+"})","gi"))},Dv=function(e){try{return yv(e)}catch(IQ){return e}},Mv=function(e){var t=Iv(e,Av," "),n=4;try{return yv(t)}catch(IQ){for(;n;)t=Iv(t,Pv(n--),Dv);return t}},Ov=/[!'()~]|%20/g,Nv={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Lv=function(e){return Nv[e]},Uv=function(e){return Iv(Sv(e),Ov,Lv)},Vv=Hm((function(e,t){sv(this,{type:ov,iterator:ev(cv(e).entries),kind:t})}),"Iterator",(function(){var e=uv(this),t=e.kind,n=e.iterator.next(),i=n.value;return n.done||(n.value="keys"===t?i.key:"values"===t?i.value:[i.key,i.value]),n}),!0),Fv=function(e){this.entries=[],this.url=null,void 0!==e&&(Xm(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===bv(e,0)?Cv(e,1):e:$m(e)))};Fv.prototype={type:av,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,i,r,a,o,s,c=tv(e);if(c)for(n=(t=ev(e,c)).next;!(i=Nm(n,t)).done;){if(a=(r=ev(Qm(i.value))).next,(o=Nm(a,r)).done||(s=Nm(a,r)).done||!Nm(a,r).done)throw gv("Expected sequence with length 2");Tv(this.entries,{key:$m(o.value),value:$m(s.value)})}else for(var u in e)Jm(e,u)&&Tv(this.entries,{key:u,value:$m(e[u])})},parseQuery:function(e){if(e)for(var t,n,i=Rv(e,"&"),r=0;r<i.length;)(t=i[r++]).length&&(n=Rv(t,"="),Tv(this.entries,{key:Mv(Ev(n)),value:Mv(kv(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],i=0;i<t.length;)e=t[i++],Tv(n,Uv(e.key)+"="+Uv(e.value));return kv(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var jv=function(){zm(this,Bv);var e=arguments.length>0?arguments[0]:void 0;sv(this,new Fv(e))},Bv=jv.prototype;if(jm(Bv,{append:function(e,t){nv(arguments.length,2);var n=cv(this);Tv(n.entries,{key:$m(e),value:$m(t)}),n.updateURL()},delete:function(e){nv(arguments.length,1);for(var t=cv(this),n=t.entries,i=$m(e),r=0;r<n.length;)n[r].key===i?wv(n,r,1):r++;t.updateURL()},get:function(e){nv(arguments.length,1);for(var t=cv(this).entries,n=$m(e),i=0;i<t.length;i++)if(t[i].key===n)return t[i].value;return null},getAll:function(e){nv(arguments.length,1);for(var t=cv(this).entries,n=$m(e),i=[],r=0;r<t.length;r++)t[r].key===n&&Tv(i,t[r].value);return i},has:function(e){nv(arguments.length,1);for(var t=cv(this).entries,n=$m(e),i=0;i<t.length;)if(t[i++].key===n)return!0;return!1},set:function(e,t){nv(arguments.length,1);for(var n,i=cv(this),r=i.entries,a=!1,o=$m(e),s=$m(t),c=0;c<r.length;c++)(n=r[c]).key===o&&(a?wv(r,c--,1):(a=!0,n.value=s));a||Tv(r,{key:o,value:s}),i.updateURL()},sort:function(){var e=cv(this);iv(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=cv(this).entries,i=qm(e,arguments.length>1?arguments[1]:void 0),r=0;r<n.length;)i((t=n[r++]).value,t.key,this)},keys:function(){return new Vv(this,"keys")},values:function(){return new Vv(this,"values")},entries:function(){return new Vv(this,"entries")}},{enumerable:!0}),Fm(Bv,rv,Bv.entries,{name:"entries"}),Fm(Bv,"toString",(function(){return cv(this).serialize()}),{enumerable:!0}),Bm(jv,av),Mm({global:!0,constructor:!0,forced:!Vm},{URLSearchParams:jv}),!Vm&&Wm(fv)){var Hv=Lm(vv.has),Gv=Lm(vv.set),zv=function(e){if(Xm(e)){var t,n=e.body;if(Km(n)===av)return t=e.headers?new fv(e.headers):new fv,Hv(t,"content-type")||Gv(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ym(e,{body:Zm(0,$m(n)),headers:Zm(0,t)})}return e};if(Wm(hv)&&Mm({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return hv(e,arguments.length>1?zv(arguments[1]):{})}}),Wm(pv)){var Wv=function(e){return zm(this,mv),new pv(e,arguments.length>1?zv(arguments[1]):{})};mv.constructor=Wv,Wv.prototype=mv,Mm({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Wv})}}var Jv={URLSearchParams:jv,getState:cv},qv=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Kv=V,Qv=hn,Xv=ue,$v=he,Yv=qv,Zv=Td,e_=Ze,t_=Nf;gf("search",(function(e,t,n){return[function(t){var n=$v(this),i=Xv(t)?void 0:e_(t,e);return i?Kv(i,t,n):new RegExp(t)[e](Zv(n))},function(e){var i=Qv(this),r=Zv(e),a=n(t,i,r);if(a.done)return a.value;var o=i.lastIndex;Yv(o,0)||(i.lastIndex=0);var s=t_(i,r);return Yv(i.lastIndex,o)||(i.lastIndex=o),null===s?-1:s.index}]}));(new Date).getTime();var n_=0,i_=function(){return(new Date).getTime()+n_},r_=function(){var e=new Date;return e.setTime(i_()),e.toLocaleString()},a_=V,o_=hn,s_=ue,c_=Ui,u_=Td,d_=he,l_=Ze,h_=Sf,p_=Nf;gf("match",(function(e,t,n){return[function(t){var n=d_(this),i=s_(t)?void 0:l_(t,e);return i?a_(i,t,n):new RegExp(t)[e](u_(n))},function(e){var i=o_(this),r=u_(e),a=n(t,i,r);if(a.done)return a.value;if(!i.global)return p_(i,r);var o=i.unicode;i.lastIndex=0;for(var s,c=[],u=0;null!==(s=p_(i,r));){var d=u_(s[0]);c[u]=d,""===d&&(i.lastIndex=h_(r,c_(i.lastIndex),o)),u++}return 0===u?null:c}]}));var f_=ke,m_=ee,v_=Mt("match"),__=function(e){var t;return f_(e)&&(void 0!==(t=e[v_])?!!t:"RegExp"==m_(e))},g_=sn.f,y_=O,S_=P,b_=ie,k_=yr,T_=Lu,I_=wn,E_=wi.f,w_=Re,R_=__,C_=Td,A_=pm,x_=Np,P_=function(e,t,n){n in e||g_(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},D_=Ei,M_=M,O_=_t,N_=ci.enforce,L_=ad,U_=Vp,V_=Bp,F_=Mt("match"),j_=S_.RegExp,B_=j_.prototype,H_=S_.SyntaxError,G_=b_(B_.exec),z_=b_("".charAt),W_=b_("".replace),J_=b_("".indexOf),q_=b_("".slice),K_=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Q_=/a/g,X_=/a/g,$_=new j_(Q_)!==Q_,Y_=x_.MISSED_STICKY,Z_=x_.UNSUPPORTED_Y,eg=y_&&(!$_||Y_||U_||V_||M_((function(){return X_[F_]=!1,j_(Q_)!=Q_||j_(X_)==X_||"/a/i"!=j_(Q_,"i")})));if(k_("RegExp",eg)){for(var tg=function(e,t){var n,i,r,a,o,s,c=w_(B_,this),u=R_(e),d=void 0===t,l=[],h=e;if(!c&&u&&d&&e.constructor===tg)return e;if((u||w_(B_,e))&&(e=e.source,d&&(t=A_(h))),e=void 0===e?"":C_(e),t=void 0===t?"":C_(t),h=e,U_&&"dotAll"in Q_&&(i=!!t&&J_(t,"s")>-1)&&(t=W_(t,/s/g,"")),n=t,Y_&&"sticky"in Q_&&(r=!!t&&J_(t,"y")>-1)&&Z_&&(t=W_(t,/y/g,"")),V_&&(a=function(e){for(var t,n=e.length,i=0,r="",a=[],o={},s=!1,c=!1,u=0,d="";i<=n;i++){if("\\"===(t=z_(e,i)))t+=z_(e,++i);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:G_(K_,q_(e,i+1))&&(i+=2,c=!0),r+=t,u++;continue;case">"===t&&c:if(""===d||O_(o,d))throw new H_("Invalid capture group name");o[d]=!0,a[a.length]=[d,u],c=!1,d="";continue}c?d+=t:r+=t}return[r,a]}(e),e=a[0],l=a[1]),o=T_(j_(e,t),c?this:B_,tg),(i||r||l.length)&&(s=N_(o),i&&(s.dotAll=!0,s.raw=tg(function(e){for(var t,n=e.length,i=0,r="",a=!1;i<=n;i++)"\\"!==(t=z_(e,i))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),r+=t):r+="[\\s\\S]":r+=t+z_(e,++i);return r}(e),n)),r&&(s.sticky=!0),l.length&&(s.groups=l)),e!==h)try{I_(o,"source",""===h?"(?:)":h)}catch(IQ){}return o},ng=E_(j_),ig=0;ng.length>ig;)P_(tg,j_,ng[ig++]);B_.constructor=tg,tg.prototype=B_,D_(S_,"RegExp",tg,{constructor:!0})}L_("RegExp");var rg=ie(1..valueOf),ag="\t\n\v\f\r 聽釟€鈥€鈥佲€傗€冣€勨€呪€嗏€団€堚€夆€娾€仧銆€\u2028\u2029\ufeff",og=he,sg=Td,cg=ie("".replace),ug="[\t\n\v\f\r 聽釟€鈥€鈥佲€傗€冣€勨€呪€嗏€団€堚€夆€娾€仧銆€\u2028\u2029\ufeff]",dg=RegExp("^"+ug+ug+"*"),lg=RegExp(ug+ug+"*$"),hg=function(e){return function(t){var n=sg(og(t));return 1&e&&(n=cg(n,dg,"")),2&e&&(n=cg(n,lg,"")),n}},pg={start:hg(1),end:hg(2),trim:hg(3)},fg=O,mg=P,vg=ie,_g=yr,gg=Ei,yg=_t,Sg=Lu,bg=Re,kg=ze,Tg=Bt,Ig=M,Eg=wi.f,wg=D.f,Rg=sn.f,Cg=rg,Ag=pg.trim,xg="Number",Pg=mg.Number,Dg=Pg.prototype,Mg=mg.TypeError,Og=vg("".slice),Ng=vg("".charCodeAt),Lg=function(e){var t=Tg(e,"number");return"bigint"==typeof t?t:Ug(t)},Ug=function(e){var t,n,i,r,a,o,s,c,u=Tg(e,"number");if(kg(u))throw Mg("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=Ag(u),43===(t=Ng(u,0))||45===t){if(88===(n=Ng(u,2))||120===n)return NaN}else if(48===t){switch(Ng(u,1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+u}for(o=(a=Og(u,2)).length,s=0;s<o;s++)if((c=Ng(a,s))<48||c>r)return NaN;return parseInt(a,i)}return+u};if(_g(xg,!Pg(" 0o1")||!Pg("0b1")||Pg("+0x1"))){for(var Vg,Fg=function(e){var t=arguments.length<1?0:Pg(Lg(e)),n=this;return bg(Dg,n)&&Ig((function(){Cg(n)}))?Sg(Object(t),n,Fg):t},jg=fg?Eg(Pg):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Bg=0;jg.length>Bg;Bg++)yg(Pg,Vg=jg[Bg])&&!yg(Fg,Vg)&&Rg(Fg,Vg,wg(Pg,Vg));Fg.prototype=Dg,Dg.constructor=Fg,gg(mg,xg,Fg,{constructor:!0})}var Hg=zi.includes,Gg=Eo;Rr({target:"Array",proto:!0,forced:M((function(){return!Array(1).includes()}))},{includes:function(e){return Hg(this,e,arguments.length>1?arguments[1]:void 0)}}),Gg("includes");var zg=__,Wg=TypeError,Jg=function(e){if(zg(e))throw Wg("The method doesn't accept regular expressions");return e},qg=Mt("match"),Kg=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[qg]=!1,"/./"[e](t)}catch(i){}}return!1},Qg=Rr,Xg=Jg,$g=he,Yg=Td,Zg=Kg,ey=ie("".indexOf);Qg({target:"String",proto:!0,forced:!Zg("includes")},{includes:function(e){return!!~ey(Yg($g(this)),Yg(Xg(e)),arguments.length>1?arguments[1]:void 0)}});var ty=Rr,ny=zi.indexOf,iy=Rh,ry=ie([].indexOf),ay=!!ry&&1/ry([1],1,-0)<0,oy=iy("indexOf");ty({target:"Array",proto:!0,forced:ay||!oy},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return ay?ry(this,e,t)||0:ny(this,e,t)}});var sy=ft,cy=No,uy=Ro;Rr({target:"Object",stat:!0,forced:M((function(){cy(1)})),sham:!uy},{getPrototypeOf:function(e){return cy(sy(e))}});var dy=ol,ly=Xe,hy=hn;Rr({target:"Reflect",stat:!0,forced:!M((function(){Reflect.apply((function(){}))}))},{apply:function(e,t,n){return dy(ly(e),t,hy(n))}});var py=O,fy=Mn.EXISTS,my=ie,vy=sn.f,_y=Function.prototype,gy=my(_y.toString),yy=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Sy=my(yy.exec);py&&!fy&&vy(_y,"name",{configurable:!0,get:function(){try{return Sy(yy,gy(this))[1]}catch(IQ){return""}}});var by=Rr,ky=Date,Ty=ie(ky.prototype.getTime);by({target:"Date",stat:!0},{now:function(){return Ty(new ky)}});var Iy,Ey,wy,Ry,Cy="process"==ee(P.process),Ay=Ll,xy=Je,Py=TypeError,Dy=function(e){if(Ay(e))return e;throw Py(xy(e)+" is not a constructor")},My=hn,Oy=Dy,Ny=ue,Ly=Mt("species"),Uy=function(e,t){var n,i=My(e).constructor;return void 0===i||Ny(n=My(i)[Ly])?t:Oy(n)},Vy=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ce),Fy=P,jy=ol,By=Gc,Hy=ye,Gy=_t,zy=M,Wy=io,Jy=sl,qy=Kt,Ky=ul,Qy=Vy,Xy=Cy,$y=Fy.setImmediate,Yy=Fy.clearImmediate,Zy=Fy.process,eS=Fy.Dispatch,tS=Fy.Function,nS=Fy.MessageChannel,iS=Fy.String,rS=0,aS={},oS="onreadystatechange";try{Iy=Fy.location}catch(IQ){}var sS=function(e){if(Gy(aS,e)){var t=aS[e];delete aS[e],t()}},cS=function(e){return function(){sS(e)}},uS=function(e){sS(e.data)},dS=function(e){Fy.postMessage(iS(e),Iy.protocol+"//"+Iy.host)};$y&&Yy||($y=function(e){Ky(arguments.length,1);var t=Hy(e)?e:tS(e),n=Jy(arguments,1);return aS[++rS]=function(){jy(t,void 0,n)},Ey(rS),rS},Yy=function(e){delete aS[e]},Xy?Ey=function(e){Zy.nextTick(cS(e))}:eS&&eS.now?Ey=function(e){eS.now(cS(e))}:nS&&!Qy?(Ry=(wy=new nS).port2,wy.port1.onmessage=uS,Ey=By(Ry.postMessage,Ry)):Fy.addEventListener&&Hy(Fy.postMessage)&&!Fy.importScripts&&Iy&&"file:"!==Iy.protocol&&!zy(dS)?(Ey=dS,Fy.addEventListener("message",uS,!1)):Ey=oS in qy("script")?function(e){Wy.appendChild(qy("script")).onreadystatechange=function(){Wy.removeChild(this),sS(e)}}:function(e){setTimeout(cS(e),0)});var lS,hS,pS,fS,mS,vS,_S,gS,yS={set:$y,clear:Yy},SS=P,bS=/ipad|iphone|ipod/i.test(Ce)&&void 0!==SS.Pebble,kS=/web0s(?!.*chrome)/i.test(Ce),TS=P,IS=Gc,ES=D.f,wS=yS.set,RS=Vy,CS=bS,AS=kS,xS=Cy,PS=TS.MutationObserver||TS.WebKitMutationObserver,DS=TS.document,MS=TS.process,OS=TS.Promise,NS=ES(TS,"queueMicrotask"),LS=NS&&NS.value;LS||(lS=function(){var e,t;for(xS&&(e=MS.domain)&&e.exit();hS;){t=hS.fn,hS=hS.next;try{t()}catch(IQ){throw hS?fS():pS=void 0,IQ}}pS=void 0,e&&e.enter()},RS||xS||AS||!PS||!DS?!CS&&OS&&OS.resolve?((_S=OS.resolve(void 0)).constructor=OS,gS=IS(_S.then,_S),fS=function(){gS(lS)}):xS?fS=function(){MS.nextTick(lS)}:(wS=IS(wS,TS),fS=function(){wS(lS)}):(mS=!0,vS=DS.createTextNode(""),new PS(lS).observe(vS,{characterData:!0}),fS=function(){vS.data=mS=!mS}));var US=LS||function(e){var t={fn:e,next:void 0};pS&&(pS.next=t),hS||(hS=t,fS()),pS=t},VS=P,FS=function(e){try{return{error:!1,value:e()}}catch(IQ){return{error:!0,value:IQ}}},jS=function(){this.head=null,this.tail=null};jS.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var BS=jS,HS=P.Promise,GS="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,zS=!GS&&!Cy&&"object"==typeof window&&"object"==typeof document,WS=P,JS=HS,qS=ye,KS=yr,QS=jn,XS=Mt,$S=zS,YS=GS,ZS=Ne;JS&&JS.prototype;var eb=XS("species"),tb=!1,nb=qS(WS.PromiseRejectionEvent),ib=KS("Promise",(function(){var e=QS(JS),t=e!==String(JS);if(!t&&66===ZS)return!0;if(!ZS||ZS<51||!/native code/.test(e)){var n=new JS((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((n.constructor={})[eb]=i,!(tb=n.then((function(){}))instanceof i))return!0}return!t&&($S||YS)&&!nb})),rb={CONSTRUCTOR:ib,REJECTION_EVENT:nb,SUBCLASSING:tb},ab={},ob=Xe,sb=TypeError,cb=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw sb("Bad Promise constructor");t=e,n=i})),this.resolve=ob(t),this.reject=ob(n)};ab.f=function(e){return new cb(e)};var ub,db,lb,hb=Rr,pb=Cy,fb=P,mb=V,vb=Ei,_b=cs,gb=Ko,yb=ad,Sb=Xe,bb=ye,kb=ke,Tb=Ru,Ib=Uy,Eb=yS.set,wb=US,Rb=function(e,t){var n=VS.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},Cb=FS,Ab=BS,xb=ci,Pb=HS,Db=ab,Mb="Promise",Ob=rb.CONSTRUCTOR,Nb=rb.REJECTION_EVENT,Lb=rb.SUBCLASSING,Ub=xb.getterFor(Mb),Vb=xb.set,Fb=Pb&&Pb.prototype,jb=Pb,Bb=Fb,Hb=fb.TypeError,Gb=fb.document,zb=fb.process,Wb=Db.f,Jb=Wb,qb=!!(Gb&&Gb.createEvent&&fb.dispatchEvent),Kb="unhandledrejection",Qb=function(e){var t;return!(!kb(e)||!bb(t=e.then))&&t},Xb=function(e,t){var n,i,r,a=t.value,o=1==t.state,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,d=e.domain;try{s?(o||(2===t.rejection&&tk(t),t.rejection=1),!0===s?n=a:(d&&d.enter(),n=s(a),d&&(d.exit(),r=!0)),n===e.promise?u(Hb("Promise-chain cycle")):(i=Qb(n))?mb(i,n,c,u):c(n)):u(a)}catch(IQ){d&&!r&&d.exit(),u(IQ)}},$b=function(e,t){e.notified||(e.notified=!0,wb((function(){for(var n,i=e.reactions;n=i.get();)Xb(n,e);e.notified=!1,t&&!e.rejection&&Zb(e)})))},Yb=function(e,t,n){var i,r;qb?((i=Gb.createEvent("Event")).promise=t,i.reason=n,i.initEvent(e,!1,!0),fb.dispatchEvent(i)):i={promise:t,reason:n},!Nb&&(r=fb["on"+e])?r(i):e===Kb&&Rb("Unhandled promise rejection",n)},Zb=function(e){mb(Eb,fb,(function(){var t,n=e.facade,i=e.value;if(ek(e)&&(t=Cb((function(){pb?zb.emit("unhandledRejection",i,n):Yb(Kb,n,i)})),e.rejection=pb||ek(e)?2:1,t.error))throw t.value}))},ek=function(e){return 1!==e.rejection&&!e.parent},tk=function(e){mb(Eb,fb,(function(){var t=e.facade;pb?zb.emit("rejectionHandled",t):Yb("rejectionhandled",t,e.value)}))},nk=function(e,t,n){return function(i){e(t,i,n)}},ik=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,$b(e,!0))},rk=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Hb("Promise can't be resolved itself");var i=Qb(t);i?wb((function(){var n={done:!1};try{mb(i,t,nk(rk,n,e),nk(ik,n,e))}catch(IQ){ik(n,IQ,e)}})):(e.value=t,e.state=1,$b(e,!1))}catch(IQ){ik({done:!1},IQ,e)}}};if(Ob&&(Bb=(jb=function(e){Tb(this,Bb),Sb(e),mb(ub,this);var t=Ub(this);try{e(nk(rk,t),nk(ik,t))}catch(IQ){ik(t,IQ)}}).prototype,(ub=function(e){Vb(this,{type:Mb,done:!1,notified:!1,parent:!1,reactions:new Ab,rejection:!1,state:0,value:void 0})}).prototype=vb(Bb,"then",(function(e,t){var n=Ub(this),i=Wb(Ib(this,jb));return n.parent=!0,i.ok=!bb(e)||e,i.fail=bb(t)&&t,i.domain=pb?zb.domain:void 0,0==n.state?n.reactions.add(i):wb((function(){Xb(i,n)})),i.promise})),db=function(){var e=new ub,t=Ub(e);this.promise=e,this.resolve=nk(rk,t),this.reject=nk(ik,t)},Db.f=Wb=function(e){return e===jb||undefined===e?new db(e):Jb(e)},bb(Pb)&&Fb!==Object.prototype)){lb=Fb.then,Lb||vb(Fb,"then",(function(e,t){var n=this;return new jb((function(e,t){mb(lb,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete Fb.constructor}catch(IQ){}_b&&_b(Fb,Bb)}hb({global:!0,constructor:!0,wrap:!0,forced:Ob},{Promise:jb}),gb(jb,Mb,!1),yb(Mb);var ak=HS,ok=rb.CONSTRUCTOR||!Du((function(e){ak.all(e).then(void 0,(function(){}))})),sk=V,ck=Xe,uk=ab,dk=FS,lk=Iu;Rr({target:"Promise",stat:!0,forced:ok},{all:function(e){var t=this,n=uk.f(t),i=n.resolve,r=n.reject,a=dk((function(){var n=ck(t.resolve),a=[],o=0,s=1;lk(e,(function(e){var c=o++,u=!1;s++,sk(n,t,e).then((function(e){u||(u=!0,a[c]=e,--s||i(a))}),r)})),--s||i(a)}));return a.error&&r(a.value),n.promise}});var hk=Rr,pk=rb.CONSTRUCTOR,fk=HS,mk=we,vk=ye,_k=Ei,gk=fk&&fk.prototype;if(hk({target:"Promise",proto:!0,forced:pk,real:!0},{catch:function(e){return this.then(void 0,e)}}),vk(fk)){var yk=mk("Promise").prototype.catch;gk.catch!==yk&&_k(gk,"catch",yk,{unsafe:!0})}var Sk=V,bk=Xe,kk=ab,Tk=FS,Ik=Iu;Rr({target:"Promise",stat:!0,forced:ok},{race:function(e){var t=this,n=kk.f(t),i=n.reject,r=Tk((function(){var r=bk(t.resolve);Ik(e,(function(e){Sk(r,t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var Ek=V,wk=ab;Rr({target:"Promise",stat:!0,forced:rb.CONSTRUCTOR},{reject:function(e){var t=wk.f(this);return Ek(t.reject,void 0,e),t.promise}});var Rk=hn,Ck=ke,Ak=ab,xk=function(e,t){if(Rk(e),Ck(t)&&t.constructor===e)return t;var n=Ak.f(e);return(0,n.resolve)(t),n.promise},Pk=Rr,Dk=rb.CONSTRUCTOR,Mk=xk;we("Promise"),Pk({target:"Promise",stat:!0,forced:Dk},{resolve:function(e){return Mk(this,e)}});var Ok=ft,Nk=Qa;Rr({target:"Object",stat:!0,forced:M((function(){Nk(1)}))},{keys:function(e){return Nk(Ok(e))}});var Lk="canvas",Uk="audio",Vk="video",Fk="screen",jk="small",Bk="big",Hk="auxiliary",Gk="aux",zk="smallVideo",Wk="user",Jk="environment",qk="mute",Kk="unmute",Qk="ended",Xk="playing",$k="pause",Yk="error",Zk="loadeddata",eT="audioinput",tT="videoinput",nT="detail",iT="text",rT="main",aT="backup",oT="banned",sT="kick",cT="user_time_out",uT="room_disband",dT="sei-message",lT="PLAYING",hT="PAUSED",pT="STOPPED",fT="inactive",mT="sendonly",vT="recvonly",_T="add",gT="remove",yT="replace",ST="track",bT="wss://trtc.rtc.qq.com",kT="wss://webrtc.qq.com",TT="qcloud",IT="trtc",ET="webrtc",wT="",RT="jssdk_log",CT="jssdk_event",AT="jssdk_new_endreport",xT=function(e){return wT=e},PT=1,DT=2,MT="live",OT=20,NT=21,LT="anchor",UT="audience",VT="5Y2wZK8nANNAoVw6dSAHVjNxrD1ObBM2kBPV",FT="224d130c-7b5c-415b-aaa2-79c2eb5a6df2",jT=2,BT=rT,HT=Hk,GT="unknown",zT="DISCONNECTED",WT="CONNECTING",JT="RECONNECTING",qT="CONNECTED",KT="new",QT="connecting",XT="failed",$T="closed",YT="disconnected",ZT="connected",eI="completed",tI=30,nI="join",iI="delta-join",rI="rejoin",aI="leave",oI="delta-leave",sI="publish",cI="delta-publish",uI="unpublish",dI="subscribe",lI="unsubscribe",hI="uplink-connection",pI="uplink-reconnection",fI="downlink-connection",mI="downlink-reconnection",vI="setLocalDescription",_I="setRemoteDescription",gI="iceConnectionState",yI="stream-initialize",SI="websocketConnectionState",bI="websocketReconnectionState",kI="update-stream",TI="recover-subscription",II="start-mix-transcode",EI="stop-mix-transcode",wI="player-error",RI="schedule",CI="unsubscribe",AI="subscribe_change",xI="unified-plan",PI="plan-b",DI={MANUAL:"manual",PRESET_LAYOUT:"preset-layout"},MI={REMOTE:"$PLACE_HOLDER_REMOTE$"},OI={IT_AUDIO_VIDEO:0,IT_PICTURE:2,IT_CANVAS:3,IT_PURE_AUDIO:4,IT_PURE_VIDEO:5},NI="string",LI="number",UI="boolean",VI="array",FI="object",jI={ADD:_T,REMOVE:gT},BI={unknown:0,wifi:1,"4g":2,"3g":3,"2g":4,wired:5},HI=-1,GI=0,zI=1,WI=Bk,JI=jk,qI=6048e5,KI="schedule.rtc.qq.com",QI="schedule.rtc.qcloud.com",XI="schedule.rtc.tencentcloud.com",$I="schedule-ecdn.rtc.tencentcloud.com",YI="",ZI=function(e){return YI=e},eE="TRTC",tE="Client",nE="LocalStream",iE="RemoteStream",rE="Stream",aE="web.sdk.qcloud.com",oE="web.sdk.tencent.cn",sE="web.sdk.cloud.tencent.cn",cE="https://console.cloud.tencent.com/trtc",uE="https://".concat(aE,"/trtc/webrtc/doc"),dE="".concat(uE,"/zh-cn/"),lE="trtc_error_assistance",hE="default",pE="communications",fE={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,NONE:5},mE=Object.keys(fE),vE=["normal leave","timeout leave","kick","role change"],_E=2e3,gE="ric",yE="raf",SE="interval",bE="timeout",kE="Resolution reset to 1080p, need to upgrade ability here https://cloud.tencent.com/document/product/647/85386",TE={"TRTC.checkSystemRequirements":40001,"TRTC.isScreenShareSupported":40002,"TRTC.isSmallStreamSupported":40003,"TRTC.createClient.rtc":40004,"TRTC.createClient.live":40005,"TRTC.createClient.intRoomId":40006,"TRTC.createClient.stringRoomId":40007,"TRTC.createClient.autoSubscribe":40008,"TRTC.createClient.manualSubscribe":40009,"TRTC.enableUploadLog":40010,"TRTC.disableUploadLog":40011,"Client.publish":40012,"Client.publish.isAuxiliary":40013,"Client.switchRole":40014,"Client.startPublishCDNStream":40015,"Client.stopPublishCDNStream":40016,"Client.startMixTranscode":40017,"Client.stopMixTranscode":40018,"Client.enableAudioVolumeEvaluation":40019,"Client.enableSmallStream":40020,"Client.disableSmallStream":40021,"Client.setSmallStreamProfile":40022,"Client.setRemoteVideoStreamType":40023,"Client.sendSEIMessage":40024,"Client.setProxyServer":40025,"Client.setTurnServer":40026,"LocalStream.setAudioProfile.standard":40027,"LocalStream.setAudioProfile.high":40028,"LocalStream.setAudioProfile.standard-stereo":40029,"LocalStream.setAudioProfile.high-stereo":40030,"LocalStream.setVideoProfile.120p":40031,"LocalStream.setVideoProfile.120p_2":40032,"LocalStream.setVideoProfile.180p":40033,"LocalStream.setVideoProfile.180p_2":40034,"LocalStream.setVideoProfile.240p":40035,"LocalStream.setVideoProfile.240p_2":40036,"LocalStream.setVideoProfile.360p":40037,"LocalStream.setVideoProfile.360p_2":40038,"LocalStream.setVideoProfile.480p":40039,"LocalStream.setVideoProfile.480p_2":40040,"LocalStream.setVideoProfile.720p":40041,"LocalStream.setVideoProfile.1080p":40042,"LocalStream.setVideoProfile.1440p":40043,"LocalStream.setVideoProfile.4K":40044,"LocalStream.setScreenProfile.480p":40045,"LocalStream.setScreenProfile.480p_2":40046,"LocalStream.setScreenProfile.720p":40047,"LocalStream.setScreenProfile.720p_2":40048,"LocalStream.setScreenProfile.1080p":40049,"LocalStream.setScreenProfile.1080p_2":40050,"LocalStream.setVideoContentHint.motion":40051,"LocalStream.setVideoContentHint.detail":40052,"LocalStream.setVideoContentHint.text":40053,"LocalStream.setAudioCaptureVolume":40054,"LocalStream.getVideoFrame":40055,"RemoteStream.setAudioOutput":40056,"RemoteStream.getVideoFrame":40057,AI_DENOISER:1700,SPATIAL_AUDIO:1701,"2K_4K":1704},IE=he,EE=Td,wE=/"/g,RE=ie("".replace),CE=function(e,t,n,i){var r=EE(IE(e)),a="<"+t;return""!==n&&(a+=" "+n+'="'+RE(EE(i),wE,"&quot;")+'"'),a+">"+r+"</"+t+">"},AE=M,xE=function(e){return AE((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))},PE=CE;Rr({target:"String",proto:!0,forced:xE("link")},{link:function(e){return PE(this,"a","href",e)}}),Rr({target:"Array",stat:!0},{isArray:kl});var DE="AVOID_REPEATED_CALL",ME="INVALID_PARAMETER_REQUIRED",OE="INVALID_PARAMETER_TYPE",NE="INVALID_PARAMETER_EMPTY",LE="INVALID_PARAMETER_INSTANCE",UE="INVALID_PARAMETER_RANGE",VE="API_CALL_TIMEOUT",FE="SIGNAL_CHANNEL_RECONNECTION_FAILED",jE="SIGNAL_CHANNEL_SETUP_FAILED",BE="ERROR_MESSAGE",HE="EXCHANGE_SDP_TIMEOUT",GE="DOWNLINK_RECONNECTION_FAILED",zE="EXCHANGE_SDP_FAILED",WE="UPLINK_RECONNECTION_FAILED",JE="INVALID_PURE_AUDIO",qE="INVALID_STREAMID",KE="INVALID_USER_DEFINE_RECORDID",QE="INVALID_USER_DEFINE_PUSH_ARGS",XE="INVALID_PROXY",$E="INVALID_JOIN",YE="INVALID_ROOMID_STRING",ZE="INVALID_ROOMID_INTEGER",ew="JOIN_ROOM_TIMEOUT",tw="JOIN_ROOM_FAILED",nw="REJOIN_ROOM_FAILED",iw="INVALID_DESTROY",rw="INVALID_PUBLISH",aw="INVALID_UNPUBLISH",ow="INVALID_AUDIENCE",sw="INVALID_INITIALIZE",cw="INVALID_DUPLICATE_PUBLISHING",uw="INVALID_REMOTE_STREAM",dw="SUBSCRIBE_FAILED",lw="INVALID_ROLE",hw="INVALID_OPERATION_SWITCH_ROLE",pw="SWITCH_ROLE_TIMEOUT",fw="SWITCH_ROLE_FAILED",mw="CLIENT_BANNED",vw="INVALID_OPERATION_START_PUBLISH_CDN",_w="INVALID_OPERATION_STOP_PUBLISH_CDN",gw="INVALID_STREAM_ID",yw="START_PUBLISH_CDN_FAILED",Sw="STOP_PUBLISH_CDN_FAILED",bw="START_MIX_TRANSCODE",kw="STOP_MIX_TRANSCODE",Tw="INVALID_AUDIO_VOLUME",Iw="ENABLE_SMALL_STREAM_PUBLISHED",Ew="DISABLE_SMALL_STREAM_PUBLISHED",ww="NOT_SUPPORTED_SMALL_STREAM",Rw="INVALID_SMALL_STREAM_PROFILE",Cw="INVALID_PARAMETER_REMOTE_STREAM",Aw="INVALID_SWITCH_DEVICE",xw="INVALID_SWITCH_DEVICE_PUBLISHING",Pw="INVALID_REPLACE_TRACK",Dw="INVALID_INITIALIZE_LOCAL_STREAM",Mw="INVALID_ADD_TRACK_REPETITIVE",Ow="INVALID_ADD_TRACK_REMOVING",Nw="INVALID_ADD_TRACK_PUBLISHING",Lw="INVALID_STREAM_INITIALIZED",Uw="INVALID_ADD_TRACK_NUMBER",Vw="INVALID_REMOVE_AUDIO_TRACK",Fw="INVALID_REMOVE_AUDIO_ADDING",jw="INVALID_REMOVE_AUDIO_ON",Bw="INVALID_REMOVE_TRACK_PUBLISHING",Hw="INVALID_REMOVE_TRACK_NOT_PUBLISHING",Gw="INVALID_REMOVE_TRACK_NUMBER",zw="INVALID_REPLACE_TRACK_NO_TRACK",Ww="REPEAT_JOIN",Jw="CLIENT_DESTROYED",qw="START_MIX_TRANSCODE_FAILED",Kw="STOP_MIX_TRANSCODE_FAILED",Qw="MIX_TRANSCODE_NOT_STARTED",Xw="CANNOT_LESS_THAN_ZERO",$w="MIX_PARAMS_VIDEO_FRAMERATE",Yw="MIX_PARAMS_VIDEO_GOP",Zw="MIX_PARAMS_AUDIO_BITRATE",eR="MIX_PARAMS_USER_Z_ORDER",tR="MIX_PARAMS_NOT_SELF",nR="MIX_PARAMS_USER_STREAM",iR="INVALID_ELEMENT_ID",rR="INVALID_ELEMENT_ID_TYPE",aR="PLAY_FAILED",oR="INVALID_CREATE_STREAM_SOURCE",sR="INVALID_CREATE_STREAM_SCREEN",cR="INVALID_CREATE_STREAM_AUDIO",uR="INVALID_CREATE_STREAM_SCREEN_AUDIO",dR="NOT_SUPPORTED_HTTP",lR="NOT_SUPPORTED_WEBRTC",hR="NOT_SUPPORTED_PROFILE",pR="NOT_SUPPORTED_H264ENCODE",fR="NOT_SUPPORTED_H264DECODE",mR="NOT_SUPPORTED_TRACK",vR="NOT_SUPPORTED_SWITCH_DEVICE",_R="NOT_SUPPORTED_CAPTURE",gR="NOT_SUPPORTED_AUX",yR="MICROPHONE_NOT_FOUND",SR="CAMERA_NOT_FOUND",bR="SIGNAL_RESPONSE_FAILED",kR="CATCH_HANDLER_ERROR",TR="API_NOT_EXIST",IR="CONNECTION_CLOSED",ER="SUBSCRIBE_ALL_FALSE",wR="SEI_NOT_SUPPORT",RR="SEI_DISABLED",CR="SEI_EMPTY",AR="SEI_OVERSIZE",xR="SEI_BEFORE_PUBLISH",PR="SEI_NOT_VIDEO",DR="CALL_FREQUENCY_LIMIT",MR="CONNECTION_ABORTED",OR="API_CALL_ABORTED",NR="DUPLICATE_AUX",LR="NOT_SUPPORTED_SPATIAL",UR={AVOID_REPEATED_CALL:function(e){return"previous ".concat(e.name,"() is ongoing, please avoid repeated calls.")},INVALID_PARAMETER_REQUIRED:function(e){var t=e.key,n=e.rule,i=e.fnName,r=e.value;return"'".concat(t||n.name,"' is a required param when calling ").concat(i,"(), received: ").concat(r,".")},INVALID_PARAMETER_TYPE:function(e){var t=e.key,n=e.rule,i=e.fnName,r=e.value,a="".concat(t||n.name),o="";return o=Array.isArray(n.type)?n.type.join("|"):n.type,"'".concat(a,"' must be type of ").concat(o," when calling ").concat(i,"(), received type: ").concat(TA(r),".")},INVALID_PARAMETER_EMPTY:function(e){var t=e.key,n=e.rule,i=e.fnName,r=e.value;return"'".concat(t||n.name,"' cannot be '").concat(r,"' when calling ").concat(i,"().")},INVALID_PARAMETER_INSTANCE:function(e){var t=e.key,n=e.rule,i=e.fnName,r=e.value,a="".concat(t||n.name),o="".concat(n.instanceOf.name||n.instanceOf);return"'".concat(a,"' must be instanceof ").concat(o," when calling ").concat(i,"(), received type: ").concat(TA(r),".")},INVALID_PARAMETER_RANGE:function(e){var t=e.key,n=e.rule,i=e.fnName,r=e.value;return"'".concat(t||n.name,"' must be one of ").concat(n.values.join("|")," when calling ").concat(i,"(), received: ").concat(r,".")},API_CALL_TIMEOUT:function(e){return"".concat(e.commandDesc||e.command," timeout observed.")},SIGNAL_CHANNEL_RECONNECTION_FAILED:"signal channel reconnection failed, please check your network.",SIGNAL_CHANNEL_SETUP_FAILED:function(e){return"SignalChannel setup failure: (errorCode: ".concat(e.errorCode,", errorMsg: ").concat(e.errorMsg," }).")},ERROR_MESSAGE:function(e){var t="".concat(e.type," failed");return e.message&&(t="".concat(t,": ").concat(e.message,".")),t},EXCHANGE_SDP_TIMEOUT:"exchange sdp timeout.",DOWNLINK_RECONNECTION_FAILED:"downlink reconnection failed, please check your network and re-join room.",EXCHANGE_SDP_FAILED:function(e){return"exchange sdp failed ".concat(e.errMsg,".")},UPDATE_OFFER_TIMEOUT:"update offer timeout observed.",UPLINK_RECONNECTION_FAILED:"uplink reconnection failed, please check your network and publish again.",INVALID_RECORDID:"recordId must be an integer number.",INVALID_PURE_AUDIO:"pureAudioPushMode must be 1 or 2.",INVALID_STREAMID:"streamId must be a sting literal within 64 bytes, and not be empty.",INVALID_USER_DEFINE_RECORDID:"userDefineRecordId must be a sting literal contains (a-zA-Z),(0-9), underline and hyphen, within 64 bytes, and not be empty.",INVALID_USER_DEFINE_PUSH_ARGS:"userDefinePushArgs must be a sting literal within 256 bytes, and not be empty.",INVALID_PROXY:'proxy server url must start with "wss://".',INVALID_JOIN:"duplicate join() called.",INVALID_ROOMID_STRING:function(e){return"'".concat(e,"' must be validate string when useStringRoomId is true.")},INVALID_ROOMID_INTEGER:function(e){return"'".concat(e,"' must be an integer between [1, 4294967294] when useStringRoomId is false.")},INVALID_SIGNAL_CHANNEL:"SignalChannel is not ready yet.",JOIN_ROOM_TIMEOUT:"join room timeout.",JOIN_ROOM_FAILED:function(e){var t=e.error,n=e.code;return"Failed to join room - ".concat(t," code: ").concat(n)},REJOIN_ROOM_FAILED:function(e){return"reJoin room: ".concat(e.roomId," failed, please check your network.")},INVALID_DESTROY:"please call leave() before destroy().",INVALID_PUBLISH:"please call join() before publish().",INVALID_UNPUBLISH:"stream has not been published yet.",INVALID_AUDIENCE:"no permission to publish() under live/".concat(UT,', please call switchRole("').concat(LT,'") firstly before publish().'),INVALID_INITIALIZE:"cannot publish stream because stream is not initialized, is switching device, or has been closed.",INVALID_DUPLICATE_PUBLISHING:function(e){return"duplicate ".concat(e," stream publishing, please unpublish your prev ").concat(e," stream and then re-publish.")},INVALID_SUBSCRIBE_UNDEFINED:"stream is undefined or null.",INVALID_SUBSCRIBE_LOCAL:"stream cannot be LocalStream.",INVALID_REMOTE_STREAM:"remoteStream does not exist because it has been unpublished by remote peer.",SUBSCRIBE_FAILED:function(e){var t=e.message,n=e.stream;return"failed to subscribe ".concat(n.getUserId()," ").concat(n.getType()," stream, reason: ").concat(t,".")},INVALID_ROLE:"switchRole can only be called in live mode.",INVALID_PARAMETER_SWITCH_ROLE:"role could only be set to a value as ".concat(LT," or ").concat(UT,"."),INVALID_OPERATION_SWITCH_ROLE:"please call join() before switchRole().",SWITCH_ROLE_TIMEOUT:"switchRole timeout.",SWITCH_ROLE_FAILED:function(e){return"switchRole failed, errCode: ".concat(e.code," errMsg: ").concat(e.message,".")},CLIENT_BANNED:function(e){return"client was banned because of "+e.message+"."},INVALID_OPERATION_START_PUBLISH_CDN:"please call startPublishCDNStream() before client join the room or after client join the room and successfully publish the local stream.",INVALID_OPERATION_STOP_PUBLISH_CDN:"please call startPublishCDNStream() before stopPublishCDNStream().",START_PUBLISH_CDN_FAILED:function(e){return"startPublishCDNStream failed, errMsg: ".concat(e.message,".")},STOP_PUBLISH_CDN_FAILED:function(e){return"stopPublishCDNStream failed, errMsg: ".concat(e.message,".")},INVALID_STREAM_ID:function(e){return"'".concat(e,"' can only consist of uppercase and lowercase english letters (a-zA-Z), numbers (0-9), hyphens and underscores.")},START_MIX_TRANSCODE:"please call startMixTranscode() after join().",STOP_MIX_TRANSCODE:"please call stopMixTranscode() after startMixTranscode().",INVALID_AUDIO_VOLUME:"interval must be a number.",ENABLE_SMALL_STREAM_PUBLISHED:"Cannot enable small stream after localStream published.",DISABLE_SMALL_STREAM_PUBLISHED:"Cannot disable small stream after localStream published.",NOT_SUPPORTED_SMALL_STREAM:"your browser does not support opening small stream.",INVALID_SMALL_STREAM_PROFILE:"small stream profile is invalid.",INVALID_PARAMETER_REMOTE_STREAM:"remoteStream is invalid.",INVALID_OPERATION_CHANGE_SMALL:"cannot switch to the small stream without subscribing to the video of remoteStream.",REMOTE_NOT_PUBLISH_SMALL_STREAM:"remote peer does not publish small stream.",INVALID_SWITCH_DEVICE:"cannot switch device on current stream.",INVALID_SWITCH_DEVICE_PUBLISHING:"cannot switch device when publishing localStream.",INVALID_REPLACE_TRACK:"cannot replace track when publishing localStream.",INVALID_INITIALIZE_LOCAL_STREAM:"local stream has not initialized yet.",INVALID_ADD_TRACK_REPETITIVE:"previous addTrack is ongoing, please avoid repetitive execution.",INVALID_ADD_TRACK_REMOVING:"cannot add track when a track is removing.",INVALID_ADD_TRACK_PUBLISHING:"cannot add track when publishing localStream.",INVALID_STREAM_INITIALIZED:"your local stream haven't been initialized yet.",INVALID_ADD_TRACK_NUMBER:"a Stream has at most one audio track and one video track.",INVALID_REMOVE_AUDIO_TRACK:"remove audio track is not supported on your browser.",INVALID_REMOVE_AUDIO_ADDING:"cannot remove track when a track is adding.",INVALID_REMOVE_AUDIO_ON:"previous removeTrack is ongoing, please avoid repetitive execution.",INVALID_REMOVE_TRACK_PUBLISHING:"cannot remove track when publishing localStream.",INVALID_REMOVE_TRACK_NOT_PUBLISHING:"the track to be removed is not being publishing.",INVALID_REMOVE_TRACK_NUMBER:"remove the only video track is not supported, please use replaceTrack or muteVideo.",INVALID_REPLACE_TRACK_NO_TRACK:function(e){return"cannot replace ".concat(e.kind," track because stream has not ").concat(e.kind," track")},START_MIX_TRANSCODE_FAILED:function(e){return"startMixTranscode failed, errMsg: ".concat(e.message,".")},STOP_MIX_TRANSCODE_FAILED:function(e){return"stopMixTranscode failed, errMsg: ".concat(e.message,".")},MIX_TRANSCODE_NOT_STARTED:"mixTranscode has not been started.",CANNOT_LESS_THAN_ZERO:function(e){var t=e.key,n=e.rule,i=e.fnName;return e.value,"'".concat(t||n.name,"' cannot be less than 0 when calling ").concat(i,"().")},MIX_PARAMS_VIDEO_FRAMERATE:"'config.videoFramerate' should be an integer between 0 and 30, excluding 0.",MIX_PARAMS_VIDEO_GOP:"'config.videoGOP' should be an integer between 1 and 8.",MIX_PARAMS_AUDIO_BITRATE:"'config.audioBitrate' should be an integer between 32 and 192.",MIX_PARAMS_USER_Z_ORDER:function(e){return"'".concat(e,"' is required and must be between 1 and 15.")},MIX_PARAMS_NOT_SELF:"'config.mixUsers' must contain self.",MIX_PARAMS_USER_STREAM:"'config.videoWidth' and 'config.videoHeight' of output stream should be contain all mix stream.",INVALID_PLAY:"duplicate play() call observed, please stop() firstly.",INVALID_ELEMENT_ID:function(e){var t=e.key,n=e.fnName;return"'".concat(t,"' is not found in the document object when calling ").concat(n,"().")},INVALID_ELEMENT_ID_TYPE:function(e){var t=e.key,n=e.fnName,i=e.type;return"the element corresponding to '".concat(t,"' must be instanceof HTMLDivElement when calling ").concat(n,"(), received: ").concat(i,".")},PLAY_FAILED:function(e){return"".concat(e.media," play failed锛宐rowser exception: ").concat(e.error.toString())},INVALID_USERID:"userId cannot be all spaces.",INVALID_CREATE_STREAM_SOURCE:"LocalStream must be created by createStream() with either audio/video or audioSource/videoSource, but can not be mixed with audio/video and audioSource/videoSource.",INVALID_CREATE_STREAM_SCREEN:"screen/video cannot be both true.",INVALID_CREATE_STREAM_AUDIO:"audio/screenAudio cannot be both true.",INVALID_CREATE_STREAM_SCREEN_AUDIO:"when screen is true, screenAudio can be configured.",NOT_SUPPORTED_HTTP:"http protocol does not support the ability to capture and publish streams, please use the https protocol.",NOT_SUPPORTED_WEBRTC:"your browser or environment does not support full WebRTC capabilities.",NOT_SUPPORTED_PROFILE:"your browser does not support setVideoProfile.",NOT_SUPPORTED_MEDIA:"your browser or environment does not support navigator.mediaDevices.",NOT_SUPPORTED_H264ENCODE:"your device does not support H.264 encoding.",NOT_SUPPORTED_H264DECODE:"your device does not support H.264 decoding.",NOT_SUPPORTED_TRACK:function(e){return"".concat(e,"Track is not supported on your browser.")},NOT_SUPPORTED_SWITCH_DEVICE:"switchDevice is not supported on your browser.",NOT_SUPPORTED_CAPTURE:"Your browser or environment does not support screen sharing, please check whether the browser version.",MICROPHONE_NOT_FOUND:"no microphone detected, please check your microphone and the configuration on TRTC.createStream.",CAMERA_NOT_FOUND:"no camera detected, please check your camera and the configuration on TRTC.createStream.",SIGNAL_RESPONSE_FAILED:function(e){return"".concat(e.signalResponse," failed, response code is ").concat(e.code," , errMsg: ").concat(e.message,".")},CATCH_HANDLER_ERROR:function(e){var t=e.name,n=e.event;return"an error was caught on ".concat(t,".on('").concat(n,"', handler), please check your code on 'handler'.")},API_NOT_EXIST:function(e){var t=e.name;return"experimental api ".concat(t," does not exist.")},REPEAT_JOIN:function(e){return"[".concat(e,"] is calling client.join api or has already joined room, please avoid repeated join.")},CONNECTION_CLOSED:"remoteStream has been unsubscribed or unpublished by remote user.",SUBSCRIBE_ALL_FALSE:"cannot subscribe when both audio & video are false, use client.unsubscribe() instead",CLIENT_DESTROYED:function(e){var t=e.funName;return"failed to call ".concat(t,"() because client was destroyed.")},SEI_NOT_SUPPORT:function(e){return"not support to sendSEIMessage".concat(!1===e?" without using h264 codec":"")},SEI_DISABLED:"SEI is disabled, to enable SEI: TRTC.createClient({ enableSEI: true })",SEI_EMPTY:"buffer cannot be empty",SEI_OVERSIZE:function(e){return"buffer size(".concat(e,") is over 1000 Bytes")},SEI_BEFORE_PUBLISH:"please call sendSEIMessage() after publish() success",SEI_NOT_VIDEO:"cannot send sei when localStream has not video.",CALL_FREQUENCY_LIMIT:function(e){var t=e.isSize,n=e.name,i=e.timesInSecond,r=e.maxSizeInSecond;return"api ".concat(n," call ").concat(t?"size":"times"," is over ").concat(t?r+" bytes":i," in a second.")},CONNECTION_ABORTED:function(e){return"connection aborted due to: "+e},API_CALL_ABORTED:function(e){return e.message.includes("REMOTE_STREAM_NOT_EXIST")?"Subscribe ".concat(e.stream.getUserId()," ").concat(e.stream.getType()," stream aborted, reason: remote user ").concat(e.stream.getUserId()," unpublished stream."):"API aborted, reason: ".concat(e.message)},DUPLICATE_AUX:"only one auxiliary stream can be published in a room.",NOT_SUPPORTED_AUX:"publish auxiliary stream is not supported on your browser.",NOT_SUPPORTED_SPATIAL:"Your browser does not support 3D spatial audio."},VR=P,FR=M,jR=Td,BR=pg.trim,HR=ie("".charAt),GR=VR.parseFloat,zR=VR.Symbol,WR=zR&&zR.iterator,JR=1/GR("\t\n\v\f\r 聽釟€鈥€鈥佲€傗€冣€勨€呪€嗏€団€堚€夆€娾€仧銆€\u2028\u2029\ufeff-0")!=-Infinity||WR&&!FR((function(){GR(Object(WR))}))?function(e){var t=BR(jR(e)),n=GR(t);return 0===n&&"-"==HR(t,0)?-0:n}:GR;Rr({global:!0,forced:parseFloat!=JR},{parseFloat:JR});var qR=window.navigator&&window.navigator.userAgent||"",KR=/AppleWebKit\/([\d.]+)/i.exec(qR);KR&&parseFloat(KR.pop());var QR=/iPad/i.test(qR),XR=navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/Macintosh/.test(qR),$R=/iPhone/i.test(qR)&&!QR,YR=/iPod/i.test(qR),ZR=$R||QR||YR||XR,eC=/Android/i.test(qR);eC&&function(){var e=qR.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);t&&n&&parseFloat(e[1]+"."+e[2])}();eC&&/webkit/i.test(qR);var tC=/Firefox/i.test(qR),nC=tC&&function(){var e=qR.match(/Firefox\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),iC=/Edge\//i.test(qR),rC=iC&&function(){var e=qR.match(/Edge\/(\d+)/i);if(e&&e[1])return e[1]}(),aC=/Edg\//i.test(qR),oC=aC&&function(){var e=qR.match(/Edg\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),sC=/SogouMobileBrowser\//i.test(qR),cC=sC&&function(){var e=qR.match(/SogouMobileBrowser\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),uC=/MetaSr\s/i.test(qR),dC=uC&&function(){var e=qR.match(/MetaSr(\s\d+(\.\d+)+)/);return e&&e[1]?parseFloat(e[1]):null}(),lC=/TBS\/\d+/i.test(qR),hC=lC&&function(){var e=qR.match(/TBS\/(\d+)/i);if(e&&e[1])return e[1]}(),pC=/XWEB\/\d+/i.test(qR),fC=pC&&function(){var e=qR.match(/XWEB\/(\d+)/i);if(e&&e[1])return e[1]}();/MSIE\s8\.0/.test(qR),/MSIE\/\d+/i.test(qR)&&function(){var e=/MSIE\s(\d+)\.\d/.exec(qR),t=e&&parseFloat(e[1]);!t&&/Trident\/7.0/i.test(qR)&&/rv:11.0/.test(qR)&&(t=11)}();var mC=/(micromessenger|webbrowser)/i.test(qR),vC=mC&&function(){var e=qR.match(/MicroMessenger\/(\d+)/i);if(e&&e[1])return e[1]}(),_C=!lC&&/MQQBrowser\/\d+/i.test(qR)&&/COVC\/\d+/i.test(qR),gC=!lC&&/MQQBrowser\/\d+/i.test(qR)&&!/COVC\/\d+/i.test(qR),yC=(gC||_C)&&function(){var e=qR.match(/ MQQBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),SC=!lC&&/ QQBrowser\/\d+/i.test(qR),bC=SC&&function(){var e=qR.match(/ QQBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),kC=!lC&&/QQBrowserLite\/\d+/i.test(qR),TC=kC&&function(){var e=qR.match(/QQBrowserLite\/([\d.]+)/);return e&&e[1]?e[1]:null}(),IC=!lC&&/MQBHD\/\d+/i.test(qR),EC=IC&&function(){var e=qR.match(/MQBHD\/([\d.]+)/);return e&&e[1]?e[1]:null}(),wC=/Windows/i.test(qR),RC=!ZR&&/MAC OS X/i.test(qR),CC=!eC&&/Linux/i.test(qR);/MicroMessenger/i.test(qR);var AC=/UCBrowser/i.test(qR);/Electron/i.test(qR);var xC,PC,DC=/MiuiBrowser/i.test(qR),MC=DC&&function(){var e=qR.match(/MiuiBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),OC=/HuaweiBrowser/i.test(qR),NC=/Huawei/i.test(qR),LC=OC&&function(){var e=qR.match(/HuaweiBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),UC=/SamsungBrowser/i.test(qR),VC=UC&&function(){var e=qR.match(/SamsungBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),FC=/HeyTapBrowser/i.test(qR),jC=FC&&function(){var e=qR.match(/HeyTapBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),BC=/VivoBrowser/i.test(qR),HC=BC&&function(){var e=qR.match(/VivoBrowser\/([\d.]+)/);return e&&e[1]?e[1]:null}(),GC=function(){var e=qR.match(/Chrome\/(\d+)/);return e&&e[1]?Number(e[1]):null},zC=/Chrome/i.test(qR),WC=!iC&&!uC&&!sC&&!lC&&!pC&&!aC&&!SC&&!DC&&!OC&&!UC&&!FC&&!BC&&/Chrome/i.test(qR),JC=WC&&GC(),qC=WC&&function(){var e=qR.match(/Chrome\/([\d.]+)/);return e&&e[1]?e[1]:null}(),KC=!zC&&!gC&&!_C&&!kC&&!IC&&/Safari/i.test(qR),QC=function(){if(KC){var e=qR.match(/Version\/([\d.]+)/);if(e&&e[1])return e[1]}return""}(),XC=/Android.*(wv|.0.0.0)/.test(qR),$C=function(){if(XR)return QC;if(ZR){var e=qR.match(/OS (\d+)_(\d+)/i);if(e&&e[1]){var t=e[1];return e[2]&&(t+=".".concat(e[2])),t}}return""}(),YC="15.1"===QC,ZC="15.1"===$C,eA=14===(xC=Number($C.split(".")[0]))||13===xC,tA="file:"===location.protocol||"localhost"===location.hostname||"127.0.0.1"===location.hostname,nA=function(){if(vA(PC))try{PC=window.localStorage}catch(IQ){Vx.warn(IQ),PC=!1}return PC},iA=new Map([[tC,["Firefox",nC]],[aC,["Edg",oC]],[WC,["Chrome",qC]],[KC,["Safari",QC]],[lC,["TBS",hC]],[pC,["XWEB",fC]],[mC&&$R,["WeChat",vC]],[SC,["QQ(Win)",bC]],[gC,["QQ(Mobile)",yC]],[_C,["QQ(Mobile X5)",yC]],[kC,["QQ(Mac)",TC]],[IC,["QQ(iPad)",EC]],[DC,["MI",MC]],[OC,["HW",LC]],[UC,["Samsung",VC]],[FC,["OPPO",jC]],[BC,["VIVO",HC]],[iC,["EDGE",rC]],[sC,["SogouMobile",cC]],[uC,["Sogou",dC]]]);function rA(){var e="unknown",t="unknown";return iA.get(!0)&&(e=iA.get(!0)[0],t=iA.get(!0)[1]),{name:e,version:t}}var aA=function(e,t){return t?uE+"/"+e+"/"+t:uE+"/"+e+"/index.html"},oA=function(){if(!nA())return!1;var e=localStorage.getItem(lE);e&&!function(e){var t=e.saveTime&&(new Date).getTime()-e.saveTime>=qI,n=!e.saveVersion||e.saveVersion!==Wa;return t||n}(JSON.parse(e))||(Vx.info("init debug info"),function(){var e=new XMLHttpRequest;if(e.open("GET","https://web.sdk.qcloud.com/trtc/webrtc/download/error-message/0.0.3/script.js",!1),e.send(null),4===e.readyState&&200===e.status){var t=document.createElement("script");t.type="text/javascript",t.text=e.responseText,document.body.appendChild(t),localStorage.setItem(lE,JSON.stringify({message:e.responseText,saveTime:(new Date).getTime(),saveVersion:Wa})),document.body.removeChild(t)}}())};function sA(e){var t=e.key,n=e.data,i=e.link,r=e.addDocLink,a=void 0===r||r,o="",s="",c="";mA(UR[t])?o=UR[t](n):_A(UR[t])&&(o=UR[t]);var u=function(){if(window.TRTC_ERROR_INFO&&window.TRTC_ERROR_LINK)return{TRTC_ERROR_INFO:window.TRTC_ERROR_INFO,TRTC_ERROR_LINK:window.TRTC_ERROR_LINK};var e=localStorage.getItem(lE);if(e){e=JSON.parse(e);var t=document.createElement("script");t.type="text/javascript",t.text=e.message,document.body.appendChild(t);var n=window.TRTC_ERROR_INFO,i=window.TRTC_ERROR_LINK;return document.body.removeChild(t),{TRTC_ERROR_INFO:n,TRTC_ERROR_LINK:i}}return{}}(),d=u.TRTC_ERROR_INFO,l=u.TRTC_ERROR_LINK;i?c="".concat(i.className,".html#").concat(i.fnName):l&&l[t]&&(mA(l[t])?c=l[t](n):_A(l[t])&&(c=l[t]));var h=o;return AA()&&(d&&d[t]&&(mA(d[t])?s=d[t](n):_A(d[t])&&(s=d[t])),s&&(h=a?s+"\n璇锋煡鐪嬫枃妗�: "+aA("zh-cn",c)+"\n\n":s+"\n\n",h+=o)),a&&(h+=" \nRefer to: "+aA("en",c)+"\n"),h}var cA=function(){return function(e){var t=window.location.search.match(new RegExp("(\\?|&)"+e+"=([^&]*)(&|$)"));return t?decodeURIComponent(t[2]):""}("trtc_env")},uA=function(e){return(e=Number(e))>0&&e<14e8},dA=function(e,t){var n;n=wT?wT.includes("http")?wT:"https://"+wT:uA(e)?"https://apisgp.my-imcloud.com":"https://yun.tim.qq.com";var i=Math.floor(Math.random()*Math.pow(2,31));return"".concat(n,"/v5/AVQualityReportSvc/C2S?random=").concat(i,"&sdkappid=").concat(e,"&cmdtype=").concat(t)};function lA(){var e=navigator.userAgent,t=navigator.connection,n=e.match(/NetType\/\w+/)?e.match(/NetType\/\w+/)[0]:"";"3gnet"===(n=n.toLowerCase().replace("nettype/",""))&&(n="3g");var i=t&&t.type&&t.type.toLowerCase(),r=t&&t.effectiveType&&t.effectiveType.toLowerCase();"slow-2"===r&&(r="2g");var a=n||"unknown";if(i)switch(i){case"cellular":case"wimax":a=r||"unknown";break;case"wifi":a="wifi";break;case"ethernet":a="wired";break;case"none":case"other":case"unknown":a="unknown"}return a}var hA=function(e){if(!e||"object"!==i(e)||"[object Object]"!=Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.prototype.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Function.prototype.toString.call(n)===Function.prototype.toString.call(Object)};function pA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<=1?n:pA(e-1,n,t+n)}function fA(e){var t=Math.round(e/2)+1;return t>6?13e3:1e3*pA(t)}var mA=function(e){return"function"==typeof e},vA=function(e){return void 0===e},_A=function(e){return"string"==typeof e},gA=function(e){return"number"==typeof e},yA=function(e){return"boolean"==typeof e},SA=function(e){return"object"===TA(e)},bA=function(e){return"array"===TA(e)},kA=function(e){return TA(e)==="MediaStreamTrack".toLowerCase()};function TA(e){return Reflect.apply(Object.prototype.toString,e,[]).replace(/^\[object\s(\w+)\]$/,"$1").toLowerCase()}function IA(e){var t={};return t.urls="turn:".concat(e.url),vA(e.username)||vA(e.credential)||(t.username=e.username,t.credential=e.credential,t.credentialType="password",vA(e.credentialType)||(t.credentialType=e.credentialType)),t}function EA(){return performance&&performance.now?Math.floor(performance.now()):Date.now()}function wA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"big";if(!_A(e))return 0;var n=e.split(".");return"big"===t?(Number(n[0])<<24|Number(n[1])<<16|Number(n[2])<<8|Number(n[3]))>>>0:(Number(n[3])<<24|Number(n[2])<<16|Number(n[1])<<8|Number(n[0]))>>>0}var RA,CA,AA=function(){var e=navigator.language||navigator.userLanguage;return"zh"===(e=e.substr(0,2))},xA=(RA=!1,CA=document.visibilityState,function(){document.visibilityState!==CA&&Vx.info("visibility change: ".concat(document.visibilityState)),RA||(document.addEventListener("visibilitychange",(function(){Vx.info("visibility change: "+document.visibilityState),CA=document.visibilityState})),RA=!0)});window.AudioContext=window.AudioContext||window.webkitAudioContext||window.mozAudioContext;var PA=function(){var e=new window.AudioContext,t=function t(){"suspended"===e.state||"interrupted"===e.state?e.resume():document.removeEventListener("click",t)};return"suspended"!==e.state&&"interrupted"!==e.state||document.addEventListener("click",t),e.onstatechange=function(){t()},e},DA=function(){var e;return function(){if(e)return e;e=new window.AudioContext;return e.onstatechange=function(){Vx.info("gain context state: ".concat(e.state)),"suspended"===e.state?(e.resume(),document.addEventListener("click",e.resume)):"interrupted"===e.state?e.resume():document.removeEventListener("click",e.resume)},e}}(),MA=!!window.AudioWorkletNode,OA=function(e,t){var n=e.emit;return e.emit=function(){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];try{n.apply(e,r)}catch(IQ){var o=sA({key:kR,data:{name:t,event:r[0]},addDocLink:!1});Vx.warn(o+"\n\n"+IQ.stack)}},e},NA=function(e){return+e<10?"0".concat(e):e},LA=function(e){var t=e.match(/^\d+\.\d+\.\d+/)[0];if(!t)return e;var n=t.split("."),i=NA(n[1])+NA(n[2]);return n[1]-15>0&&(n[1]="15"),n[2]-15>0&&(n[2]="15"),n.join(".")+"."+i};function UA(e){var t=e.url,n=e.body,i=e.method,r=e.timeout,a=new XMLHttpRequest;return new Promise((function(e,o){a.onload=function(t){if(a.status>=200&&a.status<300&&a.responseText.length>0)try{var n=JSON.parse(a.response);e({data:n})}catch(IQ){e({data:a.response})}else a.status>0&&o({code:a.status,message:"request failed, readyState:".concat(a.readyState," status:").concat(a.status," loaded size:").concat(t.loaded)})};var s=function(e){o({code:a.readyState,message:"request ".concat(e.type,", readyState:").concat(a.readyState," status:").concat(a.status," loaded size:").concat(e.loaded)})};a.onerror=s,a.onabort=s,a.ontimeout=s,a.timeout=r||5e3,a.open(i||"POST",t,!0),a.send(n)}))}var VA={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,i,a,o){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new r(i,a||e,o),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},s.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,a=i.length,o=new Array(a);r<a;r++)o[r]=i[r].fn;return o},s.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,r,a,o){var s=n?n+e:e;if(!this._events[s])return!1;var c,u,d=this._events[s],l=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),l){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,i),!0;case 4:return d.fn.call(d.context,t,i,r),!0;case 5:return d.fn.call(d.context,t,i,r,a),!0;case 6:return d.fn.call(d.context,t,i,r,a,o),!0}for(u=1,c=new Array(l-1);u<l;u++)c[u-1]=arguments[u];d.fn.apply(d.context,c)}else{var h,p=d.length;for(u=0;u<p;u++)switch(d[u].once&&this.removeListener(e,d[u].fn,void 0,!0),l){case 1:d[u].fn.call(d[u].context);break;case 2:d[u].fn.call(d[u].context,t);break;case 3:d[u].fn.call(d[u].context,t,i);break;case 4:d[u].fn.call(d[u].context,t,i,r);break;default:if(!c)for(h=1,c=new Array(l-1);h<l;h++)c[h-1]=arguments[h];d[u].fn.apply(d[u].context,c)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,i,r){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||r&&!s.once||i&&s.context!==i||o(this,a);else{for(var c=0,u=[],d=s.length;c<d;c++)(s[c].fn!==t||r&&!s[c].once||i&&s[c].context!==i)&&u.push(s[c]);u.length?this._events[a]=1===u.length?u[0]:u:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(VA);var FA=VA.exports,jA=new FA,BA=1,HA=2,GA=3,zA=4,WA=5,JA=20,qA=21,KA=22,QA=23,XA=24,$A=27,YA=28,ZA=29,ex=30,tx=33,nx=31,ix=32,rx=100,ax=101,ox=102,sx=103,cx=110,ux=111,dx=112,lx=113,hx=114,px=115,fx=116,mx=120,vx=121,_x=122,gx=123,yx=130,Sx=131,bx=132,kx=133,Tx=134,Ix=135,Ex=136,wx=137,Rx=200,Cx=201,Ax=300,xx=301,Px=302,Dx=303;function Mx(e){var t=e.retryFunction,i=e.settings,r=e.onError,o=e.onRetrying,s=e.onRetryFailed,c=e.context;return function(){for(var e=this,u=arguments.length,d=new Array(u),l=0;l<u;l++)d[l]=arguments[l];var h=i.retries||5,p=0,f=-1,m=0,v=function(){var u=a(n().mark((function a(u,l){var _,g,y,S;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return _=c||e,n.prev=1,n.next=4,t.apply(_,d);case 4:g=n.sent,p=0,u(g),n.next=14;break;case 9:n.prev=9,n.t0=n.catch(1),y=function(){clearTimeout(f),p=0,m=2,l(n.t0)},S=function(){2!==m&&p<h?(p++,m=1,mA(o)&&o.call(_,p,y),f=setTimeout((function(){f=-1,v(u,l)}),vA(i.timeout)?1e3:i.timeout)):(y(),mA(s)&&s.call(_,n.t0))},mA(r)?r.call(_,n.t0,S,l,d):S();case 14:case"end":return n.stop()}}),a,null,[[1,9]])})));return function(e,t){return u.apply(this,arguments)}}();return new Promise(v)}}var Ox=c((function e(t){o(this,e),this.log=t.log,this.level=t.level,this.userId=t.userId,this.sdkAppId=t.sdkAppId,this.forAllJoinedClients=t.forAllJoinedClients,this.uploaded=!1})),Nx=function(){function e(t){o(this,e),this.id_=t.id,this.userId_=t.userId,this.sdkAppId_=t.sdkAppId,this.type_=t.type,this.isLocal_=!yA(t.isLocal)||t.isLocal}return c(e,[{key:"setUserId",value:function(e){this.userId_=e}},{key:"setSdkAppId",value:function(e){this.sdkAppId_=e}},{key:"log",value:function(e,t){Vx.log({log:"[".concat(this.isLocal_?"鈫�":"鈫�").concat(this.id_,"] ").concat(this.type_?this.type_+" ":"").concat(t),level:e,forAllJoinedClients:vA(this.userId_),userId:this.userId_,sdkAppId:this.sdkAppId_})}},{key:"info",value:function(e){this.log(fE.INFO,e)}},{key:"debug",value:function(e){this.log(fE.DEBUG,e)}},{key:"warn",value:function(e){this.log(fE.WARN,e)}},{key:"error",value:function(e){this.log(fE.ERROR,e)}}]),e}(),Lx=!(ZR||eC),Ux=function(){function e(){var t=this;o(this,e),this.clients_=new Set,this.queue_=[],this.timeoutId_=-1,this.logLevel_=fE.DEBUG,this.logLevelToUpload_=fE.INFO,this.enableUploadLog_=!0,this.isAbleToUpload_=!1,this.checkURLParam(),jA.on(ex,(function(e){var n=e.client;-1===t.timeoutId_&&t.startUpload(),t.clients_.add(n)})),jA.on(tx,(function(e){var n=e.client;return t.clients_.delete(n)})),jA.on(nx,(function(e){e&&hA(e.config)&&mE[e.config.logLevelToUpload]&&(t.logLevelToUpload_=e.config.logLevelToUpload)})),jA.on(zA,this.setIsAbleToUpload,this),jA.on(WA,this.setIsAbleToUpload,this)}var t,i;return c(e,[{key:"getIsAbleToUpload",value:function(){return this.isAbleToUpload_}},{key:"setIsAbleToUpload",value:function(){this.isAbleToUpload_=!0,jA.off(zA,this.setIsAbleToUpload,this),jA.off(WA,this.setIsAbleToUpload,this)}},{key:"startUpload",value:(i=a(n().mark((function e(){var t=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.upload();case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:this.timeoutId_=setTimeout((function(){return t.startUpload()}),2e3);case 8:case"end":return e.stop()}}),e,this,[[0,5]])}))),function(){return i.apply(this,arguments)})},{key:"getLogsToUpload",value:function(){var e=this,t={map:new Map,splicedQueue:[]};if(this.queue_[0].forAllJoinedClients&&0===this.clients_.size)return t;for(var n=0,i=function(){if(50===n)return"break";var i=e.queue_[n];i.forAllJoinedClients?e.clients_.forEach((function(e){if(e.getIsJoined()){var n=e.getUserId(),r=e.getSDKAppId();if(t.map.has(n))t.map.get(n).logs.push(i);else t.map.set(n,{userId:n,sdkAppId:r,logs:[i]})}})):t.map.has(i.userId)?t.map.get(i.userId).logs.push(i):t.map.set(i.userId,{userId:i.userId,sdkAppId:i.sdkAppId,logs:[i]})};n<this.queue_.length;n++){if("break"===i())break}return t.map.size>0&&(t.splicedQueue=this.queue_.splice(0,n)),t}},{key:"upload",value:(t=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this.queue_.length&&this.isAbleToUpload_){e.next=2;break}return e.abrupt("return");case 2:if(t=this.getLogsToUpload(),i=t.map,r=t.splicedQueue,0!==i.size){e.next=5;break}return e.abrupt("return");case 5:e.prev=5,a=T(i.values()),o=0;case 8:if(!(o<a.length)){e.next=16;break}return s=a[o],c=s.userId,u=s.sdkAppId,d=s.logs,e.next=12,this.uploadLogWithRetry(JSON.stringify({timestamp:r_(),sdkAppId:String(u),userId:c,version:Wa,log:d.map((function(e){return e.log})).join("\n")}),u);case 12:d.forEach((function(e){return e.uploaded=!0}));case 13:o++,e.next=8;break;case 16:e.next=20;break;case 18:e.prev=18,e.t0=e.catch(5);case 20:l=r.filter((function(e){return!e.uploaded})),l.length>0&&(this.queue_=l.concat(this.queue_));case 22:case"end":return e.stop()}}),e,this,[[5,18]])}))),function(){return t.apply(this,arguments)})},{key:"uploadLogWithRetry",value:function(e,t){return Mx({retryFunction:function(){return UA({url:dA(t,RT),body:e,timeout:5e3})},settings:{retries:3,timeout:1e3},onError:function(e,t){t()}})()}},{key:"getPrefix",value:function(e){var t=new Date;return t.setTime(i_()),String.prototype.padStart?"[".concat(t.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1"),":").concat(t.getMilliseconds().toString().padStart(3,"0"),"] <").concat(mE[e],">"):"[".concat(t.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1"),":").concat(t.getMilliseconds(),"] <").concat(mE[e],">")}},{key:"getLogLevel",value:function(){return this.logLevel_}},{key:"setLogLevel",value:function(e){vA(mE[e])||(this.logLevel_!==e&&this.info("setLogLevel ".concat(e)),this.logLevel_=e)}},{key:"enableUploadLog",value:function(){this.enableUploadLog_=!0}},{key:"disableUploadLog",value:function(){this.enableUploadLog_=!1}},{key:"log",value:function(e){var t=e.log,n=e.level,i=e.forAllJoinedClients,r=void 0===i||i,a=e.userId,o=e.sdkAppId;if(t="".concat(this.getPrefix(n)," ").concat(t),this.enableUploadLog_&&n>=this.logLevelToUpload_&&this.queue_.push(new Ox({log:t,level:n,userId:a,sdkAppId:o,forAllJoinedClients:r})),!(n<this.logLevel_)){var s=mE[n]?mE[n].toLowerCase():"info";Lx?console[s]("%cTRTC%c%s","padding: 1px 4px;border-radius: 3px;color: #fff;background: #1E88E5;","display: inline",t):console[s](t)}}},{key:"debug",value:function(e){this.log({log:e,level:fE.DEBUG})}},{key:"info",value:function(e){this.log({log:e,level:fE.INFO})}},{key:"warn",value:function(e){this.log({log:e,level:fE.WARN})}},{key:"error",value:function(e){this.log({log:e,level:fE.ERROR})}},{key:"createLogger",value:function(e){return new Nx(e)}},{key:"checkURLParam",value:function(){var e=new URLSearchParams(location.search).get("logLevelToUpload");mE[e]&&(this.logLevelToUpload_=e)}}]),e}(),Vx=new Ux,Fx=!0,jx=ke,Bx=Math.floor,Hx=Number.isInteger||function(e){return!jx(e)&&isFinite(e)&&Bx(e)===e};Rr({target:"Number",stat:!0},{isInteger:Hx});var Gx,zx=Rr,Wx=ie,Jx=D.f,qx=Ui,Kx=Td,Qx=Jg,Xx=he,$x=Kg,Yx=Wx("".startsWith),Zx=Wx("".slice),eP=Math.min,tP=$x("startsWith");zx({target:"String",proto:!0,forced:!!(tP||(Gx=Jx(String.prototype,"startsWith"),!Gx||Gx.writable))&&!tP},{startsWith:function(e){var t=Kx(Xx(this));Qx(e);var n=qx(eP(arguments.length>1?arguments[1]:void 0,t.length)),i=Kx(e);return Yx?Yx(t,i,n):Zx(t,n,n+i.length)===i}});var nP=O,iP=ie,rP=V,aP=M,oP=Qa,sP=er,cP=F,uP=ft,dP=ce,lP=Object.assign,hP=Object.defineProperty,pP=iP([].concat),fP=!lP||aP((function(){if(nP&&1!==lP({b:1},lP(hP({},"a",{enumerable:!0,get:function(){hP(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=lP({},e)[n]||oP(lP({},t)).join("")!=i}))?function(e,t){for(var n=uP(e),i=arguments.length,r=1,a=sP.f,o=cP.f;i>r;)for(var s,c=dP(arguments[r++]),u=a?pP(oP(c),a(c)):oP(c),d=u.length,l=0;d>l;)s=u[l++],nP&&!rP(o,c,s)||(n[s]=c[s]);return n}:lP,mP=fP;Rr({target:"Object",stat:!0,arity:2,forced:Object.assign!==mP},{assign:mP});var vP=ie,_P=Xe,gP=ke,yP=_t,SP=sl,bP=N,kP=Function,TP=vP([].concat),IP=vP([].join),EP={},wP=function(e,t,n){if(!yP(EP,t)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";EP[t]=kP("C,a","return new C("+IP(i,",")+")")}return EP[t](e,n)},RP=bP?kP.bind:function(e){var t=_P(this),n=t.prototype,i=SP(arguments,1),r=function(){var n=TP(i,SP(arguments));return this instanceof r?wP(t,n.length,n):t.apply(e,n)};return gP(n)&&(r.prototype=n),r},CP=RP;Rr({target:"Function",proto:!0,forced:Function.bind!==CP},{bind:CP});var AP=Rr,xP=$l.findIndex,PP=Eo,DP="findIndex",MP=!0;DP in[]&&Array(1).findIndex((function(){MP=!1})),AP({target:"Array",proto:!0,forced:MP},{findIndex:function(e){return xP(this,e,arguments.length>1?arguments[1]:void 0)}}),PP(DP);var OP=O,NP=ie,LP=Qa,UP=me,VP=NP(F.f),FP=NP([].push),jP=function(e){return function(t){for(var n,i=UP(t),r=LP(i),a=r.length,o=0,s=[];a>o;)n=r[o++],OP&&!VP(i,n)||FP(s,e?[n,i[n]]:i[n]);return s}},BP={entries:jP(!0),values:jP(!1)},HP=BP.values;Rr({target:"Object",stat:!0},{values:function(e){return HP(e)}});var GP=1,zP=5,WP=2,JP=3,qP=4,KP="DISCONNECTED",QP="CONNECTING",XP="RECONNECTING",$P="CONNECTED",YP={CLIENT_BANNED:9,CHANNEL_SETUP_RESULT:19,CHANNEL_RECONNECT_RESULT:514,JOIN_ROOM_RESULT:20,PEER_JOIN:4134,PEER_LEAVE:4135,STREAM_ADDED:16,STREAM_REMOVED:18,UPLINK_NETWORK_STATS:22,UPDATE_REMOTE_MUTE_STAT:23,PUBLISH_RESULT:4098,PUBLISH_STATE_CHANGE_RESULT:4112,UNPUBLISH_RESULT:4100,SUBSCRIBE_RESULT:4102,UNSUBSCRIBE_RESULT:4104,SUBSCRIBE_CHANGE_RESULT:4106,MUTE_RESULT:4108,UPDATE_OFFER_RESULT:4128,START_PUBLISH_TENCENT_CDN_RES:1286,STOP_PUBLISH_TENCENT_CDN_RES:1288,START_PUBLISH_GIVEN_CDN_RES:777,STOP_PUBLISH_GIVEN_CDN_RES:779,START_MIX_TRANSCODE_RES:781,STOP_MIX_TRANSCODE_RES:783,USER_LIST_RES:4137,SWITCH_ROLE_RES:4110,UPDATE_CONSTRAINT_CONFIG_RES:772},ZP=[YP.UPDATE_REMOTE_MUTE_STAT,YP.UPLINK_NETWORK_STATS,YP.USER_LIST_RES,YP.MUTE_RESULT],eD={CLIENT_BANNED:"client-banned",CHANNEL_SETUP_RESULT:"channel-setup-result",CHANNEL_RECONNECT_RESULT:"channel-reconnect-result",JOIN_ROOM_RESULT:"join-room-result",PEER_JOIN:"peer-join",PEER_LEAVE:"peer-leave",STREAM_ADDED:"stream-added",STREAM_REMOVED:"stream-removed",UPLINK_NETWORK_STATS:"uplink-network-stats",UPDATE_REMOTE_MUTE_STAT:"update-remote-mute-stat",PUBLISH_RESULT:"publish-result",PUBLISH_STATE_CHANGE_RESULT:"publish-state-change-result",UNPUBLISH_RESULT:"unpublish-result",SUBSCRIBE_RESULT:"subscribe-result",SUBSCRIBE_CHANGE_RESULT:"subscribe-change-result",UNSUBSCRIBE_RESULT:"unsubscribe-result",UPDATE_OFFER_RESULT:"update-offer-result",START_PUBLISH_TENCENT_CDN_RES:"start-publish-tencent-cdn-res",STOP_PUBLISH_TENCENT_CDN_RES:"stop-publish-tencent-cdn-res",START_PUBLISH_GIVEN_CDN_RES:"start-publish-given-cdn-res",STOP_PUBLISH_GIVEN_CDN_RES:"stop-publish-given-cdn-res",START_MIX_TRANSCODE_RES:"start-mix-transcode-res",STOP_MIX_TRANSCODE_RES:"stop-mix-transcode-res",USER_LIST_RES:"user-list-res",SWITCH_ROLE_RES:"switch_role_res",MUTE_RESULT:"mute-result",UPDATE_CONSTRAINT_CONFIG_RES:"update-contraint-config-res"},tD="publish_change",nD="publish_state_change",iD="join",rD="leave",aD="quality_report",oD="mute_uplink",sD="publish",cD="unpublish",uD="subscribe",dD="unsubscribe",lD="subscribe_change",hD="start_publishing",pD="stop_publishing",fD="start_push_user_cdn",mD="stop_push_user_cdn",vD="start_mcu_mix",_D="stop_mcu_mix",gD="get_user_list",yD="change_role",SD="update_constraint_config",bD={INVALID_PARAMETER:4096,INVALID_OPERATION:4097,NOT_SUPPORTED:4098,DEVICE_NOT_FOUND:4099,INITIALIZE_FAILED:4100,SIGNAL_CHANNEL_SETUP_FAILED:16385,SIGNAL_CHANNEL_ERROR:16386,ICE_TRANSPORT_ERROR:16387,JOIN_ROOM_FAILED:16388,CREATE_OFFER_FAILED:16389,SIGNAL_CHANNEL_RECONNECTION_FAILED:16390,UPLINK_RECONNECTION_FAILED:16391,DOWNLINK_RECONNECTION_FAILED:16392,REMOTE_STREAM_NOT_EXIST:16400,CLIENT_BANNED:16448,SERVER_TIMEOUT:16449,SUBSCRIPTION_TIMEOUT:16450,PLAY_NOT_ALLOWED:16451,DEVICE_AUTO_RECOVER_FAILED:16452,START_PUBLISH_CDN_FAILED:16453,STOP_PUBLISH_CDN_FAILED:16454,START_MIX_TRANSCODE_FAILED:16455,STOP_MIX_TRANSCODE_FAILED:16456,NOT_SUPPORTED_H264:16457,SWITCH_ROLE_FAILED:16458,API_CALL_TIMEOUT:16459,SCHEDULE_FAILED:16460,API_CALL_ABORTED:16461,UNKNOWN:65535},kD=function(e){d(n,e);var t=g(n);function n(e){var i,r=e.name,a=void 0===r?"RtcError":r,s=e.message,c=e.code,u=void 0===c?bD.UNKNOWN:c,d=e.extraCode,l=void 0===d?0:d,h=e.constraint;o(this,n);var p="<".concat(function(e){for(var t in bD)if(bD[t]===e)return t;return"UNKNOWN"}(u)," 0x").concat(u.toString(16),">");return(i=t.call(this,s+"".concat(h?" constraint: ".concat(h):"")+"".concat(null!=s&&s.includes(p)?"":" "+p))).code_=u,i.extraCode_=l,i.name=a,i.message_=s,h&&(i.constraint=h),i}return c(n,[{key:"getCode",value:function(){return this.code_}},{key:"getExtraCode",value:function(){return this.extraCode_}}]),n}(m(Error)),TD=32768,ID=32769,ED=32770,wD=32771,RD=32772,CD=32773,AD=32774,xD=32775,PD=32777,DD=32778,MD=32779,OD=32780,ND=32781,LD=32782,UD=32783,VD=32784,FD=32785,jD=32786,BD=32787,HD=32788,GD=32789,zD=32790,WD=32791,JD=32792,qD=32793,KD=32794,QD=32795,XD=32796,$D=32797,YD=32798,ZD=32799,eM=32800,tM=32801,nM=32802,iM=32803,rM=32804,aM=new Map,oM=function(e,t){var n=aM.get(e);n||(aM.set(e,[]),n=aM.get(e)),n.push(t)},sM=function(e){var t=aM.get(e),n=[];return t?(aM.delete(e),n=t.map((function(e){return{uint32_event_id:e.eventId,uint64_date:e.timestamp,str_userid:e.remoteUserId,str_event_json:e.eventDesc}}))):n=[],n},cM=Object.prototype.hasOwnProperty;function uM(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e)return 0===e.length;if("function"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(hA(e))switch(Object.prototype.toString.call(e)){case"[object File]":case"[object Map]":case"[object Set]":return 0===e.size;case"[object Object]":for(var t in e)if(cM.call(e,t))return!1;return!0}return!1}var dM=function(){function e(){o(this,e);var t=rA(),n=t.name,i=t.version;this.roomIdMap_=new Map,this.configs_={sdkAppId:"",userId:"",version:Wa,env:TT,browserVersion:n+i,ua:navigator.userAgent}}return c(e,[{key:"setConfig",value:function(e){var t=e.sdkAppId,n=e.env,i=e.userId,r=e.roomId;t!==this.configs_.sdkAppId&&(this.configs_.sdkAppId=String(t)),this.configs_.env=n,this.configs_.userId=i,this.roomIdMap_.set(i,String(r))}},{key:"logEvent",value:function(e){if(!tA){var n=t(t(t({},e),this.configs_),{},{userId:e.userId||this.configs_.userId});vA(n.code)&&(n.code="failed"===n.result?bD.UNKNOWN:0),this.sendRequest(dA(this.configs_.sdkAppId,CT),n)}}},{key:"logSuccessEvent",value:function(e){tA||(this.logEvent(t(t({},e),{},{result:"success",roomId:this.roomIdMap_.get(e.userId)})),this.configs_.env===TT&&this.uploadEventToKibana(t(t({},e),{},{result:"success"})))}},{key:"logFailedEvent",value:function(e){if(!tA){var n=e.eventType,i=e.code,r=e.error,a=e.userId,o={roomId:this.roomIdMap_.get(a),userId:a,eventType:n,result:"failed",code:i||(r instanceof kD?r.getExtraCode()||r.getCode():bD.UNKNOWN)};this.logEvent(o),this.configs_.env===TT&&this.uploadEventToKibana(t(t({},o),{},{error:r}))}}},{key:"uploadEventToKibana",value:function(e){var t="stat-".concat(e.eventType,"-").concat(e.result);"delta-join"!==e.eventType&&"delta-leave"!==e.eventType&&"delta-publish"!==e.eventType||(t="".concat(e.eventType,":").concat(e.delta)),this.uploadEvent({log:t,userId:e.userId}),"failed"===e.result&&(t="stat-".concat(e.eventType,"-").concat(e.result,"-").concat(e.code),this.uploadEvent({log:t,userId:e.userId,error:e.error}))}},{key:"uploadEvent",value:function(e){var t=e.log,n=e.userId,i=e.error,r={timestamp:r_(),sdkAppId:this.configs_.sdkAppId,userId:n||this.configs_.userId,version:this.configs_.version,log:t};i&&(r.errorInfo=i.message),this.sendRequest(dA(this.configs_.sdkAppId,RT),r)}},{key:"sendRequest",value:function(e,t){var n=this;Vx.getIsAbleToUpload()?UA({url:e,body:JSON.stringify(t)}).catch((function(){})):setTimeout((function(){n.sendRequest(e,t)}),1e3)}}]),e}(),lM=new dM,hM=function(){function e(t){o(this,e),this.client_=t.client,this.sdkAppId_=t.sdkAppId,this.userId_=t.userId,this.userSig_=t.userSig,this.url_=t.url,this.backupUrl_=t.backupUrl;var n="?sdkAppId=".concat(encodeURIComponent(this.sdkAppId_),"&userId=").concat(encodeURIComponent(this.userId_),"&userSig=").concat(encodeURIComponent(this.userSig_),"&roomId=").concat(encodeURIComponent(t.roomId)),i=this.client_.getSystemResult();if(i&&i.detail){var r=i.detail,a=r.isH264EncodeSupported,s=r.isVp8EncodeSupported,c=r.isH264DecodeSupported,u=r.isVp8DecodeSupported;n+="&enc264=".concat(Number(a),"&dec264=").concat(Number(c),"&encVp8=").concat(Number(s),"&decVp8=").concat(Number(u))}t.signalDomainWhenUnifiedProxy&&(n+="&signalDomain=".concat(encodeURIComponent(t.signalDomainWhenUnifiedProxy))),this.urlWithParam_="".concat(this.url_).concat(n),this.backupUrlWithParam_="".concat(this.backupUrl_).concat(n),this.isConnected_=!1,this.isConnecting_=!1,this.socketInUse_=null,this.socket_=null,this.backupSocket_=null,this.backupTimer_=-1,this.signalInfo_={},this.currentState_=KP,this.reconnectionCount_=0,this.reconnectionTimer_=-1,this.lastMessageTime_=-1,this.seq_=0,this.log_=Vx.createLogger({id:"ws|"+this.userId_,userId:this.userId_,sdkAppId:this.sdkAppId_}),this.emitter_=new FA}return c(e,[{key:"isOnline",get:function(){return this.currentState_===$P&&Date.now()-this.lastMessageTime_<12e3}},{key:"connect",value:function(){var e=this;return new Promise((function(t,n){e.log_.info("connect to url: ".concat(e.urlWithParam_)),e.emitConnectionStateChanged(QP),e.socket_=new WebSocket(e.urlWithParam_),e.bindSocket(e.socket_),e.backupTimer_=setTimeout((function(){e.isConnected_||(e.log_.info("trying to connect to backupUrl"),e.tryConnectBackup())}),5e3),e.once(JP,t),e.once(qP,n)}))}},{key:"tryConnectBackup",value:function(){this.backupSocket_||(this.unbindAndCloseSocket(rT),this.log_.debug("try to connect to url: ".concat(this.backupUrlWithParam_)),this.backupSocket_=new WebSocket(this.backupUrlWithParam_),this.bindSocket(this.backupSocket_))}},{key:"bindSocket",value:function(e){e.onopen=this.onopen.bind(this),e.onclose=this.onclose.bind(this),e.onerror=this.onerror.bind(this),e.onmessage=this.onmessage.bind(this)}},{key:"unbindSocket",value:function(e){e.onopen=function(){},e.onclose=function(){},e.onerror=function(){},e.onmessage=function(){}}},{key:"unbindAndCloseSocket",value:function(e){if(e===rT){if(this.socket_){this.unbindSocket(this.socket_);try{this.socket_.close(1e3)}catch(IQ){}this.socket_=null}}else if(this.backupSocket_){this.unbindSocket(this.backupSocket_);try{this.backupSocket_.close(1e3)}catch(IQ){}this.backupSocket_=null}}},{key:"clearBackupTimer",value:function(){-1!==this.backupTimer_&&(clearTimeout(this.backupTimer_),this.backupTimer_=-1)}},{key:"clearReconnectionTimer",value:function(){-1!==this.reconnectionTimer_&&(clearTimeout(this.reconnectionTimer_),this.reconnectionTimer_=-1)}},{key:"onopen",value:function(e){if(!this.isConnected_){this.isConnected_=!0,this.isConnecting_=!1,this.isReconnecting_&&uM(this.signalInfo_)&&this.stopReconnection(),this.clearBackupTimer(),e.target===this.socket_?(this.unbindAndCloseSocket(aT),this.socketInUse_=this.socket_):(this.unbindAndCloseSocket(rT),this.socketInUse_=this.backupSocket_);var t=e.target.url;this.log_.info("websocket[".concat(t,"] is connected")),this.currentState_===QP?this.addSignalEvent(WD,"signal channel is connected"):this.currentState_===XP&&this.addSignalEvent(QD,"signal channel reconnect success"),this.emitConnectionStateChanged($P),this.emitter_.emit(JP)}}},{key:"onclose",value:function(e){var t=e.target.url,n=e.target===this.socketInUse_;this.log_.info("websocket[".concat(t," InUse: ").concat(n,"] is closed with code: ").concat(e.code)),e.target===this.socketInUse_&&(this.isConnected_=!1,this.emitConnectionStateChanged(KP),this.addSignalEvent(zD,"signal channel is disconnected"),e.wasClean&&1e3===e.code||(this.log_.warn("onclose code:".concat(e.code," reason:").concat(e.reason)),this.log_.warn("close current websocket and schedule a reconnect timeout"),this.socketInUse_.onclose=function(){},this.socketInUse_.close(4011),this.socket_=this.backupSocket_=this.socketInUse_=null,this.reconnect(rT)))}},{key:"onerror",value:function(e){var t=e.target.url;this.log_.error("websocket[".concat(t,"] error observed")),this.isConnected_?e.target===this.socketInUse_&&(this.isConnected_=!1,this.unbindAndCloseSocket(rT),this.unbindAndCloseSocket(aT),this.socketInUse_=null,this.reconnect(rT)):(this.isReconnecting_||lM.logFailedEvent({userId:this.client_.getUserId(),eventType:SI,code:bD.UNKNOWN}),e.target==this.socket_?(this.unbindAndCloseSocket(rT),this.reconnect(aT)):(this.unbindAndCloseSocket(aT),this.reconnect(rT))),this.isConnecting_=!1,this.isConnected_=!1}},{key:"onmessage",value:function(e){if(this.isConnected_){this.lastMessageTime_=Date.now();var t=JSON.parse(e.data),n=t.cmd,i=t.data,r=Object.values(YP),a=Object.keys(YP)[r.indexOf(n)],o=eD[a];switch(ZP.includes(n)||(this.log_.debug("received msg: ".concat(e.data)),this.log_.info("Received event: [ ".concat(o||"unknown cmd: "+n," ]"))),n){case YP.CHANNEL_SETUP_RESULT:if(0===t.code)this.signalInfo_.clientIp=i.clientIp,this.signalInfo_.signalIp=i.signalInnerIp,this.signalInfo_.tinyId=t.tinyId,i.svrTime&&function(e){n_=e-(new Date).getTime();var t=new Date;t.setTime(e),Vx.info("baseTime from server: "+t+" offset: "+n_)}(i.svrTime),this.log_.info("ChannelSetup Success"),lM.logSuccessEvent({userId:this.userId_,eventType:SI}),this.emitter_.emit(GP,{signalInfo:this.signalInfo_});else{var s=new kD({code:bD.SIGNAL_CHANNEL_SETUP_FAILED,extraCode:t.code,message:sA({key:jE,data:{errorCode:t.code,errorMsg:t.message}})});this.log_.error("".concat(t.code,", ").concat(t.message)),this.close(),lM.logFailedEvent({userId:this.userId_,eventType:SI,error:s}),this.emitter_.emit(zP,s)}break;case YP.JOIN_ROOM_RESULT:0===t.code&&(this.signalInfo_.relayIp=i.relayOuterIp,this.signalInfo_.relayInnerIp=i.relayInnerIp,this.signalInfo_.relayPort=i.relayPort,this.log_.info("signalIp:".concat(this.signalInfo_.signalIp," clientIp:").concat(this.signalInfo_.clientIp," relayIp: ").concat(this.signalInfo_.relayIp))),this.emitter_.emit(o,{data:t});break;case YP.CHANNEL_RECONNECT_RESULT:0===t.code?(this.log_.warn("reconnect success"),this.stopReconnection(),lM.logSuccessEvent({userId:this.userId_,eventType:bI}),this.client_.syncUserList(),this.client_.checkConnectionsToReconnect()):(this.log_.warn("reconnect failed, ".concat(t.code," ").concat(t.message)),this.client_.reJoin());break;default:this.emitter_.emit(o,{data:t})}}}},{key:"addSignalEvent",value:function(e,t){oM(this.userId_,{eventId:e,eventDesc:t,timestamp:i_(),userId:this.userId_,tinyId:this.signalInfo_.tinyId})}},{key:"reconnect",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rT;if(this.isConnecting_||-1!==this.reconnectionTimer_)this.log_.info("signal channel is reconnecting, ignoring current reconnection");else{if(this.reconnectionCount_>=tI){this.log_.warn("SDK has tried reconnect signal channel for ".concat(tI," times, but all failed. please check your network"));var n=new kD({code:bD.SIGNAL_CHANNEL_RECONNECTION_FAILED,message:sA({key:FE})});return lM.logFailedEvent({userId:this.client_.getUserId(),eventType:bI,error:n}),this.addSignalEvent(XD,"signal channel reconnect fail"),void this.emitter_.emit(qP,n)}this.isConnecting_=!0,this.reconnectionCount_++,this.currentState_!==XP&&(this.emitConnectionStateChanged(XP),this.addSignalEvent(KD,"signal channel is reconnecting")),this.log_.warn("reconnecting to ".concat(t," signal channel [").concat(this.reconnectionCount_,"/").concat(tI,"]"));var i=this.getReconnectionUrl(t);t===rT?(this.socket_=new WebSocket(i),this.bindSocket(this.socket_)):(this.backupSocket_=new WebSocket(i),this.bindSocket(this.backupSocket_));var r=fA(this.reconnectionCount_);this.reconnectionTimer_=setTimeout((function(){e.log_.warn("reconnect ".concat(t," signal channel timeout(").concat(r/1e3,"s), close and try again")),e.isConnecting_=!1,e.clearReconnectionTimer(),e.unbindAndCloseSocket(t),e.reconnect(t===rT?aT:rT)}),r)}}},{key:"isConnected",value:function(){return this.isConnected_}},{key:"isReconnecting_",get:function(){return-1!==this.reconnectionTimer_}},{key:"getReconnectionUrl",value:function(e){var t=e===rT?this.urlWithParam_:this.backupUrlWithParam_;if(!uM(this.signalInfo_)&&-1===t.indexOf("&rc=1")){var n=this.client_.getRoomId(),i=this.client_.getUseStringRoomId();t+="&rc=1&relayInnerIp=".concat(this.signalInfo_.relayInnerIp,"&relayOuterIp=").concat(this.signalInfo_.relayIp,"&relayPort=").concat(this.signalInfo_.relayPort,"&roomId=").concat(n,"&useStringRoomId=").concat(i)}return t}},{key:"send",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isConnected_){var n={cmd:e,data:t,userId:this.userId_,tinyId:this.signalInfo_.tinyId,seq:++this.seq_};return this.socketInUse_.send(JSON.stringify(n)),n.seq}}},{key:"sendWaitForResponse",value:function(e){var t=this,n=e.command,i=e.data,r=e.timeout,a=void 0===r?5e3:r,o=e.responseCommand,s=e.commandDesc,c=e.enableLog,u=void 0===c||c;return new Promise((function(e,r){var c=setTimeout((function(){t.off(o,d);var e=new kD({code:bD.API_CALL_TIMEOUT,message:sA({key:VE,data:{commandDesc:s,command:n}})});u&&t.log_.warn(e),r(e)}),a),d=function n(i){i.data.seq===l&&(clearTimeout(c),t.off(o,n),e(i))};t.on(o,d);var l=t.send(n,i)}))}},{key:"sendWaitForResponseWithRetry",value:function(){var e=this,t=arguments.length<=0?void 0:arguments[0],n=t.commandDesc,i=t.command,r=t.retries,a=void 0===r?0:r,o=t.retryTimeout,s=void 0===o?0:o;return Mx({retryFunction:this.sendWaitForResponse,onRetrying:function(t){e.log_.warn("".concat(n||i," timeout observed, retrying [").concat(t,"/").concat(a,"]"))},settings:{retries:a,timeout:s},context:this}).apply(void 0,arguments)}},{key:"getCurrentState",value:function(){return this.currentState_}},{key:"getSignalInfo",value:function(){return this.signalInfo_}},{key:"stopReconnection",value:function(){this.isReconnecting_&&(this.reconnectionCount_=0,this.clearReconnectionTimer())}},{key:"close",value:function(){this.log_.info("close SignalChannel"),this.clearBackupTimer(),this.stopReconnection(),this.signalInfo_={},this.isConnecting_=!1,this.isConnected_=!1,this.socketInUse_=null,this.unbindAndCloseSocket(rT),this.unbindAndCloseSocket(aT),this.emitConnectionStateChanged(KP)}},{key:"on",value:function(e,t,n){this.emitter_.on(e,t,n)}},{key:"removeListener",value:function(e,t,n){this.emitter_.removeListener(e,t,n)}},{key:"once",value:function(e,t,n){this.emitter_.once(e,t,n)}},{key:"off",value:function(e,t,n){this.emitter_.off(e,t,n)}},{key:"emitConnectionStateChanged",value:function(e){e!==this.currentState_&&(this.emitter_.emit(WP,{prevState:this.currentState_,state:e}),this.currentState_=e)}}]),e}(),pM=Rr,fM=$l.find,mM=Eo,vM="find",_M=!0;vM in[]&&Array(1).find((function(){_M=!1})),pM({target:"Array",proto:!0,forced:_M},{find:function(e){return fM(this,e,arguments.length>1?arguments[1]:void 0)}}),mM(vM);var gM={},yM={},SM={exports:{}},bM=SM.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(bM).forEach((function(e){bM[e].forEach((function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))})),function(e){var t=function(e){return String(Number(e))===e?Number(e):e},n=function(e,n,i){var r=e.name&&e.names;e.push&&!n[e.push]?n[e.push]=[]:r&&!n[e.name]&&(n[e.name]={});var a=e.push?{}:r?n[e.name]:n;!function(e,n,i,r){if(r&&!i)n[r]=t(e[1]);else for(var a=0;a<i.length;a+=1)null!=e[a+1]&&(n[i[a]]=t(e[a+1]))}(i.match(e.reg),a,e.names,e.name),e.push&&n[e.push].push(a)},i=SM.exports,r=RegExp.prototype.test.bind(/^([a-z])=(.*)/);e.parse=function(e){var t={},a=[],o=t;return e.split(/(\r\n|\r|\n)/).filter(r).forEach((function(e){var t=e[0],r=e.slice(2);"m"===t&&(a.push({rtp:[],fmtp:[]}),o=a[a.length-1]);for(var s=0;s<(i[t]||[]).length;s+=1){var c=i[t][s];if(c.reg.test(r))return n(c,o,r)}})),t.media=a,t};var a=function(e,n){var i=n.split(/=(.+)/,2);return 2===i.length?e[i[0]]=t(i[1]):1===i.length&&n.length>1&&(e[i[0]]=void 0),e};e.parseParams=function(e){return e.split(/;\s?/).reduce(a,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){return e.toString().split(" ").map(Number)},e.parseRemoteCandidates=function(e){for(var n=[],i=e.split(" ").map(t),r=0;r<i.length;r+=3)n.push({component:i[r],ip:i[r+1],port:i[r+2]});return n},e.parseImageAttributes=function(e){return e.split(" ").map((function(e){return e.substring(1,e.length-1).split(",").reduce(a,{})}))},e.parseSimulcastStreamList=function(e){return e.split(";").map((function(e){return e.split(",").map((function(e){var n,i=!1;return"~"!==e[0]?n=t(e):(n=t(e.substring(1,e.length)),i=!0),{scid:n,paused:i}}))}))}}(yM);var kM=SM.exports,TM=/%[sdv%]/g,IM=function(e){var t=1,n=arguments,i=n.length;return e.replace(TM,(function(e){if(t>=i)return e;var r=n[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(r);case"%d":return Number(r);case"%v":return""}}))},EM=function(e,t,n){var i=[e+"="+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var r=0;r<t.names.length;r+=1){var a=t.names[r];t.name?i.push(n[t.name][a]):i.push(n[t.names[r]])}else i.push(n[t.name]);return IM.apply(null,i)},wM=["v","o","s","i","u","e","p","c","b","t","r","z","a"],RM=["i","c","b","a"],CM=yM,AM=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach((function(e){null==e.payloads&&(e.payloads="")}));var n=t.outerOrder||wM,i=t.innerOrder||RM,r=[];return n.forEach((function(t){kM[t].forEach((function(n){n.name in e&&null!=e[n.name]?r.push(EM(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach((function(e){r.push(EM(t,n,e))}))}))})),e.media.forEach((function(e){r.push(EM("m",kM.m[0],e)),i.forEach((function(t){kM[t].forEach((function(n){n.name in e&&null!=e[n.name]?r.push(EM(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach((function(e){r.push(EM(t,n,e))}))}))}))})),r.join("\r\n")+"\r\n"};gM.write=AM,gM.parse=CM.parse,gM.parseParams=CM.parseParams,gM.parseFmtpConfig=CM.parseFmtpConfig,gM.parsePayloads=CM.parsePayloads,gM.parseRemoteCandidates=CM.parseRemoteCandidates,gM.parseImageAttributes=CM.parseImageAttributes,gM.parseSimulcastStreamList=CM.parseSimulcastStreamList;var xM=function(e){return gM.parse(e)},PM=function(e){return gM.write(e)},DM=function(e){var t=xM(e);return t.media.forEach((function(e){e.type===Uk&&e.fmtp.forEach((function(e){e.config+=";sprop-stereo=1;stereo=1"}))})),PM(t)};function MM(e){var t=xM(e);return t.media.forEach((function(e){if(e.type===Vk){var t=new Set;e.rtp.forEach((function(e){var n=e.payload;return"H264"===e.codec&&t.add(n)})),e.fmtp.forEach((function(e){var n=e.payload,i=e.config.match(/apt=(\d+)/);i&&i[1]&&t.has(Number(i[1]))&&t.add(n)}));var n=function(e){var n=e.payload;return!t.has(n)};e.rtp=e.rtp.filter(n),e.rtcpFb=e.rtcpFb.filter(n),e.fmtp=e.fmtp.filter(n),e.payloads=e.payloads.split(" ").filter((function(e){return!t.has(Number(e))})).join(" ")}})),PM(t)}var OM,NM,LM,UM,VM=Rr,FM=ie,jM=xi,BM=rg,HM=_p,GM=M,zM=RangeError,WM=String,JM=Math.floor,qM=FM(HM),KM=FM("".slice),QM=FM(1..toFixed),XM=function(e,t,n){return 0===t?n:t%2==1?XM(e,t-1,n*e):XM(e*e,t/2,n)},$M=function(e,t,n){for(var i=-1,r=n;++i<6;)r+=t*e[i],e[i]=r%1e7,r=JM(r/1e7)},YM=function(e,t){for(var n=6,i=0;--n>=0;)i+=e[n],e[n]=JM(i/t),i=i%t*1e7},ZM=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var i=WM(e[t]);n=""===n?i:n+qM("0",7-i.length)+i}return n};VM({target:"Number",proto:!0,forced:GM((function(){return"0.000"!==QM(8e-5,3)||"1"!==QM(.9,0)||"1.25"!==QM(1.255,2)||"1000000000000000128"!==QM(0xde0b6b3a7640080,0)}))||!GM((function(){QM({})}))},{toFixed:function(e){var t,n,i,r,a=BM(this),o=jM(e),s=[0,0,0,0,0,0],c="",u="0";if(o<0||o>20)throw zM("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return WM(a);if(a<0&&(c="-",a=-a),a>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(a*XM(2,69,1))-69)<0?a*XM(2,-t,1):a/XM(2,t,1),n*=4503599627370496,(t=52-t)>0){for($M(s,0,n),i=o;i>=7;)$M(s,1e7,0),i-=7;for($M(s,XM(10,i,1),0),i=t-1;i>=23;)YM(s,1<<23),i-=23;YM(s,1<<i),$M(s,1,1),YM(s,2),u=ZM(s)}else $M(s,0,n),$M(s,1<<-t,0),u=ZM(s)+qM("0",o);return u=o>0?c+((r=u.length)<=o?"0."+qM("0",o-r)+u:KM(u,0,r-o)+"."+KM(u,r-o)):c+u}});var eO=(null===(OM=window)||void 0===OM?void 0:OM.requestIdleCallback)||function(e){var t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1e3)},tO=(null===(NM=window)||void 0===NM?void 0:NM.cancelIdleCallback)||function(e){clearTimeout(e)},nO=(null===(LM=window)||void 0===LM?void 0:LM.cancelAnimationFrame)||(null===(UM=window)||void 0===UM?void 0:UM.mozCancelAnimationFrame),iO=function(){function e(){o(this,e)}return c(e,null,[{key:"generateTaskID",value:function(){return this.currentTaskID++}},{key:"run",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bE,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;i=t(t({},e===SE?{delay:2e3,count:0,backgroundTask:!0}:e===gE?{delay:1e4,count:0}:e===yE?{fps:60,delay:16.6,count:0,backgroundTask:!0}:{delay:2e3,count:0,backgroundTask:!0}),i),SA(n)&&(i=t(t({},i),n)),mA(e)&&(n=e,e=bE);var r=t({taskID:this.generateTaskID(),loopCount:0,intervalID:null,timeoutID:null,rafID:null,ricID:null,taskName:e,callback:n},i);return this.taskMap.set(r.taskID,r),this[e](r),r.taskID}},{key:"interval",value:function(e){var t=this;return e.intervalID=setInterval((function(){e.callback(),e.loopCount+=1,t.isBreakLoop(e)}),e.delay)}},{key:"timeout",value:function(e){var t=this;return e.timeoutID=setTimeout((function n(){if(e.callback(),e.loopCount+=1,!t.isBreakLoop(e))return e.timeoutID=setTimeout(n,e.delay)}),e.delay)}},{key:"ric",value:function(e){var t,n=this,i=EA();return e.ricID=eO((function r(){if((t=EA()-i)>=e.delay&&(i=EA()-Math.floor(t%e.delay),e.callback(),e.loopCount+=1),!n.isBreakLoop(e))return e.ricID=eO(r,{timeout:e.delay})}),{timeout:e.delay})}},{key:"raf",value:function(e){var t=this;e.delay=(1e3/e.fps).toFixed(2);var n,i=EA(),r=function r(){if(document.hidden&&e.backgroundTask){if(n=EA()-i,i=EA(),e.callback(),e.loopCount+=1,t.isBreakLoop(e))return;return e.timeoutID=setTimeout(r,e.delay-Math.floor(n%e.delay))}if((n=EA()-i)>=e.delay&&(i=EA()-Math.floor(n%e.delay),e.callback(),e.loopCount+=1),!t.isBreakLoop(e))return e.rafID=requestAnimationFrame(r)};if(e.rafID=requestAnimationFrame(r),e.backgroundTask){var a=function(){if(document.hidden){var t=EA()-i;t>=e.delay?r():e.timeoutID=setTimeout(r,e.delay-t)}};document.addEventListener("visibilitychange",a),e.onVisibilitychange=a,document.hidden&&a()}return e.taskID}},{key:"hasTask",value:function(e){return this.taskMap.has(e)}},{key:"clearTask",value:function(e){if(!this.taskMap.has(e))return!0;var t=this.taskMap.get(e),n=t.intervalID,i=t.timeoutID,r=t.rafID,a=t.ricID,o=t.onVisibilitychange;return n&&clearInterval(n),i&&clearTimeout(i),r&&nO(r),a&&tO(a),o&&document.removeEventListener("visibilitychange",o),this.taskMap.delete(e),!0}},{key:"isBreakLoop",value:function(e){return!this.taskMap.has(e.taskID)||0!==e.count&&e.loopCount>=e.count&&(this.clearTask(e.taskID),!0)}}]),e}();u(iO,"taskMap",new Map),u(iO,"currentTaskID",1);var rO=function(){function e(){o(this,e),this.prefix_="TRTC",this.queue_=new Map,this.checkStorage()}return c(e,[{key:"getRealKey",value:function(e){return"".concat(this.prefix_,"_").concat(e)}},{key:"checkStorage",value:function(){var e=this;if(nA()){var t=Object.keys(localStorage).filter((function(t){if(t.startsWith(e.prefix_)){var n=JSON.parse(localStorage.getItem(t));if(n&&n.expiresIn<Date.now())return!0}return!1}));t.forEach((function(e){return localStorage.removeItem(e)}))}}},{key:"doFlush",value:function(){if(nA())try{var e,t=w(this.queue_);try{for(t.s();!(e=t.n()).done;){var n=k(e.value,2),i=n[0],r=n[1];localStorage.setItem(i,JSON.stringify(r))}}catch(a){t.e(a)}finally{t.f()}}catch(IQ){Vx.warn(IQ)}}},{key:"getItem",value:function(e){if(!nA())return null;try{var t=JSON.parse(localStorage.getItem(this.getRealKey(e)));return t&&t.expiresIn>=Date.now()?t.value:null}catch(IQ){Vx.warn(IQ)}}},{key:"setItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(nA())try{var i={expiresIn:Date.now()+qI,value:t};n?localStorage.setItem(this.getRealKey(e),JSON.stringify(i)):(this.queue_.set(this.getRealKey(e),i),iO.hasTask(this.intervalId_)||(this.intervalId_=iO.run(gE,this.doFlush.bind(this),{count:1})))}catch(IQ){Vx.warn(IQ)}}},{key:"deleteItem",value:function(e){if(!nA())return!1;try{return e=this.getRealKey(e),this.queue_.delete(e),localStorage.removeItem(e),!0}catch(IQ){return Vx.warn(IQ),!1}}},{key:"clear",value:function(){if(nA())try{localStorage.clear()}catch(IQ){Vx.warn(IQ)}}}]),e}(),aO=new rO,oO={result:!1,detail:{isBrowserSupported:!1,isWebRTCSupported:!1,isMediaDevicesSupported:!1,isH264EncodeSupported:!1,isVp8EncodeSupported:!1,isH264DecodeSupported:!1,isVp8DecodeSupported:!1,isSpatialAudioSupported:!1}},sO="checkResult";var cO=function(){return!AC&&!iC&&(!(aC&&oC<80)&&!(tC&&nC<56))},uO=function(){return["RTCPeerConnection","webkitRTCPeerConnection","RTCIceGatherer"].filter((function(e){return e in window})).length>0},dO=function(){if(!navigator.mediaDevices)return!1;var e=["getUserMedia","enumerateDevices"];return e.filter((function(e){return e in navigator.mediaDevices})).length===e.length},lO=function(){var e=a(n().mark((function e(){var t,i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!oO.detail.isH264EncodeSupported||!oO.detail.isVp8EncodeSupported){e.next=2;break}return e.abrupt("return",{isH264EncodeSupported:oO.detail.isH264EncodeSupported,isVp8EncodeSupported:oO.detail.isVp8EncodeSupported});case 2:return t="",i=!1,r=!1,e.prev=5,a=new RTCPeerConnection,(o=document.createElement(Lk)).getContext("2d"),s=o.captureStream(0),a.addTrack(s.getVideoTracks()[0],s),e.next=13,a.createOffer();case 13:return-1!==(t=e.sent).sdp.toLowerCase().indexOf("h264")&&(i=!0),-1!==t.sdp.toLowerCase().indexOf("vp8")&&(r=!0),a.close(),oO.detail.isH264EncodeSupported=i,oO.detail.isVp8EncodeSupported=r,e.abrupt("return",{isH264EncodeSupported:oO.detail.isH264EncodeSupported,isVp8EncodeSupported:oO.detail.isVp8EncodeSupported});case 22:return e.prev=22,e.t0=e.catch(5),e.abrupt("return",{isH264EncodeSupported:!1,isVp8EncodeSupported:!1});case 25:case"end":return e.stop()}}),e,null,[[5,22]])})));return function(){return e.apply(this,arguments)}}();function hO(){return pO.apply(this,arguments)}function pO(){return pO=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=a(n().mark((function e(t){var i,r,o,s,c,u,d,l,h,p,f,m,v,_;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={encode:!1,decode:!1},r=null,e.prev=2,o=document.createElement("canvas"),s=o.getContext("2d"),o.width=640,o.height=480,c=setInterval((function(){s.fillText("test",Math.floor(640*Math.random()),Math.floor(480*Math.random()))}),33),u=-1,d=-1,r=function(){clearInterval(u),clearInterval(c),clearTimeout(d),h.close(),p.close(),l.getTracks().forEach((function(e){return e.stop()}))},d=setTimeout((function(){r(),t(i)}),3e3),l=o.captureStream(),h=new RTCPeerConnection({}),p=new RTCPeerConnection({offerToReceiveAudio:!0,offerToReceiveVideo:!0}),h.addEventListener("icecandidate",(function(e){return p.addIceCandidate(e.candidate)})),p.addEventListener("icecandidate",(function(e){return h.addIceCandidate(e.candidate)})),h.addTrack(l.getVideoTracks()[0],l),e.next=20,h.createOffer();case 20:return f=e.sent,e.next=23,h.setLocalDescription(f);case 23:return e.next=25,p.setRemoteDescription(f);case 25:return e.next=27,p.createAnswer();case 27:return m=e.sent,v=xM(m.sdp),_=v.media[0].rtp.findIndex((function(e){return"H264"===e.codec})),v.media[0].rtp=[v.media[0].rtp[_]],v.media[0].fmtp=v.media[0].fmtp.filter((function(e){return e.payload===v.media[0].rtp[0].payload})),v.media[0].rtcpFb=v.media[0].rtcpFb.filter((function(e){return e.payload===v.media[0].rtp[0].payload})),m.sdp=PM(v),e.next=36,p.setLocalDescription(m);case 36:return e.next=38,h.setRemoteDescription(m);case 38:u=setInterval(a(n().mark((function e(){var a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.encode&&i.decode&&(r(),t(i)),e.next=3,h.getStats();case 3:return a=e.sent,e.next=6,p.getStats();case 6:o=e.sent,i.encode||a.forEach((function(e){"outbound-rtp"===e.type&&e.mediaType===Vk&&e.framesEncoded>0&&(i.encode=!0)})),i.decode||o.forEach((function(e){"inbound-rtp"===e.type&&e.mediaType===Vk&&e.framesDecoded>0&&(i.decode=!0)}));case 9:case"end":return e.stop()}}),e)}))),500),e.next=46;break;case 41:e.prev=41,e.t0=e.catch(2),r(),Vx.warn(e.t0),t(i);case 46:case"end":return e.stop()}}),e,null,[[2,41]])})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),pO.apply(this,arguments)}var fO=function(){var e=a(n().mark((function e(){var t,i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!oO.detail.isH264DecodeSupported||!oO.detail.isVp8DecodeSupported){e.next=2;break}return e.abrupt("return",{isH264DecodeSupported:oO.detail.isH264DecodeSupported,isVp8DecodeSupported:oO.detail.isVp8DecodeSupported});case 2:return t="",i=!1,r=!1,e.prev=5,a=new RTCPeerConnection,e.next=9,a.createOffer({offerToReceiveAudio:1,offerToReceiveVideo:1});case 9:return-1!==(t=e.sent).sdp.toLowerCase().indexOf("h264")&&(i=!0),-1!==t.sdp.toLowerCase().indexOf("vp8")&&(r=!0),a.close(),e.abrupt("return",{isH264DecodeSupported:i,isVp8DecodeSupported:r});case 16:return e.prev=16,e.t0=e.catch(5),e.abrupt("return",{isH264DecodeSupported:!1,isVp8DecodeSupported:!1});case 19:case"end":return e.stop()}}),e,null,[[5,16]])})));return function(){return e.apply(this,arguments)}}(),mO=function(){var e=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l,h,p,f;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_O()){e.next=2;break}return e.abrupt("return",oO);case 2:return t=cO(),i=uO(),r=dO(),e.next=7,lO();case 7:return a=e.sent,o=a.isH264EncodeSupported,s=a.isVp8EncodeSupported,e.next=12,fO();case 12:if(c=e.sent,u=c.isH264DecodeSupported,d=c.isVp8DecodeSupported,o&&s){e.next=21;break}return e.next=18,lO();case 18:l=e.sent,o=l.isH264EncodeSupported,s=l.isVp8EncodeSupported;case 21:if(!(o&&u&&(FC||BC||XC)&&!lC&&GC()<79)){e.next=29;break}return e.next=24,hO();case 24:h=e.sent,p=h.encode,f=h.decode,o=p,u=f;case 29:return oO.result=t&&i&&r&&(o||s)&&(u||d),oO.detail.isBrowserSupported=t,oO.detail.isWebRTCSupported=i,oO.detail.isMediaDevicesSupported=r,oO.detail.isH264EncodeSupported=o,oO.detail.isVp8EncodeSupported=s,oO.detail.isH264DecodeSupported=u,oO.detail.isVp8DecodeSupported=d,oO.detail.isSpatialAudioSupported=AO(),gO(),aO.setItem(sO,{ua:navigator.userAgent,checkResult:oO},!0),e.abrupt("return",oO);case 41:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),vO=function(e,t){var n=null;return function(){if(n)return n;for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=e.apply(t||this,r)).then((function(e){return n=null,e})).catch((function(e){throw n=null,e})),n}}(mO);function _O(){var e;return null===(e=oO.detail)||void 0===e||!e.isSpatialAudioSupported||Object.keys(oO.detail).findIndex((function(e){return!oO.detail[e]}))>=0}function gO(){_O()&&(Vx.warn(sA({key:lR})),Vx.info("".concat(navigator.userAgent," ").concat(JSON.stringify(oO.detail))))}function yO(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)}function SO(){return"RTCPeerConnection"in window&&"getReceivers"in window.RTCPeerConnection.prototype}function bO(){return"RTCPeerConnection"in window&&"getSenders"in window.RTCPeerConnection.prototype}function kO(){return"RTCPeerConnection"in window&&"getTransceivers"in window.RTCPeerConnection.prototype}function TO(){return"RTCPeerConnection"in window&&"addTransceiver"in window.RTCPeerConnection.prototype}function IO(){return"RTCRtpSender"in window&&"replaceTrack"in window.RTCRtpSender.prototype}function EO(){return"RTCRtpSender"in window&&"setParameters"in window.RTCRtpSender.prototype&&bO()}function wO(){return!!vA(navigator.mediaDevices)&&(Vx.error(UR.NOT_SUPPORTED_MEDIA),!0)}function RO(){return"http:"===location.protocol&&!tA&&(Vx.warn(sA({key:dR})),!0)}var CO="RTCRtpSender"in window&&"createEncodedStreams"in window.RTCRtpSender.prototype&&GC()>=86,AO=function(){return CO};function xO(e){return!("candidate-pair"!==e.type||!e.nominated||"in-progress"!==e.state&&"succeeded"!==e.state)&&!(yA(e.selected)&&!e.selected)}var PO=new Map([[eC,"Android"],[ZR,"iOS"],[wC,"Windows"],[RC,"MacOS"],[CC,"Linux"]]);function DO(){var e="unknown";return PO.get(!0)&&(e=PO.get(!0)),e}function MO(){var e="";screen.width&&(e+=(screen.width?screen.width*window.devicePixelRatio:"")+" * "+(screen.height?screen.height*window.devicePixelRatio:""));return e}function OO(){var e=!1;return(navigator.getUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)&&(e=!0),e}function NO(){for(var e={isSupported:!1},t=["AudioContext","webkitAudioContext","mozAudioContext","msAudioContext"],n=0;n<t.length;n++)if(t[n]in window){e.isSupported=!0;break}return e.isSupported}function LO(){return!(mC&&GC()<86)&&(!(ZR&&gA($C)&&$C<15)&&(!(JC&&JC<63)&&!(!cO()||!("captureStream"in HTMLCanvasElement.prototype))))}var UO=window.MediaStreamTrack&&"getSettings"in MediaStreamTrack.prototype,VO=window.MediaStreamTrack&&"getCapabilities"in MediaStreamTrack.prototype;var FO=function(){var e,t,n;return(null===(e=window)||void 0===e?void 0:e.OffscreenCanvas)&&(null===(t=window)||void 0===t?void 0:t.MediaStreamTrackProcessor)&&(null===(n=window)||void 0===n?void 0:n.MediaStreamTrackGenerator)};!function(){RO();var e=aO.getItem(sO);e&&e.ua===navigator.userAgent&&(oO=e.checkResult),vO()}();var jO={STREAM_ADDED:"stream-added",STREAM_REMOVED:"stream-removed",STREAM_UPDATED:"stream-updated",STREAM_PUBLISHED:"stream-published",STREAM_SUBSCRIBED:"stream-subscribed",STREAM_UNSUBSCRIBED:"stream-unsubscribed",STATE_CHANGED:"state-changed",ERROR:"error",CONNECTION_STATE_CHANGED:"connection-state-changed",SEI_MESSAGE:dT},BO={STREAM_ADDED:"stream-added",STREAM_REMOVED:"stream-removed",STREAM_UPDATED:"stream-updated",STREAM_SUBSCRIBED:"stream-subscribed",CONNECTION_STATE_CHANGED:"connection-state-changed",PEER_JOIN:"peer-join",PEER_LEAVE:"peer-leave",MUTE_AUDIO:"mute-audio",MUTE_VIDEO:"mute-video",UNMUTE_AUDIO:"unmute-audio",UNMUTE_VIDEO:"unmute-video",CLIENT_BANNED:"client-banned",NETWORK_QUALITY:"network-quality",AUDIO_VOLUME:"audio-volume",SEI_MESSAGE:dT,ERROR:"error"},HO="player-state-changed",GO="screen-sharing-stopped",zO="connection-state-changed",WO="device-auto-recovered",JO="error",qO="player-state-changed",KO=CE;Rr({target:"String",proto:!0,forced:xE("small")},{small:function(){return KO(this,"small","","")}});var QO=function(){function e(t){o(this,e);var n=t.getUserId();this.log_=Vx.createLogger({id:n,userId:n,sdkAppId:t.getSDKAppId()}),this.prevReportTime_=0,this.prevReport_={},this.prevEncoderImplementation_="",this.prevQualityLimitationReason_="",this.prevDecoderImplementationMap_=new Map}var t,i,r,s;return c(e,[{key:"statInterval",get:function(){return 0===this.prevReportTime_?2:(Date.now()-this.prevReportTime_)/1e3}},{key:"getSenderStats",value:(s=a(n().mark((function e(t){var i,r,a,o,s=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i={audio:{bytesSent:0,packetsSent:0,audioLevel:0,totalAudioEnergy:0},video:{bytesSent:0,packetsSent:0,framesEncoded:0,frameWidth:0,frameHeight:0,framesSent:0,fpsCapture:0},small:{bytesSent:0,packetsSent:0,framesEncoded:0,frameWidth:0,frameHeight:0,framesSent:0,fpsCapture:0},auxiliary:{bytesSent:0,packetsSent:0,framesEncoded:0,frameWidth:0,frameHeight:0,framesSent:0,fpsCapture:0},rtt:0},r=t.getPeerConnection(),a=t.getSSRC(),!r){e.next=15;break}return e.prev=4,e.next=7,r.getStats();case 7:e.sent.forEach((function(e){if("outbound-rtp"===e.type)if(e.mediaType===Vk){if(!tC&&0===e.bytesSent)return;e.ssrc!==a.video||vA(e.encoderImplementation)||s.prevEncoderImplementation_===e.encoderImplementation||(s.log_.info("encoderImplementation change to ".concat(e.encoderImplementation)),s.prevEncoderImplementation_=e.encoderImplementation),e.ssrc!==a.video||vA(e.qualityLimitationReason)||s.prevQualityLimitationReason_===e.qualityLimitationReason||(s.log_.info("qualityLimitationReason change to ".concat(e.qualityLimitationReason)),s.prevQualityLimitationReason_=e.qualityLimitationReason);var n=Vk;e.ssrc===a.small?n=jk:e.ssrc===a.auxiliary&&(n=Hk),i[n].bytesSent=e.bytesSent,i[n].packetsSent=e.packetsSent,i[n].framesEncoded=e.framesEncoded}else e.mediaType===Uk&&(i.audio.bytesSent=e.bytesSent,i.audio.packetsSent=e.packetsSent);else"candidate-pair"===e.type?xO(e)&&gA(e.currentRoundTripTime)&&(i.rtt=Math.floor(1e3*e.currentRoundTripTime)):"media-source"===e.type&&(e.kind===Uk?(i.audio.audioLevel=e.audioLevel||0,i.audio.totalAudioEnergy=e.totalAudioEnergy||0):e.kind===Vk&&(e.trackIdentifier===t.getVideoTrackId(Vk)?i.video.fpsCapture=e.framesPerSecond:e.trackIdentifier===t.getVideoTrackId(Hk)?i.auxiliary.fpsCapture=e.framesPerSecond:i.small.fpsCapture=e.framesPerSecond));var r;vA(e.audioLevel)||(i.audio.audioLevel=e.audioLevel||0,i.audio.totalAudioEnergy=e.totalAudioEnergy||0),vA(e.frameWidth)||(e.trackIdentifier===t.getVideoTrackId(Vk)||e.ssrc===a.video?r=Vk:e.trackIdentifier===t.getVideoTrackId(Hk)||e.ssrc===a.auxiliary?r=Hk:e.trackIdentifier!==t.getVideoTrackId(jk)&&e.ssrc!==a.small||(r=jk),r&&(i[r].frameWidth=e.frameWidth,i[r].frameHeight=e.frameHeight,i[r].framesSent=e.framesSent))})),0===i.audio.audioLevel&&(i.audio.audioLevel=(null===(o=t.getLocalStream())||void 0===o?void 0:o.getInternalAudioLevel())||0),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),this.log_.warn("failed to getStats on sender connection "+e.t0);case 15:return e.abrupt("return",i);case 16:case"end":return e.stop()}}),e,this,[[4,12]])}))),function(e){return s.apply(this,arguments)})},{key:"getReceiverStats",value:(r=a(n().mark((function e(t){var i,r,a,o,s,c=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i={tinyId:t.getTinyId(),userId:t.getUserId(),rtt:0,hasAudio:!1,hasVideo:!1,hasAuxiliary:!1,audio:{bytesReceived:0,packetsReceived:0,packetsLost:0,jitter:0,audioLevel:0,totalAudioEnergy:0},video:{bytesReceived:0,packetsReceived:0,packetsLost:0,framesReceived:0,framesDecoded:0,frameWidth:0,frameHeight:0},auxiliary:{bytesReceived:0,packetsReceived:0,packetsLost:0,framesReceived:0,framesDecoded:0,frameWidth:0,frameHeight:0}},!(r=t.getPeerConnection())){e.next=16;break}return e.prev=3,a=t.getSSRC(),o=t.getTrackState(),e.next=8,r.getStats();case 8:e.sent.forEach((function(e){if("inbound-rtp"===e.type){if(e.mediaType===Uk&&e.ssrc===a.audio&&o.audio)i.audio.packetsReceived=e.packetsReceived,i.audio.bytesReceived=e.bytesReceived,i.audio.packetsLost=e.packetsLost,i.audio.jitter=e.jitter,i.hasAudio=!0;else if(e.mediaType===Vk){if(tC&&0===e.bytesReceived)return;e.ssrc===a.video&&o.video&&(i.video.packetsReceived=e.packetsReceived,i.video.bytesReceived=e.bytesReceived,i.video.packetsLost=e.packetsLost,i.video.framesReceived=e.framesReceived,i.video.framesDecoded=e.framesDecoded,i.video.fpsDecoded=e.framesPerSecond,i.hasVideo=!0,!e.decoderImplementation||c.prevDecoderImplementationMap_.has(i.userId)&&c.prevDecoderImplementationMap_.get(i.userId)===e.decoderImplementation||(c.log_.info("".concat(i.userId," decoderImplementation change to ").concat(e.decoderImplementation)),c.prevDecoderImplementationMap_.set(i.userId,e.decoderImplementation))),e.ssrc===a.auxiliary&&o.auxiliary&&(i.auxiliary.packetsReceived=e.packetsReceived,i.auxiliary.bytesReceived=e.bytesReceived,i.auxiliary.packetsLost=e.packetsLost,i.auxiliary.framesReceived=e.framesReceived,i.auxiliary.framesDecoded=e.framesDecoded,i.auxiliary.fpsDecoded=e.framesPerSecond,i.hasAuxiliary=!0)}}else"candidate-pair"===e.type&&xO(e)&&gA(e.currentRoundTripTime)&&(i.rtt=Math.floor(1e3*e.currentRoundTripTime));vA(e.frameWidth)||(e.trackIdentifier!==t.getMainStreamVideoTrackId()&&e.ssrc!==a.video||(i.video.frameWidth=e.frameWidth,i.video.frameHeight=e.frameHeight),e.trackIdentifier!==t.getAuxStreamVideoTrackId()&&e.ssrc!==a.auxiliary||(i.auxiliary.frameWidth=e.frameWidth,i.auxiliary.frameHeight=e.frameHeight)),vA(e.audioLevel)||(i.audio.audioLevel=e.audioLevel||0,i.audio.totalAudioEnergy=e.totalAudioEnergy||0)})),0===i.audio.audioLevel&&(i.audio.audioLevel=(null===(s=t.getMainStream())||void 0===s?void 0:s.getInternalAudioLevel())||0),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(3),this.log_.warn("failed to getStats on receiver connection "+e.t0);case 16:return e.abrupt("return",i);case 17:case"end":return e.stop()}}),e,this,[[3,13]])}))),function(e){return r.apply(this,arguments)})},{key:"getStats",value:(i=a(n().mark((function e(t,i){var r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r={},!t){e.next=5;break}return e.next=4,this.getSenderStats(t);case 4:r=e.sent;case 5:a=[],o=w(i),e.prev=7,o.s();case 9:if((s=o.n()).done){e.next=17;break}return(c=k(s.value,2))[0],u=c[1],e.next=13,this.getReceiverStats(u);case 13:d=e.sent,a.push(d);case 15:e.next=9;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(7),o.e(e.t0);case 22:return e.prev=22,o.f(),e.finish(22);case 25:return e.abrupt("return",{senderStats:r,receiverStats:a});case 26:case"end":return e.stop()}}),e,this,[[7,19,22,25]])}))),function(e,t){return i.apply(this,arguments)})},{key:"getDifferenceValue",value:function(e,t){if(uM(e))return t;var n=t-e;return n<0?0:n}},{key:"prepareReport",value:function(e){var t=this,n=e.stats,i=e.report,r=e.freezeMap;if(!uM(n.senderStats)){var a;a={uint32_audio_level:1e8*n.senderStats.audio.audioLevel,uint32_audio_energy:1e6*n.senderStats.audio.totalAudioEnergy,uint32_audio_codec_bitrate:n.senderStats.audio.bytesSent,audioLevel:n.senderStats.audio.audioLevel};var o=[],s={uint32_video_stream_type:2,uint32_video_codec_fps:n.senderStats.video.framesSent,uint32_video_capture_fps:n.senderStats.video.fpsCapture,uint32_video_width:n.senderStats.video.frameWidth,uint32_video_height:n.senderStats.video.frameHeight,uint32_video_codec_bitrate:n.senderStats.video.bytesSent,uint32_video_enc_fps:n.senderStats.video.framesEncoded};if(o.push(s),n.senderStats.small.bytesSent){var c={uint32_video_stream_type:3,uint32_video_codec_fps:n.senderStats.small.framesSent||0,uint32_video_capture_fps:n.senderStats.small.fpsCapture||0,uint32_video_width:n.senderStats.small.frameWidth||0,uint32_video_height:n.senderStats.small.frameHeight||0,uint32_video_codec_bitrate:n.senderStats.small.bytesSent,uint32_video_enc_fps:n.senderStats.small.framesEncoded||0};o.push(c)}if(n.senderStats.auxiliary.bytesSent){var u={uint32_video_stream_type:7,uint32_video_codec_fps:n.senderStats.auxiliary.framesSent||0,uint32_video_capture_fps:n.senderStats.auxiliary.fpsCapture||0,uint32_video_width:n.senderStats.auxiliary.frameWidth||0,uint32_video_height:n.senderStats.auxiliary.frameHeight||0,uint32_video_codec_bitrate:n.senderStats.auxiliary.bytesSent,uint32_video_enc_fps:n.senderStats.auxiliary.framesEncoded||0};o.push(u)}var d={uint32_bitrate:0,uint32_rtt:n.senderStats.rtt};i.msg_up_stream_info={msg_audio_status:a,msg_video_status:o,msg_network_status:d}}var l=this.statInterval;i.msg_down_stream_info=[],n.receiverStats.forEach((function(e){var t={};if(t.msg_user_info={str_identifier:e.userId,uint64_tinyid:e.tinyId},t.msg_network_status={uint32_rtt:e.rtt},t.msg_video_status={},e.hasAudio){var n={uint32_audio_codec_bitrate:e.audio.bytesReceived,uint32_audio_total_bitrate:e.audio.bytesReceived,uint32_audio_level:1e8*e.audio.audioLevel,uint32_audio_energy:1e6*e.audio.totalAudioEnergy,uint32_audio_receive:e.audio.packetsReceived,uint32_audio_origin_lost:e.audio.packetsLost,audioLevel:e.audio.audioLevel};t.msg_audio_status=n}if(t.msg_video_status=[],e.hasVideo){var a=r.get(e.userId+"_"+BT),o=a?a.duration:0,s={uint32_video_stream_type:2,uint32_video_receive_fps:e.video.framesReceived,uint32_video_width:e.video.frameWidth,uint32_video_height:e.video.frameHeight,uint32_video_codec_bitrate:e.video.bytesReceived,uint32_video_receive:e.video.packetsReceived,uint32_video_origin_lost:e.video.packetsLost,uint32_video_block_time:o,uint32_video_dec_fps:e.video.framesDecoded};t.msg_video_status.push(s)}if(e.hasAuxiliary){var c=r.get(e.userId+"_"+HT),u=c?c.duration:0,d={uint32_video_stream_type:7,uint32_video_receive_fps:e.auxiliary.framesReceived,uint32_video_width:e.auxiliary.frameWidth,uint32_video_height:e.auxiliary.frameHeight,uint32_video_codec_bitrate:e.auxiliary.bytesReceived,uint32_video_receive:e.auxiliary.packetsReceived+e.auxiliary.packetsLost,uint32_video_origin_lost:e.auxiliary.packetsLost,uint32_video_block_time:u,uint32_video_dec_fps:e.auxiliary.framesDecoded};t.msg_video_status.push(d)}i.msg_down_stream_info.push(t)}));var h=this.prevReport_;if(this.prevReport_=JSON.parse(JSON.stringify(i)),i.msg_up_stream_info.msg_audio_status&&h.msg_up_stream_info.msg_audio_status){var p=h.msg_up_stream_info.msg_audio_status,f=i.msg_up_stream_info.msg_audio_status,m=this.getDifferenceValue(p.uint32_audio_codec_bitrate,f.uint32_audio_codec_bitrate);f.uint32_audio_codec_bitrate=Math.round(8*m/l),i.msg_up_stream_info.msg_network_status.uint32_bitrate+=f.uint32_audio_codec_bitrate}var v=h.msg_up_stream_info.msg_video_status;i.msg_up_stream_info.msg_video_status.forEach((function(e){var n=v.find((function(t){return t.uint32_video_stream_type===e.uint32_video_stream_type}));if(!n||0===n.uint32_video_codec_bitrate)return e.uint32_video_codec_bitrate=0,e.uint32_video_enc_fps=0,void(e.uint32_video_codec_fps=0);var r=n.uint32_video_codec_bitrate,a=n.uint32_video_enc_fps,o=n.uint32_video_codec_fps,s=t.getDifferenceValue(r,e.uint32_video_codec_bitrate);e.uint32_video_codec_bitrate=Math.round(8*s/l),i.msg_up_stream_info.msg_network_status.uint32_bitrate+=e.uint32_video_codec_bitrate,e.uint32_video_enc_fps=Math.round(t.getDifferenceValue(a,e.uint32_video_enc_fps)/l),e.uint32_video_codec_fps=Math.round(t.getDifferenceValue(o,e.uint32_video_codec_fps)/l)}));var _=i.msg_down_stream_info,g=h.msg_down_stream_info;return _.forEach((function(e){var n=g.find((function(t){return t.msg_user_info.uint64_tinyid===e.msg_user_info.uint64_tinyid}));if(n){if(e.msg_audio_status&&n.msg_audio_status){var i=e.msg_audio_status,r=n.msg_audio_status;i.uint32_audio_origin_lost=t.getDifferenceValue(r.uint32_audio_origin_lost,i.uint32_audio_origin_lost),i.uint32_audio_receive=t.getDifferenceValue(r.uint32_audio_receive,i.uint32_audio_receive),i.uint32_audio_receive+=i.uint32_audio_origin_lost;var a=t.getDifferenceValue(r.uint32_audio_codec_bitrate,i.uint32_audio_codec_bitrate);i.uint32_audio_codec_bitrate=Math.round(8*a/l),i.uint32_audio_total_bitrate=Math.round(8*a/l)}if(e.msg_video_status&&n.msg_video_status){var o=e.msg_video_status,s=n.msg_video_status;o.forEach((function(e){var n=s.find((function(t){return t.uint32_video_stream_type===e.uint32_video_stream_type}));if(!n)return e.uint32_video_receive=0,e.uint32_video_origin_lost=0,e.uint32_video_codec_bitrate=0,e.uint32_video_receive_fps=0,void(e.uint32_video_dec_fps=0);var i=n.uint32_video_receive,r=n.uint32_video_origin_lost,a=n.uint32_video_codec_bitrate,o=n.uint32_video_receive_fps,c=n.uint32_video_dec_fps;e.uint32_video_origin_lost=t.getDifferenceValue(r,e.uint32_video_origin_lost),e.uint32_video_receive=t.getDifferenceValue(i,e.uint32_video_receive)+e.uint32_video_origin_lost;var u=t.getDifferenceValue(a,e.uint32_video_codec_bitrate);e.uint32_video_codec_bitrate=Math.round(8*u/l);var d=t.getDifferenceValue(o,e.uint32_video_receive_fps);e.uint32_video_receive_fps=Math.round(d/l),e.uint32_video_dec_fps=Math.round(t.getDifferenceValue(c,e.uint32_video_dec_fps)/l)}))}}})),i}},{key:"getStatsReport",value:(t=a(n().mark((function e(t){var i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.uplinkConnection,r=t.downlinkConnections,a=t.freezeMap,o={msg_up_stream_info:{msg_audio_status:{uint32_audio_format:0,uint32_audio_sample_rate:0,uint32_audio_codec_bitrate:0,uint32_audio_receive:0,uint32_audio_origin_lost:0,uint32_audio_level:0,uint32_audio_energy:0,audioLevel:0},msg_video_status:[{uint32_video_stream_type:0,uint32_video_codec_fps:0,uint32_video_capture_fps:0,uint32_video_width:0,uint32_video_height:0,uint32_video_codec_bitrate:0,uint32_video_receive:0,uint32_video_origin_lost:0,uint32_video_final_lost:0,uint32_video_enc_fps:0}],msg_network_status:{uint32_bitrate:0,uint32_rtt:0,uint32_lost:0}},msg_down_stream_info:[{msg_user_info:{str_identifier:"",uint64_tinyid:""},msg_audio_status:{uint32_audio_format:0,uint32_audio_sample_rate:0,uint32_audio_codec_bitrate:0,uint32_audio_total_bitrate:0,uint32_audio_level:0,uint32_audio_energy:0,uint32_audio_receive:0,uint32_audio_origin_lost:0,uint32_audio_final_lost:0,audioLevel:0},msg_video_status:[{uint32_video_stream_type:0,uint32_video_receive_fps:0,uint32_video_width:0,uint32_video_height:0,uint32_video_codec_bitrate:0,uint32_video_receive:0,uint32_video_origin_lost:0,uint32_video_block_time:0,uint32_video_dec_fps:0}],msg_network_status:{uint32_bitrate:0,uint32_rtt:0,uint32_lost:0,uint32_jitter:0}}]},e.next=4,this.getStats(i,r);case 4:return s=e.sent,"{}"===JSON.stringify(this.prevReport_)&&(this.prevReport_=JSON.parse(JSON.stringify(o))),this.prepareReport({stats:s,report:o,freezeMap:a,uplinkConnection:i,downlinkConnections:r}),this.prevReportTime_=Date.now(),e.abrupt("return",o);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"reset",value:function(){this.prevReportTime_=0,this.prevReport_={},this.prevEncoderImplementation_="",this.prevQualityLimitationReason_="",this.prevDecoderImplementationMap_=new Map}}]),e}(),XO=function(){function e(t){var n=t.signalChannel,i=t.connections,r=t.client;o(this,e),this.client_=r,this.signalChannel_=n,this.connections_=i,this.client_=r,this.log_=Vx.createLogger({id:"q|"+this.client_.getUserId(),userId:this.client_.getUserId(),sdkAppId:this.client_.getSDKAppId()}),this.uplinkConnection_=null,this.uplinkNetworkQuality_=0,this.uplinkRTT_=0,this.uplinkLoss_=0,this.downlinkNetworkQuality_=0,this.downlinkRTT_=0,this.downlinkLoss_=0,this.downlinkPrevStatMap_=new Map,this.downlinkLossAndRTTMap_=new Map,this.interval_=-1,this.emitter_=new FA,this.initialize()}var t,i;return c(e,[{key:"uplinkNetworkQuality",get:function(){return this.uplinkNetworkQuality_},set:function(e){e!==this.uplinkNetworkQuality_&&this.log_.info("uplink network quality change ".concat(this.uplinkNetworkQuality," -> ").concat(e,", rtt: ").concat(this.uplinkRTT_,", loss: ").concat(this.uplinkLoss_)),this.uplinkNetworkQuality_=e}},{key:"downlinkNetworkQuality",get:function(){return this.downlinkNetworkQuality_},set:function(e){if(e!==this.downlinkNetworkQuality_){var t=this.getAverageLossAndRTT(T(this.downlinkLossAndRTTMap_.values())),n=t.rtt,i=t.loss;this.log_.info("downlink network quality change ".concat(this.downlinkNetworkQuality," -> ").concat(e,", rtt: ").concat(n,", loss: ").concat(i))}this.downlinkNetworkQuality_=e}},{key:"initialize",value:function(){var e=this;this.signalChannel_.on(eD.UPLINK_NETWORK_STATS,(function(t){e.handleUplinkNetworkQuality(t)})),this.signalChannel_.on(WP,this.handleSignalConnectionStateChange.bind(this)),this.start()}},{key:"handleUplinkNetworkQuality",value:function(e){if(!this.uplinkConnection_)return this.uplinkNetworkQuality=0,this.uplinkLoss_=0,void(this.uplinkRTT_=0);var t=this.uplinkConnection_.getPeerConnection();if(t&&this.isPeerConnectionDisconnected(t))return this.uplinkNetworkQuality=6,this.uplinkLoss_=0,void(this.uplinkRTT_=0);if(0===e.data.code){var n=e.data.data,i=n.expectAudPkg+n.expectVidPkg,r=n.recvAudPkg+n.recvVidPkg,a=i-r,o=n.delay;if(o&&this.updateDelay(o),0===i&&0===r)return;this.uplinkLoss_=a<=0?0:Math.round(a/i*100),this.uplinkRTT_=n.rtt,this.uplinkNetworkQuality=this.getNetworkQuality(this.uplinkLoss_,this.uplinkRTT_)}}},{key:"handleDownlinkNetworkQuality",value:(i=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l,h,p,f,m,v,_=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.connections_&&0!==this.connections_.size){e.next=3;break}return this.downlinkNetworkQuality=0,e.abrupt("return");case 3:if(t=T(this.connections_.values()),i=t.filter((function(e){return e.getPeerConnection()&&e.getPeerConnection().connectionState===ZT})),t.filter((function(e){return e.getPeerConnection()&&_.isPeerConnectionDisconnected(e.getPeerConnection())})).length!==t.length){e.next=9;break}return this.downlinkNetworkQuality=6,e.abrupt("return");case 9:r=0;case 10:if(!(r<i.length)){e.next=31;break}return a=i[r].getPeerConnection(),e.next=14,this.getStat(a);case 14:if(o=e.sent,s=o.rtt,c=o.totalPacketsLost,u=o.totalPacketsReceived,this.downlinkPrevStatMap_.has(a)){e.next=21;break}return this.downlinkPrevStatMap_.set(a,{totalPacketsLost:c,totalPacketsReceived:u}),e.abrupt("continue",28);case 21:d=0,l=this.downlinkPrevStatMap_.get(a),h=c-l.totalPacketsLost,p=u-l.totalPacketsReceived,d=h<=0||p<0?0:Math.round(h/(h+p)*100),this.downlinkPrevStatMap_.set(a,{totalPacketsLost:c,totalPacketsReceived:u}),this.downlinkLossAndRTTMap_.set(a,{rtt:s,loss:d,userId:i[r].getUserId()});case 28:r++,e.next=10;break;case 31:if(T(this.downlinkPrevStatMap_.keys()).forEach((function(e){_.isPeerConnectionDisconnected(e)&&(_.downlinkPrevStatMap_.delete(e),_.downlinkLossAndRTTMap_.delete(e))})),0!==this.downlinkLossAndRTTMap_.size){e.next=34;break}return e.abrupt("return");case 34:f=this.getAverageLossAndRTT(T(this.downlinkLossAndRTTMap_.values())),m=f.rtt,v=f.loss,this.downlinkRTT_=m,this.downlinkLoss_=v,this.downlinkNetworkQuality=this.getNetworkQuality(v,m);case 38:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getStat",value:(t=a(n().mark((function e(t){var i,r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i={rtt:0,totalPacketsLost:0,totalPacketsReceived:0},t&&SO()){e.next=3;break}return e.abrupt("return",i);case 3:r=t.getReceivers(),e.prev=4,a=0;case 6:if(!(a<r.length)){e.next=15;break}return o=r[a],e.next=10,o.getStats();case 10:e.sent.forEach((function(e){"candidate-pair"===e.type&&gA(e.currentRoundTripTime)&&(i.rtt=Math.round(1e3*e.currentRoundTripTime)),"inbound-rtp"!==e.type||e.mediaType!==Uk&&e.mediaType!==Vk||(i.totalPacketsLost+=e.packetsLost,i.totalPacketsReceived+=e.packetsReceived)}));case 12:a++,e.next=6;break;case 15:return e.abrupt("return",i);case 18:return e.prev=18,e.t0=e.catch(4),e.abrupt("return",i);case 21:case"end":return e.stop()}}),e,null,[[4,18]])}))),function(e){return t.apply(this,arguments)})},{key:"getAverageLossAndRTT",value:function(e){var t={rtt:0,loss:0};return Array.isArray(e)&&e.length>0&&(e.forEach((function(e){t.rtt+=e.rtt,t.loss+=e.loss})),Object.keys(t).forEach((function(n){t[n]=Math.round(t[n]/e.length)}))),t}},{key:"getNetworkQuality",value:function(e,t){return e>50||t>500?5:e>30||t>350?4:e>20||t>200?3:e>10||t>100?2:e>=0||t>=0?1:0}},{key:"handleSignalConnectionStateChange",value:function(e){e.state===KP?(this.uplinkRTT_=0,this.uplinkLoss_=0,this.uplinkNetworkQuality=6):e.state===$P&&6===this.uplinkNetworkQuality&&(this.uplinkNetworkQuality=5)}},{key:"handleUplinkConnectionStateChange",value:function(e){var t=e.state;t===zT?(this.uplinkLoss_=0,this.uplinkRTT_=0,this.uplinkNetworkQuality=6):t===qT&&6===this.uplinkNetworkQuality&&(this.uplinkNetworkQuality=5)}},{key:"isPeerConnectionDisconnected",value:function(e){return!(!e||e.connectionState!==YT&&e.connectionState!==XT&&e.connectionState!==$T)}},{key:"setUplinkConnection",value:function(e){this.uplinkConnection_=e,this.uplinkConnection_?this.uplinkConnection_.on(jO.CONNECTION_STATE_CHANGED,this.handleUplinkConnectionStateChange.bind(this)):(this.uplinkNetworkQuality=0,this.uplinkRTT_=0,this.uplinkLoss_=0)}},{key:"start",value:function(){var e=this;-1===this.interval_?(this.log_.info("start network quality calculating"),this.interval_=iO.run(gE,(function(){e.handleDownlinkNetworkQuality(),jA.emit(Ax,{client:e.client_,uplinkNetworkQuality:e.uplinkNetworkQuality,downlinkNetworkQuality:e.downlinkNetworkQuality,uplinkRTT:e.uplinkRTT_,uplinkLoss:e.uplinkLoss_,downlinkRTT:e.downlinkRTT_,downlinkLoss:e.downlinkLoss_,downlinkLossAndRTTMap:e.downlinkLossAndRTTMap_}),e.emitter_.emit(BO.NETWORK_QUALITY,{uplinkNetworkQuality:e.uplinkNetworkQuality,downlinkNetworkQuality:e.downlinkNetworkQuality,uplinkRTT:e.uplinkRTT_,uplinkLoss:e.uplinkLoss_,downlinkRTT:e.downlinkRTT_,downlinkLoss:e.downlinkLoss_})}),{delay:2e3})):this.log_.info("network quality calculating is already started")}},{key:"stop",value:function(){this.log_.info("stop network quality calculating"),-1!==this.interval_&&(iO.clearTask(this.interval_),this.interval_=-1),this.downlinkLossAndRTTMap_.clear(),this.downlinkPrevStatMap_.clear()}},{key:"on",value:function(e,t){this.emitter_.on(e,t)}},{key:"updateDelay",value:function(e){var t=this;e.forEach((function(e){var n=e.srcTinyId,i=e.videoDelay,r=e.audioDelay,a=t.connections_.get(n);a&&a.setDelay({videoDelay:i,audioDelay:r})}))}}]),e}(),$O=function(){function e(t){o(this,e),this.log_=Vx.createLogger({id:t.client.getUserId(),userId:t.client.getUserId(),sdkAppId:t.client.getSDKAppId()}),this.localStream_=null,this.prevDevices_=[],this.initialize()}var t,i;return c(e,[{key:"initialize",value:function(){navigator.mediaDevices&&(this.onDeviceChange=this.onDeviceChange.bind(this),navigator.mediaDevices.addEventListener("devicechange",this.onDeviceChange))}},{key:"destroy",value:function(){navigator.mediaDevices&&navigator.mediaDevices.removeEventListener("devicechange",this.onDeviceChange)}},{key:"onDeviceChange",value:(i=a(n().mark((function e(){var t,i,r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.localStream_&&this.localStream_.getMediaStream()&&!this.localStream_.getScreen()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,nN();case 4:t=e.sent,i=t.filter((function(e){return a.prevDevices_.findIndex((function(t){var n=t.deviceId;return e.deviceId===n}))<0})),r=this.prevDevices_.filter((function(e){return t.findIndex((function(t){var n=t.deviceId;return e.deviceId===n}))<0})),i.length>0&&this.handleDeviceAdded(this.prevDevices_,i),r.length>0&&this.handleDeviceRemoved(t,r),this.prevDevices_=t;case 10:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"setLocalStream",value:(t=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}return e.next=3,nN();case 3:this.prevDevices_=e.sent;case 4:this.localStream_=t;case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"handleDeviceAdded",value:function(e,t){var n,i;if(this.localStream_){this.log_.warn("devicesAdded: ".concat(JSON.stringify(t))),this.localStream_.updateDeviceIdInUse();var r=t.filter((function(e){return e.kind===tT})),a=t.filter((function(e){return e.kind===eT})),o=e.filter((function(e){return e.kind===tT})),s=e.filter((function(e){return e.kind===eT})),c=r.length>0&&0===o.length&&"live"!==(null===(n=this.localStream_.getVideoTrack())||void 0===n?void 0:n.readyState),u=a.length>0&&0===s.length&&"live"!==(null===(i=this.localStream_.getAudioTrack())||void 0===i?void 0:i.readyState);if(u&&c)return this.log_.info("new microphone and camera detected, but there was no device before."),void this.localStream_.recoverCapture({audio:!0,video:!0,cameraId:r[0].deviceId,microphoneId:a[0].deviceId});c&&(this.log_.info("new camera detected, but there was no camera before."),this.localStream_.recoverCapture({audio:!1,video:!0,cameraId:r[0].deviceId})),u&&(this.log_.info("new microphone detected, but there was no microphone before."),this.localStream_.recoverCapture({audio:!0,video:!1,microphoneId:a[0].deviceId}))}}},{key:"handleDeviceRemoved",value:function(e,t){if(this.localStream_){this.log_.warn("devicesRemoved: ".concat(JSON.stringify(t))),this.localStream_.updateDeviceIdInUse();var n=!1,i=!1,r=this.localStream_.getCameraId(),a=this.localStream_.getMicrophoneId();if(a===hE){var o=this.localStream_.getMicrophoneGroupId(),s=e.filter((function(e){return e.deviceId===hE&&e.kind===eT}))[0];s&&s.groupId!==o&&(i=!0)}if(t.forEach((function(e){var t=e.deviceId;r.length>0&&t===r?n=!0:a.length>0&&t===a&&(i=!0)})),n&&i)return this.log_.warn("current camera and microphone in use is lost, cameraId: ".concat(r,", microphoneId: ").concat(a)),void((this.localStream_.getAudio()||this.localStream_.getVideo())&&this.localStream_.recoverCapture({video:!0,audio:!0}));n&&(this.log_.warn("current camera in use is lost, deviceId: ".concat(r)),this.localStream_.getVideo()&&this.localStream_.recoverCapture({video:!0,audio:!1})),i&&(this.log_.warn("current microphone in use is lost, deviceId: ".concat(a)),this.localStream_.getAudio()&&this.localStream_.recoverCapture({video:!1,audio:!0}))}}}]),e}();function YO(){return YO=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!RO()&&!wO()){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,eN();case 4:return t=e.sent,e.abrupt("return",t.filter((function(e){return e.kind===tT})).map((function(e,t){var n=e.label;e.label||(n="camera_"+t);var i={label:n,deviceId:e.deviceId,kind:e.kind};return e.groupId&&(i.groupId=e.groupId),e.getCapabilities&&(i.getCapabilities=function(){return e.getCapabilities()}),i})));case 6:case"end":return e.stop()}}),e)}))),YO.apply(this,arguments)}var ZO=new Set;function eN(){return tN.apply(this,arguments)}function tN(){return(tN=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!RO()&&!wO()){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,navigator.mediaDevices.enumerateDevices();case 4:return(t=e.sent).forEach((function(e){ZO.add("".concat(e.deviceId,"_").concat(e.kind))})),e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nN(){return iN.apply(this,arguments)}function iN(){return iN=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eN();case 2:return t=e.sent,e.abrupt("return",t.filter((function(e){return e.kind!==eT||e.deviceId!=pE})).map((function(e,t){var n=e.label;e.label||(n=e.kind+"_"+t);var i={label:n,deviceId:e.deviceId,kind:e.kind};return e.groupId&&(i.groupId=e.groupId),e.getCapabilities&&(i.getCapabilities=function(){return e.getCapabilities()}),i})));case 4:case"end":return e.stop()}}),e)}))),iN.apply(this,arguments)}function rN(){return aN.apply(this,arguments)}function aN(){return aN=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eN();case 2:return t=e.sent,e.abrupt("return",t.filter((function(e){return e.kind===eT&&e.deviceId!==pE})).map((function(e,t){var n=e.label;e.label||(n="microphone_"+t);var i={label:n,deviceId:e.deviceId,kind:e.kind};return e.groupId&&(i.groupId=e.groupId),e.getCapabilities&&(i.getCapabilities=function(){return e.getCapabilities()}),i})));case 4:case"end":return e.stop()}}),e)}))),aN.apply(this,arguments)}function oN(){return oN=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eN();case 2:return t=e.sent,e.abrupt("return",t.filter((function(e){return"audiooutput"===e.kind})).map((function(e,t){var n=e.label;e.label||(n="speaker_"+t);var i={label:n,deviceId:e.deviceId,kind:e.kind};return e.groupId&&(i.groupId=e.groupId),i})));case 4:case"end":return e.stop()}}),e)}))),oN.apply(this,arguments)}function sN(e){var t;if(e instanceof CanvasCaptureMediaStreamTrack)return!1;if(!(e instanceof MediaStreamTrack))return!1;var n=e.label.toLocaleLowerCase();if(n.includes("camera")||n.includes("webcam"))return!0;var i="".concat(null===(t=e.getSettings())||void 0===t?void 0:t.deviceId,"_").concat(tT);return!!ZO.has(i)}function cN(e,t){return uN.apply(this,arguments)}function uN(){return(uN=a(n().mark((function e(t,i){var r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,rN();case 2:if(r=e.sent,(null==(a=r.find((function(e){return e.deviceId===hE})))?void 0:a.groupId)!==t||a.label!==i){e.next=6;break}return e.abrupt("return",!0);case 6:return e.abrupt("return",!1);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var dN,lN=Rn.exports,hN=sn,pN=hn,fN=du,mN=Gc,vN=V,_N=ft,gN=function(e,t,n,i){try{return i?t(pN(n)[0],n[1]):t(n)}catch(IQ){fN(e,"throw",IQ)}},yN=qc,SN=Ll,bN=Fi,kN=ac,TN=ou,IN=Zc,EN=Array,wN=function(e){var t=_N(e),n=SN(this),i=arguments.length,r=i>1?arguments[1]:void 0,a=void 0!==r;a&&(r=mN(r,i>2?arguments[2]:void 0));var o,s,c,u,d,l,h=IN(t),p=0;if(!h||this===EN&&yN(h))for(o=bN(t),s=n?new this(o):EN(o);o>p;p++)l=a?r(t[p],p):t[p],kN(s,p,l);else for(d=(u=TN(t,h)).next,s=n?new this:[];!(c=vN(d,u)).done;p++)l=a?gN(u,r,[c.value,p],!0):c.value,kN(s,p,l);return s.length=p,s},RN=ie,CN=2147483647,AN=/[^\0-\u007E]/,xN=/[.\u3002\uFF0E\uFF61]/g,PN="Overflow: input needs wider integers to process",DN=RangeError,MN=RN(xN.exec),ON=Math.floor,NN=String.fromCharCode,LN=RN("".charCodeAt),UN=RN([].join),VN=RN([].push),FN=RN("".replace),jN=RN("".split),BN=RN("".toLowerCase),HN=function(e){return e+22+75*(e<26)},GN=function(e,t,n){var i=0;for(e=n?ON(e/700):e>>1,e+=ON(e/t);e>455;)e=ON(e/35),i+=36;return ON(i+36*e/(e+38))},zN=function(e){var t=[];e=function(e){for(var t=[],n=0,i=e.length;n<i;){var r=LN(e,n++);if(r>=55296&&r<=56319&&n<i){var a=LN(e,n++);56320==(64512&a)?VN(t,((1023&r)<<10)+(1023&a)+65536):(VN(t,r),n--)}else VN(t,r)}return t}(e);var n,i,r=e.length,a=128,o=0,s=72;for(n=0;n<e.length;n++)(i=e[n])<128&&VN(t,NN(i));var c=t.length,u=c;for(c&&VN(t,"-");u<r;){var d=CN;for(n=0;n<e.length;n++)(i=e[n])>=a&&i<d&&(d=i);var l=u+1;if(d-a>ON((CN-o)/l))throw DN(PN);for(o+=(d-a)*l,a=d,n=0;n<e.length;n++){if((i=e[n])<a&&++o>CN)throw DN(PN);if(i==a){for(var h=o,p=36;;){var f=p<=s?1:p>=s+26?26:p-s;if(h<f)break;var m=h-f,v=36-f;VN(t,NN(HN(f+m%v))),h=ON(m/v),p+=36}VN(t,NN(HN(h))),s=GN(o,l,u==c),o=0,u++}}o++,a++}return UN(t,"")},WN=Rr,JN=O,qN=wm,KN=P,QN=Gc,XN=ie,$N=Ei,YN=function(e,t,n){return n.get&&lN(n.get,t,{getter:!0}),n.set&&lN(n.set,t,{setter:!0}),hN.f(e,t,n)},ZN=Ru,eL=_t,tL=fP,nL=wN,iL=lc,rL=Dd.codeAt,aL=function(e){var t,n,i=[],r=jN(FN(BN(e),xN,"."),".");for(t=0;t<r.length;t++)n=r[t],VN(i,MN(AN,n)?"xn--"+zN(n):n);return UN(i,".")},oL=Td,sL=Ko,cL=ul,uL=Jv,dL=ci,lL=dL.set,hL=dL.getterFor("URL"),pL=uL.URLSearchParams,fL=uL.getState,mL=KN.URL,vL=KN.TypeError,_L=KN.parseInt,gL=Math.floor,yL=Math.pow,SL=XN("".charAt),bL=XN(/./.exec),kL=XN([].join),TL=XN(1..toString),IL=XN([].pop),EL=XN([].push),wL=XN("".replace),RL=XN([].shift),CL=XN("".split),AL=XN("".slice),xL=XN("".toLowerCase),PL=XN([].unshift),DL="Invalid scheme",ML="Invalid host",OL="Invalid port",NL=/[a-z]/i,LL=/[\d+-.a-z]/i,UL=/\d/,VL=/^0x/i,FL=/^[0-7]+$/,jL=/^\d+$/,BL=/^[\da-f]+$/i,HL=/[\0\t\n\r #%/:<>?@[\\\]^|]/,GL=/[\0\t\n\r #/:<>?@[\\\]^|]/,zL=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,WL=/[\t\n\r]/g,JL=function(e){var t,n,i,r;if("number"==typeof e){for(t=[],n=0;n<4;n++)PL(t,e%256),e=gL(e/256);return kL(t,".")}if("object"==typeof e){for(t="",i=function(e){for(var t=null,n=1,i=null,r=0,a=0;a<8;a++)0!==e[a]?(r>n&&(t=i,n=r),i=null,r=0):(null===i&&(i=a),++r);return r>n&&(t=i,n=r),t}(e),n=0;n<8;n++)r&&0===e[n]||(r&&(r=!1),i===n?(t+=n?":":"::",r=!0):(t+=TL(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},qL={},KL=tL({},qL,{" ":1,'"':1,"<":1,">":1,"`":1}),QL=tL({},KL,{"#":1,"?":1,"{":1,"}":1}),XL=tL({},QL,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),$L=function(e,t){var n=rL(e,0);return n>32&&n<127&&!eL(t,e)?e:encodeURIComponent(e)},YL={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ZL=function(e,t){var n;return 2==e.length&&bL(NL,SL(e,0))&&(":"==(n=SL(e,1))||!t&&"|"==n)},eU=function(e){var t;return e.length>1&&ZL(AL(e,0,2))&&(2==e.length||"/"===(t=SL(e,2))||"\\"===t||"?"===t||"#"===t)},tU=function(e){return"."===e||"%2e"===xL(e)},nU={},iU={},rU={},aU={},oU={},sU={},cU={},uU={},dU={},lU={},hU={},pU={},fU={},mU={},vU={},_U={},gU={},yU={},SU={},bU={},kU={},TU=function(e,t,n){var i,r,a,o=oL(e);if(t){if(r=this.parse(o))throw vL(r);this.searchParams=null}else{if(void 0!==n&&(i=new TU(n,!0)),r=this.parse(o,null,i))throw vL(r);(a=fL(new pL)).bindURL(this),this.searchParams=a}};TU.prototype={type:"URL",parse:function(e,t,n){var i,r,a,o,s,c=this,u=t||nU,d=0,l="",h=!1,p=!1,f=!1;for(e=oL(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=wL(e,zL,"")),e=wL(e,WL,""),i=nL(e);d<=i.length;){switch(r=i[d],u){case nU:if(!r||!bL(NL,r)){if(t)return DL;u=rU;continue}l+=xL(r),u=iU;break;case iU:if(r&&(bL(LL,r)||"+"==r||"-"==r||"."==r))l+=xL(r);else{if(":"!=r){if(t)return DL;l="",u=rU,d=0;continue}if(t&&(c.isSpecial()!=eL(YL,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&YL[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?u=mU:c.isSpecial()&&n&&n.scheme==c.scheme?u=aU:c.isSpecial()?u=uU:"/"==i[d+1]?(u=oU,d++):(c.cannotBeABaseURL=!0,EL(c.path,""),u=SU)}break;case rU:if(!n||n.cannotBeABaseURL&&"#"!=r)return DL;if(n.cannotBeABaseURL&&"#"==r){c.scheme=n.scheme,c.path=iL(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=kU;break}u="file"==n.scheme?mU:sU;continue;case aU:if("/"!=r||"/"!=i[d+1]){u=sU;continue}u=dU,d++;break;case oU:if("/"==r){u=lU;break}u=yU;continue;case sU:if(c.scheme=n.scheme,r==dN)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=iL(n.path),c.query=n.query;else if("/"==r||"\\"==r&&c.isSpecial())u=cU;else if("?"==r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=iL(n.path),c.query="",u=bU;else{if("#"!=r){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=iL(n.path),c.path.length--,u=yU;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=iL(n.path),c.query=n.query,c.fragment="",u=kU}break;case cU:if(!c.isSpecial()||"/"!=r&&"\\"!=r){if("/"!=r){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=yU;continue}u=lU}else u=dU;break;case uU:if(u=dU,"/"!=r||"/"!=SL(l,d+1))continue;d++;break;case dU:if("/"!=r&&"\\"!=r){u=lU;continue}break;case lU:if("@"==r){h&&(l="%40"+l),h=!0,a=nL(l);for(var m=0;m<a.length;m++){var v=a[m];if(":"!=v||f){var _=$L(v,XL);f?c.password+=_:c.username+=_}else f=!0}l=""}else if(r==dN||"/"==r||"?"==r||"#"==r||"\\"==r&&c.isSpecial()){if(h&&""==l)return"Invalid authority";d-=nL(l).length+1,l="",u=hU}else l+=r;break;case hU:case pU:if(t&&"file"==c.scheme){u=_U;continue}if(":"!=r||p){if(r==dN||"/"==r||"?"==r||"#"==r||"\\"==r&&c.isSpecial()){if(c.isSpecial()&&""==l)return ML;if(t&&""==l&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(l))return o;if(l="",u=gU,t)return;continue}"["==r?p=!0:"]"==r&&(p=!1),l+=r}else{if(""==l)return ML;if(o=c.parseHost(l))return o;if(l="",u=fU,t==pU)return}break;case fU:if(!bL(UL,r)){if(r==dN||"/"==r||"?"==r||"#"==r||"\\"==r&&c.isSpecial()||t){if(""!=l){var g=_L(l,10);if(g>65535)return OL;c.port=c.isSpecial()&&g===YL[c.scheme]?null:g,l=""}if(t)return;u=gU;continue}return OL}l+=r;break;case mU:if(c.scheme="file","/"==r||"\\"==r)u=vU;else{if(!n||"file"!=n.scheme){u=yU;continue}if(r==dN)c.host=n.host,c.path=iL(n.path),c.query=n.query;else if("?"==r)c.host=n.host,c.path=iL(n.path),c.query="",u=bU;else{if("#"!=r){eU(kL(iL(i,d),""))||(c.host=n.host,c.path=iL(n.path),c.shortenPath()),u=yU;continue}c.host=n.host,c.path=iL(n.path),c.query=n.query,c.fragment="",u=kU}}break;case vU:if("/"==r||"\\"==r){u=_U;break}n&&"file"==n.scheme&&!eU(kL(iL(i,d),""))&&(ZL(n.path[0],!0)?EL(c.path,n.path[0]):c.host=n.host),u=yU;continue;case _U:if(r==dN||"/"==r||"\\"==r||"?"==r||"#"==r){if(!t&&ZL(l))u=yU;else if(""==l){if(c.host="",t)return;u=gU}else{if(o=c.parseHost(l))return o;if("localhost"==c.host&&(c.host=""),t)return;l="",u=gU}continue}l+=r;break;case gU:if(c.isSpecial()){if(u=yU,"/"!=r&&"\\"!=r)continue}else if(t||"?"!=r)if(t||"#"!=r){if(r!=dN&&(u=yU,"/"!=r))continue}else c.fragment="",u=kU;else c.query="",u=bU;break;case yU:if(r==dN||"/"==r||"\\"==r&&c.isSpecial()||!t&&("?"==r||"#"==r)){if(".."===(s=xL(s=l))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==r||"\\"==r&&c.isSpecial()||EL(c.path,"")):tU(l)?"/"==r||"\\"==r&&c.isSpecial()||EL(c.path,""):("file"==c.scheme&&!c.path.length&&ZL(l)&&(c.host&&(c.host=""),l=SL(l,0)+":"),EL(c.path,l)),l="","file"==c.scheme&&(r==dN||"?"==r||"#"==r))for(;c.path.length>1&&""===c.path[0];)RL(c.path);"?"==r?(c.query="",u=bU):"#"==r&&(c.fragment="",u=kU)}else l+=$L(r,QL);break;case SU:"?"==r?(c.query="",u=bU):"#"==r?(c.fragment="",u=kU):r!=dN&&(c.path[0]+=$L(r,qL));break;case bU:t||"#"!=r?r!=dN&&("'"==r&&c.isSpecial()?c.query+="%27":c.query+="#"==r?"%23":$L(r,qL)):(c.fragment="",u=kU);break;case kU:r!=dN&&(c.fragment+=$L(r,KL))}d++}},parseHost:function(e){var t,n,i;if("["==SL(e,0)){if("]"!=SL(e,e.length-1))return ML;if(t=function(e){var t,n,i,r,a,o,s,c=[0,0,0,0,0,0,0,0],u=0,d=null,l=0,h=function(){return SL(e,l)};if(":"==h()){if(":"!=SL(e,1))return;l+=2,d=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&bL(BL,h());)t=16*t+_L(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(i=0;h();){if(r=null,i>0){if(!("."==h()&&i<4))return;l++}if(!bL(UL,h()))return;for(;bL(UL,h());){if(a=_L(h(),10),null===r)r=a;else{if(0==r)return;r=10*r+a}if(r>255)return;l++}c[u]=256*c[u]+r,2!=++i&&4!=i||u++}if(4!=i)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[u++]=t}else{if(null!==d)return;l++,d=++u}}if(null!==d)for(o=u-d,u=7;0!=u&&o>0;)s=c[u],c[u--]=c[d+o-1],c[d+--o]=s;else if(8!=u)return;return c}(AL(e,1,-1)),!t)return ML;this.host=t}else if(this.isSpecial()){if(e=aL(e),bL(HL,e))return ML;if(t=function(e){var t,n,i,r,a,o,s,c=CL(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],i=0;i<t;i++){if(""==(r=c[i]))return e;if(a=10,r.length>1&&"0"==SL(r,0)&&(a=bL(VL,r)?16:8,r=AL(r,8==a?1:2)),""===r)o=0;else{if(!bL(10==a?jL:8==a?FL:BL,r))return e;o=_L(r,a)}EL(n,o)}for(i=0;i<t;i++)if(o=n[i],i==t-1){if(o>=yL(256,5-t))return null}else if(o>255)return null;for(s=IL(n),i=0;i<n.length;i++)s+=n[i]*yL(256,3-i);return s}(e),null===t)return ML;this.host=t}else{if(bL(GL,e))return ML;for(t="",n=nL(e),i=0;i<n.length;i++)t+=$L(n[i],qL);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return eL(YL,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&ZL(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,i=e.password,r=e.host,a=e.port,o=e.path,s=e.query,c=e.fragment,u=t+":";return null!==r?(u+="//",e.includesCredentials()&&(u+=n+(i?":"+i:"")+"@"),u+=JL(r),null!==a&&(u+=":"+a)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?o[0]:o.length?"/"+kL(o,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw vL(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new IU(e.path[0]).origin}catch(IQ){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+JL(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(oL(e)+":",nU)},getUsername:function(){return this.username},setUsername:function(e){var t=nL(oL(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=$L(t[n],XL)}},getPassword:function(){return this.password},setPassword:function(e){var t=nL(oL(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=$L(t[n],XL)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?JL(e):JL(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,hU)},getHostname:function(){var e=this.host;return null===e?"":JL(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,pU)},getPort:function(){var e=this.port;return null===e?"":oL(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=oL(e))?this.port=null:this.parse(e,fU))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+kL(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,gU))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=oL(e))?this.query=null:("?"==SL(e,0)&&(e=AL(e,1)),this.query="",this.parse(e,bU)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=oL(e))?("#"==SL(e,0)&&(e=AL(e,1)),this.fragment="",this.parse(e,kU)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var IU=function(e){var t=ZN(this,EU),n=cL(arguments.length,1)>1?arguments[1]:void 0,i=lL(t,new TU(e,!1,n));JN||(t.href=i.serialize(),t.origin=i.getOrigin(),t.protocol=i.getProtocol(),t.username=i.getUsername(),t.password=i.getPassword(),t.host=i.getHost(),t.hostname=i.getHostname(),t.port=i.getPort(),t.pathname=i.getPathname(),t.search=i.getSearch(),t.searchParams=i.getSearchParams(),t.hash=i.getHash())},EU=IU.prototype,wU=function(e,t){return{get:function(){return hL(this)[e]()},set:t&&function(e){return hL(this)[t](e)},configurable:!0,enumerable:!0}};if(JN&&(YN(EU,"href",wU("serialize","setHref")),YN(EU,"origin",wU("getOrigin")),YN(EU,"protocol",wU("getProtocol","setProtocol")),YN(EU,"username",wU("getUsername","setUsername")),YN(EU,"password",wU("getPassword","setPassword")),YN(EU,"host",wU("getHost","setHost")),YN(EU,"hostname",wU("getHostname","setHostname")),YN(EU,"port",wU("getPort","setPort")),YN(EU,"pathname",wU("getPathname","setPathname")),YN(EU,"search",wU("getSearch","setSearch")),YN(EU,"searchParams",wU("getSearchParams")),YN(EU,"hash",wU("getHash","setHash"))),$N(EU,"toJSON",(function(){return hL(this).serialize()}),{enumerable:!0}),$N(EU,"toString",(function(){return hL(this).serialize()}),{enumerable:!0}),mL){var RU=mL.createObjectURL,CU=mL.revokeObjectURL;RU&&$N(IU,"createObjectURL",QN(RU,mL)),CU&&$N(IU,"revokeObjectURL",QN(CU,mL))}sL(IU,"URL"),WN({global:!0,constructor:!0,forced:!qN,sham:!JN},{URL:IU});var AU,xU,PU=new Blob(["class VolumeMeter extends AudioWorkletProcessor{constructor(){super();this.volume=0;this.intervalTime=200;this.tick=this.intervalTime;this.isStop=false;this.port.onmessage=event=>{const{data}=event;switch(data.name){case'setIntervalTime':this.intervalTime=data.intervalTime;break;case'stop':this.isStop=true;break}}}process(inputs){const input=inputs[0];if(this.isStop){return false}if(input.length>0){const firstChannel=input[0];let sum=0;let rms;for(let i=0;i<firstChannel.length;++i){sum+=firstChannel[i]*firstChannel[i]}rms=Math.sqrt(sum/firstChannel.length);this.volume=Math.max(rms,this.volume*0.95);this.tick-=firstChannel.length;if(this.tick<0){this.tick+=(this.intervalTime/1000)*sampleRate;this.port.postMessage({volume:this.volume})}}return true}}registerProcessor('volume-meter',VolumeMeter);"],{type:"application/javascript"}),DU=!1,MU=function(){function e(t){o(this,e),this.context_=t.context,this.addModuleToContext()}var t;return c(e,[{key:"addModuleToContext",value:(t=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.context_.audioWorklet.addModule(URL.createObjectURL(PU));case 3:Vx.info("worklet addModule success"),jA.emit(Px),DU=!0,e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),Vx.info("worklet addModule catch error. ".concat(e.t0.message)),jA.emit(Dx);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(){return t.apply(this,arguments)})},{key:"initWorkletSuccess",get:function(){return DU}}]),e}(),OU=0,NU=function(){function e(t){o(this,e);var n=t.track,i=t.log,r=t.stream;this.volume_=0,this.log_=i,this.track_=n,this.stream_=r,AU||(AU=PA()),this.audioCtx_=AU,this.destination_=this.audioCtx_.destination;var a=new MediaStream;a.addTrack(this.track_),this.streamSource_=this.audioCtx_.createMediaStreamSource(a),this.audioWorkletNode_=null,this.scriptProcessorNode_=null,this.interval_=200,jA.on(xx,this.resume,this),jA.on(ix,this.handleAudioLevelInterval,this),MA?(jA.on(Px,this.initAudioWorklet,this),jA.on(Dx,this.initScriptProcessor,this),this.preload()):this.initScriptProcessor(),OU+=1}return c(e,[{key:"preload",value:function(){xU?xU.initWorkletSuccess&&this.initAudioWorklet():xU=new MU({context:AU})}},{key:"initAudioWorklet",value:function(){var e=this;if(!this.audioWorkletNode_)try{this.audioWorkletNode_=new AudioWorkletNode(this.audioCtx_,"volume-meter"),this.audioWorkletNode_.port.onmessage=function(t){e.volume_=t.data.volume||0},this.streamSource_.connect(this.audioWorkletNode_).connect(this.destination_),this.handleAudioLevelInterval({interval:this.interval_})}catch(IQ){this.log_.warn("load volume meter failed, load again."),this.initScriptProcessor()}}},{key:"initScriptProcessor",value:function(){var e=this;if(!this.scriptProcessorNode_)try{this.scriptProcessorNode_=this.audioCtx_.createScriptProcessor(2048,1,1),this.scriptProcessorNode_.onaudioprocess=function(t){for(var n=t.inputBuffer.getChannelData(0),i=0,r=0;r<n.length;++r)i+=n[r]*n[r];e.volume_=Math.sqrt(i/n.length)||0},this.streamSource_.connect(this.scriptProcessorNode_),this.scriptProcessorNode_.connect(this.destination_)}catch(IQ){this.log_.error("volumeMeter init script processor error: "+IQ)}}},{key:"destroy",value:function(){var e;(this.streamSource_&&this.streamSource_.disconnect(),this.scriptProcessorNode_&&(this.scriptProcessorNode_.onaudioprocess=null,this.scriptProcessorNode_.disconnect()),this.audioWorkletNode_&&(this.audioWorkletNode_.port.postMessage({name:"stop"}),this.audioWorkletNode_.port.onmessage=null,this.audioWorkletNode_.disconnect()),this.audioWorkletNode_=null,this.scriptProcessorNode_=null,this.audioCtx_=null,jA.off(xx,this.resume,this),jA.off(ix,this.handleAudioLevelInterval,this),jA.off(Px,this.initAudioWorklet,this),jA.off(Dx,this.initScriptProcessor,this),OU>0&&(OU-=1),0===OU)&&(null===(e=AU)||void 0===e||e.close(),AU=null,xU=null)}},{key:"resume",value:function(){var e;null===(e=AU)||void 0===e||e.resume()}},{key:"getInternalAudioLevel",value:function(){return this.volume_}},{key:"getCalculatedVolume",value:function(){return this.volume_.toFixed(2)}},{key:"handleAudioLevelInterval",value:function(e){var t,n=e.interval;this.interval_=n,null===(t=this.audioWorkletNode_)||void 0===t||t.port.postMessage({name:"setIntervalTime",intervalTime:n})}}]),e}(),LU=function(){function e(t){o(this,e),this.stream_=t.stream,this.userId_=t.stream.getUserId(),this.log_=this.stream_.getLogger(),this.track_=t.track,t.gainedTrack&&(this.gainedTrack_=t.gainedTrack),this.div_=t.div,this.muted_=t.muted,this.outputDeviceId_=t.outputDeviceId,this.volume_=t.volume,this.pausedRetryCount_=5,this.emitter_=new FA,this.initializeElement(),this.state_="NONE",this.volumeMeter_=new NU({stream:this.stream_,track:this.gainedTrack_||this.track_,log:this.log_})}var t,i,r,s;return c(e,[{key:"isPlaying",get:function(){return this.state_===lT}},{key:"initializeElement",value:function(){if(this.isAudioElementInit()){var e=new MediaStream;e.addTrack(this.gainedTrack_||this.track_);var t=document.createElement(Uk);t.srcObject=e,t.muted=this.muted_,t.setAttribute("id","audio_".concat(this.stream_.getId())),t.setAttribute("autoplay","autoplay"),t.setAttribute("playsinline","playsinline"),this.div_.appendChild(t),this.element_=t}this.handleEvents()}},{key:"setMuted",value:function(e){this.element_&&(this.element_.muted=e,this.muted_=e)}},{key:"play",value:(s=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.outputDeviceId_||!this.element_){e.next=3;break}return e.next=3,this.element_.setSinkId(this.outputDeviceId_);case 3:if(this.setVolume(this.volume_),e.prev=4,!this.element_){e.next=8;break}return e.next=8,this.element_.play();case 8:e.next=16;break;case 10:if(e.prev=10,e.t0=e.catch(4),t=sA({key:aR,data:{media:"Audio",error:e.t0}}),this.log_.warn(t),!t.includes("NotAllowedError")){e.next=16;break}throw new kD({code:bD.PLAY_NOT_ALLOWED,message:t});case 16:case"end":return e.stop()}}),e,this,[[4,10]])}))),function(){return s.apply(this,arguments)})},{key:"handleEvents",value:function(){this.handleElementEvent=this.handleElementEvent.bind(this),this.handleTrackEvent=this.handleTrackEvent.bind(this),this.element_&&(this.element_.addEventListener(Xk,this.handleElementEvent),this.element_.addEventListener(Qk,this.handleElementEvent),this.element_.addEventListener($k,this.handleElementEvent),this.element_.addEventListener(Yk,this.handleElementEvent)),this.track_.addEventListener(Qk,this.handleTrackEvent),this.track_.addEventListener(qk,this.handleTrackEvent),this.track_.addEventListener(Kk,this.handleTrackEvent),this.track_.readyState===Qk&&this.handleTrackEvent({type:Qk}),this.track_.muted&&this.handleTrackEvent({type:qk})}},{key:"handleElementEvent",value:(r=a(n().mark((function e(t){var i,r,a,o,s,c,u,d=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=t.type,e.t0=i,e.next=e.t0===Xk?4:e.t0===Qk?9:e.t0===$k?12:e.t0===Yk?21:32;break;case 4:return this.log_.info("audio player is playing"),this.state_=lT,jA.emit(sx,{stream:this.stream_}),this.emitter_.emit(qO,{state:this.state_,reason:Xk}),e.abrupt("break",32);case 9:return this.log_.info("audio player is ended"),this.state_!==pT&&(this.state_=pT,this.emitter_.emit(qO,{state:this.state_,reason:Qk})),e.abrupt("break",32);case 12:return this.log_.info("audio player is paused"),this.state_=hT,this.emitter_.emit(qO,{state:this.state_,reason:$k}),(r=this.div_&&document.getElementById(this.div_.id))||this.log_.warn("audio player has been remove, element ID: ".concat(this.div_.id)),a=GC(),this.pausedRetryCount_>0&&(gA(a)&&a<=70||!r)&&(this.resume(),this.pausedRetryCount_--),ZR&&(this.interval_=iO.run((function(){d.element_&&d.state_===hT&&d.resume()}),{delay:3e3})),e.abrupt("break",32);case 21:if(!this.element_||!this.element_.error){e.next=31;break}return o="".concat(DO(),"/").concat(rA().name,"/").concat(rA().version),e.next=25,TQ.getSpeakers();case 25:s=e.sent,c=s[0].label,(u=s.find((function(e){return e.deviceId===d.outputDeviceId_})))&&(c=u.label),this.log_.error("audio player error observed. code: ".concat(this.element_.error.code," message: ").concat(this.element_.error.message," deviceInfo: ").concat(o," speaker: ").concat(c)),lM.uploadEvent("stat-".concat(this.stream_.getType(),"-audio-").concat(wI,"-").concat(this.element_.error.code,"-").concat(o,"-").concat(c),this.element_.error);case 31:return e.abrupt("break",32);case 32:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"handleTrackEvent",value:function(e){var t=e.type;switch(t){case Qk:this.log_.info("audio track is ended"),this.state_!==pT&&(this.state_=pT,this.emitter_.emit(qO,{state:this.state_,reason:Qk})),jA.emit(wx,{stream:this.stream_,type:t});break;case qk:this.log_.info("audio track is unable to provide media output"),this.stream_.isRemote()||xA(),this.state_!==hT&&(this.state_=hT,this.emitter_.emit(qO,{state:this.state_,reason:qk})),jA.emit(Ex,{stream:this.stream_,type:t});break;case Kk:this.log_.info("audio track is able to provide media output"),this.state_===hT&&(this.state_=lT,this.emitter_.emit(qO,{state:this.state_,reason:Kk}))}}},{key:"unbindEvents",value:function(){this.element_&&(this.element_.removeEventListener(Xk,this.handleElementEvent),this.element_.removeEventListener(Qk,this.handleElementEvent),this.element_.removeEventListener($k,this.handleElementEvent),this.element_.removeEventListener(Yk,this.handleElementEvent)),this.track_&&(this.track_.removeEventListener(Qk,this.handleTrackEvent),this.track_.removeEventListener(qk,this.handleTrackEvent),this.track_.removeEventListener(Kk,this.handleTrackEvent))}},{key:"setSinkId",value:(i=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.outputDeviceId_===t){e.next=5;break}if(!this.element_){e.next=4;break}return e.next=4,this.element_.setSinkId(t);case 4:this.outputDeviceId_=t;case 5:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"setVolume",value:function(e){this.element_&&(this.log_.info("audioElement setVolume to : ".concat(e)),this.element_.volume=e)}},{key:"getAudioLevel",value:function(){return this.volumeMeter_.getCalculatedVolume()}},{key:"getInternalAudioLevel",value:function(){return this.volumeMeter_.getInternalAudioLevel()}},{key:"stop",value:function(){this.unbindEvents(),this.element_&&(this.div_.removeChild(this.element_),this.element_.srcObject=null,this.element_=null),this.volumeMeter_&&(this.volumeMeter_.destroy(),this.volumeMeter_=null),this.interval_>0&&iO.clearTask(this.interval_)}},{key:"resume",value:(t=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.volumeMeter_&&this.volumeMeter_.resume(),!this.element_){e.next=5;break}return e.next=5,this.element_.play();case 5:e.next=13;break;case 7:if(e.prev=7,e.t0=e.catch(0),t=sA({key:aR,data:{media:"Audio",error:e.t0}}),this.log_.warn(t),!t.includes("NotAllowedError")){e.next=13;break}throw new kD({code:bD.PLAY_NOT_ALLOWED,message:t});case 13:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return t.apply(this,arguments)})},{key:"on",value:function(e,t){this.emitter_.on(e,t)}},{key:"isAudioElementInit",value:function(){return!("15.2"===$C||"15.3"===$C||"15.4"===$C)||"local"!==this.stream_.getType()||!this.muted_||(this.log_.info("audioElement is muted."),!1)}}]),e}(),UU=Mn.PROPER,VU=M,FU=ag,jU=pg.trim;Rr({target:"String",proto:!0,forced:function(e){return VU((function(){return!!FU[e]()||"鈥嬄呩爭"!=="鈥嬄呩爭"[e]()||UU&&FU[e].name!==e}))}("trim")},{trim:function(){return jU(this)}});var BU="trtc_autoplay",HU="".concat(BU,"_mask"),GU="".concat(BU,"_wrapper"),zU="".concat(BU,"_header"),WU="".concat(BU,"_content"),JU="".concat(BU,"_action_wrapper"),qU="".concat(BU,"_question"),KU="".concat(BU,"_collapse"),QU="".concat(BU,"_action_confirm"),XU="".concat(BU,"_detail"),$U="#2473E8",YU="dialog",ZU="".concat(YU,"-show"),eV="".concat(YU,"-1"),tV="".concat(YU,"-2"),nV=!1,iV=function(){return!!document.querySelector(".".concat(GU))},rV="".concat(uE,"/").concat(AA()?"zh-cn":"en","/tutorial-21-advanced-auto-play-policy.html"),aV="<br><a href='".concat(rV,"' target='_blank'>").concat(AA()?"鍏朵粬鏂规锛�":"Any other solution?","</a>"),oV="".concat(AA()?"娴忚鍣ㄨ嚜鍔ㄦ挱鏀剧瓥鐣ワ細鍦ㄧ敤鎴蜂笌椤甸潰浜х敓浜や簰锛堢偣鍑汇€佽Е鎽革級涔嬪墠锛屾祻瑙堝櫒绂佹鎾斁鏈夊0濯掍綋銆傝寮圭獥鐢ㄤ簬甯姪鐢ㄦ埛鎭㈠闊宠棰戞挱鏀俱€�".concat(aV):"Autoplay Policy: Before user interacts with the web page (clicking, touching), page will not be allowed to play media with sound. This Dialog is used to help users resume playback. ".concat(aV)),sV=function(){function e(){if(o(this,e),this.dialogNode_=null,this.bodyPosition_="",this.content="闊宠棰戞挱鏀捐娴忚鍣ㄦ嫤鎴紝璇风偣鍑烩€滄仮澶嶆挱鏀锯€濄€�",AA()||(this.content='Media playback failed. Click the "Resume" to resume playback.'),!nV){var t=document.createElement("style");t.innerHTML=".".concat(HU,"{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,0.5);z-index:1500;}.").concat(HU," div:not(.").concat(JU,"){display:block !important;}.").concat(GU,"{padding:14px;background:#fff;border-radius:3px;box-shadow:0px 3px 15px #434343;border:1px solid #d1cfcf;max-width:500px;}.").concat(GU," a{color:").concat($U,";}.").concat(zU,"{overflow:hidden;text-overflow:ellipsis;font-size:16px;font-weight:600;}.").concat(WU,"{margin:8px 0;}.").concat(JU,"{width:100%;display:flex !important;align-items:center;justify-content:right;float:right;}.").concat(KU,"{margin-right:auto;cursor:pointer}.").concat(qU,"{height:100%;line-height:16px;cursor:pointer;}.").concat(QU,"{margin-left:8px;color:#fff;background:").concat($U,";padding:4px 12px;outline:none;border:1px solid;border-radius:3px;font-weight:bold;}.").concat(QU,":hover{opacity:0.9;}.").concat(KU,",.").concat(QU,",.").concat(WU,",.").concat(qU,"{font-size:14px;}@media screen and (max-width:750px){.").concat(GU,"{width:80vw;}}"),document.head.appendChild(t),nV=!0}this.showDetail_=!1,this.isCollapseClicked_=!1,this.isQuestionClicked_=!1,this.addDiaLog()}return c(e,[{key:"createDiaLog",value:function(){var e=document.createElement("template");e.innerHTML='<div class="'.concat(HU,"\"><div class='").concat(GU,"'><div class='").concat(zU,"'>").concat(location.host,"</div><div class='").concat(WU,"'>").concat(this.content,"</div><div class='").concat(XU,'\' style="visibility:hidden;width:100%;height:0;font-size:12px;color:gray;">').concat(oV,"</div><div class='").concat(JU,"'></div></div></div>").trim();var t=document.createElement("button");t.className=QU,t.innerText=AA()?"鎭㈠鎾斁":"Resume",t.onclick=this.onConfirm.bind(this);var n=document.createElement("div");n.className=qU,n.innerHTML='<?xml version="1.0" encoding="UTF-8"?>\n    <svg class="icon" width="18" height="18" p-id="2030" t="1639646523624" version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">\n    <path d="m464 784.35c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z" p-id="2031"/>\n    <path d="m512 960c-247.04 0-448-200.96-448-448s200.96-448 448-448 448 200.96 448 448-200.96 448-448 448zm0-831.71c-211.58 0-383.71 172.13-383.71 383.71 0 211.55 172.13 383.71 383.71 383.71 211.55 0 383.71-172.16 383.71-383.71 0-211.58-172.16-383.71-383.71-383.71z" p-id="2032"/>\n    <path d="m512 673.7c-17.665 0-32.001-14.336-32.001-31.999v-54.112c0-52.353 40-92.352 75.328-127.65 25.887-25.92 52.672-52.672 52.672-74.017 0-53.343-43.072-96.735-95.999-96.735-53.823 0-95.999 41.536-95.999 94.559 0 17.665-14.336 31.999-32.001 31.999s-32.001-14.336-32.001-31.999c0-87.424 71.775-158.56 160-158.56s160 72.095 160 160.74c0 47.904-36.32 84.192-71.424 119.3-27.84 27.776-56.576 56.512-56.576 82.336v54.112c0 17.665-14.336 32.032-32.001 32.032z" p-id="2033"/>\n    </svg>\n    ',n.onclick=this.onQuestionClick.bind(this);var i=document.createElement("div");i.className=KU,i.innerText="".concat(AA()?"璇︽儏 >":"Detail >"),i.onclick=this.onCollapseClick.bind(this);var r=e.content.firstChild,a=r.querySelector(".".concat(JU));return a.appendChild(i),a.appendChild(n),a.appendChild(t),r}},{key:"addDiaLog",value:function(){iV()||(this.dialogNode_=this.createDiaLog(),document.body.appendChild(this.dialogNode_),this.dialogNode_.onclick=this.onConfirm.bind(this),this.dialogNode_.querySelector(".".concat(GU)).onclick=function(e){return e.stopPropagation()},this.bodyPosition_=document.body.style.position,document.body.style.position="fixed",Vx.info("show autoplay dialog"),lM.uploadEvent({log:ZU}))}},{key:"deleteDiaLog",value:function(){this.dialogNode_&&(document.body.removeChild(this.dialogNode_),document.body.style.position=this.bodyPosition_,this.dialogNode_=null)}},{key:"onConfirm",value:function(){Vx.warn("confirm clicked, try resume stream"),jA.emit(xx),this.deleteDiaLog()}},{key:"onCollapseClick",value:function(){var e=this.dialogNode_.querySelector(".".concat(XU));e.style.visibility="".concat(this.showDetail_?"hidden":"visible"),e.style.height="".concat(this.showDetail_?0:"fit-content"),this.showDetail_=!this.showDetail_,this.isCollapseClicked_||lM.uploadEvent({log:eV}),this.isCollapseClicked_=!0}},{key:"onQuestionClick",value:function(){window.open(rV,"_blank"),this.isQuestionClicked_||lM.uploadEvent({log:tV}),this.isQuestionClicked_=!0}}]),e}(),cV=function(){function e(t){o(this,e),this.stream_=t.stream,this.userId_=t.stream.getUserId(),this.log_=this.stream_.getLogger(),this.track_=t.track,this.div_=t.div,this.muted_=t.muted,this.objectFit_=t.objectFit,this.mirror_=t.mirror,this.emitter_=new FA,this.initializeElement(),this.state_="NONE",this.pausedRetryCount_=5}var t;return c(e,[{key:"isPlaying",get:function(){return this.state_===lT}},{key:"initializeElement",value:function(){var e=new MediaStream;e.addTrack(this.track_);var t=document.createElement(Vk);t.srcObject=e,t.muted=!0;var n="width: 100%; height: 100%; object-fit: ".concat(this.objectFit_,";");this.mirror_&&(n+="transform: scaleX(-1);"),t.setAttribute("id","video_".concat(this.stream_.getId())),t.setAttribute("style",n),t.setAttribute("autoplay","autoplay"),t.setAttribute("playsinline","playsinline"),this.div_&&this.div_.appendChild(t),this.element_=t,this.handleEvents()}},{key:"setRect",value:function(e){var t=e.width,n=e.height;this.element_&&(this.element_.style.width=t+"px",this.element_.style.height=n+"px")}},{key:"setMirror",value:function(e){this.element_&&(this.element_.style.transform=e?"scaleX(-1)":"",this.mirror_=e)}},{key:"setObjectFit",value:function(e){this.element_&&(this.element_.style.objectFit="".concat(e),this.objectFit_=e)}},{key:"play",value:(t=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.element_.play();case 3:e.next=11;break;case 5:if(e.prev=5,e.t0=e.catch(0),t=sA({key:aR,data:{media:"Video",error:e.t0}}),this.log_.warn(t),!t.includes("NotAllowedError")){e.next=11;break}throw new kD({code:bD.PLAY_NOT_ALLOWED,message:t});case 11:case"end":return e.stop()}}),e,this,[[0,5]])}))),function(){return t.apply(this,arguments)})},{key:"handleEvents",value:function(){this.handleElementEvent=this.handleElementEvent.bind(this),this.handleTrackEvent=this.handleTrackEvent.bind(this),this.element_.addEventListener(Xk,this.handleElementEvent),this.element_.addEventListener(Qk,this.handleElementEvent),this.element_.addEventListener($k,this.handleElementEvent),this.element_.addEventListener(Yk,this.handleElementEvent),this.element_.addEventListener(Zk,this.handleElementEvent),this.track_.addEventListener(Qk,this.handleTrackEvent),this.track_.addEventListener(qk,this.handleTrackEvent),this.track_.addEventListener(Kk,this.handleTrackEvent),this.track_.readyState===Qk&&this.handleTrackEvent({type:Qk}),this.track_.muted&&this.handleTrackEvent({type:qk})}},{key:"handleElementEvent",value:function(e){var t=this;switch(e.type){case Xk:this.log_.info("video player is playing"),this.state_=lT,jA.emit(ox,{stream:this.stream_}),this.emitter_.emit(qO,{state:this.state_,reason:Xk}),this.interval_&&(iO.clearTask(this.interval_),this.interval_=null);break;case Qk:this.log_.info("video player is ended"),this.state_!==pT&&(this.state_=pT,this.emitter_.emit(qO,{state:this.state_,reason:Qk}));break;case $k:this.log_.info("video player is paused"),this.div_&&!document.getElementById(this.div_.id)&&this.log_.warn("video player has been remove, element ID: ".concat(this.div_.id)),this.state_=hT,this.emitter_.emit(qO,{state:this.state_,reason:$k}),this.pausedRetryCount_>0&&!iV()&&(this.log_.info("video player auto resume when video paused"),this.resume(),this.pausedRetryCount_--),ZR&&(this.interval_=iO.run((function(){t.element_&&t.state_===hT&&t.resume()}),{delay:3e3}));break;case Yk:if(this.element_&&this.element_.error){var n="".concat(DO(),"/").concat(rA().name,"/").concat(rA().version);this.log_.error("video player error observed. code: ".concat(this.element_.error.code," message: ").concat(this.element_.error.message," deviceInfo: ").concat(n)),lM.uploadEvent("stat-".concat(this.stream_.getType(),"-video-").concat(wI,"-").concat(this.element_.error.code,"-").concat(n),this.element_.error)}break;case Zk:jA.emit(kx,{stream:this.stream_})}}},{key:"handleTrackEvent",value:function(e){var t=e.type;switch(t){case Qk:this.log_.info("video track is ended"),jA.emit(Ix,{stream:this.stream_,type:t}),this.state_!==pT&&(this.state_=pT,this.emitter_.emit(qO,{state:this.state_,reason:Qk}));break;case qk:this.log_.info("video track is unable to provide media output"),this.stream_.isRemote()||xA(),jA.emit(yx,{stream:this.stream_,type:t}),this.state_!==hT&&(this.state_=hT,this.emitter_.emit(qO,{state:this.state_,reason:qk}));break;case Kk:this.log_.info("video track is able to provide media output"),jA.emit(Sx,{stream:this.stream_}),this.state_===hT&&(this.state_=lT,this.emitter_.emit(qO,{state:this.state_,reason:Kk}))}}},{key:"unbindEvents",value:function(){this.element_&&(this.element_.removeEventListener(Xk,this.handleElementEvent),this.element_.removeEventListener(Qk,this.handleElementEvent),this.element_.removeEventListener($k,this.handleElementEvent),this.element_.removeEventListener(Yk,this.handleElementEvent),this.element_.removeEventListener(Zk,this.handleElementEvent)),this.track_&&(this.track_.removeEventListener(Qk,this.handleTrackEvent),this.track_.removeEventListener(qk,this.handleTrackEvent),this.track_.removeEventListener(Kk,this.handleTrackEvent))}},{key:"stop",value:function(){this.unbindEvents(),this.div_&&this.div_.removeChild(this.element_),this.element_.srcObject=null,this.element_=null,this.interval_&&iO.clearTask(this.interval_)}},{key:"resume",value:function(){return this.play()}},{key:"getVideoFrame",value:function(){var e=document.createElement("canvas");return e.width=this.element_.videoWidth,e.height=this.element_.videoHeight,e.getContext("2d").drawImage(this.element_,0,0),e.toDataURL("image/png")}},{key:"on",value:function(e,t){this.emitter_.on(e,t)}},{key:"getElement",value:function(){return this.element_?this.element_:null}}]),e}(),uV="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,dV=xi,lV=Ui,hV=RangeError,pV=function(e){if(void 0===e)return 0;var t=dV(e),n=lV(t);if(t!==n)throw hV("Wrong length or index");return n},fV=Array,mV=Math.abs,vV=Math.pow,_V=Math.floor,gV=Math.log,yV=Math.LN2,SV={pack:function(e,t,n){var i,r,a,o=fV(n),s=8*n-t-1,c=(1<<s)-1,u=c>>1,d=23===t?vV(2,-24)-vV(2,-77):0,l=e<0||0===e&&1/e<0?1:0,h=0;for((e=mV(e))!=e||Infinity===e?(r=e!=e?1:0,i=c):(i=_V(gV(e)/yV),e*(a=vV(2,-i))<1&&(i--,a*=2),(e+=i+u>=1?d/a:d*vV(2,1-u))*a>=2&&(i++,a/=2),i+u>=c?(r=0,i=c):i+u>=1?(r=(e*a-1)*vV(2,t),i+=u):(r=e*vV(2,u-1)*vV(2,t),i=0));t>=8;)o[h++]=255&r,r/=256,t-=8;for(i=i<<t|r,s+=t;s>0;)o[h++]=255&i,i/=256,s-=8;return o[--h]|=128*l,o},unpack:function(e,t){var n,i=e.length,r=8*i-t-1,a=(1<<r)-1,o=a>>1,s=r-7,c=i-1,u=e[c--],d=127&u;for(u>>=7;s>0;)d=256*d+e[c--],s-=8;for(n=d&(1<<-s)-1,d>>=-s,s+=t;s>0;)n=256*n+e[c--],s-=8;if(0===d)d=1-o;else{if(d===a)return n?NaN:u?-Infinity:Infinity;n+=vV(2,t),d-=o}return(u?-1:1)*n*vV(2,d-t)}},bV=ft,kV=Oi,TV=Fi,IV=function(e){for(var t=bV(this),n=TV(t),i=arguments.length,r=kV(i>1?arguments[1]:void 0,n),a=i>2?arguments[2]:void 0,o=void 0===a?n:kV(a,n);o>r;)t[r++]=e;return t},EV=P,wV=ie,RV=O,CV=uV,AV=Mn,xV=wn,PV=ed,DV=M,MV=Ru,OV=xi,NV=Ui,LV=pV,UV=SV,VV=No,FV=cs,jV=wi.f,BV=sn.f,HV=IV,GV=lc,zV=Ko,WV=AV.PROPER,JV=AV.CONFIGURABLE,qV=ci.get,KV=ci.set,QV="ArrayBuffer",XV="DataView",$V="Wrong index",YV=EV.ArrayBuffer,ZV=YV,eF=ZV&&ZV.prototype,tF=EV.DataView,nF=tF&&tF.prototype,iF=Object.prototype,rF=EV.Array,aF=EV.RangeError,oF=wV(HV),sF=wV([].reverse),cF=UV.pack,uF=UV.unpack,dF=function(e){return[255&e]},lF=function(e){return[255&e,e>>8&255]},hF=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},pF=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},fF=function(e){return cF(e,23,4)},mF=function(e){return cF(e,52,8)},vF=function(e,t){BV(e.prototype,t,{get:function(){return qV(this)[t]}})},_F=function(e,t,n,i){var r=LV(n),a=qV(e);if(r+t>a.byteLength)throw aF($V);var o=qV(a.buffer).bytes,s=r+a.byteOffset,c=GV(o,s,s+t);return i?c:sF(c)},gF=function(e,t,n,i,r,a){var o=LV(n),s=qV(e);if(o+t>s.byteLength)throw aF($V);for(var c=qV(s.buffer).bytes,u=o+s.byteOffset,d=i(+r),l=0;l<t;l++)c[u+l]=d[a?l:t-l-1]};if(CV){var yF=WV&&YV.name!==QV;if(DV((function(){YV(1)}))&&DV((function(){new YV(-1)}))&&!DV((function(){return new YV,new YV(1.5),new YV(NaN),1!=YV.length||yF&&!JV})))yF&&JV&&xV(YV,"name",QV);else{(ZV=function(e){return MV(this,eF),new YV(LV(e))}).prototype=eF;for(var SF,bF=jV(YV),kF=0;bF.length>kF;)(SF=bF[kF++])in ZV||xV(ZV,SF,YV[SF]);eF.constructor=ZV}FV&&VV(nF)!==iF&&FV(nF,iF);var TF=new tF(new ZV(2)),IF=wV(nF.setInt8);TF.setInt8(0,2147483648),TF.setInt8(1,2147483649),!TF.getInt8(0)&&TF.getInt8(1)||PV(nF,{setInt8:function(e,t){IF(this,e,t<<24>>24)},setUint8:function(e,t){IF(this,e,t<<24>>24)}},{unsafe:!0})}else eF=(ZV=function(e){MV(this,eF);var t=LV(e);KV(this,{bytes:oF(rF(t),0),byteLength:t}),RV||(this.byteLength=t)}).prototype,tF=function(e,t,n){MV(this,nF),MV(e,eF);var i=qV(e).byteLength,r=OV(t);if(r<0||r>i)throw aF("Wrong offset");if(r+(n=void 0===n?i-r:NV(n))>i)throw aF("Wrong length");KV(this,{buffer:e,byteLength:n,byteOffset:r}),RV||(this.buffer=e,this.byteLength=n,this.byteOffset=r)},nF=tF.prototype,RV&&(vF(ZV,"byteLength"),vF(tF,"buffer"),vF(tF,"byteLength"),vF(tF,"byteOffset")),PV(nF,{getInt8:function(e){return _F(this,1,e)[0]<<24>>24},getUint8:function(e){return _F(this,1,e)[0]},getInt16:function(e){var t=_F(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=_F(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return pF(_F(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return pF(_F(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return uF(_F(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return uF(_F(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){gF(this,1,e,dF,t)},setUint8:function(e,t){gF(this,1,e,dF,t)},setInt16:function(e,t){gF(this,2,e,lF,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){gF(this,2,e,lF,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){gF(this,4,e,hF,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){gF(this,4,e,hF,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){gF(this,4,e,fF,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){gF(this,8,e,mF,t,arguments.length>2?arguments[2]:void 0)}});zV(ZV,QV),zV(tF,XV);var EF={ArrayBuffer:ZV,DataView:tF},wF=Rr,RF=ie,CF=M,AF=hn,xF=Oi,PF=Ui,DF=Uy,MF=EF.ArrayBuffer,OF=EF.DataView,NF=OF.prototype,LF=RF(MF.prototype.slice),UF=RF(NF.getUint8),VF=RF(NF.setUint8);wF({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:CF((function(){return!new MF(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(LF&&void 0===t)return LF(AF(this),e);for(var n=AF(this).byteLength,i=xF(e,n),r=xF(void 0===t?n:t,n),a=new(DF(this,MF))(PF(r-i)),o=new OF(this),s=new OF(a),c=0;i<r;)VF(s,c++,UF(o,i++));return a}});var FF,jF,BF,HF={exports:{}},GF=uV,zF=O,WF=P,JF=ye,qF=ke,KF=_t,QF=$s,XF=Je,$F=wn,YF=Ei,ZF=sn.f,ej=Re,tj=No,nj=cs,ij=Mt,rj=kt,aj=ci.enforce,oj=ci.get,sj=WF.Int8Array,cj=sj&&sj.prototype,uj=WF.Uint8ClampedArray,dj=uj&&uj.prototype,lj=sj&&tj(sj),hj=cj&&tj(cj),pj=Object.prototype,fj=WF.TypeError,mj=ij("toStringTag"),vj=rj("TYPED_ARRAY_TAG"),_j="TypedArrayConstructor",gj=GF&&!!nj&&"Opera"!==QF(WF.opera),yj=!1,Sj={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},bj={BigInt64Array:8,BigUint64Array:8},kj=function(e){var t=tj(e);if(qF(t)){var n=oj(t);return n&&KF(n,_j)?n.TypedArrayConstructor:kj(t)}},Tj=function(e){if(!qF(e))return!1;var t=QF(e);return KF(Sj,t)||KF(bj,t)};for(FF in Sj)(BF=(jF=WF[FF])&&jF.prototype)?aj(BF).TypedArrayConstructor=jF:gj=!1;for(FF in bj)(BF=(jF=WF[FF])&&jF.prototype)&&(aj(BF).TypedArrayConstructor=jF);if((!gj||!JF(lj)||lj===Function.prototype)&&(lj=function(){throw fj("Incorrect invocation")},gj))for(FF in Sj)WF[FF]&&nj(WF[FF],lj);if((!gj||!hj||hj===pj)&&(hj=lj.prototype,gj))for(FF in Sj)WF[FF]&&nj(WF[FF].prototype,hj);if(gj&&tj(dj)!==hj&&nj(dj,hj),zF&&!KF(hj,mj))for(FF in yj=!0,ZF(hj,mj,{get:function(){return qF(this)?this[vj]:void 0}}),Sj)WF[FF]&&$F(WF[FF],vj,FF);var Ij={NATIVE_ARRAY_BUFFER_VIEWS:gj,TYPED_ARRAY_TAG:yj&&vj,aTypedArray:function(e){if(Tj(e))return e;throw fj("Target is not a typed array")},aTypedArrayConstructor:function(e){if(JF(e)&&(!nj||ej(lj,e)))return e;throw fj(XF(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,i){if(zF){if(n)for(var r in Sj){var a=WF[r];if(a&&KF(a.prototype,e))try{delete a.prototype[e]}catch(IQ){try{a.prototype[e]=t}catch(o){}}}hj[e]&&!n||YF(hj,e,n?t:gj&&cj[e]||t,i)}},exportTypedArrayStaticMethod:function(e,t,n){var i,r;if(zF){if(nj){if(n)for(i in Sj)if((r=WF[i])&&KF(r,e))try{delete r[e]}catch(IQ){}if(lj[e]&&!n)return;try{return YF(lj,e,n?t:gj&&lj[e]||t)}catch(IQ){}}for(i in Sj)!(r=WF[i])||r[e]&&!n||YF(r,e,t)}},getTypedArrayConstructor:kj,isView:function(e){if(!qF(e))return!1;var t=QF(e);return"DataView"===t||KF(Sj,t)||KF(bj,t)},isTypedArray:Tj,TypedArray:lj,TypedArrayPrototype:hj},Ej=P,wj=M,Rj=Du,Cj=Ij.NATIVE_ARRAY_BUFFER_VIEWS,Aj=Ej.ArrayBuffer,xj=Ej.Int8Array,Pj=!Cj||!wj((function(){xj(1)}))||!wj((function(){new xj(-1)}))||!Rj((function(e){new xj,new xj(null),new xj(1.5),new xj(e)}),!0)||wj((function(){return 1!==new xj(new Aj(2),1,void 0).length})),Dj=xi,Mj=RangeError,Oj=function(e){var t=Dj(e);if(t<0)throw Mj("The argument can't be less than 0");return t},Nj=RangeError,Lj=function(e,t){var n=Oj(e);if(n%t)throw Nj("Wrong offset");return n},Uj=$s,Vj=ie("".slice),Fj=Bt,jj=TypeError,Bj=function(e){var t=Fj(e,"number");if("number"==typeof t)throw jj("Can't convert number to bigint");return BigInt(t)},Hj=Gc,Gj=V,zj=Dy,Wj=ft,Jj=Fi,qj=ou,Kj=Zc,Qj=qc,Xj=function(e){return"Big"===Vj(Uj(e),0,3)},$j=Ij.aTypedArrayConstructor,Yj=Bj,Zj=Rr,eB=P,tB=V,nB=O,iB=Pj,rB=Ij,aB=EF,oB=Ru,sB=W,cB=wn,uB=Hx,dB=Ui,lB=pV,hB=Lj,pB=zt,fB=_t,mB=$s,vB=ke,_B=ze,gB=vo,yB=Re,SB=cs,bB=wi.f,kB=function(e){var t,n,i,r,a,o,s,c,u=zj(this),d=Wj(e),l=arguments.length,h=l>1?arguments[1]:void 0,p=void 0!==h,f=Kj(d);if(f&&!Qj(f))for(c=(s=qj(d,f)).next,d=[];!(o=Gj(c,s)).done;)d.push(o.value);for(p&&l>2&&(h=Hj(h,arguments[2])),n=Jj(d),i=new($j(u))(n),r=Xj(i),t=0;n>t;t++)a=p?h(d[t],t):d[t],i[t]=r?Yj(a):+a;return i},TB=$l.forEach,IB=ad,EB=sn,wB=D,RB=Lu,CB=ci.get,AB=ci.set,xB=ci.enforce,PB=EB.f,DB=wB.f,MB=Math.round,OB=eB.RangeError,NB=aB.ArrayBuffer,LB=NB.prototype,UB=aB.DataView,VB=rB.NATIVE_ARRAY_BUFFER_VIEWS,FB=rB.TYPED_ARRAY_TAG,jB=rB.TypedArray,BB=rB.TypedArrayPrototype,HB=rB.aTypedArrayConstructor,GB=rB.isTypedArray,zB="BYTES_PER_ELEMENT",WB="Wrong length",JB=function(e,t){HB(e);for(var n=0,i=t.length,r=new e(i);i>n;)r[n]=t[n++];return r},qB=function(e,t){PB(e,t,{get:function(){return CB(this)[t]}})},KB=function(e){var t;return yB(LB,e)||"ArrayBuffer"==(t=mB(e))||"SharedArrayBuffer"==t},QB=function(e,t){return GB(e)&&!_B(t)&&t in e&&uB(+t)&&t>=0},XB=function(e,t){return t=pB(t),QB(e,t)?sB(2,e[t]):DB(e,t)},$B=function(e,t,n){return t=pB(t),!(QB(e,t)&&vB(n)&&fB(n,"value"))||fB(n,"get")||fB(n,"set")||n.configurable||fB(n,"writable")&&!n.writable||fB(n,"enumerable")&&!n.enumerable?PB(e,t,n):(e[t]=n.value,e)};nB?(VB||(wB.f=XB,EB.f=$B,qB(BB,"buffer"),qB(BB,"byteOffset"),qB(BB,"byteLength"),qB(BB,"length")),Zj({target:"Object",stat:!0,forced:!VB},{getOwnPropertyDescriptor:XB,defineProperty:$B}),HF.exports=function(e,t,n){var i=e.match(/\d+$/)[0]/8,r=e+(n?"Clamped":"")+"Array",a="get"+e,o="set"+e,s=eB[r],c=s,u=c&&c.prototype,d={},l=function(e,t){PB(e,t,{get:function(){return function(e,t){var n=CB(e);return n.view[a](t*i+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var a=CB(e);n&&(r=(r=MB(r))<0?0:r>255?255:255&r),a.view[o](t*i+a.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};VB?iB&&(c=t((function(e,t,n,r){return oB(e,u),RB(vB(t)?KB(t)?void 0!==r?new s(t,hB(n,i),r):void 0!==n?new s(t,hB(n,i)):new s(t):GB(t)?JB(c,t):tB(kB,c,t):new s(lB(t)),e,c)})),SB&&SB(c,jB),TB(bB(s),(function(e){e in c||cB(c,e,s[e])})),c.prototype=u):(c=t((function(e,t,n,r){oB(e,u);var a,o,s,d=0,h=0;if(vB(t)){if(!KB(t))return GB(t)?JB(c,t):tB(kB,c,t);a=t,h=hB(n,i);var p=t.byteLength;if(void 0===r){if(p%i)throw OB(WB);if((o=p-h)<0)throw OB(WB)}else if((o=dB(r)*i)+h>p)throw OB(WB);s=o/i}else s=lB(t),a=new NB(o=s*i);for(AB(e,{buffer:a,byteOffset:h,byteLength:o,length:s,view:new UB(a)});d<s;)l(e,d++)})),SB&&SB(c,jB),u=c.prototype=gB(BB)),u.constructor!==c&&cB(u,"constructor",c),xB(u).TypedArrayConstructor=c,FB&&cB(u,FB,r);var h=c!=s;d[r]=c,Zj({global:!0,constructor:!0,forced:h,sham:!VB},d),zB in c||cB(c,zB,i),zB in u||cB(u,zB,i),IB(r)}):HF.exports=function(){},(0,HF.exports)("Uint8",(function(e){return function(t,n,i){return e(this,t,n,i)}}));var YB=ft,ZB=Oi,eH=Fi,tH=hh,nH=Math.min,iH=[].copyWithin||function(e,t){var n=YB(this),i=eH(n),r=ZB(e,i),a=ZB(t,i),o=arguments.length>2?arguments[2]:void 0,s=nH((void 0===o?i:ZB(o,i))-a,i-r),c=1;for(a<r&&r<a+s&&(c=-1,a+=s-1,r+=s-1);s-- >0;)a in n?n[r]=n[a]:tH(n,r),r+=c,a+=c;return n},rH=Ij,aH=ie(iH),oH=rH.aTypedArray;(0,rH.exportTypedArrayMethod)("copyWithin",(function(e,t){return aH(oH(this),e,t,arguments.length>2?arguments[2]:void 0)}));var sH=$l.every,cH=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("every",(function(e){return sH(cH(this),e,arguments.length>1?arguments[1]:void 0)}));var uH=IV,dH=Bj,lH=$s,hH=V,pH=M,fH=Ij.aTypedArray,mH=Ij.exportTypedArrayMethod,vH=ie("".slice);mH("fill",(function(e){var t=arguments.length;fH(this);var n="Big"===vH(lH(this),0,3)?dH(e):+e;return hH(uH,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),pH((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var _H=Fi,gH=Uy,yH=Ij.aTypedArrayConstructor,SH=Ij.getTypedArrayConstructor,bH=function(e){return yH(gH(e,SH(e)))},kH=function(e,t){for(var n=0,i=_H(t),r=new e(i);i>n;)r[n]=t[n++];return r},TH=bH,IH=$l.filter,EH=function(e,t){return kH(TH(e),t)},wH=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("filter",(function(e){var t=IH(wH(this),e,arguments.length>1?arguments[1]:void 0);return EH(this,t)}));var RH=$l.find,CH=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("find",(function(e){return RH(CH(this),e,arguments.length>1?arguments[1]:void 0)}));var AH=$l.findIndex,xH=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("findIndex",(function(e){return AH(xH(this),e,arguments.length>1?arguments[1]:void 0)}));var PH=$l.forEach,DH=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("forEach",(function(e){PH(DH(this),e,arguments.length>1?arguments[1]:void 0)}));var MH=zi.includes,OH=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("includes",(function(e){return MH(OH(this),e,arguments.length>1?arguments[1]:void 0)}));var NH=zi.indexOf,LH=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("indexOf",(function(e){return NH(LH(this),e,arguments.length>1?arguments[1]:void 0)}));var UH=P,VH=M,FH=ie,jH=Ij,BH=Bs,HH=Mt("iterator"),GH=UH.Uint8Array,zH=FH(BH.values),WH=FH(BH.keys),JH=FH(BH.entries),qH=jH.aTypedArray,KH=jH.exportTypedArrayMethod,QH=GH&&GH.prototype,XH=!VH((function(){QH[HH].call([1])})),$H=!!QH&&QH.values&&QH[HH]===QH.values&&"values"===QH.values.name,YH=function(){return zH(qH(this))};KH("entries",(function(){return JH(qH(this))}),XH),KH("keys",(function(){return WH(qH(this))}),XH),KH("values",YH,XH||!$H,{name:"values"}),KH(HH,YH,XH||!$H,{name:"values"});var ZH=Ij.aTypedArray,eG=Ij.exportTypedArrayMethod,tG=ie([].join);eG("join",(function(e){return tG(ZH(this),e)}));var nG=ol,iG=me,rG=xi,aG=Fi,oG=Rh,sG=Math.min,cG=[].lastIndexOf,uG=!!cG&&1/[1].lastIndexOf(1,-0)<0,dG=oG("lastIndexOf"),lG=uG||!dG?function(e){if(uG)return nG(cG,this,arguments)||0;var t=iG(this),n=aG(t),i=n-1;for(arguments.length>1&&(i=sG(i,rG(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:cG,hG=ol,pG=lG,fG=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return hG(pG,fG(this),t>1?[e,arguments[1]]:[e])}));var mG=$l.map,vG=bH,_G=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("map",(function(e){return mG(_G(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(vG(e))(t)}))}));var gG=Xe,yG=ft,SG=ce,bG=Fi,kG=TypeError,TG=function(e){return function(t,n,i,r){gG(n);var a=yG(t),o=SG(a),s=bG(a),c=e?s-1:0,u=e?-1:1;if(i<2)for(;;){if(c in o){r=o[c],c+=u;break}if(c+=u,e?c<0:s<=c)throw kG("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=u)c in o&&(r=n(r,o[c],c,a));return r}},IG={left:TG(!1),right:TG(!0)},EG=IG.left,wG=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return EG(wG(this),e,t,t>1?arguments[1]:void 0)}));var RG=IG.right,CG=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return RG(CG(this),e,t,t>1?arguments[1]:void 0)}));var AG=Ij.aTypedArray,xG=Ij.exportTypedArrayMethod,PG=Math.floor;xG("reverse",(function(){for(var e,t=this,n=AG(t).length,i=PG(n/2),r=0;r<i;)e=t[r],t[r++]=t[--n],t[n]=e;return t}));var DG=P,MG=V,OG=Ij,NG=Fi,LG=Lj,UG=ft,VG=M,FG=DG.RangeError,jG=DG.Int8Array,BG=jG&&jG.prototype,HG=BG&&BG.set,GG=OG.aTypedArray,zG=OG.exportTypedArrayMethod,WG=!VG((function(){var e=new Uint8ClampedArray(2);return MG(HG,e,{length:1,0:3},1),3!==e[1]})),JG=WG&&OG.NATIVE_ARRAY_BUFFER_VIEWS&&VG((function(){var e=new jG(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));zG("set",(function(e){GG(this);var t=LG(arguments.length>1?arguments[1]:void 0,1),n=UG(e);if(WG)return MG(HG,this,n,t);var i=this.length,r=NG(n),a=0;if(r+t>i)throw FG("Wrong length");for(;a<r;)this[t+a]=n[a++]}),!WG||JG);var qG=bH,KG=sl,QG=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("slice",(function(e,t){for(var n=KG(QG(this),e,t),i=qG(this),r=0,a=n.length,o=new i(a);a>r;)o[r]=n[r++];return o}),M((function(){new Int8Array(1).slice()})));var XG=$l.some,$G=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("some",(function(e){return XG($G(this),e,arguments.length>1?arguments[1]:void 0)}));var YG=Ce.match(/firefox\/(\d+)/i),ZG=!!YG&&+YG[1],ez=/MSIE|Trident/.test(Ce),tz=Ce.match(/AppleWebKit\/(\d+)\./),nz=!!tz&&+tz[1],iz=ie,rz=M,az=Xe,oz=Dm,sz=ZG,cz=ez,uz=Ne,dz=nz,lz=Ij.aTypedArray,hz=Ij.exportTypedArrayMethod,pz=P.Uint16Array,fz=pz&&iz(pz.prototype.sort),mz=!(!fz||rz((function(){fz(new pz(2),null)}))&&rz((function(){fz(new pz(2),{})}))),vz=!!fz&&!rz((function(){if(uz)return uz<74;if(sz)return sz<67;if(cz)return!0;if(dz)return dz<602;var e,t,n=new pz(516),i=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,i[e]=e-2*t+3;for(fz(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==i[e])return!0}));hz("sort",(function(e){return void 0!==e&&az(e),vz?fz(this,e):oz(lz(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!vz||mz);var _z=Ui,gz=Oi,yz=bH,Sz=Ij.aTypedArray;(0,Ij.exportTypedArrayMethod)("subarray",(function(e,t){var n=Sz(this),i=n.length,r=gz(e,i);return new(yz(n))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,_z((void 0===t?i:gz(t,i))-r))}));var bz=ol,kz=Ij,Tz=M,Iz=sl,Ez=P.Int8Array,wz=kz.aTypedArray,Rz=kz.exportTypedArrayMethod,Cz=[].toLocaleString,Az=!!Ez&&Tz((function(){Cz.call(new Ez(1))}));Rz("toLocaleString",(function(){return bz(Cz,Az?Iz(wz(this)):wz(this),Iz(arguments))}),Tz((function(){return[1,2].toLocaleString()!=new Ez([1,2]).toLocaleString()}))||!Tz((function(){Ez.prototype.toLocaleString.call([1,2])})));var xz=Ij.exportTypedArrayMethod,Pz=M,Dz=ie,Mz=P.Uint8Array,Oz=Mz&&Mz.prototype||{},Nz=[].toString,Lz=Dz([].join);Pz((function(){Nz.call({})}))&&(Nz=function(){return Lz(this)});var Uz=Oz.toString!=Nz;xz("toString",Nz,Uz),Rr({global:!0,constructor:!0,forced:!uV},{DataView:EF.DataView});var Vz=Rr,Fz=kl,jz=ie([].reverse),Bz=[1,2];Vz({target:"Array",proto:!0,forced:String(Bz)===String(Bz.reverse())},{reverse:function(){return Fz(this)&&(this.length=this.length),jz(this)}});var Hz=IG.left,Gz=Ne,zz=Cy;Rr({target:"Array",proto:!0,forced:!Rh("reduce")||!zz&&Gz>79&&Gz<83},{reduce:function(e){var t=arguments.length;return Hz(this,e,t,t>1?arguments[1]:void 0)}});var Wz=ad,Jz="ArrayBuffer",qz=EF.ArrayBuffer;Rr({global:!0,constructor:!0,forced:P.ArrayBuffer!==qz},{ArrayBuffer:qz}),Wz(Jz);var Kz=Rr,Qz=kl,Xz=Ll,$z=ke,Yz=Oi,Zz=Fi,eW=me,tW=ac,nW=Mt,iW=sl,rW=th("slice"),aW=nW("species"),oW=Array,sW=Math.max;Kz({target:"Array",proto:!0,forced:!rW},{slice:function(e,t){var n,i,r,a=eW(this),o=Zz(a),s=Yz(e,o),c=Yz(void 0===t?o:t,o);if(Qz(a)&&(n=a.constructor,(Xz(n)&&(n===oW||Qz(n.prototype))||$z(n)&&null===(n=n[aW]))&&(n=void 0),n===oW||void 0===n))return iW(a,s,c);for(i=new(void 0===n?oW:n)(sW(c-s,0)),r=0;s<c;s++,r++)s in a&&tW(i,r,a[s]);return i.length=r,i}});var cW=P,uW=M,dW=ie,lW=Td,hW=pg.trim,pW=ag,fW=cW.parseInt,mW=cW.Symbol,vW=mW&&mW.iterator,_W=/^[+-]?0x/i,gW=dW(_W.exec),yW=8!==fW(pW+"08")||22!==fW(pW+"0x16")||vW&&!uW((function(){fW(Object(vW))}))?function(e,t){var n=hW(lW(e));return fW(n,t>>>0||(gW(_W,n)?16:10))}:fW;Rr({global:!0,forced:parseInt!=yW},{parseInt:yW});var SW=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o(this,e),this.dataView=t,this.isSEI&&(n?this.addPreventionByte():this.removePreventionByte())}return c(e,[{key:"addPreventionByte",value:function(){for(var e=this.seiPayloadStartIndex,t=this.dataView.byteLength-2,n=[],i=0,r=e;r<=t;r++){var a=this.dataView.getInt8(r);switch(a){case 0:case 1:case 2:case 3:2===i&&(n.push(3),i=0),0==a?i++:i=0,n.push(a);break;default:i=0,n.push(a)}}n.push(this.dataView.getInt8(this.dataView.byteLength-1));var o=new DataView(new Uint8Array([].concat(T(new Uint8Array(this.dataView.buffer).slice(0,e)),n)).buffer);this.dataView=o}},{key:"removePreventionByte",value:function(){for(var e=this.seiPayloadStartIndex,t=this.dataView.byteLength-1,n=[],i=0,r=e;r<=t;r++)switch(this.dataView.getInt8(r)){case 0:i++,n.push(this.dataView.getInt8(r));break;case 3:2!==i&&n.push(this.dataView.getInt8(r)),i=0;break;default:n.push(this.dataView.getInt8(r)),i=0}var a=new DataView(new Uint8Array([].concat(T(new Uint8Array(this.dataView.buffer).slice(0,e)),n)).buffer);this.dataView=a}},{key:"isSEI",get:function(){return 6===this.dataView.getUint8(4)}},{key:"seiPayloadStartIndex",get:function(){for(var e=6,t=6;t<this.dataView.buffer.byteLength&&(e++,255===this.dataView.getUint8(t));t++);return e}},{key:"seiPayloadType",get:function(){return this.isSEI?this.dataView.getUint8(5):null}},{key:"seiPayload",get:function(){if(!this.isSEI)return null;for(var e=0,t=6,n=6;n<this.dataView.buffer.byteLength;n++){var i=this.dataView.getUint8(n);if(t++,255!==i){e+=i;break}e+=255}for(var r=new ArrayBuffer(e),a=new DataView(r),o=0;o<r.byteLength;o++,t++)a.setInt8(o,this.dataView.getInt8(t));return a}}]),e}(),bW=function(){function e(t){var n=t.connection,i=t.log,r=t.isUplink,a=t.audioDecoder;o(this,e),this.isUplink_=r,this.connection_=n,this.log_=i,this.seiMessageList_=[],this.seiPayloadType_=243,this.mainVideoSenderOrReceiver_=null,this.mainVideoAbortController_=null,this.abortMap_=new Map,this.audioReceiver_=null,this.audioAbortController_=null,this.onSEIMessage=null,this.spatialManager_=null,this.spatialPlayer_=null,this.audioDecoder_=null,this.decodeFailedLogTimestamp_=Date.now(),this.connection_.isSpatialEnabled()&&!this.isUplink_&&(this.audioDecoder_=a,this.initDecodeAudioFrame())}return c(e,[{key:"isVideoProcessRunning",get:function(){return!!this.mainVideoAbortController_}},{key:"isAudioProcessRunning",get:function(){return!!this.audioAbortController_}},{key:"startProcessVideo",value:function(e){this.mainVideoSenderOrReceiver_=e;var t=e.createEncodedStreams(),n=t.readable,i=t.writable,r=new TransformStream({transform:this.isUplink_?this.encodeVideoFrame.bind(this):this.decodeVideoFrame.bind(this)});this.mainVideoAbortController_=new AbortController,n.pipeThrough(r).pipeTo(i,{signal:this.mainVideoAbortController_.signal}).catch((function(){}))}},{key:"startProcessAudioReceiver",value:function(e){this.audioReceiver_=e;var t=e.createEncodedStreams(),n=t.readable,i=t.writable,r=new TransformStream({transform:this.decodeAudioFrame.bind(this)});this.audioAbortController_=new AbortController,n.pipeThrough(r).pipeTo(i,{signal:this.audioAbortController_.signal}).catch((function(){}))}},{key:"initDecodeAudioFrame",value:function(){this.spatialManager_=this.connection_.getSpatialManager(),this.spatialPlayer_=this.spatialManager_.createSpatialPlayer({userId:this.connection_.getUserId(),connection:this.connection_}),this.log_.debug(this.connection_.getUserId()+"init decode audio frame")}},{key:"decodeAudioFrame",value:function(e,t){var n=this,i=new Uint8Array(e.data);this.audioDecoder_.decodeFrame(i).then((function(e){var t=e.channelData;n.spatialPlayer_.feed(t)})).catch((function(){var e=Date.now();e-n.decodeFailedLogTimestamp_>3e4&&(n.log_.debug(n.connection_.getUserId()+" decode audio frame failed."),n.decodeFailedLogTimestamp_=e)})),t.enqueue(e)}},{key:"restartVideo",value:function(e){this.stopVideo(),this.startProcessVideo(e)}},{key:"restartAudio",value:function(e){this.stopAudio(),this.startProcessAudioReceiver(e)}},{key:"stopVideo",value:function(){var e;null===(e=this.mainVideoAbortController_)||void 0===e||e.abort(),this.mainVideoAbortController_=null}},{key:"stopAudio",value:function(){var e;null===(e=this.audioAbortController_)||void 0===e||e.abort(),this.audioAbortController_=null}},{key:"destroy",value:function(){var e,t;this.stopAudio(),this.stopVideo(),this.abortMap_.forEach((function(e){return e.abort()})),this.abortMap_.clear(),this.log_=null,this.onSEIMessage=null,this.mainVideoSenderOrReceiver_=null,null===(e=this.spatialManager_)||void 0===e||e.delete(this.connection_.getUserId()),this.connection_=null,null===(t=this.audioDecoder_)||void 0===t||t.free()}},{key:"handleEncodedStreams",value:function(){var e=this;try{var t=this.connection_.getPeerConnection();this.clearUnusedSenderOrReceiver(t),this.isUplink_?t.getSenders().forEach((function(t,n){if(1===n){if(t===e.mainVideoSenderOrReceiver_)return;e.isVideoProcessRunning?e.restartVideo(t):e.startProcessVideo(t)}else{if(e.abortMap_.has(t))return;e.pipeSenderOrReceiver(t)}})):t.getReceivers().forEach((function(t,n){var i,r;e.abortMap_.has(t)||t===e.mainVideoSenderOrReceiver_||(1===n&&(null===(i=t.track)||void 0===i?void 0:i.kind)===Vk?e.isVideoProcessRunning?e.restartVideo(t):e.startProcessVideo(t):e.connection_.isSpatialEnabled()&&(null===(r=t.track)||void 0===r?void 0:r.kind)===Uk?e.isAudioProcessRunning?e.restartAudio(t):e.startProcessAudioReceiver(t):e.pipeSenderOrReceiver(t))}))}catch(IQ){this.log_.warn(IQ)}}},{key:"pipeSenderOrReceiver",value:function(e){var t=e.createEncodedStreams(),n=t.readable,i=t.writable,r=new AbortController;this.abortMap_.set(e,r),n.pipeTo(i,{signal:r.signal}).catch((function(){}))}},{key:"clearUnusedSenderOrReceiver",value:function(e){var t=this;this.abortMap_.forEach((function(n,i){(t.isUplink_?e.getSenders():e.getReceivers()).find((function(e){return e===i}))||(n.abort(),t.abortMap_.delete(i))}))}},{key:"addSEIMessage",value:function(e,t){t&&t.seiPayloadType&&(this.seiPayloadType_=t.seiPayloadType),this.seiMessageList_.push(e)}},{key:"hasSEI",value:function(e){var t=new DataView(e);return 1===t.getInt32(0)&&6===t.getInt8(4)}},{key:"isEmptyFrame",value:function(e){return"empty"===e.type||0===e.data.byteLength}},{key:"getNaluCount",value:function(e){for(var t=0,n=0,i=new DataView(e),r=0;r<e.byteLength;r++)switch(i.getUint8(r)){case 0:t++;break;case 1:2!==t&&3!==t||n++,t=0;break;default:t=0}return n}},{key:"encodeVideoFrame",value:function(e,t){try{if(this.connection_.isH264&&this.seiMessageList_.length>0&&!this.isEmptyFrame(e)){var n=9-this.getNaluCount(e.data);if(n<=0)return;for(var i=this.seiMessageList_.splice(0,n).reverse().map(this.encodeSEINalu.bind(this)),r=i.reduce((function(e,t){return e+t.dataView.byteLength}),0),a=new ArrayBuffer(r+e.data.byteLength),o=new DataView(a),s=new DataView(e.data),c=0,u=0;u<i.length;u++)for(var d=0;d<i[u].dataView.byteLength;d++)o.setInt8(c++,i[u].dataView.getInt8(d));for(var l=0;l<e.data.byteLength;l++)o.setInt8(c++,s.getInt8(l));e.data=a,this.log_.debug("".concat(i.length," sei sent"))}}catch(IQ){this.log_.warn(IQ)}t.enqueue(e)}},{key:"decodeVideoFrame",value:function(e,t){var n=this;try{if(this.connection_.isH264&&!this.isEmptyFrame(e)&&this.hasSEI(e.data)){for(var i=[],r=new DataView(e.data),a=0,o=-1,s=-1,c=0;c<e.data.byteLength;c++){var u=r.getUint8(c);if(0===u)a++;else if(1===u){if(2===a||3===a){var d=c-a;if(-1===o?o=d:-1===s&&(s=d,i.push(new SW(new DataView(r.buffer.slice(o,s)))),o=d,s=-1),!(6===r.getUint8(c+1))){e.data=new DataView(r.buffer.slice(d)).buffer;break}}a=0}else a=0}this.log_.debug("".concat(i.length," sei received")),mA(this.onSEIMessage)&&i.reverse().forEach((function(e){n.onSEIMessage({seiPayloadType:e.seiPayloadType,data:e.seiPayload.buffer})}))}}catch(IQ){this.log_.warn(IQ)}t.enqueue(e)}},{key:"encodeSEINalu",value:function(e){var t=e.byteLength,n=parseInt(t/255),i=t%255,r=[];r.push(0,0,0,1,6,this.seiPayloadType_);for(var a=0;a<n;a++)r.push(255);r.push(i);var o=new DataView(e);return r.push.apply(r,T(new Uint8Array(o.buffer))),r.push(128),new SW(new DataView(new Uint8Array(r).buffer),!0)}}]),e}(),kW=Rr,TW=O,IW=Ja.f;kW({target:"Object",stat:!0,forced:Object.defineProperties!==IW,sham:!TW},{defineProperties:IW}),Rr({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991});var EW=Rr,wW=HS,RW=M,CW=we,AW=ye,xW=Uy,PW=xk,DW=Ei,MW=wW&&wW.prototype;if(EW({target:"Promise",proto:!0,real:!0,forced:!!wW&&RW((function(){MW.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=xW(this,CW("Promise")),n=AW(e);return this.then(n?function(n){return PW(t,e()).then((function(){return n}))}:e,n?function(n){return PW(t,e()).then((function(){throw n}))}:e)}}),AW(wW)){var OW=CW("Promise").prototype.finally;MW.finally!==OW&&DW(MW,"finally",OW,{unsafe:!0})}(0,HF.exports)("Float32",(function(e){return function(t,n,i){return e(this,t,n,i)}}));var NW=ie,LW=ed,UW=ec.exports.getWeakData,VW=Ru,FW=hn,jW=ue,BW=ke,HW=Iu,GW=_t,zW=ci.set,WW=ci.getterFor,JW=$l.find,qW=$l.findIndex,KW=NW([].splice),QW=0,XW=function(e){return e.frozen||(e.frozen=new $W)},$W=function(){this.entries=[]},YW=function(e,t){return JW(e.entries,(function(e){return e[0]===t}))};$W.prototype={get:function(e){var t=YW(this,e);if(t)return t[1]},has:function(e){return!!YW(this,e)},set:function(e,t){var n=YW(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=qW(this.entries,(function(t){return t[0]===e}));return~t&&KW(this.entries,t,1),!!~t}};var ZW,eJ={getConstructor:function(e,t,n,i){var r=e((function(e,r){VW(e,a),zW(e,{type:t,id:QW++,frozen:void 0}),jW(r)||HW(r,e[i],{that:e,AS_ENTRIES:n})})),a=r.prototype,o=WW(t),s=function(e,t,n){var i=o(e),r=UW(FW(t),!0);return!0===r?XW(i).set(t,n):r[i.id]=n,e};return LW(a,{delete:function(e){var t=o(this);if(!BW(e))return!1;var n=UW(e);return!0===n?XW(t).delete(e):n&&GW(n,t.id)&&delete n[t.id]},has:function(e){var t=o(this);if(!BW(e))return!1;var n=UW(e);return!0===n?XW(t).has(e):n&&GW(n,t.id)}}),LW(a,n?{get:function(e){var t=o(this);if(BW(e)){var n=UW(e);return!0===n?XW(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),r}},tJ=P,nJ=ie,iJ=ed,rJ=ec.exports,aJ=Yu,oJ=eJ,sJ=ke,cJ=Tc,uJ=ci.enforce,dJ=Gn,lJ=!tJ.ActiveXObject&&"ActiveXObject"in tJ,hJ=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},pJ=aJ("WeakMap",hJ,oJ);if(dJ&&lJ){ZW=oJ.getConstructor(hJ,"WeakMap",!0),rJ.enable();var fJ=pJ.prototype,mJ=nJ(fJ.delete),vJ=nJ(fJ.has),_J=nJ(fJ.get),gJ=nJ(fJ.set);iJ(fJ,{delete:function(e){if(sJ(e)&&!cJ(e)){var t=uJ(this);return t.frozen||(t.frozen=new ZW),mJ(this,e)||t.frozen.delete(e)}return mJ(this,e)},has:function(e){if(sJ(e)&&!cJ(e)){var t=uJ(this);return t.frozen||(t.frozen=new ZW),vJ(this,e)||t.frozen.has(e)}return vJ(this,e)},get:function(e){if(sJ(e)&&!cJ(e)){var t=uJ(this);return t.frozen||(t.frozen=new ZW),vJ(this,e)?_J(this,e):t.frozen.get(e)}return _J(this,e)},set:function(e,t){if(sJ(e)&&!cJ(e)){var n=uJ(this);n.frozen||(n.frozen=new ZW),vJ(this,e)?gJ(this,e,t):n.frozen.set(e,t)}else gJ(this,e,t);return this}})}var yJ=Rr,SJ=ie,bJ=me,kJ=ft,TJ=Td,IJ=Fi,EJ=SJ([].push),wJ=SJ([].join);yJ({target:"String",stat:!0},{raw:function(e){for(var t=bJ(kJ(e).raw),n=IJ(t),i=arguments.length,r=[],a=0;n>a;){if(EJ(r,TJ(t[a++])),a===n)return wJ(r,"");a<i&&EJ(r,TJ(arguments[a]))}}});var RJ=BP.entries;Rr({target:"Object",stat:!0},{entries:function(e){return RJ(e)}});var CJ,AJ=Rr,xJ=O,PJ=sn.f;function DJ(e){var t=this,n=Uint8Array,i=Float32Array;DJ.modules||Object.defineProperties(DJ,{modules:{value:new WeakMap},setModule:{value:function(e,t){DJ.modules.set(e,Promise.resolve(t))}},getModule:{value:function(e,t){var n=DJ.modules.get(e);return n||(t?n=WebAssembly.compile(DJ.decodeDynString(t)):(t=e.wasm,n=DJ.inflateDynEncodeString(t).then((function(e){return WebAssembly.compile(e)}))),DJ.modules.set(e,n)),n}},concatFloat32:{value:function(e,t){for(var n=new i(t),r=0,a=0;r<e.length;)n.set(e[r],a),a+=e[r++].length;return n}},getDecodedAudio:{value:function(e,t,n,i){return{channelData:e,samplesDecoded:t,sampleRate:n,bitDepth:i}}},getDecodedAudioMultiChannel:{value:function(e,t,n,i,r){var a,o,s=[];for(a=0;a<t;a++){var c=[];for(o=0;o<e.length;)c.push(e[o++][a]||[]);s.push(DJ.concatFloat32(c,n))}return DJ.getDecodedAudio(s,n,i,r)}},decodeDynString:{value:function(e){for(var t,i=new n(e.length),r=parseInt(e.substring(11,13),16),a=256-r,o=!1,s=0,c=13;c<e.length;)61!==(t=e.charCodeAt(c++))||o?(o&&(o=!1,t-=64),i[s++]=t<r&&t>0?t+a:t-r):o=!0;return i.subarray(0,s)}},inflateDynEncodeString:{value:function(e){return e=DJ.decodeDynString(e),new Promise((function(t){var i=String.raw(CJ||(CJ=b(['dynEncode0014u聡聛*t聯聯聯t聯聯聯聯聯t聯聯聯聯$#聯U陇陇聯U陇陇3聛y聛聝聠聧聞聣zzss|yu聞svu聡y脷&聢聯4<054<,5T44^T44<(6U~J(44< ~A544U~6J0444聢聠545 444J0444聣J,4U聯4聢U聯聡聟脪聯7U45聯4U4Z聯4U4U^/6545T4T44BU聢~64CU~O4U54U~5 U5T4B4Z!4U~5U5U5T4U~6U4ZTU5U5T44~4O4U2ZTU5T44Z!4B6T44U聢~64B6U~O44U聢~4O4U~54U~5 44~C4~54U~5 44~5454U聢4B6Ub!444~UO4U~5 聯U5聯4U4ZTU聤#44U$4聠64<4~B6^聯4<444~U聢~B4U~54U聢544~544~U聢5 碌聯U盲#UJU猫#5TT4U0ZTTUX5U5T4T4U脿#~4OU4U聽$~C聢4~54U~5 T44$6U!TTT4UaT4<6T4<64<Z!44~4N4<U~5 4U聰Z!4U卤_TU聤#44U聲U聢6U脭~B$544$6U!4U聢6U陇#~B44U盲#~B$~64<6_TU聣#444U聰~B~6~54<Y!44<_!T4Y!4<64~444~AN44<U~6J4U5 44J4U聰[!U#44U聤O4U~54U~5 U54 聯7U6844J44J 4UJ4UJ04VK(44<J44<J$4U麓~54U~5 4U陇~5!TTT4U$5"U聯5TTTTTTT4U$"4VK,U54<(6U~64<$6_!4< 64~6A54A544U~6#J(U聮54A4U聡[!44J(44#~A4U聢6U聯聡U聤U聟[!44聠64~64_!4<64~54<6T4<4]TU5 T4Y!44~44~AN4U~54U~54U5 44J(44J U脛A!U5U聰#U么JU"U脭JU聹#U脭"JU聵#U麓"JT4U麓ZTU5T4U么ZTU5T4UDZTU5T4U$[T44~UO4U~5 U脭U么4U~U麓$.U5T4UP[T4U~4~UO4U~5 U聵#<U聹#<4U~U2$.U脛UN 44 ~UO4U~5 44!~UO4U~5 4U~4~UO4U~5 44J44J(U5 44U陇~J@44U盲~J<44UD~J844U~J44U$54U$5U聭54U$54U1^4U1^聠!4U聲~54U~5U聰54U~6U4U^/65T4T4U$54U~4BU聢~4O4U54U~5 UU\'464U\'_/54U聢U聰~5T4T4U~4BU聢~UO4U54U~5 U聬54U盲~4U陇~4U~U\'$!44~5U5T44T44U<~$6U!4U#aT4U~4U聢~4O4U~5 U5U5U5TTT4U$"4YTU聫5 4U聢4~C5U5 U5U5444$4~64~TU聨5 4U~4U聢~5T4Y!44O4U~54U~54U5 4CYTU聥5 4U盲~4U陇~4U~4$6TU聧54U!44B忙4B盲~[!4U~4UD~4U~4U聢~4$6TU聦54U!44B聠4B聞~[!44U<~4U4~$5 4U"U聵#$544"聠Y!454U^!44<J44<(J454U~84颅U聰N!#%\'+/37?GOWgw聡聴路脳梅U盲;U聰9$%& !"#'],['dynEncode0014u聡聛*t聯聯聯t聯聯聯聯聯t聯聯聯聯$#聯U陇陇聯U陇陇3聛y聛聝聠聧聞聣zzss|yu聞svu聡y脷&聢聯4<054<,5T44^T44<(6U~J(44< ~A544U~6J0444聢聠545 444J0444聣J,4U聯4聢U聯聡聟脪聯7U45聯4U4Z聯4U4U^/6545T4T44BU聢~64CU~O4U54U~5 U5T4B4Z!4U~5U5U5T4U~6U4ZTU5U5T44~4O4U2ZTU5T44Z!4B6T44U聢~64B6U~O44U聢~4O4U~54U~5 44~C4~54U~5 44~5454U聢4B6Ub!444~UO4U~5 聯U5聯4U4ZTU聤#44U$4聠64<4~B6^聯4<444~U聢~B4U~54U聢544~544~U聢5 碌聯U盲#UJU猫#5TT4U0ZTTUX5U5T4T4U脿#~4OU4U聽$~C聢4~54U~5 T44$6U\\!TTT4UaT4<6T4<64<Z!44~4N4<U~5 4U聰Z!4U卤_TU聤#44U聲U聢6U脭~B$544$6U\\!4U聢6U陇#~B44U盲#~B$~64<6_TU聣#444U聰~B~6~54<Y!44<_!T4Y!4<64~444~AN44<U~6J4U5 44J4U聰[!U#44U聤O4U~54U~5 U54 聯7U6844J44J 4UJ4UJ04VK(44<J44<J$4U麓~54U~5 4U陇~5!TTT4U$5"U聯5TTTTTTT4U$"4VK,U54<(6U~64<$6_!4< 64~6A54A544U~6#J(U聮54A4U聡[!44J(44#~A4U聢6U聯聡U聤U聟[!44聠64~64_!4<64~54<6T4<4]TU5 T4Y!44~44~AN4U~54U~54U5 44J(44J U脛A!U5U聰#U么JU"U脭JU聹#U脭"JU聵#U麓"JT4U麓ZTU5T4U么ZTU5T4UDZTU5T4U$[T44~UO4U~5 U脭U么4U~U麓$.U5T4UP[T4U~4~UO4U~5 U聵#<U聹#<4U~U2$.U脛UN 44 ~UO4U~5 44!~UO4U~5 4U~4~UO4U~5 44J44J(U5 44U陇~J@44U盲~J<44UD~J844U~J44U$54U$5U聭54U$54U1^4U1^聠!4U聲~54U~5U聰54U~6U4U^/65T4T4U$54U~4BU聢~4O4U54U~5 UU\'464U\'_/54U聢U聰~5T4T4U~4BU聢~UO4U54U~5 U聬54U盲~4U陇~4U~U\'$!44~5U5T44\\T44U<~$6U\\!4U#aT4U~4U聢~4O4U~5 U5U5U5TTT4U$"4YTU聫5 4U聢4~C5U5 U5U5444$4~64~\\TU聨5 4U~4U聢~5T4Y!44O4U~54U~54U5 4CYTU聥5 4U盲~4U陇~4U~4$6TU聧54U\\!44B忙4B盲~[!4U~4UD~4U~4U聢~4$6TU聦54U\\!44B聠4B聞~[!44U<~4U4~$5 4U"U聵#$544"聠Y!454U^!44<J44<(J454U~84颅U聰N!#%\'+/37?GOWgw聡聴路脳梅U盲;U聰9$%& !"#'])));DJ.getModule(DJ,i).then((function(e){return WebAssembly.instantiate(e,{})})).then((function(i){var r=i.exports,a=new Map(Object.entries(r)),o=a.get("puff"),s=a.get("memory").buffer,c=new n(s),u=new DataView(s),d=a.get("__heap_base"),l=e.length,h=d;d+=4,u.setInt32(h,l,!0);var p=d;d+=l,c.set(e,p);var f=d;d+=4,u.setInt32(f,c.byteLength-d,!0),o(d,f,p,h),t(c.slice(d,d+u.getInt32(f,!0)))}))}))}}}),Object.defineProperty(this,"wasm",{enumerable:!0,get:function(){return t._wasm}}),this.getOutputChannels=function(e,t,n){for(var i=[],r=0;r<t;)i.push(e.slice(r*n,r++*n+n));return i},this.allocateTypedArray=function(e,n){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t._wasm._malloc(n.BYTES_PER_ELEMENT*e);return i&&t._pointers.add(r),{ptr:r,len:e,buf:new n(t._wasm.HEAP,r,e)}},this.free=function(e){t._pointers.forEach((function(e){t._wasm._free(e)})),t._pointers.clear()},this.instantiate=function(){var r=e._module,a=e._EmscriptenWASM,o=e._inputSize,s=e._outputChannels,c=e._outputChannelSize;return r&&DJ.setModule(a,r),t._wasm=new a(DJ).instantiate(),t._pointers=new Set,t._wasm.ready.then((function(){return o&&(e._input=t.allocateTypedArray(o,n)),c&&(e._output=t.allocateTypedArray(s*c,i)),t}))}}AJ({target:"Object",stat:!0,forced:Object.defineProperty!==PJ,sham:!xJ},{defineProperty:PJ});var MJ=["id"],OJ=function(e){d(u,e);var t,i,r,s=g(u);function u(e,t,n,i){var r;o(this,u),DJ.modules||new DJ;var a=DJ.modules.get(n);if(!a){var c="'use strict';"+"(".concat(function(e,t,n){var i,r,a=new Promise((function(e){r=e}));self.onmessage=function(o){var s,c=o.data,u=c.id,d=c.command,l=c.data,h=a,p={id:u};"init"===d?(Object.defineProperties(e,{WASMAudioDecoderCommon:{value:t},EmscriptenWASM:{value:n},module:{value:l.module},isWebWorker:{value:!0}}),i=new e(l.options),r()):"free"===d?i.free():"ready"===d?h=h.then((function(){return i.ready})):"reset"===d?h=h.then((function(){return i.reset()})):(Object.assign(p,i[d](Array.isArray(l)?l.map((function(e){return new Uint8Array(e)})):new Uint8Array(l))),s=p.channelData.map((function(e){return e.buffer}))),h.then((function(){return self.postMessage(p,s)}))}}.toString(),")(").concat(n,", ").concat(DJ,", ").concat(i,")"),d="text/javascript";try{a=URL.createObjectURL(new Blob([c],{type:d}))}catch(l){a="data:".concat(d,";base64,").concat(Buffer.from(c).toString("base64"))}DJ.modules.set(n,a)}return(r=s.call(this,a,{name:t}))._id=Number.MIN_SAFE_INTEGER,r._enqueuedOperations=new Map,r.onmessage=function(e){var t=e.data,n=t.id,i=v(t,MJ);r._enqueuedOperations.get(n)(i),r._enqueuedOperations.delete(n)},new i(DJ).getModule().then((function(t){r._postToDecoder("init",{module:t,options:e})})),r}return c(u,[{key:"_postToDecoder",value:(r=a(n().mark((function e(t,i){var r=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){r.postMessage({command:t,id:r._id,data:i}),r._enqueuedOperations.set(r._id++,e)})));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return r.apply(this,arguments)})},{key:"ready",get:function(){return this._postToDecoder("ready")}},{key:"free",value:(i=a(n().mark((function e(){var t=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._postToDecoder("free").finally((function(){t.terminate()}));case 2:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"reset",value:(t=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._postToDecoder("reset");case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),u}(m(Worker));(0,HF.exports)("Int8",(function(e){return function(t,n,i){return e(this,t,n,i)}})),(0,HF.exports)("Int16",(function(e){return function(t,n,i){return e(this,t,n,i)}})),(0,HF.exports)("Int32",(function(e){return function(t,n,i){return e(this,t,n,i)}})),(0,HF.exports)("Uint16",(function(e){return function(t,n,i){return e(this,t,n,i)}})),(0,HF.exports)("Uint32",(function(e){return function(t,n,i){return e(this,t,n,i)}})),(0,HF.exports)("Float64",(function(e){return function(t,n,i){return e(this,t,n,i)}}));var NJ,LJ=Eo;function UJ(e){var t,n,i,r=this;function a(){}for(var o=new Uint8Array(123),s=25;s>=0;--s)o[48+s]=52+s,o[65+s]=s,o[97+s]=26+s;o[43]=62,o[47]=63,UJ.wasm||Object.defineProperty(UJ,"wasm",{get:function(){return String.raw(NJ||(NJ=b([void 0],["dynEncode0095\t%j漏脰楼脮=聽[眉c貌卢\fqr脴脥\fT聬脩庐]碌+隆]聶聧脷每KM&聝矛脙脜FJ聲麓玫1_搂=聽戮聤A-T赂陆脢\"脰镁k脻盲8聟脛氓录?脵qV2;聬聝C脷xC:毛a帽jk漏(4'锚脜<i)+帽赂聯+脡F脼A聺+yD聝脡脿聣X聴脮聮篓脥聳.3(b\b聼脻d镁聺=M\v禄聺聲脳\n聼茂聻5脗玫5\vU脜脺%脥聶=}8}y+-脦碌楼}拢莽脵5-職'脩聺N聺娄職聤聻颅颅脵戮芒X楼83sS%6脭镁娄聻虏娄聵聤X聶脿Q聬vh_7茂!脠聶脥聽脠脥聹H脥陇rM聲\bM聺聢M聶8M!%S聬W脠職N\t\t聦\"Q+脨拢卤脧每x聳聹B.聼I铆酶每每L聝聡[脴N猫聻脹拢每)酶{}脤k 聞脥=M聼u炉媒i貌帽A镁脳R茅陋=}毛茂脮+镁禄SPH忙,P垄氓z聝2Z聟Q聲=聽)U篓颅录脝脪Z脹N<q=}b猫0忙,<脙8脫盲脹脴3!1录眉\teh脰883#炉2聣\tg}A<H脹卢脪貌脡Ow~f垄盲脤\tG脨脿j霉j^職脛@i脕D聽聭R聤篓p脕?4茅(|-~y聡聣LJ锚聡莽貌3聞P脼赂Q聸媒脵l!聧炉聟t锚\tX茂x掳v贸虏麓\\F:prh脡hr8聥媒鹿X陆k>CB%聜虏聹2\vC脷拢脩没{l脠卢y脻茂#聭=M庐QaQa!聯酶....庐C聦聬iI\\拢聮卤芒锚矛2脧茅?O聢;聬~脌拢脙陆聯颅麓脻聲芒n3脵聬禄枚么谩q卤脥禄禄*脵{@茂5/聳脙[脫&聢茅猫陆颅Rm聤脵聫聞$W}聲卤贸?聴谩脧聵聺<\"酶赂媒脩脤I聶u\"芦\\脼=}L脥楼聳脜猫U=M1梅聦脝#录聭芒枚贸K脺驴\b@聳脨E脛#铆=}X脪貌v梅5^\n炉RG聵脩o聳鲁f没A芒B芒聻uO冒脣聝脺Oso卤陋庐t镁#帽HR戮铆娄脢聥贸@脨脝=MQ\f脵0茂0帽掳搂卢聲聻+r聫锚T冒de么N脴K<0聸聻聥聧锚盲聶R%聬氓脥么#聠碌f脨9聬聡漏脹8聵]卢篓/脣 麓1聬o脣2mu>%脻>HX聸$聧戮聟冒漏录聰聽a聤t猫隆e脣R芦/脙S脤聻(聬聵=}Z聥脣1q氓猫聢6禄3@楼聟t\0脜虏拢ws脜卤脹X枚+聹掳聯聡聤~脜芒X聯脜垄聼脩脌38聯5驴P聲玫镁聦9玫ix脜楼锚m炉驴聸聰z脛x聳梅聢_V冒C娄脻P锚p=M@#)聮L茂職拢D毛聵脗=聽聭贸铆聹y掳娄聸?Y聭路m聲脦脺酶(}碌酶%脤聲脣冒脰脭kN\"聙猫b{I茫$脼脥tN9N贸聵媒k脵P媒/麓陇没脗貌每l禄聢X脰\0梅聛g/贸T脿nn3-漏i颅9脳脕I.聲聫聫聤聙麓聰枚u垄聽G录X\f鹿聤枚7聻娄聴t脳]茅炉脿=聽y芒6搂D没脳ZD聴忙脤L毛聥s漏脴盲脝搂脴聣+p\b陋E9隆t漏貌=}}聶}脹8脛&脜脹l脗a脥驴S脠聽聬cx#-潞\\P>~脣聤U隆庐漏脛\0o脵楼_\\0楼\b聻冒霉脽眉pT聶脭}\b颅盲X禄qNY脌脨=M0媒@聴\f脼颅聻\f聙聧颅.芒谩tv&梅驴Lg聡炉I-聴脪眉F冒脛酶露聫\f陇垄/:2{Hdh:f$聦麓mD.漏qk脳驴rk铆?脪(脥贸莽聜oG聻V芦戮Sa[卤=}+'\t聣{陇赂禄)&玫f鲁)&Ue隆]脿G脌聵%W=MI猫脷=}脦m脟=聽媒聲脻聼-ye)G聛\b枚^*;陆]聵- 贸聸颅每職搂鲁脷戮U1)聤聨聴V@Dcj搂铆V鹿)=聽5脫脵聮PV脨脜c=ME聴1f聞脙锚f聮垄谩麓脮帽霉篓La[脠聺O每+o{脨猫0聢脽eX楼脕脳脼e-G<篓聣[.>脝tX聺莽路q莽k没<o\n麓!聢a聹i盲搂聞毛聴毛脫脷$眉脟聟聤|冒猫'=}莽@N陋9聸脭露脫铆路^脙T戮nzL录@盲露芦麓莽x(聯脹聲脫s脻2o脜脪o脻颅么I@脪冒i=聽聴篓pl聮盲脻潞&&8脳聧c'虏聥禄0聛脼\b=聽.媒L没3q楼脴聮眉\t9脻*篓f聰脳(聵么fX漏隆霉脪录脟*聭禄z\"Q6脌3脰聵陇s拢贸r脝聵脩陋d脪4?W垄,聦p=聽陋*\n枚7{聬聵脡R{聦没職镁聢)露聸聵{lK脗聯\b}脿;gY谩锚聛kK聦搂脣<\\楼聴[脡脺梅0Q脮么脳F聣玫颅6\\盲戮脢\v卢v没矛w\0^聧e+脼ey聲脢m脜聡dJ脙Bl}脝t\0E聶+F脗\0(颅聴茫Uw聻禄=M脜!茅8~S聜脢zS=聽戮碌娄v<煤脮聬O聤(聳\"}漏=}0t陇<Z聞B脹z脰聥v氓!谩聜&赂聽7~露禄@脵陋脠茅么煤脛職盲\\隆m聭聵猫M脵酶ym!脡茅鲁茂脻聤聹'脣聹隆,*)玫L盲脿R贸V拢聹脢脽酶媒\b氓j谩_芦Kj3聼kk莽H脵V麓脣\x000F<聼脽莽$脪$?碌脤y脮9-茂脛脕楼镁.脟每u陇;eG\vt脹\t漏h$帽yN聴拢戮}wE卯\0脦o脧聢+-=M脜=M9B脤^脛脡^4r\0茅jr聽掳霉6職聲2-聳0聭\bb聼p聧\bb驴pF戮n)禄录卢a聼隆sL聹脥脢F聦d職!!脦脻潞'茫聦;禄录聮q镁(=}J镁HS录~#脰+贸鲁眉聠聢脤脰霉锚鹿X聮脼|戮<K9梅脡聠Iu脟枚G脼r脭)YfPcskY;-Yt脣5=聽V,P楼1脽聳漏脪卯*聛禄戮卤F露梅脷卯每V猫'漏v[陋\\脟-u聹聮聜y脗虏卤\0矛M脣脵拢@陇忙lP'帽脠芦聺潞么猫炉聹驴煤7赂(t露脳禄Qgf聴聵 聥脰=}莽莽鹿i酶玫6tg聸冒J庐聥jW聸E庐pD麓I2脦脝脴脹卤T每每~酶猫\0麓W聹;聞h霉聵脢虏5^\v/聭炉os脫E聛禄g脺\t&脴z么zGe露聫脥赂卯s谩脡聠聶掳o录\"茫脹聤脴搂炉颅M脼聲麓/炉\bN{陆0聬脜禄})r驴聭枚X聼[聤i隆j,每r聹脪聤娄脌枚虏脦1谩\"潞聧0A聫聫G聡f!48脜脧e脷莽W锚聶b脼G脕5媒矛m眉0掳-么帽赂^|脫聰脗t聭w掳没j娄O聠7聮聟聬脫vYt卢聻戮脿c脭聝漏O脿脗脥聦3脜脹Z脕N}卯戮霉j聤霉zts脡脰N聞nPk矛N楼煤拢h脮^脪聢x聛脺篓*T聻脽@4!聮露J聙麓茅m楼聶.m%脥脫lC_垄脽脵#_b掳{聺$Q猫铆脝q聹聵漏>盲&聫驴搂陋聫貌聙茅碌聵%$脗娄D脮每P路脌脤聺9禄聴矛k镁聴聙鹿脡=聽'聠W氓\"茫S掳聥-X脷玫媒qV娄E脳UzXM聝x颅\v芒脻铆拢tI颅k_m垄脳聭T職聥拢L8q篓職T脝=聽)每路'E锚聳脳陆X{s脕i禄3P6Ku芦F霉[聹路脌_r?脽*8贸脗路氓聸篓玫Y^脵酶篓^f脜e谩么聞脢脗>脤脮脼D录玫聭铆脕6C脳氓脠脮W&T鲁聸聥bUr聶芒u.隆!gT脧聜脼C篓脭聥聴\\脥聲~a聲脳禄聯n芦脵帽脽脰陇陆么職u聸聬qg帽 霉7}r\"Iut聥貌脻聽聡F\"A-颅脮氓+潞脳9脢卢j脺酶聝玫W\"脦Q5\\T職脳r铆脺=}B4+_jX>脵隆聤\b聛脢聹聢}U霉[酶脼聵脫拢聟脥忙脿I氓_{!垄q脷玫@眉2聫庐>(脷g{么脺/^T職5TX碌10聳聽垄霉鲁聢玫莽聴R脻S芒g卤脡茅玫脽P铆聡=M聛露\"掳A'?矛禄;!聣=M忙r聼!鲁路%s酶職s脙脧芦+卤S茅矛脌掳漏聲脽聲v卤聦%楼Ie驴氓脳聝\n脜Z\v脤聤猫聞镁漏=}Hg;镁*聣聮6A+s'0D\v霉聨眉聴\\没w脦.0LP\"'聯脿媒聸炉脨聳脴脵媒聵脻DH篓pt./聼炉枚O>聶聽聞*谩聠脗聳4脟r聹0潞聮Lx镁茂-S毛脥霉路\nw>L芒聨R聯麓el聡芒录7芒芒^7鹿ew'锚娄聸脦脪录垄氓脝聳X\0脨5脮RQ脜脰聝.OU茂a!聜a脡聟隆\v1脧X脗芦垄矛聡c\0脪脜脗@聞\0脕脳HOJ聠#聜Hc聬炉R=聽脥脣聙娄脟FN脳脵脩0聸o職 脵聸q[Mj聲Ao每Q脭么禄R聫虏Ky楼聜谩帽e\bNRJ聨^!脥脡職盲忙脤e6脪聠s|sP3@E煤聣;聫镁毛4玫\"聟茅f脛贸脿~脌,脌聤A=}J脝聤炉枚L;脛\n矛聢聠莽脝T#|jQCv貌$碌;莽没vS脺毛f脜毛贸?=}聞l么職盲\"陇茅脪脕猫卯赂5x露漏聵聣脩C煤脵碌E\"聲脻茫茂$]D7脜脮篓脜禄5聵hP鲁c?陇聴矛9脮娄矛脵聡f聴?sR卢~脪脣脪潞Eg聵\f脩霉鹿露聫聰X陆脦脫卤脩脧聜陋n鲁y聹聯聝!=聽8脗(聤帽聢<[碌{$.聣q^o[脜:|脌|0禄卢o脜\f脙s聲]聥镁铆拢E聰脼聛rX脣t聸聦茅)聽露K聧9-帽T[rC脮}v聤N{聙脨5卢m)&毛脛枚0卤R聭聶fy\vuA脹 茫R=聽R盲隆rw矛貌谩0脣T炉I聴e\n=}聬颅脧\\H娄眉脴a貌U脻脰聟聦W9Ef眉b聯!驴路(聛脴聫娄禄 贸x庐u聰L芦G聽虏聮脛\0k;脙6篓1<陆脻[[锚[垄\"qR_枚脌R脴Z聙S/聙|2bg聲M#脪聶聽脌脩}梅聧娄楼 脽聟M聺毛脫x赂聰職聝c脦聨D聼0貌隆聯卤)~<芒茫聥露忙聫V聰4&&酶篓脳R~脷毛聠么=}{<聴楼~9}V脛j篓W茫-\t聝脫漏聴脨矛聞庐<聙脠/UmE,?聺聻脠P聠3#颅脛聣虏脼陆霉脺脷#铆脺<赂楼&脴莽聢A聦g聳s\"聡Q聽禄#9脛-\v脫聴聠n!=M!\t\\\tF聨\fp脠芒d脫IZ隆脷枚D}n赂,脠芒I眉鲁脮脌Q聶脌脙脣脺tr聣没\v聯\0脳脩聺芒聹麓脢脙V$聠脦脿聤!KF#禄卢毛炉b4K聦NYb鲁bU聟帽聽*56P脙E聭a脣F-m:聭X脕眉聧L脢>矛rr脫脗聻-脺eG路聽r聤L露鹿脡楼P掳kW8N陋0\f脻路赂脙谩av脟脌yS{|H=聽脰dq录赂!酶篓鲁U'18虏^聵p篓隆<#聨H[鲁E)e卤+脭露貌脥聯=聽5毛潞!戮茅A脧聳*么aE卯搂8RA脧卢Ay脦聲虏脮茂s庐驴茅7聹没{虏脮聫聳碌#脠聣=}路楼B<聥枚聢M脩Q娄氓脙脟聝9聺=聽聳z脪Qz贸n\"鹿C聼c聢搂聯e卤|脳娄-V谩茅T庐[NWk@\\聝脹脝%&鲁颅聡脥na聠禄\b2b/EX聞,an8卤帽庐芦Of\t脙貌,=M驴脦ud脳脥a\ny拢聢聞垄^陋聝U每每L卢茅陆\vQC聰聴陇酶4眉c篓s\"芒炉聺聯K录脩W4:脼梅脛\\b聤脭么聙聲cBC聨+1脝路O9聨麓聙H{kH脗貌脛玫U茂脴piB脦聴聭]露冒聟梅\b鲁脕$y枚/EoN么梅聢茫毛聻聧\0u<4%谩聜氓c聥颅脪聤酶搂脦[,l篓脦脳\f谩脰聶~聭脟7+脰聢^没k搂聧P脺'脙i漏Q聻D脤8麓T陆戮bP聸帽冒脭聠漏垄&聵虏職\0路脫SyU\\!=}+=聽聸=聽&聞聸煤Go忙\\S:b卢Q没-\\G炉_铆<脤&^聧茫娄\0庐脝脕脙e炉枚鲁b;脣x脌陋W.^EE聶;Cr鲁M聙yG霉|70脡8聣帽聣聮8{ 虏脦潞铆脣脪0脢Z\t-卤myAVs聣聼c{聝聼M)聶6驴8毛+聮卯脢^聛帽聣么脹脟脩陋聴\b/脩XYa卤聤sN脕脴驴脣c录!鹿颅脕\\Cx_聭h8脧q聹聯垄茫脷脢n聶盲脭茫媒禄o聨聠麓聻C玫陋脮聡{聥麓Po脜\f氓露茂谩7脴pb聮聼\v脛gcB脛聽N茅莽脙Rrp聳聦1 聯脺9掳E庐u氓k隆没脜陋2脗聦露2y媒陋聢j>wPOt脣脤聸聜X聳隆z聰脵脕潞露{芦+'P脤脠)芦禄聣楼忙娄炉聠娄脨脴聟@拢5\\娄^聮=聽脰霉聴貌聦n\bf录脺]$脤%麓d脩鲁r聛%ya芦Z聴么么聶*脷氓楼~5聯脺v6聯聵5P6聼職N脢聹聨脭D聹^脩B脤職^0\t禄聻脳聽镁*聺陋芦脜d1~E+P没脕No&露#:\f聢P+脥p隆D聜脽聯}[鹿聝A脼P脠玫聸u莽a鹿(:卯 录露3脝o_=M脿茂E04u]O聢隆鲁脹=M]i楼虏聵没脳脩麓z]颅聭^脠b麓1V聺脩9脛p霉gq脧h聭_庐脼禄Gqy,娄ZSy脽猫uA/聠隆脹脡WG盲SD聨聜脺聲聠6=}聹F聼玫4Sv脰猫酶潞聛酶i聭聫镁(b篓脥聲脿M铆楼枚漏路聣梅?聨聻I9ZF脳聯T拢*聤j脳盲聸麓脰梅脭\"^拢谩聙聙n聯=聽聳贸路|脻聙帽\v聣卤9脰P隆聽[聡莽/k脡脙脻n脜hH镁霉聸聤聳酶C 路没5眉聸脙聸=}麓S}脙|庐谩脻猫脤?^h聦么i聥pn聡n芦Ts0x酶脫陆G脰X聴聶掳脕脺聽猫職毛聸虏茫g<bB脛没]\f/脦陇j\vV娄脴脫脡梅|聝帽脜聲6陇霉0聺么=}脻/聞麓J禄聙c1聢h8毛聝W炉脽隆Qi'庐o聸聜cd聮聫媒C.露枚i隆B霉脝麓霉3卤g脹聣p赂e聫x&shg|脤Z9酶[聴^煤\\c聵鹿聶聺jT隆卯隆聥镁kQ聭uX隆*枚每脫\f\t卤\n,聹聽脟聲聻聥聲m卯%路\f>]HB脥\b掳驴Jx枚5颅聙{T1芒>(茅聤聶脟猫S潞\v卤nzk茅漏芦聢=聽聽'脜x脹a露Xt聮AN3I聤么*聼Hu酶脜聟l1脳卤聻脻\b卯漏Ev脝媒J=}聰脧,脮聥卯枚m脵|冒拢铆聰\"禄*脷F茅驴oe玫枚$Q&脹S聼卢颅@j卤~$脦脿g聣i#盲鲁j陋u脝B庐脕j<WT=M脙O3媒聰脨f聰,聻禄脣聳^\f聤?聜路>聴聫拢脼聮脡虏W戮聬h麓聡脙=}脫聠=聽垄茂聧聙眉脭+聯聫~聛脜M\\茅_聳 聳聬za聢n=聽\v0卤Th隆聳聯麓脹>聛忙脭芒i_玫F拢掳/聹職D隆陋E58z隆媒麓g帽eMut聡掳J脺C 拢Q6)e篓=}隆q鲁^聼\b\n贸聸Yc茂i炉脝脟M鹿矛D脦=聽聝?聺h聹LZ5聽聴脻聣聹拢脢h聲聥卯{W脨聶/=}脜庐氓3霉芒(X脟D枚陆,娄卯k脠)G脺酶漏_聧聙Ltc\v=M脕KUm\\脫聠H#\v;霉9盲猫G脛g聫\b酶@脝a\bB2玫v脟 [聼聲4R聴脮聬娄赂芒露f煤脴眉d:d\\聢脤z聻K禄,w炉戮2w聹Z脪k聦潞~聟脫鹿\b脠脣z0x潞A锚XrZ*碌脤#盲枚露脡脹$聛脣脺聥脮玫|聽谩铆v拢$聧脣z聜脼zG聙茅-聼陆聞06聬掳|&g氓眉每r茂谩卤卢聯}pV脗芦/L>路隆S聰聧锚脩脣m脝玫聳Rt3mJ\0卤冒戮脫聲^聙6霉h卯聢2D脝芒脢脦Fp霉^掳bA枚聨A媒聽m&贸a|脟kE脠镁9J掳茅|禄莽1脌聺\\聧冒OT脪-o篓e聦脹0t镁脙聻\tp聠聼-3=聽'脟aB脼驴!芒^禄GhODW帽脕茂8搂<脴if隆\v聜聠{眉>聟聦/聟陋聴莽R猫煤脰\vv脭脕N盲[茂脺a/D職]聬娄h颅镁b铆茫M聻z聳脫A赂@;%聶聝莽氓脙z:茅贸脽露P脠'L;玫冒脽=聽莽Y8H庐t*脤X貌^霉a聝P卯谩&.禄p聞QZ脢戮聲?+P脨it卢禄霉Y6y脢脦m聸茅矛脧\\:梅聼茅帽X脴I煤毛赂o镁職芦GH庐盲j聬V貌露@,i#6拢H脙脦氓霉y\nH聤聽Y聤霉2/.ob聲聴梅脳m戮聺+莽聦脪|脪B卤录\n卯脴n脣r聺聽(聻么bg脿戮聟霉篓O茫z茅r貌搂聵篓聸Nr锚脻@枚聶贸聵kl霉聼脥脩'驴脵聞梅[u((锚聝4|录忙脜@掳脜Bz芦%d脥脣芒6聣聟脪陋麓麓w9帽@戮R铆Ua戮/掳眉脢F茅聴)聙芒脡脢$_脧j聣陆庐E碌K脴I潞5d煤(驴fL聻 c%脣U脭\f脳聰d\t卤脙聠帽\\聽茅搂C谩M聬聙}ph脮$脳毛陆v脽x脩\"聬聭G脨芒yq镁^脪T脜91庐脦虏X酶rdn聴0U脰脫脿vb\x000搂/Yn脦L}碌莽脳=}聙脣\b脹z谩?鲁冒7聸|脣)p脴贸i-铆L9聶cv聽聤脫玫\b脹聝娄@L\\聝\fw&s酶帽\0c7脧聽0k\\陋驴>卤聨~帽聹毛貌拢漏芦}脼{}脺铆脷盲聜y[驴脼卤聫篓聺芒B脿聶d4脤楼P氓&l陇酶脮茂聮漏陇脴陆:脢\\聤0聧^upqpx聯X}mWRbf锚脣4|[I聹氓脼^忙n脣4脩P聵眉*脼脌* (莽谩?戮盲禄f脫脤.聟茅1脛w搂.脻贸脭A\\V谩戮聲露聼媒e禄茫Zx戮聙隆4聻貌聻脽聮c么聞j$\t脌r猫露=聽f没脹6脻脷聫[陋\\么#聝脤P脩^楼c(%^聫脌锚E麓d0d脦聧Xd录聣0冒聣^=MC脼录聺e玫[脣潞\\脝Y陆4枚脛E脨脿m虏e镁脹H聝(F篓脟;lb楼聴脼P陋脛脿6脦$娄聶~脗};聟8酶脮-\f脜脙v梅聴聵谩=M聶玫茂r/脜脢聨聞bQ陋>颅/盲陆聠L脨脝卯聰陇矛脟脣聦脥d猫娄聬職W脮zL\t.冒聫聹戮X隆{盲\\贸(=}聡聳脧聟Y0聞氓茅=}dS聰脡\n芒k,*戮\f|聞冒聰脥-6氓茅芦r|聤=}\"卯聰]聶聸聼脨脪每茫e忙聤8E隆枚陆X碌L聻眉芒6聴qY聧;卤l'\\聙=}0茂\\i脧录聯聽>p脫脫[脥酶~L職聫帽w庐K7禄&6聬o脗脵垄r脦脨贸\b\t聤*@陆Tr脼p\b矛矛<脙脦聝卤路聠么脣庐聣铆_&麓6K聙>聟聦/9脵S脢鹿禄莽脰<-脰聰$聧k麓聻没b脛聜d\v陇脰r脽禄脳芒*驴脕脠:驴Y卤|庐Ld脠E>N陋iF脝d氓脡盲脳聣眉k脷篓.,6帽oU8m/(uT聨脨脨B@媒芦d脕搂0\t聽聢霉脭梅脙|q麓脜鹿C聝W\v脼脳眉盲贸聮\\聣b~C@脺聛_P聜驴RVw聳5聳毛没莽}陋脷w?&;/芦镁炉聯74NbYKWj聲玫|聦聞U聴職卤隆u聝煤=}毛Q禄.ot聫盲\0鹿聹卯脼脻镁 谩陋e每S@忙:m\0}陆l脼u聵脝6I盲聶聳N脙帽脣忙卯毛2脕脦\fwt聴\n聲<聲聟聳-E聸h0脢煤oc聡~h么P=Mt脺聭聰{玫镁N录脌脗露卢職)锚F1T$n>(G锚脽V茫_锚\\聜?(:('I@+C脡眉碌=}锚聴没锚脻i铆么G庐脢茫W脭;Ah猫G路芦^?x脺鲁聙K脷聡卯=聽脥8+lisj煤脰脰8V聧'没D芦脪碌每\n聞鲁盲7c脵HP聵Y$脢聯T虏聰锚$脩陋聯聵脼N}么#{脛聼聭脧聛脧C脰脫\v|茅卢R铆i梅P茫[9莽脼R隆g每O聸3v脴3聫S驴Q 聲/脥聺L7氓脕鹿-\to戮脼yI!=聽锚聶鲁拢Ke=M職梅脳\nyCr脣Q鲁lc=M聟?S貌:脣Bl没R谩镁聞~聭脣cS贸0G職sy:聫聸oH3c\b.貌镁<職莽Tj莽:D]脼颅茂pL露脮脠**聫潞脦~拢#<W$聺w脩聻媒脨 聶@;陆茅QU盲聻脳聫茂\fC-茫a芒u<-\v*漏聫帽\\2u脕脢陆眉茫聭贸E*=聽聲聠z,媒脗_L脗脡-鲁,JGs脣脦玫铆聥聭篓(F聨脺禄眉聢陇谩_{聞.垄脣\\A聠z4陋@45猫x@\t<J.A脧忙e赂卢5虏盲Pn\"卯聙<f聤h聨2~I0脹l盲,\f;聢炉貌脭貌t.cO镁\t脦聜D炉u\t酶F-8脹玫戮玫掳陇-y脠',脹聡-gd脌贸么f卢没芒Q3禄bU.h聸脌sa脌脕脿$聵脭/脢酶n卤脠<m卤脝$F卯脢盲E庐0录n!a镁脣Jbe脩b;脡dE庐-眉ny{卤0i脩d禄脣聞梅篓.脿聴\bn冒w4露聠脭脌脹脭z脷H枚脣陇0潞脣眉芒[{镁(聧R脽=}3=聽脠聨HB脭jwV~d}禄贸矛,|聜,5[脳貌莽=}!X聞Jf\nX铆[ON|P脦\trq搂dbefv\br'芒聙{3聜{e\n\b脦4.\nF聧.媒9O0脴lb:卤每[拢f2脛脦梅rq~拢貌c.i^帽LSg聬脠芒聜贸路b铆l脩nB脰\f#DkN录O脦\t|\b:c脪kb6脨4=聽\n聝茅脤聝脙k脦眉c\v\b脻1冒2\n脨K聨脛聣冒n|脨聹,聭脛脣冒篓e聲脭+聽脗f9BReMD[脛聧1聲L娄芦G脫\f么um脢#陋脣6猫)G脳tV\t}#脽聫脙U贸露脴 拢隆庐脟聰卤rS聮6冒篓0#\f2%脴z脿脩ZX脣录禄P\\Z隆聯陋聫\"=}@)#^脼c3i每\\脵?k虏梅聼GYpG脺卯脝卯庐漏脰露脛聠聙鲁聤t忙^G卤聫聣\f脿I聮聫娄没=M脌\\卢卢%qX聤陋麓|Z/芒脰 fq{聴S脼毛'脜脛脺陋a麓+芒露梅+聞茅[酶P脵芦=M聳脛卢聝=聽2聤么)S#4 S帽聼谩脤聯芦聡\nA貌\fdN茫脿铆氓9?TRJ脩拢脴$*9聯聺茫脿o聧\v脜聢;y聫颅么K ,脧茫聙霉m卢957锚卤氓脳脗聣iV\t>Z聻\"么KE職F每W脩戮庐脨nr铆|庐fO锚漏楼0+聙聦p'af脝脩聦Fi脴b卤铆q'聼jNU$?u聢Z鹿r>+没dq3虏霉铆冒F颅聭盲I^毛驴陋庐盲)颅禄!:脳脮脿芦聳聦zT聧炉聳Rz聡fn聝毛谩a.09M|陆聛聽>%矛脨=聽碌s2氓?\"5>rV聤脭颅\n脟么\t#卯聤0聥\t}q,眉1\n,聤\\聢j陋鲁隆0HkG脝戮聦7聨茂聽l聮脠i脪冒'f脤卢\fqz脥录A茅猫{Z霉\f?L脦录0脨聺c没鹿jCk脮t(s眉/鹿聼V?職9x垄\t铆w|禄聹聫煤脠&聼脮赂Q脤陋s脣s拢聞Q聨q脤脡煤聦茂霉隆聯!3么脺楼脻i=M聨OHi娄聟Gx脛聛聞iIG聛(D9卤帽'脫BSP碌>聟聭p聟<聣玫潞31E聟K盲g篓u'聣h/9盲媒'贸h鹿R7脼聫M禄镁8脼聫9禄~\n芒g0/9麓j鹿RV没5>脫l茅4每?$脢j脺/聵9\nt眉脻聭卯娄芒gW鹿貌Gm霉c/1bh;聡??脡聨]H脡}Z聣脴垄U聠.7\\聢脡脡S脌垄z/m卯a脮陋猫I0脨jb6录@p脨.p\v脿脣脢@D\v\b}ON莽聢聲脨/聴O潞梅rq8r卤O\f莽聣没,wej潞貌贸聞{ej漏脺\bb镁9|眉脡脪矛谩c|脜^每脨z1W4聛聨聣聝u脟r帽>\b\\P脦\t\nC脿d脌r卤O脧l:|J拢r聨帽5\b录O脦\tt脕脪</3h聣隆\b%h脙12赂C?J<脢脺4k卤b脮盲#脫b脝bf;'\b莽f脦#OYjEPG毛脨/u梅=聽陋谩每脽=M3录聙N,T脙卯酶kB\fT聝聮U~Z,聵冒脙0,颅c聧7聶脹脩脣聨脪脫聬) )脫,聤毛聤脭煤聜脭uy?C脩Q贸A矛聤?O么LO冒r貌聼|脪霉隆G聶聴霉U-茅楼炉眉聶c(脴锚脠脨'煤脣聳梅聰x^聭眉f3卤聭n卤禄|\"聥c{貌p=聽y1\bm1\f脪{聦聮dP貌锚聺\"n}O聞s聝R|3脫|帽脵脻碌玫卯脠J\0贸没莽A垄|M聺@聳脩K{茅PD脧聞盲osR脢碌z|潞?Y聼楼茂铆Y每脝k锚聸*禄霉_(枚聟霉聫脫d\"tD眉脣谩;.3脝脷戮猫陆2~每脫聴=M聦聽/帽聹垄聵1\"j/脌脝毛\0+pG脧[聳脢聸x聶脭聶\v麓D贸DK3oS\\脰>/l脡露Q眉=聽矛芦脫2聢脳猫脥聥脢脭庐\v脥聜聳B垄Q莽q猫\b脠8Zb录芒\b脛W聠3*篓聜Q帽脟聵 陋u1卯脼脡聻m脛s+w梅庐fx脻脗脡脛.*~篓聼脭WTC3脠路U盲鲁}茂麓?梅驴0炉录S脿OR聞毛u么V\b1\nR脙q脜芦贸聨脰聽脭碌聧聧聨麓聙聟谩脌脽.}Mv@u矛#]聳'脤.脟莽霉\vq脪茂5脌(聹9脟聡毛聞8聬谩#g聤n6聺脠潞陇猫!w;1 N脜聜j\0脣霉卤oP\"H梅脙毛\f脨聭脴dE毛驴wM篓9碌luW.7娄每h脫没職X盲眉5\0\tw=}聺聴>脺*Qf戮冒9脹脻*枚聫s梅脛脙脙茫u脗脛#4聨聦r毛聦聻芒-p聬%漏~梅聠聲<聹E盲聴A脛脜)娄\fH:CAt脠]脪#隆脕1聤陇M聶每煤{M;聣脛貌%庐氓:x卢眉虏脿陆'氓1眉g聲j茅聧茫隆芒B聼>:聣锚赂)1脴聮氓<BK茫枚拢茫聛'W聭聺j陆贸脢P矛聴聽#l脹脝16[<聨Z\\g卤聝職聡聤\b么卢\\f每,脼H脜]脗拢路-露垄茫R職j6Og聞路脫H鲁EWc\v陆Tv'+$\b聫霉脺-=聽脦聠cT戮脹\b脺}庐录脮\t煤卢_脜脼么y脙聳y]脷脠聺聟漏MmkB陇驴聭每掳茅戮脣脟&脟1脣脗脕脴脵脝g?t聻e脭脪聼莽谩}么w{_\n谩NIaY#矛聞脳'}B}聼脧i漏B脩搂GcZ聦\"\0每(漏帽聴驴 聴脳枚r聤聳9脷聵脩6D6聺N\0么脳锚35聢楼=}脜矛\v[G赂*r聦\n锚霉卤a_#聽煤Kik<b6掳?t4z聴陆\nhZ1O脳贸茂z眉?<g脿B聭脰聵脴xT贸楼聶枚Ar^\tG脹n娄脡2i没聺6j脷|CYk潞脽镁x聻聭聶v没^潞酶t,脜聣茫脗\n聨聺9?贸\n卯聞聮梅E聮\\鲁@脦聵玫O2sfuST聝,聟麓锚Z脜煤@(聴nQ!\"8B脩u脼录=M\fQ莽4脵露v(z聰zTt庐锚R脝脵陇鹿芦脭聯聮聝戮媒脕D谩9毛脳聝聤搂g枚垄\f%&镁脌隆脪鲁茅r;$Q娄聺9聣u禄:聟掳\n陇[dYj聯隆a芦 ?矛&脵\nthI戮w脷M没\nq2脮b枚隆拢+聤'B脜没脤聴7戮玫貌煤}路I聳/\ti隆;L驴娄8/'.聹v~X脠戮鲁脹D聶k脟聼镁卢職脧gqB毛?;N庐眉@bS聢b%聙'8聭~聫\t忙O脫BP)卤楼聙Y職聜聻.脛:2陆(脩脵冒W卯聵脕聥V脰Jl聙锚P矛0f陋冒帽铆Y禄脺L聨k盲氓vx.媒莽垄脩g脷nT9\"聯脹脷聰聬拢8脰聲脡貌wvV聫没脿N聲職聥G茂拢9矛?聻脜g脟眉0職zO潞Q\v聭没煤聭\0_颅<脡M聲帽$煤氓R芒G$T'=聽脤聴聧赂vs枚貌\"5霉聬炉谩@r掳聡W鲁(脥脹庐煤聥陆4O脷炉lA脥Z脥\n茂戮莽U^枚卤聼垄陆聽脙聶脕F篓路聦聻谩芦w&?芦g帽聵T脣y锚qThM脥庐uh\v忙铆隆=M谩聡\t猫露6[录聥E脩V脽YG*聡聟碌=聽*每脕~猫\f脮颅脦聹X陆(禄6脡谩3K脷篓潞=聹u聤脴聭聞\fx隆C颅[聳聳A聙赂{聳陋垄聺楼脜路陇隆脢娄L$聹4r谩VE庐脪路脺Oo脴O聫IBi镁冒脼$鲁卤脹贸脢r娄c戮g脵聥驴脕J矛V赂芒-脰j)路,<楼卯脰楼每:Y聢08氓录聫脮O贸*I每@U锚i媒?{陆盲梅脝枚聳N矛聶脠脢茫$)S8芦N脛聻媒玫脦铆聵聸>脕脝脹漏n矛录)潞脗聥脭C)ER!么媒&没*脌Aj,脙脪FCE聝*镁录聳Ey聼漏脧q脼脺=M9氓R聰聧聫f脨\v聰聝聵聰聝脢聰聢猫聦r聟脨聦聭Z?猫Tn莽G脽yQ聮{麓CtG2芦vy,L聛cE聽i铆V梅赂?pVD脹P忙e聡茫脥脤Tc聼聣脻~脫碌p=M媒i聦莽脼+llJS聜<脟脢P-聻脡\\M\f铆脗T脜脽霉D$路脩聻脹梅卯)镁W芒脿S玫o脵盲=}聣脻篓脿聵dg每h%JFV聧聻6I庐N2E酶+氓盲锚聠露聳脫脤脿 枚T脙O漏谩%u|聺每)铆脩r镁茂聢脹h脧戮脠2聝霉脟戮酶^I脗m*聰脗\",聡<q卤矛$拢\f氓n聛MIuo忙聴!co脗猫氓E谩貌聲Wnk聻录1職脙'潞脥聼z聫=}Oj|Q隆枚脝漏4\\=}(颅媒&|茫聻脥=聽j麓氓\v4\\脧BS垄L聺C,q脜娄卢U聻茂脦脻路5脗脝t脹\t聥聜茂脰LZ聙脼贸n*每}G锚KO 聯RWF露z脰N脵聰煤7脭@聣媒V帽'酶虏么脮d0聵脟聵盲楼A脣忙玫)zl@聧;聮楼聞聵帽聦媒1聼>娄聴vCR聺h\n麓J聼玫OS\0\0{-猫聮盲OA脕聥5脌毛;录j卯[_5 聶脌!B-聳\f\tZ霉\vU聛_F聛拢$l虏脧聛cF\fs聺谩聥聸MZm镁q*脵脿}鲁脪脪<\v脟脺y鲁氓脺脡 卢禄脰P-茫卤楼}聺聡\"虏脟聜拢o('枚篓~Yi么聬|\fu$禄q脗聯聣脺脨篓Cd娄聟j聰脙/聴聻脩聥聻聙媒\0>脠鲁脹*4娄ZBjba'?盲z氓聶玫脰卢脧脺驴掳+脩Q{鹿楼Odl掳h聥 P_$P贸脠脺i脨陆脤陋聽\b_霉芦S聣nM9聴脟o職d鹿贸s禄聣<茫卤T芦垄聽聦e[脟脟煤隆聢酶@#H梅冒脹A忙@xZ\t贸茫脝N掳]\n卯!聡脧7聥脤[忙^搂[聣[脝聲脢貌U]没茂毛K莽搂聴拢潞脦8脤#脛媒脴/B%<e毛脠脳X聧脥+i#拢脜搂-脝=}脠\"聢路l谩脹]陇q4E漏镁脥芦yx[g脛5=M脳聤聸E没w媒脮脮脧\bS聽聺9#,脼脙垄m聟脥陋,霉铆聭貌脳n9贸炉聹卢聞聶=M/聽%o脻\\聦\b脦\b卤z盲Z忙聸禄梅脠%Z篓.%9/Q!谩聫聜[茂脟娄職霉mHN聹聵<M拢K帽(j拢\0谩OW脡K聴s搂脭芒W聹\b}脜脝脮脪Fq5U2陆q驴猫茫脌没莽脹卢颅漏\\,铆颅脝聬;5#!聝脰漏i篓鲁O\n9脴芒脮聵戮\f@禄Wj梅6脰)聠*c聙#聵聬聞聫聡聦脴\fQ脕\f脜脴Z忙露聛r脵聢卤芒?V 聣cO贸}录枚脛<\t2卢<x_娄K脕聰v卢潞M茅脫陋脪n_A么\b9貌脠q酶l楼u拢脕玫氓coB炉<b莽莽聦聞漏oq[鹿D梅\t職@\x004碌D\f冒冒C聜聲6ASk路^碌zK聰路冒陋X猫脢芦赂UAs脡聡脤jt聰矛$路脴0聠R\\鲁9jf;| V媒\n茅k脹0酶铆聤潞IC聳聳i贸脨镁鲁脜T陋6茅#虏脺陆;篓搂脵聧x)\t+脳1脌潞&nl脳楼脢r1谩!P脜陋u脦<5庐梅驴\t枚CU脽卤莽q脨2h脮脧@>脛r聙霉聟?脢F脷H5}Dj-{/矛莽!忙{聧卯A聫没*么$颅#猫=M聠脡@[(脜搂镁茫6篓#芦M1聯N炉m+k2枚脺毛脺i聢聤,!&\"漏x颅聸脌 脤篓脴鹿!|搂k\0脕B#掳脻d^{;脽fs媒陆\tl+D盲G'聥))!脷卤K谩禄聭鲁聭聣鲁P镁茅4酶'b没卯l鲁脽E!每贸脛x驴聤聭[聝u&茫铆聶mG漏x?茅,B脦/聳搂+聜OQ~莽陆谩猫聤酶茂聴mN|/脺聛娄聛貌8p眉j冒芦赂~g脌掳n聤聭聵聸職聠O拢霉\"X0垄#脥芦貌聴脢茫v脳眉酶脣聯'脌忙Gi;脨脮s露k聡戮70脩A聨拢'酶Q么\v枚:脌聵脕脠聣Q4聳?脛%帽禄K?(芦聝Cq聛S脗#Kl脕W庐)\">b隆^赂禄-卯芦w5毛K庐聝M卢p路2脝聸芦>庐脮聳p盲茅m芦盲脻3G0]DF=M聤聵禄聳铆麓聹9;Dg/x脹煤J盲聝j聲冒x炉脙\f霉拢脙脩~煤FZ聙拢脰茫聧庐锚卢庐霉聡铆bd脗霉聢聺枚冒聻聜脽I铆鹿聼u贸脟9脺h#qZ'~Q茅f$铆脡脌脩聼聽铆聠貌聛F=M脟茫@d聥J}聬麓谩3枚脪茫脥脣聴FKa=M漏B聰=}zt聰4茂芒聝q陋脫O@:Z脡gn脵&聦|M脰N脺帽WU8脳虏麓N聰聢脭聰聢脼拢j\v3>聡娄毛k脩w禄聜颅B%酶b8聼脰聼露鲁B聢&{娄: l戮E脮u8露颅聯pHY2脺聻铆j聞5脠=}t脼<=}t脷录BtB聯铆T\\\"B&X没漏脨陆聡拢pCRh鲁nJ\f卤聥ls酶|\v聜聜,聠4e90脪茂8脠85\b聤酶聥聥聫帽\0%禄I矛Lj茅颅脮卯掳娄聝H脣>脨脕(禄脺C.脣掳r5聳麓R虏=M聭akY脝F脫q鹿谩$露t$>$脝R5B卢5聹脛職聮P聻6脪矛脰赂e脣%^聧冒7脫!聼&S庐聥8l谩?l6\f脰聫聢聞貌X*脰貌O聞脺r,脟冒@l卤谩qA楼垄猫[楼j%聠dm脟F*聢掳卯庐7脳聶脰|脹 聬-a?聹]脽麓聨聸聡U聬酶\\p聸聲脛u卢么聼脥^u卢聡聯-x脿\n卯玫聥#{卤Q脝R炉=M4聢聜路o~N聬Nz+\vt\"鹿聥颅梅聫N楼毛聫#芦*JC#\t脣e脫每脨1庐冒垄卢X聽聮冒x|脠脙聳脠卤>卢玫颅w%\t7cY潞脥脳脿n拢MU聧掳$矛$8聨\"聟脌脕20忙拢虏娄聟@<聤G搂芒脝聜Qg贸芒脽脭脡z聺铆tw聬L!c;聤聸芒=}脢~脫漏HCjM_5眉j拢n脴3BI聦脥脹篓聛脿脩聝O猫(脺颅=聽\v楼聥脼路ah娄梅y脦&脝脴颅聜聺脩z脴聢聧掳Zn脝脵聝脦聬!脤\f每l!聲S\f聴\\bH聠聤脽9聻X拢g聨UD聛j脳虏\t+聺脗聟m聮聰uK脛聰f貌/脥脴聞谩铆陆眉脿脕E;路炉:聶贸0j|脜a脠脧庐脧搂e*铆&y每j虏聲F4禄x卢聦bK聬y碌^$拢脣脻脽 zB枚dC搂;W(庐d{\bp%w脳篓]卢K露聽芒\\脴陆脧eZ路酶每脴虏聟s$;S\v梅X8聠眉搂$M聤C%每脪么=}L3虏麓脜猫聝庐盲垄脝l脿聜\b茂\\聳猫*铆4\0{N氓聶聴*B陇[聜c脗楼U=聽脧L脤脟赂聰毛貌!脗^DJ?I脢掳聫陆nX脭麓0虏漏脪每聬M脵聼5h2脴脰$o酶聼T脛卤b!聟\\WiSt脿冒T2聦矛@jO聳脭虏[T戮g}!谩脙 梅%zP脺聥}脫m1pB麓8莽脨聨脡脩M猫聲脪\\V脧H聭谩篓\"炉5脻聨\n~脵赂卯贸聽漏路酶O虏A卤脵S氓F聸聽盲戮A陇\0A脦茫K聸?M陆P3脜聜梅脤镁~q~h聣芒pkp聳眉茂脤脥/脧梅6tC ,矛o_脼聟脫脌路I.卢露猫;6uw驴U脪職脙f=M <垄聙y脽漏~录聦聳麓聶=}脨U忙\fu聮@脠n聠\f聸卤眉眉}c5楼\v脥\t聸陇庐聛\n$虏A聢K=M媒脌U卢O脳聢K眉.|脣w聛脮锚V]聡\v'\"聢帽聢}H脕聳路拢媒i楼$聴鲁x虏脜職uN眉卯谩U\b聳楼z3聽脽&漏<聲脮漏莽帽fl拢@D聫脺s^iVq路禄聵脻\t=聽Z\t驴聸虏&mKCq脭\b毛拢脼虏O0Hh卤脌z 脴6X(@g聦a\v貌8垄盲f炉i矛么茅录M7脛c\b脛聬搂录=}P脝聰聠FV7+X梅Y陆p\f\0Ls$#W玫脻卢镁y}炉媒脧{,脭聼Yy卯脭Ke聳0脻\bB梅忙鲁cg聦陆9拢L媒脡脭脷\v\nm{脛霉茫na潞脰8拢聻Cd聨聥茫芦没戮D鲁=M+聮*眉庐]聤\n脿g~卯H潞酶聜驴脗K脨娄H脼脷聣^贸脌酶脰聜脦y聵|卤聸聹卢聥脧脤Rc芒聟聢\"8矛梅<!聸聡\v梅Jr8庐聮冒x4聴聢Tp每脪贸\t脠脠脢路聣聮Q聡鹿C卤聧脹莽禄掳卢i梅=聽q脳炉Ad5V陇聧聯@聴^#卯脣83脠'垄脰聥?U聸茂_4聢2;K聫聽\vD鹿F么e脦氓聤楼娄\b(qb忙4庐L'聵f脣潞冒@C!铆陆路w茂聳脕H-S聝赂聴脪猫脌霉脿聰脥U路庐[G脗露聸\\N脝d=M聞17=MzjR潞莽脰:VE脝z忙z眉碌脩脰脮脡聨聝=聽聞oZ楼帽J脷v}聞聤谩脭聰虏xM_=MJaT聫c聲y聧媒l脭fRY卯矛聠_Q冒\f|枚職脹脼聣K锚,聶脩 聭職=}!赂=聽煤帽聬DO]2聫聬赂脴忙聫i聮2qO脨脠>霉;x陇聰陇芦$聤SlTN颅脕<S!虏露帽陇n#聭X脧b毛V庐颅![脺露脣脩脳0#U玫\0聭脨芒>芦茫聽脭聯H-9M聛3麓聵L\bb脨脧{M麓k梅w,脦Q陇q茅聳陋L聧*么)c潞聽1=聽聴[脼脧盲#}聡铆$隆脣脿T颅.铆_H铆Tq录冒毛\no?聬赂脡7脷聬么聵\t脫r@茫陆脠脻玫q}毛聲:(碌脮聹F芒么\vG麓鲁[毛聳OC]Cu%2;聞~聙茅聥m潞聢y\v脻聦f聸枚麓\\B铆[u聺6脳脽.脣.茂職)聬\"w6;脭?赂矛酶=Mr聥9茅聳D[脴赂聯毛0脮A虏隆%垄a禄聰脳脵kv聜c聨>隆,SL#聭f/]莽聤脝V猫<脢'鲁H脩聝聛聜聧F拢\\聞潞聼盲聥y脼脢s聵聜聵么聤陇TV聤Sb9f戮t\v庐聮聟o忙聹掳}G聻楼['聙脕卯'楼w脥搂h脢}y枚脦e隆镁炉没霉脿脧\n脽聠LTV聙l0脹X脼ZM+颅<k=}*茫氓_掳c聢M!煤脢Rl脤'酶/#w脵茂+茂谩聤\"戮M脿镁锚6o聸漏{脙i~梅Uk矛录C卢芦jr脜J聤Q脟脤赂'聸G\"r*,脫麓S聭聲Q禄脟聝脰E聧:聡2炉K漏聹teU,脜y拢F聝驴F戮+\\w.]C聜霉W帽:-搂I\\聵聴\\|娄[陆k脺聻么\\脥@G聫k搂虏=}卢\f脵每u;聞\f脫聹氓玫脨炉垄颅聠\n茫\\炉_脻j脷w聡%碌聺聧([脽脽锚U么H脨y颅茂L脷没盲酶o莽帽铆芒聤路Y5煤(梅IF毛O聮C卤zZ聛F貌y聵y#梅l聸脿?脺猫?禄芒锚锚\n脕=聽n冒眉脼露脝脙聸C脫脭:-t莽垄聤f聺脼pd戮_聸聸芒茫芦戮e贸录聧脺庐\0聥赂!脹脤6帽r聼拢M炉6聵\"鲁掳炉脣脮聹s漏職煤W聙聥帽茂聽漏聵#聛;>脻篓\\?煤脌脜a#媒聛w脽聛脡!霉.w}Y*漏聸x眉聲脭J脰\0么煤玫聮e'聬Q脠聶聦炉:7n脟yr脣脥每录o聥聮/脨[r聼忙驴DC茅B矛氓脣矛铆Q,i)P芒镁么p脹忙DI脤\"脨聛聵m毛b聦脨隆脷L聭L庐脫聝聟kR莽z聞o篓聛W|聤@\n掳\bH盲\"&鹿聭聢V脴脩酶2聠@^聙0聺麓煤聵脗聞颅聠脝@D聝X霉聜赂脨脟BD篓脨聧\b脛\vUz聦kZ聥麓猫聻脥隆脵Q#\bm\n毛脟,聝庐;貌<9聤GJ貌.j聲卢.酶碌脪K铆聬酶掳聡x拢卤玫oP聛拢聫)脝聴!聼垄每脳镁&HEj~脥赂\\i聬1聬脺脙b脫脜EC3s掳E麓yaZ聦b\v卢锚A露脜脫/(!陇冒2聻$i脻t录P聽W漏O聬S芦#n脣R^#聞颅谩脌ze煤聶2K.鹿脧脢/搂脟wU娄脮}脵\b脗媒職鲁p)玫u;聶\"L脢脡?禄脌]\0脛碌脤脴茫DL3\f脌M0脧聫5Ce卢脜盲2聦聨*or鹿脻p梅W酶聙碌Z聵 6聰)*赂禄茫露xY^p]聫聟a每l枚聵聜颅o芒卢sC%脴\\wd!iA脡聼g鲁禄^聧g聴聻\0芒Yo脣}聵E脹篓$每脦盲[8聸鹿Rc碌聙脡楼聶脢Ey脺*,每l_脼H陋\0UBmU脷媒i脩脡每潞庐g7戮%\0碌楼聻猫脤聠潞碌\n脗>陆氓脷聹脵拢NR聹聻聴+驴M=}\b職露<媒脥聧脴Q虏聤[\\路Y玫鲁梅E脺X路玫-芒CF%&iQ\\篓o!霉麓脹脷脴J~帽[Y聸脳fX2酶脣氓驴:鲁矛\"貌脰垄Z聜聫%B聜^脣\0潞矛脤s:#脳\n脌碌卯茫?Y&0聲茂\\么V茫kySL卤冒脙掳氓茂脤K$锚]脷篓聨脝聭芒脡聽C卯脧酶篓聨脷霉媒煤卤芒聛陆路$3没Y脗F聢;拢聝A聴脣2'#每矛$脽聛s脌鲁拢 脌}娄脦&娄#聙脗#聝拢卤\\漏聨r脣F茅脷<脕茂莽猫聺陋O+3R聲n聛没b脮H!\n麓d*聻_\0f\b脹么娄+lv茂聥?铆梅铆楼聯聛娄脺E陆眉脴聣没C梅]脺戮聳露贸Q$3聞b聤J1聞没2卤潞o聼脙#!vrUy聙h?ty聺p-]枚\0k铆&每脽贸脿聻禄脪聮聵%脦h玫脕脴鹿脮聫X麓M2聺sY陋c脜V楼貌E聝a聽*冒\\煤脫4{戮.=聽脝a脹聮脧脺0 W聙9Eh聢n霉聼+F帽脵A脿脴$JM潞$垄脺隆聸I脮谩脟A\tJlv酶聝P搂玫酶脝<\v聲^碌脗職贸聫聽镁虏hoz芒#氓聦脼A v脗霉&7~-職帽脩陋6脕\t|聮w梅/-氓脝庐脦聴聲#U潞~脕/i聙脕媒虏,聣每聽脙聠脿KX芦o\\禄H{庐5聣}盲脽聛脻脢脗篓脤N-o=聽脟G(茅<聢E没脌f%茂J'陋脰拢M聽赂冒露聵搂谩脭fu矛44脣0*@煤鹿+么露=聽盲Qrg戮E每HZg脨镁聦碌聸%镁Rk脛拢脳脰貌脟s\"E媒h茫碌8-脠脺\f6I,[>e脫脺聵h娄庐庐/聛)_u谩\0没虏脤聵/脦R,Hj脹v脣茫CV脟聶茫,麓h%bJ搂x\vH脳聫\\漏脷脺$m[M脪聥鹿8GF4.\fX聭g氓e$卢ul7脗&禄R]芒矛路篓>脿掳脤\f脜脼戮脥枚脜.忙n&毛脝脻脽聽赂E脴k:f脥脫脟莽聶卯脤聞脴莽脌茅掳脌聠脗脴聲贸Q)Rf聝2聺卤nF脟脨眉庐Yk聶脺垄茫91每脺<|F:卢wmM篓G(毛貌镁聙~潞\ta脴盲脡赂)陆i聽枚yk脷脺93L聟芒脳脳<猫卤卤Je5么录垄戮庐X潞脗脗禄戮C&茅楼|垄4脢拢脧脠)q没脢禄\"-盲聤lm*脕鹿l脌忙_tz脤X聥赂=}聻脣/3麓脿a拢赂聸搂脝{c脻脨冒j霉禄赂(zj脟每\b!芒脗猫戮R脼}聵脺卯!yE聞N脩#[脿{脼<卢T,脺L聢L聢娄帽/贸镁x 脫玫wS聹Z脢篓庐5\n脧聻I铆聰脽镁脙9職芦z矛茫o聳陆T脦漏聝脴芒聞脴m}[聙I脭陆鲁D聞芦lF潞i炉P芦聣芒9QCA脤鹿茂冒|聜猫s脟脭?h麓TNt9Fje5玫聮脜j酶脮[l脦=聽}芦b聙脺b掳聺贸聲i聝聹J;脹猫脩谩~ A贸8路脠脽路_脧聣娄聧s脳娄\t聨颅眉B5m\n\n隆么聵脺脥脦YvY)K楼y聻L露2路聟毛卤Xf'/pvq脟每+f_芒_篓脹#:冒聯脿聥炉玫聬聫忙rm掳M1S聵_V^脹聢芦毛貌d聤隆T聽脤A=聽漏冒A脨聥炉聙梅5聠* 脪!d{陆脩h{漏眉>>麓I霉D.iIi贸脼]K\tF^聢脴yh没\"卯聦p/]=M聵^陆聞聭聝脰\n貌F0Exd?每[猫.{聡眉}聹猫卤*聣氓聛颅2聧碌K聻E楼脠q6t陋po卯L@_f聝脣冒聽\0\\掳庐Z脫3颅聯聟脧[|脽聽p玫聶聴聭隆'ns楼氓聴*6R鲁脌脼)I^T&聤脺脽脰t^猫芒\f7j拢4脩聳卢茅rI脙m\0Y脟\v氓脢聜脰l2R忙聬聠p\f/聳聻k4聲媒=M8X脌;脌茂聥=M-脜e眉,没鲁聝+聤>聤聧X碌庐聢茅赂Cp%i脫霉L潞拢篓聮?\bB*A脠b莽镁職\"赂H垄=M聝脧锚麓Vn矛脷貌脢^脢脢脽麓\v 禄聠聽脧卢脴聽K\"脳鲁3ES\b聵煤脪脪莽G|聴I脨a')~?脟鲁脟vw茫K@脷脭e聢聣sW聜篓聢脝脧聼f漏#\\聮脫谩聣|炉脝aAO炉鲁脺茂 聦\n脣脽聫qe脤玫聼w聼Y\n聞h/a聮脻聠<脙脡脡聥@職氓聞]聺Q聺\"露gA冒X$矛asFP/J没V脳茅没Z^M聥E]陆卤=聽T[镁盲鹿5聵脡陋q碌氓脡掳(陇聨E聦l戮LPp茫脩没麓@脡_锚=M聜*聙t赂')J脤?脩|聟聻k聧脤z聶脹$篓脽贸媒KnY录脥路玫脻l聠p脫聛4rM脪\nD?p脻盲脪梅脌虏脙聥+%&聬聛聶麓每Z露脝陇Uuv@\v聴X矛@枚猫脭脳么炉<B脫脳<?5聵0驴脟脹&聣麓%脟_F聠4脰B脮\\聫#hX脵G忙脜4聨媒|隆楼聡職脳聟聤\t聥\\聸潞脴%聙]聢毛P聶脪W掳脪;聧yz'脭Sn芒?聙卯X冒聠F帽聦氓锚y鲁冒l*聳A聟 >聙P炉7聠#陆 脝Z脟脟脿r0脭0脺娄聣:Y4g1U聛聜脣D:录潞聶EY贸V-脹卢聡M6g脡)脡.Z庐)G媒卤聫NN1莽脵脿脩冒脵聛f庐聲枚<潞媒l聣脼脩g_.聯\n聤qAO[Ee录脝脻脟Kz脣=M脝脢k脰\"鲁路^聵貌脛7脭z聥O聙陇Vs脜莽=M聵芦聛6x脗]脫v陇没脮s矛垄V\f茂c隆C聶忙聝驴脧yr2z虏鲁.聤聴氓*m娄煤p楼虏脟m茂x拢\t录8脺庐聽聜脦q戮o冒莽脦OKA茂脴录QZ職+*脹k脷禄聠聺聺&脴~{I梅陇B镁,e聵脥媒tW脛么$W聰\v脼=聽貌1Vp聠bEw聵聰N聬t聭eV脨sZV漏G\t%聧聮颅HYv聬没diP枚聥脧聤麓聴g聫聶4|鹿*w篓脌鲁5楼1聤=M:聯聯聼職7聼Lo脴虏s聸}聻[谩聵聫O卯陆聜%=}<搂=}聶脣Sk聙冒脭聺垄聧'脕鹿脪露\b篓茅:隆8莽脠聟>戮EMjxd}聤,脡$E忙脡o庐w?Kb陇聠鲁隆娄炉Idc<xg@脴脛拢\n聽戮聜j 8玫么!<)梅1聝锚脴wB锚\\K聭wF陋聟脛脦K脩脥?G氓nh|脕G聢\n卢没贸v聜\b莽F鲁脪lo+k聠p\"没脺[漏脠{聻庐脣盲眉每?:C铆聨Oaw莽脿脤卯:{颅脷脢\naM脮X梅霉聦脙贸茫脗H聵jAX露戮脺脣]@镁玫脗聦芦聣B没@聬娄鹿h(猫聤驴1X<zYD聟脢掳冒i}+脨聼猫a卤脙脣聹~没P脤x脭聶聥P脗聺聞脟聜@5拢聦{E=}/聦X脫r脼-搂聬a脰A聣陋没'鹿聦,聥X'|鹿聣C聙h聧脼uA镁聙卤U!Uw聨脌聤mm篓MY驴W鲁脗&\\脝聸脼楼聺碌聞鲁聨i聟垄-y脛+锚<聯谩氓庐v}M4聨Xs麓V篓脭\td脙聡茂虏戮=聽LT聳聮卯谩氓聹聣YY,路聽媒W%芒\0 VY<脌>O=聽1\f,<脤>芦脡>脭聫fY聢rD)芒聣搂n聶n聙\b卤碌r聢脤脡眉P潞聞!脪陇脷脩[冒脩茂聺,%脳\0=M\x008陋j脙卯聟忙%脗卢卤Ou<煤脡锚]sa聙Z聣+煤楼脨5路kl脪N<脹聲颅脛p脮脙聻脰卤脴cD9戮脪Pn聥(锚脌脨猫毛\0脡碌眉U2uO煤X麓{>?,聼R\f脙漏虏~贸z脣p聵[霉茫 9V脿lh聭聻t]4H脮茫陇脳聲霉脭脥氓'BG铆聡l驴+聞脕/W\\脩j2~_Z:酶聼脩聶拢Um聜脕e碌聞茂\0霉\0聲脦聽聹颅聵陇聬隆茅脺聺脜脳露$娄茂娄聦+T>聢露脰脫\nM+<脣Q\t\n聲\fAT脠C貌T麓霉B聜眉毛=M1聡镁'贸脨芦聫聳\f]脤聴] 脣b聵脻戮聤搂+脛c=聽~m0陆聬聮:\f聛聫%%猫漏職K潞%聬陋聺5IL脙5UN篓茂垄聽脥1P搂聹脟y卯氓脛\\聢H脗4*脼m聥盲1芦S|聜m聵Zy聟b+陆DI&x~聰聢贸陋楼q漏聻>莽聙=}聜j卢脜脻d 聤y梅脪脌k(HA(脜炉E脝t陆脼路@脽\\WP枚\\脽霉%P聶氓卯路盲,拢t陆T驴8<g脿ta聡\\ft脪o聵脵聣脽矛聮#:脦煤Z9r鲁没Q拢/茅帽聲聝w录B(K脷Pd卯\\聵茂脗b聮戮脿pV脰S聡d聞戮锚脹9茅驴垄脠虏脩I盲'卢卢:脝^UJFY}>鲁\0路g脼v聸5聠脠4w\b脛Q2聞聴+聻I聳脭聞zo脢?x氓聼芒聥脪9G$職Z没漏楼v聧脪[忙]m\bI聧 冒B脼镁聞脪脩驴矛聟脝聯聰聛L6碌聫@T聢\f脠.)t娄\\~:炉1貌1\0聴脕卤%g脛b酶脻陋8vx芒枚聺聳(\0陋'冒$聦垄貌hh聟脡脡脴谩聦C職/脻路ZpZ脽毛a\b;#-O麓隆聴Z隆聞脼>脟聽7煤9pD聮谩IL聽Q聞聙卢<_聻煤陇霉脌脫.脺脮9聹a眉镁脤脕k聺6h聽$u[漏&0.g脼]I搂聽聝毛o聢拢庐陋聺脴D脿Ax卢聯.x媒.聢聺脢=M冒貌聨脣D聡脙\\聮脿~猫陆K聼脺0脨镁脭b<:镁<卤v@聽%6掳枚貌\vP聸脧炉k脠?脌6脪聼戮\n卢猫么,9搂脫聯'聠(隆3霉聸碌脗xL聫帽庐娄貌W脵氓u没b聧\b/t戮霉Uuh\0脳x|么xK脜l录;脡聶聳路%D聶玫y脣脪驴s芒F*_脭~虏k5卤铆^!莽陇娄eAx猫聹脭R露聬庐VL聝脌=聽9聤脼聼脤KI帽莽脭q脴聢Db|聥鲁颅tUmLNnE垄=M脤o\\脗垄\t谩?矛D茅3|聥{|陋^聫聹&聞聯r聸脦EnIbr没x聡聮聰聝聡\b聤Pg<Ic^隆忙聞|卢,聰Z脺聧\b$聜聦R聠]脣&'f聦眉聰聮,聝sR聛t聤聦虏s!脫脭D聦R\f露聧脴d煤脛*脭脿p$炉A聣聫聥聣聫隆~脛T脵聡|_聡聯D聧麓b>貌脭赂聯o没聮\0聧聤\f忙碌聨D8聝Cj貌聠聸卤脮聹脧聜脴D陆聨隆脹鹿聻.眉镁脧脟G忙聝聟!=MQ聣脫IQ芒Z没垄脰];赂聜Tq楼聺3V聹脮贸陇眉垄潞貌脧潞脹,#么聬矛p)篓&冒眉炉A?贸xt媒聥聮莽脧盲<聟聜>?脤]I@卢\v潞脕脣Z脻莽隆O:鹿脽\\4脮颅W聹\\L<脗f庐\\]_\\脝聳脴U&(JU0炉1h赂鲁}E麓2職+潞聥聡脿5脕脭露芒)B潞篓隆脗聯茂鹿w\th掳脼虏.V貌炉聭虏锚赂x掳垄A煤2聲@,禄?C盲N赂茅6茅2矛FFc;铆聺聽#&貌猫U聶[脪5聣M茫聸\nj脠脗\0u搂脼谩![聳L聧!x芦8脠q聼^w\"*聫脕聴聣碌,*O茂\t脢'聳E氓聺4脗锚聞脮\n9禄脪P脨聺L聺麓聻D聝聲聨脜J媒聦莽卢鹿_拢Qa>茅玫镁F 聨漏脺\vF陆\\ 脧聻b盲-聦I霉9禄9聸娄脫8枚T鹿>qX脻聯脛%>帽每\fGn聢p6@.冒m毛<SF拢脟芒莽5聸q驴脛職@l每UA,脥 玫卯1卯\tR脩贸fp玫驴bq酶颅7i3=}枚聭脵虏 g\n搂脵聸'脧芦脝聻梅+聟9\"S-篓聦5O=聽聼Z#x?冒?聼yrA脵G7茅h隆酶卢s脟\fc聠搂娄脿聳脥!D=}聳聠芦r芒?~每PW$脦聽氓聠脵脪)脜漏聣聦聲r聫'L脷媒聵脪脰ZD莽猫聮楼\"F]d)脫芦R{no+;芒a脧脵dyiJ贸梅k聯_e聛FR眉V脦卢聧氓#;脧1z聥q陋w梅>卤芦]8nL脵露&H盲聙禄u脭=聽35颅篓每')脦卤F脹 聧r聵b脻卯聡陋聢+^R脿聭]玫脿/nm脷h聺4没聣w脮掳&麓ku]m娄GU聨n聛聻聨3聛娄脻霉;聭&鹿聟隆脟 脷氓n!煤聦?麓o篓篓+j脴脕聠i垄卤\t聥盲}茫鲁茫&脴脨x聨貌+陆2谩录+Z卤颅脨戮.)脝\\聵j脟聡脌媒路脦\\毛E茫uH聧聺镁7掳莽8:&'.搂C贸莽}聢路r5貌1茂aZ镁搂楼'f冒芦H脙脫猫M篓\f隆漏聻lk聻脛聺楼铆盲19铆驴Z盲聦#媒 霉聛茅daTk\nxt聝y.X聦脳PB路Cn聦聞毛忙脪媒聦茅db霉G颅G聦忙盲聻Z5_聥a脷脥\n茂y脛搂脠铆y聼驴&2ul聦麓聡眉镁聴聤0聝H脩\0脮脰猫7~聣卤職9卤脡貌\v_帽脣D拢)H5脵v,U碌o聽w脣M矛虏脜虏Q[g脼(\v22x\0聢=}M脵2k铆毛rC聫脠Z聧聵9\b\0!C%脽聥Y脦聟?40卤聨s露聵霉T聝l7聻聹脣聟驴[tD脻=聽;聯'w拢.聴陇脼\0ygZ脡1D20陇赂篓煤職{ 煤\\<赂聵mU氓玫脟酶脤脠H聟猫铆聼S=}脠脧麓聥b每脳聙脙?1聧RC,(\0xzz}脵路w\vT脗6<5脙楼[?/脴'8脿\\(玫潞忙6貌脟\v(a!_脺c芦C|Kk脝H\v庐[o盲脵v隆9聹:茂\v聶卯卢E聭R芒聞\t\"盲聸!iJP聭}聝聜隆铆潞=M聢鲁毛脧脷聻聰uY媒麓麓媒路脩Cm脠聮脫脡聸脹4戮聢聴隆潞+麓4毛禄3枚ge芒帽I枚聮猫V帽聹冒=M拢pR莽玫h聳赂垄炉露聳{脧)卢'脢N掳贸聨\f脛qX0铆脺聳聧y搂<脭;聬酶[没K脦驴(枚酶O铆氓\b没+聦芦矛炉搂媒庐聼聹路Yh禄\b脴~脵*脿9赂AY=}每Q脌@F]驴猫'mu脫聣聲3J脭垄酶玫隆4G脦1l梅芦脠j脷=M脡@\f(露H隆脕聝脽陋H聴g.聮帽聟茫虏/.聳V52卢录脛L脧/聤[T聸脽-镁&脣\b@庐z禄忙么YN脽禄脜脠h5酶脨!5脤1麓\v聝v聫m搂拢聟脼陋聢脮&>脕路么脳\0H聼茅聟C媒聞AwU脌聹脺n媒a$聯眉*e脼脢\b漏)脝2脷脟2脷脫芒聽%聯貌眉茂;颅聻聦bg漏f.聲脮聡5E聜猫脿I媒脨\\垄聞聧脙聡潞脷脳#聟锚s脫l:脵\"镁氓T莽脿<脻眉h炉f聼脛r聡茫眉V聡拢l\\Y脻;S茂=聽脨忙EQX漏聹脗聫禄\v=聽脨聠3z2=}JQ$脴[m-FV聡茫聶=聽脨f1z2陆铆s露禄茅qXRx陋聝帽b聡c脥7a茂脳篓r\\O脜搂.'\v/)*w聬F路霉G脻]潞眉脻*'J煤m鹿脰p脟聜帽(Z聧-i梅冒梅)bA漏^$e7脼猫莽脠聥6脿茂潞梅.聛庐脣潞脝r5楼脠脼)脼q搂脩v鲁Q潞=Mo搂脩2娄脩職Vh,碌=M炉聺3S漏V酶楼脩\v眉鹿=M卤聺C貌!聺鲁脨VnZ聺\b職V脠录M4N娄0職Ct<g茅娄脳煤脺陆}}聭,聙驴聹盲聙\"陋 聳脳鹿么聞茅$u聞帽脦fN-芦矛脝67聢脺脝>&1T聺聵&$脛,脟\b鲁<脡k漏庐ta-聺盲毛X垄聻MH脩:m脨\f玫戮茅楼kN脻5聡麓霉氓每颅脩z盲Q每聦聯茫驴聛\n谩聙冒脥聮\b\n掳> 聠玫<戮\\T聦炉虏赂zP脢麓聭B脪t炉T芦漏\v脌g<脹(聠脟聰陆H眉脝S酶卤禄]\f!/\v潞娄冒^FI=聽7O6=}Ls脮%'脭驴脽S芒鲁聥&脠uD>虏陇氓%C,颅脦聧,娄聰聣脕贸\b脭帽(聤A聞0聺脤矛聜脣脌dj@禄W!赂;tv=M聣煤庐虏qJ潞冒S\0聫脜q])職qS陋驴脽聬陇聴l脙c忙聥X&搂卯tx镁6拢矛脩E脮玫vV聴^脟Ov楼-脛6\vmn  M*露卤)=聽RX3L帽聛|x1聴<6虏娄脟聟MO@铆脙Ufk聶F陋脠/没毛脕e脼&脠/{毛脕emc帽.脥搂脻脝?5卯聸聠脻C卤)8路聰聫脙脤聤!每@18%隆庐陇忙聧脪帽1陋=聽聡垄脥w霉眉露聯j脌脢聨c聣*篓脭脽聬u脕sdHx玫9[霉\"霉聢录4z0脜$脴脥驴6娄q脧*盲L7脿\"1聭^聢酶毛赂脼2聧脩楼脭yf聧7露脵Z\n7聮聼|聤9聭8*=M聰:聵盲N聛c脽E锚kH陋)路4潞脺A脼q~\"娄Z篓矛Vv@聤潞脙颅e陇+茂J脤7驴脰脥聭^O聺VA\b么N脗j庐聢2脭|I9vcP脤聹陆露颅拢盲S脳聹脌e?卤潞戮?:聽0聶媒聣W炉I漏枚眉芦赂L~铆H2H露=聽Kj贸脪wF镁HEi酶聳\fY酶 {碌2聙/聵\t#聳=}r$$聲\b2X隆%X+虏=Mc酶茅聼脛拢o脻毛脳聵W3=}陇=M7?庐f脦nEE篓聺猫聳\0Ww9g卤脮Y炉SK*盲z^脣虏4脨虏4p忙m卤脫L脨a聳u\bU卤h$脥脫\f聝枚玫陇H芒 >庐颅+ 毛@=M\b掳脗莽\b{r脣聮聡m脟T虏qe脗玫\0zW$'/脴\t?;N!聡篓'聝炉脥U聧聟煤v氓聳拢搂z*路職聻搂k聬酶聭炉脡脢2聵碌脳\b氓J盲k脮煤DFXd脢赂v4m露\x003脴庐J脪<1脤娄\vU脻V贸庐職Sa拢?芒篓SR卤脙+赂1镁@拢yI掳聤h酶楼聻bk陋S莽脽驴K聳\0聧脳聲dh,\n%煤%聝玫隆脨I脢驴0M[楼猫<C酶貌,酶麓脵貌氓猫陆聡垄q路聛脝zC垄聧\n%聳镁\b玫聦\bqsN脦梅戮x聧陆谩[Q0露赂贸枚\\戮1脻g脥眉么聵U聼没s庐=Mlu\v聥聧庐氓\vN>潞Q脷垄'\v,LsE脠聟脟媒]q=M_聺氓nCnJXK職dKL卢\f脙J虏娄職\b聡酶脌卢\v虏眉 =}枚脹_]an路\"庐茂脵@娄:貌脷s酶贸脿卯\0篓\"j聙脫~w@聙枚S氓\0~jc庐脺脽}聵z脗脺[隆$脷聠碌卯\"脳7TWp楼/K6z7卯8:媒E聶z眉炉h+q脟Q職r楼脢虏聡脣\0w聵Fj梅鹿m枚脿忙 ;梅I脦聬lP聸驴{卢聨2a聝7聫脌li炉%炉卯H陋脺5聟聥C.6F脵聦脪}漏職卤楼芦BC聥+搂 7陋茂\"yt脷卯r聲忙聻脺Y卤脹冒=MD聹脼陋陇氓脛 贸d赂煤冒5\0E娄搂S@脙7漏B'露媒鲁炉玫么楼\\-煤脣脮:聸%聣a驴g@聳聸媒聼\\w碌脥[漏脣W\n7茫脪7梅+v6脺脪聣锚s聜聥聼R虏么.冒$q|聼v脿KO8yFL茅脪\t脫脽vA脨矛*UT陋v.脦脺锚聤0氓\v4媒\n聵茂2{9\f:\0\fRXRg'e庐$^茅r{茫聽颅聫{脙帽=M$脥碌掳聞[=聽bb芒脳;楼5酶y6KP鲁\vm\n矛聴没聳eY脼霉.W鹿聣m\0脙脤L帽眉7篓}B录\f聜茂\nn聵\vY#脴Gi聬脌脺X聥聼聡f脣P脕脧L聜茂B聯 f聢ezKH贸<&脴X忙\nX[氓脹脤脰C{{貌*r聤茂3B贸聴6脺颅6赂鹿脫没脤 .颅谩 梅\vXe氓碌么麓卯聼j]漏聻!E聝芒]聺煤帽聞煤聧铆%路芦n貌l路聴碌脺聺7聴u]9>d聹2脛\"a茂聠8煤r露卤聳2Zl脰脽冒:陇谩脼麓Q脪虏\v媒聻w聸\0!|碌脝O,[F 戮陋C谩&聬聤,茫脺[脌猫虏\t煤脕卤录潞聜煤4$陇B媒芦脵P搂%=聽_脪脼镁(聙聵S漏>莽.(聢聤贸脹脦漏矛\"脌茂y聮鹿谩猫脿q庐么碌聸#氓~茫脢莽聴h2;脤<2vD聨庐脟P=聽{脵聭>脺聤虏/!聜K眉.#脜J莽h脼f#:聢\v7H8聨 \vk盲n聬路聭d聦脛聤gO帽脦H脡脡盲氓霉\v聯帽F聮聰梅v(e脴聬%霉毛聬梅聻e)脩贸.贸聤8.聹c脥'N碌霉_垄脵脷y聧卢<脠脴s4Q聽脻聛录芦貌娄掳聜<z脨鹿陋\"陇8U>c\0脛聫q$s酶聲脴脵v6茂\fBA禄脡脪聧陋x聽\n\t聡聟脮W=}F麓P脷芒%+么炉脷^猫+bsA'聧R聥聵脙聹脝.卢6N聭脰$'o聠露/L5(脨>脷脿聜么/)\"露p脰O聥1^m脥Fj矛M脗露脰xZ,聳7聥貌颅聥铆i炉9潞d聟?娄驴聼L篓#X*c\t茅B聙E聡L忙戮卢h.卢g脝'脗{聝聰篓媒N卢鹿聞搂聢搂潞聡聦漏'玫帽聛脜>聝k聽聞茂i#碌#Yh脼脴)I\b氓聟搂谩聤5/莽g盲a漏楼聰露聵聹%聻聲}篓'職cK贸脳媒忙毛脺脰没聢聴脰L脹&4茅~搂>~漏聜貌莽A路脣脢脺W脢搂脙赂路;=聽;#>I8赂脭茂G\fjh鹿\\脨{鲁L脣IG聥鹿EJ聮4茫聲;c./~\t梅YV脜,Y<-Y氓t梅路\"脜-茂鹿陇聞脗5脪\t[冒脭铆茫cor陆聥6~2楼聹聡茅E漏碌\v)V聲镁赂聬莽|9聦V?脨聦/6茅i猫脹s脦聢拢酶%霉Y路帽脌I没I 脼颅脣G聽\n芦Kc貌没A眉=M+帽=M聻~4$y%聯~脭J聦碌7(>K+.p脳'聥茅聨鹿脽d潞ZnH脽脳聧6煤IXO谩<=}矛~9聤脫脧)ed~AX脰u炉卤=}卯O垄8/陋脫S禄f/貌1@脡=聽q霉KV陇毛脛脤@m\"UP脹聞S=聽b脫a聟Ch冒貌驴L脜SAqFEh谩茫HwN脮驴o+\f脴脙G炉聺]:脳K聟帽毛1H脣4=聽聫梅脙聬卢\b聠谩脤|庐脡*聤~碌梅脦yG没j脙聙聣帽脣&镁zM]C+;脧脡脦(莽毛=M}没聠=}么w陆陋茅盲Aym,FY聼\t聛X聨脭:路_帽猫.\tO潞聼\"脛}禄每}脷\tp;7H脫么Y聯Z路脣芦 铆0脛7脮脷92*?Y聡NQl)脤\b脹S脳\"聨C聬v脰C3|聸脪陋脩O脗鲁谩Y媒聟f\0脮聨hu脛q么聶聰U聮聵聫鹿d+脵mivm8|脺茂'脌職脪脟矛R聧x脥聝忙聣脙炉P聮拢聥)茫V娄脕4hv芦脤7猫e脼N脣路脻t$boX驴_ze戮FASq9脧聣e聙楼+貌脟脭垄~f0么么y芦聣\v脛脤貌D贸_莽z聵<m垄NI盲脿聛z'脌pR帽O_\v脝,脳NU~b|莽脕{莽脙{gT路,h4d:L-脿F-脿脦=聽煤U拢脜E拢虏c@脌陇~玫楼聛篓n%bH聶麓么SY赂Q脛$x卤路N+s脺fI脣K脕\b聣聽么聨露庐毛垄.煤]聸Bm_聛脠掳脗脷脻聣dW露*?庐O玫娄篓聦$聮R眉么J=聽a聟H=聽脽聞脟聼1h脤聨P聟H脠E聽脪聸脙|x聹)路j没掳鹿脹帽茫聻聴聣氓Y录S_^脩O聺炉聝3PA脧聢A聼ztl脽赂;o每脌)卤酶驴Ki么[芒\v碌脟脣f2没脟\0<8f篓漏f聛聜Q脣聡聤聸(C戮脛脽R露聯脩<霉c(-P脪聠職L每]聛R)0脟4脿0脫Vy露FoCk煤脗;\v脼茂7聭聙冒聠v脿fhkfH聡2聠Lkv卯帽A颅聼聤眉zTJ聥貌脰茅$脕C陇MK\f#脙录Y矛聮_聠掳矛录H掳j潞聺卯聤聶x貌陋脟c聨路脙聵W脿|冒聺7#{聲.v脺聰f禄-脨8拢脫聰玫聥聨掳Hd么聟盲Kv聧鹿i芒uq戮X脙脜锚聞\bP#聙^0聲f禄拢.脤?聯-脗聜-聻Q掳t冒谩脝聛茅芒l聢[聜\b5聛聜5聰漏脠* =}貌聜聞H媒聥;\0i鲁聵鹿聯聛xs聽_聬陆隆[聼,陆=Me:N聦g赂卤楼芒楼猫脩玫\tD录盲$漏tS盲炉脣/R碌.$娄X脗脥F4?ym路L陇Rc聳L脧媒聬N么\t碌聨H赂鹿s脷=MS娄露J聸聯q聯脫聯3%毛\\聬茫L脌贸B聯聽!脫脢聢Z茂w枚H搂聠z炉I帽聬脹B*|脺bZ2聯Fj&L陋卢>D聨脭聭d9脧CNno碌赂 職没*Qu聺聯没脥聯聥梅聭卢聽 媒脠脮脜=聽U毛陇脨3L漏每潞梅芦d没聴 脵聥|\"m谩聦y聵茂酶聮=M隆6\v芒脙脨脵=聽聧\b聸dw脙脪忙K莽L脝脫?b茅聤;氓J禄聵脻脠脫U聰\f聥聡煤J炉職\0,R禄\n路鹿赂聨!h~5BK貌潞H么麓Hn脿I媒路_聤聺聡聥0<聠脭聝盲脵虏茫脧猫漏聯庐聠潞聤Fo芒[脺O0毛9j聮T5戮聣\t_o鹿)猫B卤忙脼a聶K卤P5媒颅4OW1+锚=}[b篓聭聺z?{聲脢脟脢貌聛猫YP脡Q%玫聵脤莽聯A=M聴路碌脪脠w聳3芒脙聫酶莽驴脤炉掳聝*聙emB脵\bI脡~脼脠脮庐录V聭脕脕聙茅媒>掳CI聸a篓%脠媒x聳\n+录谩眉路脙V玫FHtPDtu聠聳冒脪脻聭b颅?Iz聟脣F\n聣1聝脠脺帽赂脛镁\\露驴C脴聤芒聹9MP{庐脨鹿Xm脌篓拢脕娄猫聰1jO脭酶聤驴r4G麓r4E聝聢禄赂脣聙?谩;_脻搂脵)么脴芒Q煤k茅虏^铆拢聼露戮脵卢H}H}露脜 贸2脷D}每芦r4脷聦脪O聽0隆脭聣*4聧煤卤茅聭v脭聮聜聞mW脰1\\=M谩G,每酶+每脴>氓露么貌芒8cW脧酶2\"Gs驴u脛2聞8漏=M煤\f脕戮<X露FL娄脨$T脙篓<脹驴陋脫脪煤楼Ke聲脳脵}矛脢cck脟O\b脥媒聜@聦Qj脜\"Y聵脢R驴么矛脫$脢{聭-N聛L聜Kj\0p炉DaP+t楼脢\n脴\\陋脧垄脧氓脼<H貌聦~k@\t脣\tk潞脧@聤芦虏脫(卯聠E脛;\b9c}卤@猫脧录聙c2\n聶脡_hO霉铆聸j脻聶o聳q麓媒聲$o\0.\n?鹿搂\b脠碌i芦茂眉u脜冒拢(聶脫脽芦聨聵XU脵X職禄脽聵聢9 aX聵(脡茫OU脦庐聺c脩ML,Y/鹿E芒脟d脣脫聟AaM镁煤脛^;陇Lbc贸掳Zj脝P聜聶Rw3C聮:娄\b脣脜聧s脡每B铆 \0聽芒L颅脝聽d脌聽J8[v玫聳炉戮聮卯>谩8qRB聵娄隆\"T聦-脨<脺搂+脰脭脮o露脝Kw脩脳霉<e聹b枚卢颅禄h^聯%n聳冒贸铆路=}S聤拢PH脽l脳)+脗冒脦脣u聴娄Y脭$枚脣3O脩f潞H6a(禄a.d脴/?ZRG庐@潞媒\"w~o炉聝脰脩聬冒L聮i拢G没8镁聬脣芒脙貌\0聯z聻篓1煤r脠聭聠\n茂0煤脺聭\\{矛~/L脦聡G,酶Bd,[i脧隆bqM茅脠路B聹谩0搂脗脫>陋脳脜陆脵\v陇铆陇搂聜拢I<毛4脦>eB$掳帽茅P锚B脥Q脫脭聸H脣f\"f卢S脣驴楼鲁貌麓;+&芦V0[娄路猫陇脮e媒茫聹ez聯\fc1眉聥=}(芦4搂#聧脦聶脕茂聲4脭煤媒脢麓Y脫聥聢2H聽I.脙L\\4聧麓2-*聶\"聯聠聰聳}脛脹Z7聥脡驴p掳庐忙聻 鹿VM9&S]聛每铆a没脟k没&{\n脧=聽}Cg,聧聭s\\脟=聽Sm脼聥镁%么茅~脌脪貌聜聬霉聞聙脧脗OI锚聨脽忙<聧聙x7S[卢)o!聨聸VC聳脳S脳\n~E'St聬Fc聛脳B^c+t0脵贸盲霉#锚掳+铆脩脢脫Q\f脭V聟聙酶P脗脙聭\0(眉卤脩聫谩聟M\v脼p脫HI)T脧聙戮\\脌脥@聽w卤娄P镁脨!聹1U,聻芒3聯YU脷F煤聯猫W<戮聥卯脨}脡d谩脽脼脗\vd4_聰脠聯卤Dr*脣1#H聟w脷~聫聡@脵聨聹聡d_v聯露虏脛職没C脷T眉脹炉AXV聯^聨NuAE脛/U.脰A^脟鲁脗N戮H聙酶G聻聭聧驴脻bmojFh貌拢媒聯R漏&莽}庐么:脜聙vI|D聛 +聮脳镁Z莽鹿茂AN聝聭芦搂U~*聞AO脩貌茂陇聻聧lx没碌z茫脫b 脴脰谩I脰聞聡陇芒M脵X庐?聸聳脨卤篓f鹿\n脹\\垄)\v脦镁脥K6脣W颅碌猫JB脻>S霉媒霉聭脼脗脻锚Z脫矛oA:搂N茅聝聽\"B7漏?谩帽脰:聯6脢脹隆脵,eX職聣脹聴虏[@陇脽'\bh2赂I\0炉芦x脪聸聛N^\\6\n忙L拢}卢^u路路没N脜聬{W戮梅9脻n聮聧0K玫(脌v莽Tu@Xz拢聦!u聸矛脌卤聝脼聯茅矛聹聙脨m4vdojV聸拢\v&脭0矛聹冒E脛vd@锚拢KX麓P脧m?露#帽虏bV脫,脭l貌虏XV脫(脭\\C拢K~玫聞yd@脨m酶聭脦\nE聵拢聥毛聯q\nE脴拢聥脹聯q\n脜\bEH聭N聦玫芒(娄w脡鲁聲(脧铆脧T聧脳玫芦聸?A锚煤聺聵jDWkqW脥jJ煤\v鹿\"猫-Y没貌赂聫(P[脨么毛d=M聛z\n!LSQ聠[,l脗cSQ聫z\n 聹贸贸LM聦z\n 脨么贸LM聮z\n (4K冒霉梅\n\n 聰laW(玫卢鲁]p芒脢酶.脿Z脳脜aD聝碌露聨+聧H脦脫聼脨Wv=聽\v@谩拢驴Z脩鲁脭N搂碌\nw?聲N聵隆C聼氓脥脮\n锚S聵A貌陋玫u聲0矛職铆聵矛職=}/C铆w脷聲rK垄B脛聤a^!脝z U聬脠G脦UR矛職脻虏uc@聴y拢聬锚聳聼聹脥锚S聵1M驴UU聳#貌陋玫^聳CP炉脮碌p&卢聠\t聦聼3聝<P矛|~!脩2b芦每脿帽=}~C脻0聼yhE)媒潞毛梅聫路芒脌<e脙kO茂AB脙;每hu聟S聭聨鹿茂w篓~枚聨I{路脼*\vO5\bf么露z\tq锚禄卯铆脿聤脛'>;?聫聧4S脧卤脫w猫脺脤Q聸麓脽麓%聠x么脵枚=MkL碌+脮路聙莽茂露每t\t茂Jv){Tt:%脹t9戮\n聣=}>/K脵聳h聰聤W脟l没:陋脗脭脝隆]聠猫脷卢脡\b,L聠么聮么脧聳脮t铆fH脙sX&_芒E聙聬3拢E聫\v9聡庐莽脪露j\0&_聦%g路R_卤脌帽庐_uV%B@卢拢莽梅脗NF脗A脟貌鹿\b\"ti\n聯脜s脙盲J,聫脜脷O%脧脪8脷没聦脡聞Wi\vG聵赂赂_庐D脹O脌gh聨qQe卤聨脦v脤掳碌矛!Q脦QZa冒Up4聬聟拢y:m毛c\0M聥e[矛s漏聝氓聥K,潞]搂么媒聵P颅卯]莽PQb聡,鲁聣=}I聣聶\\ 脻脭脙么'$芒9th贸脟r\\脷?霉聽{聙路聺:M脮脺A@'c卯脤卢聙職'脣鲁聡聜篓?'露炉4卢\n7镁(录脙聟xd铆脵赂芦}脕潞iHc猫$l聻么聯聬FZ卤z>H脤G拢聸聶戮聯<脡庐聡d5!铆赂帽卢y{sF聯碌脝聢脤xM\0脨鹿脻聙\t贸脝?8X霉RS/脽g聦搂^q碌锚貌\n73每聙每k脧k聰茫脫脼聡2盲tL聭*聦脷盲s卢z么0驴么l聡AP\tt5篓*=M聭么$;<垄贸1禄&陋_氓yI卯E聺4M贸脷脩27z贸脟y隆聞聛脵录茂煤m脧V猫聫聸谩聤i職脫锚\f] 禄聬8矛i^5猫路^聦\nx聡莽聫脡t每聹枚镁脼脦E0dR没#9麓炉;u碌芦脛垄聫=M脰脙脕忙CXEx陇猫霉脰锚卢u戮Bv脜脻脴聠脕酶脭陆聰聥么聳聬oT聦陇贸茂谩酶:忙\vr h聞玫N聣~聬隆聤梅楼聰e矛聯脢<聣[聰聥4{<脝N\x007X4禄.铆P3聶脳陇楼聜2矛貌Z,聥C'n垄氓聸酶<铆{媒脳?酶+霉卯颅$脕3貌聬E卢=聽露茂b脟;聸聲脭聯聬隆芦卯q脪S掳職莽脝z)脠P聻聴yrO聻脽眉脤脰聛录陆&(颅霉W芒楼脜i垄)S猫驴煤%脻):5脮GE_v職霉脥O聸隆!S(\t脧漏M9^霉聯聤'脳聛脧贸聯\":卢赂9潞拢聧g露聛\fo聡h媒:<垄)xy聟S}脿聨聢陋盲脣脴J枚聠yAd聡N露聹,vrC颅聬7路>Td路脦\\:\b脷'忙脟陋庐Fe卯&bA卤'玫媒j矛碌脛=MD陆脢聬铆贸戮z陋Z9脣氓脝聽脧脤k镁Z(T(聹脕垄d驴娄_Vd卤脠dHGAC陆聢眉\t脺脽脮a脥茂聰3Z\vS聣>聬聛脌M\\p颅猫Yr赂o9y氓,8聫铆聦$8陆P=M芦聝#{陋vP脛漏Fz梅#5眉脤脠禄录聦c脫R聸脦脿铆脳脟录xp聠搂yc脽脻贸帽脳聨矛x陆\0<%聣 脙锚脦_V聺脠>I2掳茅:脵\0路炉<,猫碌h4聙茅煤hf]脹(\f%w隆麓聵聹?u脻$脥f}隆聛@LWQ鲁m贸脩聴脿N聬聞2聠脧脽R6_0#隆|聬*p戮_&\v聝聬%聽聝w脠Ob媒Zu媒\t%/陆玫聨b#盲脙陇楼矛脽&聯卯碌聧O玫LD7媒镁聼脻卯拢脼聦v盲\t脕職IZc路=聽L忙聵!F\\聲#娄脩聤.脗脌$路聞禄y聰l聙q4聬F脪聢脩,聯脫篓聥T\n么聨脻)O虏聶T脴没脪S<Y}脧7聯>X媒楼2u镁zq_X~麓Ix聣|脼 4脦脠聟聮wy聥}庐露聰脭聫酶聨聮没qj聜脮聨颅聭_鹿%氓聨#脳O碌脙74聝=M芦聲聺聭U脝卤zi禄j脢B&脭貌f脼麓'脡脡脛b掳N卤脗驴聢b脙/脭KE脽聨U\"x7_M6碌貌梅n眉聧聢霉\\脢聡m聽氓Tw氓g脺<聰Lp茅Y\f芦脛\v0Z\vp鲁脺帽脼陆没脮掳聡+;s娄脠聫脡oU漏Z垄1脿n脡聲 潞E聣麓陋脵J聦拢l\\t聽%聫陇脭\n0w52忙f職_脪脝LQ脢颅]b聹麓酶#煤每\\O聜\b9脢陇g>每y?陋锚脺聰垄枚d聯聧l么g2e驴聲忙4铆卯垄~脙aAT!\0*x1隆Y脹x7Y铆没拢y聮卢聡+芒!:0脵G=Mv潞F聫禄麓卯:聜卢脭聵聞}聞脧篓脨卢贸y聮聠-陆py路酶職聭聞*脠聣梅娄脜枚媒猫xdj脵脰脟脹聣帽s枚楼\fuh脗聰陆枚颅聣2聙茅lDjs脦k聨聧脧眉陋脙聮O脡\f氓脺聢j>脣戮莽NNddF9>^G脽陋k脿x脳W聣QH8铆!?脠\n脨冒V脌潞.g聴c篓v庐酶眉6a陋炉聠D娄聞茅脻盲:1陇聯*聡V没9漏聤0聛脥?i\t脻\b5录聡H(h拢j脛B篓脫霉cc$G聠T霉[聸jv么Y茂陇聹8聶脝锚谩X脵d陆&煤漏脴聢脽e拢v隆聧m?脤j\"=}P莽路2V聮J锚9聰颅芦i聢聴/聺贸聥聮=聽隆聻!'>贸Y\\>脿脰(聠陇搂脟脡聶脛脳聯聮脟NFF脪聜聙&6聯dDlFkN陆|\\&脧j脙職Z聮-聢?脜玫=聽lWHx卯t聼聫碌V盲聺F么卢9HX聻聥1rj\"炉隆聧}聼脹貌聵漏聠脭H/冒K莽铆dW脗垄C_禄BG脠帽鹿颅sM脕9Eiz毛c:脼0S陇}脪o\tJ谩w=}毛聧陆脡贸脦:V脨q'U茅c聧脛?碌$)路碌聦K聹脟7娄i媒脿么)L;(I聼陆F毛b脰么脛=}脨P聥录炉戮聮脳脮毛rfJ]脺B聼聶C~忙聼陇a梅脫聯聟@庐#-聧聹V脮w脼聶z+聞脰枚酶脠露4Q垄\"脪漏a聳脭08芒脫脙聺p枚h%X6脿媒聝6職聢脗聥聡脪iw脡脙-Tb\f脠y冒脝j芦K聺聨C脝\t8垄聜聹a聸a枚>b枚脨yE脼m聜芦\v楼脥Ue脴}莽]聳聵B脧茫脙娄谩\f脣r>q戮_K锚脴酶聡聺脝聟芒<脠盲霉媒U枚\0隆媒聝忙,陆氓m垄/炉x$枚p@\\聦聺G霉貌聥jW\fN*W1卢聸聶'O脫)碌脛%2芦聧=}聢I\b聻l脝聶媒,脗*2+卢卤貌-5聽=M镁^m聻脵潞路脹Wcd\0聴M脨陇聧媒y梅N脿脠j芦锚脠聳脛職脪脕芦Q9脫陆聣禄5聳露没z没I拢卤陆楼露聤Uql毛脪\t枚MzLZB脧iLO聣貌qy猫霉冒<帽\t戮29煤么脢r贸I聦聫*脝脽么脽脧忙1)脫聶脹j脴聡忙脛拢脝脌=MyI媒聟路聟脠路聧.脰Q聺聯聟4聺聯脜-聸脕聠@V驴冒酶脡X茅聬c茅2脣聝冒h脥?\\掳~gt,聤眉CJ聳58芒:芒聙茅每搂5e*O\tUD聽\vi酶=M4j%戮娄帽s聰.聦聮Z露i芒P聯铆隆煤聥脿s卤聟路聙聜n貌)忙e戮^ZM没聙O'每聳脻L颅卯路脦(锚莽v聠碌k0r=}陇脦聥聻貌.m,毛Hx脽n锚碌|脙聡茅<n脺MC猫x炉=}M每冒{z脣聰P毛z么G梅Q楼聞G聴聠1脪脩聼R1zm脰#露0;1=聽聺聻脿掳7!卯茫谩N%冒镁聬漏陇谩脿陆聵陆l貌Y\b}脤聤#}隆脭d陆-贸7陇s聡~颅聭聨聺;聬霉=}:楼煤聹脮玫颅+脴qN聝F聻E每忙媒脛霉8r聟庐6脵聸聛(O茅聺聸玫@=}p录H脕脫颅矛卯職聭A聰聮聯驴q脥炉陇\"脦b3 Pw6脥漏脭-k脦^w_脢媒赂7聣聫毛脫nwm6聤颅聡(脦{\f聻E#脛脗脠S录S聴脟脟p莽D卯r隆}脻脛茅jZ陋\v5脌/脼茂茂脽脥脕5茅霉漏l陆卯G隆gGu猫.盲7帽i聡Q#猫O帽鹿卢颅T聶聻陆脮]c忙茂RO#聶聽F陋芒i<庐W卯G陋聯貌谩聙脺聰脮脛9聴q5谩脽Y赂q\bS聳聽9y庐隆b\\d脜聸聢脡猫聢脡脨梅脽5脭聧p脙聫 O脛脌K聸漏酶聮聬ek脩锚聢毛y镁脽$u脪=d{脵Z路貌脼帽脹\\聝]\f陆脦脠露\"[p猫霉N聣\\聰赂g陇0脕庐(9芒6z?聵聣!鹿聟\0聙鲁\b_脴聤聭聥冒露8聤鹿脭贸x7I贸漏炉楼\tX%*職K聺冒脰{庐娄=聽聡赂颅矛Y眉颅o莽6脤!虏脌漏驴1莽4莽垄bI聧脙7脽脮贸媒每!聫脠煤聴%陋m\\每聽職N颅脨C\t铆虏娄禄+VZ颅陋脧聞m@脠e!tp脝聶禄聛脝4職=}禄搂颅录85脮LZ卤dv脣Y脡]脷?录.茫漏楼颅8颅聰D鲁拢每::Y猫聤谩芒u\f颅脿脣脺陆聲铆聵RZo|/X,聲垄q&碌媒]矛\f\t聟r@,脿冒脙鹿\b脝I枚R盲聫U媒6sZo脺U脺rq芒X<脮$聛J脥脕脿脗颅\b脣5<J颅^掳碌陇D\f脮聙聫)\b搂M露聢聺脦潞卤m=M聦每煤\nBZ陆GU$\0e聢?)聸脣帽Egtw录xM;K Y脠卯聹聨锚脨v脙聟茫!2脌毛茅冒v\t脺G,脥脿,S!\tB猫帽聧2莽t陇莽_\n1k脥@庐媒鲁脹聝聶3锚芦茂卢\b脹j聙脗\v\0mBTQ茂聜B聶Pu脣脢么脪聟貌锚A脿@猫冒娄谩5.)y聧脙潞N聫梅9酶脌)脣V驴聻陇O聠陋>職4[聬聝'e锚鲁每d茫p3 聡\0R陇聢plZ戮7聡聡脠脫聶枚戮聸炉炉颅i貌陇酶?I~K聼=M\\脫矛|茂x)媒J酶聡茂N聙每6脛ea@脴卯庐梅陋,脕谩t2鲁聫聫陇脷赂;Od,[莽聯h\t么聲炉庐3锚v聶垄脌拢O&K毛锚F聢脹脢脩l卤l忙L潞V茅芒!:G0脵u^聴脮贸O聙u}聬脻%聣戮 聨k忙聡驴\f聢没)卢|卢5o露路聣脺芦煤霉篓氓脵y虏聤鲁脼=}垄盲每U颅\"P脛}E聹篓R聜:茅脛帽脫\n茂m=聽d茂聰脴芒盲漏y聺[脦Jj0颅8h脕)iy6镁脽芦麓聛e聞脷脢聵脝芦w聹脛z聻脥z聼聹卢Tm脌聵?L聽0戮忙V4Yd聙聺铆\v\n脧聡=M聨芦聛脠m眉[脧\nA聯$聠Vh氓Lo庐S脗 >铆x_[聜聠脭聰X媒聭l聰脻s聯聠麓脵x8卤脢v貌\n+贸铆帽B\b聻U脨j茂_锚脭颅聜碌莽o貌脗\\聲陋矛脿脩脌Y脫脣Ce{聧 戮麓聽卢脜h虏庐.Ak0聶楼,脥M聥酶聭>脹聮6%聠聽)芒镁=聽r脧每聝茅\b庐炉聤冒聺~贸\v聢聮qUM脩\0漏么梅M没貌V4漏娄],聡u\0v\0镁垄么]玫e聣媒'Hw卯拢%6脗OI赂1)聛聣茂脤\0\"=聽露锚虏>O貌锚Ll+:@脦+芒眉聻R:戮]\"脵脮O%脨篓}Q芒颅茂卤18芦S\f潞驴=Mf脿脌霉聯聥E么漏庐媒驴聽M聹氓冒盲聞P聤聣aB<,脠脠H莽脵聨脭镁聠dt茫脦5L聬脙G0聟聳{[聳锚c录9聬猫聽\b+脟mP:录脗K脼聼_Q聟W楼聻e聼7锚陇 脮聳聡Y茅I碌W毛颅1p脩镁U6G炉KAPvk脪,赂8脟脵聳楼xB\\聨脴!Z:聠脺脽每^Qc@@li脙0每,脗炉庐\\脳=聽聜脧x脵m\\|(}铆脪_ *聜聸Tdj脽Y脺\tC_?聦J录娄d脵帽露媒x脴S毛聙眉w霉帽脡脙n聫is~玫_聶O镁[锚h眉脣庐聹a楼N脣=聽G\v脻C么芦<E聽聲>\v煤4(FM聦脪脭矛聦x铆聙矛漏锚铆禄聙\"Ei脹聬,茂\fG脣脽媒聬?0Bm镁脟脮脰>陋97~聛?o聼<卤卯w'猫庐\"卯;鹿脺f9聢2矛脥 庐7k9R酶CP霉聣k<聳,酶職路h74@貌 W陇梅~j脠炉贸ui職聝\0脰F镁冒1^~8?聣聦聯do脫Ai^茫茅O掳枚虏脗脷z麓9=}脥陇A脤脮聰陇N潞f脭<禄5脷芒脫g{脼聢貌楼*禄没聰)$聬oo\n聲JW颅y~(脜脫;j芦Y芒?煤Ea驴8篓!氓)聣!芒虏fO聛卢<\n矛卤-禄梅聬帽搂0m聦颅uS谩[每6脿H<$8冒脼b}\\ 聠聢G陆脡H=M聽拢陇聟1聛!脤\v=聽酶4脰g聢8p聜',[脻p8聰聺聝聸颅陆陋驴+聼陋脡聵聟;聴b脗脤<脨脙^矛uO聛y录脰脭}#麓+媒P脠脡脹禄y脺聯聫x脣聝脩聣B媒脺\0脻職莽炉么.录e聟hF垄脕b聵忙8脮i脵脗虏N搂庐鹿o}玫Q脳脳禄脮毛枚y聡8脝B脮贸l=M脦聽c脵聙'd7脹聹娄炉脤聼/u職t聡戮>聞1聸keu颅聵锚垄聢脙thMu脼猫搂職鲁k^聝聽聴脦9p搂l(脫录I1b隆脿9聠S霉锚镁脗聴T潞驴x毛冒脳_搂莽*%聻忙陆没脿聲没镁冒脻脳聶陇]陆漏聴C聸聡聻9K{枚聬镁脽聠茫贸戮fA漏貌脳戮9聥聫YB脴^m聶\f聡pp煤o.\v脟镁 d脡Wbz贸帽脳T茅L脳k聣脌霉枚(聨聶芦赂貌卯酶脣聢露N+脿4谩w聟锚c聺A录脟x聭&N脼\tr碌\0-&脢:帽聛锚\\'驴聞脣脻X&陆&聦Lg?l聨67I贸@K聸掳u漏;x脿脴n聳炉|卢V6d聭路聜職@贸聬\fa矛赂GN鲁媒\\?&=聽\t聛庐7脥脻禄l聠枚$盲禄么{脻陆8聙b玫陇每C聵V隆聶猫X2脭\v楼聻聸聭脥e聵脰脡<GcF没-?脵2芒b脽Y聶:q7聠聬脢Wo脕赂j脳聨脟脨K聝聹I聵脳y;露聮zUE脢聹*路@脻%茅Y脗脩酶鹿 z|录o3碌3=}e聙脕聢茅聳F&茫聙Q!Sh5脢-^炉脕脮\n職\n脷脿镁陋聝z3么&C\to@聡!脿'#脠聙v脛Ky脨芒\\.il\"芒y搂禄芦~>V戮聥貌脗脦|聡t=聽颅忙\"v脷m茅ze:聲驴m\v@拢,z陇路煤眉聭卢聡fz70+鹿鲁聥HQL漏\n'没脷漏\f聣~聯Ht聭眉脭聰聢聣~冒sp~yu2漏聻.陆每聰脧聡Q楼R楼驴聯茅聡\\聺X录脩^<'c聧l 聡4脹脝霉聲脣脰聧垄么脛YV录V脩脤聯聰脳隆脭陋聰1聭聠录(盲;~聰_聯|聰_聰脺3陋聰D玫UIe脕4陆碌脼!聶聳脮潞脹陋娄 么脻脫聤戮u脜6_^<楼+;聰麓聽聢聲潞\\炉脵聳MO聰k陆\0p脩脛茫kFpKpKpK脢茂\0A聜.V锚聦鲁么录聙漏脦&酶=聽聶脺.貌W聲聮脰W聟隆楼脦d脴2h莽n茂聦Y猫麓3QWou聳聮E陇z聝o聹脼脤脧脰拢O脰脺Q聼脜冒Q聜聰N脷脝\\聺聢E脝j脵漏9脝卯聟l7脺.盲每X铆f氓聴眉酶O每\t聸-垄3脜芦X>煤M脿隆4+聴z聸h\\芦!脡=M \\脟帽聹脙\"(枚庐4o忙聟冒茫kX聬脹聶聟脮玫脰麓氓Y脧e陋=M}聴S\\脣\t脷C/聣&卤_镁脨F陇聺颅E聺聤脻脴聲Y聭#拢Du聸脩锚碌/炉脷鹿聴.聙垄O聞聳楼聴聽芦5炉*T0脮脟聣X玫谩每聸\n脵脰N掳m脦鲁脡镁聴聣VL煤W聧每聟聵拢冒[$漏f脙脜霉陇\"芦N聝脮$hM谩陆zo聜U|霉~U脹掳聟娄卯; 脿tH脼麓X^聰拢碌脿贸.脹贸V聣鲁聙没tL=Mox脥脛矛-潞A碌聛\bmrEX枚 X聫:脼X脫聝拢聜掳炉庐聫脪霉\n脻r%'u\"V镁V4[聸脼K聹禄聸3陇脻聽M聝4vf聞脭TrS聝S脠聡Q冒4聥聦炉~聨m赂i酶Q聬脴脤么L聯陋茫驴聡o聡聨G\\莽>I>霉>聟%<聨脕脟+戮碌&9脌R+聼聲脢9聙5聢<}脌K脕冒聛M\0\fng篓B卢脗芦\bO~K忙脜K脢l卢}g\t=聽脿j潞戮潞\0 \n脷B c芦聫卢c脗ez聦c0l脡聞聮q脦b\b脫没聦dK媒矛每xJ陇脢脴脢3/0f媒聤盲j茫锚锚Q_7=}q>1A聛Aa莽[脌*莽潞B聶zNe陆潞戮i脺cV$拢A3脫7\f聬脹.锚篓X聮q聶e@s脪O\v每聰+*聢<\"虏gP\b聙[J猫@鹿\\脹聧P=聽潞脕垄卢=MpT聢/T颅c4眉聳媒聲脳IO潞聸茅5帽卯聻毛脿谩虏&脥-OQbR脳A脠聴_戮x聭y颅貌脨]枚,k谩聡5陆7脥\bh毛猫b{禄V脼聶~Y脹脴聽.Y{0聛ux潞脵梅聦鲁玫眉脗脝楼聣娄聤镁脭矛b聰帽聶q篓卤脰.A脦F脠脴N脟路+脢脼6A贸脪脴A碌聞\\脝脳聠U聰!毛楼茂莽mS聨TV職眉潞脭e脢矛陆酶b篓拢T聻禄脳R庐 冒 隆脪脟h镁&YK聦d:陋脜麓脝z脭Y=}毛脹脛2c毛脤h;G[掳/&莽k/qr脹脦掳脦潞-mM聝路職#^脢T掳(<脟铆庐v镁%脻脨聲聟脭0毛聳卢\n聡Z聹+聧聜脛\v卢+脹脳铆0&脟陆脼:娄F\b脰E聵E~G(脡茫>聵Pl聶拢篓忙聣Y('Mu氓梅聞脛g聰脤=聽聯聬脭聞脠脨没贸t0n.露A5[脳Z脣2庐Q脣聠i\"矛T\"聜Tp2聨聽G聙Wb镁|聝Q聨2k陋B!脦\vv卯(3.聬7b戮眉茅J脜茂脣聳娄聠N脤?z/脦脛oE=}w赂么\\脝脻漏\b9}v脗赂6铆谩脹z脛/聸{脙娄P茫+茅脡掳茫2P聬V聭Px聙茫聢铆O聤氓脰镁R3xq*忙脺聼=聽\0\n\\o脕s\t陆T7脼hYo\0zK赂潞陋麓脢隆H卢脨帽聣M忙=聽]_\n聨K8u脴眉AJ聞kyh脤3脢\0#聠聺\"m\n7MQ毛A\"\b聟Ka 脛冒聣芒帽+D\"=聽N聣K脷脴d\0聤;聛脌d芒;a聡冒O脦|每jo聸K脌\f:4T聯{脤X聠聥聽8w茫么k;镁脜j戮霉XV聢煤麓聤BX'茫么D聧聨陇聵=聽脦@\f煤帽ge脦\v聡脕4:p\b脙R脝E聻r-/貌T聫卢虏X镁聢搂茫芦qB聭1*聢Q聟=}q@d陇9脻脣;70碌n脣贸)聸N聜聶8BY陆虏潞H職脮8GUVA%-脷梅鲁=聽貌鹿c楼脢碌,=聽脙N脷8聶帽颅a没脜莽_麓{脺枚脭脢Y冒o2[贸3_脡$聴N搂<aR脻a鹿眉'铆聽\0聙娄娄聣職o&}酶\\=聽脩脷脩^1煤聼]8脵垄=M篓i庐W楼GLGJF眉媒脝z聴聰赂\\1篓d聴拢聬虏聶脭M脷眉f卯9露\n聺9聹枚A*聟录鲁fTg煤霉脛聺j楼盲枚Y5聡戮搂聟8脜聥漏聟煤fP镁莽潞'聺U垄I漏聟\nf脤聲D脩脣卯卤聝聣脠脧,b脮D聴t聸y脼Y\n{脗芒G聦(69脕脭楼 脭F1b99i碌茂聤7脩脨脫a=M没聴F,\t5碌路E茂a聝玫么v1煤茫@]脮?脼+*帽U聨#聸R=}掳霉聶v陇3聝聴7垄卤茫P锚%q陇陆脌霉聨脻6脴颅露yf 聡7聶z戮娄芒%uX%每碌Jn娄颅脠碌没聺]聸脵陋垄j聜芒聝聹mx露聢脢G脻職[搂脹脭莽卢}贸聟冒隆脣v炉聛聧隆[8录p枚聤脡碌脿脥1P每搂忙脹芦%0]脤E脽聜y聴O聲聛炉莽碌赂 脮脛=M\f聜=Mqo陋露脰聯SH没脥m冒盲J脟4脩镁w=M娄卤=}鹿脿聳\"聜~媒>B=Mz聡聦录莽\f芦脛拢聣1脦~颅垄S脧芒戮8聙~聬$眉1]_脥T\n\ve!潞贸7脿%脿J鲁j;U脴氓毛P聼聶禄聴篓陆V聝镁禄冒Z鲁矛Y禄脙露聢聶冒陇霉聝脌茫Q\f|脴茂梅么&霉么M铆y{\vB茫路戮聝聨聞贸dR聤~枚脦\f鹿镁冒|霉;禄ksN猫1矛冒'HD|脨'wQ陇芒\n~聞陇rD脌脦%/猫帽)s氓T脛D聯ZI7PR'冒潞聤'\t&陆卯鹿脣\b篓N陋锚脣k陋陋没<y聤+9聜脿=聽>@t脤脟脩iZ枚戮脳X\n;8谩聤隆潞庐h冒聝脼梅没Ex\v楼露酶脫t铆9.b潞脌垄*E谩\\Zzx茅陋u矛=}酶=}脙聸3\t聻驴脺脹~铆_貌露酶_\n脪掳脝\bcpY聤卤I聦=M盲M聺a聢r3毛hx戮铆聞聜u颅聯\v霉霉玫< 20=}霉聶^脿脭梅露陋=}-)y*聴脳[脵炉芦路職脌脣脳掳脼9脡脳毛隆脳聳氓:氓2脦聺虏??脪sk脪脵I脢vmN\0煤j芒r!聝鹿脨聦u锚掳聦鲁脩锚DG6聽眉z脕T潞娄莽脠聽潞锚脗莽莽猫碌\t聡么Sd猫卢麓茅脢\v?镁!H3vL脜眉聡^Q脨锚b莽'\0脪脨Z[M<脛脫=Mne脰媒#H\v聠么J镁盲茫f聤g脤\n脡lYc^脛\t茅W聠脳脼煤聹$脕E聦么Q脣驴脢Py聝=聽茫每a)~\b芦C脼脦.8w<k脭锚=M酶脗没c貌搂N脠脗聦聹^h聦脗漏tea聳聶K<霉聯聦脷r录/玫vuN脮漏(=M脩聰kh陇聜每o;芦聥S脿路\v禄聵s,麓脨脦每{脣茫\b卢脹脼a陆N聰?忙_{庐谩I聦帽楼芦2+貌聡5酶录$脛E聟聻貌篓*=MG氓聡7C毛脠E聤隆帽芦S录聤脵sB|\"2q脝+#聯脌LY虏a戮O忙贸ri脷隆b虏聮+m}azgl芒r每猫虏聮,脵脹录鲁脦~v=聽d卤SU+dwJphH脛聮脙茂r];dw]2~n潞聦贸脣\v脜每脹猫脩X脣录1聧掳脧jI谩录盲聦冒O聦S1w聬D/:聶l脵脥脨=M聤+8E鲁/P庐s鹿矛聞聨=聽脤Y;2脩聬锚=聽4每Ox;脦b貌路#茫脩聥聡8\f8>脙V7脼\\ST\t聞卯b脛猫脤/{K碌p3聣篓|D梅脩聵=聽卯脫 路7脰u聼m(脢芒HQ|D帽麓虏\fu聡(O茫c脧聰f脝5\n)露\n-没}帽脽聼茅#聻$X眉脙卤莽脮職霉聲聦搂脤4脽6猫}陆%脝9垄玫R.脡%聙=}聬aO1脟7脌脰脴掳M氓庐聨%聰%麓脷煤卤u枚媒聟脕聲聧u~玫,V聠z8没Xp盲+&Nu陋pb<驴聰煤聹聭聽脥*i陆脫聹?,)聴s脣%><聙~? S谩脷每1y\fE脼{聻x聲脻I媒脌禄4W聬贸脥聲垄>芒霉脗t毛脴锚r脺脗,虏脻J脰卤脌~Ry垄搂脺聹聢碌戮9R碌wd聼eT聠娄Q漏聟霉聶脝脳脩脜/聽脥脵娄xr芒脨氓矛脥矛脥卢媒赂%聠W枚脩聼脕酶p铆贸脵碌戮脡c茂漏聧\\芦庐炉聬鲁潞垄莽.脌z炉脜聦庐脗M脵_脰矛脻X脩5聽颅隆露梅垄脴芦BarYA9聵>楼没录D)芒楼聵a脳s颅贸陋<鲁O茫#D虏没脹脌碌聲茂]掳锚=聽帽5聯酶露'脮M?脜枚漏脠^炉贸垄d隆CH漏]1陋X7卯e脽F聟莽聲聥:楼脛Ss碌85聜聹\t颅G陆Z職yIj禄\bV脤M_7+聦聟陆贸盲娄氓脫%漏梅脨隆o铆脠矛脹聙U每搂dl脷聢庐]脤]酶脦!聽8聵聴茫聼聨Xn,聞聺n<拢氓脢%?芒每脌~芒隆贸:脮赂聧U脻脝v卤聛录=M卢露脴s1聴GY]E聳脿玫聽fQ毛;!聭卢聡庐脷霉@vUD露W.驴茫聸X眉隆枚d煤脜%X帽MW=聽玫聰聞霉Sx聺v脦梅Uur忙u漏媒拢MK聢V酶聬脭毛聶聞yf卤聴脰茅脜卢脿脦鹿脹矛茫脠J!聳\b脰3pf聭锚脵碌聣脝聝脽e虏聮;W!卤镁聲\f脛L1W聯陇h聤脮庐谩隆眉篓脩_'u脼;脰茂'脗脛4tN聨\t\v毛脽聣+芒聙lB贸Jqt/e_F&S脧^脳赂聵4聦Qw毛枚V聨!聣貌聙X卢聨聨=MM脨-0}媒莽驴_脽脕\t聨聧n脌l脙贸_P>wk(g冒#C脠RK脕脽b脥=M聥玫拢N脪.驴锚茅楼v脙卢-A] 脩脗N露n录\v\vP鲁戮颅矛聞脨聟陆猫'篓S7鹿Q脮脕芦录驴碌陆脩鲁聼铆|卢戮n卢聥貌聤P聵聬脙没聜隆篓碌卯忙E炉\"r莽\v脹脺ND聽 搂C脽茫脪\n|毛kSy7\b麓卤o鲁镁脩j聶聛@戮S聮Q<鹿芒聡?)聟冒7p潞^路陇脤陇矛矛(聶|聴F0聲~霉媒芒谩帽篓t聤3s卢庐庐驴芦j聞s&芦陋+M脦潞芒脼e鹿聞聮脴'!聜枚:禄8聯@lbN,q\f禄芒Q脫脨驴聣P}聞%路搂聺帽r谩矛y脷聴9脥K脜聮'铆脡盲忙忙漏庐篓脗=MAu聜e脴=聽t拢bx脺.脤拢脽脟;|脺\f庐脠聟\\2?G娄~r聨卤庐hF6脟脜tN驴wX聺聭垄 OB聲聞帽:聛娄帽娄\b,]-/玫虏D拢a1聣庐聙聣鲁op<m脼聨/{脦煤[脫脩*u驴\t\"脕脺Y毛麓脨0r赂赂脻贸脵禄脳Z9!脥脮鹿7录楼掳>脳P铆聥#u露聠聧搂每拢脳j脩=}炉E脮/聺卯v?氓脕i每=}M脡脡xw颅脨脿篓脪I*u脝i/脠 莽,$職j8e聰聤猫:<聡=MhF脹聸酶聣聤\t\nIJ脡v=}[x颅/路n驴s氓5脙脛脿贸脩聭@戮P脢聦聦-#虏脪脛聹<F'>茅S脻矛脜\\m\n脳3芒t么R么脫R聠聭nx脿脰脠聛聜脗IE庐锚y!驴盲74脕mR脫聺脰戮f脹}搂i颅漏聙!聯脥芒7tf,[g0楼R漏庐X眉j谩霉!脿脳氓戮a矛煤 B忙芒脼]漏i帽脣\v脠脻谩y>G聲j氓盲聬P冒录篓梅kD聼聠/脦\n7F脙4=聽氓聰聮K聫锚zhGp脷聹X|谩掳<DV露锚)}毛i卢;|L聽脠h\f铆JUtXf贸媒脣Vi脻么脺猫2\\6脼脳脷;聰脽茫聣_n猫聣脻)麓虏脜=聽g漏隆E*e禄录=聽\0脪\n聝y}^炉\bB聰卤>脦L脢=M[漏酶虏楼霉X颅脿娄\ntp脧酶隆聞t煤聫P4脟to%d%9聞\b\"鹿脤脣脕mj没聡铆脪芒脢脵X4么z脷聨茂}聢脻j忙.&6S聝脺Nf露拢xIN脥驴颅庐}聜?Q3N\0j帽P聸/帽Qf聰每脥卢脝聡颅\n/\"脴])o4陇D潞c.Y脰芒煤<聥脺脥谩氓\\聰盲煤陆Y7聦(f|铆芒i\b\\ 脳ts\\茫毛脷t茂聵\t*f脮\\(脪K脕it聤h.碌猫C脟@脕貌玫8@聸P脫脻#D聤1=}CSI脩脗貌y玫YEe聬Pp\\k0镁(聲B么o聣聶没;$z>u聞毛盲pp0脺ldJe:*鹿tO炉脌聡梅,a脡锚录铆G]聯聥冒聤\"8聙A聣脦=M&vT聙聳貌卤脗脵虏炉}@Y 脵脢(锚氓聙陇6聫脽媒5R脩s忙脴聻聤\fQ脫Po莽垄c脺镁聜BU脼漏聯kK脭脭篓脦脿聵眉AD聮锚聛6K驴聟聮貌J\f$D聤-5#聠隆镁聸}聛垄庐潞q聬o聥聸Li:5聽}脧聙=聽d\\脙\n卤\\,6掳聝聰HJ&垄聯k帽陋聼1J&6@I脷4wIfl脨s鹿聰脦'脟炉聭xw虏芦炉'脫 H|驴763oQ煤x脼聧脗~lk聹3聫?U聤K锚3卯酶D\"脰聬帽\b脪戮Y'D!镁脕脭Hb酶卤B脨t脫锚XsLg路霉R镁X篓&H職脩*f聙=聽脛d聳P2聳8脩7聤?V47脷驴枚\t:K脙鲁脪0#ow聤玫煤媒i聦脫聼脹卢f聮卯.玫d忙聤每脕帽没脽陆U毛聬8脕s脷掳X颅}聯~q每\bC搂没T脡r芒-脠+梅^搂聣聬 h\0卤\t霉=M聯聫聭聯w脩脠S?卤貌猫Z.\"聝聴聝陆O露]z*i:\v聫漏\0I脭mr铆0d霉\nn禄\v镁J8M_#S>.B 聞7聟}漏铆FW聟inS脰脿矛脭6i\n!聶{赂芦C6=聽W@脦/[(B貌脺+DpM潞0\"Uz梅脡茂漏漏漏漏卯脕k脭驴梅f帽脌聙.茫:脭S脗聮脟脥7碌卢酶^冒脷=}=M谩锚s矛'd>]\\*z脟帽聨脩露,:z)帽赂,眉=聽\n庐N鲁戮Hv聡[\bvC聞脠搂漏T}聫?\b&脌K露\t_娄脦脛\b脵:脽#陆K篓聧脡脺脿>$篓脳锚H脜聽Nfj毛脵\v脷D聽2Y眉x脠聙聬~i娄聣陇炉[T聜脺X媒脻忙sG5\"脢脮聺c脹脡聧\f\v聛脰冒e脌聸聵}庐p脣DpK貌pKpKpKPr$忙CJD1y脿脧聡掳x\n娄聯J脪脧露q,楼脳莽聺麓f聞\f聙 =M %w脧\0聻聯脠%聬聝聼猫贸帽86聟T聰聮猫\"枚卤篓-Y漏;脝卯a枚鲁聽铆Y搂+F锚A露陆梅赂鹿莽脻赂脕]8路脽陆8驴每=}8禄茂媒8脙}酶露脹铆,聤n%\"n)bn'Bn+聜n&2n*rn(Rn,聮脦%脦)X脦'8脦+x脦&(脦*h脦(H脦,聢N% N)=聽N'@N+聙N&0N*pN(PN,聬%)\\'<+|&,*l(L,聦聨%$聨)d聨'D聨+聞聨&4聨*t聨(忙8a4谩玫搂猫-[隆没脝脕玫娄脿铆[聼毛F聺7露#聶'脻露\"隆G]露$聴陆6!聼?=}6#聸/媒6\"拢O}6$聳-芦i脵隆職\tE脢脺\b脪g(\bn1聢0锚8聜隆,聢脠脢酶a)聞镁庐\0a掳眉盲聧-3聠没脳Z聶脠8霉7.f脜^谩m=MG谩脦3</掳p盲(h\t脠煤|庐脟.镁茫1脪=聽sc+n卤\bw{N聥33{=聽镁a卢/掳d\0聛聥Z\v每R冒每录,nhz\v\v職脌R_d毛PK[脪\0r掳v.脻d脹脮脟梅R脠cPx2&uA脵眉禄脨脨脷垄>每脼猫猫o脟j-:k卤脢|?脪盲陇W脩S氓盲脷脌f酶>贸=聽聤帽6聦驴庐茅=聽7毛禄\nG镁%忙8A/煤k驴P脣庐\v]G猫;rG聜*4A聹霉脫鹿聬娄脠铆\\脕k脠(垄a没赂脠oYA脣脢Hbb脿脠脡Y#b\tHrf!\f脣聙貌聜~聝\v\v盲聥聥聤SKT\0聹O|玫聦鲁.X脪9\f铆聙$聤cxR聬鹿眉1wAh1Hd莽XN每脦么芒卢?聜梅脢贸;k脌i*oDjX聤N脼盲L}聜脣脪s>lP聤4s麓%VXG=M茅禄盲]{戮庐脪脌@|煤聥'聛贸*v聙G脿;聞_聥庐鹿聙盲煤聯N聛TG聬V隆聨%2脺聨s拢+mR聵\\\\3聮脦V聦(貌4?脫PH|卤聦p\"聻脿貌脤聦脨b茅聙没M\b3聞聮路\f聺聹_f脻聺{聬2脳聧氓脫脭=聽vd\b脳颅:D聻聰 脷\0$赂md脨H\f酶盲'\"脢锚聛yT.茂F2帽脤芒J.茂l帽每聸聤芦o~iK聜B聨聬C矛聝LZ聢aQKZ貌聸\t盲聳聠脌玫I赂=}脡\f茂2脮碌漏楼谩鲁脽U聮脰玫茂k4碌脜脫赂聧=}枚5V脮a玫5卤V@酶e=M聳=聹U=}煤忙n脷x脻芦g脧芦(Hu聛煤e\f%脰搂煤脜聝'vx聹庐谩&%v陆L=聽V&脴l莽聳/聴[ 聼茅脌6掳=}碌戮脝n脰職CL聼禄脼職V2W脥wx陋聼A炉w莽脢)脟垄M炉脡贸jIH0職驴0茂7FV搂'@陋禄dH聴眉sa~|卯0聤脣脜脣mu酶猫冒-Kp\tE聡;虏MV聥e镁卤碌C\vFB赂驴4脧脳矛聜聶露[庐(麓脧0x聴猫冒拢W矛拢[BC聧脥Y垄聫聺\f聰N脴N盲聽O聹炉聢脪脰/V脻Q忙X掳\"p碌.脨wyFu聧脴4庐聲>锚碌!f脰聧颅aXiIn猫陆脴/ 镁拢貌聙芦楼H枚聛庐脽脝漏Oo脜聺\"v{聧赂U卯脷V漏麓垄6隆!脌梅聠聠茫卤聣3聻楼P鹿脳N聯u脫em忙聲镁媒聻x|毛=}脕[[K%o0聢t聳卤聜聶锚眉脻么'枚卤($脧谩脠脠脮脩H5q1垄脙潞卢O,楼\0聼玫!脌脟|T颅O::楼_bzt職qjC脜j\f脜5录!脗x8冒么}脭聤脮聲聵聵氓脦碌>聲V聼5茫V聽%茂聲脵聲聧脩拢聵Y職{聰聲脮脭聲聶聳庐芒碌2露脜脜5聤隆聶盲芦g么脕媒;隆聸J卤W锚脦Y脪聼聟P*5,锚碌+每%脙炉e聙芦u茂脰隆Lu每聹脴篓聹e鲁茫%cN脮}|聸/u聳脴'脤9脝碌聰聸么t漏\t脜Y冒v楼脿梅脮聨脵聟脼脗脰毛L茅+隆XU谩\b-聨楼=聽碌虏聝聳/脫聲+陋楼聣楼盲聳T;聸I媒脝]I*碌忙\vr職sz聺Y1聽楼聞W脜聝潞媒z眉脻每脢娄搂脥脳聜=M梅聧赂+脻P脨搂GM聟露聵聺陋\\娄k脩路聥茂脺=}脹路聭}脌聛脷9聼[l(6聹酶庐6禄 &'聹脟i脡脝A貌=聽聺脦\\颅忙聨)v陇莽+c每_'漏+茅拢没镁聜+F陋脪梅職\f脌.脰虏赂8聠貌霉g;每.脜每$!脙=M露脠m媒zg聢漏脦聻庐录|麓*猫聙,04脳铆A5脿卢陆聧录卢陋y)2莽_]氓炉?没脌镁^煤:聟c锚潞J脙矛f梅_e聡R脽聧聫脭驴c.脰00)#媒C禄卢@i9n煤脢2g帽XT.9娄聬sl聺聡鹿聽X聯脧聽O铆脽录P卯聼芒茫茂gh娄毛\n毛'og/庐b麓煤芒(Pm2Dp眉脟~2脠K聭漏脨聣!2I戮hs%\vr3C~w碌卤=M聜碌B掳聙脻聬m脥庐i脌2脦聻c7聜陋眉[氓卢每z]&聜卤脼脗\n:脫i\"聦p禄+\v\f卢\b茂XoH茂没/)rs猫}脮R}{猫贸聫Ns搂矛聝脴/聧聡脤庐脭炉b盲谩ty脭聬聬職铆P聵Kv脮枚脙玫脦篓=}M職Y禄篓\t谩脜\f篓聵盲L毛#\n矛漏MZ氓陆脤镁聛0陋W芒\v=M\t[庐Vj茂+聧v\b卯脠m掳聨垄脼]$茫聸聬盲露路冒聤脙脮陇枚s卤\tOE鲁酶Q$路聟m酶脩\n7y脳枚脜.聧脟49聸谩潞~r聥%Z毛麓脻聡聣陆没冒f谩z38a聡莽\f聥g4陋镁聟垄KQ盲脨n聢\fP煤o7聶P毛zI猫6梅聬卢陇UR脙?脰聜0f聧脟毛聮聡聮猫聤*脿\f脢聽聞脩F媒聤#F炉聥EJ聯{脮掳^枚p~忙枚聥脣\v}v2Y脛没帽聛Hq6虏j聬聥每\0)聦脪霉聬聨聭聯t鹿T陇脡脨+y麓聣卤paf\n玫貌聢>枚垄聭];JfFZ聯眉篓禄\f.,i脰脦8聤;酶掳p\f聙&聭l脷~聰脕脌b庐聤O=}E聨W脦煤c 茅rDmn眉聭垄K陇驴炉\\每脰^脮b搂u\0聲脰脤聽聸盲脌铆脕帽禄脺y煤陋/陇IYR聥聟脫u#,p脜毛隆聡p录聰i聵聯聰芒脷w&b脻陇=M聛0&冒|脺(聞(酶庐na#;陇颅脺庐G驴脿禄垄g^芦.猫聢|陆|c5脡K梅PO脴聝炉聽聨聠P毛Z聥R脴聵(虏c1聜Q录5Rp_X脩垄\b聭C脗~\\聰t#!u脺麓脺脣A芒脕卢o=}脌脿n聡驴脭$0卯i:,聬m聳$[么炉o聵%脢聶j铆QB锚脮|\0聳戮f娄j冒聠聥脿脕谩~碌4;Xm脦隆每隆赂O脷p\tH麓酶;)虏脡H毛没炉*=}碌冒脠锚j脿S=}t+|卯~毛dE(聭陇脦矛\f 聟=M脌脧聶-脫D拢禄脿wwB聢~脜媒gSrI聮9Q聹篓*隆脢s漏Kb聛露Q聡%o拢脢B?玫聬v芦脻p露a驴玫^\vK禄L帽=}贸B搂漏<脗脤脙K@F贸y脽帽聬(c_/oq\vK脿l,聻@每脵t\t录卤?垄聢#脫铆聧聞锚聣.茂盲脕陇酶脩脼/q聬/+聦垄FSI=聽鲁?脮聯聙-忙冒!o聼聜iT0麓p脜\b漏;脫{脻聛Q搂禄f~?脿,聼脛}EB脤掳v脢A聮M-脝NN煤\"脝wj脮Z聻潞+盲Th盲鲁潞ih.貌路脼芦禄@ms篓M矛脢2Y娄芒\0X聞fANh}職镁潞碌p聴聣脥聶IN聴脻d脫聨Ao職!聲u聧聙\\7虏5脽聦聮篓聼E聲茅聧~茫聵U脌隆E聻聹'a*聡<R矛鹿%i聽颅m掳聺聵)脷聴猫聺氓*拢)煤聲脟聠聽聶隆铆]碌聴脽=}5職A玫聵聹MU虏脫聺脳聺搂%C楼K脩{脩戮脻聙i脹卢篓炉y8\nE猫x卢聫\f脗]脽镁录Y脤陇聣\nEU陇隆聞t8脥录B猫冒露脫脟脥]hn茂聸聲酶脌聸聥脕bd谩镁t脟露驴脥e HJ碌U鹿聮V脪_聽H/聡S茂眉掳脢聨酶Mf聫\t脌b=聽}q脣戮k卤GL@脢卯氓脠W=}枚聵聮毛)(kF锚梅\t媒猫脭聹G聠1.篓聤*脴聫\v脛脌]脽眉#D聹卯TG\v脰聤i聠酶陇聛rJ鹿脤聮70脨卤聮Xg聝掳脤A卯贸P#m篓脳聮酶媒霉驴聭9b陇脧/~聴脗u4}聜聯谩[脙$脥锚D0x贸{[盲聜G脝3聮聲?聲锚聰驴職脩脜q脦脩I脫\f脩卤83脩f聡Z脩聯聠脩0@楼脪職B驴脪W脹脪猫{霉脪娄脪4(脪=聽G:脪fSM脪脧Ta脪茅Dv脪漏聦脪拢潞聹脫n聣搂脫么脝麓脫媒l脌脫x脥脫脜莽脹脫)麓茅脫T脺梅脫#[脫E,脫莽冒脫玫陇$脫-z+脫p3脫聝;脫m掳D脫聬玫L脫娄PT脫脹录]脫L7e脫=M驴n脫)Pv脫隆猫脫s聜聡脫聸聬脫S楼聴隆.聵玫帽脿漏脮猫J脌\"梅pKN脝芦猫[聫没pK脠AQF脪,隆聻聜]]茂=Mt聜as脪E}X=}i聳yc卤WnO娄脡k!露盲脝聳脳<eI脫芒\f\"聧眉;庐聫脪A脥莽脴v聽.脠酶脟q脥冒脼脴>陇Dg聮>脢聻路:潞聶聹娄c|盲&yYE茫卤聹#禄聝搂r#<炉.忙庐=MLdw2![K脦聛]煤]脩聥2^录}聳聙掳聼聨聙梅娄$毛陋(0猫W-脝/茫_.篓>U聟&聰脴)聛脦=}9\tP脟陋@K>脥聦毛Z}g聲Vs搂V4聰聺茫漏聣脩禄颅=M芒脜x&uc猫Vk脤_$x么聶矛T聻i聺+脻S卯聡t鹿脛垄聝脿脛FA帽X聭霉脧=}脷脿t梅=}聣脝脡9陇g贸G搂聵O锚芒Px~聽職脿茂陇戮\bWyiL毛聡>t職T陋=}+{=M脛b聠茂5聬帽0:聭脴>聭K茅卯%\v茂氓\f脻5K猫E眉2um梅V碌镁b聬@職聙u镁K5碌茫u{脛]I卢qj卢聭脨帽E=}@u聢脤陋\b茂锚i帽锚Uj驴禄聰>W盲=}脥/97i脿Z聞脹驴贸隆茅聠\f冒陋\n芒脽脙2莽'M茫xD脽聡聡)Q聼氓Gp脻^*s脽脕s脌=M卯V聬\"聼帽陋脩脼矛=聽卯V&聼毛,猫\v貌c{垄\t脌z\"&h\\茅c!脙脕掳脽s卯WWo搂脩梅:I枚聻T@,58-脰脌 聻脗戮;Z:-x 聨i铆\b娄3h ]聤陆7J娄掳麓陋没芒露没7楼脗\"脳脟d陋脜d聴;卢氓脪A聲 [A矛{聢矛脹脫KO聨mQcx聦芒-|z枚%脺n0帽禄a煤I脕,脼N聣b6|g卤w酶e炉-脴@n聶j煤8{1b$麓脟聴K^媒0戮8x脻庐F脤G}锚0Z氓p脕没R=聽z.聧没G么脨(gr庐脕脼d玫eU隆贸1谩眉脮脧聽脹<脠聜莽炉P脵炉s篓gES/脽聤I茅聣[<梅=M戮ty戮=M!脻露聯霉脟l煤^脕聞2a*貌脼脵脺录vq脫O煤}P禄梅聣脡T每搂聺/1脮vn=Ms煤Y\b卯录3聝@wmu卤录R聰铆OczW5铆s$6e脛聟眉f脕脙\"[\b脻脡枚p7脥z庐Zq脻C]赂&\n 鹿\b镁聶卢b路聧聦脥脺酶W聻掳盲镁颅\0聬&H脩)脦禄6谩脫鲁W-5楼_炉聠_垄脹=}職h<禄S聮-F脥%U戮聭K赂聲脠P聲q茫聬\bat4JL聮媒篓聞\\S毛么茂霉S聦脫a%聬聟聫脤|没h么r0 陋贸k聥7S[(t脨7卯|VHc鲁miOh6(脨{锚脩exh矛没K\n脷=}帽=M聯^.\bc!vYH霉录[脪\ty没=}赂每,卤聧djj聹聛f脠F眉_茂脨芦#E8{冒贸}m/垄聮t茂h%媒bm掳eu聼聵\v冒7陋麓聯L霉##潞z芦L/(麓#k忙脠聸~0F没3戮PI芒驴脡V|6脝脤r\"IjI6脹y锚颅聡聜*聳6聸聭\v脮4聨酶聤fBhX聥r茅C茫zj脫貌每脺GC聼聳盲录脠r\0脟掳录&g\b搂酶聼禄'\v聴[禄篓=}聫脩脼麓\\脧媒卤脨L#脷Dl铆聣\b\\E聞聭媒C茫炉芒z陆+脢#鹿[\v鹿脌{!脮聨脥聦\b聤脜脩脧拢赂脕每陆麓L垄枚茅l露脩谩炉!聝S脰\t聜脪~~聵.\n聲聮聬拢U脙8脭每聹聬vhP麓脹>nE<陇聹O聥露戮C脤 K聣7脮R卢陇聡=M脷陇Y|聝聜cIPfig*没(Ca驴聙WC脌2>虏f.聞G茫媒聜j枚(+拢4聵JNL氓 M|/)/每w脟脿j眉j卯l矛虏聰m#聭L?聵脠tK< 煤脕眉L8=聽.K)聥=聽E脣Y脕茅x录脰聟聲颅脹楼脷聳EKp1qJpKr[KpN\"pK聜庐*)露mq卤YI/S聞脴y脮陇芦=聽\t赂霉卢聭\n脧脜脨B茂枚QN職聤C芒氓篓每?么脪?N脧}聹jU脢{锚7媒職禄,脰戮芦赂盲娄S聶芦脮忙路麓x\b忙戮%脙卯陆o-鲁 \t聭帽/矛o戮4+隆虏~脵9拢Yx|脥}j[玫聮2媒]^f聺]H脜i聞聺脷9脷脜芦c聽脳:隆Xk3聲I脩聤\\C帽么I卤聤V\v脭脛脡C聦Y\v\fI#\vm冒卢!戮\tW:酶#m聝陇j*\v聧;媒;茫脌脡rFY$铆\b}聺-枚$6聻S\"脝[卢脜脿h/M鲁{.~玫\\=M)QeY[茅\n谩芦忙!聼!)聥S路a赂z6K忙拢脌漏煤;忙聼@c脻脳\\聜麓帽眉聮脷枚z脛mn脺mx脛mS聯赂炉脌s梅!z脌QT聬卤qG录M,聬聲j茂\f&\t{芦芦芒S#聧聟=聽=}聭聳ddw没x脼聶卯虏聫\"X]2\n聲脧f%聧(聟眉,脥1脌猫么聲脽录\f玫tB聧~S娄聬鲁Aoqj=M陋N卤4+碌\fr脳Qa1聽貌>卯M脙脥虏聯:(v8脧聳卢脜芦/\n赂fQ酶[^\fgpg禄搂楼D6h每:)茅*脺贸)脰8脢搂戮M驴茂潞脳]氓Z4W脽脪}%篓庐]铆hZ卤篓脟n9脺TS@猫眉1聴芒贸路脷脟卯脭}e<l\t\bc脪_\tP脮<拢h!脧脝?%s脳毛脗<脗禄N么鲁脴贸煤垄q2聨镁q<酶Sqy4脹q脙,帽]镁b路h聣颅聻脪掳聻脭脠聮莽陇R垄陆脕聽E毛帽d聰r=M(脛N录\\0聝Ey聙聹聴$m卤S铆P2t~脣3镁a0=聽漏TD梅H LH煤聹卯n卤酶脹(CEV卢陇卯玫w脨毛脨聰陇冒卤脗b炉脫脌F掳聙脢n聮谩脣碌镁[k聻mG1梅眉脣猫n Z聢E脟)n@\\E媒脽没卢?脠n脝聤聴没戮忙c+lG\f脗A脮50~陇篓聶陇聲聲氓漏UGlnKpK霉pKl聬nKpo?{w脛录脜枚脹垄录3梅\b鹿陇梅脥聶氓脿颅毛脫梅}/'脵V镁卯1E忙U聨c潞媒qF聴隆炉@v忙Q拢Z聼05聫脌W8\fu庐聙鲁-贸q$rKP聤陆聸k4Yy$脠聧/鲁聦脥脙赂聣W脢FM聻P/脨铆R聧聳9么脩[脨t眉%聞J0tW聛聙聹帽\"聧!lxt氓Qx卢聣聭脷路S聮毛[脝脼锚脵脺?6u/聸I脢f媒9\"?\nO聧-:聹L|聸聧_霉酶I聛脡F庐路s卯脮.r聼芒茫k陆t煤 聹脷\v聧聤o聳脿-1to庐=聽脤Ow么/掳鲁s聤脮s5录g脡Q脳o卢卢聵聮e脥聲8:脜庐隆聰>楼1h聽Xn聺聺聶脵梅x聯媒y|[5聙卤茅Ox枚聥 碌d3潞没脼茅脻F么驴禄\v98脥戮聵 d煤6>脕掳W陇\b娄s&i$職脥脩忙\nZ氓煤脗Z娄r脟Q篓=}UQ卯潞禄潞?=聽C聸G聡\n脥聝帽$wZ\"脻\tUg芦UJ陋脦 pFhN聵隆聡貌铆每l垄卢贸聭脣聙脛聰聲K}隆脳煤颅\\聰\"碌\t漏脫聞[忙n脟0\f;EG炉录#d路脩没拢脨Z庐陆K茂I庐戮y脜篓脗0没7脪6a脡聥/C脕没:脌*A脡每]脹脨$H(聛隆脨N聶\b氓聫\b茫g({7脙炉毛z禄h虏脩茅mZ脴聥QI聣路麓聜霉w<#氓o聭谩鹿Y聶^脟芒%S聽f(zW漏氓驴谩[每路YP脷)y掳脷戮X脮!脥聥猫脥2脡,5(鹿>;脺'铆A9陆vE脡聠聦脽h隆脪脦陆脿脛脨煤镁c铆#+聜+</[職u聳脮拢}聲5玫xpKpKF聫FpK拢脛脹rmKb媒8脭卯聞kO霉么k潞茫;\\脷貌鲁1k脺)掳EE露庐垄卯3霉脵^脤赂铆每a驴盲篓聫t脝v$脜脷C酶[m8没隆b脝\\聧$脦录,冒聟ir'脦l脕脦f霉脷聙\0聥聜I;脫q$楼8聨<O虏 聦p聠脩_3#录聥隆掳zU猫煤脺Q\f脧7漏y脵j芒录聴聙1卯kpo煤脙1G煤V脼矛鲁录PF|N掳脭煤聝卤麓y脰聦锚鲁卤H聠y聬忙盲K\\=Mx#卢酶@Q卯聰h掳4戮脫Y脌聬\fB脛陇B聮]镁聢赂脫]4c聰聨H路脗d陇聴脥贸娄脻d盲I=聽=Mo脪-^猫卯脫鹿聶X職露}=}脟酶煤陆j聫枚卤p楼[聶hoL(庐霉脺聶rA赂聨S赂'脩@陆帽L脺6脜$[\b脡脹脝脩贸篓X脴B铆梅+Y梅脟脟#_.媒聤\"\\谩脩录S\\\bE脙聳:|聻q^脼霉m*脵\v脷鹿聟铆搂[茫^\tn'!4没聼脛眉;聟P\0驴脗聤>9脫谩煤芒脳炉F录h陆G盲|聯\t茫隆c54脩d脟脥0-lF谩茅脕G脻贸%ZL脭卯聭戮^;y聰nmP{%L驴陇R茅& p聨帽s脧zf眉镁鲁8|&/0d1篓聨铆颅芦玫脥6聲Zx聴1聼茂么]>聝脷脕^脗wt2脷霉>卢篓n帽a'聢Z聶铆+楼脫F虏\f脿=}\v脗煤聛莽脩脌z/\f庐卢)脝聞脷庐莽4o|*(聫I1媒聦聼毛芒D碌聭茫職f脣*麓锚脼v聰驴镁iCw茫煤陋@p?媒聙猫\"锚梅脢么矛锚8聯G/聨茫脢漏$?枚kN炉聸陇@z每脗X矛lG聟脼脗J+\nA?@X}玫虏貌i枚|锚d6忙聤a脨贸d^聝垄聸脡5脤C-篓垄1聞o]禄聞脹c=聽炉脦q聝<脹聴/}陆\0梅gO禄脣q每脳脼>.\0&bQ庐l谩冒脠脴t脢8镁i鹿B職H庐脗-麓\0脰聯6職貌X毛)'茂^-e_聬聮B帽m_Ev搂+聧脻=}D)EF聶:猫搂聝Q&聟锚锚脽CT漏J聼戮聢9脻o9}q,7q脺脹:!LF脟脙脡_}N铆[脣庐L霉i聰+脺脿c搂脛脦\0脠z,_卯N铆c1聵脙1,(聦茂#\f么職:聫聼聝陆m-=}u脻:聴聤聠聼c脗锚L眉漏AN6玫聭掳職聬P聻聛脹聼炉聻P聺/脳聶[戮聴梅脰锚85|铆Vh.聴j煤聨掳職n聶垄聜脌<聶x聰赂颅卯聥+碌聢6U聢N5聛\"uV聹V{脛K聞聴j么T隆a聵貌聳漏脮V9Kp盲pK聤\"矛pKpKp脣脨o脴聯聬DG聦\\么S漏+矛聟聭5e}.脳聢0聼v录陋聥猫帽=}e没9脳聙脩聲R貌陋W驴戮I没;j贸脠忙篓b卤脿脟(sr!聮么篓S\\谩谩庐酶7脹(j谩聛脧眉y~脻赂s茫脹s脤*|忙聸卤=聽庐MR脼d+陆脪|脗聤\t茂9x!8#垄聦Iqg\0聠?;:Y莽垄潞聫每聯4每鲁職>脦脺Z,霉陋?卢脷脥煤陋&聭G%掳>脕Q么UE聴聫3c<脕聨聣铆(\\ca掳)=聽8,脦!聟=聽枚w脕@煤\b脦录 ?\\脠no鹿(x?隆q$:hL茫脧脠(h]貌,_#戮颅潞聮(^脪%Y路 鹿路搂庐D脽U\0锚脩酶聝Z娄贸脗#脢聥F!d6聧聣媒_聛$梅s(脻c+\"霉茂P聺O聢脨戮!N{氓鲁盲拢vq玫搂\f聹脝聰\t碌8聸e聫>脭?\f}S聫gx,陇脌聰=M\b聦$卢,脟0聹z脫M篓聟q\"y脨CM3\fv|眉聸B\bw聠脕脺/隆\nU驴l3鲁V\v茅聞聽l聻Xme/脢0脣茂f\0\t么k禄聤6.锚禄毛聛脷^P脪脜C~c\f脴脤聸M\v:j脙卤Mk聻煤茫脺脳搂脧uk7脪娄$o脟脰掳贸[I禄T脌茂贸媒脰nvb镁脙b氓R脳\"N楼e脺芦垄F貌貌4聬6聤M媒忙,O=聽每H^P芦脌slu聦Y}忙\"猫卢@u,么庐*铆II聴脹P聡1S茂+庐n煤=M卯/r(脽莽L锚聻戮n^'聸聽聰脽c#么聡xa\f脦聞 脩聬忙聭R(:s\0Z,D脠貌聮F媒?脭%6锚聝脽 聡L鹿A聧\n镁聦聮G脕\n脰茫t脫脌\0盲2'聜\\煤聞W赂聡眉y脰>猫E盲每聛芦 脫脨y贸聜BG聬聢脹.2谩贸N茂芦隆帽露眉X,脽聙茫 霉Zf24脗|b%Pn猫煤t脼脟D聧=M>\f每I)1脥脳脟X脽脻脰聫茫脭n脰?聛脗'2k脦\b?=M\f!,聟職娄聡L脹%聧陇聥+Y$脙w搂\0录陋聰垄聛\0脡<脤K聙媒聥掳pKnm聯;>pK0霉聥?o没每录\nC麓rz脭F炉B铆(Z媒K玫.聻=聽h煤(7in\"OVA=M铆么禄+\v酶r莽玫赂7脧聭鲁么聶XO|脳脽o脗V<R5莽\b莽脥娄P脺-路T贸铆I\n65聛脟脷}p)潞)脌聸聼聽.:E:媒eF@ e鹿貌J垄f贸煤掳thr聥聭聥茂掳6脩9脹j::K聞xY脧T卯p聙聛\n鲁l脢脺@脽o聸脧gGD谩每脪芦脙R脛脛)C0脙脦\t脙&炉路脣脼h#聜,脳脿gUI禄镁J\t矛脧p聬*)鲁t驴潞聞聰y忙:Yh脡聟KH聮聧<96q谩脰(聞n=}d聵職脠s聬聝颅赂p盲猫u脴毛M聠脟脴么Sy脵脜陇#w聬C禄聟.6~聭c8卤脫脝K-,脫By脰聬?聤戮q莽聸d$4b\n毛bxcl卢聡=聽脽脿聨枚聙陋聭\b{每贸M\v虏卢脙y\vK聟聴2虏聭?聦聝贸I$脭铆\n%,聡赂mHxQ{麓脢q\b聶|聤+<NU脦鲁.贸dx煤芒q梅v煤贸L聠炉,脨(Lisvhdt|聰脧A聠聙盲聨b0脛聧c0D=MpJL帽O聧T脭聬.,3vS聢锚\0聠vHo聧hW茫3煤禄聹聨\"VID脩贸矛脌Uy@路o7)vj5聴J忙貌&N?掳脹聮j聵.戮脪脝=}>卢谩芒聫玫d1S铆聟6麓P垄脮聠+]聬楼茫隆脰Ws6聟聞脟卤H脺脮\nP炉脙聯茅\\潞录芒=}脙i脳z脴}}}7\b鲁O卤eZ脤聵谩庐酶K聴酶a脭媒聴聫霉聼煤\b脡\\铆uo'&媒每颅脌8聠U媒脕s\"XD戮xf煤T潞)聞茂脰Sh炉脗炉KM碌玫锚聴聞脵WPj\v脻脨每$聽,卤聟l聽脺隆聫v聶潞卢1聙聞楼芒脤卤脠\v\\聢f鲁M煤zN卢茅^掳茫a聹\"脛S#聤脴.脭_\t聴u脝脥楼芒?脰聧聤脨聺矛贸職X聬茂聺盲梅聭O脜A>拢\\聺脜聬脻漏\"聮D陆O搂\"潞0酶eT脥芦茂脙=}~卢$聬盲w露盲UcA脵聶\"谩A脢聻聹(v3*矛>聧聮脥陋篓卢:6W戮虏T:x聛聻}聝.猫B庐=MG脩篓脼k卯聟%垄潞n聺聛0)貌脦M盲Nm赂卢L篓聡楼聨脢陇k陋聨](脛脮|!聴脩~毛脫\b聼F谩J聺庐猫脜T8聺聨Z%贸芦x脳氓聻聸4戮V露(莽脕贸莽o脭:脜驴X聮o脟帽鲁帽#脙職z陆\0驴N職\t聡驴楼\v?聴\"r脌忙卤莽mJ*-聣Q搂dI?氓搂么職lJ锚聟R猫r煤氓E(v脮C隆 k^EH忙麓脗脟漏垄搂枚媒脗7\f聺x搂娄:聽脷聭s露梅,鹿梅聯锚娄冒4聧聣贸脵_\f娄o聰J聰芦聠聯麓路R聫脗gKl路.脣茅N脰9:.路*.霉g脕8\b煤ib茅脹\tO聴脩?]B6'隆驴~l;聼'聯忙茫篓聮=聽^脷庐>r驴潞锚Z莽眉帽脳脙脙ZI录97聼^脟I貌聢>4镁鲁垄矛^:\n聦G镁聙O脕G ]鹿卯L隆_脥)茫脴h媒n聢漏每芒盲禄聥脣&没脺潞e聬聽):麓脿G媒脟M颅脼猫脹氓5冒颅脙垄6n聙脻脴聼5w聙I聨&陇脼盲Q}v貌陇lu脹*聬貌]3篓n录脦e*&\v聣聠<脮脺拢p%脴/陋聜聜脭34卤脴h脺&v\b炉氓梅脽^虏脹脡Kq脣j:聽Fo\t?贸聥颅=}fc脼X}k聜Vy6脢%!g聫fw聜R镁=聽H鲁茅fD掳卯n>氓眉路R.s谩貌聯V路聢聯Ez聽T脝2聜4-聢6脤a聥聟\b{J聙露@卯0脢毛帽煤脩9&脪脢脥=聽冒聙m聠X\\铆{聳毛BK 脗每ma聼脟kG谩zz聛聭/職As=M芦脨霉脟@d戮眉/庐卯A盲茅卤脠\t隆霉2炉脙谩x<潞h脨\0aKa氓酶;C铆}脭y卯\vw录v!\t脴=Me聢聟鹿\tBeS'氓L\\矛脻鲁脫茅铆nJfk媒P\"聜~g脨脢;茫\n6\f0聙Q?聤:潞R7:聳鲁脠:聺:脗莽毛脗,Ig聝脿脫rS脿b聯_q脷聯聙C禄top1HLz脼篓qN聦A楼脴路聦p0=聽2聦矛聠鲁猫聨OnQz路s\fx聼3路T3赂没脌T\f媒脤盲聰\\脰聛\tt0]Nff\b聭vH禄S锚聯脧\f鲁,卢.脫{脗80FZ脨脽聙聽4p聤聹么聮;\"t!':2脩鲁#氓W麓驴=}聞么 路陆A陇聭聸聤\\z@聵F<聺C.隆\\e聙每]_kY職虏卤么AW枚=}么!Z聮b氓脨j聴么脹vMt铆聶聞炉=d{\v脌=M脥p路炉X=Mm枚聥卢聹聶拢脹f脥矛脩聟脺脹录\\x脛-L脭毛\"聽YvV]聰漏聢脢枚铆驴 U脢=聽陆鹿Q z铆m.[赂聤茅聴kM录v脽脴脟脫聺>媒s&聜?篓5麓,5脪.氓聰1r卤職y梅\f枚鲁莽|y脴帽卯脤@聽F\t娄霉篓 F脕6聶LA脽枚C茅\n聤煤颅鹿脌\\搂X聼聣媒?脮潞T@Yu聣驴E\\锚E\b&枚聧芦庐脙聮)V0铆猫脙wm娄脌D 聭陆w脻P聰楼镁脼H脻\0毛\t脼脺鹿=聽脼脟脩茅脷\tQ'!{矛e脤聙O锚猫脽*ed聠脷\t聳>=}{忙=聽V聫酶&脼聽;:(聨v漏聼脩3脻猫芦\\&$冒脡脦t聻录芦脳[篓聵陆B陇Z脕聢5脿庐脙脡脰b聯聛篓]茫b霉\"6忙\0a镁聫鲁赂聫E茫,=}氓G谩忙聭Z聳iXL脤:2聛脽庐r漏^ct聛聠B毛kg聫/麓E\\DE庐聻眉-d8a陆媒录聢么T\n贸.dG贸芒梅矛炉脠铆W没v脤3r脣1J聶\f枚聻镁矛脽N锚茫P0脜脿B聜L'%o鹿6:C聥茅7)炉R貌脛脪'yp锚=M=}b\\Q娄聧芦h脜C|(d聬每芒x脠陋卢聢脝矛l聢p*聧}聝录聨e聢脩G聯脧T聭聨脝聦聬聡#l么聧V卢1)贸.搂\t脡P酶聝脫脻f掳/v铆茂篓聵贸~Vx脝脳茂碌b铆谩\vK脹|煤#脝#=}脌\b脷j每盲谩卯~聽聤脮i陇脷wF聺帽氓 脷帽脩*录v贸脹驴)\\茫聫聜谩聛聣aV聧陋脻=}戮脮xV路隆)*u<茂庐脡,)赂聧職Wp驴f聥S聼脪聦=聽氓}路7l脰娄矛脫 聧\\聰脰聝脜聭陇聵聯Z聼N每聻X聻隆#P芦脠d玫i脽锚v搂碌聭UUZ陆b=}拢,脰锚忙垄)聰聲毛XZ媒]媒\\}V颅U聺*脰=}脳脴脹楼I聵W[=M[脡[卤脹-隆脳職聶枚脩楼芦脝毛脜k脝脣脙冒卯W]R脷2脻5V脛脙赂D97;C>:B8@<D媒霉梅每没镁煤酶\0眉聞}y聛w{聝C露7=}镁玫每镁聙uy聝~聜x卢楼漏炉鲁庐虏篓,%)/3.2(矛氓茅茂贸卯貌猫l5露Cx聛~麓卤鲁虏,-'+.2么帽毛卯猫lmqsr脤_I.H|脛贸KbO\"0*煤隆虏聮路(H 驴茂脧录茫2脦~垄冒\v聝脪聭聛z掳\f鲁脫聠聯聙忙脷脌聰Yoc戮\b,BpK聦聟^聢脤麓T聯聭冒氓n脫脕@O[g\"P$3P\v聞np么'聡{sf.:垄貌(没脗帽F=聽c录脙帽T聦聣聤D聰職茅卤赂聢炉禄a么P聢]聨0$贸聫ZB~*s脜b聯 陇脭聯|i聥d聙茂Q聙聭x脩聝^j篓+脨\v聜^\\T1脧脌拢帽聮4r脜?V聯脨tn!xp毛2ZC麓贸脪\\*L禄2聙脙玫Ja/u脦@\n聯Q猫4卯bh录聞U每猫M聟q陇芦\\?聤陇铆1聙LR潞9聹氓E聲聺\v聝qN镁h脣冒锚-u聹碌脥聯聭F酶p录脥镁茅脮锚聜脩=M聟u聥聜\0O卤i脮驴5?c4脦\b{uV脗聮茫炉碌陋氓锚聹6驴虏j脰驴5?c1脩d3垄聲禄聜脰脰聺職聲uKp\vr煤pKpKp脫脌pdKc\fawU聴l聰录陆陆}qNX聽聵聡\\聭脗聡\f枚枚枚卢脛鲁貌漏铆虏聬芒S玫脤C&X镁{玫炉D忙Xk玫掳mb\0禄5麓娄漏3職-\\i\b4聤m脺聴聬庐枚聼0搂脙H聶=聽聧!没鲁H庐\\脻v脜0脩;聙AU脧S82|\\脦脟脥c\\[6卢露y+-Z冒i,Jm脷卤庐梅搂聸娄脴娄卢卯脷脵赂陇n脴鹿%脝;枚漏聦戮x驴=聽ED媒z戮冒脡#聡S卯-Y\b?M^驴w录脧^茫帽路 (C\t|脧脦2茫;聢脧聳脤聜媒\fD0%聯脵莽e聨芦霉脫聞猫t聮k眉脭聻聜9戮庐c虏脽Oq'脕|\b/q{卤录:XR酶脹[聢CL路聙聨3聥3L脪|^}=M4颅,s'ln{煤脣猫prk没脤聜=}脼庐a垄Om7脕{酶炉m[卤禄>R枚茂脹聢GCK脕@聨/k3K脢<脼聙媒麓-*^Q5?0B_没;H,聜a煤G脧n卢[7聹脰yN-V掳聶OX脮\v楼=聽鲁聸.聳脵忙]職芦梅聳麓eU聵脣u聲卤玫)>颅V貌脽NW莽Au聽茂=MW芦1碌*赂Q\0禄禄聟)脽E搂掳聧拢贸E聵卢]y聶4炉$脫&d脦{酶拢聞氓\\脪k枚陇聠聛酶-^颅W芒NY梅脕v篓/=MY禄卤露.脴Q镁脧[聟%CF卤\0聧脣3F垄眉脻|颅麓/\"戮Q9/冒A[芦6 矛聛W陋G脦Z,[;录Vy\v;N.^0i\t<脢n脼炉梅聸搂芒枚卢茂-脻脴陇o%鹿\v5f;没鹿聦陆聜脽脿H'脛镁~脼冒'i#聣3..]脠驴Pf_y脺脧f#帽鹿H篓没聫搂茫|/4NQ脿貌聦茂,RYLDv禄眉陆L陆聝莽 H)盲镁忙0)y拢聤+~庐=聽赂_Pk聡Az冒okK1潞R酶霉\v;聡J脧冒聨*C贸J脌矛^聝茅么聨l脴酶茂dt0=聽漏e脴5帽忙楼職Um^Lp-脦Fp鲁聙露Kp聥聜#pK聜B芒芒聦!;7)聝聡鲁p戮陋盲茫聹 9煤驴p脣陋聙垄驴qs陇陋t脟茅YC么碌帽么戮脻聙G冒聭/65p煤F录脺枚聬冒fy!!陋脌g芦脟\vT:\0搂茂录聹猫L脧搂脫聤脻5庐p卤聧脜脨,]r聮?f聮\v1q-脽E枚e聞拢)聰_脧煤聫f%碌脌{脥脼聣Q?職D聹陇露脿录脠It脺忙;^聶猫d)脕庐忙聬w\tg卯垄E眉b8W脪聤m脫聻ADX3<@=}贸脳茅]q脻露聫75I2a聬玫=聽茫脰聹聦\\0聵聣鹿8卢聬虏<Up脪隆眉^锚#脼脗脛h脷<聧e聙禄庐眉\vV驴X驴}h庐脧r猫炉脨C赂\f芒ftp赂?聝脺q?虏禄Y<脌0p聭聰酶<脳Bv聦E楼脛=}o搂+聮脷sU{聧脩@聶聹聼脿4g18脝C|)x脤t炉聯聢脙qp>聳#H掳聽T聟K聡lU脧脥陋|X~脫J聭麓$陆锚聵聞9脮脙聤6驴W聮脳聧q聨_=}O戮!TAAq&脩n茂鲁陇#脺He每娄忙脨#\\聰aX脴聻卤O戮聹職H(脳P脕\t卯)_麓霉聭煤脫聺聲聸梅颅聸脟 6 茂CP脭脩脡\fS眉脕\bH禄\0眉盲聥#脹I脹脠ox娄D聠!聦霉脻+^)(脝卯录\bG盲\t.茫~脣虏h\n脧<聬脜聺 枚搂脣X陆A卯m垄XE脩谩X聥脜拢聙X脩聛4枚脧碌聲聲聶楼毛aT茅\b庐颅h碌脗;脼o谩8I/没镁脤垄h/;聜脡茫聙镁3聥酶碌芦[脵!&铆庐脠F脠梅镁谩Zk颅 J脝卢酶脜芦\\霉#f铆虏HF脨酶谩\\聥颅$聤脝麓聬聢脮贸-录聡[脩'矛c脠|脩),c猫聙脩+lc\b聞脩-卢d(聢脡D脫d聥戮;陇W聼5楼聸脰聲脹f脢r聮x垄'@n拢t酶l聰聛3貌D眉l聬nJ鲁Pk眉l聛o4貌|枚l聨m\n贸\v24貌聦枚l聮m\n么\vr4貌聢玫lm脢脛\vb$貌聢霉ln脢\vb4貌E脌麓\vzZC聭m*录P聡煤矛s聛_4貌玫矛脭mj卢\v聤貌梅矛Tmj脤\v聤$貌霉矛脭nj矛\v聤,貌没矛Tnj\f\v聤4貌鲁mz貌贸mz貌3mz 貌smz$貌鲁nz(貌贸n聤聜$c\0QkQl炉kG;J聜枚脛op庐1Z.1b庐2j.2r虏qZ2qb虏rj2rr隆aW谩a[!a_aac隆bg谩bk!boab贸聸G%霉鹿脌.^茫G)>煤脕\0.=聽贸聹\t脰录\t脴脺\t脷眉\t脺\t脼<\t脿\\\t芒|\t盲聹\n忙录\n猫脺\n锚眉\n矛\n卯<\n冒\\\n貌|\n4聳芦-玫娄毛-枚露+-梅 脝k-酶$脰芦.霉(忙毛.煤聦卯M酶脌聲枚颅聸7隆没r聯酶&w,脩碌K\t矛|卢贸脫聞d聦聢聰1脤|dQ.脭聬an脤聬录盲聡潞聡<$聣(Sg么聫谩T~脨聮脺聧矛聧眉聧\f聧\\聧娄么w盲么聠脗聯聮脕k聳垄聲碌隆Y脮1锚聶炉聠A煤^m么,a{贸\bTN|q\f聝脪聦4脪霉麓n脿聥(脪煤么n冒聥,脪没4n\0聥0脪眉tn聥麓陇w脴Q麓聠鹿SY0聧篓$w猫Q么聠脕SZP聧卢陇x酶Q!4聠脡S[p聧掳$x\bQ#t聠脩S\\聬聧4鲁9陇~脷聫&39脛~芒聫(鲁:盲~锚聫*3:~貌聫,鲁;$~煤聫.3;D~|tL脭I鲁<d~\n聫23<聞~聫脭脕l脰聳聲碌楼聶6梅s茫聰毛媒聳聠脮楼脛Y陇聠脵娄Y麓聠脻搂DY脛聠谩篓聞Y脭聠氓漏脛Z盲聠茅陋Z么聠铆芦DZ聠帽卢聞Z聠玫颅脛[$聠霉庐[4聠媒炉D[D聠掳聞[T聠卤脛\\d聠\t虏\\t聠=M鲁D\\聞聠麓聞\\聰聨脮%脛y陇聨脵&y麓聨]聭霉S脟.da{脨聢4聨e聭媒S脡/盲bD{冒聢D聨m聭S脣0db聞{聢T聨u聭S脥1盲c脛|0|4|8|<|@|D|H|Ld\ft眉o3聳Y脜聲陆隆眉赂眉pK酶pK+F(o芒L>脠A\f么每\"/a#<Y聙煤*@R潞d陆冒q聜篓V/a\b|鹿~眉2聙虏矛霉1虏聝聢芦NY脿g隆G^bs忙没'脪鲁聡\"媒貌+脦y脢卯脦r聜脫氓煤/聵鲁聢聲聤没脨lhO~J\0卤&IB聝聠>楼b{Pe聢'聤Ls垄茫陆脣s茫聦聬莽\v 貌煤~聸脨Z脗s锚GR鲁聥B颅r脗\fl煤掳聝隆\f聧氓J~拢q$聴脢-x脩d脻e\\炉l脧?U颅p卤聥.氓脗芦M]聽莽隆EV\"茫驴脝V脙陇聧脽9拢脿帽{陋庐脥jBs猫枚鲁聠2铆脪A:脤y颅v谩\f聫脻\"庐c聡4聶镁脡l聨3*=}DJC\b谩6FKPl|WI茂}梅脛脽脢e脹脤冒>\vel7\t茂D_脡i镁聢S脽猫聜聦=}聞Z~镁:@Q戮l脻0rz酶J没脧p(聥聽聥聝nh庐楼\nY聽聯聹聰聨v媒脮茅}Av脭p#職脵聜垄谩猫眉%卯Wz镁脠_路聠_聣脟^驴VG脡庐没3媒脷O!H谩'驴聮谩H茫\t聤聸0脗脳S\v8脗k芒Ns禄冒脗脵K没Xb卢8铆\fx脗,A茂hB卢陆脴露{茅5X颅脿鹿=}e\\漏\0_f梅職梅*}枚陋莽i颅玫垄霉每脡i帽忙聼\n炉\0>脵*聫/每B脜N茂\"I氓1莽脪芒I莽?茂聵bIf禄聛n篓s陋楼镁聯陇脺虏脧聠聬脧冒芦聰JcvtZV媒镁i聻芦脛脿.禄v'y>g禄脮!\tZ}禄冒N没娄'z@k脙氓A隆潞炉脽%8脳 脻戮聼i}楼鹿茫;莽\"W鹿_锚>锚)茅每\n聫聙XC碌芦聣盲Wx录脌x鲁玫y聼W聲聲dnKp聢芦聤聝nK掳PJp脹氓p毛铆P\"?聨么r茫聡潞T聸F脺茫8\0職聮W麓聙脩聵6(Y贸梅脪F1-盲谩潞霉Y脳梅脣脝2-聭赂4脼谩聭脝聵聨q麓聮O聰脝脛s%h=M脌d~煤聥H聫-!脫谩脜聫G脵卯w脕忙M^BfJV\n]]/s脟bBp脡谩\f聧茫聶$聸陇職\"拢隆隆脷脢Y{聠g聧镁>Q\t毛禄P陆7_TbJX戮t脴y4陆脽盲x<聟莽x脟MnQ贸J\0酶HH聮漏R镁聫h垄+\0C莽tC脻聨E脣脢(聜V\"茅聻@碌;%,鲁,^b漏:<脻G铆n!'g]G]{U茫d聻枚0眉6矛茅脹\v霉N:冒\"矛(\bR\b2\b,聨%Z-a聥搂rZ聫聙JK>麓氓脪?Q脷Of聥/M漏莽梅禄脌\"0_^w卢_X脌掳聵掳脳脳聬聵帽眉p^A聼卤聝聝聜A驴$茂l没d茫p脣\\毛P贸P娄>f隆(N b{0D脣o9P矛\0D聫脗>#聠\v?,%)-*氓聢脥聛梅潞<脫9潞E脨E潞E脦霉iq煤&聜脡@脨6脌脳潞漏脳聴W.脮漏炉>9%6脤拢枚\t忙vM脿Lz脡锚J\t垄!谩谩b脗脕BA聜聛聜虏卤虏21\tHk\f脺茫X聣聢脺赂脥聹戮聙么Z聲梅O[脩脽oK驴N脤~搂脕脠拢玫q3脹聢猫r^戮\fz脡帽么D;盲F庐聳Y氓脠v}莽矛|D[Y驴庐聦*毛>ex每篓脺脜颅每聢3梅镁j陆垄w麓Mz31脹41&j篓k|s脽隆碌oK脺<ED脦垄w录h聯1脢聢x脧3R貌Vdo聤)\"=M{\\铆聲聠聨D没t脦垄職脼y掳"])))}});var c,u,d,l,h,p={a:{b:function(e){return Math.cos(e)},a:function(e){return Math.exp(e)},d:function(e,n,i){t.copyWithin(e,n,n+i)},c:function(e){t.length,function(e){throw"OOM"}()}}};this.setModule=function(t){e.setModule(UJ,t)},this.getModule=function(){return e.getModule(UJ)},this.instantiate=function(){return r.getModule().then((function(e){return WebAssembly.instantiate(e,p)})).then((function(e){var r,o=e.exports;c=o.g,u=o.h,d=o.i,l=o.j,h=o.k,o.l,n=o.e,r=n.buffer,i=r,t=new Uint8Array(r),function(e){e.f()}(o),a()})),r.ready=new Promise((function(e){a=e})).then((function(){r.HEAP=i,r._malloc=u,r._free=h,r._opus_frame_decoder_create=c,r._opus_frame_decode_float_deinterleaved=d,r._opus_frame_decoder_destroy=l})),r}}function VJ(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};VJ.errors||Object.defineProperties(VJ,{errors:{value:new Map([[-1,"OPUS_BAD_ARG: One or more invalid/out of range arguments"],[-2,"OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer"],[-3,"OPUS_INTERNAL_ERROR: An internal error was detected"],[-4,"OPUS_INVALID_PACKET: The compressed data passed is corrupted"],[-5,"OPUS_UNIMPLEMENTED: Invalid/unsupported request number"],[-6,"OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed"],[-7,"OPUS_ALLOC_FAIL: Memory allocation has failed"]])}}),this._init=function(){return new e._WASMAudioDecoderCommon(e).instantiate().then((function(t){e._common=t;var n=e._common.allocateTypedArray(e._channels,Uint8Array);n.buf.set(e._channelMappingTable),e._decoder=e._common.wasm._opus_frame_decoder_create(e._channels,e._streamCount,e._coupledStreamCount,n.ptr,e._preSkip,e._forceStereo)}))},Object.defineProperty(this,"ready",{enumerable:!0,get:function(){return e._ready}}),this.reset=function(){return e.free(),e._init()},this.free=function(){e._common.wasm._opus_frame_decoder_destroy(e._decoder),e._common.free()},this._decode=function(t){if(!(t instanceof Uint8Array))throw Error("Data to decode must be Uint8Array. Instead got "+i(t));e._input.buf.set(t);var n=e._common.wasm._opus_frame_decode_float_deinterleaved(e._decoder,e._input.ptr,t.length,e._output.ptr);return n<0?(console.error("libopus "+n+" "+(VJ.errors.get(n)||"Unknown Error")),0):{outputBuffer:e._common.getOutputChannels(e._output.buf,e._outputChannels,n),samplesDecoded:n}},this.decodeFrame=function(t){var n=e._decode(t);return e._WASMAudioDecoderCommon.getDecodedAudioMultiChannel([n.outputBuffer],e._outputChannels,n.samplesDecoded,48e3)},this.decodeFrames=function(t){for(var n=[],i=0,r=0;r<t.length;){var a=e._decode(t[r++]);n.push(a.outputBuffer),i+=a.samplesDecoded}return e._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(n,e._outputChannels,i,48e3)},this._isWebWorker=VJ.isWebWorker,this._WASMAudioDecoderCommon=VJ.WASMAudioDecoderCommon||DJ,this._EmscriptenWASM=VJ.EmscriptenWASM||UJ,this._module=VJ.module;var n=8,r=function(e){return"number"==typeof e},a=t.channels,o=t.streamCount,s=t.coupledStreamCount,c=t.channelMappingTable,u=t.preSkip,d=t.forceStereo?1:0;if(a>2&&(!r(o)||!r(s)||!Array.isArray(c)))throw new Error("Invalid Opus Decoder Options for multichannel decoding.");return this._channels=r(a)?a:2,this._streamCount=r(o)?o:1,this._coupledStreamCount=r(s)?s:this._channels-1,this._channelMappingTable=c||(2===this._channels?[0,1]:[0]),this._preSkip=u||0,this._forceStereo=a<=n&&2!=a?d:0,this._inputSize=3840*this._channels,this._outputChannelSize=5760,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}Rr({target:"Array",proto:!0},{copyWithin:iH}),LJ("copyWithin");var FJ=function(e){d(s,e);var t,i,r=g(s);function s(e){return o(this,s),r.call(this,e,"decoder",VJ,UJ)}return c(s,[{key:"decodeFrame",value:(i=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._postToDecoder("decodeFrame",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"decodeFrames",value:(t=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._postToDecoder("decodeFrames",t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),s}(OJ),jJ=function(){function e(t){o(this,e),this.userId_=t.userId,this.tinyId_=t.tinyId,this.client_=t.client,this.sdpSemantics_=t.client.getSdpSemantics(),this.isUplink_=t.isUplink,this.log_=Vx.createLogger({id:"n|"+this.userId_,userId:this.client_.getUserId(),sdkAppId:this.client_.getSDKAppId(),isLocal:this.isUplink_}),this.signalChannel_=t.signalChannel,this.peerConnection_=null,this.isErrorObserved_=!1,this.emitter_=new FA,this.currentState_=zT,this.waitForPeerConnectionConnectedPromise_=null,this.isReconnecting_=!1,this.reconnectionCount_=0,this.reconnectionTimer_=-1,this.isFirstConnection_=!0,this.delay_={audioDelay:0,videoDelay:0},this.enableSEI_=t.enableSEI,this.enableSpatial_=t.enableSpatial,this.canOpenEncodedStream()&&this.initEncodeStream()}var t;return c(e,[{key:"initialize",value:function(){var e={encodedInsertableStreams:this.canOpenEncodedStream(),iceServers:this.client_.getIceServers(),iceTransportPolicy:this.client_.getIceTransportPolicy(),sdpSemantics:this.sdpSemantics_,bundlePolicy:"max-bundle",rtcpMuxPolicy:"require",tcpCandidatePolicy:"disable",IceTransportsType:"nohost"};this.peerConnection_=new RTCPeerConnection(e),this.peerConnection_.onconnectionstatechange=this.onConnectionStateChange.bind(this)}},{key:"close",value:function(){this.log_.info("closing connection"),this.closePeerConnection(),this.frameCodec_&&(this.frameCodec_.destroy(),this.frameCodec_=null)}},{key:"closePeerConnection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.peerConnection_&&(this.peerConnection_.onconnectionstatechange=function(){},this.peerConnection_.close(),this.peerConnection_=null,e&&this.emitConnectionStateChangedEvent(zT))}},{key:"getDTLSTransportState",value:function(){if(!this.peerConnection_)return GT;var e=null;if(this.isUplink_){if(!bO()||0===this.peerConnection_.getSenders().length)return GT;e=this.peerConnection_.getSenders()[0].transport}else{if(!SO()||0===this.peerConnection_.getReceivers().length)return GT;e=this.peerConnection_.getReceivers()[0].transport}return e?e.state:GT}},{key:"onConnectionStateChange",value:function(e){var t=this.peerConnection_.iceConnectionState,n=this.getDTLSTransportState();if(this.log_.info("onConnectionStateChange() connectionState: "+e.target.connectionState),this.log_.info("ICE Transport state: ".concat(t,", DTLS Transport state: ").concat(n)),e.target.connectionState===QT&&this.emitConnectionStateChangedEvent(WT),e.target.connectionState===XT||e.target.connectionState===$T){var i="".concat(this.isUplink_?"uplink":"downlink"," ICE/DTLS Transport connection ").concat(e.target.connectionState,". ICE Transport state: ").concat(t,", DTLS Transport state: ").concat(n),r=new kD({message:i,code:bD.ICE_TRANSPORT_ERROR});lM.logFailedEvent({userId:this.client_.getUserId(),eventType:gI,error:r}),this.emitConnectionStateChangedEvent(zT),this.isErrorObserved_||this.emitter_.emit(jO.ERROR,r)}e.target.connectionState!==ZT&&e.target.connectionState!==eI||(this.logSelectedCandidate(),lM.logSuccessEvent({userId:this.client_.getUserId(),eventType:gI}),this.emitConnectionStateChangedEvent(qT))}},{key:"emitConnectionStateChangedEvent",value:function(e){e!==this.currentState_&&(this.currentState_===JT&&e===WT||(jA.emit(Rx,{client:this.client_,connection:this,prevState:this.currentState_,state:e}),this.emitter_.emit(jO.CONNECTION_STATE_CHANGED,{prevState:this.currentState_,state:e}),this.currentState_=e))}},{key:"hitTest",value:function(e){return(0===e||"0"===e)&&this.isUplink_||e===this.tinyId_}},{key:"addEventInternal",value:function(e,t){var n=this.client_.getUserId(),i={eventId:e,eventDesc:t,timestamp:i_(),userId:n,tinyId:this.client_.getTinyId()};this.isUplink_||(i.remoteUserId=this.userId_,i.remoteTinyId=this.tinyId_),oM(n,i)}},{key:"getPeerConnection",value:function(){return this.peerConnection_}},{key:"getClient",value:function(){return this.client_}},{key:"getUserId",value:function(){return this.userId_}},{key:"getTinyId",value:function(){return this.tinyId_}},{key:"logSelectedCandidate",value:(t=a(n().mark((function e(){var t,i,r,a,o,s,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.peerConnection_){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.peerConnection_.getStats();case 4:t=e.sent,i=w(t),e.prev=6,i.s();case 8:if((r=i.n()).done){e.next=18;break}if((a=k(r.value,2))[0],!xO(o=a[1])){e.next=16;break}return s=t.get(o.localCandidateId),c=t.get(o.remoteCandidateId),s&&this.log_.info("local candidate: ".concat(s.candidateType," ").concat(s.protocol,":").concat(s.ip||s.address,":").concat(s.port," ").concat(s.networkType||""," ").concat("relay"===s.candidateType?"relayProtocol:"+s.relayProtocol:"")),c&&this.log_.info("remote candidate: ".concat(c.candidateType," ").concat(c.protocol,":").concat(c.ip||c.address,":").concat(c.port)),e.abrupt("break",18);case 16:e.next=8;break;case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(6),i.e(e.t0);case 23:return e.prev=23,i.f(),e.finish(23);case 26:case"end":return e.stop()}}),e,this,[[6,20,23,26]])}))),function(){return t.apply(this,arguments)})},{key:"getCurrentState",value:function(){return this.currentState_}},{key:"waitForPeerConnectionConnected",value:function(){var e=this;return this.waitForPeerConnectionConnectedPromise_||(this.waitForPeerConnectionConnectedPromise_=new Promise((function(t,n){if(e.currentState_===qT)return t();var i=-1,r=function(e){e.state===qT&&(clearTimeout(i),o(),t())},a=function(t){t.client===e.client_&&(clearTimeout(i),o(),n(new kD({code:bD.API_CALL_ABORTED,message:sA({key:MR,data:"leave room"})})))},o=function(){jA.off(KA,a,e),e.emitter_.off(jO.CONNECTION_STATE_CHANGED,r,e)};i=setTimeout((function(){o();var e=new kD({code:bD.API_CALL_TIMEOUT,message:"connection timeout"});n(e)}),1e4),jA.on(KA,a,e),e.emitter_.on(jO.CONNECTION_STATE_CHANGED,r,e)})),this.waitForPeerConnectionConnectedPromise_=this.waitForPeerConnectionConnectedPromise_.then((function(t){return e.waitForPeerConnectionConnectedPromise_=null,t})).catch((function(t){throw e.waitForPeerConnectionConnectedPromise_=null,t}))),this.waitForPeerConnectionConnectedPromise_}},{key:"getReconnectionCount",value:function(){return this.reconnectionCount_}},{key:"startReconnection",value:function(){this.isReconnecting_=!0,this.emitConnectionStateChangedEvent(JT),this.reconnect(),this.addEventInternal(this.isUplink_?$D:eM,"".concat(this.isUplink_?"uplink":"downlink","-connection is reconnecting"))}},{key:"stopReconnection",value:function(){this.log_.info("stop reconnection"),this.isReconnecting_=!1,this.reconnectionCount_=0,this.clearReconnectionTimer(),this.signalChannel_.off(JP,this.reconnect,this)}},{key:"on",value:function(e,t,n){this.emitter_.on(e,t,n)}},{key:"off",value:function(e,t,n){this.emitter_.off(e,t,n)}},{key:"setDelay",value:function(e){var t=e.audioDelay,n=e.videoDelay;this.delay_={audioDelay:t,videoDelay:n}}},{key:"getDelay",value:function(){return this.delay_}},{key:"isH264",get:function(){var e,t;return!(null===(e=this.peerConnection_)||void 0===e||null===(t=e.remoteDescription)||void 0===t||!t.sdp.includes("H264"))}},{key:"initEncodeStream",value:function(){this.enableSpatial_&&!this.isUplink_&&(this.audioDecoder_=new FJ({forceStereo:!1,preSkip:0,channels:2,streamCount:1,coupledStreamCount:1,channelMappingTable:[0,1]}),this.audioDecoder_.ready),KC||(this.frameCodec_=new bW({connection:this,log:this.log_,isUplink:this.isUplink_,audioDecoder:this.audioDecoder_||null}))}},{key:"isSpatialEnabled",value:function(){return this.enableSpatial_}},{key:"getSpatialManager",value:function(){return this.client_.getSpatialManager()}},{key:"canOpenEncodedStream",value:function(){return this.enableSEI_&&CO||this.enableSpatial_&&AO()}}]),e}(),BJ=function(){function ClientManager(){o(this,ClientManager),this.set_=new Set,jA.on(BA,this.add,this),jA.on(zA,this.add,this),jA.on(WA,this.delete,this),jA.on(KA,this.delete,this)}return c(ClientManager,[{key:"add",value:function(e){var t=e.client,n=e.roomId;if("rtc"!==t.getMode()){var i=this.getKey(t.getUserId(),n||t.getRoomId(),t.getSDKAppId(),t.getUseStringRoomId());this.set_.add(i)}}},{key:"delete",value:function(e){var t=e.client;if("rtc"!==t.getMode()){var n=this.getKey(t.getUserId(),t.getRoomId(),t.getSDKAppId(),t.getUseStringRoomId());this.set_.delete(n)}}},{key:"getKey",value:function(e,t,n,i){return"".concat(n,"_").concat(t,"_").concat(e,"_").concat(i)}},{key:"isJoined",value:function(e){var t=e.userId,n=e.roomId,i=e.sdkAppId,r=e.client;return"rtc"!==r.getMode()&&this.set_.has(this.getKey(t,n,i,r.getUseStringRoomId()))}}]),ClientManager}(),HJ=new BJ;function GJ(e,t,n,i){if(this.useStringRoomId_){if(!(_A(e)&&/^[A-Za-z\d\s!#$%&()+\-:;<=.>?@[\]^_{}|~,]{1,64}$/.test(e)))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:YE,data:t,link:{className:i,fnName:n}})})}else if(!(gA(e)&&/^[1-9]\d*$/.test(String(e))&&e<4294967295))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:ZE,data:t,link:{className:i,fnName:n}})})}function zJ(e,t,n,i){if(!/^[A-Za-z\d_-]*$/.test(e))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:gw,data:t,link:{className:i,fnName:n}})})}var WJ={createClient:{name:"clientConfig",required:!0,type:FI,properties:{sdkAppId:{required:!0,type:LI,allowEmpty:!1},userId:{required:!0,type:NI,allowEmpty:!1},userSig:{required:!0,type:NI,allowEmpty:!1},mode:{required:!0,type:NI,values:["rtc",MT]},useStringRoomId:{type:UI},autoSubscribe:{type:UI},enableAutoPlayDialog:{type:UI},streamId:{type:NI},userDefineRecordId:{type:NI},pureAudioPushMode:{type:LI,values:[1,2]},enableSEI:{type:UI}}},createStream:{name:"streamConfig",required:!0,type:FI,properties:{userId:{type:NI},audio:{type:UI},video:{type:UI},screen:{type:UI},screenAudio:{type:UI},microphoneId:{type:NI},cameraId:{type:NI},facingMode:{type:[NI,FI]},audioSource:{instanceOf:window.MediaStreamTrack},videoSource:{instanceOf:window.MediaStreamTrack}},validate:function(e){if(!vA(e.screen)&&e.screen&&vA(e.audio)&&(e.audio=!1),!(vA(e.audio)&&vA(e.video)||vA(e.audioSource)&&vA(e.videoSource)))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:oR})});if(!vA(e.screen)&&!0===e.screen&&!0===e.video)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:sR})});if(e.audio&&e.screenAudio)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:cR})});if(!0!==e.screen&&!0===e.screenAudio)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:uR})});if(!vA(e.screen)&&!0===e.screen&&!this.isScreenShareSupported())throw new kD({code:bD.INVALID_OPERATION,message:sA({key:_R})})}}},JJ={join:{name:"options",required:!0,type:FI,properties:{roomId:{required:!0,type:[LI,NI],allowEmpty:!1,validate:GJ},role:{type:[NI],values:[LT,UT]},privateMapKey:{type:[NI]}},validate:function(e){if(this.isJoined_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:$E})});if(this.checkDestroy(),HJ.isJoined({userId:this.userId_,roomId:e.roomId,sdkAppId:this.sdkAppId_,client:this}))throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Ww,data:this.userId_})})}},publish:[{name:"stream",required:!0,instanceOf:nE,validate:function(e){if(!this.isJoined_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:rw})});if(this.mode_===MT&&this.role_===UT)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:ow})});if(!e.getIsReadyToPublish())throw new kD({code:bD.INVALID_OPERATION,message:sA({key:sw})});if(this.notPublishWithoutH264Supported_)throw new kD({code:bD.NOT_SUPPORTED_H264,message:sA({key:pR})})}},{name:"options",type:FI,defaultValue:{isAuxiliary:!1},properties:{isAuxiliary:{type:UI,defaultValue:!1,validate:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&!TO())throw new kD({code:bD.NOT_SUPPORTED,message:sA({key:gR})});if(this.uplinkConnection_&&(e&&this.uplinkConnection_.isAuxStreamPublished||!e&&this.uplinkConnection_.isMainStreamPublished))throw new kD({code:bD.INVALID_OPERATION,message:sA({key:cw,data:e?Hk:"local"})});var t=this.localScreenStream_||T(this.connections_.values()).findIndex((function(e){return e.getTrackState().auxiliary}))>=0;if(!this.enableMultiAuxStream_&&e&&t)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:NR})})}}}}],unpublish:{name:"stream",required:!0,instanceOf:nE,validate:function(e){if(e!==this.localStream_&&e!==this.localAuxStream_){if(this.localStream_||this.localAuxStream_)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:aw})});this.log_.warn("Client currently has no published stream, please call publish() first.")}}},subscribe:[{name:"stream",required:!0,instanceOf:iE,validate:function(e){if(!e.getConnection())throw new kD({code:bD.INVALID_OPERATION,message:sA({key:uw})});if(this.notSubscribeWithoutH264Supported_)throw new kD({code:bD.NOT_SUPPORTED_H264,message:sA({key:fR})})}},{name:"options",type:FI,properties:{audio:{type:UI},video:{type:UI},smallVideo:{type:UI}},validate:function(e){var t=e.audio,n=e.video,i=e.smallVideo;if(!1===t&&!1===n&&(vA(i)||!1===i))throw new kD({code:bD.INVALID_OPERATION,message:sA({key:ER})})}}],unsubscribe:{name:"stream",required:!0,instanceOf:iE,validate:function(e){if(!e.getConnection())throw new kD({code:bD.INVALID_OPERATION,message:sA({key:uw})})}},switchRole:{name:"role",required:!0,values:[LT,UT],validate:function(){if(this.mode_!==MT)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:lw})});if(!this.isJoined_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:hw})})}},startPublishCDNStream:{name:"options",required:!1,properties:{streamId:{type:NI,validate:zJ},streamType:{type:NI,values:["main","auxiliary"]},appId:{type:LI,allowEmpty:!1},bizId:{type:LI,allowEmpty:!1},url:{type:NI,allowEmpty:!1}},validate:function(){if(this.isDestroyed_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Jw,data:{funName:"startPublishCDNStream"}})})}},startMixTranscode:{name:"config",required:!0,type:FI,properties:{mode:{type:NI,values:["preset-layout","manual"]},streamId:{type:NI,validate:zJ},videoWidth:{type:LI,notLessThanZero:!0},videoHeight:{type:LI,notLessThanZero:!0},videoBitrate:{type:LI,notLessThanZero:!0,allowEmpty:!1},videoFramerate:{type:LI,validate:function(e,t,n,i){if(e<=0||e>30)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:$w,link:{className:i,fnName:n}})})}},videoGop:{type:LI,validate:function(e,t,n,i){if(e<1||e>8)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:Yw,link:{className:i,fnName:n}})})}},audioSampleRate:{type:LI,notLessThanZero:!0},audioBitrate:{type:LI,validate:function(e,t,n,i){if(e<32||e>192)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:Zw,link:{className:i,fnName:n}})})}},audioChannels:{type:LI,values:[1,2]},backgroundColor:{type:LI},backgroundImage:{type:NI},mixUsers:{required:!0,type:VI,arrayItem:{require:!0,type:FI,properties:{userId:{required:!0,type:NI},roomId:{type:[NI,LI],validate:GJ},pureAudio:{type:UI},width:{type:LI,notLessThanZero:!0},height:{type:LI,notLessThanZero:!0},locationX:{type:LI,notLessThanZero:!0},locationY:{type:LI,notLessThanZero:!0},zOrder:{type:LI},streamType:{type:NI,values:["main","auxiliary"]},renderMode:{type:LI,values:[0,1,2,4]}}}}},validate:function(e,t,n,i,r){var a=0,o=0,s=e.mixUsers,c=[];if(s.forEach((function(e,t){if(c.push(e.userId),!e.pureAudio){if(!e.zOrder||e.zOrder<1||e>15)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:eR,data:"config.mixUsers[".concat(t,"].zOrder"),link:{className:i,fnName:n}})});e.width+e.locationX>a&&(a=e.width+e.locationX),e.height+e.locationY>o&&(o=e.height+e.locationY)}})),c.indexOf(this.getUserId())<0)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:tR,link:{className:i,fnName:n}})});if(e.videoWidth<a||e.videoHeight<o)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:nR,link:{className:i,fnName:n}})})}},sendSEIMessage:[{name:"buffer",required:!0,instanceOf:ArrayBuffer,validate:function(e){if(!CO)throw new kD({code:bD.NOT_SUPPORTED,message:sA({key:wR})});if(!this.enableSEI_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:RR})});if(e.byteLength>1e3)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:AR,data:e.byteLength})});if(0===e.byteLength)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:CR})});if(!this.uplinkConnection_||!this.localStream_)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:xR})});if(!this.localStream_.hasVideo())throw new kD({code:bD.INVALID_OPERATION,message:sA({key:PR})});var t=this.uplinkConnection_.isH264;if(!t)throw new kD({code:bD.NOT_SUPPORTED,message:sA({key:wR,data:t})})}},{name:"options",type:FI,properties:{seiPayloadType:{type:LI,values:[5,243]}}}],enable3DSpatialAudioEffect:{name:"enabled",required:!0,type:UI},updateSelf3DSpatialPosition:[{name:"position",type:VI},{name:"axisRight",type:VI},{name:"axisForward",type:VI},{name:"axisUp",type:VI}],updateRemote3DSpatialPosition:[{name:"userId",required:!0,type:NI},{name:"position",required:!0,type:VI}],set3DSpatialReceivingRange:{name:"range",required:!0,type:LI}},qJ={play:[{name:"elementId",required:!0,type:[NI,"HTMLDivElement"],validate:function(e,t,n){if(_A(e)){var i=document.getElementById(e);if(!i)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:iR,data:{key:t,fnName:n}})});if(!(i instanceof HTMLDivElement))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:rR,data:{key:t,fnName:n,type:TA(i)}})})}}},{name:"options",type:FI,properties:{objectFit:{type:NI,values:["contain","cover","fill"]},muted:{type:UI},mirror:{type:UI}}}],addTrack:{name:ST,instanceOf:MediaStreamTrack,validate:function(e){if(this.isAddingTrack_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Mw})});if(this.isRemovingTrack_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Ow})});if(this.publishState_===GI)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Nw})});var t=this.getMediaStream();if(!t)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Lw})});if(e.kind===Uk&&t.getAudioTracks().length>0||e.kind===Vk&&t.getVideoTracks().length>0)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Uw})});if(!kO()&&!bO())throw new kD({code:bD.NOT_SUPPORTED,message:sA({key:mR,data:_T})})}},removeTrack:{name:ST,instanceOf:MediaStreamTrack,validate:function(e){if(this.isAddingTrack_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Fw})});if(this.isRemovingTrack_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:jw})});if(this.publishState_===GI)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Bw})});var t=this.getMediaStream();if(!t)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Lw})});if(-1===t.getTracks().indexOf(e))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:Hw})});if(!kO()){if(1===t.getTracks().length)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Gw})});if(e.kind===Uk)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:Vw})});if(!bO())throw new kD({code:bD.NOT_SUPPORTED,message:sA({key:mR,data:gT})})}}},replaceTrack:{name:ST,instanceOf:MediaStreamTrack,validate:function(e){var t=this.getMediaStream();if(!t)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Dw})});if(this.publishState_===GI)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Pw})});if(e.kind===Uk&&t.getAudioTracks().length<=0||e.kind===Vk&&t.getVideoTracks().length<=0)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:zw,data:e})});if(!IO())throw new kD({code:bD.NOT_SUPPORTED,message:sA({key:mR,data:yT})})}}},KJ={TRTC:WJ,CLIENT:JJ,LOCAL_STREAM:{switchDevice:[{name:"type",required:!0,type:NI,values:[Uk,Vk]},{name:"deviceId",required:!0,type:NI,validate:function(){if(this.screen_&&!this.audio_||this.audioSource_||this.videoSource_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Aw})});if(this.publishState_===GI)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:xw})});if(!IO())throw new kD({code:bD.NOT_SUPPORTED,message:sA({key:vR})})}}],setAudioCaptureVolume:{name:"volume",type:LI}},STREAM:qJ};function QJ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,i){var r=i.value;return i.value=function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return $J.call(this,t,i,n,this.name_),r.apply(this,i)},i}}function XJ(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e,i,r){var o=r.value;return r.value=a(n().mark((function e(){var r,a,s,c=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=c.length,a=new Array(r),s=0;s<r;s++)a[s]=c[s];return $J.call(this,t,a,i,this.name_),e.abrupt("return",o.apply(this,a));case 3:case"end":return e.stop()}}),e,this)}))),r}}function $J(e,t,n,i){try{for(var r=0;r<e.length;r++)YJ.call(this,{rule:e[r],value:t[r],key:e[r].name,fnName:n,className:i})}catch(IQ){throw Vx.error(IQ),IQ}}function YJ(e){var t=this,n=e.rule,i=e.value,r=e.key,a=e.fnName,o=e.className;if(vA(i)){if(n.required)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:ME,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})});if(vA(n.defaultValue))return;i=n.defaultValue}if(Array.isArray(n.type)){if(!n.type.map((function(e){return e.toLowerCase()})).includes(TA(i)))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:OE,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})})}else if(!vA(n.type)&&TA(i)!==n.type)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:OE,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})});if(!1===n.allowEmpty){var s=gA(i)&&(0===i||Number.isNaN(i)),c=_A(i)&&""===i.trim();if(s||c)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:NE,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})})}if(n.notLessThanZero&&gA(i)&&i<0)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:Xw,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})});if(_A(n.instanceOf)){if(!i||i.name_!==n.instanceOf)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:LE,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})})}else if(mA(n.instanceOf)&&!(i instanceof n.instanceOf))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:LE,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})});if(n.values&&!n.values.includes(i))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:UE,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})});var u=n.properties;hA(u)&&SA(i)&&Object.keys(u).forEach((function(e){YJ.call(t,{rule:u[e],value:i&&i[e],key:"".concat(r,".").concat(e),fnName:a,className:o})}));var d=n.arrayItem;hA(d)&&bA(i)&&i.forEach((function(e,n){YJ.call(t,{rule:d,value:e,key:"".concat(r,"[").concat(n,"]"),fnName:a,className:o})})),mA(n.validate)&&n.validate.call(this,i,r,a,o,this)}Rr({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var ZJ=Rr,eq=M,tq=tc.f;ZJ({target:"Object",stat:!0,forced:eq((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:tq});var nq,iq,rq=wN;function aq(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{retries:5,timeout:2e3};return function(t,n,i){var r=Mx({retryFunction:i.value,settings:e,onError:e.onError,onRetrying:e.onRetrying,onRetryFailed:e.onRetryFailed});return i.value=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(this,t)},i}}Rr({target:"Array",stat:!0,forced:!Du((function(e){Array.from(e)}))},{from:rq});var oq,sq,cq,uq,dq=5e3,lq={msg_user_info:0,uint32_video_avg_fps:0,uint32_video_width:0,uint32_video_height:0,uint32_video_avg_bitrate:0,uint32_video_block_time:0,uint32_video_play_time:0,uint32_audio_block_time:0,uint32_audio_play_time:0,uint32_audio_play_db:0,uint32_avg_down_loss:0,uint32_stream_type:0,uint32_video_render_first:0,uint32_video_block_count:0,uint32_audio_block_count:0,uint32_audio_bitrate:0,uint32_video_black_screen_subjective:0,uint32_audio_recv_bitrate:0,uint32_video_external_block_time:0},hq=c((function e(t){o(this,e),this.str_identifier=String(t.userId),this.uint64_tinyid=Number(t.tinyId),this.uint32_role=t.role})),pq=(nq=aq({timeout:500,retries:3}),iq=function(){function e(t){var i=this;o(this,e),this.frameWorkType_=t.frameWorkType||30,this.component_=t.component||0,this.client_=t.client,this.keyPrefix_="key_point",this.storageKey_="".concat(this.keyPrefix_,"_").concat(this.client_.getUserId()),this.log_=Vx.createLogger({id:"kpm|"+this.client_.getUserId(),userId:this.client_.getUserId(),sdkAppId:this.client_.getSDKAppId()}),Object.getOwnPropertyNames(this.__proto__).forEach((function(e){e.startsWith("handle")&&mA(i[e])&&(i[e]=function(e){var t=e.fn,i=e.context;return a(n().mark((function e(){var r,a,o,s=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(e.prev=0,r=s.length,a=new Array(r),o=0;o<r;o++)a[o]=s[o];return e.next=4,t.apply(i||this,a);case 4:return e.abrupt("return",e.sent);case 7:e.prev=7,e.t0=e.catch(0),Vx.error("".concat(t.name,"() error observed ")+e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})))}({fn:i[e],context:i}))})),this.initData(),this.installEvents(),this.intervalId_=iO.run(gE,this.setStorage.bind(this),{delay:2e4})}var i,r,s;return c(e,[{key:"initData",value:function(){this.firstPublishedUserList_=[],this.networkQuality_={totalUplinkRTT:0,totalUplinkLoss:0,count:0,totalDownlinkRTTAndLossMap:new Map},this.basicInfo={string_sdk_version:Wa,uint32_os_type:15,string_device_name:"",string_http_user_agent:navigator.userAgent,string_os_version:"",string_domain:location.host,uint32_avg_rtt:0,uint32_avg_up_loss:0,uint32_scene:"live"===this.client_.getMode()?1:0,uint32_joining_duration:0,uint32_networkType:BI[lA()],uint32_framework:this.frameWorkType_,uint32_component:this.component_},this.pathJoinRoom_={uint64_start_time:0,uint64_init_audio_start_time:0,uint64_init_audio_end_time:0,uint64_init_camera_start_time:0,uint64_init_camera_end_time:0,uint64_send_request_acc_ip_cmd_start_time:0,uint64_send_request_acc_ip_cmd_end_time:0,uint64_send_request_enter_room_cmd_start_time:0,uint64_send_request_enter_room_cmd_end_time:0,uint64_send_first_video_frame_time:0,uint64_recv_userlist_time:0,uint64_end_time:0,int32_init_audio_ret:0,int32_init_camera_ret:0,int32_send_request_acc_ip_cmd_ret:0,int32_send_request_enter_room_cmd_ret:0,int32_end_ret:0},this.pathLeaveRoom_={uint64_start_time:0,uint64_send_request_exit_room_cmd_start_time:0,uint64_send_request_exit_room_cmd_end_time:0,uint64_end_time:0,int32_send_request_exit_room_cmd_ret:0,int32_end_ret:0},this.pathMainVideoMap_=new Map,this.pathMainAudioMap_=new Map,this.pathAuxiliaryMap_=new Map,this.localStreamStats_={totalVideoBitrate:0,totalVideoFPS:0,totalVideoHeight:0,totalVideoWidth:0,totalAudioLevel:0,videoCount:0,audioLevelCount:0,publishStartTime:0,statsToReport:{uint32_audio_capture_db:0,uint32_video_big_capture_fps:0,uint32_video_big_bitrate:0,uint32_video_big_resolution:0}},this.remoteStreamStatsMap_=new Map}},{key:"installEvents",value:function(){jA.on(BA,this.handleJoinStart,this),jA.on(YA,this.handleWSStart,this),jA.on(ZA,this.handleWSEnd,this),jA.on(HA,this.handleJoinSendCMD,this),jA.on(GA,this.handleJoinReceivedCMDResponce,this),jA.on(zA,this.handleJoinSuccess,this),jA.on(WA,this.handleJoinFailed,this),jA.on(XA,this.handleReceivedPublishUserList,this),jA.on(Rx,this.handleConnectionStateChanged,this),jA.on(JA,this.handleLeaveStart,this),jA.on(KA,this.handleLeaveSuccess,this),jA.on(qA,this.handleLeaveSendCMD,this),jA.on(Cx,this.handleSendSubscribeCMD,this),jA.on(ox,this.handleVideoPlaying,this),jA.on(sx,this.handleAudioPlaying,this),jA.on(Ax,this.handleNetworkQuality,this),jA.on(QA,this.handleHeartbeatStats,this),jA.on(ux,this.handleRemoteStreamAdded,this),jA.on(dx,this.handleRemoteStreamSubscribeStart,this),jA.on(lx,this.handleRemoteStreamSubscribed,this),jA.on(fx,this.handleRemoteStreamRemoved,this),jA.on(kx,this.handleVideoLoadedData,this),jA.on(bx,this.handlePlayStream,this),jA.on($A,this.handlePublishStart,this),jA.on(vx,this.handleLocalStreamInitStart,this),jA.on(_x,this.handleLocalStreamInitEnd,this),jA.on(gx,this.handleLocalStreamInitFailed,this)}},{key:"uninstallEvents",value:function(){jA.off(BA,this.handleJoinStart,this),jA.off(YA,this.handleWSStart,this),jA.off(ZA,this.handleWSEnd,this),jA.off(HA,this.handleJoinSendCMD,this),jA.off(GA,this.handleJoinReceivedCMDResponce,this),jA.off(XA,this.handleReceivedPublishUserList,this),jA.off(Rx,this.handleConnectionStateChanged,this),jA.off(JA,this.handleLeaveStart,this),jA.off(KA,this.handleLeaveSuccess,this),jA.off(zA,this.handleJoinSuccess,this),jA.off(WA,this.handleJoinFailed,this),jA.off(qA,this.handleLeaveSendCMD,this),jA.off(Cx,this.handleSendSubscribeCMD,this),jA.off(ox,this.handleVideoPlaying,this),jA.off(sx,this.handleAudioPlaying,this),jA.off(Ax,this.handleNetworkQuality,this),jA.off(QA,this.handleHeartbeatStats,this),jA.off(ux,this.handleRemoteStreamAdded,this),jA.off(dx,this.handleRemoteStreamSubscribeStart,this),jA.off(lx,this.handleRemoteStreamSubscribed,this),jA.off(fx,this.handleRemoteStreamRemoved,this),jA.off(kx,this.handleVideoLoadedData,this),jA.off(bx,this.handlePlayStream,this),jA.off($A,this.handlePublishStart,this),jA.off(vx,this.handleLocalStreamInitStart,this),jA.off(_x,this.handleLocalStreamInitEnd,this),jA.off(gx,this.handleLocalStreamInitFailed,this)}},{key:"destroy",value:function(){this.uninstallEvents(),iO.clearTask(this.intervalId_),this.client_=null}},{key:"handleJoinStart",value:function(e){this.hitTest(e.client)&&0===this.pathJoinRoom_.uint64_start_time&&(this.pathJoinRoom_.uint64_start_time=Date.now(),this.checkStorage())}},{key:"handleWSStart",value:function(e){var t=e.client;this.hitTest(t)&&0===this.pathJoinRoom_.uint64_send_request_acc_ip_cmd_start_time&&(this.pathJoinRoom_.uint64_send_request_acc_ip_cmd_start_time=Date.now())}},{key:"handleWSEnd",value:function(e){var t=e.client,n=e.error;this.hitTest(t)&&0===this.pathJoinRoom_.uint64_send_request_acc_ip_cmd_end_time&&(this.pathJoinRoom_.uint64_send_request_acc_ip_cmd_end_time=Date.now(),n&&(this.pathJoinRoom_.int32_send_request_acc_ip_cmd_ret=n instanceof kD?Number(n.getExtraCode()||n.getCode()):bD.UNKNOWN,this.pathJoinRoom_.int32_end_ret=2))}},{key:"handleJoinSendCMD",value:function(e){this.hitTest(e.client)&&0===this.pathJoinRoom_.uint64_send_request_enter_room_cmd_start_time&&(this.pathJoinRoom_.uint64_send_request_enter_room_cmd_start_time=Date.now())}},{key:"handleJoinReceivedCMDResponce",value:function(e){this.hitTest(e.client)&&0===this.pathJoinRoom_.uint64_send_request_enter_room_cmd_end_time&&(this.pathJoinRoom_.uint64_send_request_enter_room_cmd_end_time=Date.now(),this.pathJoinRoom_.int32_send_request_enter_room_cmd_ret=e.code,0!==e.code&&(this.pathJoinRoom_.int32_end_ret=3))}},{key:"handleJoinSuccess",value:function(e){this.hitTest(e.client)&&0===this.pathJoinRoom_.uint64_end_time&&(this.pathJoinRoom_.uint64_end_time=Date.now(),this.pathJoinRoom_.int32_end_ret=0)}},{key:"handleJoinFailed",value:function(e){var t=e.client;this.hitTest(t)&&(this.pathJoinRoom_.uint64_end_time=Date.now(),0===this.pathJoinRoom_.int32_end_ret&&(this.pathJoinRoom_.int32_end_ret=3),this.prepareReport(),this.report())}},{key:"handleReceivedPublishUserList",value:function(e){this.hitTest(e.client)&&0===this.pathJoinRoom_.uint64_recv_userlist_time&&(this.pathJoinRoom_.uint64_recv_userlist_time=Date.now(),this.firstPublishedUserList_=e.data.data&&e.data.data.userList||[])}},{key:"handleConnectionStateChanged",value:function(e){var t=e.client,n=e.state,i=e.connection;if(this.hitTest(t)&&n===qT){this.client_.getUplinkConnection()===i&&0===this.pathJoinRoom_.uint64_send_first_video_frame_time&&this.localStreamStats_.publishStartTime>this.pathJoinRoom_.uint64_end_time&&this.localStreamStats_.publishStartTime-this.pathJoinRoom_.uint64_end_time<=100&&(this.pathJoinRoom_.uint64_send_first_video_frame_time=Date.now());var r=this.pathMainVideoMap_.get("".concat(i.getUserId(),"_").concat(BT));r&&0===r.statsToReport.uint64_pc_connected_time&&(r.statsToReport.uint64_pc_connected_time=Date.now())}}},{key:"handleLeaveStart",value:function(e){this.hitTest(e.client)&&(this.pathLeaveRoom_.uint64_start_time=Date.now())}},{key:"handleLeaveSuccess",value:function(e){this.hitTest(e.client)&&0===this.pathLeaveRoom_.uint64_end_time&&(this.pathLeaveRoom_.uint64_end_time=Date.now(),0!==this.pathJoinRoom_.uint64_end_time?this.basicInfo.uint32_joining_duration=this.pathLeaveRoom_.uint64_end_time-this.pathJoinRoom_.uint64_end_time:this.log_.warn("pathJoinRoom endTime is 0"),this.report())}},{key:"handleLeaveSendCMD",value:function(e){this.hitTest(e.client)&&(this.pathLeaveRoom_.uint64_send_request_exit_room_cmd_start_time=Date.now(),this.pathLeaveRoom_.uint64_send_request_exit_room_cmd_end_time=Date.now())}},{key:"handleRemoteStreamAdded",value:function(e){var n=e.client,i=e.stream;if(this.hitTest(n)){var r=i.getUserId(),a=i.getType(),o="".concat(r,"_").concat(a),s=this.remoteStreamStatsMap_.get(o);if(s)s.stream=i;else{var c={userId:r,totalVideoFPS:0,totalVideoBitrate:0,totalAudioLevel:0,totalAudioBitrate:0,totalLoss:0,audioCount:0,audioLevelCount:0,videoCount:0,networkQualityCount:0,streamAddedTime:Date.now(),subscribeStartTime:0,subscribedTime:0,playStreamTime:0,statsToReport:t({},lq),stream:i};c.statsToReport.msg_user_info=new hq({userId:r,tinyId:i.getTinyId(),role:OT}),c.statsToReport.uint32_stream_type=a===BT?2:7,this.remoteStreamStatsMap_.set(o,c)}}}},{key:"handleRemoteStreamSubscribeStart",value:function(e){var t=e.client,n=e.stream;if(this.hitTest(t)){var i=n.getUserId(),r=n.getType(),a="".concat(i,"_").concat(r),o=this.remoteStreamStatsMap_.get(a);o&&0===o.subscribeStartTime&&(o.subscribeStartTime=Date.now())}}},{key:"handleSendSubscribeCMD",value:function(e){if(this.hitTest(e.client)){var t=new hq(e),n=Date.now(),i="".concat(e.userId,"_").concat(BT);e.trackState.video&&e.subscribeState.video&&!this.pathMainVideoMap_.has(i)&&this.pathMainVideoMap_.set(i,{statsToReport:{msg_user_info:t,uint64_start_enter_time:this.pathJoinRoom_.uint64_start_time,uint64_render_first_frame_time:0,uint64_combine_first_frame_time:0,uint64_pc_connected_time:0},userId:e.userId,sendSubscribeCMDTime:n}),e.trackState.audio&&e.subscribeState.audio&&!this.pathMainAudioMap_.has(i)&&this.pathMainAudioMap_.set(i,{statsToReport:{msg_user_info:t,uint64_start_enter_time:this.pathJoinRoom_.uint64_start_time,uint64_play_first_frame_time:0},userId:e.userId,sendSubscribeCMDTime:n});var r="".concat(e.userId,"_").concat(HT);e.trackState.auxiliary&&e.subscribeState.auxiliary&&!this.pathAuxiliaryMap_.has(r)&&this.pathAuxiliaryMap_.set(r,{sendSubscribeCMDTime:n})}}},{key:"handleRemoteStreamSubscribed",value:function(e){var t=e.client,n=e.stream;if(this.hitTest(t)){var i=n.getUserId(),r=n.getType(),a="".concat(i,"_").concat(r),o=this.remoteStreamStatsMap_.get(a);o&&0===o.subscribedTime&&(o.subscribedTime=Date.now(),o.stream=n)}}},{key:"handleRemoteStreamRemoved",value:function(e){var t=e.client,n=e.stream;if(this.hitTest(t)){var i=n.getUserId(),r=n.getType(),a=this.remoteStreamStatsMap_.get("".concat(i,"_").concat(r));a&&(a.stream=null)}}},{key:"handlePlayStream",value:function(e){var t=e.stream;if(t.isRemote()&&t.getConnection()&&this.hitTest(t.getConnection().getClient())){var n=t.getConnection().getUserId(),i="".concat(n,"_").concat(t.getType());if(this.remoteStreamStatsMap_.has(i)){var r=this.remoteStreamStatsMap_.get(i);0===r.playStreamTime&&(r.playStreamTime=Date.now())}}}},{key:"handleVideoLoadedData",value:function(e){var t=e.stream;if(t.isRemote()&&t.getConnection()&&this.hitTest(t.getConnection().getClient())){var n=t.getConnection().getUserId(),i="".concat(n,"_").concat(t.getType());if(this.pathMainVideoMap_.has(i)){var r=this.pathMainVideoMap_.get(i);0===r.statsToReport.uint64_combine_first_frame_time&&(r.statsToReport.uint64_combine_first_frame_time=Date.now())}}}},{key:"handleVideoPlaying",value:function(e){var t=e.stream;if(t.isRemote()&&t.getConnection()&&this.hitTest(t.getConnection().getClient())){var n=t.getConnection().getUserId(),i="".concat(n,"_").concat(t.getType()),r=Date.now();if(this.pathMainVideoMap_.has(i)){var a=this.pathMainVideoMap_.get(i);if(0===a.statsToReport.uint64_render_first_frame_time&&(a.statsToReport.uint64_render_first_frame_time=r),this.remoteStreamStatsMap_.has(i)){var o=this.remoteStreamStatsMap_.get(i),s=o.statsToReport,c=o.playStreamTime,u=o.subscribedTime;0===s.uint32_video_render_first&&c-u<=100&&(s.uint32_video_render_first=r-a.sendSubscribeCMDTime)}}if(t.getType()===HT&&this.pathAuxiliaryMap_.has(i)&&this.remoteStreamStatsMap_.has(i)){var d=this.remoteStreamStatsMap_.get(i),l=d.statsToReport,h=d.playStreamTime,p=d.subscribedTime;0===l.uint32_video_render_first&&h-p<=100&&(l.uint32_video_render_first=r-this.pathAuxiliaryMap_.get(i).sendSubscribeCMDTime)}}}},{key:"handleAudioPlaying",value:function(e){if(e.stream.isRemote()&&e.stream.getConnection()&&this.hitTest(e.stream.getConnection().getClient())){var t=e.stream.getConnection().getUserId(),n="".concat(t,"_").concat(e.stream.getType());if(this.pathMainAudioMap_.has(n)){var i=this.pathMainAudioMap_.get(n);0===i.statsToReport.uint64_play_first_frame_time&&(i.statsToReport.uint64_play_first_frame_time=Date.now())}}}},{key:"handleNetworkQuality",value:function(e){var t=this;this.hitTest(e.client)&&(this.networkQuality_.totalUplinkLoss+=e.uplinkLoss,this.networkQuality_.totalUplinkRTT+=e.uplinkRTT,this.networkQuality_.count++,e.downlinkLossAndRTTMap.forEach((function(e){var n=e.rtt,i=e.loss,r=e.userId,a=t.networkQuality_.totalDownlinkRTTAndLossMap.get(r);a?(a.totalRTT+=n,a.totalLoss+=i,a.count++):t.networkQuality_.totalDownlinkRTTAndLossMap.set(r,{totalRTT:n,totalLoss:i,count:1})})))}},{key:"handleHeartbeatStats",value:function(e){var t=this;if(this.hitTest(e.client)){var n=e.stats,i=n.msg_up_stream_info,r=n.msg_down_stream_info;if(i.msg_video_status[0]){var a=i.msg_video_status[0],o=a.uint32_video_codec_bitrate,s=a.uint32_video_enc_fps,c=a.uint32_video_width,u=a.uint32_video_height;this.localStreamStats_.totalVideoBitrate+=o,this.localStreamStats_.totalVideoFPS+=s,this.localStreamStats_.totalVideoWidth+=c,this.localStreamStats_.totalVideoHeight+=u,this.localStreamStats_.videoCount++}if(i.msg_audio_status){var d=i.msg_audio_status.audioLevel;Math.floor(100*d)>0&&(this.localStreamStats_.totalAudioLevel+=d,this.localStreamStats_.audioLevelCount++)}r.forEach((function(e){var n=e.msg_user_info,i=e.msg_audio_status,r=e.msg_video_status,a=n.str_identifier;if(r.forEach((function(e){var n=2===e.uint32_video_stream_type,i=7===e.uint32_video_stream_type,r="".concat(a,"_").concat(n?BT:HT);if(t.remoteStreamStatsMap_.has(r)){var o,s,c=t.remoteStreamStatsMap_.get(r);(n&&null!==(o=c.stream)&&void 0!==o&&o.isMainVideoSubscribed||i&&null!==(s=c.stream)&&void 0!==s&&s.isAuxVideoSubscribed)&&(c.totalVideoFPS+=e.uint32_video_receive_fps,c.totalVideoBitrate+=e.uint32_video_codec_bitrate,c.videoCount++,0===c.statsToReport.uint32_video_width&&(c.statsToReport.uint32_video_width=e.uint32_video_width),0===c.statsToReport.uint32_video_height&&(c.statsToReport.uint32_video_height=e.uint32_video_height))}})),i){var o="".concat(a,"_").concat(BT);if(t.remoteStreamStatsMap_.has(o)){var s,c=t.remoteStreamStatsMap_.get(o);null!==(s=c.stream)&&void 0!==s&&s.isMainAudioSubscribed&&(c.totalAudioBitrate+=i.uint32_audio_codec_bitrate,c.audioCount++,Math.floor(100*i.audioLevel)>0&&(c.totalAudioLevel+=i.audioLevel,c.audioLevelCount++))}}}))}}},{key:"handlePublishStart",value:function(e){var t=e.client;this.hitTest(t)&&0===this.localStreamStats_.publishStartTime&&(this.localStreamStats_.publishStartTime=Date.now())}},{key:"handleLocalStreamInitStart",value:function(e){var t=e.audio,n=e.video;t&&0===this.pathJoinRoom_.uint64_init_audio_start_time&&(this.pathJoinRoom_.uint64_init_audio_start_time=Date.now()),n&&0===this.pathJoinRoom_.uint64_init_camera_start_time&&(this.pathJoinRoom_.uint64_init_camera_start_time=Date.now())}},{key:"handleLocalStreamInitEnd",value:function(e){var t=e.audio,n=e.video;t&&0===this.pathJoinRoom_.uint64_init_audio_end_time&&(this.pathJoinRoom_.uint64_init_audio_end_time=Date.now()),n&&0===this.pathJoinRoom_.uint64_init_camera_end_time&&(this.pathJoinRoom_.uint64_init_camera_end_time=Date.now())}},{key:"handleLocalStreamInitFailed",value:function(e){var t=e.audio,n=e.video,i=e.error,r=i instanceof kD?i.getExtraCode()||i.getCode():{NotFoundError:1,NotAllowedError:2,NotReadableError:3,OverConstrainedError:4,AbortError:5}[i.name]||bD.UNKNOWN;t&&0===this.pathJoinRoom_.uint64_init_audio_end_time&&(this.pathJoinRoom_.int32_init_audio_ret=r,this.pathJoinRoom_.uint64_init_audio_end_time=Date.now()),n&&0===this.pathJoinRoom_.uint64_init_camera_end_time&&(this.pathJoinRoom_.int32_init_camera_ret=r,this.pathJoinRoom_.uint64_init_camera_end_time=Date.now())}},{key:"hasVideoFlag",value:function(e){return this.firstPublishedUserList_.findIndex((function(t){return t.userId===e&&1&t.flag}))>=0}},{key:"hasAudioFlag",value:function(e){return this.firstPublishedUserList_.findIndex((function(t){return t.userId===e&&8&t.flag}))>=0}},{key:"hasAuxFlag",value:function(e){return this.firstPublishedUserList_.findIndex((function(t){return t.userId===e&&4&t.flag}))>=0}},{key:"hitTest",value:function(e){return e===this.client_}},{key:"checkStorage",value:(s=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(t=aO.getItem(this.storageKey_))){e.next=6;break}return e.next=5,this.upload(t);case 5:aO.deleteItem(this.storageKey_);case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),this.log_.warn(e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(){return s.apply(this,arguments)})},{key:"setStorage",value:function(){this.prepareReport();var e=this.getReportData();0!==e.msg_path_enter_room.uint64_start_time&&aO.setItem(this.storageKey_,e)}},{key:"prepareReport",value:function(){var e=this;if(this.networkQuality_.count>0&&(this.basicInfo.uint32_avg_rtt=Math.floor(this.networkQuality_.totalUplinkRTT/this.networkQuality_.count),this.basicInfo.uint32_avg_up_loss=Math.floor(this.networkQuality_.totalUplinkLoss/this.networkQuality_.count)),this.localStreamStats_.videoCount>0){this.localStreamStats_.statsToReport.uint32_video_big_capture_fps=Math.floor(this.localStreamStats_.totalVideoFPS/this.localStreamStats_.videoCount),this.localStreamStats_.statsToReport.uint32_video_big_bitrate=Math.floor(this.localStreamStats_.totalVideoBitrate/this.localStreamStats_.videoCount);var t=Math.floor(this.localStreamStats_.totalVideoWidth/this.localStreamStats_.videoCount),n=Math.floor(this.localStreamStats_.totalVideoHeight/this.localStreamStats_.videoCount);this.localStreamStats_.statsToReport.uint32_video_big_resolution=t<<16|n}this.localStreamStats_.audioLevelCount>0&&(this.localStreamStats_.statsToReport.uint32_audio_capture_db=Math.floor(this.localStreamStats_.totalAudioLevel/this.localStreamStats_.audioLevelCount*100)),this.remoteStreamStatsMap_.forEach((function(t,n){var i=t.userId;if(e.networkQuality_.totalDownlinkRTTAndLossMap.has(i)){var r=e.networkQuality_.totalDownlinkRTTAndLossMap.get(i),a=r.totalLoss,o=r.count;t.statsToReport.uint32_avg_down_loss=Math.floor(a/o)}t.videoCount>0&&(t.statsToReport.uint32_video_avg_fps=Math.floor(t.totalVideoFPS/t.videoCount),t.statsToReport.uint32_video_avg_bitrate=Math.floor(t.totalVideoBitrate/t.videoCount)),t.audioCount>0&&(t.statsToReport.uint32_audio_recv_bitrate=t.statsToReport.uint32_audio_bitrate=Math.floor(t.totalAudioBitrate/t.audioCount)),t.audioLevelCount>0&&(t.statsToReport.uint32_audio_play_db=Math.floor(t.totalAudioLevel/t.audioLevelCount*100));var s=e.client_.getCallDurationCalculator();s&&(t.statsToReport.uint32_audio_play_time=s.getDuration(n,Uk),t.statsToReport.uint32_video_play_time=s.getDuration(n,Vk)),t.statsToReport.uint32_video_render_first=Math.min(t.statsToReport.uint32_video_render_first,dq);var c=e.client_.getBadCaseDetector();if(c){var u=c.getDataFreezeDuration(n),d=u.dataFreeze,l=u.count,h=c.getRenderFreezeDuration(n).renderFreeze;t.statsToReport.uint32_video_block_count=l,t.statsToReport.uint32_video_block_time=Math.min(d,t.statsToReport.uint32_video_play_time),t.statsToReport.uint32_video_external_block_time=Math.min(h,t.statsToReport.uint32_video_play_time),c.isBlackStream(n)&&0===t.statsToReport.uint32_video_avg_fps?t.statsToReport.uint32_video_black_screen_subjective=1:t.statsToReport.uint32_video_black_screen_subjective=0}(0===t.subscribeStartTime||t.subscribeStartTime-t.streamAddedTime>100||0===t.playStreamTime)&&(e.pathMainAudioMap_.delete(n),e.pathMainVideoMap_.delete(n),t.statsToReport.uint32_video_render_first=0)})),this.pathMainAudioMap_.forEach((function(t,n){e.hasAudioFlag(t.userId)?t.statsToReport.uint64_play_first_frame_time-t.statsToReport.uint64_start_enter_time>dq&&(t.statsToReport.uint64_play_first_frame_time=t.statsToReport.uint64_start_enter_time+dq):e.pathMainAudioMap_.delete(n)})),this.pathMainVideoMap_.forEach((function(t,n){e.hasVideoFlag(t.userId)?t.statsToReport.uint64_render_first_frame_time-t.statsToReport.uint64_start_enter_time>dq&&(t.statsToReport.uint64_render_first_frame_time=t.statsToReport.uint64_start_enter_time+dq):e.pathMainVideoMap_.delete(n)})),this.pathJoinRoom_.uint64_end_time-this.pathJoinRoom_.uint64_start_time>dq&&(this.pathJoinRoom_.uint64_end_time=this.pathJoinRoom_.uint64_start_time+dq)}},{key:"getReportData",value:function(){var e=this.client_.getSignalInfo();return{uint32_sdk_app_id:Number(this.client_.getSDKAppId()),msg_user_info:new hq({userId:this.client_.getUserId(),tinyId:this.client_.getTinyId(),role:this.client_.getRole()===LT?OT:NT}),msg_basic_info:this.basicInfo,uint32_acc_ip:wA(e.relayIp),uint32_client_ip:wA(e.clientIp,"small"),uint32_acc_port:0,uint64_timestamp:Date.now(),uint32_seq:Math.floor(Math.random()*Math.pow(2,31)),msg_path_enter_room:this.pathJoinRoom_,msg_path_exit_room:this.pathLeaveRoom_,msg_path_recv_video:T(this.pathMainVideoMap_.values()).map((function(e){return e.statsToReport})),msg_quality_statistics:T(this.remoteStreamStatsMap_.values()).map((function(e){return e.statsToReport})),str_room_name:String(this.client_.getRoomId()),msg_path_recv_audio:T(this.pathMainAudioMap_.values()).map((function(e){return e.statsToReport})),uint32_info_client_ip:wA(e.clientIp,"small"),error_code:[],msg_local_statistics:this.localStreamStats_.statsToReport,msg_function_state:fq.getStateArray()}}},{key:"report",value:(r=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=this.getReportData(),e.next=4,this.upload(t);case 4:aO.deleteItem(this.storageKey_),fq.clearStateArray(),this.initData(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.log_.warn(e.t0);case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(){return r.apply(this,arguments)})},{key:"upload",value:(i=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(tA||0===t.msg_path_enter_room.uint64_start_time||[aE,oE,sE].findIndex((function(e){return e===location.host}))>=0)){e.next=2;break}return e.abrupt("return");case 2:return i=Number(this.client_.getSDKAppId()),r=dA(i,AT),e.next=6,UA({url:r,body:JSON.stringify(t)});case 6:if("ok"===(a=e.sent).data){e.next=9;break}throw"key point upload failed: ".concat(a.data);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}]),e}(),C(iq.prototype,"upload",[nq],Object.getOwnPropertyDescriptor(iq.prototype,"upload"),iq.prototype),iq),fq=function(){function e(){o(this,e)}return c(e,null,[{key:"handleFunctionState",value:function(e){var t,n,i,r,a=e.className,o=e.fnName,s=e.params;if(!(tA||[aE,oE,sE].findIndex((function(e){return e===location.host}))>=0)){var c,u=[];if(a)switch(o){case"createClient":null!==(t=s[0])&&void 0!==t&&t.mode&&u.push("".concat(a,".").concat(o,".").concat(s[0].mode)),null!==(n=s[0])&&void 0!==n&&n.useStringRoomId?u.push("".concat(a,".").concat(o,".stringRoomId")):u.push("".concat(a,".").concat(o,".intRoomId")),null!==(i=s[0])&&void 0!==i&&i.autoSubscribe?u.push("".concat(a,".").concat(o,".autoSubscribe")):u.push("".concat(a,".").concat(o,".manualSubscribe"));break;case"publish":null!==(r=s[1])&&void 0!==r&&r.isAuxiliary?u.push("".concat(a,".").concat(o,".isAuxiliary")):u.push("".concat(a,".").concat(o));break;case"setAudioProfile":case"setVideoProfile":case"setScreenProfile":case"setVideoContentHint":_A(s[0])&&u.push("".concat(a,".").concat(o,".").concat(s[0]));break;default:u.push("".concat(a,".").concat(o))}else u.push(o);for(var d=0;d<u.length;d++){if(!(c=TE[u[d]]))return;if(this.stateMap.has(c))this.stateMap.get(c).int32_call_times+=1;else this.stateMap.set(c,{int32_id:c,int32_call_times:1})}}}},{key:"getStateArray",value:function(){return Array.from(this.stateMap.values())}},{key:"clearStateArray",value:function(){this.stateMap.clear()}}]),e}();function mq(e){return function(t,n,i){var r=i.value;return i.value=function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];try{e||(e=this.name_),fq.handleFunctionState({className:e,fnName:n,params:i}),e=void 0}catch(IQ){this.log_.info(IQ)}return r.apply(this,i)},i}}u(fq,"stateMap",new Map);var vq=(oq=XJ.apply(void 0,T(KJ.STREAM.play)),sq=mq(),cq=mq(),uq=function(){function e(t){o(this,e),this.name_=rE,this.userId_=t.userId,this.isRemote_=t.isRemote,this.type_=t.type,this.log_=Vx.createLogger({id:"s".concat(t.seq?t.seq:"","|").concat(this.userId_),userId:vA(t.client)?void 0:t.client.getUserId(),sdkAppId:vA(t.client)?void 0:t.client.getSDKAppId(),isLocal:!this.isRemote_,type:this.isRemote_?this.type_:""}),this.client_=null,vA(t.client)||(this.client_=t.client),this.mediaStream_=null,this.div_=null,this.isPlaying_=!1,this.connection_=null,this.audioPlayer_=null,this.videoPlayer_=null,this.muted_=!1,this.objectFit_="cover",this.mirror_=!1,this.id_="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),this.audioOutputDeviceId_=0,this.audioVolume_=1,this.emitter_=OA(new FA,this.name_),this.connectionState_=zT,this.installEvents(),vA(t.mirror)||this.log_.warn('TRTC.createStream "mirror" option was deprecated since v4.12.1锛宲lease use localStream.play to set up preview mirror. refer to '.concat(uE,"/en/LocalStream.html#play. TRTC.createStream 鎺ュ彛鐨� mirror 閫夐」浠� v4.12.1 寮€濮嬭搴熷純锛岃浣跨敤 localStream.play 璁剧疆鏈湴娴侀瑙堥暅鍍忥紝鍙傝€冩枃妗o細").concat(uE,"/zh-cn/LocalStream.html#play銆�"))}var i,r,s,u,d;return c(e,[{key:"installEvents",value:function(){jA.on(xx,this.restartPlayback,this)}},{key:"uninstallEvents",value:function(){jA.off(xx,this.restartPlayback,this)}},{key:"getType",value:function(){return this.type_}},{key:"getLogger",value:function(){return this.log_}},{key:"isSubscribed",get:function(){return this.type_===BT&&this.connection_.isMainStreamSubscribed||this.type_===HT&&this.connection_.isAuxStreamSubscribed}},{key:"isMainVideoSubscribed",get:function(){var e=this.getSubscribedState();return this.type_===BT&&e&&e.video}},{key:"isMainAudioSubscribed",get:function(){var e=this.getSubscribedState();return this.type_===BT&&e&&e.audio}},{key:"isAuxVideoSubscribed",get:function(){var e=this.getSubscribedState();return this.type_===HT&&e&&e.auxiliary}},{key:"isSmallVideoSubscribed",get:function(){var e=this.getSubscribedState();return this.type_===BT&&e&&e.smallVideo}},{key:"emitConnectionStateChanged",value:function(e){e.state!==this.connectionState_&&(e.state!==zT&&this.isRemote_&&!this.isSubscribed||(this.emitter_.emit(zO,e),this.connectionState_=e.state))}},{key:"setConnection",value:function(e){this.connection_!==e&&(e instanceof jJ?(null!==this.connection_&&this.connection_.off(jO.CONNECTION_STATE_CHANGED,this.emitConnectionStateChanged,this),e.on(jO.CONNECTION_STATE_CHANGED,this.emitConnectionStateChanged,this)):null===e&&this.connection_.off(jO.CONNECTION_STATE_CHANGED,this.emitConnectionStateChanged,this),this.connection_=e)}},{key:"getConnection",value:function(){return this.connection_}},{key:"play",value:(d=a(n().mark((function e(t,i){var r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.log_.info("stream ".concat(this.isPlaying_?"update":"start to"," play with elementId: ").concat(t," and options: ").concat(JSON.stringify(i),".")),!this.isPlaying_){e.next=9;break}return i&&!vA(i.muted)&&(this.muted_=i.muted),i&&!vA(i.objectFit)&&(this.objectFit_=i.objectFit),this.isScreenShare()?this.mirror_=!1:i&&!vA(i.mirror)&&(this.mirror_=i.mirror),this.audioPlayer_&&this.audioPlayer_.setMuted(this.muted_),this.videoPlayer_&&(this.videoPlayer_.setObjectFit(this.objectFit_),this.videoPlayer_.setMirror(this.mirror_)),this.elementId_!==t&&(r=t,_A(t)&&(r=document.getElementById(t)),r.appendChild(this.div_),this.elementId_=t),e.abrupt("return");case 9:return this.isPlaying_=!0,(a=document.createElement("div")).setAttribute("id","player_".concat(this.id_)),a.setAttribute("style","width: 100%; height: 100%; position: relative; background-color: black; overflow: hidden;"),o=t,_A(t)&&(o=document.getElementById(t)),o.appendChild(a),this.elementId_=t,this.div_=a,this.isRemote_||(this.muted_=!0),i&&!vA(i.muted)&&(this.muted_=i.muted),this.isScreenShare()&&(this.objectFit_="contain"),i&&!vA(i.objectFit)&&(this.objectFit_=i.objectFit),this.isScreenShare()?this.mirror_=!1:(this.isRemote_||(this.mirror_=!0),i&&!vA(i.mirror)&&(this.mirror_=i.mirror)),jA.emit(bx,{stream:this}),e.next=26,Promise.all([this.playAudio(),this.playVideo()]);case 26:jA.emit(rx,{stream:this});case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"playAudio",value:(u=a(n().mark((function e(){var i,r,a,o,s,c=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.hasAudio()&&(!this.isRemote_||this.isMainAudioSubscribed)){e.next=2;break}return e.abrupt("return");case 2:if(this.isRemote_&&this.client_.isSpatialEnabled&&(null===(i=this.client_)||void 0===i||null===(r=i.getSpatialManager())||void 0===r||r.play(this.userId_)),a=this.getAudioTrack(),this.audioPlayer_||!a){e.next=18;break}return this.log_.info("create AudioPlayer and play"),this.audioPlayer_=new LU({stream:this,track:a,gainedTrack:null===(o=this.gain_)||void 0===o?void 0:o.audioTrack,div:this.div_,muted:this.muted_||(null===(s=this.client_)||void 0===s?void 0:s.isSpatialEnabled),outputDeviceId:this.audioOutputDeviceId_,volume:this.audioVolume_}),this.audioPlayer_.on(qO,(function(e){var n={type:Uk,state:e.state,reason:e.reason};jA.emit(ax,t({stream:c},n)),c.emitter_.emit(HO,n)})),e.prev=8,e.next=11,this.audioPlayer_.play();case 11:e.next=18;break;case 13:throw e.prev=13,e.t0=e.catch(8),this.client_&&this.client_.getEnableAutoPlayDialog()&&new sV,this.emitter_.emit(JO,e.t0),e.t0;case 18:case"end":return e.stop()}}),e,this,[[8,13]])}))),function(){return u.apply(this,arguments)})},{key:"playVideo",value:(s=a(n().mark((function e(){var i,r=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.hasVideo()&&(!this.isRemote_||this.isMainVideoSubscribed||this.isAuxVideoSubscribed||this.isSmallVideoSubscribed)){e.next=2;break}return e.abrupt("return");case 2:if(i=this.getVideoTrack(),this.videoPlayer_||!i){e.next=18;break}return jA.emit(Tx,{stream:this}),this.log_.info("create VideoPlayer and play"),this.videoPlayer_=new cV({stream:this,track:i,div:this.div_,muted:this.muted_,objectFit:this.objectFit_,mirror:this.mirror_}),this.videoPlayer_.on(qO,(function(e){var n={type:Vk,state:e.state,reason:e.reason};jA.emit(ax,t({stream:r},n)),r.emitter_.emit(HO,n)})),e.prev=8,e.next=11,this.videoPlayer_.play();case 11:e.next=18;break;case 13:throw e.prev=13,e.t0=e.catch(8),this.client_&&this.client_.getEnableAutoPlayDialog()&&new sV,this.emitter_.emit(JO,e.t0),e.t0;case 18:case"end":return e.stop()}}),e,this,[[8,13]])}))),function(){return s.apply(this,arguments)})},{key:"stopAudio",value:function(){var e,t;this.audioPlayer_&&(this.log_.info("stop AudioPlayer"),this.audioPlayer_.stop(),this.audioPlayer_=null,this.isRemote_&&this.client_.isSpatialEnabled&&(null===(e=this.client_)||void 0===e||null===(t=e.getSpatialManager())||void 0===t||t.stop(this.userId_)))}},{key:"stopVideo",value:function(){this.videoPlayer_&&(this.log_.info("stop VideoPlayer"),this.videoPlayer_.stop(),this.videoPlayer_=null)}},{key:"restartPlayback",value:function(){this.audioPlayer_&&!this.audioPlayer_.isPlaying&&this.restartAudio(),this.videoPlayer_&&!this.videoPlayer_.isPlaying&&this.restartVideo()}},{key:"restartAudio",value:function(){this.isPlaying_&&(this.stopAudio(),this.playAudio().catch((function(e){})))}},{key:"restartVideo",value:function(){this.isPlaying_&&(this.stopVideo(),this.playVideo().catch((function(e){})))}},{key:"stop",value:function(){var e,t;this.isPlaying_&&(this.isPlaying_=!1,this.stopAudio(),this.stopVideo(),this.div_.parentNode.removeChild(this.div_),this.isRemote_&&this.client_.isSpatialEnabled&&(null===(e=this.client_)||void 0===e||null===(t=e.getSpatialManager())||void 0===t||t.stop(this.userId_)))}},{key:"resume",value:(r=a(n().mark((function e(){var t,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isPlaying_){e.next=2;break}return e.abrupt("return");case 2:if(this.log_.info("resume"),!this.audioPlayer_){e.next=7;break}return e.next=6,this.audioPlayer_.resume();case 6:this.isRemote_&&this.client_.isSpatialEnabled&&(null===(t=this.client_)||void 0===t||null===(i=t.getSpatialManager())||void 0===i||i.resume());case 7:if(!this.videoPlayer_){e.next=10;break}return e.next=10,this.videoPlayer_.resume();case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"close",value:function(){this.log_.info("close stream"),this.isPlaying_&&this.stop(),this.isRemote_||(this.mediaStream_&&(this.mediaStream_.preventEvent=1,this.mediaStream_.getTracks().forEach((function(e){e.stop()})),this.mediaStream_=null),this.uninstallEvents())}},{key:"muteAudio",value:function(){return this.addRemoteEvent(!0,Uk),this.doEnableTrack(Uk,!1)}},{key:"muteVideo",value:function(){return this.addRemoteEvent(!0,Vk),this.doEnableTrack(Vk,!1)}},{key:"unmuteAudio",value:function(){return this.addRemoteEvent(!1,Uk),this.doEnableTrack(Uk,!0)}},{key:"unmuteVideo",value:function(){return this.addRemoteEvent(!1,Vk),this.doEnableTrack(Vk,!0)}},{key:"addRemoteEvent",value:function(e,t){if(this.isRemote_&&this.client_){var n=this.client_.getUserId(),i="".concat(e?qk:Kk," remote ").concat(t);oM(n,{eventId:t===Uk?e?FD:BD:e?VD:jD,eventDesc:i,timestamp:(new Date).getTime(),userId:n,tinyId:this.client_.getTinyId(),remoteUserId:this.userId_,remoteTinyId:this.connection_.getTinyId()})}}},{key:"doEnableTrack",value:function(e,t){var n,i,r=!1;e===Uk?(this.mediaStream_.getAudioTracks().forEach((function(e){r=!0,e.enabled=t})),this.isRemote_&&this.client_.isSpatialEnabled&&(t?null===(n=this.client_.getSpatialManager())||void 0===n||n.play(this.userId_):null===(i=this.client_.getSpatialManager())||void 0===i||i.stop(this.userId_))):this.mediaStream_.getVideoTracks().forEach((function(e){r=!0,e.enabled=t}));return r}},{key:"getId",value:function(){return this.id_}},{key:"getUserId",value:function(){return this.userId_}},{key:"getTinyId",value:function(){return this.connection_?this.connection_.getTinyId():""}},{key:"isPlaying",value:function(){return this.isPlaying_}},{key:"setAudioOutput",value:(i=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.audioOutputDeviceId_=t,!this.audioPlayer_){e.next=4;break}return e.next=4,this.audioPlayer_.setSinkId(t);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"setAudioVolume",value:function(e){var t,n;(this.audioVolume_=e,this.log_.info("setAudioVolume to ".concat(e)),this.audioPlayer_)&&(this.audioPlayer_.setVolume(e),this.isRemote_&&this.client_.isSpatialEnabled&&(null===(t=this.client_)||void 0===t||null===(n=t.getSpatialManager())||void 0===n||n.setAudioVolume(this.userId_,e)))}},{key:"getAudioLevel",value:function(){var e=0;return this.audioPlayer_&&(e=this.audioPlayer_.getAudioLevel()),e}},{key:"getInternalAudioLevel",value:function(){var e=0;return this.audioPlayer_&&(e=this.audioPlayer_.getInternalAudioLevel()),e}},{key:"hasAudio",value:function(){if(this.isRemote_){if(!this.connection_)return!1;var e=this.connection_.getTrackState();return this.type_===BT&&e.audio}return!!this.getAudioTrack()}},{key:"hasVideo",value:function(){if(this.isRemote_){if(!this.connection_)return!1;var e=this.connection_.getTrackState();return this.type_===HT?e.auxiliary:e.video}return!!this.getVideoTrack()}},{key:"getSubscribedState",value:function(){return this.isRemote_&&this.connection_?this.connection_.getSubscribeState():null}},{key:"getAudioTrack",value:function(){var e=null;if(this.mediaStream_){var t=this.mediaStream_.getAudioTracks();t.length>0&&(e=t[0])}return e}},{key:"getVideoTrack",value:function(){var e=null;if(this.mediaStream_){var t=this.mediaStream_.getVideoTracks();t.length>0&&(e=t[0])}return e}},{key:"getVideoFrame",value:function(){return this.videoPlayer_?this.videoPlayer_.getVideoFrame():null}},{key:"getMediaStream",value:function(){return this.mediaStream_}},{key:"setMediaStream",value:function(e){e!==this.mediaStream_&&(this.mediaStream_&&this.mediaStream_.getTracks().forEach((function(e){return e.stop()})),this.mediaStream_=e)}},{key:"updateVideoPlayingState",value:function(e){this.isPlaying_&&(e?(this.log_.info("playing state updated, play video"),this.playVideo().catch((function(e){}))):(this.log_.info("playing state updated, stop video"),this.stopVideo()))}},{key:"updateAudioPlayingState",value:function(e){this.isPlaying_&&(e?(this.log_.info("playing state updated, play audio"),this.playAudio().catch((function(e){}))):(this.log_.info("playing state updated, stop audio"),this.stopAudio()))}},{key:"on",value:function(e,t,n){this.emitter_.on(e,t,n)}},{key:"off",value:function(e,t,n){"*"===e?this.emitter_.removeAllListeners():this.emitter_.off(e,t,n)}},{key:"isRemote",value:function(){return this.isRemote_}},{key:"isScreenShare",value:function(){return!this.isRemote_&&this.screen_||this.isRemote_&&this.getType()===Hk}},{key:"getDiv",value:function(){return this.div_}},{key:"getObjectFit",value:function(){return this.objectFit_}},{key:"getMuted",value:function(){return this.muted_}},{key:"getClient",value:function(){return this.client_}}]),e}(),C(uq.prototype,"play",[oq],Object.getOwnPropertyDescriptor(uq.prototype,"play"),uq.prototype),C(uq.prototype,"setAudioOutput",[sq],Object.getOwnPropertyDescriptor(uq.prototype,"setAudioOutput"),uq.prototype),C(uq.prototype,"getVideoFrame",[cq],Object.getOwnPropertyDescriptor(uq.prototype,"getVideoFrame"),uq.prototype),uq),_q=function(e){d(RemoteStream,e);var n=g(RemoteStream);function RemoteStream(e){var i;o(this,RemoteStream);var r={isRemote:!0,type:e.type},a=t(t({},e),r);return(i=n.call(this,a)).name_=iE,i.isStreamAddedEventEmitted_=!1,i.isAbleToCallSubscription_=!0,i}return c(RemoteStream,[{key:"installEvents",value:function(){S(l(RemoteStream.prototype),"installEvents",this).call(this),jA.on(lx,this.handleStreamSubscribed,this),jA.on(hx,this.handleStreamUnsubscribed,this)}},{key:"uninstallEvents",value:function(){S(l(RemoteStream.prototype),"uninstallEvents",this).call(this),jA.off(lx,this.handleStreamSubscribed,this),jA.off(hx,this.handleStreamUnsubscribed,this)}},{key:"handleStreamSubscribed",value:function(e){e.client===this.client_&&e.stream===this&&this.connection_.getCurrentState()===qT&&this.emitConnectionStateChanged({prevState:zT,state:qT})}},{key:"handleStreamUnsubscribed",value:function(e){e.client===this.client_&&e.stream===this&&this.emitConnectionStateChanged({prevState:qT,state:zT})}},{key:"getType",value:function(){return S(l(RemoteStream.prototype),"getType",this).call(this)}},{key:"getIsAbleToCallSubscription",value:function(){return this.isAbleToCallSubscription_}},{key:"setIsAbleToCallSubscription",value:function(e){this.isAbleToCallSubscription_=e}},{key:"setIsStreamAddedEventEmitted",value:function(e){this.isStreamAddedEventEmitted_=e}},{key:"getIsStreamAddedEventEmitted",value:function(){return this.isStreamAddedEventEmitted_}},{key:"getAudioTrack",value:function(){return this.connection_&&this.connection_.getTrackState().audio?S(l(RemoteStream.prototype),"getAudioTrack",this).call(this):null}},{key:"getVideoTrack",value:function(){if(!this.connection_)return null;var e=this.connection_.getTrackState();return(this.type_!==BT||e.video)&&(this.type_!==HT||e.auxiliary)?S(l(RemoteStream.prototype),"getVideoTrack",this).call(this):null}},{key:"close",value:function(){S(l(RemoteStream.prototype),"close",this).call(this)}}]),RemoteStream}(vq),gq=function(){function e(t){o(this,e),this.client_=t.client,this.subscribedStreams_=new Map,this.unsubscribedStreams_=new Map,this.subscriptedOptions_=new Map,this.autoRecoveryFlags_=new Map}var t,i,r;return c(e,[{key:"isEnabled",get:function(){return"webrtc"!==this.client_.getEnv()}},{key:"recover",value:(r=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.getUserId(),r=t.getType(),this.hasAutoRecoveryFlag(i,r)){e.next=5;break}return e.abrupt("return");case 5:if(a=this.getUnsubscribedStream(i,r)?"unsubscribe":"subscribe",e.prev=6,Vx.warn("recover() try to recover subscription [".concat(a,"][").concat(i,"][").concat(r,"]")),"subscribe"!==a){e.next=13;break}return e.next=11,this.recoverSubscription(i,t);case 11:e.next=15;break;case 13:return e.next=15,this.recoverUnsubscription(i,t);case 15:lM.logSuccessEvent({userId:this.client_.getUserId(),eventType:TI}),Vx.warn("recover() recover successfully [".concat(a,"][").concat(i,"][").concat(r,"]")),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(6),Vx.error("recover() recover failed [".concat(a,"][").concat(i,"][").concat(r,"]"),e.t0),lM.logFailedEvent({userId:this.client_.getUserId(),eventType:TI,error:e.t0});case 23:this.deleteAutoRecoveryFlag(i,r);case 24:case"end":return e.stop()}}),e,this,[[6,19]])}))),function(e){return r.apply(this,arguments)})},{key:"recoverSubscription",value:(i=a(n().mark((function e(t,i){var r,a,o,s,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.getOptions(t,i.getType()),a=this.getSubscribedStream(t,i.getType()),r&&a){e.next=4;break}return e.abrupt("return");case 4:o=this.getStreamMuteState(a),s=o.isAudioMuted,c=o.isVideoMuted,this.mergeStream(a,i),this.recoverPlayingState(a),s&&a.doEnableTrack(Uk,!1),c&&a.doEnableTrack(Vk,!1);case 9:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"recoverUnsubscription",value:(t=a(n().mark((function e(t,i){var r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.getUnsubscribedStream(t,i.getType())){e.next=3;break}return e.abrupt("return");case 3:this.mergeStream(r,i);case 4:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"getStreamMuteState",value:function(e){var t={isAudioMuted:!1,isVideoMuted:!1},n=e.getMediaStream();return n&&(t.isAudioMuted=n.getAudioTracks().map((function(e){return e.enabled})).includes(!1),t.isVideoMuted=n.getVideoTracks().map((function(e){return e.enabled})).includes(!1)),t}},{key:"recoverPlayingState",value:function(e){var t=e.isPlaying(),n=e.getDiv();if(t&&n){var i=n.parentNode;e.stop(),e.play(i,{objectFit:e.getObjectFit(),muted:e.getMuted()})}}},{key:"mergeStream",value:function(e,t){var n=t.getConnection(),i=t.getMediaStream();e.setConnection(n),n.setRemoteStream(i.id,e),e.setMediaStream(i),e.updateAudioPlayingState(t.hasAudio()),e.updateVideoPlayingState(t.hasVideo())}},{key:"addSubscriptionRecord",value:function(e,t,n){var i=t.getType();if(this.subscribedStreams_.has(e))this.subscribedStreams_.get(e).set(i,t);else{var r=new Map;r.set(t.getType(),t),this.subscribedStreams_.set(e,r)}if(this.subscriptedOptions_.has(e))this.subscriptedOptions_.get(e).set(i,n);else{var a=new Map;a.set(t.getType(),n),this.subscriptedOptions_.set(e,a)}this.deleteUnsubscriptionRecord(e,i)}},{key:"addUnsubscriptionRecord",value:function(e,t){if(this.unsubscribedStreams_.has(e))this.unsubscribedStreams_.get(e).set(t.getType(),t);else{var n=new Map;n.set(t.getType(),t),this.unsubscribedStreams_.set(e,n)}this.deleteSubscriptionRecord(e,t.getType())}},{key:"getSubscribedStream",value:function(e,t){return this.subscribedStreams_.has(e)&&this.subscribedStreams_.get(e).has(t)?this.subscribedStreams_.get(e).get(t):null}},{key:"getOptions",value:function(e,t){return this.subscriptedOptions_.has(e)&&this.subscriptedOptions_.get(e).has(t)?this.subscriptedOptions_.get(e).get(t):null}},{key:"getUnsubscribedStream",value:function(e,t){return this.unsubscribedStreams_.has(e)&&this.unsubscribedStreams_.get(e).has(t)?this.unsubscribedStreams_.get(e).get(t):null}},{key:"deleteSubscriptionRecord",value:function(e,t){this.subscribedStreams_.has(e)&&this.subscribedStreams_.get(e).delete(t),this.subscriptedOptions_.has(e)&&this.subscriptedOptions_.get(e).delete(t)}},{key:"deleteUnsubscriptionRecord",value:function(e,t){this.unsubscribedStreams_.has(e)&&this.unsubscribedStreams_.get(e).delete(t)}},{key:"markAllStream",value:function(){for(var e=0,t=T(this.subscribedStreams_.entries());e<t.length;e++)for(var n=k(t[e],2),i=n[0],r=0,a=T(n[1].entries());r<a.length;r++){var o=k(a[r],1)[0];this.setAutoRecoveryFlag(i,o)}for(var s=0,c=T(this.unsubscribedStreams_.entries());s<c.length;s++)for(var u=k(c[s],2),d=u[0],l=0,h=T(u[1].entries());l<h.length;l++){var p=k(h[l],1)[0];this.setAutoRecoveryFlag(d,p)}}},{key:"setAutoRecoveryFlag",value:function(e,t){if(Vx.info("setAutoRecoveryFlag() mark [".concat(e,"][").concat(t,"]")),this.autoRecoveryFlags_.has(e))this.autoRecoveryFlags_.get(e).set(t);else{var n=new Map;n.set(t),this.autoRecoveryFlags_.set(e,n)}}},{key:"hasAutoRecoveryFlag",value:function(e,t){return!!this.isEnabled&&(this.autoRecoveryFlags_.has(e)&&this.autoRecoveryFlags_.get(e).has(t))}},{key:"deleteAutoRecoveryFlag",value:function(e,t){this.autoRecoveryFlags_.has(e)&&this.autoRecoveryFlags_.get(e).delete(t)}},{key:"delete",value:function(e){this.unsubscribedStreams_.delete(e),this.subscribedStreams_.delete(e),this.subscriptedOptions_.delete(e),this.autoRecoveryFlags_.delete(e)}}]),e}(),yq=function(){function e(t){o(this,e),this.player_=t,this.canvas_=document.createElement(Lk),this.canvasCtx_=this.canvas_.getContext("2d")}return c(e,[{key:"setCanvasRect",value:function(e,t){this.canvas_.width=e,this.canvas_.height=t}},{key:"drawVideoToCanvas",value:function(){var e=this.player_.getElement(),t=e.videoHeight,n=e.videoWidth,i=n*this.canvas_.height/(t*this.canvas_.width);if(i>1.05||i<.95){var r=n*t/(this.canvas_.width*this.canvas_.height);this.setCanvasRect(n/Math.sqrt(r),t/Math.sqrt(r))}this.canvasCtx_.drawImage(e,0,0,this.canvas_.width,this.canvas_.height)}},{key:"generateVideoTrackFromCanvasCapture",value:function(e){return this.canvas_.captureStream(e).getVideoTracks()[0]}},{key:"generateStreamFromTrack",value:function(e){var t=new MediaStream;return t.addTrack(e),t}},{key:"destroy",value:function(){this.player_.stop(),this.canvas_.width=0,this.canvas_.height=0,this.canvas_=null,this.canvasCtx_=null}},{key:"canvas",get:function(){return this.canvas_}},{key:"canvasCtx",get:function(){return this.canvasCtx_}},{key:"canDrawVideoToCanvas",get:function(){if(this.player_){var e=this.player_.getElement();if(e)return e.readyState===e.HAVE_ENOUGH_DATA}return!1}}]),e}(),Sq=new Blob(['let t,e,a,i;onmessage=function(n){const{action:h,data:s}=n.data;switch(h){case"render":a=s.canvas,t=a.width,e=a.height,i=a.getContext("2d"),function(t,e){const n=new TransformStream({async transform(t,e){const n=t.displayWidth,h=t.displayHeight,s=n*a.height/(h*a.width);if(s>1.05||s<.95){const t=n*h/(a.width*a.height);a.width=n/Math.sqrt(t),a.height=h/Math.sqrt(t)}i.drawImage(t,0,0,a.width,a.height);const o=new VideoFrame(a,{timestamp:t.timestamp});t.close(),e.enqueue(o)}});t.pipeThrough(n).pipeTo(e)}(s.readable,s.writable)}}'],{type:"application/javascript"}),bq=function(){function e(t){o(this,e);var n=t.videoTrack;this.width=void 0,this.height=void 0,this.canvas=document.createElement("canvas"),this.offscreen=null,this.smallGenerator=new MediaStreamTrackGenerator({kind:"video"}),this.smallWritable=this.smallGenerator.writable,this.bigProcessor=new MediaStreamTrackProcessor({track:n}),this.bigReadable=this.bigProcessor.readable,this.initWorker()}return c(e,[{key:"initWorker",value:function(){try{this.worker=new Worker(URL.createObjectURL(Sq)),Vx.info("init worker processor success")}catch(e){Vx.warn("init worker processor failed. ".concat(e.error))}}},{key:"setCanvasRect",value:function(e,t){this.width=e,this.height=t,this.canvas.width=e,this.canvas.height=t,this.offscreen=this.canvas.transferControlToOffscreen(),this.worker.postMessage({action:"render",data:{canvas:this.offscreen,readable:this.bigReadable,writable:this.smallWritable}},[this.offscreen,this.bigReadable,this.smallWritable])}},{key:"generatorVideoTrack",value:function(){var e=new MediaStream([this.smallGenerator]);return null==e?void 0:e.getTracks()[0]}},{key:"destroy",value:function(){this.worker.terminate()}}]),e}(),kq=function(){function e(t){o(this,e),this.localStream_=t,this.player_=null,this.processor_=null,this.initOffscreenSuccess_=!1}var t;return c(e,[{key:"initialize",value:(t=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(FO()&&(null===(t=navigator)||void 0===t?void 0:t.hardwareConcurrency)>=6)){e.next=13;break}return e.prev=1,e.next=4,this.initOffscreen();case 4:this.initOffscreenSuccess_=!0,Vx.info("Initialize VideoGenerator successfully!"),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.initCanvas();case 11:e.next=14;break;case 13:this.initCanvas();case 14:case"end":return e.stop()}}),e,this,[[1,8]])}))),function(){return t.apply(this,arguments)})},{key:"generateSmallVideoTrack",value:function(e){var t,n=e.height,i=e.width,r=e.frameRate,a=this.getSmallVideoProfile(i,n);return this.initOffscreenSuccess_?(this.processor_.setCanvasRect(a.width,a.height),t=this.processor_.generatorVideoTrack()):(this.processor_.setCanvasRect(a.width,a.height),this.player_.setRect({width:a.width,height:a.height}),t=this.processor_.generateVideoTrackFromCanvasCapture(r),this.interval_=iO.run(yE,this.render.bind(this),{fps:r})),t}},{key:"render",value:function(){this.processor_.canDrawVideoToCanvas&&this.processor_.drawVideoToCanvas()}},{key:"destroy",value:function(){iO.clearTask(this.interval_),this.processor_&&this.processor_.destroy()}},{key:"initOffscreen",value:function(){this.processor_=new bq({videoTrack:this.localStream_.getVideoTrack()})}},{key:"initCanvas",value:function(){this.player_=new cV({stream:this.localStream_,track:this.localStream_.getVideoTrack(),muted:!0,objectFit:"cover",mirror:!1}),this.player_.play().then((function(){Vx.info("VideoGenerator: play local video success")})).catch((function(){Vx.error("VideoGenerator: Failed to play local video")})),this.processor_=new yq(this.player_)}},{key:"getSmallVideoProfile",value:function(e,t){var n,i=this.localStream_.getVideoTrack(),r=this.localStream_.getVideoProfile();if(UO){var a=i.getSettings();a&&a.width&&a.height&&(r.width=a.width,r.height=a.height)}var o=r.width*r.height,s=e*t;return Vx.info("big stream resolution: ".concat(r.width,"*").concat(r.height," small stream resolution: ").concat(e,"*").concat(t," ")),n=o>s?o/s:o/19200,{width:parseInt(r.width/Math.sqrt(n)),height:parseInt(r.height/Math.sqrt(n))}}}]),e}(),Tq=new Map;var Iq=function(){var e=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!wO()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,wq(t);case 4:if(i=e.sent,Vx.info("getUserMedia with constraints: "+JSON.stringify(i)),!i.audio){e.next=11;break}return e.next=9,TQ.getMicrophones();case 9:r=e.sent,Vx.info("microphones: ".concat(JSON.stringify(r)));case 11:if(!i.video){e.next=16;break}return e.next=14,TQ.getCameras();case 14:a=e.sent,Vx.info("cameras: ".concat(JSON.stringify(a)));case 16:return e.prev=16,e.next=19,navigator.mediaDevices.getUserMedia(i);case 19:return e.abrupt("return",e.sent);case 22:if(e.prev=22,e.t0=e.catch(16),"NotFoundError"!==e.t0.name){e.next=29;break}if(!a||0!==a.length){e.next=27;break}throw new kD({code:bD.DEVICE_NOT_FOUND,message:sA({key:SR})});case 27:if(!r||0!==r.length){e.next=29;break}throw new kD({code:bD.DEVICE_NOT_FOUND,message:sA({key:yR})});case 29:throw new kD({code:bD.INITIALIZE_FAILED,name:e.t0.name,message:e.t0.message,constraint:e.t0.constraint});case 30:case"end":return e.stop()}}),e,null,[[16,22]])})));return function(t){return e.apply(this,arguments)}}(),Eq=Mx({retryFunction:Iq,settings:{retries:3,timeout:500},onError:function(e,t,n,i){Vx.warn("getUserMedia error: ".concat(e)),"NotReadableError"===e.name?t():e.message.includes("deviceId")&&i[0].retryWhenExactFailed?(i[0].useExact=!1,t()):n(e)},onRetrying:function(e){Vx.warn("getUserMedia retrying [".concat(e,"/3]"))}});function wq(e){return Rq.apply(this,arguments)}function Rq(){return(Rq=a(n().mark((function e(i){var r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r={echoCancellation:i.echoCancellation,autoGainControl:i.autoGainControl,noiseSuppression:i.noiseSuppression},i.audio){e.next=5;break}r=!1,e.next=15;break;case 5:if(uM(i.microphoneId)){e.next=9;break}r=t({deviceId:i.useExact?{exact:i.microphoneId}:i.microphoneId,sampleRate:i.sampleRate,channelCount:i.channelCount},r),e.next=15;break;case 9:return r=t({sampleRate:i.sampleRate,channelCount:i.channelCount},r),e.next=12,TQ.getMicrophones();case 12:a=e.sent,(o=a.filter((function(e){return e.deviceId.length>0}))).length>0&&(r.deviceId={exact:o[0].deviceId});case 15:return s={},c={ideal:i.width,max:i.width},u={ideal:i.height,max:i.height},tC&&RC&&i.width*i.height<101376&&(c=i.width,u=i.height),s=!vA(i.facingMode)&&i.video?{facingMode:i.facingMode,width:c,height:u,frameRate:i.frameRate}:!uM(i.cameraId)&&i.video?{deviceId:i.useExact?{exact:i.cameraId}:i.cameraId,width:c,height:u,frameRate:i.frameRate}:!!i.video&&(!!vA(i.width)||{width:c,height:u,frameRate:i.frameRate}),e.abrupt("return",{audio:r,video:s});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Cq=function(){var e=a(n().mark((function e(t){var i,r,a,o,s,c,u,d,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!wO()){e.next=2;break}return e.abrupt("return");case 2:if(i=null,!(WC&&JC<74||KC)){e.next=27;break}return r=xq(t),Vx.info("getDisplayMedia with constraints: "+JSON.stringify(r)),e.next=8,navigator.mediaDevices.getDisplayMedia(r);case 8:if(a=e.sent,!t.screenAudio){e.next=14;break}return Vx.warn("Your browser not support capture system audio"),e.abrupt("return",a);case 14:if(!t.audio){e.next=24;break}return o=Aq(t),Vx.info("getUserMedia with constraints: "+JSON.stringify(o)),e.next=19,navigator.mediaDevices.getUserMedia(o);case 19:return i=e.sent,a.addTrack(i.getAudioTracks()[0]),e.abrupt("return",a);case 24:return e.abrupt("return",a);case 25:e.next=53;break;case 27:if(!t.screenAudio){e.next=37;break}return t.audioConstraints={echoCancellation:t.echoCancellation,autoGainControl:t.autoGainControl,noiseSuppression:t.noiseSuppression,sampleRate:44100},s=xq(t),Vx.info("getDisplayMedia with constraints: "+JSON.stringify(s)),e.next=33,navigator.mediaDevices.getDisplayMedia(s);case 33:return c=e.sent,e.abrupt("return",c);case 37:return u=xq(t),Vx.info("getDisplayMedia with constraints: "+JSON.stringify(u)),e.next=41,navigator.mediaDevices.getDisplayMedia(u);case 41:if(d=e.sent,!t.audio){e.next=52;break}return l=Aq(t),Vx.info("getUserMedia with constraints: "+JSON.stringify(l)),e.next=47,navigator.mediaDevices.getUserMedia(l);case 47:return i=e.sent,d.addTrack(i.getAudioTracks()[0]),e.abrupt("return",d);case 52:return e.abrupt("return",d);case 53:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function Aq(e){var t={echoCancellation:e.echoCancellation,autoGainControl:e.autoGainControl,noiseSuppression:e.noiseSuppression,sampleRate:e.sampleRate,channelCount:e.channelCount};return vA(e.microphoneId)||(t.deviceId=e.microphoneId),{audio:t,video:!1}}function xq(e){var t={systemAudio:"include",selfBrowserSurface:"include",surfaceSwitching:"include"},n={width:KC?{max:e.width}:{ideal:e.width,max:e.width},height:KC?{max:e.height}:{ideal:e.height,max:e.height},frameRate:e.frameRate,displaySurface:"monitor"};return t.video=n,vA(e.audioConstraints)||(t.audio=e.audioConstraints),t}var Pq,Dq,Mq,Oq,Nq,Lq,Uq,Vq,Fq,jq,Bq,Hq,Gq,zq,Wq,Jq,qq,Kq,Qq,Xq=new Map([["120p",{width:160,height:120,frameRate:15,bitrate:200}],["120p_2",{width:160,height:120,frameRate:15,bitrate:100}],["180p",{width:320,height:180,frameRate:15,bitrate:350}],["180p_2",{width:320,height:180,frameRate:15,bitrate:150}],["240p",{width:320,height:240,frameRate:15,bitrate:400}],["240p_2",{width:320,height:240,frameRate:15,bitrate:200}],["360p",{width:640,height:360,frameRate:15,bitrate:800}],["360p_2",{width:640,height:360,frameRate:15,bitrate:400}],["480p",{width:640,height:480,frameRate:15,bitrate:900}],["480p_2",{width:640,height:480,frameRate:15,bitrate:500}],["720p",{width:1280,height:720,frameRate:15,bitrate:1500}],["1080p",{width:1920,height:1080,frameRate:15,bitrate:2e3}],["1440p",{width:2560,height:1440,frameRate:30,bitrate:4860}],["4K",{width:3840,height:2160,frameRate:30,bitrate:9e3}]]),$q=new Map([["480p",{width:640,height:480,frameRate:5,bitrate:900}],["480p_2",{width:640,height:480,frameRate:30,bitrate:1e3}],["720p",{width:1280,height:720,frameRate:5,bitrate:1200}],["720p_2",{width:1280,height:720,frameRate:30,bitrate:3e3}],["1080p",{width:1920,height:1080,frameRate:5,bitrate:1600}],["1080p_2",{width:1920,height:1080,frameRate:30,bitrate:4e3}]]),Yq=new Map([["standard",{sampleRate:48e3,channelCount:1,bitrate:40}],["standard-stereo",{sampleRate:48e3,channelCount:2,bitrate:64}],["high",{sampleRate:48e3,channelCount:1,bitrate:128}],["high-stereo",{sampleRate:48e3,channelCount:2,bitrate:192}]]),Zq=new Map,eK=(Pq=mq(nE),Dq=mq(nE),Mq=mq(nE),Oq=mq(nE),Nq=XJ.apply(void 0,T(KJ.LOCAL_STREAM.switchDevice)),Lq=XJ(KJ.STREAM.addTrack),Uq=XJ(KJ.STREAM.removeTrack),Vq=XJ(KJ.STREAM.replaceTrack),Fq=aq({retries:10,timeout:3e3,onRetryFailed:function(e){lM.logFailedEvent({userId:this.client_?this.client_.getUserId():this.userId_,eventType:kI,error:e}),this.emitter_.emit(JO,new kD({code:bD.DEVICE_AUTO_RECOVER_FAILED,message:e.message}))}}),jq=QJ(KJ.LOCAL_STREAM.setAudioCaptureVolume),Bq=mq(nE),Hq=function(e){d(LocalStream,e);var r,s,u,h,p,f,m,v,_,y,b,k,T=g(LocalStream);function LocalStream(e){var n;o(this,LocalStream);var i=t(t({},e),{isRemote:!1,type:"local"});return(n=T.call(this,i)).name_=nE,n.client_=null,n.video_=e.video,n.audio_=e.audio,n.cameraId_=e.cameraId,n.cameraGroupId_="",n.facingMode_=e.facingMode,n.microphoneId_=e.microphoneId,n.microphoneGroupId_="",n.microphoneLabel_="",n.videoSource_=e.videoSource,n.audioSource_=e.audioSource,n.screen_=e.screen,n.screenAudio_=e.screenAudio,n.audioProfile_={echoCancellation:!0,autoGainControl:!0,noiseSuppression:!0,sampleRate:48e3,channelCount:1,bitrate:40},n.screenAudio_&&(n.audioProfile_.echoCancellation=!0,n.audioProfile_.autoGainControl=!1,n.audioProfile_.noiseSuppression=!1),yA(e.echoCancellation)&&(n.audioProfile_.echoCancellation=e.echoCancellation),yA(e.autoGainControl)&&(n.audioProfile_.autoGainControl=e.autoGainControl),yA(e.noiseSuppression)&&(n.audioProfile_.noiseSuppression=e.noiseSuppression),n.videoProfile_=Xq.get("480p_2"),n.screenProfile_=$q.get("1080p"),n.videoSetting_=null,n.muteState_={video:!1,audio:!1,auxVideo:!1},n.beautyStatus_=!1,n.prevAudioRecoverTime_=0,n.prevVideoRecoverTime_=0,n.isAudioRecovering_=!1,n.isVideoRecovering_=!1,n.initState(),n.canvas_=null,n.canvasInterval_=null,n.canvasTrack_=null,n.gain_={audioTrack:null,source:null,gainNode:null},n.captureVolume_=100,n.enableAutoRecoverCapture_=!!vA(e.enableAutoRecoverCapture)||e.enableAutoRecoverCapture,n.enableAutoRecoverOther_=!yA(e.enableAutoRecoverOther)||e.enableAutoRecoverOther,n.log_.info("stream created: ".concat(n.id_," autoRecover: ").concat(n.enableAutoRecoverCapture_)),n.isAIDenoiser=!1,n}return c(LocalStream,[{key:"initState",value:function(){this.isAddingTrack_=!1,this.isRemovingTrack_=!1,this.setIsReadyToPublish(!1),this.setPublishState(HI)}},{key:"installEvents",value:function(){S(l(LocalStream.prototype),"installEvents",this).call(this),jA.on(Ix,this.onVideoTrackStopped,this),jA.on(yx,this.onVideoTrackStopped,this),jA.on(wx,this.onAudioTrackStopped,this),jA.on(Ex,this.onAudioTrackStopped,this)}},{key:"uninstallEvents",value:function(){S(l(LocalStream.prototype),"uninstallEvents",this).call(this),jA.off(Ix,this.onVideoTrackStopped,this),jA.off(yx,this.onVideoTrackStopped,this),jA.off(wx,this.onAudioTrackStopped,this),jA.off(Ex,this.onAudioTrackStopped,this)}},{key:"initialize",value:function(){var e=this;return new Promise((function(t,n){if(RO())n(new kD({code:bD.INVALID_OPERATION,message:sA({key:dR})}));else{if(vA(e.audio_)){var i=new MediaStream;return vA(e.audioSource_)||(i.addTrack(e.audioSource_),e.updateAudioPlayingState(!0)),vA(e.videoSource_)||(i.addTrack(e.videoSource_),e.updateVideoPlayingState(!0)),e.setMediaStream(i),lM.logSuccessEvent({userId:e.client_?e.client_.getUserId():e.userId_,eventType:yI,kind:"custom"}),e.setIsReadyToPublish(!0),t()}e.screen_?(e.log_.info("initialize stream audio: "+e.audio_+" screenAudio: "+e.screenAudio_+" screen: "+e.screen_),Cq({audio:e.audio_,screenAudio:e.screenAudio_,microphoneId:e.microphoneId_,width:e.screenProfile_.width,height:e.screenProfile_.height,frameRate:e.screenProfile_.frameRate,sampleRate:e.audioProfile_.sampleRate,channelCount:e.audioProfile_.channelCount,autoGainControl:e.audioProfile_.autoGainControl,noiseSuppression:e.audioProfile_.noiseSuppression,echoCancellation:e.audioProfile_.echoCancellation}).then((function(n){e.setMediaStream(n),e.updateAudioPlayingState(e.audio_||e.screenAudio_),e.updateVideoPlayingState(!0);var i=e.getVideoTrack();return e.listenForScreenSharingStopped(i),e.setVideoContentHint(nT),e.updateDeviceIdInUse(),e.setIsReadyToPublish(!0),e.log_.info(JSON.stringify(i.getSettings())),lM.logSuccessEvent({userId:e.client_?e.client_.getUserId():e.userId_,eventType:yI,kind:"getDisplayMedia"}),t()})).catch((function(t){lM.logFailedEvent({userId:e.client_?e.client_.getUserId():e.userId_,eventType:yI,kind:"getDisplayMedia",error:t}),e.log_.error("getDisplayMedia error observed "+t),n(t instanceof kD?t:new kD({code:bD.INITIALIZE_FAILED,name:t.name,message:t.message}))}))):(jA.emit(vx,{stream:e,audio:e.audio_,video:e.video_}),e.log_.info("initialize stream audio: "+e.audio_+" video: "+e.video_),Eq({audio:e.audio_,video:e.video_,facingMode:e.facingMode_,cameraId:e.cameraId_,microphoneId:e.microphoneId_,width:e.videoProfile_.width,height:e.videoProfile_.height,frameRate:e.videoProfile_.frameRate,sampleRate:e.audioProfile_.sampleRate,channelCount:e.audioProfile_.channelCount,autoGainControl:e.audioProfile_.autoGainControl,noiseSuppression:e.audioProfile_.noiseSuppression,echoCancellation:e.audioProfile_.echoCancellation,useExact:!0,retryWhenExactFailed:!0}).then((function(n){return jA.emit(_x,{stream:e,audio:e.audio_,video:e.video_}),e.setMediaStream(n),n.getTracks().forEach((function(t){t.kind===Vk&&UO&&(e.videoSetting_=t.getSettings()),VO&&e.log_.info("".concat(t.kind," capabilities: ").concat(JSON.stringify(t.getCapabilities())))})),e.updateAudioPlayingState(e.audio_),e.updateVideoPlayingState(e.video_),e.updateDeviceIdInUse(),e.log_.info("gotStream hasAudio: "+e.hasAudio()+" hasVideo: "+e.hasVideo()),e.setIsReadyToPublish(!0),lM.logSuccessEvent({userId:e.client_?e.client_.getUserId():e.userId_,eventType:yI,kind:"getUserMedia"}),t()})).catch((function(t){jA.emit(gx,{stream:e,audio:e.audio_,video:e.video_,error:t}),lM.logFailedEvent({userId:e.client_?e.client_.getUserId():e.userId_,eventType:yI,kind:"getUserMedia",error:t}),e.log_.error("getUserMedia error observed "+t),n(t)})))}}))}},{key:"listenForScreenSharingStopped",value:function(e){var t=this;e.addEventListener("ended",(function(e){t.log_.info("screen sharing was stopped because the video track is ended"),t.emitter_.emit(GO)}))}},{key:"muteAudio",value:function(){var e=S(l(LocalStream.prototype),"muteAudio",this).call(this);return e&&(this.log_.info("localStream mute audio"),this.sendMutedFlag(Uk,!0)),e}},{key:"muteVideo",value:function(){var e=S(l(LocalStream.prototype),"muteVideo",this).call(this);return e&&(this.log_.info("localStream mute video"),this.sendMutedFlag(Vk,!0)),e}},{key:"unmuteAudio",value:function(){var e=S(l(LocalStream.prototype),"unmuteAudio",this).call(this);return e&&(this.log_.info("localStream unmute audio"),this.sendMutedFlag(Uk,!1)),e}},{key:"unmuteVideo",value:function(){var e=S(l(LocalStream.prototype),"unmuteVideo",this).call(this);return e&&(this.log_.info("localStream unmute video"),this.sendMutedFlag(Vk,!1)),e}},{key:"sendMutedFlag",value:function(e,t){this.setMuteState(e,t);var n=this.getConnection();if(n){n.sendMutedFlag(this.muteState_,this);var i=n.getUserId(),r=n.getTinyId(),a="".concat(t?qk:Kk," local ").concat(e," track");oM(i,{eventId:e===Uk?t?RD:AD:t?CD:xD,eventDesc:a,timestamp:i_(),userId:i,tinyId:r})}}},{key:"setMuteState",value:function(e,t){this.muteState_[e]=t,this.log_.info("set ".concat(e," muted state: [").concat(t?"mute":"unmute","]"))}},{key:"setAudioProfile",value:function(e){var n;"object"===i(e)?n=e:void 0===(n=Yq.get(e))&&(n=Yq.get("standard")),this.log_.info("setAudioProfile: "+JSON.stringify(n)),this.audioProfile_=t(t({},this.audioProfile_),n)}},{key:"setVideoProfile",value:(k=a(n().mark((function e(i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.connection_||EO()){e.next=2;break}throw new kD({code:bD.NOT_SUPPORTED,message:sA({key:hR})});case 2:if(hA(i)?a=t(t({},this.videoProfile_),i):_A(i)&&(a=Xq.get(i),vA(a)&&(a=Xq.get("480p_2"))),null!==(r=this.client_)&&void 0!==r&&r.get2k4kFlag()&&(1!==this.client_.get2k4kFlag()&&!this.screen_&&a.height*a.width>=3686400?(a.width=1920,a.height=1080,this.log_.warn(kE)):fq.handleFunctionState({fnName:"2K_4K"})),a&&a.width*a.height>921600&&eA&&(a.width=1280,a.height=720,this.log_.warn("reset to 1280 * 720 on iOS 13~14")),this.log_.info("setVideoProfile "+JSON.stringify(a)),!(o=this.getVideoTrack())){e.next=10;break}return e.next=10,o.applyConstraints(a);case 10:if(s=this.videoProfile_.bitrate!==a.bitrate,this.videoProfile_=a,!s||!this.connection_){e.next=16;break}return e.next=15,this.connection_.setBandwidth({bandwidth:a.bitrate,type:Vk,videoType:Bk});case 15:this.connection_.sendMediaSettings(this);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:"getVideoBitrate",value:function(){return this.screen_?this.screenProfile_.bitrate:this.videoProfile_.bitrate}},{key:"getAudioBitrate",value:function(){return this.audioProfile_.bitrate}},{key:"setScreenProfile",value:function(e){var t=e;_A(e)&&(t=$q.get(e)||$q.get("1080p")),this.log_.info("setScreenProfile "+JSON.stringify(e)),this.screenProfile_=t}},{key:"getVideoProfile",value:function(){return this.screen_?this.screenProfile_:this.videoProfile_}},{key:"getAudioProfile",value:function(){return this.audioProfile_}},{key:"setVideoContentHint",value:function(e){var t=this.getVideoTrack();t&&"contentHint"in t&&(this.log_.info("set video track contentHint to: "+e),t.contentHint=e,t.contentHint!==e&&this.log_.warn("Invalid video track contentHint: "+e))}},{key:"switchDevice",value:(b=a(n().mark((function e(t,i){var r,a,o,s,c,u,d,l,h,p,f,m,v,_,g,y,S,b;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mediaStream_&&this.cameraId_!==i&&this.facingMode_!==i){e.next=2;break}return e.abrupt("return");case 2:if(a=t===Vk,!(r=t===Uk)||i!==this.microphoneId_){e.next=11;break}if(i===hE){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,cN(this.microphoneGroupId_,this.microphoneLabel_);case 9:if(!e.sent){e.next=11;break}return e.abrupt("return");case 11:return this.setIsReadyToPublish(!1),this.log_.info("switchDevice "+t+" to: "+i),r&&(o=this.getAudioTrack(),s=this.getMicrophoneTrackMixed(),o&&o.stop(),s&&s.stop()),a&&((c=this.getVideoTrack())&&c.stop(),NC&&(u=this.getAudioTrack())&&(this.log_.info("stop audio track first in huawei env"),u.stop())),e.prev=15,e.next=18,Eq({audio:r||NC,video:a,facingMode:i===Wk||i===Jk?i:void 0,cameraId:a?i:this.cameraId_,microphoneId:r?i:this.microphoneId_,width:this.videoProfile_.width,height:this.videoProfile_.height,frameRate:this.videoProfile_.frameRate,sampleRate:this.audioProfile_.sampleRate,channelCount:this.audioProfile_.channelCount,useExact:!0,retryWhenExactFailed:!1});case 18:if(d=e.sent,l=null,!r){e.next=25;break}(h=d.getAudioTracks()[0])&&this.isAudioTrackMixed()?(p=this.getAudioTrack(),f=TQ.AudioMixerPlugin.getAudioTrackMap(),m=TQ.AudioMixerPlugin.mix({targetTrack:h,sourceList:f.get(p.id).sourceList,trackList:f.get(p.id).trackList}),l=m):l=h,e.next=34;break;case 25:if(!(l=d.getVideoTracks()[0])||!this.isVideoTrackBeautified()){e.next=30;break}return e.next=29,this.generateBeautyTrack(l);case 29:l=e.sent;case 30:if(!(v=d.getAudioTracks()[0])||!NC){e.next=34;break}return e.next=34,this.replaceTrack(v);case 34:return e.next=36,this.replaceTrack(l);case 36:this.updateDeviceIdInUse(),(_=this.getConnection())&&(g=_.getUserId(),y=_.getTinyId(),S=OD,b="switch camera",r&&(S=ND,b="switch microphone"),oM(g,{eventId:S,eventDesc:b,timestamp:i_(),userId:g,tinyId:y})),this.log_.info("switch ".concat(r?"microphone":"camera"," success ")),r&&(this.audio_=!0),a&&(this.video_=!0,i!==Jk&&i!==Wk||(this.facingMode_=i)),this.setIsReadyToPublish(!0),e.next=50;break;case 45:throw e.prev=45,e.t0=e.catch(15),this.log_.error(e.t0),r?this.recoverCapture({audio:!0,video:!1,microphoneId:this.microphoneId_}):this.recoverCapture({audio:!1,video:!0,cameraId:this.cameraId_,facingMode:this.facingMode_}),e.t0;case 50:case"end":return e.stop()}}),e,this,[[15,45]])}))),function(e,t){return b.apply(this,arguments)})},{key:"addTrack",value:(y=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t.kind===Vk&&UO&&(i=t.getSettings(),!this.videoSetting_||i.width===this.videoSetting_.width&&i.height===this.videoSetting_.height||this.log_.warn("video resolution of the track (".concat(i.width," x ").concat(i.height,") shall be kept the same as the previous: ").concat(this.videoSetting_.width," x ").concat(this.videoSetting_.height,". It may cause abnormal Cloud Recording."))),this.isAddingTrack_=!0,this.keepMuteState(t),this.mediaStream_.addTrack(t),!(r=this.getConnection())){e.next=11;break}return a=null,t.kind===Vk&&(ZC||YC)&&kA(t)&&(a=this.getCanvasTrack()),e.next=11,r.addTrack(a||t,this);case 11:t.kind===Uk?(this.audio_=!0,this.updateAudioPlayingState(!0),100!==this.captureVolume_&&this.setAudioCaptureVolume(this.captureVolume_)):(this.video_=!0,this.updateVideoPlayingState(!0)),this.isAddingTrack_=!1,e.next=20;break;case 15:throw e.prev=15,e.t0=e.catch(0),this.mediaStream_.removeTrack(t),this.isAddingTrack_=!1,e.t0;case 20:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return y.apply(this,arguments)})},{key:"removeTrack",value:(_=a(n().mark((function e(t){var i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.isRemovingTrack_=!0,!(i=this.getConnection())){e.next=17;break}if(t.kind!==Vk||!ZC&&!YC||!this.canvasTrack_){e.next=10;break}return e.next=7,i.removeTrack(this.canvasTrack_,this);case 7:this.clearCanvas(),e.next=17;break;case 10:if(t.kind!==Uk||!this.gain_.audioTrack){e.next=15;break}return e.next=13,i.removeTrack(this.gain_.audioTrack,this);case 13:e.next=17;break;case 15:return e.next=17,i.removeTrack(t,this);case 17:this.mediaStream_.removeTrack(t),t.kind===Uk?(this.audio_=!1,this.updateAudioPlayingState(!1),this.stopGainNode()):(this.video_=!1,this.updateVideoPlayingState(!1)),this.isRemovingTrack_=!1,e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.isRemovingTrack_=!1,e.t0;case 26:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e){return _.apply(this,arguments)})},{key:"replaceTrack",value:(v=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.kind===Vk&&UO&&(i=t.getSettings(),!this.videoSetting_||i.width===this.videoSetting_.width&&i.height===this.videoSetting_.height||this.log_.warn("video resolution of the track (".concat(i.width," x ").concat(i.height,") shall be kept the same as the previous: ").concat(this.videoSetting_.width," x ").concat(this.videoSetting_.height,". It may cause abnormal Cloud Recording."))),this.keepMuteState(t),r=this.mediaStream_,t.kind!==Uk){e.next=12;break}if(r.removeTrack(r.getAudioTracks()[0]),r.addTrack(t),S(l(LocalStream.prototype),"restartAudio",this).call(this),!this.gain_.gainNode){e.next=10;break}return this.reconnectGainNode(t),e.abrupt("return");case 10:e.next=15;break;case 12:r.removeTrack(r.getVideoTracks()[0]),r.addTrack(t),S(l(LocalStream.prototype),"restartVideo",this).call(this);case 15:if(!(a=this.getConnection())){e.next=21;break}if(t.kind!==Vk||!ZC&&!YC||!this.canvasTrack_){e.next=19;break}return e.abrupt("return");case 19:return e.next=21,a.replaceTrack(t,this);case 21:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"recoverCapture",value:(m=a(n().mark((function e(t){var i,r,a,o,s,c,u,d,l,h,p,f,m,v,_,g,y;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!this.mediaStream_||!this.enableAutoRecoverCapture_||t.audio&&!t.video&&this.isAudioRecovering_||t.video&&!t.audio&&this.isVideoRecovering_)){e.next=2;break}return e.abrupt("return");case 2:return t.audio&&(this.isAudioRecovering_=!0),t.video&&(this.isVideoRecovering_=!0),this.log_.warn("recoverCapture() trying "+JSON.stringify(t)),i=this.audio_&&t.audio,r=this.video_&&t.video,e.prev=7,e.next=10,TQ.getCameras();case 10:return a=e.sent,e.next=13,TQ.getMicrophones();case 13:if(o=e.sent,r&&0===a.length&&(r=!1,this.log_.warn("recoverCapture() video flag is true, but no camera detected, set video to false")),i&&0===o.length&&(i=!1,this.log_.warn("recoverCapture() audio flag is true, but no microphone detected, set audio to false")),i||r){e.next=21;break}return t.audio&&(this.isAudioRecovering_=!1),t.video&&(this.isVideoRecovering_=!1),this.log_.warn("recoverCapture() both audio and video are false, aborted"),e.abrupt("return");case 21:return s=t&&a.findIndex((function(e){return e.deviceId===t.cameraId}))>=0,c=t&&o.findIndex((function(e){return e.deviceId===t.microphoneId}))>=0,i&&(null===(u=this.getAudioTrack())||void 0===u||u.stop()),r&&(null===(d=this.getVideoTrack())||void 0===d||d.stop()),e.next=27,Eq({audio:i,video:r,cameraId:s?t.cameraId:void 0,microphoneId:c?t.microphoneId:void 0,facingMode:this.facingMode_,width:this.videoProfile_.width,height:this.videoProfile_.height,frameRate:this.videoProfile_.frameRate,sampleRate:this.audioProfile_.sampleRate,channelCount:this.audioProfile_.channelCount});case 27:l=e.sent,h=l.getTracks(),p=0;case 30:if(!(p<h.length)){e.next=57;break}if((f=h[p]).kind!==Uk||!this.isAudioTrackMixed()){e.next=43;break}if(m=this.getAudioTrack(),v=TQ.AudioMixerPlugin.getAudioTrackMap(),(_=v.get(m.id)).hasMicrophone){e.next=39;break}return f.stop(),e.abrupt("continue",54);case 39:return g=TQ.AudioMixerPlugin.mix({targetTrack:f,sourceList:_.sourceList,trackList:_.trackList}),e.next=42,this.replaceTrack(g);case 42:return e.abrupt("continue",54);case 43:if(f.kind!==Vk||!this.isVideoTrackBeautified()){e.next=50;break}return e.next=46,this.generateBeautyTrack(f);case 46:return y=e.sent,e.next=49,this.replaceTrack(y);case 49:return e.abrupt("continue",54);case 50:return e.next=52,this.replaceTrack(f);case 52:if("ended"!==f.readyState){e.next=54;break}throw new Error("new track is failed, muted ".concat(f.muted," readyState ").concat(f.readyState));case 54:p++,e.next=30;break;case 57:this.updateDeviceIdInUse(),lM.logSuccessEvent({userId:this.client_?this.client_.getUserId():this.userId_,eventType:kI}),t.audio&&(this.isAudioRecovering_=!1),t.video&&(this.isVideoRecovering_=!1),this.log_.warn("recoverCapture() successfully"),this.emitter_.emit(WO,{isCamera:t.video,isMicrophone:t.audio,cameraId:this.cameraId_,microphoneId:this.microphoneId_}),e.next=71;break;case 65:throw e.prev=65,e.t0=e.catch(7),t.audio&&(this.isAudioRecovering_=!1),t.video&&(this.isVideoRecovering_=!1),this.log_.warn("recoverCapture() failed, "+e.t0),e.t0;case 71:case"end":return e.stop()}}),e,this,[[7,65]])}))),function(e){return m.apply(this,arguments)})},{key:"updateDeviceIdInUse",value:function(){var e=this;if(!this.mediaStream_)return this.cameraId_="",this.cameraGroupId_="",this.microphoneId_="",void(this.microphoneGroupId_="");UO&&this.mediaStream_.getTracks().forEach((function(t){if(t.kind===Uk&&e.isAudioTrackMixed()){var n=e.getMicrophoneTrackMixed();if(n){var i=n.getSettings(),r=i.deviceId,a=i.groupId;r&&(e.microphoneId_=r,e.microphoneGroupId_=a,e.microphoneLabel_=n.label)}}else if(t.kind===Vk&&e.isVideoTrackBeautified()){var o=e.getBeautyOriginTrack();if(o){var s=o.getSettings(),c=s.deviceId,u=s.groupId;c&&(e.cameraId_=c,e.cameraGroupId_=u)}}else{var d=t.getSettings(),l=d.deviceId,h=d.groupId;l&&(t.kind===Uk?(e.microphoneId_=l,e.microphoneGroupId_=h,e.microphoneLabel_=t.label):t.kind!==Vk||e.screen_||(e.cameraId_=l,e.cameraGroupId_=h))}}));var t=this.mediaStream_.getAudioTracks(),n=this.mediaStream_.getVideoTracks();t&&0===t.length&&(this.microphoneId_="",this.microphoneGroupId_=""),n&&0===n.length&&(this.cameraId_="",this.cameraGroupId_="")}},{key:"isAudioTrackMixed",value:function(){if(TQ.AudioMixerPlugin){var e=TQ.AudioMixerPlugin.getAudioTrackMap(),t=this.getAudioTrack();if(e&&t&&e.has(t.id))return!0}return!1}},{key:"getMicrophoneTrackMixed",value:function(){if(TQ.AudioMixerPlugin){var e=TQ.AudioMixerPlugin.getAudioTrackMap(),t=this.getAudioTrack();if(e&&t&&e.has(t.id)){var n=e.get(t.id);return n.hasMicrophone?n.microphoneTrack:null}}return null}},{key:"isVideoTrackBeautified",value:function(){if(TQ.beautyTrackMap){var e=TQ.beautyTrackMap,t=this.getVideoTrack();if(t&&e.has(t.id))return!0}return!1}},{key:"getBeautyOriginTrack",value:function(){if(TQ.beautyTrackMap){var e=TQ.beautyTrackMap,t=this.getVideoTrack();if(t&&e.has(t.id)){var n=e.get(t.id);if(n.originTrack)return n.originTrack}}return null}},{key:"generateBeautyTrack",value:(f=a(n().mark((function e(t){var i,r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null,r=this.getVideoTrack(),a=TQ.beautyTrackMap.get(r.id),o=a.param,a.type){e.next=8;break}i=a.pluginInstance.generateBeautyTrack(t),e.next=22;break;case 8:e.t0=a.type,e.next="beauty"===e.t0?11:"virtual"===e.t0?13:"mixed"===e.t0?17:21;break;case 11:return i=a.pluginInstance.generateBeautyTrack(t),e.abrupt("break",22);case 13:return e.next=15,a.pluginInstance.generateVirtualTrack({videoTrack:t,type:o.type,img:o.img});case 15:case 19:return i=e.sent,e.abrupt("break",22);case 17:return e.next=19,a.pluginInstance.generateMixedTrack({videoTrack:t,type:o.type,img:o.img});case 21:return e.abrupt("break",22);case 22:return a.pluginInstance.deleteSource(r.id),this.log_.info("regenerate beauty track, track id = ".concat(t.id)),e.abrupt("return",i);case 25:case"end":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{key:"getScreen",value:function(){return this.screen_}},{key:"hasScreenTrack",value:function(){if(this.screen_)return!0;var e=this.getVideoTrack();return!!e&&(e.contentHint===nT||e.contentHint===iT)}},{key:"getVideo",value:function(){return this.video_}},{key:"getAudio",value:function(){return this.audio_}},{key:"getCameraId",value:function(){return this.cameraId_}},{key:"getMicrophoneId",value:function(){return this.microphoneId_}},{key:"getMicrophoneGroupId",value:function(){return this.microphoneGroupId_}},{key:"getIsReadyToPublish",value:function(){return this.isReadyToPublish_}},{key:"setIsReadyToPublish",value:function(e){this.isReadyToPublish_=e}},{key:"setPublishState",value:function(e){this.publishState_=e}},{key:"setBeautyStatus",value:function(e){this.beautyStatus_=!!e}},{key:"getBeautyStatus",value:function(){return this.beautyStatus_}},{key:"syncMuteState",value:function(){var e=this.getAudioTrack(),t=this.getVideoTrack();if(e){var n=!e.enabled;this.setMuteState(Uk,n)}if(t){var i=!t.enabled;this.setMuteState(Vk,i)}this.connection_&&this.connection_.sendMutedFlag(this.muteState_,this)}},{key:"keepMuteState",value:function(e){e instanceof MediaStreamTrack&&this.muteState_[e.kind]&&(e.enabled=!1,this.log_.warn("prev ".concat(e.kind," track is muted, keep mute state")))}},{key:"onVideoTrackStopped",value:(p=a(n().mark((function e(t){var i,r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.stream,r=t.type,i===this&&this.video_&&this.cameraId_&&sN(this.getVideoTrack())&&!this.isVideoRecovering_&&(r!==qk||!RC||!KC)){e.next=3;break}return e.abrupt("return");case 3:if(!(Date.now()-this.prevVideoRecoverTime_<_E)){e.next=6;break}return setTimeout((function(){return a.onVideoTrackStopped({stream:i,type:r})}),_E),e.abrupt("return");case 6:r===qk?setTimeout((function(){var e=a.getVideoTrack();null!=e&&e.muted&&"visible"===document.visibilityState&&a.recoverVideoCapture(r)}),5e3):this.recoverVideoCapture(r);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"onAudioTrackStopped",value:(h=a(n().mark((function e(t){var i,r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.stream,r=t.type,!(i!==this||!this.audio_||!this.microphoneId_||this.isAudioRecovering_||r===qk&&RC&&KC)){e.next=3;break}return e.abrupt("return");case 3:if(!(Date.now()-this.prevAudioRecoverTime_<_E)){e.next=6;break}return setTimeout((function(){return a.onAudioTrackStopped({stream:i,type:r})}),_E),e.abrupt("return");case 6:r===qk?setTimeout((function(){var e=a.getAudioTrack();null!=e&&e.muted&&"visible"===document.visibilityState&&a.recoverAudioCapture(r)}),5e3):this.recoverAudioCapture(r);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"recoverAudioCapture",value:(u=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.prevAudioRecoverTime_=Date.now(),lM.uploadEvent({log:"stat-local-audio-".concat(t),userId:this.userId_}),e.t0=this,e.next=5,this.getRecoverCaptureDeviceId(!1);case 5:e.t1=e.sent,e.t2={audio:!0,video:!1,microphoneId:e.t1},e.t0.recoverCapture.call(e.t0,e.t2);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"recoverVideoCapture",value:(s=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.prevVideoRecoverTime_=Date.now(),lM.uploadEvent({log:"stat-local-video-".concat(t),userId:this.userId_}),e.t0=this,e.next=5,this.getRecoverCaptureDeviceId(!0);case 5:e.t1=e.sent,e.t2={audio:!1,video:!0,cameraId:e.t1},e.t0.recoverCapture.call(e.t0,e.t2);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"getRecoverCaptureDeviceId",value:(r=a(n().mark((function e(){var t,i,r,a,o=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(o.length>0&&void 0!==o[0])||o[0],!(i=t?this.cameraId_:this.microphoneId_)||!this.enableAutoRecoverOther_){e.next=17;break}if(Zq.has(i)?Zq.set(i,Zq.get(i)+1):Zq.set(i,1),!((r=Zq.get(i))>=3)){e.next=17;break}if(!t){e.next=12;break}return e.next=9,TQ.getCameras();case 9:e.t0=e.sent.find((function(e){return!Zq.has(e.deviceId)})),e.next=15;break;case 12:return e.next=14,TQ.getMicrophones();case 14:e.t0=e.sent.find((function(e){return!Zq.has(e.deviceId)}));case 15:(a=e.t0)&&(this.log_.warn("".concat(t?"camera":"mic"," ").concat(i," capture fail ").concat(r," times, change new ").concat(a.deviceId)),i=a.deviceId);case 17:return e.abrupt("return",i);case 18:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"setAudioVolume",value:function(e){S(l(LocalStream.prototype),"setAudioVolume",this).call(this,e)}},{key:"clearCanvas",value:function(){this.canvasInterval_&&(iO.clearTask(this.canvasInterval_),this.canvasInterval_=null,this.canvas_=null,this.canvasTrack_=null)}},{key:"getCanvasTrack",value:function(){var e=this;if(this.canvasTrack_)return this.canvasTrack_;this.log_.info("gen canvas track");var t=this.getVideoTrack().getSettings(),n=t.width,i=t.height,r=t.frameRate;this.canvas_=document.createElement("canvas");var a=this.canvas_.getContext("2d");this.canvas_.width=n,this.canvas_.height=i,this.canvasInterval_=iO.run(yE,(function(){if(e.hasVideo()){var t=e.getVideoTrack().getSettings();t.width===e.canvas_.width&&t.height===e.canvas_.height||(e.canvas_.width=t.width,e.canvas_.height=t.height)}e.videoPlayer_&&e.videoPlayer_.element_&&a.drawImage(e.videoPlayer_.element_,0,0,e.canvas_.width,e.canvas_.height)}),{fps:Math.max(15,r)});var o=this.canvas_.captureStream();return this.canvasTrack_=o.getVideoTracks()[0],this.canvasTrack_}},{key:"setClient",value:function(e,t){e&&(this.log_.setUserId(e.getUserId()),this.log_.setSdkAppId(e.getSDKAppId()),t||this.syncMuteState()),this.client_=e}},{key:"setAudioCaptureVolume",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;if(!this.hasAudio()||t<0||!IO())return!1;if(this.captureVolume_===t)return!0;this.captureVolume_=t,this.log_.info("setCaptureVolume "+t),t/=100;var n=DA();if(this.gain_.gainNode)this.gain_.gainNode.gain.value=t;else{var i,r=new MediaStream;r.addTrack(this.getAudioTrack());var a=n.createMediaStreamDestination(),o=n.createMediaStreamSource(r),s=n.createGain();s.gain.value=t,o.connect(s),s.connect(a);var c=a.stream.getAudioTracks()[0],u=function(t){return e.log_.info("gained audio track ".concat(t))};c.onmute=function(){return u("muted")},c.onunmute=function(){return u("unmuted")},c.onended=function(){return u("ended")},this.gain_={source:o,audioTrack:c,gainNode:s},null===(i=this.connection_)||void 0===i||i.replaceTrack(c),S(l(LocalStream.prototype),"restartAudio",this).call(this)}return!0}},{key:"getGainedTrack",value:function(){return this.gain_.audioTrack}},{key:"reconnectGainNode",value:function(e){this.log_.warn("reconnect gain node");var t=new MediaStream;t.addTrack(e);var n=DA().createMediaStreamSource(t);n.connect(this.gain_.gainNode),this.gain_.source.disconnect(),this.gain_.source=n}},{key:"stopGainNode",value:function(){var e=this.gain_,t=e.audioTrack,n=e.source,i=e.gainNode;i&&(n.disconnect(),i.disconnect(),t.onmute=null,t.onunmute=null,t.onended=null,t.stop(),this.gain_={source:null,gainNode:null,audioTrack:null}),this.captureVolume_=100}},{key:"close",value:function(){this.setIsReadyToPublish(!1),this.stopGainNode(),S(l(LocalStream.prototype),"close",this).call(this)}},{key:"setIsAIDenoiser",value:function(e){this.isAIDenoiser=e}}]),LocalStream}(vq),C(Hq.prototype,"setAudioProfile",[Pq],Object.getOwnPropertyDescriptor(Hq.prototype,"setAudioProfile"),Hq.prototype),C(Hq.prototype,"setVideoProfile",[Dq],Object.getOwnPropertyDescriptor(Hq.prototype,"setVideoProfile"),Hq.prototype),C(Hq.prototype,"setScreenProfile",[Mq],Object.getOwnPropertyDescriptor(Hq.prototype,"setScreenProfile"),Hq.prototype),C(Hq.prototype,"setVideoContentHint",[Oq],Object.getOwnPropertyDescriptor(Hq.prototype,"setVideoContentHint"),Hq.prototype),C(Hq.prototype,"switchDevice",[Nq],Object.getOwnPropertyDescriptor(Hq.prototype,"switchDevice"),Hq.prototype),C(Hq.prototype,"addTrack",[Lq],Object.getOwnPropertyDescriptor(Hq.prototype,"addTrack"),Hq.prototype),C(Hq.prototype,"removeTrack",[Uq],Object.getOwnPropertyDescriptor(Hq.prototype,"removeTrack"),Hq.prototype),C(Hq.prototype,"replaceTrack",[Vq],Object.getOwnPropertyDescriptor(Hq.prototype,"replaceTrack"),Hq.prototype),C(Hq.prototype,"recoverCapture",[Fq],Object.getOwnPropertyDescriptor(Hq.prototype,"recoverCapture"),Hq.prototype),C(Hq.prototype,"setAudioCaptureVolume",[jq,Bq],Object.getOwnPropertyDescriptor(Hq.prototype,"setAudioCaptureVolume"),Hq.prototype),Hq),tK={voiceActivityDetection:!1},nK=(Gq=aq({retries:1,timeout:0,onRetrying:function(e){this.log_.warn("connection timeout, retrying [".concat(e,"]"))},onError:function(e,t,n){e.message.includes("timeout")?(this.reset(),this.initialize(),t()):n(e)}}),zq=function(e){d(P,e);var i,r,s,u,h,p,f,m,v,_,y,b,k,T,I,E,w,R,C,A,x=g(P);function P(e){var t;return o(this,P),(t=x.call(this,e)).localStream_=null,t.exchangeSDPTimeout_=-1,t.localAuxStream_=null,t.publishingStream_=null,t.isPublishingAuxStream_=!1,t.smallGenerator_=null,t.isSDPExchanging_=!1,t.ssrc_={audio:0,video:0,small:0,auxiliary:0},t.mediaSettings_={videoCodec:"",videoWidth:0,videoHeight:0,videoBps:0,videoFps:0,audioCodec:"opus",audioFs:0,audioChannel:0,audioBps:0,smallVideoWidth:0,smallVideoHeight:0,smallVideoFps:0,smallVideoBps:0,auxVideoWidth:0,auxVideoHeight:0,auxVideoFps:0,auxVideoBps:0},t.mixedAudioTrack_=null,t}return c(P,[{key:"isMainStreamPublished",get:function(){return!!this.localStream_}},{key:"isAuxStreamPublished",get:function(){return!!this.localAuxStream_}},{key:"publishState",get:function(){var e=this,t={audio:!1,bigVideo:!1,smallVideo:!1,auxVideo:!1};if(this.peerConnection_){var n,i,r,a,o=this.peerConnection_.getSenders();if(o)if(kO())t.audio=!(null===(n=o[0])||void 0===n||!n.track),t.bigVideo=!(null===(i=o[1])||void 0===i||!i.track),t.smallVideo=!(null===(r=o[2])||void 0===r||!r.track),t.auxVideo=!(null===(a=o[3])||void 0===a||!a.track);else o.forEach((function(n){n.track&&(n.track.kind===Uk?t.audio=!0:(t.bigVideo=!0,e.smallGenerator_&&(t.smallVideo=!0)))}))}return t}},{key:"initialize",value:function(){S(l(P.prototype),"initialize",this).call(this),this.installEvents()}},{key:"reset",value:function(){this.isReconnecting_&&this.stopReconnection(),this.closePeerConnection(),this.uninstallEvents(),this.clearExchangeSDPTimeout(),this.localStream_&&this.localStream_.clearCanvas()}},{key:"close",value:function(){S(l(P.prototype),"close",this).call(this),this.reset(),this.emitConnectionStateChangedEvent(zT),this.smallGenerator_&&(this.smallGenerator_.destroy(),this.smallGenerator_=null)}},{key:"installEvents",value:function(){this.emitter_.on(jO.ERROR,this.handleError,this),this.emitter_.on(jO.CONNECTION_STATE_CHANGED,this.handleConnectionStateChange,this)}},{key:"uninstallEvents",value:function(){this.emitter_.off(jO.ERROR,this.handleError,this),this.emitter_.off(jO.CONNECTION_STATE_CHANGED,this.handleConnectionStateChange,this)}},{key:"publish",value:(A=a(n().mark((function e(t,i){var r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.publishingStream_=t,this.isPublishingAuxStream_=i,o=t.getVideoTrack(),s=null,!o||i||!this.client_.getIsEnableSmallStream()){e.next=9;break}return this.smallGenerator_=new kq(t),e.next=8,this.smallGenerator_.initialize();case 8:s=this.smallGenerator_.generateSmallVideoTrack(this.client_.smallStreamConfig_);case 9:if(null===(r=this.client_)||void 0===r||!r.get2k4kFlag()){e.next=18;break}if(c=1===this.client_.get2k4kFlag(),u=t.getVideoProfile(),c||t.getScreen()||!(u.height*u.width>=3686400)){e.next=18;break}return u.width=1920,u.height=1080,this.log_.warn(kE),e.next=18,t.setVideoProfile(u);case 18:if(this.updateMediaSettings(t,i),!TO()){e.next=24;break}return e.next=22,this.publishByTransceiver(t,s,i);case 22:e.next=26;break;case 24:return e.next=26,this.publishByAddTrack(t,s);case 26:return this.publishingStream_=null,this.isPublishingAuxStream_=!1,i?this.localAuxStream_=t:this.localStream_=t,null===(a=this.sei_)||void 0===a||a.handleEncodedStreams(),e.abrupt("return",t);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"publishByTransceiver",value:(C=a(n().mark((function e(t,i,r){var a,o,s,c,u,d,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.log_.info("publish by transceiver"),a=t.getMediaStream(),o=t.getAudioTrack(),s=t.getVideoTrack(),c=null,(ZC||YC)&&kA(s)&&(c=t.getCanvasTrack()),0!==(u=this.peerConnection_.getTransceivers()).length){e.next=16;break}return this.peerConnection_.addTransceiver(o||Uk,{direction:mT,streams:[a]}),this.peerConnection_.addTransceiver(r?Vk:c||s||Vk,{direction:mT,streams:[a]}),this.peerConnection_.addTransceiver(i||Vk,{direction:mT,streams:[a]}),this.peerConnection_.addTransceiver(r?c||s:Vk,{direction:mT,streams:[a]}),e.next=14,this.connect();case 14:e.next=46;break;case 16:if(d=[],!o){e.next=29;break}if(!u[0].sender.track){e.next=24;break}return this.mixAudioTrack(u[0].sender.track,o),e.next=22,u[0].sender.replaceTrack(this.mixedAudioTrack_);case 22:e.next=27;break;case 24:return e.next=26,u[0].sender.replaceTrack(o);case 26:d.push(0);case 27:return e.next=29,this.setBandwidth({bandwidth:t.getAudioBitrate(),type:Uk});case 29:if(!s){e.next=42;break}return l=r?3:1,e.next=33,u[l].sender.replaceTrack(c||s);case 33:return e.next=35,this.setBandwidth({bandwidth:t.getVideoBitrate(),type:Vk,videoType:r?Hk:Bk});case 35:if(d.push(l),!i){e.next=42;break}return e.next=39,u[2].sender.replaceTrack(i);case 39:return e.next=41,this.setBandwidth({bandwidth:this.client_.smallStreamConfig.bitrate,type:Vk,videoType:jk});case 41:d.push(2);case 42:return e.next=44,this.setTransceiverDirection(mT,d);case 44:return e.next=46,this.doPublishChange();case 46:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return C.apply(this,arguments)})},{key:"publishByAddTrack",value:(R=a(n().mark((function e(t,i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.log_.info("publish by addtrack"),r=t.getMediaStream(),a=t.getAudioTrack(),o=t.getVideoTrack(),a&&this.peerConnection_.addTrack(a,r),o&&(this.peerConnection_.addTrack(o,r),i&&((s=new MediaStream).addTrack(i),this.peerConnection_.addTrack(i,s))),e.next=8,this.connect();case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"unpublish",value:(w=a(n().mark((function e(i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(kO()){e.next=2;break}return e.abrupt("return",this.doUnpublish());case 2:if(r=i.getAudioTrack(),a=i===this.localAuxStream_,o=this.peerConnection_.getSenders(),s=[],!r){e.next=17;break}if(!this.mixedAudioTrack_){e.next=14;break}return this.log_.info("has mixed audioTrack, use another audioTrack"),e.next=11,o[0].replaceTrack(a?this.localStream_.getAudioTrack():this.localAuxStream_.getAudioTrack());case 11:this.destroyMixedAudioTrack(),e.next=17;break;case 14:return e.next=16,o[0].replaceTrack(null);case 16:s.push(0);case 17:if(!a){e.next=25;break}return e.next=20,o[3].replaceTrack(null);case 20:this.localAuxStream_=null,this.mediaSettings_=t(t({},this.mediaSettings_),{},{auxVideoBps:0,auxVideoFps:0,auxVideoWidth:0,auxVideoHeight:0}),s.push(3),e.next=32;break;case 25:return e.next=27,o[1].replaceTrack(null);case 27:return e.next=29,o[2].replaceTrack(null);case 29:this.localStream_=null,this.mediaSettings_=t(t({},this.mediaSettings_),{},{videoWidth:0,videoHeight:0,videoBps:0,videoFps:0,audioFs:0,audioChannel:0,audioBps:0,smallVideoWidth:0,smallVideoHeight:0,smallVideoFps:0,smallVideoBps:0}),s.push(1,2);case 32:if(!this.localStream_&&!this.localAuxStream_){e.next=39;break}return e.next=35,this.setTransceiverDirection(fT,s);case 35:return e.next=37,this.doPublishChange();case 37:e.next=41;break;case 39:return e.next=41,this.doUnpublish();case 41:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"doPublishChange",value:(E=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={state:this.publishState,constraintConfig:this.mediaSettings_},e.next=3,this.signalChannel_.sendWaitForResponse({command:nD,data:t,responseCommand:eD.PUBLISH_STATE_CHANGE_RESULT});case 3:case"end":return e.stop()}}),e,this)}))),function(){return E.apply(this,arguments)})},{key:"doUnpublish",value:function(){var e=this;return this.signalChannel_.sendWaitForResponse({command:cD,commandDesc:"unpublish",responseCommand:eD.UNPUBLISH_RESULT}).then((function(){e.close()})).catch((function(){e.close()}))}},{key:"updateMediaSettings",value:function(e,t){var n=this;this.localAuxStream_&&e===this.localAuxStream_&&(t=!0);var i=this.client_.getSystemResult().detail,r=i.isH264EncodeSupported,a=i.isVp8EncodeSupported;(r?this.mediaSettings_.videoCodec="H264":a&&(this.mediaSettings_.videoCodec="VP8"),UO)?e.getMediaStream().getTracks().forEach((function(i){var r=i.getSettings();if(i.kind===Uk){var a=1;r.channelCount&&(a=r.channelCount),n.mediaSettings_.audioChannel=a,n.mediaSettings_.audioBps=1e3*e.getAudioBitrate(),n.mediaSettings_.audioFs=r.sampleRate}else if(i.kind===Vk){if(t)return n.mediaSettings_.auxVideoWidth=r.width,n.mediaSettings_.auxVideoHeight=r.height,n.mediaSettings_.auxVideoFps=r.frameRate,void(n.mediaSettings_.auxVideoBps=1e3*e.getVideoBitrate());n.client_.getIsEnableSmallStream()&&(n.mediaSettings_.smallVideoWidth=n.client_.smallStreamConfig.width,n.mediaSettings_.smallVideoHeight=n.client_.smallStreamConfig.height,n.mediaSettings_.smallVideoFps=n.client_.smallStreamConfig.frameRate,n.mediaSettings_.smallVideoBps=1e3*n.client_.smallStreamConfig.bitrate),n.mediaSettings_.videoWidth=r.width,n.mediaSettings_.videoHeight=r.height,n.mediaSettings_.videoFps=r.frameRate,n.mediaSettings_.videoBps=1e3*e.getVideoBitrate()}})):this.updateMediaSettingsFromProfile(e);this.log_.info("updateMediaSettings: "+JSON.stringify(this.mediaSettings_))}},{key:"updateMediaSettingsFromProfile",value:function(e){if(e){if(e.hasAudio()){var t=e.getAudioProfile();this.mediaSettings_.audioChannel=t.channelCount,this.mediaSettings_.audioBps=1e3*t.bitrate,this.mediaSettings_.audioFs=t.sampleRate}if(e.hasVideo()){var n=e.getVideoProfile();this.mediaSettings_.videoWidth=n.width,this.mediaSettings_.videoHeight=n.height,this.mediaSettings_.videoFps=n.frameRate,this.mediaSettings_.videoBps=1e3*n.bitrate}}}},{key:"sendMediaSettings",value:function(e){var t=this;this.updateMediaSettings(e),this.signalChannel_.sendWaitForResponse({command:SD,data:this.mediaSettings_,responseCommand:eD.UPDATE_CONSTRAINT_CONFIG_RES}).then((function(e){0!==e.data.code&&t.log_.warn(e.data.message)})).catch(this.log_.warn)}},{key:"addTrack",value:(I=a(n().mark((function e(t,i){var r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.peerConnection_){e.next=2;break}return e.abrupt("return");case 2:if(a=i===this.localAuxStream_,this.log_.info("is adding ".concat(t.kind," track to current published local ").concat(a?Hk:rT," stream")),null===(r=this.sei_)||void 0===r||r.handleEncodedStreams(),!kO()){e.next=10;break}return e.next=8,this.addTrackByTransceiver(t,i);case 8:e.next=12;break;case 10:return e.next=12,this.addTrackBySender(t);case 12:oM(this.userId_,{eventId:t.kind===Uk?ID:TD,eventDesc:"add ".concat(t.kind," track to current published stream"),timestamp:i_(),userId:this.userId_,tinyId:this.tinyId_});case 13:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"addTrackByTransceiver",value:(T=a(n().mark((function e(t,i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i===this.localAuxStream_,a=this.peerConnection_.getTransceivers(),t.kind!==Uk){e.next=13;break}if(!a[0].sender.track){e.next=9;break}return this.mixAudioTrack(a[0].sender.track,t),e.next=7,a[0].sender.replaceTrack(this.mixedAudioTrack_);case 7:e.next=11;break;case 9:return e.next=11,a[0].sender.replaceTrack(t);case 11:e.next=26;break;case 13:return o=r?3:1,e.next=16,a[o].sender.replaceTrack(t);case 16:if(1!==o||!this.client_.getIsEnableSmallStream()){e.next=23;break}return this.smallGenerator_=new kq(this.localStream_),e.next=20,this.smallGenerator_.initialize();case 20:return s=this.smallGenerator_.generateSmallVideoTrack(this.client_.smallStreamConfig_),e.next=23,a[2].sender.replaceTrack(s);case 23:if(a[o].direction!==fT){e.next=26;break}return e.next=26,this.setTransceiverDirection(mT,[o]);case 26:return this.updateMediaSettings(i,r),e.next=29,this.doPublishChange();case 29:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"addTrackBySender",value:(k=a(n().mark((function e(t){var i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(kO()&&this.peerConnection_.getTransceivers().findIndex((function(e){return"stopped"===e.direction}))>=0)){e.next=4;break}return this.log_.warn("transceiver is stopping, negotiate sdp first"),e.next=4,this.updateOffer(jI.REMOVE,t);case 4:if(!(i=this.peerConnection_.getSenders().find((function(e){return e.track&&e.track.kind===t.kind})))){e.next=11;break}return this.log_.warn("sender already exists, remove sender first"),r=i.track,this.removeSender(i),e.next=11,this.updateOffer(jI.REMOVE,r);case 11:if(a=this.localStream_.getMediaStream(),this.peerConnection_.addTrack(t,a),t.kind!==Vk||!this.client_.getIsEnableSmallStream()){e.next=21;break}return this.smallGenerator_=new kq(this.localStream_),e.next=17,this.smallGenerator_.initialize();case 17:o=this.smallGenerator_.generateSmallVideoTrack(this.client_.smallStreamConfig_),(s=new MediaStream).addTrack(o),this.peerConnection_.addTrack(o,s);case 21:return e.next=23,this.updateOffer(jI.ADD,t);case 23:case"end":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:"isNeedToResetOfferOrder",value:function(){if(this.sdpSemantics_===PI||!this.peerConnection_||!this.peerConnection_.localDescription)return!1;for(var e=this.peerConnection_.localDescription.sdp,t=xM(e),n=0;n<t.media.length;n++)if(0===t.media[n].mid&&t.media[n].type===Vk)return!0;return!1}},{key:"removeSender",value:function(e){var t=null;kO()&&(t=this.peerConnection_.getTransceivers().find((function(t){return t.sender&&t.sender.track===e.track}))),this.peerConnection_.removeTrack(e),t&&mA(t.stop)&&(this.log_.info("stop transceiver"),t.stop())}},{key:"removeTrack",value:(b=a(n().mark((function e(t,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.peerConnection_){e.next=2;break}return e.abrupt("return");case 2:if(this.log_.info("is removing ".concat(t.kind," track from current published local ").concat(i===this.localAuxStream_?Hk:rT," stream")),!kO()){e.next=8;break}return e.next=6,this.removeTrackByTransceiver(t,i);case 6:e.next=10;break;case 8:return e.next=10,this.removeTrackBySender(t);case 10:oM(this.userId_,{eventId:t.kind===Uk?wD:ED,eventDesc:"remove ".concat(t.kind," track from current published stream"),timestamp:i_(),userId:this.userId_,tinyId:this.tinyId_});case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"removeTrackByTransceiver",value:(y=a(n().mark((function e(t,i){var r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i===this.localAuxStream_,a=this.peerConnection_.getTransceivers(),t.kind!==Uk){e.next=13;break}if(!this.mixedAudioTrack_){e.next=9;break}return e.next=6,a[0].sender.replaceTrack(r?this.localStream_.getAudioTrack():this.localAuxStream_.getAudioTrack());case 6:this.destroyMixedAudioTrack(),e.next=11;break;case 9:return e.next=11,a[0].sender.replaceTrack(null);case 11:e.next=23;break;case 13:return o=r?3:1,e.next=16,a[o].sender.replaceTrack(null);case 16:if(1!==o||!this.smallGenerator_){e.next=21;break}return this.smallGenerator_.destroy(),this.smallGenerator_=null,e.next=21,a[2].sender.replaceTrack(null);case 21:return e.next=23,this.setTransceiverDirection(fT,[o]);case 23:return this.updateMediaSettings(i,r),e.next=26,this.doPublishChange();case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"setTransceiverDirection",value:(_=a(n().mark((function e(t,i){var r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(tC){e.next=2;break}return e.abrupt("return");case 2:if(r=!1,a=!1,this.log_.info("setting transceiver ".concat(i.join(",")," direction to ").concat(t)),o=this.peerConnection_.getTransceivers(),i.forEach((function(e){o[e].direction!==t&&(o[e].direction=t,r=!0)})),!r){e.next=14;break}return this.log_.info("updating offer"),e.next=11,this.peerConnection_.createOffer();case 11:return s=e.sent,e.next=14,this.peerConnection_.setLocalDescription(s);case 14:if(c=-1,u=this.peerConnection_.remoteDescription.sdp.split("\r\n").map((function(e){if(e.match(new RegExp("a=(".concat(fT,"|").concat(vT,"|").concat(mT,")")))&&c++,i.includes(c)){if(t===fT&&e.includes("a=".concat(vT)))return a=!0,"a=".concat(t);if(t===mT&&e.includes("a=".concat(fT)))return a=!0,"a=".concat(vT)}return e})).join("\r\n"),!a){e.next=20;break}return this.log_.info("updating answer"),e.next=20,this.peerConnection_.setRemoteDescription({type:"answer",sdp:u});case 20:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"removeTrackBySender",value:(v=a(n().mark((function e(t){var i,r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.kind!==Vk||!this.isNeedToResetOfferOrder()){e.next=7;break}return this.reset(),this.initialize(),null===(i=this.localStream_.getMediaStream())||void 0===i||i.removeTrack(t),e.next=6,this.publish(this.localStream_);case 6:return e.abrupt("return");case 7:return(r=this.peerConnection_.getSenders().find((function(e){return e.track===t})))&&(this.removeSender(r),t.kind===Vk&&this.smallGenerator_&&(this.smallGenerator_.destroy(),this.smallGenerator_=null,this.peerConnection_.getSenders().forEach((function(e){e.track&&e.track.kind===Vk&&a.removeSender(e)})))),e.next=11,this.updateOffer(jI.REMOVE,t);case 11:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"replaceTrack",value:(m=a(n().mark((function e(t,i){var r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a=null===(r=this.peerConnection_)||void 0===r?void 0:r.getSenders())&&0!==a.length){e.next=3;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Pw})});case 3:if(o=i===this.localAuxStream_,this.log_.info("is replacing ".concat(t.kind," track to current published local ").concat(o?Hk:rT," stream")),t.kind!==Uk||!a[0]){e.next=16;break}if(!(this.mixedAudioTrack_&&null!==(s=this.localStream_)&&void 0!==s&&s.hasAudio()&&null!==(c=this.localAuxStream_)&&void 0!==c&&c.hasAudio())){e.next=14;break}return this.destroyMixedAudioTrack(),u=o?this.localStream_.getAudioTrack():this.localAuxStream_.getAudioTrack(),this.mixAudioTrack(t,u),e.next=12,a[0].replaceTrack(this.mixedAudioTrack_);case 12:e.next=16;break;case 14:return e.next=16,a[0].replaceTrack(t);case 16:if(t.kind!==Vk){e.next=32;break}if(i!==this.localStream_||!a[1]){e.next=29;break}return e.next=20,a[1].replaceTrack(t);case 20:if(!this.smallGenerator_||!a[2]){e.next=29;break}return this.log_.info("replacing smallVideo"),this.smallGenerator_.destroy(),this.smallGenerator_=new kq(this.localStream_),e.next=26,this.smallGenerator_.initialize();case 26:return d=this.smallGenerator_.generateSmallVideoTrack(this.client_.smallStreamConfig_),e.next=29,a[2].replaceTrack(d);case 29:if(i!==this.localAuxStream_||!a[3]){e.next=32;break}return e.next=32,a[3].replaceTrack(t);case 32:oM(this.userId_,{eventId:t.kind===Uk?UD:LD,eventDesc:"replace ".concat(t.kind," track from current published stream"),timestamp:i_(),userId:this.userId_,tinyId:this.tinyId_});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateOffer",value:(f=a(n().mark((function e(t,i){var r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.peerConnection_.createOffer(tK);case 3:return r=e.sent,tC&&(r.sdp=this.setSDPDirection(r.sdp,"sendrecv")),e.next=7,this.peerConnection_.setLocalDescription(r);case 7:return a=this.updateMediaSettings(this.localStream_||this.localAuxStream_),o={action:t,trackId:i.id,kind:i.kind===Vk?"bigVideo":i.kind,type:"offer",sdp:this.peerConnection_.localDescription.sdp,constraintConfig:a,state:this.publishState},this.log_.info("createOffer success, sending updated offer to remote server"),this.log_.debug("updatedOffer: "+o.sdp),e.next=13,this.signalChannel_.sendWaitForResponse({command:tD,data:o,responseCommand:eD.UPDATE_OFFER_RESULT,timeout:1e4,commandDesc:"update offer"});case 13:return s=e.sent,c=s.data,u=c.code,d=c.message,0!==u&&this.checkPublishResultCode(u,d),e.next=18,this.acceptAnswer(s.data.data);case 18:this.updateSSRC(r.sdp),lM.logSuccessEvent({userId:this.client_.getUserId(),eventType:vI,kind:"offer"}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.log_.error(e.t0),lM.logFailedEvent({userId:this.client_.getUserId(),eventType:vI,kind:"offer",error:e.t0}),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return f.apply(this,arguments)})},{key:"setBandwidth",value:(p=a(n().mark((function e(t){var i,r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.bandwidth,r=t.type,a=t.videoType,o=void 0===a?"":a,s=t.sdp,EO()||!s){e.next=3;break}return e.abrupt("return",r===Vk?this.updateVideoBandwidthRestriction(s,i,o):this.updateAudioBandwidthRestriction(s,i));case 3:if(c=0,r===Vk&&(c=o===jk?2:o===Hk?3:1),!(u=this.peerConnection_.getSenders()[c])){e.next=22;break}return(d=u.getParameters()).encodings&&0!==d.encodings.length||(d.encodings=[{}]),"unlimited"===i?delete d.encodings[0].maxBitrate:d.encodings[0].maxBitrate=1e3*i,e.prev=10,e.next=13,u.setParameters(d);case 13:return this.log_.info(o+r+" bandwidth was set to "+i+" kbps"),e.abrupt("return",s);case 17:if(e.prev=17,e.t0=e.catch(10),this.log_.info("failed to set bandwidth by setting maxBitrate: "+e.t0),!s){e.next=22;break}return e.abrupt("return",r===Vk?this.updateVideoBandwidthRestriction(s,i,o):this.updateAudioBandwidthRestriction(s,i));case 22:return e.abrupt("return",s);case 23:case"end":return e.stop()}}),e,this,[[10,17]])}))),function(e){return p.apply(this,arguments)})},{key:"updateVideoBandwidthRestriction",value:function(e,t,n){var i="AS";tC&&(i="TIAS",t*=1e3);var r=0,a=-1;return n===jk?r=1:n===Hk&&(r=2),e=e.replace(/m=video (.*)\r\nc=IN (.*)\r\n/g,(function(e){return++a===r?"".concat(e,"b=").concat(i,":").concat(t,"\r\n"):e})),e}},{key:"updateAudioBandwidthRestriction",value:function(e,t){var n="AS";return tC&&(n="TIAS",t*=1e3),e=e.replace(/m=audio (.*)\r\nc=IN (.*)\r\n/,"m=audio $1\r\nc=IN $2\r\nb="+n+":"+t+"\r\n")}},{key:"removeBandwidthRestriction",value:function(e){return e.replace(/b=AS:.*\r\n/,"").replace(/b=TIAS:.*\r\n/,"")}},{key:"removeVideoOrientation",value:function(e){return e.replace(/urn:3gpp:video-orientation/,"")}},{key:"connect",value:(h=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.exchangeSDP();case 3:return e.next=5,this.waitForPeerConnectionConnected();case 5:e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),this.closePeerConnection(!0),e.t0;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return h.apply(this,arguments)})},{key:"exchangeSDP",value:(u=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.isSDPExchanging_=!0,e.next=4,this.createOffer();case 4:return this.log_.info("createOffer success, sending offer to remote server"),e.next=7,this.doExchangeSDP();case 7:this.isSDPExchanging_=!1,e.next=14;break;case 10:throw e.prev=10,e.t0=e.catch(0),this.isSDPExchanging_=!1,e.t0;case 14:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return u.apply(this,arguments)})},{key:"createOffer",value:(s=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.peerConnection_.createOffer(tK);case 3:return t=e.sent,e.next=6,this.peerConnection_.setLocalDescription(t);case 6:this.updateSSRC(t.sdp),lM.logSuccessEvent({userId:this.client_.getUserId(),eventType:vI,kind:"offer"}),e.next=14;break;case 10:throw e.prev=10,e.t0=e.catch(0),lM.logFailedEvent({userId:this.client_.getUserId(),eventType:vI,kind:"offer",error:e.t0}),e.t0;case 14:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return s.apply(this,arguments)})},{key:"doExchangeSDP",value:function(){var e=this;return new Promise((function(t,i){e.exchangeSDPTimeout_=setTimeout((function(){e.signalChannel_.off(eD.PUBLISH_RESULT,r),e.clearExchangeSDPTimeout();var t=new kD({code:bD.API_CALL_TIMEOUT,message:sA({key:HE})});i(t)}),1e4);var r=function(){var r=a(n().mark((function r(a){var o,s,c;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,e.clearExchangeSDPTimeout(),o=a.data,s=o.code,c=o.message,0!==s){n.next=9;break}return n.next=6,e.acceptAnswer(a.data.data);case 6:t(),n.next=10;break;case 9:e.checkPublishResultCode(s,c);case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(0),i(n.t0);case 15:case"end":return n.stop()}}),r,null,[[0,12]])})));return function(e){return r.apply(this,arguments)}}(),o={type:e.peerConnection_.localDescription.type,sdp:e.removeVideoOrientation(e.peerConnection_.localDescription.sdp),screen:(e.publishingStream_||e.localStream_).hasScreenTrack(),state:e.publishState,constraintConfig:e.mediaSettings_};e.signalChannel_.once(eD.PUBLISH_RESULT,r),e.log_.debug("sending sdp offer: "+o.sdp),e.signalChannel_.send(sD,o)}))}},{key:"setSDPDirection",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all",i=xM(e);return i.media.forEach((function(e){"all"!==n&&e.type!==n||(e.direction=t)})),PM(i)}},{key:"acceptAnswer",value:(r=a(n().mark((function e(t){var i,r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=this.removeVideoOrientation(t.sdp),!(r=this.publishingStream_||this.localStream_)){e.next=15;break}if(a=r.getVideoBitrate(),o=r.getAudioBitrate(),!a){e.next=11;break}return s=this.isPublishingAuxStream_?Hk:Bk,e.next=10,this.setBandwidth({bandwidth:a,type:Vk,sdp:i,videoType:s});case 10:i=e.sent;case 11:if(!o){e.next=15;break}return e.next=14,this.setBandwidth({bandwidth:o,type:Uk,sdp:i});case 14:i=e.sent;case 15:if(!this.client_.getIsEnableSmallStream()){e.next=20;break}return c=this.client_.smallStreamConfig,e.next=19,this.setBandwidth({bandwidth:c.bitrate,type:Vk,videoType:jk,sdp:i});case 19:i=e.sent;case 20:return u={type:t.type,sdp:i},e.next=23,this.peerConnection_.setRemoteDescription(u);case 23:this.frameCodec_&&this.frameCodec_.handleEncodedStreams(),this.log_.debug("accepted answer: "+i),lM.logSuccessEvent({userId:this.client_.getUserId(),eventType:_I,kind:"answer"}),e.next=33;break;case 28:throw e.prev=28,e.t0=e.catch(0),lM.logFailedEvent({userId:this.client_.getUserId(),eventType:_I,kind:"answer",error:e.t0}),this.log_.error("failed to accept remote answer "+e.t0),e.t0;case 33:case"end":return e.stop()}}),e,this,[[0,28]])}))),function(e){return r.apply(this,arguments)})},{key:"sendMutedFlag",value:function(e,t){if(t!==this.localAuxStream_){var n={audio:e.audio,bigVideo:e.video,auxVideo:e.auxVideo};this.log_.info("send muted state: ".concat(JSON.stringify(n))),this.signalChannel_.send(oD,n)}}},{key:"getIsReconnecting",value:function(){return this.isReconnecting_}},{key:"reconnect",value:(i=a(n().mark((function e(){var t,i,r=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===this.reconnectionTimer_){e.next=3;break}return this.log_.warn("reconnect() uplink is reconnecting, ignore current reconnection"),e.abrupt("return");case 3:if(!(this.reconnectionCount_>=30)){e.next=12;break}return this.log_.warn("SDK has tried reconnect uplink for ".concat(30," times, but all failed, please check your network")),this.stopReconnection(),t=new kD({code:bD.UPLINK_RECONNECTION_FAILED,message:sA({key:WE})}),lM.logFailedEvent({userId:this.client_.getUserId(),eventType:pI,error:t}),this.addEventInternal(ZD,"uplink-connection reconnect fail"),this.emitConnectionStateChangedEvent(zT),this.emitter_.emit(jO.ERROR,t),e.abrupt("return");case 12:if(this.signalChannel_.getCurrentState()===$P){e.next=16;break}return this.log_.warn("reconnect() signal channel is not connected, suspend reconnection until signal is connected"),this.signalChannel_.once(JP,this.reconnect,this),e.abrupt("return");case 16:if(this.reconnectionCount_++,e.prev=17,this.log_.warn("reconnect() try to reconnect uplink [".concat(this.reconnectionCount_,"/").concat(30,"]")),i=fA(this.reconnectionCount_),this.reconnectionTimer_=setTimeout((function(){r.log_.warn("reconnect() uplink reconnect timeout(".concat(i/1e3,"s), try again")),r.clearReconnectionTimer(),r.reconnect()}),i),!(this.isSDPExchanging_||this.peerConnection_&&this.peerConnection_.connectionState===QT)){e.next=23;break}return e.abrupt("return");case 23:return e.next=25,this.signalChannel_.sendWaitForResponse({command:cD,responseCommand:eD.UNPUBLISH_RESULT,enableLog:!1});case 25:if(this.reset(),this.initialize(),!this.localStream_){e.next=30;break}return e.next=30,this.publish(this.localStream_);case 30:if(!this.localAuxStream_){e.next=33;break}return e.next=33,this.publish(this.localAuxStream_,!0);case 33:lM.logSuccessEvent({userId:this.client_.getUserId(),eventType:pI}),this.log_.warn("reconnect() uplink reconnect successfully"),this.addEventInternal(YD,"uplink-connection reconnect success"),this.stopReconnection(),this.localStream_.syncMuteState(),e.next=42;break;case 40:e.prev=40,e.t0=e.catch(17);case 42:case"end":return e.stop()}}),e,this,[[17,40]])}))),function(){return i.apply(this,arguments)})},{key:"clearExchangeSDPTimeout",value:function(){-1!==this.exchangeSDPTimeout_&&(clearTimeout(this.exchangeSDPTimeout_),this.exchangeSDPTimeout_=-1)}},{key:"clearReconnectionTimer",value:function(){-1!==this.reconnectionTimer_&&(clearTimeout(this.reconnectionTimer_),this.reconnectionTimer_=-1)}},{key:"handleError",value:function(e){e.getCode()===bD.ICE_TRANSPORT_ERROR&&(this.isFirstConnection_&&(this.isFirstConnection_=!1,lM.logFailedEvent({userId:this.client_.getUserId(),eventType:hI,error:e})),this.isReconnecting_||this.startReconnection())}},{key:"handleConnectionStateChange",value:function(e){e.state===qT&&this.isFirstConnection_&&(this.isFirstConnection_=!1,lM.logSuccessEvent({userId:this.client_.getUserId(),eventType:hI}),this.addEventInternal(JD,"uplink-connection is connected"))}},{key:"updateSSRC",value:function(e){var t=this;try{xM(e).media.forEach((function(e,n){if(e.type===Uk){var i=e.ssrcs[0];i&&(t.ssrc_.audio=i.id)}else{if(t.sdpSemantics_===PI)return void e.ssrcGroups.forEach((function(e,n){var i=Number(e.ssrcs.split(" ")[0]);0===n?t.ssrc_.video=i:1===n&&(t.ssrc_.small=i)}));var r=e.ssrcs[0];if(!r)return;switch(n){case 1:t.ssrc_.video=r.id;break;case 2:t.ssrc_.small=r.id;break;case 3:t.ssrc_.auxiliary=r.id}}}))}catch(IQ){}}},{key:"getVideoTrackId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vk;if(this.peerConnection_){var t=this.peerConnection_.getSenders();if(e===Vk&&t[1]&&t[1].track)return t[1].track.id;if(e===jk&&t[2]&&t[2].track)return t[2].track.id;if(e===Hk&&t[3]&&t[3].track)return t[3].track.id}if(this.localStream_&&e===Vk){var n=this.localStream_.getVideoTrack();if(n)return n.id}if(this.localAuxStream_&&e===Hk){var i=this.localAuxStream_.getVideoTrack();if(i)return i.id}return""}},{key:"getSSRC",value:function(){return this.ssrc_}},{key:"checkPublishResultCode",value:function(e,t){if(0!==e)throw 1028===e?(this.log_.error(UR.NOT_SUPPORTED_H264ENCODE),new kD({code:bD.NOT_SUPPORTED_H264,message:sA({key:pR})})):new kD({code:bD.UNKNOWN,message:sA({key:bR,data:{signalResponse:eD.PUBLISH_RESULT,code:e,message:t}})})}},{key:"getLocalStream",value:function(){return this.localStream_}},{key:"sendSEI",value:function(e,t){this.frameCodec_.addSEIMessage(e,t)}},{key:"mixAudioTrack",value:function(e,t){this.log_.info("mix audio track"),this.mixedAudioTrack_=function(e){var t=PA(),n=t.createMediaStreamDestination(),i=[];e.forEach((function(e){var r=new MediaStream;r.addTrack(e);var a=t.createMediaStreamSource(r);a.connect(n),i.push(a)}));var r=n.stream.getAudioTracks()[0];return Tq.set(r,{destination:n,track:r,mediaStreamSourceList:i}),r}([e,t])}},{key:"destroyMixedAudioTrack",value:function(){this.mixedAudioTrack_&&(this.log_.info("destroy audio track"),function(e){if(Tq.has(e)){var t=Tq.get(e),n=t.destination,i=t.track,r=t.mediaStreamSourceList;i.stop(),n.disconnect(),r.forEach((function(e){e.disconnect()})),Tq.delete(e)}}(this.mixedAudioTrack_),this.mixedAudioTrack_=null)}}]),P}(jJ),C(zq.prototype,"publish",[Gq],Object.getOwnPropertyDescriptor(zq.prototype,"publish"),zq.prototype),zq),iK=new WeakMap;function rK(){return function(e,n,i){var r=i.value,a=function e(n){var i=n.fn,r=n.args,a=n.context,o=n.resolve,s=n.reject;i.apply(a,r).then(o,s).finally((function(){var n=iK.get(a);n&&(n.shift(),n[0]&&e(t({},n[0])))}))};return i.value=function(){for(var e=this,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return new Promise((function(t,o){if(iK.has(e)){var s=iK.get(e),c=s.length;s.push({fn:r,args:i,context:e,resolve:t,reject:o,name:n}),0===c&&a({fn:r,args:i,context:e,resolve:t,reject:o})}else iK.set(e,[{fn:r,args:i,context:e,resolve:t,reject:o,name:n}]),a({fn:r,args:i,context:e,resolve:t,reject:o})}))},i}}var aK=(Wq=rK(),Jq=aq({retries:1,timeout:0,onRetrying:function(e){this.log_.warn("connection timeout, retrying [".concat(e,"]"))},onError:function(e,t,n){e.message.includes("timeout")?t():n(e)}}),qq=rK(),Kq=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return function(t,n,i){var r=i.value;return i.value=function(){for(var t=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return new Promise((function(i,o){var s=setTimeout((function(){return o(new Error("".concat(n," timeout")))}),e);r.apply(t,a).then(i,o).finally((function(){clearTimeout(s)}))}))},i}}(),Qq=function(e){d(_,e);var r,s,u,h,p,f,m,v=g(_);function _(e){var t;return o(this,_),(t=v.call(this,e)).remoteStreams_=new Map,t.autoSubscribe=e.autoSubscribe,t.trackState_={audio:e.trackState.audio,video:e.trackState.video,auxiliary:e.trackState.auxiliary,smallVideo:e.trackState.smallVideo},t.ssrc_={audio:0,video:0,auxiliary:0},t.subscribeState_={audio:e.autoSubscribe,video:e.autoSubscribe,auxiliary:e.autoSubscribe,smallVideo:!1},t.isSDPExchanging_=!1,t.installEvents(),t}return c(_,[{key:"getMixUserList",value:function(){return this.mixUserList_?this.mixUserList_.map((function(e){var t=e.userId,n=e.flag;return{userId:t,hasAudio:!!(8&n),hasVideo:!!(1&n),hasAuxiliary:!!(4&n)}})):void 0}},{key:"setMixUserList",value:function(e){(!this.mixUserList_||bA(this.mixUserList_)&&!function(e,t){if(t.length===e.length){var n,r=w(t);try{var a=function(){var t=n.value,i=e.find((function(e){return e.userId===t.userId}));if(!i||i.flag!==t.flag)return{v:!1}};for(r.s();!(n=r.n()).done;){var o=a();if("object"===i(o))return o.v}}catch(s){r.e(s)}finally{r.f()}return!0}return!1}(this.mixUserList_,e))&&(this.mixUserList_=e,this.emitter_.emit(jO.STREAM_UPDATED,{stream:this.getMainStream()}))}},{key:"isMainStreamSubscribed",get:function(){return(this.subscribeState_.audio||this.subscribeState_.video||this.subscribeState_.smallVideo)&&(this.trackState_.audio||this.trackState_.video||this.trackState_.smallVideo)}},{key:"isAuxStreamSubscribed",get:function(){return this.subscribeState_.auxiliary&&this.trackState_.auxiliary}},{key:"isSmallStreamSubscribed",get:function(){return this.subscribeState_.smallVideo&&this.trackState_.smallVideo}},{key:"isBigStreamSubscribed",get:function(){return this.subscribeState_.video&&this.trackState_.video}},{key:"isStreamUnpublished",value:function(e){return e.getType()===rT?!this.trackState_.audio&&!this.trackState_.video:!this.trackState_.auxiliary}},{key:"initialize",value:function(){S(l(_.prototype),"initialize",this).call(this),this.peerConnection_.ontrack=this.onTrack.bind(this)}},{key:"close",value:function(){var e,t,n,i=this;S(l(_.prototype),"close",this).call(this),this.trackState_.audio=!1,this.trackState_.video=!1,this.trackState_.smallVideo=!1,this.trackState_.auxiliary=!1,this.emitConnectionStateChangedEvent(zT),e=this,t=function(e){e.fn;var t=e.args,n=e.resolve,r=e.reject,a=e.name;if("subscribe"===a){if(!i.client_.getIsJoined())return r(new kD({code:bD.API_CALL_ABORTED,message:sA({key:OR,data:{message:"leave room",stream:t[0]}})}));if(i.isStreamUnpublished(t[0]))return r(new kD({code:bD.API_CALL_ABORTED,message:sA({key:OR,data:{message:"remote user ".concat(i.userId_," unpublished stream"),stream:t[0]}})}))}else if("unsubscribe"===a)return n();n()},null===(n=iK.get(e))||void 0===n||n.forEach(t),iK.delete(e),this.remoteStreams_.forEach((function(e){var t=e;t.setConnection(null),t.uninstallEvents(),t.getIsStreamAddedEventEmitted()&&i.emitter_.emit(jO.STREAM_REMOVED,{stream:t})})),this.remoteStreams_.clear(),this.uninstallEvents()}},{key:"installEvents",value:function(){var e=this;jA.on(cx,this.onRemoteStreamUpdate,this),this.emitter_.on(jO.ERROR,(function(t){t.getCode()===bD.ICE_TRANSPORT_ERROR&&(e.isFirstConnection_&&(e.isFirstConnection_=!1,lM.logFailedEvent({userId:e.client_.getUserId(),eventType:fI,error:t})),e.isReconnecting_||e.startReconnection())})),this.emitter_.on(jO.CONNECTION_STATE_CHANGED,(function(t){t.state===qT&&e.isFirstConnection_&&(e.isFirstConnection_=!1,lM.logSuccessEvent({userId:e.client_.getUserId(),eventType:fI}),e.addEventInternal(qD,"downlink-connection is connected"))}))}},{key:"uninstallEvents",value:function(){jA.removeListener(cx,this.onRemoteStreamUpdate,this)}},{key:"onRemoteStreamUpdate",value:function(e){if(this.hitTest(e.tinyId)&&e.client===this.client_){this.updateTrackState(e.action,e.kind);var t=e.kind===Hk?FT:VT,n=this.remoteStreams_.get(t);if(!n)return;e.action===jI.ADD?this.handleRemoteAddTrack(e.kind,n):this.handleRemoteRemoveTrack(e.kind,n)}}},{key:"handleRemoteAddTrack",value:function(e,t){this.log_.info("remote add ".concat(e," track")),e===Uk?t.updateAudioPlayingState(this.subscribeState_.audio):t.updateVideoPlayingState(e===Hk?this.subscribeState_.auxiliary:this.subscribeState_.video||this.subscribeState_.smallVideo),t.getIsStreamAddedEventEmitted()?this.emitter_.emit(jO.STREAM_UPDATED,{stream:t}):(this.emitter_.emit(jO.STREAM_ADDED,{stream:t}),this.currentState_===qT&&t.emitConnectionStateChanged({prevState:zT,state:qT}))}},{key:"handleRemoteRemoveTrack",value:function(e,t){t.getIsStreamAddedEventEmitted()&&(this.log_.info("remote remove ".concat(e," track")),e===Hk||!this.trackState_.audio&&!this.trackState_.video?(this.log_.info("remote stream ".concat(t.getType()," removed")),this.currentState_===qT&&t.emitConnectionStateChanged({prevState:qT,state:zT}),this.emitter_.emit(jO.STREAM_REMOVED,{stream:t})):(e===Uk?t.updateAudioPlayingState(!1):(e!==zk||this.isSmallStreamSubscribed)&&t.updateVideoPlayingState(!1),this.emitter_.emit(jO.STREAM_UPDATED,{stream:t})))}},{key:"updateTrackState",value:function(e,t){var n=e===jI.ADD;switch(t){case Uk:this.trackState_.audio=n;break;case Vk:this.trackState_.video=n;break;case Hk:this.trackState_.auxiliary=n;break;case zk:this.trackState_.smallVideo=n}this.log_.info("trackState updated: ".concat(JSON.stringify(this.trackState_)))}},{key:"onTrack",value:function(e){var t=e.streams[0],n=e.track;if(this.log_.info("ontrack() kind: ".concat(n.kind," id: ").concat(n.id," streamId: ").concat(t.id)),this.sdpSemantics_===xI){var i=function(e){var t=gM.parse(e),n={audio:[],video:[]};return t.media.forEach((function(e){if(e.ssrcs){var t=e.ssrcs[0].id>>16&255;if(e.type===Uk)n.audio.push(VT);else if(e.type==Vk){var i=t===jT?VT:FT;n.video.push(i)}}})),n}(this.peerConnection_.remoteDescription.sdp);if(n.kind===Uk){if(0===i.audio.length||t.id!==VT)return void this.log_.debug("skip this invalid audio track")}else if(-1===i.video.indexOf(t.id))return void this.log_.debug("skip this invalid video track: ".concat(n.id,"  msid: ").concat(t.id))}lM.logEvent({eventType:"ontrack",kind:n.kind});var r=!1,a=this.remoteStreams_.get(t.id),o=t.id===VT?BT:HT;if(vA(a)&&((a=new _q({type:o,userId:this.userId_,client:this.client_})).setConnection(this),this.remoteStreams_.set(t.id,a),r=!0),a.setMediaStream(t),n.kind===Uk?a.updateAudioPlayingState(this.subscribeState_.audio):o===BT?a.updateVideoPlayingState(this.subscribeState_.video||this.subscribeState_.smallVideo):a.updateVideoPlayingState(this.subscribeState_.auxiliary),(o!==HT||this.trackState_.auxiliary)&&(o!==BT||this.trackState_.audio||this.trackState_.video)){var s=this.client_.getSubscriptionManager();s&&s.hasAutoRecoveryFlag(this.userId_,o)||(r?this.emitter_.emit(jO.STREAM_ADDED,{stream:a}):this.emitter_.emit(jO.STREAM_UPDATED,{stream:a}))}}},{key:"addRRTRLine",value:function(e){var t=e.split("\r\n"),n=new Map;t.forEach((function(e,i){/^a=rtcp-fb:/.test(e)&&t[i+1]&&!/^a=rtcp-fb:/.test(t[i+1])&&e.match(/^a=rtcp-fb:\d+/)&&n.set(i+1,e.match(/^a=rtcp-fb:\d+/)[0]+" rrtr")}));for(var i=T(n),r=0;r<i.length;r++){var a=k(i[r],2),o=a[0],s=a[1];t.splice(o+r,0,s)}return t.join("\r\n")}},{key:"addSPSDescription",value:function(e){var t=xM(e);return t.media.forEach((function(e){e.type===Vk&&e.fmtp.forEach((function(e){e.config+=";sps-pps-idr-in-keyframe=1"}))})),PM(t)}},{key:"removeSDESDescription",value:function(e){var t=["urn:ietf:params:rtp-hdrext:sdes:mid","urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id","urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"],n=xM(e);return n.media.forEach((function(e){e.ext=e.ext.filter((function(e){return!t.includes(e.uri)}))})),PM(n)}},{key:"isSubscriptionStateNotChanged",value:function(e,t){return e.getType()===BT?(null==t?void 0:t.audio)===this.subscribeState_.audio&&(null==t?void 0:t.video)===this.subscribeState_.video&&this.isSubscribeSmall(t):e.getType()===HT?!vA(t.video)&&this.subscribeState_.auxiliary===t.video:void 0}},{key:"isSubscribeSmall",value:function(e){return vA(e.smallVideo)&&!this.subscribeState_.smallVideo}},{key:"subscribe",value:(m=a(n().mark((function e(t,i){var r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o=i.emitEvent,s=void 0===o||o,c=t.getType(),(null===(r=this.peerConnection_)||void 0===r?void 0:r.connectionState)!==KT&&(null===(a=this.peerConnection_)||void 0===a?void 0:a.connectionState)!==QT){e.next=6;break}return e.next=6,this.waitForPeerConnectionConnected();case 6:if(!this.isSubscriptionStateNotChanged(t,i)){e.next=13;break}if(this.peerConnection_){e.next=11;break}return this.initialize(),e.next=11,this.connect();case 11:return s&&vA(i.smallVideo)&&this.emitter_.emit(jO.STREAM_SUBSCRIBED,{stream:t,result:!0}),e.abrupt("return",t);case 13:if(c===rT?(vA(i.audio)||(this.subscribeState_.audio=i.audio),vA(i.video)||(this.subscribeState_.video=i.video),this.subscribeState_.smallVideo=(null==i?void 0:i.smallVideo)||!1,this.addEventInternal(this.subscribeState_.audio?PD:MD,this.subscribeState_.audio?"subscribe audio":"unsubscribe audio"),this.addEventInternal(this.subscribeState_.video?PD:MD,this.subscribeState_.video?"subscribe video":"unsubscribe video"),this.addEventInternal(this.subscribeState_.smallVideo?iM:rM,this.subscribeState_.smallVideo?"subscribe smallVideo":"unsubscribe smallVideo")):vA(i.video)||(this.subscribeState_.auxiliary=i.video),this.log_.info("subscribe ".concat(c," stream with options ").concat(JSON.stringify(i)," current state: ").concat(JSON.stringify(this.subscribeState_))),!this.peerConnection_&&!this.isSDPExchanging_){e.next=23;break}return u=AI,this.isMainStreamSubscribed||this.isAuxStreamSubscribed||(u=CI),e.next=20,this.sendSubscription(u);case 20:c===rT?(t.updateAudioPlayingState(this.subscribeState_.audio),t.updateVideoPlayingState(this.subscribeState_.video||this.subscribeState_.smallVideo)):t.updateVideoPlayingState(this.subscribeState_.auxiliary),e.next=26;break;case 23:return this.initialize(),e.next=26,this.connect();case 26:return s&&this.emitter_.emit(jO.STREAM_SUBSCRIBED,{stream:t,result:!0}),e.abrupt("return",t);case 30:if(e.prev=30,e.t0=e.catch(0),!this.client_.getIsJoined()||!this.isStreamUnpublished(t)){e.next=35;break}throw this.log_.warn("".concat(e.t0.message," ").concat(JSON.stringify(this.trackState_))),new kD({code:bD.REMOTE_STREAM_NOT_EXIST,message:"remote user ".concat(this.userId_," unpublished stream")});case 35:throw e.t0;case 36:case"end":return e.stop()}}),e,this,[[0,30]])}))),function(e,t){return m.apply(this,arguments)})},{key:"unsubscribe",value:(f=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=t.getType())!==rT){e.next=10;break}if(this.isMainStreamSubscribed){e.next=5;break}return this.log_.info("main stream already unsubscribed"),e.abrupt("return",t);case 5:this.subscribeState_.audio=!1,this.subscribeState_.video=!1,this.subscribeState_.smallVideo=!1,e.next=14;break;case 10:if(this.isAuxStreamSubscribed){e.next=13;break}return this.log_.info("auxiliary stream already unsubscribed"),e.abrupt("return",t);case 13:this.subscribeState_.auxiliary=!1;case 14:return r=CI,(i===BT&&this.isAuxStreamSubscribed||i===HT&&this.isMainStreamSubscribed)&&(r=AI),this.log_.info("unsubscribe ".concat(i," stream with ").concat(JSON.stringify(this.subscribeState_))),e.next=19,this.sendSubscription(r);case 19:return t.updateVideoPlayingState(!1),t.updateAudioPlayingState(!1),r===CI&&((a=t.getMediaStream())&&a.getTracks().forEach((function(e){return a.removeTrack(e)})),this.closePeerConnection(),this.emitConnectionStateChangedEvent(zT)),this.addEventInternal(MD,"unsubscribe audio"),this.addEventInternal(DD,"unsubscribe video"),e.abrupt("return",t);case 25:case"end":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{key:"sendSubscription",value:function(e){var t=this,n={srcTinyId:this.tinyId_,srcUserId:this.userId_},i=dD,r=eD.UNSUBSCRIBE_RESULT;return e===AI&&(n={audio:this.subscribeState_.audio,bigVideo:this.subscribeState_.video,auxVideo:this.subscribeState_.auxiliary,smallVideo:this.subscribeState_.smallVideo,srcTinyId:this.tinyId_},i=lD,r=eD.SUBSCRIBE_CHANGE_RESULT),this.signalChannel_.sendWaitForResponse({command:i,data:n,responseCommand:r,timeout:1e4}).then((function(n){var i=n.data;if(0!==i.code){var r=new kD({code:i.code,message:sA({key:BE,data:{type:e,message:i.message}})});throw t.log_.error(r),r}}))}},{key:"connect",value:(p=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.exchangeSDP();case 3:return e.next=5,this.waitForPeerConnectionConnected();case 5:e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),this.closePeerConnection(!0),e.t0;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return p.apply(this,arguments)})},{key:"exchangeSDP",value:(h=a(n().mark((function e(){var t,i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.isSDPExchanging_=!0,e.next=4,this.createOffer();case 4:return this.log_.info("createOffer success, sending offer to remote server"),t=this.peerConnection_.localDescription,i=t.type,r=t.sdp,a={type:i,sdp:r,srcUserId:this.userId_,srcTinyId:this.tinyId_,audio:this.subscribeState_.audio,bigVideo:this.subscribeState_.video,auxVideo:this.subscribeState_.auxiliary,smallVideo:this.subscribeState_.smallVideo},jA.emit(Cx,{client:this.client_,connection:this,userId:this.userId_,tinyId:this.tinyId_,role:OT,subscribeState:this.subscribeState_,trackState:this.trackState_}),e.next=10,this.signalChannel_.sendWaitForResponse({command:uD,commandDesc:"exchange sdp",data:a,responseCommand:eD.SUBSCRIBE_RESULT,timeout:1e4});case 10:if(o=e.sent,this.peerConnection_){e.next=15;break}throw s=new kD({code:bD.INVALID_OPERATION,message:sA({key:IR})}),this.log_.warn(s),s;case 15:return e.next=17,this.onSubscribeResult(o);case 17:this.isSDPExchanging_=!1,e.next=24;break;case 20:throw e.prev=20,e.t0=e.catch(0),this.isSDPExchanging_=!1,e.t0;case 24:case"end":return e.stop()}}),e,this,[[0,20]])}))),function(){return h.apply(this,arguments)})},{key:"createOffer",value:(u=a(n().mark((function e(){var t,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={voiceActivityDetection:!1},TO()&&this.sdpSemantics_===xI?(this.peerConnection_.addTransceiver(Uk,{direction:"recvonly"}),this.peerConnection_.addTransceiver(Vk,{direction:"recvonly"}),this.peerConnection_.addTransceiver(Vk,{direction:"recvonly"})):(t.offerToReceiveAudio=!0,t.offerToReceiveVideo=!0),e.next=4,this.peerConnection_.createOffer(t);case 4:return i=e.sent,e.next=7,fO();case 7:return e.sent.isH264DecodeSupported||(this.log_.warn("remove h264 desc from sdp"),i.sdp=MM(i.sdp)),i.sdp=this.addRRTRLine(i.sdp),i.sdp=this.addSPSDescription(i.sdp),i.sdp=DM(i.sdp),this.sdpSemantics_===xI&&(i.sdp=this.removeSDESDescription(i.sdp)),e.next=16,this.peerConnection_.setLocalDescription(i);case 16:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"onSubscribeResult",value:(s=a(n().mark((function e(i){var r,a,o,s,c,u,d,l=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i&&i.data||{},a=r.code,o=r.message,s=void 0===o?"":o,c=i&&i.data&&i.data.data||{},u=c.type,d=c.sdp,77393!==a){e.next=5;break}throw this.log_.error(UR.NOT_SUPPORTED_H264DECODE),new kD({code:bD.NOT_SUPPORTED_H264,message:sA({key:fR})});case 5:if(e.prev=5,0===a){e.next=8;break}throw new kD({code:a,message:sA({key:zE,data:{errMsg:s}})});case 8:return this.log_.debug("accept remote answer: "+d),e.next=11,this.peerConnection_.setRemoteDescription({type:u,sdp:d});case 11:this.frameCodec_&&(this.frameCodec_.handleEncodedStreams(),this.frameCodec_.onSEIMessage=function(e){l.emitter_.emit(jO.SEI_MESSAGE,t(t({},e),{},{userId:l.userId_}))}),this.updateSSRC(d),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(5),this.log_.error(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[5,15]])}))),function(e){return s.apply(this,arguments)})},{key:"updateSSRC",value:function(e){var t=this;try{xM(e).media.forEach((function(e){if(e.type===Uk){var n=e.ssrcs.find((function(e){return e.value.includes(VT)}));n&&(t.ssrc_.audio=n.id)}else{var i=e.ssrcs.find((function(e){return e.value.includes(VT)})),r=e.ssrcs.find((function(e){return e.value.includes(FT)}));i&&(t.ssrc_.video=i.id),r&&(t.ssrc_.auxiliary=r.id)}}))}catch(IQ){}}},{key:"setRemoteStream",value:function(e,t){this.remoteStreams_.set(e,t)}},{key:"getSubscribeState",value:function(){return this.subscribeState_}},{key:"getTrackState",value:function(){return this.trackState_}},{key:"getSSRC",value:function(){return this.ssrc_}},{key:"getMainStream",value:function(){return this.remoteStreams_.get(VT)}},{key:"getAuxStream",value:function(){return this.remoteStreams_.get(FT)}},{key:"getMainStreamVideoTrackId",value:function(){var e=this.getMainStream();if(e){var t=e.getVideoTrack();if(t)return t.id}return""}},{key:"getAuxStreamVideoTrackId",value:function(){var e=this.getAuxStream();if(e){var t=e.getVideoTrack();if(t)return t.id}return""}},{key:"reconnect",value:(r=a(n().mark((function e(){var t,i,r=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===this.reconnectionTimer_){e.next=3;break}return this.log_.warn("reconnect() downlink is reconnecting, ignore current reconnection"),e.abrupt("return");case 3:if(!(this.reconnectionCount_>=30)){e.next=12;break}return this.log_.warn("SDK has tried reconnect downlink [".concat(this.userId_,"] for ").concat(30," times, but all failed, please check your network")),this.stopReconnection(),t=new kD({code:bD.DOWNLINK_RECONNECTION_FAILED,message:sA({key:GE})}),lM.logFailedEvent({userId:this.client_.getUserId(),eventType:mI,error:t}),this.addEventInternal(nM,"downlink-connection reconnect fail"),this.emitConnectionStateChangedEvent(zT),this.emitter_.emit(jO.ERROR,t),e.abrupt("return");case 12:if(this.signalChannel_.getCurrentState()===$P){e.next=16;break}return this.log_.warn("reconnect() signal channel is not connected, suspend reconnection until signal is connected"),this.signalChannel_.once(JP,this.reconnect,this),e.abrupt("return");case 16:if(this.reconnectionCount_++,this.log_.warn("reconnect() try to reconnect downlink [".concat(this.reconnectionCount_,"/").concat(30,"]")),i=fA(this.reconnectionCount_),this.reconnectionTimer_=setTimeout((function(){r.log_.warn("reconnect() downlink [".concat(r.userId_,"] reconnect timeout(").concat(i/1e3,"s), try again")),r.clearReconnectionTimer(),r.reconnect()}),i),!(this.isSDPExchanging_||this.peerConnection_&&this.peerConnection_.connectionState===QT)){e.next=22;break}return e.abrupt("return");case 22:return e.prev=22,this.closePeerConnection(),this.initialize(),e.next=27,this.connect();case 27:this.stopReconnection(),this.log_.warn("reconnect() downlink reconnect successfully"),lM.logSuccessEvent({userId:this.client_.getUserId(),eventType:mI}),this.addEventInternal(tM,"downlink-connection reconnect success"),this.recoverSubscription(),e.next=36;break;case 34:e.prev=34,e.t0=e.catch(22);case 36:case"end":return e.stop()}}),e,this,[[22,34]])}))),function(){return r.apply(this,arguments)})},{key:"recoverSubscription",value:function(){var e=this,t=this.client_.getSubscriptionManager();t&&T(this.remoteStreams_.values()).forEach((function(n){t.hasAutoRecoveryFlag(e.userId_,n.getType())&&t.recover(n)}))}},{key:"getIsReconnecting",value:function(){return this.isReconnecting_}},{key:"getSubscribedMainStream",value:function(){var e=null;return this.isMainStreamSubscribed&&(e=this.remoteStreams_.get(VT)),e}},{key:"clearReconnectionTimer",value:function(){-1!==this.reconnectionTimer_&&(clearTimeout(this.reconnectionTimer_),this.reconnectionTimer_=-1)}},{key:"startReconnection",value:function(){var e=this.client_.getSubscriptionManager();if(e){var t,n=w(this.remoteStreams_.values());try{for(n.s();!(t=n.n()).done;){var i=t.value,r=i.getType();(r===BT&&(this.trackState_.audio||this.trackState_.video)||r===HT&&this.trackState_.auxiliary)&&e.setAutoRecoveryFlag(this.userId_,i.getType())}}catch(a){n.e(a)}finally{n.f()}}S(l(_.prototype),"startReconnection",this).call(this)}},{key:"getCurrentState",value:function(){return this.currentState_}},{key:"hasMainStream",value:function(){return this.trackState_.video||this.trackState_.audio||this.trackState_.smallVideo}},{key:"hasAuxStream",value:function(){return this.trackState_.auxiliary}}]),_}(jJ),C(Qq.prototype,"subscribe",[Wq,Jq],Object.getOwnPropertyDescriptor(Qq.prototype,"subscribe"),Qq.prototype),C(Qq.prototype,"unsubscribe",[qq],Object.getOwnPropertyDescriptor(Qq.prototype,"unsubscribe"),Qq.prototype),C(Qq.prototype,"exchangeSDP",[Kq],Object.getOwnPropertyDescriptor(Qq.prototype,"exchangeSDP"),Qq.prototype),Qq);var oK=function(){function e(){o(this,e),this.startTime=0,this.endTime=0,this.start()}return c(e,[{key:"start",value:function(){0===this.startTime&&(this.startTime=EA())}},{key:"stop",value:function(){0===this.endTime&&(this.endTime=EA())}},{key:"getDuration",value:function(){return 0===this.endTime?EA()-this.startTime:this.endTime-this.startTime}}]),e}(),sK=function(){function e(t){o(this,e),this.client_=t.client,this.intervalId_=-1,this.statsCalculator_=t.stats,this.prevStats_=null,this.renderFreezeMap_=new Map,this.remoteStreamMap_=new Map,this.dataFreezeMap_=new Map,this.monitorFreezeData_=new Map}var t,i,r;return c(e,[{key:"installEvents",value:function(){jA.on(Tx,this.handlePlayVideoStart,this),jA.on(yx,this.onVideoTrackMuted,this),jA.on(Sx,this.onVideoTrackUnmuted,this),jA.on(fx,this.handleStreamStopped,this),jA.on(hx,this.handleStreamStopped,this),jA.on(ox,this.handleVideoPlaying,this)}},{key:"uninstallEvents",value:function(){jA.off(Tx,this.handlePlayVideoStart,this),jA.off(yx,this.onVideoTrackMuted,this),jA.off(Sx,this.onVideoTrackUnmuted,this),jA.off(fx,this.handleStreamStopped,this),jA.off(hx,this.handleStreamStopped,this),jA.off(ox,this.handleVideoPlaying,this)}},{key:"start",value:function(){var e=this;-1===this.intervalId_&&(this.installEvents(),this.intervalId_=iO.run(a(n().mark((function t(){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.detectFPS();case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),t,null,[[0,5]])}))),{delay:1e3}))}},{key:"stop",value:function(){-1!==this.intervalId_&&(this.uninstallEvents(),iO.clearTask(this.intervalId_),this.intervalId_=-1,this.renderFreezeMap_.clear(),this.dataFreezeMap_.clear(),this.remoteStreamMap_.clear())}},{key:"onVideoTrackMuted",value:function(e){var t=e.stream;if(t.getClient()===this.client_&&t.isRemote()){var n=t.userId_,i=t.type_,r="".concat(n,"_").concat(i),a=this.dataFreezeMap_.get(r),o=new oK;a?a.durationItemList.push(o):this.dataFreezeMap_.set(r,{userId:n,type:i,durationItemList:[o],isFreezing:function(){var e=this.durationItemList[this.durationItemList.length-1];return e&&0===e.endTime}})}}},{key:"onVideoTrackUnmuted",value:function(e){var t=e.stream;if(t.getClient()===this.client_&&t.isRemote()){var n=t.userId_,i=t.type_,r="".concat(n,"_").concat(i);this.stopDataFreeze({key:r,userId:n,type:i})}}},{key:"handleStreamStopped",value:function(e){var t=e.client,n=e.stream;if(t===this.client_){var i=n.getUserId(),r=n.getType(),a="".concat(i,"_").concat(r);this.stopDataFreeze({key:a,userId:i,type:r})}}},{key:"stopDataFreeze",value:function(e){var t=e.key,n=e.userId,i=e.type,r=this.dataFreezeMap_.get(t);if(r&&r.isFreezing()){var a=r.durationItemList[r.durationItemList.length-1];a.stop();var o=a.getDuration();o>500?(lM.logEvent({eventType:"videoFrozenCount",delta:o}),this.monitorFreezeData_.set(t,{userId:n,type:i,duration:o})):r.durationItemList.pop()}}},{key:"getTotalDuration",value:function(e){return e.reduce((function(e,t){var n=t.getDuration();return e+Math.min(n,5e3)}),0)}},{key:"getStats",value:(r=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l,h;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.client_.getConnections(),i={},r=w(t),e.prev=3,r.s();case 5:if((a=r.n()).done){e.next=20;break}if(o=k(a.value,2),s=o[0],(c=o[1]).getPeerConnection()){e.next=9;break}return e.abrupt("continue",18);case 9:return u=c.getSubscribeState(),d=c.getTrackState(),e.next=13,this.statsCalculator_.getReceiverStats(c);case 13:l=e.sent,(h={userId:l.userId,tinyId:s,hasVideo:d.video&&u.video,hasAuxiliary:d.auxiliary&&u.auxiliary,video:{framesDecoded:0},auxiliary:{framesDecoded:0}}).hasVideo&&(h.video.framesDecoded=l.video.framesDecoded),h.hasAuxiliary&&(h.auxiliary.framesDecoded=l.auxiliary.framesDecoded),i[l.userId]=h;case 18:e.next=5;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(3),r.e(e.t0);case 25:return e.prev=25,r.f(),e.finish(25);case 28:return e.abrupt("return",i);case 29:case"end":return e.stop()}}),e,this,[[3,22,25,28]])}))),function(){return r.apply(this,arguments)})},{key:"detectFPS",value:(i=a(n().mark((function e(){var t,i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getStats();case 2:if(t=e.sent,this.prevStats_){e.next=6;break}return this.prevStats_=t,e.abrupt("return");case 6:e.t0=n().keys(t);case 7:if((e.t1=e.t0()).done){e.next=17;break}if(i=e.t1.value,this.prevStats_[i]){e.next=11;break}return e.abrupt("continue",7);case 11:r=t[i].tinyId,a=this.client_.getMutedStates(),t[i].hasVideo&&this.prevStats_[i].hasVideo&&a.has(r)&&!a.get(r).videoMuted&&(o=t[i].video.framesDecoded-this.prevStats_[i].video.framesDecoded,this.handleRenderFreeze({userId:i,type:BT,fps:o})),t[i].hasAuxiliary&&this.prevStats_[i].hasAuxiliary&&(s=t[i].auxiliary.framesDecoded-this.prevStats_[i].auxiliary.framesDecoded,this.handleRenderFreeze({userId:i,type:HT,fps:s})),e.next=7;break;case 17:this.prevStats_=t;case 18:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"handleRenderFreeze",value:(t=a(n().mark((function e(t){var i,r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=t.userId,r=t.fps,a=t.type,o="".concat(i,"_").concat(a),s=this.renderFreezeMap_.get(o),r<=2?(c=EA(),s&&!s.isFreeze&&(s.freezeTimeline.push({startTime:c,endTime:void 0}),s.isFreeze=!0),s||this.renderFreezeMap_.set(o,{userId:i,type:a,isFreeze:!0,freezeTimeline:[{startTime:c,endTime:void 0}],renderFreezeTotal:0})):s&&s.isFreeze&&(s.isFreeze=!1,(u=s.freezeTimeline.pop()).endTime=EA(),d=u.endTime-u.startTime,s.freezeTimeline.push(u),s.renderFreezeTotal+=Math.min(5e3,d));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"handlePlayVideoStart",value:function(e){var t=e.stream;if(t.getClient()===this.client_&&t.isRemote()&&t.hasVideo()){var n="".concat(t.getUserId(),"_").concat(t.getType());this.remoteStreamMap_.has(n)||this.remoteStreamMap_.set(n,{isPlayingFired:!1})}}},{key:"handleVideoPlaying",value:function(e){var t=e.stream;if(t.isRemote()&&t.getClient()===this.client_){var n="".concat(t.getUserId(),"_").concat(t.getType());if(this.remoteStreamMap_.has(n))this.remoteStreamMap_.get(n).isPlayingFired=!0}}},{key:"getDataFreezeDuration",value:function(e){var t={dataFreeze:0,count:0},n=this.dataFreezeMap_.get(e);if(n){if(n.isFreezing()){var i=n.durationItemList[n.durationItemList.length-1];i.stop(),i.getDuration()<500&&n.durationItemList.pop()}t.dataFreeze=this.getTotalDuration(n.durationItemList),t.count=n.durationItemList.length}return t}},{key:"getRenderFreezeDuration",value:function(e){var t=this.renderFreezeMap_.get(e),n=0,i=0;if(t)if(t.isFreeze){var r=EA()-t.freezeTimeline[t.freezeTimeline.length-1].startTime;n=t.renderFreezeTotal+Math.min(r,5e3),i=t.freezeTimeline.length}else n=t.renderFreezeTotal;return{renderFreeze:n,count:i}}},{key:"getMonitorFreeze",value:function(){return this.monitorFreezeData_}},{key:"isBlackStream",value:function(e){return!!this.remoteStreamMap_.has(e)&&!this.remoteStreamMap_.get(e).isPlayingFired}},{key:"resetMonitor",value:function(){this.monitorFreezeData_.clear()}}]),e}(),cK=c((function e(t){o(this,e),this.userId=t.userId,this.tinyId=t.tinyId,this.role=t.role===OT?LT:UT})),uK={exports:{}};!function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function i(e,t,i,r,a,o){return n((s=n(n(t,e),n(r,o)))<<(c=a)|s>>>32-c,i);var s,c}function r(e,t,n,r,a,o,s){return i(t&n|~t&r,e,t,a,o,s)}function a(e,t,n,r,a,o,s){return i(t&r|n&~r,e,t,a,o,s)}function o(e,t,n,r,a,o,s){return i(t^n^r,e,t,a,o,s)}function s(e,t,n,r,a,o,s){return i(n^(t|~r),e,t,a,o,s)}function c(e,t){var i,c,u,d,l;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var h=1732584193,p=-271733879,f=-1732584194,m=271733878;for(i=0;i<e.length;i+=16)c=h,u=p,d=f,l=m,h=r(h,p,f,m,e[i],7,-680876936),m=r(m,h,p,f,e[i+1],12,-389564586),f=r(f,m,h,p,e[i+2],17,606105819),p=r(p,f,m,h,e[i+3],22,-1044525330),h=r(h,p,f,m,e[i+4],7,-176418897),m=r(m,h,p,f,e[i+5],12,1200080426),f=r(f,m,h,p,e[i+6],17,-1473231341),p=r(p,f,m,h,e[i+7],22,-45705983),h=r(h,p,f,m,e[i+8],7,1770035416),m=r(m,h,p,f,e[i+9],12,-1958414417),f=r(f,m,h,p,e[i+10],17,-42063),p=r(p,f,m,h,e[i+11],22,-1990404162),h=r(h,p,f,m,e[i+12],7,1804603682),m=r(m,h,p,f,e[i+13],12,-40341101),f=r(f,m,h,p,e[i+14],17,-1502002290),h=a(h,p=r(p,f,m,h,e[i+15],22,1236535329),f,m,e[i+1],5,-165796510),m=a(m,h,p,f,e[i+6],9,-1069501632),f=a(f,m,h,p,e[i+11],14,643717713),p=a(p,f,m,h,e[i],20,-373897302),h=a(h,p,f,m,e[i+5],5,-701558691),m=a(m,h,p,f,e[i+10],9,38016083),f=a(f,m,h,p,e[i+15],14,-660478335),p=a(p,f,m,h,e[i+4],20,-405537848),h=a(h,p,f,m,e[i+9],5,568446438),m=a(m,h,p,f,e[i+14],9,-1019803690),f=a(f,m,h,p,e[i+3],14,-187363961),p=a(p,f,m,h,e[i+8],20,1163531501),h=a(h,p,f,m,e[i+13],5,-1444681467),m=a(m,h,p,f,e[i+2],9,-51403784),f=a(f,m,h,p,e[i+7],14,1735328473),h=o(h,p=a(p,f,m,h,e[i+12],20,-1926607734),f,m,e[i+5],4,-378558),m=o(m,h,p,f,e[i+8],11,-2022574463),f=o(f,m,h,p,e[i+11],16,1839030562),p=o(p,f,m,h,e[i+14],23,-35309556),h=o(h,p,f,m,e[i+1],4,-1530992060),m=o(m,h,p,f,e[i+4],11,1272893353),f=o(f,m,h,p,e[i+7],16,-155497632),p=o(p,f,m,h,e[i+10],23,-1094730640),h=o(h,p,f,m,e[i+13],4,681279174),m=o(m,h,p,f,e[i],11,-358537222),f=o(f,m,h,p,e[i+3],16,-722521979),p=o(p,f,m,h,e[i+6],23,76029189),h=o(h,p,f,m,e[i+9],4,-640364487),m=o(m,h,p,f,e[i+12],11,-421815835),f=o(f,m,h,p,e[i+15],16,530742520),h=s(h,p=o(p,f,m,h,e[i+2],23,-995338651),f,m,e[i],6,-198630844),m=s(m,h,p,f,e[i+7],10,1126891415),f=s(f,m,h,p,e[i+14],15,-1416354905),p=s(p,f,m,h,e[i+5],21,-57434055),h=s(h,p,f,m,e[i+12],6,1700485571),m=s(m,h,p,f,e[i+3],10,-1894986606),f=s(f,m,h,p,e[i+10],15,-1051523),p=s(p,f,m,h,e[i+1],21,-2054922799),h=s(h,p,f,m,e[i+8],6,1873313359),m=s(m,h,p,f,e[i+15],10,-30611744),f=s(f,m,h,p,e[i+6],15,-1560198380),p=s(p,f,m,h,e[i+13],21,1309151649),h=s(h,p,f,m,e[i+4],6,-145523070),m=s(m,h,p,f,e[i+11],10,-1120210379),f=s(f,m,h,p,e[i+2],15,718787259),p=s(p,f,m,h,e[i+9],21,-343485551),h=n(h,c),p=n(p,u),f=n(f,d),m=n(m,l);return[h,p,f,m]}function u(e){var t,n="",i=32*e.length;for(t=0;t<i;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function d(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function l(e){var t,n,i="0123456789abcdef",r="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),r+=i.charAt(t>>>4&15)+i.charAt(15&t);return r}function h(e){return unescape(encodeURIComponent(e))}function p(e){return function(e){return u(c(d(e),8*e.length))}(h(e))}function f(e,t){return function(e,t){var n,i,r=d(e),a=[],o=[];for(a[15]=o[15]=void 0,r.length>16&&(r=c(r,8*e.length)),n=0;n<16;n+=1)a[n]=909522486^r[n],o[n]=1549556828^r[n];return i=c(a.concat(d(t)),512+8*t.length),u(c(o.concat(i),640))}(h(e),h(t))}function m(e,t,n){return t?n?f(t,e):l(f(t,e)):n?p(e):l(p(e))}e.exports?e.exports=m:t.md5=m}(A)}(uK);var dK=uK.exports,lK=function(){function e(t){o(this,e),this.client_=t.client,this.signalChannel_=t.signalChannel,this.log_=Vx.createLogger({id:"mix|"+this.client_.getUserId(),userId:t.client.getUserId(),sdkAppId:t.client.getSDKAppId()}),this.isMixing_=!1,this.config_=null,this.data_=null,this.remoteStreamMap_=new Map,this.installEvents()}var t,i,r,s;return c(e,[{key:"isPresetLayoutMode",get:function(){return this.config_&&this.config_.mode===DI.PRESET_LAYOUT}},{key:"installEvents",value:function(){jA.on(lx,this.onStreamSubscribed,this),jA.on(hx,this.onStreamUnsubscribed,this),this.client_.on("stream-removed",this.onStreamRemoved,this)}},{key:"uninstallEvents",value:function(){jA.off(lx,this.onStreamSubscribed,this),jA.off(hx,this.onStreamUnsubscribed,this),this.client_.off("stream-removed",this.onStreamRemoved,this)}},{key:"reset",value:function(){this.uninstallEvents(),this.isMixing_=!1,this.config_=null}},{key:"onStreamSubscribed",value:function(e){var t=e.client,n=e.stream;t===this.client_&&(this.remoteStreamMap_.set(n.getId(),{remoteStream:n,isUsed:!1}),this.isMixing_&&this.hasAvailablePlaceHolder()&&this.startMixTranscode(this.config_))}},{key:"onStreamUnsubscribed",value:function(e){var t=e.client,n=e.stream;t===this.client_&&this.onStreamRemoved({stream:n})}},{key:"onStreamRemoved",value:function(e){var t=e.stream;if(this.remoteStreamMap_.has(t.getId())){var n=this.remoteStreamMap_.get(t.getId()).isUsed;this.remoteStreamMap_.delete(t.getId()),this.isMixing_&&this.isPresetLayoutMode&&n&&this.startMixTranscode(this.config_)}}},{key:"startMixTranscode",value:(s=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.resetIsUsedFlag(),this.config_=t,i=this.getInputParam(t,this.remoteStreamMap_),r=this.getOutputParam(t),a=this.getOutputSessionId({config:t,roomId:this.client_.getRoomId(),userId:this.client_.getUserId()}),!this.isMixing_||!this.data_||a===this.data_.outputSessionId){e.next=10;break}return this.log_.info("startMixTranscode() streamId changed, stop mixing before start"),e.next=10,this.doStopMixTranscode();case 10:return e.next=12,this.doStartMixTranscode({outputSessionId:a,inputParam:i,outputParam:r});case 12:e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(0),this.resetIsUsedFlag(),e.t0;case 18:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(e){return s.apply(this,arguments)})},{key:"doStartMixTranscode",value:(r=a(n().mark((function e(t){var i,r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.outputSessionId,r=t.inputParam,a=t.outputParam,o={roomId:String(this.client_.getRoomId()),mcuRequestTime:Date.now(),outputSessionId:i,inputParam:r,outputParam:a},this.data_=o,this.log_.info("startMixTranscode: ".concat(JSON.stringify(o))),this.isMixing_=!0,e.prev=5,e.next=8,this.signalChannel_.sendWaitForResponse({command:vD,data:o,timeout:5e3,responseCommand:eD.START_MIX_TRANSCODE_RES,commandDesc:"startMixTranscode"});case 8:if(s=e.sent,c=s.data,u=c.code,d=c.message,0===u){e.next=15;break}throw-102083===u&&(d="Please enable relayed-push in ".concat(cE," and try later, refer to ").concat(dE,"tutorial-26-advanced-publish-cdn-stream.html")),this.log_.error("startMixTranscode failed, errCode: ".concat(u," errMsg: ").concat(d)),this.isMixing_=!1,new kD({code:bD.START_MIX_TRANSCODE_FAILED,message:sA({key:qw,data:{message:d},link:{className:"Client",fnName:"startMixTranscode"}})});case 15:e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(5),this.isMixing_=!1,e.t0;case 21:case"end":return e.stop()}}),e,this,[[5,17]])}))),function(e){return r.apply(this,arguments)})},{key:"reStartMixTranscode",value:function(){this.isMixing_&&this.startMixTranscode(this.config_)}},{key:"stopMixTranscode",value:(i=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isMixing_){e.next=2;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Qw})});case 2:return e.next=4,this.doStopMixTranscode();case 4:this.resetIsUsedFlag();case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"doStopMixTranscode",value:(t=a(n().mark((function e(){var t,i,r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={mcuRequestTime:Date.now(),outputSessionId:this.data_.outputSessionId,streamType:this.data_.outputParam.streamType},this.log_.info("stopMixTranscode: ".concat(JSON.stringify(t))),e.next=4,this.signalChannel_.sendWaitForResponse({command:_D,data:t,timeout:5e3,responseCommand:eD.STOP_MIX_TRANSCODE_RES,commandDesc:"stopMixTranscode"});case 4:if(i=e.sent,r=i.data,a=r.code,o=r.message,0!==a){e.next=10;break}this.isMixing_=!1,e.next=12;break;case 10:throw this.log_.error("stopMixTranscode failed, errCode: ".concat(a," errMsg: ").concat(o)),new kD({code:bD.STOP_MIX_TRANSCODE_FAILED,message:sA({key:Kw,data:{message:o},link:{className:"Client",fnName:"stopMixTranscode"}})});case 12:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getOutputSessionId",value:function(e){var t=e.config,n=e.userId,i=e.roomId;return _A(t.streamId)&&t.streamId.length>0?t.streamId:dK("".concat(i,"_").concat(n,"_main"))}},{key:"getInputParam",value:function(e,t){var n=this,i=e.mixUsers.map((function(e){return{userId:e.userId,roomId:String(e.roomId||n.client_.getRoomId()),width:e.width||0,height:e.height||0,locationX:e.locationX||0,locationY:e.locationY||0,zOrder:e.zOrder,streamType:vA(e.streamType)||e.streamType!==HT?0:1,inputType:e.pureAudio?OI.IT_PURE_AUDIO:OI.IT_AUDIO_VIDEO,renderMode:e.renderMode||0}}));return e.mode===DI.PRESET_LAYOUT&&(i.forEach((function(e){if(e.userId===MI.REMOTE){var n=T(t.values()).find((function(e){return!e.isUsed}));n&&(e.userId=n.remoteStream.getUserId(),e.streamType=n.remoteStream.getType()===HT?1:0,n.isUsed=!0)}})),i=i.filter((function(e){return e.userId!==MI.REMOTE}))),i}},{key:"getOutputParam",value:function(e){var t=e.streamId||"";return{streamId:t,streamType:t.length>0?1:0,width:vA(e.videoWidth)?640:e.videoWidth,height:vA(e.videoHeight)?480:e.videoHeight,videoBps:e.videoBitrate||0,fps:e.videoFramerate||15,gop:e.videoGOP||2,audioSampleRate:e.audioSampleRate||48e3,audioBps:e.audioBitrate||64,audioChannels:e.audioChannels||1,backgroundColor:e.backgroundColor||0,backgroundImg:e.backgroundImage||"",extraInfo:"",videoCodec:2,audioCodec:0}}},{key:"hasAvailablePlaceHolder",value:function(){return!!this.isPresetLayoutMode&&this.data_.inputParam.length!==this.config_.mixUsers.length}},{key:"resetIsUsedFlag",value:function(){this.remoteStreamMap_.forEach((function(e){return e.isUsed=!1}))}}]),e}(),hK=function(){function e(t){o(this,e),this.client_=t.client,this.signalChannel_=t.signalChannel,this.publishTencentMainStreamObj_={params_:null,streamId_:void 0,isPublishing_:!1},this.publishTencentAuxStreamObj_={params_:null,streamId_:void 0,isPublishing_:!1},this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1}var t,i,r,s,u,d;return c(e,[{key:"setSignalChannel",value:function(e){this.signalChannel_=e.signalChannel}},{key:"getIsPublishingTencentCDN",value:function(){return this.publishTencentMainStreamObj_.isPublishing_||this.publishTencentAuxStreamObj_.isPublishing_}},{key:"getIsPublishingGivenCDN",value:function(){return this.isPublishingGivenCDN_}},{key:"generatePublishCDNStreamId",value:function(e,t){if(!e){var n="".concat(this.client_.getRoomId(),"_").concat(this.client_.getUserId(),"_").concat(t);return/^[A-Za-z\d_-]*$/.test(n)||(n=dK(n)),"".concat(this.client_.getSDKAppId(),"_").concat(n)}return e}},{key:"generatePublishCDNSessionId",value:function(e){return dK("".concat(this.client_.getRoomId(),"_").concat(this.client_.getUserId(),"_").concat(e))}},{key:"startPublishTencentCDN",value:(d=a(n().mark((function e(t){var i,r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.streamType===Gk?(this.publishTencentAuxStreamObj_.params_=t,this.publishTencentAuxStreamObj_.isPublishing_=!0):(this.publishTencentMainStreamObj_.params_=t,this.publishTencentMainStreamObj_.isPublishing_=!0),this.client_.isJoined_){e.next=3;break}return e.abrupt("return");case 3:return i=this.generatePublishCDNStreamId(t.streamId,t.streamType),r=this.generatePublishCDNSessionId(t.streamType),a=t.streamType===Gk?1:0,o={requestTime:Date.now(),sessionId:r,streamId:i,streamType:a},e.next=9,this.doStartPublishTencentCDN(o,t.streamType);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"doStartPublishTencentCDN",value:(u=a(n().mark((function e(t,i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Vx.info("startPublishTencentCDN: "+JSON.stringify(t)),e.next=4,this.signalChannel_.sendWaitForResponseWithRetry({command:hD,data:t,timeout:2e3,responseCommand:eD.START_PUBLISH_TENCENT_CDN_RES,commandDesc:"startPublishCDNStream",retries:2});case 4:if(r=e.sent,a=r.data,o=a.code,s=a.message,0!==o){e.next=10;break}i===Gk?this.publishTencentAuxStreamObj_.streamId_=t.streamId:this.publishTencentMainStreamObj_.streamId_=t.streamId,e.next=14;break;case 10:throw i===Gk?this.publishTencentAuxStreamObj_.isPublishing_=!1:this.publishTencentMainStreamObj_.isPublishing_=!1,-102083===o&&(s="Please enable relayed-push in ".concat(cE," and try later, refer to ").concat(dE,"tutorial-26-advanced-publish-cdn-stream.html")),Vx.error("startPublishTencentCDN failed, errCode: ".concat(o,", errMsg: ").concat(s)),new kD({code:bD.START_PUBLISH_CDN_FAILED,message:sA({key:yw,data:{message:s},link:{className:"Client",fnName:"startPublishCDNStream"}})});case 14:e.next=20;break;case 16:throw e.prev=16,e.t0=e.catch(0),i===Gk?this.publishTencentAuxStreamObj_.isPublishing_=!1:this.publishTencentMainStreamObj_.isPublishing_=!1,e.t0;case 20:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return u.apply(this,arguments)})},{key:"resetPublishTencentParam",value:function(e){e===rT&&(this.publishTencentMainStreamObj_={params_:null,streamId_:void 0,isPublishing_:!1}),e===Gk&&(this.publishTencentAuxStreamObj_={params_:null,streamId_:void 0,isPublishing_:!1})}},{key:"stopPublishTencentCDN",value:(s=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.client_.isJoined_){e.next=4;break}return this.resetPublishTencentParam(rT),this.resetPublishTencentParam(Gk),e.abrupt("return");case 4:if(!this.publishTencentMainStreamObj_.isPublishing_){e.next=7;break}return e.next=7,this.doStopPublishTencentCDN(rT);case 7:if(!this.publishTencentAuxStreamObj_.isPublishing_){e.next=10;break}return e.next=10,this.doStopPublishTencentCDN(Gk);case 10:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"doStopPublishTencentCDN",value:(r=a(n().mark((function e(t){var i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={requestTime:Date.now(),sessionId:dK("".concat(this.client_.getRoomId(),"_").concat(this.client_.getUserId(),"_").concat(t))},Vx.info("stopPublishTencentCDN: "+JSON.stringify(i)),e.next=4,this.signalChannel_.sendWaitForResponse({command:pD,data:i,timeout:5e3,responseCommand:eD.STOP_PUBLISH_TENCENT_CDN_RES,commandDesc:"stopPublishCDNStream"});case 4:if(r=e.sent,a=r.data,o=a.code,s=a.message,0!==o){e.next=10;break}this.resetPublishTencentParam(t),e.next=17;break;case 10:if(-102069!==o){e.next=15;break}Vx.warn("stopPublishTencentCDN failed, can not stopPublishTencentCDN in auto relayed-push mode"),this.resetPublishTencentParam(t),e.next=17;break;case 15:throw Vx.error("stopPublishTencentCDN failed, errCode: ".concat(o," errMsg: ").concat(s)),new kD({code:bD.STOP_PUBLISH_CDN_FAILED,message:sA({key:Sw,data:{message:s},link:{className:"Client",fnName:"stopPublishCDNStream"}})});case 17:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"startPublishGivenCDN",value:(i=a(n().mark((function e(t){var i,r,a,o,s,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.streamType===rT?this.publishTencentMainStreamObj_.streamId_:this.publishTencentAuxStreamObj_.streamId_,r={pushRequestTime:Date.now(),pushAppId:t.appId,pushBizId:t.bizId,pushCdnUrl:t.url,pushStreamType:t.streamType,pushStreamId:i},Vx.info("startPublishGivenCDN: "+JSON.stringify(r)),this.publishGivenCDNData_=r,this.isPublishingGivenCDN_=!0,this.client_.isJoined_){e.next=7;break}return e.abrupt("return");case 7:return e.prev=7,e.next=10,this.signalChannel_.sendWaitForResponse({command:fD,data:r,timeout:5e3,responseCommand:eD.START_PUBLISH_GIVEN_CDN_RES,commandDesc:"startPublishCDNStream"});case 10:if(a=e.sent,o=a.data,s=o.code,c=o.message,0===s){e.next=17;break}throw Vx.error("startPublishGivenCDN failed, errCode: ".concat(s,", errMsg: ").concat(c)),this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1,new kD({code:bD.START_PUBLISH_CDN_FAILED,message:sA({key:yw,data:{message:c},link:{className:"Client",fnName:"startPublishCDNStream"}})});case 17:e.next=24;break;case 19:throw e.prev=19,e.t0=e.catch(7),this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1,e.t0;case 24:case"end":return e.stop()}}),e,this,[[7,19]])}))),function(e){return i.apply(this,arguments)})},{key:"stopPublishGivenCDN",value:(t=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.client_.isJoined_){e.next=4;break}return this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1,e.abrupt("return");case 4:return t=this.publishGivenCDNData_,i=t.pushAppId,r=t.pushBizId,a=t.pushCdnUrl,o=t.pushStreamType,s={pushRequestTime:Date.now(),pushAppId:i,pushBizId:r,pushCdnUrl:a,pushStreamType:o},Vx.info("stopPublishGivenCDN: "+JSON.stringify(s)),e.next=9,this.signalChannel_.sendWaitForResponse({command:mD,data:s,timeout:5e3,responseCommand:eD.STOP_PUBLISH_GIVEN_CDN_RES,commandDesc:"stopPublishCDNStream"});case 9:if(c=e.sent,u=c.data,d=u.code,l=u.message,0!==d){e.next=16;break}this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1,e.next=18;break;case 16:throw Vx.error("stopPublishGivenCDN failed, errCode: ".concat(d," errMsg: ").concat(l)),new kD({code:bD.STOP_PUBLISH_CDN_FAILED,message:sA({key:Sw,data:{message:l},link:{className:"Client",fnName:"stopPublishCDNStream"}})});case 18:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"handleCDNConfigForJoinData",value:function(e){var t,n=e;if(this.publishTencentMainStreamObj_.isPublishing_||this.publishTencentAuxStreamObj_.isPublishing_){var i={};_A(n)&&(i=JSON.parse(n)),i.Str_uc_params||(i.Str_uc_params={}),this.publishTencentMainStreamObj_.isPublishing_&&(this.publishTencentMainStreamObj_.streamId_?i.Str_uc_params.userdefine_streamid_main=this.publishTencentMainStreamObj_.streamId_:this.publishTencentMainStreamObj_.params_&&(i.Str_uc_params.userdefine_streamid_main=this.generatePublishCDNStreamId(this.publishTencentMainStreamObj_.params_.streamId,rT))),this.publishTencentAuxStreamObj_.isPublishing_&&(this.publishTencentAuxStreamObj_.streamId_?i.Str_uc_params.userdefine_streamid_aux=this.publishTencentAuxStreamObj_.streamId_:this.publishTencentAuxStreamObj_.params_&&(i.Str_uc_params.userdefine_streamid_aux=this.generatePublishCDNStreamId(this.publishTencentAuxStreamObj_.params_.streamId,Gk))),n=JSON.stringify(i)}if(this.isPublishingGivenCDN_){var r=this.publishGivenCDNData_,a=r.pushAppId,o=r.pushBizId,s=r.pushCdnUrl,c=r.pushStreamType,u=r.pushStreamId;t={pushRequestTime:Date.now(),pushAppId:a,pushBizId:o,pushCdnUrl:s,pushStreamType:c,pushStreamId:u}}return{bussinessInfo:n,pushUserCdnInfo:t}}},{key:"reset",value:function(){this.resetPublishTencentParam(rT),this.resetPublishTencentParam(Gk),this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1}}]),e}(),pK=function(){function e(t){o(this,e),this.client_=t.client,this.durationMap_=new Map,this.installEvents()}return c(e,[{key:"installEvents",value:function(){jA.on(lx,this.handleSubscribed,this),jA.on(cx,this.handleStreamTrackUpdated,this),jA.on(hx,this.handleStreamStopped,this),jA.on(fx,this.handleStreamStopped,this)}},{key:"uninstallEvents",value:function(){jA.off(lx,this.handleSubscribed,this),jA.off(cx,this.handleStreamTrackUpdated,this),jA.off(hx,this.handleStreamStopped,this),jA.off(fx,this.handleStreamStopped,this)}},{key:"handleSubscribed",value:function(e){var t=e.client,n=e.stream;if(t===this.client_){var i=n.getUserId(),r=n.getType(),a="".concat(i,"_").concat(r);if(n.hasAudio())if(n.isMainAudioSubscribed){var o=new oK,s=this.durationMap_.get(a);s?this.isRecording(s.audio)||s.audio.push(o):this.durationMap_.set(a,{userId:i,type:r,audio:[o],video:[]})}else this.stopDurationItem(a,Uk);if(n.hasVideo())if(r===BT&&n.isMainVideoSubscribed||r===HT&&n.isAuxVideoSubscribed){var c=new oK,u=this.durationMap_.get(a);u?this.isRecording(u.video)||u.video.push(c):this.durationMap_.set(a,{userId:i,type:r,audio:[],video:[c]})}else this.stopDurationItem(a,Vk)}}},{key:"handleStreamStopped",value:function(e){var t=e.client,n=e.stream;if(this.clientHitTest(t)){var i=n.getUserId(),r=n.getType(),a="".concat(i,"_").concat(r);this.stopDurationItem(a,Uk),this.stopDurationItem(a,Vk)}}},{key:"handleStreamTrackUpdated",value:function(e){var t=e.client,n=e.userId,i=e.tinyId,r=e.kind,a=e.action;if(this.clientHitTest(t)&&this.client_.getConnections().has(i)){var o=r===Hk?r:BT,s="".concat(n,"_").concat(o);if(a===jI.ADD){var c=this.client_.getConnections().get(i).getSubscribeState();if(r===Uk&&!c.audio||r===Vk&&!c.video||r===Hk&&!c.auxiliary)return;var u=new oK,d=this.durationMap_.get(s);d?(r!==Uk||this.isRecording(d.audio)||d.audio.push(u),r===Uk||this.isRecording(d.video)||d.video.push(u)):this.durationMap_.set(s,{userId:n,type:o,audio:r===Uk?[u]:[],video:r===Uk?[]:[u]})}else this.stopDurationItem(s,r===Uk?Uk:Vk)}}},{key:"isRecording",value:function(e){return e.findIndex((function(e){return 0===e.endTime}))>=0}},{key:"stopDurationItem",value:function(e,t){if(this.durationMap_.has(e)){var n=this.durationMap_.get(e)[t].find((function(e){return 0===e.endTime}));n&&n.stop()}}},{key:"clientHitTest",value:function(e){return this.client_===e}},{key:"getDuration",value:function(e,t){return this.durationMap_.has(e)?this.durationMap_.get(e)[t].reduce((function(e,t){return e+t.getDuration()}),0):0}},{key:"getDurationMap",value:function(){return this.durationMap_}},{key:"reset",value:function(){this.durationMap_.clear()}},{key:"destroy",value:function(){this.client_=null,this.uninstallEvents()}}]),e}();function fK(){return function(e,t,i){var r=i.value,o=new Set;return i.value=a(n().mark((function e(){var i,a,s,c,u=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.has(this)){e.next=2;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:DE,data:{name:t}})});case 2:for(e.prev=2,o.add(this),i=u.length,a=new Array(i),s=0;s<i;s++)a[s]=u[s];return e.next=7,r.apply(this,a);case 7:return c=e.sent,o.delete(this),e.abrupt("return",c);case 12:throw e.prev=12,e.t0=e.catch(2),o.delete(this),e.t0;case 16:case"end":return e.stop()}}),e,this,[[2,12]])}))),i}}function mK(e){return vK.apply(this,arguments)}function vK(){return vK=a(n().mark((function e(t){var i,r,a,o,s,c,u,d,l,h,p,f,m;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.userId,r=t.sdkAppId,a=t.useStringRoomId,o=t.roomId,s=t.userSig,c={delta:0,count:[1,1],msg:[]},e.prev=2,(u=new FormData).append("userId",String(i)),u.append("sdkAppId",String(r)),u.append("isStrGroupId",a),u.append("groupId",String(o)),u.append("sdkVersion",Wa),u.append("userSig",String(s)),YI&&u.append("oversea",!0),d=EA(),e.next=14,bK(u,c,r);case 14:return(l=e.sent).config&&l.config.loggerDomain&&xT(l.config.loggerDomain),c.delta=EA()-d,_K({stat:c,userId:i}),e.abrupt("return",l);case 21:throw e.prev=21,e.t0=e.catch(2),h=bA(e.t0)?e.t0[0]:e.t0,p=gA(h.code)?h.code:0,f="get websocket url failed: ".concat(h.message.includes("timeout")?"timeout":h.message),m=new kD({code:bD.SCHEDULE_FAILED,extraCode:p,message:sA({key:tw,data:{error:f,code:p}})}),Vx.error(m),_K({stat:c,userId:i,roomId:o,error:m}),m;case 30:case"end":return e.stop()}}),e,null,[[2,21]])}))),vK.apply(this,arguments)}function _K(e){var t=e.stat,n=e.userId,i=e.error;i?lM.logFailedEvent({eventType:RI,error:i,userId:n}):lM.logSuccessEvent({eventType:RI,delta:t.delta,userId:n}),lM.uploadEvent({log:"stat-schedule:"+JSON.stringify(t),userId:n})}function gK(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rT;return t=YI||(uA(e)?n===rT?XI:$I:n===rT?KI:QI),"https://".concat(t,"/api/v1/config")}function yK(e,t,n){return new Promise((function(i,r){UA({url:e,body:t,timeout:n.timeout}).then((function(e){0===e.data.code?i(e.data.data):r({code:e.data.code,message:e.data.msg})})).catch(r)}))}var SK=function(e,t){return Mx({retryFunction:yK,settings:{retries:3,timeout:0},onError:t,onRetrying:e})};function bK(e,t,n){return new Promise((function(i,r){var a,o=null;(a=[SK((function(e){return t.count[0]=e+1}),(function(e,n){t.msg[0]=e.message,o||n()}))(gK(n,rT),e,{get timeout(){return 1e3*pA(2+t.count[0])}}),SK((function(e){return t.count[1]=e+1}),(function(e,n){t.msg[1]=e.message,o||n()}))(gK(n,aT),e,{get timeout(){return 1e3*pA(2+t.count[1])}})],new Promise((function(e,t){var n=[];a.forEach((function(i){i.then(e).catch((function(e){n.push(e),n.length===a.length&&t(n)}))}))}))).then((function(e){i(o=e)})).catch(r)}))}var kK=function(){function e(){o(this,e)}return c(e,[{key:"call",value:function(e,t){return mA(this[e])?this[e](t):Promise.reject(new kD({code:bD.INVALID_PARAMETER,message:sA({key:TR,data:{name:e}})}))}},{key:"updatePrivateMapKey",value:function(e){var t=e.privateMapKey;return e.client.setProperty("privateMapKey",t),Promise.resolve()}}]),e}(),TK=new kK;var IK,EK,wK,RK,CK,AK,xK,PK,DK,MK,OK,NK,LK,UK,VK,FK,jK,BK,HK,GK,zK,WK,JK,qK,KK,QK,XK,$K,YK,ZK,eQ,tQ,nQ,iQ,rQ,aQ,oQ,sQ,cQ,uQ,dQ,lQ,hQ,pQ,fQ,mQ,vQ=function(){function e(t){o(this,e),this.userId=t.userId,this.audioCtx=t.audioContext,this.log=t.log,this.initWorklet=t.initWorklet,this.destination=this.audioCtx.destination,this.maxDistance=t.maxDistance,this.panNode=new PannerNode(this.audioCtx,{panningModel:"HRTF",distanceModel:"linear",positionX:0,positionY:0,positionZ:0,orientationX:0,orientationY:0,orientationZ:-1,refDistance:1,maxDistance:this.maxDistance,rolloffFactor:1,coneOuterGain:.4}),this.gainNode=this.audioCtx.createGain(),this.gainNode.gain.value=1,this.gainNode.connect(this.panNode),this.panNode.connect(this.destination),this.pcmPlayer=null,this.isPlaying=!1}var t;return c(e,[{key:"set3DSpatialReceivingRange",value:function(e){this.maxDistance=e}},{key:"updateRemote3DSpatialPosition",value:function(e){var t=k(e,3),n=t[0],i=t[1],r=t[2];this.panNode.positionX.value=n,this.panNode.positionY.value=r,this.panNode.positionZ.value=-i}},{key:"play",value:(t=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.pcmPlayer){e.next=10;break}e.prev=1,this.pcmPlayer=new AudioWorkletNode(this.audioCtx,"player",{numberOfOutputs:1,outputChannelCount:[2]}),e.next=10;break;case 5:return e.prev=5,e.t0=e.catch(1),e.next=9,this.initWorklet();case 9:this.pcmPlayer=new AudioWorkletNode(this.audioCtx,"player",{numberOfOutputs:1,outputChannelCount:[2]});case 10:this.pcmPlayer?(this.pcmPlayer.connect(this.gainNode),this.isPlaying=!0,this.log.info(this.userId+"play spatial effect success.")):this.log.debug(this.userId+"init spatial player failed.");case 11:case"end":return e.stop()}}),e,this,[[1,5]])}))),function(){return t.apply(this,arguments)})},{key:"stop",value:function(){this.isPlaying=!1,this.log.debug(this.userId+"stop play spatial effect.")}},{key:"setAudioVolume",value:function(e){e>=0&&e<=1&&(this.gainNode.gain.value=e)}},{key:"feed",value:function(e){this.isPlaying&&this.pcmPlayer.port.postMessage({type:"feed",data:e[0]})}},{key:"destroy",value:function(){var e,t,n,i;null===(e=this.gainNode)||void 0===e||e.disconnect(),null===(t=this.panNode)||void 0===t||t.disconnect(),null===(n=this.pcmPlayer)||void 0===n||null===(i=n.port)||void 0===i||i.postMessage({type:"stop"})}}]),e}(),_Q=new Blob(['class t extends AudioWorkletProcessor{constructor(){super(),this.isStop=!1,this.buffer=new Float32Array(0),this.port.onmessage=t=>{const{type:e,data:s}=t.data;if("feed"===e){const t=new Float32Array(this.buffer.length+s.length);t.set(this.buffer,0),t.set(s,this.buffer.length),this.buffer=t,this.buffer.length>4800&&(this.buffer=this.buffer.slice(0,2880))}"stop"===e&&(this.isStop=!0)}}process(t,e){if(this.isStop)return!1;const s=e[0],r=s[0].length;if(this.buffer.length>r&&this.buffer.length>0){for(let t=0;t<2;t++){const e=s[t],r=this.buffer.slice(0,e.length);for(let t=0;t<e.length;++t)e[t]=r[t]}this.buffer=this.buffer.slice(r)}return!0}}registerProcessor("player",t)'],{type:"application/javascript"}),gQ=function(){function e(t){var n=t.client,i=t.log;o(this,e),this.client_=n,this.log_=i,this.audioContext_=PA(),this.addModuleSuccess_=!1,this.listener_=this.audioContext_.listener,this.maxDistance_=1e4,this.userMap_=new Map,this.position_=[0,0,0],this.axisForward_=[],this.axisRight_=[],this.axisUp_=[],this.initWorklet()}var t;return c(e,[{key:"initWorklet",value:(t=a(n().mark((function e(){var t=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.audioContext_.audioWorklet.addModule(URL.createObjectURL(_Q)).then((function(){t.addModuleSuccess_=!0}));case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"play",value:function(e){this.userMap_.has(e)&&this.userMap_.get(e).spatialPlayer.play()}},{key:"stop",value:function(e){this.userMap_.has(e)&&this.userMap_.get(e).spatialPlayer.stop()}},{key:"setAudioVolume",value:function(e,t){this.userMap_.has(e)&&this.userMap_.get(e).spatialPlayer.setAudioVolume(t)}},{key:"updateSelfPosition",value:function(e,t,n,i){e&&(this.position_=e,this.listener_.positionX.value=e[0],this.listener_.positionZ.value=0-e[1],this.listener_.positionY.value=e[2]),t&&(this.axisRight_=t),n&&(this.axisForward_=n,this.listener_.forwardX.value=n[0],this.listener_.forwardZ.value=-n[1],this.listener_.forwardY.value=n[2]),i&&(this.axisUp_=i,this.listener_.upX.value=i[0],this.listener_.upY.value=i[2],this.listener_.upZ.value=-i[1])}},{key:"updateRemote3DSpatialPosition",value:function(e,t){this.userMap_.has(e)&&this.userMap_.get(e).spatialPlayer.updateRemote3DSpatialPosition(t)}},{key:"updateMaxDistance",value:function(e){this.maxDistance_=e;var t,n=w(this.userMap_.values());try{for(n.s();!(t=n.n()).done;){t.value.spatialPlayer.set3DSpatialReceivingRange(this.maxDistance_)}}catch(i){n.e(i)}finally{n.f()}}},{key:"createSpatialPlayer",value:function(e){var t=e.userId,n=e.connection,i=new vQ({userId:this.client_.getUserId(),initWorklet:this.initWorklet,audioContext:this.audioContext_,maxDistance:this.maxDistance_,log:this.log_});return this.userMap_.set(t,{spatialPlayer:i,connection:n}),i}},{key:"resume",value:function(){var e;"suspended"===(null===(e=this.audioContext_)||void 0===e?void 0:e.state)&&this.audioContext_.resume()}},{key:"reset",value:function(){var e=this;this.userMap_.forEach((function(t,n){var i=t.spatialPlayer;null==i||i.destroy(),e.userMap_.delete(n)}))}},{key:"delete",value:function(e){this.userMap_.delete(e)}}]),e}(),yQ=(IK=fK(),EK=XJ(KJ.CLIENT.join),wK=fK(),RK=aq({retries:3}),CK=fK(),AK=XJ.apply(void 0,T(KJ.CLIENT.publish)),xK=mq(tE),PK=fK(),DK=XJ(KJ.CLIENT.unpublish),MK=XJ.apply(void 0,T(KJ.CLIENT.subscribe)),OK=XJ(KJ.CLIENT.unsubscribe),NK=fK(),LK=XJ(KJ.CLIENT.switchRole),UK=mq(tE),VK=XJ(KJ.CLIENT.startPublishCDNStream),FK=mq(tE),jK=mq(tE),BK=XJ(KJ.CLIENT.startMixTranscode),HK=mq(tE),GK=mq(tE),zK=mq(tE),WK=mq(tE),JK=mq(tE),qK=mq(tE),KK=mq(tE),QK=QJ.apply(void 0,T(KJ.CLIENT.sendSEIMessage)),XK=mq(tE),aQ={timesInSecond:30,maxSizeInSecond:8e3,getSize:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t[0].byteLength}},oQ=aQ.timesInSecond,sQ=aQ.maxSizeInSecond,cQ=aQ.getSize,$K=function(e,t,n){var i=n.value,r=new Map;return jA.on(tx,(function(e){var t=e.client;return r.delete(t)})),n.value=function(){var e=r.get(this);e||(e={callCountInSecond:0,timestamp:0,totalSizeInSecond:0},r.set(this,e)),0===e.timestamp?e.timestamp=Date.now():Date.now()-e.timestamp>1e3&&(e.timestamp=Date.now(),e.callCountInSecond=0,e.totalSizeInSecond=0);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];if(cQ&&(e.totalSizeInSecond+=cQ.apply(void 0,a)),0!==e.timestamp&&Date.now()-e.timestamp<1e3&&(e.callCountInSecond>=oQ||e.totalSizeInSecond>sQ))throw new kD({code:bD.INVALID_OPERATION,message:sA({key:DR,data:{isTimes:e.callCountInSecond>=oQ,isSize:e.totalSizeInSecond>sQ,name:t,timesInSecond:oQ,maxSizeInSecond:sQ}})});return e.callCountInSecond++,i.apply(this,a)},n},YK=QJ(KJ.CLIENT.enable3DSpatialAudioEffect),ZK=QJ.apply(void 0,T(KJ.CLIENT.updateSelf3DSpatialPosition)),eQ=QJ.apply(void 0,T(KJ.CLIENT.updateRemote3DSpatialPosition)),tQ=QJ(KJ.CLIENT.set3DSpatialReceivingRange),nQ=mq(tE),iQ=mq(tE),rQ=function(){function Client(e){var t,n;o(this,Client),this.name_=tE,this.mode_=e.mode,this.sdpSemantics_=PI,vA(e.sdpSemantics)?function(){var e;if(vA(window.RTCRtpTransceiver))return!1;if(!("currentDirection"in RTCRtpTransceiver.prototype))return!1;var t=null,n=!1;try{(t=new RTCPeerConnection({sdpSemantics:xI})).addTransceiver(Uk),n=!0}catch(IQ){}return null===(e=t)||void 0===e||e.close(),n}()&&(this.sdpSemantics_=xI):this.sdpSemantics_=e.sdpSemantics,this.sdkAppId_=e.sdkAppId,this.userId_=e.userId,this.log_=Vx.createLogger({id:"c".concat(e.seq,"|").concat(this.userId_),userId:this.userId_,sdkAppId:this.sdkAppId_}),this.userSig_=e.userSig,this.roomId_=0,this.useStringRoomId_=e.useStringRoomId||!1,this.pureAudioPushMode_=null,this.version_=e.version,this.log_.info("using sdpSemantics: "+this.sdpSemantics_),this.signalChannel_=null,this.role_=LT,this.privateMapKey_="",this.tinyId_=0,this.env_="",this.proxy_=null,this.unifiedProxy_=null,this.connections_=new Map,this.mutedStates_=new Map,this.userMap_=new Map,this.syncUserListInterval_=-1,this.localStream_=null,this.localAuxStream_=null,this.uplinkConnection_=null,this.emitter_=OA(new FA,this.name_),this.isJoined_=!1,this.heartbeat_=-1,this.lastHeartBeatTime_=-1,this.stats_=new QO(this),this.joinTimeout_=-1,this.changeBigSmallRecords_=new Map,this.networkQuality_=null,this.badCaseDetector_=null,this.networkType_=lA(),this.autoSubscribe_=!!vA(e.autoSubscribe)||e.autoSubscribe,this.joinedTimestamp_=0,this.joinOptions_={},this.basis_=(n={browser:rA().name+"/"+rA().version,os:DO(),displayResolution:MO(),isScreenShareSupported:yO(),isWebRTCSupported:uO(),isGetUserMediaSupported:OO(),isWebAudioSupported:NO(),isWebSocketsSupported:"WebSocket"in window&&2===window.WebSocket.CLOSING,isWebCodecSupported:(t={AudioDecoder:!1,AudioEncoder:!1,VideoDecoder:!1,VideoEncoder:!1,ImageDecoder:!1},vA(window.AudioDecoder)||(t.AudioDecoder=!0),vA(window.AudioEncoder)||(t.AudioEncoder=!0),vA(window.VideoDecoder)||(t.VideoDecoder=!0),vA(window.VideoEncoder)||(t.VideoEncoder=!0),vA(window.ImageDecoder)||(t.ImageDecoder=!0),t),isMediaSessionSupported:"mediaSession"in navigator&&!vA(navigator.mediaSession.setActionHandler),isWebTransportSupported:!vA(window.WebTransport)},navigator.userAgent.includes("miniProgram")&&(n.browser="mini/".concat(n.browser)),n),this.initBussinessInfo_(e),this.publishedCDN_=!1,this.publishCDNData_=null,this.mixedMCU_=!1,this.mixTranscodeData_=null,this.checkSystemResult_=null,this.enableAudioVolumeEvaluation_=!1,this.audioVolumeIntervalId_=null,this.mixTranscodeManager_=null,this.publishCDNManager_=new hK({client:this}),this.keyPointManager_=new pq({client:this,frameWorkType:e.frameWorkType,component:e.component}),this.isPublishing_=!1,this.isEnableSmallStream_=!1,this.smallStreamConfig_={bitrate:100,frameRate:15,height:120,width:160},this.turnServers_=[],this.iceTransportPolicy_=e.iceTransportPolicy,this.schedule_={domains:null,iceServers:null,iceTransportPolicy:null,trtcCapability:null},this.enableAutoPlayDialog_=!!vA(e.enableAutoPlayDialog)||e.enableAutoPlayDialog,this.enableMultiAuxStream_=!vA(e.enableMultiAuxStream)&&e.enableMultiAuxStream,this.signalInfo_={},this.enableSEI_=!vA(e.enableSEI)&&e.enableSEI,this.enableSpatial_=!1,this.spatialManager_=null,this.isDestroyed_=!1}var e,i,r,s,u,d,l,h,p,f,m,v,_,g,y,S,b,I,E,R,C,A,x,P,D,M,O;return c(Client,[{key:"initBussinessInfo_",value:function(e){this.bussinessInfo_=e.bussinessInfo;var t={};if(_A(e.bussinessInfo)&&(t=JSON.parse(e.bussinessInfo)),!vA(e.pureAudioPushMode)){if(!Number.isInteger(Number(e.pureAudioPushMode)))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:JE})});this.pureAudioPushMode_=e.pureAudioPushMode,t.Str_uc_params||(t.Str_uc_params={}),t.Str_uc_params.pure_audio_push_mod=this.pureAudioPushMode_}if(!vA(e.streamId)){if(!(_A(e.streamId)&&String(e.streamId)&&String(e.streamId).length<=64))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:qE})});t.Str_uc_params||(t.Str_uc_params={}),t.Str_uc_params.userdefine_streamid_main=e.streamId}if(!vA(e.userDefineRecordId)){if(null===e.userDefineRecordId.match(/^[A-Za-z0-9_-]{1,64}$/gi))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:KE})});t.Str_uc_params||(t.Str_uc_params={}),t.Str_uc_params.userdefine_record_id=e.userDefineRecordId}if(!vA(e.userDefinePushArgs)){if(!(_A(e.userDefinePushArgs)&&String(e.userDefinePushArgs)&&String(e.userDefinePushArgs).length<=256))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:QE})});t.Str_uc_params||(t.Str_uc_params={}),t.Str_uc_params.userdefine_push_args=e.userDefinePushArgs}uM(t)||(this.bussinessInfo_=JSON.stringify(t))}},{key:"schedule",value:(O=a(n().mark((function e(i){var r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mK({userId:this.userId_,sdkAppId:this.sdkAppId_,roomId:i,useStringRoomId:this.useStringRoomId_,version:this.version_,userSig:this.userSig_});case 2:(r=e.sent)&&(this.log_.info("schedule: ".concat(JSON.stringify(r))),r.trtcCapability=null==r?void 0:r.trtcAutoConf,this.schedule_=t(t({},this.schedule_),r),jA.emit(nx,this.schedule_));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return O.apply(this,arguments)})},{key:"getSignalChannelUrl",value:function(){var e={mainUrl:"",backupUrl:""},t=cA();return t?e.mainUrl=e.backupUrl="wss://".concat(t,".rtc.qq.com"):this.proxy_?e.mainUrl=e.backupUrl=this.proxy_:this.unifiedProxy_?e.mainUrl=e.backupUrl="wss://".concat(this.unifiedProxy_):Array.isArray(this.schedule_.domains)&&this.schedule_.domains.length>0&&(e.mainUrl=e.backupUrl="wss://".concat(this.schedule_.domains[0]),this.schedule_.domains[1]&&(e.backupUrl="wss://".concat(this.schedule_.domains[1]))),e}},{key:"getUserId",value:function(){return this.userId_}},{key:"getUserSig",value:function(){return this.userSig_}},{key:"getRole",value:function(){return this.role_}},{key:"getSignalInfo",value:function(){return this.signalInfo_}},{key:"getRoomId",value:function(){return this.roomId_}},{key:"getSDKAppId",value:function(){return this.sdkAppId_}},{key:"getTinyId",value:function(){return this.tinyId_}},{key:"getIceTransportPolicy",value:function(){return this.iceTransportPolicy_||this.schedule_.iceTransportPolicy||"all"}},{key:"initialize",value:function(e){var t=this;this.log_.info("setup signal channel");var n=this.getSignalChannelUrl(),i=n.mainUrl,r=n.backupUrl;return this.signalChannel_=new hM({sdkAppId:this.sdkAppId_,userId:this.userId_,userSig:this.userSig_,roomId:e.roomId,url:i,backupUrl:r,signalDomainWhenUnifiedProxy:this.unifiedProxy_?this.schedule_.domains[0]:void 0,client:this}),this.networkQuality_||(this.networkQuality_=new XO({connections:this.connections_,signalChannel:this.signalChannel_,userId:this.userId_,client:this}),this.networkQuality_.on(BO.NETWORK_QUALITY,(function(e){t.emitter_.emit(BO.NETWORK_QUALITY,e)}))),this.deviceDetector_||(this.deviceDetector_=new $O({client:this})),this.subscriptionManager_||(this.subscriptionManager_=new gq({client:this})),this.badCaseDetector_||(this.badCaseDetector_=new sK({client:this,stats:this.stats_})),this.callDurationCalculator_||(this.callDurationCalculator_=new pK({client:this})),this.mixTranscodeManager_||(this.mixTranscodeManager_=new lK({client:this,signalChannel:this.signalChannel_})),this.publishCDNManager_&&this.publishCDNManager_.setSignalChannel({signalChannel:this.signalChannel_}),this.signalChannel_.on(WP,(function(e){t.log_.info("SignalChannel state changed from ".concat(e.prevState," to ").concat(e.state)),t.emitter_.emit(BO.CONNECTION_STATE_CHANGED,e)})),this.signalChannel_.on(qP,(function(e){t.reset(),t.emitter_.emit(BO.ERROR,e)})),this.signalChannel_.once(GP,(function(e){t.tinyId_=e.signalInfo.tinyId,jA.emit(ZA,{client:t})})),this.signalChannel_.on(eD.PEER_JOIN,this.onPeerJoin,this),this.signalChannel_.on(eD.PEER_LEAVE,this.onPeerLeave,this),this.signalChannel_.on(eD.UPDATE_REMOTE_MUTE_STAT,(function(e){Date.now()-t.lastHeartBeatTime_>=1e4&&t.doHeartbeat(),jA.emit(XA,{client:t,data:e.data}),t.onPublishedUserList(e.data),t.onUpdateRemoteMuteStat(e.data)})),this.signalChannel_.on(eD.CLIENT_BANNED,(function(e){var n,i=e.data.data.reason;if(lM.uploadEvent({log:"stat-banned:".concat(i),userId:t.userId_}),i===oT)n="you got banned by the admin";else if(i===sT)n="duplicated userId joining the room";else if(i===uT)n="the room has been disbanded by the admin",i=i.replace("_","-");else if(i===cT)return t.log_.warn("".concat(i," last heart beat time: ").concat(t.lastHeartBeatTime_," interval: ").concat(Date.now()-t.lastHeartBeatTime_,", visibility: ").concat(document.visibilityState)),void t.reJoin();t.log_["kick"===i?"error":"info"]("user was banned because of [".concat(i,"]")),t.reset(),t.emitter_.emit(BO.CLIENT_BANNED,{reason:i,message:sA({key:mw,data:{message:n,reason:i}})||i})})),jA.emit(YA,{client:this}),this.signalChannel_.connect()}},{key:"preJoin",value:(M=a(n().mark((function e(t){var i,r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.joinOptions_=t,e.next=3,vO();case 3:if(this.checkSystemResult_=e.sent,this.checkDestroy(),(i=cA())||(i=TT,this.proxy_&&(this.proxy_.startsWith(bT)?i=IT:this.proxy_.startsWith(kT)&&(i=ET))),this.env_=i,lM.setConfig({env:i,sdkAppId:this.sdkAppId_,userId:this.userId_,roomId:t.roomId}),this.uploadTrtcStats(),r=this.checkSystemResult_.detail,a=r.isH264EncodeSupported,o=r.isVp8EncodeSupported,uO()&&(a||o)){e.next=13;break}throw new kD({code:bD.NOT_SUPPORTED,message:sA({key:lR})});case 13:case"end":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:"join",value:(D=a(n().mark((function e(t){var i,r=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.roomId_=t.roomId,vA(t.role)||(this.role_=t.role),vA(t.privateMapKey)||(this.privateMapKey_=t.privateMapKey),i=EA(),jA.emit(BA,{client:this}),oM(this.userId_,{eventId:HD,eventDesc:"joining room",timestamp:i_(),userId:this.userId_,tinyId:this.tinyId_}),e.next=8,this.preJoin(t);case 8:return e.abrupt("return",new Promise(function(){var e=a(n().mark((function e(a,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.joinReject_=o,e.prev=1,r.proxy_||r.schedule_.domains){e.next=5;break}return e.next=5,r.schedule(t.roomId);case 5:return r.checkDestroy(),e.next=8,r.initialize(t);case 8:return e.next=10,r.doJoin(t);case 10:r.signalInfo_=r.signalChannel_.getSignalInfo(),jA.emit(zA,{client:r}),r.joinedTimestamp_=EA(),lM.logSuccessEvent({userId:r.userId_,eventType:iI,delta:r.joinedTimestamp_-i}),lM.logSuccessEvent({userId:r.userId_,eventType:nI}),lM.uploadEvent({log:"stat-autoplay-dialog:".concat(r.enableAutoPlayDialog_),userId:r.userId_}),lM.uploadEvent({log:"stat-conv-".concat(tA,"-").concat(location.hostname),userId:r.userId_}),a(),e.next=26;break;case 20:e.prev=20,e.t0=e.catch(1),jA.emit(WA,{client:r,error:e.t0}),lM.logFailedEvent({userId:r.userId_,eventType:nI,error:e.t0}),r.reset(),o(e.t0);case 26:r.joinReject_=null;case 27:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(t,n){return e.apply(this,arguments)}}()));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return D.apply(this,arguments)})},{key:"checkDestroy",value:function(){if(this.isDestroyed_)throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Jw,data:{funName:"join"}})})}},{key:"uploadTrtcStats",value:(P=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l,h,p,f;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,TQ.getMicrophones();case 3:r=e.sent,t=r&&r.length,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:return e.prev=9,e.next=12,TQ.getCameras();case 12:a=e.sent,i=a&&a.length,e.next=18;break;case 16:e.prev=16,e.t1=e.catch(9);case 18:o={microphone:t,camera:i},s=this.checkSystemResult_.detail,c=s.isH264EncodeSupported,u=s.isVp8EncodeSupported,d=s.isH264DecodeSupported,l=s.isVp8DecodeSupported,h={webRTC:this.basis_.isWebRTCSupported,getUserMedia:this.basis_.isGetUserMediaSupported,webSocket:this.basis_.isWebSocketsSupported,screenShare:this.basis_.isScreenShareSupported,webAudio:this.basis_.isWebAudioSupported,h264Encode:c,h264Decode:d,vp8Encode:u,vp8Decode:l},p={browser:this.basis_.browser,os:this.basis_.os,trtc:h,devices:o},f={isWebCodecSupported:this.basis_.isWebCodecSupported,isMediaSessionSupported:this.basis_.isMediaSessionSupported,isWebTransportSupported:this.basis_.isWebTransportSupported},lM.uploadEvent({log:"trtcstats-"+JSON.stringify(p),userId:this.userId_}),this.log_.info("TrtcStats-"+JSON.stringify(p)),lM.uploadEvent({log:"trtcadvancedstats-"+JSON.stringify(f),userId:this.userId_});case 26:case"end":return e.stop()}}),e,this,[[0,7],[9,16]])}))),function(){return P.apply(this,arguments)})},{key:"doJoin",value:function(e){var t=this;return new Promise((function(e,n){t.log_.info("Join() => joining room: ".concat(t.roomId_," useStringRoomId: ").concat(t.useStringRoomId_," mode: ").concat(t.mode_," role: ").concat(t.role_));var i={roomId:String(t.roomId_),useStringRoomId:t.useStringRoomId_,privateMapKey:t.privateMapKey_,trtcRole:t.role_===LT?OT:NT,trtcScene:t.mode_===MT?DT:PT,sdpSemantics:t.sdpSemantics_,version:LA(t.version_),ua:navigator&&navigator.userAgent||"",autoSubscribe:t.autoSubscribe_,terminalType:eC?4:$R?2:QR?3:RC?12:wC?5:CC?13:1,netType:BI[lA()],bussinessInfo:t.bussinessInfo_,receiveMix:!0};if(t.publishCDNManager_){var r=t.publishCDNManager_.handleCDNConfigForJoinData(t.bussinessInfo_),a=r.bussinessInfo,o=r.pushUserCdnInfo;Object.assign(i,{bussinessInfo:a,pushUserCdnInfo:o})}t.log_.debug("join room signal data: ".concat(JSON.stringify(i))),t.joinTimeout_=setTimeout((function(){t.log_.error("join room timeout observed"),n(new kD({code:bD.JOIN_ROOM_FAILED,message:sA({key:ew})}))}),5e3),jA.emit(HA,{client:t}),t.signalChannel_.once(zP,(function(e){t.clearJoinTimeout(),jA.emit(ZA,{client:t,error:e}),n(e)})),t.signalChannel_.send(iD,i),t.signalChannel_.once(eD.JOIN_ROOM_RESULT,(function(i){t.clearJoinTimeout();var r=i.data,a=r.code,o=r.message,s=r.data;t.onPublishedUserList({data:{userList:s.publishers}}),jA.emit(GA,{client:t,code:a}),0===a?(t.isJoined_=!0,t.log_.info("Join room success, start heartbeat"),t.startHeartbeat(),t.badCaseDetector_&&t.badCaseDetector_.start(),t.syncUserList(),t.startSyncUserListInterval(),e()):(t.log_.error("Join room failed result: "+a+" error: "+o),n(new kD({code:bD.JOIN_ROOM_FAILED,extraCode:a,message:sA({key:tw,data:{error:o,code:a}})})))}))}))}},{key:"reJoin",value:(x=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isJoined_){e.next=3;break}return this.log_.warn("reJoin abort"),e.abrupt("return");case 3:return this.isJoined_=!1,e.prev=4,this.log_.warn("reJoin pending: ".concat(this.joinOptions_.roomId)),this.subscriptionManager_&&this.subscriptionManager_.markAllStream(),this.signalChannel_.close(),e.next=10,this.signalChannel_.connect();case 10:return e.next=12,this.doJoin(t(t({},this.joinOptions_),{},{role:this.role_,privateMapKey:this.privateMapKey_}));case 12:this.log_.warn("reJoin success"),lM.logSuccessEvent({userId:this.userId_,eventType:rI}),this.checkConnectionsToReconnect(),this.uplinkConnection_&&!this.uplinkConnection_.getIsReconnecting()&&this.uplinkConnection_.startReconnection(),this.mixTranscodeManager_&&this.mixTranscodeManager_.reStartMixTranscode(),e.next=25;break;case 19:e.prev=19,e.t0=e.catch(4),this.log_.warn("reJoin fail "+e.t0),this.reset(),lM.logFailedEvent({userId:this.userId_,eventType:rI,error:e.t0}),this.emitter_.emit(BO.ERROR,new kD({code:bD.JOIN_ROOM_FAILED,message:sA({key:nw,data:{roomId:this.joinOptions_.roomId}})}));case 25:case"end":return e.stop()}}),e,this,[[4,19]])}))),function(){return x.apply(this,arguments)})},{key:"leave",value:(A=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return jA.emit(JA,{client:this}),oM(this.userId_,{eventId:GD,eventDesc:"leaving room",timestamp:i_(),userId:this.userId_,tinyId:this.tinyId_}),e.prev=2,e.next=5,this.doHeartbeat();case 5:e.next=9;break;case 7:e.prev=7,e.t0=e.catch(2);case 9:this.doLeave(),jA.emit(KA,{client:this}),lM.logSuccessEvent({userId:this.userId_,eventType:aI}),t=Math.floor((EA()-this.joinedTimestamp_)/1e3),lM.logSuccessEvent({userId:this.userId_,eventType:oI,delta:t});case 14:case"end":return e.stop()}}),e,this,[[2,7]])}))),function(){return A.apply(this,arguments)})},{key:"doLeave",value:function(){this.isJoined_&&(jA.emit(qA,{client:this}),this.log_.info("leave() => leaving room"),this.signalChannel_.send(rD),this.reset())}},{key:"clearNetworkQuality",value:function(){this.networkQuality_&&(this.networkQuality_.stop(),this.networkQuality_=null)}},{key:"closeConnections",value:function(){var e=this;this.connections_.forEach((function(t){e.closeDownLink(t.getTinyId())}))}},{key:"clearJoinTimeout",value:function(){clearTimeout(this.joinTimeout_),this.joinTimeout_=-1}},{key:"destroy",value:function(){var e,t,n;if(this.isJoined_)throw this.log_.warn(UR.INVALID_DESTROY),new kD({code:bD.INVALID_OPERATION,message:sA({key:iw})});this.isDestroyed_||(this.log_.info("destroy client"),this.joinReject_&&(this.joinReject_(new kD({code:bD.INVALID_OPERATION,message:sA({key:Jw,data:{funName:"join"}})})),this.clearJoinTimeout(),this.reset()),this.off("*"),null===(e=this.callDurationCalculator_)||void 0===e||e.destroy(),null===(t=this.keyPointManager_)||void 0===t||t.destroy(),null===(n=this.deviceDetector_)||void 0===n||n.destroy(),this.callDurationCalculator_=null,this.keyPointManager_=null,this.deviceDetector_=null,this.badCaseDetector_=null,this.publishCDNManager_=null,this.isDestroyed_=!0,this.spatialManager_=null,jA.emit(tx,{client:this}))}},{key:"reset",value:function(){var e;this.isJoined_=!1,this.keyPointManager_&&this.keyPointManager_.prepareReport(),this.mixTranscodeManager_&&(this.mixTranscodeManager_.reset(),this.mixTranscodeManager_=null),this.publishCDNManager_&&this.publishCDNManager_.reset(),this.userMap_.clear(),this.stopSyncUserListInterval(),this.stopHeartbeat(),this.closeConnections(),this.mutedStates_.clear(),this.clearNetworkQuality(),this.badCaseDetector_&&this.callDurationCalculator_&&this.uploadAllCallStats(),this.closeUplink(),this.signalChannel_&&(this.log_.info("destroying SignalChannel"),this.signalChannel_.close(),this.signalChannel_=null),this.stats_.reset(),null===(e=this.spatialManager_)||void 0===e||e.reset()}},{key:"startSyncUserListInterval",value:function(){-1===this.syncUserListInterval_&&(this.syncUserListInterval_=iO.run(gE,this.syncUserList.bind(this)))}},{key:"stopSyncUserListInterval",value:function(){iO.clearTask(this.syncUserListInterval_),this.syncUserListInterval_=-1}},{key:"syncUserList",value:(C=a(n().mark((function e(){var t,i=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getUserList();case 3:t=e.sent,0!==this.userMap_.size&&this.userMap_.forEach((function(e){t.findIndex((function(t){return t.userId===e.userId}))<0&&(i.log_.info("peer leave detected: ".concat(e.userId)),i.cleanUser({userId:e.userId,tinyId:e.tinyId}))})),t.forEach((function(e){var t=e.userId;i.userMap_.has(t)||t===i.userId_||(i.userMap_.set(t,e),i.emitter_.emit(BO.PEER_JOIN,{userId:t}))})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),this.log_.warn("sync user list failed: "+e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(){return C.apply(this,arguments)})},{key:"getUserList",value:function(){return this.signalChannel_?this.signalChannel_.sendWaitForResponse({command:gD,responseCommand:eD.USER_LIST_RES,enableLog:!1,timeout:2e3}).then((function(e){var t=e.data,n=t.code,i=t.message;if(0===n)return(t.data&&t.data.userList||[]).map((function(e){var t=e.userId,n=e.srcTinyId,i=e.role;return new cK({userId:t,tinyId:n,role:i})}));throw sA({key:bR,data:{signalResponse:eD.USER_LIST_RES,code:n,message:i}})})):[]}},{key:"publish",value:(R=a(n().mark((function e(t){var i,r,a,o,s,c,u,d,l=this,h=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=h.length>1&&void 0!==h[1]?h[1]:{isAuxiliary:!1},t.setPublishState(GI),this.isPublishing_=!0,r=EA(),jA.emit($A,{client:this,stream:t}),a=i.isAuxiliary,o=a?Hk:rT,s=t.getScreen(),this.log_.info("publish() => publishing ".concat(s?Fk+" ":"").concat(o," stream ").concat(t.getId())),c=this.uplinkConnection_,e.prev=10,c||((c=new nK({userId:this.userId_,tinyId:this.tinyId_,client:this,isUplink:!0,signalChannel:this.signalChannel_,enableSEI:this.enableSEI_,enableSpatial:this.enableSpatial_})).initialize(),c.on(jO.ERROR,(function(e){var t=e.getCode();t!==bD.ICE_TRANSPORT_ERROR&&(t===bD.UPLINK_RECONNECTION_FAILED&&l.closeUplink(),l.emitter_.emit(BO.ERROR,e))}))),t.setConnection(c),e.next=15,c.publish(t,a);case 15:this.log_.info("local ".concat(s?Fk+" ":"").concat(o," stream is published")),this.isPublishing_=!1,a?this.localAuxStream_=t:(this.localStream_=t,this.deviceDetector_&&this.deviceDetector_.setLocalStream(this.localStream_),this.localStream_.getBeautyStatus()&&this.log_.info("beauty stream is published successfully")),t.setPublishState(zI),t.setClient(this,a),this.uplinkConnection_=c,u=EA(),d=u-r,lM.logSuccessEvent({userId:this.userId_,eventType:sI}),lM.logSuccessEvent({userId:this.userId_,eventType:cI,delta:d}),t.hasAudio()&&oM(this.userId_,{eventId:ID,eventDesc:"publish audio track",timestamp:i_(),userId:this.userId_,tinyId:this.tinyId_}),t.hasVideo()&&oM(this.userId_,{eventId:TD,eventDesc:"publish video track",timestamp:i_(),userId:this.userId_,tinyId:this.tinyId_}),this.networkQuality_&&this.networkQuality_.setUplinkConnection(this.uplinkConnection_),jA.emit(mx,{localStream:t,isAuxiliary:a,client:this}),this.notPublishWithoutH264Supported_=!1,t.isAIDenoiser&&fq.handleFunctionState({fnName:"AI_DENOISER"}),e.next=42;break;case 33:throw e.prev=33,e.t0=e.catch(10),e.t0 instanceof kD&&e.t0.getCode()===bD.NOT_SUPPORTED_H264&&(this.notPublishWithoutH264Supported_=!0),t.setPublishState(HI),c.close(),this.log_.error("failed to publish stream "+e.t0),this.isPublishing_=!1,lM.logFailedEvent({userId:this.userId_,eventType:sI,error:e.t0}),e.t0;case 42:case"end":return e.stop()}}),e,this,[[10,33]])}))),function(e){return R.apply(this,arguments)})},{key:"unpublish",value:(E=a(n().mark((function e(t){var i,r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.uplinkConnection_){e.next=2;break}return e.abrupt("return");case 2:return i=t===this.localAuxStream_,r=t.getScreen(),this.log_.info("unpublish() => unpublishing local ".concat(r?Fk+" ":"").concat(i?Hk:rT," stream")),e.prev=5,e.next=8,this.uplinkConnection_.unpublish(t);case 8:t.setClient(null),t.setConnection(null),i?this.localAuxStream_=null:(this.localStream_=null,t.hasAudio()&&oM(this.userId_,{eventId:wD,eventDesc:"unpublish audio track",timestamp:i_(),userId:this.userId_,tinyId:this.tinyId_}),t.hasVideo()&&oM(this.userId_,{eventId:ED,eventDesc:"unpublish video track",timestamp:i_(),userId:this.userId_,tinyId:this.tinyId_})),this.localStream_||this.localAuxStream_||this.closeUplink(),lM.logSuccessEvent({userId:this.userId_,eventType:uI}),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(5),lM.logFailedEvent({userId:this.userId_,eventType:uI,error:e.t0}),e.t0;case 19:case"end":return e.stop()}}),e,this,[[5,15]])}))),function(e){return E.apply(this,arguments)})},{key:"closeUplink",value:function(){this.uplinkConnection_&&(this.uplinkConnection_.close(),this.uplinkConnection_=null,this.networkQuality_&&this.networkQuality_.setUplinkConnection(null),this.localStream_&&(this.localStream_.setClient(null),this.localStream_.setConnection(null),this.localStream_=null),this.localAuxStream_&&(this.localAuxStream_.setClient(null),this.localAuxStream_.setConnection(null),this.localAuxStream_=null),this.deviceDetector_&&this.deviceDetector_.setLocalStream(null))}},{key:"closeDownLink",value:function(e){var t=this.connections_.get(e);t&&(t.getIsReconnecting()&&t.stopReconnection(),this.subscriptionManager_&&this.subscriptionManager_.delete(t.getUserId()),t.close(),this.connections_.delete(e),this.mutedStates_.delete(e))}},{key:"subscribe",value:(I=a(n().mark((function e(t,i){var r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.log_.info("subscribe() => subscribe to [".concat(t.getUserId(),"] ").concat(t.getType()," stream with options: ").concat(JSON.stringify(i))),vA(i)&&(i={audio:!0,video:!0}),vA(i.audio)&&(i.audio=!0),vA(i.smallVideo)?vA(i.video)&&(i.video=!0):i.smallVideo?vA(i.video)?(i.video=!1,i.smallVideo=!0):i.video&&(i.video=!0,delete i.smallVideo,this.log_.warn("options.video and options.smallVideo can't be both true")):vA(i.video)&&(i.video=!0,delete i.smallVideo),i.video&&this.changeBigSmallRecords_.delete(t.getUserId()),r=t.getConnection(),i.smallVideo&&(r.getTrackState().smallVideo||(this.setRemoteVideoStreamType(t,"small"),i.video=!0,delete i.smallVideo)),e.prev=7,jA.emit(dx,{client:this,stream:t}),e.next=11,r.subscribe(t,i);case 11:this.subscriptionManager_&&this.subscriptionManager_.addSubscriptionRecord(t.getUserId(),t,i),this.notSubscribeWithoutH264Supported_=!1,lM.logSuccessEvent({userId:this.userId_,eventType:dI}),e.next=24;break;case 16:throw e.prev=16,e.t0=e.catch(7),(a=e.t0 instanceof kD?e.t0.getCode():bD.UNKNOWN)===bD.NOT_SUPPORTED_H264&&(this.notSubscribeWithoutH264Supported_=!0),(o=new kD(a===bD.REMOTE_STREAM_NOT_EXIST?{code:bD.API_CALL_ABORTED,message:sA({key:OR,data:{message:e.t0.message,stream:t}})}:{code:a,message:sA({key:dw,data:{message:e.t0.message,stream:t}})})).getCode()===bD.API_CALL_ABORTED?this.log_.warn(o):this.log_.error(o),lM.logFailedEvent({userId:this.userId_,eventType:dI,error:o}),o;case 24:case"end":return e.stop()}}),e,this,[[7,16]])}))),function(e,t){return I.apply(this,arguments)})},{key:"unsubscribe",value:(b=a(n().mark((function e(t){var i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.log_.info("unsubscribe() => unsubscribe to [".concat(t.getUserId(),"] ").concat(t.getType()," stream")),e.prev=1,i=t.getConnection(),e.next=5,i.unsubscribe(t);case 5:this.subscriptionManager_&&this.subscriptionManager_.addUnsubscriptionRecord(t.getUserId(),t),jA.emit(hx,{client:this,stream:t}),lM.logSuccessEvent({userId:this.userId_,eventType:lI}),e.next=14;break;case 10:throw e.prev=10,e.t0=e.catch(1),lM.logFailedEvent({userId:this.userId_,eventType:lI,error:e.t0}),e.t0;case 14:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e){return b.apply(this,arguments)})},{key:"switchRole",value:(S=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.role_!==t){e.next=2;break}return e.abrupt("return");case 2:return t===UT&&this.uplinkConnection_&&this.closeUplink(),this.log_.info("switchRole() => switch role to: "+t),e.next=6,this.doSwitchRole(t);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return S.apply(this,arguments)})},{key:"doSwitchRole",value:function(e){var t,n,i=this,r={command:yD,data:{role:e===LT?OT:NT,privateMapKey:this.privateMapKey_},responseCommand:eD.SWITCH_ROLE_RES,retries:(null===(t=this.schedule_.config)||void 0===t||null===(n=t.retries)||void 0===n?void 0:n.switchRole)||1};return this.log_.info("switchRole signal data: "+JSON.stringify(r.data)),this.signalChannel_.sendWaitForResponseWithRetry(r).then((function(t){var n=t.data,r=n.code,a=n.message;if(0!==r)throw new kD({code:bD.SWITCH_ROLE_FAILED,message:sA({key:fw,data:{errMsg:a,errCode:r}})});i.role_=e})).catch((function(e){throw e instanceof kD&&e.getCode()===bD.API_CALL_TIMEOUT&&(e=new kD({code:bD.SWITCH_ROLE_FAILED,message:sA({key:pw})})),i.log_.error(e),e}))}},{key:"on",value:function(e,t,n){this.emitter_.on(e,t,n)}},{key:"off",value:function(e,t,n){"*"===e?this.emitter_.removeAllListeners():this.emitter_.off(e,t,n)}},{key:"getRemoteMutedState",value:function(){var e=this,n=[];return this.mutedStates_.forEach((function(i,r,a){var o=e.connections_.get(r);o&&n.push(t({userId:o.getUserId()},i))})),n}},{key:"getTransportStats",value:(y=a(n().mark((function e(){var t,i,r,a,o,s,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={rtt:0,downlinksRTT:{}},!this.uplinkConnection_){e.next=6;break}return e.next=4,this.stats_.getSenderStats(this.uplinkConnection_);case 4:i=e.sent,t.rtt=i.rtt;case 6:r=w(this.connections_),e.prev=7,r.s();case 9:if((a=r.n()).done){e.next=17;break}return(o=k(a.value,2))[0],s=o[1],e.next=13,this.stats_.getReceiverStats(s);case 13:c=e.sent,t.downlinksRTT[c.userId]=c.rtt;case 15:e.next=9;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(7),r.e(e.t0);case 22:return e.prev=22,r.f(),e.finish(22);case 25:return e.abrupt("return",t);case 26:case"end":return e.stop()}}),e,this,[[7,19,22,25]])}))),function(){return y.apply(this,arguments)})},{key:"getLocalAudioStats",value:(g=a(n().mark((function e(){var t,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t={})[this.userId_]={bytesSent:0,packetsSent:0},!this.uplinkConnection_){e.next=7;break}return e.next=5,this.stats_.getSenderStats(this.uplinkConnection_);case 5:i=e.sent,t[this.userId_]={bytesSent:i.audio.bytesSent,packetsSent:i.audio.packetsSent};case 7:return e.abrupt("return",t);case 8:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"getLocalVideoStats",value:(_=a(n().mark((function e(){var t,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t={})[this.userId_]={bytesSent:0,packetsSent:0,framesEncoded:0,framesSent:0,frameWidth:0,frameHeight:0},!this.uplinkConnection_){e.next=7;break}return e.next=5,this.stats_.getSenderStats(this.uplinkConnection_);case 5:i=e.sent,t[this.userId_]={bytesSent:i.video.bytesSent,packetsSent:i.video.packetsSent,framesEncoded:i.video.framesEncoded,framesSent:i.video.framesSent,frameWidth:i.video.frameWidth,frameHeight:i.video.frameHeight};case 7:return e.abrupt("return",t);case 8:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"getRemoteAudioStats",value:(v=a(n().mark((function e(){var t,i,r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t={},i=w(this.connections_),e.prev=2,i.s();case 4:if((r=i.n()).done){e.next=13;break}return(a=k(r.value,2))[0],o=a[1],s=o.getDelay(),c=s.audioDelay,e.next=9,this.stats_.getReceiverStats(o);case 9:(u=e.sent).hasAudio&&(t[u.userId]={bytesReceived:u.audio.bytesReceived,packetsReceived:u.audio.packetsReceived,packetsLost:u.audio.packetsLost,end2EndDelay:c});case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),i.e(e.t0);case 18:return e.prev=18,i.f(),e.finish(18);case 21:return e.abrupt("return",t);case 22:case"end":return e.stop()}}),e,this,[[2,15,18,21]])}))),function(){return v.apply(this,arguments)})},{key:"getRemoteVideoStats",value:(m=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=l.length>0&&void 0!==l[0]?l[0]:BT,i={},r=w(this.connections_),e.prev=3,r.s();case 5:if((a=r.n()).done){e.next=15;break}return(o=k(a.value,2))[0],s=o[1],e.next=9,this.stats_.getReceiverStats(s);case 9:c=e.sent,u=s.getDelay(),d=u.videoDelay,t===BT&&c.hasVideo&&(i[c.userId]={bytesReceived:c.video.bytesReceived,packetsReceived:c.video.packetsReceived,packetsLost:c.video.packetsLost,framesDecoded:c.video.framesDecoded,frameWidth:c.video.frameWidth,frameHeight:c.video.frameHeight,end2EndDelay:d}),t===HT&&c.hasAuxiliary&&(i[c.userId]={bytesReceived:c.auxiliary.bytesReceived,packetsReceived:c.auxiliary.packetsReceived,packetsLost:c.auxiliary.packetsLost,framesDecoded:c.auxiliary.framesDecoded,frameWidth:c.auxiliary.frameWidth,frameHeight:c.auxiliary.frameHeight,end2EndDelay:d});case 13:e.next=5;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(3),r.e(e.t0);case 20:return e.prev=20,r.f(),e.finish(20);case 23:return e.abrupt("return",i);case 24:case"end":return e.stop()}}),e,this,[[3,17,20,23]])}))),function(){return m.apply(this,arguments)})},{key:"getSdpSemantics",value:function(){return this.sdpSemantics_}},{key:"getIceServers",value:function(){return 0===this.turnServers_.length&&this.schedule_.iceServers?this.schedule_.iceServers:this.turnServers_}},{key:"getConnections",value:function(){return this.connections_}},{key:"getMutedStates",value:function(){return this.mutedStates_}},{key:"startHeartbeat",value:function(){-1===this.heartbeat_&&(this.log_.info("startHeartbeat..."),this.heartbeat_=iO.run(gE,this.doHeartbeat.bind(this),{delay:2e3}))}},{key:"stopHeartbeat",value:function(){-1!==this.heartbeat_&&(this.log_.info("stopHeartbeat"),iO.clearTask(this.heartbeat_),this.heartbeat_=-1,this.lastHeartBeatTime_=-1)}},{key:"doHeartbeat",value:(f=a(n().mark((function e(){var i,r,a,o,s,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.badCaseDetector_.getMonitorFreeze(),e.next=3,this.stats_.getStatsReport({uplinkConnection:this.uplinkConnection_,downlinkConnections:this.connections_,freezeMap:r});case 3:if(a=e.sent,jA.emit(QA,{client:this,stats:a}),null===(i=this.badCaseDetector_)||void 0===i||i.resetMonitor(),this.signalChannel_){e.next=8;break}return e.abrupt("return");case 8:o=this.signalChannel_.isConnected()?sM(this.userId_):[],s=t(t({str_sdk_version:this.version_,uint64_datetime:(new Date).getTime(),msg_user_info:{str_identifier:this.userId_,uint64_tinyid:this.tinyId_},msg_device_info:{uint32_terminal_type:15,str_device_name:navigator.platform,str_os_version:"",uint32_net_type:BI[this.networkType_]}},a),{},{msg_event_msg:o}),this.signalChannel_.send(aD,s),c=Date.now(),this.lastHeartBeatTime_>0&&c-this.lastHeartBeatTime_>1e4&&this.log_.warn("heartbeat took ".concat(c-this.lastHeartBeatTime_)),this.lastHeartBeatTime_=c,!this.isRelayChanged_&&this.isRelayMaybeFailed()&&(this.reJoin(),this.isRelayChanged_=!0);case 15:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"onRemoteStreamAdded",value:function(e){var t=e.content,n=t.userId,i=t.tinyId,r=t.audio,a=t.bigVideo,o=t.auxVideo,s=t.smallVideo;if(null!==n){this.userMap_.has(n)||(this.userMap_.set(n,new cK({userId:n,tinyId:i,role:LT})),this.emitter_.emit(BO.PEER_JOIN,{userId:n}));var c=this.connections_.get(i);if(c){if(c.getIsReconnecting())return;this.log_.warn("duplicated stream-added observed, rebuild the connection"),c.close(),this.connections_.delete(i)}var u={audio:r,video:a,auxiliary:o,smallVideo:s};this.log_.info("remote peer [".concat(n,"] published stream. trackState: ").concat(JSON.stringify(u))),this.createDownlinkConnection({userId:n,tinyId:i,trackState:u})}else this.log_.warn("received null userId on stream added")}},{key:"createDownlinkConnection",value:function(e){var t=this,n=e.userId,i=e.tinyId,r=e.trackState,a=new aK({userId:n,tinyId:i,client:this,isUplink:!1,signalChannel:this.signalChannel_,autoSubscribe:this.autoSubscribe_,trackState:r,enableSEI:this.enableSEI_,enableSpatial:this.enableSpatial_});this.connections_.set(i,a),this.installDownlinkEvents(a,n,i),this.autoSubscribe_?(a.initialize(),a.connect().catch((function(){!a.getMainStream()&&a.hasMainStream()&&t.initRemoteStream({type:BT,userId:n,downlinkConnection:a}),!a.getAuxStream()&&a.hasAuxStream()&&t.initRemoteStream({type:HT,userId:n,downlinkConnection:a})}))):(a.hasMainStream()&&this.initRemoteStream({type:BT,userId:n,downlinkConnection:a}),a.hasAuxStream()&&this.initRemoteStream({type:HT,userId:n,downlinkConnection:a}))}},{key:"initRemoteStream",value:function(e){var t=e.type,n=e.userId,i=e.downlinkConnection,r=new _q({type:t,userId:n,client:this});r.setConnection(i),i.setRemoteStream(t===BT?VT:FT,r),r.setIsStreamAddedEventEmitted(!0),jA.emit(ux,{client:this,stream:r}),this.emitter_.emit(BO.STREAM_ADDED,{stream:r})}},{key:"installDownlinkEvents",value:function(e,t,n){var i=this;e.on(jO.SEI_MESSAGE,(function(e){i.emitter_.emit(BO.SEI_MESSAGE,e)})),e.on(jO.STREAM_ADDED,(function(e){e.stream.setIsStreamAddedEventEmitted(!0),jA.emit(ux,{client:i,stream:e.stream}),i.emitter_.emit(BO.STREAM_ADDED,{stream:e.stream})})),e.on(jO.STREAM_REMOVED,(function(e){i.changeBigSmallRecords_.delete(e.stream.getUserId()),e.stream.stop(),e.stream.setIsStreamAddedEventEmitted(!1),i.subscriptionManager_&&i.subscriptionManager_.deleteAutoRecoveryFlag(e.stream.getUserId(),e.stream.getType()),jA.emit(fx,{client:i,stream:e.stream}),i.emitter_.emit(BO.STREAM_REMOVED,{stream:e.stream})})),e.on(jO.STREAM_UPDATED,(function(t){jA.emit(px,{client:i,stream:t.stream});var n=e.getMixUserList();n&&(t.mixUserList=n),i.emitter_.emit(BO.STREAM_UPDATED,t)})),e.on(jO.STREAM_SUBSCRIBED,(function(e){jA.emit(lx,{client:i,stream:e.stream}),i.emitter_.emit(BO.STREAM_SUBSCRIBED,{stream:e.stream})})),e.on(jO.ERROR,(function(e){var t=e.getCode();t!==bD.ICE_TRANSPORT_ERROR&&(t===bD.DOWNLINK_RECONNECTION_FAILED&&i.closeDownLink(n),i.emitter_.emit(BO.ERROR,e))}))}},{key:"onPeerJoin",value:function(e){var t=e.data.data,n=t.srcTinyId,i=t.userId,r=t.role;this.userMap_.has(i)||(this.userMap_.set(i,new cK({userId:i,tinyId:n,role:r})),this.emitter_.emit(BO.PEER_JOIN,{userId:i}))}},{key:"onPeerLeave",value:function(e){var t=e.data.data,n=t.srcTinyId,i=t.userId,r=t.reason,a=void 0===r?0:r;this.log_.info("peer leave [".concat(i,"]: ").concat(vE[a])),this.cleanUser({userId:i,tinyId:n})}},{key:"cleanUser",value:function(e){var t,n=e.userId,i=e.tinyId;this.userMap_.delete(n),this.closeDownLink(i),this.emitter_.emit(BO.PEER_LEAVE,{userId:n}),null===(t=this.spatialManager_)||void 0===t||t.delete(n)}},{key:"onPublishedUserList",value:function(e){var t=this;try{var n=T(e.data.userList);e.data.mixRobotList&&n.push.apply(n,T(e.data.mixRobotList));var i=n.map((function(e){return e.userId}));this.connections_.forEach((function(e){var n=e.getUserId(),r=e.getTinyId();i.findIndex((function(e){return e===n}))<0&&(t.log_.info("peer unpublished detected [".concat(n,"]")),t.closeDownLink(r))})),n.forEach((function(e){var n=e.userId,i=e.srcTinyId,r=e.flag,a=e.mixUserList;if(n!==t.userId_){var o=!!(1&r),s=!!(8&r),c=!!(4&r),u=!!(2&r),d=t.connections_.get(i);if((u||o)&&t.checkSubscribeBigSmallVideo(d,u),d){var l=d.getTrackState(),h=l.audio,p=l.video,f=l.auxiliary,m=l.smallVideo;bA(a)&&d.setMixUserList(a),!p&&o&&jA.emit(cx,{client:t,tinyId:i,userId:n,action:jI.ADD,kind:Vk}),!h&&s&&jA.emit(cx,{client:t,tinyId:i,userId:n,action:jI.ADD,kind:Uk}),!f&&c&&jA.emit(cx,{client:t,tinyId:i,userId:n,action:jI.ADD,kind:Hk}),!m&&u&&jA.emit(cx,{client:t,tinyId:i,userId:n,action:jI.ADD,kind:zk}),p&&!o&&jA.emit(cx,{client:t,tinyId:i,userId:n,action:jI.REMOVE,kind:Vk}),h&&!s&&jA.emit(cx,{client:t,tinyId:i,userId:n,action:jI.REMOVE,kind:Uk}),f&&!c&&jA.emit(cx,{client:t,tinyId:i,userId:n,action:jI.REMOVE,kind:Hk}),m&&!u&&jA.emit(cx,{client:t,tinyId:i,userId:n,action:jI.REMOVE,kind:zk})}else t.log_.info("peer published detected [".concat(n,"]")),t.onRemoteStreamAdded({content:{audio:s,bigVideo:o,auxVideo:c,smallVideo:u,userId:n,tinyId:i}})}}))}catch(IQ){}}},{key:"onUpdateRemoteMuteStat",value:function(e){var t=this,n=e.data;(n&&n.userList||[]).forEach((function(e){var n=e.srcTinyId,i=e.userId;if(0!==n&&n!==t.tinyId_){var r=t.connections_.get(n);if(r){var a=r.getMainStream();if(a&&a.getIsStreamAddedEventEmitted()){var o=!!(1&e.flag),s=!!(8&e.flag),c=!!(2&e.flag),u=!!(64&e.flag),d=!!(16&e.flag),l=t.mutedStates_.get(n);if(void 0===l)return t.mutedStates_.set(n,{hasAudio:s,hasVideo:o,hasSmall:c,audioMuted:u,videoMuted:d}),o?d?t.emitter_.emit(BO.MUTE_VIDEO,{userId:i}):t.emitter_.emit(BO.UNMUTE_VIDEO,{userId:i}):t.emitter_.emit(BO.MUTE_VIDEO,{userId:i}),void(s?u?t.emitter_.emit(BO.MUTE_AUDIO,{userId:i}):t.emitter_.emit(BO.UNMUTE_AUDIO,{userId:i}):t.emitter_.emit(BO.MUTE_AUDIO,{userId:i}));var h=!l.audioMuted&&l.hasAudio,p=!u&&s,f=!l.videoMuted&&l.hasVideo,m=!d&&o;t.mutedStates_.set(n,{hasAudio:s,hasVideo:o,hasSmall:c,audioMuted:u,videoMuted:d}),h!==p&&(p?t.emitter_.emit(BO.UNMUTE_AUDIO,{userId:i}):t.emitter_.emit(BO.MUTE_AUDIO,{userId:i})),f!==m&&(m?t.emitter_.emit(BO.UNMUTE_VIDEO,{userId:i}):t.emitter_.emit(BO.MUTE_VIDEO,{userId:i}))}}else t.mutedStates_.delete(n)}}))}},{key:"getEnv",value:function(){return this.env_}},{key:"getSubscriptionManager",value:function(){return this.subscriptionManager_}},{key:"startPublishCDNStream",value:(p=a(n().mark((function e(){var t,i=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=i.length>0&&void 0!==i[0]?i[0]:{},this.log_.info("startPublishCDNStream with params: ".concat(JSON.stringify(t),"; isJoined: ").concat(this.isJoined_,"; hasMainStream: ").concat(!!this.localStream_,"; hasAuxStream: ").concat(!!this.localAuxStream_,";")),t.streamType=t.streamType||rT,t.streamType===Hk&&(t.streamType=Gk),t.streamId=t.streamId||"",!this.isJoined_){e.next=10;break}if(t.streamType!==rT||this.localStream_){e.next=8;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:vw})});case 8:if(t.streamType!==Gk||this.localAuxStream_){e.next=10;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:vw})});case 10:return e.next=12,this.publishCDNManager_.startPublishTencentCDN(t);case 12:if(!(t.appId&&t.bizId&&t.url)){e.next=15;break}return e.next=15,this.publishCDNManager_.startPublishGivenCDN(t);case 15:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"stopPublishCDNStream",value:(h=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.publishCDNManager_.getIsPublishingTencentCDN()){e.next=2;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:_w})});case 2:return this.log_.info("stopPublishCDNStream"),e.next=5,this.publishCDNManager_.stopPublishTencentCDN();case 5:if(!this.publishCDNManager_.getIsPublishingGivenCDN()){e.next=8;break}return e.next=8,this.publishCDNManager_.stopPublishGivenCDN();case 8:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"startMixTranscode",value:(l=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isJoined_&&this.mixTranscodeManager_){e.next=2;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:bw})});case 2:return vA(t.mode)&&(t.mode=DI.MANUAL),e.prev=3,this.log_.info("startMixTranscode with config ".concat(JSON.stringify(t))),lM.uploadEvent({log:"mix-transcode-mode:".concat(t.mode),userId:this.userId_}),e.next=8,this.mixTranscodeManager_.startMixTranscode(t);case 8:lM.logSuccessEvent({userId:this.userId_,eventType:II}),e.next=15;break;case 11:throw e.prev=11,e.t0=e.catch(3),lM.logFailedEvent({userId:this.userId_,eventType:II,error:e.t0}),e.t0;case 15:case"end":return e.stop()}}),e,this,[[3,11]])}))),function(e){return l.apply(this,arguments)})},{key:"stopMixTranscode",value:(d=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isJoined_&&this.mixTranscodeManager_){e.next=2;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:kw})});case 2:return e.prev=2,e.next=5,this.mixTranscodeManager_.stopMixTranscode();case 5:lM.logSuccessEvent({userId:this.userId_,eventType:EI}),e.next=12;break;case 8:throw e.prev=8,e.t0=e.catch(2),lM.logFailedEvent({userId:this.userId_,eventType:EI,error:e.t0}),e.t0;case 12:case"end":return e.stop()}}),e,this,[[2,8]])}))),function(){return d.apply(this,arguments)})},{key:"getSystemResult",value:function(){return this.checkSystemResult_}},{key:"enableAudioVolumeEvaluation",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!gA(t))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:Tw})});if(this.log_.info("enableAudioVolumeEvaluation with interval: "+t),t<=0)return this.enableAudioVolumeEvaluation_=!1,iO.clearTask(this.audioVolumeIntervalId_),void(this.audioVolumeIntervalId_=null);t=Math.floor(Math.max(t,16)),jA.emit(ix,{interval:t}),this.audioVolumeIntervalId_&&(iO.clearTask(this.audioVolumeIntervalId_),this.audioVolumeIntervalId_=null),this.enableAudioVolumeEvaluation_=!0,this.audioVolumeIntervalId_=iO.run(yE,(function(){var t=[];if(e.localStream_){var n=Math.floor(100*e.localStream_.getAudioLevel());t.push({userId:e.userId_,audioVolume:n,stream:e.localStream_})}e.connections_.forEach((function(e){var n=e.getSubscribedMainStream();if(n){var i=Math.floor(100*n.getAudioLevel());t.push({userId:e.getUserId(),audioVolume:i,stream:n})}})),e.emitter_.emit(BO.AUDIO_VOLUME,{result:t})}),{fps:1e3/t,backgroundTask:n})}},{key:"callExperimentalAPI",value:function(e,n){return TK.call(e,t({client:this},n))}},{key:"setProperty",value:function(e,t){var n="".concat(e,"_");vA(this[n])||(this[n]=t)}},{key:"uploadAllCallStats",value:function(){var e=this;this.callDurationCalculator_.getDurationMap().forEach((function(t,n){var i={userId:t.userId,type:t.type,duration:e.callDurationCalculator_.getDuration(n,Vk),dataFreeze:e.badCaseDetector_.getDataFreezeDuration(n).dataFreeze,renderFreeze:e.badCaseDetector_.getRenderFreezeDuration(n).renderFreeze};lM.uploadEvent({log:"callStats-"+JSON.stringify(i),userId:e.userId_})})),this.badCaseDetector_.stop(),this.callDurationCalculator_.reset()}},{key:"enableSmallStream",value:(u=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isPublished()&&!this.isPublishing_){e.next=2;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Iw})});case 2:if(!LO()){e.next=7;break}this.setIsEnableSmallStream(!0),this.log_.info("SmallStream successfully enabled"),e.next=8;break;case 7:throw new kD({code:bD.INVALID_OPERATION,message:sA({key:ww})});case 8:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"disableSmallStream",value:(s=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isPublished()&&!this.isPublishing_){e.next=2;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:Ew})});case 2:this.setIsEnableSmallStream(!1),this.log_.info("SmallStream successfully disabled");case 4:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"setSmallStreamProfile",value:function(e){var t=this;e&&e.framerate&&(e.frameRate=e.framerate),e.width*e.height>307200&&(e.width=320,e.height=240,this.log_.info("Small stream resolution is beyond limitation, which is invalid. Reset to 320 * 240")),Object.keys(this.smallStreamConfig_).forEach((function(n){e[n]&&(t.smallStreamConfig_[n]=e[n])}));var n=this.smallStreamConfig_,i=n.width,r=n.height,a=n.bitrate,o=n.frameRate;if(this.log_.info("setSmallStreamProfile: bitrate=".concat(a,", frameRate=").concat(o,", height=").concat(r,", width=").concat(i)),i<0||r<0||a<0||o<0)throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:Rw})})}},{key:"setRemoteVideoStreamType",value:(r=a(n().mark((function e(t,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t instanceof _q){e.next=2;break}throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:Cw})});case 2:if(t.getConnection()){e.next=4;break}throw new kD({code:bD.INVALID_OPERATION,message:sA({key:uw})});case 4:if(t.getType()!==HT){e.next=6;break}return e.abrupt("return");case 6:e.t0=i,e.next=e.t0===WI||e.t0===JI?9:12;break;case 9:return e.next=11,this.changeVideoType(t,i);case 11:case 12:return e.abrupt("break",13);case 13:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"changeVideoType",value:(i=a(n().mark((function e(t,i){var r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.getUserId(),a={stream:t,options:{video:i===WI,smallVideo:i===JI},isSubscribing:!1,reSubscribeCount:10},this.changeBigSmallRecords_.set(r,a),this.log_.info("set [".concat(r,"] ").concat(t.getType()," stream video prefer type: ").concat(i));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"checkSubscribeBigSmallVideo",value:(e=a(n().mark((function e(t,i){var r,a,o,s,c,u,d,l,h,p,f;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t&&t.isBigStreamSubscribed||null!=t&&t.isSmallStreamSubscribed){e.next=2;break}return e.abrupt("return");case 2:if(r=t.getUserId(),this.changeBigSmallRecords_.has(r)){e.next=5;break}return e.abrupt("return");case 5:if(a=this.changeBigSmallRecords_.get(r),o=t.getSubscribeState(),s=o.video,c=o.smallVideo,u=a.stream,d=a.options,l=a.isSubscribing,h=a.reSubscribeCount,!(d.video&&s||d.smallVideo&&c&&i)){e.next=10;break}return e.abrupt("return");case 10:if(p={video:d.video,smallVideo:d.smallVideo},!(i&&t.isBigStreamSubscribed||t.isSmallStreamSubscribed)){e.next=31;break}if(e.prev=12,!(d&&u&&!l&&h>=1)){e.next=24;break}return a.isSubscribing=!0,a.reSubscribeCount=h-1,f=u.getConnection(),!i&&f.isSmallStreamSubscribed&&(p={video:!0,smallVideo:!1}),p.emitEvent=!1,e.next=21,null==f?void 0:f.subscribe(u,p);case 21:this.log_.info("change [".concat(r,"] to ").concat(p.smallVideo?"small":"big"," video successfully. count ").concat(10-a.reSubscribeCount,".")),a.isSubscribing=!1,a.reSubscribeCount=10;case 24:e.next=31;break;case 26:e.prev=26,e.t0=e.catch(12),this.log_.info("change [".concat(r,"] to ").concat(p.smallVideo?"small":"big"," video failed. count ").concat(10-a.reSubscribeCount,".")),a.isSubscribing=!1,0===h&&this.changeBigSmallRecords_.delete(r);case 31:case"end":return e.stop()}}),e,this,[[12,26]])}))),function(t,n){return e.apply(this,arguments)})},{key:"setIsEnableSmallStream",value:function(e){this.isEnableSmallStream_=e}},{key:"getIsEnableSmallStream",value:function(){return this.isEnableSmallStream_}},{key:"smallStreamConfig",get:function(){return this.smallStreamConfig_}},{key:"isPublished",value:function(){return!!this.localStream_}},{key:"getUplinkConnection",value:function(){return this.uplinkConnection_}},{key:"getLocalStream",value:function(){return this.localStream_}},{key:"getMode",value:function(){return this.mode_}},{key:"getBadCaseDetector",value:function(){return this.badCaseDetector_}},{key:"getCallDurationCalculator",value:function(){return this.callDurationCalculator_}},{key:"getIsJoined",value:function(){return this.isJoined_}},{key:"getAllConnections",value:function(){var e=T(this.connections_.values());return this.uplinkConnection_&&e.push(this.uplinkConnection_),e}},{key:"isRelayMaybeFailed",value:function(){if(!this.signalChannel_.isOnline)return!1;var e=this.getAllConnections();if(0===e.length)return!1;for(var t=0;t<e.length;t++)if(e[t].getReconnectionCount()<6)return!1;return!0}},{key:"getUseStringRoomId",value:function(){return this.useStringRoomId_}},{key:"checkConnectionsToReconnect",value:function(){var e=this;this.getAllConnections().forEach((function(t){if(!t.getIsReconnecting()){var n=t.getPeerConnection();n&&n.connectionState===$T&&(e.log_.warn("[".concat(t.getUserId(),"] pc is closed but not reconnect")),t.startReconnection())}}))}},{key:"getEnableAutoPlayDialog",value:function(){return this.enableAutoPlayDialog_}},{key:"sendSEIMessage",value:function(e,t){this.uplinkConnection_.sendSEI(e,t)}},{key:"enable3DSpatialAudioEffect",value:function(e){if(!AO())throw new kD({code:bD.INVALID_OPERATION,message:sA({key:LR})});return this.log_.debug("3DSpatialAudioEffect enabled: ".concat(e)),this.enableSpatial_=e,e&&!this.spatialManager_&&(this.spatialManager_=new gQ({client:this,log:this.log_})),this.enableSpatial_}},{key:"updateSelf3DSpatialPosition",value:function(e,t,n,i){var r;null===(r=this.spatialManager_)||void 0===r||r.updateSelfPosition(e,t,n,i)}},{key:"updateRemote3DSpatialPosition",value:function(e,t){var n;null===(n=this.spatialManager_)||void 0===n||n.updateRemote3DSpatialPosition(e,t)}},{key:"set3DSpatialReceivingRange",value:function(e){var t;this.log_.debug("update receiving range: ".concat(e)),null===(t=this.spatialManager_)||void 0===t||t.updateMaxDistance(e>0?e:0)}},{key:"isSpatialEnabled",get:function(){return this.enableSpatial_&&AO()}},{key:"getSpatialManager",value:function(){return this.spatialManager_}},{key:"setProxyServer",value:function(e){if(this.log_.info("set proxy server: ".concat(JSON.stringify(e))),_A(e)){if(!e.startsWith("wss://"))throw new kD({code:bD.INVALID_PARAMETER,message:sA({key:XE})});this.proxy_=e}else if(hA(e)){var t=e.websocketProxy,n=e.loggerProxy,i=e.scheduleProxy,r=e.unifiedProxy;t&&(this.proxy_=t),n&&xT(n),i&&ZI(i),r&&(this.unifiedProxy_=r,xT("https://".concat(r)),ZI(r))}}},{key:"setTurnServer",value:function(e){this.log_.info("set turn server: "+JSON.stringify(e));var t=[];Array.isArray(e)?e.forEach((function(e){return t.push(IA(e))})):hA(e)&&t.push(IA(e)),this.turnServers_=t}},{key:"get2k4kFlag",value:function(){var e,t;return null===(e=this.schedule_)||void 0===e||null===(t=e.trtcCapability)||void 0===t?void 0:t["2k4k"]}}]),Client}(),C(rQ.prototype,"join",[IK,EK],Object.getOwnPropertyDescriptor(rQ.prototype,"join"),rQ.prototype),C(rQ.prototype,"leave",[wK],Object.getOwnPropertyDescriptor(rQ.prototype,"leave"),rQ.prototype),C(rQ.prototype,"getUserList",[RK],Object.getOwnPropertyDescriptor(rQ.prototype,"getUserList"),rQ.prototype),C(rQ.prototype,"publish",[CK,AK,xK],Object.getOwnPropertyDescriptor(rQ.prototype,"publish"),rQ.prototype),C(rQ.prototype,"unpublish",[PK,DK],Object.getOwnPropertyDescriptor(rQ.prototype,"unpublish"),rQ.prototype),C(rQ.prototype,"subscribe",[MK],Object.getOwnPropertyDescriptor(rQ.prototype,"subscribe"),rQ.prototype),C(rQ.prototype,"unsubscribe",[OK],Object.getOwnPropertyDescriptor(rQ.prototype,"unsubscribe"),rQ.prototype),C(rQ.prototype,"switchRole",[NK,LK,UK],Object.getOwnPropertyDescriptor(rQ.prototype,"switchRole"),rQ.prototype),C(rQ.prototype,"startPublishCDNStream",[VK,FK],Object.getOwnPropertyDescriptor(rQ.prototype,"startPublishCDNStream"),rQ.prototype),C(rQ.prototype,"stopPublishCDNStream",[jK],Object.getOwnPropertyDescriptor(rQ.prototype,"stopPublishCDNStream"),rQ.prototype),C(rQ.prototype,"startMixTranscode",[BK,HK],Object.getOwnPropertyDescriptor(rQ.prototype,"startMixTranscode"),rQ.prototype),C(rQ.prototype,"stopMixTranscode",[GK],Object.getOwnPropertyDescriptor(rQ.prototype,"stopMixTranscode"),rQ.prototype),C(rQ.prototype,"enableAudioVolumeEvaluation",[zK],Object.getOwnPropertyDescriptor(rQ.prototype,"enableAudioVolumeEvaluation"),rQ.prototype),C(rQ.prototype,"enableSmallStream",[WK],Object.getOwnPropertyDescriptor(rQ.prototype,"enableSmallStream"),rQ.prototype),C(rQ.prototype,"disableSmallStream",[JK],Object.getOwnPropertyDescriptor(rQ.prototype,"disableSmallStream"),rQ.prototype),C(rQ.prototype,"setSmallStreamProfile",[qK],Object.getOwnPropertyDescriptor(rQ.prototype,"setSmallStreamProfile"),rQ.prototype),C(rQ.prototype,"setRemoteVideoStreamType",[KK],Object.getOwnPropertyDescriptor(rQ.prototype,"setRemoteVideoStreamType"),rQ.prototype),C(rQ.prototype,"sendSEIMessage",[QK,XK,$K],Object.getOwnPropertyDescriptor(rQ.prototype,"sendSEIMessage"),rQ.prototype),C(rQ.prototype,"enable3DSpatialAudioEffect",[YK],Object.getOwnPropertyDescriptor(rQ.prototype,"enable3DSpatialAudioEffect"),rQ.prototype),C(rQ.prototype,"updateSelf3DSpatialPosition",[ZK],Object.getOwnPropertyDescriptor(rQ.prototype,"updateSelf3DSpatialPosition"),rQ.prototype),C(rQ.prototype,"updateRemote3DSpatialPosition",[eQ],Object.getOwnPropertyDescriptor(rQ.prototype,"updateRemote3DSpatialPosition"),rQ.prototype),C(rQ.prototype,"set3DSpatialReceivingRange",[tQ],Object.getOwnPropertyDescriptor(rQ.prototype,"set3DSpatialReceivingRange"),rQ.prototype),C(rQ.prototype,"setProxyServer",[nQ],Object.getOwnPropertyDescriptor(rQ.prototype,"setProxyServer"),rQ.prototype),C(rQ.prototype,"setTurnServer",[iQ],Object.getOwnPropertyDescriptor(rQ.prototype,"setTurnServer"),rQ.prototype),rQ),SQ=0,bQ=0,kQ=(uQ=mq(eE),dQ=mq(eE),lQ=mq(eE),hQ=QJ(KJ.TRTC.createClient),pQ=mq(eE),fQ=QJ(KJ.TRTC.createStream),mQ=function(){function e(){o(this,e),this.name_=eE,this.VERSION=Wa,this.Logger={loggerManager:Vx,LogLevel:fE,setLogLevel:function(e){Vx.setLogLevel(e),e<=1&&oA()},enableUploadLog:function(){fq.handleFunctionState({fnName:"TRTC.enableUploadLog"}),Vx.enableUploadLog()},disableUploadLog:function(){Vx.warn("disableUploadLog"),fq.handleFunctionState({fnName:"TRTC.disableUploadLog"}),Vx.disableUploadLog()}}}var i;return c(e,[{key:"checkSystemRequirements",value:(i=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vO();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"isScreenShareSupported",value:function(){return yO()}},{key:"isSmallStreamSupported",value:function(){return LO()}},{key:"getDevices",value:function(){return nN()}},{key:"getCameras",value:function(){return function(){return YO.apply(this,arguments)}()}},{key:"getMicrophones",value:function(){return rN()}},{key:"getSpeakers",value:function(){return function(){return oN.apply(this,arguments)}()}},{key:"createClient",value:function(e){Fx&&(Fx=!1,Vx.getLogLevel()!=TQ.Logger.LogLevel.NONE&&(console.info("******************************************************************************"),console.info("*   TRTC Web SDK"),console.info("*   API Document: "+"".concat(dE,"index.html")),console.info("*   Changelog: https://cloud.tencent.com/document/product/647/38958"),console.info("*   Report issues: https://github.com/LiteAVSDK/TRTC_Web/issues"),console.info("******************************************************************************")),Vx.info("TRTC Web SDK Version: 4.15.9"),Vx.info("UserAgent: "+navigator.userAgent),Vx.info("URL of current page: "+location.href));var n={version:this.VERSION},i=new yQ(t(t(t({},n),e),{},{seq:++SQ}));return jA.emit(ex,{client:i}),i}},{key:"createStream",value:function(e){return new eK(t(t({},e),{},{seq:++bQ}))}}]),e}(),C(mQ.prototype,"checkSystemRequirements",[uQ],Object.getOwnPropertyDescriptor(mQ.prototype,"checkSystemRequirements"),mQ.prototype),C(mQ.prototype,"isScreenShareSupported",[dQ],Object.getOwnPropertyDescriptor(mQ.prototype,"isScreenShareSupported"),mQ.prototype),C(mQ.prototype,"isSmallStreamSupported",[lQ],Object.getOwnPropertyDescriptor(mQ.prototype,"isSmallStreamSupported"),mQ.prototype),C(mQ.prototype,"createClient",[hQ,pQ],Object.getOwnPropertyDescriptor(mQ.prototype,"createClient"),mQ.prototype),C(mQ.prototype,"createStream",[fQ],Object.getOwnPropertyDescriptor(mQ.prototype,"createStream"),mQ.prototype),mQ),TQ=new kQ;return TQ}));