diff --git a/CHANGELOG.md b/CHANGELOG.md index bfdf0f4..d17319d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,21 @@ ## CHANGELOG +## v1.7.5 +### Added +* liveTranscriptionClient.disableCaptions method to allow hosts to disable captions in a session. +* stream.getCurrentSessionCallinInfo method to retrieve call-in info when the PSTN plan is available. + +### Enhanced +* Noise suppression support by adding a backgroundNoiseSuppression option to the stream.startAudio method, and a new stream.enableBackgroundNoiseSuppression method. +* stream.startAudio method with a syncButtonsOnHeadset option to support mute state sync'ing with specific audio devices. +* stream.startAudio method with a mute option to automatically mute users upon joining audio. +* Phone user payload with a phoneNumber attribute on the side of caller. +* Share Tab Audio such that it can now also support using a microphone simultaneously. + +### Fixed +* A/V sync issues when enabling "Optimize for Video Clip". +* stream.updateSharingCanvasDimension not working on certain browsers. +* Promise returned from stream.switchCamera method not resolving properly. + ## v1.7.0 ### Added * checkFeatureRequirements API to check browser compatibility with supported features. diff --git a/dist/index.esm.js b/dist/index.esm.js index e92c325..a6d2331 100644 --- a/dist/index.esm.js +++ b/dist/index.esm.js @@ -1 +1 @@ -function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function t(t){for(var r=1;r=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function u(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var c=function(e,t){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},c(e,t)};function d(e,t){function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function l(e){return"function"==typeof e}var p=!1,h={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else p&&console.log("RxJS: Back to a better error behavior. Thank you. <3");p=e},get useDeprecatedSynchronousErrorHandling(){return p}};function f(e){setTimeout((function(){throw e}),0)}var g={closed:!0,next:function(e){},error:function(e){if(h.useDeprecatedSynchronousErrorHandling)throw e;f(e)},complete:function(){}},m=Array.isArray||function(e){return e&&"number"==typeof e.length};function v(e){return null!==e&&"object"==typeof e}var y=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),b=y,S=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r=this,o=r._parentOrParents,n=r._ctorUnsubscribe,i=r._unsubscribe,s=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,o instanceof e)o.remove(this);else if(null!==o)for(var a=0;a0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,o){return void 0===o&&(o=0),null!==o&&o>0||null===o&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,o):t.flush(this)},t}(U),x=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}(),F=function(e){function t(r,o){void 0===o&&(o=x.now);var n=e.call(this,r,(function(){return t.delegate&&t.delegate!==n?t.delegate.now():o()}))||this;return n.actions=[],n.active=!1,n.scheduled=void 0,n}return d(t,e),t.prototype.schedule=function(r,o,n){return void 0===o&&(o=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,o,n):e.prototype.schedule.call(this,r,o,n)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(x),B=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t}(F))(j),H=B,W=new R((function(e){return e.complete()}));function $(e){return e?function(e){return new R((function(t){return e.schedule((function(){return t.complete()}))}))}(e):W}function G(e){return e&&"function"==typeof e.schedule}var z,K=function(e){return function(t){for(var r=0,o=e.length;rthis._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new ie(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,o=r?this._events:this._trimBufferThenGetEvents(),n=this.scheduler,i=o.length;if(this.closed)throw new D;if(this.isStopped||this.hasError?t=S.EMPTY:(this.observers.push(e),t=new P(this,e)),n&&e.add(e=new re(e,n)),r)for(var s=0;st&&(i=Math.max(i,n-t)),i>0&&o.splice(0,i),o},t}(N),ie=function(e,t){this.time=e,this.value=t},se=1,ae=Promise.resolve(),ue={};function ce(e){return e in ue&&(delete ue[e],!0)}var de=function(e){function t(t,r){var o=e.call(this,t,r)||this;return o.scheduler=t,o.work=r,o}return d(t,e),t.prototype.requestAsyncId=function(t,r,o){return void 0===o&&(o=0),null!==o&&o>0?e.prototype.requestAsyncId.call(this,t,r,o):(t.actions.push(this),t.scheduled||(t.scheduled=function(e){var t=se++;return ue[t]=!0,ae.then((function(){return ce(t)&&e()})),t}(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,o){if(void 0===o&&(o=0),null!==o&&o>0||null===o&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,o);0===t.actions.length&&(function(e){ce(e)}(r),t.scheduled=void 0)},t}(U),le=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,o=-1,n=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++o0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(ke);function Le(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),Pe(w,e)}function Ve(){for(var e=[],t=0;t1?o.next(Array.prototype.slice.call(arguments)):o.next(e)}),o,r)}))}function Fe(e,t,r,o,n){var i;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){var s=e;e.addEventListener(t,r,n),i=function(){return s.removeEventListener(t,r,n)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){var a=e;e.on(t,r),i=function(){return a.off(t,r)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){var u=e;e.addListener(t,r),i=function(){return u.removeListener(t,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var c=0,d=e.length;c=0}function We(e,t){return void 0===e&&(e=0),void 0===t&&(t=fe),(!He(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=fe),new R((function(r){return r.add(t.schedule($e,e,{subscriber:r,counter:0,period:e})),r}))}function $e(e){var t=e.subscriber,r=e.counter,o=e.period;t.next(r),this.schedule({subscriber:t,counter:r+1,period:o},o)}function Ge(){for(var e=[],t=0;t1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof n&&(r=e.pop()),null===o&&1===e.length&&e[0]instanceof R?e[0]:Le(r)(J(e,o))}function ze(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function Ke(e,t){return function(r){return r.lift(new qe(e,t))}}var qe=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Je(e,this.predicate,this.thisArg))},e}(),Je=function(e){function t(t,r,o){var n=e.call(this,t)||this;return n.predicate=r,n.thisArg=o,n.count=0,n}return d(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(C);function Qe(e,t,r){return[Ke(t,r)(new R(we(e))),Ke(ze(t,r))(new R(we(e)))]}function Ze(){for(var e=[],t=0;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function st(e,t,r,o,n){var i={};return Object.keys(o).forEach((function(e){i[e]=o[e]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,o){return o(e,t,r)||r}),i),n&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(n):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}function at(e){return at="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},at(e)}function ut(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==at(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==at(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===at(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function dt(e){for(var t=1;t0&&r[0].time-o.now()<=0;)r.shift().notification.observe(n);if(r.length>0){var i=Math.max(0,r[0].time-o.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new It(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(X.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(X.createComplete()),this.unsubscribe()},t}(C),It=function(e,t){this.time=e,this.notification=t};function At(e){return function(t){return 0===e?$():t.lift(new wt(e))}}var wt=function(){function e(e){if(this.total=e,this.total<0)throw new me}return e.prototype.call=function(e,t){return t.subscribe(new Tt(e,this.total))},e}(),Tt=function(e){function t(t,r){var o=e.call(this,t)||this;return o.total=r,o.count=0,o}return d(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(C),Ot=function(){function e(e){if(this.total=e,this.total<0)throw new me}return e.prototype.call=function(e,t){return t.subscribe(new Rt(e,this.total))},e}(),Rt=function(e){function t(t,r){var o=e.call(this,t)||this;return o.total=r,o.ring=new Array,o.count=0,o}return d(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,o=this.count++;t.length0)for(var r=this.count>=this.total?this.total:this.count,o=this.ring,n=0;n=2&&(r=!0),function(o){return o.lift(new Nt(e,t,r))}}var Nt=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new Lt(e,this.accumulator,this.seed,this.hasSeed))},e}(),Lt=function(e){function t(t,r,o,n){var i=e.call(this,t)||this;return i.accumulator=r,i._seed=o,i.hasSeed=n,i.index=0,i}return d(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(C);function Vt(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?Pe((function(){return e}),t,r):("number"==typeof t&&(r=t),Pe((function(){return e}),r))}function Ut(e){return function(t){return t.lift(new jt(e))}}var jt=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new xt(e,this.predicate))},e}(),xt=function(e){function t(t,r){var o=e.call(this,t)||this;return o.predicate=r,o.skipping=!0,o.index=0,o}return d(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=Boolean(t)}catch(e){this.destination.error(e)}},t}(C);function Ft(){for(var e=[],t=0;t0){var n=o.indexOf(r);-1!==n&&o.splice(n,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(_e),sr=function(e,t){return e===t||"function"==typeof t&&e===t.toString()},ar=function(){for(var e=arguments.length,t=Array(e),r=0;r1?r-1:0),n=1;n1?t-1:0),o=1;o2?r-2:0),s=2;s2?r-2:0),n=2;n{const t=e(...r);if(!t)throw new TypeError(`combineEpics: one of the provided Epics "${e.name||""}" does not return a stream. Double check you're not missing a return statement!`);return t.pipe(vt(((e,t)=>(setTimeout((()=>{throw e}),0),t))))})))};try{Object.defineProperty(o,"name",{value:`combineEpics(${t.map((e=>e.name||"")).join(", ")})`})}catch(e){}return o}function Ro(){for(var e=arguments.length,t=new Array(e),r=0;rObject.values(e)));return Oo(...o)}function ko(e,t){return e.pipe(ar(`${ro}`),Ke((e=>e.payload.evt===t)))}function Do(e,t){return e.pipe(ar(`${ao}`),Ke((e=>e.payload.evt===t)))}function Po(e,t){return e.pipe(ar(`${no}`),Ke((e=>e.payload.evt===t)))}function Mo(e,t){return e.pipe(ar(`${ro}`,`${ao}`),Ke((e=>e.payload.evt===t)))}function No(e,t){return e.pipe(ar(`${mo}`),Ke((e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t)))}const Lo="function"==typeof atob,Vo="function"==typeof btoa,Uo="function"==typeof Buffer,jo="function"==typeof TextDecoder?new TextDecoder:void 0,xo="function"==typeof TextEncoder?new TextEncoder:void 0,Fo=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Bo=(e=>{let t={};return Fo.forEach(((e,r)=>t[e]=r)),t})(),Ho=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Wo=String.fromCharCode.bind(String),$o="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Go=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),zo=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Ko=Vo?e=>btoa(e):Uo?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,r,o,n,i="";const s=e.length%3;for(let s=0;s255||(o=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=r<<16|o<<8|n,i+=Fo[t>>18&63]+Fo[t>>12&63]+Fo[t>>6&63]+Fo[63&t]}return s?i.slice(0,s-3)+"===".substring(s):i},qo=Uo?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,o=e.length;r{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Wo(192|t>>>6)+Wo(128|63&t):Wo(224|t>>>12&15)+Wo(128|t>>>6&63)+Wo(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Wo(240|t>>>18&7)+Wo(128|t>>>12&63)+Wo(128|t>>>6&63)+Wo(128|63&t)},Qo=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Zo=Uo?e=>Buffer.from(e,"utf8").toString("base64"):xo?e=>qo(xo.encode(e)):e=>Ko((e=>e.replace(Qo,Jo))(e)),Yo=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Xo=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return Wo(55296+(t>>>10))+Wo(56320+(1023&t));case 3:return Wo((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Wo((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},en=Lo?e=>atob(zo(e)):Uo?e=>Buffer.from(e,"base64").toString("binary"):e=>{if(e=e.replace(/\s+/g,""),!Ho.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,o,n="";for(let i=0;i>16&255):64===o?Wo(t>>16&255,t>>8&255):Wo(t>>16&255,t>>8&255,255&t);return n},tn=Uo?e=>$o(Buffer.from(e,"base64")):e=>$o(en(e).split("").map((e=>e.charCodeAt(0)))),rn=Uo?e=>Buffer.from(e,"base64").toString("utf8"):jo?e=>jo.decode(tn(e)):e=>(e=>e.replace(Yo,Xo))(en(e)),on=(e,t)=>t?Go(Zo(e)):Zo(e),nn=e=>rn((e=>zo(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))))(e)),sn=(e,t=!1)=>t?Go(qo(e)):qo(e);function an(e){return on(e,!0)}function un(e){return nn(e)}function cn(e){return on(e,!1)}const dn={"-":"+",_:"/",".":"="};function ln(e){const t=e.replace(/[-_.]/g,(e=>dn[e]));return Uint8Array.from(window.atob(t),(e=>e.charCodeAt(0)))}const pn=e=>{const t=e.charCodeAt(0);return t<=parseInt("0x7F",16)?1:t<=parseInt("0x7FF",16)?2:t<=parseInt("0xFFFF",16)?3:t<=parseInt("0x1FFFFF",16)?4:t<=parseInt("0x3FFFFFF",16)?5:6};function hn(e,t){return Object.keys(e).find((r=>e[r]===t))}const fn=(e,t)=>{const r=e.split(".").map((e=>Number(e))).slice(0,3),o=t.split(".").map((e=>Number(e))).slice(0,3);let n=0;for(let e=0;e<3;e++){const t=ei){n=1;break}}return n},gn=e=>{var t;let r=(new Date).getTime(),o=1e3*(null===(t=performance)||void 0===t?void 0:t.now())||0;const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random();return r>0?(t=(r+t)%16|0,r=Math.floor(r/16)):(t=(o+t)%16|0,o=Math.floor(o/16)),("x"===e?t:3&t|8).toString(16)}));return"string"==typeof e||"number"==typeof e?n+":"+e:n+""};function mn(e,t){if(e===t)return!0;if(!e||!t)return!1;const r=Object.keys(e),o=Object.keys(t),n=r.length;if(o.length!==n)return!1;for(let o=0;oe>>10==t>>10,yn=(e,t)=>new Promise((r=>{setTimeout((()=>{r(e())}),t)})),bn=e=>{const t=`${Math.floor(1e4*Math.random())}`;return e.indexOf("@")>-1?e.replace("@",t):`${e}${t}`},Sn={default:{"apac.errorcodes_success":"Successfully joined the meeting.","apac.errorcodes_fail":"Fail to join the meeting.","apac.errorcodes_not_init":"Meeting not initialized.","apac.errorcodes_register":"This webinar requires registration.","apac.errorcodes_email_require":"Email is missing to attend webinar.","apac.errorcodes_not_exist":"Meeting does not exist.","apac.errorcodes_not_host":"You are not the meeting host.","apac.errorcodes_wrong_pass":"Meeting Passcode wrong.","apac.errorcodes_role_type":"Role type is required.","apac.errorcodes_not_start":"Meeting has not started","apac.errorcodes_host_email_as_attendee":"Host email as attendee","apac.errorcodes_re_connect":"Meeting is reconnecting.","apac.errorcodes_be_removed":"Be removed.","apac.errorcodes_disconnect":"Meeting has been disconnected.","apac.errorcodes_denied_register_with_panelist":"Denied register use panelist email.","apac.errorcodes_web_has_in_progress":"Already has other meetings in progress.","apac.errorcodes_web_require_email":"User email is required.","apac.errorcodes_web_not_support_webinar_pac":"Not support webinar and personal audio conference","apac.errorcodes_web_host_not_exit":"The meeting host does not exist.","apac.errorcodes_web_not_support_webclient":"Not support start or join meeting from web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"The current sdk version doesn't support webinar, please upgrade to the latest version.","apac.errorcodes_web_invalid_id":"Invalid meeting ID.","apac.errorcodes_web_not_support_registration_webinar":"Not support registration webinar","apac.errorcodes_web_not_support_tsp":"Not support start or join meeting from web, when you chose TSP as his audio in a meeting.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Not allow to start webinar from web.","apac.errorcodes_pac_api_wrong":"The accounts API Key is not valid.","apac.errorcodes_pac_signature_expired":"The signature has expired.","apac.errorcodes_pac_mn_wrong":"The meeting number is wrong.","apac.errorcodes_pac_mn_not_fount":"The meeting number is not found.","apac.errorcodes_pac_role_error":"Incorrect role.","apac.errorcodes_pac_host_not_found":"The meeting host is not found.","apac.errorcodes_pac_api_disabled":"The accounts API Key is deactivated.","apac.errorcodes_pac_cant_host_other_mn":"Cannot not host another meeting concurrently.","apac.errorcodes_pac_invalid_signature":"Signature is invalid.","apac.errorcodes_pac_no_permission":"No permission.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Unable join from browser, please join using the Zoom desktop client or mobile app.","apac.errorcodes_rwc_empty":"Could not get a response from the web server.","apac.errorcodes_rwc_error":"Could not connect to Web Server error.","apac.errorcodes_frequent_call":"You have reached the API limit for this call.","apac.errorcodes_frequent_join":"You be limit by zoom, need to check recaptcha.","apac.errorcodes_offline":"The service is temporarily offline.","apac.errorcodes_wasm_fail":"Download wasm files error, please check your network and firewall.","apac.errorcodes_denied_email":"Email is blocked by Administrator.","apac.errorcodes_host_inactive":"Meeting host is inactive.","apac.errorcodes_tk_expired":"Token has expired.","apac.invalid_parameter":"Invalid Parameter","apac.errorcodes_login_required":"Require login","apac.errorcodes_upgrade":"Your sdk version needs to be {0} or higher to join the meeting","apac.errorcodes_no_response_from_web":"No response from web, try again later.","apac.errorcodes_host_email":"Please use host/alternative host to start the webinar."},"de-DE":{"apac.errorcodes_web_has_in_progress":"Hat bereits andere laufende Meetings.","apac.errorcodes_web_require_email":"E-Mail-Adresse von Benutzer erforderlich.","apac.errorcodes_web_not_support_webinar_pac":"Unterstützen Webinar und persönliche Audiokonferenz nicht","apac.errorcodes_web_host_not_exit":"Der Meeting-Host ist nicht vorhanden.","apac.errorcodes_web_not_support_webclient":"Start nicht unterstützt bzw. starten Sie das Meeting aus dem Web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Ihre aktuelle SDK-Version unterstützt keine Webinare. Aktualisieren Sie bitte auf die neueste Version.","apac.errorcodes_web_invalid_id":"Ungültige Meeting-ID.","apac.errorcodes_web_not_support_registration_webinar":"Registrierung für Webinar wird nicht unterstützt","apac.errorcodes_web_not_support_tsp":"Sie unterstützen nicht den Start oder die Teilnahme an einem Meeting aus dem Web, wenn Sie den Telefonieanbieter als seinen Audiobeitrag in einem Meeting gewählt haben.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Das Starten eines Webinars vom Internet aus ist nicht zulässig.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Unfähig beitreten aus Browser, verbinden Sie bitte den Zoom-Desktop-Client oder mobile App."},"es-ES":{"apac.errorcodes_web_has_in_progress":"Ya posee otras reuniones en curso.","apac.errorcodes_web_require_email":"Se requiere correo electrónico del usuario.","apac.errorcodes_web_not_support_webinar_pac":"No soporta seminario web o conferencia de audio personal","apac.errorcodes_web_host_not_exit":"El anfitrión de la reunión no existe.","apac.errorcodes_web_not_support_webclient":"No se puede iniciar ni entrar a una reunión desde la web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"La versión actual de sdk no es compatible con el seminario web, actualice a la última versión.","apac.errorcodes_web_invalid_id":"ID de reunión no válida.","apac.errorcodes_web_not_support_registration_webinar":"Seminario web que no es compatible con la inscripción","apac.errorcodes_web_not_support_tsp":"Cuando eligió el proveedor de servicios telefónicos como audio en una reunión, no se puede iniciar o unirse una reunión desde el sitio web.","apac.errorcodes_web_not_allow_start_webinar_from_web":"No se permite comenzar un seminario web desde la web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"No puede unirse desde el navegador, por favor unirse usando el cliente de escritorio Zoom o aplicación móvil."},"fr-FR":{"apac.errorcodes_web_has_in_progress":"Il a déjà d’autres réunions en cours.","apac.errorcodes_web_require_email":"Le courriel de l’utilisateur est requis.","apac.errorcodes_web_not_support_webinar_pac":"Ne prend pas en charge le webinaire ni la conférence audio personnelle","apac.errorcodes_web_host_not_exit":"L’animateur de la réunion n’existe pas.","apac.errorcodes_web_not_support_webclient":"Ne supporte pas démarrer ou rejoindre une réunion à partir du web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"La version actuelle du SDK ne prend pas en charge le webinaire, veuillez passer à la dernière version.","apac.errorcodes_web_invalid_id":"Nº de réunion non valide.","apac.errorcodes_web_not_support_registration_webinar":"Ne prend pas en charge le webinaire d’inscription","apac.errorcodes_web_not_support_tsp":"Ne peut pas démarrer ou rejoindre la réunion depuis Internet, lorsque vous sélectionnez le fournisseur de service en téléphonie comma sa sortie audio dans une réunion.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Ne pas permettre de démarrer des webinaires à partir du Web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Impossible de rejoindre le navigateur, s'il vous plaît rejoindre en utilisant le client de bureau Zoom ou une application mobile."},"jp-JP":{"apac.errorcodes_web_has_in_progress":"すでに他のミーティングが始まっています。","apac.errorcodes_web_require_email":"ユーザーメールは必要です。","apac.errorcodes_web_not_support_webinar_pac":"ウェビナーとパーソナル音声会議がサポートされていません","apac.errorcodes_web_host_not_exit":"このミーティングのホストは存在しません。","apac.errorcodes_web_not_support_webclient":"ウェブからのミーティング開始/参加はサポートされません。","apac.errorcodes_web_should_support_webinar_with_latest_version":"現在のSDKバージョンはウェビナーをサポートしていません。最新バージョンにアップグレードしてください。","apac.errorcodes_web_invalid_id":"無効なミーティングIDです。","apac.errorcodes_web_not_support_registration_webinar":"登録ウェビナー非対応","apac.errorcodes_web_not_support_tsp":"ミーティングのオーディオにテレフォニーサービスプロバイダを選択した場合、ウェブからミーティングを開始したり、ミーティングに参加したりできません。","apac.errorcodes_web_not_allow_start_webinar_from_web":"ウェビナーをウェブから開始できません。","apac.errorcodes_need_use_zoom_desktop_or_mobile":"できませんが、ブラウザから参加し、ズームデスクトップクライアントやモバイルアプリを使用して参加してください。"},"pt-PT":{"apac.errorcodes_web_has_in_progress":"Já há outras reuniões em andamento.","apac.errorcodes_web_require_email":"O e-mail do usuário é obrigatório.","apac.errorcodes_web_not_support_webinar_pac":"Não há suporte para webinar e audioconferência pessoal","apac.errorcodes_web_host_not_exit":"O anfitrião da reunião não existe.","apac.errorcodes_web_not_support_webclient":"Não há suporte para iniciar ou entrar na reunião pela web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"A versão sdk atual não oferece suporte para webinar. Atualize para a versão mais recente.","apac.errorcodes_web_invalid_id":"ID da reunião inválido.","apac.errorcodes_web_not_support_registration_webinar":"O registro do webinar não é compatível","apac.errorcodes_web_not_support_tsp":"Não é compatível iniciar ou ingressar na reunião pela web ao escolher o áudio do provedor de serviços de telefonia em uma reunião.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Não é permitido iniciar o webinar na web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Incapaz juntar-se a partir do navegador, por favor, junte-se usando o cliente de desktop Zoom ou aplicativo móvel."},"ru-RU":{"apac.errorcodes_web_has_in_progress":"Уже участвует в других конференциях.","apac.errorcodes_web_require_email":"Требуется почта пользователя.","apac.errorcodes_web_not_support_webinar_pac":"Не поддерживает веб-семинар и персональную аудиоконференцию","apac.errorcodes_web_host_not_exit":"Организатор конференции не существует.","apac.errorcodes_web_not_support_webclient":"Запуск или вход в конференцию через сеть не поддерживается.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Текущая версия пакета SDK не поддерживает вебинары. Выполните обновление до последней версии.","apac.errorcodes_web_invalid_id":"Неверный идентификатор конференции.","apac.errorcodes_web_not_support_registration_webinar":"Регистрация на вебинар не поддерживается","apac.errorcodes_web_not_support_tsp":"Если для аудиоконференции используется поставщик службы телефонии, такую конференцию невозможно начать или подключиться к ней через браузер.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Запуск веб-семинара через Интернет запрещен.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Невозможно присоединиться из браузера, пожалуйста, присоединяйтесь с помощью настольного клиента Увеличить или мобильное приложение."},"zh-CN":{"apac.errorcodes_web_has_in_progress":"已经有另一场会议正在进行。","apac.errorcodes_web_require_email":"必须提供用户电子邮件地址。","apac.errorcodes_web_not_support_webinar_pac":"非支持的网络研讨会和个人音频会议","apac.errorcodes_web_host_not_exit":"会议主持人不存在。","apac.errorcodes_web_not_support_webclient":"不支持从 Web 开始或加入会议。","apac.errorcodes_web_should_support_webinar_with_latest_version":"当前 sdk 版本不支持网络研讨会,请升级到最新版本。","apac.errorcodes_web_invalid_id":"无效的会议ID。","apac.errorcodes_web_not_support_registration_webinar":"不支持注册网络研讨会","apac.errorcodes_web_not_support_tsp":"如果选择电话语音服务提供商作为会议音频,则不支持通过网络开始或加入会议。","apac.errorcodes_web_not_allow_start_webinar_from_web":"不允许通过网络开始网络研讨会","apac.errorcodes_need_use_zoom_desktop_or_mobile":"从浏览器无法加入,请加入使用缩放桌面客户端或移动应用程序。"},"zh-TW":{"apac.errorcodes_web_has_in_progress":"已有其他會議正在進行中。","apac.errorcodes_web_require_email":"必須提供使用者電子郵件地址。","apac.errorcodes_web_not_support_webinar_pac":"不支援網路研討會和個人音訊會議","apac.errorcodes_web_host_not_exit":"會議主持人不存在。","apac.errorcodes_web_not_support_webclient":"不支援從 Web 開始或加入會議。","apac.errorcodes_web_should_support_webinar_with_latest_version":"目前的 SDK 版本不支援網路研討會,請升級至最新版本。","apac.errorcodes_web_invalid_id":"無效的會議 ID 。","apac.errorcodes_web_not_support_registration_webinar":"不支援註冊網路研討會","apac.errorcodes_web_not_support_tsp":"當您選擇電話語音服務供應商做為會議語音使用時,不支援經由網頁召開或加入會議。","apac.errorcodes_web_not_allow_start_webinar_from_web":"不允許從 Web 開始網路研討會。","apac.errorcodes_need_use_zoom_desktop_or_mobile":"從瀏覽器無法加入,請加入使用縮放桌面客戶端或移動應用程序。"},"ko-KO":{"apac.errorcodes_web_has_in_progress":"이미 다른 회의가 진행 중입니다.","apac.errorcodes_web_require_email":"사용자 이메일이 필요합니다.","apac.errorcodes_web_not_support_webinar_pac":"웨비나 및 개인 오디오 전화 회의를 지원하지 않음","apac.errorcodes_web_host_not_exit":"회의 호스트가 없습니다.","apac.errorcodes_web_not_support_webclient":"웹에서 회의를 시작하거나 참여하는 것은 지원하지 않습니다.","apac.errorcodes_web_should_support_webinar_with_latest_version":"현재 SDK 버전은 웨비나를 지원하지 않습니다. 최신 버전으로 업그레이드하십시오.","apac.errorcodes_web_invalid_id":"회의 ID가 잘못되었습니다.","apac.errorcodes_web_not_support_registration_webinar":"등록 웨비나를 지원하지 않음","apac.errorcodes_web_not_support_tsp":"회의에서 Telephony Service Provider를 오디오로 선택한 경우 웹에서 회의를 시작하거나 회의에 참가할 수 없습니다.","apac.errorcodes_web_not_allow_start_webinar_from_web":"웹에서 웨비나를 시작할 수 없습니다.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"수 없습니다 브라우저에서 조인 줌 데스크톱 클라이언트 또는 모바일 앱을 사용하여 가입하시기 바랍니다."},"vi-VN":{"apac.errorcodes_web_has_in_progress":"Đã có cuộc họp khác đang diễn ra.","apac.errorcodes_web_require_email":"Email người dùng là bắt buộc.","apac.errorcodes_web_not_support_webinar_pac":"Không hỗ trợ hội thảovideo và hội nghị âm thanh cá nhân","apac.errorcodes_web_host_not_exit":"Người chủ trì cuộc họp không tồn tại.","apac.errorcodes_web_not_support_webclient":"Không hỗ trợ bắt đầu hoặc vào cuộc họp từ web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Phiên bản sdk hiện tại không hỗ trợ hội thảo trực tuyến, hãy nâng cấp lên phiên bản mới nhất.","apac.errorcodes_web_invalid_id":"ID cuộc họp không hợp lệ.","apac.errorcodes_web_not_support_registration_webinar":"Không hỗ trợ đăng ký hội thảo trực tuyến","apac.errorcodes_web_not_support_tsp":"Không hỗ trợ bắt đầu hoặc vào cuộc họp từ web, khi bạn chọn Nhà cung cấp dịch vụ điện thoại làm nguồn âm thanh trong cuộc họp.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Không cho phép bắt đầu hội thảo trực tuyến từ web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Không thể tham gia từ trình duyệt, hãy tham gia bằng cách sử dụng client desktop Phóng to hoặc ứng dụng di động."},"it-IT":{"apac.errorcodes_web_has_in_progress":"Sta partecipando a un’altra riunione in corso.","apac.errorcodes_web_require_email":"È richiesta l’email dell’utente.","apac.errorcodes_web_not_support_webinar_pac":"Non supporta webinar e conferenza audio personale","apac.errorcodes_web_host_not_exit":"L’ospite della riunione non esiste.","apac.errorcodes_web_not_support_webclient":"Non supporta l’avvio o la partecipazione alla riunione dal Web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"La versione sdk corrente non supporta i webinar. Effettua l’aggiornamento alla versione più recente.","apac.errorcodes_web_invalid_id":"ID riunione non valido.","apac.errorcodes_web_not_support_registration_webinar":"Non supporta webinar con iscrizione","apac.errorcodes_web_not_support_tsp":"In caso che hai selezionato il fornitore di servizio telefonico come l’audio in riunione, non supporta l’avvio o la partecipazione alla riunione dal Web.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Non è consentito avviare il webinar dal Web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Impossibile unirsi dal browser, si prega di unirsi con il client desktop Zoom o app mobile."}},_n=Sn.default,En=-3e3,Cn=200;let In,An,wn;function Tn(e,t){return t in _n?_n[t]:e}!function(e){e[e.CONF_SUCCESS=0]="CONF_SUCCESS",e[e.CONF_FAIL_MEETING_OVER=6]="CONF_FAIL_MEETING_OVER",e[e.CONF_FAIL_CONF_USER_FULL=9]="CONF_FAIL_CONF_USER_FULL",e[e.CONF_FAIL_CONFLOCKED=12]="CONF_FAIL_CONFLOCKED",e[e.CONF_FAIL_WEBINAR_DENIED_EMAIL=3033]="CONF_FAIL_WEBINAR_DENIED_EMAIL",e[e.CONF_FAIL_MEETING_HAS_CLOSED=103003]="CONF_FAIL_MEETING_HAS_CLOSED",e[e.CONF_FAIL_HAS_BEEN_REMOVED=103039]="CONF_FAIL_HAS_BEEN_REMOVED",e[e.CONF_RESULT_MMR_IB_REJECT=103043]="CONF_RESULT_MMR_IB_REJECT",e[e.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS=103044]="CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS"}(In||(In={})),function(e){e[e.Unknown=0]="Unknown",e[e.Normal=1]="Normal",e[e.Userrequest=2]="Userrequest",e[e.SdkConnection=3]="SdkConnection",e[e.Reconnect=5]="Reconnect",e[e.PtRequest=6]="PtRequest",e[e.KickedByHost=7]="KickedByHost",e[e.EndByHost=8]="EndByHost",e[e.EndByHostStartAnotherMeeting=9]="EndByHostStartAnotherMeeting",e[e.FreeMeetingTimeout=10]="FreeMeetingTimeout",e[e.JBHTimeout=11]="JBHTimeout",e[e.EndBySingleStatus=12]="EndBySingleStatus",e[e.WebinarNeedRegister=13]="WebinarNeedRegister",e[e.ArchiveFail=14]="ArchiveFail",e[e.EndByNone=15]="EndByNone",e[e.EndByAdmin=16]="EndByAdmin"}(An||(An={})),function(e){e[e.WaitingRoomFailover=1]="WaitingRoomFailover",e[e.WebEndAndRejoin=2]="WebEndAndRejoin"}(wn||(wn={}));const On=Cn,Rn={ANOTHER_MEETING_RUNNING:3e3,ERROR_NOT_EXIST:3001,ERROR_NOT_HOST:3003,WRONG_MEETING_PASSWORD:3004,ROLE_TYPE_IS_REQUIRE:3010,EMAIL_REQUIRED:3005,MEETING_NOT_START:3008,BE_REMOVED:3009,ERROR_WEBINAR_ENFORCE_LOGIN:3034,NEED_REAL_NAME:3082,REGISTER_REQUIRED:3099,SSO_LOGIN_WINDOW:6024,ZOOM_LOGIN_WINDOW:3051,ZOOM_SPECIFIC_LOGIN_WINDOW:3052,LOGIN_REQUIRED:3100,RE_CONNECTING:4e3,DISCONNECT:4001,INVALID_PARAMETER:4003,DENIED_REGISTER_WITH_PANELIST:3032,SERVICE_OFFLINE:403,RWC_EMPTY:3621,RWC_ERROR:3622,FREQUENT_CALL:3633,FREQUENT_JOIN:3634,WASM_FAIL:3635,COMMON_ERROR:Cn,COMMON_SUCCESS:0,UPGRADE:1e4},kn={SUCCESS:"apac.errorcodes_success",FAIL:"apac.errorcodes_fail",MEETING_NOT_INIT:"apac.errorcodes_not_init",REGISTER_REQUIRED:"apac.errorcodes_register",LOGIN_REQUIRED:"apac.errorcodes_login_required",SSO_LOGIN_WINDOW:"apac.errorcodes_login_required",ZOOM_LOGIN_WINDOW:"apac.errorcodes_login_required",ZOOM_SPECIFIC_LOGIN_WINDOW:"apac.errorcodes_login_required",EMAIL_REQUIRED:"apac.errorcodes_email_require",ERROR_NOT_EXIST:"apac.errorcodes_not_exist",ERROR_NOT_HOST:"apac.errorcodes_not_host",WRONG_MEETING_PASSWORD:"apac.errorcodes_wrong_pass",ROLE_TYPE_IS_REQUIRE:"apac.errorcodes_role_type",ANOTHER_MEETING_RUNNING:"apac.errorcodes_meeting_has_in_progress",MEETING_NOT_START:"apac.errorcodes_not_start",INVALID_PARAMETER:"apac.invalid_parameter",RE_CONNECTING:"apac.errorcodes_re_connect",BE_REMOVED:"apac.errorcodes_be_removed",ERROR_WEBINAR_ENFORCE_LOGIN:"apac.errorcodes_webinar_enforce_login",DISCONNECT:"apac.errorcodes_disconnect",DENIED_REGISTER_WITH_PANELIST:"apac.errorcodes_denied_register_with_panelist",RWC_EMPTY:"apac.errorcodes_rwc_empty",RWC_ERROR:"apac.errorcodes_rwc_error",FREQUENT_CALL:"apac.errorcodes_frequent_call",FREQUENT_JOIN:"apac.errorcodes_frequent_join",WASM_FAIL:"apac.errorcodes_wasm_fail",UPGRADE:"apac.errorcodes_upgrade"},Dn={3e3:{"apac.errorcodes_web_has_in_progress":3e3,"apac.errorcodes_web_require_email":3005,"apac.errorcodes_web_not_support_webinar_pac":3701,"apac.errorcodes_web_host_not_exit":3702,"apac.errorcodes_web_not_support_webclient":3603,"apac.errorcodes_web_should_support_webinar_with_latest_version":3604,"apac.errorcodes_web_invalid_id":3703,"apac.errorcodes_web_not_support_registration_webinar":3606,"apac.errorcodes_web_not_support_tsp":3608,"apac.errorcodes_web_not_allow_start_webinar_from_web":3609,"apac.errorcodes_need_use_zoom_desktop_or_mobile":3611},3001:{"apac.errorcodes_not_exist":3610},200:{"apac.errorcodes_pac_api_wrong":3704,"apac.errorcodes_pac_signature_expired":3705,"apac.errorcodes_pac_mn_wrong":3706,"apac.errorcodes_pac_mn_not_fount":3707,"apac.errorcodes_pac_role_error":3708,"apac.errorcodes_pac_host_not_found":3709,"apac.errorcodes_pac_api_disabled":3710,"apac.errorcodes_pac_cant_host_other_mn":3711,"apac.errorcodes_pac_invalid_signature":3712,"apac.errorcodes_pac_no_permission":3713},3099:{"apac.errorcodes_register":3099},3100:{"apac.errorcodes_login_required":3100},3003:{"apac.errorcodes_not_host":3003},3004:{"apac.errorcodes_wrong_pass":3004},3008:{"apac.errorcodes_not_start":3008},3129:{"apac.errorcodes_not_start":3008},3009:{"apac.errorcodes_be_removed":3009},3501:{"apac.errorcodes_login_required":3082},3502:{"apac.errorcodes_login_required":3082},3032:{"apac.errorcodes_denied_register_with_panelist":3100},3033:{"apac.errorcodes_denied_email":3620},3059:{"apac.errorcodes_not_support_simulive":3630},1001:{"apac.errorcodes_host_inactive":3625},3136:{"apac.errorcodes_zak":3623,"apac.errorcodes_host_email":3624,"apac.errorcodes_zak2":3265,"apac.errorcodes_require_host":3709},3082:{"apac.errorcodes_real_name":3082},403:{"apac.errorcodes_offline":403},404:{"apac.errorcodes_offline":403},4003:{"apac.invalid_parameter":4003},124:{"apac.errorcodes_tk_expired":3610}},Pn={3004:{"apac.errorcodes_pac_mn_wrong":3714},3005:{"apac.errorcodes_web_has_in_progress":3e3},3008:{"apac.errorcodes_not_start":3008},3027:{"apac.errorcodes_host_email_as_attendee":3627},3033:{"apac.errorcodes_denied_email":3620},1005:{"apac.errorcodes_no_response_from_web":3621},131005:{"apac.errorcodes_no_response_from_web":3621},1001:{"apac.errorcodes_host_inactive":3625},131001:{"apac.errorcodes_host_inactive":3625},131013:{"meeting ended":4004},103039:{"apac.errorcodes_be_removed":3009},6:{"meeting ended":4004},9:{"meeting is at capacity":4005},12:{"meeting locked":4006},103043:{"reject for information barriers":4007},103044:{"participant exist":4008}};let Mn;function Nn(e,t){const{key:r,value:o}=function(e,t){let r=!1;if(-1===e)return{key:"apac.errorcodes_offline",value:403};if(3e3===e){const o=["en-US","de-DE","es-ES","en-US","fr-FR","jp-JP","pt-PT","ru-RU","zh-CN","zh-TW","ko_KO","vi-VN","it-IT"];let n={};if(Mn)n=Mn;else{const e=Object.keys(Dn[3e3]);o.forEach((t=>{const r=function(e){return"en-US"===e&&(e="default"),Sn[e]||Sn.default}(t);n[t]={},e.forEach((e=>{n[t][e]=r[e]}))})),Mn=n}return o.forEach((o=>{if(r)return;const i=hn(n[o],t);i&&(r={key:i,value:Dn[e][i]})})),r||(r={key:"apac.errorcodes_fail",value:Cn}),r}if(200===e){const o=hn({"apac.errorcodes_pac_api_wrong":"The api key is wrong.","apac.errorcodes_pac_signature_expired":"The signature has expired.","apac.errorcodes_pac_mn_wrong":"The meeting number is wrong.","apac.errorcodes_pac_mn_not_fount":"The meeting number is not found.","apac.errorcodes_pac_role_error":"The role is not applicable.","apac.errorcodes_pac_host_not_found":"The meeting host is not found.","apac.errorcodes_pac_api_disabled":"The account don't enable API.","apac.errorcodes_pac_cant_host_other_mn":"Can not be host in other account's meeting.","apac.errorcodes_pac_invalid_signature":"Invalid signature.","apac.errorcodes_pac_no_permission":"No permission"},t);return r=o?{key:o,value:Dn[e][o]}:{key:"apac.errorcodes_fail",value:Cn},r}if(void 0!==Dn[e]){const t=Dn[e],o=Object.keys(t)[0];r={key:o,value:t[o]}}if(r)return r;const o=hn(Rn,e),n=kn[o];return n?{key:n,value:e}:{key:"apac.errorcodes_fail",value:Cn}}(e,t),n=Tn(r,r);return r!==n?{reason:n,errorCode:o}:{reason:_n[r],errorCode:o}}function Ln(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==Pn[r]){const e=Pn[r],o=Object.keys(e)[0];t={key:o,value:e[o]}}if(t){const{key:r,value:o}=t,n=Tn(r,r);return r!==n?Object.assign({},e,{reason:n,errorCode:o}):Object.assign({},e,{reason:_n[r],errorCode:o})}const o=Nn(r);return Object.assign({},e,{reason:o.reason,errorCode:o.errorCode})}const Vn=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount","bHasAST","bHasRMC","gatewayKey","encryptKey"],Un={bChime:"bAllowPlayChimeForEnterOrExit",bHasAST:"hasAst",bHasRMC:"hasRmc",topic:e=>({meetingTopic:un(e)}),gatewayKey:e=>{const[,t,r]=e.split(".");return t&&r?{gatewayUser:{userId:Number(t),sn:r}}:{}},encryptKey:e=>({gcmSessinKey:ln(e)})},jn=Ar("GET_MEETING_INFO"),xn=Ar("GET_INSTANT_MEETING_INFO");Ar("LOGON_ZOOM_DOMAIN"),Ar("VERIFY_ZOOM_RECAPTCHA"),Ar("LOGON_THIRD_PARTY_DOMAIN");const Fn=Ar("PING_RWC_SERVER"),Bn=Ar("MEETING_FAILOVER"),Hn=Ar("LEAVE_MEETING"),Wn=Ar("END_MEETING");Ar("REGISTER_WEBINAR");const $n=Ar("TRIGGER_IDLE_CHECK"),{setMeetingInfo:Gn,setWindownOpen:zn,setAppidSignature:Kn,setZtk:qn,setZsk:Jn,setTkMtkguid:Qn,setPingRwcTimestamp:Zn,setInMeetingInfo:Yn,setMeetingAttribute:Xn,resetMeeting:ei,setIsHost:ti,setIsCohost:ri,setMeetingIsOnHold:oi,setIsMeetingReset:ni,setAudioVideoBeforeOnHold:ii,setCurrentUserAudioBeforeReset:si,setIsCurrentUserMutedBeforeReset:ai,setMeetingStatus:ui,setMeetingRegion:ci,setIsCurrentUserStartVideoBeforeReset:di,setJoinMeetingTimeStamp:li,setIsEnableQos:pi,setActiveAppInfo:hi,setMeetingIdleStartTime:fi,setSessionIdleTimeoutMinutes:gi,setIsAudioBridgeEnabled:mi,addDiscardedRwcHost:vi,setSharePronounType:yi,setIsStayAwakeDuringTheSession:bi,setMeetingJoinSuccessTimestamp:Si,resetFailoverRecord:_i,setFailoverReason:Ei}=zr({SET_MEETING_INFO:e=>e,SET_WINDOWN_OPEN:e=>e,SET_APPID_SIGNATURE:e=>e,SET_ZTK:e=>e,SET_ZSK:e=>e,SET_TK_MTKGUID:e=>e,SET_PING_RWC_TIMESTAMP:e=>e,SET_IN_MEETING_INFO:e=>e,SET_MEETING_ATTRIBUTE:e=>{if(Vn.some((t=>e&&void 0!==e[t]))){let t=e;return Object.keys(Un).some((t=>void 0!==e[t]))&&(t=Object.keys(e).reduce(((t,r)=>{const o=Un[r];return"function"==typeof o?Object.assign(t,o(e[r])):"string"==typeof o?t[o]=e[r]:(t[r],e[r]),t}),{})),t}return{}},SET_IS_HOST:e=>e&&e.bHost,SET_IS_COHOST:e=>e&&e.bCoHost,RESET_MEETING:e=>e,SET_MEETING_IS_ON_HOLD:e=>e,SET_IS_MEETING_RESET:e=>e,SET_AUDIO_VIDEO_BEFORE_ON_HOLD:e=>e,SET_CURRENT_USER_AUDIO_BEFORE_RESET:e=>e,SET_IS_CURRENT_USER_MUTED_BEFORE_RESET:e=>e,SET_MEETING_STATUS:e=>e,SET_MEETING_REGION:e=>e,SET_IS_CURRENT_USER_START_VIDEO_BEFORE_RESET:e=>e,SET_JOIN_MEETING_TIME_STAMP:e=>e,SET_IS_ENABLE_QOS:e=>e,SET_ACTIVE_APP_INFO:e=>e,SET_MEETING_IDLE_START_TIME:e=>e,SET_SESSION_IDLE_TIMEOUT_MINUTES:e=>e,SET_IS_AUDIO_BRIDGE_ENABLED:e=>e,ADD_DISCARDED_RWC_HOST:e=>e,SET_SHARE_PRONOUN_TYPE:e=>e,SET_IS_STAY_AWAKE_DURING_THE_SESSION:e=>e,SET_MEETING_JOIN_SUCCESS_TIMESTAMP:e=>e,RESET_FAILOVER_RECORD:e=>e,SET_FAILOVER_REASON:e=>e});let Ci,Ii,Ai;!function(e){e[e.None=0]="None",e[e.Hand=1]="Hand",e[e.Yes=2]="Yes",e[e.No=3]="No",e[e.Fast=4]="Fast",e[e.Slow=5]="Slow",e[e.Bad=6]="Bad",e[e.Good=7]="Good",e[e.Clap=8]="Clap",e[e.Coffee=9]="Coffee",e[e.Clock=10]="Clock",e[e.Emoji=11]="Emoji"}(Ci||(Ci={})),function(e){e.LoginSuccess="zoomLoginSuccess",e.LoginFail="zoomLoginFail",e.CaptchaSuccess="captchaSuccess",e.CaptchaFail="captchaFail",e.SSOLoginSuccess="ssoLoginSuccess",e.SSOLoginFail="ssoLoginFail",e.JoinSuccess="joinSuccess",e.RegisterSuccess="registerSuccess"}(Ii||(Ii={})),function(e){e.Failover="failover",e.OnHold="on hold",e.Promote="promote",e.Depromote="depromote",e.JoinBreakoutRoom="join breakout room",e.MoveToBreakoutRoom="move to breakout room",e.BackToMainSession="back to main session"}(Ai||(Ai={}));const wi="js_media.min.js",Ti="1502_js_media.min.js";let Oi,Ri,ki,Di,Pi,Mi,Ni;!function(e){e.CDN="CDN",e.Global="Global",e.CN="CN"}(Oi||(Oi={})),function(e){e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed",e.Fail="Fail"}(Ri||(Ri={})),function(e){e.Loading="loading",e.Success="success",e.Fail="fail"}(ki||(ki={})),function(e){e.Initial="initial",e.Joined="joined",e.Closed="closed"}(Di||(Di={})),function(e){e.AudioBridgeEnable="M:1,2;V:1,2",e.AudioDecodeInWorklet="M:6;V:3"}(Pi||(Pi={})),function(e){e[e.NormalCase=-1]="NormalCase",e[e.NoHeartbeat=0]="NoHeartbeat",e[e.NoHeartbeatMChannel=1]="NoHeartbeatMChannel",e[e.NetworkChange=2]="NetworkChange",e[e.NotifyUiFailover=3]="NotifyUiFailover",e[e.InvalidParameters=4]="InvalidParameters",e[e.OnError=5]="OnError",e[e.OnErrorMChannel=6]="OnErrorMChannel",e[e.Disconnect=7]="Disconnect",e[e.DisconnectMChannel=8]="DisconnectMChannel",e[e.DisconnectXmpp=9]="DisconnectXmpp",e[e.RefreshPage=10]="RefreshPage"}(Mi||(Mi={})),function(e){e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory"}(Ni||(Ni={}));const Li=an("{}");class Vi{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=an(`zoom-storage-${e}`),this.localStorageKey=an("zoom-local-storage"),this.memoryCache={};try{this.sessionCache=JSON.parse(un(sessionStorage.getItem(this.sessionStorageKey)||Li)),this.localCache=JSON.parse(un(localStorage.getItem(this.localStorageKey)||Li))}catch(e){console.error(e),this.sessionCache={},this.localCache={}}}static init(e){this.instance=new Vi(e)}static get(e){if(void 0===this.instance)throw new Error("read before initial");return this.instance.getValue(e).value}static set(e,t,r){if(void 0===this.instance)throw new Error("set before initial");return this.instance.setValue(e,t,r)}static remove(e){if(void 0===this.instance)throw new Error("remove before initial");return this.instance.removeValue(e)}static clearSession(){if(void 0===this.instance)throw new Error("clear before initial");return this.instance.memoryCache={},this.instance.sessionCache={},this.instance.localCache={},sessionStorage.removeItem(this.instance.sessionStorageKey)}getValue(e){return this.sessionCache.hasOwnProperty(e)?{value:this.sessionCache[e],type:Ni.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:Ni.LocalStorage}:{value:this.memoryCache[e],type:Ni.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case Ni.SessionStorage:{const r=this.sessionCache[e];let o=t;return"function"==typeof t&&(o=t(r)),r!==o&&(this.sessionCache[e]=o,this.flushValue(Ni.SessionStorage)),o}case Ni.LocalStorage:{const r=this.localCache[e];let o=t;return"function"==typeof t&&(o=t(r)),r!==o&&(this.localCache[e]=o,this.flushValue(Ni.LocalStorage)),o}case Ni.Memory:{const r=this.memoryCache[e];let o=t;return"function"==typeof t&&(o=t(r)),this.memoryCache[e]=o,o}default:return null}}removeValue(e){const{type:t}=this.getValue(e);switch(t){case Ni.SessionStorage:delete this.sessionCache[e],this.flushValue(Ni.SessionStorage);break;case Ni.LocalStorage:delete this.localCache[e],this.flushValue(Ni.LocalStorage);break;case Ni.Memory:delete this.memoryCache[e]}}flushValue(e){e===Ni.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,an(JSON.stringify(this.sessionCache))):e===Ni.LocalStorage&&localStorage.setItem(this.localStorageKey,an(JSON.stringify(this.localCache)))}}function Ui(){const e=navigator.userAgent;let t,r=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(r[1])?(t=/\brv[ :]+(\d+)/g.exec(e)||[],`IE ${t[1]||""}`):"Chrome"===r[1]&&(t=e.match(/\b(OPR|Edge)\/(\d+)/),t&&t.length)?t.slice(1).join(" ").replace("OPR","Opera"):(r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"],(t=e.match(/version\/(\d+)/i))&&r.splice(1,1,t[1]),$i()&&(r[0]="ios-safari"),r.join(""))}function ji(){return $i()?"iOS/iPadOS"+function(){var e,t;const r=null===(e=navigator.userAgent.toLowerCase().match(/os (.*?) like mac os/))||void 0===e?void 0:e[1];return(null==r||null===(t=r.match(/^\d+/))||void 0===t?void 0:t[0])||"0"}():Ki()?"Android"+function(){var e,t;const r=null===(e=navigator.userAgent.toLowerCase().match(/android (.*?);/))||void 0===e?void 0:e[1];return(null==r||null===(t=r.match(/^\d+/))||void 0===t?void 0:t[0])||"0"}():null}function xi(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}Vi.instance=void 0;const Fi=()=>/edge\/(\d+)/i.test(navigator.userAgent),Bi=()=>/firefox/i.test(navigator.userAgent),Hi=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Wi=()=>{const{userAgent:e}=navigator;return!/opera|opr\/[\d]+/i.test(navigator.userAgent)&&!Fi()&&/chrome/i.test(e)&&/webkit/i.test(e)},$i=()=>{const{userAgent:e}=navigator;return/iPad|iPhone|iPod/i.test(e)||/MacIntel/i.test(navigator.platform)&&(null===(t=navigator)||void 0===t?void 0:t.maxTouchPoints)>2;var t},Gi=()=>/arm/i.test(navigator.userAgent),zi=()=>/\bCrOS\b/.test(navigator.userAgent);function Ki(){return/android/i.test(navigator.userAgent)}function qi(){return Ki()||$i()}const Ji=new class{constructor(){this.value=void 0}get isSupported(){if(void 0===this.value)if("function"==typeof window.OffscreenCanvas){const e=new OffscreenCanvas(1,1);e.addEventListener("webglcontextlost",(e=>{e.preventDefault()})),this.value=!!e.getContext("webgl")}else this.value=!1;return this.value}};function Qi(){return Ji.isSupported}function Zi(){return"object"==typeof WebAssembly&&"function"==typeof Worker}const Yi=()=>"function"==typeof AudioWorklet,Xi=()=>xi(),es=()=>{var e;return!qi()&&Qi()&&(null===(e=navigator)||void 0===e?void 0:e.hardwareConcurrency)>=4&&"function"==typeof requestAnimationFrame&&"function"==typeof SharedArrayBuffer};function ts(){return"function"==typeof window.MediaStreamTrackProcessor}const rs=e=>{var t;return es()?zi()&&Gi()||zi()&&!Gi()?navigator.hardwareConcurrency>=4?9:4:(null===(t=navigator)||void 0===t?void 0:t.hardwareConcurrency)<4?9:25:e&&ts()&&Qi()?4:1};function os(){var e;return"webkit"in window&&!("chrome"in window)&&!(null===(e=window.webkit.messageHandlers)||void 0===e||!e.jsOCHelper)}function ns(){var e;let t;var r,o,n,i;return $i()?(t=Number(null===(r=ji())||void 0===r||null===(o=r.match(/\d+$/))||void 0===o?void 0:o[0]),t>=15):Ki()?(t=Number(null===(n=ji())||void 0===n||null===(i=n.match(/\d+$/))||void 0===i?void 0:i[0]),t>=10):(t=Number(null===(e=Ui().match(/\d+$/))||void 0===e?void 0:e[0]),!!(Wi()&&t>=69||Hi()&&t>14||Bi()&&t>=76||Fi()&&t>=79))}let is,ss;!function(e){e.VIDEO_ENCODE="0",e.VIDEO_DECODE="1",e.AUDIO_ENCODE="2",e.AUDIO_DECODE="3",e.SHARING_ENCODE="4",e.SHARING_DECODE="5"}(is||(is={})),function(e){e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM"}(ss||(ss={}));const as=Object.freeze({RWG_CHAT:{gcmType:1,sessionType:"RWG_CHAT"},XMPP_CHAT:{gcmType:1,sessionType:"XMPP_CHAT"},CC_MESSAGE:{gcmType:3,sessionType:"CC_MESSAGE"},BO_BROADCAST:{gcmType:1,sessionType:"BO_BROADCAST"}});let us,cs;!function(e){e.WebclientOpt="WEB_CLIENT_OPT",e.WebclientWebinarToken="WEB_CLIENT_WEBINAR_TOKEN",e.WebclientMeetingToken="WEB_CLIENT_MEETING_TOKEN",e.WebclientZtk="WEB_CLIENT_ZTK",e.WebclientZsk="WEB_CLIENT_ZSK",e.WebclientTk="WEB_CLIENT_TK",e.WebclientIVState="WEB_CLIENT_IV_STATE",e.WebclientIsOnHold="WEB_CLIENT_IS_ON_HOLD",e.WebclientParticipantId="WEB_CLIENT_PARTICIPANT_ID",e.WebclientZoomId="WEB_CLIENT_ZOOM_ID",e.WebclientUserName="WEB_CLIENT_USER_NAME",e.WebclientUserEmail="WEB_CLIENT_USER_EMAIL",e.WebclientBreakoutRoomAttendeeStatus="WEB_CLIENT_BO_ATTENDEE_STATUS",e.WebclientBreakoutRoomCommand="WEB_CLIENT_BO_COMMAND",e.WebclientAudioEncryptKey="WEB_CLIENT_AUDIO_ENCRYPT_KEY",e.WebclientVideoEncryptKey="WEB_CLIENT_VIDEO_ENCRYPT_KEY",e.WebclientSharingEncryptKey="WEB_CLIENT_SHARING_ENCRYPT_KEY",e.WebclientFailoverCount="WEB_CLIENT_FAILOVER_COUNT"}(us||(us={})),function(e){e.WebclientDeviceId="WEBCLIENT_DEVICE_ID",e.VSDKLogTrackingId="ZM_VSDK_LOG_TRACKING_IDS"}(cs||(cs={}));const ds=(window.crypto||window.msCrypto).subtle,ls=us.WebclientIVState,ps=Object.keys(as).map((e=>as[e].sessionType));class hs{constructor(e,t,r){this.isGCMEnabled=void 0,this.gcmSessionKey=void 0,this.gcmMainSessionKey=void 0,this.zoomId=void 0,this.resetParameters(e,t,r),Vi.set(ls,{},Ni.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new hs(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(xi()||!Zi())&&r===ss.AES_GCM,this.gcmSessionKey=ln(t),this.gcmMainSessionKey||(this.gcmMainSessionKey=this.gcmSessionKey),this.zoomId=String(e)}beginCrypto(e,t,r){const o=new Uint32Array(1);o[0]=9,o[0]+=Number(r);const n=new Uint8Array(o.buffer);let i=new Uint8Array(132);const s=ln(t);return i.set(s,0),i.set(n,s.length),i=i.subarray(0,s.length+4),ds.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!0,["sign"]).then((e=>ds.sign({name:"HMAC"},e,i))).then((e=>ds.importKey("raw",e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"])))}getNextIV(e){const t=Vi.get(ls);return void 0===t[e]?(t[e]=0,Vi.set(ls,t,Ni.SessionStorage)):Vi.set(ls,(t=>ot(ot({},t),{},{[e]:t[e]+1})),Ni.SessionStorage)}resetIVState(){const e=Vi.get(ls);if(void 0===e);else{const t=Object.keys(e).filter((e=>ps.indexOf(e)>-1));t.length>0&&(t.forEach((t=>{e[t]+=1e6})),Vi.set(ls,e,Ni.SessionStorage))}}static resetIV(){if(void 0===this.instance)throw new Error("reset before intialize");this.instance.resetIVState()}static beginEncrypt(e){let{text:t,type:r}=e;const o=new Uint8Array(0);if(this.instance&&this.instance.isGCMEnabled){const e=16,n=this.instance.getNextIV(r.sessionType),i=new ArrayBuffer(16),s=new Uint8Array(i);new DataView(i).setUint32(0,n,!0);let a=null;return a="BO_BROADCAST"===r.sessionType||"XMPP_CHAT"===r.sessionType?this.instance.gcmMainSessionKey:this.instance.gcmSessionKey,this.instance.beginCrypto(a,this.instance.zoomId,r.gcmType).then((r=>{const n=(new TextEncoder).encode(t);return ds.encrypt({name:"AES-GCM",iv:s,additionalData:o,tagLength:8*e},r,n)})).then((t=>{const r=1+s.byteLength+2+o.byteLength+4+t.byteLength,n=new ArrayBuffer(r);new Uint8Array(n)[0]=s.length,new Uint8Array(n,1,s.byteLength).set(s),new DataView(n).setUint16(1+s.byteLength,o.length,!0),new Uint8Array(n,3+s.byteLength).set(o),new DataView(n).setUint32(1+s.byteLength+2+o.byteLength,t.byteLength-e,!0),new Uint8Array(n,1+s.byteLength+2+o.byteLength+4).set(new Uint8Array(t));const i=new Uint8Array(n).reduce(((e,t)=>e+String.fromCharCode(t)),"");return window.btoa(i).replace(/_/g,"/").replace(/-/g,"+").replace(/\=/g,"")}))}return Promise.resolve(an(t))}static beginDecrypt(e){let{decryptedText:t,type:r,zoomId:o}=e;if(this.instance&&this.instance.isGCMEnabled){const e=function(e){let t;const r=e.length,o=new Array(r);for(t=0;t{const t=function(e,t){e=new Uint8Array(e),t=new Uint8Array(t);const r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}(l,p);return ds.decrypt({name:"AES-GCM",iv:i,additionalData:u,tagLength:8*p.length},e,t.buffer)})).then((e=>({message:(new TextDecoder).decode(e),iv:i,aad:u}))).catch((e=>({message:"[This is an encrypted message]",iv:i,aad:u})))}{const e=new TextDecoder("utf-8");return Promise.resolve({message:e.decode(ln(t))})}}}hs.instance=void 0;const fs=20225,gs=20234,ms=7937,vs=7938,ys=12039,bs=16138,Ss=4098;let _s,Es,Cs,Is,As;!function(e){e[e.NoAttendee=0]="NoAttendee",e[e.All=1]="All",e[e.AllPanelist=2]="AllPanelist",e[e.Host=3]="Host",e[e.NoOne=4]="NoOne",e[e.EveryonePublicly=5]="EveryonePublicly"}(_s||(_s={})),function(e){e[e.AllPanelist=1]="AllPanelist",e[e.Everyone=2]="Everyone",e[e.Invalid=0]="Invalid"}(Es||(Es={})),function(e){e[e.All=0]="All",e[e.Panelist=1]="Panelist",e[e.IndividualCcPanelist=2]="IndividualCcPanelist",e[e.Individual=3]="Individual",e[e.SilentModeUsers=4]="SilentModeUsers"}(Cs||(Cs={})),function(e){e[e.None=0]="None",e[e.Delete=1]="Delete",e[e.Modify=2]="Modify"}(Is||(Is={})),function(e){e[e.Success=0]="Success",e[e.Delete=1]="Delete",e[e.Block=3]="Block"}(As||(As={}));const ws=[_s.All,_s.Host,_s.NoOne,_s.EveryonePublicly],Ts=[_s.NoOne,_s.All,_s.AllPanelist],Os={AllPanelist:11,Everyone:12},Rs={[Os.AllPanelist]:Es.AllPanelist,[Os.Everyone]:Es.Everyone},ks={userId:Cs.All,displayName:"Everyone",isHost:!1,isCoHost:!1},Ds={userId:Cs.Panelist,displayName:"All panelists"},Ps={userId:Cs.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};let Ms;!function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(Ms||(Ms={}));class Ns{constructor(){this.eventHandlers=void 0,this.websocket=void 0,this.seq=void 0,this.intervalsToBeCleardWhenSocketClose=[],this.heartBeatInterval=6e4,this.eventHandlers=new Map,this.websocket=null,this.seq=1}on(e,t){let r=this.eventHandlers.get(e);r||(r=[]),r.push(t),this.eventHandlers.set(e,r)}off(e,t){const r=this.eventHandlers.get(e);if(r){const o=r.filter((e=>e!==t));this.eventHandlers.set(e,o)}}emit(e,t){const r=this.eventHandlers.get(e);r&&r instanceof Array&&r.slice(0).forEach((e=>{try{e(t)}catch(e){console.error(e)}}))}sendMessageToRwg(e){this.seq+=1;const t=this.seq;return this.websocket&&this.websocket.readyState===WebSocket.OPEN&&this.websocket.send(JSON.stringify(Object.assign(e,{seq:t}))),t}connect(e){this.websocket=new WebSocket(e),this.websocket.binaryType="arraybuffer",this.addWebSocketEventListeners()}close(){var e;null===(e=this.websocket)||void 0===e||e.close()}addHeartBeat(){const e=setInterval((()=>{this.sendMessageToRwg({evt:0})}),this.heartBeatInterval);this.intervalsToBeCleardWhenSocketClose.push(e)}clearIntervals(){this.intervalsToBeCleardWhenSocketClose.forEach((e=>clearInterval(e)))}addWebSocketEventListeners(){this.websocket&&(this.websocket.addEventListener("open",(e=>{this.addHeartBeat(),this.emit("open",e)})),this.websocket.addEventListener("message",(e=>{this.emit("message",e)})),this.websocket.addEventListener("close",(e=>{this.clearIntervals(),this.emit("close",e)})),this.websocket.addEventListener("error",(e=>{this.emit("error",e)})))}joinMeeting(e){return{seq:this.sendMessageToRwg({evt:4097,body:{meetingtoken:e}})}}lockMeeting(e){return{seq:this.sendMessageToRwg({evt:4099,body:{bLock:e}})}}endMeeting(){return{seq:this.sendMessageToRwg({evt:4101,body:{}})}}leaveMeeting(){return{seq:this.sendMessageToRwg({evt:4103,body:{}})}}recordMeeting(e,t){return{seq:this.sendMessageToRwg({evt:4105,body:{bRecord:e,bPause:t}})}}allowSelfRecord(e){return{seq:this.sendMessageToRwg({evt:4325,body:{bAllowISORecord:e}})}}enableZoomIQRecord(e){return{seq:this.sendMessageToRwg({evt:4318,body:{check:e}})}}expel(e){return{seq:this.sendMessageToRwg({evt:4107,body:{id:e}})}}expelAttendee(e){return{seq:this.sendMessageToRwg({evt:4205,body:{jid:e}})}}rename(e,t,r){return{seq:this.sendMessageToRwg({evt:4109,body:{id:e,dn2:t,olddn2:r}})}}assignHost(e,t){return{seq:this.sendMessageToRwg({evt:4111,body:{id:e,bCoHost:t}})}}reclaimHost(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{seq:this.sendMessageToRwg({evt:4133,body:{id:e,bCoHost:t}})}}revokeCoHost(e){return{seq:this.sendMessageToRwg({evt:4195,body:{id:e}})}}putOnHold(e,t){return{seq:this.sendMessageToRwg({evt:4113,body:{id:e,bHold:t}})}}setMuteOnEntry(e){return{seq:this.sendMessageToRwg({evt:4115,body:{bOn:e}})}}setHoldOnEntry(e){return{seq:this.sendMessageToRwg({evt:4117,body:{bOn:e}})}}inviteCRCDevice(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return{seq:this.sendMessageToRwg({evt:4119,body:{ip:e,type:t,encrypt:r}})}}cancelInviteCRCDevice(e){return{seq:this.sendMessageToRwg({evt:4121,body:{transID:e}})}}sendCloseCaption(e){return{seq:this.sendMessageToRwg({evt:4125,body:ot({},e)})}}allowViewParticipantNumber(e){return{seq:this.sendMessageToRwg({evt:4127,body:{bOn:e}})}}lowerAllHands(){return{seq:this.sendMessageToRwg({evt:4129,body:{}})}}raiseLowerHand(e,t){return{seq:this.sendMessageToRwg({evt:4131,body:{id:e,bOn:t}})}}chat(e,t,r,o){const n={text:e,destNodeID:t};return r&&Object.assign(n,{sn:r}),o&&Object.assign(n,{attendeeNodeID:o}),{seq:this.sendMessageToRwg({evt:4135,body:n})}}assignCC(e,t){return{seq:this.sendMessageToRwg({evt:4137,body:{id:e,bCCEditor:t}})}}enableLT(e){return{seq:this.sendMessageToRwg({evt:4227,body:{op:e?2:4}})}}enableNewLLT(){return{seq:this.sendMessageToRwg({evt:4285})}}enableManualCaption(e){return{seq:this.sendMessageToRwg({evt:4291,body:{op:e?1:0}})}}setTranslationLanguage(e){return e?{seq:this.sendMessageToRwg({evt:4305,body:{type:1,lang:e}})}:{seq:this.sendMessageToRwg({evt:4305,body:{type:3}})}}setSpokenLanguage(e){return{seq:this.sendMessageToRwg({evt:4287,body:{lang:e}})}}allowAskLT(e){return{seq:this.sendMessageToRwg({evt:4263,body:{bAnonymous:e}})}}approveLT(){return{seq:this.sendMessageToRwg({evt:4262,body:{bApproved:!0}})}}askLT(e){return{seq:this.sendMessageToRwg({evt:4261,body:{bAnonymous:e}})}}setChatPriviledge(e){return{seq:this.sendMessageToRwg({evt:4141,body:{chatPriviledge:e}})}}setPanelistChatPrivilege(e){if(!Object.values(Os).includes(e))throw Error("Invalid panelist chat privilege req value");return{seq:this.sendMessageToRwg({evt:4141,body:{chatPriviledge:e}})}}sendFeedback(e){return{seq:this.sendMessageToRwg({evt:4143,body:{feedback:e}})}}clearFeedback(){return{seq:this.sendMessageToRwg({evt:4145,body:{}})}}allowUnmuteVideo(e){return{seq:this.sendMessageToRwg({evt:4147,body:{bOn:e}})}}allowUnmuteAudio(e){return{seq:this.sendMessageToRwg({evt:4149,body:{bOn:e}})}}allowRaiseHand(e){return{seq:this.sendMessageToRwg({evt:4151,body:{bOn:e}})}}boToken(e){return{seq:this.sendMessageToRwg({evt:4173,body:{topic:e}})}}startBO(e){return{seq:this.sendMessageToRwg({evt:4175,body:{proto:e}})}}stopBO(e){return{seq:this.sendMessageToRwg({evt:4177,body:{status:e}})}}assignToBO(e,t){return{seq:this.sendMessageToRwg({evt:4179,body:{targetID:e,targetBID:t}})}}switchBO(e,t){return{seq:this.sendMessageToRwg({evt:4181,body:{targetID:e,targetBID:t}})}}wantJoinBO(e,t){return{seq:this.sendMessageToRwg({evt:4183,body:{targetID:e,targetBID:t}})}}joinBO(e){return{seq:this.sendMessageToRwg({evt:4193,body:{targetBID:e}})}}leaveBO(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{seq:this.sendMessageToRwg({evt:4185,body:{reason:e}})}}broadcastBO(e){return{seq:this.sendMessageToRwg({evt:4187,body:{textContent:e}})}}askForHelpBO(e){return{seq:this.sendMessageToRwg({evt:4189,body:{targetID:e}})}}askForHelpResultBO(e,t){return{seq:this.sendMessageToRwg({evt:4191,body:{targetID:e,helpResult:t}})}}allowParticipantRename(e){return{seq:this.sendMessageToRwg({evt:4163,body:{bOn:e}})}}allowMessageFeedbackNotify(e,t){return{seq:this.sendMessageToRwg({evt:4171,body:{bOn:e,id:t}})}}setPlayChime(e,t){return{seq:this.sendMessageToRwg({evt:4197,body:{bOn:e,id:t}})}}admitAllSilentUsers(){return{seq:this.sendMessageToRwg({evt:4199,body:{}})}}bindTeleUser(e,t,r){return{seq:this.sendMessageToRwg({evt:4201,body:{teleUserID:e,targetUserID:t,bBind:r}})}}practiceSession(){return{seq:this.sendMessageToRwg({evt:4207,body:null})}}roleChangeWebinar(e,t,r,o){return{seq:this.sendMessageToRwg({evt:4209,body:{jid:t,userID:r,clientCap:o,bPromote:e}})}}sendPromoteConsent(e,t){return{seq:this.sendMessageToRwg({evt:4254,body:{agreed:e,req_id:t}})}}batchCreateBOToken(e){const t=e.map(((e,t)=>({topic:e,index:t})));return{seq:this.sendMessageToRwg({evt:4211,body:t})}}mute(e,t){return{seq:this.sendMessageToRwg({evt:8193,body:{bMute:t,id:e}})}}audioDrop(e){return{seq:this.sendMessageToRwg({evt:8195,body:{id:e}})}}audioDialout(e,t,r,o,n){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:an(t),bCallme:r,bPressOne:o,bGreeting:n}})}}audioCancelDialout(e,t){return{seq:this.sendMessageToRwg({evt:8199,body:{pn:e,bCallme:t}})}}audioMuteAll(e){return{seq:this.sendMessageToRwg({evt:8201,body:{bMute:e}})}}allowToTalk(e,t){return{seq:this.sendMessageToRwg({evt:8204,body:{id:e,bAllowTalk:t}})}}subscribeVideo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return{seq:this.sendMessageToRwg({evt:12289,body:{id:e,size:t,bOn:r}})}}unsubscribeVideo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{seq:this.sendMessageToRwg({evt:12291,body:{id:e}})}}muteAttendeeVideo(e,t){return{seq:this.sendMessageToRwg({evt:12297,body:{id:e,bOn:t}})}}notifyRwgIsMuteVideo(e,t){return this.muteAttendeeVideo(e,t)}pauseSharing(){return{seq:this.sendMessageToRwg({evt:16385,body:{}})}}resumeSharing(){return{seq:this.sendMessageToRwg({evt:16387,body:{}})}}allowAnonymousQuestion(e,t){return{seq:this.sendMessageToRwg({evt:4155,body:{userId:e,bOn:t}})}}allowViewAll(e,t){return{seq:this.sendMessageToRwg({evt:4157,body:{userId:e,bOn:t}})}}allowVote(e,t){return{seq:this.sendMessageToRwg({evt:4159,body:{userId:e,bOn:t}})}}allowComment(e,t){return{seq:this.sendMessageToRwg({evt:4161,body:{userId:e,bOn:t}})}}sharingRequestRemoteControl(e,t){return{seq:this.sendMessageToRwg({evt:16389,body:{id:e,bOn:t}})}}subscribeGrabRemoteControl(e,t){return{seq:this.sendMessageToRwg({evt:16393,body:{id:e,bOn:t}})}}subscribeSharing(e,t,r,o){const n={id:e,size:t};return r&&Object.assign(n,{bShareToBO:!0}),void 0!==o&&Object.assign(n,{bVideoShare:o}),{seq:this.sendMessageToRwg({evt:16415,body:n})}}unsubscribeSharing(e,t){const r={id:e};return t&&Object.assign(r,{bShareToBO:!0}),{seq:this.sendMessageToRwg({evt:16417,body:r})}}sendRWGConnectionPerformance(e){return{seq:this.sendMessageToRwg({evt:4167,body:{data:e}})}}sendSdkKeyToMonitor(e,t,r){return{seq:this.sendMessageToRwg({evt:4167,body:{data:`ZoomConferenceClient,videoapp_HTML5_sdk_web_join,${r},2,${t},${e}`}})}}sendDatachannelOffer(e){return{seq:this.sendMessageToRwg({evt:24321,offer:e})}}joinOrLeaveVoip(e){return{seq:this.sendMessageToRwg({evt:8203,body:{bOn:e}})}}startSharing(e,t){return{seq:this.sendMessageToRwg({evt:16409,body:ot({id:e,boOn:!1},null!=t?t:{})})}}stopSharing(e){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,bOn:!0}})}}lockSharing(e){return{seq:this.sendMessageToRwg({evt:4169,body:{lockShare:e}})}}startShareToBreakoutRoom(e){return{seq:this.sendMessageToRwg({evt:16425,body:{id:e,bShareToBO:!0}})}}stopShareToBreakoutRoom(e){return{seq:this.sendMessageToRwg({evt:16425,body:{id:e,bShareToBO:!1}})}}preAssignBreakoutRoom(){return{seq:this.sendMessageToRwg({evt:4213,body:{}})}}claimHost(e){return{seq:this.sendMessageToRwg({evt:4215,body:{hostKey:e}})}}allowMultiplePin(e,t){return{seq:this.sendMessageToRwg({evt:4217,body:{userID:e,bOn:t}})}}spotlightVideo(e,t){return{seq:this.sendMessageToRwg({evt:4219,body:ot({id:e},t)})}}connectCamera(e,t){const r={evt:12307,body:{id:e,bOn:t}};return{seq:this.sendMessageToRwg(r)}}followHostLayout(e){return{seq:this.sendMessageToRwg({evt:4223,body:{bFollowHostVideo:e}})}}setVideoDragLayout(e){return{seq:this.sendMessageToRwg({evt:4218,body:{drag_list:e}})}}chatCmdReq(e,t){return{seq:this.sendMessageToRwg({evt:4237,body:{msgID:e,cmd:t}})}}activeAppLinkReq(e){return{seq:this.sendMessageToRwg({evt:4257,body:{appId:e}})}}activeAppInfoReq(){return{seq:this.sendMessageToRwg({evt:4255,body:{}})}}muteShareAudio(e){return{seq:this.sendMessageToRwg({evt:16423,body:{bOn:!0,bShareAudio:!e}})}}localMuteAudio(e,t){return{seq:this.sendMessageToRwg({evt:8209,body:{id:e,bMute:t}})}}changeSharePronoun(e,t){return{seq:this.sendMessageToRwg({evt:4264,body:{bPronoun:e,strPronoun:t}})}}sendReceivingSharingReady(e){return{seq:this.sendMessageToRwg({evt:16421,body:{ssrc:e}})}}sendManualCaption(e){return{seq:this.sendMessageToRwg({evt:4289,body:ot({},e)})}}sendPollingAction(e,t,r){return{seq:this.sendMessageToRwg({evt:4224,body:ot({action:e,PollingId:t},r)})}}broadcastUserNetworkQuality(e){const t={type:e.isUplink,level:e.level,bwLevel:e.bwLevel};return{seq:this.sendMessageToRwg({evt:4331,body:t})}}sendFarEndCameraControl(e,t,r){return{seq:this.sendMessageToRwg({evt:4329,body:{cmd:e,userID:t,buttonID:r}})}}sendCameraAblity(e){return{seq:this.sendMessageToRwg({evt:4330,body:ot(ot({},e),{},{focus:!1})})}}}class Ls extends Ns{static createAgent(){return this.rwgInstance||(this.rwgInstance=new Ls),this.rwgInstance}}Ls.rwgInstance=null;class Vs extends Ns{static getInstance(){return this.instance||(this.instance=new Vs),this.instance}}Vs.instance=null;const Us=[{name:"audio_simd.min.js",category:"audio",type:"worker",tag:"simd",alias:"audioSIMDWorkletPath"},{name:"audio.simd.wasm",category:"audio",type:"wasm",tag:"simd",alias:"audioSIMDWasm"},{name:"js_audio_process.min.js",category:"audio",type:"worker",tag:"",alias:"audioWorkerPath"},{name:"audio.encode.wasm",category:"audio",type:"wasm",tag:"",alias:"audioWasm"},{name:"js_audio_worklet.min.js",category:"audio",type:"worklet",tag:"",alias:"audioWorkletPath"},{name:"js_audio_worklet_simd.min.js",category:"audio",type:"worklet",tag:"simd",alias:"audioWorkletSIMDPath"},{name:"js_audio_worklet_process.min.js",category:"audio",type:"worklet",tag:"",alias:"audioWorkletProcessPath"},{name:"video_mtsimd.min.js",category:"video",type:"worker",tag:"simd,thread",alias:"videoMSIMDWorkerPath"},{name:"video.mtsimd.wasm",category:"video",type:"wasm",tag:"simd,thread",alias:"videoMSIMDWasm"},{name:"video_m.min.js",category:"video",type:"worker",tag:"thread",alias:"videoMtWorkerPath"},{name:"video.mt.wasm",category:"video",type:"wasm",tag:"thread",alias:"videoMtWasm"},{name:"video_simd.min.js",category:"video",type:"worker",tag:"simd",alias:"videoSIMDWorkerPath"},{name:"video.simd.wasm",category:"video",type:"wasm",tag:"simd",alias:"videoSIMDWasm"},{name:"video_s.min.js",category:"video",type:"worker",tag:"",alias:"videoWorkerPath"},{name:"video.decode.wasm",category:"video",type:"wasm",tag:"",alias:"videoWasm"},{name:"video_share_mtsimd.min.js",category:"video",type:"worker",tag:"simd,thread",alias:"vsmiworkerpath"},{name:"sharing_mtsimd.min.js",category:"sharing",type:"worker",tag:"simd,thread",alias:"sharingMSIMDWorkerPath"},{name:"sharing_m.min.js",category:"sharing",type:"worker",tag:"thread",alias:"sharingMtWorkerPath"},{name:"sharing_simd.min.js",category:"sharing",type:"worker",tag:"simd",alias:"sharingSIMDWorkerPath"},{name:"sharing_s.min.js",category:"sharing",type:"worker",tag:"",alias:"sharingWorkerPath"}],js="1502",xs=["dimension"],Fs=["isFromMainSession"];let Bs;!function(e){e.VideoEncode="0",e.VideoDecode="1",e.AudioEncode="2",e.AudioDecode="3",e.SharingEncode="4",e.SharingDecode="5"}(Bs||(Bs={}));const Hs=us.WebclientIVState;class Ws{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new Ws),this.agentInstance}constructor(){this.assetsPath=void 0,this.instance=void 0,this.callbackList=void 0,this.mediaWorkersPath=void 0,this.constraints=void 0,this.svcUrl=void 0,this.meetingNumber=void 0,this.confId=void 0,this.mediaSocketAddress=void 0,this.currentUserId=void 0,this.receivedSharingCanvas=void 0,this.sharingCanvas=void 0,this.mediaOptions=void 0,this.callbackList=[]}init(){if(!this.instance){const e={ivObj:{[is.AUDIO_ENCODE]:Vi.get(Hs)&&Vi.get(Hs)[is.AUDIO_ENCODE],[is.VIDEO_ENCODE]:Vi.get(Hs)&&Vi.get(Hs)[is.VIDEO_ENCODE],[is.SHARING_ENCODE]:Vi.get(Hs)&&Vi.get(Hs)[is.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(Ls.createAgent())}}setAssetsAndConstraint(e,t,r,o){var n;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=((e,t)=>Us.reduce(((r,o)=>{const{name:n,alias:i}=o;return Object.assign(r,{[`${i}`]:`${e}/${t&&js?`${js}_`:""}${n}`}),r}),{}))(this.assetsPath,!!r),this.onMediaSDKCallback=this.onMediaSDKCallback.bind(this),this.mediaOptions=o,null===(n=this.instance)||void 0===n||n.JsMediaSDK_PreLoad(this.mediaWorkersPath,this.onMediaSDKCallback,o)}onMediaSDKCallback(e,t){this.callbackList.length>0&&this.callbackList.forEach((r=>r(e,t)))}registerCallback(e){this.callbackList.push(e)}unregisterCallback(e){this.callbackList=this.callbackList.filter((t=>t!==e))}static isSupportVideoEncodeHardwareAcceleration(){return JsMediaSDK_Instance.util.IsSupportVideoEncodeHardwareAcceleration()}static isSupportVideoDecodeHardwareAcceleration(){return JsMediaSDK_Instance.util.IsSupportVideoDecodeHardwareAcceleration()}static isCompatibleHardwareForEncode(){return Qi()&&0==JsMediaSDK_Instance.util.AdapterWhiteListCheckForEncoder()}static getPTZCapability(){var e,t,r,o,n,i;return{pan:!(null===(e=JsMediaSDK_Instance.util)||void 0===e||null===(t=e.isSupportCameraPan)||void 0===t||!t.call(e)),tilt:!(null===(r=JsMediaSDK_Instance.util)||void 0===r||null===(o=r.isSupportCameraTilt)||void 0===o||!o.call(r)),zoom:!(null===(n=JsMediaSDK_Instance.util)||void 0===n||null===(i=n.isSupportCameraZoom)||void 0===i||!i.call(n))}}static isSupportVideoShare(){var e,t;return!(null===(e=JsMediaSDK_Instance.util)||void 0===e||null===(t=e.isSupportVideoShare)||void 0===t||!t.call(e))}static isSupportSending720P(){var e;return!(null===(e=JsMediaSDK_Instance.util)||void 0===e||!e.get720pcapacity())}static isSupportSubscribing1080P(){var e;return!(null===(e=JsMediaSDK_Instance.util)||void 0===e||!e.getsub1080pcapacity())}connect(e){var t,r,o,n,i,s;let{svcUrl:a,meetingNumber:u,conId:c,e2eEncrypt:d,isViewOnly:l,currentUserId:p,isWebinar:h,enableAudioQos:f,enableVideoQos:g=!1}=e;this.svcUrl=a,this.meetingNumber=u,this.confId=c;const m=((e,t,r)=>({videoSocketAddress:`wss://${e}/wc/media/${t}?type=v&cid=${r}`,audioSocketAddress:`wss://${e}/wc/media/${t}?type=a&cid=${r}`,sharingSocketAddress:`wss://${e}/wc/media/${t}?type=${Xi()?"j":"s"}&cid=${r}`}))(a,u,c);this.mediaSocketAddress=m,this.currentUserId=p;const v=rs(null===(t=this.mediaOptions)||void 0===t?void 0:t.enableMultiDecodeVideoWithoutSAB);var y,b,S,_,E,C,I,A,w;(null===(r=this.instance)||void 0===r||r.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkerPath:Zi()?null===(o=this.mediaWorkersPath)||void 0===o?void 0:o.audioWorkletPath:void 0,e2eEncrypt:d,isEnableListenInitEvent:!0}),!0===(null===(n=this.constraints)||void 0===n?void 0:n.audio)&&Zi()&&!qi())&&((h||Yi())&&(null===(y=this.instance)||void 0===y||y.initAudioDecode(this.mediaWorkersPath,m.audioSocketAddress,p,fr,c,u,v,f)),!Yi()||h&&l||null===(b=this.instance)||void 0===b||b.initAudioEncode(this.mediaWorkersPath,m.audioSocketAddress,p,fr,c,u,v,f));!0===(null===(i=this.constraints)||void 0===i?void 0:i.video)&&Zi()&&(null===(S=this.instance)||void 0===S||S.initVideoDecode(this.mediaWorkersPath,m.videoSocketAddress,p,fr,c,u,v,null===(_=null===(E=JsMediaSDK_Instance.util)||void 0===E?void 0:E.isGraphicShouldUseHardwareAccelerationDecode())||void 0===_||_,g),h&&l||null===(C=this.instance)||void 0===C||C.initVideoEncode(this.mediaWorkersPath,m.videoSocketAddress,p,fr,c,u,v,!1,g,!0,!0)),!0===(null===(s=this.constraints)||void 0===s?void 0:s.screen)&&(Zi()?(null===(I=this.instance)||void 0===I||I.initSharingDecode(this.mediaWorkersPath,m.sharingSocketAddress,p,fr,c,u,v),h&&l||null===(A=this.instance)||void 0===A||A.initSharingEncode(this.mediaWorkersPath,m.sharingSocketAddress,p,fr,c,u,v)):null===(w=this.instance)||void 0===w||w.initSharingDecode(m.sharingSocketAddress))}destroy(){var e;null===(e=this.instance)||void 0===e||e.destroy(),this.instance=null,this.callbackList=[],[Bs.AudioDecode,Bs.AudioEncode,Bs.VideoDecode,Bs.VideoEncode].forEach((e=>{var t;null===(t=this.instance)||void 0===t||t.updateQosSubscription(!1,e)}))}disconnect(){var e,t;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(17,{}),null===(t=this.instance)||void 0===t||t.JsMediaSDK_UnInit()}muteAudio(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(8,{ssrc:0})}unmuteAudio(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(7,{ssrc:0,AudioSelectValue:0})}joinComputerAudio(e,t,r,o,n){var i;return null===(i=this.instance)||void 0===i?void 0:i.Notify_MeidaSDK(22,ot({CaptureAudio:o,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t},speakerInfo:{defaultDeviceId:r}},n?{useAudioBridge:!0,audioBridge:n}:{}))}leaveComputerAudio(){var e;return null===(e=this.instance)||void 0===e?void 0:e.Notify_MeidaSDK(21,null)}joinSharingAudio(e){var t;let{ssrc:r,microphoneDeviceId:o,speakerDeviceId:n,isCaptureAudio:i}=e;return null===(t=this.instance)||void 0===t?void 0:t.Notify_MeidaSDK(72,{CaptureAudio:i,CaptureAudioInfo:{ssrc:r,AudioSelectValue:"default"===o?null:o},speakerInfo:{defaultDeviceId:n},checkAutoplay:!1})}leaveSharingAudio(e){var t;return null===(t=this.instance)||void 0===t?void 0:t.Notify_MeidaSDK(73,{isPause:e?1:0})}changeSpeaker(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(11,{ssrc:0,AudioSelectValue:e})}changeMicrophone(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(18,{ssrc:0,AudioSelectValue:"default"===e?null:e})}restoreWebRTC(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(19,{ssrc:0,AudioSelectValue:"default"===e?null:e})}renderVideo(e,t,r,o,n,i,s,a,u,c,d){var l;null===(l=this.instance)||void 0===l||l.Notify_MeidaSDK(1,{userId:t,width:o,height:n,x:i,y:s,quality:a,isMyself:u,canvas:e,enableWaterMark:d,waterMarkText:c,zone:r})}stopRenderVideo(e,t,r,o){var n;let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(2,{canvas:e,userId:t,RGBA:o,doNotClean:i,zone:r})}startCaptureVideo(e,t,r,o,n,i){var s;let a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];const u=(arguments.length>7?arguments[7]:void 0)?Ws.getPTZCapability():void 0;null===(s=this.instance)||void 0===s||s.Notify_MeidaSDK(3,ot({ssid:e,width:r,height:o,fps:24,video:n,usingFacingMode:i,VideoSelectValue:"default"===t?null:t,disableOriginalRatio:a},u))}stopCaptureVideo(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(4,{ssrc:0})}changeCamera(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(12,{VideoSelectValue:"default"===e?null:e})}switchCanvasForVideoCapture(e){var t;let r=e;Array.isArray(e)||(r=[e]),null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(25,r)}renderSharing(e,t){var r;let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.receivedSharingCanvas=t,null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(23,{width:0,height:0,ssrc:e,canvas:t,enableWaterMark:o,waterMarkText:n,isFromMainSession:i})}stopRenderSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(24,{})}switchSharingSource(e){var t;let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(36,{ssrc:e,isFromMainSession:Number(r)})}ajustmentReceivedSharingCanvas(e,t){if(this.receivedSharingCanvas)try{this.receivedSharingCanvas.width=e,this.receivedSharingCanvas.height=t}catch(e){}}startRemoteControl(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(26,ot({socketURL:`wss://${this.svcUrl}`,meetingID:this.meetingNumber,condID:this.confId,os:t,dom:e},r))}stopRemoteControl(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(28)}resendRemoteControlPositionPDU(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(41)}updateRemoteControlProperties(e){var t;const{dimension:r}=e,o=it(e,xs);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(27,ot(ot({},r),o))}startDesktopSharing(e,t,r,o){var n;let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=arguments.length>5?arguments[5]:void 0;this.sharingCanvas=document.querySelector(`#${t}`);let a={};o&&(a={share2ndCamera:!0,share2ndCameraParams:{VideoSelectValue:"default"===o.cameraId?null:o.cameraId,width:o.width,height:o.height}}),void 0!==s&&(a=ot(ot({},a),{},{videoParams:{displaySurface:s}})),null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(30,ot(ot({ssid:e,canvas:t,video:r},a),{},{showShareAudioOption:i}))}stopDesktopSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(31,{})}pauseDesktopSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(32,{})}resumeDesktopSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(33,{})}selectLanguageChannelForNewLTT(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(57,{lang:e})}changeSharingSecondCamera(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(49,{VideoSelectValue:e})}ajustmentSharingCanvas(e,t){if(this.sharingCanvas)try{this.sharingCanvas.width=e,this.sharingCanvas.height=t}catch(e){}}checkChromeSharingExtension(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(34,{})}enableAudioEncode(){var e,t;null===(e=this.instance)||void 0===e||e.initAudioEncode(this.mediaWorkersPath,this.mediaSocketAddress.audioSocketAddress,this.currentUserId,fr,this.confId,this.meetingNumber,rs(null===(t=this.mediaOptions)||void 0===t?void 0:t.enableMultiDecodeVideoWithoutSAB))}sendUserNodeList(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(43,{userList:e,encryptKey:t})}updateRenderedSharingDimension(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(44,{width:e,height:t})}pauseOrResumeAudio(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(45,{bPause:e})}updateRenderedVideoCanvasDimension(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(46,{canvas:e,width:t,height:r})}clearVideoCanvas(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(47,{id:e,RGBA:t})}adjustRenderedVideoPosition(e,t,r,o,n,i,s,a){var u;null===(u=this.instance)||void 0===u||u.Notify_MeidaSDK(48,{userId:t,x:o,y:n,width:i,height:s,canvas:e,zone:r,RGBA:a})}mirrorVideo(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(75,{isMirrorMyVideo:e})}updateUserMediaSN(e){var t,r,o;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(80,{isFromMainSession:Number(e.isFromMainSession),mediaActionType:e.iVType,body:{add:null!==(r=e.added)&&void 0!==r?r:[],remove:null!==(o=e.removed)&&void 0!==o?o:[]}})}updateMediaParams(e){var t;const{iVType:r,isFromMainSession:o,updateParams:n}=e;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(81,{mediaActionType:r,isFromMainSession:Number(o),updateParams:n})}createMainSessionChannel(e,t){var r,o;"sharing"===e?null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(84,t):null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(85,t)}addReceivedSharingChannelType(e){var t;const{isFromMainSession:r}=e,o=it(e,Fs);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(82,ot({isFromMainSession:Number(r)},o))}removeReceivedSharingChannelType(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(83,{isFromMainSession:Number(e.isFromMainSession),ssrc:e.ssrc})}enableHardwareAccelerationForVideoDecode(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(70,{enable:e})}enableHardwareAccelerationForVideoEncode(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(71,{enable:e})}setSharingAudioVolume(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(74,{userid:e>>10,shareVolume:t?0:100,isFromMainSession:r})}subscribeToQos(e,t){e.forEach((e=>{var r;null===(r=this.instance)||void 0===r||r.updateQosSubscription(!0,e,t)}))}unsubscribeFromQos(e){e.forEach((e=>{var t;null===(t=this.instance)||void 0===t||t.updateQosSubscription(!1,e)}))}passThroughRWGMessage(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(40,e)}startVirtualBackgroundSetting(e,t,r,o,n,i){var s;let a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];null===(s=this.instance)||void 0===s||s.Notify_MeidaSDK(91,{canvas:e,bgdom:t,width:n,height:i,ssid:r,VideoSelectValue:"default"===o?null:o,disableOriginalRatio:a})}updateVirtualBackgroundImage(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(92,{bgdom:e})}stopVirtualBackgroundSetting(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(93,{isSwitch:t})}startMaskSetting(e,t,r,o,n,i,s,a,u){var c;null===(c=this.instance)||void 0===c||c.Notify_MeidaSDK(62,{canvas:e,maskdom:r,bgdom:t,dx:0,dy:0,dWidth:i,dHeight:s,width:a,height:u,ssid:o,VideoSelectValue:"default"===n?null:n})}updateMaskBackgroundImage(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(63,{bgdom:e})}updateMaskClip(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(64,{maskdom:e,dx:0,dy:0,dWidth:t,dHeight:r})}stopMaskSetting(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(65,{isSwitch:t})}enableVideoObserver(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(99,{enable:e})}enableShareAudioToBreakoutRoom(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(86,{enable:e})}sendUserAudioStatus(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(51,e)}muteOrUnmuteOtherAudio(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(50,{userId:e,volume:t?0:100})}adjustOtherAudioVolume(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(50,{userId:e,volume:t})}notifySDKMeetingReady(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(113)}movePTZCamera(e){var t;return null===(t=JsMediaSDK_Instance.util)||void 0===t?void 0:t.queryPTZPermisson().then((t=>{var r;return t?(null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(53,e),Promise.resolve("")):Promise.reject("Cannot move camera without permission granted")}))}switchSharingMode(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(101,{mode:e})}}Ws.agentInstance=void 0;const $s="ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",Gs="UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",zs="ADD_USER_PARTICIPANT_ATTRIBUTE",Ks="UPDATE_USER_PARTICIPANT_ATTRIBUTE",qs="REMOVE_USER_PARTICIPANT_ATTRIBUTE",Js="UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",Qs="REMOVE_WEBINAR_ATTENDEE_ATTRIBUTE",Zs="JOIN_MEETING_SUCCESS",Ys="JOIN_MEETING_FAILED",Xs="RECONNECTING_MEETING",ea="LEAVING_MEETING",ta="MEETING_IN_WAITING_ROOM",ra="UPDATE_MEETING_ATTRIBUTE",oa="SHARE_PRONOUN_TYPE_UPDATE";var na;!function(e){e.ConnectionChange="connection-change",e.OnHoldChange="on-hold-change",e.UserAdd="user-added",e.UserUpdate="user-updated",e.UserRemove="user-removed",e.AttendeeUpdate="attendee-updated",e.MeetingAttributeUpdate="meeting-attribute-updated",e.PromoteAttendeeConsent="promote-attendee-consent",e.ActiveAppsUpdate="active-apps-updated",e.SharePronounTypeUpdate="share-pronoun-type-update"}(na||(na={}));const ia={JoinMeeting:{success:$s,fail:[Ys]}},sa={[na.ConnectionChange]:[{event:Zs,payload:()=>({state:Ri.Connected})},{event:Ys,payload:e=>ot({state:Ri.Fail},e)},{event:Xs,payload:e=>ot({state:Ri.Reconnecting},e)},{event:ea,payload:e=>ot({state:Ri.Closed},e)}],[na.OnHoldChange]:[{event:ta,payload:e=>({isOnHold:e})}],[na.UserAdd]:[{event:$s,payload:e=>[e]},{event:zs,payload:e=>e}],[na.UserUpdate]:[{event:Gs,payload:e=>[e]},{event:Ks,payload:e=>e}],[na.UserRemove]:[{event:qs,payload:e=>e}],[na.AttendeeUpdate]:[{event:Js,payload:e=>e},{event:Qs,payload:e=>e}],[na.MeetingAttributeUpdate]:[{event:ra,payload:()=>{}}],[na.PromoteAttendeeConsent]:[{event:"MEETING_WEBINAR_PROMOTE_CONSENT_REQ",payload:e=>{let{req_id:t,sender_id:r}=e;return{reqId:t,senderId:r}}}],[na.ActiveAppsUpdate]:[{event:"ACTIVE_APPS_UPDATE",payload:()=>{}}],[na.SharePronounTypeUpdate]:[{event:oa,payload:e=>e}]},aa="LIVE_TRANSCRIPTION_RECEIVE_MESSAGE",ua="LIVE_TRANSCRIPTION_CAPTION_STATUS_CHANGE_RESPONSE",ca="LIVE_TRANSCRIPTION_STATUS_CHANGE",da={"caption-message":[{event:aa,payload:e=>e}],"caption-status":[{event:ua,payload:e=>e}],"caption-enable":[{event:ca,payload:e=>e}]},la="CHAT_RECEIVE_MESSAGE_EVENTS",pa="CHAT_PRIVILEGE_CHANGE",ha="CHAT_MESSAGE_RESPONSE",fa="CHAT_DELETE_MESSAGE_REPONSE";let ga;!function(e){e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change",e.ChatDeleteMessage="chat-delete-message"}(ga||(ga={}));const ma={[ga.ChatOnMessage]:[{event:la,payload:e=>e}],[ga.ChatPrivilegeChange]:[{event:pa,payload:e=>e}],[ga.ChatDeleteMessage]:[{event:fa,payload:e=>e}]},va="COMMAND_RECEIVE_MESSAGE_EVENTS",ya="COMMAND_STATUS_EVENTS";let ba;!function(e){e.CommandChannelStatus="command-channel-status",e.CommandChannelMessage="command-channel-message"}(ba||(ba={}));const Sa={[ba.CommandChannelStatus]:[{event:ya,payload:e=>e}],[ba.CommandChannelMessage]:[{event:va,payload:e=>e}]};let _a,Ea;!function(e){e.Recording="Recording",e.Paused="Paused",e.Stopped="Stopped",e.Ask="Ask",e.Accept="Accept",e.Decline="Decline"}(_a||(_a={})),function(e){e[e.None=0]="None",e[e.Init=1]="Init",e[e.Start=2]="Start",e[e.Pause=3]="Pause",e[e.Stop=4]="Stop"}(Ea||(Ea={}));const Ca="CLOUD_RECORDING_STATUS_CHANGE",Ia="CLOUD_RECORDING_ISO_STATUS_CHANGE",Aa="LOCAL_RECORDING_CHANGE",wa="RECORDING_FOR_IQ_STATUS_CHANGE",Ta="RECORDING_FOR_IQ_OPERATION_CHANGE";let Oa;!function(e){e.RecordingChange="recording-change",e.IndividualRecordingChange="individual-recording-change",e.LocalRecordingChange="local-recording-change",e.RecordingIqChange="recording-iq-change"}(Oa||(Oa={}));const Ra={[Oa.RecordingChange]:[{event:Ca,payload:e=>{const{cmrServerStatus:t}=e;return t===Ea.Start?_a.Recording:t===Ea.Pause?_a.Paused:_a.Stopped}}],[Oa.IndividualRecordingChange]:[{event:Ia,payload:e=>e}],[Oa.LocalRecordingChange]:[{event:Aa,payload:e=>e}],[Oa.RecordingIqChange]:[{event:wa,payload:e=>e}]};let ka,Da,Pa,Ma,Na,La;!function(e){e[e.InitSuccess=1]="InitSuccess",e[e.InitSuccessVideo=1.1]="InitSuccessVideo",e[e.InitSuccessAudio=1.2]="InitSuccessAudio",e[e.InitSuccessSharing=1.3]="InitSuccessSharing",e[e.UserGrantCaptureAudio=2]="UserGrantCaptureAudio",e[e.CurrentVideoResolution=3]="CurrentVideoResolution",e[e.JpegDecThreadOk=4]="JpegDecThreadOk",e[e.JpegData=5]="JpegData",e[e.SharingPara=6]="SharingPara",e[e.VideoDecodeMaxSize=7]="VideoDecodeMaxSize",e[e.CurrentCaptureVideoWidthHeight=8]="CurrentCaptureVideoWidthHeight",e[e.StartVideoCaptureSuccess=9]="StartVideoCaptureSuccess",e[e.StopVideoCaptureSuccess=10]="StopVideoCaptureSuccess",e[e.StartRemoteControlSuccess=11]="StartRemoteControlSuccess",e[e.CancelRemoteControlSuccess=12]="CancelRemoteControlSuccess",e[e.RemoteControlCopiedTextNotify=13]="RemoteControlCopiedTextNotify",e[e.MonitorLog=14]="MonitorLog",e[e.CurrentDesktopSharingWidthHeight=15]="CurrentDesktopSharingWidthHeight",e[e.DesktopSharingCaptureSuccess=16]="DesktopSharingCaptureSuccess",e[e.CheckChromeSharingExtensionResponse=17]="CheckChromeSharingExtensionResponse",e[e.SharingDecodeMaxSize=18]="SharingDecodeMaxSize",e[e.DataChannelOffer=19]="DataChannelOffer",e[e.AesGcmIvResponse=21]="AesGcmIvResponse",e[e.SharingDesktopStreamHaveAudio=23]="SharingDesktopStreamHaveAudio",e[e.JoinComputerAudioComplete=24]="JoinComputerAudioComplete",e[e.JoinSharingAudioComplete=25]="JoinSharingAudioComplete",e[e.LeaveComputerAudioComplete=26]="LeaveComputerAudioComplete",e[e.LeaveSharingAudioComplete=27]="LeaveSharingAudioComplete",e[e.StartVideoStreamInMaskSettingSuccess=66]="StartVideoStreamInMaskSettingSuccess",e[e.SharingFirstDecodeFrameReceivedSsrc=70]="SharingFirstDecodeFrameReceivedSsrc",e[e.StartVideoStreamInVbSettingSuccess=94]="StartVideoStreamInVbSettingSuccess",e[e.VbModelPreloading_3S=96]="VbModelPreloading_3S",e[e.VbModelPreloading_10S=97]="VbModelPreloading_10S",e[e.VbModelPreloadingOk=98]="VbModelPreloadingOk",e[e.InitFailed=-1]="InitFailed",e[e.InitFailedVideo=-1.1]="InitFailedVideo",e[e.InitFailedAudio=-1.2]="InitFailedAudio",e[e.InitFailedSharing=-1.3]="InitFailedSharing",e[e.UserForbiddedCaptureAudio=-2]="UserForbiddedCaptureAudio",e[e.AudioWebsocketBroken=-3]="AudioWebsocketBroken",e[e.VideoWebsocketBroken=-4]="VideoWebsocketBroken",e[e.SharingDecThreadFailed=-5]="SharingDecThreadFailed",e[e.AudioZeroData=-6]="AudioZeroData",e[e.AudioCtxSamplerate=-7]="AudioCtxSamplerate",e[e.UserForbiddedCaptureVideo=-8]="UserForbiddedCaptureVideo",e[e.UserCameraIsTakenByOtherPrograms=-9]="UserCameraIsTakenByOtherPrograms",e[e.StopVideoCaptureFailed=-10]="StopVideoCaptureFailed",e[e.StartRemoteControlFailed=-11]="StartRemoteControlFailed",e[e.CancelRemoteControlFailed=-12]="CancelRemoteControlFailed",e[e.RemoteControlPasteTextLengthOverflow=-14]="RemoteControlPasteTextLengthOverflow",e[e.UserStopDesktopSharing=-15]="UserStopDesktopSharing",e[e.UserCancelPermissionRequest=-16]="UserCancelPermissionRequest",e[e.DesktopSharingChromeExtensionUninstalled=-17]="DesktopSharingChromeExtensionUninstalled",e[e.DesktopSharingPermissionDenied=-18]="DesktopSharingPermissionDenied",e[e.DesktopSharingTimeOut=-19]="DesktopSharingTimeOut",e[e.DesktopSharingError=-20]="DesktopSharingError",e[e.AudioSpeakerSetError=-21]="AudioSpeakerSetError",e[e.DesktopSharingSystemError=-22]="DesktopSharingSystemError",e[e.SharingDesktopStreamHaveNoAudio=-27]="SharingDesktopStreamHaveNoAudio",e.AudioQosData="AUDIO_QOS_DATA",e.VideoQosData="VIDEO_QOS_DATA",e.ShareQosData="VIDEOSHARE_QOS_DATA",e.NetworkQualityChange="NETWORK_QUALITY_CHANGE",e[e.AudioBridgeReconnectStart=-29]="AudioBridgeReconnectStart",e[e.AudioBridgeReconnectEnd=-31]="AudioBridgeReconnectEnd",e[e.MaskSettingParaError=-33]="MaskSettingParaError",e[e.VbSettingParaError=-34]="VbSettingParaError",e[e.NotifyUIFailover=-35]="NotifyUIFailover"}(ka||(ka={})),function(e){e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed"}(Da||(Da={})),function(e){e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk"}(Pa||(Pa={})),function(e){e.Active="active",e.PassiveByMuteOne="passive(mute one)",e.PassiveByMuteAll="passive(mute all)",e.SharingAudio="sharing audio"}(Ma||(Ma={})),function(e){e.Join="join",e.Leave="leave",e.Muted="muted",e.Unmuted="unmuted"}(Na||(Na={})),function(e){e[e.Calling=1]="Calling",e[e.Ringing=2]="Ringing",e[e.Accepted=3]="Accepted",e[e.Busy=4]="Busy",e[e.NotAvailable=5]="NotAvailable",e[e.HangUp=6]="HangUp",e[e.Fail=7]="Fail",e[e.Success=8]="Success",e[e.Timeout=9]="Timeout",e[e.Canceling=10]="Canceling",e[e.Canceled=11]="Canceled",e[e.CancelFailed=12]="CancelFailed"}(La||(La={}));const Va=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),Ua=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]),ja=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);let xa,Fa,Ba,Ha,Wa,$a,Ga,za,Ka,qa,Ja,Qa;!function(e){e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare"}(xa||(xa={})),function(e){e.Sharing="sharing",e.Paused="paused",e.End="ended"}(Fa||(Fa={})),function(e){e[e.Video_90P=0]="Video_90P",e[e.Video_180P=1]="Video_180P",e[e.Video_360P=2]="Video_360P",e[e.Video_720P=3]="Video_720P",e[e.Video_1080P=4]="Video_1080P"}(Ba||(Ba={})),function(e){e.Active="Active",e.Inactive="Inactive"}(Ha||(Ha={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted"}(Wa||(Wa={})),function(e){e.Active="Active",e.Inactive="Inactive"}($a||($a={})),function(e){e.Success="Success",e.Failed="Failed",e.Initial="Initial"}(Ga||(Ga={})),function(e){e.Started="Started",e.Stopped="Stopped",e.Failed="Failed"}(za||(za={})),function(e){e.Approved="Approved",e.Rejected="Rejected"}(Ka||(Ka={})),function(e){e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture",e.ShareFromMainSession="ShareFromMainSession"}(qa||(qa={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted",e.NoAudio="NoAudio",e.Phone="Phone"}(Ja||(Ja={})),function(e){e[e.ImageNotMatch=2]="ImageNotMatch",e[e.CanvasNotMatch=3]="CanvasNotMatch",e[e.VBModelNotMatch=4]="VBModelNotMatch"}(Qa||(Qa={}));const Za="blur";let Ya,Xa;!function(e){e[e.NotConnect=0]="NotConnect",e[e.Connecting=1]="Connecting",e[e.ConnectSuccess=2]="ConnectSuccess",e[e.ConnectFail=3]="ConnectFail"}(Ya||(Ya={})),function(e){e.User="user",e.Environment="environment",e.Left="left",e.Right="right"}(Xa||(Xa={}));const eu=1e3,tu="__ZOOM_SDK_SHARING_VIDEO__",ru="__ZOOM_SDK_VIDEO_ZONE__",ou={data:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0}},nu={data:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0}};let iu,su,au,uu,cu,du,lu;!function(e){e[e.Request=11]="Request",e[e.Decline=12]="Decline",e[e.Approve=13]="Approve",e[e.GiveUp=14]="GiveUp",e[e.StartControl=15]="StartControl",e[e.ContinueControl=16]="ContinueControl",e[e.StopControl=17]="StopControl",e[e.SwitchCamera=20]="SwitchCamera"}(iu||(iu={})),function(e){e[e.Bk=0]="Bk",e[e.Center=1]="Center",e[e.ZoomIn=2]="ZoomIn",e[e.ZoomOut=3]="ZoomOut",e[e.Left=4]="Left",e[e.Right=5]="Right",e[e.Up=6]="Up",e[e.Down=7]="Down",e[e.SwitchCamera=8]="SwitchCamera"}(su||(su={})),function(e){e[e.Pan=192]="Pan",e[e.Tilt=48]="Tilt",e[e.Zoom=12]="Zoom",e[e.Focus=3]="Focus"}(au||(au={})),function(e){e[e.ZoomIn=2]="ZoomIn",e[e.ZoomOut=3]="ZoomOut",e[e.Left=4]="Left",e[e.Right=5]="Right",e[e.Up=6]="Up",e[e.Down=7]="Down",e[e.SwitchCamera=8]="SwitchCamera"}(uu||(uu={})),function(e){e[e.None=0]="None",e[e.ApproveAnother=3]="ApproveAnother",e[e.Stop=5]="Stop"}(cu||(cu={})),function(e){e[e.Null=0]="Null",e[e.Normal=1]="Normal",e[e.VideoMode=2]="VideoMode"}(du||(du={})),function(e){e[e.Null=0]="Null",e[e.VirtualBackground=1]="VirtualBackground",e[e.Mask=2]="Mask"}(lu||(lu={}));const pu="RECEIVE_VIDEO_ACTIVE_INDICATION",hu="RECEIVE_VIDEO_MUTE_INDICATION",fu="ASK_FOR_START_VIDEO_CONSENT",gu="RECEIVE_VIDEO_DIMENSION_CHANGE",mu="CAPTURED_VIDEO_DIMENSION_CHANGE",vu="CAN_NOT_DETECT_CAMERA",yu="CAN_NOT_FIND_CAMERA",bu="VIDEO_USER_FORBIDDEN_CAPTURE",Su="VIDEO_CAMERA_IS_TAKEN",_u="VIDEO_BACKGROUND_FAILED",Eu="VIDEO_ESTABLISH_STREAM_ERROR",Cu="VIDEO_CAPTURE_START_SUCCESS",Iu="VIDEO_CAPTURE_STOP_RESULT",Au="VIDEO_SPOTLIGHT_CHANGE",wu="VIDEO_FOLLOW_HOST_ORDER_CHANGE",Tu="VIDEO_HOST_DRAG_LAYOUT_CHANGE",Ou="VIDEO_NEW_USER_START",Ru="VIDEO_OLD_USER_STOP",ku="VIDEO_VIRTUAL_BACKGROUND_PRELOAD_READY",Du="VIDEO_VIRTUAL_BACKGROUND_SETTING_SUCCESS",Pu="VIDEO_STATISTIC_DATA",Mu="VIDEO_CELL_DETAILED_DATA",Nu="VIDEO_NETWORK_QUALITY_CHANGE",Lu="VIDEO_FAR_END_CAMERA_CONTROL_REQUEST",Vu="VIDEO_FAR_END_CAMERA_CONTROL_RESPONSE",Uu="VIDEO_FAR_END_CAMERA_IN_CONTROL_CHANGE",ju="VIDEO_FAR_END_CAMERA_CAPABILITY_CHANGE",xu="VIDEO_MASK_SETTING_SUCCESS",Fu={startCaptureVideo:{success:Cu,fail:[vu,yu,bu,Eu,Su,_u]},stopCaptureVideo:{success:Iu}};let Bu;!function(e){e.VideoActiveChange="video-active-change",e.PeerVideoStateChange="peer-video-state-change",e.VideoSpotlightChange="video-spotlight-change",e.VideoMutedChange="video-muted-change",e.VideoCapturingChange="video-capturing-change",e.AskForStartVideoConsent="ask-for-start-video-consent",e.VideoDimensionChange="video-dimension-change",e.VideoFollowHostOrder="video-follow-host-order-change",e.VideoHostLayoutChange="video-host-layout-change",e.VideoVBPreloadChange="video-virtual-background-preload-change",e.VideoStatisticDataChange="video-statistic-data-change",e.VideoDetailedDataChange="video-detailed-data-change",e.NetworkQualityChange="network-quality-change",e.FarEndCameraRequestControl="far-end-camera-request-control",e.FarEndCameraResponseControl="far-end-camera-response-control",e.FarEndCameraInControlChange="far-end-camera-in-control-change",e.FarEndCameraCapabilityChange="far-end-camera-capability-change"}(Bu||(Bu={}));const Hu={[Bu.VideoActiveChange]:[{event:pu,payload:e=>({state:e.bVideoOn?Ha.Active:Ha.Inactive,userId:e.userId})}],[Bu.VideoCapturingChange]:[{event:Cu,payload:()=>({state:za.Started})},{event:Iu,payload:e=>({state:null!=e&&e.failed?za.Failed:za.Stopped})}],[Bu.VideoMutedChange]:[{event:hu,payload:e=>({state:e.isVideoMuted?Wa.Muted:Wa.Unmuted,userId:e.id})}],[Bu.AskForStartVideoConsent]:[{event:fu,payload:e=>({state:e.isVideoMuted?Wa.Muted:Wa.Unmuted,userId:e.id})}],[Bu.VideoSpotlightChange]:[{event:Au,payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map((e=>({userId:e})))})}],[Bu.VideoDimensionChange]:[{event:gu,payload:e=>({type:"received",width:e.width,height:e.height})},{event:mu,payload:e=>({type:"captured",width:e.width,height:e.height})}],[Bu.VideoFollowHostOrder]:[{event:wu,payload:e=>({isFollowHostOrder:e.bOn})}],[Bu.VideoHostLayoutChange]:[{event:Tu,payload:e=>Array.isArray(e.layout)?e.layout.map((e=>({userId:e}))):[]}],[Bu.PeerVideoStateChange]:[{event:Ou,payload:e=>ot({action:"Start"},e)},{event:Ru,payload:e=>ot({action:"Stop"},e)}],[Bu.VideoVBPreloadChange]:[{event:ku,payload:e=>({isReady:e})}],[Bu.VideoStatisticDataChange]:[{event:Pu,payload:e=>e}],[Bu.VideoDetailedDataChange]:[{event:Mu,payload:e=>e}],[Bu.NetworkQualityChange]:[{event:Nu,payload:e=>e}],[Bu.FarEndCameraRequestControl]:[{event:Lu,payload:e=>e}],[Bu.FarEndCameraResponseControl]:[{event:Vu,payload:e=>e}],[Bu.FarEndCameraInControlChange]:[{event:Uu,payload:e=>e}],[Bu.FarEndCameraCapabilityChange]:[{event:ju,payload:e=>e}]},Wu="AUDIO_ACTIVE_SPEAKER",$u="AUDIO_UNMUTE_CONSENT",Gu="AUDIO_CURRENT_USER_JOIN_BY_VOIP",zu="AUDIO_CURRENT_USER_JOIN_BY_PHONE",Ku="AUDIO_CURRENT_USER_LEAVE_AUDIO",qu="AUDIO_CURRENT_USER_MUTED",Ju="AUDIO_CURRENT_USER_UNMUTED",Qu="AUDIO_PARTICIPANT_AUDIO_UPDATE",Zu="AUDIO_DIALOUT_RESULT_CODE",Yu="AUDIO_DIALOUT_RESULT_SUCCESS",Xu="DIALOUT_FAIL",ec="AUDIO_DIALOUT_CANCEL_SUCCESS",tc="DIALOUT_CANCEL_FAIL",rc="AUDIO_MERGE_AUDIO_INDICATION",oc="USER_FORBIDDEN_MICROPHONE",nc="ESTABLISH_AUDIO_STREAM_ERROR",ic="AUDIO_AUTO_PLAY_FAILED",sc="INVALID_DEVICE_ID",ac="AUDIO_ALLOW_TALK_CHANGE",uc="SHARE_AUDIO_STATE_CHANGE",cc="AUDIO_STATISTIC_DATA";let dc;!function(e){e.ActiveSpeaker="active-speaker",e.UnmuteAudioConsent="unmute-audio-consent",e.CurrentAudioChange="current-audio-change",e.DialoutStateChange="dialout-state-change",e.MergeAudio="merged-audio",e.AutoPlayFailed="auto-play-audio-failed",e.AllowTalkChange="allow-talk-change",e.ShareAudioChange="share-audio-change",e.AudioStatisticDataChange="audio-statistic-data-change"}(dc||(dc={}));const lc={JoinComputerAudio:{success:Gu,fail:[oc,nc]},LeaveComputerAudio:{success:Ku},JoinAudioByCallMe:{success:Yu,fail:[Xu]},cancelDialOut:{success:ec,fail:[tc]},hangup:{success:Ku}},pc={[dc.ActiveSpeaker]:[{event:Wu,payload:e=>e}],[dc.UnmuteAudioConsent]:[{event:$u,payload:e=>({reason:e})}],[dc.CurrentAudioChange]:[{event:zu,payload:()=>({action:Na.Join,type:"phone"})},{event:Gu,payload:()=>({action:Na.Join,type:"computer"})},{event:Ku,payload:()=>({action:Na.Leave})},{event:qu,payload:e=>{let{source:t}=e;return{action:Na.Muted,source:t}}},{event:Ju,payload:e=>{let{source:t}=e;return{action:Na.Unmuted,source:t}}}],[dc.DialoutStateChange]:[{event:Zu,payload:e=>e}],[dc.MergeAudio]:[{event:rc,payload:e=>e}],[dc.AutoPlayFailed]:[{event:ic,payload:()=>{}}],[dc.AllowTalkChange]:[{event:ac,payload:e=>({enabled:e})}],[dc.ShareAudioChange]:[{event:uc,payload:e=>e}],[dc.AudioStatisticDataChange]:[{event:cc,payload:e=>e}]},hc=["isActive","activeUserId"],fc="SHARE_ACTIVE_INDICATION",gc="SHARE_CHECK_CHROME_SHARING_EXTENSION",mc="SHARE_START_DESKTOP_SHARE_FAILED",vc="SHARE_DIMENSION_CHANGE",yc="SHARE_RECEIVED_DIMENSION_CHANGE",bc="SHARE_VIDEO_STREAMS_END",Sc="SHARE_PASSIVE_STOP_SHARE",_c="SHARE_PASSIVE_BO_STOP",Ec="SHARE_NEW_USER_ADD",Cc="SHARE_USER_REMOVE",Ic="SHARE_USER_PAUSED",Ac="SHARE_USER_RESUMED",wc="SHARE_AUTO_CHANGE_SOURCE",Tc="SHARE_PRIVILEGE_CHANGE",Oc="SHARE_READ_RECEIPT",Rc="SHARE_STATISTIC_DATA";let kc;!function(e){e.ShareActiveChange="active-share-change",e.ShareDimensionChange="share-content-dimension-change",e.SharePassiveStop="passively-stop-share",e.SharePeerStateChange="peer-share-state-change",e.ShareContentChange="share-content-change",e.SharePrivilegeChange="share-privilege-change",e.ShareReadReceipt="share-can-see-screen",e.RemoteControlApprovedChange="remote-control-approved-change",e.RemoteControlInControlChange="remote-control-in-control-change",e.RemoteControlClipboardChange="remote-control-clipboard-change",e.ShareStatisticDataChange="share-statistic-data-change"}(kc||(kc={}));const Dc={[kc.ShareActiveChange]:[{event:fc,payload:e=>{const{isActive:t,activeUserId:r}=e;return ot({state:t?"Active":"Inactive",userId:r},it(e,hc))}}],[kc.ShareDimensionChange]:[{event:vc,payload:e=>({type:"sended",width:e.width,height:e.height})},{event:yc,payload:e=>({type:"received",width:e.width,height:e.height})}],[kc.SharePassiveStop]:[{event:bc,payload:()=>({reason:qa.StopScreenCapture})},{event:Sc,payload:()=>({reason:qa.PrivilegeChange})},{event:_c,payload:()=>({reason:qa.ShareFromMainSession})}],[kc.SharePeerStateChange]:[{event:Ec,payload:e=>({userId:e.id,action:"Start"})},{event:Cc,payload:e=>({userId:e.id,action:"Stop"})},{event:Ic,payload:e=>({userId:e.id,action:"Pause"})},{event:Ac,payload:e=>({userId:e.id,action:"Resume"})}],[kc.ShareContentChange]:[{event:wc,payload:e=>e}],[kc.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?Ka.Approved:Ka.Rejected})}],[kc.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[kc.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[kc.SharePrivilegeChange]:[{event:Tc,payload:e=>({privilege:e})}],[kc.ShareReadReceipt]:[{event:Oc,payload:()=>{}}],[kc.ShareStatisticDataChange]:[{event:Rc,payload:e=>e}]};let Pc,Mc,Nc,Lc,Vc;!function(e){e.LiveStart="liveStart",e.LiveEnd="liveEnd"}(Pc||(Pc={})),function(e){e.MakePublicView="make_question_public_view",e.Comment="comment",e.PrivateView="private",e.DeleteComment="deletecomment",e.DeleteQuestion="deletequestion",e.Reopen="reopen",e.Dismiss="dismiss",e.Upvote="upvote",e.RevokeUpvote="revokeupvote"}(Mc||(Mc={})),(Nc||(Nc={})).Question="question",function(e){e.Question="question",e.UpdateQuestion="updateQuestion",e.Answer="answer",e.DeleteComment="deleteComment",e.DeleteQuestion="deleteQuestion",e.Dismiss="dismiss",e.Reopen="reopen",e.Upvote="upvote",e.AnswerLive="answerLive"}(Lc||(Lc={})),function(e){e.QaSettingChange="qa-setting-change",e.QaActionChange="qa-action-change"}(Vc||(Vc={}));const Uc={[Vc.QaSettingChange]:[{event:"QA_SETTING_OPTION_CHANGE",payload:e=>e}],[Vc.QaActionChange]:[{event:"QA_NEW_ASK_QUESTION",payload:e=>({action:Lc.Question,data:e})},{event:"QA_UPDATE_ANONYMOUS_QUESTION",payload:e=>({action:Lc.UpdateQuestion,data:e})},{event:"QA_ANSWER_QUESTION",payload:e=>({action:Lc.Answer,data:e})},{event:"QA_ANSWER_REMOVE_COMMENT",payload:e=>({action:Lc.DeleteComment,data:e})},{event:"QA_ANSWER_REMOVE_QUESTION",payload:e=>({action:Lc.DeleteQuestion,data:e})},{event:"QA_ANSWER_DISMISS_QUESTION",payload:e=>({action:Lc.Dismiss,data:e})},{event:"QA_ANSWER_REOPEN_QUESTION",payload:e=>({action:Lc.Reopen,data:e})},{event:"QA_ANSWER_VOTE_QUESTION",payload:e=>({action:Lc.Upvote,data:e})},{event:"QA_ANSWER_QUESTION_LIVE",payload:e=>({action:Lc.AnswerLive,data:e})}]},jc="INVALID_OPERATION",xc="INTERNAL_ERROR",Fc="OPERATION_TIMEOUT",Bc="INSUFFICIENT_PRIVILEGES",Hc="IMPROPER_MEETING_STATE",Wc="INVALID_PARAMETERS",$c="OPERATION_LOCKED",Gc="AUDIO_ENCODE_SUCCESS",zc="AUDIO_DECODE_SUCCESS",Kc="VIDEO_ENCODE_SUCCESS",qc="VIDEO_DECODE_SUCCESS",Jc="SHARING_ENCODE_SUCCESS",Qc="SHARING_DECODE_SUCCESS",Zc="AUDIO_ENCODE_FAIL",Yc="AUDIO_DECODE_FAIL",Xc="VIDEO_ENCODE_FAIL",ed="VIDEO_DECODE_FAIL",td="SHARING_ENCODE_FAIL",rd="SHARING_DECODE_FAIL",od="MEDIA_DEVICE_CHANGE";let nd;!function(e){e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change"}(nd||(nd={}));const id={[nd.DeviceChange]:[{event:od,payload:()=>({})}],[nd.MediaSDKChange]:[{event:Gc,payload:()=>({type:"audio",action:"encode",result:"success"})},{event:Zc,payload:()=>({type:"audio",action:"encode",result:"fail"})},{event:zc,payload:()=>({type:"audio",action:"decode",result:"success"})},{event:Yc,payload:()=>({type:"audio",action:"decode",result:"fail"})},{event:Kc,payload:()=>({type:"video",action:"encode",result:"success"})},{event:Xc,payload:()=>({type:"video",action:"encode",result:"fail"})},{event:qc,payload:()=>({type:"video",action:"decode",result:"success"})},{event:ed,payload:()=>({type:"video",action:"decode",result:"fail"})},{event:Jc,payload:()=>({type:"share",action:"encode",result:"success"})},{event:td,payload:()=>({type:"share",action:"encode",result:"fail"})},{event:Qc,payload:()=>({type:"share",action:"decode",result:"success"})},{event:rd,payload:()=>({type:"share",action:"decode",result:"fail"})}]},sd="BREAKOUT_ROOM_ADD_TOKEN",ad="BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",ud="BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",cd="BREAKOUT_ROOM_ROOM_COUTDOWN",dd="BREAKOUT_ROOM_BROADCAST_MESSAGE",ld="BREAKOUT_ROOM_ASK_HELP_REQUEST",pd="BREAKOUT_ROOM_ASK_HELP_RESPONSE",hd="BREAKOUT_ROOM_ATTRIBUTE_INDICATION",fd="BREAKOUT_ROOM_JOIN_BO_RESPONSE",gd="BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",md="BREAKOUT_ROOM_CURRENT_USER_PARTICIPANT_ROLE",vd="BREAKOUT_ROOM_LOAD_PRE_ASSIGNED_ROOMS",yd="BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE";let bd;!function(e){e.InviteToJoin="invite-to-join",e.RoomCountdown="room-countdown",e.RoomTimeUp="room-time-up",e.ClosingRoomCountdown="closing-room-countdown",e.BroadcastMessage="broadcast-message",e.AskForHelp="ask-for-help",e.AskForHelpResponse="ask-for-help-response",e.RoomStateChange="room-state-change",e.MainSessionUserUpdate="main-session-user-updated"}(bd||(bd={}));const Sd={[bd.InviteToJoin]:[{event:ad,payload:e=>e}],[bd.RoomCountdown]:[{event:cd,payload:e=>e}],[bd.RoomTimeUp]:[{event:gd,payload:e=>e}],[bd.ClosingRoomCountdown]:[{event:ud,payload:e=>e}],[bd.BroadcastMessage]:[{event:dd,payload:e=>e}],[bd.AskForHelp]:[{event:ld,payload:e=>e}],[bd.AskForHelpResponse]:[{event:pd,payload:e=>e}],[bd.RoomStateChange]:[{event:hd,payload:e=>({status:e.controlStatus})}],[bd.MainSessionUserUpdate]:[{event:yd,payload:()=>({})}]};var _d;!function(e){e.StatusUpdate="archiving-status-update",e.OptionsUpdate="archiving-options-update"}(_d||(_d={}));const Ed={[_d.StatusUpdate]:[{event:"ARCHIVING_STATUS_UPDATE",payload:e=>e}],[_d.OptionsUpdate]:[{event:"ARCHIVING_OPTIONS_UPDATE",payload:e=>e}]};let Cd;!function(e){e.PollDataChange="poll-data-change",e.PollSizeUpdate="poll-size-update",e.PollStatusUpdate="poll-status-update"}(Cd||(Cd={}));const Id={[Cd.PollDataChange]:[{event:"POLL_DATA_CHANGE",payload:e=>e}],[Cd.PollSizeUpdate]:[{event:"POLL_SIZE_UPDATE",payload:e=>e}],[Cd.PollStatusUpdate]:[{event:"POLL_STATUS_UPDATE",payload:e=>e}]},Ad=ot(ot(ot(ot(ot(ot(ot(ot(ot(ot(ot(ot(ot(ot({},sa),da),ma),Sa),Ra),pc),Hu),Uc),Dc),id),Sd),Ed),{"closed-caption-message":[{event:"CC_RECEIVE_MESSAGE",payload:e=>e}],"closed-caption-lt-status":[{event:"LT_STATUS_CHANGE",payload:e=>e}],"closed-caption-lt-message":[{event:"LT_RECEIVE_MESSAGE",payload:e=>e}],"closed-caption-status":[{event:"CC_ASSIGN_CC_EDITOR_SUCCESS",payload:e=>e},{event:"CC_STATUS_CHANGE",payload:e=>e}]}),Id),wd=function(e){return{all:e=e||new Map,on:function(t,r){var o=e.get(t);o?o.push(r):e.set(t,[r])},off:function(t,r){var o=e.get(t);o&&(r?o.splice(o.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var o=e.get(t);o&&o.slice().map((function(e){e(r)})),(o=e.get("*"))&&o.slice().map((function(e){e(t,r)}))}}}(),Td=new Map,Od=new Array,Rd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;wd.emit(e,t)},kd=e=>new Promise(((t,r)=>{e.fail&&e.fail.length>0?Ze(xe(wd,e.success).pipe(At(1)),Ge(...e.fail.map((e=>xe(wd,e).pipe(At(1),Pe((t=>Z({type:e,payload:t})))))))).subscribe((e=>t(e)),(e=>{"object"==typeof e.payload?r(ot({type:e.type},e.payload)):void 0===e.payload?r({type:e.type}):r(e)})):xe(wd,e.success).pipe(At(1)).subscribe((e=>t(e)))})),Dd=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4;return new Promise(((o,n)=>{let i=W;"string"==typeof e?i=xe(wd,e).pipe(At(1)):(i=xe(wd,e.event),e.operations&&(i=e.operations.reduce(((e,t)=>e.pipe(t)),i))),Ze(i,et(r).pipe(Vt(Z("timeout")))).subscribe((e=>{if(t){const r=t(e);"boolean"==typeof r?r?o(""):n({type:xc}):0===r.ret?o(r.body):n({type:xc,reason:r.body})}else o(e)}),(()=>{n({type:Fc})}))}))},Pd=(e,t)=>void 0!==t?xe(wd,e).pipe(At(t)):xe(wd,e),Md=()=>{Od.forEach((e=>{e.unsubscribe()})),Od.length=0,Td.clear()},{setAttendeesList:Nd,setAssistantList:Ld,setIsAdmitAllSilentUsers:Vd,resetParticipants:Ud,addFailoverAttendees:jd,removeFailoverAttendees:xd,setClearRaiseHand:Fd,setClearAttendeeFeedback:Bd,updateAttendeeDisplayName:Hd,removeXmppAttendeeUser:Wd,updateXmppAttendeeList:$d,setAttendeeExtraKey:Gd}=zr({SET_ATTENDEES_LIST:e=>e,SET_ASSISTANT_LIST:e=>e,UPDATE_XMPP_ATTENDEE_LIST:e=>e,RESET_PARTICIPANTS:()=>({}),SET_IS_ADMIT_ALL_SILENT_USERS:e=>e,REMOVE_FAILOVER_ATTENDEES:e=>e,ADD_FAILOVER_ATTENDEES:e=>e,SET_CLEAR_RAISE_HAND:()=>({}),SET_CLEAR_ATTENDEE_FEEDBACK:()=>({}),UPDATE_ATTENDEE_DISPLAY_NAME:e=>e,REMOVE_XMPP_ATTENDEE_USER:e=>e,SET_ATTENDEE_EXTRA_KEY:e=>e});var zd="NOT_FOUND",Kd=function(e,t){return e===t};function qd(e,t){var r,o,n="object"==typeof t?t:{equalityCheck:t},i=n.equalityCheck,s=void 0===i?Kd:i,a=n.maxSize,u=void 0===a?1:a,c=n.resultEqualityCheck,d=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var o=t.length,n=0;n-1){var n=r[o];return o>0&&(r.splice(o,1),r.unshift(n)),n.value}return zd}return{get:o,put:function(t,n){o(t)===zd&&(r.unshift({key:t,value:n}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(u,d);function p(){var t=l.get(arguments);if(t===zd){if(t=e.apply(null,arguments),c){var r=l.getEntries().find((function(e){return c(e.value,t)}));r&&(t=r.value)}l.put(arguments,t)}return t}return p.clearCache=function(){return l.clear()},p}function Jd(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o{let{participants:{attendeesList:t}}=e;return t},Yd=e=>{let{meeting:{userId:t}}=e;return t},Xd=e=>{let{participants:{xmppAttendeeList:t}}=e;return t};let el,tl,rl;!function(e){e[e.Attendee=0]="Attendee",e[e.Host=1]="Host",e[e.Owner=4]="Owner",e[e.ViewOnly=8]="ViewOnly",e[e.HostOwner=5]="HostOwner",e[e.ViewOnlyCanTalk=24]="ViewOnlyCanTalk"}(el||(el={})),function(e){e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee"}(tl||(tl={})),function(e){e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323",e[e.Assitant=51]="Assitant"}(rl||(rl={}));const ol=e=>(e&el.Host)===el.Host,nl=e=>(e&rl.Phone)===rl.Phone,il=e=>e===el.ViewOnlyCanTalk,sl=e=>(e&el.ViewOnly)===el.ViewOnly;let al,ul,cl,dl,ll,pl;!function(e){e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually"}(al||(al={})),function(e){e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(ul||(ul={})),function(e){e[e.NoToken=1]="NoToken",e[e.GotToken=2]="GotToken",e[e.Started=3]="Started",e[e.Closing=4]="Closing",e[e.Closed=5]="Closed"}(cl||(cl={})),function(e){e.Initial="initial",e.Invited="invited",e.Joining="joining",e.InRoom="in room",e.Leaving="leaving",e.TimeUp="time up",e.MainSession="main session"}(dl||(dl={})),function(e){e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO"}(ll||(ll={})),function(e){e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom"}(pl||(pl={}));const hl=Qd([Yd,Zd],((e,t)=>t.find((t=>t.userId===e)))),fl=Qd([hl],(e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost))),gl=Qd([hl],(e=>null==e?void 0:e.isHost)),ml=Qd([Xd],(e=>e.filter((e=>e.userRole===tl.Attendee)))),vl=Qd([Zd],(e=>e.filter((e=>e.bHold&&!e.bid)))),yl=Qd([Zd,e=>{let{breakoutRoom:t}=e;return t&&t.controlStatus},e=>{let{breakoutRoom:t}=e;return t&&t.currentRoom.status}],((e,t,r)=>t!==ul.InProgress&&t!==ul.Closing||r!==dl.InRoom?e.filter((e=>!e.bHold&&!e.bid)):e.filter((e=>!e.bHold)))),bl=Qd([e=>{let{participants:{assistantList:t}}=e;return t}],(e=>e)),Sl=Qd([yl],(e=>e.find((e=>e.isHost)))),_l=Qd([yl],(e=>e.filter((e=>e.bCoHost)))),El=Qd([hl,yl],((e,t)=>t.filter((t=>t.userId!==(null==e?void 0:e.userId)))));let Cl,Il;Qd([Xd],(e=>e.reduce(((e,t)=>{const{jid:r}=t;return Object.assign(e,{[r]:t}),e}),{}))),Qd([Xd,e=>{let{meeting:{jid:t}}=e;return t}],((e,t)=>{var r;return null===(r=e.find((e=>e.jid===t)))||void 0===r?void 0:r.userId})),function(e){e.Closed="closed",e.Connecting="connecting",e.Connected="connected"}(Cl||(Cl={})),function(e){e[e.SupportASL=1]="SupportASL",e[e.SidecarPhase2=2]="SidecarPhase2",e[e.SupportBroadcastVoice=8]="SupportBroadcastVoice",e[e.SendMeetingTokenSeparately=16]="SendMeetingTokenSeparately",e[e.SupportPreview=32]="SupportPreview",e[e.WebCameraIndication=64]="WebCameraIndication",e[e.SupportFarEndCameraControl=256]="SupportFarEndCameraControl",e[e.SupportVideoShare=512]="SupportVideoShare",e[e.UnifyErrorType=1024]="UnifyErrorType",e[e.WhiteBoard=2048]="WhiteBoard"}(Il||(Il={}));const{setAsnIds:Al,setIsCanUnmute:wl,setDialoutSequence:Tl,setDialoutResultCode:Ol,setIsAllowToTalk:Rl,setIsHostMuteAll:kl,setIsActiveOperation:Dl,setAudioSsrc:Pl,setIsMutedUponEntry:Ml,setIsUserGrantCaptureAudio:Nl,setIsMicrophoneForbidden:Ll,setWebrtcRestartCount:Vl,setMicrophoneList:Ul,setSpeakerList:jl,setActiveMicrophone:xl,setActiveSpeaker:Fl,setCanPlayAudio:Bl,resetAudio:Hl,setIsComputerAudioLoading:Wl,setIsSpeakerOnly:$l,setIsAllowToTalkAttendeeConnected:Gl,setIsMuteBeforeSharingAudio:zl,addLocalShareAudioUser:Kl,updateLocalShareAudioUser:ql,setIsJoinComputerAudioBeforeSharingAudio:Jl,setIsShareAudioEnabled:Ql,setIsShareAudioMuted:Zl,setIsSharingAudio:Yl,setAudioDataEncoding:Xl,setAudioDataDecoding:ep,addLocallyMutedAudio:tp,removeLocallyMutedAudio:rp,updateUserAudioVolumeLocally:op,removeLocalUserAudioVolume:np}=zr("SET_ASN_IDS","SET_IS_CAN_UNMUTE","SET_DIALOUT_SEQUENCE","SET_DIALOUT_RESULT_CODE","SET_IS_ALLOW_TO_TALK","SET_IS_HOST_MUTE_ALL","SET_IS_ACTIVE_OPERATION","SET_AUDIO_SSRC","SET_IS_MUTED_UPON_ENTRY","SET_IS_USER_GRANT_CAPTURE_AUDIO","SET_IS_MICROPHONE_FORBIDDEN","SET_WEBRTC_RESTART_COUNT","SET_MICROPHONE_LIST","SET_SPEAKER_LIST","SET_ACTIVE_MICROPHONE","SET_ACTIVE_SPEAKER","SET_CAN_PLAY_AUDIO","RESET_AUDIO","SET_IS_COMPUTER_AUDIO_LOADING","SET_IS_SPEAKER_ONLY","SET_IS_ALLOW_TO_TALK_ATTENDEE_CONNECTED","SET_IS_MUTE_BEFORE_SHARING_AUDIO","SET_IS_SHARING_AUDIO","ADD_LOCAL_SHARE_AUDIO_USER","UPDATE_LOCAL_SHARE_AUDIO_USER","SET_IS_JOIN_COMPUTER_AUDIO_BEFORE_SHARING_AUDIO","SET_IS_SHARE_AUDIO_ENABLED","SET_IS_SHARE_AUDIO_MUTED","SET_AUDIO_DATA_ENCODING","SET_AUDIO_DATA_DECODING","ADD_LOCALLY_MUTED_AUDIO","REMOVE_LOCALLY_MUTED_AUDIO","UPDATE_USER_AUDIO_VOLUME_LOCALLY","REMOVE_LOCAL_USER_AUDIO_VOLUME"),{setSharePrivilege:ip,setShareActiveNode:sp,setIsReceiveSharing:ap,setIsChromeExtensionInstalled:up,setIsScreenShareForbidden:cp,setShareDimension:dp,setShareStatus:lp,setShareSsrc:pp,setShareQuality:hp,setReceivedShareDimension:fp,setIsRemoteControlApproved:gp,setIsGrabRemoteControl:mp,setIsSdkGrabControl:vp,setIsReceiveSharingFromMainSession:yp,setIsSharingToBreakoutRoom:bp,setIsSharingWithSecondCamera:Sp,setShringSecondCameraId:_p,setIsRequireReadReceipt:Ep,setIsOptimizedForSharedVideo:Cp,setShareDataEncoding:Ip,setShareDataDecoding:Ap,addShareCapturedEnsuredCanvas:wp,addShareRenderedEnsuredCanvas:Tp,resetShare:Op}=zr("SET_SHARE_PRIVILEGE","SET_SHARE_ACTIVE_NODE","SET_IS_RECEIVE_SHARING","SET_IS_CHROME_EXTENSION_INSTALLED","SET_IS_SCREEN_SHARE_FORBIDDEN","SET_SHARE_DIMENSION","SET_SHARE_STATUS","SET_SHARE_SSRC","SET_SHARE_QUALITY","SET_RECEIVED_SHARE_DIMENSION","SET_IS_REMOTE_CONTROL_APPROVED","SET_IS_GRAB_REMOTE_CONTROL","SET_IS_SDK_GRAB_CONTROL","SET_IS_RECEIVE_SHARING_FROM_MAIN_SESSION","SET_IS_SHARING_TO_BREAKOUT_ROOM","SET_IS_SHARING_WITH_SECOND_CAMERA","SET_SHRING_SECOND_CAMERA_ID","SET_IS_REQUIRE_READ_RECEIPT","SET_IS_OPTIMIZED_FOR_SHARED_VIDEO","SET_SHARE_DATA_ENCODING","SET_SHARE_DATA_DECODING","ADD_SHARE_CAPTURED_ENSURED_CANVAS","ADD_SHARE_RENDERED_ENSURED_CANVAS","RESET_SHARE"),{setVideoSsrc:Rp,setActiveVideoId:kp,setCameraList:Dp,setActiveCamera:Pp,setIsCurrentUserStartedVideo:Mp,setSpotlightVideo:Np,setIsCaptureForbidden:Lp,setVideoMaxQuality:Vp,setIsVideoMuted:Up,setIsCaptureCameraLoading:jp,setIsCameraTaken:xp,resetVideo:Fp,setReceivedVideoDimension:Bp,addSubscribedVideoId:Hp,removeSubscribedVideoId:Wp,setIsFollowHostVideoLayout:$p,setHostDragLayout:Gp,addRenderedVideoId:zp,removeRenderedVideoId:Kp,setIsSupportHdVideo:qp,setMaximumNumbeOfHdSubscriptions:Jp,setIsCanUnmuteVideo:Qp,setIsVbPreloadReady:Zp,setIsVbConfiged:Yp,setVbImageSrc:Xp,setVideoDataEncoding:eh,setVideoDataDecoding:th,setHardwareAccelerationState:rh,setVideoCaptureCustomizedOption:oh,setNetworkQuality:nh,setVideoCameraPtzCapabilities:ih,setIsCurrentUserRequestCameraControlled:sh,setIsCurrentUserCameraInControl:ah,addVideoFarEndCameraControlUser:uh,removeVideoFarEndCameraControlUser:ch,setVideoPtzCameraMoving:dh,setVideoPtzCameraValue:lh,setIsControllingFarEndCamera:ph,setNetworkQualityBroadcastTime:hh,setIsMaskConfiged:fh,setVideoBackgroundMode:gh,setVideoMask:mh,setVideoCapturedDimension:vh,addVideoRenderedEnsuredCanvas:yh}=zr("SET_VIDEO_SSRC","SET_ACTIVE_VIDEO_ID","SET_CAMERA_LIST","SET_ACTIVE_CAMERA","SET_IS_CURRENT_USER_STARTED_VIDEO","SET_SPOTLIGHT_VIDEO","SET_IS_CAPTURE_FORBIDDEN","SET_VIDEO_MAX_QUALITY","SET_IS_VIDEO_MUTED","SET_IS_CAPTURE_CAMERA_LOADING","SET_IS_CAMERA_TAKEN","RESET_VIDEO","SET_RECEIVED_VIDEO_DIMENSION","ADD_SUBSCRIBED_VIDEO_ID","REMOVE_SUBSCRIBED_VIDEO_ID","SET_IS_FOLLOW_HOST_VIDEO_LAYOUT","SET_HOST_DRAG_LAYOUT","ADD_RENDERED_VIDEO_ID","REMOVE_RENDERED_VIDEO_ID","SET_IS_SUPPORT_HD_VIDEO","SET_MAXIMUM_NUMBE_OF_HD_SUBSCRIPTIONS","SET_IS_CAN_UNMUTE_VIDEO","SET_IS_VB_PRELOAD_READY","SET_IS_VB_CONFIGED","SET_VB_IMAGE_SRC","SET_VIDEO_DATA_ENCODING","SET_VIDEO_DATA_DECODING","SET_HARDWARE_ACCELERATION_STATE","SET_VIDEO_CAPTURE_CUSTOMIZED_OPTION","SET_NETWORK_QUALITY","SET_VIDEO_CAMERA_PTZ_CAPABILITIES","SET_IS_CURRENT_USER_REQUEST_CAMERA_CONTROLLED","SET_IS_CURRENT_USER_CAMERA_IN_CONTROL","ADD_VIDEO_FAR_END_CAMERA_CONTROL_USER","REMOVE_VIDEO_FAR_END_CAMERA_CONTROL_USER","SET_VIDEO_PTZ_CAMERA_MOVING","SET_VIDEO_PTZ_CAMERA_VALUE","SET_IS_CONTROLLING_FAR_END_CAMERA","SET_NETWORK_QUALITY_BROADCAST_TIME","SET_IS_MASK_CONFIGED","SET_VIDEO_BACKGROUND_MODE","SET_VIDEO_MASK","SET_VIDEO_CAPTURED_DIMENSION","ADD_VIDEO_RENDERED_ENSURED_CANVAS"),{setQaSetting:bh,addQaQuestion:Sh,addQaAnswer:_h,removeQaComment:Eh,removeQaQuestion:Ch,dismissQaQuestion:Ih,reopenQaQuestion:Ah,voteQaQuestion:wh,answerQaQuestionLive:Th,updateAttendeeAnonymousQuestion:Oh,setQaEnabled:Rh,resetQa:kh}=zr("SET_QA_SETTING","ADD_QA_QUESTION","ADD_QA_ANSWER","REMOVE_QA_COMMENT","REMOVE_QA_QUESTION","DISMISS_QA_QUESTION","REOPEN_QA_QUESTION","VOTE_QA_QUESTION","ANSWER_QA_QUESTION_LIVE","UPDATE_ATTENDEE_ANONYMOUS_QUESTION","SET_QA_ENABLED","RESET_QA"),{setChatPrivilege:Dh,setPanelistChatPrivilege:Ph,addChatMessageHistory:Mh,resetChat:Nh,setIsAllowAttendeeChat:Lh,setLatestChatMessageId:Vh,removeChatMessage:Uh}=zr("SET_CHAT_PRIVILEGE","SET_PANELIST_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT","SET_LATEST_CHAT_MESSAGE_ID","REMOVE_CHAT_MESSAGE"),{setCcEditorInfo:jh,setTempSendCcText:xh,setCcLtMessage:Fh,setTempReceiveLtText:Bh,setTempReceiveCcText:Hh,setGatewayInfoList:Wh,setLtEnable:$h,setIsListenClosedCaption:Gh,setCcEnable:zh,allowParticipantAskLt:Kh,receiveAskStartLt:qh,setMeetingEnabledLtFeature:Jh,updateLtStatus:Qh,deleteMessage:Zh,updateMessage:Yh,resetClosedCaption:Xh}=zr("SET_CC_EDITOR_INFO","SET_CC_LT_MESSAGE","SET_TEMP_SEND_CC_TEXT","SET_TEMP_RECEIVE_LT_TEXT","SET_TEMP_RECEIVE_CC_TEXT","SET_GATEWAY_INFO_LIST","SET_LT_ENABLE","SET_IS_LISTEN_CLOSED_CAPTION","SET_CC_ENABLE","ALLOW_PARTICIPANT_ASK_LT","RECEIVE_ASK_START_LT","SET_MEETING_ENABLED_LT_FEATURE","UPDATE_LT_STATUS","DELETE_MESSAGE","UPDATE_MESSAGE","RESET_CLOSED_CAPTION"),{addBreakoutRooms:ef,setBreakoutRoomAllocationPattern:tf,setBreakoutRoomSequenceId:rf,setMeetingElapsedTime:of,setStartRoomElapsedTime:nf,setBreakoutRoomOptions:sf,setBreakoutRoomControlStatus:af,setBreakoutRooms:uf,setCurrentBreakoutRoom:cf,setBreakoutRoomAttendeeStatus:df,setBreakoutRoomConfId:lf,setBreakoutRoomToken:pf,resetBreakoutRoom:hf,setBreakoutRoomClosingRoomTime:ff,setBreakoutRoomBroadcastMessage:gf,setBreakoutRoomHostReplyType:mf,setBreakoutRoomHostReplyRequestId:vf,setMainSessionAttendeeList:yf,setIsHugeBreakoutRoom:bf,setBreakoutRoomPreAssignedRoomList:Sf,setBreakoutRoomUserRoleUpdated:_f,setBreakoutRoomMeetingOptions:Ef}=zr("ADD_BREAKOUT_ROOMS","SET_BREAKOUT_ROOM_ALLOCATION_PATTERN","SET_BREAKOUT_ROOM_SEQUENCE_ID","SET_MEETING_ELAPSED_TIME","SET_START_ROOM_ELAPSED_TIME","SET_BREAKOUT_ROOM_OPTIONS","SET_BREAKOUT_ROOM_CONTROL_STATUS","SET_BREAKOUT_ROOMS","SET_CURRENT_BREAKOUT_ROOM","SET_BREAKOUT_ROOM_ATTENDEE_STATUS","SET_BREAKOUT_ROOM_CONF_ID","SET_BREAKOUT_ROOM_TOKEN","RESET_BREAKOUT_ROOM","SET_BREAKOUT_ROOM_CLOSING_ROOM_TIME","SET_BREAKOUT_ROOM_BROADCAST_MESSAGE","SET_BREAKOUT_ROOM_HOST_REPLY_TYPE","SET_BREAKOUT_ROOM_HOST_REPLY_REQUEST_ID","SET_MAIN_SESSION_ATTENDEE_LIST","SET_IS_HUGE_BREAKOUT_ROOM","SET_BREAKOUT_ROOM_PRE_ASSIGNED_ROOM_LIST","SET_BREAKOUT_ROOM_USER_ROLE_UPDATED","SET_BREAKOUT_ROOM_MEETING_OPTIONS"),{setCloudRecordingStatus:Cf,setCloudRecordingEnable:If,setCloudIsoRecordingEnable:Af,setAllowStopAutoRecording:wf,setAutomaticCloudRecordingEnable:Tf,setIsZoomIQ:Of,setZoomIQChanging:Rf,resetRecording:kf}=zr("SET_CLOUD_RECORDING_STATUS","SET_CLOUD_RECORDING_ENABLE","SET_CLOUD_ISO_RECORDING_ENABLE","SET_ALLOW_STOP_AUTO_RECORDING","SET_AUTOMATIC_CLOUD_RECORDING_ENABLE","SET_IS_ZOOM_I_Q","SET_ZOOM_I_Q_CHANGING","RESET_RECORDING"),{updateCmdJid:Df,removeCmdJid:Pf,setCmdChannelConnectionStatus:Mf,resetCmdChannel:Nf}=zr("UPDATE_CMD_JID","REMOVE_CMD_JID","SET_CMD_CHANNEL_CONNECTION_STATUS","RESET_CMD_CHANNEL"),{setArchivingStatus:Lf,setArchivingSessionReady:Vf,setArchivingOptions:Uf,resetArchiving:jf}=zr({SET_ARCHIVING_STATUS:e=>e,SET_ARCHIVING_SESSION_READY:e=>e,SET_ARCHIVING_OPTIONS:e=>e,RESET_ARCHIVING:()=>{}}),{setIsLiveTranscriptionEnabled:xf,setLiveTranscriptionMeetingOptions:Ff,setIsLiveTranscriptionManualCaptionerEnabled:Bf,setLiveTranscriptionGatewayId:Hf,setLiveTranscriptionSupportedLanguage:Wf,setIsLiveTranscriptionSubscribed:$f,setCurrentTranscriptionLang:Gf,setCurrentTranslationLang:zf,addLiveTranscriptionMessage:Kf,updateLiveTranscriptionMessage:qf,reduceLiveTranscriptionMessages:Jf,setLiveTranscriptionEngineType:Qf,removeLiveTranscriptionFailoverState:Zf,setLiveTranscriptionLastCaptionMessage:Yf,resetLiveTranscription:Xf}=zr("SET_IS_LIVE_TRANSCRIPTION_ENABLED","SET_LIVE_TRANSCRIPTION_MEETING_OPTIONS","SET_IS_LIVE_TRANSCRIPTION_MANUAL_CAPTIONER_ENABLED","SET_LIVE_TRANSCRIPTION_GATEWAY_ID","SET_LIVE_TRANSCRIPTION_SUPPORTED_LANGUAGE","SET_IS_LIVE_TRANSCRIPTION_SUBSCRIBED","SET_CURRENT_TRANSCRIPTION_LANG","SET_CURRENT_TRANSLATION_LANG","ADD_LIVE_TRANSCRIPTION_MESSAGE","UPDATE_LIVE_TRANSCRIPTION_MESSAGE","REDUCE_LIVE_TRANSCRIPTION_MESSAGES","SET_LIVE_TRANSCRIPTION_ENGINE_TYPE","REMOVE_LIVE_TRANSCRIPTION_FAILOVER_STATE","SET_LIVE_TRANSCRIPTION_LAST_CAPTION_MESSAGE","RESET_LIVE_TRANSCRIPTION"),{setPollData:eg,setPollingId:tg,setPollingWebLinks:rg,setPollingDocMaxSize:og,setPollingDocSize:ng,setPollingDocLibraryMaxSize:ig,setPollingDocLibrarySize:sg,resetPoll:ag}=zr("SET_POLL_DATA","SET_POLLING_ID","SET_POLLING_WEB_LINKS","SET_POLLING_DOC_MAX_SIZE","SET_POLLING_DOC_SIZE","SET_POLLING_DOC_LIBRARY_MAX_SIZE","SET_POLLING_DOC_LIBRARY_SIZE","RESET_POLL"),{setLoggerInitOptions:ug,setIsLaplaceInitialized:cg,resetLogger:dg}=zr("SET_LOGGER_INIT_OPTIONS","SET_IS_LAPLACE_INITIALIZED","RESET_LOGGER"),lg=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{socket:{zoomSocketStatus:r,xmppSocketStatus:o,mainSessionSocketStatus:n},meeting:{meetingStatus:i}}=e,s=[];if(i===Di.Joined){const t=Ws.getInstance(),r=Ls.createAgent();if(t.disconnect(),t.destroy(),e.video&&(e.video.subscribedVideoList.length>0&&e.video.subscribedVideoList.forEach((e=>{r.unsubscribeVideo(e)})),e.video.isCurrentUserStartedVideo&&Rd(Iu)),e.share&&e.share.isReceiveSharing){const t=e.share.activeNodeId;e.share.isRemoteControlApproved&&r.sharingRequestRemoteControl(t,!1),r.unsubscribeSharing(t)}}if(t||(Vi.clearSession(),[us.WebclientTk,us.WebclientZsk,us.WebclientZtk].forEach((e=>{sessionStorage.removeItem(e)})),hs.destroy()),r!==Cl.Closed&&s.push(eo()),o!==Cl.Closed&&s.push(to()),n!==Cl.Closed&&s.push(so()),t){const r=hl(e);s.push(ei({audio:null==r?void 0:r.audio,muted:null==r?void 0:r.muted,video:null==r?void 0:r.bVideoOn,isFailover:t}))}else s.push(ei({audio:!1,muted:void 0,video:!1,isFailover:t}));return s.push(fo(),wo(),Ud(),Hl(t),Op(),Fp(t),kh(),Nh(),kf(),Xh(),hf(),Nf(),jf(),Xf(t),ag(),dg(t),ui(Di.Closed)),s},pg=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;ot.find((t=>t.userId===e)))),Ke((e=>!!e)),At(1)]},...r)},hg={[`${Pi.AudioBridgeEnable}`]:{mask:240,action:mi},[`${Pi.AudioDecodeInWorklet}`]:{mask:15,action:Ao}};function fg(e){return T(ye(((t,r)=>e(t,r))),Ke((e=>null!=e)))}function gg(e){return T(Pe(((t,r)=>e(t,r)||W)))}function mg(e){return T(Wt(((t,r)=>e(t,r)||W)))}function vg(e){return T(Pe(((t,r)=>e(t,r))),Pe((e=>Array.isArray(e)?Oe(e):Q(e))))}const yg=(e,t)=>{const r=performance.now();let o=0,n=!1;return setTimeout((function i(){o+=t,e();const s=performance.now()-r-o,a=setTimeout(i,Math.max(t-s,0));n&&clearTimeout(a)}),t),()=>{n=!0}},bg={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},Sg={[`${ms}`]:()=>({payloads:{add:[],update:[],remove:[]},onThrottle(e){e.add&&this.payloads.add.push(...e.add),e.update&&this.payloads.update.push(...e.update),e.remove&&this.payloads.remove.push(...e.remove)}})};function _g(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bg;return t=>new R((r=>{const o=new Map;let n=0,i=null;const{period:s,rules:a}=e;let u=null;i||(i=yg((()=>{n=0}),s));const c=Object.keys(Sg),d=t.subscribe({next(e){if(e&&e.evt&&null!==i){n+=1;const{evt:t,body:i}=e,s=String(t);if(c.indexOf(s)>=0)if(u){const e=o.get(s);if(e)e.onThrottle(i);else{const e=Sg[s]();e.onThrottle(i),o.set(s,e)}}else{let t=0;if(a.forEach((e=>{n>e.peak&&(t=e.throttle)})),t>0){const e=Sg[s]();e.onThrottle(i),o.set(s,e),u=setTimeout((()=>{o.forEach(((e,t)=>{const o={evt:Number(t),body:e.payloads};r.next(o)})),o.clear(),u=null}),t)}else r.next(e)}else r.next(e)}else r.next(e)},error(e){r.error(e)},complete(){r.complete()}});return()=>{d.unsubscribe(),i&&(i(),i=null),n=0}}))}Qd([yl,e=>{let{share:{isReceiveSharing:t}}=e;return t},e=>{let{share:{activeNodeId:t}}=e;return t}],(function(){let e=arguments.length>2?arguments[2]:void 0;if(arguments.length>1?arguments[1]:void 0){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find((t=>t.userId===e&&!0===t.sharerOn))}return null}));const Eg=Qd([yl],(e=>e.filter((e=>e.sharerOn)))),Cg=Qd([Eg],(e=>e.some((e=>!!e.bVideoShare))));class Ig{constructor(e){this._cancelError=new Error("request for lock canceled"),this._locked=void 0,this._queue=[],this._waiters=[],this._currentReleaser=void 0,e&&(this._cancelError=e),this._locked=!1}acquire(){const e=this.isLocked(),t=new Promise(((e,t)=>{this._queue.push({resolve:e,reject:t})}));return e||this._dispatch(),t}async runExclusive(e){const t=await this.acquire();try{return await e()}finally{t()}}async waitForUnlock(){return this.isLocked()?new Promise((e=>this._waiters.push({resolve:e}))):Promise.resolve()}isLocked(){return this._locked}release(){if(this._currentReleaser){const e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach((e=>e.reject(this._cancelError))),this._queue=[]}_dispatch(){const e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._locked=!1,this._resolveWaiters(),this._dispatch())},this._locked=!0,e.resolve(this._currentReleaser)}_resolveWaiters(){this._waiters.forEach((e=>e.resolve())),this._waiters=[]}}function Ag(e){if(e){var t;const r=document.getElementById(e);null==r||null===(t=r.parentNode)||void 0===t||t.removeChild(r)}}let wg="zoom.us";const Tg="2.11.0",Og=`https://dmogdx0jrul3u.cloudfront.net/${Tg}/lib/av`,Rg=`https://source.zoom.us/${Tg}/lib/av`,kg=`https://jssdk.zoomus.cn/${Tg}/lib/av`;const Dg=(e,t,r)=>Ue(...[t,r].map(((t,r)=>{if("initial"!==t)return Oe(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return Ze(Pd(`${e.toUpperCase()}_${t}_SUCCESS`,1).pipe(kt(!0)),Pd(`${e.toUpperCase()}_${t}_FAIL`,1).pipe(kt(!1)))}}))),Pg=e=>{const t=hl(e.value);return t?Q(t):Pd($s,1).pipe(ee(le),or(e),ye((e=>{let[,t]=e;return hl(t)})))},Mg=()=>Oe(navigator.mediaDevices.enumerateDevices()).pipe(ye((e=>{const t=[],r=[],o=[];return e.forEach((e=>{const{kind:n,deviceId:i,label:s}=e;switch(n){case"audioinput":"communications"===i||/ZoomAudioDevice/i.test(s)||/Zoom-\S*/.test(s)||/CubebAggregateDevice\S*/.test(s)||t.push({deviceId:i,label:s});break;case"audiooutput":"communications"===i||/ZoomAudioDevice/i.test(s)||r.push({deviceId:i,label:s});break;case"videoinput":o.push({deviceId:i,label:s})}})),{microphones:t,speakers:r,cameras:o}})));function Ng(e){if(e){let r=e;try{const t=e.width;e.width=t}catch(o){var t;r=e.cloneNode(!0),null===(t=e.parentNode)||void 0===t||t.replaceChild(r,e)}return r}return e}function Lg(){try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(Ua)}catch(e){return!1}}function Vg(){var e;return null===(e=WebAssembly)||void 0===e?void 0:e.validate(ja)}function Ug(){return $i()||Ki()}const jg=(()=>{const e=new Ig;return{withAudioAction:t=>function(){for(var r=arguments.length,o=new Array(r),n=0;n{let i=!1;const s=setTimeout((()=>{i=!0,n(new Error("Operation Timeout!"))}),3e4);try{const n=await e.acquire();i?n():(clearTimeout(s),r(t(...o)))}catch(e){i||(clearTimeout(s),n(e))}}))},processAudioAction:t=>e.acquire().then((()=>t())),completeAudioAction:()=>{e.release()},cancelAllAudioAction:()=>{e.cancel()}}})();function xg(e){const t=["joinComputerAudio","joinSharingAudio","leaveComputerAudio","leaveSharingAudio"];return new Proxy(e,{get:(e,r)=>"string"==typeof r&&t.includes(r)?function(){return jg.withAudioAction(e[r].bind(e))(...arguments)}:Reflect.get(e,r)})}function Fg(e){var t,r;const o=Wi()&&Number(null===(t=Ui())||void 0===t||null===(r=t.match(/\d+$/))||void 0===r?void 0:r[0])>=91,n=navigator.hardwareConcurrency>2,i=e?Qi():es();return!Ki()&&ts()&&i&&o&&n}const Bg=(e,t)=>{const r=document.createElement("link");return r.rel="preload",r.href=e,r.as=t,r.crossOrigin="anonymous",r},Hg=(e,t,r)=>{const o=[],n=[],i=Array.isArray(e)?e:[e];return Us.filter((e=>i.includes(e.category)&&e.tag===t)).forEach((e=>{"worker"===e.type?o.push(`${r}${e.name}`):"wasm"===e.type&&n.push(`${r}${e.name}`)})),{workers:o,wasms:n}};function Wg(e,t,r,o){let{share:{activeNodeId:n,shareQuality:i}}=t;const{share:{isReceiveSharingFromMainSession:s}}=t;r&&(n=r),void 0!==o&&(i=o);const a=Cg(t);e.subscribeSharing(n,i,s,a)}const $g=Ls.createAgent();var Gg=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>ko(e,vs).pipe(Ke((e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.lockShare)})),or(t),Zt((e=>{let[t,r]=e;const{share:{sharePrivilege:o}}=r,{payload:{body:{lockShare:n}}}=t;o!==n&&Rd(Tc,n)})),ye((e=>{let[t]=e;return ip(t.payload.body.lockShare)}))),shareSSrcEpic:e=>ko(e,20227).pipe(ye((e=>pp(e.payload.body.ssrc)))),shareStatusChangeEpic:(e,t)=>ko(e,fs).pipe(or(t),Ke((e=>{let[t,r]=e;const{payload:{body:o}}=t,{share:{isReceiveSharingFromMainSession:n}}=r;return!n||n&&o.fromMainSession})),ye((e=>{let[t,r]=e;const{share:{isReceiveSharing:o,activeNodeId:n,isReceiveSharingFromMainSession:i},breakoutRoom:s}=r,{payload:{body:a}}=t;if(o&&1===a.bStatus){let e=!1;(null==s?void 0:s.currentRoom.status)===dl.InRoom&&s.mainSessionAttendeeList.length>0&&(e=s.mainSessionAttendeeList.findIndex((e=>e.userId===n))>-1),$g.unsubscribeSharing(n,e),Wg($g,r,a.activeNodeID),Ws.getInstance().switchSharingSource(a.ssrc,i),Rd(wc,{userId:a.activeNodeID})}else if(1===a.bStatus){const e={activeUserId:a.activeNodeID,isActive:!0};i&&Object.assign(e,{isFromMainSession:!0}),Rd(fc,e)}else if(o){const e={activeUserId:a.activeNodeID,isActive:!1};i&&Object.assign(e,{isFromMainSession:!0}),Rd(fc,e)}return sp(a)}))),handleChromeExtensionEpic:e=>No(e,ka.CheckChromeSharingExtensionResponse).pipe(ye((e=>(Rd(gc,e.payload.data),up(e.payload.data))))),handleSDKShareSuccessEpic:(e,t)=>No(e,[ka.SharingDesktopStreamHaveAudio,ka.SharingDesktopStreamHaveNoAudio]).pipe(or(t),ye((e=>{let[t,r]=e;const{meeting:{userId:o},share:{isSharingToBreakoutRoom:n,isOptimizedForSharedVideo:i}}=r,{payload:{type:s}}=t,a=s===ka.SharingDesktopStreamHaveAudio;return $g.startSharing(o,{bShareToBO:n,bShareAudio:a,bShareVideo:!!i}),cp(!1)}))),handleSDKShareErrorEpic:e=>No(e,[ka.DesktopSharingError,ka.DesktopSharingChromeExtensionUninstalled,ka.DesktopSharingPermissionDenied,ka.DesktopSharingSystemError]).pipe(Pe((e=>{const t=[];let r="";return[ka.DesktopSharingPermissionDenied,ka.DesktopSharingSystemError].includes(e.payload.type)&&(t.push(cp(!0)),e.payload.type===ka.DesktopSharingSystemError?/mac/i.test(navigator.platform)&&(r="To use screen share on Chrome, please allow screen recording access in system setting."):r="To use screen share, please allow the permission request."),Rd(mc,{reason:r}),Oe(t)}))),handleSDKShareDimensionChangeEpic:e=>No(e,ka.CurrentDesktopSharingWidthHeight).pipe(Ke((e=>!!e.payload.data)),ye((e=>{Rd(vc,e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return Ws.getInstance().ajustmentSharingCanvas(t,r),dp(e.payload.data)}))),handleSDKReceivedShareSizeChangeEpic:(e,t)=>No(e,ka.SharingDecodeMaxSize).pipe(Ke((e=>!!e.payload.data)),or(t),fg((e=>{let[t,r]=e;const{share:{shareQuality:o,activeNodeId:n}}=r,{payload:{data:{fps:i}}}=t,s=Number(i);if(o!==s)return Wg($g,r,n,s),hp(s)}))),handleRWGShareOriginalDimensionEpic:e=>ko(e,20226).pipe(Zt((e=>{var t,r;if(Rd(yc,null===(t=e.payload)||void 0===t?void 0:t.body),null!==(r=e.payload)&&void 0!==r&&r.body){const{payload:{body:{width:t,height:r}}}=e;Ws.getInstance().ajustmentReceivedSharingCanvas(t,r)}})),ye((e=>fp(e.payload.body)))),handleSDKShareOriginalDimensionEpic:e=>No(e,ka.SharingPara).pipe(Zt((e=>{var t,r;if(Rd(yc,null===(t=e.payload.data)||void 0===t?void 0:t.body),null!==(r=e.payload.data)&&void 0!==r&&r.body){const{payload:{data:{body:{width:t,height:r}}}}=e;Ws.getInstance().ajustmentReceivedSharingCanvas(t,r)}})),ye((e=>{var t;return fp(null===(t=e.payload.data)||void 0===t?void 0:t.body)}))),handleSDKStopShareEpic:(e,t)=>No(e,ka.UserStopDesktopSharing).pipe(or(t),ye((e=>{let[,t]=e;const{meeting:{userId:r},share:{status:o}}=t;return o!==Fa.End&&($g.stopSharing(r),Rd(bc)),lp(Fa.End)}))),handleRWGCurrentUserShareChangeEpic:(e,t)=>ko(e,ms).pipe(or(t),Ke((e=>{let[t,r]=e;const{meeting:{userId:o}}=r,n=t.payload.body.update;return n&&n.length>0&&n.findIndex((e=>e.id===o&&void 0!==e.bShareOn))>-1})),Pe((e=>{let[t,r]=e;const{meeting:{userId:o},share:{status:n,isReceiveSharing:i,activeNodeId:s}}=r,{payload:{body:{update:a}}}=t,u=a.find((e=>e.id===o&&!1===e.bShareOn)),c=a.find((e=>e.id===o&&!0===e.bShareOn)),d=[],l=Ws.getInstance();return u&&n!==Fa.End&&($g.stopSharing(o),l.stopDesktopSharing(),d.push(lp(Fa.End)),Rd(Sc)),c&&n===Fa.End&&(i&&(l.stopRenderSharing(),$g.unsubscribeSharing(s),d.push(ap(!1))),d.push(lp(Fa.Sharing))),Oe(d)}))),handleMultipleShareChangeEpic:(e,t)=>ko(e,ms).pipe(or(t),Ke((e=>{let[t,r]=e;const{meeting:{userId:o}}=r,n=t.payload.body.update;return n&&n.length>0&&n.findIndex((e=>e.id!==o&&void 0!==e.bShareOn))>-1})),Pe((r=>{let[o,n]=r;const{payload:{body:{update:i}}}=o,{share:{activeNodeId:s,isReceiveSharing:a}}=n,u=Eg(n),c=i.filter((e=>!0===e.bShareOn&&!1===e.bSharePause)),d=i.filter((e=>!0===e.bShareOn&&!0===e.bSharePause)),l=i.filter((e=>!1===e.bShareOn));return c.length>0&&c.forEach((e=>{-1===u.findIndex((t=>t.userId===e.id))?Rd(Ec,e):Rd(Ac,e)})),d.length>0&&d.forEach((e=>{Rd(Ic,e)})),l.length>0&&(l.forEach((e=>{Rd(Cc,e)})),a&&l.some((e=>e.id===s)))?Ze(ko(e,fs).pipe(At(1),Vt(W)),et(50).pipe(Vt(Z("timeout")))).pipe(vt((()=>{const{share:{activeNodeId:e,isReceiveSharingFromMainSession:r},audio:o}=t.value,n=u.filter((t=>t.userId!==e));if(n.length>0){const i=n[0],{userId:s}=i;$g.unsubscribeSharing(e,r),Wg($g,t.value,s);const a=Ws.getInstance();return a.switchSharingSource(s,r),null==o||o.localShareAudioUserMutedList.forEach((e=>{a.setSharingAudioVolume(s,e.userId!==s||e.muted,e.isFromMainSession)})),Rd(wc,{userId:s}),Q(sp({activeNodeID:s,bStatus:1,ssrc:s}))}return W}))):W}))),handleSharingEncryptIndication:(e,t)=>ko(e,gs).pipe(or(t),Wt((e=>{let[r,o]=e;const{payload:{body:{encryptKey:n,additionalType:i}}}=r,{media:{sharingDecodeStatus:s,sharingEncodeStatus:a},meeting:{confId:u,userId:c,zoomId:d,meetingId:l,meetingNumber:p,isWebinar:h}}=o;return Pg(t).pipe(Wt((e=>{let r=a;return h&&e&&sl(e.userRole)&&(r="failed"),Dg("sharing",r,s).pipe(Zt((e=>{let[r,o]=e;const s=Ws.getInstance(),a={userId:c,sn:ln(d),confId:u,encryptKey:ln(n),encryptType:i,meetingId:l,meetingNumber:p};if(r&&(null==s||s.updateMediaParams({iVType:is.SHARING_ENCODE,isFromMainSession:!1,updateParams:a})),o){s.updateMediaParams({iVType:is.SHARING_DECODE,isFromMainSession:!1,updateParams:a});const{participants:{attendeesList:e}}=t.value;if(e.length>0){const t=e.map((e=>({userid:e.userId,sn:e.zoomID&&ln(e.zoomID)})));s.updateUserMediaSN({added:t,isFromMainSession:!1,iVType:is.SHARING_DECODE})}}})),Vt(W))})))}))),handleSharingReceivingChannelReadyEpic:(e,t)=>Mo(e,20235).pipe(or(t),Zt((e=>{let[t,r]=e;const{media:{sharingDecodeStatus:o}}=r,{type:n,payload:{body:i}}=t,s=n===`${ao}`;Dg("sharing","success",o).subscribe((e=>{let[,t]=e;t&&Ws.getInstance().addReceivedSharingChannelType(ot({isFromMainSession:s},i))}))})),Vt(W)),handleSharingReceivingChannelCloseEpic:(e,t)=>Mo(e,20236).pipe(or(t),Zt((e=>{let[t,r]=e;const{media:{sharingDecodeStatus:o}}=r,{type:n,payload:{body:{ssrc:i}}}=t,s=n===`${ao}`;Dg("sharing","success",o).subscribe((e=>{let[,t]=e;t&&Ws.getInstance().removeReceivedSharingChannelType({isFromMainSession:s,ssrc:i})}))})),Vt(W)),handleReceiveSharingConfirmEpic:e=>No(e,ka.SharingFirstDecodeFrameReceivedSsrc).pipe(Ke((e=>!!e.payload.data)),Zt((e=>{const{payload:{data:{ssrc:t}}}=e;$g.sendReceivingSharingReady(t)})),Vt(W)),handleReceiveSharingFeedbackEpic:(e,t)=>ko(e,20233).pipe(Ke((()=>!!t.value.share.isRequireReadReceipt)),Zt((e=>{const{payload:{body:{bReceiveOk:t}}}=e;t&&Rd(Oc)})),Vt(W)),handleVideoShareChangedAsPrivilegeChangedEpic:(e,t)=>ko(e,vs).pipe(Ke((e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.lockShare)})),Pe((e=>{const{payload:{body:{lockShare:r}}}=e,{share:{isOptimizedForSharedVideo:o,isSharingToBreakoutRoom:n},audio:{isSharingAudio:i},meeting:{userId:s}}=t.value,a=[];return r===xa.MultipleShare&&o&&($g.startSharing(s,{bShareAudio:i,bShareToBO:n,bShareVideo:!1}),Ws.getInstance().switchSharingMode(du.Normal),a.push(Cp(!1))),Oe(a)}))),handleShareQosDataEpic:(e,t)=>No(e,ka.ShareQosData).pipe(or(t),ye((e=>{var t;let[r,o]=e;const{meeting:{isWebinar:n},media:{sharingEncodeStatus:i,sharingDecodeStatus:s},share:{status:a,isReceiveSharing:u},participants:{xmppAttendeeList:c}}=o;let d=El(o).length>0;n&&(d=d||Boolean(c.length));const l=a!==Fa.End&&"success"===i&&d,p=u&&"success"===s;return null!==(t=r.payload.data)&&void 0!==t&&t.encoding?l?(Rd(Rc,r.payload),Ip(r.payload)):Ip(nu):p?(Rd(Rc,r.payload),Ap(r.payload)):Ap(nu)})))});function zg(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o3?t.i-4:t.i:Array.isArray(e)?1:Xg(e)?2:em(e)?3:0}function Zg(e,t){return 2===Qg(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Yg(e,t,r){var o=Qg(e);2===o?e.set(t,r):3===o?(e.delete(t),e.add(r)):e[t]=r}function Xg(e){return wm&&e instanceof Map}function em(e){return Tm&&e instanceof Set}function tm(e){return e.o||e.t}function rm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Nm(e);delete t[Dm];for(var r=Mm(t),o=0;o1&&(e.set=e.add=e.clear=e.delete=nm),Object.freeze(e),t&&Jg(e,(function(e,t){return om(t,!0)}),!0)),e}function nm(){zg(2)}function im(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function sm(e){var t=Lm[e];return t||zg(18,e),t}function am(){return Im}function um(e,t){t&&(sm("Patches"),e.u=[],e.s=[],e.v=t)}function cm(e){dm(e),e.p.forEach(pm),e.p=null}function dm(e){e===Im&&(Im=e.l)}function lm(e){return Im={p:[],l:Im,h:e,m:!0,_:0}}function pm(e){var t=e[Dm];0===t.i||1===t.i?t.j():t.O=!0}function hm(e,t){t._=t.p.length;var r=t.p[0],o=void 0!==e&&e!==r;return t.h.g||sm("ES5").S(t,e,o),o?(r[Dm].P&&(cm(t),zg(4)),qg(e)&&(e=fm(t,e),t.l||mm(t,e)),t.u&&sm("Patches").M(r[Dm].t,e,t.u,t.s)):e=fm(t,r,[]),cm(t),t.u&&t.v(t.u,t.s),e!==Rm?e:void 0}function fm(e,t,r){if(im(t))return t;var o=t[Dm];if(!o)return Jg(t,(function(n,i){return gm(e,o,t,n,i,r)}),!0),t;if(o.A!==e)return t;if(!o.P)return mm(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var n=4===o.i||5===o.i?o.o=rm(o.k):o.o;Jg(3===o.i?new Set(n):n,(function(t,i){return gm(e,o,n,t,i,r)})),mm(e,n,!1),r&&e.u&&sm("Patches").R(o,r,e.u,e.s)}return o.o}function gm(e,t,r,o,n,i){if(Kg(n)){var s=fm(e,n,i&&t&&3!==t.i&&!Zg(t.D,o)?i.concat(o):void 0);if(Yg(r,o,s),!Kg(s))return;e.m=!1}if(qg(n)&&!im(n)){if(!e.h.F&&e._<1)return;fm(e,n),t&&t.A.l||mm(e,n)}}function mm(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&om(t,r)}function vm(e,t){var r=e[Dm];return(r?tm(r):e)[t]}function ym(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Object.getPrototypeOf(r)}}function bm(e){e.P||(e.P=!0,e.l&&bm(e.l))}function Sm(e){e.o||(e.o=rm(e.t))}function _m(e,t,r){var o=Xg(t)?sm("MapSet").N(t,r):em(t)?sm("MapSet").T(t,r):e.g?function(e,t){var r=Array.isArray(e),o={i:r?1:0,A:t?t.A:am(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},n=o,i=Vm;r&&(n=[o],i=Um);var s=Proxy.revocable(n,i),a=s.revoke,u=s.proxy;return o.k=u,o.j=a,u}(t,r):sm("ES5").J(t,r);return(r?r.A:am()).p.push(o),o}function Em(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return rm(e)}var Cm,Im,Am="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),wm="undefined"!=typeof Map,Tm="undefined"!=typeof Set,Om="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Rm=Am?Symbol.for("immer-nothing"):((Cm={})["immer-nothing"]=!0,Cm),km=Am?Symbol.for("immer-draftable"):"__$immer_draftable",Dm=Am?Symbol.for("immer-state"):"__$immer_state",Pm=""+Object.prototype.constructor,Mm="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Nm=Object.getOwnPropertyDescriptors||function(e){var t={};return Mm(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Lm={},Vm={get:function(e,t){if(t===Dm)return e;var r=tm(e);if(!Zg(r,t))return function(e,t,r){var o,n=ym(t,r);return n?"value"in n?n.value:null===(o=n.get)||void 0===o?void 0:o.call(e.k):void 0}(e,r,t);var o=r[t];return e.I||!qg(o)?o:o===vm(e.t,t)?(Sm(e),e.o[t]=_m(e.A.h,o,e)):o},has:function(e,t){return t in tm(e)},ownKeys:function(e){return Reflect.ownKeys(tm(e))},set:function(e,t,r){var o=ym(tm(e),t);if(null==o?void 0:o.set)return o.set.call(e.k,r),!0;if(!e.P){var n=vm(tm(e),t),i=null==n?void 0:n[Dm];if(i&&i.t===r)return e.o[t]=r,e.D[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,n)&&(void 0!==r||Zg(e.t,t)))return!0;Sm(e),bm(e)}return e.o[t]===r&&"number"!=typeof r&&(void 0!==r||t in e.o)||(e.o[t]=r,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==vm(e.t,t)||t in e.t?(e.D[t]=!1,Sm(e),bm(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=tm(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:o.enumerable,value:r[t]}:o},defineProperty:function(){zg(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){zg(12)}},Um={};Jg(Vm,(function(e,t){Um[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Um.deleteProperty=function(e,t){return Um.set.call(this,e,t,void 0)},Um.set=function(e,t,r){return Vm.set.call(this,e[0],t,r,e[0])};var jm=function(){function e(e){var t=this;this.g=Om,this.F=!0,this.produce=function(e,r,o){if("function"==typeof e&&"function"!=typeof r){var n=r;r=e;var i=t;return function(e){var t=this;void 0===e&&(e=n);for(var o=arguments.length,s=Array(o>1?o-1:0),a=1;a1?o-1:0),i=1;i=0;r--){var o=t[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}r>-1&&(t=t.slice(r+1));var n=sm("Patches").$;return Kg(e)?n(e,t):this.produce(e,(function(e){return n(e,t)}))},e}(),xm=new jm,Fm=xm.produce;xm.produceWithPatches.bind(xm),xm.setAutoFreeze.bind(xm),xm.setUseProxies.bind(xm),xm.applyPatches.bind(xm),xm.createDraft.bind(xm),xm.finishDraft.bind(xm);const Bm={ssrc:0,status:Fa.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:xa.OnlyHost,activeNodeId:0,activeSsrc:0,shareQuality:1,isRemoteSharingActive:!1,isReceiveSharing:!1,isRemoteControlApproved:!1,isGrabRemoteControl:!1,isSDKGrabControl:!1,isChromeExtensionInstalled:!1,isScreenShareForbidden:!1,isReceiveSharingFromMainSession:!1,isSharingToBreakoutRoom:!1,isSharingWithSecondCamera:!1,secondCameraId:"default",isRequireReadReceipt:!1,capturedEnsuredCanvas:[],renderedEnsuredCanvas:[],statistic:{encode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0},decode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0}}},Hm=Zr({[`${ip}`]:Fm(((e,t)=>{let{payload:r}=t;e.sharePrivilege=r})),[`${sp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isRemoteSharingActive=1===r.bStatus,e.activeNodeId=r.activeNodeID,e.activeSsrc=r.ssrc})),[`${ap}`]:Fm(((e,t)=>{let{payload:r}=t;e.isReceiveSharing=r})),[`${up}`]:Fm(((e,t)=>{let{payload:r}=t;e.isChromeExtensionInstalled=r})),[`${dp}`]:Fm(((e,t)=>{let{payload:r}=t;e.shareDimension=ot({},r)})),[`${lp}`]:Fm(((e,t)=>{let{payload:r}=t;e.status=r})),[`${pp}`]:Fm(((e,t)=>{let{payload:r}=t;e.ssrc=r})),[`${hp}`]:Fm(((e,t)=>{let{payload:r}=t;e.shareQuality=r})),[`${fp}`]:Fm(((e,t)=>{let{payload:r}=t;e.receivedShareDimension=ot({},r)})),[`${gp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isRemoteControlApproved=r})),[`${mp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isGrabRemoteControl=r})),[`${vp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isSDKGrabControl=r})),[`${yp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isReceiveSharingFromMainSession=r})),[`${bp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isSharingToBreakoutRoom=r})),[`${Sp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isSharingWithSecondCamera=r})),[`${_p}`]:Fm(((e,t)=>{let{payload:r}=t;e.secondCameraId=r})),[`${Ep}`]:Fm(((e,t)=>{let{payload:r}=t;e.isRequireReadReceipt=r})),[`${Cp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isOptimizedForSharedVideo=r})),[`${Ip}`]:Fm(((e,t)=>{let{payload:r}=t;e.statistic.encode=r.data})),[`${Ap}`]:Fm(((e,t)=>{let{payload:r}=t;e.statistic.decode=r.data})),[`${wp}`]:Fm(((e,t)=>{let{payload:r}=t;e.capturedEnsuredCanvas.includes(r)||e.capturedEnsuredCanvas.push(r)})),[`${Tp}`]:Fm(((e,t)=>{let{payload:r}=t;e.renderedEnsuredCanvas.includes(r)||e.renderedEnsuredCanvas.push(r)})),[`${Op}`]:()=>ot({},Bm)},Bm),Wm=Ro(Gg),$m=Ls.createAgent();var Gm=Object.freeze({__proto__:null,joinMeetingWelcomeEpic:e=>ko(e,0).pipe(Zt((e=>{var t;if("READY"===(null===(t=e.payload.body)||void 0===t?void 0:t.status)){const e=Vi.get(us.WebclientMeetingToken);e&&$m.joinMeeting(e)}})),Vt(W)),joinMeetingSuccessfulEpic:(e,t)=>ko(e,Ss).pipe(or(t),mg((e=>{let[t,r]=e;const{payload:{body:{res:o,userID:n,zoomID:i,mn:s,participantID:a,disableAqos:u,disableVqos:c,meetingtoken:d,role:l}}}=t,{meeting:{isWebinar:p,userEmail:h,userName:f,isMeetingReset:g,meetingOptions:m,zlkJwtToken:v,cv:y,apiKey:b,zsk:S,signatureType:_},media:{mediaConstraints:E,assetsPath:C}}=r;if(In.CONF_SUCCESS===o){const{WebclientParticipantId:e,WebclientZoomId:r,WebclientUserEmail:o,WebclientUserName:I,WebclientMeetingToken:A}=us;Vi.set(r,i,Ni.SessionStorage),Vi.set(e,a,Ni.SessionStorage),h&&Vi.set(o,h,Ni.SessionStorage),Vi.set(I,f,Ni.SessionStorage),d&&Vi.set(A,d,Ni.SessionStorage),S&&$m.sendSdkKeyToMonitor(_,b,n);const w=[Yn(t.payload.body),li(performance.now())];Ws.getInstance().init(),g&&(w.push(ni(!1)),void 0!==E&&void 0!==C&&w.push(go())),(m.isPollingEnabled||v||p)&&w.push(Xr());let T=!c;const O=!u;return v&&fn(y,"1.3.0")<0&&(T=!1),w.unshift(pi({audioQos:O,videoQos:T})),(l&el.Owner)===el.Owner&&(Rd(Ys,{reason:"dont support assisnt join through widget",errorCode:-1}),$m.leaveMeeting()),Rd(Zs,{meetingNumber:s}),Oe(w)}return In.CONF_FAIL_CONFLOCKED===o?Rd(Ys,Ln(o)):In.CONF_FAIL_CONF_USER_FULL===o?Rd(Ys,Object.assign({},Ln(o),{lmUrl:t.payload.body.lmURL})):(In.CONF_FAIL_MEETING_OVER===o||In.CONF_RESULT_MMR_IB_REJECT===o||In.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===o||[In.CONF_FAIL_HAS_BEEN_REMOVED,In.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(o),Rd(Ys,Ln(o))),Oe(lg(r,!1))}))),handleMeetingAttributeChangeEpic:(e,t)=>ko(e,vs).pipe(or(t),ye((e=>{let[t,r]=e;const{payload:{body:o}}=t,{meeting:{zoomId:n,encType:i,gcmSessinKey:s}}=r;if(void 0!==(null==o?void 0:o.encryptKey)&&hs.init(n,o.encryptKey,i),void 0!==(null==o?void 0:o.gatewayKey)){const e=Ws.getInstance(),[,t,r]=o.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:r&&ln(r)}],s)}return Rd(ra,o),Xn(o)}))),handleMeetingEndEpic:(e,t)=>ko(e,7939).pipe(or(t),Pe((e=>{let[t,r]=e;const{payload:{body:o}}=t;if(void 0!==o.reason){if(An.Reconnect===o.reason)return wn.WaitingRoomFailover===o.subReason?Rd(Xs,{reason:Ai.OnHold}):Rd(Xs,{reason:Ai.Failover}),Q(Bn(Mi.NormalCase));An.KickedByHost===o.reason?Rd(ea,{reason:"kicked by host"}):[An.EndByHost,An.EndByNone,An.EndByAdmin,An.EndByHostStartAnotherMeeting].includes(o.reason)?Rd(ea,{reason:"ended by host"}):An.FreeMeetingTimeout===o.reason&&Rd(ea,{reason:"free meeting ended"})}return r.meeting.isMeetingReset?W:Oe(lg(r,!1))}))),meetingFailoverEpic:(e,t)=>e.pipe(ar(`${Bn}`),or(t),Pe((e=>{let[,t]=e;const r=lg(t,!0);let o;if(t.meeting.zlkJwtToken){const e=function(e){if(e){const{meeting:{topic:t,passWord:r,userName:o,zlkJwtToken:n,lang:i,cv:s,customerKey:a}}=e;return{topic:t,passWord:r,userName:o,zlkJwtToken:n,lang:i,cv:s,customerKey:a}}return null}(t),r={topic:null==e?void 0:e.topic,password:null==e?void 0:e.passWord,userName:null==e?void 0:e.userName,zlk:null==e?void 0:e.zlkJwtToken,lang:null==e?void 0:e.lang,cv:null==e?void 0:e.cv,customerKey:null==e?void 0:e.customerKey};o=Q(xn(r)).pipe(_t(1e3))}else{const e=function(e){const{meeting:{apiKey:t,signature:r,signatureType:o,meetingNumber:n,userName:i,lang:s,passWord:a,userEmail:u,sdkUrl:c,sdkOrigin:d,proxy:l,cv:p,ztk:h,zsk:f,tk:g}}=e,m=h||sessionStorage.getItem(us.WebclientZtk),v=f||sessionStorage.getItem(us.WebclientZsk);return{apiKey:t,signature:r,signatureType:o,meetingNumber:n,userName:i,lang:s,passWord:a,userEmail:u,sdkUrl:c,sdkOrigin:d,proxy:l,cv:p,ztk:m,zsk:v,tk:g||sessionStorage.getItem(us.WebclientTk),ulsm:v?1:0}}(t);o=Q(jn(e)).pipe(_t(1e3))}return Ve(Oe(r),o)}))),hostChangeEpic:e=>Mo(e,7940).pipe(Zt((e=>{Rd("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)})),ye((e=>ti(e.payload.body)))),cohostChangeEpic:e=>Mo(e,7941).pipe(Zt((e=>{Rd("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)})),ye((e=>ri(e.payload.body)))),setMeetingOptEpic:e=>Mo(e,7945).pipe(Zt((e=>{const{payload:{body:{opt:t}}}=e;Vi.set(us.WebclientOpt,t,Ni.SessionStorage)})),Vt(W)),setMeetingOnHoldEpic:(e,t)=>ko(e,7942).pipe(Zt((e=>{const{payload:{body:{bHold:t}}}=e;Vi.set(us.WebclientIsOnHold,t?1:0,Ni.SessionStorage),Rd(ta,t)})),or(t),Pe((e=>{let[t,r]=e;const o=[oi(t.payload.body.bHold)];if(t.payload.body.bHold){const e=hl(r);if(e){o.push(ii({audio:e.audio,video:e.bVideoOn,muted:e.muted}));const t=Ws.getInstance();if("computer"===e.audio&&(t.leaveComputerAudio(),$m.joinOrLeaveVoip(!1)),e.bVideoOn&&t.stopCaptureVideo(),e.sharerOn&&($m.stopSharing(e.userId),t.stopDesktopSharing(),o.push(lp(Fa.End))),r.video&&r.video.subscribedVideoList.length>0&&r.video.subscribedVideoList.forEach((e=>{$m.unsubscribeVideo(e)})),r.share&&r.share.isReceiveSharing){const e=r.share.activeNodeId;r.share.isRemoteControlApproved&&($m.sharingRequestRemoteControl(e,!1),t.stopRemoteControl()),$m.unsubscribeSharing(e),t.stopRenderSharing()}}}return Oe(o)}))),setMeetingDataCenterRegionEpic:e=>ko(e,7954).pipe(ye((e=>ci(e.payload.body)))),claimHostResponseEpic:e=>ko(e,4216).pipe(Zt((e=>{Rd("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)})),Vt(W)),leaveMeetingEpic:(e,t)=>e.pipe(ar(`${Hn}`,`${Wn}`),or(t),Pe((e=>{let[t,r]=e;return t.type===`${Hn}`?($m.leaveMeeting(),Rd(ea,{})):t.type===`${Wn}`&&($m.endMeeting(),Rd(ea,{})),Oe(lg(r,!1))}))),versionUpgradeEpic:e=>ko(e,2).pipe(Zt((()=>{console.warn("Upgrade to latest version to optimize meeting experience")})),Vt(W)),versionBlockEpic:e=>ko(e,1).pipe(Zt((e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=Ln(1e4);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,(()=>t));r.reason=e}Rd(Ys,r)})),Vt(W)),handleSharePronounChangeEpic:e=>ko(e,4265).pipe(ye((e=>{const{payload:{body:t}}=e,{nShareType:r}=t;return Rd(oa,{userSharePronounType:r}),yi(r)}))),handleMeetingTokenEpic:e=>ko(e,4128).pipe(Zt((e=>{const{payload:{body:{meetingtoken:t}}}=e,{WebclientMeetingToken:r}=us;t&&Vi.set(r,t,Ni.SessionStorage)})),Vt(W))});let zm,Km,qm,Jm,Qm,Zm;!function(e){e[e.AttendeeToAllPanelist=1]="AttendeeToAllPanelist",e[e.PanelistToAttendee=3]="PanelistToAttendee"}(zm||(zm={})),function(e){e.Add="add",e.List="list",e.Remove="memberremove",e.rename="rename",e.update="UPDATE"}(Km||(Km={})),function(e){e.PutDownHands="putdownhands",e.LowerHand="lowerhand"}(qm||(qm={})),function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(Jm||(Jm={}));class Ym{constructor(){this.eventHandlers=void 0,this.websocket=void 0,this.seq=void 0,this.eventHandlers=new Map,this.websocket=null,this.seq=1}static getInstance(){return this.xmppInstance||(this.xmppInstance=new Ym),this.xmppInstance}on(e,t){let r=this.eventHandlers.get(e);r||(r=[]),r.push(t),this.eventHandlers.set(e,r)}off(e,t){const r=this.eventHandlers.get(e);if(r){const o=r.filter((e=>e!==t));this.eventHandlers.set(e,o)}}emit(e,t){const r=this.eventHandlers.get(e);r&&r instanceof Array&&r.slice(0).forEach((e=>{try{e(t)}catch(e){console.error(e)}}))}sendMessageToRwg(e){this.seq+=1;const t=this.seq;return this.websocket&&this.websocket.readyState===WebSocket.OPEN&&this.websocket.send(JSON.stringify(Object.assign(e,{seq:t}))),t}connect(e){this.websocket=new WebSocket(e),this.websocket.binaryType="arraybuffer",this.addWebSocketEventListeners()}close(){var e;null===(e=this.websocket)||void 0===e||e.close()}addWebSocketEventListeners(){this.websocket&&(this.websocket.addEventListener("open",(e=>{this.emit(Jm.Open,e)})),this.websocket.addEventListener("message",(e=>{const{data:t}=e;var r;if(t instanceof ArrayBuffer)0===new Uint8Array(t)[0]&&(null===(r=this.websocket)||void 0===r||r.send(t));else try{this.emit(Jm.Message,JSON.parse(t))}catch(e){console.warn("Unsupported format",t)}})),this.websocket.addEventListener("close",(e=>{this.emit(Jm.Close,e)})),this.websocket.addEventListener("error",(e=>{this.emit(Jm.Error,e)})))}join(e){return{seq:this.sendMessageToRwg({evt:24576,body:{clientCap:e}})}}raiseHand(){return{seq:this.sendMessageToRwg({evt:24580,body:null})}}lowerHand(e){return{seq:this.sendMessageToRwg({evt:24578,jids:e||[]})}}sendWebinarMseeage(e,t,r){const o={msg:e,jid:t?[t]:[],type:r,bcm:arguments.length>3&&void 0!==arguments[3]&&arguments[3]};return{seq:this.sendMessageToRwg({evt:24582,body:o})}}sendAnswer(e,t,r){return{seq:this.sendMessageToRwg({evt:24584,body:{question_attendeejid:t.jid,question_attendeename:t.displayName,question_text:t.questionText,question_id:t.questionId,question_anonymous:t.isAnonymous,question_time:t.questionTime,text:e,isPrivate:r}})}}answerOnline(e,t){return{seq:this.sendMessageToRwg({evt:24586,body:{question_attendeejid:e.jid,question_attendeename:e.displayName,question_text:e.questionText,question_id:e.questionId,question_anonymous:e.isAnonymous,question_time:e.questionTime,isLiveStart:t}})}}dismissQuestion(e){return{seq:this.sendMessageToRwg({evt:24590,body:{question_attendeejid:e.jid,question_attendeename:e.displayName,question_text:e.questionText,question_id:e.questionId,question_anonymous:e.isAnonymous,question_time:e.questionTime,bOpen:!1}})}}deleteQuestion(e){return{seq:this.sendMessageToRwg({evt:24614,body:{question_id:e,bDelete:!0}})}}deleteComment(e){return{seq:this.sendMessageToRwg({body:{comment_id:e,bDelete:!0},evt:24616})}}reopenQuestion(e){return{seq:this.sendMessageToRwg({body:{question_attendeejid:e.jid,question_attendeename:e.displayName,question_text:e.questionText,question_id:e.questionId,question_anonymous:e.isAnonymous,question_time:e.questionTime,bOpen:!0},evt:24590})}}askQuestion(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0;const n=gn();return{seq:this.sendMessageToRwg({body:{id:n,text:e,isAnonymous:r,bAllowAttendeeViewAllQuestion:o,name:t},evt:24592}),questionId:n}}upOrDownVote(e,t){return{seq:this.sendMessageToRwg({body:{question_attendeejid:e.jid,question_attendeename:e.displayName,question_text:e.questionText,question_id:e.questionId,question_anonymous:e.isAnonymous,question_time:e.questionTime,bUpVote:t},evt:24598})}}rename(e,t){return{seq:this.sendMessageToRwg({body:{jid:e,displayName:t},evt:24600})}}setSkinTome(e){return{seq:this.sendMessageToRwg({body:{skinTone:e},evt:24618})}}}Ym.xmppInstance=null;var Xm=Object.freeze({__proto__:null,startIdleTimerEpic:(e,t)=>e.pipe(ar(`${Yn}`),or(t),Ke((e=>{let[,t]=e;return void 0!==t.meeting.zlkJwtToken})),Wt((()=>(Qm&&Qm.complete(),Qm=new N,Zm=We(6e4).pipe(ye((()=>performance.now()))).subscribe(Qm),Qm.pipe(ye((e=>$n(e)))))))),terminateIdleTimerEpic:e=>e.pipe(ar(`${eo}`)).pipe(Zt((()=>{Qm&&(Qm.complete(),Zm.unsubscribe())})),Vt(W)),idleCheckingEpic:(e,t)=>e.pipe(ar(`${$n}`),or(t),Pe((e=>{var t;let[r,o]=e;const{meeting:{idleStartTime:n,sessionIdleTimeoutMins:i,isOriginHost:s},participants:{attendeesList:a,xmppAttendeeList:u},recording:c,breakoutRoom:d}=o,l=r.payload,p=[];if(1===a.length&&0===u.length&&(null==d||null===(t=d.currentRoom)||void 0===t?void 0:t.status)!==dl.InRoom&&(null==c?void 0:c.cmrStatus)!==Ea.Start)if(n){const e=s&&ol(a[0].userRole)?i:40;l-n>60*e*1e3&&(console.warn(`No active for ${e} minutes, will end the session.`),p.push(Wn()),et(500).subscribe((()=>{Md()})))}else p.push(fi(l));else p.push(fi(void 0));return Oe(p)}))),resetIdleStartTimeEpic:(e,t)=>e.pipe(ar(`${ro}`),Ke((e=>[ms,vs].includes(e.payload.evt)&&void 0!==t.value.meeting.idleStartTime)),ee(he),Pe((()=>{var e;const{participants:{attendeesList:r,xmppAttendeeList:o},recording:n,breakoutRoom:i}=t.value,s=[];return(r.length>1||o.length>0||(null==n?void 0:n.cmrStatus)===Ea.Start||(null==i||null===(e=i.currentRoom)||void 0===e?void 0:e.status)===dl.InRoom)&&s.push(fi(void 0)),Oe(s)}))),resetIdleStartTimeAfterLeaveMeetingEpic:e=>e.pipe(ar(`${Hn}`,`${Wn}`),kt(fi(void 0)))});const ev=Ls.createAgent();var tv=Object.freeze({__proto__:null,startReportFailoverReasonEpic:(e,t)=>e.pipe(ar(`${Gn}`),Wt((()=>{const r=0===t.value.meeting.failover.joinMeetingSuccessTimestamp&&!!Vi.get(us.WebclientZoomId);return e.pipe(ar(`${Yn}`),At(1),Pe((()=>{const e=[],o=Vi.get(us.WebclientFailoverCount)||0;let{meeting:{failover:{count:n,reason:i,interval:s}}}=t.value;const{meeting:{pingRWCTimestamp:a}}=t.value;r&&(n=o+1,i=Mi.RefreshPage,s=0,Vi.set(us.WebclientFailoverCount,n,Ni.SessionStorage),e.push(Ei({count:n,reason:i,interval:s})));const u=performance.now();let c=`WCL_M, JMCT(${u-a})`;return n>0&&i!==Mi.NormalCase&&(c=`${c},FAILOVER(${n},${i},${(s/1e3).toFixed(1)})`),ev.sendRWGConnectionPerformance(c),e.push(_i(),Si(u)),Oe(e)})))}))),recordFailoverReasonEpic:(e,t)=>e.pipe(ar(`${Bn}`),Pe((e=>{const{payload:r}=e,{meeting:{failover:{joinMeetingSuccessTimestamp:o,isCurrentFailoverRecorded:n}}}=t.value,i=[];if(!n){let e=Vi.get(us.WebclientFailoverCount)||0;r!==Mi.NormalCase&&(e+=1,Vi.set(us.WebclientFailoverCount,e,Ni.SessionStorage));const t=performance.now()-o;i.push(Ei({reason:r,count:e,interval:t}))}return Oe(i)})))});let rv=null;var ov=Object.freeze({__proto__:null,startStayAwakeEpic:(e,t)=>e.pipe(ar(`${Yn}`),or(t),Ke((e=>{let[,t]=e;return!!t.meeting.stayAwake})),Zt((async()=>{try{rv&&rv.release().then((()=>{rv=null})),"wakeLock"in navigator&&(rv=await navigator.wakeLock.request("screen"),rv.addEventListener("release",(()=>{})))}catch(e){}})),Wt((()=>xe(document,"visibilitychange").pipe(Pe((async()=>{"visible"===document.visibilityState?(rv&&rv.release().then((()=>{rv=null})),"wakeLock"in navigator&&(rv=await navigator.wakeLock.request("screen"))):rv&&rv.release().then((()=>{rv=null}))})),Vt(W))))),cancelStayAwakeEpic:e=>e.pipe(ar(`${eo}`)).pipe(Zt((()=>{rv&&rv.release().then((()=>{rv=null}))})),Vt(W))}),nv="undefined"!=typeof window&&window,iv="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,sv="undefined"!=typeof global&&global,av=nv||sv||iv;function uv(e,t){return void 0===t&&(t=null),new gv({method:"GET",url:e,headers:t})}function cv(e,t,r){return new gv({method:"POST",url:e,body:t,headers:r})}function dv(e,t){return new gv({method:"DELETE",url:e,headers:t})}function lv(e,t,r){return new gv({method:"PUT",url:e,body:t,headers:r})}function pv(e,t,r){return new gv({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!av)throw new Error("RxJS could not find any global context (window, self, global)")}();var hv=ye((function(e,t){return e.response}));function fv(e,t){return hv(new gv({method:"GET",url:e,responseType:"json",headers:t}))}var gv=function(e){function t(t){var r=e.call(this)||this,o={async:!0,createXHR:function(){return this.crossDomain?function(){if(av.XMLHttpRequest)return new av.XMLHttpRequest;if(av.XDomainRequest)return new av.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(av.XMLHttpRequest)return new av.XMLHttpRequest;var e=void 0;try{for(var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],r=0;r<3;r++)try{if(e=t[r],new av.ActiveXObject(e))break}catch(e){}return new av.ActiveXObject(e)}catch(e){throw new Error("XMLHttpRequest is not supported by your browser")}}()},crossDomain:!0,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"==typeof t)o.url=t;else for(var n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);return r.request=o,r}var r;return d(t,e),t.prototype._subscribe=function(e){return new mv(e,this.request)},t.create=((r=function(e){return new t(e)}).get=uv,r.post=cv,r.delete=dv,r.put=lv,r.patch=pv,r.getJSON=fv,r),t}(R),mv=function(e){function t(t,r){var o=e.call(this,t)||this;o.request=r,o.done=!1;var n=r.headers=r.headers||{};return r.crossDomain||o.getHeader(n,"X-Requested-With")||(n["X-Requested-With"]="XMLHttpRequest"),o.getHeader(n,"Content-Type")||av.FormData&&r.body instanceof av.FormData||void 0===r.body||(n["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),r.body=o.serializeBody(r.body,o.getHeader(r.headers,"Content-Type")),o.send(),o}return d(t,e),t.prototype.next=function(e){this.done=!0;var t,r=this,o=r.xhr,n=r.request,i=r.destination;try{t=new vv(e,o,n)}catch(e){return i.error(e)}i.next(t)},t.prototype.send=function(){var e=this.request,t=this.request,r=t.user,o=t.method,n=t.url,i=t.async,s=t.password,a=t.headers,u=t.body;try{var c=this.xhr=e.createXHR();this.setupEvents(c,e),r?c.open(o,n,i,r,s):c.open(o,n,i),i&&(c.timeout=e.timeout,c.responseType=e.responseType),"withCredentials"in c&&(c.withCredentials=!!e.withCredentials),this.setHeaders(c,a),u?c.send(u):c.send()}catch(e){this.error(e)}},t.prototype.serializeBody=function(e,t){if(!e||"string"==typeof e)return e;if(av.FormData&&e instanceof av.FormData)return e;if(t){var r=t.indexOf(";");-1!==r&&(t=t.substring(0,r))}switch(t){case"application/x-www-form-urlencoded":return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&");case"application/json":return JSON.stringify(e);default:return e}},t.prototype.setHeaders=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setRequestHeader(r,t[r])},t.prototype.getHeader=function(e,t){for(var r in e)if(r.toLowerCase()===t.toLowerCase())return e[r]},t.prototype.setupEvents=function(e,t){var r,o,n=t.progressSubscriber;function i(e){var t,r=i,o=r.subscriber,n=r.progressSubscriber,s=r.request;n&&n.error(e);try{t=new _v(this,s)}catch(e){t=e}o.error(t)}(e.ontimeout=i,i.request=t,i.subscriber=this,i.progressSubscriber=n,e.upload&&"withCredentials"in e)&&(n&&(r=function(e){r.progressSubscriber.next(e)},av.XDomainRequest?e.onprogress=r:e.upload.onprogress=r,r.progressSubscriber=n),o=function(e){var t,r=o,n=r.progressSubscriber,i=r.subscriber,s=r.request;n&&n.error(e);try{t=new yv("ajax error",this,s)}catch(e){t=e}i.error(t)},e.onerror=o,o.request=t,o.subscriber=this,o.progressSubscriber=n);function s(e){}function a(e){var t=a,r=t.subscriber,o=t.progressSubscriber,n=t.request;if(4===this.readyState){var i=1223===this.status?204:this.status,s="text"===this.responseType?this.response||this.responseText:this.response;if(0===i&&(i=s?200:0),i<400)o&&o.complete(),r.next(e),r.complete();else{o&&o.error(e);var u=void 0;try{u=new yv("ajax error "+i,this,n)}catch(e){u=e}r.error(u)}}}e.onreadystatechange=s,s.subscriber=this,s.progressSubscriber=n,s.request=t,e.onload=a,a.subscriber=this,a.progressSubscriber=n,a.request=t},t.prototype.unsubscribe=function(){var t=this.done,r=this.xhr;!t&&r&&4!==r.readyState&&"function"==typeof r.abort&&r.abort(),e.prototype.unsubscribe.call(this)},t}(C),vv=function(e,t,r){this.originalEvent=e,this.xhr=t,this.request=r,this.status=t.status,this.responseType=t.responseType||r.responseType,this.response=bv(this.responseType,t)},yv=function(){function e(e,t,r){return Error.call(this),this.message=e,this.name="AjaxError",this.xhr=t,this.request=r,this.status=t.status,this.responseType=t.responseType||r.responseType,this.response=bv(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function bv(e,t){switch(e){case"json":return function(e){return"response"in e?e.responseType?e.response:JSON.parse(e.response||e.responseText||"null"):JSON.parse(e.responseText||"null")}(t);case"xml":return t.responseXML;default:return"response"in t?t.response:t.responseText}}var Sv,_v=function(e,t){return yv.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},Ev=gv.create,Cv=new Uint8Array(16);function Iv(){if(!Sv&&!(Sv="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sv(Cv)}var Av=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var wv,Tv,Ov,Rv,kv=[],Dv=0;Dv<256;++Dv)kv.push((Dv+256).toString(16).substr(1));function Pv(e,t,r){var o=(e=e||{}).random||(e.rng||Iv)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=o[n];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(kv[e[t+0]]+kv[e[t+1]]+kv[e[t+2]]+kv[e[t+3]]+"-"+kv[e[t+4]]+kv[e[t+5]]+"-"+kv[e[t+6]]+kv[e[t+7]]+"-"+kv[e[t+8]]+kv[e[t+9]]+"-"+kv[e[t+10]]+kv[e[t+11]]+kv[e[t+12]]+kv[e[t+13]]+kv[e[t+14]]+kv[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&Av.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r}(o)}!function(e){e[e.PLAIN=0]="PLAIN",e[e.RSA=1]="RSA",e[e.AESGCM256=2]="AESGCM256"}(wv||(wv={})),function(e){e[e.info=0]="info",e[e.debug=1]="debug",e[e.log=2]="log",e[e.warn=3]="warn",e[e.error=4]="error"}(Tv||(Tv={})),function(e){e[e.PROTECT_LOCAL_KEY=0]="PROTECT_LOCAL_KEY"}(Ov||(Ov={})),function(e){e.beforeInit="beforeInit",e.afterInit="afterInit",e.beforeLog="beforeLog",e.hitSizeLimit="hitSizeLimit",e.afterLog="afterLog",e.beforeReport="beforeReport",e.afterReport="afterReport"}(Rv||(Rv={}));class Mv{constructor(){}}var Nv,Lv={exports:{}},Vv={exports:{}},Uv=vr(Object.freeze({__proto__:null,default:{}}));Vv.exports=(Nv=Nv||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==gr&&gr.crypto&&(r=gr.crypto),!r)try{r=Uv}catch(e){}var o=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},s=i.lib={},a=s.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,r=e.words,o=this.sigBytes,n=e.sigBytes;if(this.clamp(),o%4)for(var i=0;i>>2]>>>24-i%4*8&255;t[o+i>>>2]|=s<<24-(o+i)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-n%4*8&255;o.push((i>>>4).toString(16)),o.push((15&i).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new u.init(r,t/2)}},l=c.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,o=[],n=0;n>>2]>>>24-n%4*8&255;o.push(String.fromCharCode(i))}return o.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new u.init(r,t)}},p=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},h=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,o=this._data,n=o.words,i=o.sigBytes,s=this.blockSize,a=i/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,d=e.min(4*c,i);if(c){for(var l=0;l>>6-s%4*2;n[i>>>2]|=a<<24-i%4*8,i++}return r.create(n,i)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,o=this._map;e.clamp();for(var n=[],i=0;i>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;a<4&&i+.75*a>>6*(3-a)&63));var u=o.charAt(64);if(u)for(;n.length%4;)n.push(u);return n.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i{const t=jv.exports.parse(e);return Lv.exports.stringify(t)},Bv=e=>{for(var t=e.length,r=e.length-1;r>=0;r--){var o=e.charCodeAt(r);o>127&&o<=2047?t++:o>2047&&o<=65535&&(t+=2),o>=56320&&o<=57343&&r--}return t};function Hv(e){const t=new ArrayBuffer(e.length),r=new Uint8Array(t);for(let t=0,o=e.length;txv(void 0,void 0,void 0,(function*(){return yield self.crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"])})),zv=(e,t,r)=>xv(void 0,void 0,void 0,(function*(){try{return yield self.crypto.subtle.encrypt({name:"AES-GCM",iv:r},t,e)}catch(e){throw e}})),Kv=(e,t,r)=>xv(void 0,void 0,void 0,(function*(){try{return yield self.crypto.subtle.decrypt({name:"AES-GCM",iv:r},t,e)}catch(e){throw e}})),qv=(e,t)=>xv(void 0,void 0,void 0,(function*(){try{return yield self.crypto.subtle.decrypt({name:"RSA-OAEP"},t,e)}catch(e){throw e}})),Jv=(e,t,r)=>xv(void 0,void 0,void 0,(function*(){return new Promise(((o,n)=>{requestAnimationFrame((()=>xv(void 0,void 0,void 0,(function*(){var i;try{const n=null===(i=null==t?void 0:t.algorithm)||void 0===i?void 0:i.name;let s;if("RSA-OAEP"===n?s=qv:"AES-GCM"===n&&(s=Kv),!s)throw new Error("Unsupported encrypt key type");if("string"==typeof e){const n=new TextEncoder,i=yield s(n.encode(e),t,r);o(i)}else{const n=yield s(e,t,r);o(n)}}catch(e){n(e)}}))))}))})),Qv=(e,t)=>{const r="string"==typeof e?Hv(e):e;return self.crypto.subtle.encrypt({name:"RSA-OAEP"},t,r)},Zv=(e,t,r)=>xv(void 0,void 0,void 0,(function*(){return new Promise(((o,n)=>{requestAnimationFrame((()=>xv(void 0,void 0,void 0,(function*(){var n;const i=null===(n=null==t?void 0:t.algorithm)||void 0===n?void 0:n.name;let s;if("RSA-OAEP"===i?s=Qv:"AES-GCM"===i&&(s=zv),!s)throw new Error("Unsupported encrypt key type");if("string"==typeof e){const n=new TextEncoder,i=yield s(n.encode(e),t,r);o(i)}else{const n=yield s(e,t,r);o(n)}}))))}))})),Yv={},Xv=(e,t)=>{Yv[t]=e},ey=Yv;var ty=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const ry=(e,t,r,o)=>ty(void 0,void 0,void 0,(function*(){try{if(!e||!t||!r)return null;const o=yield self.crypto.subtle.decrypt({name:"AES-GCM",iv:r},t,e);return String.fromCharCode.apply(null,new Uint8Array(o))}catch(e){throw e}})),oy={decryptAESGCM256:ry,bulkDecryptAESGCM256:e=>ty(void 0,void 0,void 0,(function*(){return yield Promise.all(e.map((e=>ry(...e))))}))};var ny=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const iy=e=>{let t=0;return t+=Bv(e.message),e.tags.forEach((e=>{t+=Bv(e)})),t},sy={success:!1,codecWorker:null},ay=[],uy=()=>ny(void 0,void 0,void 0,(function*(){if(sy.success)return sy.codecWorker;{const e=new Promise(((e,t)=>{ay.push((()=>{e(null)}))}));return yield e,sy.codecWorker}}));class cy{constructor(e){this.uuid=self.crypto.randomUUID();const{databaseName:t,maxSize:r,publicKey:o,reportUrl:n,plugins:i,idbManager:s,logManager:a,currentSize:u,externalKeys:c,codecWorkerFilePath:d}=e;sy.codecWorker=oy,ay.forEach((e=>{e()})),sy.success=!0,console.log("codec worker init success"),this.databaseName=t,this.maxSize=r,this.publicKey=null!=o?o:"",this.reportUrl=null!=n?n:"",this.plugins=null!=i?i:[],this.idbManager=s,this.logManager=a,this.currentSize=null!=u?u:0,this.getCodecWorker=uy,this.externalKeys=c,this.commonMethods=Object.assign({},ey)}getLocalAESGCM256Key(){var e;return ny(this,void 0,void 0,(function*(){if(this.localAESGCM256Key)return this.localAESGCM256Key;this.localAESGCM256Key=yield Gv();const t=this.externalKeys?null===(e=this.externalKeys.filter((e=>e.usage===Ov.PROTECT_LOCAL_KEY))[0])||void 0===e?void 0:e.key:void 0;return yield this.idbManager.saveAESGCM256Key(this.uuid,this.localAESGCM256Key,t),this.localAESGCM256Key}))}updateCurrentSize(e){var t;let r=null!==(t=this.currentSize)&&void 0!==t?t:0;if(e instanceof Map)for(const[t,o]of e)r+=iy(o);else r+=iy(e);return this.currentSize=r,r>=this.maxSize}}const dy=(...e)=>{const t={},r=[];for(const o of e)o.forEach((e=>{t[e.id]||(t[e.id]=!0,r.push(e))}));const o=new Map;return r.sort(((e,t)=>(null==e?void 0:e.id)-(null==t?void 0:t.id))).forEach((e=>{o.set(e.id,e)})),o},ly=(e,t)=>{const r=new Map;return t.forEach((t=>{e(t)&&r.set(t.id,t)})),r};class py{constructor(){this.getStore=()=>({byTag:Object.assign({},this.store.byTag),byTime:new Map(this.store.byTime)}),this.pushByTime=e=>{for(const t of e)this.store.byTime.set(t.id,t)},this.pushByTag=e=>{e.forEach((e=>{const t=e.tags;Array.isArray(t)&&t.forEach((t=>{this.store.byTag[t]||(this.store.byTag[t]=new Map),this.store.byTag[t].set(e.id,e)}))}))},this.addLog=e=>{let t=e;Array.isArray(e)||(t=[e]),this.pushByTime(t),this.pushByTag(t)},this.syncFromIDB=e=>function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){const t=yield e.getAllLogs();this.addLog(t)})),this.reset=()=>{this.store={byTag:{},byTime:new Map}},this.deleteLogs=e=>{for(const t of e){const e=this.store.byTime.get(t);if(!e)continue;const{tags:r}=e;for(const e of r)this.store.byTag[e].delete(t);this.store.byTime.delete(t)}},this.filterStore=e=>{const t=((e,t)=>{if(!t)return e.byTime;if("string"==typeof t)return e.byTag[t]||new Map;if(Array.isArray(t)){if(t.every((e=>"string"==typeof e)))return dy(...t.map((t=>e.byTag[t])).filter((e=>Boolean(e))))}else{if("function"==typeof t)return ly(t,e.byTime);if("object"==typeof t)if(t.tags&&t.filter){if("string"==typeof t.tags)return ly(t.filter,e.byTag[t.tags]);if(Array.isArray(t.tags)&&t.tags.every((e=>"string"==typeof e)))return dy(...t.tags.map((r=>{const o=e.byTag[r];return o?ly(t.filter,o):new Map})))}else{if(t.filter)return ly(t.filter,e.byTime);if(t.tags){if("string"==typeof t)return e.byTag[t]||new Map;if(Array.isArray(t)&&t.every((e=>"string"==typeof e)))return dy(...t.map((t=>e.byTag[t])))}}else console.error("Wrong filter type")}return new Map})(this.store,e),r=new Map;for(const[e,o]of t){const t=o.encryptMode!==wv.AESGCM256,n=Object.assign(Object.assign({},o),{message:t?Fv(o.message):o.message});r.set(e,n)}return r},this.store={byTag:{},byTime:new Map}}}function hy(e,t,r){const o=e.plugins;if(!Array.isArray(o))return r;let n=r;return o.forEach((r=>{const o=r[t];if("function"==typeof o){const t=o(e,n);t&&(n=t)}})),n}const fy=(e,t,r,o,n,i={})=>function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))}(void 0,void 0,void 0,(function*(){const{noCache:s,extraProperties:a={}}=i,u=((e,t,r,o,n,i)=>{const s=Array.isArray(t)?t:[t],a=Date.now();return Object.assign({message:e,logLevel:r,tags:s,encryptMode:o,timestamp:a,laplaceSessionId:n},i)})(`${t}`,r,o,n,e.uuid,a),c=hy(e,Rv.beforeLog,u);if(s)hy(e,Rv.afterLog,u);else{const{idbManager:t,logManager:r}=e,o=yield t.makeNextId();if(n===wv.AESGCM256){const t=yield e.getLocalAESGCM256Key(),r=yield Zv(c.message,t,new Uint8Array(16));c.message=Wv(r)}else c.message=(e=>{const t=Lv.exports.parse(e);return jv.exports.stringify(t)})(c.message);const i=Object.assign(Object.assign({},c),{id:o});e.updateCurrentSize(i)&&hy(e,Rv.hitSizeLimit,i),r.addLog(i),t.addLog(i),hy(e,Rv.afterLog,i)}}));Xv(fy,"commonLog");var gy={},my=Uint8Array,vy=Uint16Array,yy=Uint32Array,by=new my([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Sy=new my([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),_y=new my([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ey=function(e,t){for(var r=new vy(31),o=0;o<31;++o)r[o]=t+=1<>>1|(21845&ky)<<1;Dy=(61680&(Dy=(52428&Dy)>>>2|(13107&Dy)<<2))>>>4|(3855&Dy)<<4,Ry[ky]=((65280&Dy)>>>8|(255&Dy)<<8)>>>1}var Py=function(e,t,r){for(var o=e.length,n=0,i=new vy(t);n>>u]=c}else for(s=new vy(o),n=0;n>>15-e[n]);return s},My=new my(288);for(ky=0;ky<144;++ky)My[ky]=8;for(ky=144;ky<256;++ky)My[ky]=9;for(ky=256;ky<280;++ky)My[ky]=7;for(ky=280;ky<288;++ky)My[ky]=8;var Ny=new my(32);for(ky=0;ky<32;++ky)Ny[ky]=5;var Ly=Py(My,9,0),Vy=Py(My,9,1),Uy=Py(Ny,5,0),jy=Py(Ny,5,1),xy=function(e){for(var t=e[0],r=1;rt&&(t=e[r]);return t},Fy=function(e,t,r){var o=t/8|0;return(e[o]|e[o+1]<<8)>>(7&t)&r},By=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},Hy=function(e){return(e+7)/8|0},Wy=function(e,t,r){(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length);var o=new(2==e.BYTES_PER_ELEMENT?vy:4==e.BYTES_PER_ELEMENT?yy:my)(r-t);return o.set(e.subarray(t,r)),o},$y=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Gy=function(e,t,r){var o=new Error(t||$y[e]);if(o.code=e,Error.captureStackTrace&&Error.captureStackTrace(o,Gy),!r)throw o;return o},zy=function(e,t,r){r<<=7&t;var o=t/8|0;e[o]|=r,e[o+1]|=r>>>8},Ky=function(e,t,r){r<<=7&t;var o=t/8|0;e[o]|=r,e[o+1]|=r>>>8,e[o+2]|=r>>>16},qy=function(e,t){for(var r=[],o=0;op&&(p=i[o].s);var h=new vy(p+1),f=Jy(r[d-1],h,0);if(f>t){o=0;var g=0,m=f-t,v=1<t))break;g+=v-(1<>>=m;g>0;){var b=i[o].s;h[b]=0&&g;--o){var S=i[o].s;h[S]==t&&(--h[S],++g)}f=t}return[new my(h),f]},Jy=function(e,t,r){return-1==e.s?Math.max(Jy(e.l,t,r+1),Jy(e.r,t,r+1)):t[e.s]=r},Qy=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new vy(++t),o=0,n=e[0],i=1,s=function(e){r[o++]=e},a=1;a<=t;++a)if(e[a]==n&&a!=t)++i;else{if(!n&&i>2){for(;i>138;i-=138)s(32754);i>2&&(s(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(s(n),--i;i>6;i-=6)s(8304);i>2&&(s(i-3<<5|8208),i=0)}for(;i--;)s(n);i=1,n=e[a]}return[r.subarray(0,o),t]},Zy=function(e,t){for(var r=0,o=0;o>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var i=0;i4&&!w[_y[O-1]];--O);var R,k,D,P,M=c+5<<3,N=Zy(n,My)+Zy(i,Ny)+s,L=Zy(n,p)+Zy(i,g)+s+14+3*O+Zy(C,w)+(2*C[16]+3*C[17]+7*C[18]);if(M<=N&&M<=L)return Yy(t,d,e.subarray(u,u+c));if(zy(t,d,1+(L15&&(zy(t,d,x[I]>>>5&127),d+=x[I]>>>12)}}}else R=Ly,k=My,D=Uy,P=Ny;for(I=0;I255){F=o[I]>>>18&31,Ky(t,d,R[F+257]),d+=k[F+257],F>7&&(zy(t,d,o[I]>>>23&31),d+=by[F]);var B=31&o[I];Ky(t,d,D[B]),d+=P[B],B>3&&(Ky(t,d,o[I]>>>5&8191),d+=Sy[B])}else Ky(t,d,R[o[I]]),d+=k[o[I]];return Ky(t,d,R[256]),d+k[256]},eb=new yy([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),tb=new my(0),rb=function(e,t,r,o,n,i){var s=e.length,a=new my(o+s+5*(1+Math.ceil(s/7e3))+n),u=a.subarray(o,a.length-n),c=0;if(!t||s<8)for(var d=0;d<=s;d+=65535){var l=d+65535;l>=s&&(u[c>>3]=i),c=Yy(u,c+1,e.subarray(d,l))}else{for(var p=eb[t-1],h=p>>>13,f=8191&p,g=(1<7e3||w>24576)&&P>423){c=Xy(e,u,0,_,E,C,A,w,O,d-O,c),w=I=A=0,O=d;for(var M=0;M<286;++M)E[M]=0;for(M=0;M<30;++M)C[M]=0}var N=2,L=0,V=f,U=k-D&32767;if(P>2&&R==S(d-U))for(var j=Math.min(h,P)-1,x=Math.min(32767,d),F=Math.min(258,P);U<=x&&--V&&k!=D;){if(e[d+N]==e[d+N-U]){for(var B=0;BN){if(N=B,L=U,B>j)break;var H=Math.min(U,B-2),W=0;for(M=0;MW&&(W=G,D=$)}}}U+=(k=D)-(D=m[k])+32768&32767}if(L){_[w++]=268435456|Ay[N]<<18|Oy[L];var z=31&Ay[N],K=31&Oy[L];A+=by[z]+Sy[K],++E[257+z],++C[K],T=d+N,++I}else _[w++]=e[d],++E[e[d]]}}c=Xy(e,u,i,_,E,C,A,w,O,d-O,c),!i&&7&c&&(c=Yy(u,c+1,tb))}return Wy(a,0,o+Hy(c)+n)},ob=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,o=9;--o;)r=(1&r&&-306674912)^r>>>1;e[t]=r}return e}(),nb=function(){var e=-1;return{p:function(t){for(var r=e,o=0;o>>8;e=r},d:function(){return~e}}},ib=function(e,t,r,o,n){return rb(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,o,!n)},sb=function(e,t,r){for(var o=e(),n=e.toString(),i=n.slice(n.indexOf("[")+1,n.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s>>=8},hb=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&pb(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var o=0;o<=r.length;++o)e[o+10]=r.charCodeAt(o)}},fb=function(e){return 10+(e.filename&&e.filename.length+1||0)};function gb(e,t){return ib(e,t||{},0,0)}function mb(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&Gy(7),function(e,t,r,o,n,i){var s=ub([cb,db,function(){return[vb]}],(function(e){return lb(vb(e.data[0],e.data[1]))}),2,(function(e,t){s.terminate(),i(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}}(e,t,0,0,0,r)}function vb(e,t){t||(t={});var r=nb(),o=e.length;r.p(e);var n=ib(e,t,fb(t),8),i=n.length;return hb(n,t),pb(n,i-8,r.d()),pb(n,i-4,o),n}var yb="undefined"!=typeof TextEncoder&&new TextEncoder,bb="undefined"!=typeof TextDecoder&&new TextDecoder;try{bb.decode(tb,{stream:!0})}catch(c){}function Sb(e,t){if(t){for(var r=new my(e.length),o=0;o>1)),s=0,a=function(e){i[s++]=e};for(o=0;oi.length){var u=new my(s+8+(n-o<<1));u.set(i),i=u}var c=e.charCodeAt(o);c<128||t?a(c):c<2048?(a(192|c>>6),a(128|63&c)):c>55295&&c<57344?(a(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++o))>>18),a(128|c>>12&63),a(128|c>>6&63),a(128|63&c)):(a(224|c>>12),a(128|c>>6&63),a(128|63&c))}return Wy(i,0,s)}var _b=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const Eb=e=>_b(void 0,void 0,void 0,(function*(){let t=e.report.meta;t?(t.version="000001",t.flag="0"):t={version:"000001",flag:"0"};const r=Object.assign(Object.assign({},e.report),{meta:t});return Object.assign(Object.assign({},e),{report:r})})),Cb=(e,t=2)=>{let r=`${e}`;for(;r.length{const t=new Date(e);return`${t.getUTCFullYear()}-${Cb(t.getUTCMonth()+1)}-${Cb(t.getUTCDate())} ${Cb(t.getUTCHours())}:${Cb(t.getUTCMinutes())}:${Cb(t.getUTCSeconds())}.${Cb(t.getUTCMilliseconds(),3)}`},Ab=(e,t)=>{const{message:r,logLevel:o,tags:n,timestamp:i,encryptMode:s,id:a}=e,u=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n{let o="",n=0;const i=new Map,s=new Map,a=Boolean(t.gzip)?92160:30720;for(const[t,u]of e){const e=Ab(u,r),t=Bv(e);n+t_b(void 0,void 0,void 0,(function*(){const o=e.logManager.filterStore(t);let n=e.publicKey;const{xhrOptions:i={},reportMaker:s,additionalContext:a,gzip:u,encrypt:c,publicKey:d}=r;if(d&&(n=d),c&&!n)throw new Error("Cannot encrypt report without key");const l=hy(e,Rv.beforeReport,o),p=yield((e,t)=>_b(void 0,void 0,void 0,(function*(){try{const{idbManager:r,getCodecWorker:o,externalKeys:n}=t,i=n?n.filter((e=>e.usage===Ov.PROTECT_LOCAL_KEY)).map((e=>e.key)):void 0,s=new Map,a=Array.from(e.values()),u=yield Promise.all(a.map((e=>_b(void 0,void 0,void 0,(function*(){return e.encryptMode===wv.AESGCM256?[$v(e.message),yield r.loadAESGCM256Key(e.laplaceSessionId,i),new Uint8Array(16)]:[]})))).map((e=>!1===e[1]?[]:e))),c=yield o(),d=yield c.bulkDecryptAESGCM256(u);return a.forEach(((e,t)=>{const r=d[t];r?s.set(e.id,Object.assign(Object.assign({},e),{message:r})):s.set(e.id,e)})),s}catch(t){return e}})))(l,e);let h=((e,t,r,o)=>{const n=[];let i;do{const s=t(i||e,r,o),{nextReportItems:a}=s;n.push(s),i=a}while(Boolean(i)&&Boolean(null==i?void 0:i.size));return n})(p,null!=s?s:wb,r,a);if(u){const e=(e=>t=>_b(void 0,void 0,void 0,(function*(){let r=yield(o=t.report.messages,new Promise(((e,t)=>{mb(Sb(o),{consume:!0},((r,o)=>{r&&t(r),e(o)}))})));var o;e&&(r=Wv(r));const n=Object.assign(Object.assign({},t.report),{messages:r});return Object.assign(Object.assign({},t),{report:n})})))(!c);h=yield Promise.all(h.map(e))}h=c?yield Promise.all(h.map((e=>t=>_b(void 0,void 0,void 0,(function*(){const r=self.crypto.getRandomValues(new Uint8Array(16)),o=yield Gv(),n=yield(i=e,xv(void 0,void 0,void 0,(function*(){const e=i.replace("-----BEGIN PUBLIC KEY-----","").replace("-----END PUBLIC KEY-----",""),t=Hv(self.atob(e));return yield self.crypto.subtle.importKey("spki",t,{name:"RSA-OAEP",hash:"SHA-1"},!0,["encrypt"])})));var i;const s=yield(e=>xv(void 0,void 0,void 0,(function*(){return yield self.crypto.subtle.exportKey("raw",e)})))(o),a=yield Qv(s,n),u=yield Zv(t.report.messages,o,r),c=Object.assign(Object.assign({},t.report),{messages:Wv(u),meta:{key:Wv(a),iv:Wv(r),version:"000001"}});return Object.assign(Object.assign({},t),{report:c})})))(n))):yield Promise.all(h.map(Eb));const f={success:(t,r,o)=>{hy(e,Rv.afterReport,{report:r,reportItems:o.reportItems,nextReportItems:o.nextReportItems})},fail:(t,r,o)=>{hy(e,Rv.afterReport,{report:r,reportItems:o.reportItems,nextReportItems:o.nextReportItems,error:t})}};((e,t,r,o)=>{e.map((e=>Object.assign(Object.assign({url:t||"",type:"POST",withCredentials:!1,headers:{},data:JSON.stringify(e.report),meta:{reportItems:e.reportItems,nextReportItems:e.nextReportItems}},r),o))).forEach((e=>{(e=>{const t=new XMLHttpRequest;if(t.open(e.type||"GET",e.url,!0),t.withCredentials=e.withCredentials,t.onreadystatechange=function(){if(4===t.readyState){const r=t.status;r>=200&&r<300?e.success&&e.success(t.responseText,e.data,e.meta):e.fail&&e.fail(`Request failed, status: ${r}, responseText: ${t.responseText}`,e.data,e.meta)}},"POST"===e.type){if(e.headers)for(const r in e.headers)t.setRequestHeader(r,e.headers[r]);try{t.send(e.data)}catch(t){e.fail&&e.fail(t,e.data,e.meta)}}})(e)}))})(h,e.reportUrl,f,i)}));Xv(Tb,"commonReport");var Ob=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const Rb=(e,t,r)=>Ob(void 0,void 0,void 0,(function*(){const{idbManager:o,logManager:n}=e;if(Array.isArray(r)&&(yield o.deleteLogs(r),n.deleteLogs(r),!t))return;const i=e.logManager.filterStore(t),s=[];for(const[e,t]of i)s.push(t.id);let a=s;Array.isArray(s)||(a=[s]),yield o.deleteLogs(a),n.deleteLogs(a)})),kb=e=>Ob(void 0,void 0,void 0,(function*(){const{idbManager:t,logManager:r}=e;yield t.reset(),r.reset()}));function Db(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:Lb())("readonly",(function(t){return Pb(t.get(e))}))}function Ub(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:Lb())("readwrite",(function(r){return r.put(t,e),Pb(r.transaction)}))}function jb(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lb())("readwrite",(function(t){return e.forEach((function(e){return t.delete(e)})),Pb(t.transaction)}))}Xv(Rb,"commonDelete"),Xv(kb,"commonReset");var xb=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const Fb={default:{queue:[],isRunning:!1,listeners:[]}},Bb=e=>{let t=Fb[e];return t||(t={queue:[],isRunning:!1,listeners:[]},Fb[e]=t),t};function Hb(e){return xb(this,void 0,void 0,(function*(){const t=Bb(e),{queue:r,listeners:o}=t;for(;r.length>0&&!t.isRunning;){const o=r.shift();t.isRunning=!0;try{const e=yield o.task();o.resolution(e)}catch(e){o.rejection(e)}t.isRunning=!1,Hb(e)}o.length&&o.forEach((e=>{e()}))}))}function Wb(e,t){const r=Bb(t);return new Promise(((o,n)=>{r.queue.push({task:e,resolution:o,rejection:n}),Hb(t)}))}const $b=(e,t)=>{Bb(e).listeners.push(t)};var Gb=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const zb="change_meta",Kb="change_log",qb=()=>Promise.resolve();class Jb{constructor(e){this.waitingForReset=!1,this.isReseting=!1,this.isChangingMeta=!1,this.isChangingLog=!1,this.get=e=>Gb(this,void 0,void 0,(function*(){return yield Vb(e,this.store)})),this.getSecret=e=>Gb(this,void 0,void 0,(function*(){return yield Vb(e,this.keyStore)})),this.set=(e,t)=>Gb(this,void 0,void 0,(function*(){try{return yield Ub(e,t,this.store)}catch(r){r instanceof DOMException&&r&&"QuotaExceededError"===r.name&&(yield this.deleteOldLogsForSetNewOne(),yield this.set(e,t)),console.error(r)}})),this.setSecret=(e,t)=>Gb(this,void 0,void 0,(function*(){try{return yield Ub(e,t,this.keyStore)}catch(r){r instanceof DOMException&&r&&"QuotaExceededError"===r.name&&(yield this.deleteOldLogsForSetNewOne(),yield this.set(e,t)),console.error(r)}})),this.deleteOldLogsForSetNewOne=()=>Gb(this,void 0,void 0,(function*(){var e;const t=yield this.getAllLogs(),r=[];for(let o=0;o<13;o++){const n=null===(e=t[o])||void 0===e?void 0:e.id;(n||0===n)&&r.push(`${n}`)}jb(r,this.store)})),this.adjustMaxId=()=>Gb(this,void 0,void 0,(function*(){return this.isReseting?qb():(this.isChangingMeta=!0,yield Wb((()=>Gb(this,void 0,void 0,(function*(){var e;const t=yield this.getAllLogs(),r=t[t.length-1],o=null!==(e=null==r?void 0:r.id)&&void 0!==e?e:0;return yield this.set("maxId",o),o}))),zb))})),this.makeNextId=()=>Gb(this,void 0,void 0,(function*(){return this.isReseting?qb():(this.isChangingMeta=!0,yield Wb((()=>Gb(this,void 0,void 0,(function*(){const e=yield this.get("maxId");if(!e&&0!==e)return yield this.set("maxId",0),0;const t=e+1;return yield this.set("maxId",t),t}))),zb))})),this.addLog=e=>Gb(this,void 0,void 0,(function*(){if(this.isReseting)return qb();this.isChangingLog=!0,yield Wb((()=>Gb(this,void 0,void 0,(function*(){const{id:t}=e;this.set(`${t}`,e)}))),Kb)})),this.getAllLogs=()=>Gb(this,void 0,void 0,(function*(){const e=(yield function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Lb();return e("readonly",(function(t){if(t.getAll&&t.getAllKeys)return Promise.all([Pb(t.getAllKeys()),Pb(t.getAll())]).then((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,i=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);s=!0);}catch(e){a=!0,n=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Db(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Db(e,t):void 0}}(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.")}()}(e,2),r=t[0],o=t[1];return r.map((function(e,t){return[e,o[t]]}))}));var r=[];return e("readonly",(function(e){return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},Pb(e.transaction)}(e,(function(e){return r.push([e.key,e.value])})).then((function(){return r}))}))}))}(this.store)).filter((([e,t])=>"maxId"!==e)).sort(((e,t)=>{var r,o;return(null===(r=e[1])||void 0===r?void 0:r.id)-(null===(o=t[1])||void 0===o?void 0:o.id)})).map((([e,t])=>t));return e})),this.deleteLogs=e=>Gb(this,void 0,void 0,(function*(){if(this.isReseting)return qb();this.isChangingLog=!0,yield Wb((()=>Gb(this,void 0,void 0,(function*(){jb(e.map((e=>`${e}`)),this.store)}))),Kb),yield this.adjustMaxId()})),this.saveAESGCM256Key=(e,t,r)=>Gb(this,void 0,void 0,(function*(){if(r){const o=yield self.crypto.subtle.exportKey("raw",t),n=yield Zv(o,r,new Uint8Array(16));yield this.setSecret(`aes-gcm-256-${e}`,n)}else yield this.setSecret(`aes-gcm-256-${e}`,t)})),this.loadAESGCM256Key=(e,t)=>Gb(this,void 0,void 0,(function*(){const r=yield this.getSecret(`aes-gcm-256-${e}`);if(t){for(let e=0;eGb(this,void 0,void 0,(function*(){return this.isReseting?qb():(this.waitingForReset=!0,this.isChangingLog||this.isChangingMeta?qb():(this.isReseting=!0,yield function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Lb())("readwrite",(function(e){return e.clear(),Pb(e.transaction)}))}(this.store),this.isReseting=!1,void(this.waitingForReset=!1)))})),this.store=Mb(e,e+"-store"),this.keyStore=Mb(e+"-sec",e+"-store"),$b(zb,(()=>{this.isChangingMeta=!1,this.waitingForReset&&this.reset()})),$b(Kb,(()=>{this.isChangingLog=!1,this.waitingForReset&&this.reset()}))}}var Qb=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const Zb={databaseName:"laplace-default-db",maxSize:49283072};class Yb{constructor(e){this.commonLogWithContext=(e,t,r,o,n)=>Qb(this,void 0,void 0,(function*(){yield fy(this.runtimeMetaManager,e,t,r,o,n)})),this.commonReportWithContext=(e,t)=>Qb(this,void 0,void 0,(function*(){yield Tb(this.runtimeMetaManager,e,t)})),this.commonDeleteWithContext=e=>Qb(this,void 0,void 0,(function*(){yield Rb(this.runtimeMetaManager,e)})),this.resetWithContext=()=>Qb(this,void 0,void 0,(function*(){yield kb(this.runtimeMetaManager)})),this.initLocalAESGCM256Key=()=>Qb(this,void 0,void 0,(function*(){return yield Gv()})),this.doNotUseDirtyGetStore=()=>this.runtimeMetaManager.logManager.getStore(),this.log=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.log,wv.PLAIN,{extraProperties:r})})),this.info=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.info,wv.PLAIN,{extraProperties:r})})),this.warn=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.warn,wv.PLAIN,{extraProperties:r})})),this.debug=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.debug,wv.PLAIN,{extraProperties:r})})),this.error=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.error,wv.PLAIN,{extraProperties:r})})),this.logWithEncryption=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.log,wv.AESGCM256,{extraProperties:r})})),this.infoWithEncryption=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.info,wv.AESGCM256,{extraProperties:r})})),this.debugWithEncryption=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.debug,wv.AESGCM256,{extraProperties:r})})),this.warnWithEncryption=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.warn,wv.AESGCM256,{extraProperties:r})})),this.errorWithEncryption=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.error,wv.AESGCM256,{extraProperties:r})})),this.logWithoutCache=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.log,wv.PLAIN,{extraProperties:r,noCache:!0})})),this.infoWithoutCache=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.info,wv.PLAIN,{extraProperties:r,noCache:!0})})),this.warnWithoutCache=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.warn,wv.PLAIN,{extraProperties:r,noCache:!0})})),this.debugWithoutCache=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.debug,wv.PLAIN,{extraProperties:r,noCache:!0})})),this.errorWithoutCache=(e,t,r)=>Qb(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,Tv.error,wv.PLAIN,{extraProperties:r,noCache:!0})})),this.getLogs=e=>{const t=this.runtimeMetaManager.logManager;return t?t.filterStore(e):new Map},this.reportByHttps=(e,t)=>Qb(this,void 0,void 0,(function*(){yield this.commonReportWithContext(e,t)})),this.deleteLog=e=>Qb(this,void 0,void 0,(function*(){yield this.commonDeleteWithContext(e)})),this.deleteAll=()=>Qb(this,void 0,void 0,(function*(){yield this.resetWithContext()}));const{runtimeMetaManager:t}=e;this.runtimeMetaManager=t}}Yb.init=e=>Qb(void 0,void 0,void 0,(function*(){const{databaseName:t="laplace-default-db"}=e,r=new Jb(t),o=new py,n=new cy(Object.assign(Object.assign(Object.assign({},Zb),e),{idbManager:r,logManager:o}));hy(n,Rv.beforeInit),yield o.syncFromIDB(n.idbManager);const i=new Yb({runtimeMetaManager:n});return hy(n,Rv.afterInit),i}));class Xb extends Mv{constructor(e){super(),this.config={verbose:!1},this.beforeLog=(e,t)=>{const{verbose:r}=this.config;switch(r&&console.log("beforeLog, ","state: ",t,"meta: ",e),t.logLevel){case Tv.error:console.error(t.message);break;case Tv.warn:console.warn(t.message);break;case Tv.log:console.log(t.message);break;case Tv.debug:console.debug(t.message);break;case Tv.info:console.info(t.message)}},this.afterLog=(e,t)=>{const{verbose:r}=this.config;r&&console.log("afterLog, ","state: ",t,"meta: ",e)},this.beforeReport=(e,t)=>{const{verbose:r}=this.config;r&&console.log("beforeReport, ","store: ",t,"meta: ",e)},this.afterReport=(e,t)=>{const{verbose:r}=this.config;r&&console.log("afterReport, ","store: ",t,"meta: ",e)},e&&(this.config=e)}}const eS=e=>{const t=[];for(const[r,o]of e)t.push(o);return t};class tS extends Mv{constructor(e){super(),this.config={debug:!1},this.debugLog=e=>{const{debug:t}=this.config;t&&console.log(`[AutoCleanLogPlugin]: ${e}`)},this.afterInit=e=>{const{expireBefore:t}=this.config;if(!t)return void this.debugLog("early return on beforeInit because expireBefore is falsy");const{logManager:r,commonMethods:{commonDelete:o}}=e,n=r.getStore().byTime,i=("function"==typeof t?eS(n).filter(t):eS(n).filter((e=>e.timestampe.id));o(e,void 0,i),this.debugLog(`afterInit, clean log id: ${i}`)},this.afterReport=(e,{reportItems:t,report:r,nextReportItems:o,error:n})=>{if(n)return this.debugLog("error"),void console.error(n);const{cleanAfterReport:i}=this.config;if(!i)return void this.debugLog("early return on afterReport because cleanAfterReport is falsy");const{commonMethods:{commonDelete:s}}=e,a=("function"==typeof i?eS(t).filter(i):eS(t)).map((e=>e.id));s(e,void 0,a),this.debugLog(`afterReport, clean log id: ${a}`)},e&&(this.config=e)}}let rS=-1;const oS=e=>{addEventListener("pageshow",(t=>{t.persisted&&(rS=t.timeStamp,e(t))}),!0)},nS=()=>window.__WEB_VITALS_POLYFILL__?window.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const e=performance.timing,t=performance.navigation.type,r={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(const t in e)"navigationStart"!==t&&"toJSON"!==t&&(r[t]=Math.max(e[t]-e.navigationStart,0));return r})()):window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],iS=()=>{const e=nS();return e&&e.activationStart||0},sS=(e,t)=>{const r=nS();let o="navigate";return rS>=0?o="back-forward-cache":r&&(o=document.prerendering||iS()>0?"prerender":document.wasDiscarded?"restore":r.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:o}},aS=(e,t,r)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const o=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return o.observe(Object.assign({type:e,buffered:!0},r||{})),o}}catch(e){}},uS=(e,t,r,o)=>{let n,i;return s=>{t.value>=0&&(s||o)&&(i=t.value-(n||0),(i||void 0===n)&&(n=t.value,t.delta=i,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t)))}},cS=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},dS=e=>{const t=t=>{"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},lS=e=>{let t=!1;return r=>{t||(e(r),t=!0)}};let pS=-1;const hS=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,fS=e=>{"hidden"===document.visibilityState&&pS>-1&&(pS="visibilitychange"===e.type?e.timeStamp:0,mS())},gS=()=>{addEventListener("visibilitychange",fS,!0),addEventListener("prerenderingchange",fS,!0)},mS=()=>{removeEventListener("visibilitychange",fS,!0),removeEventListener("prerenderingchange",fS,!0)},vS=()=>(pS<0&&(window.__WEB_VITALS_POLYFILL__?(pS=window.webVitals.firstHiddenTime,pS===1/0&&gS()):(pS=hS(),gS()),oS((()=>{setTimeout((()=>{pS=hS(),gS()}),0)}))),{get firstHiddenTime(){return pS}}),yS=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},bS=(e,t)=>{t=t||{},yS((()=>{const r=[1800,3e3],o=vS();let n,i=sS("FCP");const s=aS("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(s.disconnect(),e.startTime{i=sS("FCP"),n=uS(e,i,r,t.reportAllChanges),cS((()=>{i.value=performance.now()-o.timeStamp,n(!0)}))})))}))};let SS,_S,ES,CS;const IS={passive:!0,capture:!0},AS=new Date,wS=(e,t)=>{SS||(SS=t,_S=e,ES=new Date,RS(removeEventListener),TS())},TS=()=>{if(_S>=0&&_S{if(e.cancelable){const t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?((e,t)=>{const r=()=>{wS(e,t),n()},o=()=>{n()},n=()=>{removeEventListener("pointerup",r,IS),removeEventListener("pointercancel",o,IS)};addEventListener("pointerup",r,IS),addEventListener("pointercancel",o,IS)})(t,e):wS(t,e)}},RS=e=>{["mousedown","keydown","touchstart","pointerdown"].forEach((t=>e(t,OS,IS)))},kS={},DS=e=>{document.prerendering?yS((()=>DS(e))):"complete"!==document.readyState?addEventListener("load",(()=>DS(e)),!0):setTimeout(e,0)};var PS="Expected a function",MS=/^\s+|\s+$/g,NS=/^[-+]0x[0-9a-f]+$/i,LS=/^0b[01]+$/i,VS=/^0o[0-7]+$/i,US=parseInt,jS="object"==typeof gr&&gr&&gr.Object===Object&&gr,xS="object"==typeof self&&self&&self.Object===Object&&self,FS=jS||xS||Function("return this")(),BS=Object.prototype.toString,HS=Math.max,WS=Math.min,$S=function(){return FS.Date.now()};function GS(e,t,r){var o,n,i,s,a,u,c=0,d=!1,l=!1,p=!0;if("function"!=typeof e)throw new TypeError(PS);function h(t){var r=o,i=n;return o=n=void 0,c=t,s=e.apply(i,r)}function f(e){var r=e-u;return void 0===u||r>=t||r<0||l&&e-c>=i}function g(){var e=$S();if(f(e))return m(e);a=setTimeout(g,function(e){var r=t-(e-u);return l?WS(r,i-(e-c)):r}(e))}function m(e){return a=void 0,p&&o?h(e):(o=n=void 0,s)}function v(){var e=$S(),r=f(e);if(o=arguments,n=this,u=e,r){if(void 0===a)return function(e){return c=e,a=setTimeout(g,t),d?h(e):s}(u);if(l)return a=setTimeout(g,t),h(u)}return void 0===a&&(a=setTimeout(g,t)),s}return t=KS(t)||0,zS(r)&&(d=!!r.leading,i=(l="maxWait"in r)?HS(KS(r.maxWait)||0,t):i,p="trailing"in r?!!r.trailing:p),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=u=n=a=void 0},v.flush=function(){return void 0===a?s:m($S())},v}function zS(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function KS(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==BS.call(e)}(e))return NaN;if(zS(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=zS(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(MS,"");var r=LS.test(e);return r||VS.test(e)?US(e.slice(2),r?2:8):NS.test(e)?NaN:+e}class qS extends Mv{constructor(e){super(),this.config={debug:!1,publicTags:[]},this.debugLog=e=>{const{debug:t}=this.config;t&&console.log("[AutoLogWebVitalsPlugin]:",e)},this.afterInit=e=>{const{autoReport:t,publicTags:r}=this.config,{commonMethods:{commonLog:o,commonReport:n}}=e,i=function(e,t,r){var o=!0,n=!0;if("function"!=typeof e)throw new TypeError(PS);return zS(r)&&(o="leading"in r?!!r.leading:o,n="trailing"in r?!!r.trailing:n),GS(e,t,{leading:o,maxWait:t,trailing:n})}((r=>{n(e,r,t).catch((t=>{o(e,"web vitals auto report failed",["JS_ERROR"],Tv.error,wv.PLAIN)}))}),600),s=Boolean(t),a=t=>n=>function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){const a=JSON.stringify(n),u=r?[t,"AUTO-WEB-VITALS",...r]:[t,"AUTO-WEB-VITALS"];this.debugLog(a),s?(yield o(e,a,u,Tv.info,wv.PLAIN),i(t)):o(e,a,u,Tv.info,wv.PLAIN)}));var u,c;u=a("CLS"),c=c||{},bS(lS((()=>{const e=[.1,.25];let t,r=sS("CLS",0),o=0,n=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=n[0],r=n[n.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,n.push(e)):(o=e.value,n=[e])}})),o>r.value&&(r.value=o,r.entries=n,t())},s=aS("layout-shift",i);s&&(t=uS(u,r,e,c.reportAllChanges),dS((()=>{i(s.takeRecords()),t(!0)})),oS((()=>{o=0,r=sS("CLS",0),t=uS(u,r,e,c.reportAllChanges),cS((()=>t()))})),setTimeout(t,0))}))),((e,t)=>{t=t||{},yS((()=>{const r=[100,300],o=vS();let n,i=sS("FID");const s=e=>{e.startTime{e.forEach(s)},u=aS("first-input",a);n=uS(e,i,r,t.reportAllChanges),u&&dS(lS((()=>{a(u.takeRecords()),u.disconnect()}))),window.__WEB_VITALS_POLYFILL__?(console.warn('The web-vitals "base+polyfill" build is deprecated. See: https://bit.ly/3aqzsGm'),u||window.webVitals.firstInputPolyfill(s),oS((()=>{i=sS("FID"),n=uS(e,i,r,t.reportAllChanges),window.webVitals.resetFirstInputPolyfill(),window.webVitals.firstInputPolyfill(s)}))):u&&oS((()=>{var o;i=sS("FID"),n=uS(e,i,r,t.reportAllChanges),CS=[],_S=-1,SS=null,RS(addEventListener),o=s,CS.push(o),TS()}))}))})(a("FID")),((e,t)=>{t=t||{},yS((()=>{const r=[2500,4e3],o=vS();let n,i=sS("LCP");const s=e=>{const t=e[e.length-1];if(t){const e=Math.max(t.startTime-iS(),0);e{kS[i.id]||(s(a.takeRecords()),a.disconnect(),kS[i.id]=!0,n(!0))}));["keydown","click"].forEach((e=>{addEventListener(e,o,!0)})),dS(o),oS((o=>{i=sS("LCP"),n=uS(e,i,r,t.reportAllChanges),cS((()=>{i.value=performance.now()-o.timeStamp,kS[i.id]=!0,n(!0)}))}))}}))})(a("LCP")),((e,t)=>{t=t||{};const r=[800,1800];let o=sS("TTFB"),n=uS(e,o,r,t.reportAllChanges);DS((()=>{const i=nS();if(i){const s=i.responseStart;if(s<=0||s>performance.now())return;o.value=Math.max(s-iS(),0),o.entries=[i],n(!0),oS((()=>{o=sS("TTFB",0),n=uS(e,o,r,t.reportAllChanges),n(!0)}))}}))})(a("TTFB")),bS(a("FCP"))},e&&(this.config=e),(null==e?void 0:e.publicTags)&&!Array.isArray(null==e?void 0:e.publicTags)&&(this.config.publicTags=[null==e?void 0:e.publicTags])}}var JS=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const QS=["RESOURCE_ERROR","JS_ERROR","UNHANDLED_PROMISE_REJECTION"];class ZS extends Mv{constructor(e){super(),this.config={debug:!1,publicTags:[]},this.errorCount=0,this.addPublicTags=e=>{const{publicTags:t}=this.config;return t?[...e,...t]:e},this.debugLog=e=>{const{debug:t}=this.config;t&&console.log("[AutoLogErrorPlugin]:",e)},this.ignore=e=>{var t,r,o,n,i;return void 0!==(null===(t=this.config)||void 0===t?void 0:t.maxErrorCount)&&this.errorCount>=(null===(r=this.config)||void 0===r?void 0:r.maxErrorCount)||!!(null===(o=this.config)||void 0===o?void 0:o.ignoredErrorMsgKeywords)&&e&&!(null===(i=null===(n=this.config)||void 0===n?void 0:n.ignoredErrorMsgKeywords)||void 0===i?void 0:i.find((t=>null==e?void 0:e.includes(t))))},this.afterInit=e=>{if(!self.addEventListener)return;const{commonMethods:{commonLog:t,commonReport:r}}=e,{autoReport:o}=this.config;let n;const i=()=>{o&&(n&&clearTimeout(n),n=setTimeout((()=>{r(e,QS,o).catch((r=>{t(e,"auto log error plugin report failed",this.addPublicTags(["JS_ERROR"]),Tv.error,wv.PLAIN)})),this.debugLog(`report with option: ${JSON.stringify(o)}`)}),600))};try{self.addEventListener("error",(r=>JS(this,void 0,void 0,(function*(){var o,n,s,a,u,c,d;if(!this.ignore(null==r?void 0:r.message))if((null==r?void 0:r.target)&&((null===(o=null==r?void 0:r.target)||void 0===o?void 0:o.src)||(null===(n=null==r?void 0:r.target)||void 0===n?void 0:n.href))){const o=`Load Resource Error in ${null===(s=null==r?void 0:r.target)||void 0===s?void 0:s.tagName} element: ${(null===(a=null==r?void 0:r.target)||void 0===a?void 0:a.src)||(null===(u=null==r?void 0:r.target)||void 0===u?void 0:u.href)}`;yield t(e,o,this.addPublicTags(["RESOURCE_ERROR"]),Tv.error,wv.PLAIN),this.errorCount+=1,i(),this.debugLog(o)}else{const o=`Javascript Runtime Error in ${null==r?void 0:r.filename} (${null==r?void 0:r.lineno}:${null==r?void 0:r.colno}): ${null==r?void 0:r.message}\nStack: ${null!==(d=null===(c=null==r?void 0:r.error)||void 0===c?void 0:c.stack)&&void 0!==d?d:null==r?void 0:r.stack}`;yield t(e,o,this.addPublicTags(["JS_ERROR"]),Tv.error,wv.PLAIN),this.errorCount+=1,i(),this.debugLog(r)}})))),self.addEventListener("unhandledrejection",(r=>JS(this,void 0,void 0,(function*(){var o;if(this.ignore(null===(o=null==r?void 0:r.reason)||void 0===o?void 0:o.message))return;let n="";const{reason:s}=r;n="string"==typeof s?`Promise Error: ${s}`:"object"==typeof s?`Promise Error with reason: ${JSON.stringify(s)}`:`Promise Error with unrecognized reason: ${s}`,yield t(e,n,this.addPublicTags(["UNHANDLED_PROMISE_REJECTION"]),Tv.error,wv.PLAIN),this.errorCount+=1,i(),this.debugLog(r)}))))}catch(e){console.error(e)}this.debugLog("afterInit, add listener")},e&&(this.config=e),(null==e?void 0:e.publicTags)&&!Array.isArray(null==e?void 0:e.publicTags)&&(this.config.publicTags=[null==e?void 0:e.publicTags])}}let YS,XS,e_,t_,r_;!function(e){e[e.PLAIN=0]="PLAIN",e[e.RSA=1]="RSA",e[e.AESGCM256=2]="AESGCM256"}(YS||(YS={})),function(e){e[e.info=0]="info",e[e.debug=1]="debug",e[e.log=2]="log",e[e.warn=3]="warn",e[e.error=4]="error"}(XS||(XS={})),function(e){e.AudioEncodeSuccess="init audio encode success",e.AudioDecodeSuccess="init audio decode success",e.AudioEncodeFailed="init audio encode failed",e.AudioDecodeFailed="init audio decode failed",e.DeviceAudioStreamCaptured="device audio stream captured",e.AudioCapturedForbidden="audio captured forbidden",e.AudioWorkerWebsocketBroken="audio worker websocket broken",e.AudioCaptureZeroData="audio capture zero data, auto failover",e.AudioJoinComplete="audio join complete",e.AudioLeaveComplete="audio leave complete",e.SharingAudioStartComplete="sharing audio start complete",e.SharingAudioStopComplete="sharing audio stop complete",e.AudioBridgeReconnectStart="audio bridge reconnect start",e.AudioBridgeReconnectEnd="audio bridge reconnect end",e.ChangeSpeakerError="audio change speaker error"}(e_||(e_={})),function(e){e.VideoEncodeSuccess="init video encode success",e.VideoDecodeSuccess="init video decode success",e.VideoEncodeFailed="init video encode failed",e.VideoDecodeFailed="init video decode failed",e.VBSettingSuccess="video VB setting success",e.VBSettingFailed="init video VB failed",e.VBPreloadSuccess="preload video VB success",e.VBPreloading3S="preload video VB 3s",e.VBPreloading10S="preload video VB 10s",e.UserForbiddedCaptureVideo="user forbidded capture video",e.StartCaptureVideoSuccess="start capture video success",e.StopCaptureVideoSuccess="stop capture video success"}(t_||(t_={})),function(e){e.SharingEncodeSuccess="init sharing encode success",e.SharingDecodeSuccess="init sharing decode success",e.SharingEncodeFailed="init sharing encode failed",e.SharingDecodeFailed="init sharing decode failed"}(r_||(r_={}));const o_={enable:!1,enableReport:!1,gatewayEndPoint:"",logLevel:{debug:!1,log:!1,info:!1,print:!1,warn:!1,error:!1},performanceReportRatio:.25,trackingCount:7},n_=["debug","log","info","print","warn","error"],i_=(e,t)=>[...e,...t].filter((e=>!!e));class s_{static getInstance(){return this.agentInstance||(this.agentInstance=new s_),this.agentInstance}constructor(){this.laplace=void 0,this.trackingId=void 0,this.logConfig=void 0,this.reportUrl=void 0,this.publicTags=void 0,this.initConfig=async e=>{let t,r=o_;try{e.logConfig&&(r=JSON.parse(e.logConfig),r.gatewayEndPoint&&(this.reportUrl=`${r.gatewayEndPoint}/pwa/webclient`));const{enable:o,enableReport:n,reportUrl:i,logLevel:s,encryptKeys:a,trackingId:u}=e;if(void 0!==o&&(r=ot(ot({},r),{},{enable:!!o})),void 0!==n&&(r=ot(ot({},r),{},{enableReport:!!n})),i&&(this.reportUrl=i),"string"==typeof s){const e=n_.indexOf(s),t=n_.reduce(((t,r,o)=>ot(ot({},t),{},ofunction(e){return window.crypto.subtle.importKey("raw",(new TextEncoder).encode(e.slice(0,32)),"AES-GCM",!1,["encrypt","decrypt"])}(e).then((e=>({usage:Ov.PROTECT_LOCAL_KEY,key:e}))))))}}catch(e){console.error("parse log config error",e)}const o=(new Date).getTime()-6048e5,n=r.enableReport&&this.reportUrl?{gzip:!1,encrypt:!1,additionalContext:{trackingId:this.trackingId}}:void 0;this.publicTags=["VideoSDK",this.trackingId];const i=[e.debugMode&&new Xb({verbose:!1}),new tS({debug:!1,cleanAfterReport:!0,expireBefore:o}),new qS({autoReport:n,publicTags:this.publicTags}),new ZS({autoReport:n,publicTags:this.publicTags})].filter(Boolean);return{laplaceConfig:{databaseName:"ZM-VSDK-LOG-DATABASE",maxSize:49283072,publicKey:e.logEncryptionPubKey,reportUrl:this.reportUrl,externalKeys:t,plugins:i},logConfig:r}},this.handleInitLaplaceSuccess=(e,t)=>{var r;this.laplace=e;const o=Vi.get(cs.VSDKLogTrackingId),n=JSON.parse(o?window.atob(o):"[]");(null===(r=n.length>=(null==t?void 0:t.trackingCount))||void 0===r||r)&&n.shift();const i=n.reduce(((e,t)=>ot(ot({},e),{},{[`${t}`]:!0})),{});e.deleteLog((e=>{var t;return!(null!==(t=e.tags)&&void 0!==t&&t.some((e=>i[e])))})),n.push(this.trackingId),Vi.set(cs.VSDKLogTrackingId,window.btoa(JSON.stringify(n)),Ni.LocalStorage)},this.init=async e=>{const{laplaceConfig:t,logConfig:r}=await this.initConfig(e);return r.enable?(this.logConfig=r,Yb.init(t).then((e=>{this.handleInitLaplaceSuccess(e,r)})).catch((e=>{throw{type:xc,reason:"Logger init failed.",error:e}}))):Promise.reject({type:jc,reason:"Logger feature is not enabled."})},this.check=e=>{var t,r;return!(!this.checkLaplace()||(null===(t=this.logConfig)||void 0===t||null===(r=t.logLevel)||void 0===r||!r[e])&&(console.warn(`Logger ${e} is not enabled.`),1))},this.log=(e,t,r)=>{if(this.check("log"))try{var o;return null===(o=this.laplace.logWithEncryption(e,i_(t,r)))||void 0===o?void 0:o.catch((()=>{}))}catch(e){return}},this.warn=(e,t,r)=>{if(this.check("warn"))try{var o;return null===(o=this.laplace.warnWithEncryption(e,i_(t,r)))||void 0===o?void 0:o.catch((()=>{}))}catch(e){return}},this.info=(e,t,r)=>{if(this.check("info"))try{var o;return null===(o=this.laplace.infoWithEncryption(e,i_(t,r)))||void 0===o?void 0:o.catch((()=>{}))}catch(e){return}},this.debug=(e,t,r)=>{if(this.check("debug"))try{var o;return null===(o=this.laplace.debugWithEncryption(e,i_(t,r)))||void 0===o?void 0:o.catch((()=>{}))}catch(e){return}},this.error=(e,t,r)=>{if(this.check("error"))try{var o;return null===(o=this.laplace.errorWithEncryption(e,i_(t,r)))||void 0===o?void 0:o.catch((()=>{}))}catch(e){return}},this.checkLaplace=()=>{var e;return!(null===(e=this.laplace)||void 0===e||!e.log)},this.makeLogger=e=>{var t;const r=i_(null!==(t=this.publicTags)&&void 0!==t?t:[],e);return{log:(e,t)=>this.log(e,r,null!=t?t:[]),warn:(e,t)=>this.warn(e,r,null!=t?t:[]),info:(e,t)=>this.info(e,r,null!=t?t:[]),debug:(e,t)=>this.debug(e,r,null!=t?t:[]),error:(e,t)=>this.error(e,r,null!=t?t:[])}},this.reportToGlobalTracing=(e,t)=>{var r;return this.checkLaplace()?null!==(r=this.logConfig)&&void 0!==r&&r.enableReport&&this.reportUrl?this.laplace.reportByHttps(t,{gzip:!1,encrypt:!1,xhrOptions:{url:this.reportUrl},additionalContext:{trackingId:this.trackingId}}):Promise.reject({type:jc,reason:"Please use getLogs to obtain log data and report by yourself."}):Promise.reject({type:jc,reason:"Logger has not been enabled or initialized."})},this.getLogs=(e,t)=>{if(!this.checkLaplace())return console.warn("Logger has not been enabled or initialized."),[];const r=e.getState(),{meeting:{meetingNumber:o,userId:n,userEmail:i,userName:s}}=r,a={meetingNumber:o,userId:n,userEmail:i,userName:s},u=this.laplace.getLogs(t),c=[];for(const[,e]of u)c.push(ot(ot({},e),a));return c},this.doNotUseDirtyGetStore=()=>this.checkLaplace()?this.laplace.doNotUseDirtyGetStore():(console.warn("Logger has not been enabled or initialized."),{byTag:{},byTime:new Map}),this.trackingId=Pv()}}s_.agentInstance=void 0;const a_=s_.getInstance(),u_=[{name:"joinComputerAudio",type:"Audio"},{name:"leaveComputerAudio",type:"Audio"},{name:"joinSharingAudio",type:"Audio"},{name:"leaveSharingAudio",type:"Audio"},{name:"startCaptureVideo",type:"Video"},{name:"stopCaptureVideo",type:"Video"},{name:"startDesktopSharing",type:"Sharing"},{name:"stopDesktopSharing",type:"Sharing"},{name:"pauseDesktopSharing",type:"Sharing"},{name:"resumeDesktopSharing",type:"Sharing"}],c_=function(e){const t=u_.find((t=>t.name===e));if(t){const{type:i}=t;for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;ne.name));return new Proxy(e,{get:(e,r)=>"string"==typeof r&&t.includes(r)?function(){for(var t=arguments.length,o=new Array(t),n=0;n{const{meeting:{encryptedRWC:t,encryptedGEORWC:r,discardedRwcList:o,meetingOptions:n}}=e;let i=[];return(null==n?void 0:n.isEnableGeoFenceRWC)&&r&&(null==r?void 0:r.length)>0?i=r.filter((e=>!o.includes(e.rwc))).reduce(((e,t)=>{const{dl:r,rwc:o,rwcToken:n}=t,i=e.find((e=>e.dl===r));if(i)i.items.push({rwc:o,rwcToken:n});else{const t={dl:r,items:[]};t.items.push({rwc:o,rwcToken:n}),e.push(t)}return e}),[]):t&&(i=[{dl:0,items:Object.keys(t).map((e=>({rwc:e,rwcToken:t[e]})))}]),i},f_=e=>Ge(...e.map((e=>0===e.dl?Oe(e.items):et(e.dl).pipe(Pe((()=>Oe(e.items))))))),g_=(e,t)=>e.pipe(ar(`${Fn}`),or(t),Ke((e=>{let[,t]=e;return void 0!==t.meeting.encryptedRWC||void 0!==t.meeting.encryptedGEORWC&&t.meeting.encryptedGEORWC.length>0})),Wt((e=>{let[,r]=e;const{meeting:{ts:o,auth:n,meetingNumber:i,meetingOptions:s,meetingId:a,userName:u},breakoutRoom:c}=r,d=null==s?void 0:s.isEnableGeoFenceRWC,l=h_(r);if(l.length>0){const e={serversLength:l.reduce(((e,t)=>e+t.items.length),0),pingFailedServerList:[],pingRwcServerCounts:0,retryCounts:0};let r;return d&&(r=new ne,f_(l).subscribe((e=>{var t;return null===(t=r)||void 0===t?void 0:t.next(e)}))),(d?r:f_(l)).pipe(qt((()=>{const{meeting:{meetingStatus:o}}=t.value,n=o===Di.Initial&&e.pingFailedServerList.length0;return!n&&r&&r.complete(),n})),Zt((()=>{if(e.pingRwcServerCounts=e.pingRwcServerCounts+1,d&&e.pingRwcServerCounts===e.serversLength){const o=1e3*Math.floor(5*Math.pow(2,e.retryCounts));e.retryCounts=e.retryCounts+1,p_.makeLogger(["Join Meeting Flow"]).info(`ping rwc retry,retry counts:${e.retryCounts}, ${JSON.stringify({meetingId:l_(a),meetingNumber:l_(i),userName:l_(u)})}`,["Ping RWC Retry"]),et(o).pipe(ye((()=>{const r=h_(t.value);return Object.assign(e,{serversLength:r.reduce(((e,t)=>e+t.items.length),0),pingFailedServerList:[],pingRwcServerCounts:0}),r}))).subscribe((e=>{f_(e).subscribe((e=>{r.next(e)}))}))}})),Pe((t=>{const{rwc:s,rwcToken:l}=t,p=((e,t,r,o,n,i)=>{const s={ts:o,auth:n,rwcToken:r,dmz:1};return i&&Object.assign(s,{confID:i}),`https://${e}/wc/ping/${t}?${new URLSearchParams(s).toString()}`})(s,i,l,o,n,null==c?void 0:c.currentRoom.boConfId);return Ev(p).pipe(Pe((e=>{let t={};return t=e.response?ot(ot({},e.response),{},{rwc:s,fromNginx:!1}):{rwc:s,rwg:s,rwcToken:l,fromNginx:!0},Oe([co(t),Yr()])})),vt((()=>{const{pingFailedServerList:t,serversLength:o}=e;return t.push(p),t.length===o&&(d&&r&&r.complete(),p_.makeLogger(["Join Meeting Flow"]).error(`ping rwc error, ${JSON.stringify({meetingId:l_(a),meetingNumber:l_(i),userName:l_(u)})}`,["Ping RWC Error"]),Rd(Ys,{reason:"connection error",errorCode:En})),W})))})),Ft(Zn(performance.now())))}return W})));let m_=0;const v_={meetingStatus:Di.Initial,isWindowOpen:!1,apiKey:"",signature:"",signatureType:"",lang:"en-US",tk:"",customerKey:"",mtkGuid:"",pingRWCTimestamp:0,passWord:"",meetingNumber:0,userName:"",userEmail:"",sdkUrl:"",sdkOrigin:"",proxy:1,cv:"",meetingId:"",tid:"",ts:"",auth:"",sign:"",isSupportCallOut:!1,tollNumbers:void 0,recordingEnable:!1,callOutCountry:void 0,inviteEmail:"",xmppConfig:null,isSupportH323:!1,h323GatewayInfo:"",h323Password:"",trackAuth:"",isOriginHost:!1,isWebinar:!1,encryptedRWC:void 0,meetingOptions:{},meetingTopic:"",bLock:!1,bHoldUponEntry:!1,viewOnly:0,listenOnlyPhone:0,bAllowRaiseHand:!1,bAllowAttendeeRename:!1,bBroadcast:void 0,bAllowPlayChimeForEnterOrExit:!1,bIbDisableShare:!1,bIbDisableChat:!1,bAllowShowCount:!1,encryptKey:"",bNoHostTimeOut:!1,confId:"",conId:"",e2eEncrypt:!1,zoomId:"",jid:"",xtoken:"",groups:void 0,svcUrl:"",encType:NaN,userGUID:"",userId:NaN,isHost:!1,isCoHost:!1,participantID:0,isOnHold:!1,isMeetingReset:!1,bRecord:!1,audioVideoBeforeOnHold:void 0,region:void 0,network:void 0,joinMeetingTimeStamp:0,enableAudioQos:!0,enableVideoQos:!0,activeAppInfo:void 0,recordingDisclaimerForRecorder:{},recordingDisclaimer:{},ccUrl:"",sessionIdleTimeoutMins:40,reportDomain:"",isAudioBridgeEnabled:!0,discardedRwcList:[],sharePronounType:void 0,stayAwake:!1,wrInfo:{},gatewayUserList:[],logConfig:"",logEncryptionPubKey:"",failover:{count:0,isCurrentFailoverRecorded:!1,reason:-1,interval:0,joinMeetingSuccessTimestamp:0}},y_=Zr({[`${Gn}`]:Fm(((e,t)=>{let{payload:r}=t;r.customerKey=e.customerKey||r.customerKey||"",Object.assign(e,r),e.meetingStatus=Di.Initial})),[`${zn}`]:Fm(((e,t)=>{let{payload:r}=t;e.isWindowOpen=r})),[`${Kn}`]:Fm(((e,t)=>{let{payload:r}=t;r.useSDK?e.signatureType="sdk":e.signatureType="api",e.apiKey=r.apiKey,e.signature=r.signature,e.lang=r.language})),[`${qn}`]:Fm(((e,t)=>{let{payload:r}=t;e.ztk=r})),[`${Jn}`]:Fm(((e,t)=>{let{payload:r}=t;e.zsk=r})),[`${Qn}`]:Fm(((e,t)=>{let{payload:r}=t;e.tk=r.tk,e.mtkGuid=r.mtkGuid})),[`${Zn}`]:Fm(((e,t)=>{let{payload:r}=t;e.pingRWCTimestamp=r})),[`${Yn}`]:Fm(((e,t)=>{let{payload:r}=t;e.confId=r.confID,e.conId=r.conID,e.e2eEncrypt=r.e2eEncrypt,e.meetingNumber=parseInt(r.mn,10),e.zoomId=r.zoomID,e.meetingStatus=Di.Joined,e.jid=r.jid,e.xtoken=r.xtoken,e.groups=r.groups,e.svcUrl=r.svcUrl,e.encType=r.encType,e.userGUID=r.userGUID,e.userId=r.userID,e.role=r.role,e.participantID=r.participantID,e.reportDomain=r.reportDomain})),[`${Xn}`]:Fm(((e,t)=>{let{payload:r}=t;if(r.gatewayUser){var o;const{userId:t,sn:i}=r.gatewayUser,s=null===(o=e.gatewayUserList)||void 0===o?void 0:o.find((e=>e.userId===t));var n;s?s.sn=i:null===(n=e.gatewayUserList)||void 0===n||n.push(r.gatewayUser)}else Object.assign(e,r)})),[`${ti}`]:Fm(((e,t)=>{let{payload:r}=t;e.isHost=r})),[`${ri}`]:Fm(((e,t)=>{let{payload:r}=t;e.isCoHost=r})),[`${oi}`]:Fm(((e,t)=>{let{payload:r}=t;e.isOnHold=r})),[`${ni}`]:Fm(((e,t)=>{let{payload:r}=t;e.isMeetingReset=r})),[`${ii}`]:Fm(((e,t)=>{let{payload:r}=t;e.audioVideoBeforeOnHold=r})),[`${si}`]:Fm(((e,t)=>{let{payload:r}=t;e.currentUserAudioBeforeReset=r})),[`${ai}`]:Fm(((e,t)=>{let{payload:r}=t;e.isCurrentUserMutedBeforeReset=r})),[`${ui}`]:Fm(((e,t)=>{let{payload:r}=t;e.meetingStatus=r})),[`${ci}`]:Fm(((e,t)=>{let{payload:r}=t;e.region=r.region,e.network=r.network})),[`${di}`]:Fm(((e,t)=>{let{payload:r}=t;e.isCurrentUserStartVideoBeforeReset=r})),[`${li}`]:Fm(((e,t)=>{let{payload:r}=t;e.joinMeetingTimeStamp=r})),[`${pi}`]:Fm(((e,t)=>{let{payload:r}=t;e.enableAudioQos=r.audioQos,e.enableVideoQos=r.videoQos})),[`${hi}`]:Fm(((e,t)=>{let{payload:r}=t;e.activeAppInfo=r})),[`${fi}`]:Fm(((e,t)=>{let{payload:r}=t;e.idleStartTime=r})),[`${gi}`]:Fm(((e,t)=>{let{payload:r}=t;e.sessionIdleTimeoutMins=r})),[`${mi}`]:Fm(((e,t)=>{let{payload:r}=t;e.isAudioBridgeEnabled=r})),[`${vi}`]:Fm(((e,t)=>{var r,o;let{payload:n}=t;const i=null===(r=e.encryptedGEORWC)||void 0===r||null===(o=r.find((e=>e.rwc===n)))||void 0===o?void 0:o.dc;if(i){var s;const t=null===(s=e.encryptedGEORWC)||void 0===s?void 0:s.filter((e=>e.dc===i));t&&e.discardedRwcList.some((e=>(null==t?void 0:t.findIndex((t=>t.rwc===e)))>=0))&&e.discardedRwcList.push(...t.map((e=>e.rwc))),e.discardedRwcList.push(n)}})),[`${yi}`]:Fm(((e,t)=>{let{payload:r}=t;e.sharePronounType=r})),[`${bi}`]:Fm(((e,t)=>{let{payload:r}=t;e.stayAwake=r})),[`${Si}`]:Fm(((e,t)=>{let{payload:r}=t;e.failover.joinMeetingSuccessTimestamp=r})),[`${_i}`]:Fm((e=>{Object.assign(e.failover,ot(ot({},v_.failover),{},{count:e.failover.count,joinMeetingSuccessTimestamp:e.failover.joinMeetingSuccessTimestamp}))})),[`${Ei}`]:Fm(((e,t)=>{let{payload:r}=t;const{count:o,reason:n,interval:i}=r;e.failover.count=o,e.failover.reason=n,e.failover.interval=i,e.failover.isCurrentFailoverRecorded=!0})),[`${ei}`]:(e,t)=>{let{payload:r}=t;const{isFailover:o}=r,n={isMeetingReset:!0,apiKey:e.apiKey,signatureType:e.signatureType,signature:e.signature,lang:e.lang,proxy:1,stayAwake:e.stayAwake};return o&&Object.assign(n,{currentUserAudioBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.audio:r.audio,isCurrentUserMutedBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.muted:r.muted,isCurrentUserStartVideoBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.video:r.video,meetingNumber:e.meetingNumber,userName:e.userName,passWord:e.passWord,userEmail:e.userEmail,sdkUrl:e.sdkUrl,sdkOrigin:e.sdkOrigin,cv:e.cv,zsk:e.zsk,ztk:e.ztk,idleStartTime:e.idleStartTime,sessionIdleTimeoutMins:e.sessionIdleTimeoutMins,customerKey:e.customerKey,failover:e.failover}),ot(ot({},v_),n)}},v_),b_=Ro(Gm,ov,tv,Xm,{meetingInfoEpic:(e,t)=>e.pipe(ar(`${xn}`),Wt((e=>{const r=Object.assign({},e.payload,{password:an(e.payload.password),topic:an(e.payload.topic)}),{videoSDKUrl:o}={meetingSDKUrl:`https://${wg}/api/v1/wc/info`,videoSDKUrl:`https://${wg}/wc/lsdk`};return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"zoomsdkjsonpcallback";return new R((o=>{m_++;const n=`${r}${m_}`,i=document.createElement("script");Object.keys(t).forEach((e=>(void 0===t[e]||null===t[e])&&delete t[e])),i.src=`${e}?${new URLSearchParams(Object.assign(t,{callback:n})).toString()}`,i.async=!0,i.onerror=e=>o.error(e),document.getElementsByTagName("head")[0].appendChild(i),window[n]=e=>{i.parentNode&&i.parentNode.removeChild(i),delete window[n],o.next(e),o.complete()}}))}(o,r).pipe(vt((e=>Q({status:!1,result:e.toString(),errorCode:En}))),Pe((r=>{const[o,n]=Qe(Q(r),(e=>!0===e.status&&void 0!==e.result));return n.subscribe((e=>{e.state||(3e3===e.errorCode&&"Meeting password is incorrect"===e.errorMessage?Rd(Ys,Nn(3004)):3e3===e.errorCode&&"The role type error"===e.errorMessage?Rd(Ys,Nn(3010)):e.errorCode===En?Rd(Ys,{reason:"connection error"}):3e3===e.errorCode?Rd(Ys,{reason:e.errorMessage,errorCode:On}):300===e.errorCode?Rd(Ys,{reason:"This account does not exist or does not belong to you",errorCode:On}):124===e.errorCode&&"Parse lite sdk topic and pwd fail"===e.errorMessage?Rd(Ys,{reason:"Parse topic and pwd fail",errorCode:On}):124===e.errorCode&&"The java web token is expired or more than 2 days or ineffective."===e.errorMessage?Rd(Ys,{reason:"The token is expired or more than 2 days or ineffective.",errorCode:On}):124===e.errorCode&&Rd(Ys,{reason:"Verify JWT failed",errorCode:On}))})),o.pipe(gg((r=>{if(!0===r.status){const{result:{mid:o,websdkClientFeatureOptions:n}}=r;Vi.init(o);const i=((e,t)=>{if(e.result){const{result:{mn:r,ts:o,auth:n,track_auth:i,mid:s,tid:a,encryptedRWC:u,encryptedGEORWC:c,user_identity:d,meetingOptions:l,can_recording:p,wcXMPPConfig:h,call_out_country_json:f,isOriginalHost:g,support_call_out:m,liveTranscription:v,logConfig:y,logEncryptionPubKey:b}}=e,{lang:S,password:_,topic:E,zlk:C,cv:I,userName:A}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:o,auth:n,passWord:_,trackAuth:i,customerKey:d,encryptedRWC:JSON.parse(u||"{}"),encryptedGEORWC:JSON.parse(c||"{}"),meetingOptions:JSON.parse(l||"{}"),recordingEnable:"1"===p,topic:E,userName:Vi.get(us.WebclientUserName)||A,cv:I,zlkJwtToken:C,xmppConfig:JSON.parse(h||"{}"),callOutCountry:JSON.parse(f||"{}"),lang:S,isOriginHost:g,isSupportCallOut:"1"===m,liveTranscription:JSON.parse(v||"{}"),logConfig:y,logEncryptionPubKey:b}}return e})(r,e.payload),s=[Q(Gn(i)),To(g_,t,Fn())],a=((e,t)=>{const r=[];if(e){const t=e.split("").reverse();Object.keys(Pi).filter((e=>/M:\d(,\d)*;V:\d(,\d)*/.test(Pi[e]))).forEach((e=>{const o=Pi[e];let[n,i]=o.split(";");n.startsWith("V:")&&([n,i]=[i,n]);const s=i.slice(2).split(",").map((e=>t[Number(e)-1])).reverse().join(""),a=parseInt(s,16),u=hg[o];if(u){const e=(a&u.mask)>0;r.push(Q(u.action(e)))}}))}return r})(n);return a.length>0&&s.unshift(...a),Ve(...s)}})))})))}))),pingRWCEpic:g_});var S_={exports:{}};S_.exports=function(){function e(e){for(var t=1;tt){const e=Ui(),b=r[t],S={dn2:an(o),auth:n,browser:e,trackAuth:i,mid:s,tid:u,lang:c,ts:d,"ZM-CID":y,_ZM_MTG_TRACK_ID:v||"",customer_key:an(a),cfs:0};b.rwcAuth?Object.assign(S,{rwcAuth:b.rwcAuth}):b.rwcToken&&Object.assign(S,{rwcToken:b.rwcToken});const _=Xi()?1:xi()||Zi()?2:0;Object.assign(S,{as_type:_}),[{key:A_,queryKey:"opt"},{key:w_,queryKey:"participantID"},{key:T_,queryKey:"zoomid"}].forEach((e=>{const t=Vi.get(e.key);void 0!==t&&(S[e.queryKey]=t)})),l&&p&&h&&Object.assign(S,{bid:an(l),botk:p,confID:h}),Vi.get(R_)&&Object.assign(S,{isdj:1}),qi()&&(Object.assign(S,{from:Ki()?"android":"ios"}),f&&Object.assign(S,{useABAudio:1})),Object.assign(S,{clientCaps:P_()});const E=g?m.length>0?1:0:1;return Object.assign(S,{isCamera:E}),{queryObject:ot({},S),rwgServer:b}}return null}function P_(){let e=Il.WebCameraIndication|Il.SendMeetingTokenSeparately;const t=Ws.getPTZCapability();return(t.pan||t.tilt||t.zoom)&&(e|=Il.SupportFarEndCameraControl),Ws.isSupportVideoShare()&&(e|=Il.SupportVideoShare),e|=Il.UnifyErrorType,e}const M_=Ls.createAgent();let N_;var L_=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(ar(`${Yr}`),or(t),Ke((e=>{let[,t]=e;return t.socket.zoomSocketStatus===Cl.Closed})),Wt((e=>{let[,t]=e;const{socket:{retryCount:r,rwgServerList:o},meeting:n,breakoutRoom:i,video:{cameraDevicesList:s}}=t;let a,u=ot(ot({},n),{},{retryCount:r,rwgServerList:o,cameraDevicesList:s});if(i&&i.currentRoom.status===dl.Joining){const{currentRoom:{boId:e,boConfId:t,boToken:r}}=i;u=ot(ot({},u),{},{bid:e,botk:r,confID:t})}if(a=n.zlkJwtToken?function(e){const t=D_(e);if(t){const{queryObject:r,rwgServer:o}=t,{topic:n,cv:i,zlkJwtToken:s,meetingNumber:a,passWord:u}=e;return Object.assign(r,{topic:an(n),iccv:i,zlkJwtToken:s}),""!==u&&Object.assign(r,{mpwd:an(u)}),`wss://${o.rwg}/instantsdk/${a}?${new URLSearchParams(r).toString()}`}return null}(u):function(e){const t=D_(e);if(t){const{queryObject:r,rwgServer:o}=t,{signatureType:n,userEmail:i,ztk:s,tk:a,cv:u,zsk:c,sign:d,meetingNumber:l,isHost:p,isOriginHost:h,passWord:f}=e;return Object.assign(r,{signType:n,email:i,zak:s||"",tk:a||"",jscv:u}),p&&h||""===f||Object.assign(r,{mpwd:f}),sessionStorage.getItem(us.WebclientZsk)||c?Object.assign(r,{zak:c}):Object.assign(r,{sign:d}),[{key:I_,queryKey:"cfs"},{key:O_,queryKey:"tk"}].forEach((e=>{const t=Vi.get(e.key);void 0!==t&&(r[e.queryKey]=t)})),`wss://${o.rwg}/wc/api/${l}?${new URLSearchParams(r).toString()}`}return null}(u),a){const e=(c=a,M_.connect(c),N_=new N,Be((e=>M_.on(Ms.Message,e)),(e=>M_.off(Ms.Message,e)),(e=>e.data)).subscribe(N_),N_);return Ge(e.pipe(Ke((e=>"string"==typeof e)),ye((e=>{try{return JSON.parse(e)}catch(e){return console.error(e),{evt:0}}})),_g(),fg((e=>{if(0!==e.evt||!e.body||"invalid parameters!"!==e.body.test)return ro(e);Rd(Ys,Nn(Rn.INVALID_PARAMETER))})),Ft(uo({status:Cl.Connecting,rwgUrl:a}))),e.pipe(Ke((e=>e instanceof ArrayBuffer)),ye((e=>oo(e)))))}var c;return W}))),connectedZoomSocketEpic:(e,t)=>e.pipe(ar(`${Yr}`),or(t),Ke((e=>{let[,t]=e;return t.socket.zoomSocketStatus===Cl.Closed})),Wt((()=>{const[e,r,o]=[Ms.Open,Ms.Close,Ms.Error].map((e=>Be((t=>M_.on(e,t)),(t=>M_.on(e,t)))));return Ge(e.pipe(Pe((()=>Ge(Q(uo({status:Cl.Connected})),et(6e4).pipe(or(t),Ke((e=>{let[,t]=e;return t.meeting.meetingStatus===Di.Initial&&!t.meeting.isMeetingReset})),ye((()=>(Rd(Xs,{reason:Ai.Failover}),Bn(Mi.NoHeartbeat))))))))),r.pipe(or(t),Ke((e=>{let[,t]=e;return t.socket.zoomSocketStatus!==Cl.Closed&&t.meeting.meetingStatus===Di.Joined&&!t.meeting.isMeetingReset})),ye((()=>(Rd(Xs,{reason:Ai.Failover}),Bn(Mi.Disconnect))))),o.pipe(or(t),Pe((e=>{let[,r]=e;const{meeting:{meetingStatus:o,isMeetingReset:n},socket:{rwgServerList:i,retryCount:s}}=r,a=[];if(o===Di.Initial&&null!=i&&i.length){const e=i[s];return et(5e3).pipe(Ke((()=>t.value.meeting.meetingStatus===Di.Initial)),Pe((()=>{const{socket:{rwgServerList:e,retryCount:r}}=t.value,o=[];return e.length>r+1?o.push(lo(r+1),eo({retry:!0})):(Rd(Ys,{reason:"connection error",errorCode:En}),o.push(...lg(t.value))),Oe(o)})),Ft(vi(null==e?void 0:e.rwc)))}return n||o!==Di.Joined||(Rd(Xs,{reason:Ai.Failover}),a.push(Bn(Mi.OnError))),Oe(a)}))))}))),disconnectZoomSocketEpic:(e,t)=>e.pipe(ar(`${eo}`),Wt((e=>e.payload&&e.payload.retry?Q(Yr()).pipe(_t(1e3),Ft(uo({status:Cl.Closed}))):Q(uo({status:Cl.Closed})))),_t(100),Zt((()=>{var e;t.value.socket.zoomSocketStatus===Cl.Closed&&(M_.close(),null===(e=N_)||void 0===e||e.complete())})))});const V_=Ym.getInstance();let U_;var j_=Object.freeze({__proto__:null,connectXmppSocketEpic:(e,t)=>e.pipe(ar(`${Xr}`),or(t),Ke((e=>{let[,t]=e;return"closed"===t.socket.xmppSocketStatus})),Wt((e=>{let[,t]=e;const{meeting:{svcUrl:r,meetingNumber:o,conId:n}}=t,i=function(e,t,r){return`wss://${e}/wc/media/${t}?type=x&cid=${r}`}(r,o,n);return(e=>(V_.connect(e),U_=new N,Be((e=>V_.on(Jm.Message,e)),(e=>V_.off(Jm.Message,e))).subscribe(U_),U_))(i).pipe(Ke((e=>void 0!==(null==e?void 0:e.evt))),ye((e=>no(e))),Ft(po(Cl.Connecting)))}))),connectedXmppSocketEpic:(e,t)=>e.pipe(ar(`${Xr}`),Wt((()=>{const[e,r,o]=[Jm.Open,Jm.Close,Jm.Error].map((e=>Be((t=>V_.on(e,t)),(t=>V_.on(e,t)))));return Ge(e.pipe(Zt((()=>{const e=Zi()&&Yi()?11:10;V_.join(e)})),kt(po(Cl.Connected))),r.pipe(_t(1e3),or(t),Ke((e=>{let[,t]=e;return"closed"!==t.socket.xmppSocketStatus&&t.meeting.meetingStatus===Di.Joined&&!t.meeting.isMeetingReset})),ye((()=>(Rd(Xs,{reason:Ai.Failover}),Bn(Mi.DisconnectXmpp))))),o.pipe(_t(1e3),or(t),Ke((e=>{let[,t]=e;return"closed"!==t.socket.xmppSocketStatus&&t.meeting.meetingStatus===Di.Joined&&!t.meeting.isMeetingReset})),ye((()=>(Rd(Xs,{reason:Ai.Failover}),Bn(Mi.OnError))))))}))),disconnectCmdChannelSocketEpic:e=>e.pipe(ar(`${to}`),kt(po(Cl.Closed)),_t(100),Zt((()=>{var e;V_.close(),null===(e=U_)||void 0===e||e.complete()})))});const x_=Vs.getInstance();let F_;var B_=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(ar(`${io}`),or(t),Ke((e=>{let[,t]=e;return"closed"===t.socket.mainSessionSocketStatus})),Wt((e=>{let[,t]=e;const{meeting:{svcUrl:r,meetingNumber:o,conId:n}}=t,i=function(e,t,r){return`wss://${e}/wc/media/${t}?type=m&cid=${r}&mode=2`}(r,o,n);return(e=>(x_.connect(e),F_=new N,Be((e=>x_.on(Ms.Message,e)),(e=>x_.off(Ms.Message,e))).pipe(ye((e=>e.data))).subscribe(F_),F_))(i).pipe(ye((e=>{try{return JSON.parse(e)}catch(e){return console.error(e),{evt:0}}})),Ke((e=>0!==e.evt)),_g(),ye((e=>ao(e))),Ft(ho(Cl.Connecting)))}))),connectedMainSessionSocketEpic:(e,t)=>e.pipe(ar(`${io}`),Wt((()=>{const[e,r,o]=[Ms.Open,Ms.Close,Ms.Error].map((e=>Be((t=>x_.on(e,t)),(t=>x_.on(e,t)))));return Ge(e.pipe(kt(ho(Cl.Connected))),r.pipe(or(t),Ke((e=>{let[,t]=e;return"closed"!==t.socket.zoomSocketStatus&&t.meeting.meetingStatus===Di.Joined})),ye((()=>(Rd(Xs,{reason:Ai.Failover}),Bn(Mi.DisconnectMChannel))))),o.pipe(ye((()=>(Rd(Xs,{reason:Ai.Failover}),Bn(Mi.OnErrorMChannel))))))}))),disconnectMainSessionSocketEpic:e=>e.pipe(ar(`${so}`),kt(ho(Cl.Closed)),Zt((()=>{var e;x_.close(),null===(e=F_)||void 0===e||e.complete()})))});const H_={zoomSocketStatus:Cl.Closed,xmppSocketStatus:Cl.Closed,mainSessionSocketStatus:Cl.Closed,retryCount:0,rwgServerList:[]},W_=Zr({[`${uo}`]:Fm(((e,t)=>{let{payload:r}=t;e.zoomSocketStatus=r.status})),[`${co}`]:Fm(((e,t)=>{let{payload:r}=t;const{rwgServerList:o}=e;o.find((e=>e.rwg===r.rwg))||o.push(r)})),[`${lo}`]:Fm(((e,t)=>{let{payload:r}=t;e.retryCount=r})),[`${po}`]:Fm(((e,t)=>{let{payload:r}=t;e.xmppSocketStatus=r})),[`${ho}`]:Fm(((e,t)=>{let{payload:r}=t;e.mainSessionSocketStatus=r})),[`${fo}`]:()=>H_},H_),$_=Ro(L_,j_,B_),G_={id:"userId",type:e=>nl(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>({userRole:e,isHost:ol(e)}),dn2:e=>({displayName:un(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest",bCapsRequestLT:"isRequestLT"},z_=e=>{const t={};return["add","remove","update"].forEach((r=>{null!==e[r]&&void 0!==e[r]&&(t[r]=e[r].reduce(((e,t)=>{const r=Object.keys(t).reduce(((e,r)=>{const o=G_[r];return"function"==typeof o?Object.assign(e,o(t[r])):"string"==typeof o?e[o]=t[r]:e[r]=t[r],e}),{}),o=e.find((e=>e.userId===r.userId));return void 0!==o?Object.assign(o,r):e.push(r),e}),[]))})),t},K_={name:"displayName",node:e=>({userId:Number(e)}),role:e=>({userRole:Number(e)})},q_=e=>Object.keys(e).reduce(((t,r)=>{const o=K_[r];return"function"==typeof o?Object.assign(t,o(e[r])):"string"==typeof o?t[o]=e[r]:t[r]=e[r],t}),{});var J_=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>ko(e,ms).pipe(ye((e=>z_(e.payload.body))),or(t),Pe((e=>{let[t,r]=e,o=[Nd(t)];const{meeting:{userId:n,isWebinar:i,isOnHold:s,customerKey:a},participants:{attendeesList:u,failoverAttendeesList:c,allowTalkAttendeesList:d}}=r,l=d.map((e=>e.userId));if(t.add){const e=t.add.find((e=>e.userId===n));void 0!==e&&(void 0!==e.bHold&&o.push(oi(e.bHold)),a&&(o.push(Gd({userId:n,key:"userIdentity",value:a})),Object.assign(e,{userIdentity:a})),Rd($s,e));const r=t.add.filter((e=>e.userId!==n));if(r.length>0){const e=r.filter((e=>!il(e.userRole))).map((e=>{const t=c.find((t=>t.zoomID===e.zoomID));return t?ot(ot({},e),{},{source:t.isOnHold?"on hold":"failover"}):e})),t=e.filter((e=>!!e.source)).map((e=>({zoomID:e.zoomID})));if(o.push(xd(t)),Rd(zs,e),i){const e=r.filter((e=>il(e.userRole)));e.length>0&&Rd(Js,e.map((e=>({userId:e.userId,isAllowToTalk:!0}))))}}}if(t.update){const e=t.update.find((e=>e.userId===n));void 0!==e&&(Rd(Gs,e),void 0!==e.bHold&&o.push(oi(e.bHold)));const r=t.update.filter((e=>!(e.userId===n||l.includes(e.userId))));if(r.length>0&&Rd(Ks,r),i){const e=t.update.filter((e=>e.userId!==n&&l.includes(e.userId)));e.length>0&&Rd(Js,e)}}if(t.remove){const e=t.remove.map((e=>{const t=u.find((t=>t.userId===e.userId));return t?2===e.action&&1===e.nUserStatus?t.bHold?(o.push(jd({zoomID:t.zoomID,isOnHold:!0})),ot(ot(ot({},e),t),{},{reason:"on hold"})):(o.push(jd({zoomID:t.zoomID,isOnHold:!1})),ot(ot(ot({},e),t),{},{reason:"failover"})):ot(ot({},e),t):null})).filter((e=>!!e));if(Rd(qs,e),i){const e=t.remove.filter((e=>l.includes(e.userId)));e.length>0&&Rd(Js,e.map((e=>({userId:e.userId,isAllowToTalk:!1}))))}}const p=o.filter((e=>e.type===`${oi}`));if(p.length>0){const e=p[p.length-1];o=o.filter((e=>e.type!==`${oi}`)),e.payload!==s&&(o.push(e),Rd(ta,!s))}return Oe(o)}))),receiveUserListFromXMPPEpic:(e,t)=>Po(e,24595).pipe(Pe((e=>{const{payload:{body:{action:r,data:o}}}=e,{meeting:{jid:n},participants:{xmppAttendeeList:i}}=t.value,s=[];if(r===Km.rename){o.forEach((e=>{s.push(Hd(e))}));const e=o.map((e=>q_(e)));Rd(Js,e)}if(r===Km.Remove){o.forEach((e=>{s.push(Wd(e))}));const e=o.map((e=>ot(ot({},q_(e)),{},{removed:!0})));Rd(Qs,e)}if([Km.Add,Km.List,Km.update].includes(r)){const e=o.map((e=>{const t=q_(e);return Object.keys(t).reduce(((e,r)=>(""!==t[r]&&Object.assign(e,{[r]:t[r]}),e)),{})}));if(Rd(Js,e),s.push($d(e)),r===Km.update){const e=o.find((e=>e.jid===n));if(e&&void 0!==e.bRaiseHand){const t=i.find((e=>e.jid===n));(null==t?void 0:t.bRaiseHand)!==e.bRaiseHand&&Rd("MEETING_WEBINAR_ATTENDEE_RAISE_HAND",{bRaiseHand:e.bRaiseHand})}}}return Oe(s)}))),handleAdmitAllSilentUsersEpic:e=>ko(e,7951).pipe(Zt((e=>{!1===e.payload.body.bStarted&&Rd("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)})),ye((e=>Vd(e.payload.body.bStarted)))),handleKVUpdateIndicationEpic:e=>ko(e,7946).pipe(Ke((e=>{var t;return["bRaiseHand","feedback"].includes(null===(t=e.payload.body)||void 0===t?void 0:t.key)&&0===e.payload.body.value})),ye((e=>(Rd(Ks,{}),"bRaiseHand"===e.payload.body.key?Fd():Bd()))))});const Q_={attendeesList:[],assistantList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},Z_=Zr({[`${Nd}`]:Fm(((e,t)=>{let{payload:r}=t;void 0!==r.add&&r.add.length>0&&r.add.forEach((t=>{if(t.userType===rl.Assitant){const r=e.assistantList.find((e=>e.userId===t.userId));void 0!==r?Object.assign(r,t):e.assistantList.push(t)}else if(il(t.userRole)){const r=e.allowTalkAttendeesList.find((e=>e.userId===t.userId));void 0!==r?Object.assign(r,t):e.allowTalkAttendeesList.push(t)}else{const r=e.attendeesList.find((e=>e.userId===t.userId));void 0!==r?Object.assign(r,t):e.attendeesList.push(t)}})),void 0!==r.update&&r.update.length>0&&r.update.forEach((t=>{const r=e.attendeesList.find((e=>e.userId===t.userId));if(void 0!==r)Object.assign(r,t);else{const r=e.allowTalkAttendeesList.find((e=>e.userId===t.userId));if(void 0!==r)Object.assign(r,t);else{const r=e.assistantList.find((e=>e.userId===t.userId));void 0!==r&&Object.assign(r,t)}}})),void 0!==r.remove&&r.remove.length>0&&r.remove.forEach((t=>{const r=e.attendeesList.findIndex((e=>e.userId===t.userId));if(-1!==r)e.attendeesList.splice(r,1);else{const r=e.allowTalkAttendeesList.findIndex((e=>e.userId===t.userId));if(-1!==r)e.allowTalkAttendeesList.splice(r,1);else{const r=e.assistantList.findIndex((e=>e.userId===t.userId));-1!==r&&e.assistantList.splice(r,1)}}}))})),[`${$d}`]:Fm(((e,t)=>{let{payload:r}=t;const{xmppAttendeeList:o}=e,n=o.map((e=>e.jid));r.forEach((e=>{const{jid:t}=e,r=n.indexOf(t);-1!==r?Object.assign(o[r],e):o.push(e)}))})),[`${Vd}`]:Fm(((e,t)=>{let{payload:r}=t;e.isAdmitAllSilentUsers=r})),[`${Fd}`]:Fm((e=>{e.attendeesList.forEach((e=>{e.bRaiseHand&&(e.bRaiseHand=!1)}))})),[`${Bd}`]:Fm((e=>{e.attendeesList.forEach((e=>{e.feedback>0&&(e.feedback=0)}))})),[`${jd}`]:Fm(((e,t)=>{let{payload:r}=t;e.failoverAttendeesList.push(r)})),[`${xd}`]:Fm(((e,t)=>{let{payload:r}=t;r.forEach((t=>{const r=e.failoverAttendeesList.findIndex((e=>e.zoomID===t.zoomID));-1!==r&&e.failoverAttendeesList.splice(r,1)}))})),[`${Hd}`]:Fm(((e,t)=>{let{payload:r}=t;const{jid:o,name:n}=r,i=e.xmppAttendeeList.find((e=>e.jid===o));i&&(i.displayName=n)})),[`${Wd}`]:Fm(((e,t)=>{let{payload:r}=t;const{jid:o}=r,n=e.xmppAttendeeList.findIndex((e=>e.jid===o));-1!==o&&e.xmppAttendeeList.splice(n,1)})),[`${Gd}`]:Fm(((e,t)=>{let{payload:r}=t;const{userId:o,key:n,value:i}=r,s=e.attendeesList.find((e=>e.userId===o));s&&(s[`${n}`]=i)})),[`${Ud}`]:()=>Q_},Q_),Y_=Ro(J_),X_={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0,fileWithVersion:!1,enforceMultipleVideos:!1,enforceVirtualBackground:!1},eE=Zr({[`${yo}`]:Fm(((e,t)=>{let{payload:r}=t;e.audioDecodeStatus=r})),[`${vo}`]:Fm(((e,t)=>{let{payload:r}=t;e.audioEncodeStatus=r})),[`${Eo}`]:Fm(((e,t)=>{let{payload:r}=t;e.sharingDecodeStatus=r})),[`${_o}`]:Fm(((e,t)=>{let{payload:r}=t;e.sharingEncodeStatus=r})),[`${So}`]:Fm(((e,t)=>{let{payload:r}=t;e.videoDecodeStatus=r})),[`${bo}`]:Fm(((e,t)=>{let{payload:r}=t;e.videoEncodeStatus=r})),[`${Co}`]:Fm(((e,t)=>{let{payload:r}=t;e.mediaConstraints=r.mediaConstraints,e.assetsPath=r.assetsPath,e.fileWithVersion=r.fileWithVersion,e.enforceMultipleVideos=r.enforceMultipleVideos,e.enforceVirtualBackground=r.enforceVirtualBackground})),[`${Io}`]:Fm(((e,t)=>{let{payload:r}=t;const{type:o,encrypeKey:n,additionalType:i}=r,s={encrypeKey:n,additionalType:i};"audio"===o?e.audioEncrypt=s:"video"===o?e.videoEncrypt=s:"sharing"===o&&(e.sharingEncrypt=s)})),[`${Ao}`]:Fm(((e,t)=>{let{payload:r}=t;e.isEnableDecoderInWorklet=r})),[`${wo}`]:e=>ot(ot({},X_),{},{mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath,fileWithVersion:e.fileWithVersion,enforceMultipleVideos:e.enforceMultipleVideos,enforceVirtualBackground:e.enforceVirtualBackground})},X_);var tE={exports:{}},rE={};function oE(e,t,r,o){const{meeting:{userId:n},audio:{localShareAudioUserMutedList:i},share:{isReceiveSharingFromMainSession:s}}=o;return i.filter((e=>e.userId!==t)).forEach((t=>{e.setSharingAudioVolume(t.userId,!0,t.isFromMainSession)})),e.setSharingAudioVolume(t,r,!!s),t===n?Zl(r):ql({userId:t,muted:r})}function nE(e,t,r){const{audio:{audioSsrc:o,activeMicrophone:n,activeSpeaker:i,isAllowToTalk:s,isSpeakerOnly:a},meeting:{svcUrl:u,conId:c,reportDomain:d,isAudioBridgeEnabled:l}}=t,p=hl(t),h=a||sl(p.userRole)&&!s,f=null!=r?r:!h;return Ug()&&!l&&console.warn("Cannot start audio due to the service is not ready."),e.joinComputerAudio(o,n,i,f,Ug()?{rwgHost:u,cid:c,nginxHost:d}:void 0)}async function iE(e,t,r){const o=[],{audio:{isJoinComputerAudioBeforeSharingAudio:n,mutedBeforeSharingAudio:i}}=r,s=hl(r);return!0===n&&(await nE(e,r),o.push(Jl(void 0)),!1===i&&(o.push(Dl(!0)),t.mute(s.userId,!1)),o.push(zl(void 0))),o}async function sE(e,t,r){const{audio:{isSharingAudio:o},meeting:{userId:n}}=r,i=[];if(i.push(oE(e,n,!0,r)),o){await e.leaveSharingAudio(!1),i.push(Yl(!1));const o=await iE(e,t,r);i.push(...o),setTimeout((()=>{Rd(uc,{state:"off"})}),0)}return i.push(Ql(!1)),i}async function aE(e,t,r){const{audio:{audioSsrc:o,activeMicrophone:n,activeSpeaker:i}}=r,s=hl(r),a=await async function(e,t){const r=[],o=hl(t),{audio:{isMicrophoneForbidden:n}}=t;return"computer"===(null==o?void 0:o.audio)&&(r.push(Jl(!0)),r.push(zl(o.muted)),await e.leaveComputerAudio(),r.push(Vl(0)),n&&r.push(Ll(!1))),r}(e,r);return await e.leaveSharingAudio(!0),await e.joinSharingAudio({ssrc:o,microphoneDeviceId:n,speakerDeviceId:i,isCaptureAudio:sl(s.userRole)}),a.push(Ql(!0)),a.push(Yl(!0)),a.push(oE(e,s.userId,!1,r)),a.findIndex((e=>e.type===`${Jl}`&&!0===e.payload))>-1&&(a.push(Dl(!0)),t.mute(r.meeting.userId,!0),Rd(qu,{source:Ma.SharingAudio})),setTimeout((()=>{Rd(uc,{state:"on"})}),0),a}!function(e,t){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},r(e,t)};function o(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var n=function(){return n=Object.assign||function(e){for(var t,r=1,o=arguments.length;r90||r||(e(t+=(100-t)/50),requestAnimationFrame(o))};return o(),{finish:function(){100===t||r||(t=100,e(100))},abort:function(){100===t||r||(r=!0)},get curProgress(){return t}}}function T(){}function O(){O.init.call(this)}function R(e){return void 0===e._maxListeners?O.defaultMaxListeners:e._maxListeners}function k(e,t,r,o){var n,i,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]):(i=e._events=new T,e._eventsCount=0),s){if("function"==typeof s?s=i[t]=o?[r,s]:[s,r]:o?s.unshift(r):s.push(r),!s.warned&&(n=R(e))&&n>0&&s.length>n){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(a)}}else s=i[t]=r,++e._eventsCount;return e}function D(e,t,r){var o=!1;function n(){e.removeListener(t,n),o||(o=!0,r.apply(e,arguments))}return n.listener=r,n}function P(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function M(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}T.prototype=Object.create(null),O.EventEmitter=O,O.usingDomains=!1,O.prototype.domain=void 0,O.prototype._events=void 0,O.prototype._maxListeners=void 0,O.defaultMaxListeners=10,O.init=function(){this.domain=null,O.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new T,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},O.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},O.prototype.getMaxListeners=function(){return R(this)},O.prototype.emit=function(e){var t,r,o,n,i,s,a,u="error"===e;if(s=this._events)u=u&&null==s.error;else if(!u)return!1;if(a=this.domain,u){if(t=arguments[1],!a){if(t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(r=s[e]))return!1;var d="function"==typeof r;switch(o=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var o=e.length,n=M(e,o),i=0;i0;)if(r[i]===t||r[i].listener&&r[i].listener===t){s=r[i].listener,n=i;break}if(n<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new T,this;delete o[e]}else!function(e,t){for(var r=t,o=r+1,n=e.length;o0?Reflect.ownKeys(this._events):[]};var N=function(e){function t(t){var r=e.call(this)||this;return r.timeout=(null==t?void 0:t.timeout)||3e4,r}return o(t,e),t.prototype.clearTimeoutCheck=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)},t.prototype.startTimeoutCheck=function(){var e=this;!this.timeoutTimer&&!this.finished&&this.timeout>0&&(this.timeoutTimer=setTimeout((function(){e.finished||(e.finished=!0,e.data=null,e.emit("timeout")),e.clearTimeoutCheck()}),this.timeout))},t}(O),L=function(e){function t(t){var r=e.call(this,t)||this;return r.uuid=d(),r.domParams=t||{},r}return o(t,e),t.prototype.jsonp=function(){var e=this;if(!this.finished){var t=this.domParams,r=t.url,o=t.jsonpCallbackName,n=void 0===o?"callback":o,i=t.body,s=t.integrity;this.script=document.createElement("script"),s&&(this.script.integrity=s,this.script.crossOrigin="anonymous");var a="";i&&Object.entries(i).forEach((function(e){var t=e[0],r=e[1];a+=(a?"&":"")+t+"="+r})),a+=(a?"&":"")+n+"="+this.uuid,this.script.src=r+(r.includes("?")?"":"?")+a,this.jsonpCallback(),this.progressMonitory=w((function(t){e.finished||e.emit("progressUpdated",t)})),document.body.appendChild(this.script)}},t.prototype.clearSideEffect=function(e){if(void 0===e&&(e=!1),document.body.removeChild(this.script),e){var t=this.uuid;window[this.uuid]=function(){window[t]&&delete window[t]}}else delete window[this.uuid];this.script=null,this.uuid=null,this.finished=!0,this.data=null,this.clearTimeoutCheck()},t.prototype.jsonpCallback=function(){var e=this;this.script.onerror=function(t){var r;e.finished||(e.clearSideEffect(),null===(r=e.progressMonitory)||void 0===r||r.abort(),e.emit("error",new Error("string"==typeof t?t:"load jsonp script failed")))},window[this.uuid]=function(t){var r;if(!e.finished){var o=e.domParams,n=o.encoding,i=o.blobType,s=o.unZipOptions,a=o.beforeTransformData,u=o.afterTransformData;null===(r=e.progressMonitory)||void 0===r||r.finish(),e.clearSideEffect(),(a?a(t||""):Promise.resolve(t||"")).then((function(t){return A(t,{encoding:n,blobType:i,unZipOptions:s}).then((function(t){return(u?u(t):Promise.resolve(t)).then((function(t){return e.emit("finished",t)}))}))})).catch((function(t){return e.emit("error",t)}))}}},t.prototype.abort=function(){this.clearSideEffect(!0)},t}(N),V=function(e){function t(t){var r=e.call(this,t)||this;return r.socketParams=t||{},r}return o(t,e),t.prototype.write=function(e,t){e&&!this.finished&&(e instanceof Error?this.handleError(e):(this.data?this.appendData(e):this.data=e,this.handlePerCentUpdate(t)))},t.prototype.handlePerCentUpdate=function(e){void 0===e||this.finished||this.emit("progressUpdated",e)},t.prototype.handleError=function(e){this.data=null,this.finished=!0,this.clearTimeoutCheck(),this.emit("error",e)},t.prototype.appendData=function(e){u(e)===u(this.data)?"string"==typeof e?this.data+=e:Blob&&e instanceof Blob?this.data=new Blob([this.data,e],{type:e.type}):ArrayBuffer&&e instanceof ArrayBuffer&&(this.data=s(this.data,e)):this.handleError(new Error("every piece of the data format must be the same"))},t.prototype.end=function(e){var t=this;if(!this.finished){this.handlePerCentUpdate(100),e&&this.write(e);var r=this.socketParams,o=r.encoding,n=r.blobType,i=r.unZipOptions,s=r.beforeTransformData,a=r.afterTransformData;(s?s(this.data):Promise.resolve(this.data)).then((function(e){return A(e,{encoding:o,blobType:n,unZipOptions:i}).then((function(e){return(a?a(e):Promise.resolve(e)).then((function(e){return t.emit("finished",e)}))}))})).catch((function(e){return t.emit("error",e)})),this.data=null,this.finished=!0,this.clearTimeoutCheck()}},t.prototype.abort=function(){this.data=null,this.finished=!0,this.clearTimeoutCheck()},t}(N),U=function(t){function r(e){var r=t.call(this,e)||this;return r.xhrParams=e||{},r.xhrParams.headers=n({},r.xhrParams.headers||{}),r}return o(r,t),r.prototype.supportFetch=function(){return!!window.fetch&&window.AbortController&&window.Request},r.prototype.ajax=function(){var t=this;if(!this.finished)if(this.xhrParams.url){var r=this.xhrParams,o=r.headers,i=void 0===o?{}:o,s=r.url,a=r.body,u=void 0===a?{}:a,c=r.method,d=void 0===c?"POST":c,l=r.encoding,p=r.integrity;this.controller=this.supportFetch()?new AbortController:new XMLHttpRequest;var h=this.supportFetch()?w((function(e){t.finished||t.emit("progressUpdated",e)})):null;(this.supportFetch()?fetch(new Request(s,n({method:d,headers:i,body:"GET"===d?void 0:JSON.stringify(u),signal:this.controller.signal},p?{integrity:p,mode:"cors"}:{}))).then((function(t){return t.ok?l===e.TransformDataFormat.STRING?t.text():l===e.TransformDataFormat.ARRAY_BUFFER?t.arrayBuffer():t.blob():Promise.reject(new Error("xhr download "+s+" failed!"))})):new Promise((function(r,o){var n=new XMLHttpRequest;t.controller=n,n.open(d,s),n.responseType=l===e.TransformDataFormat.STRING?"text":l===e.TransformDataFormat.ARRAY_BUFFER?"arraybuffer":"blob",Object.entries(i).forEach((function(e){var t=e[0],r=e[1];n.setRequestHeader(t,r)})),n.onload=function(){var e=n.status,t=n.response,i=n.statusText;e>=200&&e<300||304===e?r(t):o(new Error(e+": "+i))},n.onprogress=function(e){var r=e||{},o=r.total,n=r.loaded;void 0===n||t.finished||(o?t.emit("progressUpdated",n/o*100):n&&!h&&(h=w((function(e){t.finished||t.emit("progressUpdated",e)}))))},n.onerror=function(){o(new Error("xhr download "+s+" failed!"))},n.send(JSON.stringify(u))}))).then((function(e){if(!t.finished){var r=t.xhrParams,o=r.encoding,n=r.blobType,i=r.unZipOptions,s=r.beforeTransformData,a=r.afterTransformData;null==h||h.finish(),t.finished=!0,t.clearTimeoutCheck(),(s?s(e):Promise.resolve(e)).then((function(e){return A(e,{encoding:o,blobType:n,unZipOptions:i}).then((function(e){return(a?a(e):Promise.resolve(e)).then((function(e){return t.emit("finished",e)}))}))})).catch((function(e){return t.emit("error",e)}))}})).catch((function(e){t.finished||(t.finished=!0,t.clearTimeoutCheck(),null==h||h.abort(),t.emit("error",e))}))}else this.emit("error",new Error("xhrDownloader url params invalid!"))},r.prototype.abort=function(){this.data=null,this.finished=!0,this.clearTimeoutCheck(),this.controller.abort()},r}(N),j=0;O.defaultMaxListeners=500;var x,F=new O,B="ThreadPoolReady",H=function(){j-=1,F.emit(B)};(x=e.DownloaderType||(e.DownloaderType={})).XHR="xhr",x.DOM="dom",x.SOCKET="socket";var W=function(t){function r(r){var o=t.call(this)||this;return o.aborted=!1,o.downloadParmas=n({type:e.DownloaderType.XHR},r),o.id=d(),o}return o(r,t),r.prototype.start=function(){var t=this;j+=1,this.progress=0,this.emit("downloadStart"),this.onDownloadStartCallback&&this.onDownloadStartCallback();var r=this.downloadParmas,o=r.type,n=r.xhrParams,i=r.domParams,s=r.socketParams;switch(o){case e.DownloaderType.DOM:this.downloader=new L(i),this.downloader.jsonp();break;case e.DownloaderType.SOCKET:this.downloader=new V(s);break;default:this.downloader=new U(n),this.downloader.ajax()}return this.downloader.startTimeoutCheck(),this.downloader.on("error",(function(e){t.emit("error",e),t.onErrorCallback&&t.onErrorCallback(e),H()})).on("finished",(function(e){t.emit("complete",e),t.onCompleteCallback&&t.onCompleteCallback(e),H()})).on("progressUpdated",(function(e){t.progress=e,t.emit("progressUpdated",e),t.onProgressUpdatedCallback&&t.onProgressUpdatedCallback(e)})).on("timeout",(function(){t.emit("timeout"),t.onTimeoutCallback&&t.onTimeoutCallback(),H()})),this},r.prototype.abort=function(){if(this.aborted)return this;this.aborted=!0,this.downloader&&!this.downloader.finished&&this.downloader.abort();var e=new Error("file download has been aborted");return this.emit("abort",e),this.onAbortCallback&&this.onAbortCallback(e),H(),this},r.prototype.onDownloadStart=function(e){return this.onDownloadStartCallback=e,this},r.prototype.onProgressUpdated=function(e){return this.onProgressUpdatedCallback=e,this},r.prototype.onError=function(e){return this.onErrorCallback=e,this},r.prototype.onComplete=function(e){return this.onCompleteCallback=e,this},r.prototype.onAbort=function(e){return this.onAbortCallback=e,this},r.prototype.onTimeout=function(e){return this.onTimeoutCallback=e,this},r.prototype.isInProgress=function(){return void 0!==this.progress},r.prototype.isFinished=function(){return 100===this.progress},r}(O),$=function(){function e(e){this.taskList=[],this.options=e||{};var t=this.options.threadLimit;if((void 0===t?6:t)>6)throw new Error("threadLimit must be lower than 6");F.on(B,this.startNextTask.bind(this))}return e.prototype.download=function(e){var t=new W(e),r=this.removeTask.bind(this,t);return t.on("abort",r),this.taskList.push(t),this.checkTaskReady(t),t},e.prototype.startNextTask=function(){var e=this.taskList.find((function(e){return!e.isInProgress()}));e&&this.checkTaskReady(e)},e.prototype.checkTaskReady=function(e){var t=this.options.threadLimit,r=void 0===t?6:t;if(!(this.taskList.findIndex((function(e){return!e.isInProgress()}))>=r||j+1>6)){var o=this.removeTask.bind(this,e);e.on("complete",o),e.on("error",o),e.on("timeout",o),setTimeout((function(){return e.start()}),0)}},e.prototype.removeTask=function(e){var t=this;this.taskList.some((function(r,o){return r===e&&(setTimeout((function(){return e.removeAllListeners()}),0),t.taskList.splice(o,1),!0)}))},e}();e.DownloadTask=W,e.IDownloadManager=$,e.appendBuffer=s,e.arrayBufferToBlob=h,e.arrayBufferToString=f,e.blobToArrayBuffer=l,e.blobToText=p,e.genUuid=d,e.getDataFormat=u,e.getExtName=v,e.getFileName=b,e.getFullPathName=y,e.isImgFile=S,e.isJsonFile=_,e.isVersionFile=E,e.monitorProgress=w,e.sep=a,e.stringToArrayBuffer=m,e.stringToBlob=g,e.transformData=A,Object.defineProperty(e,"__esModule",{value:!0})}(rE,vr(Object.freeze({__proto__:null,default:{}}))),mr(rE),function(e,t){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},r(e,t)};function o(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var n=function(){return n=Object.assign||function(e){for(var t,r=1,o=arguments.length;r0&&u.length>n){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=u.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(c)}}else u=s[t]=r,++e._eventsCount;return e}function c(e,t,r){var o=!1;function n(){e.removeListener(t,n),o||(o=!0,r.apply(e,arguments))}return n.listener=r,n}function d(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function l(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}i.prototype=Object.create(null),s.EventEmitter=s,s.usingDomains=!1,s.prototype.domain=void 0,s.prototype._events=void 0,s.prototype._maxListeners=void 0,s.defaultMaxListeners=10,s.init=function(){this.domain=null,s.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new i,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return a(this)},s.prototype.emit=function(e){var t,r,o,n,i,s,a,u="error"===e;if(s=this._events)u=u&&null==s.error;else if(!u)return!1;if(a=this.domain,u){if(t=arguments[1],!a){if(t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(r=s[e]))return!1;var d="function"==typeof r;switch(o=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var o=e.length,n=l(e,o),i=0;i0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=r[s].listener,n=s;break}if(n<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new i,this;delete o[e]}else!function(e,t){for(var r=t,o=r+1,n=e.length;o0?Reflect.ownKeys(this._events):[]};var p="ZipInfo:";function h(e){var t;return null===(t=null==e?void 0:e.path)||void 0===t?void 0:t.startsWith(p)}function f(e){return"string"==typeof e&&e.startsWith(p)}function g(e,t){return(Array.isArray(e)?e:[e]).some((function(e){if("number"!=typeof e.version)throw new Error("file version must be an int number");return e.version=0;n--){var i=r.memoryFiles[n];("string"==typeof e&&(i.path===e||i.path.startsWith(""+e+t.sep))||e.path===i.path)&&r.memoryFiles.splice(n,1)}o(!0)}))},r.prototype.clear=function(){var e=this;return new Promise((function(t){e.memoryFiles=[],t(!0)}))},r.prototype.findFileByPath=function(e){var t=this;return new Promise((function(r){r(t.memoryFiles.filter((function(t){return t.path===e}))[0])}))},r.prototype.findFileBySourceURL=function(e){var t=this;return new Promise((function(r){r(t.memoryFiles.filter((function(t){return t.sourceURL===e})))}))},r.prototype.isDirectory=function(e){var r=this;return new Promise((function(o){f(e)?o(!1):o(r.memoryFiles.some((function(r){return r.path.startsWith(""+e+t.sep)})))}))},r.prototype.ls=function(e){var r=this;return new Promise((function(o){var n=[];r.memoryFiles.forEach((function(r){if(!h(r))if(e){if(r.path.startsWith(""+e+t.sep)){var o=r.path.split(""+e+t.sep)[1]||"";if(o.includes(t.sep)){var i=""+e+t.sep+o.split(t.sep)[0];return void(i&&!n.includes(i)&&n.push(i))}n.push(r)}}else if(r.path.includes(t.sep)){var s=r.path.split(t.sep)[0]||"";s&&!n.includes(s)&&n.push(s)}else n.push(r)})),o(n)}))},r}(y),E=function(e){function r(t){var r=e.call(this)||this;if(r.isLocalAvaliable=void 0,r.isEnable()){var o=(t||{}).nameSpaceId;r.storageName=function(e){return"resource-manager"+(e?"-"+e:"")}(o)}return r}return o(r,e),r.prototype.isEnable=function(){if(void 0!==this.isLocalAvaliable)return this.isLocalAvaliable;try{this.isLocalAvaliable=!0,localStorage.setItem("privateTest","")}catch(e){this.isLocalAvaliable=!1}return this.isLocalAvaliable},r.prototype.saveFile=function(e){var t=this;return this.isEnable()?new Promise((function(r){var o=t.getLocalFile();o.some((function(t,r){return t.path===e.path&&(o.splice(r,1,e),!0)}))||o.push(e),localStorage.setItem(t.storageName,JSON.stringify(o)),r(!0)})):Promise.resolve(!1)},r.prototype.getLocalFile=function(){var e=localStorage.getItem(this.storageName),t=[];if(e)try{t=JSON.parse(e)||"[]"}catch(e){console.log(e)}return t},r.prototype.removeFile=function(e){var r=this;return this.isEnable()?new Promise((function(o){for(var n=r.getLocalFile(),i=n.length-1;i>=0;i--){var s=n[i];("string"==typeof e&&(s.path===e||s.path.startsWith(""+e+t.sep))||e.path===s.path)&&n.splice(i,1)}localStorage.setItem(r.storageName,JSON.stringify(n)),o(!0)})):Promise.resolve(!1)},r.prototype.clear=function(){var e=this;return this.isEnable()?new Promise((function(t){localStorage.removeItem(e.storageName),t(!0)})):Promise.resolve(!1)},r.prototype.findFileByPath=function(e){var t=this;return this.isEnable()?new Promise((function(r){r(t.getLocalFile().filter((function(t){return t.path===e}))[0])})):Promise.resolve(void 0)},r.prototype.findFileBySourceURL=function(e){var t=this;return this.isEnable()?new Promise((function(r){r(t.getLocalFile().filter((function(t){return t.sourceURL===e})))})):Promise.resolve([])},r.prototype.isDirectory=function(e){var r=this;return this.isEnable()?new Promise((function(o){f(e)?o(!1):o(r.getLocalFile().some((function(r){return r.path.startsWith(""+e+t.sep)})))})):Promise.resolve(!1)},r.prototype.ls=function(e){var r=this;return this.isEnable()?new Promise((function(o){var n=[];r.getLocalFile().forEach((function(r){if(!h(r))if(e){if(r.path.startsWith(""+e+t.sep)){var o=r.path.split(""+e+t.sep)[1]||"";if(o.includes(t.sep)){var i=""+e+t.sep+o.split(t.sep)[0];return void(i&&!n.includes(i)&&n.push(i))}n.push(r)}}else if(r.path.includes(t.sep)){var s=r.path.split(t.sep)[0]||"";s&&!n.includes(s)&&n.push(s)}else n.push(r)})),o(n)})):Promise.resolve([])},r}(y);(v=e.FileStoreEnum||(e.FileStoreEnum={})).MEMORY="memoryStore",v.INDEX_DB="indexedDBStore",v.STORAGE="storageStore";var C=function(r){function i(e){var t=r.call(this)||this;return t.indexedDBStore=new S(e),t.memoryStore=new _,t.storageStore=new E(e),t}return o(i,r),i.prototype.saveFile=function(t,r,o){var i=this;void 0===r&&(r=!0);var s=(o||{}).forceSpecifyStore;return(r?this.findFileByPath(t.path,o):Promise.resolve(void 0)).then((function(r){if((null==r?void 0:r.version)&&g(t,r.version))throw new Error("there is an higher version file existed already");var o=n(n({},t),{createTime:r&&r.createTime||Date.now(),updateTime:Date.now()});return s&&i[s]&&i[s].isEnable()&&(s!==e.FileStoreEnum.STORAGE||i.isLocalStorageAvaliable(o))?i[s].saveFile(o):i[i.saveToTargetStoreRule(o)].saveFile(o)}))},i.prototype.isLocalStorageAvaliable=function(e){var r=e.data;return"string"===t.getDataFormat(r)&&r.length<=102400&&this.storageStore.isEnable()},i.prototype.saveToTargetStoreRule=function(t){return this.indexedDBStore.isEnable()?e.FileStoreEnum.INDEX_DB:this.isLocalStorageAvaliable(t)?e.FileStoreEnum.STORAGE:e.FileStoreEnum.MEMORY},i.prototype.removeFile=function(e,t){var r=(t||{}).forceSpecifyStore;return r&&this[r]?this[r].removeFile(e):Promise.all([this.indexedDBStore.removeFile(e),this.storageStore.removeFile(e),this.memoryStore.removeFile(e)]).then((function(){return!0}))},i.prototype.clear=function(e){var t=(e||{}).forceSpecifyStore;return t&&this[t]?this[t].clear():Promise.all([this.indexedDBStore.clear(),this.storageStore.clear(),this.memoryStore.clear()]).then((function(){return!0}))},i.prototype.findFileByPath=function(e,t){var r=this,o=(t||{}).forceSpecifyStore;return o&&this[o]?this[o].findFileByPath(e):m(this.searchInTargetStoreRule(),(function(t,o){return t?Promise.resolve(t):r[o].findFileByPath(e)}))},i.prototype.findFileBySourceURL=function(e,t){var r=this,o=(t||{}).forceSpecifyStore;return o&&this[o]?this[o].findFileBySourceURL(e):m(this.searchInTargetStoreRule(),(function(t,o){return r[o].findFileBySourceURL(e).then((function(e){return t?t.filter((function(t){return!e.some((function(e){return e.path===t.path}))})).concat(e||[]):e||[]}))}))},i.prototype.searchInTargetStoreRule=function(){return[e.FileStoreEnum.INDEX_DB,e.FileStoreEnum.STORAGE,e.FileStoreEnum.MEMORY]},i.prototype.isDirectory=function(e){var t=this;return e?m(this.searchInTargetStoreRule(),(function(r,o){return r?Promise.resolve(!0):t[o].isDirectory(e)})):Promise.resolve(!0)},i.prototype.ls=function(e){var t=this;return this.isDirectory(e).then((function(r){if(!r)throw new Error("path: "+e+" is an invalid directory path");return m(t.searchInTargetStoreRule(),(function(r,o){return t[o].ls(e).then((function(e){return r?(e||[]).concat(r.filter((function(t){return!e.some((function(e){return"string"==typeof t?e===t:"string"!=typeof e&&e.path===t.path}))}))):e}))}))}))},i}(s),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(s),A=function(e){function r(r){var o=e.call(this)||this,n=r||{},i=n.storeOptions,s=n.downloadManagerOptions;return o.downloadManager=new t.IDownloadManager(s),o.store=new C(i),o.store.indexedDBStore.on("ready",(function(){return o.emit("ready")})),o}return o(r,e),r.prototype.getFile=function(e,t,r){var o=this,n=new I,i=Promise.resolve(void 0),s=t||{},a=s.downloadOptions,u=s.forceDownload,c=s.saveRootPath;u?i=Promise.resolve(void 0):"string"==typeof e?i=this.store.findFileByPath(e,r):(null==e?void 0:e.sourceURL)?i=this.store.findFileBySourceURL(e.sourceURL):a&&(a.domParams||a.socketParams||a.xhrParams)&&(i=this.store.findFileBySourceURL(this.genSourceURL(a)));var d=null,l=new Promise((function(e){d=e}));return n.getDownloadTask=function(){return l},i=i.then((function(e){if(e&&(!Array.isArray(e)||e.length)){var t=e;if(Array.isArray(t)){var o=t.find((function(e){return h(e)}));if(!o)return;t=t.filter((function(e){return!h(e)}));var i=o.data;if("string"!=typeof i)return;if(!JSON.parse(i||"[]").every((function(e){return t.some((function(t){return t.path===e}))})))return}if(!(null==r?void 0:r.targetVersion)||!g(t,r.targetVersion))return n.emit("checkExpire",!1),t;n.emit("checkExpire",!0)}})).then((function(t){if(!t&&a){var i=o.downloadManager.download(a);return d(i),new Promise((function(t,s){i.on("complete",(function(i){setTimeout((function(){var s=Array.isArray(i)?i.map((function(e){var t=e.data,n=e.path,i=e.extName;return{path:o.genFilePath(c,n),sourceURL:o.genSourceURL(a),data:t,fileFormat:i||o.getFileFormat(a),version:(null==r?void 0:r.targetVersion)||1}})):{path:o.genFilePath(c,void 0),sourceURL:o.genSourceURL(a),data:i,fileFormat:o.getFileFormat(a),version:(null==r?void 0:r.targetVersion)||1};if(Array.isArray(s)&&"string"==typeof e&&e){var u=s.find((function(t){return t.path===e}));t(u||s)}else t(s);n.emit("beforeSet",s),o.beforeWrite(s,r).then((function(){n.emit("afterSet")})).catch((function(e){return n.emit("afterSet",e)}))}),0)})),i.on("abort",s),i.on("error",s),i.on("timeout",(function(){return s(new Error("download timeout"))}))}))}return d(void 0),t})).catch((function(e){return d(void 0),Promise.reject(e)})),n.getResult=function(){return i},n},r.prototype.genSourceURL=function(e){var r=e.domParams,o=e.type,n=e.xhrParams;if(o===t.DownloaderType.SOCKET)return null;var i=(o===t.DownloaderType.DOM?r:n)||{},s=i.url,a=void 0===s?"":s,u=i.body;return u&&Object.keys(u).length?a+(a.includes("?")?"&":"?")+"downloadBodyParams="+JSON.stringify(u):a},r.prototype.updateFile=function(e,t){return this.saveStore(e,!0,t)},r.prototype.beforeWrite=function(e,t){var r=this;return Array.isArray(e)?Promise.all(e.concat(function(e){var t=e[0].sourceURL||"";return{path:""+p+t,sourceURL:t,data:JSON.stringify(e.map((function(e){return e.path})))}}(e)).map((function(e){return r.saveStore(e,!1,t)}))).then((function(e){return e.filter((function(e){return!h(e)}))})):this.saveStore(e,!0,t)},r.prototype.getFileFormat=function(e){var r=e||{},o=r.xhrParams,n=r.domParams,i=r.socketParams,s=r.type;return s===t.DownloaderType.DOM&&(null==n?void 0:n.fileFormat)?n.fileFormat:s===t.DownloaderType.SOCKET&&(null==i?void 0:i.fileFormat)?i.fileFormat:(null==o?void 0:o.fileFormat)?o.fileFormat:"unknow"},r.prototype.genFilePath=function(e,r){return r?""+(e||"")+(e?t.sep:"")+r:e||""},r.prototype.saveStore=function(e,t,r){return void 0===t&&(t=!0),this.store.saveFile(e,t,r).then((function(t){if(t)return e;throw new Error("fail to save file in local store")}))},r.prototype.remove=function(e,t){return this.store.removeFile(e,t)},r.prototype.clear=function(e){return this.store.clear(e)},r.prototype.list=function(e){return this.store.ls(e)},r.prototype.updateVersion=function(e,t){var r=this;return this.store.findFileByPath(e).then((function(o){if(o)return r.saveStore(n(n({},o),{version:t})).then((function(){}));throw new Error("the target path: "+e+" isn't existed")}))},r.prototype.updateSourceURL=function(e,t){var r=this;return this.store.findFileByPath(e).then((function(o){if(o)return r.saveStore(n(n({},o),{sourceURL:t})).then((function(){}));throw new Error("the target path: "+e+" isn't existed")}))},r}(s);e.IResourceManager=A,Object.defineProperty(e,"__esModule",{value:!0})}(tE.exports,rE),mr(tE.exports);const uE=()=>{if(os())return!0;{var e;const r=null===(e=Ui())||void 0===e?void 0:e.toLocaleLowerCase();if(r.indexOf("safari")>-1&&-1===r.indexOf("ios-safari")){var t;const e=null===(t=navigator.userAgent.match(/version\/(\d+\.?\d+)/i))||void 0===t?void 0:t[1];return fn(e||"","15.2")>=0}return!1}},cE=Ls.createAgent(),dE=d_(xg(Ws.getInstance())),lE=e=>!e.muted;var pE=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>ko(e,12033).pipe(or(t),ye((e=>{let[t,r]=e;const{participants:{attendeesList:o,allowTalkAttendeesList:n}}=r,i=t.payload.body,s={};return i&&([...o,...n].forEach((e=>{for(let t=1;t<=3;t++){const r=`asn${t}`,{userId:o,displayName:n}=e;if(void 0!==i[r]&&o===i[r]){s[r]={userId:o,displayName:n};break}}})),Rd(Wu,Object.values(s))),Al(s)}))),unmuteConsentAfterSpotlighted:(e,t)=>ko(e,16135).pipe(or(t),Zt((e=>{let[t,r]=e;const{payload:{body:{id:o,bLeadershipOn:n}}}=t,{audio:{bCanUnmute:i}}=r,s=hl(r);if(s){const{isHost:e,bCoHost:t,userId:r,audio:a,muted:u}=s,c=e||t;n&&vn(r,o)&&(null!==a&&""!==a&&!0!==u||!c&&!i||Rd($u,Pa.Spotlight))}})),Vt(W)),unmuteConsentEpic:(e,t)=>ko(e,12037).pipe(or(t),Zt((e=>{let[,t]=e;const r=hl(t);null!==(null==r?void 0:r.audio)&&""!==(null==r?void 0:r.audio)&&1==(null==r?void 0:r.muted)&&Rd($u,Pa.Unmute)})),Vt(W)),setAudioAttributeEpic:(e,t)=>ko(e,vs).pipe(Ke((e=>e.payload.body&&["bCanUnmute","bMutedAll","bMutedUponEntry"].some((t=>void 0!==e.payload.body[t])))),fg((e=>{if(void 0!==e.payload.body.bCanUnmute)return wl(e.payload.body.bCanUnmute);if(void 0!==e.payload.body.bMutedAll){const r=hl(t.value);if(("computer"===(null==r?void 0:r.audio)||"phone"===(null==r?void 0:r.audio))&&0==r.muted)return kl(e.payload.body.bMutedAll)}return void 0!==e.payload.body.bMutedUponEntry?Ml(e.payload.body.bMutedUponEntry):void 0}))),currentUserAudioChangeEpic:(e,t)=>ko(e,ms).pipe(or(t),Ke((e=>{let[,t]=e;return t.socket.zoomSocketStatus===Cl.Connected})),Pe((e=>{let[t,r]=e;if(t.payload.body.update&&t.payload.body.update.some((e=>void 0!==e.audio||void 0!==e.muted))){const e=r.meeting.userId,o=t.payload.body.update,[n,i]=Qe(Oe(o),(t=>t.id===e));i.subscribe((e=>{Rd(Qu,e)}));const{audio:{isActiveOperation:s,isMutedAll:a,isSpeakerOnly:u,isAllowToTalk:c,isShareAudioEnabled:d,isSharingAudio:l}}=r;let p=hl(r);!p&&t.payload.body.add&&t.payload.body.add.length>0&&(p=t.payload.body.add.find((t=>t.id===e)),p&&(p.userRole=p.role));const h=sl(p.userRole);return n.pipe(Zt((async e=>{var t,r,o,n;if(e.audio!==(null===(t=p)||void 0===t?void 0:t.audio))if(""===e.audio)Rd(Ku);else if("computer"===e.audio){const e=h&&!c||u;l&&Rd(Gu),e&&Rd(Gu)}else if("phone"===e.audio){var i;"computer"===(null===(i=p)||void 0===i?void 0:i.audio)&&(await dE.leaveComputerAudio(),cE.joinOrLeaveVoip(!1)),Rd(zu)}if(null!==(r=p)&&void 0!==r&&r.audio&&""!==(null===(o=p)||void 0===o?void 0:o.audio)&&e.muted!==(null===(n=p)||void 0===n?void 0:n.muted))if(!0===e.muted){const e=s?Ma.Active:a?Ma.PassiveByMuteAll:Ma.PassiveByMuteOne;Rd(qu,{source:e}),d||dE.muteAudio()}else!1===e.muted&&(Rd(Ju,{source:s?"active":"passive"}),dE.unmuteAudio())})),Ke((e=>{var t,r;return""!==(null===(t=p)||void 0===t?void 0:t.audio)&&e.muted!==(null===(r=p)||void 0===r?void 0:r.muted)})),Vt(Q(Dl(!1),kl(!1))))}return W}))),handleDialOutEpic:(e,t)=>ko(e,8198).pipe(or(t),Ke((e=>{let[t,r]=e;return t.payload.seq==r.audio.dialout.sequence})),Zt((e=>{let[t]=e;const r=t.payload.body.result;Rd(Zu,{code:r}),r===La.Success?Rd(Yu):-1===[La.Calling,La.Ringing,La.Accepted,La.Success].indexOf(r)&&Rd(Xu)})),ye((e=>{let[t]=e;return Ol(t.payload.body.result)}))),handleDialouCancelEpic:e=>ko(e,8198).pipe(Ke((e=>{var t;return[La.Canceling,La.Canceled,La.CancelFailed].includes(null===(t=e.payload.body)||void 0===t?void 0:t.result)})),Zt((e=>{var t;const r=null===(t=e.payload.body)||void 0===t?void 0:t.result;Rd(Zu,{code:r}),r===La.Canceled?Rd(ec):r===La.CancelFailed&&Rd(tc)})),ye((e=>Ol(e.payload.body.result)))),handleAllowToTalkEpic:(e,t)=>ko(e,12036).pipe(or(t),Pe((e=>{let[t,r]=e;const o=hl(r),{media:{audioEncodeStatus:n}}=r,{promoterID:i,bAllowTalk:s}=t.payload.body;if((null==o?void 0:o.userId)===i){if(Rd(ac,s),s){let e=Q(!0);return"success"!==n&&(dE.enableAudioEncode(),e=Ze(Pd(Gc,1).pipe(kt(!0)),Pd(Zc,1).pipe(kt(!1)))),e.pipe(Pe((e=>(e&&Rd($u,Pa.AllowToTalk),W))),Ft(Rl(!0)))}if(cE.mute(i,!0),"computer"===(null==o?void 0:o.audio))return dE.leaveComputerAudio(),et(300).pipe(Zt((async()=>{(uE()?Ze(xe(document,"click").pipe(At(1)),xe(document,"touchend").pipe(At(1))).toPromise():Promise.resolve(!0)).then((()=>{nE(dE,r,!1)}))})),Vt(W),Ft(Rl(!1)))}return W}))),handleAllowToTalkResponseEpic:e=>ko(e,8205).pipe(Zt((e=>{Rd("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)})),Vt(W)),handleAttendeePromoteDepromote:(e,t)=>Po(e,24597).pipe(or(t),Zt((e=>{let[t,r]=e;const o=hl(r);"phone"===(null==o?void 0:o.audio)?cE.audioDrop(o.userId):"computer"===(null==o?void 0:o.audio)&&t.payload.body.bPromote})),Vt(W)),setAudioSSRCEpic:(e,t)=>ko(e,12035).pipe(or(t),Pe((e=>{let[r,o]=e;const{meeting:{currentUserAudioBeforeReset:n},media:{audioDecodeStatus:i,audioEncodeStatus:s}}=o,{payload:{body:{ssrc:a}}}=r,u=Pg(t).pipe(Pe((e=>{if("computer"===n&&(null==e||!e.audio)){const r=sl(e.userRole);return Dg("audio",r?"success":s,i).pipe(Ke((e=>{let[t,r]=e;return t&&r})),Zt((()=>{(uE()?Ze(xe(document,"click").pipe(At(1)),xe(document,"touchend").pipe(At(1))).toPromise():Promise.resolve(!0)).then((()=>{cE.joinOrLeaveVoip(!0),nE(dE,t.value)}));const{audio:{locallyMutedAudioList:e,localUserAudioVolumeList:r}}=t.value;e.length>0&&e.forEach((e=>{dE.muteOrUnmuteOtherAudio(e,!0)})),r.length>0&&r.forEach((e=>{dE.adjustOtherAudioVolume(e.userId,e.volume)}))})),kt(si(void 0)))}return W})));return Ge(Q(Pl(a)),u)}))),handleMergeAudioEpic:(e,t)=>ko(e,7952).pipe(Wt((e=>Pd(zu,1).pipe(or(t),Zt((t=>{let[,r]=t;const{BindStatus:o,nOperatorUserId:n}=e.payload.body,i=r.participants.attendeesList.find((e=>e.userId===n));!0===o&&Rd(rc,{operatorName:null==i?void 0:i.displayName,operatorUserId:n,operatorRole:null==i?void 0:i.userRole})})))))),handleUserGrantAudioCaptureEpic:(e,t)=>No(e,ka.UserGrantCaptureAudio).pipe(or(t),Pe((e=>{let[,t]=e;const r=hl(t);var o;(o=r,"computer"===(null==o?void 0:o.audio)?Promise.resolve():Dd({event:Gs,operations:[Ke((e=>void 0!==e.audio)),At(1)]},(e=>{let{audio:t}=e;return"phone"===t||"computer"===t}))).then((()=>{Rd(Gu)}));const{meeting:{isCurrentUserMutedBeforeReset:n},audio:{bMutedUponEntry:i,isUserGrantCaptureAudio:s,isAllowToTalk:a}}=t,u=[Nl(!0)];if(r){!0===r.muted&&!1===a&&cE.mute(r.userId,!0);const e=s||r.isHost||a;(!0===n||!e&&i)&&(cE.mute(r.userId,!0),n&&u.push(ai(void 0)))}return Oe(u)}))),handleUserForbiddenMicrophoneEpic:e=>No(e,ka.UserForbiddedCaptureAudio).pipe(Zt((()=>{Rd(oc)})),kt(Ll(!0))),handleAudioSocketErrorEpic:e=>No(e,ka.AudioWebsocketBroken).pipe(Zt((()=>{Rd(nc)})),Vt(W)),handleAudioZeroDataEpic:(e,t)=>No(e,ka.AudioZeroData).pipe(or(t),fg((e=>{let[,t]=e;const{audio:{webrtcRestartCount:r,activeMicrophone:o}}=t;if(r<3)return dE.restoreWebRTC(o),Vl(r+1)}))),handleAutoPlayEpic:(e,t)=>e.pipe(ar(`${Bl}`),Ke((e=>!1===e.payload)),Pe((()=>(Rd(ic),Ze(xe(document,"click").pipe(At(1)),xe(document,"touchend").pipe(At(1))).pipe(Zt((()=>{cE.joinOrLeaveVoip(!0),nE(dE,t.value)})),kt(Bl(!0))))))),handleAudioActionCompleteEpic:e=>No(e,[ka.JoinComputerAudioComplete,ka.JoinSharingAudioComplete,ka.LeaveComputerAudioComplete,ka.LeaveSharingAudioComplete]).pipe(Zt((()=>{jg.completeAudioAction()})),Vt(W)),handleAudioQosDataEpic:(e,t)=>No(e,ka.AudioQosData).pipe(or(t),ye((e=>{var t;let[r,o]=e;const{meeting:{isWebinar:n},media:{audioEncodeStatus:i,audioDecodeStatus:s},participants:{xmppAttendeeList:a,allowTalkAttendeesList:u}}=o,c=hl(o),d=El(o);let l=d.length>0,p=d.some(lE);n&&(l=l||Boolean(a.length),p=p||u.some(lE));const h=("computer"===(null==c?void 0:c.audio)||"phone"===(null==c?void 0:c.audio))&&"success"===i&&!(null!=c&&c.muted)&&l,f=("computer"===(null==c?void 0:c.audio)||"phone"===(null==c?void 0:c.audio))&&"success"===s&&l&&p;return null!==(t=r.payload.data)&&void 0!==t&&t.encoding?h?(Rd(cc,r.payload),Xl(r.payload)):Xl(ou):f?(Rd(cc,r.payload),ep(r.payload)):ep(ou)}))),handleResetLocalMuteStateAfterUserLeaveEpic:(e,t)=>ko(e,ms).pipe(or(t),Ke((e=>{let[t,r]=e;const{payload:{body:o}}=t,{audio:{locallyMutedAudioList:n,localUserAudioVolumeList:i}}=r;return(n.length>0||i.length>0)&&(null==o?void 0:o.remove)&&o.remove.length>0})),Pe((e=>{let[t,r]=e;const{payload:{body:{remove:o}}}=t,{audio:{locallyMutedAudioList:n,localUserAudioVolumeList:i}}=r,s=n.concat(i.map((e=>e.userId))).filter((e=>-1!==o.indexOf((t=>t.id===e))));return s.length>0?(s.forEach((e=>{dE.muteOrUnmuteOtherAudio(e,!1)})),Oe(s.map((e=>[rp(e),np({userId:e})])).flat())):W})))});const hE=Ls.createAgent(),fE=d_(xg(Ws.getInstance()));var gE=Object.freeze({__proto__:null,handleAddLocalShareAudioUserEpic:(e,t)=>Mo(e,ms).pipe(Ke((e=>{const t=e.payload.body.update;return t&&t.length>0&&t.findIndex((e=>void 0!==e.bShareOn))>-1})),or(t),Pe((e=>{let[t,r]=e;const{payload:{body:{update:o}}}=t,{audio:{localShareAudioUserMutedList:n}}=r,i=o.filter((e=>!0===e.bShareOn&&!0===e.bShareAudioOn)),s=[];return i.length>0&&i.forEach((e=>{-1===n.findIndex((t=>t.userId===e.id))&&s.push(Kl({userId:e.id,isFromMainSession:!!e.bShareToBORooms}))})),Oe(s)}))),handleShareWithAudioEpic:(e,t)=>No(e,ka.SharingDesktopStreamHaveAudio).pipe(Wt((()=>ko(e,ms).pipe(Ke((e=>{var r;const{payload:{body:o}}=e,{meeting:{userId:n}}=t.value;return(null==o||null===(r=o.update)||void 0===r?void 0:r.findIndex((e=>e.id===n&&!0===e.bShareOn)))>-1})),At(1),vg((async()=>{const e=t.value;return await aE(fE,hE,e)})),Ft(Ql(!0)))))),handleMediaSDKLeaveShareAudioEpic:(e,t)=>No(e,ka.SharingDesktopStreamHaveNoAudio).pipe(or(t),Ke((e=>{var t;let[,r]=e;return!0===(null===(t=r.audio)||void 0===t?void 0:t.isShareAudioEnabled)})),vg((async e=>{let[,t]=e;return await sE(fE,hE,t)}))),handleJoinComputerAudioAfterShareAudioEpic:(e,t)=>ko(e,ms).pipe(or(t),Ke((e=>{let[,t]=e;return t.socket.zoomSocketStatus===Cl.Connected&&!0===t.audio.isSharingAudio})),Pe((e=>{var r;let[o,n]=e;if(null!==(r=o.payload.body.update)&&void 0!==r&&r.some((e=>void 0!==e.audio||void 0!==e.muted))){const{meeting:{userId:e}}=n,r=o.payload.body.update.filter((t=>t.id===e));return Pg(t).pipe(Pe((e=>{const t=[];return r.findIndex((e=>"computer"===e.audio))>-1&&"computer"!==(null==e?void 0:e.audio)&&(t.push(Jl(!0)),t.push(zl(!0))),Oe(t)})))}return W}))),handleShareAudioWithCurrentShareStatusChangeEpic:(e,t)=>e.pipe(ar(`${lp}`),ee(he),or(t),Ke((e=>{var t;let[,r]=e;return!0===(null===(t=r.audio)||void 0===t?void 0:t.isShareAudioEnabled)})),vg((async e=>{let[t,r]=e;const{payload:o}=t,{audio:{isShareAudioMuted:n,isSharingAudio:i}}=r,s=[];if(o===Fa.End){const e=await sE(fE,hE,r);s.push(...e)}else if(o===Fa.Paused){if(!1===n&&!0===i){await fE.leaveSharingAudio(!0),s.push(Yl(!1));const e=await iE(fE,hE,r);s.push(...e),setTimeout((()=>{Rd(uc,{state:"off"})}),0)}}else if(o===Fa.Sharing&&!1===n&&!1===i){const e=await aE(fE,hE,r);s.push(...e)}return s})))});const mE=Ls.createAgent(),vE=Ws.getInstance();var yE=Object.freeze({__proto__:null,handleAudioBridgeTokenEpic:e=>ko(e,4299).pipe(Zt((e=>{const{payload:t}=e;vE.passThroughRWGMessage(t)})),Vt(W)),handleAudioBridgeReconnectEpic:e=>No(e,ka.AudioBridgeReconnectStart).pipe(Zt((()=>{mE.joinOrLeaveVoip(!1)})),Vt(W)),handleAudioBridgeReconnectSuccessEpic:e=>No(e,ka.AudioBridgeReconnectEnd).pipe(Zt((()=>{mE.joinOrLeaveVoip(!0)})),Vt(W)),handleSendNodeAudioStatusEpic:e=>ko(e,ms).pipe(Ke((e=>{var t,r;return Ug()&&((null===(t=e.payload.body.update)||void 0===t?void 0:t.some((e=>void 0!==e.muted)))||(null===(r=e.payload.body.remove)||void 0===r?void 0:r.length)>0)})),Zt((e=>{const{payload:{body:{update:t,remove:r}}}=e;vE.sendUserAudioStatus({update:(t||[]).filter((e=>void 0!==e.muted)).map((e=>({userId:e.id,muted:e.muted}))),remove:(r||[]).map((e=>({userId:e.id})))})})),Vt(W)),handleAudioBridgeFailoverEpic:e=>No(e,ka.NotifyUIFailover).pipe(ye((()=>(Rd(Xs,{reason:Ai.Failover}),Bn(Mi.NotifyUiFailover)))))});const bE={asnIds:{asn1:{userId:0,displayName:null},asn2:{userId:0,displayName:null},asn3:{userId:0,displayName:null}},microphoneDevicesList:[],speakerDevicesList:[],activeMicrophone:"default",activeSpeaker:"default",isMicrophoneForbidden:!1,audioSsrc:0,bCanUnmute:!1,bMutedUponEntry:!1,isAllowToTalk:void 0,dialout:{sequence:0,returnCode:-1},canPlayAudio:!1,isActiveOperation:!1,isMutedAll:!1,isUserGrantCaptureAudio:!1,webrtcRestartCount:0,isComputerAudioLoading:!1,isSpeakerOnly:!1,localShareAudioUserMutedList:[],locallyMutedAudioList:[],localUserAudioVolumeList:[],statistic:{encode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0},decode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0}}},SE=Zr({[`${Al}`]:Fm(((e,t)=>{let{payload:r}=t;e.asnIds=ot({},r)})),[`${wl}`]:Fm(((e,t)=>{let{payload:r}=t;e.bCanUnmute=r})),[`${Tl}`]:Fm(((e,t)=>{let{payload:r}=t;const{dialout:o}=e;o.sequence=r})),[`${Ol}`]:Fm(((e,t)=>{let{payload:r}=t;const{dialout:o}=e;o.returnCode=r})),[`${Rl}`]:Fm(((e,t)=>{let{payload:r}=t;e.isAllowToTalk=r,e.isAllowToTalkAttendeeConnected=!1})),[`${Dl}`]:Fm(((e,t)=>{let{payload:r}=t;e.isActiveOperation=r})),[`${kl}`]:Fm(((e,t)=>{let{payload:r}=t;e.isMutedAll=r})),[`${Pl}`]:Fm(((e,t)=>{let{payload:r}=t;e.audioSsrc=r})),[`${Ml}`]:Fm(((e,t)=>{let{payload:r}=t;e.bMutedUponEntry=r})),[`${Nl}`]:Fm(((e,t)=>{let{payload:r}=t;e.isUserGrantCaptureAudio=r})),[`${Ll}`]:Fm(((e,t)=>{let{payload:r}=t;e.isMicrophoneForbidden=r})),[`${Vl}`]:Fm(((e,t)=>{let{payload:r}=t;e.webrtcRestartCount=r})),[`${Ul}`]:Fm(((e,t)=>{let{payload:r}=t;e.microphoneDevicesList=r})),[`${jl}`]:Fm(((e,t)=>{let{payload:r}=t;e.speakerDevicesList=r})),[`${xl}`]:Fm(((e,t)=>{let{payload:r}=t;e.activeMicrophone=r})),[`${Fl}`]:Fm(((e,t)=>{let{payload:r}=t;e.activeSpeaker=r})),[`${Bl}`]:Fm(((e,t)=>{let{payload:r}=t;e.canPlayAudio=r})),[`${Hl}`]:(e,t)=>{let{dialout:{returnCode:r},locallyMutedAudioList:o,localUserAudioVolumeList:n}=e,{payload:i}=t;return i?ot(ot({},bE),{},{dialout:ot(ot({},bE.dialout),{},{returnCode:r}),locallyMutedAudioList:o,localUserAudioVolumeList:n}):ot({},bE)},[`${Wl}`]:Fm(((e,t)=>{let{payload:r}=t;e.isComputerAudioLoading=r})),[`${$l}`]:Fm(((e,t)=>{let{payload:r}=t;e.isSpeakerOnly=r})),[`${Gl}`]:Fm(((e,t)=>{let{payload:r}=t;e.isAllowToTalkAttendeeConnected=r})),[`${zl}`]:Fm(((e,t)=>{let{payload:r}=t;e.mutedBeforeSharingAudio=r})),[`${Yl}`]:Fm(((e,t)=>{let{payload:r}=t;e.isSharingAudio=r})),[`${Zl}`]:Fm(((e,t)=>{let{payload:r}=t;e.isShareAudioMuted=r})),[`${Kl}`]:Fm(((e,t)=>{let{payload:r}=t;const{userId:o,isFromMainSession:n}=r;-1===e.localShareAudioUserMutedList.findIndex((e=>e.userId===o))&&e.localShareAudioUserMutedList.push({userId:o,isFromMainSession:n,muted:!1})})),[`${ql}`]:Fm(((e,t)=>{let{payload:r}=t;const o=e.localShareAudioUserMutedList.find((e=>e.userId===r.userId));o&&(o.muted=r.muted)})),[`${Jl}`]:Fm(((e,t)=>{let{payload:r}=t;e.isJoinComputerAudioBeforeSharingAudio=r})),[`${Ql}`]:Fm(((e,t)=>{let{payload:r}=t;e.isShareAudioEnabled=r})),[`${Xl}`]:Fm(((e,t)=>{let{payload:r}=t;e.statistic.encode=r.data})),[`${ep}`]:Fm(((e,t)=>{let{payload:r}=t;e.statistic.decode=r.data})),[`${tp}`]:Fm(((e,t)=>{let{payload:r}=t;-1===e.locallyMutedAudioList.findIndex((e=>e===r))&&e.locallyMutedAudioList.push(r)})),[`${rp}`]:Fm(((e,t)=>{let{payload:r}=t;const o=e.locallyMutedAudioList.findIndex((e=>e===r));-1!==o&&e.locallyMutedAudioList.splice(o,1)})),[`${op}`]:Fm(((e,t)=>{let{payload:r}=t;const o=e.localUserAudioVolumeList.find((e=>e.userId===r.userId));o?o.volume=r.volume:e.localUserAudioVolumeList.push(r)})),[`${np}`]:Fm(((e,t)=>{let{payload:r}=t;const o=e.localUserAudioVolumeList.findIndex((e=>e.userId===r.userId));-1!==o&&e.localUserAudioVolumeList.splice(o,1)}))},bE),_E=Ro(pE,gE,yE);var EE="object"==typeof global&&global&&global.Object===Object&&global,CE="object"==typeof self&&self&&self.Object===Object&&self,IE=EE||CE||Function("return this")(),AE=IE.Symbol,wE=Object.prototype,TE=wE.hasOwnProperty,OE=wE.toString,RE=AE?AE.toStringTag:void 0,kE=Object.prototype.toString,DE=AE?AE.toStringTag:void 0;function PE(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":DE&&DE in Object(e)?function(e){var t=TE.call(e,RE),r=e[RE];try{e[RE]=void 0;var o=!0}catch(e){}var n=OE.call(e);return o&&(t?e[RE]=r:delete e[RE]),n}(e):function(e){return kE.call(e)}(e)}function ME(e){return null!=e&&"object"==typeof e}var NE=Array.isArray;function LE(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function VE(e){if(!LE(e))return!1;var t=PE(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var UE,jE=IE["__core-js_shared__"],xE=(UE=/[^.]+$/.exec(jE&&jE.keys&&jE.keys.IE_PROTO||""))?"Symbol(src)_1."+UE:"",FE=Function.prototype.toString;function BE(e){if(null!=e){try{return FE.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var HE=/^\[object .+?Constructor\]$/,WE=Function.prototype,$E=Object.prototype,GE=WE.toString,zE=$E.hasOwnProperty,KE=RegExp("^"+GE.call(zE).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qE(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!LE(e)||(t=e,xE&&xE in t))&&(VE(e)?KE:HE).test(BE(e));var t}(r)?r:void 0}var JE=qE(IE,"WeakMap"),QE=/^(?:0|[1-9]\d*)$/;function ZE(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&QE.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function eC(e){return null!=e&&XE(e.length)&&!VE(e)}var tC=Object.prototype;function rC(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||tC)}function oC(e){return ME(e)&&"[object Arguments]"==PE(e)}var nC=Object.prototype,iC=nC.hasOwnProperty,sC=nC.propertyIsEnumerable,aC=oC(function(){return arguments}())?oC:function(e){return ME(e)&&iC.call(e,"callee")&&!sC.call(e,"callee")},uC="object"==typeof exports&&exports&&!exports.nodeType&&exports,cC=uC&&"object"==typeof module&&module&&!module.nodeType&&module,dC=cC&&cC.exports===uC?IE.Buffer:void 0,lC=(dC?dC.isBuffer:void 0)||function(){return!1},pC={};pC["[object Float32Array]"]=pC["[object Float64Array]"]=pC["[object Int8Array]"]=pC["[object Int16Array]"]=pC["[object Int32Array]"]=pC["[object Uint8Array]"]=pC["[object Uint8ClampedArray]"]=pC["[object Uint16Array]"]=pC["[object Uint32Array]"]=!0,pC["[object Arguments]"]=pC["[object Array]"]=pC["[object ArrayBuffer]"]=pC["[object Boolean]"]=pC["[object DataView]"]=pC["[object Date]"]=pC["[object Error]"]=pC["[object Function]"]=pC["[object Map]"]=pC["[object Number]"]=pC["[object Object]"]=pC["[object RegExp]"]=pC["[object Set]"]=pC["[object String]"]=pC["[object WeakMap]"]=!1;var hC,fC="object"==typeof exports&&exports&&!exports.nodeType&&exports,gC=fC&&"object"==typeof module&&module&&!module.nodeType&&module,mC=gC&&gC.exports===fC&&EE.process,vC=function(){try{return gC&&gC.require&&gC.require("util").types||mC&&mC.binding&&mC.binding("util")}catch(e){}}(),yC=vC&&vC.isTypedArray,bC=yC?(hC=yC,function(e){return hC(e)}):function(e){return ME(e)&&XE(e.length)&&!!pC[PE(e)]},SC=Object.prototype.hasOwnProperty;var _C=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),EC=Object.prototype.hasOwnProperty;function CC(e){if(!rC(e))return _C(e);var t=[];for(var r in Object(e))EC.call(e,r)&&"constructor"!=r&&t.push(r);return t}function IC(e){return eC(e)?function(e,t){var r=NE(e),o=!r&&aC(e),n=!r&&!o&&lC(e),i=!r&&!o&&!n&&bC(e),s=r||o||n||i,a=s?function(e,t){for(var r=-1,o=Array(e);++r-1},DC.prototype.set=function(e,t){var r=this.__data__,o=RC(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this};var PC=qE(IE,"Map");function MC(e,t){var r,o,n=e.__data__;return("string"==(o=typeof(r=t))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==r:null===r)?n["string"==typeof t?"string":"hash"]:n.map}function NC(e){var t=-1,r=null==e?0:e.length;for(this.clear();++ta))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var l=-1,p=!0,h=2&r?new rI:void 0;for(i.set(e,t),i.set(t,e);++l4294966272&e,vI=e=>{let t={R:0,G:0,B:0,A:0};if("string"==typeof e&&e.startsWith("#")){const a=e.slice(1);try{if(3===a.length){const e=Array.from(a).map((e=>e.repeat(2))).map((e=>parseInt(e,16)));t={R:e[0]/255,G:e[1]/255,B:e[2]/255,A:1}}else if(6===a.length||8===a.length){var r,o,n,i,s;const e=null===(r=a.match(/\S{2}/g))||void 0===r?void 0:r.map((e=>parseInt(e,16)));t={R:(null!==(o=null==e?void 0:e[0])&&void 0!==o?o:0)/255,G:(null!==(n=null==e?void 0:e[1])&&void 0!==n?n:0)/255,B:(null!==(i=null==e?void 0:e[2])&&void 0!==i?i:0)/255,A:null!=e&&e[3]?(null!==(s=null==e?void 0:e[3])&&void 0!==s?s:0)/255:1}}}catch(t){console.warn("error color representation:",e)}}else"object"==typeof e&&(t={R:e.R/255,G:e.G/255,B:e.B/255,A:e.A||1});return t};function yI(e){let{captureWidth:t=0,captureHeight:r=0}=e||{};const{hd:o}=e||{};return 0!==t&&0!==r||(o&&Ws.isSupportSending720P()?(t=1280,r=720):(t=640,r=360)),{captureWidth:t,captureHeight:r}}function bI(e,t){return"default"===e||t.some((t=>t.deviceId===e))||[Xa.Environment,Xa.User,Xa.Left,Xa.Right].includes(e)}function SI(e,t,r){const o=[],{video:{videoSsrc:n,activeCamera:i}}=t,{cameraId:s=i,videoElement:a,originalRatio:u,ptz:c,hd:d}=r||{};let l;a&&(a.id?l=a.id:(l=bn("__ZOOM_SDK_SELF_VIDEO_@__"),a.id=l));const{captureWidth:p,captureHeight:h}=yI(r);var f,g;return e.startCaptureVideo(n,s,p,h,l,qi(),!u&&(qi()||!(null!==(f=navigator.mediaDevices)&&void 0!==f&&null!==(g=f.getSupportedConstraints)&&void 0!==g&&g.call(f).aspectRatio)||Bi()||Hi()||os()),c),o.push(oh({cameraId:s,captureWidth:p,captureHeight:h,videoDOMId:l,originalRatio:u,ptz:c,hd:d})),o}function _I(e,t,r){const{max:o,min:n,step:i}=e;let s=r/100*(o-n);i&&(s=Math.min(Math.floor(s/i)*i,Math.floor(s)));let a=t+s;return a=Math.min(o,a),a=Math.max(n,a),a}function EI(e,t){let r="",o=t;switch(e){case su.Down:o=-t,r="tilt";break;case su.Up:r="tilt";break;case su.Left:o=-t,r="pan";break;case su.Right:r="pan";break;case su.ZoomIn:r="zoom";break;case su.ZoomOut:o=-t,r="zoom"}return{key:r,range:o}}function CI(e){const t=["pan","tilt","zoom"].reduce(((t,r)=>e[r]&&0!==e[r].value?ot(ot({},t),{},{[r]:e[r].value}):t),{});return function(e){if(null==e)return!0;if(eC(e)&&(NE(e)||"string"==typeof e||"function"==typeof e.splice||lC(e)||bC(e)||aC(e)))return!e.length;var t=eI(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(rC(e))return!CC(e).length;for(var r in e)if(gI.call(e,r))return!1;return!0}(t)?null:t}function II(e){return{pan:(e&au.Pan)===au.Pan,tilt:(e&au.Tilt)===au.Tilt,zoom:(e&au.Zoom)===au.Zoom}}function AI(e){return!es()&&!e&&(Ki()||!Lg()&&("function"==typeof window.ImageCapture||ts())&&Qi())}let wI,TI;async function OI(e,t,r){const o=bn(e),n=document.createElement("img");return n.src=t,n.id=o,n.style.display="none",await new Promise(((e,o)=>{n.onload=()=>{r&&URL.revokeObjectURL(t),e("")},n.onerror=()=>{r&&URL.revokeObjectURL(t),o("Cannot load image.")}})),{imageId:o,imgElement:n}}async function RI(e,t,r){if(e===Za)return Za;{let o=e;if(t){const t=await function(e){return new Promise(((t,r)=>{try{wI&&TI||(wI=document.createElement("canvas"),TI=wI.getContext("2d"));const o=wI,n=TI;if(n){n.clearRect(0,0,wI.width,wI.height);const i=new Image;i.src=e;const s=16/9,a=1280,u=Math.floor(a/s);o.width=a,o.height=u,i.onload=()=>{const{width:e,height:r}=i,c=r*s;if(c>e){const t=e,o=Math.floor(e/s),c=0,d=(r-o)/2;null==n||n.drawImage(i,c,d,t,o,0,0,a,u)}else{const t=c,o=r,s=(e-t)/2,d=0;n.drawImage(i,s,d,t,o,0,0,a,u)}o.toBlob((e=>{t(e)}))},i.onerror=()=>{r("Cannot load image.")}}}catch(e){e instanceof DOMException&&e.code===DOMException.SECURITY_ERR&&console.error("Image is not from the same origin, add CORS header to solve this issue"),r(e)}}))}(e);o=URL.createObjectURL(t)}if(o){const{imageId:e,imgElement:n}=await OI("__ZOOM_SDK_VIRTUAL_BACKGROUND_IMAGE_@__",o,!!t);return(null!=r?r:document.body).appendChild(n),e}}return null}async function kI(e,t,r){var o;const n=null!==(o=r&&r.parentNode)&&void 0!==o?o:document.body,{imageUrl:i,cropped:s,rootWidth:a,rootHeight:u}=e;let c=e;!t.video.customizedVideoOption||e.captureWidth&&e.captureHeight||(c=t.video.customizedVideoOption);const{captureWidth:d,captureHeight:l}=yI(c),p=document.createElement("div");let h;p.style.display="none",h=i?await RI(i,s,p):null;let f=bn("__ZOOM_SDK_VIRTUAL_BACKGROUND_CANVAS_@__");if(r){const t=Ng(r);t.id?f=t.id:t.id=f;try{a&&r.width!==a&&(r.width=a),u&&r.height!==u&&(r.height=u)}catch(e){console.warn("Cannot set the canvas width/height, and pay attention the canvas dimension is different from the setting")}}else{const e=document.createElement("canvas");e.width=null!=a?a:380,e.height=null!=u?u:214,e.id=f,p.appendChild(e)}return null==n||n.appendChild(p),{captureWidth:d,captureHeight:l,imageId:h,canvasId:f,divElement:p}}async function DI(e,t,r,o){const n=Array.isArray(e)?e:e&&[e];if((null==n?void 0:n.length)>0){wI&&TI||(wI=document.createElement("canvas"),TI=wI.getContext("2d"));const i=wI,s=TI;if(i.width=t,i.height=r,s)try{s.fillStyle="#fff",s.clearRect(0,0,t,r);for(let e=0;e{a.onload=()=>{e("")},a.onerror=()=>{t()}}));const{width:u,height:c}=a;s.drawImage(a,0,0,u,c,o,i,r,n)}}const e=await new Promise((e=>{null==i||i.toBlob((t=>{e(t)}))}));if(e){const t=URL.createObjectURL(e),{imageId:r,imgElement:n}=await OI("__ZOOM_SDK_MASK_CLIP_@__",t,!0);return(null!=o?o:document.body).appendChild(n),r}}catch(e){e instanceof DOMException&&e.code===DOMException.SECURITY_ERR&&console.error("Image is not from the same origin, add CORS header to solve this issue")}}return null}function PI(e,t){if(e===t)return!0;if(null==e&&null==t)return!0;const r=Array.isArray(e)?[...e]:[e],o=Array.isArray(t)?[...t]:[t];if(r.length!==o.length)return!1;const n=(e,t)=>e.typee)))}(i).toPromise().then((i=>i?o||!s&&e.imageUrl!==Za&&e.imageUrl?async function(e,t,r,o){const{canvasId:n,imageId:i,captureHeight:s,captureWidth:a,divElement:u}=await kI(e,r,o),{cameraId:c}=e,{video:{videoSsrc:d,activeCamera:l}}=r;return t.startVirtualBackgroundSetting(n,i,d,null!=c?c:l,a,s),u}(e,t,r,o).then((e=>n?Yp(!0):Pd(Du,1).toPromise().then((r=>{var n;return o||t.stopVirtualBackgroundSetting(),r?(null==e||null===(n=e.parentNode)||void 0===n||n.removeChild(e),!0):Promise.reject("Cannot access the virtual background image.")})))):a===e.imageUrl&&u===lu.VirtualBackground&&!c||async function(e,t,r){const{imageUrl:o,cropped:n}=e;if(o){const e=await RI(o,n);e&&(r.video.backgroundMode===lu.Mask&&(t.stopMaskSetting(!0),await yn((()=>{t.stopVirtualBackgroundSetting()}),0)),t.updateVirtualBackgroundImage(e),e!==Za&&setTimeout((()=>{Ag(e)}),0))}else t.updateVirtualBackgroundImage(null)}(e,t,r):Promise.reject("Cannot load virtual background model.")))}function NI(e,t,r,o){const{video:{mask:{isMaskConfigured:n,imageSrc:i,clip:s},backgroundMode:a,isCurrentUserStartedVideo:u},meeting:{isCurrentUserStartVideoBeforeReset:c}}=r;return o||!n&&e.imageUrl?async function(e,t,r,o){const{canvasId:n,imageId:i,captureHeight:s,captureWidth:a,divElement:u}=await kI(e,r,o),{cameraId:c,clip:d,rootWidth:l=1280,rootHeight:p=720}=e,h=d?await DI(d,l,p,u):null,{video:{videoSsrc:f,activeCamera:g}}=r;return i&&h?(t.startMaskSetting(n,i,h,f,null!=c?c:g,l,p,a,s),u):Promise.reject("image or clip is empty")}(e,t,r,o).then((e=>u?fh(!0):Pd(xu,1).toPromise().then((r=>{var n;return o||t.stopMaskSetting(),r?(null==e||null===(n=e.parentNode)||void 0===n||n.removeChild(e),!0):Promise.reject("Cannot set video mask")})))):a===lu.Mask&&e.imageUrl===i&&PI(e.clip,s)&&!c?Promise.resolve(!0):async function(e,t,r){const{imageUrl:o,cropped:n,clip:i,rootWidth:s,rootHeight:a}=e,{video:{mask:{imageSrc:u,cropped:c,clip:d},backgroundMode:l}}=r;if(o){if(l===lu.VirtualBackground&&(t.stopVirtualBackgroundSetting(!0),await yn((()=>{t.stopMaskSetting()}),0)),o!==u||n!==c){const e=await RI(o,n);e&&(t.updateMaskBackgroundImage(e),setTimeout((()=>{Ag(e)}),0))}if(!PI(i,d)&&i&&s&&a){const e=await DI(i,s,a);e&&(t.updateMaskClip(e,s,a),setTimeout((()=>{Ag(e)}),0))}}else t.updateMaskBackgroundImage(null),t.updateMaskClip(null,s,a)}(e,t,r)}const LI=Ls.createAgent(),VI=Ws.getInstance();var UI=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>No(e,ka.StartVideoCaptureSuccess).pipe(Pe((e=>{const{video:{cameraDevicesList:r,activeCamera:o,ptz:n,isCurrentUserStartedVideo:i},meeting:{userId:s}}=t.value,{payload:{data:{currentDeviceID:a,PTZRange:u}}}=e,c=[];if(r.length<1&&(Rd(vu,{reason:"Cannot detect camera devices"}),VI.stopCaptureVideo()),bI(o,r)){if(i||LI.muteAttendeeVideo(s,!1),a&&u&&c.push(ih({deviceId:a,ptzRange:u})),o!==a&&c.push(Pp(a)),Object.prototype.hasOwnProperty.call(n,a)){const e=n[a];if(e){const t=CI(e);t&&VI.movePTZCamera(t)}}}else Rd(yu,{reason:"cannot find target camera"}),VI.stopCaptureVideo();return Oe(c)}))),startVideoResponse:(e,t)=>ko(e,ms).pipe(or(t),Ke((e=>{var t,r,o,n;let[i,s]=e;const a=s.meeting.userId;return(null==i||null===(t=i.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(o=r.update)||void 0===o||null===(n=o[0])||void 0===n?void 0:n.id)===a})),Ke((e=>{var t,r,o,n;let[i]=e;return!0===(null==i||null===(t=i.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(o=r.update)||void 0===o||null===(n=o[0])||void 0===n?void 0:n.bVideoOn)})),fg((()=>(Rd(Cu),Mp(!0))))),handleForbiddenCaptureVideoEpic:e=>No(e,ka.UserForbiddedCaptureVideo).pipe(Zt((()=>Rd(bu))),kt(Lp(!0))),handleCameraIsTakenByOtherProgramsEpic:e=>No(e,ka.UserCameraIsTakenByOtherPrograms).pipe(Zt((()=>Rd(Su,{reason:"User camera is taken by other programs."}))),kt(xp(!0))),handleVideoSocketErrorEpic:e=>No(e,ka.VideoWebsocketBroken).pipe(Zt((()=>{Rd(Eu,{reason:"Video websocket broken."})})),Vt(W)),handleStopVideoCaptureFailedEpic:e=>No(e,ka.StopVideoCaptureFailed).pipe(Zt((()=>{Rd(Iu,{failed:!0,reason:"Unknown."})})),Vt(W)),handleStopVideoCaptureSuccessEpic:(e,t)=>No(e,ka.StopVideoCaptureSuccess).pipe(or(t),fg((e=>{let[,t]=e;const{meeting:{userId:r},video:{isCurrentUserStartedVideo:o}}=t;o||Rd(Iu),LI.muteAttendeeVideo(r,!0)}))),stopVideoResponse:(e,t)=>ko(e,ms).pipe(or(t),Ke((e=>{var t,r,o,n;let[i,s]=e;const a=s.meeting.userId;return(null==i||null===(t=i.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(o=r.update)||void 0===o||null===(n=o[0])||void 0===n?void 0:n.id)===a})),Ke((e=>{var t,r,o,n;let[i]=e;return!1===(null==i||null===(t=i.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(o=r.update)||void 0===o||null===(n=o[0])||void 0===n?void 0:n.bVideoOn)})),fg((()=>(Rd(Iu),Mp(!1))))),receiveVideoMuteIndication:(e,t)=>ko(e,16133).pipe(or(t),Ke((e=>{var t,r;let[o,n]=e;return(null==o||null===(t=o.payload)||void 0===t||null===(r=t.body)||void 0===r?void 0:r.id)===n.meeting.userId})),fg((e=>{let[t]=e;const{id:r,bVideoMute:o}=t.payload.body;return Rd(hu,{id:r,isVideoMuted:o}),!0===o&&VI.stopCaptureVideo(),!1===o&&Rd(fu,{id:r,isVideoMuted:o}),Up(o)}))),receiveVideoActiveIndication:e=>ko(e,16129).pipe(ye((e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,o=mI(t);return Rd(pu,{bVideoOn:r,userId:o}),kp({bVideoOn:r,userId:o})}))),receiveVideoSsrcIndication:(e,t)=>ko(e,16131).pipe(Ke((e=>void 0!==e.payload.body.ssrc)),Wt((e=>{const{payload:{body:{ssrc:r}}}=e;return Ge(Q(Rp(r)),Pg(t).pipe(Pe((e=>{const{meeting:{isCurrentUserStartVideoBeforeReset:r},media:{videoEncodeStatus:o}}=t.value;return!0!==(null==e?void 0:e.bVideoOn)&&!0===r?Dg("video",o,"success").pipe(Ke((e=>{let[t,r]=e;return t&&r})),ye((()=>{const e=t.value,{video:{backgroundMode:r,mask:o,virtualBackground:n,activeCamera:i,customizedVideoOption:s}}=e;let a=Promise.resolve(!0);return r===lu.VirtualBackground&&n.imageSrc?a=MI({imageUrl:n.imageSrc,cropped:n.cropped},VI,e):r===lu.Mask&&o.imageSrc&&o.clip&&(a=NI({imageUrl:o.imageSrc,cropped:o.cropped,clip:o.clip,rootHeight:o.rootHeight,rootWidth:o.rootWidth},VI,e)),a.then((()=>{SI(Ws.getInstance(),e,ot({cameraId:i},s))})),di(void 0)}))):W}))))}))),receiveVideoDecodeMaxSizeEpic:(e,t)=>No(e,ka.VideoDecodeMaxSize).pipe(Ke((e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data})),ye((e=>{const{size:r}=e.payload.data,{video:{renderedVideoList:o,receivedVideoMaxQuality:n}}=t.value,i=o.filter((e=>e.videoQuality>=Ba.Video_720P));return n!==r&&i.length>0&&(r!==Ba.Video_720P&&n!==Ba.Video_720P||i.forEach((e=>{LI.subscribeVideo(e.userId,e.videoQuality,!1)}))),Vp(r)}))),spotlightVideoResponseEpic:e=>ko(e,16135).pipe(ye((e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,o=[];return t&&o.push(mI(r)),Rd(Au,{spotlightList:o}),Np(o)}))),handleGroupLayoutIndicationEpic:(e,t)=>ko(e,7958).pipe(or(t),ye((e=>{let[t,r]=e;const{payload:{body:o}}=t;let n=[];o&&o.group_list&&o.group_list[0]&&(n=o.group_list[0].map((e=>e.id)));const i=yl(r);return n=n.filter((e=>i.findIndex((t=>t.userId===e))>=0)),Rd(Au,{spotlightList:n}),Np(n)}))),handleCurrentVideoResolution:e=>No(e,ka.CurrentVideoResolution).pipe(fg((e=>(Rd(gu,e.payload.data),Bp(e.payload.data))))),handleVideoWidthHeightEpic:e=>No(e,[ka.CurrentVideoResolution,ka.CurrentCaptureVideoWidthHeight]).pipe(Ke((e=>!!e.payload.data)),ye((e=>{const{payload:{data:t,type:r}}=e;return r===ka.CurrentVideoResolution?(Rd(gu,t),Bp(t)):(Rd(mu,t),vh(t))}))),handleMeetingVideoAttributeEpic:e=>ko(e,vs).pipe(Ke((e=>{const{payload:{body:t}}=e;return void 0!==(null==t?void 0:t.bFollowHostVideo)||void 0!==(null==t?void 0:t.VideoHd)||void 0!==(null==t?void 0:t.bCanUnmuteVideo)})),ye((e=>{const{payload:{body:{bFollowHostVideo:t,VideoHd:r,bCanUnmuteVideo:o}}}=e;return void 0!==t?(Rd(wu,{bOn:t}),$p(t)):void 0!==o?Qp(o):(VI.enableHardwareAccelerationForVideoEncode(!1),qp(1===r))}))),handleHostDragLayoutIndicationEpic:(e,t)=>ko(e,7957).pipe(or(t),ye((e=>{let[t,r]=e;const{video:{isFollowHostVideoLayout:o}}=r,{payload:{body:n}}=t,i=n&&n.drag_list&&n.drag_list.map((e=>e.id));return o&&Rd(Tu,{layout:i}),Gp(i)}))),handlePeerVideoStateChangeEpic:(e,t)=>ko(e,ms).pipe(or(t),Ke((e=>{let[t,r]=e;const{meeting:{userId:o},video:{subscribedVideoList:n}}=r,i=t.payload.body.update,s=t.payload.body.remove;return i&&i.length>0&&i.findIndex((e=>e.id!==o&&(void 0!==e.bVideoOn||e.bHold)))>-1||s&&s.some((e=>n.includes(e.id)))})),Zt((e=>{let[t,r]=e;const{payload:{body:{remove:o,update:n}}}=t,{video:{subscribedVideoList:i}}=r,s=vl(r);if(o&&o.length>0&&o.filter((e=>i.includes(e.id))).forEach((e=>{Rd(Ru,{userId:e.id})})),n&&n.length>0){const e=n.filter((e=>void 0!==e.bVideoOn)).filter((e=>-1===s.findIndex((t=>t.userId===e.id)))),t=n.filter((e=>!0===e.bHold));t.length>0&&t.filter((e=>i.includes(e.id))).forEach((e=>{Rd(Ru,{userId:e.id})})),e.forEach((e=>{e.bVideoOn?Rd(Ou,{userId:e.id}):Rd(Ru,{userId:e.id})}))}})),Vt(W)),handleVideoQosDataEpic:(e,t)=>No(e,ka.VideoQosData).pipe(or(t),ye((e=>{var t;let[r,o]=e;const{video:{isCaptureForbidden:n,isCameraTaken:i},media:{videoEncodeStatus:s,videoDecodeStatus:a}}=o,u=hl(o),c=El(o),d=c.length>0,l=(null==u?void 0:u.bVideoOn)&&!n&&!i,p=c.some((e=>e.bVideoOn)),h="success"===s&&l&&d,f="success"===a&&d&&p;return null!==(t=r.payload.data)&&void 0!==t&&t.encoding?h?(Rd(Pu,r.payload),eh(r.payload)):eh(nu):f?(Rd(Pu,r.payload),th(r.payload)):th(nu)}))),handleVideoCellChangeEpic:e=>No(e,[66.5,66.6]).pipe(Zt((e=>{const{payload:{type:t,data:r}}=e;if(66.5===t){const{ssrc:e,width:t,height:o,quality:n}=r;Rd(Mu,{userId:e,width:t,height:o,quality:n})}else if(66.6===t){const{ssrc:e,fps:t}=r;Rd(Mu,{userId:e,fps:t})}})),Vt(W)),handleMaximumNumberOfHDSubscriptionsEpic:e=>e.pipe(ar(`${go}`),Pe((async()=>qi()?1:await Ws.isSupportVideoDecodeHardwareAcceleration()?4:1)),ye((e=>Jp(e)))),handleNetworkQualityChangeEpic:(e,t)=>No(e,ka.NetworkQualityChange).pipe(Ke((e=>!!e.payload.data)),Pe((e=>{var r;const{payload:{data:{bwLevel:o,isUplink:n,networkLevel:i}}}=e,s=[],{meeting:{userId:a},video:{networkQuality:u,subscribedVideoList:c,networkQualityBroadcastTime:d}}=t.value,l=n?"uplink":"downlink";s.push(nh({userId:a,level:i,bwLevel:o,type:l}));const p=mn(null===(r=u[`${a}`])||void 0===r?void 0:r[l],{level:i,bwLevel:o});if(!p&&-1!==i){(!n&&c.filter((e=>e!==a)).length>0||n)&&Rd(Nu,{userId:a,type:l,level:i})}if(n){const e=performance.now();(!p||e-(null!=d?d:0)>3e4)&&(LI.broadcastUserNetworkQuality({isUplink:n,level:i,bwLevel:o}),s.push(hh(e)))}return Oe(s)}))),handleOthersNetworkQualityChangeEpic:(e,t)=>Mo(e,8005).pipe(Ke((e=>{var t;return!(null===(t=e.payload.body)||void 0===t||!t.nUserID)})),Pe((e=>{const{payload:{body:{nLevel:r,nUserID:o}}}=e,{video:{networkQuality:n}}=t.value,i=n[`${o}`],s=[];return i&&i.uplink.level===r||(Rd(Nu,{userId:o,level:r,type:"uplink"}),s.push(nh({userId:o,level:r,type:"uplink"}))),Oe(s)}))),handleCameraConnectedIndicationEpic:(e,t)=>e.pipe(ar(`${Dp}`),Zt((e=>{const{payload:r}=e,o=t.value,{meeting:{userId:n}}=o,i=hl(o);0===r.length?i&&!i.bVideoConnect||LI.connectCamera(n,!1):null!=i&&i.bVideoConnect||LI.connectCamera(n,!0)})),Vt(W))}),jI=Object.freeze({__proto__:null,handleVBPreloadEpic:e=>No(e,[ka.VbModelPreloadingOk,ka.VbModelPreloading_3S,ka.VbModelPreloading_10S,ka.VbSettingParaError]).pipe(Pe((e=>{const{payload:{type:t,data:r}}=e,o=[];return[ka.VbModelPreloadingOk,ka.VbModelPreloading_3S,ka.VbModelPreloading_10S].includes(t)?(o.push(Zp(!0)),Rd(ku,!0),t===ka.VbModelPreloading_10S&&console.warn("Virtual Background is taking longer than expected to load.")):t===ka.VbSettingParaError&&(r===Qa.VBModelNotMatch?(Rd(ku,!1),o.push(Zp(!1))):(Rd(Du,!1),o.push(Yp(!1)))),Oe(o)}))),handleVBSettingSuccessEpic:e=>No(e,ka.StartVideoStreamInVbSettingSuccess).pipe(ye((()=>(Rd(Du,!0),Yp(!0))))),handleMaskSettingSuccessEpic:e=>No(e,ka.StartVideoStreamInMaskSettingSuccess).pipe(ye((()=>(Rd(xu,!0),fh(!0))))),handleMaskSettingFailedEpic:e=>No(e,ka.MaskSettingParaError).pipe(ye((()=>(Rd(xu,!1),fh(!1)))))});const xI=Ls.createAgent(),FI=Ws.getInstance();var BI=Object.freeze({__proto__:null,handleRemoteCameraControlEpic:(e,t)=>ko(e,8004).pipe(Pe((e=>{const{payload:{body:{nCmd:r,nUserID:o,nReason:n,nButtonID:i}}}=e,s=t.value,a=yl(s),{video:{currentCameraControlStatus:{isInControl:u,controllingUserId:c},cameraDevicesList:d,activeCamera:l}}=s,p=a.find((e=>vn(e.userId,o))),h=[];if(h.push(sh(!0)),r===iu.Request){const e={userId:null==p?void 0:p.userId,displayName:null==p?void 0:p.displayName};if(u){const t=a.find((e=>e.userId===c));Object.assign(e,{currentControllingUserId:null==t?void 0:t.userId,currentControllingDisplayName:null==t?void 0:t.displayName})}Rd(Lu,e)}else if(r===iu.Approve)h.push(uh(null==p?void 0:p.userId)),Rd(Vu,{isApproved:!0,userId:null==p?void 0:p.userId,displayName:null==p?void 0:p.displayName});else if(r===iu.Decline)h.push(ch(null==p?void 0:p.userId)),Rd(Vu,{isApproved:!1,userId:null==p?void 0:p.userId,displayName:null==p?void 0:p.displayName,reason:n});else if(r===iu.GiveUp)h.push(ah({isInControl:!1,userId:0})),Rd(Uu,{isControlled:!1});else if(r===iu.StartControl||r===iu.StopControl)h.push(dh({cmd:r===iu.StartControl?"start":"stop",type:i}));else if(r===iu.SwitchCamera){const e=d.findIndex((e=>e.deviceId===l)),t=e+1===d.length?0:e+1;if(t!==e){const e=d[t].deviceId;FI.changeCamera(e)}}return Oe(h)}))),handleFarEndCameraCapabilityEpic:(e,t)=>ko(e,ms).pipe(Ke((e=>{var t;const{payload:{body:r}}=e;return null==r||null===(t=r.update)||void 0===t?void 0:t.some((e=>void 0!==e.nFECC||void 0!==e.nFECCExecutive))})),Zt((e=>{const{payload:{body:{update:r}}}=e,o=r.find((e=>void 0!==e.nFECC||void 0!==e.nFECCExecutive));if(o){const{meeting:{userId:e}}=t.value;vn(o.nFECCExecutive,e)&&Rd(ju,{userId:o.id,ptz:II(o.nFECC)})}})),Vt(W)),handleFarEndCameraUserLeftEpic:(e,t)=>ko(e,ms).pipe(Ke((e=>{var r;const{payload:{body:o}}=e,{video:{farEndCameraControlStatus:{controlledUserList:n}}}=t.value;return null==o||null===(r=o.remove)||void 0===r?void 0:r.some((e=>n.includes(e.id)))})),Pe((e=>{var r;const{payload:{body:o}}=e,n=[],{video:{farEndCameraControlStatus:{controlledUserList:i}}}=t.value,s=null==o||null===(r=o.remove)||void 0===r?void 0:r.find((e=>i.includes(e.id)));return s&&n.push(ch(s.id)),Oe(n)}))),handleFarEndCameraActionEpic:(e,t)=>e.pipe(ar(`${dh}`),Wt((e=>{const{payload:{cmd:r,type:o}}=e;return"start"===r?et(0,200).pipe(qt((()=>!!t.value.video.currentCameraControlStatus.isCameraMoving)),Pe((()=>{const{video:{ptz:e,activeCamera:r}}=t.value,n=e[r],i=CI(n)||{},{key:s,range:a}=EI(o,2);return n[s]?(Object.assign(i,{[s]:_I(n[s].capability,n[s].value,a)}),FI.movePTZCamera(i).then((()=>lh({deviceId:r,constraints:i})))):Promise.resolve(void 0)})),Pe((e=>"object"==typeof e&&void 0!==e.type?Q(e):W))):W}))),handleSendCapabilityWhenActiveCameraChangeEpic:(e,t)=>e.pipe(ar(`${Pp}`),Pe((e=>{const{payload:r}=e,{video:{customizedVideoOption:o,ptz:n}}=t.value;if(null!=o&&o.ptz){const e=null==n?void 0:n[r];void 0!==e&&xI.sendCameraAblity({pan:!!e.pan,tilt:!!e.tilt,zoom:!!e.zoom})}return W})))});const HI={videoSsrc:0,cameraDevicesList:[],activeCamera:qi()?Xa.User:"default",activeVideoId:0,isCurrentUserStartedVideo:!1,spotlightUserList:[],isCaptureForbidden:!1,receivedVideoMaxQuality:navigator.hardwareConcurrency>=8?Ba.Video_720P:Ba.Video_360P,subscribedVideoList:[],renderedVideoList:[],ensuredCanvas:[],isVideoMuted:!1,isCaptureCameraLoading:!1,isCameraTaken:!1,receivedVideoDimension:{width:0,height:0},capturedVideoDimension:{width:0,height:0},isFollowHostVideoLayout:!1,hostDragLayout:[],isSupportHDVideo:!1,bCanUnmuteVideo:!1,virtualBackground:{isVBConfigured:!1,isVBPreloadReady:void 0,imageSrc:void 0,cropped:void 0},mask:{imageSrc:void 0,cropped:void 0,clip:void 0},backgroundMode:lu.Null,statistic:{encode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0},decode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0}},hardwareAcceleration:{encode:!1,decode:!1},networkQuality:{},ptz:{},currentCameraControlStatus:{isRequested:!1,isInControl:!1,isCameraMoving:!1},farEndCameraControlStatus:{controlledUserList:[],isControlling:!1}},WI=Zr({[`${Rp}`]:Fm(((e,t)=>{let{payload:r}=t;e.videoSsrc=r})),[`${Dp}`]:Fm(((e,t)=>{let{payload:r}=t;e.cameraDevicesList=r})),[`${Pp}`]:Fm(((e,t)=>{let{payload:r}=t;const o=e.activeCamera;if(o in e.ptz){const t=e.ptz[o];["pan","tilt","zoom"].forEach((e=>{t[e]&&(t[e].value=0)}))}e.activeCamera=r})),[`${kp}`]:Fm(((e,t)=>{let{payload:r}=t;e.activeVideoId=r.userId})),[`${Mp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isCurrentUserStartedVideo=r})),[`${Np}`]:Fm(((e,t)=>{let{payload:r}=t;e.spotlightUserList=r})),[`${Lp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isCaptureForbidden=r})),[`${Vp}`]:Fm(((e,t)=>{let{payload:r}=t;e.receivedVideoMaxQuality=r})),[`${Up}`]:Fm(((e,t)=>{let{payload:r}=t;e.isVideoMuted=r})),[`${jp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isCaptureCameraLoading=r})),[`${xp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isCameraTaken=r})),[`${Bp}`]:Fm(((e,t)=>{let{payload:r}=t;e.receivedVideoDimension=r})),[`${Hp}`]:Fm(((e,t)=>{let{payload:r}=t;e.subscribedVideoList.includes(r)||e.subscribedVideoList.push(r)})),[`${Wp}`]:Fm(((e,t)=>{let{payload:r}=t;const o=e.subscribedVideoList.indexOf(r);o>=0&&e.subscribedVideoList.splice(o,1)})),[`${zp}`]:Fm(((e,t)=>{let{payload:r}=t;const o=e.renderedVideoList.find((e=>e.userId===r.userId&&e.key===r.key&&e.canvasId===r.canvasId));o?o.videoQuality=r.videoQuality:e.renderedVideoList.push(ot({},r))})),[`${Kp}`]:Fm(((e,t)=>{let{payload:r}=t;const o=e.renderedVideoList.findIndex((e=>e.userId===r.userId&&e.key===r.key&&e.canvasId===r.canvasId));o>=0&&e.renderedVideoList.splice(o,1)})),[`${$p}`]:Fm(((e,t)=>{let{payload:r}=t;e.isFollowHostVideoLayout=r})),[`${Gp}`]:Fm(((e,t)=>{let{payload:r}=t;e.hostDragLayout=r})),[`${qp}`]:Fm(((e,t)=>{let{payload:r}=t;e.isSupportHDVideo=r})),[`${Jp}`]:Fm(((e,t)=>{let{payload:r}=t;e.maximumNumbeOfHDSubscriptions=r})),[`${Qp}`]:Fm(((e,t)=>{let{payload:r}=t;e.bCanUnmuteVideo=r})),[`${Zp}`]:Fm(((e,t)=>{let{payload:r}=t;e.virtualBackground.isVBPreloadReady=r})),[`${Yp}`]:Fm(((e,t)=>{let{payload:r}=t;e.virtualBackground.isVBConfigured=r})),[`${Xp}`]:Fm(((e,t)=>{let{payload:r}=t;e.virtualBackground.imageSrc=r.imageUrl,e.virtualBackground.cropped=r.cropped,e.backgroundMode=lu.VirtualBackground})),[`${rh}`]:Fm(((e,t)=>{let{payload:r}=t;const{encode:o,decode:n}=r;void 0!==o&&(e.hardwareAcceleration.encode=o),void 0!==n&&(e.hardwareAcceleration.decode=n)})),[`${eh}`]:Fm(((e,t)=>{let{payload:r}=t;e.statistic.encode=r.data})),[`${th}`]:Fm(((e,t)=>{let{payload:r}=t;e.statistic.decode=r.data})),[`${oh}`]:Fm(((e,t)=>{let{payload:r}=t;const{cameraId:o,captureWidth:n,captureHeight:i,videoDOMId:s,originalRatio:a,ptz:u,hd:c}=r;e.activeCamera=o,e.customizedVideoOption={captureWidth:n,captureHeight:i,videoDOMId:s,originalRatio:a,ptz:u,hd:c}})),[`${nh}`]:Fm(((e,t)=>{let{payload:r}=t;const{userId:o,level:n,bwLevel:i,type:s}=r;if(Object.prototype.hasOwnProperty.call(e.networkQuality,`${o}`))e.networkQuality[`${o}`][`${s}`]={level:n,bwLevel:i};else{const t={[s]:{level:n,bwLevel:i}};Object.assign(e.networkQuality,{[`${o}`]:t})}})),[`${ih}`]:Fm(((e,t)=>{let{payload:r}=t;const{deviceId:o,ptzRange:n}=r;if(Object.prototype.hasOwnProperty.call(e.ptz,o)){const t=e.ptz[o];t&&["pan","tilt","zoom"].forEach((e=>{const r=n[e];if(r){var o;const n=null===(o=t[e])||void 0===o?void 0:o.capability;n?Object.assign(n,ot({},r)):t[e]={capability:ot({},r),value:0}}}))}else Object.assign(e.ptz,{[o]:{pan:n.pan?{capability:ot({},n.pan),value:0}:null,tilt:n.tilt?{capability:ot({},n.tilt),value:0}:null,zoom:n.zoom?{capability:ot({},n.zoom),value:0}:null}})})),[`${sh}`]:Fm(((e,t)=>{let{payload:r}=t;e.currentCameraControlStatus.isRequested=r})),[`${ah}`]:Fm(((e,t)=>{let{payload:r}=t;const{isInControl:o,userId:n}=r;e.currentCameraControlStatus.isInControl=o,e.currentCameraControlStatus.controllingUserId=n})),[`${uh}`]:Fm(((e,t)=>{let{payload:r}=t;e.farEndCameraControlStatus.controlledUserList.includes(r)||e.farEndCameraControlStatus.controlledUserList.push(r)})),[`${ch}`]:Fm(((e,t)=>{let{payload:r}=t;const o=e.farEndCameraControlStatus.controlledUserList.indexOf(r);-1!==o&&e.farEndCameraControlStatus.controlledUserList.splice(o,1)})),[`${dh}`]:Fm(((e,t)=>{let{payload:r}=t;e.currentCameraControlStatus.isCameraMoving="start"===r.cmd})),[`${lh}`]:Fm(((e,t)=>{let{payload:r}=t;const{constraints:o,deviceId:n}=r,i=e.ptz[n];["pan","tilt","zoom"].forEach((e=>{void 0!==o[e]&&(i[e].value=o[e])}))})),[`${ph}`]:Fm(((e,t)=>{let{payload:r}=t;e.farEndCameraControlStatus.isControlling=r})),[`${hh}`]:Fm(((e,t)=>{let{payload:r}=t;e.networkQualityBroadcastTime=r})),[`${fh}`]:Fm(((e,t)=>{let{payload:r}=t;e.mask.isMaskConfigured=r})),[`${mh}`]:Fm(((e,t)=>{let{payload:r}=t;const{imageUrl:o,cropped:n,rootHeight:i,rootWidth:s,clip:a}=r;e.mask.imageSrc=o,e.mask.cropped=n,e.mask.clip=a,e.mask.rootWidth=s,e.mask.rootHeight=i,e.backgroundMode=lu.Mask})),[`${gh}`]:Fm(((e,t)=>{let{payload:r}=t;e.backgroundMode=r})),[`${vh}`]:Fm(((e,t)=>{let{payload:r}=t;e.capturedVideoDimension=r})),[`${yh}`]:Fm(((e,t)=>{let{payload:r}=t;e.ensuredCanvas.includes(r)||e.ensuredCanvas.push(r)})),[`${Fp}`]:(e,t)=>{let{payload:r}=t;const o={cameraDevicesList:e.cameraDevicesList};return r&&Object.assign(o,{activeCamera:e.activeCamera,customizedVideoOption:e.customizedVideoOption,virtualBackground:{imageSrc:e.virtualBackground.imageSrc,cropped:e.virtualBackground.cropped},mask:{imageSrc:e.mask.imageSrc,cropped:e.mask.cropped,rootWidth:e.mask.rootWidth,rootHeight:e.mask.rootHeight,clip:e.mask.clip},backgroundMode:e.backgroundMode,ptz:e.ptz}),ot(ot({},HI),o)}},HI),$I=Ro(UI,jI,BI),{InitSuccessVideo:GI,InitSuccessAudio:zI,InitSuccessSharing:KI,InitFailedVideo:qI,InitFailedAudio:JI,InitFailedSharing:QI}=ka;let ZI;var YI=Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(ar(`${go}`),or(t),Ke((e=>{let[,t]=e;return void 0!==t.media.assetsPath&&void 0!==t.media.mediaConstraints})),Zt((e=>{let[,r]=e;const{media:{assetsPath:o,mediaConstraints:n,fileWithVersion:i,enforceMultipleVideos:s,enforceVirtualBackground:a,isEnableDecoderInWorklet:u},meeting:{enableAudioQos:c,enableVideoQos:d}}=r;if(ZI=Ws.getInstance(),ZI.notifySDKMeetingReady(),o&&n){const e={enableDecoderInWorklet:u};Qi()&&"function"!=typeof window.SharedArrayBuffer&&Object.assign(e,{enableMultiDecodeVideoWithoutSAB:!!s,enableVirtualBackgroundWithoutSAB:!!a}),Fg(a)&&Object.assign(e,{resourceManager:tE.exports.IResourceManager,file:[{path:`${o}/vb-resources/vbbuffer.bin`,type:"bin"},{path:`${o}/vb-resources/tf.min.js`,type:"js"}]}),ZI.setAssetsAndConstraint(o,n,i,e)}Pg(t).pipe(or(t)).subscribe((e=>{let[t,r]=e;const{meeting:{svcUrl:o,meetingNumber:n,conId:i,e2eEncrypt:s,userId:a,isWebinar:u}}=r;var l;t&&(null===(l=ZI)||void 0===l||l.connect({svcUrl:o,meetingNumber:n,conId:i,e2eEncrypt:s,isViewOnly:sl(t.userRole),currentUserId:a,isWebinar:u,enableAudioQos:c,enableVideoQos:d}))}))})),Wt((()=>Be((e=>{var t;return null===(t=ZI)||void 0===t?void 0:t.registerCallback(e)}),(e=>{var t;return null===(t=ZI)||void 0===t?void 0:t.unregisterCallback(e)}),((e,t)=>({type:e,data:t}))).pipe(ye((e=>mo(e))))))),connectedMediaStreamEpic:e=>No(e,[GI,zI,KI,qI,JI,QI]).pipe(gg((e=>{const{payload:{type:t,data:r}}=e;if(t===zI||t===JI){if(r===Da.EncodeSuccess)return Rd(Gc),Q(vo("success"));if(r===Da.DecodeSuccess)return Rd(zc),Q(yo("success"));if(r===Da.EncodeFailed)return Rd(Zc),Q(vo("failed"));if(r===Da.DecodeFailed)return Rd(Yc),Q(yo("failed"))}else if(t===GI||t===qI){if(r===Da.EncodeSuccess)return Rd(Kc),Q(bo("success"));if(r===Da.DecodeSuccess)return Rd(qc),Q(So("success"));if(r===Da.EncodeFailed)return Rd(Xc),Q(bo("failed"));if(r===Da.DecodeFailed)return Rd(ed),Q(So("failed"))}else if(t===KI||t===QI){if(r===Da.EncodeSuccess)return Rd(Jc),Q(_o("success"));if(r===Da.DecodeSuccess)return Rd(Qc),Q(Eo("success"));if(r===Da.EncodeFailed)return Rd(td),Q(_o("failed"));if(r===Da.DecodeFailed)return Rd(rd),Q(Eo("failed"));if(t===KI&&void 0===r)return Rd(Qc),Q(Eo("success"))}}))),mediaDeviceUpdateEpic:(e,t)=>No(e,[GI,zI]).pipe(mg((()=>{if("object"==typeof navigator.mediaDevices)return Ge(Mg(),Ge(No(e,ka.StartVideoCaptureSuccess),xe(navigator.mediaDevices,"devicechange"),No(e,ka.UserGrantCaptureAudio).pipe(Ke((()=>!t.value.audio.isUserGrantCaptureAudio)))).pipe(Pe((()=>Mg().pipe(Zt((()=>{Rd(od)}))))))).pipe(or(t),Pe((e=>{let[t,r]=e;const o=[Ul(t.microphones),jl(t.speakers),Dp(t.cameras)];if(r.audio){const{audio:{activeMicrophone:e,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:u}}=r,{microphones:c,speakers:d}=t,l=a.filter((e=>-1===c.findIndex((t=>t.deviceId===e.deviceId)))),p=u.filter((e=>-1===d.findIndex((t=>t.deviceId===e.deviceId))));var n,i;l.length>0&&l[0].deviceId===e&&(null===(n=ZI)||void 0===n||n.changeMicrophone("default"),o.push(xl("default"))),p.length>0&&p[0].deviceId===s&&(null===(i=ZI)||void 0===i||i.changeSpeaker("default"),o.push(Fl("default")))}return Oe(o)})))}))),sendUserNodeListToMediaSDKEpic:(e,t)=>Mo(e,ms).pipe(Zt((e=>{const{type:r,payload:{body:o}}=e,n=Ws.getInstance(),i=r===`${ao}`;if(o.add){const e=o.add.map((e=>({userid:e.id,sn:e.zoomID&&ln(e.zoomID)})));if(!i){const{meeting:{gcmSessinKey:r}}=t.value;n.sendUserNodeList(e,r)}n.updateUserMediaSN({added:e,isFromMainSession:i,iVType:is.SHARING_DECODE}),i&&n.updateUserMediaSN({added:e,isFromMainSession:i,iVType:is.AUDIO_DECODE})}if(o.remove){if(!i){const{meeting:{gcmSessinKey:e}}=t.value;n.sendUserNodeList(o.remove.map((e=>({userid:e.id,bremove:!0}))),e)}n.updateUserMediaSN({removed:o.remove.map((e=>e.id)),isFromMainSession:i,iVType:is.SHARING_DECODE}),i&&n.updateUserMediaSN({removed:o.remove.map((e=>e.id)),isFromMainSession:i,iVType:is.AUDIO_DECODE})}})),Vt(W)),handleMediaSdkGcmIVResponseEpic:e=>No(e,ka.AesGcmIvResponse).pipe(Zt((e=>{const{payload:{data:{workerType:t,iv:r}}}=e,o=Vi.get(us.WebclientIVState);if(o){const e=ot(ot({},o),{},{[t]:r});Vi.set(us.WebclientIVState,e,Ni.SessionStorage)}})),Vt(W)),handleMediaEncryptIndication:e=>e.pipe(ar(`${ro}`),Ke((e=>[ys,bs,gs].includes(e.payload.evt))),ye((e=>{const{payload:{evt:t,body:{encryptKey:r,additionalType:o}}}=e;return Io({type:t===ys?"audio":t===bs?"video":"sharing",encryptKey:r,additionalType:o})})))});const XI=Ro(YI),eA={meeting:y_,socket:W_,participants:Z_,media:eE},tA=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||mt;function rA(){const e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new(0,B.constructor)(B.SchedulerAction),r=new N,o=void 0,n=function(n){o=n;var i=(new N).pipe(ee(t)),s=(new N).pipe(ee(t)),a=new cr(i),u=new dr(s,o.getState());return r.pipe(ye((function(t){var r="dependencies"in e?t(a,u,e.dependencies):t(a,u);if(!r)throw new TypeError('Your root Epic "'+(t.name||"")+"\" does not return a stream. Double check you're not missing a return statement!");return r})),Pe((function(e){return Oe(e).pipe(function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new Ht(e,t))}}(t),ee(t))}))).subscribe(o.dispatch),function(e){return function(t){var r=e(t);return s.next(o.getState()),i.next(t),r}}};return n.run=function(e){r.next(e)},n}(),{epicSubject:t,rootEpic:r}=function(){const e=new V(Oo(b_,$_,Y_,XI));return{epicSubject:e,rootEpic:(t,r,o)=>e.pipe(Pe((e=>e(t,r,o))))}}(),o=[e],n=gt(oA(),tA(function(){for(var e=arguments.length,t=new Array(e),r=0;r{void 0===n.asyncReducers[e]&&(n.asyncReducers[e]=t,n.replaceReducer(oA(n.asyncReducers)))},n.injectEpic=e=>{t.next(e)},e.run(r),n}function oA(e){return function(e){for(var t=Object.keys(e),r={},o=0;oe.userId===t));if(n.findIndex((e=>e===fA.Attendee))>-1&&(i=ml(o).find((e=>e.userId===t))),!i)return Promise.reject({type:Wc,reason:"no matching user"});{const{meeting:{userId:e}}=r.getState();for(let r=0;r1?o-1:0),s=1;st.includes(r+1)?l_(e):e)):n;return r.info(`${o},params:${JSON.stringify(s)}`),i.apply(this,n).then((e=>(r.info(`${o} success`),e))).catch((e=>{let t=`${o} failed,`;return"object"==typeof e&&(t=`${t},${e.type?`type:${e.type},`:""}${e.reason?`reason:${e.reason}`:""}`),r.error(t),Promise.reject(e)}))}catch(e){}return i.apply(this,n)}}}function yA(e,t,r){return function(o,n,i){const s=i.value;i.value=function(){for(var o,n=arguments.length,i=new Array(n),a=0;a!!u[e])))?s.apply(this,i):Promise.reject({type:Wc,reason:`Expected to accept ${null==e?void 0:e.name}, but actual it is ${"object"==typeof u&&null!==u?null===(o=Object.getPrototypeOf(u))||void 0===o?void 0:o.constructor.name:u}`})}}}class bA{constructor(e){this[nA]=void 0,this[sA]=void 0,this[iA]=void 0,this[aA]=void 0,this[nA]=e,this[sA]=e.dispatch,this[iA]=e.getState}}const SA=["userId","displayName","audio","isHost","avatar","bRaiseHand","bHold","bVideoOn","sharerOn","sharerPause","feedback","bLocalRecord","strPronoun","sdkKey","audioConnectionStatus","caps","bAllowISORecord","bVideoConnect","userIdentity","isSpeakerOnly","bVideoShare","bShareAudioOn","bShareToBORooms",{from:"userGUID",to:"userGuid"},{from:"bGuest",to:"isGuest"},{from:"sharerPause",to:"sharePause"},{from:"bCoHost",to:e=>({isCoHost:!!e})},{from:"muted",to:(e,t)=>({muted:null!=t&&t.isSpeakerOnly||""===(null==t?void 0:t.audio)?void 0:e})},{from:"userType",to:e=>({isPhoneUser:nl(e)})}];function _A(e){return SA.reduce(((t,r)=>{const o="string"==typeof r?r:r.from,n=function(e,t,r){if("string"==typeof e)return{[`${e}`]:t};if("object"==typeof e&&void 0!==e.from){const{to:o}=e;return"string"==typeof o?{[`${o}`]:t}:o(t,r)}}(r,e[o],e);return ot(ot({},t),n)}),{})}var EA,CA,IA,AA;const wA=Ls.createAgent();let TA=(EA=gA(fA.Other),CA=gA(fA.Other),IA=gA(fA.Other),AA=class extends bA{constructor(e){super(e),this.modules=void 0,this.useSDK=void 0,this.useSDK=!1,this.modules=new Map}initWithSDK(e,t,r){return this.useSDK=!0,this.init(e,t,r)}init(e,t,r){const{[sA]:o,[nA]:n}=this;let i=Rg,s=(null==r?void 0:r.fileWithVersion)||!1,a="en-US",u=`${Rg}/${Ti}`;if(r){const{dependentAssets:e,additionalFeatures:t,constraints:o,language:c,webEndpoint:d}=r;if(c&&(a=c),d&&function(e){wg=function(e,t){let r=e;/^https?:\/\//.test(r)||(r=`https://${e}`);try{const e=new URL(r);if(!t)return e.href;if(t.hostname)return e.hostname;if(t.path)return e.pathname}catch(e){return""}return""}(e,{hostname:!0})}(d),e===Oi.CDN||e===Og)i=Og,u=`${Og}/${Ti}`,s=!0;else if(e===Oi.Global||e===Rg)i=Rg,u=`${Rg}/${Ti}`,s=!0;else if(e===Oi.CN||e===kg)i=kg,u=`${kg}/${Ti}`,s=!0;else if(e&&/^https?:\/\//.test(e)){let t=e;"/"===t[t.length-1]&&(t=t.slice(0,length-1)),i=t,u=s?`${t}/${Ti}`:`${t}/${wi}`}t&&Array.isArray(t)&&t.forEach((e=>{if(this[aA][e]&&void 0===n.getState()[e]){const{epic:t,reducer:r,Client:o}=this[aA][e];n.injectReducer(e,r),n.injectEpic(t);const i=new o(n);this.modules.set(e,i)}})),null!=o&&o.audio&&void 0===n.getState().audio&&(n.injectReducer("audio",SE),n.injectEpic(_E)),null!=o&&o.video&&void 0===n.getState().video&&(n.injectReducer("video",WI),n.injectEpic($I)),null!=o&&o.screen&&void 0===n.getState().share&&(n.injectReducer("share",Hm),n.injectEpic(Wm))}return o(Kn({apiKey:e,signature:t,language:a,useSDK:this.useSDK})),o(Co({mediaConstraints:r&&r.constraints||{},assetsPath:i,fileWithVersion:s,enforceMultipleVideos:null==r?void 0:r.enforceMultipleVideos,enforceVirtualBackground:null==r?void 0:r.enforceVirtualBackground})),void 0!==(null==r?void 0:r.stayAwake)&&o(bi(r.stayAwake)),new Promise(((e,t)=>{null!=r&&r.skipJsMedia?e(""):function(e,t,r){const o=document.createElement("script");o.type="text/javascript",o.readyState?o.onreadystatechange=()=>{"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,t())}:(o.onload=()=>{t()},o.onerror=()=>{r()}),o.src=e,"function"==typeof document.body.append?document.getElementsByTagName("head")[0].append(o):document.getElementsByTagName("head")[0].appendChild(o)}(u,(()=>{e("")}),(()=>{t({type:Wc,reason:"dependent assets are not accessible"})}))}))}on(e,t){((e,t)=>{const r=Ad[e];if(r){const o=Td.get(e);if(o)o.push(t),Td.set(e,o);else{const o=[t];Td.set(e,o);const n=Ge(...r.map((e=>{const{event:t,payload:r}=e;return xe(wd,t).pipe(ye((e=>r(e))),ee(le))}))).subscribe((t=>{const r=Td.get(e);r&&r.forEach((e=>{e(t)}))}));Od.push(n)}}})(e,t)}off(e,t){((e,t)=>{if(Ad[e]){const r=Td.get(e);if(Array.isArray(r)){const o=r.filter((e=>e!==t));Td.set(e,o)}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[iA]:e,[sA]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(Hn()),et(500).pipe(kt("")).toPromise()):Promise.resolve("")}end(){const{[iA]:e,[sA]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(Wn()),et(500).pipe(Zt((()=>{Md()})),kt("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[nA].getState(),{meeting:{bAllowAttendeeRename:o}}=r,n=hl(r),i=sl(n.userRole),s=fl(r);if(i)return Promise.reject({type:Bc});if(t&&t!==(null==n?void 0:n.userId)){if(s){const{participants:{attendeesList:o}}=r,n=o.find((e=>e.userId===t));if(n)return wA.rename(t,an(e),an(n.displayName)),pg(t,(t=>t.displayName===e));{const o=ml(r).find((e=>e.userId===t));if(o){const t=Ym.getInstance();return wA.rename(o.userId,an(e),an(o.displayName)),t.rename(o.jid,e),Dd(Js,(t=>{const r=t.find((e=>e.jid===o.jid));return r&&r.displayName===e}))}return Promise.reject({type:Wc,reason:"no matching user"})}}return Promise.reject({type:Bc})}return e===n.displayName?Promise.resolve():s||o?(wA.rename(n.userId,an(e),an(n.displayName)),Dd(Gs,(t=>t.displayName===e))):Promise.reject({type:Bc,reason:"host disallow rename themselves"})}makeHost(e){return wA.assignHost(e,!1),pg(e,(e=>!0===e.isHost))}makeCoHost(e){const t=this[nA].getState(),r=yl(t).find((t=>t.userId===e));return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:Wc,reason:`user:[${e}] is already co-host `}):(wA.assignHost(e,!0),pg(e,(e=>!0===e.bCoHost)))}revokeCoHost(e){const t=this[nA].getState(),r=yl(t).find((t=>t.userId===e));return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:Wc,reason:`user:[${e}] is not a co-host`}):(wA.revokeCoHost(e),pg(e,(e=>!1===e.bCoHost)))}reclaimHost(){const e=this[iA](),{meeting:{isOriginHost:t}}=e,r=hl(e);return null!=r&&r.isHost?Promise.resolve(""):t?(wA.reclaimHost(r.userId,!1),Dd(Gs,(e=>!0===e.isHost))):Promise.reject({type:Bc,reason:"You are not the origin host"})}isHost(){const e=this[nA].getState(),t=hl(e);return!!t&&t.isHost}isCoHost(){const e=this[nA].getState(),t=hl(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[iA]();return e}getCurrentUserInfo(){const e=this[nA].getState(),t=hl(e);if(t){const r=_A(t);if(e.meeting.isWebinar&&sl(t.userRole)){const{audio:t}=e,o=null==t?void 0:t.isAllowToTalk;Object.assign(r,{isAllowToTalk:o})}return r}return null}getParticipantsList(){const e=this[nA].getState(),{meeting:{meetingStatus:t}}=e,r=hl(e);return t===Di.Joined&&r&&!r.bHold?yl(e).map((e=>_A(e))):[]}getAssistantsList(){const e=this[nA].getState(),{meeting:{meetingStatus:t}}=e,r=hl(e);return t===Di.Joined&&r?bl(e).map((e=>({userId:e.userId,displayName:e.displayName,isNewAst:!0}))):[]}getMeetingHost(){var e;const t=this[iA]();let r=Sl(t);return r||(null===(e=t.breakoutRoom)||void 0===e?void 0:e.currentRoom.status)!==dl.InRoom||(r=t.breakoutRoom.mainSessionAttendeeList.find((e=>e.isHost))),void 0!==r?_A(r):null}getMeetingInfo(){const{meeting:{meetingStatus:e,isOnHold:t,meetingNumber:r,passWord:o,userName:n,userEmail:i,meetingTopic:s,meetingOptions:a,encType:u,region:c,network:d,topic:l,zlkJwtToken:p,userId:h,lang:f,inviteEmail:g,meetingId:m,participantID:v,h323Password:y,recordingDisclaimer:b,recordingDisclaimerForRecorder:S,wrInfo:_}}=this[iA](),E=e===Di.Joined&&!t;if(p)return{topic:l,password:o,userName:n,isInMeeting:E,userId:h,meetingId:m};{let e="";return 0===u?e="None":1===u?e="AES ECB":2===u&&(e="AES GCM"),{meetingNumber:r,password:o,userName:n,userEmail:i,inviteEmail:g,meetingTopic:s,encryptionType:e,region:c,network:d,isInMeeting:E,userId:h,lang:f,webEndpoint:wg,meetingId:m,participantId:v,telPwd:y,recordingInfo:{recordingDisclaimer:b,recordingDisclaimerForRecorder:S,isUserEnableRecordingReminder:null==a?void 0:a.isUserEnableRecordingReminder},wrInfo:_}}}},st(AA.prototype,"end",[lA,cA],Object.getOwnPropertyDescriptor(AA.prototype,"end"),AA.prototype),st(AA.prototype,"changeName",[cA],Object.getOwnPropertyDescriptor(AA.prototype,"changeName"),AA.prototype),st(AA.prototype,"makeHost",[EA,lA,cA],Object.getOwnPropertyDescriptor(AA.prototype,"makeHost"),AA.prototype),st(AA.prototype,"makeCoHost",[CA,lA,cA],Object.getOwnPropertyDescriptor(AA.prototype,"makeCoHost"),AA.prototype),st(AA.prototype,"revokeCoHost",[IA,lA,cA],Object.getOwnPropertyDescriptor(AA.prototype,"revokeCoHost"),AA.prototype),st(AA.prototype,"reclaimHost",[cA],Object.getOwnPropertyDescriptor(AA.prototype,"reclaimHost"),AA.prototype),AA);var OA=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>Po(e,24583).pipe(or(t),Pe((e=>{let[t,r]=e;if(r.meeting.zlkJwtToken)return W;const{payload:{body:{sn:o,senderName:n,senderJid:i,receiver:s,text:a,type:u}}}=t,c=hl(r),d=ml(r),{meeting:{jid:l,userId:p},participants:{xmppAttendeeList:h}}=r;return hs.beginDecrypt({decryptedText:a,type:as.XMPP_CHAT,zoomId:o}).then((e=>{var t;let{message:r}=e,o=null,a=0,f="";c&&sl(c.userRole)&&l===s?(o=h.find((e=>e.jid===i)),a=p,f=c.displayName):u===Cs.Panelist&&(o=d.find((e=>e.jid===i)),a=Cs.Panelist,f=Ds.displayName);const g={message:r,sender:{name:n,userId:(null===(t=o)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:f,userId:a},timestamp:(new Date).getTime()};return Rd(la,g),Mh(g)}))}))),receiveChatMessageFromRWGEpic:(e,t)=>ko(e,7944).pipe(or(t),Pe((e=>{let[t,r]=e;const{meeting:{bIbDisableChat:o,isWebinar:n},participants:{attendeesList:i}}=r,{payload:{body:{attendeeNodeID:s,sn:a,destNodeID:u,text:c,senderName:d,msgID:l}}}=t,p=hl(r),h=ml(r);if(p){const e=sl(null==p?void 0:p.userRole)&&s===p.userId&&!l;if(!o&&!e){let e,t=a;if(!a){const e=i.find((e=>e.userId===u));e&&(t=e.zoomID)}if(s===Cs.SilentModeUsers){const t=un(c),r={id:l,message:t,sender:{name:"Host",userId:u},receiver:{name:"Everyone (in Waiting Room)",userId:s},timestamp:(new Date).getTime()};e=Promise.resolve(r)}else e=hs.beginDecrypt({decryptedText:c,zoomId:t,type:as.RWG_CHAT}).then((e=>{let{message:t}=e;const r=i.find((e=>e.userId===u)),o=d?un(d):null==r?void 0:r.displayName;let a="";if(s===Cs.All)a=n?"All panelists and attendees":"Everyone";else if(s===Cs.Panelist)a="All panelists";else if(n&&h.findIndex((e=>e.userId===s))>-1)a=h.find((e=>e.userId===s)).displayName;else{const e=i.find((e=>e.userId===s));e&&(a=e.displayName)}return{id:l,message:t,sender:{name:o,userId:u,avatar:null==r?void 0:r.avatar},receiver:{name:a,userId:s},timestamp:(new Date).getTime()}}));return e.then((e=>(Rd(la,e),Mh(e))))}}return W}))),changeAttendeePrivilegeResponse:(e,t)=>ko(e,vs).pipe(Ke((e=>{var t,r;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.chatPriviledge)||void 0!==(null===(r=e.payload.body)||void 0===r?void 0:r.bAllowAttendeeChat)})),or(t),ye((e=>{let[t,r]=e;const{payload:{body:{chatPriviledge:o,bAllowAttendeeChat:n}}}=t,{chat:{chatPrivilege:i}}=r;return void 0!==n?(Rd(pa,!0===n?{chatPrivilege:i}:{chatPrivilege:_s.NoAttendee}),Lh(n)):(Rd(pa,{chatPrivilege:o}),Dh(o))}))),changePanelistPrivilegeResponse:e=>ko(e,vs).pipe(Ke((e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.panelistChatPriviledge)})),ye((e=>{const{payload:{body:{panelistChatPriviledge:t}}}=e;return Rd(pa,{panelistChatPrivilege:t}),Ph(t)}))),chatResponseEpic:(e,t)=>ko(e,4136).pipe(or(t),Pe((e=>{let[t,r]=e;const{payload:{body:{result:o,destNodeID:n,msgID:i}}}=t,{meeting:{userId:s},chat:{chatHistory:a}}=r;if(o===As.Success){var u,c;const e=[];for(let t=a.length-1;t>=0;t--){const r=a[t];if(!r.id&&r.sender.userId===s&&[Cs.All,Cs.Panelist,Cs.IndividualCcPanelist,n].includes(r.receiver.userId)&&e.unshift(r),r.id)break}const t=e.length>0&&null!==(u=null===(c=e[0])||void 0===c?void 0:c.highResTimeStampForIdentification)&&void 0!==u?u:0;return Rd(ha,{msgId:i,receiverId:n,identification:t}),Q(Vh({destNodeID:n,msgID:i,userId:s}))}return o===As.Delete||o===As.Block?Q(Uh({msgId:i})):W}))),chatCmdResponseEpic:e=>ko(e,4238).pipe(Pe((e=>{const{payload:{body:{bSuccess:t,cmd:r,msgID:o}}}=e,n=[];return t&&r===Is.Delete&&(n.push(Uh({msgId:o})),Rd(fa,{id:o})),Oe(n)}))),chatCmdIndicationEpic:e=>ko(e,7960).pipe(Pe((e=>{const{payload:{body:{cmd:t,msgID:r}}}=e,o=[];return t===Is.Delete&&(o.push(Uh({msgId:r})),Rd(fa,{id:r})),Oe(o)})))});const RA={chatHistory:[],chatPrivilege:_s.All,panelistChatPrivilege:Es.AllPanelist,isAllowAttendeeChat:!0},kA=Zr({[`${Mh}`]:Fm(((e,t)=>{let{payload:r}=t;e.chatHistory.push(r)})),[`${Dh}`]:Fm(((e,t)=>{let{payload:r}=t;e.chatPrivilege=r})),[`${Ph}`]:Fm(((e,t)=>{let{payload:r}=t;e.panelistChatPrivilege=r})),[`${Lh}`]:Fm(((e,t)=>{let{payload:r}=t;e.isAllowAttendeeChat=r})),[`${Vh}`]:Fm(((e,t)=>{let{payload:r}=t;const{destNodeID:o,msgID:n,userId:i}=r,s=[];for(let t=e.chatHistory.length-1;t>=0;t--){const r=e.chatHistory[t];if(!r.id&&r.sender.userId===i&&[Cs.All,Cs.Panelist,o].includes(r.receiver.userId)&&s.unshift(r),r.id)break}s.length>0&&(s[0].id=n)})),[`${Uh}`]:Fm(((e,t)=>{let{payload:r}=t;const{msgId:o}=r,n=e.chatHistory.findIndex((e=>e.id===o));n>=0&&e.chatHistory.splice(n,1)})),[`${Nh}`]:()=>ot({},RA)},RA);function DA(e,t,r){if(null!=r&&r.host)return[Sl(e),..._l(e)].filter((e=>(null==e?void 0:e.userId)!==t)).map((e=>({userId:null==e?void 0:e.userId,displayName:null==e?void 0:e.displayName,isHost:null==e?void 0:e.isHost,isCoHost:null==e?void 0:e.bCoHost})));{let o=[Sl(e),..._l(e),...e.participants.attendeesList.filter((e=>!(e.bCoHost||e.isHost||e.bHold)))];if(null!=r&&r.includeAttendee){const t=ml(e).filter((e=>!nl(e.userType)));o=[...o,...t]}return o.filter((e=>(null==e?void 0:e.userId)!==t)).map((e=>({userId:null==e?void 0:e.userId,displayName:null==e?void 0:e.displayName,isHost:null==e?void 0:e.isHost,isCoHost:null==e?void 0:e.bCoHost})))}}const PA=["highResTimeStampForIdentification"],MA=["highResTimeStampForIdentification"];var NA;const LA=Ls.createAgent(),VA=Ym.getInstance(),UA=e=>{const{text:t,destId:r,sn:o,attendeeId:n}=e;return hs.beginEncrypt({text:t,type:as.RWG_CHAT}).then((e=>{LA.chat(e,r,o,n)}))};let jA=(NA=class extends bA{send(e,t){if(!e)return Promise.reject({type:Wc,reason:"Text is empty"});const{[iA]:r,[sA]:o}=this,n=r(),i=hl(n),s=function(e,t){if(t===Cs.All)return ks;if(t===Cs.Panelist)return Ds;if(t===Cs.SilentModeUsers)return Ps;{const{meeting:{isWebinar:r},participants:{xmppAttendeeList:o,attendeesList:n}}=e;return r?n.find((e=>e.userId===t))||o.find((e=>e.userId===t)):n.find((e=>e.userId===t))}}(n,t),a=((e,t,r)=>{const o=null==t?void 0:t.userId;if(null==e||!e.zoomID||null==t||!t.displayName||o===e.userId)return{type:Wc,reason:"invalid target user"};const{chat:{chatPrivilege:n,panelistChatPrivilege:i},meeting:{isWebinar:s}}=r,a=fl(r),u=t.isHost||t.bCoHost;let c=!1;if(!a){if(s)if(sl(e.userRole))(n===_s.NoAttendee||n===_s.AllPanelist&&o!==Cs.Panelist||n===_s.All&&o!==Cs.All&&o!==Cs.Panelist)&&(c=!0);else{const e=sl(null==t?void 0:t.userRole);(i===Es.Invalid||i===Es.AllPanelist&&(e||o===Cs.All))&&(c=!0)}else(n===_s.NoAttendee||n===_s.Host&&!u||o===Cs.SilentModeUsers||n===_s.EveryonePublicly&&o!==Cs.All&&!u)&&(c=!0);if(c)return{type:Bc,reason:"Insufficient chat privilege"}}return null})(i,s,n);if(a)return Promise.reject(a);const{meeting:{isWebinar:u,encType:c}}=n,d=c===ss.AES_GCM;let l=Promise.resolve(),p=!1;const h=u&&sl(s.userRole);return t===Cs.SilentModeUsers?LA.chat(an(e),t):u?h?8==(8&s.clientCap)?l=UA({text:e,destId:Cs.IndividualCcPanelist,sn:null==i?void 0:i.zoomID,attendeeId:t}):(l=UA({text:e,destId:Cs.Panelist,sn:null==i?void 0:i.zoomID,attendeeId:t}).then((()=>(e=>{const{text:t,jid:r,isGCMEnabled:o}=e;return hs.beginEncrypt({text:t,type:as.XMPP_CHAT}).then((e=>{VA.sendWebinarMseeage(e,r,Cs.IndividualCcPanelist,o)}))})({text:e,jid:s.jid,isGCMEnabled:d}))),p=!0):s&&(l=UA({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID})):l=UA({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID}),l.then((()=>{const r=(new Date).getTime(),n=performance.now(),a={message:e,sender:{name:null==i?void 0:i.displayName,userId:null==i?void 0:i.userId,avatar:null==i?void 0:i.avatar},receiver:{name:null==s?void 0:s.displayName,userId:h?Cs.IndividualCcPanelist:null==s?void 0:s.userId},timestamp:r,highResTimeStampForIdentification:n};return o(Mh(a)),p?(Rd(la,a),a):new Promise(((e,r)=>{Pd(ha).pipe(rr(5e3),Ut((e=>n!==e.identification||!([e.receiverId,Cs.All,Cs.Panelist].includes(t)||e.receiverId===Cs.IndividualCcPanelist))),At(1)).subscribe((t=>{const{msgId:r}=t,o=ot(ot({id:r},it(a,PA)),h&&{receiver:{name:null==s?void 0:s.displayName,userId:null==s?void 0:s.userId}});Rd(la,o),e(o)}),(()=>{r({type:Fc})}))}))}))}setPrivilege(e){const t=this[iA](),{meeting:{isWebinar:r},chat:{chatPrivilege:o}}=t;return o===e?Promise.resolve(""):!r&&!ws.includes(e)||r&&!Ts.includes(e)?Promise.reject({type:Wc,reason:"invalid privilege value of parameter"}):(LA.setChatPriviledge(e),Dd(pa,(t=>t.chatPrivilege===e)))}setPanelistPrivilege(e){const t=this[iA](),{chat:{panelistChatPrivilege:r}}=t,o=Rs[e];return r===o?Promise.resolve(""):Object.values(Os).includes(e)?(LA.setPanelistChatPrivilege(e),Dd(pa,(e=>e.panelistChatPrivilege===o))):Promise.reject({type:Wc,reason:"Panelist privilege value is invalid"})}deleteMessage(e){const t=this[iA](),{chat:{chatHistory:r},meeting:{meetingOptions:o,userId:n}}=t;if(null!=o&&o.isEnableDeleteChatMsg){const o=fl(t),i=r.find((t=>t.id===e));if(i){const{sender:t}=i;if(o)LA.chatCmdReq(e,Is.Delete);else{if(t.userId!==n)return Promise.reject({type:Bc,reason:"can not delete message"});LA.chatCmdReq(e,Is.Delete)}return Dd(fa,(t=>t.id===e)).then((()=>({id:e})))}return Promise.reject({type:Wc,reason:"msgId is wrong"})}return Promise.reject({type:jc,reason:"can not delete messages"})}lockChat(e){const t=this[iA](),{meeting:{meetingOptions:r}}=t,o=null!=r&&r.isPrivateChatEnabled?_s.All:_s.EveryonePublicly;return this.setPrivilege(e?_s.NoOne:o)}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[iA]();return t?e:_s.NoAttendee}getReceivers(){const e=this[iA](),{chat:{chatPrivilege:t,panelistChatPrivilege:r,isAllowAttendeeChat:o},meeting:{isWebinar:n}}=e;if(!n&&!o)return[];const i=hl(e),s=fl(e);if(i)if(n)if(sl(i.userRole)){if(!o)return[];if(t===_s.All)return[Ds,ks];if(t===_s.AllPanelist)return[Ds];if(t===_s.NoOne)return[]}else{if(s||r===Es.Everyone){const t=DA(e,i.userId,{includeAttendee:!0});return[Ds,ks,...t]}if(r===Es.AllPanelist){const t=DA(e,i.userId);return[Ds,...t]}}else{const r=fl(e);if(t===_s.All||r){const t=DA(e,i.userId);return[ks,...t]}if(t===_s.Host)return DA(e,i.userId,{host:!0});if(t===_s.EveryonePublicly){const t=DA(e,i.userId,{host:!0});return[ks,...t]}if(t===_s.NoOne)return[]}return[]}getHistory(){return this[iA]().chat.chatHistory.map((e=>it(e,MA)))}isAllowToDeleteMessages(){const e=this[iA](),{meeting:{meetingOptions:t}}=e;return null==t?void 0:t.isEnableDeleteChatMsg}},st(NA.prototype,"send",[cA],Object.getOwnPropertyDescriptor(NA.prototype,"send"),NA.prototype),st(NA.prototype,"setPrivilege",[dA,cA],Object.getOwnPropertyDescriptor(NA.prototype,"setPrivilege"),NA.prototype),st(NA.prototype,"setPanelistPrivilege",[dA,cA,function(e,t,r){const o=r.value;r.value=function(){const e=this[nA];if(e){const{meeting:{isWebinar:t}}=e.getState();if(!t)return Promise.reject({type:Hc,reason:"non-webinar"})}for(var t=arguments.length,r=new Array(t),n=0;n{let n=!1;try{var i,s;const{logger:{options:e},meeting:{logConfig:r}}=t.value;n=null!==(i=null==e?void 0:e.enable)&&void 0!==i?i:null===(s=JSON.parse(r||"{}"))||void 0===s?void 0:s.enable}catch(e){}try{if(n){const{logger:{isLaplaceInitialized:n}}=t.value;if(!n)return e.pipe(ar(`${cg}`),At(1),Pe((e=>(e.payload&&r(o),W))));r(o)}}catch(e){console.warn(e)}return W})))}const HA=[{event:ka.AudioBridgeReconnectStart,message:e_.AudioBridgeReconnectStart,logType:"info",additionalTags:["Audio Join Flow"]},{event:ka.AudioBridgeReconnectEnd,message:e_.AudioBridgeReconnectEnd,logType:"info",additionalTags:["Audio Join Flow"]},{event:ka.UserGrantCaptureAudio,message:e_.DeviceAudioStreamCaptured,logType:"info",additionalTags:["Audio Capture Flow"]},{event:ka.UserForbiddedCaptureAudio,message:e_.AudioCapturedForbidden,logType:"error",additionalTags:["Audio Capture Flow"]},{event:ka.AudioWebsocketBroken,message:e_.AudioWorkerWebsocketBroken,logType:"error",additionalTags:["Audio Init Flow"]},{event:ka.AudioZeroData,message:e=>{const{audio:{webrtcRestartCount:t}}=e;return t<3?e_.AudioCaptureZeroData:null},logType:"error",additionalTags:["Audio Init Flow"]},{event:ka.JoinComputerAudioComplete,message:e_.AudioJoinComplete,logType:"info",additionalTags:["Audio Join Flow"]},{event:ka.LeaveComputerAudioComplete,message:e_.AudioLeaveComplete,logType:"info",additionalTags:["Audio Join Flow"]},{event:ka.JoinSharingAudioComplete,message:e_.SharingAudioStartComplete,logType:"info",additionalTags:["Audio Sharing Flow"]},{event:ka.LeaveSharingAudioComplete,message:e_.SharingAudioStopComplete,logType:"info",additionalTags:["Audio Sharing Flow"]},{event:ka.AudioSpeakerSetError,message:e_.ChangeSpeakerError,logType:"error",additionalTags:["Audio Play Flow"]}],WA=[{event:ka.UserForbiddedCaptureVideo,message:t_.UserForbiddedCaptureVideo,logType:"warn",additionalTags:["Video Join Flow"]},{event:ka.StartVideoCaptureSuccess,message:t_.StartCaptureVideoSuccess,logType:"info",additionalTags:["Video Join Flow"]},{event:ka.StopVideoCaptureSuccess,message:t_.StopCaptureVideoSuccess,logType:"info",additionalTags:["Video Join Flow"]},{event:ka.StartVideoStreamInVbSettingSuccess,message:t_.VBSettingSuccess,logType:"info",additionalTags:["Video VB Flow"]},{event:ka.VbModelPreloadingOk,message:t_.VBPreloadSuccess,logType:"info",additionalTags:["Video VB Flow"]},{event:ka.VbModelPreloading_3S,message:t_.VBPreloading3S,logType:"warn",additionalTags:["Video VB Flow"]},{event:ka.VbModelPreloading_10S,message:t_.VBPreloading10S,logType:"warn",additionalTags:["Video VB Flow"]},{event:ka.VbSettingParaError,message:t_.VBSettingFailed,logType:"error",additionalTags:["Video VB Flow"]}],$A=HA.map((e=>ot(ot({},e),{},{tag:"Audio"}))).concat(WA.map((e=>ot(ot({},e),{},{tag:"Video"})))),GA=s_.getInstance(),{InitSuccessVideo:zA,InitSuccessAudio:KA,InitSuccessSharing:qA,InitFailedVideo:JA,InitFailedAudio:QA,InitFailedSharing:ZA}=ka;var YA=Object.freeze({__proto__:null,handleLoggerMeetingOptionEpic:(e,t)=>e.pipe(ar(`${Gn}`),Pe((()=>{const{meeting:{logConfig:e,logEncryptionPubKey:r},logger:{options:o}}=t.value;let n=o||{};return n=ot(ot({},n),{},{logConfig:e,logEncryptionPubKey:r}),GA.init(n).then((()=>cg(!0))).catch((()=>cg(!1)))}))),connectedMediaStreamForLogEpic:(e,t)=>No(e,[zA,KA,qA,JA,QA,ZA]).pipe(BA(e,t,(e=>{const{payload:{type:t,data:r}}=e,o=GA.makeLogger(["Audio","Audio Init Flow"]),n=GA.makeLogger(["Video","Video Init Flow"]),i=GA.makeLogger(["Sharing","Sharing Init Flow"]);t===KA||t===QA?r===Da.EncodeSuccess?o.info(e_.AudioEncodeSuccess):r===Da.DecodeSuccess?o.info(e_.AudioDecodeSuccess):r===Da.EncodeFailed?o.warn(e_.AudioEncodeFailed):r===Da.DecodeFailed&&o.warn(e_.AudioDecodeFailed):t===zA||t===JA?r===Da.EncodeSuccess?n.info(t_.VideoEncodeSuccess):r===Da.DecodeSuccess?n.info(t_.VideoDecodeSuccess):r===Da.EncodeFailed?n.warn(t_.VideoEncodeFailed):r===Da.DecodeFailed&&n.warn(t_.VideoDecodeFailed):t!==qA&&t!==ZA||(r===Da.EncodeSuccess?i.info(r_.SharingEncodeSuccess):r===Da.DecodeSuccess?i.info(r_.SharingDecodeSuccess):r===Da.EncodeFailed?i.warn(r_.SharingEncodeFailed):r===Da.DecodeFailed?i.warn(r_.SharingDecodeFailed):t===qA&&void 0===r&&i.info(r_.SharingDecodeSuccess))}))),handleLogFromMediaSDKEpic:(e,t)=>function(e,t,r,o){return No(e,r).pipe(BA(e,t,o))}(e,t,$A.map((e=>e.event)),(e=>{const{payload:{type:r}}=e,o=$A.find((e=>e.event===r));if(o){const{message:e,logType:r,additionalTags:n,tag:i}=o;let s=e;"function"==typeof e&&(s=e(t.value)),s&&GA.makeLogger([i])[r](s,n)}})),handleLogJoinEpic:(e,t)=>function(e,t,r,o){return ko(e,4098).pipe(BA(e,t,(e=>{const{payload:{body:t}}=e,r=["jid","mn","participantID","userGUID","zoomID"];if(t){let e=["conID","confID","mmrFeature","mmrFeatureEx","reportDomain","res","role","svcUrl","userID"].reduce(((e,r)=>void 0!==t[r]?ot(ot({},e),{},{[`${r}`]:t[r]}):e),{});e=r.reduce(((e,r)=>void 0!==t[r]?ot(ot({},e),{},{[`${r}`]:l_(t[r])}):e),e),GA.makeLogger(["A/V Performance Info"]).info(`${navigator.hardwareConcurrency}`,["CPU_CORES"]),GA.makeLogger(["Command Socket Event"]).info(`log join meeting info ${JSON.stringify(e)}`,["User Info Map"])}})))}(e,t),handleLogRWCEmptyEpic:(e,t)=>e.pipe(ar(`${Fn}`),or(t),Ke((e=>{let[,t]=e;return void 0===t.meeting.encryptedRWC&&(void 0===t.meeting.encryptedGEORWC||0===t.meeting.encryptedGEORWC.length)})),BA(e,t,(()=>{const{label:e,payload:r}=FA(t.value);GA.makeLogger(["Join Meeting Flow"]).info(`${e} ${JSON.stringify(r)}`,["Ping RWC Domain Empty"])}))),handleLogSocketErrorEpic:(e,t)=>e.pipe(ar(`${Bn}`),Ke((e=>e.payload===Mi.OnError||e.payload===Mi.Disconnect||e.payload===Mi.NoHeartbeat)),BA(e,t,(e=>{const{payload:r}=e,{socket:{rwgServerList:o,retryCount:n}}=t.value,{payload:i}=FA(t.value);GA.makeLogger(["Join Meeting Flow"]).info(`websocket unexpected disconnected,${JSON.stringify(ot({code:r,rwgHost:o[n]},i))}`,["RWG Disconnect"])}))),handleLogFailoverEpic:(e,t)=>e.pipe(ar(`${Ei}`),BA(e,t,(e=>{const{payload:{reason:r,count:o,interval:n}}=e,{payload:i}=FA(t.value);GA.makeLogger(["Join Meeting Flow"]).info(`meeting failover,${JSON.stringify(ot({reason:r,count:o,interval:n},i))}`,["Failover"])}))),handleLogRwgUrlEpic:(e,t)=>e.pipe(ar(`${uo}`),Ke((e=>e.payload.status===Cl.Connecting)),BA(e,t,(e=>{const{payload:{rwgUrl:r}}=e;let o=r.replace(/(\d+)\?/,`${l_("$1")}?`);o=["email","zoomid","participantID","mid","dn2","customer_key","mpwd","topic"].reduce(((e,t)=>e.indexOf(t)>-1?e.replace(new RegExp(`${t}=([^&]+)`,"g"),`${t}=${l_("$1")}`):e),o);const{payload:n}=FA(t.value);GA.makeLogger(["Join Meeting Flow"]).info(`RWG URL,${JSON.stringify(ot({rwgUrl:o},n))}`,["RWG Url"])})))});const XA=s_.getInstance(),ew={options:void 0,isLaplaceInitialized:!1},tw=Zr({[`${ug}`]:Fm(((e,t)=>{let{payload:r}=t;e.options=r})),[`${cg}`]:Fm(((e,t)=>{let{payload:r}=t;e.isLaplaceInitialized=r})),[`${dg}`]:(e,t)=>{let{options:r}=e,{payload:o}=t;return o?ot(ot({},ew),{},{options:r}):ot({},ew)}},ew),rw=Ro(YA);var ow=Object.freeze({__proto__:null,handleRecordingEnableEpic:e=>e.pipe(ar(`${Gn}`),ye((e=>{const{payload:{recordingEnable:t}}=e;return If(t)}))),receiveCloudRecordIndication:(e,t)=>ko(e,vs).pipe(Ke((e=>{var t,r,o;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.cmrServerStatus)||void 0!==(null===(r=e.payload.body)||void 0===r?void 0:r.disAllowClientStopAutoCmr)||void 0!==(null===(o=e.payload.body)||void 0===o?void 0:o.enableAutomicRecordingCloud)})),or(t),Pe((e=>{let[t,r]=e;const{cmrServerStatus:o,disAllowClientStopAutoCmr:n,enableAutomicRecordingCloud:i}=t.payload.body,s=[];return void 0!==o&&(o!==Ea.Init&&(Rd(Ca,{cmrServerStatus:o}),r.recording.recordingIsoEnable&&o===Ea.Start&&Rd(Ia,{status:_a.Ask})),s.push(Cf(o))),void 0!==n&&s.push(wf(!n)),void 0!==i&&s.push(Tf(i)),Oe(s)}))),receiveIsoCloudRecordIndication:e=>ko(e,vs).pipe(Ke((e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.bCmrIsoEnble)})),ye((e=>{const{bCmrIsoEnble:t}=e.payload.body;return Af(t)}))),receiveLocalRecordingIndicationEpic:e=>ko(e,ms).pipe(Ke((e=>{const{payload:{body:{update:t}}}=e;return null==t?void 0:t.some((e=>void 0!==e.bLocalRecordStatus))})),Zt((e=>{const{payload:{body:{update:t}}}=e;t.filter((e=>void 0!==e.bLocalRecordStatus)).forEach((e=>{Rd(Aa,{userId:e.id,bLocalRecord:1===e.bLocalRecordStatus})}))})),Vt(W)),receiveUserISORecordingStatusEpic:e=>ko(e,ms).pipe(Ke((e=>{const{payload:{body:{update:t}}}=e;return null==t?void 0:t.some((e=>void 0!==e.bAllowISORecord))})),Zt((e=>{const{payload:{body:{update:t}}}=e;t.filter((e=>void 0!==e.bAllowISORecord)).forEach((e=>{Rd(Ia,{userId:e.id,status:e.bAllowISORecord?_a.Accept:_a.Decline})}))})),Vt(W)),receiveIQResponseIndication:e=>ko(e,vs).pipe(Ke((e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.SalesRecordingAnalytics)})),ye((e=>{const{SalesRecordingAnalytics:t}=e.payload.body;return Rd(wa,{isZoomIQ:t}),Of(t)}))),receiveIQOperationResponse:(e,t)=>ko(e,4319).pipe(or(t),Ke((e=>{var t;let[r]=e;return void 0!==(null===(t=r.payload.body)||void 0===t?void 0:t.success)})),Pe((e=>{let[t,r]=e;const o=[],{success:n}=t.payload.body,{recording:{zoomIQChanging:i}}=r;return Rd(Ta,{success:n}),n&&o.push(Rf(!i)),Oe(o)})))});const nw={cmrStatus:Ea.Stop,recordingEnable:!1,recordingIsoEnable:!1,allowStopAutoRecording:!1,automaticCloudRecordingEnable:!1,isZoomIQ:!1,zoomIQChanging:!1},iw=Zr({[`${Cf}`]:Fm(((e,t)=>{let{payload:r}=t;e.cmrStatus=r})),[`${If}`]:Fm(((e,t)=>{let{payload:r}=t;e.recordingEnable=r})),[`${Af}`]:Fm(((e,t)=>{let{payload:r}=t;e.recordingIsoEnable=r})),[`${wf}`]:Fm(((e,t)=>{let{payload:r}=t;e.allowStopAutoRecording=r})),[`${Tf}`]:Fm(((e,t)=>{let{payload:r}=t;e.automaticCloudRecordingEnable=r})),[`${Of}`]:Fm(((e,t)=>{let{payload:r}=t;e.isZoomIQ=r})),[`${Rf}`]:Fm(((e,t)=>{let{payload:r}=t;e.zoomIQChanging=r})),[`${kf}`]:()=>ot({},nw)},nw);var sw,aw,uw,cw,dw,lw;const pw=Ls.createAgent();let hw=(sw=pA("recording"),aw=pA("recording"),uw=pA("recording"),cw=pA("recording"),dw=pA("recording"),lw=class extends bA{startRecording(){const e=this[iA](),{meeting:{bIbDisableRecording:t,recordingEnable:r},recording:{cmrStatus:o}}=e;return t?Promise.reject({type:jc,reason:"Rejected by Information Barrier"}):r?o===Ea.Start?Promise.resolve(""):(pw.recordMeeting(!0,!1),Dd(Ca,(e=>e.cmrServerStatus===Ea.Start))):Promise.reject({type:jc,reason:"The account of the meeting disabled the cloud recording"})}pauseRecording(){const e=this[iA](),{recording:{cmrStatus:t}}=e;return t===Ea.Pause?Promise.resolve(""):t!==Ea.Start?Promise.reject({type:jc,reason:"Recording is not started"}):(pw.recordMeeting(!1,!0),Dd(Ca,(e=>e.cmrServerStatus===Ea.Pause)))}stopRecording(){const e=this[iA](),{recording:{cmrStatus:t}}=e;return t===Ea.Stop?Promise.resolve(""):(pw.recordMeeting(!1,!1),Dd(Ca,(e=>e.cmrServerStatus===Ea.Stop)))}accept(){const e=this[iA](),{recording:{cmrStatus:t,recordingIsoEnable:r}}=e,o=hl(e);return r?t!==Ea.Start&&t!==Ea.Pause?Promise.reject({type:jc,reason:"Recording is not started"}):null!=o&&o.bAllowISORecord?Promise.resolve("You accepted ISO recording"):(pw.allowSelfRecord(!0),Dd(Ia,(e=>(null==e?void 0:e.userId)===(null==o?void 0:o.userId)&&(null==e?void 0:e.status)===_a.Accept))):Promise.reject({type:jc,reason:"ISO Recording is not enabled"})}decline(){const e=this[iA](),{recording:{cmrStatus:t,recordingIsoEnable:r}}=e,o=hl(e);return r?t!==Ea.Start&&t!==Ea.Pause?Promise.reject({type:jc,reason:"Recording is not started"}):!0===(null==o?void 0:o.bAllowISORecord)?Promise.reject({type:jc,reason:"You had accept ISO recording, cant change it"}):(pw.allowSelfRecord(!1),Promise.resolve("")):Promise.reject({type:jc,reason:"ISO Recording is not enabled"})}getRecordingStatus(){const e=this[iA](),{recording:{cmrStatus:t}}=e;return t===Ea.Start?_a.Recording:t===Ea.Pause?_a.Paused:_a.Stopped}isRecordingEnabled(){const e=this[iA](),{recording:{recordingEnable:t}}=e;return t}isAllowedToStopAutoRecording(){const e=this[iA](),{recording:{allowStopAutoRecording:t}}=e;return t}isAutomaticCloudRecordingEnabled(){const e=this[iA](),{recording:{automaticCloudRecordingEnable:t}}=e;return t}enableRecordingWithIQ(e){const{[iA]:t,[sA]:r}=this,o=t(),{recording:{isZoomIQ:n,zoomIQChanging:i},meeting:{meetingOptions:s}}=t();return s.isEnableKiwiRecording?fl(o)?i?Promise.reject({type:jc,reason:"We are changing, please wait"}):e===n?Promise.reject({type:jc,reason:`You have ${e?"enable":"disable"} Zoom IQ, don't need change`}):(r(Rf(!i)),r(Of(!n)),pw.enableZoomIQRecord(e),Dd(Ta,(e=>null==e?void 0:e.success))):Promise.reject({type:jc,reason:"Only Host or co-host can enable/disable Zoom IQ"}):Promise.reject({type:jc,reason:"You not have zoom IQ license or not enable zoom IQ, please check and retry"})}},st(lw.prototype,"startRecording",[dA,cA,sw],Object.getOwnPropertyDescriptor(lw.prototype,"startRecording"),lw.prototype),st(lw.prototype,"pauseRecording",[dA,cA,aw],Object.getOwnPropertyDescriptor(lw.prototype,"pauseRecording"),lw.prototype),st(lw.prototype,"stopRecording",[dA,cA,uw],Object.getOwnPropertyDescriptor(lw.prototype,"stopRecording"),lw.prototype),st(lw.prototype,"accept",[cA,cw],Object.getOwnPropertyDescriptor(lw.prototype,"accept"),lw.prototype),st(lw.prototype,"decline",[cA,dw],Object.getOwnPropertyDescriptor(lw.prototype,"decline"),lw.prototype),lw);const fw=Ro(ow);let gw,mw,vw;!function(e){e[e.All=1]="All",e[e.Private=2]="Private"}(gw||(gw={})),(mw||(mw={})).SUCCESS="success",function(e){e.CustomizedKey="__zoom_internal_message_customized_key__@@",e.SpeakerOnly="__zoom_internal_message_speaker_only__@@"}(vw||(vw={}));const yw=Ym.getInstance(),bw=(e,t,r)=>{const{meeting:{encType:o}}=r,n=t,i=cn(e),s=n?gw.Private:gw.All;return o===ss.AES_GCM?hs.beginEncrypt({text:i,type:as.XMPP_CHAT}).then((e=>{yw.sendWebinarMseeage(e,n,s,!0)})):yw.sendWebinarMseeage(i,n,s,!1)};function Sw(e,t){const{cmd:{jids:r}}=t;return Object.prototype.hasOwnProperty.call(r,e)?Promise.resolve():Pd(Js).pipe(Ut((t=>-1===t.findIndex((t=>Number(t.userId)===e)))),At(1),ee(he)).toPromise()}function _w(e){const{cmd:{connectionStatus:t}}=e;return t===mw.SUCCESS?Promise.resolve(!0):Pd(ya,1).toPromise().then((e=>e===Ri.Connected||Promise.reject({type:jc,reason:"Cannot establish the command channel"})))}function Ew(e,t){for(const[r,o]of Object.entries(e))if(o.jid===t)return r}var Cw=Object.freeze({__proto__:null,receiveCmdChannelResponseXMPPEpic:(e,t)=>Po(e,24577).pipe(or(t),ye((e=>{let[t]=e;const{payload:{body:{status:r}}}=t;return r===mw.SUCCESS&&Rd(ya,Ri.Connected),Mf(r)}))),receiveCmdChannelMessageFromXMPPEpic:(e,t)=>Po(e,24583).pipe(or(t),Pe((e=>{let[t,r]=e;const{meeting:{userId:o,encType:n},cmd:{jids:i}}=r,{payload:{body:{senderName:s,senderJid:a,text:u,type:c,receiver:d,msgid:l,sn:p}}}=t,h=Ew(i,d),f=n===ss.AES_GCM,g=Ew(i,a),m=(new Date).getTime();let v=Promise.resolve({message:u});return f&&(v=hs.beginDecrypt({decryptedText:u,type:as.XMPP_CHAT,zoomId:p})),v.then((e=>{let{message:t}=e;if(c===gw.Private&&Number(h)===o||c===gw.All){const e=un(t);if(null!=e&&e.startsWith(vw.CustomizedKey)){const t=e.substring(vw.CustomizedKey.length);return Gd({userId:Number(g),key:"userIdentity",value:t})}if(null!=e&&e.startsWith(vw.SpeakerOnly)){const t=e.substring(vw.SpeakerOnly.length),r=1===Number(t);return Gd({userId:Number(g),key:"isSpeakerOnly",value:r})}{var r;const t=g&&(null===(r=i[g])||void 0===r?void 0:r.userGuid);Rd(va,{senderId:g,senderName:s,senderGuid:t,text:e,timestamp:m,msgid:l})}}return""}))})),Ke((e=>"object"==typeof e&&null!==e&&void 0!==e.type)),Zt((e=>{const{payload:{userId:t,key:r,value:o}}=e;Rd(Ks,[{userId:t,[`${r}`]:o}])}))),receiveUserJidUpdateFromXMPPEpic:(e,t)=>Po(e,24595).pipe(Pe((e=>{const{payload:{body:{action:r,data:o}}}=e,n=[];if([Km.List,Km.Add,Km.update].includes(r)&&o){const{breakoutRoom:e,participants:{attendeesList:r}}=t.value,i=(null==e?void 0:e.currentRoom.status)===dl.InRoom?r.concat(e.mainSessionAttendeeList):r;n.push(Df({data:o,attendees:i}))}return r===Km.Remove&&o&&n.push(Pf(o)),Oe(n)})))}),Iw=Object.freeze({__proto__:null,handleCustomizedKeyBroadcastEpic:(e,t)=>e.pipe(ar(`${Mf}`),Ke((e=>e.payload===mw.SUCCESS&&!!t.value.meeting.customerKey)),Zt((()=>{const e=t.value,{meeting:{customerKey:r}}=e;bw(`${vw.CustomizedKey}${r}`,"",e)})),Vt(W)),handleCustomizedKeyPushEpic:(e,t)=>ko(e,ms).pipe(Ke((e=>{const{payload:{body:r}}=e;return!!r.add&&!!t.value.meeting.customerKey})),ee(he),Zt((async e=>{const{payload:{body:{add:r}}}=e,o=t.value,{meeting:{userId:n,customerKey:i}}=o;for(let e=0;e{bw(`${vw.CustomizedKey}${i}`,e[o].jid,t.value)}),Math.floor(Math.random()*Math.log10(r.length)*1e3))}}})),Vt(W)),handleIsSpeakerOnlyBroadcastEpic:(e,t)=>e.pipe(ar(`${$l}`),Wt((e=>{const{payload:r}=e,o=hl(t.value);return(void 0!==(null==o?void 0:o.audio)?Oe(Promise.resolve(o.audio)):Pd(Gs).pipe(Ke((e=>void 0!==e.action)),At(1))).pipe(Zt((()=>{_w(t.value).then((()=>{bw(`${vw.SpeakerOnly}${r?1:0}`,"",t.value)}))})),Vt(W))}))),handleSpeakerOnlyPushEpic:(e,t)=>ko(e,ms).pipe(Ke((e=>{const{payload:{body:r}}=e;return!!r.add&&!!t.value.audio.isSpeakerOnly})),ee(he),Zt((async e=>{const{payload:{body:{add:r}}}=e,o=t.value,{meeting:{userId:n}}=o;for(let e=0;e{bw(`${vw.SpeakerOnly}1`,e[o].jid,t.value)}),Math.floor(Math.random()*Math.log10(r.length)*1e3))}}})),Vt(W))});const Aw={connectionStatus:"initial",jids:{}},ww=Zr({[`${Nf}`]:()=>ot({},Aw),[`${Df}`]:Fm(((e,t)=>{let{payload:r}=t;const{data:o,attendees:n}=r;o.forEach((t=>{const{jid:r,node:o}=t;if(!e.jids[o]||e.jids[o].jid!==r){const t=n.find((e=>e.userId===Number(o)));e.jids[o]={jid:r,userGuid:null==t?void 0:t.userGUID}}}))})),[`${Pf}`]:Fm(((e,t)=>{let{payload:r}=t;r.forEach((t=>{const{jid:r}=t,o=Ew(e.jids,r);o&&delete e.jids[o]}))})),[`${Mf}`]:Fm(((e,t)=>{let{payload:r}=t;e.connectionStatus=r}))},Aw);var Tw;let Ow=(Tw=class extends bA{send(e,t){if(!e)return Promise.reject({type:Wc,reason:"Text is empty"});if("string"!=typeof e)return Promise.reject({type:Wc,reason:"Text is not a string"});if(e.length>512)return Promise.reject({type:Wc,reason:"Text exceeds the max length(512)."});const{[iA]:r}=this,o=r(),{socket:{xmppSocketStatus:n},meeting:{userId:i}}=o;return n!==Cl.Connected?Promise.reject({type:Hc,reason:"Command channel is not ready"}):_w(o).then((()=>t?-1!==yl(r()).findIndex((e=>e.userId===t))?Sw(t,o).then((()=>{const{cmd:{jids:o}}=r();return o[t]?(bw(e,o[t].jid,r()),{timestamp:(new Date).getTime(),text:e,receiverId:t,senderId:i}):Promise.reject({type:xc})})):Promise.reject({type:Wc,reason:"Cannot find the user"}):(bw(e,"",o),{timestamp:(new Date).getTime(),text:e,receiverId:0,senderId:i})))}getJids(){const{[iA]:e}=this,t=e(),{cmd:{jids:r}}=t;return r}},st(Tw.prototype,"send",[cA],Object.getOwnPropertyDescriptor(Tw.prototype,"send"),Tw.prototype),Tw);const Rw=Ro(Cw,Iw),kw=(e,t,r,o)=>{const{getState:n,dispatch:i}=r,s=n(),{participants:{attendeesList:a},audio:{localShareAudioUserMutedList:u},share:{isReceiveSharingFromMainSession:c},breakoutRoom:d}=s,l=(c?null==d?void 0:d.mainSessionAttendeeList:a).find((t=>t.userId==e));if(l){if(l.bShareAudioOn){const r=u.find((t=>t.userId===e));return r&&r.muted===!t&&i(oE(o,e,t,s)),Promise.resolve("")}return Promise.reject({type:jc,reason:`Cannot ${t?"mute":"unmute"} share audio when the user's share audio is not enable.`})}return Promise.reject({type:Wc,reason:"Cannot find the user"})},Dw=(e,t)=>{const{store:{getState:r},rwgAgent:o}=e,{share:{sharePrivilege:n}}=r();return n===t?Promise.resolve(""):Object.values(xa).includes(t)?(o.lockSharing(t),Dd(ra,(e=>e.lockShare===t))):Promise.reject({type:Wc})},Pw=Qd([yl],(e=>e.filter((e=>e.bVideoOn)))),Mw=Qd([Pw],(e=>e.filter((e=>(e.caps&C_)===C_))));var Nw,Lw,Vw,Uw,jw,xw,Fw,Bw,Hw,Ww,$w,Gw,zw,Kw,qw,Jw,Qw,Zw,Yw,Xw,eT,tT,rT,oT,nT,iT,sT,aT,uT,cT,dT,lT,pT,hT,fT,gT,mT,vT,yT,bT,ST,_T,ET,CT,IT,AT,wT,TT,OT,RT,kT,DT,PT,MT,NT,LT,VT,UT,jT;const xT=vA("Audio"),FT=vA("Video"),BT=vA("Sharing"),HT=yA(HTMLCanvasElement,0),WT=yA(HTMLCanvasElement,0,["id"]);let $T=(Nw=pA("audio"),Lw=pA("audio"),Vw=pA("audio"),Uw=pA("audio"),jw=pA("audio"),xw=vA("Audio",[1,2,3]),Fw=pA("audio"),Bw=vA("Audio",[1,2]),Hw=pA("audio"),Ww=pA("audio"),$w=pA("audio"),Gw=pA("audio"),zw=pA("share"),Kw=pA("audio"),qw=pA("share"),Jw=pA("audio"),Qw=pA("audio"),Zw=pA("video"),Yw=pA("video"),Xw=pA("video"),eT=pA("video"),tT=pA("video"),rT=pA("video"),oT=pA("video"),nT=pA("video"),iT=pA("video"),sT=pA("video"),aT=pA("video"),uT=pA("video"),cT=pA("video"),dT=pA("video"),lT=pA("video"),pT=pA("video"),hT=pA("video"),fT=pA("video"),gT=pA("video"),mT=pA("video"),vT=pA("video"),yT=pA("video"),bT=pA("video"),ST=pA("video"),_T=pA("share"),ET=pA("share"),CT=pA("share"),IT=pA("share"),AT=pA("share"),wT=pA("share"),TT=pA("share"),OT=pA("share"),RT=hA("isShareOptionLocked"),kT=hA("isShareOptionLocked"),DT=pA("share"),PT=pA("share"),MT=pA("share"),NT=pA("share"),LT=pA("share"),VT=pA("share"),UT=pA("share"),jT=class extends bA{constructor(e){super(e),this[nA].dispatch(go()),this[uA]={store:e,mediaAgent:d_(xg(Ws.getInstance())),rwgAgent:Ls.createAgent()}}startAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:o},rwgAgent:n,mediaAgent:i}=e,s=r(),{speakerOnly:a,autoStartAudioInSafari:u}=t||{},c=hl(s);if("computer"===(null==c?void 0:c.audio))return Promise.resolve();if("phone"===(null==c?void 0:c.audio))return Promise.reject({type:jc,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:t,canPlayAudio:d,isSpeakerOnly:l},media:{audioDecodeStatus:p,audioEncodeStatus:h}}=s;if(t)return Promise.reject({type:jc,reason:"Computer audio has been loading, please wait."});if(l!==!!a&&(o($l(!!a)),o(Gd({userId:s.meeting.userId,key:"isSpeakerOnly",value:!!a}))),!c)return Promise.reject({type:jc,reason:"Please call `startAudio` method after the `join` has been resolved"});{const{userRole:t}=c,s=sl(t),l=s&&!e||a||Ug()?"success":h,f=Ug()?"success":p;if(uE()&&("success"!==f||"success"!==l))return Promise.reject({type:jc,reason:"It is required to wait for the audio encoding and decoding to be ready before calling `startAudio` method"});o(Wl(!0)),Dg("audio",l,f).subscribe((t=>{let[c,l]=t;if(c&&l){let t=d||(uE()||$i())&&!u?Promise.resolve():function(){const e=URL.createObjectURL(Va),t=new Audio(e);return t.muted=!1,$i()?new Promise(((r,o)=>{var n;t.addEventListener("canplaythrough",(()=>{t.play().then((()=>{r(!0)})).catch((e=>{o(e)})).finally((()=>{URL.revokeObjectURL(e)}))})),null===(n=t.load)||void 0===n||n.call(t)})):Promise.race([t.play(),new Promise(((e,t)=>{window.setTimeout((()=>{t()}),3e3)}))]).finally((()=>{URL.revokeObjectURL(e)}))}();void 0===t&&(t=Promise.resolve()),t.then((()=>{const t=r(),{audio:{isSharingAudio:u}}=t;n.joinOrLeaveVoip(!0),u||nE(i,t,!(s&&!e||a)),s&&e&&o(Gl(!0)),o(Bl(!0))})).catch((()=>{o(Bl(!1)),o(Wl(!1))}))}else o(Wl(!1))}))}return"failed"===h||"failed"===p?(o(Wl(!1)),Promise.reject({type:xc,reason:"audio encode or decode error"})):new Promise(((e,t)=>{Ze(Pd(lc.JoinComputerAudio.success,1),Ge(...lc.JoinComputerAudio.fail.map((e=>Pd(e,1).pipe(Pe((()=>Z({type:Bc,reason:e}))))))),et(45e3).pipe(Pe((()=>Z({type:Fc}))))).subscribe((()=>{o(Wl(!1)),e("")}),(e=>{(e.type===Bc||r().audio.canPlayAudio)&&n.joinOrLeaveVoip(!1),o(Wl(!1)),t(e)}))}))}})(this[uA],e)}stopAudio(){return(async e=>{const{store:{getState:t,dispatch:r},mediaAgent:o,rwgAgent:n}=e,i=t(),{audio:{isComputerAudioLoading:s,isShareAudioEnabled:a,isSharingAudio:u,isSpeakerOnly:c}}=i,d=hl(i);if(s)return Promise.reject({type:jc,reason:"Computer audio has not finished joining, please wait."});if(a){if(u)return Promise.reject({type:jc,reason:"Cannot stop audio during sharing with audio"});r(Jl(void 0)),r(zl(void 0))}return"computer"===(null==d?void 0:d.audio)?(await o.leaveComputerAudio(),n.joinOrLeaveVoip(!1),c&&(r($l(!1)),r(Gd({userId:i.meeting.userId,key:"isSpeakerOnly",value:void 0}))),r(Vl(0)),Dd(Ku)):Promise.resolve("")})(this[uA])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:o},rwgAgent:n}=e,i=r(),s=hl(i);if(null==t||t===(null==s?void 0:s.userId))return""===(null==s?void 0:s.audio)||null===(null==s?void 0:s.audio)?Promise.reject({type:jc,reason:"no audio joined"}):!0===(null==s?void 0:s.muted)?Promise.resolve(""):(i.audio.isShareAudioEnabled&&o(zl(!0)),o(Dl(!0)),n.mute(s.userId,!0),Dd(qu).then((()=>"")));if(fl(i)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=i,o=e.concat(r).find((e=>e.userId===t));return o?""===o.audio||null===o?Promise.reject({type:jc,reason:"no audio joined"}):!1===o.muted?(n.mute(t,!0),Dd(Qu,(e=>e.id===t&&1==e.muted))):Promise.resolve(""):Promise.reject({type:Wc,reason:"no matching user"})}return Promise.reject({type:Bc})})(this[uA],e)}unmuteAudio(e){return(async(e,t)=>{const{store:{getState:r,dispatch:o},rwgAgent:n,mediaAgent:i}=e,s=r(),a=hl(s);if(void 0===t||t===(null==a?void 0:a.userId)){if(""===(null==a?void 0:a.audio)||null===(null==a?void 0:a.audio))return Promise.reject({type:jc,reason:"no audio joined"});if(!1===(null==a?void 0:a.muted))return Promise.resolve("");if(s.audio.isShareAudioEnabled){if(s.audio.isSharingAudio)return Promise.reject({type:jc,reason:"Cannot unmute audio during sharing with audio"});o(zl(!1))}if(o(Dl(!0)),s.audio.bCanUnmute||null!=a&&a.isHost||null!=a&&a.bCoHost){if(sl(a.userRole)){const{audio:{isAllowToTalk:e,isAllowToTalkAttendeeConnected:t}}=s;e?t||(await i.leaveComputerAudio(),await nE(i,s,!0),o(Gl(!0))):Promise.reject({type:jc,reason:"Webinar attendee cannot unmute self audio."})}return n.mute(a.userId,!1),Dd(Ju).then((()=>""))}return Promise.reject({type:Bc,reason:"host not allow unmute themselves"})}if(fl(s)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=s,o=e.concat(r).find((e=>e.userId===t));return o?""===o.audio||null===o?Promise.reject({type:jc,reason:"no audio joined"}):(!0===o.muted&&n.mute(t,!1),Promise.resolve("")):Promise.reject({type:Wc,reason:"no matching user"})}return Promise.reject({type:Bc})})(this[uA],e)}dialOut(e,t,r,o){return((e,t,r,o,n)=>{const{store:{getState:i,dispatch:s},rwgAgent:a}=e,u=i(),{meeting:{callOutCountry:c,isSupportCallOut:d}}=u;if(d&&Array.isArray(c)&&c.findIndex((e=>e.code===t))>-1){const{seq:e}=a.audioDialout(t+r,o,!(null==n||!n.callMe),!(null==n||!n.pressingOne),!(null==n||!n.greeting));return s(Tl(e)),kd(lc.JoinAudioByCallMe)}return Promise.reject({type:Wc,reason:"no matching country code"})})(this[uA],e,t,r,o)}cancelDialOut(e,t,r){return((e,t,r,o)=>{const{rwgAgent:n}=e;return n.audioCancelDialout(t+r,!(null==o||!o.callMe)),kd(lc.cancelDialOut)})(this[uA],e,t,r)}hangup(){return(e=>{const{store:{getState:t},rwgAgent:r}=e,o=t(),n=hl(o);return"phone"===(null==n?void 0:n.audio)&&null!==n.userId?(r.audioDrop(n.userId),kd(lc.hangup)):Promise.reject({type:jc,reason:"not joined audio by phone"})})(this[uA])}switchMicrophone(e){return((e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,{audio:{microphoneDevicesList:i,activeMicrophone:s}}=r();return"default"!==t&&-1==i.findIndex((e=>e.deviceId===t))?Promise.reject({type:sc}):(t!==s&&(n.changeMicrophone(t),o(xl(t))),Promise.resolve(""))})(this[uA],e)}switchSpeaker(e){return((e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,{audio:{speakerDevicesList:i,activeSpeaker:s}}=r();return"default"!==t&&-1==i.findIndex((e=>e.deviceId===t))?Promise.reject({type:sc}):(t!==s&&(n.changeSpeaker(t),o(Fl(t))),Promise.resolve(""))})(this[uA],e)}muteShareAudio(e){return((e,t)=>{const{mediaAgent:r,rwgAgent:o,store:{getState:n,dispatch:i}}=e,s=n(),{meeting:{userId:a}}=s;if(t&&t!==a)return kw(t,!0,e.store,r);{const{audio:{isSharingAudio:e,isShareAudioEnabled:t,isShareAudioMuted:n}}=s;if(!t)return Promise.reject({type:jc,reason:"Cannot mute sharing audio when sharing audio is not enable"});if(n)return Promise.resolve("");{o.muteShareAudio(!0);let t=Promise.resolve();var u;return e&&(t=null===(u=r.leaveSharingAudio(!0))||void 0===u?void 0:u.then((()=>iE(r,o,s).then((e=>{e.forEach((e=>i(e)))}))))),oE(r,a,!0,s),Promise.all([Dd({event:Gs,operations:[Ke((e=>void 0!==e.bShareAudioOn)),At(1)]},(e=>!1===e.bShareAudioOn)),t]).then((()=>(i(Zl(!0)),e&&(i(Yl(!1)),Rd(uc,{state:"off"})),"")))}}})(this[uA],e)}unmuteShareAudio(e){return((e,t)=>{const{mediaAgent:r,rwgAgent:o,store:{getState:n,dispatch:i}}=e,s=n(),{meeting:{userId:a}}=s;if(t&&t!==a)return kw(t,!1,e.store,r);{const{audio:{isSharingAudio:e,isShareAudioEnabled:t,isShareAudioMuted:n},share:{status:u}}=s;if(!t)return Promise.reject({type:jc,reason:"Cannot unmute sharing audio when sharing audio is not enable"});if(!1===n)return Promise.resolve("");{o.muteShareAudio(!1);let t=Promise.resolve();return!1===e&&u===Fa.Sharing&&(t=aE(r,o,s).then((e=>{e.forEach((e=>i(e)))}))),oE(r,a,!1,s),Promise.all([Dd({event:Gs,operations:[Ke((e=>void 0!==e.bShareAudioOn)),At(1)]},(e=>!0===e.bShareAudioOn)),t]).then((()=>(i(Zl(!1)),!1===e&&u===Fa.Sharing&&(i(Yl(!0)),Rd(uc,{state:"on"})),"")))}}})(this[uA],e)}subscribeAudioStatisticData(e){return(async(e,t)=>{const{mediaAgent:r,store:{getState:o}}=e,n=o(),{media:{audioDecodeStatus:i,audioEncodeStatus:s},audio:{isAllowToTalk:a}}=o(),u=hl(n),c=!t||t.decode,d=!t||t.encode;if(!u)return Promise.reject({type:jc,reason:"Call this function after the 'join' method resolved."});{const{userRole:e}=u,t=sl(e)&&!a||Ug()?"success":s,o=Ug()?"success":i;Dg("audio",t,o).subscribe((e=>{let[t,o]=e;t&&o&&(c&&r.subscribeToQos([Bs.AudioDecode],eu),d&&r.subscribeToQos([Bs.AudioEncode],eu))}))}return""})(this[uA],e)}unsubscribeAudioStatisticData(e){return(async(e,t)=>{const{mediaAgent:r,store:{dispatch:o}}=e,n=!t||t.decode,i=!t||t.encode;return n&&(r.unsubscribeFromQos([Bs.AudioDecode]),o(Xl(ou))),i&&(r.unsubscribeFromQos([Bs.AudioEncode]),o(ep(ou))),null})(this[uA],e)}getMicList(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?[...r.audio.microphoneDevicesList]:[]})(this[uA])}getSpeakerList(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?[...r.audio.speakerDevicesList]:[]})(this[uA])}getAudioState(e){return((e,t)=>{let{store:{getState:r}}=e;const o=r(),{meeting:{isWebinar:n}}=o;let i=null;return null==t?i=hl(o):(i=o.participants.attendeesList.find((e=>e.userId===t)),n&&!i&&(i=o.participants.xmppAttendeeList.find((e=>e.userId===t)))),i?i.audio:null})(this[uA],e)}isAudioMuted(e){return((e,t)=>{let{store:{getState:r}}=e;const o=r(),{meeting:{isWebinar:n}}=o;let i=null;return void 0===t?i=hl(o):(i=o.participants.attendeesList.find((e=>e.userId===t)),n&&!i&&(i=o.participants.xmppAttendeeList.find((e=>e.userId===t)))),!!i&&!!i.muted})(this[uA],e)}getActiveMicrophone(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?r.audio.activeMicrophone:null})(this[uA])}getActiveSpeaker(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?r.audio.activeSpeaker:null})(this[uA])}isSupportCallOut(){return(e=>{let{store:{getState:t}}=e;const{meeting:{isSupportCallOut:r,callOutCountry:o}}=t();return r&&Array.isArray(o)&&(null==o?void 0:o.length)>0})(this[uA])}getDialOutStatus(){return(e=>{let{store:{getState:t}}=e;const{audio:r}=t();return null==r?void 0:r.dialout.returnCode})(this[uA])}getDialOutCountries(){return(e=>{let{store:{getState:t}}=e;const{meeting:{callOutCountry:r}}=t();return Array.isArray(r)?r:[]})(this[uA])}getShareAudioStatus(){return(e=>{let{store:{getState:t}}=e;const{audio:{isShareAudioEnabled:r,isShareAudioMuted:o,isSharingAudio:n}}=t();return{isShareAudioEnabled:r,isShareAudioMuted:o,isSharingAudio:n}})(this[uA])}isOthersShareAudioMutedLocally(e){return((e,t)=>{var r;let{store:{getState:o}}=e;const{audio:{localShareAudioUserMutedList:n}}=o();return null===(r=n.find((e=>e.userId===t)))||void 0===r?void 0:r.muted})(this[uA],e)}getAudioStatisticData(){return(e=>{let{store:{getState:t}}=e;const{audio:{statistic:r}}=t();return ot({},r)})(this[uA])}startVideo(e){return((e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,i=r(),{media:{videoDecodeStatus:s,videoEncodeStatus:a,enforceVirtualBackground:u},video:{isCaptureCameraLoading:c,isCurrentUserStartedVideo:d,isVideoMuted:l}}=i;return d?Promise.reject({type:jc,reason:"Video is started"}):c?Promise.reject({type:jc,reason:"Camera is starting,please wait."}):l&&!fl(i)?Promise.reject({type:jc,reason:"Video is muted by the host"}):!AI(u)||(null==t?void 0:t.videoElement)instanceof HTMLVideoElement?!Fg(u)&&null!=t&&t.virtualBackground?Promise.reject({type:Wc,reason:"Virtual background only compatible with Chrome and Edge with SharedArrayBuffer enabled."}):(o(jp(!0)),Dg("video",a,s).subscribe((e=>{let[i]=e;if(i){const e=r(),{video:{activeCamera:i,isSupportHDVideo:s,virtualBackground:{imageSrc:a},mask:{imageSrc:u}}}=e,{cameraId:c=i,captureWidth:d=0,captureHeight:l=0,mirrored:p,hd:h,virtualBackground:f,mask:g}=t||{};p&&n.mirrorVideo(p),h&&(console.log("HD support is currently limited, and comes with a number of restrictions and limitations. Please visit https://developers.zoom.us/docs/video-sdk/web/video/#720p-video for more details"),s&&Ws.isCompatibleHardwareForEncode()?Ws.isSupportVideoEncodeHardwareAcceleration().then((e=>{e?(n.enableHardwareAccelerationForVideoEncode(!0),o(rh({encode:e}))):console.warn("Cannot capture HD video due to hardware limitation")})):console.warn("Cannot capture HD video due to either account restriction and/or hardware limitation"));const m=f||void 0===f&&!!a&&void 0===g,v=g||void 0===g&&!!u;let y=Promise.resolve({});if(m){const t=f||{imageUrl:void 0,cropped:void 0};y=MI(ot(ot({},t),{},{captureWidth:d,captureHeight:l,cameraId:c,hd:h}),n,e).then((()=>t))}else if(v){const t=g||{imageUrl:void 0,cropped:void 0,clip:void 0,rootWidth:void 0,rootHeight:void 0};t.rootWidth||Object.assign(t,{rootWidth:1280}),t.rootHeight||Object.assign(t,{rootHeight:720}),y=NI(ot(ot({},t),{},{captureWidth:d,captureHeight:l,cameraId:c,hd:h}),n,e).then((()=>t))}y.then((r=>{SI(n,e,t).forEach((e=>{o(e)})),m?o(Xp(r)):v&&o(mh(r))})).catch((e=>{o(jp(!1)),Rd(_u,{reason:e})}))}else o(jp(!1))})),kd(Fu.startCaptureVideo).then((()=>{o(xp(!1)),o(Lp(!1))})).finally((()=>{o(jp(!1))}))):Promise.reject({type:Wc,reason:"You must pass a