diff --git a/CHANGELOG.md b/CHANGELOG.md index c79d82e..1567060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ ## CHANGELOG +## v1.2.0 + +### Added: +* Support for [Cloud Recording](https://marketplace.zoom.us/docs/sdk/video/web/essential/recording) +* Limited support for [720p video send](https://marketplace.zoom.us/docs/sdk/overview/720p) +* Support for call out +* Support for command channel / real-time data +* Improved role management + * *The user who created a session is considered the "original host". The original host has the following privileges: the session ends after a configurable timeout after the original host leaves a session, if a new host was not assigned. When the original host rejoins the same session later, if nobody was assigned as the new host by the original host before they left the session, the original host can claim the 'host' role, based on its user_identity setting in the JWT payload. The original host can take the host role at any time from the current host. See user_identity and role_type in [Authentication](https://marketplace.zoom.us/docs/sdk/video/auth) for details.* +* Interface to disable session timeout + * *Previously, the Video SDK session would end after being idle for 48 hours. This interface enables you to choose to disable the timeout and allow the participants to be idle for an unlimited period of time. The new parameter is an unsigned int sessionIdleTimeoutMins. The default value is 40 minutes.* + +### Fixed: +* chatClient.getHistory() method was not exposed +* makeManager, revokeManager, and isManager are not available as co-hosts are not supported by the Web Video SDK. These have been removed from the documentation as well + ## v1.1.7 ### Added: diff --git a/dist/index.esm.js b/dist/index.esm.js index 301d4d5..83c1ea6 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 n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var r=1;r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function l(e,t,r,n,o){var i={};return Object.keys(n).forEach((function(e){i[e]=n[e]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t0?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,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(Y),Z=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}(),Q=function(e){function t(r,n){void 0===n&&(n=Z.now);var o=e.call(this,r,(function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return I(t,e),t.prototype.schedule=function(r,n,o){return void 0===n&&(n=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},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}(Z),$=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t}(Q))(X),ee=new F((function(e){return e.complete()}));function te(e){return e?function(e){return new F((function(t){return e.schedule((function(){return t.complete()}))}))}(e):ee}function re(e){return e&&"function"==typeof e.schedule}var ne,oe=function(e){return function(t){for(var r=0,n=e.length;r0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=function(e){var t=fe++;return ye[t]=!0,ve.then((function(){return Ee(t)&&e()})),t}(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(function(e){Ee(e)}(r),t.scheduled=void 0)},t}(Y),me=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++n0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(je);function Be(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),xe(j,e)}function We(){return Be(1)}function Ke(){for(var e=[],t=0;t1?n.next(Array.prototype.slice.call(arguments)):n.next(e)}),n,r)}))}function Ye(e,t,r){return r?Ye(e,t).pipe(Ce((function(e){return R(e)?r.apply(void 0,e):r(e)}))):new F((function(r){var n,o=function(){for(var e=[],t=0;t=0}function Ze(){for(var e=[],t=0;t1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof o&&(r=e.pop()),null===n&&1===e.length&&e[0]instanceof F?e[0]:Be(r)(se(e,n))}function Qe(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function $e(e,t){return function(r){return r.lift(new et(e,t))}}var et=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new tt(e,this.predicate,this.thisArg))},e}(),tt=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return I(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}(U);function rt(e,t,r){return[$e(t,r)(new F(ke(e))),$e(Qe(t,r))(new F(ke(e)))]}function nt(){for(var e=[],t=0;t0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.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 ft(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(ue.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(ue.createComplete()),this.unsubscribe()},t}(U),ft=function(e,t){this.time=e,this.notification=t};function vt(e){return function(t){return 0===e?te():t.lift(new yt(e))}}var yt=function(){function e(e){if(this.total=e,this.total<0)throw new Ae}return e.prototype.call=function(e,t){return t.subscribe(new Et(e,this.total))},e}(),Et=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return I(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}(U);function gt(e){return function(t){return t.lift(new mt(e))}}var mt=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new St(e,this.value))},e}(),St=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return I(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(U);function bt(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?xe((function(){return e}),t,r):("number"==typeof t&&(r=t),xe((function(){return e}),r))}var It=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new At(e,this.predicate))},e}(),At=function(e){function t(t,r){var n=e.call(this,t)||this;return n.predicate=r,n.skipping=!0,n.index=0,n}return I(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}(U);function Ot(){for(var e=[],t=0;t0){var o=n.indexOf(r);-1!==o&&n.splice(o,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}(Re),Gt=function(e,t){return e===t||"function"==typeof t&&e===t.toString()},Bt=function(){for(var e=arguments.length,t=Array(e),r=0;r=t.length?r(new er(a,h,new $t(void 0,e[h]))):nr(e[h],t[h],r,n,a,h,s);for(;h=0?(nr(e[o],t[o],r,n,a,o,s),f=tr(f,c)):nr(e[o],void 0,r,n,a,o,s)})),f.forEach((function(e){nr(void 0,t[e],r,n,a,e,s)}))}s.length=s.length-1}else e!==t&&("number"===d&&isNaN(e)&&isNaN(t)||r(new Zt(a,e,t)))}function or(e,t,r,n){return n=n||[],nr(e,t,(function(e){e&&n.push(e)}),r),n.length?n:void 0}function ir(e,t,r){if(e&&t&&r&&r.kind){for(var n=e,o=-1,i=r.path?r.path.length-1:0;++o1?r-1:0),o=1;o1?t-1:0),n=1;n2?r-2:0),s=2;se,SET_RWG_SERVERS_LIST:e=>e,SET_RWG_RETRY_COUNT:e=>e,SET_XMPP_SOCKET_STATUS:e=>e,SET_IS_XMPP_SDK_LOADED:e=>e,SET_MAIN_SESSION_SOCKET_STATUS:e=>e,RESET_SOCKET:()=>({})}),on=pr("CONNECT_TO_MEDIA_STREAM"),sn=pr("RECEIVE_PAYLOAD_FROM_MEDIA_SDK"),{setAudioEncodeStatus:an,setAudioDecodeStatus:cn,setVideoEncodeStatus:dn,setVideoDecodeStatus:un,setSharingEncodeStatus:ln,setSharingDecodeStatus:pn,setMediaConstraints:hn,setMediaEncryptKey:_n,resetMedia:fn}=Pr("SET_AUDIO_ENCODE_STATUS","SET_AUDIO_DECODE_STATUS","SET_VIDEO_ENCODE_STATUS","SET_VIDEO_DECODE_STATUS","SET_SHARING_ENCODE_STATUS","SET_SHARING_DECODE_STATUS","SET_MEDIA_CONSTRAINTS","SET_MEDIA_ENCRYPT_KEY","RESET_MEDIA");function vn(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o{const t=e(...r);if(!t)throw new TypeError('combineEpics: one of the provided Epics "'.concat(e.name||"","\" does not return a stream. Double check you're not missing a return statement!"));return t.pipe(ct((e,t)=>(setTimeout(()=>{throw e},0),t)))}))};try{Object.defineProperty(n,"name",{value:"combineEpics(".concat(t.map(e=>e.name||"").join(", "),")")})}catch(e){}return n}function En(){for(var e=arguments.length,t=new Array(e),r=0;rObject.values(e));return yn(...n)}function gn(e,t){return e.pipe(Bt("".concat(Kr)),$e(e=>e.payload.evt===t))}function mn(e,t){return e.pipe(Bt("".concat(zr)),$e(e=>e.payload.event===t))}function Sn(e,t){return e.pipe(Bt("".concat(Kr),"".concat(Xr)),$e(e=>e.payload.evt===t))}function bn(e,t){return e.pipe(Bt("".concat(sn)),$e(e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t))}var In="undefined"!=typeof window&&window,An="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,On="undefined"!=typeof global&&global,Cn=In||On||An;function Tn(e,t){return void 0===t&&(t=null),new kn({method:"GET",url:e,headers:t})}function wn(e,t,r){return new kn({method:"POST",url:e,body:t,headers:r})}function Rn(e,t){return new kn({method:"DELETE",url:e,headers:t})}function Nn(e,t,r){return new kn({method:"PUT",url:e,body:t,headers:r})}function Dn(e,t,r){return new kn({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!Cn)throw new Error("RxJS could not find any global context (window, self, global)")}();var Mn=Ce((function(e,t){return e.response}));function Pn(e,t){return Mn(new kn({method:"GET",url:e,responseType:"json",headers:t}))}var kn=function(e){function t(t){var r=e.call(this)||this,n={async:!0,createXHR:function(){return this.crossDomain?function(){if(Cn.XMLHttpRequest)return new Cn.XMLHttpRequest;if(Cn.XDomainRequest)return new Cn.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(Cn.XMLHttpRequest)return new Cn.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 Cn.ActiveXObject(e))break}catch(e){}return new Cn.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)n.url=t;else for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);return r.request=n,r}var r;return I(t,e),t.prototype._subscribe=function(e){return new Un(e,this.request)},t.create=((r=function(e){return new t(e)}).get=Tn,r.post=wn,r.delete=Rn,r.put=Nn,r.patch=Dn,r.getJSON=Pn,r),t}(F),Un=function(e){function t(t,r){var n=e.call(this,t)||this;n.request=r,n.done=!1;var o=r.headers=r.headers||{};return r.crossDomain||n.getHeader(o,"X-Requested-With")||(o["X-Requested-With"]="XMLHttpRequest"),n.getHeader(o,"Content-Type")||Cn.FormData&&r.body instanceof Cn.FormData||void 0===r.body||(o["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),r.body=n.serializeBody(r.body,n.getHeader(r.headers,"Content-Type")),n.send(),n}return I(t,e),t.prototype.next=function(e){this.done=!0;var t,r=this.xhr,n=this.request,o=this.destination;try{t=new Vn(e,r,n)}catch(e){return o.error(e)}o.next(t)},t.prototype.send=function(){var e=this.request,t=this.request,r=t.user,n=t.method,o=t.url,i=t.async,s=t.password,a=t.headers,c=t.body;try{var d=this.xhr=e.createXHR();this.setupEvents(d,e),r?d.open(n,o,i,r,s):d.open(n,o,i),i&&(d.timeout=e.timeout,d.responseType=e.responseType),"withCredentials"in d&&(d.withCredentials=!!e.withCredentials),this.setHeaders(d,a),c?d.send(c):d.send()}catch(e){this.error(e)}},t.prototype.serializeBody=function(e,t){if(!e||"string"==typeof e)return e;if(Cn.FormData&&e instanceof Cn.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,n,o=t.progressSubscriber;function i(e){var t,r=i,n=r.subscriber,o=r.progressSubscriber,s=r.request;o&&o.error(e);try{t=new Hn(this,s)}catch(e){t=e}n.error(t)}(e.ontimeout=i,i.request=t,i.subscriber=this,i.progressSubscriber=o,e.upload&&"withCredentials"in e)&&(o&&(r=function(e){r.progressSubscriber.next(e)},Cn.XDomainRequest?e.onprogress=r:e.upload.onprogress=r,r.progressSubscriber=o),n=function(e){var t,r=n,o=r.progressSubscriber,i=r.subscriber,s=r.request;o&&o.error(e);try{t=new Ln("ajax error",this,s)}catch(e){t=e}i.error(t)},e.onerror=n,n.request=t,n.subscriber=this,n.progressSubscriber=o);function s(e){}function a(e){var t=a,r=t.subscriber,n=t.progressSubscriber,o=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)n&&n.complete(),r.next(e),r.complete();else{n&&n.error(e);var c=void 0;try{c=new Ln("ajax error "+i,this,o)}catch(e){c=e}r.error(c)}}}e.onreadystatechange=s,s.subscriber=this,s.progressSubscriber=o,s.request=t,e.onload=a,a.subscriber=this,a.progressSubscriber=o,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}(U),Vn=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=jn(this.responseType,t)},Ln=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=jn(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function jn(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;case"text":default:return"response"in t?t.response:t.responseText}}var Hn=function(e,t){return Ln.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},xn=kn.create;const Fn={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_not_start":"Meeting has not started","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_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"},"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."}},Gn=Fn.default;let Bn,Wn,Kn;function qn(e,t){return t in Gn?Gn[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"}(Bn||(Bn={})),function(e){e[e.LEAVEREASON_RECONNECT=5]="LEAVEREASON_RECONNECT",e[e.LEAVEREASON_KICKEDBYHOST=7]="LEAVEREASON_KICKEDBYHOST",e[e.LEAVEREASON_ENDBYHOST=8]="LEAVEREASON_ENDBYHOST",e[e.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING=9]="LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING",e[e.LEAVEREASON_NORMAL=1]="LEAVEREASON_NORMAL"}(Wn||(Wn={})),function(e){e[e.LEAVESUBREASON_WAITINGROOMFAILOVER=1]="LEAVESUBREASON_WAITINGROOMFAILOVER"}(Kn||(Kn={}));const zn={ANOTHER_MEETING_RUNNING:3e3,ERROR_NOT_EXIST:3001,ERROR_NOT_HOST:3003,WRONG_MEETING_PASSWORD:3004,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:200,COMMON_SUCCESS:0,UPGRADE:1e3},Jn={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",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"},Yn={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},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},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},3136:{"apac.errorcodes_require_host":3709}},Xn={3004:{"apac.errorcodes_pac_mn_wrong":3714},3005:{"apac.errorcodes_web_has_in_progress":3e3},3008:{"apac.errorcodes_not_start":3008},3033:{"apac.errorcodes_denied_email":3620},1005:{"apac.errorcodes_denied_email":3620},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}};function Zn(e,t){return Object.keys(e).find(r=>e[r]===t)}let Qn;function $n(e,t){const{key:r,value:n}=function(e,t){let r=!1;if(-1===e)return{key:"apac.errorcodes_offline",value:403};if(3e3===e){const n=["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 o={};if(Qn)o=Qn;else{const e=Object.keys(Yn[3e3]);n.forEach(t=>{const r=function(e){return"en-US"===e&&(e="default"),Fn[e]||Fn.default}(t);o[t]={},e.forEach(e=>{o[t][e]=r[e]})}),Qn=o}return n.forEach(n=>{if(r)return;const i=Zn(o[n],t);i&&(r={key:i,value:Yn[e][i]})}),r||(r={key:"apac.errorcodes_fail",value:200}),r}if(200===e){const n=Zn({"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=n?{key:n,value:Yn[e][n]}:{key:"apac.errorcodes_fail",value:200},r}if(void 0!==Yn[e]){const t=Yn[e],n=Object.keys(t)[0];r={key:n,value:t[n]}}if(r)return r;const n=Zn(zn,e),o=Jn[n];return o?{key:o,value:e}:{key:"apac.errorcodes_fail",value:200}}(e,t),o=qn(r,r);return r!==o?{reason:o,errorCode:n}:{reason:Gn[r],errorCode:n}}function eo(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==Xn[r]){const e=Xn[r],n=Object.keys(e)[0];t={key:n,value:e[n]}}if(t){const{key:r,value:n}=t,o=qn(r,r);return r!==o?Object.assign({},e,{reason:o,errorCode:n}):Object.assign({},e,{reason:Gn[r],errorCode:n})}const n=$n(r);return Object.assign({},e,{reason:n.reason,errorCode:n.errorCode})}var to="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ro(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var no=ro((function(e,t){!function(t,r){e.exports=function(t){var r,n=(t=t||{}).Base64,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=function(e){for(var t={},r=0,n=e.length;r>>6)+s(128|63&t):s(224|t>>>12&15)+s(128|t>>>6&63)+s(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return s(240|t>>>18&7)+s(128|t>>>12&63)+s(128|t>>>6&63)+s(128|63&t)},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(c,a)},u=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[o.charAt(r>>>18),o.charAt(r>>>12&63),t>=2?"=":o.charAt(r>>>6&63),t>=1?"=":o.charAt(63&r)].join("")},l=t.btoa&&"function"==typeof t.btoa?function(e){return t.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,u)},p=function(e){return l(d(String(e)))},h=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},_=function(e,t){return t?h(p(e)):p(e)};t.Uint8Array&&(r=function(e,t){for(var r="",n=0,i=e.length;n>>18)+o.charAt(d>>>12&63)+(void 0!==a?o.charAt(d>>>6&63):"=")+(void 0!==c?o.charAt(63&d):"=")}return t?h(r):r});var f,v=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(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 s(55296+(t>>>10))+s(56320+(1023&t));case 3:return s((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return s((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},E=function(e){return e.replace(v,y)},g=function(e){var t=e.length,r=t%4,n=(t>0?i[e.charAt(0)]<<18:0)|(t>1?i[e.charAt(1)]<<12:0)|(t>2?i[e.charAt(2)]<<6:0)|(t>3?i[e.charAt(3)]:0),o=[s(n>>>16),s(n>>>8&255),s(255&n)];return o.length-=[0,0,2,1][r],o.join("")},m=t.atob&&"function"==typeof t.atob?function(e){return t.atob(e)}:function(e){return e.replace(/\S{1,4}/g,g)},S=function(e){return m(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},b=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},I=function(e){return function(e){return E(m(e))}(b(e))};t.Uint8Array&&(f=function(e){return Uint8Array.from(S(b(e)),(function(e){return e.charCodeAt(0)}))});if(t.Base64={VERSION:"2.6.4",atob:S,btoa:l,fromBase64:I,toBase64:_,utob:d,encode:_,encodeURI:function(e){return _(e,!0)},btou:E,decode:I,noConflict:function(){var e=t.Base64;return t.Base64=n,e},fromUint8Array:r,toUint8Array:f},"function"==typeof Object.defineProperty){var A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};t.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A((function(){return I(this)}))),Object.defineProperty(String.prototype,"toBase64",A((function(e){return _(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",A((function(){return _(this,!0)})))}}return t.Meteor&&(Base64=t.Base64),e.exports&&(e.exports.Base64=t.Base64),{Base64:t.Base64}}(t)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:to)}));function oo(e){return no.Base64.encode(e,!0)}function io(e){return no.Base64.decode(e)}const so={"-":"+",_:"/",".":"="};function ao(e){const t=e.replace(/[-_.]/g,e=>so[e]);return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const co=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount","bHasAST","bHasRMC"],uo={bChime:"bAllowPlayChimeForEnterOrExit",bHasAST:"hasAst",bHasRMC:"hasRmc",topic:e=>({meetingTopic:io(e)})},lo=pr("GET_MEETING_INFO"),po=pr("GET_INSTANT_MEETING_INFO"),ho=(pr("LOGON_ZOOM_DOMAIN"),pr("VERIFY_ZOOM_RECAPTCHA"),pr("LOGON_THIRD_PARTY_DOMAIN"),pr("PING_RWC_SERVER")),_o=pr("MEETING_FAILOVER"),fo=pr("LEAVE_MEETING"),vo=pr("END_MEETING"),{setMeetingInfo:yo,setWindownOpen:Eo,setAppidSignature:go,setZak:mo,setTkMtkguid:So,setPingRwcTimestamp:bo,setInMeetingInfo:Io,setMeetingAttribute:Ao,resetMeeting:Oo,setIsHost:Co,setIsCohost:To,setMeetingIsOnHold:wo,setIsMeetingReset:Ro,setAudioVideoBeforeOnHold:No,setCurrentUserAudioBeforeReset:Do,setIsCurrentUserMutedBeforeReset:Mo,setMeetingStatus:Po,setMeetingRegion:ko,setIsCurrentUserStartVideoBeforeReset:Uo,setJoinMeetingTimeStamp:Vo,setIsEnableQos:Lo,setActiveAppInfo:jo}=(pr("REGISTER_WEBINAR"),Pr({SET_MEETING_INFO:e=>e,SET_WINDOWN_OPEN:e=>e,SET_APPID_SIGNATURE:e=>e,SET_ZAK:e=>e,SET_TK_MTKGUID:e=>e,SET_PING_RWC_TIMESTAMP:e=>e,SET_IN_MEETING_INFO:e=>e,SET_MEETING_ATTRIBUTE:e=>{if(co.some(t=>e&&void 0!==e[t])){let t=e;return Object.keys(uo).some(t=>void 0!==e[t])&&(t=Object.keys(e).reduce((t,r)=>{const n=uo[r];return"function"==typeof n?Object.assign(t,n(e[r])):"string"==typeof n?t[n]=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}));function Ho(e,t,r){const n=document.createElement("script");n.type="text/javascript",n.readyState?n.onreadystatechange=()=>{"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,t())}:(n.onload=()=>{t()},n.onerror=()=>{r()}),n.src=e,"function"==typeof document.body.append?document.getElementsByTagName("head")[0].append(n):document.getElementsByTagName("head")[0].appendChild(n)}let xo,Fo,Go,Bo,Wo,Ko,qo;!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"}(xo||(xo={})),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"}(Fo||(Fo={})),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.BackToMeeting="back to meeting"}(Go||(Go={})),function(e){e.CDN="CDN",e.Global="Global",e.CN="CN"}(Bo||(Bo={})),function(e){e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed",e.Fail="Fail"}(Wo||(Wo={})),function(e){e.Loading="loading",e.Success="success",e.Fail="fail"}(Ko||(Ko={})),function(e){e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory"}(qo||(qo={}));const zo=oo("{}");class Jo{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=oo("zoom-storage-".concat(e)),this.localStorageKey=oo("zoom-local-storage"),this.memoryCache={},this.sessionCache=JSON.parse(io(sessionStorage.getItem(this.sessionStorageKey)||zo)),this.localCache=JSON.parse(io(localStorage.getItem(this.localStorageKey)||zo))}static init(e){this.instance=new Jo(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:qo.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:qo.LocalStorage}:{value:this.memoryCache[e],type:qo.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case qo.SessionStorage:{const r=this.sessionCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.sessionCache[e]=n,this.flushValue(qo.SessionStorage)),n}case qo.LocalStorage:{const r=this.localCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.localCache[e]=n,this.flushValue(qo.LocalStorage)),n}case qo.Memory:{const r=this.memoryCache[e];let n=t;return"function"==typeof t&&(n=t(r)),this.memoryCache[e]=n,n}default:return null}}removeValue(e){const{type:t}=this.getValue(e);switch(t){case qo.SessionStorage:delete this.sessionCache[e],this.flushValue(qo.SessionStorage);break;case qo.LocalStorage:delete this.localCache[e],this.flushValue(qo.LocalStorage);break;case qo.Memory:delete this.memoryCache[e]}}flushValue(e){e===qo.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,oo(JSON.stringify(this.sessionCache))):e===qo.LocalStorage&&localStorage.setItem(this.localStorageKey,oo(JSON.stringify(this.localCache)))}}function Yo(){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 ".concat(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]),r.join(""))}function Xo(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}function Zo(){return"object"==typeof WebAssembly&&"function"==typeof Worker}Jo.instance=void 0;const Qo=()=>"function"==typeof AudioWorklet,$o=()=>Xo(),ei=()=>!Xo()&&!Zo(),ti=()=>/arm/i.test(navigator.userAgent),ri=()=>/\bCrOS\b/.test(navigator.userAgent),ni=()=>{return null!==(e=navigator)&&void 0!==e&&e.hardwareConcurrency&&"function"==typeof window.OffscreenCanvas&&"function"==typeof window.requestAnimationFrame&&"function"==typeof window.SharedArrayBuffer?ri()&&ti()||ri()&&!ti()?navigator.hardwareConcurrency>=4?9:4:9:1;var e};let oi,ii;!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"}(oi||(oi={})),function(e){e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM"}(ii||(ii={}));const si=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 ai,ci;!function(e){e.WebclientOpt="WEB_CLIENT_OPT",e.WebclientWebinarToken="WEB_CLIENT_WEBINAR_TOKEN",e.WebclientMeetingToken="WEB_CLIENT_MEETING_TOKEN",e.WebclientZak="WEB_CLIENT_ZAK",e.WebclientTk="WEB_CLIENT_TK",e.WebclientIVState="WEB_CLIENT_IV_STATE",e.WebclientIsOnHold="WEB_CLIENT_IS_ON_HOLD",e.WebclientUserId="WEB_CLIENT_USER_ID",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"}(ai||(ai={})),(ci||(ci={})).WebclientDeviceId="WEBCLIENT_DEVICE_ID";const di=(window.crypto||window.msCrypto).subtle,ui=ai.WebclientIVState,li=Object.keys(si).map(e=>si[e].sessionType);class pi{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),Jo.set(ui,{},qo.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new pi(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(Xo()||!Zo())&&r===ii.AES_GCM,this.gcmSessionKey=ao(t),this.gcmMainSessionKey||(this.gcmMainSessionKey=this.gcmSessionKey),this.zoomId=String(e)}beginCrypto(e,t,r){const n=new Uint32Array(1);n[0]=9,n[0]+=Number(r);const o=new Uint8Array(n.buffer);let i=new Uint8Array(132);const s=ao(t);return i.set(s,0),i.set(o,s.length),i=i.subarray(0,s.length+4),di.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!0,["sign"]).then(e=>di.sign({name:"HMAC"},e,i)).then(e=>di.importKey("raw",e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))}getNextIV(e){const t=Jo.get(ui);return void 0===t[e]?(t[e]=0,Jo.set(ui,t,qo.SessionStorage)):Jo.set(ui,t=>c(c({},t),{},{[e]:t[e]+1}),qo.SessionStorage)}resetIVState(){const e=Jo.get(ui);if(void 0===e);else{const t=Object.keys(e).filter(e=>li.indexOf(e)>-1);t.length>0&&(t.forEach(t=>{e[t]+=1e6}),Jo.set(ui,e,qo.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 n=new Uint8Array(0);if(this.instance&&this.instance.isGCMEnabled){const e=16,o=this.instance.getNextIV(r.sessionType),i=new ArrayBuffer(16),s=new Uint8Array(i);new DataView(i).setUint32(0,o,!0);let a=null;return a="BO_BROADCAST"===r.sessionType?this.instance.gcmMainSessionKey:this.instance.gcmSessionKey,this.instance.beginCrypto(a,this.instance.zoomId,r.gcmType).then(r=>{const o=(new TextEncoder).encode(t);return di.encrypt({name:"AES-GCM",iv:s,additionalData:n,tagLength:8*e},r,o)}).then(t=>{const r=1+s.byteLength+2+n.byteLength+4+t.byteLength,o=new ArrayBuffer(r);new Uint8Array(o)[0]=s.length,new Uint8Array(o,1,s.byteLength).set(s),new DataView(o).setUint16(1+s.byteLength,n.length,!0),new Uint8Array(o,3+s.byteLength).set(n),new DataView(o).setUint32(1+s.byteLength+2+n.byteLength,t.byteLength-e,!0),new Uint8Array(o,1+s.byteLength+2+n.byteLength+4).set(new Uint8Array(t));const i=new Uint8Array(o).reduce((e,t)=>e+String.fromCharCode(t),"");return window.btoa(i).replace(/_/g,"/").replace(/-/g,"+").replace(/\=/g,"")})}return Promise.resolve(oo(t))}static beginDecrypt(e){let{decryptedText:t,type:r,zoomId:n}=e;if(this.instance&&this.instance.isGCMEnabled){const e=function(e){let t;const r=e.length,n=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 di.decrypt({name:"AES-GCM",iv:i,additionalData:c,tagLength:8*p.length},e,t.buffer)}).then(e=>({message:(new TextDecoder).decode(e),iv:i,aad:c})).catch(e=>({message:"[".concat("This is an encrypted message","]"),iv:i,aad:c}))}{const e=new TextDecoder("utf-8");return Promise.resolve({message:e.decode(ao(t))})}}}pi.instance=void 0;const hi=20234,_i=12039,fi=16138;let vi;!function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(vi||(vi={}));class yi{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 n=r.filter(e=>e!==t);this.eventHandlers.set(e,n)}}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}})}}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:c({},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,n){const o={text:e,destNodeID:t};return r&&Object.assign(o,{sn:r}),n&&Object.assign(o,{attendeeNodeID:n}),{seq:this.sendMessageToRwg({evt:4135,body:o})}}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}})}}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}})}}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,n){return{seq:this.sendMessageToRwg({evt:4209,body:{jid:t,userID:r,clientCap:n,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){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:t,bCallme:r}})}}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){const n={id:e,size:t};return r&&Object.assign(n,{bShareToBO:!0}),{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}})}}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:c({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:c({id:e},t)})}}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:{}})}}}class Ei extends yi{static createAgent(){return this.rwgInstance||(this.rwgInstance=new Ei),this.rwgInstance}}Ei.rwgInstance=null;class gi extends yi{static getInstance(){return this.instance||(this.instance=new gi),this.instance}}gi.instance=null;const mi=ai.WebclientIVState;class Si{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new Si),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.callbackList=[]}init(){if(!this.instance){const e={ivObj:{[oi.AUDIO_ENCODE]:Jo.get(mi)&&Jo.get(mi)[oi.AUDIO_ENCODE],[oi.VIDEO_ENCODE]:Jo.get(mi)&&Jo.get(mi)[oi.VIDEO_ENCODE],[oi.SHARING_ENCODE]:Jo.get(mi)&&Jo.get(mi)[oi.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(Ei.createAgent())}}setAssetsAndConstraint(e,t,r){var n;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=((e,t)=>t?{audioWorkerPath:"".concat(e,"/").concat(1506,"_js_audio_process.min.js"),audioWorkletPath:"".concat(e,"/").concat(1506,"_js_audio_worklet.min.js"),audioWasm:"".concat(e,"/").concat(1506,"_audio.encode.wasm"),videoWorkerPath:"".concat(e,"/").concat(1506,"_video_s.min.js"),videoMtWorkerPath:"".concat(e,"/").concat(1506,"_video_m.min.js"),videoWasm:"".concat(e,"/").concat(1506,"_video.decode.wasm"),videoMtWasm:"".concat(e,"/").concat(1506,"_video.mt.wasm"),sharingWorkerPath:"".concat(e,"/").concat(1506,"_sharing_s.min.js"),sharingMtWorkerPath:"".concat(e,"/").concat(1506,"_sharing_m.min.js"),videoSIMDWorkerPath:"".concat(e,"/").concat(1506,"_video_simd.min.js"),videoSIMDWasm:"".concat(e,"/").concat(1506,"_video.simd.wasm"),sharingSIMDWorkerPath:"".concat(e,"/").concat(1506,"_sharing_simd.min.js"),videoMSIMDWasm:"".concat(e,"/").concat(1506,"_video.mtsimd.wasm"),sharingMSIMDWorkerPath:"".concat(e,"/").concat(1506,"_sharing_mtsimd.min.js"),videoMSIMDWorkerPath:"".concat(e,"/").concat(1506,"_video_mtsimd.min.js"),audioSIMDWorkletPath:"".concat(e,"/").concat(1506,"_audio_simd.min.js"),audioSIMDWasm:"".concat(e,"/").concat(1506,"_audio.simd.wasm")}:{audioWorkerPath:"".concat(e,"/js_audio_process.min.js"),audioWorkletPath:"".concat(e,"/js_audio_worklet.min.js"),audioWasm:"".concat(e,"/audio.encode.wasm"),videoWorkerPath:"".concat(e,"/video_s.min.js"),videoMtWorkerPath:"".concat(e,"/video_m.min.js"),videoWasm:"".concat(e,"/video.decode.wasm"),videoMtWasm:"".concat(e,"/video.mt.wasm"),sharingWorkerPath:"".concat(e,"/sharing_s.min.js"),sharingMtWorkerPath:"".concat(e,"/sharing_m.min.js"),videoSIMDWorkerPath:"".concat(e,"/video_simd.min.js"),videoSIMDWasm:"".concat(e,"/video.simd.wasm"),sharingSIMDWorkerPath:"".concat(e,"/sharing_simd.min.js"),videoMSIMDWasm:"".concat(e,"/video.mtsimd.wasm"),sharingMSIMDWorkerPath:"".concat(e,"/sharing_mtsimd.min.js"),videoMSIMDWorkerPath:"".concat(e,"/video_mtsimd.min.js"),audioSIMDWorkletPath:"".concat(e,"/audio_simd.min.js"),audioSIMDWasm:"".concat(e,"/audio.simd.wasm")})(this.assetsPath,!!r),this.onMediaSDKCallback=this.onMediaSDKCallback.bind(this),null===(n=this.instance)||void 0===n||n.JsMediaSDK_PreLoad(this.mediaWorkersPath,this.onMediaSDKCallback)}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 0==JsMediaSDK_Instance.util.AdapterWhiteListCheckForEncoder()}connect(e){var t,r,n;let{svcUrl:o,meetingNumber:i,conId:s,e2eEncrypt:a,isViewOnly:c,currentUserId:d,isWebinar:u,enableQos:l}=e;this.svcUrl=o,this.meetingNumber=i,this.confId=s;const p=((e,t,r)=>({videoSocketAddress:"wss://".concat(e,"/wc/media/").concat(t,"?type=v&cid=").concat(r),audioSocketAddress:"wss://".concat(e,"/wc/media/").concat(t,"?type=a&cid=").concat(r),sharingSocketAddress:"wss://".concat(e,"/wc/media/").concat(t,"?type=").concat($o()?"j":"s","&cid=").concat(r)}))(o,i,s);this.mediaSocketAddress=p,this.currentUserId=d;const h=ni();var _,f,v,y,E,g,m,S,b,I;(Zo()?null===(_=this.instance)||void 0===_||_.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkletPath:null===(f=this.mediaWorkersPath)||void 0===f?void 0:f.audioWorkletPath,e2eEncrypt:a,isEnableListenInitEvent:!0}):null===(v=this.instance)||void 0===v||v.setPropsBeforeInit({callback:this.onMediaSDKCallback,e2eEncrypt:a,isEnableListenInitEvent:!0}),!0===(null===(t=this.constraints)||void 0===t?void 0:t.audio)&&Zo())&&((u||Qo())&&(null===(b=this.instance)||void 0===b||b.initAudioDecode(this.mediaWorkersPath,p.audioSocketAddress,d,!1,s,i,h,l)),!Qo()||u&&c||null===(I=this.instance)||void 0===I||I.initAudioEncode(this.mediaWorkersPath,p.audioSocketAddress,d,!1,s,i,h,l));!0===(null===(r=this.constraints)||void 0===r?void 0:r.video)&&Zo()&&(null===(y=this.instance)||void 0===y||y.initVideoDecode(this.mediaWorkersPath,p.videoSocketAddress,d,!1,s,i,h),u&&c||null===(E=this.instance)||void 0===E||E.initVideoEncode(this.mediaWorkersPath,p.videoSocketAddress,d,!1,s,i,h,!1,!0,!0)),!0===(null===(n=this.constraints)||void 0===n?void 0:n.screen)&&(Zo()?(null===(g=this.instance)||void 0===g||g.initSharingDecode(this.mediaWorkersPath,p.sharingSocketAddress,d,!1,s,i,h),u&&c||null===(m=this.instance)||void 0===m||m.initSharingEncode(this.mediaWorkersPath,p.sharingSocketAddress,d,!1,s,i,h)):null===(S=this.instance)||void 0===S||S.initSharingDecode(p.sharingSocketAddress))}destroy(){var e;null===(e=this.instance)||void 0===e||e.destroy(),this.instance=null,this.callbackList=[]}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,n){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(22,{CaptureAudio:n,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t},speakerInfo:{defaultDeviceId:r}})}leaveComputerAudio(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(21,null)}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,n,o,i,s,a,c,d,u){var l;null===(l=this.instance)||void 0===l||l.Notify_MeidaSDK(1,{userId:t,width:n,height:o,x:i,y:s,quality:a,isMyself:c,canvas:e,enableWaterMark:u,waterMarkText:d,zone:r})}stopRenderVideo(e,t,r,n){var o;let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(2,{canvas:e,userId:t,RGBA:n,doNotClean:i,zone:r})}startCaptureVideo(e,t,r,n,o){var i;null===(i=this.instance)||void 0===i||i.Notify_MeidaSDK(3,{ssid:e,width:r,height:n,fps:24,video:o,VideoSelectValue:"default"===t?null:t})}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 n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=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:n,waterMarkText:o,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 n;null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(26,c({socketURL:"wss://".concat(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,n=u(e,["dimension"]);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(27,c(c({},r),n))}startDesktopSharing(e,t,r){var n;let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.sharingCanvas=document.querySelector("#".concat(t)),null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(30,{mode:o,ssid:e,canvas:t,video:r})}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,{})}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;null===(e=this.instance)||void 0===e||e.initAudioEncode(this.mediaWorkersPath,this.mediaSocketAddress.audioSocketAddress,this.currentUserId,!1,this.confId,this.meetingNumber,ni())}sendUserNodeList(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(43,e)}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 n;null===(n=this.instance)||void 0===n||n.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,n,o,i,s){var a;null===(a=this.instance)||void 0===a||a.Notify_MeidaSDK(48,{userId:t,x:n,y:o,width:i,height:s,canvas:e,zone:r})}mirrorVideo(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(75,{isMirrorMyVideo:e})}updateUserMediaSN(e){var t,r,n;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!==(n=e.removed)&&void 0!==n?n:[]}})}updateMediaParams(e){var t;const{iVType:r,isFromMainSession:n,updateParams:o}=e;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(81,{mediaActionType:r,isFromMainSession:Number(n),updateParams:o})}createMSChannel(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(84,e)}addReceivedSharingChannelType(e){var t;const{isFromMainSession:r}=e,n=u(e,["isFromMainSession"]);null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(82,c({isFromMainSession:Number(r)},n))}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})}}var bi;Si.agentInstance=void 0,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"}(bi||(bi={}));const Ii={success:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",fail:["JOIN_MEETING_FAILED"]},Ai={[bi.ConnectionChange]:[{event:"JOIN_MEETING_SUCCESS",payload:()=>({state:Wo.Connected})},{event:"JOIN_MEETING_FAILED",payload:e=>c({state:Wo.Fail},e)},{event:"RECONNECTING_MEETING",payload:e=>c({state:Wo.Reconnecting},e)},{event:"LEAVING_MEETING",payload:e=>c({state:Wo.Closed},e)}],[bi.OnHoldChange]:[{event:"MEETING_IN_WAITING_ROOM",payload:e=>({isOnHold:e})}],[bi.UserAdd]:[{event:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"ADD_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[bi.UserUpdate]:[{event:"UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[bi.UserRemove]:[{event:"REMOVE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[bi.AttendeeUpdate]:[{event:"UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[bi.MeetingAttributeUpdate]:[{event:"UPDATE_MEETING_ATTRIBUTE",payload:()=>{}}],[bi.PromoteAttendeeConsent]:[{event:"MEETING_WEBINAR_PROMOTE_CONSENT_REQ",payload:e=>{let{req_id:t,sender_id:r}=e;return{reqId:t,senderId:r}}}],[bi.ActiveAppsUpdate]:[{event:"ACTIVE_APPS_UPDATE",payload:()=>{}}]};let Oi;!function(e){e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change",e.ChatDeleteMessage="chat-delete-message"}(Oi||(Oi={}));const Ci={[Oi.ChatOnMessage]:[{event:"CHAT_RECEIVE_MESSAGE_EVENTS",payload:e=>e}],[Oi.ChatPrivilegeChange]:[{event:"CHAT_PRIVILEGE_CHANGE",payload:e=>e}],[Oi.ChatDeleteMessage]:[{event:"CHAT_DELETE_MESSAGE_REPONSE",payload:e=>e}]};let Ti,wi,Ri;!function(e){e.Recording="Recording",e.Paused="Paused",e.Stopped="Stopped"}(Ti||(Ti={})),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"}(wi||(wi={})),function(e){e.RecordingChange="recording-change",e.LocalRecordingChange="local-recording-change"}(Ri||(Ri={}));const Ni={[Ri.RecordingChange]:[{event:"CLOUD_RECORDING_STATUS_CHANGE",payload:e=>{const{cmrServerStatus:t}=e;return t===wi.Start?Ti.Recording:t===wi.Pause?Ti.Paused:Ti.Stopped}}],[Ri.LocalRecordingChange]:[{event:"LOCAL_RECORDING_CHANGE",payload:e=>e}]};let Di,Mi,Pi,ki;!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.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.DesktopSharingSystemError=-22]="DesktopSharingSystemError"}(Di||(Di={})),function(e){e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed"}(Mi||(Mi={})),function(e){e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk"}(Pi||(Pi={})),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"}(ki||(ki={}));const Ui=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"}),Vi=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]);let Li,ji,Hi,xi,Fi,Gi,Bi,Wi,Ki,qi,zi;!function(e){e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare"}(Li||(Li={})),function(e){e.Sharing="sharing",e.Paused="paused",e.End="ended"}(ji||(ji={})),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"}(Hi||(Hi={})),function(e){e.Active="Active",e.Inactive="Inactive"}(xi||(xi={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted"}(Fi||(Fi={})),function(e){e.Active="Active",e.Inactive="Inactive"}(Gi||(Gi={})),function(e){e.Success="Success",e.Failed="Failed",e.Initial="Initial"}(Bi||(Bi={})),function(e){e.Started="Started",e.Stopped="Stopped",e.Failed="Failed"}(Wi||(Wi={})),function(e){e.Approved="Approved",e.Rejected="Rejected"}(Ki||(Ki={})),function(e){e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture",e.ShareFromMainSession="ShareFromMainSession"}(qi||(qi={})),function(e){e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change"}(zi||(zi={}));const Ji={[zi.DeviceChange]:[{event:"MEDIA_DEVICE_CHANGE",payload:()=>({})}],[zi.MediaSDKChange]:[{event:"AUDIO_ENCODE_SUCCESS",payload:()=>({type:"audio",action:"encode",result:"success"})},{event:"AUDIO_ENCODE_FAIL",payload:()=>({type:"audio",action:"encode",result:"fail"})},{event:"AUDIO_DECODE_SUCCESS",payload:()=>({type:"audio",action:"decode",result:"success"})},{event:"AUDIO_DECODE_FAIL",payload:()=>({type:"audio",action:"decode",result:"fail"})},{event:"VIDEO_ENCODE_SUCCESS",payload:()=>({type:"video",action:"encode",result:"success"})},{event:"VIDEO_ENCODE_FAIL",payload:()=>({type:"video",action:"encode",result:"fail"})},{event:"VIDEO_DECODE_SUCCESS",payload:()=>({type:"video",action:"decode",result:"success"})},{event:"VIDEO_DECODE_FAIL",payload:()=>({type:"video",action:"decode",result:"fail"})},{event:"SHARING_ENCODE_SUCCESS",payload:()=>({type:"share",action:"encode",result:"success"})},{event:"SHARING_ENCODE_FAIL",payload:()=>({type:"share",action:"encode",result:"fail"})},{event:"SHARING_DECODE_SUCCESS",payload:()=>({type:"share",action:"decode",result:"success"})},{event:"SHARING_DECODE_FAIL",payload:()=>({type:"share",action:"decode",result:"fail"})}]},Yi={success:"VIDEO_CAPTURE_START_SUCCESS",fail:["CAN_NOT_DETECT_CAMERA","CAN_NOT_FIND_CAMERA","VIDEO_USER_FORBIDDEN_CAPTURE","VIDEO_ESTABLISH_STREAM_ERROR","VIDEO_CAMERA_IS_TAKEN"]};let Xi;!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"}(Xi||(Xi={}));const Zi={[Xi.VideoActiveChange]:[{event:"RECEIVE_VIDEO_ACTIVE_INDICATION",payload:e=>({state:e.bVideoOn?xi.Active:xi.Inactive,userId:e.userId})}],[Xi.VideoCapturingChange]:[{event:"VIDEO_CAPTURE_START_SUCCESS",payload:()=>({state:Wi.Started})},{event:"VIDEO_CAPTURE_STOP_RESULT",payload:e=>({state:null!=e&&e.failed?Wi.Failed:Wi.Stopped})}],[Xi.VideoMutedChange]:[{event:"RECEIVE_VIDEO_MUTE_INDICATION",payload:e=>({state:e.isVideoMuted?Fi.Muted:Fi.Unmuted,userId:e.id})}],[Xi.AskForStartVideoConsent]:[{event:"ASK_FOR_START_VIDEO_CONSENT",payload:e=>({state:e.isVideoMuted?Fi.Muted:Fi.Unmuted,userId:e.id})}],[Xi.VideoSpotlightChange]:[{event:"VIDEO_SPOTLIGHT_CHANGE",payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map(e=>({userId:e}))})}],[Xi.VideoDimensionChange]:[{event:"RECEIVE_VIDEO_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[Xi.VideoFollowHostOrder]:[{event:"VIDEO_FOLLOW_HOST_ORDER_CHANGE",payload:e=>({isFollowHostOrder:e.bOn})}],[Xi.VideoHostLayoutChange]:[{event:"VIDEO_HOST_DRAG_LAYOUT_CHANGE",payload:e=>Array.isArray(e.layout)?e.layout.map(e=>({userId:e})):[]}],[Xi.PeerVideoStateChange]:[{event:"VIDEO_NEW_USER_START",payload:e=>c({action:"Start"},e)},{event:"VIDEO_OLD_USER_STOP",payload:e=>c({action:"Stop"},e)}]};let Qi;!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"}(Qi||(Qi={}));const $i={JoinComputerAudio:{success:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",fail:["USER_FORBIDDEN_MICROPHONE","ESTABLISH_AUDIO_STREAM_ERROR"]},LeaveComputerAudio:{success:"AUDIO_CURRENT_USER_LEAVE_AUDIO"},JoinAudioByCallMe:{success:"AUDIO_DIALOUT_RESULT_SUCCESS",fail:["DIALOUT_FAIL"]},cancelDialOut:{success:"AUDIO_DIALOUT_CANCEL_SUCCESS",fail:["DIALOUT_CANCEL_FAIL"]},hangup:{success:"AUDIO_CURRENT_USER_LEAVE_AUDIO"}},es={[Qi.ActiveSpeaker]:[{event:"AUDIO_ACTIVE_SPEAKER",payload:e=>e}],[Qi.UnmuteAudioConsent]:[{event:"AUDIO_UNMUTE_CONSENT",payload:e=>({reason:e})}],[Qi.CurrentAudioChange]:[{event:"AUDIO_CURRENT_USER_JOIN_BY_PHONE",payload:()=>({action:"join",type:"phone"})},{event:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",payload:()=>({action:"join",type:"computer"})},{event:"AUDIO_CURRENT_USER_LEAVE_AUDIO",payload:()=>({action:"leave"})},{event:"AUDIO_CURRENT_USER_MUTED",payload:e=>{let{source:t}=e;return{action:"muted",source:t}}},{event:"AUDIO_CURRENT_USER_UNMUTED",payload:e=>{let{source:t}=e;return{action:"unmuted",source:t}}}],[Qi.DialoutStateChange]:[{event:"AUDIO_DIALOUT_RESULT_CODE",payload:e=>e}],[Qi.MergeAudio]:[{event:"AUDIO_MERGE_AUDIO_INDICATION",payload:e=>e}],[Qi.AutoPlayFailed]:[{event:"AUDIO_AUTO_PLAY_FAILED",payload:()=>{}}]};let ts;!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.RemoteControlApprovedChange="remote-control-approved-change",e.RemoteControlInControlChange="remote-control-in-control-change",e.RemoteControlClipboardChange="remote-control-clipboard-change"}(ts||(ts={}));const rs={[ts.ShareActiveChange]:[{event:"SHARE_ACTIVE_INDICATION",payload:e=>{const{isActive:t,activeUserId:r}=e;return c({state:t?"Active":"Inactive",userId:r},u(e,["isActive","activeUserId"]))}}],[ts.ShareDimensionChange]:[{event:"SHARE_DIMENSION_CHANGE",payload:e=>({type:"sended",width:e.width,height:e.height})},{event:"SHARE_RECEIVED_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[ts.SharePassiveStop]:[{event:"SHARE_VIDEO_STREAMS_END",payload:()=>({reason:qi.StopScreenCapture})},{event:"SHARE_PASSIVE_STOP_SHARE",payload:()=>({reason:qi.PrivilegeChange})},{event:"SHARE_PASSIVE_BO_STOP",payload:()=>({reason:qi.ShareFromMainSession})}],[ts.SharePeerStateChange]:[{event:"SHARE_NEW_USER_ADD",payload:e=>({userId:e.id,action:"Start"})},{event:"SHARE_USER_REMOVE",payload:e=>({userId:e.id,action:"Stop"})}],[ts.ShareContentChange]:[{event:"SHARE_AUTO_CHANGE_SOURCE",payload:e=>e}],[ts.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?Ki.Approved:Ki.Rejected})}],[ts.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[ts.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[ts.SharePrivilegeChange]:[{event:"SHARE_PRIVILEGE_CHANGE",payload:e=>({privilege:e})}]},ns="INVALID_OPERATION",os="INVALID_PARAMETERS";let is;!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"}(is||(is={}));const ss={[is.InviteToJoin]:[{event:"BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",payload:e=>e}],[is.RoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_COUTDOWN",payload:e=>e}],[is.RoomTimeUp]:[{event:"BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",payload:e=>e}],[is.ClosingRoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",payload:e=>e}],[is.BroadcastMessage]:[{event:"BREAKOUT_ROOM_BROADCAST_MESSAGE",payload:e=>e}],[is.AskForHelp]:[{event:"BREAKOUT_ROOM_ASK_HELP_REQUEST",payload:e=>e}],[is.AskForHelpResponse]:[{event:"BREAKOUT_ROOM_ASK_HELP_RESPONSE",payload:e=>e}],[is.RoomStateChange]:[{event:"BREAKOUT_ROOM_ATTRIBUTE_INDICATION",payload:e=>({status:e.controlStatus})}],[is.MainSessionUserUpdate]:[{event:"BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE",payload:()=>({})}]},as=c(c(c(c(c(c(c(c(c(c({},Ai),{"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}]}),Ci),Ni),es),Zi),{"qa-message":[{event:"QA_VOTE_EVENTS",payload:e=>e},{event:"QA_DISMISS_EVENT",payload:e=>e},{event:"QA_LIVE_ANSWER_EVENT",payload:e=>e},{event:"QA_NEW_ANSWER_EVENT",payload:e=>e},{event:"QA_NEW_QUESTION_EVENT",payload:e=>e}],"qa-setting":[{event:"QA_SETTING_SUCCESS_EVENT",payload:e=>e}]}),rs),Ji),ss),cs=(ds=ds||Object.create(null),{on:function(e,t){(ds[e]||(ds[e]=[])).push(t)},off:function(e,t){ds[e]&&ds[e].splice(ds[e].indexOf(t)>>>0,1)},emit:function(e,t){(ds[e]||[]).slice().map((function(e){e(t)})),(ds["*"]||[]).slice().map((function(r){r(e,t)}))}});var ds;const us=new Map,ls=new Array,ps=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;cs.emit(e,t)},hs=e=>new Promise((t,r)=>{e.fail&&e.fail.length>0?nt(Je(cs,e.success).pipe(vt(1)),Ze(...e.fail.map(e=>Je(cs,e).pipe(vt(1),xe(t=>ce({type:e,payload:t})))))).subscribe(e=>t(e),e=>{"object"==typeof e.payload?r(c({type:e.type},e.payload)):void 0===e.payload?r({type:e.type}):r(e)}):Je(cs,e.success).pipe(vt(1)).subscribe(e=>t(e))}),_s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4;return new Promise((n,o)=>{let i=ee;"string"==typeof e?i=Je(cs,e).pipe(vt(1)):(i=Je(cs,e.event),e.operations&&(i=e.operations.reduce((e,t)=>e.pipe(t),i))),nt(i,st(r).pipe(bt(ce("timeout")))).subscribe(e=>{if(t){const r=t(e);"boolean"==typeof r?r?n(""):o({type:"INTERNAL_ERROR"}):0===r.ret?n(r.body):o({type:"INTERNAL_ERROR",reason:r.body})}else n(e)},()=>{o({type:"OPERATION_TIMEOUT"})})})},fs=(e,t)=>void 0!==t?Je(cs,e).pipe(vt(t)):Je(cs,e),vs=()=>{ls.forEach(e=>{e.unsubscribe()}),ls.length=0,us.clear()},{setAttendeesList:ys,setXmppAttendeeList:Es,setIsAdmitAllSilentUsers:gs,resetParticipants:ms,addFailoverAttendees:Ss,removeFailoverAttendees:bs,setClearRaiseHand:Is,setClearAttendeeFeedback:As}=Pr({SET_ATTENDEES_LIST:e=>e,SET_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:()=>({})});var Os=function(e,t){return e===t};function Cs(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var r=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}var Ts=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n-1){var o=r[n];return n>0&&(r.splice(n,1),r.unshift(o)),o.value}return"NOT_FOUND"}return{get:n,put:function(t,o){"NOT_FOUND"===n(t)&&(r.unshift({key:t,value:o}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(c,u);function p(){var t=l.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),d){var r=l.getEntries(),n=r.find((function(e){return d(e.value,t)}));n&&(t=n.value)}l.put(arguments,t)}return t}return p.clearCache=function(){return l.clear()},p}));const ws=e=>{let{participants:{attendeesList:t}}=e;return t};let Rs,Ns,Ds;!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"}(Rs||(Rs={})),function(e){e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee"}(Ns||(Ns={})),function(e){e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323"}(Ds||(Ds={}));const Ms=e=>(e&Ds.Phone)===Ds.Phone,Ps=e=>e===Rs.ViewOnlyCanTalk,ks=e=>(e&Rs.ViewOnly)===Rs.ViewOnly;let Us,Vs,Ls,js,Hs,xs;!function(e){e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually"}(Us||(Us={})),function(e){e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(Vs||(Vs={})),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"}(Ls||(Ls={})),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"}(js||(js={})),function(e){e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO"}(Hs||(Hs={})),function(e){e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom"}(xs||(xs={}));const Fs=Ts([e=>{let{meeting:{userId:t}}=e;return t},ws],(e,t)=>t.find(t=>t.userId===e)),Gs=Ts([Fs],e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost)),Bs=Ts([Fs],e=>null==e?void 0:e.isHost),Ws=Ts([e=>{let{participants:{xmppAttendeeList:t}}=e;return t}],e=>e.filter(e=>e.userRole===Ns.Attendee)),Ks=Ts([ws],e=>e.filter(e=>e.bHold&&!e.bid)),qs=Ts([ws,e=>{let{breakoutRoom:t}=e;return t&&t.controlStatus},e=>{let{breakoutRoom:t}=e;return t&&t.currentRoom.status}],(e,t,r)=>t!==Vs.InProgress&&t!==Vs.Closing||r!==js.InRoom?e.filter(e=>!e.bHold&&!e.bid):e.filter(e=>!e.bHold)),zs=Ts([qs],e=>e.find(e=>e.isHost)),Js=Ts([qs],e=>e.filter(e=>e.bCoHost));let Ys;!function(e){e.Closed="closed",e.Connecting="connecting",e.Connected="connected"}(Ys||(Ys={}));const{setAsnIds:Xs,setIsCanUnmute:Zs,setDialoutSequence:Qs,setDialoutResultCode:$s,setIsAllowToTalk:ea,setIsHostMuteAll:ta,setIsActiveOperation:ra,setAudioSsrc:na,setIsMutedUponEntry:oa,setIsUserGrantCaptureAudio:ia,setIsMicrophoneForbidden:sa,setWebrtcRestartCount:aa,setMicrophoneList:ca,setSpeakerList:da,setActiveMicrophone:ua,setActiveSpeaker:la,setCanPlayAudio:pa,resetAudio:ha,setIsComputerAudioLoading:_a,setIsSpeakerOnly:fa}=Pr("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"),{setSharePrivilege:va,setShareActiveNode:ya,setIsReceiveSharing:Ea,setIsChromeExtensionInstalled:ga,setIsScreenShareForbidden:ma,setShareDimension:Sa,setShareStatus:ba,setShareSsrc:Ia,setShareQuality:Aa,setReceivedShareDimension:Oa,setIsRemoteControlApproved:Ca,setIsGrabRemoteControl:Ta,setIsVerifiedSharingRenderCanvasAfterFailover:wa,setIsVerifiedSharingCaptureCanvasAfterFailover:Ra,setIsSdkGrabControl:Na,setIsReceiveSharingFromMainSession:Da,setIsSharingToBreakoutRoom:Ma,resetShare:Pa}=Pr("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_VERIFIED_SHARING_RENDER_CANVAS_AFTER_FAILOVER","SET_IS_VERIFIED_SHARING_CAPTURE_CANVAS_AFTER_FAILOVER","SET_IS_SDK_GRAB_CONTROL","SET_IS_RECEIVE_SHARING_FROM_MAIN_SESSION","SET_IS_SHARING_TO_BREAKOUT_ROOM","RESET_SHARE"),{setVideoSsrc:ka,setActiveVideoId:Ua,setCameraList:Va,setActiveCamera:La,setIsCurrentUserStartedVideo:ja,setSpotlightVideo:Ha,setIsCaptureForbidden:xa,setVideoMaxQuality:Fa,setCaptureCanvasList:Ga,setIsVideoMuted:Ba,setIsCaptureCameraLoading:Wa,setIsCameraTaken:Ka,setIsVerifiedVideoRenderCanvasAfterFailover:qa,setIsVerifiedVideoCaptureCanvasAfterFailover:za,resetVideo:Ja,setReceivedVideoDimension:Ya,addSubscribedVideoId:Xa,removeSubscribedVideoId:Za,setIsFollowHostVideoLayout:Qa,setHostDragLayout:$a,addRenderedVideoId:ec,removeRenderedVideoId:tc,setIsSupportHdVideo:rc,setHighDefinitionVideoId:nc,setIsCanUnmuteVideo:oc}=Pr("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_CAPTURE_CANVAS_LIST","SET_IS_VIDEO_MUTED","SET_IS_CAPTURE_CAMERA_LOADING","SET_IS_CAMERA_TAKEN","SET_IS_VERIFIED_VIDEO_RENDER_CANVAS_AFTER_FAILOVER","SET_IS_VERIFIED_VIDEO_CAPTURE_CANVAS_AFTER_FAILOVER","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_HIGH_DEFINITION_VIDEO_ID","SET_IS_CAN_UNMUTE_VIDEO"),{setTempSetting:ic,setSetting:sc,setQuestionList:ac,setQuestionUpVoted:cc,resetQa:dc}=Pr("SET_TEMP_SETTING","SET_SETTING","SET_QUESTION_LIST","SET_QUESTION_UP_VOTED","SET_SELF_LIVE_ANSWER","RESET_QA"),{setChatPrivilege:uc,addChatMessageHistory:lc,resetChat:pc,setIsAllowAttendeeChat:hc,setLatestChatMessageId:_c,removeChatMessage:fc}=Pr("SET_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT","SET_LATEST_CHAT_MESSAGE_ID","REMOVE_CHAT_MESSAGE"),{setCcEditorInfo:vc,setTempSendCcText:yc,setCcLtMessage:Ec,setTempReceiveLtText:gc,setTempReceiveCcText:mc,setGatewayInfoList:Sc,setLtEnable:bc,setIsListenClosedCaption:Ic,setCcEnable:Ac,allowParticipantAskLt:Oc,receiveAskStartLt:Cc,setMeetingEnabledLtFeature:Tc,updateLtStatus:wc,deleteMessage:Rc,updateMessage:Nc,resetClosedCaption:Dc}=Pr("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:Mc,setBreakoutRoomAllocationPattern:Pc,setBreakoutRoomSequenceId:kc,setMeetingElapsedTime:Uc,setStartRoomElapsedTime:Vc,setBreakoutRoomOptions:Lc,setBreakoutRoomControlStatus:jc,setBreakoutRooms:Hc,setCurrentBreakoutRoom:xc,setBreakoutRoomAttendeeStatus:Fc,setBreakoutRoomConfId:Gc,setBreakoutRoomToken:Bc,resetBreakoutRoom:Wc,setBreakoutRoomClosingRoomTime:Kc,setBreakoutRoomBroadcastMessage:qc,setBreakoutRoomHostReplyType:zc,setBreakoutRoomHostReplyRequestId:Jc,setMainSessionAttendeeList:Yc,setIsHugeBreakoutRoom:Xc,setBreakoutRoomUpdatedUserRoleCount:Zc,setBreakoutRoomPreAssignedRoomList:Qc}=Pr("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_UPDATED_USER_ROLE_COUNT","SET_BREAKOUT_ROOM_PRE_ASSIGNED_ROOM_LIST"),$c=(e,t)=>{if(e.result){const{result:{mn:r,ts:n,auth:o,track_auth:i,mid:s,tid:a,encryptedRWC:c,user_identity:d,meetingOptions:u}}=e,{lang:l,password:p,topic:h,zlk:_,cv:f,userName:v}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:n,auth:o,passWord:p,trackAuth:i,customerKey:d,encryptedRWC:JSON.parse(c||"{}"),meetingOptions:JSON.parse(u||"{}"),topic:h,userName:Jo.get(ai.WebclientUserName)||v,cv:f,zlkJwtToken:_,lang:l}}return e},ed=(e,t,r,n,o,i)=>{const s={ts:n,auth:o,rwcToken:r,dmz:1};return i&&Object.assign(s,{confID:i}),"https://".concat(e,"/wc/ping/").concat(t,"?").concat(new URLSearchParams(s).toString())},td=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{socket:{zoomSocketStatus:r,xmppSocketStatus:n,mainSessionSocketStatus:o},meeting:{meetingStatus:i}}=e,s=[Po("closed")];if("joined"===i){const t=Si.getInstance(),r=Ei.createAgent();if(t.disconnect(),t.destroy(),e.video&&e.video.subscribedVideoList.length>0&&e.video.subscribedVideoList.forEach(e=>{r.unsubscribeVideo(e)}),e.share&&e.share.isReceiveSharing){const t=e.share.activeNodeId;e.share.isRemoteControlApproved&&r.sharingRequestRemoteControl(t,!1),r.unsubscribeSharing(t)}}if(t||(Jo.clearSession(),sessionStorage.clear(),pi.destroy()),r!==Ys.Closed&&s.push(Gr()),n!==Ys.Closed&&s.push(Br()),o!==Ys.Closed&&s.push(Yr()),t){const t=Fs(e);s.push(Oo({audio:null==t?void 0:t.audio,muted:null==t?void 0:t.muted,video:null==t?void 0:t.bVideoOn}))}else s.push(Oo({audio:!1,muted:void 0,video:!1}));return s.push(nn(),fn(),ms(),ha(),Pa(),Ja(),dc(),pc(),Dc(),Wc()),s},rd=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;nt.find(t=>t.userId===e)),$e(e=>!!e),vt(1)]},...r)};function nd(e){return H(Ce((t,r)=>e(t,r)),$e(e=>null!=e))}function od(e){return H(xe((t,r)=>e(t,r)||ee))}function id(e){return H(Rt((t,r)=>e(t,r)||ee))}const sd=(e,t)=>{const r=performance.now();let n=0,o=!1;return setTimeout((function i(){n+=t,e();const s=performance.now()-r-n,a=setTimeout(i,Math.max(t-s,0));o&&clearTimeout(a)}),t),()=>{o=!0}},ad={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},cd={["".concat(7937)]:()=>({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 dd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ad;return t=>new F(r=>{const n=new Map;let o=0,i=null;const{period:s,rules:a}=e;let c=null;i||(i=sd(()=>{o=0},s));const d=Object.keys(cd),u=t.subscribe({next(e){if(e&&e.evt&&null!==i){o+=1;const{evt:t,body:i}=e,s=String(t);if(d.indexOf(s)>=0)if(c){const e=n.get(s);if(e)e.onThrottle(i);else{const e=cd[s]();e.onThrottle(i),n.set(s,e)}}else{let t=0;if(a.forEach(e=>{o>e.peak&&(t=e.throttle)}),t>0){const e=cd[s]();e.onThrottle(i),n.set(s,e),c=setTimeout(()=>{n.forEach((e,t)=>{const n={evt:Number(t),body:e.payloads};r.next(n)}),n.clear(),c=null},t)}else r.next(e)}else r.next(e)}else r.next(e)},error(e){r.error(e)},complete(){r.complete()}});return()=>{u.unsubscribe(),i&&(i(),i=null),o=0}})}Ts([qs,e=>{let{share:{isReceiveSharing:t}}=e;return t},e=>{let{share:{activeNodeId:t}}=e;return t}],(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return t?e.find(e=>e.userId===r&&!0===e.sharerOn):null}));const ud=Ts([qs],e=>e.filter(e=>e.sharerOn)),ld=(e,t,r)=>qe(...[t,r].map((t,r)=>{if("initial"!==t)return Ve(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return nt(fs("".concat(e.toUpperCase(),"_").concat(t,"_SUCCESS"),1).pipe(gt(!0)),fs("".concat(e.toUpperCase(),"_").concat(t,"_FAIL"),1).pipe(gt(!1)))}})),pd=e=>{const t=Fs(e.value);return t?ae(t):fs("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1).pipe(le(me),Lt(e),Ce(e=>{let[,t]=e;return Fs(t)}))},hd=()=>Ve(navigator.mediaDevices.enumerateDevices()).pipe(Ce(e=>{const t=[],r=[],n=[];return e.forEach(e=>{const{kind:o,deviceId:i,label:s}=e;switch(o){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":n.push({deviceId:i,label:s})}}),{microphones:t,speakers:r,cameras:n}}));function _d(e){if(e){let r=e;try{const t=e.width;e.width=t}catch(n){var t;r=e.cloneNode(!0),null===(t=e.parentNode)||void 0===t||t.replaceChild(r,e)}return r}return e}const fd=Ei.createAgent();var vd=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>gn(e,7938).pipe($e(e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.lockShare)}),Lt(t),Mt(e=>{let[t,r]=e;const{share:{sharePrivilege:n}}=r,{payload:{body:{lockShare:o}}}=t;n!==o&&ps("SHARE_PRIVILEGE_CHANGE",o)}),Ce(e=>{let[t]=e;return va(t.payload.body.lockShare)})),shareSSrcEpic:e=>gn(e,20227).pipe(Ce(e=>Ia(e.payload.body.ssrc))),shareStatusChangeEpic:(e,t)=>gn(e,20225).pipe(Lt(t),$e(e=>{let[t,r]=e;const{payload:{body:n}}=t,{share:{isReceiveSharingFromMainSession:o}}=r;return!o||o&&n.fromMainSession}),Ce(e=>{let[t,r]=e;const{share:{isReceiveSharing:n,activeNodeId:o,shareQuality:i,isReceiveSharingFromMainSession:s},breakoutRoom:a}=r,{payload:{body:c}}=t;if(n&&1===c.bStatus){let e=!1;(null==a?void 0:a.currentRoom.status)===js.InRoom&&a.mainSessionAttendeeList.length>0&&(e=a.mainSessionAttendeeList.findIndex(e=>e.userId===o)>-1),fd.unsubscribeSharing(o,e),fd.subscribeSharing(c.activeNodeID,i,s),Si.getInstance().switchSharingSource(c.ssrc,s),ps("SHARE_AUTO_CHANGE_SOURCE",{userId:c.activeNodeID})}else if(1===c.bStatus){const e={activeUserId:c.activeNodeID,isActive:!0};s&&Object.assign(e,{isFromMainSession:!0}),ps("SHARE_ACTIVE_INDICATION",e)}else if(n){const e={activeUserId:c.activeNodeID,isActive:!1};s&&Object.assign(e,{isFromMainSession:!0}),ps("SHARE_ACTIVE_INDICATION",e)}return ya(c)})),handleChromeExtensionEpic:e=>bn(e,Di.CheckChromeSharingExtensionResponse).pipe(Ce(e=>(ps("SHARE_CHECK_CHROME_SHARING_EXTENSION",e.payload.data),ga(e.payload.data)))),handleSDKShareSuccessEpic:(e,t)=>bn(e,Di.DesktopSharingCaptureSuccess).pipe(Lt(t),Ce(e=>{let[,t]=e;const{meeting:{userId:r},share:{isSharingToBreakoutRoom:n}}=t;return fd.startSharing(r,{bShareToBO:n}),ma(!1)})),handleSDKShareErrorEpic:e=>bn(e,[Di.DesktopSharingError,Di.DesktopSharingChromeExtensionUninstalled,Di.DesktopSharingPermissionDenied,Di.DesktopSharingSystemError]).pipe(nd(e=>{if([Di.DesktopSharingPermissionDenied,Di.DesktopSharingSystemError].includes(e.payload.type))return ma(!0);ps("SHARE_START_DESKTOP_SHARE_FAILED",{reason:""})})),handleSDKShareDimensionChangeEpic:e=>bn(e,Di.CurrentDesktopSharingWidthHeight).pipe($e(e=>!!e.payload.data),Ce(e=>{ps("SHARE_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return Si.getInstance().ajustmentSharingCanvas(t,r),Sa(e.payload.data)})),handleSDKReceivedShareSizeChangeEpic:(e,t)=>bn(e,Di.SharingDecodeMaxSize).pipe($e(e=>!!e.payload.data),Lt(t),nd(e=>{let[t,r]=e;const{share:{shareQuality:n,activeNodeId:o,isReceiveSharingFromMainSession:i}}=r,{payload:{data:{size:s}}}=t,a=Number(s);if(n!==a)return fd.subscribeSharing(o,a,i),Aa(a)})),handleRWGShareOriginalDimensionEpic:e=>gn(e,20226).pipe(Mt(e=>{var t,r;if(ps("SHARE_RECEIVED_DIMENSION_CHANGE",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;Si.getInstance().ajustmentReceivedSharingCanvas(t,r)}}),Ce(e=>Oa(e.payload.body))),handleSDKShareOriginalDimensionEpic:e=>bn(e,Di.SharingPara).pipe(Mt(e=>{var t,r;if(ps("SHARE_RECEIVED_DIMENSION_CHANGE",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;Si.getInstance().ajustmentReceivedSharingCanvas(t,r)}}),Ce(e=>{var t;return Oa(null===(t=e.payload.data)||void 0===t?void 0:t.body)})),handleSDKStopShareEpic:(e,t)=>bn(e,Di.UserStopDesktopSharing).pipe(Lt(t),Ce(e=>{let[,t]=e;const{meeting:{userId:r},share:{status:n}}=t;return n!==ji.End&&(fd.stopSharing(r),ps("SHARE_VIDEO_STREAMS_END")),ba(ji.End)})),handleRWGCurrentUserShareChangeEpic:(e,t)=>gn(e,7937).pipe(Lt(t),$e(e=>{let[t,r]=e;const{meeting:{userId:n}}=r,o=t.payload.body.update;return o&&o.length>0&&o.findIndex(e=>e.id===n&&void 0!==e.bShareOn)>-1}),xe(e=>{let[t,r]=e;const{meeting:{userId:n},share:{status:o,isReceiveSharing:i,activeNodeId:s}}=r,{payload:{body:{update:a}}}=t,c=a.find(e=>e.id===n&&!1===e.bShareOn),d=a.find(e=>e.id===n&&!0===e.bShareOn),u=[],l=Si.getInstance();return c&&o!==ji.End&&(fd.stopSharing(n),l.stopDesktopSharing(),u.push(ba(ji.End)),ps("SHARE_PASSIVE_STOP_SHARE")),d&&o===ji.End&&(i&&(l.stopRenderSharing(),fd.unsubscribeSharing(s),u.push(Ea(!1))),u.push(ba(ji.Sharing))),Ve(u)})),handleMultipleShareChangeEpic:(e,t)=>gn(e,7937).pipe(Lt(t),$e(e=>{let[t,r]=e;const{meeting:{userId:n}}=r,o=t.payload.body.update;return o&&o.length>0&&o.findIndex(e=>e.id!==n&&void 0!==e.bShareOn)>-1}),xe(t=>{let[r,n]=t;const{payload:{body:{update:o}}}=r,{share:{activeNodeId:i,isReceiveSharing:s,shareQuality:a,isReceiveSharingFromMainSession:c}}=n,d=ud(n),u=o.filter(e=>!0===e.bShareOn&&!1===e.bSharePause),l=o.filter(e=>!1===e.bShareOn);return u.length>0&&u.forEach(e=>{-1===d.findIndex(t=>t.userId===e.id)&&ps("SHARE_NEW_USER_ADD",e)}),l.length>0&&(l.forEach(e=>{ps("SHARE_USER_REMOVE",e)}),s&&l.some(e=>e.id===i))?nt(gn(e,20225).pipe(vt(1),bt(ee)),st(50).pipe(bt(ce("timeout")))).pipe(ct(()=>{const e=d.filter(e=>e.userId!==i);if(e.length>0){const t=e[0],{userId:r}=t;return fd.unsubscribeSharing(i,c),fd.subscribeSharing(r,a,c),Si.getInstance().switchSharingSource(r,c),ps("SHARE_AUTO_CHANGE_SOURCE",{userId:r}),ae(ya({activeNodeID:r,bStatus:1,ssrc:r}))}return ee})):ee})),handleSharingEncryptIndication:(e,t)=>gn(e,hi).pipe(Lt(t),Rt(e=>{let[r,n]=e;const{payload:{body:{encryptKey:o,additionalType:i}}}=r,{media:{sharingDecodeStatus:s,sharingEncodeStatus:a},meeting:{confId:c,userId:d,zoomId:u,meetingId:l,meetingNumber:p,isWebinar:h}}=n;return pd(t).pipe(Rt(e=>{let r=a;return h&&e&&ks(e.userRole)&&(r="failed"),ld("sharing",r,s).pipe(Mt(e=>{let[r,n]=e;const s=Si.getInstance(),a={userId:d,sn:ao(u),confId:c,encryptKey:ao(o),encryptType:i,meetingId:l,meetingNumber:p};if(r&&(null==s||s.updateMediaParams({iVType:oi.SHARING_ENCODE,isFromMainSession:!1,updateParams:a})),n){s.updateMediaParams({iVType:oi.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&&ao(e.zoomID)}));s.updateUserMediaSN({added:t,isFromMainSession:!1,iVType:oi.SHARING_DECODE})}}}),bt(ee))}))})),handleSharingReceivingChannelReadyEpic:(e,t)=>Sn(e,20235).pipe(Lt(t),Mt(e=>{let[t,r]=e;const{media:{sharingDecodeStatus:n}}=r,{type:o,payload:{body:i}}=t,s=o==="".concat(Xr);ld("sharing","success",n).subscribe(e=>{let[,t]=e;t&&Si.getInstance().addReceivedSharingChannelType(c({isFromMainSession:s},i))})}),bt(ee)),handleSharingReceivingChannelCloseEpic:(e,t)=>Sn(e,20236).pipe(Lt(t),Mt(e=>{let[t,r]=e;const{media:{sharingDecodeStatus:n}}=r,{type:o,payload:{body:{ssrc:i}}}=t,s=o==="".concat(Xr);ld("sharing","success",n).subscribe(e=>{let[,t]=e;t&&Si.getInstance().removeReceivedSharingChannelType({isFromMainSession:s,ssrc:i})})}),bt(ee))});function yd(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:Ad(e)?2:Od(e)?3:0}function bd(e,t){return 2===Sd(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Id(e,t,r){var n=Sd(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function Ad(e){return Zd&&e instanceof Map}function Od(e){return Qd&&e instanceof Set}function Cd(e){return e.o||e.t}function Td(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=iu(e);delete t[ru];for(var r=ou(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=Rd),Object.freeze(e),t&&md(e,(function(e,t){return wd(t,!0)}),!0)),e}function Rd(){yd(2)}function Nd(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Dd(e){var t=su[e];return t||yd(18,e),t}function Md(){return Yd}function Pd(e,t){t&&(Dd("Patches"),e.u=[],e.s=[],e.v=t)}function kd(e){Ud(e),e.p.forEach(Ld),e.p=null}function Ud(e){e===Yd&&(Yd=e.l)}function Vd(e){return Yd={p:[],l:Yd,h:e,m:!0,_:0}}function Ld(e){var t=e[ru];0===t.i||1===t.i?t.j():t.O=!0}function jd(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.g||Dd("ES5").S(t,e,n),n?(r[ru].P&&(kd(t),yd(4)),gd(e)&&(e=Hd(t,e),t.l||Fd(t,e)),t.u&&Dd("Patches").M(r[ru],e,t.u,t.s)):e=Hd(t,r,[]),kd(t),t.u&&t.v(t.u,t.s),e!==eu?e:void 0}function Hd(e,t,r){if(Nd(t))return t;var n=t[ru];if(!n)return md(t,(function(o,i){return xd(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return Fd(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=Td(n.k):n.o;md(3===n.i?new Set(o):o,(function(t,i){return xd(e,n,o,t,i,r)})),Fd(e,o,!1),r&&e.u&&Dd("Patches").R(n,r,e.u,e.s)}return n.o}function xd(e,t,r,n,o,i){if(Ed(o)){var s=Hd(e,o,i&&t&&3!==t.i&&!bd(t.D,n)?i.concat(n):void 0);if(Id(r,n,s),!Ed(s))return;e.m=!1}if(gd(o)&&!Nd(o)){if(!e.h.F&&e._<1)return;Hd(e,o),t&&t.A.l||Fd(e,o)}}function Fd(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&wd(t,r)}function Gd(e,t){var r=e[ru];return(r?Cd(r):e)[t]}function Bd(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Wd(e){e.P||(e.P=!0,e.l&&Wd(e.l))}function Kd(e){e.o||(e.o=Td(e.t))}function qd(e,t,r){var n=Ad(t)?Dd("MapSet").N(t,r):Od(t)?Dd("MapSet").T(t,r):e.g?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:Md(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=au;r&&(o=[n],i=cu);var s=Proxy.revocable(o,i),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(t,r):Dd("ES5").J(t,r);return(r?r.A:Md()).p.push(n),n}function zd(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Td(e)}var Jd,Yd,Xd="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Zd="undefined"!=typeof Map,Qd="undefined"!=typeof Set,$d="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,eu=Xd?Symbol.for("immer-nothing"):((Jd={})["immer-nothing"]=!0,Jd),tu=Xd?Symbol.for("immer-draftable"):"__$immer_draftable",ru=Xd?Symbol.for("immer-state"):"__$immer_state",nu=""+Object.prototype.constructor,ou="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,iu=Object.getOwnPropertyDescriptors||function(e){var t={};return ou(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},su={},au={get:function(e,t){if(t===ru)return e;var r=Cd(e);if(!bd(r,t))return function(e,t,r){var n,o=Bd(t,r);return o?"value"in o?o.value:null===(n=o.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.I||!gd(n)?n:n===Gd(e.t,t)?(Kd(e),e.o[t]=qd(e.A.h,n,e)):n},has:function(e,t){return t in Cd(e)},ownKeys:function(e){return Reflect.ownKeys(Cd(e))},set:function(e,t,r){var n=Bd(Cd(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var o=Gd(Cd(e),t),i=null==o?void 0:o[ru];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,o)&&(void 0!==r||bd(e.t,t)))return!0;Kd(e),Wd(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!==Gd(e.t,t)||t in e.t?(e.D[t]=!1,Kd(e),Wd(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Cd(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){yd(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){yd(12)}},cu={};md(au,(function(e,t){cu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),cu.deleteProperty=function(e,t){return au.deleteProperty.call(this,e[0],t)},cu.set=function(e,t,r){return au.set.call(this,e[0],t,r,e[0])};var du=new(function(){function e(e){var t=this;this.g=$d,this.F=!0,this.produce=function(e,r,n){if("function"==typeof e&&"function"!=typeof r){var o=r;r=e;var i=t;return function(e){var t=this;void 0===e&&(e=o);for(var n=arguments.length,s=Array(n>1?n-1:0),a=1;a1?n-1:0),i=1;i=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var o=Dd("Patches").$;return Ed(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}()),uu=du.produce;du.produceWithPatches.bind(du),du.setAutoFreeze.bind(du),du.setUseProxies.bind(du),du.applyPatches.bind(du),du.createDraft.bind(du),du.finishDraft.bind(du);const lu={ssrc:0,status:ji.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:Li.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},pu=Hr({["".concat(va)]:uu((e,t)=>{let{payload:r}=t;e.sharePrivilege=r}),["".concat(ya)]:uu((e,t)=>{let{payload:r}=t;e.isRemoteSharingActive=1===r.bStatus,e.activeNodeId=r.activeNodeID,e.activeSsrc=r.ssrc}),["".concat(Ea)]:uu((e,t)=>{let{payload:r}=t;e.isReceiveSharing=r}),["".concat(ga)]:uu((e,t)=>{let{payload:r}=t;e.isChromeExtensionInstalled=r}),["".concat(Sa)]:uu((e,t)=>{let{payload:r}=t;e.shareDimension=c({},r)}),["".concat(ba)]:uu((e,t)=>{let{payload:r}=t;e.status=r}),["".concat(Ia)]:uu((e,t)=>{let{payload:r}=t;e.ssrc=r}),["".concat(Aa)]:uu((e,t)=>{let{payload:r}=t;e.shareQuality=r}),["".concat(Oa)]:uu((e,t)=>{let{payload:r}=t;e.receivedShareDimension=c({},r)}),["".concat(Ca)]:uu((e,t)=>{let{payload:r}=t;e.isRemoteControlApproved=r}),["".concat(Ta)]:uu((e,t)=>{let{payload:r}=t;e.isGrabRemoteControl=r}),["".concat(wa)]:uu((e,t)=>{let{payload:r}=t;e.isVerifiedRenderCanvasAfterFailover=r}),["".concat(Ra)]:uu((e,t)=>{let{payload:r}=t;e.isVerifiedCaptureCanvasAfterFailover=r}),["".concat(Na)]:uu((e,t)=>{let{payload:r}=t;e.isSDKGrabControl=r}),["".concat(Da)]:uu((e,t)=>{let{payload:r}=t;e.isReceiveSharingFromMainSession=r}),["".concat(Ma)]:uu((e,t)=>{let{payload:r}=t;e.isSharingToBreakoutRoom=r}),["".concat(Pa)]:()=>c(c({},lu),{},{isVerifiedRenderCanvasAfterFailover:!1,isVerifiedCaptureCanvasAfterFailover:!1})},lu),hu=En(vd),_u=Ei.createAgent(),fu=(e,t)=>e.pipe(Bt("".concat(ho)),Lt(t),$e(e=>{let[,t]=e;return void 0!==t.meeting.encryptedRWC}),id(e=>{let[,t]=e;const{meeting:{encryptedRWC:r,ts:n,auth:o,meetingNumber:i},breakoutRoom:s}=t;if(r)return Ve(Object.keys(r).map(e=>{const t=r[e];let a=void 0;return a=s&&s.currentRoom.boConfId?ed(e,i,t,n,o,s.currentRoom.boConfId):ed(e,i,t,n,o),{url:a,domain:e,rwcToken:t}})).pipe(xe(e=>xn(e.url).pipe(xe(t=>{let r={};return r=t.response?c(c({},t.response),{},{fromNginx:!1}):{rwg:e.domain,rwcToken:e.rwcToken,fromNginx:!0},Ve([Qr(r),xr()])}),ct(()=>ee))),Ot(bo(performance.now())))}));var vu=Object.freeze({__proto__:null,pingRWCEpic:fu,joinMeetingWelcomeEpic:e=>gn(e,0).pipe(Mt(e=>{var t;if("READY"===(null===(t=e.payload.body)||void 0===t?void 0:t.status)){const e=Jo.get(ai.WebclientMeetingToken);e&&_u.joinMeeting(e)}}),bt(ee)),joinMeetingSuccessfulEpic:(e,t)=>gn(e,4098).pipe(Lt(t),id(e=>{let[t,r]=e;const{payload:{body:{res:n,userID:o,zoomID:i,mn:s,participantID:a,hugeBO:c,elapsed:d,disableAqos:u,meetingtoken:l,role:p}}}=t,{meeting:{pingRWCTimestamp:h,isWebinar:_,userEmail:f,userName:v,isMeetingReset:y,meetingOptions:E},media:{mediaConstraints:g,assetsPath:m},breakoutRoom:S}=r;if(Bn.CONF_SUCCESS===n){const{WebclientParticipantId:e,WebclientUserId:r,WebclientZoomId:n,WebclientUserEmail:b,WebclientUserName:I,WebclientMeetingToken:A}=ai;Jo.set(r,o,qo.SessionStorage),Jo.set(n,i,qo.SessionStorage),Jo.set(e,a,qo.SessionStorage),f&&Jo.set(b,f,qo.SessionStorage),Jo.set(I,v,qo.SessionStorage),l&&Jo.set(A,l,qo.SessionStorage),_u.sendRWGConnectionPerformance("WCL_M, JMCT(".concat(performance.now()-h,")"));const O=[Io(t.payload.body),Vo(performance.now())];return Si.getInstance().init(),y&&(O.push(Ro(!1)),void 0!==g&&void 0!==m&&O.push(on())),_&&O.push(Fr()),S&&(E&&!0===E.isBO100Enabled&&O.push(Xc(c)),S.currentRoom.boConfId&&O.push(Jr()),void 0!==d&&O.push(Uc(d))),void 0!==u&&O.push(Lo(!u)),(p&Rs.Owner)===Rs.Owner&&(ps("JOIN_MEETING_FAILED",{reason:"dont support assisnt join through widget",errorCode:-1}),_u.leaveMeeting()),ps("JOIN_MEETING_SUCCESS",{meetingNumber:s}),Ve(O)}return Bn.CONF_FAIL_CONFLOCKED===n?ps("JOIN_MEETING_FAILED",eo(n)):Bn.CONF_FAIL_CONF_USER_FULL===n?ps("JOIN_MEETING_FAILED",Object.assign({},eo(n),{lmUrl:t.payload.body.lmURL})):(Bn.CONF_FAIL_MEETING_OVER===n||Bn.CONF_RESULT_MMR_IB_REJECT===n||Bn.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===n||[Bn.CONF_FAIL_HAS_BEEN_REMOVED,Bn.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(n),ps("JOIN_MEETING_FAILED",eo(n))),Ve(td(r,!1))})),handleMeetingAttributeChangeEpic:(e,t)=>gn(e,7938).pipe(Lt(t),Ce(e=>{let[t,r]=e;const{payload:{body:n}}=t,{meeting:{zoomId:o,encType:i}}=r;if(void 0!==(null==n?void 0:n.encryptKey)&&pi.init(o,n.encryptKey,i),void 0!==(null==n?void 0:n.gatewayKey)){const e=Si.getInstance(),[,t,r]=n.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:r&&ao(r)}])}return ps("UPDATE_MEETING_ATTRIBUTE",n),Ao(n)})),handleMeetingEndEpic:(e,t)=>gn(e,7939).pipe(Lt(t),xe(e=>{let[t,r]=e;const{payload:{body:n}}=t;if(void 0!==n.reason){if(Wn.LEAVEREASON_RECONNECT===n.reason)return Kn.LEAVESUBREASON_WAITINGROOMFAILOVER===n.subReason?ps("RECONNECTING_MEETING",{reason:Go.OnHold}):ps("RECONNECTING_MEETING",{reason:Go.Failover}),ae(_o());Wn.LEAVEREASON_KICKEDBYHOST===n.reason?ps("LEAVING_MEETING",{reason:"kicked by host"}):Wn.LEAVEREASON_ENDBYHOST!==n.reason&&Wn.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING!==n.reason||ps("LEAVING_MEETING",{reason:"ended by host"})}return r.meeting.isMeetingReset?ee:Ve(td(r,!1))})),meetingFailoverEpic:(e,t)=>e.pipe(Bt("".concat(_o)),Lt(t),xe(e=>{let[,t]=e;const r=td(t,!0);let n;if(t.meeting.zlkJwtToken){const e=function(e){if(e){const{meeting:{topic:t,passWord:r,userName:n,zlkJwtToken:o,lang:i,cv:s,customerKey:a}}=e;return{topic:t,passWord:r,userName:n,zlkJwtToken:o,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};n=ae(po(r)).pipe(pt(1e3))}else{const e=function(e){const{meeting:{apiKey:t,signature:r,meetingNumber:n,userName:o,lang:i,passWord:s,userEmail:a,sdkUrl:c,sdkOrigin:d,proxy:u,cv:l,zak:p,tk:h}}=e;return{apiKey:t,signature:r,meetingNumber:n,userName:o,lang:i,passWord:s,userEmail:a,sdkUrl:c,sdkOrigin:d,proxy:u,cv:l,ztk:p||sessionStorage.getItem(ai.WebclientZak),tk:h||sessionStorage.getItem(ai.WebclientTk)}}(t);n=ae(lo(e)).pipe(pt(1e3))}return Ke(Ve(r),n)})),hostChangeEpic:e=>Sn(e,7940).pipe(Mt(e=>{ps("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)}),Ce(e=>Co(e.payload.body))),cohostChangeEpic:e=>Sn(e,7941).pipe(Mt(e=>{ps("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)}),Ce(e=>To(e.payload.body))),setMeetingOptEpic:e=>Sn(e,7945).pipe(Mt(e=>{const{payload:{body:{opt:t}}}=e;Jo.set(ai.WebclientOpt,t,qo.SessionStorage)}),bt(ee)),setMeetingOnHoldEpic:(e,t)=>gn(e,7942).pipe(Mt(e=>{const{payload:{body:{bHold:t}}}=e;Jo.set(ai.WebclientIsOnHold,t?1:0,qo.SessionStorage),ps("MEETING_IN_WAITING_ROOM",t)}),Lt(t),xe(e=>{let[t,r]=e;const n=[wo(t.payload.body.bHold)];if(t.payload.body.bHold){const e=Fs(r);if(e){n.push(No({audio:e.audio,video:e.bVideoOn,muted:e.muted}));const t=Si.getInstance();if("computer"===e.audio&&(t.leaveComputerAudio(),_u.joinOrLeaveVoip(!1)),e.bVideoOn&&t.stopCaptureVideo(),e.sharerOn&&(_u.stopSharing(e.userId),t.stopDesktopSharing(),n.push(ba(ji.End))),r.video&&r.video.subscribedVideoList.length>0&&r.video.subscribedVideoList.forEach(e=>{_u.unsubscribeVideo(e)}),r.share&&r.share.isReceiveSharing){const e=r.share.activeNodeId;r.share.isRemoteControlApproved&&(_u.sharingRequestRemoteControl(e,!1),t.stopRemoteControl()),_u.unsubscribeSharing(e),t.stopRenderSharing()}}}return Ve(n)})),setMeetingDataCenterRegionEpic:e=>gn(e,7954).pipe(Ce(e=>ko(e.payload.body))),claimHostResponseEpic:e=>gn(e,4216).pipe(Mt(e=>{ps("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)}),bt(ee)),leaveMeetingEpic:(e,t)=>e.pipe(Bt("".concat(fo),"".concat(vo)),Lt(t),xe(e=>{let[t,r]=e;return t.type==="".concat(fo)?(_u.leaveMeeting(),ps("LEAVING_MEETING",{})):t.type==="".concat(vo)&&(_u.endMeeting(),ps("LEAVING_MEETING",{})),Ve(td(r,!1))})),versionUpgradeEpic:e=>gn(e,2).pipe(Mt(()=>{console.warn("Upgrade to latest version to optimize meeting experience")}),bt(ee)),versionBlockEpic:e=>gn(e,1).pipe(Mt(e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=eo(1e3);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,()=>t);r.reason=e}ps("JOIN_MEETING_FAILED",r)}),bt(ee))});let yu=window.WEB_ENDPOINT||"zoom.us",Eu="https://".concat(yu,"/wc/lsdk");const gu="https://dmogdx0jrul3u.cloudfront.net/".concat("2.1.0","/lib/av"),mu="https://source.zoom.us/".concat("2.1.0","/lib/av"),Su="https://jssdk.zoomus.cn/".concat("2.1.0","/lib/av");let bu,Iu;!function(e){e.Expel="expel",e.Promote="promote",e.Depromote="depromote",e.MemberChange="memberChange",e.RaiseHand="raisehand",e.LowerHand="lowerhand",e.PutdownHands="putdownhands"}(bu||(bu={})),function(e){e[e.AttendeeToAllPanelist=1]="AttendeeToAllPanelist",e[e.PanelistToAttendee=3]="PanelistToAttendee"}(Iu||(Iu={}));const Au=["CONNECTED","DISCONNECTED","POOL","CONNFAIL","OnlineMembers","GroupChange","RosterChange","WebinarQA","Message"];class Ou{constructor(){if(this.callbackList=void 0,this.instance=void 0,this.callbackList=[],"undefined"!=typeof webIM&&(this.instance=new webIM.WebimInstance,this.instance)){const e=this.instance.server;Au.forEach(t=>{e.on(t,e=>{this.onXmppCallback(t,e)})})}this.onXmppCallback=this.onXmppCallback.bind(this)}static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new Ou),this.agentInstance}onXmppCallback(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)}connect(e){var t;const{svcUrl:r,meetingNumber:n,conId:o,clientCap:i,jid:s,displayName:a}=e;if(!this.instance&&void 0!==window.webIM){this.instance=new window.webIM.WebimInstance;const e=this.instance.server;Au.forEach(t=>{e.on(t,e=>{this.onXmppCallback(t,e)})})}const c="wss://".concat(r,"/wc/media/").concat(n,"?type=x&cid=").concat(o);null===(t=this.instance)||void 0===t||t.server.connect({url:c,jid:s,meetingNumber:n,clientCap:i,displayName:a})}lowerHand(e){var t;null===(t=this.instance)||void 0===t||t.server.lowerHand(e)}raiseHand(){var e;null===(e=this.instance)||void 0===e||e.server.raiseHand()}sendWebinarMsg(e,t,r,n){var o;null===(o=this.instance)||void 0===o||o.server.sendWebinarMsg(e,t,r,n)}rename(e,t){var r;null===(r=this.instance)||void 0===r||r.server.rename(e,t)}sendAsk(e,t,r){var n;null===(n=this.instance)||void 0===n||n.server.sendAsk(e,t,r)}sendAnswer(e,t,r){var n;null===(n=this.instance)||void 0===n||n.server.sendAnswer(e,t,r)}answerOnline(e,t){var r;null===(r=this.instance)||void 0===r||r.server.answerOnline(e,t)}sendDismiss(e){var t;null===(t=this.instance)||void 0===t||t.server.sendDismiss(e)}sendReOpen(e){var t;null===(t=this.instance)||void 0===t||t.server.sendReOpen(e)}sendUpVote(e){var t;null===(t=this.instance)||void 0===t||t.server.sendUpVote(e)}sendDownVote(e){var t;null===(t=this.instance)||void 0===t||t.server.sendDownVote(e)}disconnect(){var e;null===(e=this.instance)||void 0===e||e.server.disconnect(),this.instance=void 0}}Ou.agentInstance=void 0;let Cu=0;var Tu,wu=ro((function(e,t){var r;r=function(){function e(){for(var e=0,t={};e1&&void 0!==arguments[1]?arguments[1]:0,r=(Pu[e[t+0]]+Pu[e[t+1]]+Pu[e[t+2]]+Pu[e[t+3]]+"-"+Pu[e[t+4]]+Pu[e[t+5]]+"-"+Pu[e[t+6]]+Pu[e[t+7]]+"-"+Pu[e[t+8]]+Pu[e[t+9]]+"-"+Pu[e[t+10]]+Pu[e[t+11]]+Pu[e[t+12]]+Pu[e[t+13]]+Pu[e[t+14]]+Pu[e[t+15]]).toLowerCase();if(!Mu(r))throw TypeError("Stringified UUID is invalid");return r}(n)}let Vu;!function(e){e[e.Unknown=0]="Unknown",e[e.Windows=1]="Windows",e[e.Mac=2]="Mac",e[e.Pad=3]="Pad",e[e.Mobile=4]="Mobile",e[e.CallIn=5]="CallIn",e[e.Linux=6]="Linux",e[e.WebClient=7]="WebClient",e[e.ChromeOs=8]="ChromeOs"}(Vu||(Vu={}));const{WebclientIsOnHold:Lu,WebclientOpt:ju,WebclientParticipantId:Hu,WebclientZoomId:xu,WebclientWebinarToken:Fu,WebclientMeetingToken:Gu}=ai,{WebclientDeviceId:Bu}=ci,Wu=Ou.getInstance();let Ku;var qu=Object.freeze({__proto__:null,loadWebIMEpic:(e,t)=>e.pipe(Bt("".concat(Wr)),Lt(t),xe(e=>{let[,t]=e;const{media:{assetsPath:r}}=t;return Ve(new Promise((e,t)=>{Ho("".concat(r,"/webim.min.js"),()=>{e("")},()=>{t()})})).pipe(gt(tn(!0)),ct(e=>ae(tn(!1))))})),connectXMPPSocketEpic:(e,t)=>e.pipe(Bt("".concat(Fr)),Lt(t),$e(e=>{let[,t]=e;return"closed"===t.socket.xmppSocketStatus}),id(t=>{let[,r]=t;const{meeting:{svcUrl:n,meetingNumber:o,conId:i,jid:s,userName:a},socket:{isXmppSDKLoaded:c}}=r,d=Zo()&&Qo()?11:10;let u=ae(c);return!1===c&&(u=e.pipe(Bt("".concat(tn)),vt(1))),u.pipe(xe(e=>{return e?(t={svcUrl:n,meetingNumber:o,conId:i,jid:s,userName:a,clientCap:d},Wu.connect(t),Ku=new q,Ye(e=>Wu.registerCallback(e),e=>Wu.unregisterCallback(e),(e,t)=>({event:e,data:t})).subscribe(Ku),Ku).pipe(Ce(e=>zr(e)),Ot(en(Ys.Connecting))):ce("webim load fail");var t}))})),connectedXmppSocketEpic:(e,t)=>e.pipe(Bt("".concat(en)),$e(e=>e.payload===Ys.Connecting),id(()=>{if(Ku){const e=Ku.pipe($e(e=>"CONNECTED"===e.event)),r=Ku.pipe($e(e=>"DISCONNECTED"===e.event));return Ze(e.pipe(xe(()=>ae(en(Ys.Connected)))),r.pipe(pt(1e3),Lt(t),$e(e=>{let[,t]=e;return"closed"!==t.socket.xmppSocketStatus&&"joined"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Ce(()=>(ps("RECONNECTING_MEETING",{reason:Go.Failover}),_o()))))}})),disconnectXmppSocketEpic:e=>e.pipe(Bt("".concat(Br)),gt(en(Ys.Closed)),Mt(()=>{var e;Wu.disconnect(),null===(e=Ku)||void 0===e||e.complete()}))});const zu={meetingStatus:"initial",isWindowOpen:!1,apiKey:"",signature:"",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:null,meetingTopic:"",isSupportQA:!1,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,enableQos:!0,activeAppInfo:void 0,recordingDisclaimerForRecorder:{},recordingDisclaimer:{},ccUrl:"",allowStopRecording:!0},Ju=Hr({["".concat(yo)]:uu((e,t)=>{let{payload:r}=t;Object.assign(e,r)}),["".concat(Eo)]:uu((e,t)=>{let{payload:r}=t;e.isWindowOpen=r}),["".concat(go)]:uu((e,t)=>{let{payload:r}=t;e.apiKey=r.apiKey,e.signature=r.signature,e.lang=r.language}),["".concat(mo)]:uu((e,t)=>{let{payload:r}=t;e.zak=r}),["".concat(So)]:uu((e,t)=>{let{payload:r}=t;e.tk=r.tk,e.mtkGuid=r.mtkGuid}),["".concat(bo)]:uu((e,t)=>{let{payload:r}=t;e.pingRWCTimestamp=r}),["".concat(Io)]:uu((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="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}),["".concat(Ao)]:uu((e,t)=>{let{payload:r}=t;Object.assign(e,r)}),["".concat(Co)]:uu((e,t)=>{let{payload:r}=t;e.isHost=r}),["".concat(To)]:uu((e,t)=>{let{payload:r}=t;e.isCoHost=r}),["".concat(wo)]:uu((e,t)=>{let{payload:r}=t;e.isOnHold=r}),["".concat(Ro)]:uu((e,t)=>{let{payload:r}=t;e.isMeetingReset=r}),["".concat(No)]:uu((e,t)=>{let{payload:r}=t;e.audioVideoBeforeOnHold=r}),["".concat(Do)]:uu((e,t)=>{let{payload:r}=t;e.currentUserAudioBeforeReset=r}),["".concat(Mo)]:uu((e,t)=>{let{payload:r}=t;e.isCurrentUserMutedBeforeReset=r}),["".concat(Po)]:uu((e,t)=>{let{payload:r}=t;e.meetingStatus=r}),["".concat(ko)]:uu((e,t)=>{let{payload:r}=t;e.region=r.region,e.network=r.network}),["".concat(Uo)]:uu((e,t)=>{let{payload:r}=t;e.isCurrentUserStartVideoBeforeReset=r}),["".concat(Vo)]:uu((e,t)=>{let{payload:r}=t;e.joinMeetingTimeStamp=r}),["".concat(Lo)]:uu((e,t)=>{let{payload:r}=t;e.enableQos=r}),["".concat(jo)]:uu((e,t)=>{let{payload:r}=t;e.activeAppInfo=r}),["".concat(Oo)]:uu((e,t)=>{let{payload:r}=t;Object.assign(e,c(c({},zu),{},{isMeetingReset:!0,currentUserAudioBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.audio:r.audio,isCurrentUserMutedBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.muted:r.muted,isCurrentUserStartVideoBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.video:r.video,apiKey:e.apiKey,signature:e.signature,meetingNumber:e.meetingNumber,userName:e.userName,lang:e.lang,passWord:e.passWord,userEmail:e.userEmail,sdkUrl:e.sdkUrl,sdkOrigin:e.sdkOrigin,proxy:1,cv:e.cv}))})},zu),Yu=En(vu,{meetingInfoEpic:(e,t)=>e.pipe(Bt("".concat(po)),Rt(e=>{const r=Object.assign({},e.payload,{password:oo(e.payload.password),topic:oo(e.payload.topic)});return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"zoomsdkjsonpcallback";return new F(n=>{Cu++;const o="".concat(r).concat(Cu),i=document.createElement("script");Object.keys(t).forEach(e=>(void 0===t[e]||null===t[e])&&delete t[e]),i.src="".concat(e,"?").concat(new URLSearchParams(Object.assign(t,{callback:o})).toString()),i.async=!0,i.onerror=e=>n.error(e),document.getElementsByTagName("head")[0].appendChild(i),window[o]=e=>{i.parentNode&&i.parentNode.removeChild(i),delete window[o],n.next(e),n.complete()}})}(Eu,r).pipe(ct(e=>ae({status:!1,result:e.toString(),errorCode:-3e3})),xe(r=>{const[n,o]=rt(ae(r),e=>!0===e.status&&void 0!==e.result);return o.subscribe(e=>{e.state||(3e3===e.errorCode&&"Meeting password is incorrect"===e.errorMessage?ps("JOIN_MEETING_FAILED",$n(3004)):-3e3===e.errorCode?ps("JOIN_MEETING_FAILED",{reason:"connection error"}):3e3===e.errorCode?ps("JOIN_MEETING_FAILED",{reason:e.errorMessage,errorCode:200}):300===e.errorCode?ps("JOIN_MEETING_FAILED",{reason:"This account does not exist or does not belong to you",errorCode:200}):124===e.errorCode&&"Parse lite sdk topic and pwd fail"===e.errorMessage?ps("JOIN_MEETING_FAILED",{reason:"Parse topic and pwd fail",errorCode:200}):124===e.errorCode&&"The java web token is expired or more than 2 days or ineffective."===e.errorMessage?ps("JOIN_MEETING_FAILED",{reason:"The token is expired or more than 2 days or ineffective.",errorCode:200}):124===e.errorCode&&ps("JOIN_MEETING_FAILED",{reason:"Verify JWT failed",errorCode:200}))}),n.pipe(od(r=>{if(!0===r.status){const{result:{mid:n}}=r;return Jo.init(n),Ke(ae(yo($c(r,e.payload))),vn(fu,t,ho()))}}))}))}))}),Xu=Ei.createAgent();let Zu;var Qu=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(Bt("".concat(xr)),Lt(t),$e(e=>{let[,t]=e;return"closed"===t.socket.zoomSocketStatus}),id(e=>{let[,t]=e;const{socket:{retryCount:r,rwgServerList:n},meeting:o,breakoutRoom:i}=t;let s;if(o.zlkJwtToken)s=function(e){let{passWord:t,meetingNumber:r,userName:n,topic:o,trackAuth:i,tid:s,meetingId:a,ts:c,auth:d,lang:u,retryCount:l,rwgServerList:p,cv:h,customerKey:_,zlkJwtToken:f}=e;const v=wu.get("_zm_mtk_guid");let y=Jo.get(Bu);if(y||(y=Uu(),Jo.set(Bu,y,qo.LocalStorage)),p.length>l){const e=p[l];let E={dn2:oo(n),topic:oo(o),auth:d,browser:Yo(),trackAuth:i,mid:a,tid:s,lang:u,ts:c,"ZM-CID":y,_ZM_MTG_TRACK_ID:v||"",iccv:h,customer_key:oo(_),cfs:0,zlkJwtToken:f};""!==t&&(E=Object.assign(E,{mpwd:oo(t)})),e.rwcAuth?E=Object.assign(E,{rwcAuth:e.rwcAuth}):e.rwcToken&&(E=Object.assign(E,{rwcToken:e.rwcToken}));let g=2;return $o()?g=1:ei()&&(g=0),E=Object.assign(E,{as_type:g}),[{key:ju,queryKey:"opt"},{key:Hu,queryKey:"participantID"},{key:xu,queryKey:"zoomid"}].forEach(e=>{const t=Jo.get(e.key);void 0!==t&&(E[e.queryKey]=t)}),Jo.get(Gu)&&Object.assign(E,{isdj:1}),"wss://".concat(e.rwg,"/instantsdk/").concat(r,"?").concat(new URLSearchParams(E).toString())}return null}(c(c({},o),{},{retryCount:r,rwgServerList:n}));else{let e=c(c({},o),{},{retryCount:r,rwgServerList:n});if(i&&i.currentRoom.status===js.Joining){const{currentRoom:{boId:t,boConfId:r,boToken:n}}=i;e=c(c({},e),{},{bid:t,botk:n,confID:r})}s=function(e){let{isHost:t,isOriginHost:r,passWord:n,meetingNumber:o,userName:i,zak:s,trackAuth:a,tid:c,sign:d,meetingId:u,ts:l,auth:p,lang:h,tk:_,retryCount:f,rwgServerList:v,userEmail:y,cv:E,bid:g,botk:m,confID:S,customerKey:b}=e;const I=wu.get("_zm_mtk_guid");let A=Jo.get(Bu);if(A||(A=Uu(),Jo.set(Bu,A,qo.LocalStorage)),v.length>f){const e=v[f];let O={dn2:oo(i),auth:p,sign:d,browser:Yo(),trackAuth:a,mid:u,tid:c,email:y,lang:h,zak:s||"",tk:_||"",customer_key:oo(b),ts:l,"ZM-CID":A,_ZM_MTG_TRACK_ID:I||"",jscv:E,cfs:0};t&&r||""===n||(O=Object.assign(O,{mpwd:n})),e.rwcAuth?O=Object.assign(O,{rwcAuth:e.rwcAuth}):e.rwcToken&&(O=Object.assign(O,{rwcToken:e.rwcToken}));let C=2;return $o()?C=1:ei()&&(C=0),O=Object.assign(O,{as_type:C}),[{key:Lu,queryKey:"cfs"},{key:ju,queryKey:"opt"},{key:Hu,queryKey:"participantID"},{key:xu,queryKey:"zoomid"},{key:Fu,queryKey:"tk"}].forEach(e=>{const t=Jo.get(e.key);void 0!==t&&(O[e.queryKey]=t)}),g&&m&&S&&Object.assign(O,{bid:oo(g),botk:m,confID:S}),Jo.get(Gu)&&Object.assign(O,{isdj:1}),"wss://".concat(e.rwg,"/wc/api/").concat(o,"?").concat(new URLSearchParams(O).toString())}return null}(e)}if(s){const e=(a=s,Xu.connect(a),Zu=new q,Ye(e=>Xu.on(vi.Message,e),e=>Xu.off(vi.Message,e),e=>e.data).subscribe(Zu),Zu);return Ze(e.pipe($e(e=>"string"==typeof e),Ce(e=>JSON.parse(e)),dd(),nd(e=>{if(0!==e.evt||!e.body||"invalid parameters!"!==e.body.test)return Kr(e);ps("JOIN_MEETING_FAILED",$n(zn.INVALID_PARAMETER))}),Ot(Zr(Ys.Connecting))),e.pipe($e(e=>e instanceof ArrayBuffer),Ce(e=>qr(e))))}var a})),connectedZoomSocketEpic:(e,t)=>e.pipe(Bt("".concat(xr)),Rt(()=>{const[e,r,n]=[vi.Open,vi.Close,vi.Error].map(e=>Ye(t=>Xu.on(e,t),t=>Xu.on(e,t)));return Ze(e.pipe(xe(()=>Ze(ae(Zr(Ys.Connected)),st(6e4).pipe(Lt(t),$e(e=>{let[,t]=e;return"initial"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Ce(()=>(ps("RECONNECTING_MEETING",{reason:Go.Failover}),_o())))))),r.pipe(Lt(t),$e(e=>{let[,t]=e;return"closed"!==t.socket.zoomSocketStatus&&"joined"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Ce(()=>(ps("RECONNECTING_MEETING",{reason:Go.Failover}),_o()))),n.pipe(Lt(t),od(e=>{let[,t]=e;const{meeting:{meetingStatus:r,isMeetingReset:n},socket:{retryCount:o}}=t;return"initial"===r?Ve([$r(o+1),Gr({retry:!0})]):n?void 0:(ps("RECONNECTING_MEETING",{reason:Go.Failover}),ae(_o()))})))})),disconnectZoomSocketEpic:e=>e.pipe(Bt("".concat(Gr)),xe(e=>e.payload&&e.payload.retry?ae(xr()).pipe(pt(1e3),Ot(Zr(Ys.Closed))):ae(Zr(Ys.Closed))),pt(100),Mt(()=>{var e;Xu.close(),null===(e=Zu)||void 0===e||e.complete()}))});const $u=gi.getInstance();let el;var tl=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(Bt("".concat(Jr)),Lt(t),$e(e=>{let[,t]=e;return"closed"===t.socket.mainSessionSocketStatus}),Rt(e=>{let[,t]=e;const{meeting:{svcUrl:r,meetingNumber:n,conId:o}}=t;return(e=>($u.connect(e),el=new q,Ye(e=>$u.on(vi.Message,e),e=>$u.off(vi.Message,e)).pipe(Ce(e=>e.data)).subscribe(el),el))(function(e,t,r){return"wss://".concat(e,"/wc/media/").concat(t,"?type=m&cid=").concat(r,"&mode=2")}(r,n,o)).pipe(Ce(e=>JSON.parse(e)),$e(e=>0!==e.evt),dd(),Ce(e=>Xr(e)),Ot(rn(Ys.Connecting)))})),connectedMainSessionSocketEpic:(e,t)=>e.pipe(Bt("".concat(Jr)),Rt(()=>{const[e,r,n]=[vi.Open,vi.Close,vi.Error].map(e=>Ye(t=>$u.on(e,t),t=>$u.on(e,t)));return Ze(e.pipe(gt(rn(Ys.Connected))),r.pipe(Lt(t),$e(e=>{let[,t]=e;return"closed"!==t.socket.zoomSocketStatus&&"joined"===t.meeting.meetingStatus}),Ce(()=>(ps("RECONNECTING_MEETING",{reason:Go.Failover}),_o()))),n.pipe(Ce(()=>(ps("RECONNECTING_MEETING",{reason:Go.Failover}),_o()))))})),disconnectMainSessionSocketEpic:e=>e.pipe(Bt("".concat(Yr)),gt(rn(Ys.Closed)),Mt(()=>{var e;$u.close(),null===(e=el)||void 0===e||e.complete()}))});const rl={zoomSocketStatus:Ys.Closed,isXmppSDKLoaded:!1,xmppSocketStatus:Ys.Closed,mainSessionSocketStatus:Ys.Closed,retryCount:0,rwgServerList:[]},nl=Hr({["".concat(Zr)]:uu((e,t)=>{let{payload:r}=t;e.zoomSocketStatus=r}),["".concat(Qr)]:uu((e,t)=>{let{payload:r}=t;const{rwgServerList:n}=e;n.find(e=>e===r.rwg)||n.push(r)}),["".concat($r)]:uu((e,t)=>{let{payload:r}=t;e.retryCount=r}),["".concat(en)]:uu((e,t)=>{let{payload:r}=t;e.xmppSocketStatus=r}),["".concat(tn)]:uu((e,t)=>{let{payload:r}=t;e.isXmppSDKLoaded=r}),["".concat(rn)]:uu((e,t)=>{let{payload:r}=t;e.mainSessionSocketStatus=r}),["".concat(nn)]:()=>rl},rl),ol=En(Qu,qu,tl),il={id:"userId",type:e=>Ms(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>{return{userRole:e,isHost:(t=e,(t&Rs.Host)===Rs.Host)};var t},dn2:e=>({displayName:io(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest",bCapsRequestLT:"isRequestLT"};var sl=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>gn(e,7937).pipe(Ce(e=>(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 n=il[r];return"function"==typeof n?Object.assign(e,n(t[r])):"string"==typeof n?e[n]=t[r]:e[r]=t[r],e},{}),n=e.find(e=>e.userId===r.userId);return void 0!==n?Object.assign(n,r):e.push(r),e},[]))}),t})(e.payload.body)),Lt(t),xe(e=>{let[t,r]=e;const n=[ys(t)],{meeting:{userId:o},participants:{attendeesList:i,failoverAttendeesList:s}}=r;if(t.add){const e=t.add.find(e=>e.userId===o);void 0!==e&&ps("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e);const r=t.add.filter(e=>e.userId!==o);if(r.length>0){const e=r.filter(e=>!Ps(e.userRole)).map(e=>{const t=s.find(t=>t.zoomID===e.zoomID);return t?c(c({},e),{},{source:t.isOnHold?"on hold":"failover"}):e}),t=e.filter(e=>!!e.source).map(e=>({zoomID:e.zoomID}));n.push(bs(t)),ps("ADD_USER_PARTICIPANT_ATTRIBUTE",e)}}if(t.update){const e=t.update.find(e=>e.userId===o);void 0!==e&&ps("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e);const r=t.update.filter(e=>e.userId!==o);r.length>0&&ps("UPDATE_USER_PARTICIPANT_ATTRIBUTE",r)}if(t.remove){const e=t.remove.map(e=>{const t=i.find(t=>t.userId===e.userId);return t?2===e.action&&1===e.nUserStatus?t.bHold?(n.push(Ss({zoomID:t.zoomID,isOnHold:!0})),c(c({},e),{},{reason:"on hold"})):(n.push(Ss({zoomID:t.zoomID,isOnHold:!1})),c(c({},e),{},{reason:"failover"})):e:null}).filter(e=>!!e);ps("REMOVE_USER_PARTICIPANT_ATTRIBUTE",e)}return Ve(n)})),receiveUserListFromXMPPEpic:e=>mn(e,"POOL").pipe($e(e=>e.payload.data.action===bu.MemberChange),Mt(e=>{ps("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.payload.data.data)}),xe(e=>Ve([Es(e.payload.data.data)]))),handleAdmitAllSilentUsersEpic:e=>gn(e,7951).pipe(Mt(e=>{!1===e.payload.body.bStarted&&ps("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)}),Ce(e=>gs(e.payload.body.bStarted))),handleKVUpdateIndicationEpic:e=>gn(e,7946).pipe($e(e=>{var t;return["bRaiseHand","feedback"].includes(null===(t=e.payload.body)||void 0===t?void 0:t.key)&&0===e.payload.body.value}),Ce(e=>(ps("UPDATE_USER_PARTICIPANT_ATTRIBUTE",{}),"bRaiseHand"===e.payload.body.key?Is():As())))});const al={attendeesList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},cl=Hr({["".concat(ys)]:uu((e,t)=>{let{payload:r}=t;void 0!==r.add&&r.add.length>0&&r.add.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);void 0!==r?Object.assign(r,t):Ps(t.userRole)?e.allowTalkAttendeesList.push(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);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);-1!==r&&e.allowTalkAttendeesList.splice(r,1)}})}),["".concat(Es)]:uu((e,t)=>{let{payload:r}=t;e.xmppAttendeeList=r.map(e=>c(c({},e),{},{displayName:e.name,userId:Number(e.node),userRole:Number(e.role)}))}),["".concat(gs)]:uu((e,t)=>{let{payload:r}=t;e.isAdmitAllSilentUsers=r}),["".concat(Is)]:uu(e=>{e.attendeesList.forEach(e=>{e.bRaiseHand&&(e.bRaiseHand=!1)})}),["".concat(As)]:uu(e=>{e.attendeesList.forEach(e=>{e.feedback>0&&(e.feedback=0)})}),["".concat(Ss)]:uu((e,t)=>{let{payload:r}=t;e.failoverAttendeesList.push(r)}),["".concat(bs)]:uu((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)})}),["".concat(ms)]:()=>al},al),dl=En(sl),ul={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0,fileWithVersion:!1},ll=Hr({["".concat(cn)]:uu((e,t)=>{let{payload:r}=t;e.audioDecodeStatus=r}),["".concat(an)]:uu((e,t)=>{let{payload:r}=t;e.audioEncodeStatus=r}),["".concat(pn)]:uu((e,t)=>{let{payload:r}=t;e.sharingDecodeStatus=r}),["".concat(ln)]:uu((e,t)=>{let{payload:r}=t;e.sharingEncodeStatus=r}),["".concat(un)]:uu((e,t)=>{let{payload:r}=t;e.videoDecodeStatus=r}),["".concat(dn)]:uu((e,t)=>{let{payload:r}=t;e.videoEncodeStatus=r}),["".concat(hn)]:uu((e,t)=>{let{payload:r}=t;e.mediaConstraints=r.mediaConstraints,e.assetsPath=r.assetsPath,e.fileWithVersion=r.fileWithVersion}),["".concat(_n)]:uu((e,t)=>{let{payload:r}=t;const{type:n,encrypeKey:o,additionalType:i}=r,s={encrypeKey:o,additionalType:i};"audio"===n?e.audioEncrypt=s:"video"===n?e.videoEncrypt=s:"sharing"===n&&(e.sharingEncrypt=s)}),["".concat(fn)]:e=>c(c({},ul),{},{mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath,fileWithVersion:e.fileWithVersion})},ul),pl=Ei.createAgent();var hl=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>gn(e,12033).pipe(Lt(t),Ce(e=>{let[t,r]=e;const{participants:{attendeesList:n,allowTalkAttendeesList:o}}=r,i=t.payload.body,s={};return i&&([...n,...o].forEach(e=>{for(let t=1;t<=3;t++){const r="asn".concat(t),{userId:n,displayName:o}=e;if(void 0!==i[r]&&n===i[r]){s[r]={userId:n,displayName:o};break}}}),ps("AUDIO_ACTIVE_SPEAKER",Object.values(s))),Xs(s)})),unmuteConsentAfterSpotlighted:(e,t)=>gn(e,16135).pipe(Lt(t),Mt(e=>{let[t,r]=e;const{payload:{body:{id:n,bLeadershipOn:o}}}=t,{audio:{bCanUnmute:i}}=r,s=Fs(r);if(s){const{isHost:e,bCoHost:t,userId:r,audio:a,muted:c}=s,d=e||t;o&&r>>10==n>>10&&(null!==a&&""!==a&&!0!==c||!d&&!i||ps("AUDIO_UNMUTE_CONSENT",Pi.Spotlight))}}),bt(ee)),unmuteConsentEpic:(e,t)=>gn(e,12037).pipe(Lt(t),Mt(e=>{let[,t]=e;const r=Fs(t);null!==(null==r?void 0:r.audio)&&""!==(null==r?void 0:r.audio)&&1==(null==r?void 0:r.muted)&&ps("AUDIO_UNMUTE_CONSENT",Pi.Unmute)}),bt(ee)),setAudioAttributeEpic:(e,t)=>gn(e,7938).pipe($e(e=>e.payload.body&&["bCanUnmute","bMutedAll","bMutedUponEntry"].some(t=>void 0!==e.payload.body[t])),nd(e=>{if(void 0!==e.payload.body.bCanUnmute)return Zs(e.payload.body.bCanUnmute);if(void 0!==e.payload.body.bMutedAll){const r=Fs(t.value);if(("computer"===(null==r?void 0:r.audio)||"phone"===(null==r?void 0:r.audio))&&0==r.muted)return ta(e.payload.body.bMutedAll)}return void 0!==e.payload.body.bMutedUponEntry?oa(e.payload.body.bMutedUponEntry):void 0})),currentUserAudioChangeEpic:(e,t)=>gn(e,7937).pipe(Lt(t),$e(e=>{let[,t]=e;return t.socket.zoomSocketStatus===Ys.Connected}),od(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,n=t.payload.body.update,[o,i]=rt(Ve(n),t=>t.id===e);i.subscribe(e=>{ps("AUDIO_PARTICIPANT_AUDIO_UPDATE",e)});const{audio:{activeMicrophone:s,activeSpeaker:a,audioSsrc:c,isActiveOperation:d,isMutedAll:u,isSpeakerOnly:l}}=r;let p=Fs(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=ks(p.userRole);return o.pipe(Mt(e=>{var t,r,n,o;if(e.audio!==(null===(t=p)||void 0===t?void 0:t.audio))if(""===e.audio)ps("AUDIO_CURRENT_USER_LEAVE_AUDIO");else if("computer"===e.audio){const e=Si.getInstance(),t=h||l;e.joinComputerAudio(c,s,a,!t),t&&ps("AUDIO_CURRENT_USER_JOIN_BY_VOIP")}else if("phone"===e.audio){var i;"computer"===(null===(i=p)||void 0===i?void 0:i.audio)&&(Si.getInstance().leaveComputerAudio(),pl.joinOrLeaveVoip(!1)),ps("AUDIO_CURRENT_USER_JOIN_BY_PHONE")}null!==(r=p)&&void 0!==r&&r.audio&&""!==(null===(n=p)||void 0===n?void 0:n.audio)&&e.muted!==(null===(o=p)||void 0===o?void 0:o.muted)&&(!0===e.muted?ps("AUDIO_CURRENT_USER_MUTED",{source:d?"active":u?"passive(mute all)":"passive(mute one)"}):!1===e.muted&&ps("AUDIO_CURRENT_USER_UNMUTED",{source:d?"active":"passive"}))}),$e(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)}),bt(ae(ra(!1),ta(!1))))}})),handleDialOutEpic:(e,t)=>gn(e,8198).pipe(Lt(t),$e(e=>{let[t,r]=e;return t.payload.seq==r.audio.dialout.sequence}),Mt(e=>{let[t]=e;const r=t.payload.body.result;ps("AUDIO_DIALOUT_RESULT_CODE",{code:r}),r===ki.Success?ps("AUDIO_DIALOUT_RESULT_SUCCESS"):-1===[ki.Calling,ki.Ringing,ki.Accepted,ki.Success].indexOf(r)&&ps("DIALOUT_FAIL")}),Ce(e=>{let[t]=e;return $s(t.payload.body.result)})),handleDialouCancelEpic:e=>gn(e,8200).pipe(Mt(e=>{const t=e.payload.body.result;[0,11].indexOf(t)>-1?ps("AUDIO_DIALOUT_CANCEL_SUCCESS"):ps("DIALOUT_CANCEL_FAIL",t)}),$e(e=>0===e.payload.body.result||11===e.payload.body.result),gt($s(-1))),handleAllowToTalkEpic:(e,t)=>gn(e,12036).pipe(Lt(t),od(e=>{let[t,r]=e;const n=Fs(r),{media:{audioEncodeStatus:o},audio:{audioSsrc:i,activeMicrophone:s,activeSpeaker:a}}=r,{promoterID:c,bAllowTalk:d}=t.payload.body;if((null==n?void 0:n.userId)===c){const e=Si.getInstance();if(d){let t=ae(!0);return"success"!==o&&(e.enableAudioEncode(),t=nt(fs("AUDIO_ENCODE_SUCCESS",1).pipe(gt(!0)),fs("AUDIO_ENCODE_FAIL",1).pipe(gt(!1)))),t.pipe(Mt(t=>{t&&(e.joinComputerAudio(i,s,a,!0),ps("AUDIO_UNMUTE_CONSENT",Pi.AllowToTalk))}),gt(ea(!0)))}return pl.mute(c,!0),e.leaveComputerAudio(),st(300).pipe(Mt(()=>{e.joinComputerAudio(i,s,a,!1)}),gt(ea(!1)))}})),handleAllowToTalkResponseEpic:e=>gn(e,8205).pipe(Mt(e=>{ps("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)}),bt(ee)),handleAttendeePromoteDepromote:(e,t)=>mn(e,"POOL").pipe($e(e=>e.payload.data.action===bu.Depromote||e.payload.data.action===bu.Promote),Lt(t),Mt(e=>{let[t,r]=e;const n=Fs(r);"phone"===(null==n?void 0:n.audio)?pl.audioDrop(n.userId):"computer"===(null==n?void 0:n.audio)&&(t.payload.data.action,bu.Promote)}),bt(ee)),setAudioSSRCEpic:(e,t)=>gn(e,12035).pipe(Lt(t),xe(e=>{let[t,r]=e;const{meeting:{currentUserAudioBeforeReset:n},media:{audioDecodeStatus:o,audioEncodeStatus:i}}=r,{payload:{body:{ssrc:s}}}=t;let a=void 0;const c=Fs(r);if(c&&"computer"===n&&!c.audio){const e=ks(c.userRole);a=ld("audio",e?"success":i,o).pipe($e(e=>{let[t,r]=e;return t&&r}),Mt(()=>{pl.joinOrLeaveVoip(!0)}),gt(Do(void 0)))}return a?Ze(ae(na(s)),a):ae(na(s))})),handleMergeAudioEpic:(e,t)=>gn(e,7952).pipe(Rt(e=>fs("AUDIO_CURRENT_USER_JOIN_BY_PHONE",1).pipe(Lt(t),Mt(t=>{let[,r]=t;const{BindStatus:n,nOperatorUserId:o}=e.payload.body,i=r.participants.attendeesList.find(e=>e.userId===o);!0===n&&ps("AUDIO_MERGE_AUDIO_INDICATION",{operatorName:null==i?void 0:i.displayName,operatorUserId:o,operatorRole:null==i?void 0:i.userRole})})))),handleUserGrantAudioCaptureEpic:(e,t)=>bn(e,Di.UserGrantCaptureAudio).pipe(Lt(t),xe(e=>{let[,t]=e;ps("AUDIO_CURRENT_USER_JOIN_BY_VOIP");const r=Fs(t),{meeting:{isCurrentUserMutedBeforeReset:n},audio:{bMutedUponEntry:o,isUserGrantCaptureAudio:i}}=t,s=[ia(!0)];return r&&(!0===r.muted&&pl.mute(r.userId,!0),(!0===n||!i&&!r.isHost&&o)&&(pl.mute(r.userId,!0),n&&s.push(Mo(void 0)))),Ve(s)})),handleUserForbiddenMicrophoneEpic:e=>bn(e,Di.UserForbiddedCaptureAudio).pipe(Mt(()=>{ps("USER_FORBIDDEN_MICROPHONE")}),gt(sa(!0))),handleAudioSocketErrorEpic:e=>bn(e,Di.AudioWebsocketBroken).pipe(Mt(()=>{ps("ESTABLISH_AUDIO_STREAM_ERROR")}),bt(ee)),handleAudioZeroDataEpic:(e,t)=>bn(e,Di.AudioZeroData).pipe(Lt(t),nd(e=>{let[,t]=e;const{audio:{webrtcRestartCount:r,activeMicrophone:n}}=t;if(r<3)return Si.getInstance().restoreWebRTC(n),aa(r+1)})),handleAutoPlayEpic:(e,t)=>e.pipe(Bt("".concat(pa)),$e(e=>!1===e.payload),xe(()=>(ps("AUDIO_AUTO_PLAY_FAILED"),nt(Je(document,"click").pipe(vt(1)),Je(document,"touchend").pipe(vt(1))).pipe(Lt(t),Mt(e=>{let[,t]=e;const{audio:{audioSsrc:r,activeMicrophone:n,activeSpeaker:o}}=t,i=Fs(t),s=ks(i.userRole);Si.getInstance().joinComputerAudio(r,n,o,!s),pl.joinOrLeaveVoip(!0)}),gt(pa(!0))))))});const _l={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:!1,dialout:{sequence:0,returnCode:-1},canPlayAudio:!1,isActiveOperation:!1,isMutedAll:!1,isUserGrantCaptureAudio:!1,webrtcRestartCount:0,isComputerAudioLoading:!1,isSpeakerOnly:!1},fl=Hr({["".concat(Xs)]:uu((e,t)=>{let{payload:r}=t;e.asnIds=c({},r)}),["".concat(Zs)]:uu((e,t)=>{let{payload:r}=t;e.bCanUnmute=r}),["".concat(Qs)]:uu((e,t)=>{let{payload:r}=t;const{dialout:n}=e;n.sequence=r}),["".concat($s)]:uu((e,t)=>{let{payload:r}=t;const{dialout:n}=e;n.returnCode=r}),["".concat(ea)]:uu((e,t)=>{let{payload:r}=t;e.isAllowToTalk=r}),["".concat(ra)]:uu((e,t)=>{let{payload:r}=t;e.isActiveOperation=r}),["".concat(ta)]:uu((e,t)=>{let{payload:r}=t;e.isMutedAll=r}),["".concat(na)]:uu((e,t)=>{let{payload:r}=t;e.audioSsrc=r}),["".concat(oa)]:uu((e,t)=>{let{payload:r}=t;e.bMutedUponEntry=r}),["".concat(ia)]:uu((e,t)=>{let{payload:r}=t;e.isUserGrantCaptureAudio=r}),["".concat(sa)]:uu((e,t)=>{let{payload:r}=t;e.isMicrophoneForbidden=r}),["".concat(aa)]:uu((e,t)=>{let{payload:r}=t;e.webrtcRestartCount=r}),["".concat(ca)]:uu((e,t)=>{let{payload:r}=t;e.microphoneDevicesList=r}),["".concat(da)]:uu((e,t)=>{let{payload:r}=t;e.speakerDevicesList=r}),["".concat(ua)]:uu((e,t)=>{let{payload:r}=t;e.activeMicrophone=r}),["".concat(la)]:uu((e,t)=>{let{payload:r}=t;e.activeSpeaker=r}),["".concat(pa)]:uu((e,t)=>{let{payload:r}=t;e.canPlayAudio=r}),["".concat(ha)]:e=>{let{dialout:{returnCode:t}}=e;return c(c({},_l),{},{dialout:c(c({},_l.dialout),{},{returnCode:t})})},["".concat(_a)]:uu((e,t)=>{let{payload:r}=t;e.isComputerAudioLoading=r}),["".concat(fa)]:uu((e,t)=>{let{payload:r}=t;e.isSpeakerOnly=r})},_l),vl=En(hl),yl=e=>4294966272&e,El=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,n,o,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!==(n=null==e?void 0:e[0])&&void 0!==n?n:0)/255,G:(null!==(o=null==e?void 0:e[1])&&void 0!==o?o: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},gl=Ei.createAgent(),ml=Si.getInstance();var Sl=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>bn(e,Di.StartVideoCaptureSuccess).pipe(Lt(t),nd(e=>{let[,t]=e;const{video:{cameraDevicesList:r,activeCamera:n},meeting:{userId:o}}=t;return r.length<1?(ps("CAN_NOT_DETECT_CAMERA",{reason:"Cannot detect camera devices"}),void ml.stopCaptureVideo()):"default"===n||r.some(e=>e.deviceId===n)?void gl.muteAttendeeVideo(o,!1):(ps("CAN_NOT_FIND_CAMERA",{reason:"cannot find target camera"}),void ml.stopCaptureVideo())})),startVideoResponse:(e,t)=>gn(e,7937).pipe(Lt(t),$e(e=>{var t,r,n,o;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===(n=r.update)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.id)===a}),$e(e=>{var t,r,n,o;let[i]=e;return!0===(null==i||null===(t=i.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(n=r.update)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.bVideoOn)}),nd(()=>(ps("VIDEO_CAPTURE_START_SUCCESS"),ja(!0)))),handleForbiddenCaptureVideoEpic:e=>bn(e,Di.UserForbiddedCaptureVideo).pipe(Mt(()=>ps("VIDEO_USER_FORBIDDEN_CAPTURE")),gt(xa(!0))),handleCameraIsTakenByOtherProgramsEpic:e=>bn(e,Di.UserCameraIsTakenByOtherPrograms).pipe(Mt(()=>ps("VIDEO_CAMERA_IS_TAKEN",{reason:"User camera is taken by other programs."})),gt(Ka(!0))),handleVideoSocketErrorEpic:e=>bn(e,Di.VideoWebsocketBroken).pipe(Mt(()=>{ps("VIDEO_ESTABLISH_STREAM_ERROR",{reason:"Video websocket broken."})}),bt(ee)),handleStopVideoCaptureFailedEpic:e=>bn(e,Di.StopVideoCaptureFailed).pipe(Mt(()=>{ps("VIDEO_CAPTURE_STOP_RESULT",{failed:!0,reason:"Unknown."})}),bt(ee)),handleStopVideoCaptureSuccessEpic:(e,t)=>bn(e,Di.StopVideoCaptureSuccess).pipe(Lt(t),nd(e=>{let[,t]=e;const{meeting:{userId:r},video:{isCurrentUserStartedVideo:n}}=t;n||ps("VIDEO_CAPTURE_STOP_RESULT"),gl.muteAttendeeVideo(r,!0)})),stopVideoResponse:(e,t)=>gn(e,7937).pipe(Lt(t),$e(e=>{var t,r,n,o;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===(n=r.update)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.id)===a}),$e(e=>{var t,r,n,o;let[i]=e;return!1===(null==i||null===(t=i.payload)||void 0===t||null===(r=t.body)||void 0===r||null===(n=r.update)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.bVideoOn)}),nd(()=>(ps("VIDEO_CAPTURE_STOP_RESULT"),ja(!1)))),receiveVideoMuteIndication:(e,t)=>gn(e,16133).pipe(Lt(t),$e(e=>{var t,r;let[n,o]=e;return(null==n||null===(t=n.payload)||void 0===t||null===(r=t.body)||void 0===r?void 0:r.id)===o.meeting.userId}),nd(e=>{let[t]=e;const{id:r,bVideoMute:n}=t.payload.body;return ps("RECEIVE_VIDEO_MUTE_INDICATION",{id:r,isVideoMuted:n}),!0===n&&ml.stopCaptureVideo(),!1===n&&ps("ASK_FOR_START_VIDEO_CONSENT",{id:r,isVideoMuted:n}),Ba(n)})),receiveVideoActiveIndication:e=>gn(e,16129).pipe(Ce(e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,n=yl(t);return ps("RECEIVE_VIDEO_ACTIVE_INDICATION",{bVideoOn:r,userId:n}),Ua({bVideoOn:r,userId:n})})),receiveVideoSsrcIndication:(e,t)=>gn(e,16131).pipe($e(e=>void 0!==e.payload.body.ssrc),Lt(t),Rt(e=>{let[t,r]=e;const{meeting:{isCurrentUserStartVideoBeforeReset:n},media:{videoEncodeStatus:o},video:{captureCanvasList:i,activeCamera:s,isVerifiedVideoCaptureCanvasAfterFailover:a}}=r,{payload:{body:{ssrc:c}}}=t;let d=void 0;const u=Fs(r);return u&&!0===n&&!0!==u.bVideoOn&&(d=ld("video",o,"success").pipe($e(e=>{let[t,r]=e;return t&&r}),xe(()=>{const e=[ja(void 0)];return!1===a&&(Array.isArray(i)?i.forEach(e=>{_d(document.querySelector("#".concat(e)))}):_d(document.querySelector("#".concat(i))),e.push(za(!0))),Si.getInstance().startCaptureVideo(c,s,640,360),Ve(e)}))),d?Ze(ae(ka(c)),d):ae(ka(c))})),receiveVideoDecodeMaxSizeEpic:e=>bn(e,Di.VideoDecodeMaxSize).pipe($e(e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data}),od(e=>{const{size:t}=e.payload.data;return ae(Fa(t))})),spotlightVideoResponseEpic:e=>gn(e,16135).pipe(Ce(e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,n=[];return t&&n.push(yl(r)),ps("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),Ha(n)})),handleGroupLayoutIndicationEpic:(e,t)=>gn(e,7958).pipe(Lt(t),Ce(e=>{let[t,r]=e;const{payload:{body:n}}=t;let o=[];n&&n.group_list&&n.group_list[0]&&(o=n.group_list[0].map(e=>e.id));const i=qs(r);return o=o.filter(e=>i.findIndex(t=>t.userId===e)>=0),ps("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:o}),Ha(o)})),handleCurrentVideoResolution:e=>bn(e,Di.CurrentVideoResolution).pipe(nd(e=>(ps("VIDEO_RENDER_START_SUCCESS"),ps("RECEIVE_VIDEO_DIMENSION_CHANGE",e.payload.data),Ya(e.payload.data)))),handleMeetingVideoAttributeEpic:e=>gn(e,7938).pipe($e(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)}),Ce(e=>{const{payload:{body:{bFollowHostVideo:t,VideoHd:r,bCanUnmuteVideo:n}}}=e;return void 0!==t?(ps("VIDEO_FOLLOW_HOST_ORDER_CHANGE",{bOn:t}),Qa(t)):void 0!==n?oc(n):(ml.enableHardwareAccelerationForVideoEncode(!1),rc(1===r))})),handleHostDragLayoutIndicationEpic:(e,t)=>gn(e,7957).pipe(Lt(t),Ce(e=>{let[t,r]=e;const{video:{isFollowHostVideoLayout:n}}=r,{payload:{body:o}}=t,i=o&&o.drag_list&&o.drag_list.map(e=>e.id);return n&&ps("VIDEO_HOST_DRAG_LAYOUT_CHANGE",{layout:i}),$a(i)})),handlePeerVideoStateChangeEpic:(e,t)=>gn(e,7937).pipe(Lt(t),$e(e=>{let[t,r]=e;const{meeting:{userId:n},video:{subscribedVideoList:o}}=r,i=t.payload.body.update,s=t.payload.body.remove;return i&&i.length>0&&i.findIndex(e=>e.id!==n&&(void 0!==e.bVideoOn||e.bHold))>-1||s&&s.some(e=>o.includes(e.id))}),Mt(e=>{let[t,r]=e;const{payload:{body:{remove:n,update:o}}}=t,{video:{subscribedVideoList:i}}=r,s=Ks(r);if(n&&n.length>0&&n.filter(e=>i.includes(e.id)).forEach(e=>{ps("VIDEO_OLD_USER_STOP",{userId:e.id})}),o&&o.length>0){const e=o.filter(e=>void 0!==e.bVideoOn).filter(e=>-1===s.findIndex(t=>t.userId===e.id)),t=o.filter(e=>!0===e.bHold);t.length>0&&t.filter(e=>i.includes(e.id)).forEach(e=>{ps("VIDEO_OLD_USER_STOP",{userId:e.id})}),e.forEach(e=>{e.bVideoOn?ps("VIDEO_NEW_USER_START",{userId:e.id}):ps("VIDEO_OLD_USER_STOP",{userId:e.id})})}}),bt(ee))});const bl={videoSsrc:0,cameraDevicesList:[],activeCamera:"default",activeVideoId:0,isCurrentUserStartedVideo:!1,spotlightUserList:[],isCaptureForbidden:!1,receivedVideoMaxQuality:2,captureCanvasList:[],subscribedVideoList:[],renderedVideoList:[],isVideoMuted:!1,isCaptureCameraLoading:!1,isCameraTaken:!1,receivedVideoDimension:{width:0,height:0},isFollowHostVideoLayout:!1,hostDragLayout:[],isSupportHDVideo:!1,highDefinitionVideoId:void 0,bCanUnmuteVideo:!1},Il=Hr({["".concat(ka)]:uu((e,t)=>{let{payload:r}=t;e.videoSsrc=r}),["".concat(Va)]:uu((e,t)=>{let{payload:r}=t;e.cameraDevicesList=r}),["".concat(La)]:uu((e,t)=>{let{payload:r}=t;e.activeCamera=r}),["".concat(Ua)]:uu((e,t)=>{let{payload:r}=t;e.activeVideoId=r.userId}),["".concat(ja)]:uu((e,t)=>{let{payload:r}=t;e.isCurrentUserStartedVideo=r}),["".concat(Ha)]:uu((e,t)=>{let{payload:r}=t;e.spotlightUserList=r}),["".concat(xa)]:uu((e,t)=>{let{payload:r}=t;e.isCaptureForbidden=r}),["".concat(Fa)]:uu((e,t)=>{let{payload:r}=t;e.receivedVideoMaxQuality=r}),["".concat(Ga)]:uu((e,t)=>{let{payload:r}=t,n=r;Array.isArray(r)||(n=[r]),e.captureCanvasList=n}),["".concat(Ba)]:uu((e,t)=>{let{payload:r}=t;e.isVideoMuted=r}),["".concat(Wa)]:uu((e,t)=>{let{payload:r}=t;e.isCaptureCameraLoading=r}),["".concat(Ka)]:uu((e,t)=>{let{payload:r}=t;e.isCameraTaken=r}),["".concat(za)]:uu((e,t)=>{let{payload:r}=t;e.isVerifiedVideoCaptureCanvasAfterFailover=r}),["".concat(qa)]:uu((e,t)=>{let{payload:r}=t;e.isVerifiedVideoRenderCanvasAfterFailover=r}),["".concat(Ya)]:uu((e,t)=>{let{payload:r}=t;e.receivedVideoDimension=r}),["".concat(Xa)]:uu((e,t)=>{let{payload:r}=t;e.subscribedVideoList.includes(r)||e.subscribedVideoList.push(r)}),["".concat(Za)]:uu((e,t)=>{let{payload:r}=t;const n=e.subscribedVideoList.indexOf(r);n>=0&&e.subscribedVideoList.splice(n,1)}),["".concat(ec)]:uu((e,t)=>{let{payload:r}=t;-1===e.renderedVideoList.findIndex(e=>e.userId===r.userId&&e.key===r.key&&e.canvasId===r.canvasId)&&e.renderedVideoList.push(c({},r))}),["".concat(tc)]:uu((e,t)=>{let{payload:r}=t;const n=e.renderedVideoList.findIndex(e=>e.userId===r.userId&&e.key===r.key&&e.canvasId===r.canvasId);n>=0&&e.renderedVideoList.splice(n,1)}),["".concat(Qa)]:uu((e,t)=>{let{payload:r}=t;e.isFollowHostVideoLayout=r}),["".concat($a)]:uu((e,t)=>{let{payload:r}=t;e.hostDragLayout=r}),["".concat(rc)]:uu((e,t)=>{let{payload:r}=t;e.isSupportHDVideo=r}),["".concat(nc)]:uu((e,t)=>{let{payload:r}=t;e.highDefinitionVideoId=r}),["".concat(oc)]:uu((e,t)=>{let{payload:r}=t;e.bCanUnmuteVideo=r}),["".concat(Ja)]:e=>c(c({},bl),{},{captureCanvasList:e.captureCanvasList,activeCamera:e.activeCamera,isVerifiedVideoCaptureCanvasAfterFailover:!1,isVerifiedVideoRenderCanvasAfterFailover:!1})},bl),Al=En(Sl),{InitSuccessVideo:Ol,InitSuccessAudio:Cl,InitSuccessSharing:Tl,InitFailedVideo:wl,InitFailedAudio:Rl,InitFailedSharing:Nl}=Di;let Dl;const Ml=new J(yn(Yu,ol,dl,En(Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(Bt("".concat(on)),Lt(t),$e(e=>{let[,t]=e;return void 0!==t.media.assetsPath&&void 0!==t.media.mediaConstraints}),Mt(e=>{let[,r]=e;const{media:{assetsPath:n,mediaConstraints:o,fileWithVersion:i},meeting:{enableQos:s}}=r;Dl=Si.getInstance(),n&&o&&Dl.setAssetsAndConstraint(n,o,i),pd(t).pipe(Lt(t)).subscribe(e=>{let[t,r]=e;const{meeting:{svcUrl:n,meetingNumber:o,conId:i,e2eEncrypt:a,userId:c,isWebinar:d}}=r;var u;t&&(null===(u=Dl)||void 0===u||u.connect({svcUrl:n,meetingNumber:o,conId:i,e2eEncrypt:a,isViewOnly:ks(t.userRole),currentUserId:c,isWebinar:d,enableQos:s}))})}),Rt(()=>Ye(e=>{var t;return null===(t=Dl)||void 0===t?void 0:t.registerCallback(e)},e=>{var t;return null===(t=Dl)||void 0===t?void 0:t.unregisterCallback(e)},(e,t)=>({type:e,data:t})).pipe(Ce(e=>sn(e))))),connectedMediaStreamEpic:e=>bn(e,[Ol,Cl,Tl,wl,Rl,Nl]).pipe(od(e=>{const{payload:{type:t,data:r}}=e;if(t===Cl||t===Rl){if(r===Mi.EncodeSuccess)return ps("AUDIO_ENCODE_SUCCESS"),ae(an("success"));if(r===Mi.DecodeSuccess)return ps("AUDIO_DECODE_SUCCESS"),ae(cn("success"));if(r===Mi.EncodeFailed)return ps("AUDIO_ENCODE_FAIL"),ae(an("failed"));if(r===Mi.DecodeFailed)return ps("AUDIO_DECODE_FAIL"),ae(cn("failed"))}else if(t===Ol||t===wl){if(r===Mi.EncodeSuccess)return ps("VIDEO_ENCODE_SUCCESS"),ae(dn("success"));if(r===Mi.DecodeSuccess)return ps("VIDEO_DECODE_SUCCESS"),ae(un("success"));if(r===Mi.EncodeFailed)return ps("VIDEO_ENCODE_FAIL"),ae(dn("failed"));if(r===Mi.DecodeFailed)return ps("VIDEO_DECODE_FAIL"),ae(un("failed"))}else if(t===Tl||t===Nl){if(r===Mi.EncodeSuccess)return ps("SHARING_ENCODE_SUCCESS"),ae(ln("success"));if(r===Mi.DecodeSuccess)return ps("SHARING_DECODE_SUCCESS"),ae(pn("success"));if(r===Mi.EncodeFailed)return ps("SHARING_ENCODE_FAIL"),ae(ln("failed"));if(r===Mi.DecodeFailed)return ps("SHARING_DECODE_FAIL"),ae(pn("failed"));if(t===Tl&&void 0===r)return ps("SHARING_DECODE_SUCCESS"),ae(pn("success"))}})),mediaDeviceUpdateEpic:(e,t)=>bn(e,[Ol,Cl]).pipe(id(()=>{if("object"==typeof navigator.mediaDevices)return Ze(hd(),Ze(bn(e,Di.StartVideoCaptureSuccess),Je(navigator.mediaDevices,"devicechange"),bn(e,Di.UserGrantCaptureAudio)).pipe(xe(()=>hd().pipe(Mt(()=>{ps("MEDIA_DEVICE_CHANGE")}))))).pipe(Lt(t),xe(e=>{let[t,r]=e;const n=[ca(t.microphones),da(t.speakers),Va(t.cameras)];if(r.audio){const{audio:{activeMicrophone:e,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:c}}=r,{microphones:d,speakers:u}=t,l=a.filter(e=>-1===d.findIndex(t=>t.deviceId===e.deviceId)),p=c.filter(e=>-1===u.findIndex(t=>t.deviceId===e.deviceId));var o,i;l.length>0&&l[0].deviceId===e&&(null===(o=Dl)||void 0===o||o.changeMicrophone("default"),n.push(ua("default"))),p.length>0&&p[0].deviceId===s&&(null===(i=Dl)||void 0===i||i.changeSpeaker("default"),n.push(la("default")))}return Ve(n)}))})),sendUserNodeListToMediaSDKEpic:e=>Sn(e,7937).pipe(Mt(e=>{const{type:t,payload:{body:r}}=e,n=Si.getInstance(),o=t==="".concat(Xr);if(r.add){const e=r.add.map(e=>({userid:e.id,sn:e.zoomID&&ao(e.zoomID)}));o||n.sendUserNodeList(e),n.updateUserMediaSN({added:e,isFromMainSession:o,iVType:oi.SHARING_DECODE})}r.remove&&(o||n.sendUserNodeList(r.remove.map(e=>({userid:e.id,bremove:!0}))),n.updateUserMediaSN({removed:r.remove.map(e=>e.id),isFromMainSession:o,iVType:oi.SHARING_DECODE}))}),bt(ee)),handleMediaSdkGcmIVResponseEpic:e=>bn(e,Di.AesGcmIvResponse).pipe(Mt(e=>{const{payload:{data:{workerType:t,iv:r}}}=e,n=Jo.get(ai.WebclientIVState);if(n){const e=c(c({},n),{},{[t]:r});Jo.set(ai.WebclientIVState,e,qo.SessionStorage)}}),bt(ee)),handleMediaEncryptIndication:e=>e.pipe(Bt("".concat(Kr)),$e(e=>[_i,fi,hi].includes(e.payload.evt)),Ce(e=>{const{payload:{evt:t,body:{encryptKey:r,additionalType:n}}}=e;return _n({type:t===_i?"audio":t===fi?"video":"sharing",encryptKey:r,additionalType:n})}))})))),Pl=(e,t,r)=>Ml.pipe(xe(n=>n(e,t,r))),kl={meeting:Ju,socket:nl,participants:cl,media:ll},Ul=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=$.constructor,r=new t($.SchedulerAction),n=new q,o=void 0,i=function(t){o=t;var i=(new q).pipe(le(r)),s=(new q).pipe(le(r)),a=new Kt(i),c=new qt(s,o.getState());return n.pipe(Ce((function(t){var r="dependencies"in e?t(a,c,e.dependencies):t(a,c);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})),xe((function(e){return Ve(e).pipe(Tt(r),le(r))}))).subscribe(o.dispatch),function(e){return function(t){var r=e(t);return s.next(o.getState()),i.next(t),r}}};return i.run=function(e){n.next(e)},i}(),Vl=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||S;function Ll(e){return function(e){for(var t=Object.keys(e),r={},n=0;ne.userId===t);if(o.findIndex(e=>e===zl.Attendee)>-1&&(i=Ws(n).find(e=>e.userId===t)),!i)return Promise.reject({type:os,reason:"no matching user"});{const{meeting:{userId:e}}=r.getState();for(let r=0;r1?n-1:0),s=1;s{if(this[Fl][e]&&void 0===o.getState()[e]){const{epic:t,reducer:r,Client:n}=this[Fl][e];o.injectReducer(e,r),o.injectEpic(t);const i=new n(o);this.modules.set(e,i)}}),null!=n&&n.audio&&void 0===o.getState().audio&&(o.injectReducer("audio",fl),o.injectEpic(vl)),null!=n&&n.video&&void 0===o.getState().video&&(o.injectReducer("video",Il),o.injectEpic(Al)),null!=n&&n.screen&&void 0===o.getState().share&&(o.injectReducer("share",pu),o.injectEpic(hu))}return n(go({apiKey:e,signature:t,language:a})),n(hn({mediaConstraints:r&&r.constraints||{},assetsPath:i,fileWithVersion:s})),new Promise((e,t)=>{null!=r&&r.skipJsMedia?e(""):Ho(c,()=>{e("")},()=>{t({type:os,reason:"depedent assets are not accessible"})})})}on(e,t){((e,t)=>{const r=as[e];if(r){const n=us.get(e);if(n)n.push(t),us.set(e,n);else{const n=[t];us.set(e,n);const o=Ze(...r.map(e=>{const{event:t,payload:r}=e;return Je(cs,t).pipe(Ce(e=>r(e)),le(me))})).subscribe(t=>{const r=us.get(e);r&&r.forEach(e=>{e(t)})});ls.push(o)}}})(e,t)}off(e,t){((e,t)=>{if(as[e]){const r=us.get(e);if(Array.isArray(r)){const n=r.filter(e=>e!==t);us.set(e,n)}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[Hl]:e,[xl]:t}=this;return"connected"===e().socket.zoomSocketStatus&&t(fo()),Promise.resolve("")}end(){const{[Hl]:e,[xl]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(vo()),st(500).pipe(Mt(()=>{vs()}),gt("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[jl].getState(),{meeting:{bAllowAttendeeRename:n}}=r,o=Fs(r),i=ks(o.userRole),s=Gs(r);if(i)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"});if(t&&t!==(null==o?void 0:o.userId)){if(s){const{participants:{attendeesList:n}}=r,o=n.find(e=>e.userId===t);if(o)return ep.rename(t,oo(e),oo(o.displayName)),rd(t,t=>t.displayName===e);{const n=Ws(r).find(e=>e.userId===t);return n?(Ou.getInstance().rename(n.jid,e),_s("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",t=>{const r=t.find(e=>e.jid===n.jid);return r&&r.name===e})):Promise.reject({type:os,reason:"no matching user"})}}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})}return e===o.displayName?Promise.resolve():s||n?(ep.rename(o.userId,oo(e),oo(o.displayName)),_s("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t=>t.displayName===e)):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host disallow rename themselves"})}makeHost(e){return ep.assignHost(e,!1),rd(e,e=>!0===e.isHost)}makeCoHost(e){const t=this[jl].getState(),r=qs(t).find(t=>t.userId===e);return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:os,reason:"user:[".concat(e,"] is already co-host ")}):(ep.assignHost(e,!0),rd(e,e=>!0===e.bCoHost))}revokeCoHost(e){const t=this[jl].getState(),r=qs(t).find(t=>t.userId===e);return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:os,reason:"user:[".concat(e,"] is not a co-host")}):(ep.revokeCoHost(e),rd(e,e=>!1===e.bCoHost))}isHost(){const e=this[jl].getState(),t=Fs(e);return!!t&&t.isHost}isCoHost(){const e=this[jl].getState(),t=Fs(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[Hl]();return e}getCurrentUserInfo(){const e=this[jl].getState(),t=Fs(e);if(t){const r={userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,isGuest:t.bGuest,avatar:t.avatar,isPhoneUser:Ms(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,sharePause:t.sharerPause,feedback:t.feedback};if(e.meeting.isWebinar&&ks(t.userRole)){const{participants:{allowTalkAttendeesList:n}}=e,o=n.find(e=>e.userId===t.userId),i=!!o;Object.assign(r,{isAllowToTalk:i}),o&&Object.assign(r,{audio:o.audio,muted:o.muted})}return r}return null}getParticipantsList(){const e=this[jl].getState(),{meeting:{meetingStatus:t}}=e,r=Fs(e);return"joined"===t&&r&&!r.bHold?qs(e).map(e=>({userId:e.userId,displayName:e.displayName,audio:e.audio,muted:e.muted,isHost:e.isHost,isCoHost:e.bCoHost,isGuest:e.bGuest,avatar:e.avatar,isPhoneUser:Ms(e.userType),bRaiseHand:e.bRaiseHand,bHold:e.bHold,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharePause:e.sharerPause,feedback:e.feedback,bLocalRecord:e.bLocalRecord,sdkKey:e.sdkKey})):[]}getMeetingHost(){const e=this[Hl](),t=zs(e);return t?{userId:t.userId,displayName:t.displayName,audio:t.audio,muted:t.muted,isHost:t.isHost,isCoHost:t.bCoHost,avatar:t.avatar,isPhoneUser:Ms(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,feedback:t.feedback}:null}getMeetingInfo(){const{meeting:{meetingStatus:e,isOnHold:t,meetingNumber:r,passWord:n,userName:o,userEmail:i,meetingTopic:s,meetingOptions:a,encType:c,region:d,network:u,topic:l,zlkJwtToken:p,userId:h,lang:_,inviteEmail:f,meetingId:v,participantID:y,h323Password:E,recordingDisclaimer:g,recordingDisclaimerForRecorder:m}}=this[Hl](),S="joined"===e&&!t;if(p)return{topic:l,password:n,userName:o,isInMeeting:S,userId:h,meetingId:v};{let e="";return 0===c?e="None":1===c?e="AES ECB":2===c&&(e="AES GCM"),{meetingNumber:r,password:n,userName:o,userEmail:i,inviteEmail:f,meetingTopic:s,encryptionType:e,region:d,network:u,isInMeeting:S,userId:h,lang:_,webEndpoint:yu,meetingId:v,participantId:y,telPwd:E,recordingInfo:{recordingDisclaimer:g,recordingDisclaimerForRecorder:m,isUserEnableRecordingReminder:null==a?void 0:a.isUserEnableRecordingReminder}}}}}).prototype,"end",[Kl,Bl],Object.getOwnPropertyDescriptor($l.prototype,"end"),$l.prototype),l($l.prototype,"changeName",[Bl],Object.getOwnPropertyDescriptor($l.prototype,"changeName"),$l.prototype),l($l.prototype,"makeHost",[Xl,Kl,Bl],Object.getOwnPropertyDescriptor($l.prototype,"makeHost"),$l.prototype),l($l.prototype,"makeCoHost",[Zl,Kl,Bl],Object.getOwnPropertyDescriptor($l.prototype,"makeCoHost"),$l.prototype),l($l.prototype,"revokeCoHost",[Ql,Kl,Bl],Object.getOwnPropertyDescriptor($l.prototype,"revokeCoHost"),$l.prototype),$l);!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"}(tp||(tp={})),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"}(rp||(rp={})),function(e){e[e.None=0]="None",e[e.Delete=1]="Delete",e[e.Modify=2]="Modify"}(np||(np={})),function(e){e[e.Success=0]="Success",e[e.Delete=1]="Delete",e[e.Block=3]="Block"}(op||(op={}));const sp=[tp.All,tp.Host,tp.NoOne,tp.EveryonePublicly],ap=[tp.NoOne,tp.All,tp.AllPanelist],cp={userId:rp.All,displayName:"Everyone",isHost:!1,isCoHost:!1},dp={userId:rp.Panelist,displayName:"All panelists"},up={userId:rp.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};var lp=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>mn(e,"Message").pipe(Lt(t),xe(e=>{let[t,r]=e;const{payload:{data:{sn:n,senderName:o,senderJid:i,receiver:s,text:a,type:c}}}=t,d=Fs(r),u=Ws(r),{meeting:{jid:l,userId:p},participants:{xmppAttendeeList:h}}=r;return pi.beginDecrypt({decryptedText:a,type:si.XMPP_CHAT,zoomId:n}).then(e=>{var t;let{message:r}=e,n=null,a=0,_="";d&&ks(d.userRole)&&l===s?(n=h.find(e=>e.jid===i),a=p,_=d.displayName):c===rp.Panelist&&(n=u.find(e=>e.jid===i),a=rp.Panelist,_=dp.displayName);const f={message:r,sender:{name:o,userId:(null===(t=n)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:_,userId:a},timestamp:(new Date).getTime()};return ps("CHAT_RECEIVE_MESSAGE_EVENTS",f),lc(f)})})),receiveChatMessageFromRWGEpic:(e,t)=>gn(e,7944).pipe(Lt(t),xe(e=>{let[t,r]=e;const{meeting:{bIbDisableChat:n,isWebinar:o},participants:{attendeesList:i}}=r,{payload:{body:{attendeeNodeID:s,sn:a,destNodeID:c,text:d,senderName:u,msgID:l}}}=t,p=Fs(r),h=Ws(r);if(p){const e=ks(null==p?void 0:p.userRole)&&s===p.userId&&!l;if(!n&&!e){let e,t=a;if(!a){const e=i.find(e=>e.userId===c);e&&(t=e.zoomID)}if(s===rp.SilentModeUsers){const t=io(d),r={id:l,message:t,sender:{name:"Host",userId:c},receiver:{name:"Everyone (in Waiting Room)",userId:s},timestamp:(new Date).getTime()};e=Promise.resolve(r)}else e=pi.beginDecrypt({decryptedText:d,zoomId:t,type:si.RWG_CHAT}).then(e=>{let{message:t}=e;const r=i.find(e=>e.userId===c),n=u?io(u):null==r?void 0:r.displayName;let a="";if(s===rp.All)a=o?"All panelists and attendees":"Everyone";else if(s===rp.Panelist)a="All panelists";else if(o&&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:n,userId:c,avatar:null==r?void 0:r.avatar},receiver:{name:a,userId:s},timestamp:(new Date).getTime()}});return e.then(e=>(ps("CHAT_RECEIVE_MESSAGE_EVENTS",e),lc(e)))}}return ee})),changePrivilegeResponse:(e,t)=>gn(e,7938).pipe($e(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)}),Lt(t),Ce(e=>{let[t,r]=e;const{payload:{body:{chatPriviledge:n,bAllowAttendeeChat:o}}}=t,{chat:{chatPrivilege:i}}=r;return void 0!==o?(ps("CHAT_PRIVILEGE_CHANGE",!0===o?{chatPrivilege:i}:{chatPrivilege:tp.NoAttendee}),hc(o)):(ps("CHAT_PRIVILEGE_CHANGE",{chatPrivilege:n}),uc(n))})),chatResponseEpic:(e,t)=>gn(e,4136).pipe(Lt(t),xe(e=>{let[t,r]=e;const{payload:{body:{result:n,destNodeID:o,msgID:i}}}=t,{meeting:{userId:s},chat:{chatHistory:a}}=r;if(n===op.Success){let e=0;for(let t=a.length-1;t>=0;t--){const r=a[t];if(!r.id&&r.sender.userId===s&&[rp.All,rp.Panelist,o].includes(r.receiver.userId)){e=r.timestamp;break}}return ps("CHAT_MESSAGE_RESPONSE",{msgId:i,receiverId:o,timestamp:e}),ae(_c({destNodeID:o,msgID:i,userId:s}))}return n===op.Delete||n===op.Block?ae(fc({msgId:i})):ee})),chatCmdResponseEpic:e=>gn(e,4238).pipe(xe(e=>{const{payload:{body:{bSuccess:t,cmd:r,msgID:n}}}=e,o=[];if(t)switch(r){case np.Delete:o.push(fc({msgId:n})),ps("CHAT_DELETE_MESSAGE_REPONSE",{id:n})}return Ve(o)})),chatCmdIndicationEpic:e=>gn(e,7960).pipe(xe(e=>{const{payload:{body:{cmd:t,msgID:r}}}=e,n=[];switch(t){case np.Delete:n.push(fc({msgId:r})),ps("CHAT_DELETE_MESSAGE_REPONSE",{id:r})}return Ve(n)}))});const pp={chatHistory:[],chatPrivilege:tp.All,isAllowAttendeeChat:!0},hp=Hr({["".concat(lc)]:uu((e,t)=>{let{payload:r}=t;e.chatHistory.push(r)}),["".concat(uc)]:uu((e,t)=>{let{payload:r}=t;e.chatPrivilege=r}),["".concat(hc)]:uu((e,t)=>{let{payload:r}=t;e.isAllowAttendeeChat=r}),["".concat(_c)]:uu((e,t)=>{let{payload:r}=t;const{destNodeID:n,msgID:o,userId:i}=r;for(let t=e.chatHistory.length-1;t>=0;t--){const r=e.chatHistory[t];if(!r.id&&r.sender.userId===i&&[rp.All,rp.Panelist,n].includes(r.receiver.userId)){r.id=o;break}}}),["".concat(fc)]:uu((e,t)=>{let{payload:r}=t;const{msgId:n}=r,o=e.chatHistory.findIndex(e=>e.id===n);o>=0&&e.chatHistory.splice(o,1)}),["".concat(pc)]:()=>c({},pp)},pp);function _p(e,t,r){if(null!=r&&r.host)return[zs(e),...Js(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 n=[zs(e),...Js(e),...e.participants.attendeesList.filter(e=>!(e.bCoHost||e.isHost||e.bHold))];if(null!=r&&r.includeAttendee){const t=Ws(e).filter(e=>!Ms(e.userType));n=[...n,...t]}return n.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}))}}var fp;const vp=Ei.createAgent(),yp=Ou.getInstance(),Ep=e=>{const{text:t,destId:r,sn:n,attendeeId:o}=e;return pi.beginEncrypt({text:t,type:si.RWG_CHAT}).then(e=>{vp.chat(e,r,n,o)})};let gp=(l((fp=class extends Yl{send(e,t){if(!e)return Promise.reject({type:os,reason:"Text is empty"});const{[Hl]:r,[xl]:n}=this,o=r(),i=Fs(o),s=function(e,t){if(t===rp.All)return cp;if(t===rp.Panelist)return dp;if(t===rp.SilentModeUsers)return up;{const{meeting:{isWebinar:r},participants:{xmppAttendeeList:n,attendeesList:o}}=e;return r?o.find(e=>e.userId===t)||n.find(e=>e.userId===t):o.find(e=>e.userId===t)}}(o,t),a=((e,t,r)=>{const n=null==t?void 0:t.userId;if(null==e||!e.zoomID||null==t||!t.displayName||n===e.userId)return{type:os,reason:"invalid target user"};const{chat:{chatPrivilege:o},meeting:{isWebinar:i}}=r,s=Gs(r),a=t.isHost||t.bCoHost;if(!s)if(i&&ks(e.userRole)){if(o===tp.NoAttendee||o===tp.AllPanelist&&n!==rp.Panelist||o===tp.All&&n!==rp.All&&n!==rp.Panelist)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"}}else if(o===tp.NoAttendee||o===tp.Host&&!a||n===rp.SilentModeUsers||o===tp.EveryonePublicly&&n!==rp.All&&!a)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"};return null})(i,s,o);if(a)return Promise.reject(a);const{meeting:{isWebinar:d,encType:u}}=o,l=u===ii.AES_GCM;let p=Promise.resolve(),h=!1;return t===rp.SilentModeUsers?vp.chat(oo(e),t):d?s.userRole===Ns.Attendee?8==(8&s.clientCap)?p=Ep({text:e,destId:rp.IndividualCcPanelist,sn:null==i?void 0:i.zoomID,attendeeId:t}):(p=Ep({text:e,destId:rp.Panelist,sn:null==i?void 0:i.zoomID,attendeeId:t}).then(()=>(e=>{const{text:t,jid:r,isGCMEnabled:n}=e;return pi.beginEncrypt({text:t,type:si.XMPP_CHAT}).then(e=>{yp.sendWebinarMsg(e,r,rp.IndividualCcPanelist,n)})})({text:e,jid:s.jid,isGCMEnabled:l})),h=!0):s&&(p=Ep({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID})):p=Ep({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID}),p.then(()=>{const r=(new Date).getTime(),o={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:null==s?void 0:s.userId},timestamp:r};return n(lc(o)),h?(ps("CHAT_RECEIVE_MESSAGE_EVENTS",o),o):new Promise((e,n)=>{var i;fs("CHAT_MESSAGE_RESPONSE").pipe(function(e,t){return void 0===t&&(t=be),function(e,t,r){return void 0===r&&(r=be),function(n){var o=lt(e),i=o?+e-r.now():Math.abs(e);return n.lift(new Ut(i,o,t,r))}}(e,ce(new Oe),t)}(5e3),(i=e=>r!==e.timestamp||!([e.receiverId,rp.All,rp.Panelist].includes(t)||e.receiverId===rp.IndividualCcPanelist),function(e){return e.lift(new It(i))}),vt(1)).subscribe(t=>{const{msgId:r}=t,n=c({id:r},o);ps("CHAT_RECEIVE_MESSAGE_EVENTS",n),e(n)},()=>{n({type:"OPERATION_TIMEOUT"})})})})}setPrivilege(e){const t=this[Hl](),{meeting:{isWebinar:r},chat:{chatPrivilege:n}}=t;return n===e?Promise.resolve(""):!r&&!sp.includes(e)||r&&!ap.includes(e)?Promise.reject({type:os,reason:"invalid privilege value of parameter"}):(vp.setChatPriviledge(e),_s("CHAT_PRIVILEGE_CHANGE",t=>t.chatPrivilege===e))}deleteMessage(e){const t=this[Hl](),{chat:{chatHistory:r},meeting:{meetingOptions:n,userId:o}}=t;if(null!=n&&n.isEnableDeleteChatMsg){const n=Gs(t),i=r.find(t=>t.id===e);if(i){const{sender:t}=i;if(n)vp.chatCmdReq(e,np.Delete);else{if(t.userId!==o)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"can not delete message"});vp.chatCmdReq(e,np.Delete)}return _s("CHAT_DELETE_MESSAGE_REPONSE",t=>t.id===e).then(()=>({id:e}))}return Promise.reject({type:os,reason:"msgId is wrong"})}return Promise.reject({type:ns,reason:"can not delete messages"})}lockChat(e){const t=this[Hl](),{meeting:{meetingOptions:r}}=t,n=null!=r&&r.isPrivateChatEnabled?tp.All:tp.EveryonePublicly;return this.setPrivilege(e?tp.NoOne:n)}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[Hl]();return t?e:tp.NoAttendee}getReceivers(){const e=this[Hl](),{chat:{chatPrivilege:t,isAllowAttendeeChat:r},meeting:{isWebinar:n}}=e;if(!n&&!r)return[];const o=Fs(e);if(o)if(n){if(!ks(o.userRole)){const t=_p(e,o.userId,{includeAttendee:!0});return[dp,cp,...t]}if(!r)return[];if(t===tp.All)return[dp,cp];if(t===tp.AllPanelist)return[dp];if(t===tp.NoOne)return[]}else{const r=Gs(e);if(t===tp.All||r){const t=_p(e,o.userId);return[cp,...t]}if(t===tp.Host)return _p(e,o.userId,{host:!0});if(t===tp.EveryonePublicly){const t=_p(e,o.userId,{host:!0});return[cp,...t]}if(t===tp.NoOne)return[]}return[]}getHistory(){return this[Hl]().chat.chatHistory.map(e=>c({},e))}isAllowToDeleteMessages(){const e=this[Hl](),{meeting:{meetingOptions:t}}=e;return null==t?void 0:t.isEnableDeleteChatMsg}}).prototype,"send",[Bl],Object.getOwnPropertyDescriptor(fp.prototype,"send"),fp.prototype),l(fp.prototype,"setPrivilege",[Wl,Bl],Object.getOwnPropertyDescriptor(fp.prototype,"setPrivilege"),fp.prototype),l(fp.prototype,"deleteMessage",[Bl],Object.getOwnPropertyDescriptor(fp.prototype,"deleteMessage"),fp.prototype),l(fp.prototype,"lockChat",[Wl,Bl],Object.getOwnPropertyDescriptor(fp.prototype,"lockChat"),fp.prototype),fp);const mp=En(lp),Sp=(e,t,r)=>{const{store:{getState:n,dispatch:o},mediaAgent:i}=e,s=n(),{meeting:{bIbDisableShare:a},share:{sharePrivilege:d,ssrc:u,isChromeExtensionInstalled:l,isVerifiedCaptureCanvasAfterFailover:p,isReceiveSharingFromMainSession:h},media:{sharingEncodeStatus:_},breakoutRoom:f}=s;if(a)return Promise.reject({type:ns,reason:"information barrier"});if(h)return Promise.resolve({type:ns,reason:"Unable to share your screen while someone is sharing from the main session"});if("function"==typeof window.MediaStreamTrackProcessor&&!(t instanceof HTMLVideoElement))return Promise.reject({type:os,reason:"Use Video element instead of Canvas element when WebCodecs enabled"});const v=Gs(s);if(null!=r&&r.broadcastToBreakoutRoom){if(!v||(null==f?void 0:f.currentRoom.status)===js.InRoom)return v?Promise.reject({type:ns,reason:"Unable to share screen to breakout room when in the room"}):Promise.reject({type:"INSUFFICIENT_PRIVILEGES"});o(Ma(!0))}else o(Ma(!1));const y=ud(s);if(d===Li.OnlyHost&&!v)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can start screen share"});if(d===Li.HostGrab&&!v&&y.length>0)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"only host can grab screen share"});const E=Fs(s);if(!0===(null==E?void 0:E.sharerOn))return Promise.reject({type:ns,reason:"you have already started screen share."});let g=ae(!0);return(()=>{const{userAgent:e}=navigator;return!/opera|opr\/[\d]+/i.test(navigator.userAgent)&&!/edge\/(\d+)/i.test(navigator.userAgent)&&/chrome/i.test(e)&&/webkit/i.test(e)})()&&void 0===navigator.mediaDevices.getDisplayMedia&&!l&&(i.checkChromeSharingExtension(),g=fs("SHARE_CHECK_CHROME_SHARING_EXTENSION",1)),t.id||(t.id="__ZOOM_SDK_SHARE_CANVAS_@__".replace("@","".concat(Math.floor(1e4*Math.random())))),qe([ld("sharing",_,"success"),g]).subscribe(e=>{let[r,n]=e;const[s]=r;if(s&&n){!1===p&&(_d(t),o(Ra(!0)));let e=document.querySelector("#".concat("__ZOOM_SDK_SHARING_VIDEO__"));e&&"VIDEO"===e.tagName||(e=document.createElement("video"),e.id="__ZOOM_SDK_SHARING_VIDEO__",e.style.display="none",document.body.appendChild(e)),i.startDesktopSharing(u,t.id,"__ZOOM_SDK_SHARING_VIDEO__")}}),new Promise((e,t)=>{nt(fs("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1),fs("SHARE_CHECK_CHROME_SHARING_EXTENSION").pipe($e(e=>!e),vt(1),bt(ce({reason:"required extension",extensionUrl:"https://chrome.google.com/webstore/detail/zoom-scheduler/kgjfgplpablkjnlkjmjdecgdpfankdle"}))),fs("SHARE_START_DESKTOP_SHARE_FAILED",1).pipe(bt(ce({reason:"user deny screen share"})))).subscribe(r=>{!0===r.sharerOn?e(""):t({type:"INTERNAL_ERROR"})},e=>{t(c({type:ns},e))})})},bp=Ts([qs],e=>e.filter(e=>e.bVideoOn)),Ip=()=>"function"==typeof window.OffscreenCanvas&&("function"==typeof window.ImageCapture||"function"==typeof window.MediaStreamTrackProcessor)&&function(){try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(Vi)}catch(e){return!1}}();var Ap,Op,Cp,Tp,wp,Rp,Np,Dp,Mp,Pp,kp,Up,Vp,Lp,jp,Hp,xp,Fp,Gp,Bp,Wp,Kp,qp,zp,Jp,Yp;let Xp=(Ap=ql("audio"),Op=ql("audio"),Cp=ql("audio"),Tp=ql("audio"),wp=ql("audio"),Rp=ql("audio"),Np=ql("video"),Dp=ql("video"),Mp=ql("video"),Pp=ql("video"),kp=ql("video"),Up=ql("video"),Vp=ql("video"),Lp=ql("video"),jp=ql("video"),Hp=ql("video"),xp=ql("share"),Fp=ql("share"),Gp=ql("share"),Bp=ql("share"),Wp=ql("share"),Kp=ql("share"),qp=ql("share"),zp=ql("share"),Zp="isShareOptionLocked",Jp=function(e,t,r){const n=r.value;r.value=function(){const e=this[jl];if(e){const{meeting:{meetingOptions:t}}=e.getState();if(!0===t[Zp])return Promise.reject({type:"OPERATION_LOCKED",reason:"".concat(Zp," is locked")})}for(var t=arguments.length,r=new Array(t),o=0;o{const{store:{getState:r,dispatch:n},rwgAgent:o}=e,i=r(),{speakerOnly:s}=t||{},a=Fs(i);if("computer"===(null==a?void 0:a.audio))return Promise.resolve();if("phone"===(null==a?void 0:a.audio))return Promise.reject({type:ns,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:t,canPlayAudio:r},media:{audioDecodeStatus:c,audioEncodeStatus:d}}=i;if(t)return Promise.reject({type:ns,reason:"Computer audio has been loading, please wait."});if(s&&n(fa(s)),a){n(_a(!0));const{userRole:t}=a,i=ks(t);ld("audio",i&&!e||s?"success":d,c).subscribe(e=>{let[t,i]=e;if(t&&i){let e=r?Promise.resolve():function(){const e=document.createElement("audio");return e.muted=!1,e.volume=.1,e.src=URL.createObjectURL(Ui),e.play()}();void 0===e&&(e=Promise.resolve()),e.then(()=>{o.joinOrLeaveVoip(!0)}).catch(()=>{n(pa(!1))})}})}return"failed"===d||"failed"===c?(n(_a(!1)),Promise.reject({type:"INTERNAL_ERROR",reason:"audio encode or decode error"})):new Promise((e,t)=>{nt(fs($i.JoinComputerAudio.success,1),Ze(...$i.JoinComputerAudio.fail.map(e=>fs(e,1).pipe(xe(()=>ce({type:"INSUFFICIENT_PRIVILEGES",reason:e}))))),st(3e4).pipe(xe(()=>ce({type:"OPERATION_TIMEOUT"})))).subscribe(()=>{n(_a(!1)),e("")},e=>{o.joinOrLeaveVoip(!1),n(_a(!1)),t(e)})})}})(this[Gl],e)}stopAudio(){return(e=>{const{store:{getState:t,dispatch:r},mediaAgent:n,rwgAgent:o}=e,i=t(),{audio:{isComputerAudioLoading:s}}=i,a=Fs(i);return s?Promise.reject({type:ns,reason:"Computer audio has not finished joining, please wait."}):"computer"===(null==a?void 0:a.audio)?(n.leaveComputerAudio(),o.joinOrLeaveVoip(!1),r(aa(0)),_s("AUDIO_CURRENT_USER_LEAVE_AUDIO")):Promise.resolve("")})(this[Gl])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=Fs(s);if(null==t||t===(null==a?void 0:a.userId))return""===(null==a?void 0:a.audio)||null===(null==a?void 0:a.audio)?Promise.reject({type:ns,reason:"no audio joined"}):!0===(null==a?void 0:a.muted)?Promise.resolve(""):(n(ra(!0)),o.mute(a.userId,!0),_s("AUDIO_CURRENT_USER_MUTED").then(()=>(i.muteAudio(),"")));if(Gs(s)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=s,n=e.concat(r).find(e=>e.userId===t);return n?""===n.audio||null===n?Promise.reject({type:ns,reason:"no audio joined"}):!1===n.muted?(o.mute(t,!0),_s("AUDIO_PARTICIPANT_AUDIO_UPDATE",e=>e.id===t&&1==e.muted)):Promise.resolve(""):Promise.reject({type:os,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[Gl],e)}unmuteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=Fs(s);if(void 0===t||t===(null==a?void 0:a.userId))return""===(null==a?void 0:a.audio)||null===(null==a?void 0:a.audio)?Promise.reject({type:ns,reason:"no audio joined"}):!1===(null==a?void 0:a.muted)?Promise.resolve(""):(n(ra(!0)),s.audio.bCanUnmute||null!=a&&a.isHost||null!=a&&a.bCoHost?(o.mute(a.userId,!1),_s("AUDIO_CURRENT_USER_UNMUTED").then(()=>(i.unmuteAudio(),""))):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host not allow unmute themselves"}));if(Gs(s)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=s,n=e.concat(r).find(e=>e.userId===t);return n?""===n.audio||null===n?Promise.reject({type:ns,reason:"no audio joined"}):(!0===n.muted&&o.mute(t,!1),Promise.resolve("")):Promise.reject({type:os,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[Gl],e)}switchMicrophone(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{microphoneDevicesList:i,activeMicrophone:s}}=r();return"default"!==t&&-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeMicrophone(t),n(ua(t))),Promise.resolve(""))})(this[Gl],e)}switchSpeaker(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,{audio:{speakerDevicesList:i,activeSpeaker:s}}=r();return"default"!==t&&-1==i.findIndex(e=>e.deviceId===t)?Promise.reject({type:"INVALID_DEVICE_ID"}):(t!==s&&(o.changeSpeaker(t),n(la(t))),Promise.resolve(""))})(this[Gl],e)}getMicList(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?[...r.audio.microphoneDevicesList]:[]})(this[Gl])}getSpeakerList(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?[...r.audio.speakerDevicesList]:[]})(this[Gl])}isAudioMuted(e){return((e,t)=>{let{store:{getState:r}}=e;const n=r(),{meeting:{isWebinar:o}}=n;let i=null;return void 0===t?i=Fs(n):(i=n.participants.attendeesList.find(e=>e.userId===t),o&&!i&&(i=n.participants.xmppAttendeeList.find(e=>e.userId===t))),!!i&&!!i.muted})(this[Gl],e)}getActiveMicrophone(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?r.audio.activeMicrophone:null})(this[Gl])}getActiveSpeaker(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?r.audio.activeSpeaker:null})(this[Gl])}startVideo(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{media:{videoDecodeStatus:s,videoEncodeStatus:a},video:{videoSsrc:c,activeCamera:d,isCaptureCameraLoading:u,isCurrentUserStartedVideo:l,isVideoMuted:p,isSupportHDVideo:h}}=i;return l?Promise.reject({type:ns,reason:"Video is started"}):u?Promise.reject({type:ns,reason:"Camera is starting,please wait."}):p&&!Gs(i)?Promise.reject({type:ns,reason:"Video is muted by the host"}):(Ip()||"function"!=typeof window.OffscreenCanvas)&&!/android/i.test(navigator.userAgent)||null!=t&&t.videoElement?(n(Wa(!0)),ld("video",a,s).subscribe(e=>{let[r]=e;if(r){const{cameraId:e=d,captureWidth:r=0,captureHeight:i=0,videoElement:s,mirrored:a,hd:u}=t||{};a&&o.mirrorVideo(a);let l=void 0;s&&(s.id?l=s.id:(l="__ZOOM_SDK_SELF_VIDEO_@__".replace("@","".concat(Math.floor(1e4*Math.random()))),s.id=l)),u&&(console.log("HD support is still in its Alpha stage, and comes with a number of restrictions and limitations. Please visit https://marketplace.zoom.us/docs/sdk/overview/720p for more details"),h&&Si.isCompatibleHardwareForEncode()?Si.isSupportVideoEncodeHardwareAcceleration().then(e=>{e?o.enableHardwareAccelerationForVideoEncode(!0):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")),o.startCaptureVideo(c,e,r,i,l),d!==e&&n(La(e))}else n(Wa(!1))}),hs(Yi).then(()=>{n(Ka(!1)),n(xa(!1))}).finally(()=>{n(Wa(!1))})):Promise.reject({type:os,reason:"You must pass a