>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(s_[r]+256+1)]++,e.dyn_dtree[2*f_(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){__(e,2,3),v_(e,256,n_),function(e){16===e.bi_valid?(m_(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},N_=function(e,t,r,n){for(var o=65535&e|0,i=e>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{i=i+(o=o+t[n++]|0)|0}while(--s);o%=65521,i%=65521}return o|i<<16|0},P_=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}(),M_=function(e,t,r,n){var o=P_,i=n+r;e^=-1;for(var s=n;s>>8^o[255&(e^t[s])];return-1^e},U_={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function L_(e,t){return e.msg=U_[t],t}function V_(e){return(e<<1)-(e>4?9:0)}function x_(e){for(var t=e.length;--t>=0;)e[t]=0}function B_(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(Qm.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function j_(e,t){k_._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,B_(e.strm)}function H_(e,t){e.pending_buf[e.pending++]=t}function F_(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function G_(e,t){var r,n,o=e.max_chain_length,i=e.strstart,s=e.prev_length,a=e.nice_match,c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,u=e.window,d=e.w_mask,l=e.prev,p=e.strstart+258,h=u[i+s-1],f=u[i+s];e.prev_length>=e.good_match&&(o>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(r=t)+s]===f&&u[r+s-1]===h&&u[r]===u[i]&&u[++r]===u[i+1]){i+=2,r++;do{}while(u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&is){if(e.match_start=t,s=n,n>=a)break;h=u[i+s-1],f=u[i+s]}}}while((t=l[t&d])>c&&0!=--o);return s<=e.lookahead?s:e.lookahead}function W_(e){var t,r,n,o,i,s,a,c,u,d,l=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=l+(l-262)){Qm.arraySet(e.window,e.window,l,l,0),e.match_start-=l,e.strstart-=l,e.block_start-=l,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=l?n-l:0}while(--r);t=r=l;do{n=e.prev[--t],e.prev[t]=n>=l?n-l:0}while(--r);o+=l}if(0===e.strm.avail_in)break;if(s=e.strm,a=e.window,c=e.strstart+e.lookahead,u=o,d=void 0,(d=s.avail_in)>u&&(d=u),r=0===d?0:(s.avail_in-=d,Qm.arraySet(a,s.input,s.next_in,d,c),1===s.state.wrap?s.adler=N_(s.adler,a,d,c):2===s.state.wrap&&(s.adler=M_(s.adler,a,d,c)),s.next_in+=d,s.total_in+=d,d),e.lookahead+=r,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(n=k_._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,n=k_._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<15&&(s=2,n-=16),o<1||o>9||8!==r||n<8||n>15||t<0||t>9||i<0||i>4)return L_(e,-2);8===n&&(n=9);var a=new J_;return e.state=a,a.strm=e,a.wrap=s,a.gzhead=null,a.w_bits=n,a.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(W_(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,j_(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(j_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(j_(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(j_(e,!1),e.strm.avail_out),1)})),new q_(4,4,8,4,K_),new q_(4,5,16,8,K_),new q_(4,6,32,32,K_),new q_(4,4,16,16,z_),new q_(8,16,32,32,z_),new q_(8,16,128,128,z_),new q_(8,32,128,256,z_),new q_(32,128,258,1024,z_),new q_(32,258,258,4096,z_)];var X_={deflateInit:function(e,t){return Q_(e,t,8,15,8,0)},deflateInit2:Q_,deflateReset:Y_,deflateResetKeep:Z_,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},deflate:function(e,t){var r,n,o,i;if(!e||!e.state||t>5||t<0)return e?L_(e,-2):-2;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||666===n.status&&4!==t)return L_(e,0===e.avail_out?-5:-2);if(n.strm=e,r=n.last_flush,n.last_flush=t,42===n.status)if(2===n.wrap)e.adler=0,H_(n,31),H_(n,139),H_(n,8),n.gzhead?(H_(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),H_(n,255&n.gzhead.time),H_(n,n.gzhead.time>>8&255),H_(n,n.gzhead.time>>16&255),H_(n,n.gzhead.time>>24&255),H_(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),H_(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(H_(n,255&n.gzhead.extra.length),H_(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=M_(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(H_(n,0),H_(n,0),H_(n,0),H_(n,0),H_(n,0),H_(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),H_(n,3),n.status=113);else{var s=8+(n.w_bits-8<<4)<<8;s|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(s|=32),s+=31-s%31,n.status=113,F_(n,s),0!==n.strstart&&(F_(n,e.adler>>>16),F_(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(e.adler=M_(e.adler,n.pending_buf,n.pending-o,o)),B_(e),o=n.pending,n.pending!==n.pending_buf_size));)H_(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=M_(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=M_(e.adler,n.pending_buf,n.pending-o,o)),B_(e),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindexo&&(e.adler=M_(e.adler,n.pending_buf,n.pending-o,o)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=M_(e.adler,n.pending_buf,n.pending-o,o)),B_(e),o=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindexo&&(e.adler=M_(e.adler,n.pending_buf,n.pending-o,o)),0===i&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&B_(e),n.pending+2<=n.pending_buf_size&&(H_(n,255&e.adler),H_(n,e.adler>>8&255),e.adler=0,n.status=113)):n.status=113),0!==n.pending){if(B_(e),0===e.avail_out)return n.last_flush=-1,0}else if(0===e.avail_in&&V_(t)<=V_(r)&&4!==t)return L_(e,-5);if(666===n.status&&0!==e.avail_in)return L_(e,-5);if(0!==e.avail_in||0!==n.lookahead||0!==t&&666!==n.status){var a=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(W_(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=k_._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(j_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(j_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(j_(e,!1),0===e.strm.avail_out)?1:2}(n,t):3===n.strategy?function(e,t){for(var r,n,o,i,s=e.window;;){if(e.lookahead<=258){if(W_(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[o=e.strstart-1])===s[++o]&&n===s[++o]&&n===s[++o]){i=e.strstart+258;do{}while(n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&n===s[++o]&&oe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=k_._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=k_._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(j_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(j_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(j_(e,!1),0===e.strm.avail_out)?1:2}(n,t):D_[n.level].func(n,t);if(3!==a&&4!==a||(n.status=666),1===a||3===a)return 0===e.avail_out&&(n.last_flush=-1),0;if(2===a&&(1===t?k_._tr_align(n):5!==t&&(k_._tr_stored_block(n,0,0,!1),3===t&&(x_(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),B_(e),0===e.avail_out))return n.last_flush=-1,0}return 4!==t?0:n.wrap<=0?1:(2===n.wrap?(H_(n,255&e.adler),H_(n,e.adler>>8&255),H_(n,e.adler>>16&255),H_(n,e.adler>>24&255),H_(n,255&e.total_in),H_(n,e.total_in>>8&255),H_(n,e.total_in>>16&255),H_(n,e.total_in>>24&255)):(F_(n,e.adler>>>16),F_(n,65535&e.adler)),B_(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},deflateEnd:function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?L_(e,-2):(e.state=null,113===t?L_(e,-3):0):-2},deflateSetDictionary:function(e,t){var r,n,o,i,s,a,c,u,d=t.length;if(!e||!e.state)return-2;if(2===(i=(r=e.state).wrap)||1===i&&42!==r.status||r.lookahead)return-2;for(1===i&&(e.adler=N_(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===i&&(x_(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new Qm.Buf8(r.w_size),Qm.arraySet(u,t,d-r.w_size,r.w_size,0),t=u,d=r.w_size),s=e.avail_in,a=e.next_in,c=e.input,e.avail_in=d,e.next_in=0,e.input=t,W_(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<=252?6:rv>=248?5:rv>=240?4:rv>=224?3:rv>=192?2:1;function nv(e,t){if(t<65534&&(e.subarray&&ev||!e.subarray&&$_))return String.fromCharCode.apply(null,Qm.shrinkBuf(e,t));for(var r="",n=0;n>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},iv=function(e){return nv(e,e.length)},sv=function(e,t){var r,n,o,i,s=t||e.length,a=new Array(2*s);for(n=0,r=0;r4)a[n++]=65533,r+=i-1;else{for(o&=2===i?31:3===i?15:7;i>1&&r1?a[n++]=65533:o<65536?a[n++]=o:(o-=65536,a[n++]=55296|o>>10&1023,a[n++]=56320|1023&o)}return nv(a,n)},av=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+tv[e[r]]>t?r:t},cv=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},uv=Object.prototype.toString;function dv(e){if(!(this instanceof dv))return new dv(e);this.options=Qm.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new cv,this.strm.avail_out=0;var r=X_.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(U_[r]);if(t.header&&X_.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n="string"==typeof t.dictionary?ov(t.dictionary):"[object ArrayBuffer]"===uv.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=X_.deflateSetDictionary(this.strm,n)))throw new Error(U_[r]);this._dict_set=!0}}function lv(e,t){var r=new dv(t);if(r.push(e,!0),r.err)throw r.msg||U_[r.err];return r.result}dv.prototype.push=function(e,t){var r,n,o=this.strm,i=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?4:0,"string"==typeof e?o.input=ov(e):"[object ArrayBuffer]"===uv.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new Qm.Buf8(i),o.next_out=0,o.avail_out=i),1!==(r=X_.deflate(o,n))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(iv(Qm.shrinkBuf(o.output,o.next_out))):this.onData(Qm.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==r);return 4===n?(r=X_.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==n||(this.onEnd(0),o.avail_out=0,!0)},dv.prototype.onData=function(e){this.chunks.push(e)},dv.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Qm.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var pv={Deflate:dv,deflate:lv,deflateRaw:function(e,t){return(t=t||{}).raw=!0,lv(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,lv(e,t)}},hv=function(e,t){var r,n,o,i,s,a,c,u,d,l,p,h,f,m,_,v,g,y,b,S,E,I,A,w,O;r=e.state,n=e.next_in,w=e.input,o=n+(e.avail_in-5),i=e.next_out,O=e.output,s=i-(t-e.avail_out),a=i+(e.avail_out-257),c=r.dmax,u=r.wsize,d=r.whave,l=r.wnext,p=r.window,h=r.hold,f=r.bits,m=r.lencode,_=r.distcode,v=(1<>>=b=y>>>24,f-=b,0==(b=y>>>16&255))O[i++]=65535&y;else{if(!(16&b)){if(0==(64&b)){y=m[(65535&y)+(h&(1<>>=b,f-=b),f<15&&(h+=w[n++]<>>=b=y>>>24,f-=b,!(16&(b=y>>>16&255))){if(0==(64&b)){y=_[(65535&y)+(h&(1<c){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=b,f-=b,E>(b=i-s)){if((b=E-b)>d&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(I=0,A=p,0===l){if(I+=u-b,b2;)O[i++]=A[I++],O[i++]=A[I++],O[i++]=A[I++],S-=3;S&&(O[i++]=A[I++],S>1&&(O[i++]=A[I++]))}else{I=i-E;do{O[i++]=O[I++],O[i++]=O[I++],O[i++]=O[I++],S-=3}while(S>2);S&&(O[i++]=O[I++],S>1&&(O[i++]=O[I++]))}break}}break}}while(n>3,h&=(1<<(f-=S<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n=1&&0===D[S];S--);if(E>S&&(E=S),0===S)return o[i++]=20971520,o[i++]=20971520,a.bits=1,0;for(b=1;b0&&(0===e||1!==S))return-1;for(k[1]=0,g=1;g<15;g++)k[g+1]=k[g]+D[g];for(y=0;y852||2===e&&O>592)return 1;for(;;){f=g-A,s[y]h?(m=N[P+s[y]],_=C[R+s[y]]):(m=96,_=0),c=1<>A)+(u-=c)]=f<<24|m<<16|_|0}while(0!==u);for(c=1<>=1;if(0!==c?(T&=c-1,T+=c):T=0,y++,0==--D[g]){if(g===S)break;g=t[r+s[y]]}if(g>E&&(T&l)!==d){for(0===A&&(A=E),p+=b,w=1<<(I=g-A);I+A852||2===e&&O>592)return 1;o[d=T&l]=E<<24|I<<16|p-i|0}}return 0!==T&&(o[p+T]=g-A<<24|64<<16|0),a.bits=E,0};function yv(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function bv(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Qm.Buf16(320),this.work=new Qm.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Sv(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Qm.Buf32(852),t.distcode=t.distdyn=new Qm.Buf32(592),t.sane=1,t.back=-1,0):-2}function Ev(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,Sv(e)):-2}function Iv(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Ev(e))):-2}function Av(e,t){var r,n;return e?(n=new bv,e.state=n,n.window=null,0!==(r=Iv(e,t))&&(e.state=null),r):-2}var wv,Ov,Tv=!0;function Cv(e){if(Tv){var t;for(wv=new Qm.Buf32(512),Ov=new Qm.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(gv(1,e.lens,0,288,wv,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;gv(2,e.lens,0,32,Ov,0,e.work,{bits:5}),Tv=!1}e.lencode=wv,e.lenbits=9,e.distcode=Ov,e.distbits=5}function Rv(e,t,r,n){var o,i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(Qm.arraySet(i.window,t,r-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((o=i.wsize-i.wnext)>n&&(o=n),Qm.arraySet(i.window,t,r-n,o,i.wnext),(n-=o)?(Qm.arraySet(i.window,t,r-n,n,0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave>>8&255,r.check=M_(r.check,T,2,0),u=0,d=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(d-=4,E=8+(15&(u>>>=4)),0===r.wbits)r.wbits=E;else if(E>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(T[0]=255&u,T[1]=u>>>8&255,r.check=M_(r.check,T,2,0)),u=0,d=0,r.mode=3;case 3:for(;d<32;){if(0===a)break e;a--,u+=n[i++]<>>8&255,T[2]=u>>>16&255,T[3]=u>>>24&255,r.check=M_(r.check,T,4,0)),u=0,d=0,r.mode=4;case 4:for(;d<16;){if(0===a)break e;a--,u+=n[i++]<>8),512&r.flags&&(T[0]=255&u,T[1]=u>>>8&255,r.check=M_(r.check,T,2,0)),u=0,d=0,r.mode=5;case 5:if(1024&r.flags){for(;d<16;){if(0===a)break e;a--,u+=n[i++]<>>8&255,r.check=M_(r.check,T,2,0)),u=0,d=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((h=r.length)>a&&(h=a),h&&(r.head&&(E=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Qm.arraySet(r.head.extra,n,i,h,E)),512&r.flags&&(r.check=M_(r.check,n,h,i)),a-=h,i+=h,r.length-=h),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===a)break e;h=0;do{E=n[i+h++],r.head&&E&&r.length<65536&&(r.head.name+=String.fromCharCode(E))}while(E&&h>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;d<32;){if(0===a)break e;a--,u+=n[i++]<>>=7&d,d-=7&d,r.mode=27;break}for(;d<3;){if(0===a)break e;a--,u+=n[i++]<>>=1)){case 0:r.mode=14;break;case 1:if(Cv(r),r.mode=20,6===t){u>>>=2,d-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}u>>>=2,d-=2;break;case 14:for(u>>>=7&d,d-=7&d;d<32;){if(0===a)break e;a--,u+=n[i++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,u=0,d=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(h=r.length){if(h>a&&(h=a),h>c&&(h=c),0===h)break e;Qm.arraySet(o,n,i,h,s),a-=h,i+=h,c-=h,s+=h,r.length-=h;break}r.mode=12;break;case 17:for(;d<14;){if(0===a)break e;a--,u+=n[i++]<>>=5,d-=5,r.ndist=1+(31&u),u>>>=5,d-=5,r.ncode=4+(15&u),u>>>=4,d-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,d-=3}for(;r.have<19;)r.lens[C[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},I=gv(0,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,I){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,g=65535&O,!((_=O>>>24)<=d);){if(0===a)break e;a--,u+=n[i++]<>>=_,d-=_,r.lens[r.have++]=g;else{if(16===g){for(w=_+2;d>>=_,d-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}E=r.lens[r.have-1],h=3+(3&u),u>>>=2,d-=2}else if(17===g){for(w=_+3;d>>=_)),u>>>=3,d-=3}else{for(w=_+7;d>>=_)),u>>>=7,d-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;h--;)r.lens[r.have++]=E}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,A={bits:r.lenbits},I=gv(1,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,I){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},I=gv(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,I){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(a>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=i,e.avail_in=a,r.hold=u,r.bits=d,hv(e,p),s=e.next_out,o=e.output,c=e.avail_out,i=e.next_in,n=e.input,a=e.avail_in,u=r.hold,d=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;v=(O=r.lencode[u&(1<>>16&255,g=65535&O,!((_=O>>>24)<=d);){if(0===a)break e;a--,u+=n[i++]<>y)])>>>16&255,g=65535&O,!(y+(_=O>>>24)<=d);){if(0===a)break e;a--,u+=n[i++]<>>=y,d-=y,r.back+=y}if(u>>>=_,d-=_,r.back+=_,r.length=g,0===v){r.mode=26;break}if(32&v){r.back=-1,r.mode=12;break}if(64&v){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&v,r.mode=22;case 22:if(r.extra){for(w=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;v=(O=r.distcode[u&(1<>>16&255,g=65535&O,!((_=O>>>24)<=d);){if(0===a)break e;a--,u+=n[i++]<>y)])>>>16&255,g=65535&O,!(y+(_=O>>>24)<=d);){if(0===a)break e;a--,u+=n[i++]<>>=y,d-=y,r.back+=y}if(u>>>=_,d-=_,r.back+=_,64&v){e.msg="invalid distance code",r.mode=30;break}r.offset=g,r.extra=15&v,r.mode=24;case 24:if(r.extra){for(w=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===c)break e;if(h=p-c,r.offset>h){if((h=r.offset-h)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}h>r.wnext?(h-=r.wnext,f=r.wsize-h):f=r.wnext-h,h>r.length&&(h=r.length),m=r.window}else m=o,f=s-r.offset,h=r.length;h>c&&(h=c),c-=h,r.length-=h;do{o[s++]=m[f++]}while(--h);0===r.length&&(r.mode=21);break;case 26:if(0===c)break e;o[s++]=r.length,c--,r.mode=21;break;case 27:if(r.wrap){for(;d<32;){if(0===a)break e;a--,u|=n[i++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new cv,this.strm.avail_out=0;var r=Dv.inflateInit2(this.strm,t.windowBits);if(r!==kv.Z_OK)throw new Error(U_[r]);if(this.header=new Nv,Dv.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=ov(t.dictionary):"[object ArrayBuffer]"===Pv.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Dv.inflateSetDictionary(this.strm,t.dictionary))!==kv.Z_OK))throw new Error(U_[r])}function Uv(e,t){var r=new Mv(t);if(r.push(e,!0),r.err)throw r.msg||U_[r.err];return r.result}Mv.prototype.push=function(e,t){var r,n,o,i,s,a=this.strm,c=this.options.chunkSize,u=this.options.dictionary,d=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?kv.Z_FINISH:kv.Z_NO_FLUSH,"string"==typeof e?a.input=function(e){for(var t=new Qm.Buf8(e.length),r=0,n=t.length;r0||0===a.avail_out)&&r!==kv.Z_STREAM_END);return r===kv.Z_STREAM_END&&(n=kv.Z_FINISH),n===kv.Z_FINISH?(r=Dv.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===kv.Z_OK):n!==kv.Z_SYNC_FLUSH||(this.onEnd(kv.Z_OK),a.avail_out=0,!0)},Mv.prototype.onData=function(e){this.chunks.push(e)},Mv.prototype.onEnd=function(e){e===kv.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Qm.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Lv={Inflate:Mv,inflate:Uv,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Uv(e,t)},ungzip:Uv},Vv={};(0,Qm.assign)(Vv,pv,Lv,kv);var xv=Vv;const{WebclientBreakoutRoomAttendeeStatus:Bv,WebclientBreakoutRoomCommand:jv}=Ri;function Hv(e,t){let r=0;for(;r1&&void 0!==arguments[1]&&arguments[1];const r=t?Da.InRoom:Da.Invited;return ui.set(Bv,JSON.stringify({status:r,boId:e.boId}),ai.SessionStorage),Qu({status:r,boId:e.boId,name:e.name,boStatus:e.boStatus})}function qv(e){const{breakoutRoom:{isUserRoleUpdated:t,currentRoom:{boConfId:r}}}=e.value,n=Pa(e.value);return n&&(!r||r&&t)?ce(n.isHost):(r?sa("BREAKOUT_ROOM_CURRENT_USER_PARTICIPANT_ROLE",1):sa("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",2).pipe((1,function(e){return e.lift(new wt(1))}))).pipe(pe(Ie),Xt(e),De(e=>{let[,t]=e;return Pa(t).isHost}))}function Jv(e){return Ye({boIdList:sa("BREAKOUT_ROOM_ADD_TOKEN").pipe(Dt((e,t)=>[...e,t],[]),Et(e))}).pipe(Qt(1e4))}const Zv=zi.createAgent();var Yv=Object.freeze({__proto__:null,addRoomEpic:e=>xn(e,4174).pipe(zt(e=>{na("BREAKOUT_ROOM_ADD_TOKEN",e.payload.body.bid)}),Pt(te)),handleBoAttributeIndicationEpic:(e,t)=>Fn(e,7950).pipe(Xt(t),jt(e=>{let[r,n]=e;const{payload:{body:{proto:o}}}=r,{breakoutRoom:{isHugeBO:i,currentRoom:{status:s,boId:a}},meeting:{userGUID:c}}=n;let u=o;var d;i&&(d=o,u=xv.ungzip(po(d),{to:"string"}));const l=JSON.parse(uo(u)),p=[];let h;const{ControlStatus:f,NameIndex:m,IsAutoJoinEnabled:_,IsBackToMainSessionEnabled:v,IsTimerEnabled:g,TimerDuration:y,IsTimerAutoEndEnabled:b,WaitSeconds:S,StartTimeOnMMR:E,ItemList:I}=l,A={isAutoJoinRoom:_,isBackToMainSessionEnabled:v,isTimerEnabled:g,timerDuration:y,isTimerAutoEnabled:b,waitSeconds:S};p.push(Ju(A)),p.push(qu(E)),p.push(Ku(m)),p.push(Zu(f));const w=I&&I.map(e=>({boId:e.BID,name:e.MeetingTitle,boStatus:e.Status,hostId:e.HostID,attendeeGuidList:e.ParticipantList||[]}))||[];switch(p.push(Yu(w)),na("BREAKOUT_ROOM_ATTRIBUTE_INDICATION",{controlStatus:f,roomList:w}),f){case Ca.InProgress:if(s!==Da.InRoom&&s!==Da.Joining){const e=function(e,t){const{meeting:{isHost:r,userGUID:n}}=t,o=ui.get(Bv),i=[];if(o){const{status:t,boId:s}=JSON.parse(o);if(t===Da.Invited)if(r)Fv();else{const t=Hv(e,n);t&&(i.push(zv(t)),na("BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",{roomId:t.boId,name:t.name}))}else if(t===Da.InRoom){let t=void 0;t=r?e.find(e=>e.boId===s):Hv(e,n),t&&(i.push(zv(t)),zi.createAgent().joinBO(t.boId)),Fv()}}return i}(w,n);if(0===e.length){const e=Hv(w,c);e&&p.push(zv(e))}else p.push(...e)}else if(s===Da.InRoom&&r.type==="".concat(fn)){const e=Hv(w,c);e&&qv(t).subscribe(t=>{a===e.boId||t||Zv.joinBO(e.boId)})}A.isTimerEnabled&&A.timerDuration>0&&(h=function(e,t,r){return qv(e).pipe(Xt(e),jt(n=>{let[o,i]=n;const{breakoutRoom:{currentRoom:{status:s},meetingElapsedTime:a},meeting:{joinMeetingTimeStamp:c}}=i,u=c-1e3*a+1e3*r+1e3*t;if(performance.now()Math.floor((u-performance.now())/1e3)),Xt(e),Gt(e=>{let[t,r]=e;const{breakoutRoom:{controlStatus:n,currentRoom:{status:o}},socket:{zoomSocketStatus:i},meeting:{isHost:s}}=r;return t>=0&&s&&n===Ca.InProgress&&(o===Da.InRoom||o===Da.MainSession||o===Da.Initial)&&i===Fa.Connected}),zt(e=>{let[t]=e;na("BREAKOUT_ROOM_ROOM_COUTDOWN",{countdown:t})}),it(e=>{let[t]=e;return 0===t}),zt(e=>{let[,t]=e;const{breakoutRoom:{options:r}}=t;r.isTimerAutoEnabled?zi.createAgent().stopBO(Ca.Closing):na("BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP")}),Pt(te));if(s===Da.InRoom)return tt(1e3).pipe(De(()=>Math.floor((u-performance.now())/1e3)),Xt(e),Gt(e=>{let[t,r]=e;const{breakoutRoom:{currentRoom:{status:n}},meeting:{isHost:o},socket:{zoomSocketStatus:i}}=r;return t>=0&&n===Da.InRoom&&!o&&i===Fa.Connected}),zt(e=>{let[t]=e;na("BREAKOUT_ROOM_ROOM_COUTDOWN",{countdown:t})}),Pt(te))}return te}))}(t,A.timerDuration,E));break;case Ca.Closing:h=qv(t).pipe(it(e=>e),We(()=>{const e=[],{breakoutRoom:{closingRoomTime:r,currentRoom:{status:o}},participants:{attendeesList:i}}=n;let s=A.waitSeconds;if(0!==r&&A.waitSeconds>0){const e=Math.floor((performance.now()-r)/1e3);s=Math.max(A.waitSeconds-e,0)}if(0===s)return Zv.stopBO(Ca.Closed),te;{if(o!==Da.InRoom&&i.length>1&&i.every(e=>!e.bid))return Zv.stopBO(Ca.Closed),te;r||e.push(rd(performance.now()));const n=performance.now()+1e3*s;return nt(je(e),tt(1e3).pipe(De(()=>Math.floor((n-performance.now())/1e3)),Xt(t),Gt(e=>{let[t,r]=e;const{breakoutRoom:{controlStatus:n},meeting:{isHost:o},socket:{zoomSocketStatus:i}}=r;return t>=0&&n===Ca.Closing&&i===Fa.Connected&&o}),zt(e=>{let[t]=e;t>=0&&na("BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",{countdown:t})}),it(e=>{let[t]=e;return 0===t}),zt(()=>{Zv.stopBO(Ca.Closed)}),Pt(te)))}}));break;case Ca.Closed:p.push(rd(0)),s===Da.Leaving?p.push(Xu(Da.MainSession)):s===Da.Invited?p.push(Xu(Da.Initial)):s!==Da.InRoom&&s!==Da.Joining||p.push(...Gv()),Fv()}return h?nt(je(p),h):je(p)})),handleBoJoinResponseEpic:(e,t)=>Fn(e,4194).pipe(Xt(t),jt(e=>{let[t,r]=e;const{payload:{body:{bid:n,botoken:o,confID:i}}}=t,{meeting:{isHost:s},breakoutRoom:{rooms:a,currentRoom:{status:c}}}=r,u=[],d=a.find(e=>e.boId===n);return d&&(u.push(zv(d,s)),u.push($u(i)),u.push(ed(o)),s||c!==Da.InRoom?u.push(...Wv(d.name,c)):u.push(...Kv(d.name))),na("BREAKOUT_ROOM_JOIN_BO_RESPONSE",{boId:n}),je(u)})),handleBoCommandIndicationEpic:(e,t)=>e.pipe(or("".concat(an),"".concat(fn)),it(e=>7949===e.payload.evt),Xt(t),We(e=>{let[r,n]=e;const{payload:{body:o}}=r,{meeting:{userGUID:i},breakoutRoom:{rooms:s,options:{isAutoJoinRoom:a},currentRoom:{status:c}}}=n,{commandType:u}=o,d=[];let l;switch(u){case ka.Join:{const{targetBID:e,botoken:t,confID:r}=o,n=Hv(s,i);n&&n.boId===e&&(d.push($u(r)),d.push(ed(t)),a?d.push(...Wv(n.name)):(ui.set(Ri.WebclientBreakoutRoomCommand,u,ai.SessionStorage),na("BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",{roomId:e,name:n.name})));break}case ka.Switch:{const{targetBID:e,botoken:t,confID:r}=o,n=Hv(s,i);n&&n.boId===e&&(d.push(Qu({boId:n.boId,boToken:t,boConfId:r,name:n.name})),c===Da.Invited?(ui.set(Ri.WebclientBreakoutRoomCommand,u,ai.SessionStorage),a?d.push(...Wv(n.name)):na("BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",{roomId:e,name:n.name})):d.push(...Kv(n.name)));break}case ka.Leave:{const{waitTime:e}=o;if((p=c)!==Da.InRoom&&p!==Da.Joining&&p!==Da.Leaving)d.push(Qu({boId:"",boToken:"",boConfId:"",status:Da.Initial}));else{const r=Number(e);if(r>0){const e=performance.now()+1e3*r;l=tt(1e3).pipe(De(()=>Math.floor((e-performance.now())/1e3)),Xt(t),Gt(e=>{let[t,r]=e;const{breakoutRoom:{controlStatus:n,currentRoom:{status:o}},meeting:{isHost:i},socket:{zoomSocketStatus:s}}=r;return t>=0&&s===Fa.Connected&&n===Ca.Closing&&o===Da.InRoom&&!i}),zt(e=>{let[t]=e;t>=0&&na("BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",{countdown:t})}),Pt(te))}else d.push(...Gv());Fv()}break}case ka.Broadcast:{const{textContent:e}=o;if(e){const{meeting:{encType:t},participants:{attendeesList:r},breakoutRoom:{mainSessionAttendeeList:o}}=n;let i="";if(t===Ti.AES_GCM){const e=r.concat(o).find(e=>Ia(e.userRole));e&&(i=e.zoomID)}l=je(Mi.beginDecrypt({decryptedText:e,type:Ci.BO_BROADCAST,zoomId:i}).then(e=>{let{message:t}=e;return na("BREAKOUT_ROOM_BROADCAST_MESSAGE",{message:t}),nd(t)}))}break}case ka.HelpReq:{const{requestID:e}=o,{breakoutRoom:{mainSessionAttendeeList:t,rooms:r,currentRoom:{boId:i},hostReplyToQuestionerType:s,hostReplyToRequestId:a},participants:{attendeesList:u}}=n;if(e){if(c===Da.InRoom){const r=t.find(t=>t.userId===e);if(r&&r.bid===i){Zv.askForHelpResultBO(e,Na.AlreadyInRoom);break}}if(s===Na.Received&&a!==e)Zv.askForHelpResultBO(e,Na.Busy);else{Zv.askForHelpResultBO(e,Na.Received),d.push(od(Na.Received),id(e));const n=(c===Da.InRoom?t:u).find(t=>t.userId===e);if(n){const t=n.bid,o=r.find(e=>e.boId===t);o&&na("BREAKOUT_ROOM_ASK_HELP_REQUEST",{userId:e,displayName:n.displayName,roomName:o.name,roomId:o.boId})}}}break}case ka.HelpRes:{const{helpResult:e}=o;na("BREAKOUT_ROOM_ASK_HELP_RESPONSE",{result:Number(e)});break}}var p;return l?nt(je(d),l):je(d)})),handleMainSessionJoinResponseEpic:(e,t)=>jn(e,4098).pipe(Xt(t),jt(e=>{let[t,r]=e;const{payload:{body:{res:n,elapsed:o}}}=t,i=[];return n===zn.CONF_FAIL_MEETING_HAS_CLOSED||n===zn.CONF_FAIL_HAS_BEEN_REMOVED?(Fv(),i.push(...ld(r,!1))):n===zn.CONF_SUCCESS&&(i.push(zu(o)),i.push(Xu(Da.InRoom)),ui.set(Ri.WebclientBreakoutRoomAttendeeStatus,JSON.stringify({status:Da.InRoom,boId:r.breakoutRoom.currentRoom.boId}),ai.SessionStorage)),je(i)})),handleMainSessionRosterUpdateResponse:(e,t)=>jn(e,Li).pipe(De(e=>Qp(e.payload.body)),Xt(t),We(e=>{let[t,r]=e;const n=[sd(t)],o=["userRole","bCoHost","bCCEditor","bHold"],{participants:{attendeesList:i},breakoutRoom:{mainSessionAttendeeList:s,isUserRoleUpdated:a},meeting:{userId:u}}=r;let d=[];return["add","update"].forEach(e=>t[e]&&d.push(...t[e])),d=d.filter(e=>o.some(t=>void 0!==e[t])).map(e=>{const t=s.find(t=>t.userId===e.userId);if(t){const r=i.find(e=>e.zoomID===t.zoomID);if(r)return void 0===e.userRole||a||r.userId!==u||(n.push(ud(!0)),na("BREAKOUT_ROOM_CURRENT_USER_PARTICIPANT_ROLE",e)),void 0!==e.bCCEditor&&n.push(Tu({editorId:r.userId,isEditor:!!e.bCCEditor,editorZoomId:r.zoomID})),delete e.bRaiseHand,c(c({},e),{},{userId:r.userId})}return null}).filter(e=>!!e),d.length>0&&(na("UPDATE_USER_PARTICIPANT_ATTRIBUTE",d),n.push(ca({update:d}))),na("BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE"),je(n)})),handleMainSessionMeetingAttributeEpic:e=>jn(e,Vi).pipe(it(e=>{const{payload:{body:t}}=e;return void 0!==(null==t?void 0:t.bAllowAttendeeRename)||void 0!==(null==t?void 0:t.chatPriviledge)||void 0!==(null==t?void 0:t.lockShare)}),De(e=>{const{payload:{body:t}}=e;return void 0!==t.bAllowAttendeeRename?No(e.payload.body):void 0!==t.chatPriviledge?Su(t.chatPriviledge):void 0!==t.lockShare?yc(t.lockShare):void 0})),handleClosingRoomAttendeeUpdateEpic:(e,t)=>xn(e,Li).pipe(Xt(t),it(e=>{let[,t]=e;const{meeting:{isHost:r},breakoutRoom:{controlStatus:n,currentRoom:{status:o}}}=t;return r&&n===Ca.Closing&&o!==Da.InRoom}),pe(Ie),zt(()=>{const{participants:{attendeesList:e}}=t.value;e.every(e=>!e.bid)&&e.length>1&&Zv.stopBO(Ca.Closed)}),Pt(te)),handlePreAssignedRoomRespEpic:(e,t)=>xn(e,4214).pipe(Xt(t),jt(e=>{let[r,n]=e;const{payload:{body:{proto:o}}}=r,{breakoutRoom:{rooms:i,isHugeBO:s}}=n;try{const e=JSON.parse(uo(o)),r=[];if(e&&e.PreAssignBoList&&Array.isArray(e.PreAssignBoList)){const n=e.PreAssignBoList.map(e=>({name:e.BoName,emails:e.email}));r.push(cd(n));const o=s?100:50;if(i.length+n.lengthe.name);return Zv.batchCreateBOToken(e),nt(je(r),Jv(e.length).pipe(Xt(t),We(e=>{let[{boIdList:t},r]=e;const o=xa(r),i=n.map((e,r)=>{const{emails:n,name:i}=e;let s=[];return n&&Array.isArray(n)&&(s=n.map(e=>o.filter(t=>t.userEmail===e).map(e=>e.userGUID)).reduce((e,t)=>[...e,...t],[])),{boId:t[r],name:i,attendeeGuidList:s}}),s=i.map((e,t)=>({roomId:e.boId,name:e.name,emails:n[t].emails}));return na("BREAKOUT_ROOM_LOAD_PRE_ASSIGNED_ROOMS",{rooms:s}),je([Yu(i),cd(s)])})))}return je(r)}}catch(e){console.error("pre assign proto is not valid")}return te})),handlePreAssignedUserJoinMeetingEpic:(e,t)=>Fn(e,Li).pipe(Xt(t),it(e=>{let[t,r]=e;const{meeting:{isHost:n,meetingStatus:o,meetingOptions:i},breakoutRoom:{controlStatus:s}}=r,{payload:{body:a}}=t;return o===ii.Joined&&(null==i?void 0:i.isAllowBreakoutRoomPreAssign)&&n&&(s===Ca.NotStarted||s===Ca.InProgress)&&Array.isArray(a.add)}),We(e=>{let[t,r]=e;const{breakoutRoom:{controlStatus:n,rooms:o,preAssignedRooms:i,currentRoom:{status:s}},participants:{failoverAttendeesList:a}}=r,c=null==i?void 0:i.filter(e=>o.findIndex(t=>t.boId===e.roomId)>-1),{payload:{body:{add:u}}}=t,d=[];return c.length>0&&u.filter(e=>e.userEmail&&e.userGUID).filter(e=>-1===a.findIndex(t=>t.zoomID===e.zoomID)).forEach(e=>{if(!Hv(o,e.userGUID))for(let r=0;r<(null==c?void 0:c.length);r++){const i=c[r];if(i.emails.includes(e.userEmail)){if(n===Ca.NotStarted){const t=Ol(o,t=>{const r=t.find(e=>e.boId===i.roomId);null==r||r.attendeeGuidList.push(e.userGUID)});d.push(Yu(t))}else n===Ca.InProgress&&(s===Da.InRoom&&t.type==="".concat(fn)?Zv.assignToBO(e.id,String(i.roomId)):s!==Da.Initial&&s!==Da.MainSession||Zv.assignToBO(e.id,String(i.roomId)));break}}}),je(d)}))});const Qv=zi.createAgent();var Xv=Object.freeze({__proto__:null,handleMainSessionReceivingSharingEpic:(e,t)=>jn(e,Li).pipe(it(e=>{var t;const{payload:{body:r}}=e;return null==r||null===(t=r.update)||void 0===t?void 0:t.some(e=>void 0!==e.bShareToBORooms||void 0!==e.bShareOn)}),Xt(t),De(e=>{let[t,r]=e;const{payload:{body:{update:n}}}=t,{breakoutRoom:{mainSessionAttendeeList:o}}=r,i=n.filter(e=>e.bShareOn&&e.bShareToBORooms),s=n.filter(e=>!e.bShareOn||!e.bShareToBORooms),a=o.filter(e=>e.sharerOn&&e.bShareToBORooms);return i.length>0&&i.forEach(e=>{-1===a.findIndex(t=>t.userId===e.id)&&na("SHARE_NEW_USER_ADD",c(c({},e),{},{isFromMainSession:!0}))}),s.length>0&&s.forEach(e=>{na("SHARE_USER_REMOVE",c(c({},e),{},{isFromMainSession:!0}))}),n.map(e=>{if(e.bShareOn&&e.bShareToBORooms){if(0===o.filter(t=>t.sharerOn&&t.bShareToBORooms&&t.userId!==e.id).length)return{activeNodeID:e.id,bStatus:1,ssrc:e.shareSsrc};{const t=o.find(t=>t.userId===e.id);if(null!=t&&t.isHost)return{activeNodeID:e.id,bStatus:1,ssrc:e.shareSsrc}}}else if(!e.bShareOn||!e.bShareToBORooms){const t=o.filter(e=>e.bShareToBORooms&&e.sharerOn);if(1===t.length&&t[0].userId===e.id)return{activeNodeID:e.id,bStatus:0,ssrc:0};{const r=t.filter(t=>t.userId!==e.id),n=r.find(e=>e.isHost);if(n)return{activeNodeID:n.userId,bStatus:1,ssrc:n.shareSsrc};{const e=r[0];if(e)return{activeNodeID:e.userId,bStatus:1,ssrc:e.shareSsrc}}}}}).filter(Boolean)}),We(e=>{const{share:{status:r},meeting:{userId:n}}=t.value,o=rs.getInstance(),i=[];return e.map(e=>{const{activeNodeID:s,bStatus:a,ssrc:c}=e,u=1===a;i.push(Mc(u)),u&&r!==As.End&&(Qv.stopSharing(n),o.stopDesktopSharing(),i.push(wc(As.End)),na("SHARE_PASSIVE_BO_STOP"));let d={activeNodeID:s,bStatus:a,ssrc:c,fromMainSession:!0};if(!u){const{participants:{attendeesList:e}}=t.value,r=e.filter(e=>e.sharerOn);if(r.length>0){const e=r[0];d={activeNodeID:e.userId,bStatus:1,ssrc:e.shareSsrc||0}}}i.push(an({evt:20225,body:d}))}),je(i)})),handleMainSessionCreateMSChannelEpic:(e,t)=>jn(e,4098).pipe(jt(r=>{const{payload:{body:{userID:n,confID:o}}}=r;return jn(e,Ui).pipe(Et(1),zt(e=>{const{payload:{body:{encryptKey:r,additionalType:i}}}=e,{media:{sharingDecodeStatus:s},meeting:{svcUrl:a,meetingNumber:c,conId:u,zoomId:d,meetingId:l}}=t.value;Id("sharing","success",s).subscribe(e=>{let[,s]=e;const p=rs.getInstance();if(s){const e="wss://".concat(a,"/wc/media/").concat(c,"?type=ms&cid=").concat(u,"&mode=1");p.createMSChannel(e),p.updateMediaParams({iVType:Oi.SHARING_DECODE,isFromMainSession:!0,updateParams:{userId:n,sn:po(d),confId:o,encryptType:i,encryptKey:po(r),meetingId:l,meetingNumber:c}});const{breakoutRoom:{mainSessionAttendeeList:s}}=t.value;if((null==s?void 0:s.length)>0){const e=s.map(e=>({userid:e.userId,sn:e.zoomID&&po(e.zoomID)}));p.updateUserMediaSN({added:e,isFromMainSession:!0,iVType:Oi.SHARING_DECODE})}}})}),Pt(te))}))});const $v=ga([e=>{let{breakoutRoom:{controlStatus:t}}=e;return t},e=>{let{breakoutRoom:{currentRoom:{status:t}}}=e;return t},e=>{let{breakoutRoom:{currentRoom:{boId:t}}}=e;return t}],(e,t,r)=>!(e!==Ca.InProgress&&e!==Ca.Closing||t!==Da.InRoom&&t!==Da.TimeUp||!r)),eg=ga([e=>{let{breakoutRoom:{rooms:t}}=e;return t},ya,e=>{let{meeting:{zoomId:t}}=e;return t},e=>{let{breakoutRoom:{mainSessionAttendeeList:t}}=e;return t},$v,e=>{let{breakoutRoom:{isHugeBO:t}}=e;return t}],(e,t,r,n,o,i)=>{const s=e.reduce((e,t)=>{const{attendeeGuidList:r}=t;return e.concat(r)},[]);return(o?n:t).filter(e=>{return!(e.bHold||e.isHost||e.zoomID===r||e.bid||s.includes(e.userGUID)||i&&(t=e.caps,4!=(4&t)));var t})});var tg;const rg=zi.createAgent();let ng=(l((tg=class extends df{createRooms(e,t){const r=this[$h](),n=this[ef],{breakoutRoom:{isHugeBO:o,sequenceId:i,rooms:s,controlStatus:a,isEnableBreakoutRoom:u}}=r;if(!u)return Promise.reject({type:Js,reason:"Breakout room feature is not enabled."});if(a===Ca.InProgress||a===Ca.Closing)return Promise.resolve({type:Js,reason:"breakout room has started!"});let d;d="string"==typeof e?[e]:"number"==typeof e?Array.from({length:e}).map((e,t)=>"".concat("Subsession"," ").concat(t+i)):e;const l=o?100:50;return d.length<1||s.length+d.length>l?Promise.reject({type:Zs,reason:"exceed maximum size"}):(rg.batchCreateBOToken(d),new Promise((e,o)=>{Jv(d.length).subscribe(o=>{let{boIdList:s}=o,a=s.map((e,t)=>({boId:e,name:d[t]}));if(t===Ta.Automatically){const e=eg(r),t=a.length,n=e.length;a=a.map((r,o)=>{const i=[];let s=o;for(;s{let{boId:t,name:r,attendeeList:n}=e;return{boId:t,name:r,attendeeGuidList:n&&n.map(e=>e.userGUID)}});if(n(Gu(u)),n(Wu(t)),n(Ku(i+a.length)),t===Ta.Automatically){const t=a.map(e=>({roomId:e.boId,name:e.name,attendeeList:e.attendeeList.map(e=>({userId:e.userId,avatar:e.avatar,displayName:e.displayName}))}));e(t)}else e(a.map(e=>({roomId:e.boId,name:e.name,attendeeList:[]})))},()=>{o({type:"INTERNAL_ERROR"})})}))}openRooms(e,t){const r=this[$h](),n={isAutoJoinRoom:!1,isBackToMainSessionEnabled:!0,isTimerEnabled:!1,timerDuration:1800,isTimerAutoEnabled:!1,waitSeconds:60},{breakoutRoom:{controlStatus:o,rooms:i,sequenceId:s,isHugeBO:a}}=r;if(o===Ca.InProgress||o===Ca.Closing)return Promise.resolve({type:Js,reason:"breakout room has started!"});if(e.some(e=>-1===i.findIndex(t=>t.boId===e.roomId)))return Promise.reject({type:Zs,reason:"roomId is wrong"});const u=xa(r);if(e.reduce((e,t)=>e.concat(t.attendeeList),[]).some(e=>-1===u.findIndex(t=>t.userId===e.userId)))return Promise.reject({type:Zs,reason:"bad user"});const d=e.map(e=>{const{attendeeList:t}=e,r=t.map(e=>{const t=u.find(t=>t.userId===e.userId);return null==t?void 0:t.userGUID});return{BID:e.roomId,MeetingTitle:e.name,MeetingToken:void 0,Status:Ra.Started,HostID:"",ParticipantList:r}}),l=t?c(c({},n),t):n,p={ControlStatus:Ca.InProgress,NameIndex:s,IsAutoJoinEnabled:+l.isAutoJoinRoom,IsBackToMainSessionEnabled:+l.isBackToMainSessionEnabled,IsTimerEnabled:+l.isTimerEnabled,TimerDuration:l.timerDuration,IsTimerAutoEndEnabled:+l.isTimerAutoEnabled,WaitSeconds:l.waitSeconds<0?0:l.waitSeconds,StartTimeOnMMR:void 0,ItemList:d};let h=(f=JSON.stringify(p),ao.Base64.encode(f,!1));var f,m;return a&&(m=h,h=Base64.fromUint8Array(xv.gzip(m))),rg.startBO(h),ia("BREAKOUT_ROOM_ATTRIBUTE_INDICATION",e=>e.controlStatus===Ca.InProgress)}joinRoom(e){const t=this[$h](),r=Pa(t),{breakoutRoom:{controlStatus:n,rooms:o,mainSessionAttendeeList:i,currentRoom:{status:s,boId:a}},meeting:{userGUID:c}}=t;if(n!==Ca.InProgress)return Promise.reject({type:"IMPROPER_MEETING_STATE",reason:"breakout room is not started"});if(null!=r&&r.isHost){const t=o.find(t=>t.boId===e);if(!t)return Promise.reject({type:Zs,reason:"room id is not correct"});rg.joinBO(t.boId)}else if(null!=r&&r.bCoHost&&s===Da.InRoom){if(!o.find(t=>t.boId===e))return Promise.reject({type:Zs,reason:"room id is not correct"});{const t=i.find(e=>e.isHost);t&&rg.wantJoinBO(null==t?void 0:t.userId,e)}}else{if(s===Da.InRoom&&a===e)return Promise.reject({type:Js,reason:"You are in room"});{const t=Hv(o,c);if(!t||t.boId!==e)return Promise.reject({type:Zs,reason:"room id is not correct"});rg.joinBO(t.boId)}}return ia("BREAKOUT_ROOM_JOIN_BO_RESPONSE",t=>t.boId===e)}leaveRoom(){const e=this[$h](),t=this[ef],{breakoutRoom:{controlStatus:r,options:n,currentRoom:{status:o}}}=e;if(r!==Ca.InProgress&&r!==Ca.Closing||o!==Da.InRoom)return Promise.reject({type:Js});{const r=Ma(e);if(!n.isBackToMainSessionEnabled&&!r)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"can not return main session during the breakout room"});Gv().forEach(e=>t(e))}return Promise.resolve("")}askForHelp(){const e=this[$h](),{breakoutRoom:{controlStatus:t,mainSessionAttendeeList:r,currentRoom:{status:n}},participants:{attendeesList:o}}=e,i=Ma(e);if(t!==Ca.InProgress||n!==Da.InRoom)return Promise.reject({type:Js,reason:"you are not in breakout room"});if(i)return Promise.reject({type:Js,reason:"host or co-host can not ask for help"});{const e=r.find(e=>e.isHost);if(e){if(o.findIndex(t=>t.zoomID===e.zoomID)>-1)return Promise.reject({type:Js,reason:"host is in room"});rg.askForHelpBO(e.userId)}}return ia("BREAKOUT_ROOM_ASK_HELP_RESPONSE",e=>e.result===Na.Received)}postponeHelping(e){const t=this[$h](),r=this[ef],{breakoutRoom:{mainSessionAttendeeList:n,currentRoom:{status:o}},participants:{attendeesList:i}}=t;let s=i;return o===Da.InRoom&&(s=n),s.findIndex(t=>t.userId===e)>-1?(rg.askForHelpResultBO(e,Na.Ignore),r(od(Na.Ignore)),Promise.resolve("")):Promise.reject({type:Zs,reason:"user id is not correct"})}broadcast(e){const{breakoutRoom:{isEnableBOBroadcast:t}}=this[$h]();return t?e?Mi.beginEncrypt({text:e,type:Ci.BO_BROADCAST}).then(e=>(rg.broadcastBO(e),Promise.resolve(""))):Promise.reject({type:Zs,reason:"content empty"}):Promise.reject({type:Js,reason:"Cannot broadcast message due to the feature is not enable"})}assignUserToRoom(e,t){const r=this[$h](),{breakoutRoom:{rooms:n}}=r,o=eg(r).find(t=>t.userId===e);return o&&n.findIndex(e=>e.boId===t)>-1?(rg.assignToBO(e,t),ia("BREAKOUT_ROOM_ATTRIBUTE_INDICATION",e=>{const{controlStatus:r,roomList:n}=e,i=n.find(e=>e.boId===t);return r===Ca.InProgress&&i&&i.attendeeGuidList.includes(o.userGUID)})):Promise.reject({type:Zs,reason:""})}moveUserToRoom(e,t){const r=this[$h](),{breakoutRoom:{rooms:n,mainSessionAttendeeList:o},participants:{attendeesList:i}}=r,s=($v(r)?o:i).find(t=>t.userId===e);if(!s)return Promise.reject({type:Zs,reason:"user id not correct"});{const r=Hv(n,s.userGUID);if(!r)return Promise.reject({type:Js,reason:"user not in a room"});if(r.boId===t)return Promise.reject({type:Js,reason:"user already in the target room"});{const r=n.find(e=>e.boId===t);if(!r)return Promise.reject({type:Zs,reason:"invalid room id"});rg.switchBO(e,r.boId)}}return ia("BREAKOUT_ROOM_ATTRIBUTE_INDICATION",e=>{const{controlStatus:r,roomList:n}=e,o=n.find(e=>e.boId===t);return r===Ca.InProgress&&o&&o.attendeeGuidList.includes(s.userGUID)})}closeRoom(){const e=this[$h](),{breakoutRoom:{controlStatus:t}}=e;return t!==Ca.InProgress?Promise.reject({type:Js,reason:"room is not started"}):(rg.stopBO(Ca.Closing),ia("BREAKOUT_ROOM_ATTRIBUTE_INDICATION",e=>e.controlStatus===Ca.Closing))}loadPreAssignedRooms(){const e=this[$h](),{meeting:{meetingOptions:t},breakoutRoom:{controlStatus:r}}=e;return!t.isAllowBreakoutRoomPreAssign||r!==Ca.NotStarted&&r!==Ca.Closed?Promise.reject({type:Js}):(rg.preAssignBreakoutRoom(),ia("BREAKOUT_ROOM_LOAD_PRE_ASSIGNED_ROOMS"))}getUnassignedAttendeeList(){const e=this[$h](),{meeting:{isHost:t}}=e;return t?eg(e):[]}getRoomList(){const e=this[$h](),{breakoutRoom:{rooms:t,currentRoom:{status:r,boId:n},mainSessionAttendeeList:o},participants:{attendeesList:i}}=e,s=Pa(e);if(s&&(s.isHost||r===Da.InRoom&&s.bCoHost)){const e=r===Da.InRoom,a=e?o:i;return t.map(t=>{const{attendeeGuidList:r,boId:o,name:i}=t,c=(r||[]).map(e=>a.find(t=>t.userGUID===e)).filter(e=>!!e&&e.userGUID!==s.userGUID);return e&&s.isHost&&o===n&&c.unshift(s),{roomId:o,name:i,attendeeList:c.filter(e=>!!e).map(e=>({userId:e.userId,displayName:e.displayName,avatar:e.avatar,isInRoom:e.bid===o}))}})}return e.breakoutRoom.rooms.map(e=>{const{boId:t,name:r}=e;return{roomId:t,name:r,attendeeList:[]}})}getAttendeeStatus(){return this[$h]().breakoutRoom.currentRoom.status}getRoomStatus(){return this[$h]().breakoutRoom.controlStatus}getCurrentRoom(){const e=this[$h](),{breakoutRoom:{currentRoom:{status:t,name:r,boId:n}}}=e;return{attendeeStatus:t,name:r,roomId:n}}getRoomOptions(){const e=this[$h](),{breakoutRoom:{options:t}}=e;return c({},t)}}).prototype,"createRooms",[nf,sf],Object.getOwnPropertyDescriptor(tg.prototype,"createRooms"),tg.prototype),l(tg.prototype,"openRooms",[nf,sf],Object.getOwnPropertyDescriptor(tg.prototype,"openRooms"),tg.prototype),l(tg.prototype,"joinRoom",[nf],Object.getOwnPropertyDescriptor(tg.prototype,"joinRoom"),tg.prototype),l(tg.prototype,"leaveRoom",[nf],Object.getOwnPropertyDescriptor(tg.prototype,"leaveRoom"),tg.prototype),l(tg.prototype,"askForHelp",[nf],Object.getOwnPropertyDescriptor(tg.prototype,"askForHelp"),tg.prototype),l(tg.prototype,"postponeHelping",[sf,nf],Object.getOwnPropertyDescriptor(tg.prototype,"postponeHelping"),tg.prototype),l(tg.prototype,"broadcast",[sf,nf],Object.getOwnPropertyDescriptor(tg.prototype,"broadcast"),tg.prototype),l(tg.prototype,"assignUserToRoom",[sf,nf],Object.getOwnPropertyDescriptor(tg.prototype,"assignUserToRoom"),tg.prototype),l(tg.prototype,"moveUserToRoom",[sf,nf],Object.getOwnPropertyDescriptor(tg.prototype,"moveUserToRoom"),tg.prototype),l(tg.prototype,"closeRoom",[sf,nf],Object.getOwnPropertyDescriptor(tg.prototype,"closeRoom"),tg.prototype),l(tg.prototype,"loadPreAssignedRooms",[sf,nf],Object.getOwnPropertyDescriptor(tg.prototype,"loadPreAssignedRooms"),tg.prototype),tg);var og;const ig={chat:{epic:Of,reducer:yf,Client:wf},recording:{epic:Lf,reducer:Rf,Client:Uf},cmd:{epic:Qf,reducer:Kf,Client:Yf},breakoutRoom:{epic:Vn(Yv,Xv),reducer:Ym,Client:ng}},sg=zi.createAgent();let ag=(l((og=class extends _f{constructor(e){super(e),this.mediaStream=void 0,this[tf]=ig}getMediaStream(){return void 0===this.mediaStream&&(this.mediaStream=new Jm(this[Xh])),this.mediaStream}joinInstant(e,t,r,n,o,i){const{[$h]:s,[ef]:a}=this,{meeting:{lang:c,meetingStatus:u},socket:{zoomSocketStatus:d}}=s();return t?u!==ii.Joined&&d===Fa.Closed?(a(go({topic:e,password:o||"",userName:r,zlk:t,lang:c,cv:n})),i&&a(Jo(i)),oa(is.JoinMeeting)):Promise.reject({type:Js,reason:"duplicated operation"}):Promise.reject({type:Js,reason:"invalid signature"})}removeUser(e){const t=this[Xh].getState(),{participants:{attendeesList:r}}=t;return r.find(t=>t.userId===e)?(sg.expel(e),ia("REMOVE_USER_PARTICIPANT_ATTRIBUTE",t=>t.some(t=>t.userId===e))):Promise.reject({type:Zs,reason:"no matched user"})}}).prototype,"removeUser",[of,nf],Object.getOwnPropertyDescriptor(og.prototype,"removeUser"),og.prototype),og);class cg{constructor(e){this.instant=void 0,this.context=void 0,this.script=void 0,this.mic=void 0,this.instant=0,this.context=e,this.mic=null,this.script=e.createScriptProcessor(2048,1,1),this.script.onaudioprocess=e=>{const t=e.inputBuffer.getChannelData(0);let r,n=0;for(r=0;r0&&void 0!==arguments[0]?arguments[0]:"";this.audioContext=void 0,this.inputMicDetector=void 0,this.isMicUnmuted=void 0,this.isAudioStarted=void 0,this.audioStream=void 0,this.deviceId=void 0,this.audioContext=null,this.inputMicDetector=null,this.isMicUnmuted=!1,this.isAudioStarted=!1,this.audioStream=null,this.deviceId=e}async start(){if(this.audioStream||this.isAudioStarted)throw new Error("AudioAlreadyStartedError");try{const e=await navigator.mediaDevices.getUserMedia(this.getAudioConstraints());this.audioStream=e,this.isAudioStarted=!0}catch(e){throw e}}async unmute(){if(!this.audioStream||!this.isAudioStarted)throw new Error("AudioNotStartedError");if(this.isMicUnmuted)throw new Error("AudioAlreadyUnmutedError");return this.toggleMicIsMuted(!0)}async mute(){if(!this.audioStream||!this.isAudioStarted)throw new Error("AudioNotStartedError");if(!this.isMicUnmuted)throw new Error("AudioAlreadyMutedError");return this.toggleMicIsMuted(!1)}getCurrentVolume(){return this.inputMicDetector?this.inputMicDetector.getMicVolume():0}async stop(){if(!this.audioStream||!this.isAudioStarted)throw new Error("AudioNotStartedError");this.audioStream.getAudioTracks().forEach(e=>e.stop()),this.audioStream=null,this.isAudioStarted=!1}async toggleMicIsMuted(e){if(e){if(!this.audioContext){const e=window.AudioContext||window.webkitAudioContext;this.audioContext=new e}this.inputMicDetector=new cg(this.audioContext),this.inputMicDetector.connectToSource(this.audioStream)}else this.inputMicDetector&&this.inputMicDetector.stop(),this.inputMicDetector=null;this.isMicUnmuted=e}getAudioConstraints(){return{audio:""===this.deviceId||{deviceId:this.deviceId},video:!1}}}const dg={width:{min:1024,ideal:1280,max:1920},height:{min:576,ideal:720,max:1080},aspectRatio:{ideal:1.777777778}};class lg{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.isVideoStarted=void 0,this.videoStream=void 0,this.deviceId=void 0,this.isVideoStarted=!1,this.videoStream=null,this.deviceId=e}async start(e){if(!e)throw new Error("Video DOM element is falsy");if(this.isVideoStarted||this.videoStream)throw new Error("VideoAlreadyStartedError");const t=async t=>{if(!t||"OverconstrainedError"!==t.name&&"ConstraintNotSatisfiedError"!==t.name)throw t;console.log("Warning: detected ".concat(t.name," -- trying to fall back to lower aspect ratio"));try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints(!0));return this.tryPlayVideo(e,t)}catch(e){throw e}};try{const t=await navigator.mediaDevices.getUserMedia(this.getVideoConstraints());return this.tryPlayVideo(e,t)}catch(e){return t(e)}}async stop(){if(!this.videoStream||!this.isVideoStarted)throw new Error("VideoNotStartedError");this.videoStream.getVideoTracks().forEach(e=>e.stop()),this.videoStream=null,this.isVideoStarted=!1}getVideoConstraints(){let e=dg;return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?e=""===this.deviceId||{deviceId:this.deviceId}:""!==this.deviceId&&(e.deviceId=this.deviceId),{audio:!1,video:e}}async tryPlayVideo(e,t){if(!e)throw new Error("Video DOM element is falsy");try{this.videoStream=t,e.srcObject=this.videoStream,await e.play(),this.isVideoStarted=!0}catch(e){throw e}}}class pg{static createClient(){if(!this.meetingClient){const e=function(){const e=[Zh],t=b(Qh(),Yh(function(){for(var e=arguments.length,t=new Array(e),r=0;r{void 0===t.asyncReducers[e]&&(t.asyncReducers[e]=r,t.replaceReducer(Qh(t.asyncReducers)))},t.injectEpic=e=>{zh.next(e)},Zh.run(qh),t}();this.meetingClient=new ag(e)}return this.meetingClient}static destroyClient(){this.meetingClient&&(this.meetingClient.leave().then(()=>{pt(500).subscribe(()=>{aa()})}),this.meetingClient=null)}static checkSystemRequirements(){return{audio:pi()&&hi(),video:pi()&&void 0!==navigator.mediaDevices,screen:pi()&&void 0!==(navigator.mediaDevices&&navigator.mediaDevices).getDisplayMedia}}static getDevices(e){return e?navigator.mediaDevices.enumerateDevices():navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(e=>(e.getTracks().forEach(e=>e.stop()),navigator.mediaDevices.enumerateDevices()))}static createLocalAudioTrack(){return new ug(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}static createLocalVideoTrack(){return new lg(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}}pg.meetingClient=void 0,pg.VERSION="2.4.5";var hg,fg,mg,_g,vg,gg,yg="https://dmogdx0jrul3u.cloudfront.net/videosdk/".concat("1.3.0","/lib"),bg="https://source.zoom.us/videosdk/".concat("1.3.0","/lib"),Sg="https://jssdk.zoomus.cn/videosdk/".concat("1.3.0","/lib"),Eg=Symbol("stream"),Ig=function(){function e(t){r(this,e),this[Eg]=void 0,this[Eg]=t}return o(e,[{key:"startAudio",value:function(e){return this[Eg].startAudio(e)}},{key:"stopAudio",value:function(){return this[Eg].stopAudio()}},{key:"muteAudio",value:function(e){return this[Eg].muteAudio(e)}},{key:"unmuteAudio",value:function(e){return this[Eg].unmuteAudio(e)}},{key:"inviteByPhone",value:function(e,t,r,n){return this[Eg].dialOut(e,t,r,n)}},{key:"cancelInviteByPhone",value:function(e,t,r){return this[Eg].cancelDialOut(e,t,r)}},{key:"hangup",value:function(){return this[Eg].hangup()}},{key:"muteShareAudio",value:function(e){return this[Eg].muteShareAudio(e)}},{key:"unmuteShareAudio",value:function(e){return this[Eg].unmuteShareAudio(e)}},{key:"subscribeAudioStatisticData",value:function(e){return this[Eg].subscribeAudioStatisticData(e)}},{key:"unsubscribeAudioStatisticData",value:function(e){return this[Eg].unsubscribeAudioStatisticData(e)}},{key:"isAudioMuted",value:function(e){return this[Eg].isAudioMuted(e)}},{key:"getMicList",value:function(){return this[Eg].getMicList()}},{key:"getSpeakerList",value:function(){return this[Eg].getSpeakerList()}},{key:"getActiveMicrophone",value:function(){return this[Eg].getActiveMicrophone()}},{key:"getActiveSpeaker",value:function(){return this[Eg].getActiveSpeaker()}},{key:"switchMicrophone",value:function(e){return this[Eg].switchMicrophone(e)}},{key:"switchSpeaker",value:function(e){return this[Eg].switchSpeaker(e)}},{key:"isSupportPhoneFeature",value:function(){return this[Eg].isSupportCallOut()}},{key:"getSupportCountryInfo",value:function(){return this[Eg].getDialOutCountries()}},{key:"getInviteByPhoneStatus",value:function(){return this[Eg].getDialOutStatus()}},{key:"getShareAudioStatus",value:function(){return this[Eg].getShareAudioStatus()}},{key:"isOthersShareAudioMutedLocally",value:function(e){return this[Eg].isOthersShareAudioMutedLocally(e)}},{key:"getAudioStatisticData",value:function(){return this[Eg].getAudioStatisticData()}},{key:"startVideo",value:function(e){return this[Eg].startVideo(e)}},{key:"stopVideo",value:function(){return this[Eg].stopVideo()}},{key:"renderVideo",value:function(e,t,r,n,o,i,s,a){return this[Eg].renderVideo(e,t,r,n,o,i,s,a)}},{key:"stopRenderVideo",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this[Eg].stopRenderVideo(e,t,r,n,o)}},{key:"updateVideoCanvasDimension",value:function(e,t,r){return this[Eg].updateVideoCanvasDimension(e,t,r)}},{key:"adjustRenderedVideoPosition",value:function(e,t,r,n,o,i,s){return this[Eg].adjustRenderedVideoPosition(e,t,r,n,o,i,s)}},{key:"clearVideoCanvas",value:function(e,t){return this[Eg].clearVideoCanvas(e,t)}},{key:"mirrorVideo",value:function(e){return this[Eg].mirrorVideo(e)}},{key:"enableHardwareAcceleration",value:function(e){return this[Eg].enableHardwareAcceleration(e)}},{key:"previewVirtualBackground",value:function(e,t,r){return this[Eg].previewVirtualBackground(e,t,r)}},{key:"updateVirtualBackgroundImage",value:function(e,t){return this[Eg].updateVirtualBackgroundImage(e,t)}},{key:"stopPreviewVirtualBackground",value:function(){return this[Eg].stopPreviewVirtualBackground()}},{key:"switchCamera",value:function(e){return this[Eg].switchCamera(e)}},{key:"subscribeVideoStatisticData",value:function(e){return this[Eg].subscribeVideoStatisticData(e)}},{key:"unsubscribeVideoStatisticData",value:function(e){return this[Eg].unsubscribeVideoStatisticData(e)}},{key:"isCapturingVideo",value:function(){return this[Eg].isCapturingVideo()}},{key:"isCameraTaken",value:function(){return this[Eg].isCameraTaken()}},{key:"getActiveVideoId",value:function(){return this[Eg].getActiveVideoId()}},{key:"getActiveCamera",value:function(){return this[Eg].getActiveCamera()}},{key:"getCameraList",value:function(){return this[Eg].getCameraList()}},{key:"isCaptureForbidden",value:function(){return this[Eg].isCaptureForbidden()}},{key:"getVideoMaxQuality",value:function(){return this[Eg].getVideoMaxQuality()}},{key:"getReceivedVideoDimension",value:function(){return this[Eg].getReceivedVideoDimension()}},{key:"isSupportMultipleVideos",value:function(){return this[Eg].isSupportMultipleVideos()}},{key:"isSupportHDVideo",value:function(){return this[Eg].isSupportHDVideo()}},{key:"isSupportVirtualBackground",value:function(){return this[Eg].isSupportVirtualBackground()}},{key:"getVirtualbackgroundStatus",value:function(){return this[Eg].getVirtualbackgroundStatus()}},{key:"getVideoStatisticData",value:function(){return this[Eg].getVideoStatisticData()}},{key:"startShareView",value:function(e,t){return this[Eg].startShareView(e,t)}},{key:"stopShareView",value:function(){return this[Eg].stopShareView()}},{key:"startShareScreen",value:function(e,t){return this[Eg].startShareScreen(e,t)}},{key:"pauseShareScreen",value:function(){return this[Eg].pauseShareScreen()}},{key:"resumeShareScreen",value:function(){return this[Eg].resumeShareScreen()}},{key:"stopShareScreen",value:function(){return this[Eg].stopShareScreen()}},{key:"lockShare",value:function(e){return this[Eg].lockShare(e)}},{key:"updateSharingCanvasDimension",value:function(e,t){return this[Eg].updateSharingCanvasDimension(e,t)}},{key:"switchSharingSecondaryCamera",value:function(e){return this[Eg].switchSharingSecondaryCamera(e)}},{key:"isShareLocked",value:function(){return this[Eg].isShareLocked()}},{key:"getActiveShareUserId",value:function(){return this[Eg].getActiveShareUserId()}},{key:"getShareStatus",value:function(){return this[Eg].getShareStatus()}}]),e}(),Ag=["isCoHost"],wg=Symbol("chat"),Og=function(){function e(t){r(this,e),this[wg]=void 0,this[wg]=t}return o(e,[{key:"send",value:function(e,t){return this[wg].send(e,t)}},{key:"sendToAll",value:function(e){return this[wg].send(e,Fi.All)}},{key:"setPrivilege",value:function(e){return this[wg].setPrivilege(e)}},{key:"getPrivilege",value:function(){return this[wg].getPrivilege()}},{key:"getReceivers",value:function(){return this[wg].getReceivers().map((function(e){return t({isManager:e.isCoHost},s(e,Ag))}))}},{key:"getHistory",value:function(){return this[wg].getHistory()}}]),e}(),Tg=Symbol("recording"),Cg=function(){function e(t){r(this,e),this[Tg]=void 0,this[Tg]=t}return o(e,[{key:"canStartRecording",value:function(){return this[Tg].isRecordingEnabled()}},{key:"startCloudRecording",value:function(){return this[Tg].startRecording()}},{key:"pauseCloudRecording",value:function(){return this[Tg].pauseRecording()}},{key:"resumeCloudRecording",value:function(){return this[Tg].startRecording()}},{key:"stopCloudRecording",value:function(){return this[Tg].stopRecording()}},{key:"getCloudRecordingStatus",value:function(){return this[Tg].getRecordingStatus()}}]),e}(),Rg=Symbol("command"),Dg=function(){function e(t){r(this,e),this[Rg]=void 0,this[Rg]=t}return o(e,[{key:"send",value:function(e,t){return this[Rg].send(e,t)}}]),e}(),kg=["isInRoom"],Ng=["isAutoJoinRoom"],Pg=Symbol("breakout-room"),Mg=function(){function e(t){r(this,e),this[Pg]=void 0,this[Pg]=t}return o(e,[{key:"createSubsessions",value:function(e,t){return this[Pg].createRooms(e,t).then((function(e){return e.map((function(e){return{subsessionId:e.roomId,subsessionName:e.name,userList:e.attendeeList}}))}))}},{key:"openSubsessions",value:function(e,r){var n=r?t(t({},r),{},{isAutoJoinRoom:r.isAutoJoinSubsession}):void 0,o=e.map((function(e){return{roomId:e.subsessionId,name:e.subsessionName,attendeeList:e.userList}}));return this[Pg].openRooms(o,n)}},{key:"joinSubsession",value:function(e){return this[Pg].joinRoom(e)}},{key:"leaveSubsession",value:function(){return this[Pg].leaveRoom()}},{key:"askForHelp",value:function(){return this[Pg].askForHelp()}},{key:"postponeHelping",value:function(e){return this[Pg].postponeHelping(e)}},{key:"broadcast",value:function(e){return this[Pg].broadcast(e)}},{key:"assignUserToSubsession",value:function(e,t){return this[Pg].assignUserToRoom(e,t)}},{key:"moveUserToSubsession",value:function(e,t){return this[Pg].moveUserToRoom(e,t)}},{key:"closeAllSubsessions",value:function(){return this[Pg].closeRoom()}},{key:"getUnassignedUserList",value:function(){return this[Pg].getUnassignedAttendeeList()}},{key:"getSubsessionList",value:function(){return this[Pg].getRoomList().map((function(e){return{subsessionId:e.roomId,subsessionName:e.name,userList:e.attendeeList.map((function(e){var r=e;return t({isInSubsession:r.isInRoom},s(r,kg))}))}}))}},{key:"getUserStatus",value:function(){return this[Pg].getAttendeeStatus()}},{key:"getSubsessionStatus",value:function(){return this[Pg].getRoomStatus()}},{key:"getCurrentSubsession",value:function(){var e=this[Pg].getCurrentRoom();return{userStatus:e.attendeeStatus,subsessionName:e.name,subsessionId:e.roomId}}},{key:"getSubsessionOptions",value:function(){var e=this[Pg].getRoomOptions();return t({isAutoJoinSubsession:e.isAutoJoinRoom},s(e,Ng))}}]),e}(),Ug=function(e){return"string"==typeof e&&e.length>0},Lg=["roomName"],Vg=[{event:"connection-change",originalEvent:"connection-change",payloadTransform:function(e){var r=e.roomName,n=s(e,Lg);return r?t(t({},n),{},{subsessionName:r}):e}},{event:"subsession-invite-to-join",originalEvent:"invite-to-join",payloadTransform:function(e){return{subsessionId:e.roomId,subsessionName:e.name}}},{event:"subsession-countdown",originalEvent:"room-countdown"},{event:"subsession-time-up",originalEvent:"room-time-up"},{event:"closing-subsession-countdown",originalEvent:"closing-room-countdown"},{event:"subsession-broadcast-message",originalEvent:"broadcast-message"},{event:"subsession-ask-for-help",originalEvent:"ask-for-help",payloadTransform:function(e){return{userId:e.userId,displayName:e.displayName,subsessionId:e.roomId,subsessionName:e.roomName}}},{event:"subsession-ask-for-help-response",originalEvent:"ask-for-help-response"},{event:"subsession-state-change",originalEvent:"room-state-change"}],xg=Symbol("Client"),Bg=new WeakMap,jg=function(){function e(){r(this,e),this[xg]=void 0,this.stream=void 0,this.chat=void 0,this.command=void 0,this.recording=void 0,this.subsession=void 0,this[xg]=pg.createClient(),Bg.set(this,new Map)}return o(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Global",n=arguments.length>2?arguments[2]:void 0,o="";switch(r){case"Global":o=bg;break;case"CN":o=Sg;break;case"CDN":o=yg;break;default:o=r}return this[xg].init("","",{language:e,dependentAssets:o,constraints:t({},pg.checkSystemRequirements()),additionalFeatures:["chat","cmd","recording","breakoutRoom"],webEndpoint:(null==n?void 0:n.webEndpoint)||"zoom.us",skipJsMedia:null==n?void 0:n.skipJsMedia,enforceMultipleVideos:null==n?void 0:n.enforceMultipleVideos})}},{key:"join",value:function(e,t,r,n,o){return Ug(e)&&Ug(t)&&Ug(r)?e.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of topic is 200"}):r.length>200?Promise.reject({type:"INVALID_PARAMETERS",reason:"the max length of username is 200"}):!n||Ug(n)&&!void/^([!@#$%^&*?=]|\w|\d){1,10}$/gi.test(n)?this[xg].joinInstant(e,t,r,"1.3.0",n,o):Promise.reject({type:"INVALID_PARAMETERS",reason:"Password can contain English characters, numbers and special characters like !@#$%^&*?=, and the max length of password is 10"}):Promise.reject({type:"INVALID_PARAMETERS",reason:"topic, token and userName must be string and required"})}},{key:"leave",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t?(null===(e=Bg.get(this))||void 0===e||e.clear(),this[xg].end()):this[xg].leave()}},{key:"getSessionInfo",value:function(){var e=this[xg].getMeetingInfo();return{isInMeeting:e.isInMeeting||!1,password:e.password||"",topic:e.topic,userName:e.userName,userId:e.userId,sessionId:e.meetingId}}},{key:"on",value:function(e,t){var r=Vg.find((function(t){return t.event===e}));if(r){var n=r.originalEvent,o=r.payloadTransform;if(o){var i=function(e){var r=o(e);t(r)};this[xg].on(n,i);var s=Bg.get(this);if(s){s.has(e)||s.set(e,[]);var a=s.get(e);null==a||a.push({originalCb:t,newCb:i})}}else this[xg].on(n,t)}else this[xg].on(e,t)}},{key:"off",value:function(e,t){var r=Vg.find((function(t){return t.event===e}));if(r){var n=r.originalEvent;if(r.payloadTransform){var o=Bg.get(this);if(o){var i=o.get(e),s=null==i?void 0:i.find((function(e){return e.originalCb===t}));if(s&&i){this[xg].off(n,s.newCb);var a=null==i?void 0:i.filter((function(e){return e.originalCb!==t}));o.set(e,a)}}}else this[xg].off(n,t)}else this[xg].off(e,t)}},{key:"getMediaStream",value:function(){return this.stream||(this.stream=new Ig(this[xg].getMediaStream())),this.stream}},{key:"getChatClient",value:function(){return this.chat||(this.chat=new Og(this[xg].getFeatureModule("chat"))),this.chat}},{key:"getRecordingClient",value:function(){return this.recording||(this.recording=new Cg(this[xg].getFeatureModule("recording"))),this.recording}},{key:"getCommandClient",value:function(){return this.command||(this.command=new Dg(this[xg].getFeatureModule("cmd"))),this.command}},{key:"getSubsessionClient",value:function(){return this.subsession||(this.subsession=new Mg(this[xg].getFeatureModule("breakoutRoom"))),this.subsession}},{key:"coverntUser",value:function(e){var t=e.userId,r=e.avatar,n=e.displayName,o=e.isHost;e.isCoHost;return{userId:t,avatar:r||"",displayName:n,isHost:o,audio:e.audio,muted:e.muted,bVideoOn:e.bVideoOn,sharerOn:e.sharerOn,sharerPause:e.sharerPause}}},{key:"getCurrentUserInfo",value:function(){var e=this[xg].getCurrentUserInfo();if(e)return this.coverntUser(e)}},{key:"getUser",value:function(e){var t=this[xg].getParticipantsList().find((function(t){return t.userId===e}));if(t)return this.coverntUser(t)}},{key:"getAllUser",value:function(){var e=this;return this[xg].getParticipantsList().map((function(t){return e.coverntUser(t)}))}},{key:"changeName",value:function(e,t){return this[xg].changeName(e,t)}},{key:"makeHost",value:function(e){return this[xg].makeHost(e)}},{key:"removeUser",value:function(e){return this[xg].removeUser(e)}},{key:"isHost",value:function(){return this[xg].isHost()}},{key:"getSessionHost",value:function(){var e=this[xg].getMeetingHost();return e?this.coverntUser(e):void 0}}]),e}(),Hg=function(){function e(){r(this,e)}return o(e,null,[{key:"createClient",value:function(){return this.videoClient||(this.videoClient=new jg),this.videoClient}},{key:"destroyClient",value:function(){this.videoClient&&(this.videoClient.leave(),this.videoClient=null)}},{key:"checkSystemRequirements",value:function(){return pg.checkSystemRequirements()}},{key:"getDevices",value:function(e){return pg.getDevices(e)}},{key:"createLocalAudioTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return pg.createLocalAudioTrack(e)}},{key:"createLocalVideoTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return pg.createLocalVideoTrack(e)}}]),e}();Hg.videoClient=void 0,Hg.VERSION="1.3.0",function(e){e[e.All=1]="All",e[e.NoOne=4]="NoOne",e[e.EveryonePublicly=5]="EveryonePublicly"}(hg||(hg={})),function(e){e[e.All=0]="All"}(fg||(fg={})),function(e){e[e.Automatically=Ta.Automatically]="Automatically",e[e.Manually=Ta.Manually]="Manually"}(mg||(mg={})),function(e){e[e.Initial=Da.Initial]="Initial",e[e.Invited=Da.Invited]="Invited",e[e.Joining=Da.Joining]="Joining",e[e.InSubsession=Da.InRoom]="InSubsession",e[e.Leaving=Da.Leaving]="Leaving",e[e.MainSession=Da.MainSession]="MainSession"}(_g||(_g={})),function(e){e[e.NotStarted=Ca.NotStarted]="NotStarted",e[e.InProgress=Ca.InProgress]="InProgress",e[e.Closing=Ca.Closing]="Closing",e[e.Closed=Ca.Closed]="Closed"}(vg||(vg={})),function(e){e[e.Failover=ti.Failover]="Failover",e[e.JoinSubsession=ti.JoinBreakoutRoom]="JoinSubsession",e[e.MoveToSubsession=ti.MoveToBreakoutRoom]="MoveToSubsession",e[e.BackToMainSession=ti.BackToMainSession]="BackToMainSession"}(gg||(gg={}));export default Hg;export{Na as AskHostHelpResponse,ys as AudioChangeAction,fg as ChatMsgType,hg as ChatPrivilege,ni as ConnectionState,bs as DialoutState,gs as MutedSource,Ns as PassiveStopShareReason,gg as ReconnectReason,ls as RecordingStatus,Is as SharePrivilege,As as ShareStatus,mg as SubsessionAllocationPattern,vg as SubsessionStatus,_g as SubsessionUserStatus,Os as VideoActiveState,Ds as VideoCapturingState,ws as VideoQuality};
diff --git a/dist/index.js b/dist/index.js
index 38991b1..92fa3ad 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1 +1 @@
-"use strict";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 f(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}(Q),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}(),X=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 A(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 A(t,e),t}(X))(Y),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=ve++;return me[t]=!0,_e.then((function(){return ye(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){ye(e)}(r),t.scheduled=void 0)},t}(Q),Se=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(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 We(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),Fe(x,e)}function Ke(){return We(1)}function qe(){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(Oe((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 Xe(e){var t=e.subscriber,r=e.counter,n=e.period;t.next(r),this.schedule({subscriber:t,counter:r+1,period:n},n)}function $e(){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]:We(r)(se(e,n))}function et(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function tt(e,t){return function(r){return r.lift(new rt(e,t))}}var rt=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new nt(e,this.predicate,this.thisArg))},e}(),nt=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 A(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 ot(e,t,r){return[tt(t,r)(new F(Ue(e))),tt(et(t,r))(new F(Ue(e)))]}function it(){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 mt(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(de.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(de.createComplete()),this.unsubscribe()},t}(U),mt=function(e,t){this.time=e,this.notification=t};function yt(e){return function(t){return 0===e?te():t.lift(new gt(e))}}var gt=function(){function e(e){if(this.total=e,this.total<0)throw new Ce}return e.prototype.call=function(e,t){return t.subscribe(new St(e,this.total))},e}(),St=function(e){function t(t,r){var n=e.call(this,t)||this;return n.total=r,n.count=0,n}return A(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 Et(e){return function(t){return t.lift(new bt(e))}}var bt=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new At(e,this.value))},e}(),At=function(e){function t(t,r){var n=e.call(this,t)||this;return n.value=r,n}return A(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(U);function It(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?Fe((function(){return e}),t,r):("number"==typeof t&&(r=t),Fe((function(){return e}),r))}var Ct=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new Tt(e,this.predicate))},e}(),Tt=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 A(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}(De),Wt=function(e,t){return e===t||"function"==typeof t&&e===t.toString()},Kt=function(){for(var e=arguments.length,t=Array(e),r=0;r=t.length?r(new rr(a,h,new tr(void 0,e[h]))):ir(e[h],t[h],r,n,a,h,s);for(;h=0?(ir(e[o],t[o],r,n,a,o,s),v=nr(v,c)):ir(e[o],void 0,r,n,a,o,s)})),v.forEach((function(e){ir(void 0,t[e],r,n,a,e,s)}))}s.length=s.length-1}else e!==t&&("number"===u&&isNaN(e)&&isNaN(t)||r(new $t(a,e,t)))}function sr(e,t,r,n){return n=n||[],ir(e,t,(function(e){e&&n.push(e)}),r),n.length?n:void 0}function ar(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,SET_CMD_CHANNEL_SOCKET_STATUS:e=>e,RESET_SOCKET:()=>({})}),ln=fr("CONNECT_TO_MEDIA_STREAM"),pn=fr("RECEIVE_PAYLOAD_FROM_MEDIA_SDK"),{setAudioEncodeStatus:hn,setAudioDecodeStatus:fn,setVideoEncodeStatus:vn,setVideoDecodeStatus:_n,setSharingEncodeStatus:mn,setSharingDecodeStatus:yn,setMediaConstraints:gn,setMediaEncryptKey:Sn,resetMedia:En}=Ur("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 bn(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(dt((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 In(){for(var e=arguments.length,t=new Array(e),r=0;rObject.values(e));return An(...n)}function Cn(e,t){return e.pipe(Kt("".concat(zr)),tt(e=>e.payload.evt===t))}function Tn(e,t){return e.pipe(Kt("".concat(Qr)),tt(e=>e.payload.event===t))}function On(e,t){return e.pipe(Kt("".concat(tn)),tt(e=>e.payload.evt===t))}function wn(e,t){return e.pipe(Kt("".concat(zr),"".concat(en)),tt(e=>e.payload.evt===t))}function Rn(e,t){return e.pipe(Kt("".concat(pn)),tt(e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t))}var Dn="undefined"!=typeof window&&window,Nn="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Pn="undefined"!=typeof global&&global,Mn=Dn||Pn||Nn;function kn(e,t){return void 0===t&&(t=null),new Fn({method:"GET",url:e,headers:t})}function Un(e,t,r){return new Fn({method:"POST",url:e,body:t,headers:r})}function Ln(e,t){return new Fn({method:"DELETE",url:e,headers:t})}function Vn(e,t,r){return new Fn({method:"PUT",url:e,body:t,headers:r})}function xn(e,t,r){return new Fn({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!Mn)throw new Error("RxJS could not find any global context (window, self, global)")}();var jn=Oe((function(e,t){return e.response}));function Hn(e,t){return jn(new Fn({method:"GET",url:e,responseType:"json",headers:t}))}var Fn=function(e){function t(t){var r=e.call(this)||this,n={async:!0,createXHR:function(){return this.crossDomain?function(){if(Mn.XMLHttpRequest)return new Mn.XMLHttpRequest;if(Mn.XDomainRequest)return new Mn.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(Mn.XMLHttpRequest)return new Mn.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 Mn.ActiveXObject(e))break}catch(e){}return new Mn.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 A(t,e),t.prototype._subscribe=function(e){return new Bn(e,this.request)},t.create=((r=function(e){return new t(e)}).get=kn,r.post=Un,r.delete=Ln,r.put=Vn,r.patch=xn,r.getJSON=Hn,r),t}(F),Bn=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")||Mn.FormData&&r.body instanceof Mn.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 A(t,e),t.prototype.next=function(e){this.done=!0;var t,r=this.xhr,n=this.request,o=this.destination;try{t=new Gn(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 u=this.xhr=e.createXHR();this.setupEvents(u,e),r?u.open(n,o,i,r,s):u.open(n,o,i),i&&(u.timeout=e.timeout,u.responseType=e.responseType),"withCredentials"in u&&(u.withCredentials=!!e.withCredentials),this.setHeaders(u,a),c?u.send(c):u.send()}catch(e){this.error(e)}},t.prototype.serializeBody=function(e,t){if(!e||"string"==typeof e)return e;if(Mn.FormData&&e instanceof Mn.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 qn(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)},Mn.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 Wn("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 Wn("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),Gn=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=Kn(this.responseType,t)},Wn=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=Kn(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function Kn(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 qn=function(e,t){return Wn.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},zn=Fn.create;const Jn={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."}},Qn=Jn.default;let Yn,Zn,Xn;function $n(e,t){return t in Qn?Qn[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"}(Yn||(Yn={})),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"}(Zn||(Zn={})),function(e){e[e.LEAVESUBREASON_WAITINGROOMFAILOVER=1]="LEAVESUBREASON_WAITINGROOMFAILOVER"}(Xn||(Xn={}));const eo={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},to={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"},ro={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}},no={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 oo(e,t){return Object.keys(e).find(r=>e[r]===t)}let io;function so(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(io)o=io;else{const e=Object.keys(ro[3e3]);n.forEach(t=>{const r=function(e){return"en-US"===e&&(e="default"),Jn[e]||Jn.default}(t);o[t]={},e.forEach(e=>{o[t][e]=r[e]})}),io=o}return n.forEach(n=>{if(r)return;const i=oo(o[n],t);i&&(r={key:i,value:ro[e][i]})}),r||(r={key:"apac.errorcodes_fail",value:200}),r}if(200===e){const n=oo({"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:ro[e][n]}:{key:"apac.errorcodes_fail",value:200},r}if(void 0!==ro[e]){const t=ro[e],n=Object.keys(t)[0];r={key:n,value:t[n]}}if(r)return r;const n=oo(eo,e),o=to[n];return o?{key:o,value:e}:{key:"apac.errorcodes_fail",value:200}}(e,t),o=$n(r,r);return r!==o?{reason:o,errorCode:n}:{reason:Qn[r],errorCode:n}}function ao(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==no[r]){const e=no[r],n=Object.keys(e)[0];t={key:n,value:e[n]}}if(t){const{key:r,value:n}=t,o=$n(r,r);return r!==o?Object.assign({},e,{reason:o,errorCode:n}):Object.assign({},e,{reason:Qn[r],errorCode:n})}const n=so(r);return Object.assign({},e,{reason:n.reason,errorCode:n.errorCode})}var co="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function uo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lo(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 po=lo((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,u=function(e){return e.replace(c,a)},d=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,d)},p=function(e){return l(u(String(e)))},h=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},f=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(u>>>12&63)+(void 0!==a?o.charAt(u>>>6&63):"=")+(void 0!==c?o.charAt(63&u):"=")}return t?h(r):r});var v,_=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,m=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))}},y=function(e){return e.replace(_,m)},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("")},S=t.atob&&"function"==typeof t.atob?function(e){return t.atob(e)}:function(e){return e.replace(/\S{1,4}/g,g)},E=function(e){return S(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,"")},A=function(e){return function(e){return y(S(e))}(b(e))};t.Uint8Array&&(v=function(e){return Uint8Array.from(E(b(e)),(function(e){return e.charCodeAt(0)}))});if(t.Base64={VERSION:"2.6.4",atob:E,btoa:l,fromBase64:A,toBase64:f,utob:u,encode:f,encodeURI:function(e){return f(e,!0)},btou:y,decode:A,noConflict:function(){var e=t.Base64;return t.Base64=n,e},fromUint8Array:r,toUint8Array:v},"function"==typeof Object.defineProperty){var I=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};t.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",I((function(){return A(this)}))),Object.defineProperty(String.prototype,"toBase64",I((function(e){return f(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",I((function(){return f(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:co)}));function ho(e){return po.Base64.encode(e,!0)}function fo(e){return po.Base64.decode(e)}const vo={"-":"+",_:"/",".":"="};function _o(e){const t=e.replace(/[-_.]/g,e=>vo[e]);return Uint8Array.from(atob(t),e=>e.charCodeAt(0))}const mo=(e,t)=>Object.keys(e).find(r=>e[r]===t)||0,yo=(e,t)=>{const r=e.split(".").map(e=>Number(e)).slice(0,3),n=t.split(".").map(e=>Number(e)).slice(0,3);let o=0;for(let e=0;e<3;e++){const t=ei){o=1;break}}return o},go=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount","bHasAST","bHasRMC"],So={bChime:"bAllowPlayChimeForEnterOrExit",bHasAST:"hasAst",bHasRMC:"hasRmc",topic:e=>({meetingTopic:fo(e)})},Eo=fr("GET_MEETING_INFO"),bo=fr("GET_INSTANT_MEETING_INFO"),Ao=(fr("LOGON_ZOOM_DOMAIN"),fr("VERIFY_ZOOM_RECAPTCHA"),fr("LOGON_THIRD_PARTY_DOMAIN"),fr("PING_RWC_SERVER")),Io=fr("MEETING_FAILOVER"),Co=fr("LEAVE_MEETING"),To=fr("END_MEETING"),Oo=(fr("REGISTER_WEBINAR"),fr("TRIGGER_IDLE_CHECK")),{setMeetingInfo:wo,setWindownOpen:Ro,setAppidSignature:Do,setZtk:No,setZsk:Po,setTkMtkguid:Mo,setPingRwcTimestamp:ko,setInMeetingInfo:Uo,setMeetingAttribute:Lo,resetMeeting:Vo,setIsHost:xo,setIsCohost:jo,setMeetingIsOnHold:Ho,setIsMeetingReset:Fo,setAudioVideoBeforeOnHold:Bo,setCurrentUserAudioBeforeReset:Go,setIsCurrentUserMutedBeforeReset:Wo,setMeetingStatus:Ko,setMeetingRegion:qo,setIsCurrentUserStartVideoBeforeReset:zo,setJoinMeetingTimeStamp:Jo,setIsEnableQos:Qo,setActiveAppInfo:Yo,setMeetingIdleStartTime:Zo,setSessionIdleTimeoutMinutes:Xo,setIsAudioBridgeEnabled:$o}=Ur({SET_MEETING_INFO:e=>e,SET_WINDOWN_OPEN:e=>e,SET_APPID_SIGNATURE:e=>e,SET_ZTK:e=>e,SET_ZSK:e=>e,SET_TK_MTKGUID:e=>e,SET_PING_RWC_TIMESTAMP:e=>e,SET_IN_MEETING_INFO:e=>e,SET_MEETING_ATTRIBUTE:e=>{if(go.some(t=>e&&void 0!==e[t])){let t=e;return Object.keys(So).some(t=>void 0!==e[t])&&(t=Object.keys(e).reduce((t,r)=>{const n=So[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,SET_MEETING_IDLE_START_TIME:e=>e,SET_SESSION_IDLE_TIMEOUT_MINUTES:e=>e,SET_IS_AUDIO_BRIDGE_ENABLED:e=>e});function ei(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 ti,ri,ni,oi,ii,si,ai;!function(e){e[e.None=0]="None",e[e.Hand=1]="Hand",e[e.Yes=2]="Yes",e[e.No=3]="No",e[e.Fast=4]="Fast",e[e.Slow=5]="Slow",e[e.Bad=6]="Bad",e[e.Good=7]="Good",e[e.Clap=8]="Clap",e[e.Coffee=9]="Coffee",e[e.Clock=10]="Clock",e[e.Emoji=11]="Emoji"}(ti||(ti={})),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"}(ri||(ri={})),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"}(ni||(ni={})),function(e){e.CDN="CDN",e.Global="Global",e.CN="CN"}(oi||(oi={})),function(e){e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed",e.Fail="Fail"}(exports.ConnectionState||(exports.ConnectionState={})),function(e){e.Loading="loading",e.Success="success",e.Fail="fail"}(ii||(ii={})),function(e){e[e.AudioBridgeEnable=1]="AudioBridgeEnable"}(si||(si={})),function(e){e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory"}(ai||(ai={}));const ci=ho("{}");class ui{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=ho("zoom-storage-".concat(e)),this.localStorageKey=ho("zoom-local-storage"),this.memoryCache={},this.sessionCache=JSON.parse(fo(sessionStorage.getItem(this.sessionStorageKey)||ci)),this.localCache=JSON.parse(fo(localStorage.getItem(this.localStorageKey)||ci))}static init(e){this.instance=new ui(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:ai.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:ai.LocalStorage}:{value:this.memoryCache[e],type:ai.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case ai.SessionStorage:{const r=this.sessionCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.sessionCache[e]=n,this.flushValue(ai.SessionStorage)),n}case ai.LocalStorage:{const r=this.localCache[e];let n=t;return"function"==typeof t&&(n=t(r)),r!==n&&(this.localCache[e]=n,this.flushValue(ai.LocalStorage)),n}case ai.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 ai.SessionStorage:delete this.sessionCache[e],this.flushValue(ai.SessionStorage);break;case ai.LocalStorage:delete this.localCache[e],this.flushValue(ai.LocalStorage);break;case ai.Memory:delete this.memoryCache[e]}}flushValue(e){e===ai.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,ho(JSON.stringify(this.sessionCache))):e===ai.LocalStorage&&localStorage.setItem(this.localStorageKey,ho(JSON.stringify(this.localCache)))}}function di(){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]),mi()&&(r[0]="ios-safari"),r.join(""))}function li(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}function pi(){return"object"==typeof WebAssembly&&"function"==typeof Worker}ui.instance=void 0;const hi=()=>"function"==typeof AudioWorklet,fi=()=>li(),vi=()=>!li()&&!pi(),_i=()=>{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)},mi=()=>{const{userAgent:e}=navigator,t=/ipad/i.test(e)||/iphone/i.test(e)||/macintosh/i.test(e),r=/webkit/i.test(e),n=/mobile/i.test(e);return t&&r&&(n||(()=>{const e=navigator.userAgent.toLowerCase();let t=0,r=0;return window.screen.width-1||e.indexOf("macintosh")>-1&&{1024:768,1112:834,1194:834,1366:1024}[r]===t})())},yi=()=>/arm/i.test(navigator.userAgent),gi=()=>/\bCrOS\b/.test(navigator.userAgent),Si=()=>{var e;return!(null===(e=navigator)||void 0===e||!e.hardwareConcurrency)&&"function"==typeof window.OffscreenCanvas&&"function"==typeof window.requestAnimationFrame&&"function"==typeof window.SharedArrayBuffer};function Ei(){return"function"==typeof window.MediaStreamTrackProcessor}function bi(){return"function"==typeof window.OffscreenCanvas}const Ai=e=>Si()?gi()&&yi()||gi()&&!yi()?navigator.hardwareConcurrency>=4?9:4:9:e&&Ei()&&bi()?4:1;function Ii(){return/android/i.test(navigator.userAgent)}let Ci,Ti;!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"}(Ci||(Ci={})),function(e){e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM"}(Ti||(Ti={}));const Oi=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 wi,Ri;!function(e){e.WebclientOpt="WEB_CLIENT_OPT",e.WebclientWebinarToken="WEB_CLIENT_WEBINAR_TOKEN",e.WebclientMeetingToken="WEB_CLIENT_MEETING_TOKEN",e.WebclientZtk="WEB_CLIENT_ZTK",e.WebclientZsk="WEB_CLIENT_ZSK",e.WebclientTk="WEB_CLIENT_TK",e.WebclientIVState="WEB_CLIENT_IV_STATE",e.WebclientIsOnHold="WEB_CLIENT_IS_ON_HOLD",e.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"}(wi||(wi={})),(Ri||(Ri={})).WebclientDeviceId="WEBCLIENT_DEVICE_ID";const Di=(window.crypto||window.msCrypto).subtle,Ni=wi.WebclientIVState,Pi=Object.keys(Oi).map(e=>Oi[e].sessionType);class Mi{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),ui.set(Ni,{},ai.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new Mi(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(li()||!pi())&&r===Ti.AES_GCM,this.gcmSessionKey=_o(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=_o(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=ui.get(Ni);return void 0===t[e]?(t[e]=0,ui.set(Ni,t,ai.SessionStorage)):ui.set(Ni,t=>c(c({},t),{},{[e]:t[e]+1}),ai.SessionStorage)}resetIVState(){const e=ui.get(Ni);if(void 0===e);else{const t=Object.keys(e).filter(e=>Pi.indexOf(e)>-1);t.length>0&&(t.forEach(t=>{e[t]+=1e6}),ui.set(Ni,e,ai.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(ho(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(_o(t))})}}}Mi.instance=void 0;const ki=20234,Ui=7937,Li=7938,Vi=12039,xi=16138;let ji,Hi,Fi,Bi,Gi;!function(e){e.Open="open",e.Message="message",e.Error="error",e.Close="close"}(ji||(ji={}));class Wi{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,n,o){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:ho(t),bCallme:r,bPressOne:n,bGreeting:o}})}}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:{}})}}muteShareAudio(e){return{seq:this.sendMessageToRwg({evt:16423,body:{bOn:!0,bShareAudio:!e}})}}}class Ki extends Wi{static createAgent(){return this.rwgInstance||(this.rwgInstance=new Ki),this.rwgInstance}}Ki.rwgInstance=null;class qi extends Wi{static getInstance(){return this.instance||(this.instance=new qi),this.instance}}qi.instance=null,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"}(Hi||(Hi={})),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"}(Fi||(Fi={})),function(e){e[e.None=0]="None",e[e.Delete=1]="Delete",e[e.Modify=2]="Modify"}(Bi||(Bi={})),function(e){e[e.Success=0]="Success",e[e.Delete=1]="Delete",e[e.Block=3]="Block"}(Gi||(Gi={}));const zi=[Hi.All,Hi.Host,Hi.NoOne,Hi.EveryonePublicly],Ji=[Hi.NoOne,Hi.All,Hi.AllPanelist],Qi={userId:Fi.All,displayName:"Everyone",isHost:!1,isCoHost:!1},Yi={userId:Fi.Panelist,displayName:"All panelists"},Zi={userId:Fi.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};class Xi{static getInstance(){return this.instance||(this.instance=new Xi),this.instance}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)}})}sendCommandMsg(e,t,r){this.seq+=1;const n=this.seq;return this.websocket&&this.websocket.readyState===WebSocket.OPEN&&this.websocket.send(JSON.stringify({seq:n,body:{bcm:r,type:t?Hi.AllPanelist:Hi.All,msg:e,jid:[t]},evt:24582})),n}connectXmpp(){this.seq+=1;const e=this.seq;return this.websocket&&this.websocket.readyState===WebSocket.OPEN&&this.websocket.send(JSON.stringify({seq:e,body:{},evt:24576})),e}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()}clearIntervals(){this.intervalsToBeCleardWhenSocketClose.forEach(e=>clearInterval(e))}addWebSocketEventListeners(){this.websocket&&(this.websocket.addEventListener("open",e=>{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)}))}}Xi.instance=null;const $i=wi.WebclientIVState;class es{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new es),this.agentInstance}constructor(){this.assetsPath=void 0,this.instance=void 0,this.callbackList=void 0,this.mediaWorkersPath=void 0,this.constraints=void 0,this.svcUrl=void 0,this.meetingNumber=void 0,this.confId=void 0,this.mediaSocketAddress=void 0,this.currentUserId=void 0,this.receivedSharingCanvas=void 0,this.sharingCanvas=void 0,this.mediaOptions=void 0,this.callbackList=[]}init(){if(!this.instance){const e={ivObj:{[Ci.AUDIO_ENCODE]:ui.get($i)&&ui.get($i)[Ci.AUDIO_ENCODE],[Ci.VIDEO_ENCODE]:ui.get($i)&&ui.get($i)[Ci.VIDEO_ENCODE],[Ci.SHARING_ENCODE]:ui.get($i)&&ui.get($i)[Ci.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(Ki.createAgent())}}setAssetsAndConstraint(e,t,r,n){var o;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=((e,t)=>t?{audioWorkerPath:"".concat(e,"/").concat("1501","_js_audio_process.min.js"),audioWorkletPath:"".concat(e,"/").concat("1501","_js_audio_worklet.min.js"),audioWasm:"".concat(e,"/").concat("1501","_audio.encode.wasm"),videoWorkerPath:"".concat(e,"/").concat("1501","_video_s.min.js"),videoMtWorkerPath:"".concat(e,"/").concat("1501","_video_m.min.js"),videoWasm:"".concat(e,"/").concat("1501","_video.decode.wasm"),videoMtWasm:"".concat(e,"/").concat("1501","_video.mt.wasm"),sharingWorkerPath:"".concat(e,"/").concat("1501","_sharing_s.min.js"),sharingMtWorkerPath:"".concat(e,"/").concat("1501","_sharing_m.min.js"),videoSIMDWorkerPath:"".concat(e,"/").concat("1501","_video_simd.min.js"),videoSIMDWasm:"".concat(e,"/").concat("1501","_video.simd.wasm"),sharingSIMDWorkerPath:"".concat(e,"/").concat("1501","_sharing_simd.min.js"),videoMSIMDWasm:"".concat(e,"/").concat("1501","_video.mtsimd.wasm"),sharingMSIMDWorkerPath:"".concat(e,"/").concat("1501","_sharing_mtsimd.min.js"),videoMSIMDWorkerPath:"".concat(e,"/").concat("1501","_video_mtsimd.min.js"),audioSIMDWorkletPath:"".concat(e,"/").concat("1501","_audio_simd.min.js"),audioSIMDWasm:"".concat(e,"/").concat("1501","_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),this.mediaOptions=n,null===(o=this.instance)||void 0===o||o.JsMediaSDK_PreLoad(this.mediaWorkersPath,this.onMediaSDKCallback,n)}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"function"==typeof window.OffscreenCanvas&&0==JsMediaSDK_Instance.util.AdapterWhiteListCheckForEncoder()}connect(e){var t,r,n,o,i,s;let{svcUrl:a,meetingNumber:c,conId:u,e2eEncrypt:d,isViewOnly:l,currentUserId:p,isWebinar:h,enableAudioQos:f,enableVideoQos:v=!1}=e;this.svcUrl=a,this.meetingNumber=c,this.confId=u;const _=((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(fi()?"j":"s","&cid=").concat(r)}))(a,c,u);this.mediaSocketAddress=_,this.currentUserId=p;const m=Ai(null===(t=this.mediaOptions)||void 0===t?void 0:t.enableMultiDecodeVideoWithoutSAB);var y,g,S,E,b,A,I;(null===(r=this.instance)||void 0===r||r.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkletPath:pi()?null===(n=this.mediaWorkersPath)||void 0===n?void 0:n.audioWorkletPath:void 0,e2eEncrypt:d,isEnableListenInitEvent:!0}),!0===(null===(o=this.constraints)||void 0===o?void 0:o.audio)&&pi()&&!mi())&&((h||hi())&&(null===(y=this.instance)||void 0===y||y.initAudioDecode(this.mediaWorkersPath,_.audioSocketAddress,p,!1,u,c,m,f)),!hi()||h&&l||null===(g=this.instance)||void 0===g||g.initAudioEncode(this.mediaWorkersPath,_.audioSocketAddress,p,!1,u,c,m,f));!0===(null===(i=this.constraints)||void 0===i?void 0:i.video)&&pi()&&(null===(S=this.instance)||void 0===S||S.initVideoDecode(this.mediaWorkersPath,_.videoSocketAddress,p,!1,u,c,m),h&&l||null===(E=this.instance)||void 0===E||E.initVideoEncode(this.mediaWorkersPath,_.videoSocketAddress,p,!1,u,c,m,!1,v,!0,!0)),!0===(null===(s=this.constraints)||void 0===s?void 0:s.screen)&&(pi()?(null===(b=this.instance)||void 0===b||b.initSharingDecode(this.mediaWorkersPath,_.sharingSocketAddress,p,!1,u,c,m),h&&l||null===(A=this.instance)||void 0===A||A.initSharingEncode(this.mediaWorkersPath,_.sharingSocketAddress,p,!1,u,c,m)):null===(I=this.instance)||void 0===I||I.initSharingDecode(_.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,o){var i;return null===(i=this.instance)||void 0===i?void 0:i.Notify_MeidaSDK(22,c({CaptureAudio:n,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t},speakerInfo:{defaultDeviceId:r}},o?{useAudioBridge:!0,audioBridge:o}:{}))}leaveComputerAudio(){var e;return null===(e=this.instance)||void 0===e?void 0:e.Notify_MeidaSDK(21,null)}joinSharingAudio(e){var t;let{ssrc:r,microphoneDeviceId:n,speakerDeviceId:o,isCaptureAudio:i}=e;return null===(t=this.instance)||void 0===t?void 0:t.Notify_MeidaSDK(72,{CaptureAudio:i,CaptureAudioInfo:{ssrc:r,AudioSelectValue:"default"===n?null:n},speakerInfo:{defaultDeviceId:o},checkAutoplay:!1})}leaveSharingAudio(e){var t;return null===(t=this.instance)||void 0===t?void 0:t.Notify_MeidaSDK(73,{isPause:e?1:0})}changeSpeaker(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(11,{ssrc:0,AudioSelectValue:e})}changeMicrophone(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(18,{ssrc:0,AudioSelectValue:"default"===e?null:e})}restoreWebRTC(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(19,{ssrc:0,AudioSelectValue:"default"===e?null:e})}renderVideo(e,t,r,n,o,i,s,a,c,u,d){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:d,waterMarkText:u,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=d(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],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];this.sharingCanvas=document.querySelector("#".concat(t)),null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(30,{mode:i,ssid:e,canvas:t,video:r,showShareAudioOption:o})}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,t;null===(e=this.instance)||void 0===e||e.initAudioEncode(this.mediaWorkersPath,this.mediaSocketAddress.audioSocketAddress,this.currentUserId,!1,this.confId,this.meetingNumber,Ai(null===(t=this.mediaOptions)||void 0===t?void 0:t.enableMultiDecodeVideoWithoutSAB))}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=d(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})}setSharingAudioVolume(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(74,{userid:e>>10,shareVolume:t?0:100})}subscribeToQos(e,t){e.forEach(e=>{var r;null===(r=this.instance)||void 0===r||r.updateQosSubscription(!0,e,t)})}unsubscribeFromQos(e){e.forEach(e=>{var t;null===(t=this.instance)||void 0===t||t.updateQosSubscription(!1,e)})}passThroughRWGMessage(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(40,e)}startVirtualBackgroundSetting(e,t,r,n,o,i){var s;null===(s=this.instance)||void 0===s||s.Notify_MeidaSDK(91,{canvas:e,bgdom:t,width:o,height:i,ssid:r,VideoSelectValue:"default"===n?null:n})}updateVirtualBackgroundImage(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(92,{bgdom:e})}stopVirtualBackgroundSetting(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(93,{isSwitch:t})}}var ts;es.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"}(ts||(ts={}));const rs={success:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",fail:["JOIN_MEETING_FAILED"]},ns={[ts.ConnectionChange]:[{event:"JOIN_MEETING_SUCCESS",payload:()=>({state:exports.ConnectionState.Connected})},{event:"JOIN_MEETING_FAILED",payload:e=>c({state:exports.ConnectionState.Fail},e)},{event:"RECONNECTING_MEETING",payload:e=>c({state:exports.ConnectionState.Reconnecting},e)},{event:"LEAVING_MEETING",payload:e=>c({state:exports.ConnectionState.Closed},e)}],[ts.OnHoldChange]:[{event:"MEETING_IN_WAITING_ROOM",payload:e=>({isOnHold:e})}],[ts.UserAdd]:[{event:"ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"ADD_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[ts.UserUpdate]:[{event:"UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",payload:e=>[e]},{event:"UPDATE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[ts.UserRemove]:[{event:"REMOVE_USER_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[ts.AttendeeUpdate]:[{event:"UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",payload:e=>e}],[ts.MeetingAttributeUpdate]:[{event:"UPDATE_MEETING_ATTRIBUTE",payload:()=>{}}],[ts.PromoteAttendeeConsent]:[{event:"MEETING_WEBINAR_PROMOTE_CONSENT_REQ",payload:e=>{let{req_id:t,sender_id:r}=e;return{reqId:t,senderId:r}}}],[ts.ActiveAppsUpdate]:[{event:"ACTIVE_APPS_UPDATE",payload:()=>{}}]};let os;!function(e){e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change",e.ChatDeleteMessage="chat-delete-message"}(os||(os={}));const is={[os.ChatOnMessage]:[{event:"CHAT_RECEIVE_MESSAGE_EVENTS",payload:e=>e}],[os.ChatPrivilegeChange]:[{event:"CHAT_PRIVILEGE_CHANGE",payload:e=>e}],[os.ChatDeleteMessage]:[{event:"CHAT_DELETE_MESSAGE_REPONSE",payload:e=>e}]};let ss;!function(e){e.CommandChannelStatus="command-channel-status",e.CommandChannelMessage="command-channel-message"}(ss||(ss={}));const as={[ss.CommandChannelStatus]:[{event:"COMMAND_STATUS_EVENTS",payload:e=>e}],[ss.CommandChannelMessage]:[{event:"COMMAND_RECEIVE_MESSAGE_EVENTS",payload:e=>e}]};let cs,us;!function(e){e.Recording="Recording",e.Paused="Paused",e.Stopped="Stopped"}(exports.RecordingStatus||(exports.RecordingStatus={})),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"}(cs||(cs={})),function(e){e.RecordingChange="recording-change",e.LocalRecordingChange="local-recording-change"}(us||(us={}));const ds={[us.RecordingChange]:[{event:"CLOUD_RECORDING_STATUS_CHANGE",payload:e=>{const{cmrServerStatus:t}=e;return t===cs.Start?exports.RecordingStatus.Recording:t===cs.Pause?exports.RecordingStatus.Paused:exports.RecordingStatus.Stopped}}],[us.LocalRecordingChange]:[{event:"LOCAL_RECORDING_CHANGE",payload:e=>e}]};let ls,ps,hs;!function(e){e[e.InitSuccess=1]="InitSuccess",e[e.InitSuccessVideo=1.1]="InitSuccessVideo",e[e.InitSuccessAudio=1.2]="InitSuccessAudio",e[e.InitSuccessSharing=1.3]="InitSuccessSharing",e[e.UserGrantCaptureAudio=2]="UserGrantCaptureAudio",e[e.CurrentVideoResolution=3]="CurrentVideoResolution",e[e.JpegDecThreadOk=4]="JpegDecThreadOk",e[e.JpegData=5]="JpegData",e[e.SharingPara=6]="SharingPara",e[e.VideoDecodeMaxSize=7]="VideoDecodeMaxSize",e[e.CurrentCaptureVideoWidthHeight=8]="CurrentCaptureVideoWidthHeight",e[e.StartVideoCaptureSuccess=9]="StartVideoCaptureSuccess",e[e.StopVideoCaptureSuccess=10]="StopVideoCaptureSuccess",e[e.StartRemoteControlSuccess=11]="StartRemoteControlSuccess",e[e.CancelRemoteControlSuccess=12]="CancelRemoteControlSuccess",e[e.RemoteControlCopiedTextNotify=13]="RemoteControlCopiedTextNotify",e[e.MonitorLog=14]="MonitorLog",e[e.CurrentDesktopSharingWidthHeight=15]="CurrentDesktopSharingWidthHeight",e[e.DesktopSharingCaptureSuccess=16]="DesktopSharingCaptureSuccess",e[e.CheckChromeSharingExtensionResponse=17]="CheckChromeSharingExtensionResponse",e[e.SharingDecodeMaxSize=18]="SharingDecodeMaxSize",e[e.DataChannelOffer=19]="DataChannelOffer",e[e.AesGcmIvResponse=21]="AesGcmIvResponse",e[e.SharingDesktopStreamHaveAudio=23]="SharingDesktopStreamHaveAudio",e[e.JoinComputerAudioComplete=24]="JoinComputerAudioComplete",e[e.JoinSharingAudioComplete=25]="JoinSharingAudioComplete",e[e.LeaveComputerAudioComplete=26]="LeaveComputerAudioComplete",e[e.LeaveSharingAudioComplete=27]="LeaveSharingAudioComplete",e[e.StartVideoStreamInVbSettingSuccess=94]="StartVideoStreamInVbSettingSuccess",e[e.VbModelPreloading_3S=96]="VbModelPreloading_3S",e[e.VbModelPreloading_10S=97]="VbModelPreloading_10S",e[e.VbModelPreloadingOk=98]="VbModelPreloadingOk",e[e.InitFailed=-1]="InitFailed",e[e.InitFailedVideo=-1.1]="InitFailedVideo",e[e.InitFailedAudio=-1.2]="InitFailedAudio",e[e.InitFailedSharing=-1.3]="InitFailedSharing",e[e.UserForbiddedCaptureAudio=-2]="UserForbiddedCaptureAudio",e[e.AudioWebsocketBroken=-3]="AudioWebsocketBroken",e[e.VideoWebsocketBroken=-4]="VideoWebsocketBroken",e[e.SharingDecThreadFailed=-5]="SharingDecThreadFailed",e[e.AudioZeroData=-6]="AudioZeroData",e[e.AudioCtxSamplerate=-7]="AudioCtxSamplerate",e[e.UserForbiddedCaptureVideo=-8]="UserForbiddedCaptureVideo",e[e.UserCameraIsTakenByOtherPrograms=-9]="UserCameraIsTakenByOtherPrograms",e[e.StopVideoCaptureFailed=-10]="StopVideoCaptureFailed",e[e.StartRemoteControlFailed=-11]="StartRemoteControlFailed",e[e.CancelRemoteControlFailed=-12]="CancelRemoteControlFailed",e[e.RemoteControlPasteTextLengthOverflow=-14]="RemoteControlPasteTextLengthOverflow",e[e.UserStopDesktopSharing=-15]="UserStopDesktopSharing",e[e.UserCancelPermissionRequest=-16]="UserCancelPermissionRequest",e[e.DesktopSharingChromeExtensionUninstalled=-17]="DesktopSharingChromeExtensionUninstalled",e[e.DesktopSharingPermissionDenied=-18]="DesktopSharingPermissionDenied",e[e.DesktopSharingTimeOut=-19]="DesktopSharingTimeOut",e[e.DesktopSharingError=-20]="DesktopSharingError",e[e.DesktopSharingSystemError=-22]="DesktopSharingSystemError",e[e.SharingDesktopStreamHaveNoAudio=-27]="SharingDesktopStreamHaveNoAudio",e.audioQosData="AUDIO_QOS_DATA",e.videoQosData="VIDEO_QOS_DATA",e[e.AudioBridgeReconnectStart=-29]="AudioBridgeReconnectStart",e[e.AudioBridgeReconnectEnd=-31]="AudioBridgeReconnectEnd",e[e.VbSettingParaError=-34]="VbSettingParaError"}(ls||(ls={})),function(e){e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed"}(ps||(ps={})),function(e){e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk"}(hs||(hs={})),function(e){e.Active="active",e.PassiveByMuteOne="passive(mute one)",e.PassiveByMuteAll="passive(mute all)",e.SharingAudio="sharing audio"}(exports.MutedSource||(exports.MutedSource={})),function(e){e.Join="join",e.Leave="leave",e.Muted="muted",e.Unmuted="unmuted"}(exports.AudioChangeAction||(exports.AudioChangeAction={})),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"}(exports.DialoutState||(exports.DialoutState={}));const fs=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"}),vs=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 _s,ms,ys,gs,Ss,Es,bs,As;!function(e){e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare"}(exports.SharePrivilege||(exports.SharePrivilege={})),function(e){e.Sharing="sharing",e.Paused="paused",e.End="ended"}(exports.ShareStatus||(exports.ShareStatus={})),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"}(exports.VideoQuality||(exports.VideoQuality={})),function(e){e.Active="Active",e.Inactive="Inactive"}(exports.VideoActiveState||(exports.VideoActiveState={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted"}(_s||(_s={})),function(e){e.Active="Active",e.Inactive="Inactive"}(ms||(ms={})),function(e){e.Success="Success",e.Failed="Failed",e.Initial="Initial"}(ys||(ys={})),function(e){e.Started="Started",e.Stopped="Stopped",e.Failed="Failed"}(exports.VideoCapturingState||(exports.VideoCapturingState={})),function(e){e.Approved="Approved",e.Rejected="Rejected"}(gs||(gs={})),function(e){e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture",e.ShareFromMainSession="ShareFromMainSession"}(exports.PassiveStopShareReason||(exports.PassiveStopShareReason={})),function(e){e.Muted="Muted",e.Unmuted="Unmuted",e.NoAudio="NoAudio",e.Phone="Phone"}(Ss||(Ss={})),function(e){e[e.ImageNotMatch=2]="ImageNotMatch",e[e.CanvasNotMatch=3]="CanvasNotMatch",e[e.VBModelNotMatch=4]="VBModelNotMatch"}(Es||(Es={})),function(e){e.VideoEncode="0",e.VideoDecode="1",e.AudioEncode="2",e.AudioDecode="3",e.SharingEncode="4",e.SharingDecode="5"}(bs||(bs={})),function(e){e[e.NotConnect=0]="NotConnect",e[e.Connecting=1]="Connecting",e[e.ConnectSuccess=2]="ConnectSuccess",e[e.ConnectFail=3]="ConnectFail"}(As||(As={}));const Is={data:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0}},Cs={data:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0}};let Ts;!function(e){e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change"}(Ts||(Ts={}));const Os={[Ts.DeviceChange]:[{event:"MEDIA_DEVICE_CHANGE",payload:()=>({})}],[Ts.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"})}]},ws={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","VIDEO_VITRUAL_BACKGROUND_FAILED"]};let Rs;!function(e){e.VideoActiveChange="video-active-change",e.PeerVideoStateChange="peer-video-state-change",e.VideoSpotlightChange="video-spotlight-change",e.VideoMutedChange="video-muted-change",e.VideoCapturingChange="video-capturing-change",e.AskForStartVideoConsent="ask-for-start-video-consent",e.VideoDimensionChange="video-dimension-change",e.VideoFollowHostOrder="video-follow-host-order-change",e.VideoHostLayoutChange="video-host-layout-change",e.VideoVBPreloadChange="video-virtual-background-preload-change",e.VideoStatisticDataChange="video_statistic_data_change"}(Rs||(Rs={}));const Ds={[Rs.VideoActiveChange]:[{event:"RECEIVE_VIDEO_ACTIVE_INDICATION",payload:e=>({state:e.bVideoOn?exports.VideoActiveState.Active:exports.VideoActiveState.Inactive,userId:e.userId})}],[Rs.VideoCapturingChange]:[{event:"VIDEO_CAPTURE_START_SUCCESS",payload:()=>({state:exports.VideoCapturingState.Started})},{event:"VIDEO_CAPTURE_STOP_RESULT",payload:e=>({state:null!=e&&e.failed?exports.VideoCapturingState.Failed:exports.VideoCapturingState.Stopped})}],[Rs.VideoMutedChange]:[{event:"RECEIVE_VIDEO_MUTE_INDICATION",payload:e=>({state:e.isVideoMuted?_s.Muted:_s.Unmuted,userId:e.id})}],[Rs.AskForStartVideoConsent]:[{event:"ASK_FOR_START_VIDEO_CONSENT",payload:e=>({state:e.isVideoMuted?_s.Muted:_s.Unmuted,userId:e.id})}],[Rs.VideoSpotlightChange]:[{event:"VIDEO_SPOTLIGHT_CHANGE",payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map(e=>({userId:e}))})}],[Rs.VideoDimensionChange]:[{event:"RECEIVE_VIDEO_DIMENSION_CHANGE",payload:e=>({type:"received",width:e.width,height:e.height})}],[Rs.VideoFollowHostOrder]:[{event:"VIDEO_FOLLOW_HOST_ORDER_CHANGE",payload:e=>({isFollowHostOrder:e.bOn})}],[Rs.VideoHostLayoutChange]:[{event:"VIDEO_HOST_DRAG_LAYOUT_CHANGE",payload:e=>Array.isArray(e.layout)?e.layout.map(e=>({userId:e})):[]}],[Rs.PeerVideoStateChange]:[{event:"VIDEO_NEW_USER_START",payload:e=>c({action:"Start"},e)},{event:"VIDEO_OLD_USER_STOP",payload:e=>c({action:"Stop"},e)}],[Rs.VideoVBPreloadChange]:[{event:"VIDEO_VIRTUAL_BACKGROUND_PRELOAD_READY",payload:e=>({isReady:e})}],[Rs.VideoStatisticDataChange]:[{event:"VIDEO_STATISTIC_DATA",payload:e=>e}]};let Ns;!function(e){e.ActiveSpeaker="active-speaker",e.UnmuteAudioConsent="unmute-audio-consent",e.CurrentAudioChange="current-audio-change",e.DialoutStateChange="dialout-state-change",e.MergeAudio="merged-audio",e.AutoPlayFailed="auto-play-audio-failed",e.AllowTalkChange="allow-talk-change",e.ShareAudioChange="share-audio-change",e.AudioStatisticDataChange="audio_statistic_data_change"}(Ns||(Ns={}));const Ps={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"}},Ms={[Ns.ActiveSpeaker]:[{event:"AUDIO_ACTIVE_SPEAKER",payload:e=>e}],[Ns.UnmuteAudioConsent]:[{event:"AUDIO_UNMUTE_CONSENT",payload:e=>({reason:e})}],[Ns.CurrentAudioChange]:[{event:"AUDIO_CURRENT_USER_JOIN_BY_PHONE",payload:()=>({action:exports.AudioChangeAction.Join,type:"phone"})},{event:"AUDIO_CURRENT_USER_JOIN_BY_VOIP",payload:()=>({action:exports.AudioChangeAction.Join,type:"computer"})},{event:"AUDIO_CURRENT_USER_LEAVE_AUDIO",payload:()=>({action:exports.AudioChangeAction.Leave})},{event:"AUDIO_CURRENT_USER_MUTED",payload:e=>{let{source:t}=e;return{action:exports.AudioChangeAction.Muted,source:t}}},{event:"AUDIO_CURRENT_USER_UNMUTED",payload:e=>{let{source:t}=e;return{action:exports.AudioChangeAction.Unmuted,source:t}}}],[Ns.DialoutStateChange]:[{event:"AUDIO_DIALOUT_RESULT_CODE",payload:e=>e}],[Ns.MergeAudio]:[{event:"AUDIO_MERGE_AUDIO_INDICATION",payload:e=>e}],[Ns.AutoPlayFailed]:[{event:"AUDIO_AUTO_PLAY_FAILED",payload:()=>{}}],[Ns.AllowTalkChange]:[{event:"AUDIO_ALLOW_TALK_CHANGE",payload:e=>({enabled:e})}],[Ns.ShareAudioChange]:[{event:"SHARE_AUDIO_STATE_CHANGE",payload:e=>e}],[Ns.AudioStatisticDataChange]:[{event:"AUDIO_STATISTIC_DATA",payload:e=>e}]};let ks;!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"}(ks||(ks={}));const Us={[ks.ShareActiveChange]:[{event:"SHARE_ACTIVE_INDICATION",payload:e=>{const{isActive:t,activeUserId:r}=e;return c({state:t?"Active":"Inactive",userId:r},d(e,["isActive","activeUserId"]))}}],[ks.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})}],[ks.SharePassiveStop]:[{event:"SHARE_VIDEO_STREAMS_END",payload:()=>({reason:exports.PassiveStopShareReason.StopScreenCapture})},{event:"SHARE_PASSIVE_STOP_SHARE",payload:()=>({reason:exports.PassiveStopShareReason.PrivilegeChange})},{event:"SHARE_PASSIVE_BO_STOP",payload:()=>({reason:exports.PassiveStopShareReason.ShareFromMainSession})}],[ks.SharePeerStateChange]:[{event:"SHARE_NEW_USER_ADD",payload:e=>({userId:e.id,action:"Start"})},{event:"SHARE_USER_REMOVE",payload:e=>({userId:e.id,action:"Stop"})}],[ks.ShareContentChange]:[{event:"SHARE_AUTO_CHANGE_SOURCE",payload:e=>e}],[ks.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?gs.Approved:gs.Rejected})}],[ks.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[ks.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[ks.SharePrivilegeChange]:[{event:"SHARE_PRIVILEGE_CHANGE",payload:e=>({privilege:e})}]},Ls="INVALID_OPERATION",Vs="INVALID_PARAMETERS";let xs;!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"}(xs||(xs={}));const js={[xs.InviteToJoin]:[{event:"BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",payload:e=>e}],[xs.RoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_COUTDOWN",payload:e=>e}],[xs.RoomTimeUp]:[{event:"BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",payload:e=>e}],[xs.ClosingRoomCountdown]:[{event:"BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",payload:e=>e}],[xs.BroadcastMessage]:[{event:"BREAKOUT_ROOM_BROADCAST_MESSAGE",payload:e=>e}],[xs.AskForHelp]:[{event:"BREAKOUT_ROOM_ASK_HELP_REQUEST",payload:e=>e}],[xs.AskForHelpResponse]:[{event:"BREAKOUT_ROOM_ASK_HELP_RESPONSE",payload:e=>e}],[xs.RoomStateChange]:[{event:"BREAKOUT_ROOM_ATTRIBUTE_INDICATION",payload:e=>({status:e.controlStatus})}],[xs.MainSessionUserUpdate]:[{event:"BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE",payload:()=>({})}]},Hs=c(c(c(c(c(c(c(c(c(c(c({},ns),{"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}]}),is),as),ds),Ms),Ds),{"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}]}),Us),Os),js),Fs=(Bs=Bs||Object.create(null),{on:function(e,t){(Bs[e]||(Bs[e]=[])).push(t)},off:function(e,t){Bs[e]&&Bs[e].splice(Bs[e].indexOf(t)>>>0,1)},emit:function(e,t){(Bs[e]||[]).slice().map((function(e){e(t)})),(Bs["*"]||[]).slice().map((function(r){r(e,t)}))}});var Bs;const Gs=new Map,Ws=new Array,Ks=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;Fs.emit(e,t)},qs=e=>new Promise((t,r)=>{e.fail&&e.fail.length>0?it(Qe(Fs,e.success).pipe(yt(1)),$e(...e.fail.map(e=>Qe(Fs,e).pipe(yt(1),Fe(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)}):Qe(Fs,e.success).pipe(yt(1)).subscribe(e=>t(e))}),zs=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=Qe(Fs,e).pipe(yt(1)):(i=Qe(Fs,e.event),e.operations&&(i=e.operations.reduce((e,t)=>e.pipe(t),i))),it(i,ct(r).pipe(It(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"})})})},Js=(e,t)=>void 0!==t?Qe(Fs,e).pipe(yt(t)):Qe(Fs,e),Qs=()=>{Ws.forEach(e=>{e.unsubscribe()}),Ws.length=0,Gs.clear()},{setAttendeesList:Ys,setXmppAttendeeList:Zs,setIsAdmitAllSilentUsers:Xs,resetParticipants:$s,addFailoverAttendees:ea,removeFailoverAttendees:ta,setClearRaiseHand:ra,setClearAttendeeFeedback:na}=Ur({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 oa=function(e,t){return e===t};function ia(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 sa=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,d);function p(){var t=l.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),u){var r=l.getEntries(),n=r.find((function(e){return u(e.value,t)}));n&&(t=n.value)}l.put(arguments,t)}return t}return p.clearCache=function(){return l.clear()},p}));const aa=e=>{let{participants:{attendeesList:t}}=e;return t};let ca,ua,da;!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"}(ca||(ca={})),function(e){e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee"}(ua||(ua={})),function(e){e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323"}(da||(da={}));const la=e=>(e&ca.Host)===ca.Host,pa=e=>(e&da.Phone)===da.Phone,ha=e=>e===ca.ViewOnlyCanTalk,fa=e=>(e&ca.ViewOnly)===ca.ViewOnly;let va,_a,ma,ya,ga,Sa;!function(e){e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually"}(va||(va={})),function(e){e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed"}(_a||(_a={})),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"}(ma||(ma={})),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"}(ya||(ya={})),function(e){e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO"}(ga||(ga={})),function(e){e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom"}(Sa||(Sa={}));const Ea=sa([e=>{let{meeting:{userId:t}}=e;return t},aa],(e,t)=>t.find(t=>t.userId===e)),ba=sa([Ea],e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost)),Aa=sa([Ea],e=>null==e?void 0:e.isHost),Ia=sa([e=>{let{participants:{xmppAttendeeList:t}}=e;return t}],e=>e.filter(e=>e.userRole===ua.Attendee)),Ca=sa([aa],e=>e.filter(e=>e.bHold&&!e.bid)),Ta=sa([aa,e=>{let{breakoutRoom:t}=e;return t&&t.controlStatus},e=>{let{breakoutRoom:t}=e;return t&&t.currentRoom.status}],(e,t,r)=>t!==_a.InProgress&&t!==_a.Closing||r!==ya.InRoom?e.filter(e=>!e.bHold&&!e.bid):e.filter(e=>!e.bHold)),Oa=sa([Ta],e=>e.find(e=>e.isHost)),wa=sa([Ta],e=>e.filter(e=>e.bCoHost)),Ra=sa([Ea,Ta],(e,t)=>t.filter(t=>t.userId!==(null==e?void 0:e.userId)));let Da;!function(e){e.Closed="closed",e.Connecting="connecting",e.Connected="connected"}(Da||(Da={}));const{setAsnIds:Na,setIsCanUnmute:Pa,setDialoutSequence:Ma,setDialoutResultCode:ka,setIsAllowToTalk:Ua,setIsHostMuteAll:La,setIsActiveOperation:Va,setAudioSsrc:xa,setIsMutedUponEntry:ja,setIsUserGrantCaptureAudio:Ha,setIsMicrophoneForbidden:Fa,setWebrtcRestartCount:Ba,setMicrophoneList:Ga,setSpeakerList:Wa,setActiveMicrophone:Ka,setActiveSpeaker:qa,setCanPlayAudio:za,resetAudio:Ja,setIsComputerAudioLoading:Qa,setIsSpeakerOnly:Ya,setIsAllowToTalkAttendeeConnected:Za,setIsMuteBeforeSharingAudio:Xa,addLocalShareAudioUser:$a,updateLocalShareAudioUser:ec,setIsJoinComputerAudioBeforeSharingAudio:tc,setIsShareAudioEnabled:rc,setIsShareAudioMuted:nc,setIsSharingAudio:oc,setAudioDataEncoding:ic,setAudioDataDecoding:sc}=Ur("SET_ASN_IDS","SET_IS_CAN_UNMUTE","SET_DIALOUT_SEQUENCE","SET_DIALOUT_RESULT_CODE","SET_IS_ALLOW_TO_TALK","SET_IS_HOST_MUTE_ALL","SET_IS_ACTIVE_OPERATION","SET_AUDIO_SSRC","SET_IS_MUTED_UPON_ENTRY","SET_IS_USER_GRANT_CAPTURE_AUDIO","SET_IS_MICROPHONE_FORBIDDEN","SET_WEBRTC_RESTART_COUNT","SET_MICROPHONE_LIST","SET_SPEAKER_LIST","SET_ACTIVE_MICROPHONE","SET_ACTIVE_SPEAKER","SET_CAN_PLAY_AUDIO","RESET_AUDIO","SET_IS_COMPUTER_AUDIO_LOADING","SET_IS_SPEAKER_ONLY","SET_IS_ALLOW_TO_TALK_ATTENDEE_CONNECTED","SET_IS_MUTE_BEFORE_SHARING_AUDIO","SET_IS_SHARING_AUDIO","ADD_LOCAL_SHARE_AUDIO_USER","UPDATE_LOCAL_SHARE_AUDIO_USER","SET_IS_JOIN_COMPUTER_AUDIO_BEFORE_SHARING_AUDIO","SET_IS_SHARE_AUDIO_ENABLED","SET_IS_SHARE_AUDIO_MUTED","SET_AUDIO_DATA_ENCODING","SET_AUDIO_DATA_DECODING"),{setSharePrivilege:ac,setShareActiveNode:cc,setIsReceiveSharing:uc,setIsChromeExtensionInstalled:dc,setIsScreenShareForbidden:lc,setShareDimension:pc,setShareStatus:hc,setShareSsrc:fc,setShareQuality:vc,setReceivedShareDimension:_c,setIsRemoteControlApproved:mc,setIsGrabRemoteControl:yc,setIsVerifiedSharingRenderCanvasAfterFailover:gc,setIsVerifiedSharingCaptureCanvasAfterFailover:Sc,setIsSdkGrabControl:Ec,setIsReceiveSharingFromMainSession:bc,setIsSharingToBreakoutRoom:Ac,resetShare:Ic}=Ur("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:Cc,setActiveVideoId:Tc,setCameraList:Oc,setActiveCamera:wc,setIsCurrentUserStartedVideo:Rc,setSpotlightVideo:Dc,setIsCaptureForbidden:Nc,setVideoMaxQuality:Pc,setCaptureCanvasList:Mc,setIsVideoMuted:kc,setIsCaptureCameraLoading:Uc,setIsCameraTaken:Lc,setIsVerifiedVideoRenderCanvasAfterFailover:Vc,setIsVerifiedVideoCaptureCanvasAfterFailover:xc,resetVideo:jc,setReceivedVideoDimension:Hc,addSubscribedVideoId:Fc,removeSubscribedVideoId:Bc,setIsFollowHostVideoLayout:Gc,setHostDragLayout:Wc,addRenderedVideoId:Kc,removeRenderedVideoId:qc,setIsSupportHdVideo:zc,setHighDefinitionVideoId:Jc,setIsCanUnmuteVideo:Qc,setIsVbPreloadReady:Yc,setIsVbConfiged:Zc,setVbImageSrc:Xc,setVideoDataEncoding:$c,setVideoDataDecoding:eu,setHardwareAccelerationState:tu}=Ur("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","SET_IS_VB_PRELOAD_READY","SET_IS_VB_CONFIGED","SET_VB_IMAGE_SRC","SET_VIDEO_DATA_ENCODING","SET_VIDEO_DATA_DECODING","SET_HARDWARE_ACCELERATION_STATE"),{setTempSetting:ru,setSetting:nu,setQuestionList:ou,setQuestionUpVoted:iu,resetQa:su}=Ur("SET_TEMP_SETTING","SET_SETTING","SET_QUESTION_LIST","SET_QUESTION_UP_VOTED","SET_SELF_LIVE_ANSWER","RESET_QA"),{setChatPrivilege:au,addChatMessageHistory:cu,resetChat:uu,setIsAllowAttendeeChat:du,setLatestChatMessageId:lu,removeChatMessage:pu}=Ur("SET_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT","SET_LATEST_CHAT_MESSAGE_ID","REMOVE_CHAT_MESSAGE"),{setCcEditorInfo:hu,setTempSendCcText:fu,setCcLtMessage:vu,setTempReceiveLtText:_u,setTempReceiveCcText:mu,setGatewayInfoList:yu,setLtEnable:gu,setIsListenClosedCaption:Su,setCcEnable:Eu,allowParticipantAskLt:bu,receiveAskStartLt:Au,setMeetingEnabledLtFeature:Iu,updateLtStatus:Cu,deleteMessage:Tu,updateMessage:Ou,resetClosedCaption:wu}=Ur("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:Ru,setBreakoutRoomAllocationPattern:Du,setBreakoutRoomSequenceId:Nu,setMeetingElapsedTime:Pu,setStartRoomElapsedTime:Mu,setBreakoutRoomOptions:ku,setBreakoutRoomControlStatus:Uu,setBreakoutRooms:Lu,setCurrentBreakoutRoom:Vu,setBreakoutRoomAttendeeStatus:xu,setBreakoutRoomConfId:ju,setBreakoutRoomToken:Hu,resetBreakoutRoom:Fu,setBreakoutRoomClosingRoomTime:Bu,setBreakoutRoomBroadcastMessage:Gu,setBreakoutRoomHostReplyType:Wu,setBreakoutRoomHostReplyRequestId:Ku,setMainSessionAttendeeList:qu,setIsHugeBreakoutRoom:zu,setBreakoutRoomUpdatedUserRoleCount:Ju,setBreakoutRoomPreAssignedRoomList:Qu}=Ur("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"),Yu=(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())},Zu=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=[Ko("closed")];if("joined"===i){const t=es.getInstance(),r=Ki.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||(ui.clearSession(),[wi.WebclientTk,wi.WebclientZsk,wi.WebclientZtk].forEach(e=>{sessionStorage.removeItem(e)}),Mi.destroy()),r!==Da.Closed&&s.push(Wr()),n!==Da.Closed&&s.push(Kr()),o!==Da.Closed&&s.push(Zr()),t){const t=Ea(e);s.push(Vo({audio:null==t?void 0:t.audio,muted:null==t?void 0:t.muted,video:null==t?void 0:t.bVideoOn}))}else s.push(Vo({audio:!1,muted:void 0,video:!1}));return s.push(dn(),En(),$s(),Ja(),Ic(),jc(),su(),uu(),wu(),Fu()),s},Xu=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;nt.find(t=>t.userId===e)),tt(e=>!!e),yt(1)]},...r)};function $u(e){return j(Oe((t,r)=>e(t,r)),tt(e=>null!=e))}function ed(e){return j(Fe((t,r)=>e(t,r)||ee))}function td(e){return j(Nt((t,r)=>e(t,r)||ee))}function rd(e){return j(Fe((t,r)=>e(t,r)),Fe(e=>Array.isArray(e)?Ve(e):ae(e)))}const nd=(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}},od={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},id={["".concat(Ui)]:()=>({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 sd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:od;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=nd(()=>{o=0},s));const u=Object.keys(id),d=t.subscribe({next(e){if(e&&e.evt&&null!==i){o+=1;const{evt:t,body:i}=e,s=String(t);if(u.indexOf(s)>=0)if(c){const e=n.get(s);if(e)e.onThrottle(i);else{const e=id[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=id[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()=>{d.unsubscribe(),i&&(i(),i=null),o=0}})}sa([Ta,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 ad=sa([Ta],e=>e.filter(e=>e.sharerOn||e.sharerPause));class cd{constructor(e){this._cancelError=new Error("request for lock canceled"),this._locked=void 0,this._queue=[],this._waiters=[],this._currentReleaser=void 0,e&&(this._cancelError=e),this._locked=!1}acquire(){const e=this.isLocked(),t=new Promise((e,t)=>{this._queue.push({resolve:e,reject:t})});return e||this._dispatch(),t}async runExclusive(e){const t=await this.acquire();try{return await e()}finally{t()}}async waitForUnlock(){return this.isLocked()?new Promise(e=>this._waiters.push({resolve:e})):Promise.resolve()}isLocked(){return this._locked}release(){if(this._currentReleaser){const e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatch(){const e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._locked=!1,this._resolveWaiters(),this._dispatch())},this._locked=!0,e.resolve(this._currentReleaser)}_resolveWaiters(){this._waiters.forEach(e=>e.resolve()),this._waiters=[]}}const ud=(e,t,r)=>ze(...[t,r].map((t,r)=>{if("initial"!==t)return Ve(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return it(Js("".concat(e.toUpperCase(),"_").concat(t,"_SUCCESS"),1).pipe(Et(!0)),Js("".concat(e.toUpperCase(),"_").concat(t,"_FAIL"),1).pipe(Et(!1)))}})),dd=e=>{const t=Ea(e.value);return t?ae(t):Js("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",1).pipe(le(Se),jt(e),Oe(e=>{let[,t]=e;return Ea(t)}))},ld=()=>Ve(navigator.mediaDevices.enumerateDevices()).pipe(Oe(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 pd(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}function hd(){return mi()}const fd=(()=>{const e=new cd;return{withAudioAction:t=>function(){for(var r=arguments.length,n=new Array(r),o=0;o{let i=!1;const s=setTimeout(()=>{i=!0,o(new Error("Operation Timeout!"))},3e4);try{const o=await e.acquire();i?o():(clearTimeout(s),r(t(...n)))}catch(e){i||(clearTimeout(s),o(e))}})},processAudioAction:t=>e.acquire().then(()=>t()),completeAudioAction:()=>{e.release()},cancelAllAudioAction:()=>{e.cancel()}}})();function vd(e){const t=["joinComputerAudio","joinSharingAudio","leaveComputerAudio","leaveSharingAudio"];return new Proxy(e,{get:(e,r)=>"string"==typeof r&&t.includes(r)?function(){return fd.withAudioAction(e[r].bind(e))(...arguments)}:Reflect.get(e,r)})}function _d(){var e,t;const r=_i()&&Number(null===(e=di())||void 0===e||null===(t=e.match(/\d+$/))||void 0===t?void 0:t[0])>=91,n=navigator.hardwareConcurrency>2;return!Ii()&&Ei()&&Si()&&r&&n}const md=Ki.createAgent();var yd=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>Cn(e,Li).pipe(tt(e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.lockShare)}),jt(t),kt(e=>{let[t,r]=e;const{share:{sharePrivilege:n}}=r,{payload:{body:{lockShare:o}}}=t;n!==o&&Ks("SHARE_PRIVILEGE_CHANGE",o)}),Oe(e=>{let[t]=e;return ac(t.payload.body.lockShare)})),shareSSrcEpic:e=>Cn(e,20227).pipe(Oe(e=>fc(e.payload.body.ssrc))),shareStatusChangeEpic:(e,t)=>Cn(e,20225).pipe(jt(t),tt(e=>{let[t,r]=e;const{payload:{body:n}}=t,{share:{isReceiveSharingFromMainSession:o}}=r;return!o||o&&n.fromMainSession}),Oe(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)===ya.InRoom&&a.mainSessionAttendeeList.length>0&&(e=a.mainSessionAttendeeList.findIndex(e=>e.userId===o)>-1),md.unsubscribeSharing(o,e),md.subscribeSharing(c.activeNodeID,i,s),es.getInstance().switchSharingSource(c.ssrc,s),Ks("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}),Ks("SHARE_ACTIVE_INDICATION",e)}else if(n){const e={activeUserId:c.activeNodeID,isActive:!1};s&&Object.assign(e,{isFromMainSession:!0}),Ks("SHARE_ACTIVE_INDICATION",e)}return cc(c)})),handleChromeExtensionEpic:e=>Rn(e,ls.CheckChromeSharingExtensionResponse).pipe(Oe(e=>(Ks("SHARE_CHECK_CHROME_SHARING_EXTENSION",e.payload.data),dc(e.payload.data)))),handleSDKShareSuccessEpic:(e,t)=>Rn(e,[ls.SharingDesktopStreamHaveAudio,ls.SharingDesktopStreamHaveNoAudio]).pipe(jt(t),Oe(e=>{let[t,r]=e;const{meeting:{userId:n},share:{isSharingToBreakoutRoom:o}}=r,{payload:{type:i}}=t,s=i===ls.SharingDesktopStreamHaveAudio;return md.startSharing(n,{bShareToBO:o,bShareAudio:s}),lc(!1)})),handleSDKShareErrorEpic:e=>Rn(e,[ls.DesktopSharingError,ls.DesktopSharingChromeExtensionUninstalled,ls.DesktopSharingPermissionDenied,ls.DesktopSharingSystemError]).pipe(Fe(e=>{const t=[];let r="";return[ls.DesktopSharingPermissionDenied,ls.DesktopSharingSystemError].includes(e.payload.type)&&(t.push(lc(!0)),e.payload.type===ls.DesktopSharingSystemError?/mac/i.test(navigator.platform)&&(r="To use screen share on Chrome, please allow screen recording access in system setting."):r="To use screen share, please allow the permission request."),Ks("SHARE_START_DESKTOP_SHARE_FAILED",{reason:r}),Ve(t)})),handleSDKShareDimensionChangeEpic:e=>Rn(e,ls.CurrentDesktopSharingWidthHeight).pipe(tt(e=>!!e.payload.data),Oe(e=>{Ks("SHARE_DIMENSION_CHANGE",e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return es.getInstance().ajustmentSharingCanvas(t,r),pc(e.payload.data)})),handleSDKReceivedShareSizeChangeEpic:(e,t)=>Rn(e,ls.SharingDecodeMaxSize).pipe(tt(e=>!!e.payload.data),jt(t),$u(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 md.subscribeSharing(o,a,i),vc(a)})),handleRWGShareOriginalDimensionEpic:e=>Cn(e,20226).pipe(kt(e=>{var t,r;if(Ks("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;es.getInstance().ajustmentReceivedSharingCanvas(t,r)}}),Oe(e=>_c(e.payload.body))),handleSDKShareOriginalDimensionEpic:e=>Rn(e,ls.SharingPara).pipe(kt(e=>{var t,r;if(Ks("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;es.getInstance().ajustmentReceivedSharingCanvas(t,r)}}),Oe(e=>{var t;return _c(null===(t=e.payload.data)||void 0===t?void 0:t.body)})),handleSDKStopShareEpic:(e,t)=>Rn(e,ls.UserStopDesktopSharing).pipe(jt(t),Oe(e=>{let[,t]=e;const{meeting:{userId:r},share:{status:n}}=t;return n!==exports.ShareStatus.End&&(md.stopSharing(r),Ks("SHARE_VIDEO_STREAMS_END")),hc(exports.ShareStatus.End)})),handleRWGCurrentUserShareChangeEpic:(e,t)=>Cn(e,Ui).pipe(jt(t),tt(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}),Fe(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),u=a.find(e=>e.id===n&&!0===e.bShareOn),d=[],l=es.getInstance();return c&&o!==exports.ShareStatus.End&&(md.stopSharing(n),l.stopDesktopSharing(),d.push(hc(exports.ShareStatus.End)),Ks("SHARE_PASSIVE_STOP_SHARE")),u&&o===exports.ShareStatus.End&&(i&&(l.stopRenderSharing(),md.unsubscribeSharing(s),d.push(uc(!1))),d.push(hc(exports.ShareStatus.Sharing))),Ve(d)})),handleMultipleShareChangeEpic:(e,t)=>Cn(e,Ui).pipe(jt(t),tt(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}),Fe(r=>{let[n,o]=r;const{payload:{body:{update:i}}}=n,{share:{activeNodeId:s,isReceiveSharing:a,shareQuality:c,isReceiveSharingFromMainSession:u}}=o,d=ad(o),l=i.filter(e=>!0===e.bShareOn&&!1===e.bSharePause),p=i.filter(e=>!1===e.bShareOn);return l.length>0&&l.forEach(e=>{-1===d.findIndex(t=>t.userId===e.id)&&Ks("SHARE_NEW_USER_ADD",e)}),p.length>0&&(p.forEach(e=>{Ks("SHARE_USER_REMOVE",e)}),a&&p.some(e=>e.id===s))?it(Cn(e,20225).pipe(yt(1),It(ee)),ct(50).pipe(It(ce("timeout")))).pipe(dt(()=>{const{share:{activeNodeId:e,isReceiveSharingFromMainSession:r,shareQuality:n},audio:o}=t.value,i=d.filter(t=>t.userId!==e);if(i.length>0){const t=i[0],{userId:s}=t;md.unsubscribeSharing(e,r),md.subscribeSharing(s,n,r);const a=es.getInstance();return a.switchSharingSource(s,r),null==o||o.localShareAudioUserMutedList.forEach(e=>{a.setSharingAudioVolume(s,e.userId!==s||e.muted)}),Ks("SHARE_AUTO_CHANGE_SOURCE",{userId:s}),ae(cc({activeNodeID:s,bStatus:1,ssrc:s}))}return ee})):ee})),handleSharingEncryptIndication:(e,t)=>Cn(e,ki).pipe(jt(t),Nt(e=>{let[r,n]=e;const{payload:{body:{encryptKey:o,additionalType:i}}}=r,{media:{sharingDecodeStatus:s,sharingEncodeStatus:a},meeting:{confId:c,userId:u,zoomId:d,meetingId:l,meetingNumber:p,isWebinar:h}}=n;return dd(t).pipe(Nt(e=>{let r=a;return h&&e&&fa(e.userRole)&&(r="failed"),ud("sharing",r,s).pipe(kt(e=>{let[r,n]=e;const s=es.getInstance(),a={userId:u,sn:_o(d),confId:c,encryptKey:_o(o),encryptType:i,meetingId:l,meetingNumber:p};if(r&&(null==s||s.updateMediaParams({iVType:Ci.SHARING_ENCODE,isFromMainSession:!1,updateParams:a})),n){s.updateMediaParams({iVType:Ci.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&&_o(e.zoomID)}));s.updateUserMediaSN({added:t,isFromMainSession:!1,iVType:Ci.SHARING_DECODE})}}}),It(ee))}))})),handleSharingReceivingChannelReadyEpic:(e,t)=>wn(e,20235).pipe(jt(t),kt(e=>{let[t,r]=e;const{media:{sharingDecodeStatus:n}}=r,{type:o,payload:{body:i}}=t,s=o==="".concat(en);ud("sharing","success",n).subscribe(e=>{let[,t]=e;t&&es.getInstance().addReceivedSharingChannelType(c({isFromMainSession:s},i))})}),It(ee)),handleSharingReceivingChannelCloseEpic:(e,t)=>wn(e,20236).pipe(jt(t),kt(e=>{let[t,r]=e;const{media:{sharingDecodeStatus:n}}=r,{type:o,payload:{body:{ssrc:i}}}=t,s=o==="".concat(en);ud("sharing","success",n).subscribe(e=>{let[,t]=e;t&&es.getInstance().removeReceivedSharingChannelType({isFromMainSession:s,ssrc:i})})}),It(ee))});function gd(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:Td(e)?2:Od(e)?3:0}function Id(e,t){return 2===Ad(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Cd(e,t,r){var n=Ad(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function Td(e){return $d&&e instanceof Map}function Od(e){return el&&e instanceof Set}function wd(e){return e.o||e.t}function Rd(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=al(e);delete t[ol];for(var r=sl(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=Nd),Object.freeze(e),t&&bd(e,(function(e,t){return Dd(t,!0)}),!0)),e}function Nd(){gd(2)}function Pd(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Md(e){var t=cl[e];return t||gd(18,e),t}function kd(){return Zd}function Ud(e,t){t&&(Md("Patches"),e.u=[],e.s=[],e.v=t)}function Ld(e){Vd(e),e.p.forEach(jd),e.p=null}function Vd(e){e===Zd&&(Zd=e.l)}function xd(e){return Zd={p:[],l:Zd,h:e,m:!0,_:0}}function jd(e){var t=e[ol];0===t.i||1===t.i?t.j():t.O=!0}function Hd(e,t){t._=t.p.length;var r=t.p[0],n=void 0!==e&&e!==r;return t.h.g||Md("ES5").S(t,e,n),n?(r[ol].P&&(Ld(t),gd(4)),Ed(e)&&(e=Fd(t,e),t.l||Gd(t,e)),t.u&&Md("Patches").M(r[ol],e,t.u,t.s)):e=Fd(t,r,[]),Ld(t),t.u&&t.v(t.u,t.s),e!==rl?e:void 0}function Fd(e,t,r){if(Pd(t))return t;var n=t[ol];if(!n)return bd(t,(function(o,i){return Bd(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return Gd(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=Rd(n.k):n.o;bd(3===n.i?new Set(o):o,(function(t,i){return Bd(e,n,o,t,i,r)})),Gd(e,o,!1),r&&e.u&&Md("Patches").R(n,r,e.u,e.s)}return n.o}function Bd(e,t,r,n,o,i){if(Sd(o)){var s=Fd(e,o,i&&t&&3!==t.i&&!Id(t.D,n)?i.concat(n):void 0);if(Cd(r,n,s),!Sd(s))return;e.m=!1}if(Ed(o)&&!Pd(o)){if(!e.h.F&&e._<1)return;Fd(e,o),t&&t.A.l||Gd(e,o)}}function Gd(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&Dd(t,r)}function Wd(e,t){var r=e[ol];return(r?wd(r):e)[t]}function Kd(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 qd(e){e.P||(e.P=!0,e.l&&qd(e.l))}function zd(e){e.o||(e.o=Rd(e.t))}function Jd(e,t,r){var n=Td(t)?Md("MapSet").N(t,r):Od(t)?Md("MapSet").T(t,r):e.g?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:kd(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=ul;r&&(o=[n],i=dl);var s=Proxy.revocable(o,i),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(t,r):Md("ES5").J(t,r);return(r?r.A:kd()).p.push(n),n}function Qd(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Rd(e)}var Yd,Zd,Xd="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),$d="undefined"!=typeof Map,el="undefined"!=typeof Set,tl="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,rl=Xd?Symbol.for("immer-nothing"):((Yd={})["immer-nothing"]=!0,Yd),nl=Xd?Symbol.for("immer-draftable"):"__$immer_draftable",ol=Xd?Symbol.for("immer-state"):"__$immer_state",il=""+Object.prototype.constructor,sl="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,al=Object.getOwnPropertyDescriptors||function(e){var t={};return sl(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},cl={},ul={get:function(e,t){if(t===ol)return e;var r=wd(e);if(!Id(r,t))return function(e,t,r){var n,o=Kd(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||!Ed(n)?n:n===Wd(e.t,t)?(zd(e),e.o[t]=Jd(e.A.h,n,e)):n},has:function(e,t){return t in wd(e)},ownKeys:function(e){return Reflect.ownKeys(wd(e))},set:function(e,t,r){var n=Kd(wd(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var o=Wd(wd(e),t),i=null==o?void 0:o[ol];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||Id(e.t,t)))return!0;zd(e),qd(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!==Wd(e.t,t)||t in e.t?(e.D[t]=!1,zd(e),qd(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=wd(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(){gd(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){gd(12)}},dl={};bd(ul,(function(e,t){dl[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),dl.deleteProperty=function(e,t){return ul.deleteProperty.call(this,e[0],t)},dl.set=function(e,t,r){return ul.set.call(this,e[0],t,r,e[0])};var ll=new(function(){function e(e){var t=this;this.g=tl,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=Md("Patches").$;return Sd(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}()),pl=ll.produce;ll.produceWithPatches.bind(ll),ll.setAutoFreeze.bind(ll),ll.setUseProxies.bind(ll),ll.applyPatches.bind(ll),ll.createDraft.bind(ll),ll.finishDraft.bind(ll);const hl={ssrc:0,status:exports.ShareStatus.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:exports.SharePrivilege.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},fl=Fr({["".concat(ac)]:pl((e,t)=>{let{payload:r}=t;e.sharePrivilege=r}),["".concat(cc)]:pl((e,t)=>{let{payload:r}=t;e.isRemoteSharingActive=1===r.bStatus,e.activeNodeId=r.activeNodeID,e.activeSsrc=r.ssrc}),["".concat(uc)]:pl((e,t)=>{let{payload:r}=t;e.isReceiveSharing=r}),["".concat(dc)]:pl((e,t)=>{let{payload:r}=t;e.isChromeExtensionInstalled=r}),["".concat(pc)]:pl((e,t)=>{let{payload:r}=t;e.shareDimension=c({},r)}),["".concat(hc)]:pl((e,t)=>{let{payload:r}=t;e.status=r}),["".concat(fc)]:pl((e,t)=>{let{payload:r}=t;e.ssrc=r}),["".concat(vc)]:pl((e,t)=>{let{payload:r}=t;e.shareQuality=r}),["".concat(_c)]:pl((e,t)=>{let{payload:r}=t;e.receivedShareDimension=c({},r)}),["".concat(mc)]:pl((e,t)=>{let{payload:r}=t;e.isRemoteControlApproved=r}),["".concat(yc)]:pl((e,t)=>{let{payload:r}=t;e.isGrabRemoteControl=r}),["".concat(gc)]:pl((e,t)=>{let{payload:r}=t;e.isVerifiedRenderCanvasAfterFailover=r}),["".concat(Sc)]:pl((e,t)=>{let{payload:r}=t;e.isVerifiedCaptureCanvasAfterFailover=r}),["".concat(Ec)]:pl((e,t)=>{let{payload:r}=t;e.isSDKGrabControl=r}),["".concat(bc)]:pl((e,t)=>{let{payload:r}=t;e.isReceiveSharingFromMainSession=r}),["".concat(Ac)]:pl((e,t)=>{let{payload:r}=t;e.isSharingToBreakoutRoom=r}),["".concat(Ic)]:()=>c(c({},hl),{},{isVerifiedRenderCanvasAfterFailover:!1,isVerifiedCaptureCanvasAfterFailover:!1})},hl),vl=In(yd),_l=Ki.createAgent(),ml=(e,t)=>e.pipe(Kt("".concat(Ao)),jt(t),tt(e=>{let[,t]=e;return void 0!==t.meeting.encryptedRWC}),td(e=>{let[,t]=e;const{meeting:{encryptedRWC:r,ts:n,auth:o,meetingNumber:i},breakoutRoom:s}=t;if(r){const e=Object.keys(r).map(e=>{const t=r[e];let a=void 0;return a=s&&s.currentRoom.boConfId?Yu(e,i,t,n,o,s.currentRoom.boConfId):Yu(e,i,t,n,o),{url:a,domain:e,rwcToken:t}}),t=null==e?void 0:e.length,a=[];return Ve(e).pipe(Fe(e=>zn(e.url).pipe(Fe(t=>{let r={};return r=t.response?c(c({},t.response),{},{fromNginx:!1}):{rwg:e.domain,rwcToken:e.rwcToken,fromNginx:!0},Ve([nn(r),Br()])}),dt(()=>(a.push(e.url),a.length===t&&Ks("JOIN_MEETING_FAILED",{reason:"connection error",errorCode:-3e3}),ee)))),Ot(ko(performance.now())))}}));var yl=Object.freeze({__proto__:null,pingRWCEpic:ml,joinMeetingWelcomeEpic:e=>Cn(e,0).pipe(kt(e=>{var t;if("READY"===(null===(t=e.payload.body)||void 0===t?void 0:t.status)){const e=ui.get(wi.WebclientMeetingToken);e&&_l.joinMeeting(e)}}),It(ee)),joinMeetingSuccessfulEpic:(e,t)=>Cn(e,4098).pipe(jt(t),td(e=>{let[t,r]=e;const{payload:{body:{res:n,userID:o,zoomID:i,mn:s,participantID:a,hugeBO:c,elapsed:u,disableAqos:d,disableVqos:l,meetingtoken:p,role:h}}}=t,{meeting:{pingRWCTimestamp:f,isWebinar:v,userEmail:_,userName:m,isMeetingReset:y,meetingOptions:g,xmppConfig:S,zlkJwtToken:E,cv:b},media:{mediaConstraints:A,assetsPath:I},breakoutRoom:C}=r;if(Yn.CONF_SUCCESS===n){const{WebclientParticipantId:e,WebclientUserId:r,WebclientZoomId:n,WebclientUserEmail:T,WebclientUserName:O,WebclientMeetingToken:w}=wi;ui.set(r,o,ai.SessionStorage),ui.set(n,i,ai.SessionStorage),ui.set(e,a,ai.SessionStorage),_&&ui.set(T,_,ai.SessionStorage),ui.set(O,m,ai.SessionStorage),p&&ui.set(w,p,ai.SessionStorage),_l.sendRWGConnectionPerformance("WCL_M, JMCT(".concat(performance.now()-f,")"));const R=[Uo(t.payload.body),Jo(performance.now())];es.getInstance().init(),y&&(R.push(Fo(!1)),void 0!==A&&void 0!==I&&R.push(ln())),v&&R.push(Gr()),S&&E&&R.push(Xr()),C&&(g&&!0===g.isBO100Enabled&&R.push(zu(c)),C.currentRoom.boConfId&&R.push(Yr()),void 0!==u&&R.push(Pu(u)));let D=!l;const N=!d;return E&&yo(b,"1.3.0")<0&&(D=!1),R.unshift(Qo({audioQos:N,videoQos:D})),(h&ca.Owner)===ca.Owner&&(Ks("JOIN_MEETING_FAILED",{reason:"dont support assisnt join through widget",errorCode:-1}),_l.leaveMeeting()),Ks("JOIN_MEETING_SUCCESS",{meetingNumber:s}),Ve(R)}return Yn.CONF_FAIL_CONFLOCKED===n?Ks("JOIN_MEETING_FAILED",ao(n)):Yn.CONF_FAIL_CONF_USER_FULL===n?Ks("JOIN_MEETING_FAILED",Object.assign({},ao(n),{lmUrl:t.payload.body.lmURL})):(Yn.CONF_FAIL_MEETING_OVER===n||Yn.CONF_RESULT_MMR_IB_REJECT===n||Yn.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===n||[Yn.CONF_FAIL_HAS_BEEN_REMOVED,Yn.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(n),Ks("JOIN_MEETING_FAILED",ao(n))),Ve(Zu(r,!1))})),handleMeetingAttributeChangeEpic:(e,t)=>Cn(e,Li).pipe(jt(t),Oe(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)&&Mi.init(o,n.encryptKey,i),void 0!==(null==n?void 0:n.gatewayKey)){const e=es.getInstance(),[,t,r]=n.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:r&&_o(r)}])}return Ks("UPDATE_MEETING_ATTRIBUTE",n),Lo(n)})),handleMeetingEndEpic:(e,t)=>Cn(e,7939).pipe(jt(t),Fe(e=>{let[t,r]=e;const{payload:{body:n}}=t;if(void 0!==n.reason){if(Zn.LEAVEREASON_RECONNECT===n.reason)return Xn.LEAVESUBREASON_WAITINGROOMFAILOVER===n.subReason?Ks("RECONNECTING_MEETING",{reason:ni.OnHold}):Ks("RECONNECTING_MEETING",{reason:ni.Failover}),ae(Io());Zn.LEAVEREASON_KICKEDBYHOST===n.reason?Ks("LEAVING_MEETING",{reason:"kicked by host"}):Zn.LEAVEREASON_ENDBYHOST!==n.reason&&Zn.LEAVEREASON_ENDBYHOSTSTARTANOTHERMEETING!==n.reason||Ks("LEAVING_MEETING",{reason:"ended by host"})}return r.meeting.isMeetingReset?ee:Ve(Zu(r,!1))})),meetingFailoverEpic:(e,t)=>e.pipe(Kt("".concat(Io)),jt(t),Fe(e=>{let[,t]=e;const r=Zu(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(bo(r)).pipe(ft(1e3))}else{const e=function(e){const{meeting:{apiKey:t,signature:r,signatureType:n,meetingNumber:o,userName:i,lang:s,passWord:a,userEmail:c,sdkUrl:u,sdkOrigin:d,proxy:l,cv:p,ztk:h,zsk:f,tk:v}}=e,_=h||sessionStorage.getItem(wi.WebclientZtk),m=f||sessionStorage.getItem(wi.WebclientZsk);return{apiKey:t,signature:r,signatureType:n,meetingNumber:o,userName:i,lang:s,passWord:a,userEmail:c,sdkUrl:u,sdkOrigin:d,proxy:l,cv:p,ztk:_,zsk:m,tk:v||sessionStorage.getItem(wi.WebclientTk),ulsm:m?1:0}}(t);n=ae(Eo(e)).pipe(ft(1e3))}return qe(Ve(r),n)})),hostChangeEpic:e=>wn(e,7940).pipe(kt(e=>{Ks("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)}),Oe(e=>xo(e.payload.body))),cohostChangeEpic:e=>wn(e,7941).pipe(kt(e=>{Ks("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)}),Oe(e=>jo(e.payload.body))),setMeetingOptEpic:e=>wn(e,7945).pipe(kt(e=>{const{payload:{body:{opt:t}}}=e;ui.set(wi.WebclientOpt,t,ai.SessionStorage)}),It(ee)),setMeetingOnHoldEpic:(e,t)=>Cn(e,7942).pipe(kt(e=>{const{payload:{body:{bHold:t}}}=e;ui.set(wi.WebclientIsOnHold,t?1:0,ai.SessionStorage),Ks("MEETING_IN_WAITING_ROOM",t)}),jt(t),Fe(e=>{let[t,r]=e;const n=[Ho(t.payload.body.bHold)];if(t.payload.body.bHold){const e=Ea(r);if(e){n.push(Bo({audio:e.audio,video:e.bVideoOn,muted:e.muted}));const t=es.getInstance();if("computer"===e.audio&&(t.leaveComputerAudio(),_l.joinOrLeaveVoip(!1)),e.bVideoOn&&t.stopCaptureVideo(),e.sharerOn&&(_l.stopSharing(e.userId),t.stopDesktopSharing(),n.push(hc(exports.ShareStatus.End))),r.video&&r.video.subscribedVideoList.length>0&&r.video.subscribedVideoList.forEach(e=>{_l.unsubscribeVideo(e)}),r.share&&r.share.isReceiveSharing){const e=r.share.activeNodeId;r.share.isRemoteControlApproved&&(_l.sharingRequestRemoteControl(e,!1),t.stopRemoteControl()),_l.unsubscribeSharing(e),t.stopRenderSharing()}}}return Ve(n)})),setMeetingDataCenterRegionEpic:e=>Cn(e,7954).pipe(Oe(e=>qo(e.payload.body))),claimHostResponseEpic:e=>Cn(e,4216).pipe(kt(e=>{Ks("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)}),It(ee)),leaveMeetingEpic:(e,t)=>e.pipe(Kt("".concat(Co),"".concat(To)),jt(t),Fe(e=>{let[t,r]=e;return t.type==="".concat(Co)?(_l.leaveMeeting(),Ks("LEAVING_MEETING",{})):t.type==="".concat(To)&&(_l.endMeeting(),Ks("LEAVING_MEETING",{})),Ve(Zu(r,!1))})),versionUpgradeEpic:e=>Cn(e,2).pipe(kt(()=>{console.warn("Upgrade to latest version to optimize meeting experience")}),It(ee)),versionBlockEpic:e=>Cn(e,1).pipe(kt(e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=ao(1e3);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,()=>t);r.reason=e}Ks("JOIN_MEETING_FAILED",r)}),It(ee))});let gl="zoom.us";const Sl="https://dmogdx0jrul3u.cloudfront.net/".concat("2.4.1","/lib/av"),El="https://source.zoom.us/".concat("2.4.1","/lib/av"),bl="https://jssdk.zoomus.cn/".concat("2.4.1","/lib/av");let Al,Il;!function(e){e.Expel="expel",e.Promote="promote",e.Depromote="depromote",e.MemberChange="memberChange",e.RaiseHand="raisehand",e.LowerHand="lowerhand",e.PutdownHands="putdownhands"}(Al||(Al={})),function(e){e[e.AttendeeToAllPanelist=1]="AttendeeToAllPanelist",e[e.PanelistToAttendee=3]="PanelistToAttendee"}(Il||(Il={}));const Cl=["CONNECTED","DISCONNECTED","POOL","CONNFAIL","OnlineMembers","GroupChange","RosterChange","WebinarQA","Message"];class Tl{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;Cl.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 Tl),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;Cl.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}}let Ol,wl;Tl.agentInstance=void 0;var Rl=Object.freeze({__proto__:null,startIdleTimerEpic:(e,t)=>e.pipe(Kt("".concat(Uo)),jt(t),tt(e=>{let[,t]=e;return void 0!==t.meeting.zlkJwtToken}),Nt(()=>{var e,t;return Ol&&Ol.complete(),Ol=new q,wl=(e=6e4,void 0===e&&(e=0),void 0===t&&(t=Ae),(!Ze(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=Ae),new F((function(r){return r.add(t.schedule(Xe,e,{subscriber:r,counter:0,period:e})),r}))).pipe(Oe(()=>performance.now())).subscribe(Ol),Ol.pipe(Oe(e=>Oo(e)))})),terminateIdleTimerEpic:e=>e.pipe(Kt("".concat(Wr))).pipe(kt(()=>{Ol&&(Ol.complete(),wl.unsubscribe())}),It(ee)),idleCheckingEpic:(e,t)=>e.pipe(Kt("".concat(Oo)),jt(t),Fe(e=>{var t;let[r,n]=e;const{meeting:{idleStartTime:o,sessionIdleTimeoutMins:i,isOriginHost:s},participants:{attendeesList:a,xmppAttendeeList:c},recording:u,breakoutRoom:d}=n,l=r.payload,p=[];if(1===a.length&&0===c.length&&(null==d||null===(t=d.currentRoom)||void 0===t?void 0:t.status)!==ya.InRoom&&(null==u?void 0:u.cmrStatus)!==cs.Start)if(o){const e=s&&la(a[0].userRole)?i:40;l-o>60*e*1e3&&(console.warn("No active for ".concat(e," minutes, will end the session.")),p.push(To()),ct(500).subscribe(()=>{Qs()}))}else p.push(Zo(l));else p.push(Zo(void 0));return Ve(p)})),resetIdleStartTimeEpic:(e,t)=>e.pipe(Kt("".concat(zr)),tt(e=>[Ui,Li].includes(e.payload.evt)&&void 0!==t.value.meeting.idleStartTime),le(be),Fe(()=>{var e;const{participants:{attendeesList:r,xmppAttendeeList:n},recording:o,breakoutRoom:i}=t.value,s=[];return(r.length>1||n.length>0||(null==o?void 0:o.cmrStatus)===cs.Start||(null==i||null===(e=i.currentRoom)||void 0===e?void 0:e.status)===ya.InRoom)&&s.push(Zo(void 0)),Ve(s)})),resetIdleStartTimeAfterLeaveMeetingEpic:e=>e.pipe(Kt("".concat(Co),"".concat(To)),Et(Zo(void 0)))});let Dl=0;var Nl,Pl=lo((function(e,t){var r;r=function(){function e(){for(var e=0,t={};e1&&void 0!==arguments[1]?arguments[1]:0,r=(Vl[e[t+0]]+Vl[e[t+1]]+Vl[e[t+2]]+Vl[e[t+3]]+"-"+Vl[e[t+4]]+Vl[e[t+5]]+"-"+Vl[e[t+6]]+Vl[e[t+7]]+"-"+Vl[e[t+8]]+Vl[e[t+9]]+"-"+Vl[e[t+10]]+Vl[e[t+11]]+Vl[e[t+12]]+Vl[e[t+13]]+Vl[e[t+14]]+Vl[e[t+15]]).toLowerCase();if(!Ll(r))throw TypeError("Stringified UUID is invalid");return r}(n)}let Hl;!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"}(Hl||(Hl={}));const{WebclientIsOnHold:Fl,WebclientOpt:Bl,WebclientParticipantId:Gl,WebclientZoomId:Wl,WebclientWebinarToken:Kl,WebclientMeetingToken:ql}=wi,{WebclientDeviceId:zl}=Ri,Jl=Tl.getInstance();let Ql;var Yl=Object.freeze({__proto__:null,loadWebIMEpic:(e,t)=>e.pipe(Kt("".concat(qr)),jt(t),Fe(e=>{let[,t]=e;const{media:{assetsPath:r}}=t;return Ve(new Promise((e,t)=>{ei("".concat(r,"/webim.min.js"),()=>{e("")},()=>{t()})})).pipe(Et(an(!0)),dt(e=>ae(an(!1))))})),connectXMPPSocketEpic:(e,t)=>e.pipe(Kt("".concat(Gr)),jt(t),tt(e=>{let[,t]=e;return"closed"===t.socket.xmppSocketStatus}),td(t=>{let[,r]=t;const{meeting:{svcUrl:n,meetingNumber:o,conId:i,jid:s,userName:a},socket:{isXmppSDKLoaded:c}}=r,u=pi()&&hi()?11:10;let d=ae(c);return!1===c&&(d=e.pipe(Kt("".concat(an)),yt(1))),d.pipe(Fe(e=>{return e?(t={svcUrl:n,meetingNumber:o,conId:i,jid:s,userName:a,clientCap:u},Jl.connect(t),Ql=new q,Ye(e=>Jl.registerCallback(e),e=>Jl.unregisterCallback(e),(e,t)=>({event:e,data:t})).subscribe(Ql),Ql).pipe(Oe(e=>Qr(e)),Ot(sn(Da.Connecting))):ce("webim load fail");var t}))})),connectedXmppSocketEpic:(e,t)=>e.pipe(Kt("".concat(sn)),tt(e=>e.payload===Da.Connecting),td(()=>{if(Ql){const e=Ql.pipe(tt(e=>"CONNECTED"===e.event)),r=Ql.pipe(tt(e=>"DISCONNECTED"===e.event));return $e(e.pipe(Fe(()=>ae(sn(Da.Connected)))),r.pipe(ft(1e3),jt(t),tt(e=>{let[,t]=e;return"closed"!==t.socket.xmppSocketStatus&&"joined"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Oe(()=>(Ks("RECONNECTING_MEETING",{reason:ni.Failover}),Io()))))}})),disconnectXmppSocketEpic:e=>e.pipe(Kt("".concat(Kr)),Et(sn(Da.Closed)),kt(()=>{var e;Jl.disconnect(),null===(e=Ql)||void 0===e||e.complete()}))});const{setCloudRecordingStatus:Zl,setCloudRecordingEnable:Xl,setAllowStopAutoRecording:$l,setAutomaticCloudRecordingEnable:ep}=Ur("SET_CLOUD_RECORDING_STATUS","SET_CLOUD_RECORDING_ENABLE","SET_ALLOW_STOP_AUTO_RECORDING","SET_AUTOMATIC_CLOUD_RECORDING_ENABLE"),tp={meetingStatus:"initial",isWindowOpen:!1,apiKey:"",signature:"",signatureType:"",lang:"en-US",tk:"",customerKey:"",mtkGuid:"",pingRWCTimestamp:0,passWord:"",meetingNumber:0,userName:"",userEmail:"",sdkUrl:"",sdkOrigin:"",proxy:1,cv:"",meetingId:"",tid:"",ts:"",auth:"",sign:"",isSupportCallOut:!1,tollNumbers:void 0,recordingEnable:!1,callOutCountry:void 0,inviteEmail:"",xmppConfig:null,isSupportH323:!1,h323GatewayInfo:"",h323Password:"",trackAuth:"",isOriginHost:!1,isWebinar:!1,encryptedRWC:void 0,meetingOptions:{},meetingTopic:"",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,enableAudioQos:!0,enableVideoQos:!0,activeAppInfo:void 0,recordingDisclaimerForRecorder:{},recordingDisclaimer:{},ccUrl:"",sessionIdleTimeoutMins:40,reportDomain:"",isAudioBridgeEnabled:!0},rp=Fr({["".concat(wo)]:pl((e,t)=>{let{payload:r}=t;r.customerKey=e.customerKey||r.customerKey||"",Object.assign(e,r)}),["".concat(Ro)]:pl((e,t)=>{let{payload:r}=t;e.isWindowOpen=r}),["".concat(Do)]:pl((e,t)=>{let{payload:r}=t;r.useSDK?e.signatureType="sdk":e.signatureType="api",e.apiKey=r.apiKey,e.signature=r.signature,e.lang=r.language}),["".concat(No)]:pl((e,t)=>{let{payload:r}=t;e.ztk=r}),["".concat(Po)]:pl((e,t)=>{let{payload:r}=t;e.zsk=r}),["".concat(Mo)]:pl((e,t)=>{let{payload:r}=t;e.tk=r.tk,e.mtkGuid=r.mtkGuid}),["".concat(ko)]:pl((e,t)=>{let{payload:r}=t;e.pingRWCTimestamp=r}),["".concat(Uo)]:pl((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,e.reportDomain=r.reportDomain}),["".concat(Lo)]:pl((e,t)=>{let{payload:r}=t;Object.assign(e,r)}),["".concat(xo)]:pl((e,t)=>{let{payload:r}=t;e.isHost=r}),["".concat(jo)]:pl((e,t)=>{let{payload:r}=t;e.isCoHost=r}),["".concat(Ho)]:pl((e,t)=>{let{payload:r}=t;e.isOnHold=r}),["".concat(Fo)]:pl((e,t)=>{let{payload:r}=t;e.isMeetingReset=r}),["".concat(Bo)]:pl((e,t)=>{let{payload:r}=t;e.audioVideoBeforeOnHold=r}),["".concat(Go)]:pl((e,t)=>{let{payload:r}=t;e.currentUserAudioBeforeReset=r}),["".concat(Wo)]:pl((e,t)=>{let{payload:r}=t;e.isCurrentUserMutedBeforeReset=r}),["".concat(Ko)]:pl((e,t)=>{let{payload:r}=t;e.meetingStatus=r}),["".concat(qo)]:pl((e,t)=>{let{payload:r}=t;e.region=r.region,e.network=r.network}),["".concat(zo)]:pl((e,t)=>{let{payload:r}=t;e.isCurrentUserStartVideoBeforeReset=r}),["".concat(Jo)]:pl((e,t)=>{let{payload:r}=t;e.joinMeetingTimeStamp=r}),["".concat(Qo)]:pl((e,t)=>{let{payload:r}=t;e.enableAudioQos=r.audioQos,e.enableVideoQos=r.videoQos}),["".concat(Yo)]:pl((e,t)=>{let{payload:r}=t;e.activeAppInfo=r}),["".concat(Zo)]:pl((e,t)=>{let{payload:r}=t;e.idleStartTime=r}),["".concat(Xo)]:pl((e,t)=>{let{payload:r}=t;e.sessionIdleTimeoutMins=r}),["".concat($o)]:pl((e,t)=>{let{payload:r}=t;e.isAudioBridgeEnabled=r}),["".concat(Vo)]:pl((e,t)=>{let{payload:r}=t;Object.assign(e,c(c({},tp),{},{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,signatureType:e.signatureType,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,zsk:e.zsk,ztk:e.ztk,idleStartTime:e.idleStartTime,sessionIdleTimeoutMins:e.sessionIdleTimeoutMins,customerKey:e.customerKey}))})},tp),np=In(yl,Rl,{meetingInfoEpic:(e,t)=>e.pipe(Kt("".concat(bo)),Nt(e=>{const r=Object.assign({},e.payload,{password:ho(e.payload.password),topic:ho(e.payload.topic)}),{videoSDKUrl:n}={meetingSDKUrl:"https://".concat(gl,"/api/v1/wc/info"),videoSDKUrl:"https://".concat(gl,"/wc/lsdk")};return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"zoomsdkjsonpcallback";return new F(n=>{Dl++;const o="".concat(r).concat(Dl),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()}})}(n,r).pipe(dt(e=>ae({status:!1,result:e.toString(),errorCode:-3e3})),Fe(r=>{const[n,o]=ot(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?Ks("JOIN_MEETING_FAILED",so(3004)):-3e3===e.errorCode?Ks("JOIN_MEETING_FAILED",{reason:"connection error"}):3e3===e.errorCode?Ks("JOIN_MEETING_FAILED",{reason:e.errorMessage,errorCode:200}):300===e.errorCode?Ks("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?Ks("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?Ks("JOIN_MEETING_FAILED",{reason:"The token is expired or more than 2 days or ineffective.",errorCode:200}):124===e.errorCode&&Ks("JOIN_MEETING_FAILED",{reason:"Verify JWT failed",errorCode:200}))}),n.pipe(ed(r=>{if(!0===r.status){const{result:{mid:n,websdkClientFeatureOptions:o}}=r;ui.init(n);const i=((e,t)=>{if(e.result){const{result:{mn:r,ts:n,auth:o,track_auth:i,mid:s,tid:a,encryptedRWC:c,user_identity:u,meetingOptions:d,can_recording:l,wcXMPPConfig:p,call_out_country_json:h,isOriginalHost:f,support_call_out:v}}=e,{lang:_,password:m,topic:y,zlk:g,cv:S,userName:E}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:n,auth:o,passWord:m,trackAuth:i,customerKey:u,encryptedRWC:JSON.parse(c||"{}"),meetingOptions:JSON.parse(d||"{}"),recordingEnable:"1"===l,topic:y,userName:ui.get(wi.WebclientUserName)||E,cv:S,zlkJwtToken:g,xmppConfig:JSON.parse(p||"{}"),callOutCountry:JSON.parse(h||"{}"),lang:_,isOriginHost:f,isSupportCallOut:"1"===v}}return e})(r,e.payload),s=[ae(wo(i)),ae(Xl(null==i?void 0:i.recordingEnable)),bn(ml,t,Ao())],a=(e=>{const t={["".concat(si.AudioBridgeEnable)]:$o},r=[];if(e){const n=e.length;Object.keys(si).filter(e=>!Number.isNaN(Number(si[e]))).forEach(o=>{const i=si[o],s="1"===e.charAt(n-i);r.push(ae(t["".concat(i)](s)))})}return r})(o);return a.length>0&&s.unshift(...a),qe(...s)}}))}))}))}),op=Ki.createAgent();let ip;var sp=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(Kt("".concat(Br)),jt(t),tt(e=>{let[,t]=e;return t.socket.zoomSocketStatus===Da.Closed}),td(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:u,lang:d,retryCount:l,rwgServerList:p,cv:h,customerKey:f,zlkJwtToken:v,isAudioBridgeEnabled:_}=e;const m=Pl.get("_zm_mtk_guid");let y=ui.get(zl);if(y||(y=jl(),ui.set(zl,y,ai.LocalStorage)),p.length>l){const e=di(),g=p[l];let S={dn2:ho(n),topic:ho(o),auth:u,browser:e,trackAuth:i,mid:a,tid:s,lang:d,ts:c,"ZM-CID":y,_ZM_MTG_TRACK_ID:m||"",iccv:h,customer_key:ho(f),cfs:0,zlkJwtToken:v};""!==t&&(S=Object.assign(S,{mpwd:ho(t)})),g.rwcAuth?S=Object.assign(S,{rwcAuth:g.rwcAuth}):g.rwcToken&&(S=Object.assign(S,{rwcToken:g.rwcToken}));let E=2;return fi()?E=1:vi()&&(E=0),S=Object.assign(S,{as_type:E}),[{key:Bl,queryKey:"opt"},{key:Gl,queryKey:"participantID"},{key:Wl,queryKey:"zoomid"}].forEach(e=>{const t=ui.get(e.key);void 0!==t&&(S[e.queryKey]=t)}),ui.get(ql)&&Object.assign(S,{isdj:1}),null!=e&&e.startsWith("ios-safari")&&_&&Object.assign(S,{useABAudio:1}),"wss://".concat(g.rwg,"/instantsdk/").concat(r,"?").concat(new URLSearchParams(S).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===ya.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,zsk:s,ztk:a,trackAuth:c,tid:u,sign:d,signatureType:l,meetingId:p,ts:h,auth:f,lang:v,tk:_,retryCount:m,rwgServerList:y,userEmail:g,cv:S,bid:E,botk:b,confID:A,customerKey:I,isAudioBridgeEnabled:C}=e;const T=Pl.get("_zm_mtk_guid");let O=ui.get(zl);if(O||(O=jl(),ui.set(zl,O,ai.LocalStorage)),y.length>m){const e=di(),w=y[m];let R={dn2:ho(i),auth:f,signType:l,browser:e,trackAuth:c,mid:p,tid:u,email:g,lang:v,zak:a||"",tk:_||"",customer_key:ho(I),ts:h,"ZM-CID":O,_ZM_MTG_TRACK_ID:T||"",jscv:S,cfs:0};const D=sessionStorage.getItem(wi.WebclientZsk)||s;R=D?Object.assign(R,{zak:s}):Object.assign(R,{sign:d}),t&&r||""===n||(R=Object.assign(R,{mpwd:n})),w.rwcAuth?R=Object.assign(R,{rwcAuth:w.rwcAuth}):w.rwcToken&&(R=Object.assign(R,{rwcToken:w.rwcToken}));let N=2;return fi()?N=1:vi()&&(N=0),R=Object.assign(R,{as_type:N}),[{key:Fl,queryKey:"cfs"},{key:Bl,queryKey:"opt"},{key:Gl,queryKey:"participantID"},{key:Wl,queryKey:"zoomid"},{key:Kl,queryKey:"tk"}].forEach(e=>{const t=ui.get(e.key);void 0!==t&&(R[e.queryKey]=t)}),E&&b&&A&&Object.assign(R,{bid:ho(E),botk:b,confID:A}),ui.get(ql)&&Object.assign(R,{isdj:1}),null!=e&&e.startsWith("ios-safari")&&C&&Object.assign(R,{useABAudio:1}),"wss://".concat(w.rwg,"/wc/api/").concat(o,"?").concat(new URLSearchParams(R).toString())}return null}(e)}if(s){const e=(a=s,op.connect(a),ip=new q,Ye(e=>op.on(ji.Message,e),e=>op.off(ji.Message,e),e=>e.data).subscribe(ip),ip);return $e(e.pipe(tt(e=>"string"==typeof e),Oe(e=>JSON.parse(e)),sd(),$u(e=>{if(0!==e.evt||!e.body||"invalid parameters!"!==e.body.test)return zr(e);Ks("JOIN_MEETING_FAILED",so(eo.INVALID_PARAMETER))}),Ot(rn(Da.Connecting))),e.pipe(tt(e=>e instanceof ArrayBuffer),Oe(e=>Jr(e))))}var a})),connectedZoomSocketEpic:(e,t)=>e.pipe(Kt("".concat(Br)),Nt(()=>{const[e,r,n]=[ji.Open,ji.Close,ji.Error].map(e=>Ye(t=>op.on(e,t),t=>op.on(e,t)));return $e(e.pipe(Fe(()=>$e(ae(rn(Da.Connected)),ct(6e4).pipe(jt(t),tt(e=>{let[,t]=e;return"initial"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Oe(()=>(Ks("RECONNECTING_MEETING",{reason:ni.Failover}),Io())))))),r.pipe(jt(t),tt(e=>{let[,t]=e;return t.socket.zoomSocketStatus!==Da.Closed&&"joined"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Oe(()=>(Ks("RECONNECTING_MEETING",{reason:ni.Failover}),Io()))),n.pipe(jt(t),ed(e=>{let[,t]=e;const{meeting:{meetingStatus:r,isMeetingReset:n},socket:{retryCount:o,rwgServerList:i}}=t,s=[];return"initial"===r&&null!=i&&i.length?i.length>o+1?s.push(on(o+1),Wr({retry:!0})):Ks("JOIN_MEETING_FAILED",{reason:"connection error",errorCode:-3e3}):n||"joined"!==r||(Ks("RECONNECTING_MEETING",{reason:ni.Failover}),s.push(Io())),Ve(s)})))})),disconnectZoomSocketEpic:e=>e.pipe(Kt("".concat(Wr)),Fe(e=>e.payload&&e.payload.retry?ae(Br()).pipe(ft(1e3),Ot(rn(Da.Closed))):ae(rn(Da.Closed))),ft(100),kt(()=>{var e;op.close(),null===(e=ip)||void 0===e||e.complete()}))});const ap=qi.getInstance();let cp;var up=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(Kt("".concat(Yr)),jt(t),tt(e=>{let[,t]=e;return"closed"===t.socket.mainSessionSocketStatus}),Nt(e=>{let[,t]=e;const{meeting:{svcUrl:r,meetingNumber:n,conId:o}}=t;return(e=>(ap.connect(e),cp=new q,Ye(e=>ap.on(ji.Message,e),e=>ap.off(ji.Message,e)).pipe(Oe(e=>e.data)).subscribe(cp),cp))(function(e,t,r){return"wss://".concat(e,"/wc/media/").concat(t,"?type=m&cid=").concat(r,"&mode=2")}(r,n,o)).pipe(Oe(e=>JSON.parse(e)),tt(e=>0!==e.evt),sd(),Oe(e=>en(e)),Ot(cn(Da.Connecting)))})),connectedMainSessionSocketEpic:(e,t)=>e.pipe(Kt("".concat(Yr)),Nt(()=>{const[e,r,n]=[ji.Open,ji.Close,ji.Error].map(e=>Ye(t=>ap.on(e,t),t=>ap.on(e,t)));return $e(e.pipe(Et(cn(Da.Connected))),r.pipe(jt(t),tt(e=>{let[,t]=e;return"closed"!==t.socket.zoomSocketStatus&&"joined"===t.meeting.meetingStatus}),Oe(()=>(Ks("RECONNECTING_MEETING",{reason:ni.Failover}),Io()))),n.pipe(Oe(()=>(Ks("RECONNECTING_MEETING",{reason:ni.Failover}),Io()))))})),disconnectMainSessionSocketEpic:e=>e.pipe(Kt("".concat(Zr)),Et(cn(Da.Closed)),kt(()=>{var e;ap.close(),null===(e=cp)||void 0===e||e.complete()}))});const dp=Xi.getInstance();let lp;var pp=Object.freeze({__proto__:null,connectCmdChannelSocketEpic:(e,t)=>e.pipe(Kt("".concat(Xr)),jt(t),tt(e=>{let[,t]=e;return"closed"===t.socket.cmdChannelSocketStatus}),Nt(e=>{let[,t]=e;const{meeting:{svcUrl:r,meetingNumber:n,conId:o},socket:{cmdChannelSocketStatus:i}}=t;return(e=>(dp.connect(e),lp=new q,Ye(e=>dp.on(ji.Message,e),e=>dp.off(ji.Message,e)).pipe(Oe(e=>e.data)).subscribe(lp),lp))(function(e,t,r){return"wss://".concat(e,"/wc/media/").concat(t,"?type=x&cid=").concat(r)}(r,n,o)).pipe(Oe(e=>{if("string"==typeof e){const t=JSON.parse(e);return 0===(null==t?void 0:t.evt)&&i!==Da.Connected&&Xi.getInstance().connectXmpp(),t}return{}}),tt(e=>void 0!==(null==e?void 0:e.evt)),Oe(e=>tn(e)),Ot(un(Da.Connecting)))})),connectedCmdChannelSocketEpic:(e,t)=>e.pipe(Kt("".concat(Xr)),Nt(()=>{const[e,r,n]=[ji.Open,ji.Close,ji.Error].map(e=>Ye(t=>dp.on(e,t),t=>dp.on(e,t)));return $e(e.pipe(Et(un(Da.Connected))),r.pipe(ft(1e3),jt(t),tt(e=>{let[,t]=e;return"closed"!==t.socket.cmdChannelSocketStatus&&"joined"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Oe(()=>(Ks("RECONNECTING_MEETING",{reason:ni.Failover}),Io()))),n.pipe(ft(1e3),jt(t),tt(e=>{let[,t]=e;return"closed"!==t.socket.cmdChannelSocketStatus&&"joined"===t.meeting.meetingStatus&&!t.meeting.isMeetingReset}),Oe(()=>(Ks("RECONNECTING_MEETING",{reason:ni.Failover}),Io()))))})),disconnectCmdChannelSocketEpic:e=>e.pipe(Kt("".concat($r)),Et(un(Da.Closed)),ft(100),kt(()=>{var e;dp.close(),null===(e=lp)||void 0===e||e.complete()}))});const hp={zoomSocketStatus:Da.Closed,isXmppSDKLoaded:!1,xmppSocketStatus:Da.Closed,mainSessionSocketStatus:Da.Closed,cmdChannelSocketStatus:Da.Closed,retryCount:0,rwgServerList:[]},fp=Fr({["".concat(rn)]:pl((e,t)=>{let{payload:r}=t;e.zoomSocketStatus=r}),["".concat(nn)]:pl((e,t)=>{let{payload:r}=t;const{rwgServerList:n}=e;n.find(e=>e===r.rwg)||n.push(r)}),["".concat(on)]:pl((e,t)=>{let{payload:r}=t;e.retryCount=r}),["".concat(sn)]:pl((e,t)=>{let{payload:r}=t;e.xmppSocketStatus=r}),["".concat(an)]:pl((e,t)=>{let{payload:r}=t;e.isXmppSDKLoaded=r}),["".concat(cn)]:pl((e,t)=>{let{payload:r}=t;e.mainSessionSocketStatus=r}),["".concat(un)]:pl((e,t)=>{let{payload:r}=t;e.cmdChannelSocketStatus=r}),["".concat(dn)]:()=>hp},hp),vp=In(sp,Yl,up,pp),_p={id:"userId",type:e=>pa(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>({userRole:e,isHost:la(e)}),dn2:e=>({displayName:fo(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest",bCapsRequestLT:"isRequestLT"};var mp=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>Cn(e,Ui).pipe(Oe(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=_p[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)),jt(t),Fe(e=>{let[t,r]=e;const n=[Ys(t)],{meeting:{userId:o,isWebinar:i},participants:{attendeesList:s,failoverAttendeesList:a,allowTalkAttendeesList:u}}=r,d=u.map(e=>e.userId);if(t.add){const e=t.add.find(e=>e.userId===o);void 0!==e&&Ks("ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e);const r=t.add.filter(e=>e.userId!==o);if(r.length>0){const e=r.filter(e=>!ha(e.userRole)).map(e=>{const t=a.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}));if(n.push(ta(t)),Ks("ADD_USER_PARTICIPANT_ATTRIBUTE",e),i){const e=r.filter(e=>ha(e.userRole));e.length>0&&Ks("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.map(e=>({userId:e.userId,isAllowToTalk:!0})))}}}if(t.update){const e=t.update.find(e=>e.userId===o);void 0!==e&&Ks("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e);const r=t.update.filter(e=>!(e.userId===o||d.includes(e.userId)));if(r.length>0&&Ks("UPDATE_USER_PARTICIPANT_ATTRIBUTE",r),i){const e=t.update.filter(e=>e.userId!==o&&d.includes(e.userId));e.length>0&&Ks("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e)}}if(t.remove){const e=t.remove.map(e=>{const t=s.find(t=>t.userId===e.userId);return t?2===e.action&&1===e.nUserStatus?t.bHold?(n.push(ea({zoomID:t.zoomID,isOnHold:!0})),c(c({},e),{},{reason:"on hold"})):(n.push(ea({zoomID:t.zoomID,isOnHold:!1})),c(c({},e),{},{reason:"failover"})):e:null}).filter(e=>!!e);if(Ks("REMOVE_USER_PARTICIPANT_ATTRIBUTE",e),i){const e=t.remove.filter(e=>d.includes(e.userId));e.length>0&&Ks("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.map(e=>({userId:e.userId,isAllowToTalk:!1})))}}return Ve(n)})),receiveUserListFromXMPPEpic:e=>Tn(e,"POOL").pipe(tt(e=>e.payload.data.action===Al.MemberChange),kt(e=>{Ks("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",e.payload.data.data)}),Fe(e=>Ve([Zs(e.payload.data.data)]))),handleAdmitAllSilentUsersEpic:e=>Cn(e,7951).pipe(kt(e=>{!1===e.payload.body.bStarted&&Ks("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)}),Oe(e=>Xs(e.payload.body.bStarted))),handleKVUpdateIndicationEpic:e=>Cn(e,7946).pipe(tt(e=>{var t;return["bRaiseHand","feedback"].includes(null===(t=e.payload.body)||void 0===t?void 0:t.key)&&0===e.payload.body.value}),Oe(e=>(Ks("UPDATE_USER_PARTICIPANT_ATTRIBUTE",{}),"bRaiseHand"===e.payload.body.key?ra():na())))});const yp={attendeesList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},gp=Fr({["".concat(Ys)]:pl((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):ha(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(Zs)]:pl((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(Xs)]:pl((e,t)=>{let{payload:r}=t;e.isAdmitAllSilentUsers=r}),["".concat(ra)]:pl(e=>{e.attendeesList.forEach(e=>{e.bRaiseHand&&(e.bRaiseHand=!1)})}),["".concat(na)]:pl(e=>{e.attendeesList.forEach(e=>{e.feedback>0&&(e.feedback=0)})}),["".concat(ea)]:pl((e,t)=>{let{payload:r}=t;e.failoverAttendeesList.push(r)}),["".concat(ta)]:pl((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($s)]:()=>yp},yp),Sp=In(mp),Ep={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0,fileWithVersion:!1,enforceMultipleVideos:!1},bp=Fr({["".concat(fn)]:pl((e,t)=>{let{payload:r}=t;e.audioDecodeStatus=r}),["".concat(hn)]:pl((e,t)=>{let{payload:r}=t;e.audioEncodeStatus=r}),["".concat(yn)]:pl((e,t)=>{let{payload:r}=t;e.sharingDecodeStatus=r}),["".concat(mn)]:pl((e,t)=>{let{payload:r}=t;e.sharingEncodeStatus=r}),["".concat(_n)]:pl((e,t)=>{let{payload:r}=t;e.videoDecodeStatus=r}),["".concat(vn)]:pl((e,t)=>{let{payload:r}=t;e.videoEncodeStatus=r}),["".concat(gn)]:pl((e,t)=>{let{payload:r}=t;e.mediaConstraints=r.mediaConstraints,e.assetsPath=r.assetsPath,e.fileWithVersion=r.fileWithVersion,e.enforceMultipleVideos=r.enforceMultipleVideos}),["".concat(Sn)]:pl((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(En)]:e=>c(c({},Ep),{},{mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath,fileWithVersion:e.fileWithVersion})},Ep);var Ap=function(e){return e&&e.default||e}(Object.freeze({__proto__:null,default:{}})),Ip=lo((function(e,t){!function(e,t){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function n(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o,i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r90||r||(e(t+=(100-t)/50),requestAnimationFrame(n))};return n(),{finish:function(){100===t||r||(t=100,e(100))},abort:function(){100===t||r||(r=!0)},get curProgress(){return t}}}function C(){}function T(){T.init.call(this)}function O(e){return void 0===e._maxListeners?T.defaultMaxListeners:e._maxListeners}function w(e,t,r){if(t)e.call(r);else for(var n=e.length,o=L(e,n),i=0;i0&&s.length>o){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,"function"==typeof console.warn?console.warn(a):console.log(a)}}else s=i[t]=r,++e._eventsCount;return e}function k(e,t,r){var n=!1;function o(){e.removeListener(t,o),n||(n=!0,r.apply(e,arguments))}return o.listener=r,o}function U(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function L(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}C.prototype=Object.create(null),T.EventEmitter=T,T.usingDomains=!1,T.prototype.domain=void 0,T.prototype._events=void 0,T.prototype._maxListeners=void 0,T.defaultMaxListeners=10,T.init=function(){this.domain=null,T.usingDomains&&(void 0).active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new C,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},T.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},T.prototype.getMaxListeners=function(){return O(this)},T.prototype.emit=function(e){var t,r,n,o,i,s,a,c="error"===e;if(s=this._events)c=c&&null==s.error;else if(!c)return!1;if(a=this.domain,c){if(t=arguments[1],!a){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(r=s[e]))return!1;var d="function"==typeof r;switch(n=arguments.length){case 1:w(r,d,this);break;case 2:R(r,d,this,arguments[1]);break;case 3:D(r,d,this,arguments[1],arguments[2]);break;case 4:N(r,d,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(n-1),i=1;i0;)if(r[i]===t||r[i].listener&&r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new C,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,o=e.length;n0?Reflect.ownKeys(this._events):[]};var V,x=function(e){function t(t){var r=e.call(this)||this;return r.timeout=(null==t?void 0:t.timeout)||3e4,r}return n(t,e),t.prototype.clearTimeoutCheck=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)},t.prototype.startTimeoutCheck=function(){var e=this;!this.timeoutTimer&&!this.finished&&this.timeout>0&&(this.timeoutTimer=setTimeout((function(){e.finished||(e.finished=!0,e.data=null,e.emit("timeout")),e.clearTimeoutCheck()}),this.timeout))},t}(T),j=function(e){function t(t){var r=e.call(this,t)||this;return r.uuid=u(),r.domParams=t||{},r}return n(t,e),t.prototype.jsonp=function(){var e=this;if(!this.finished){var t=this.domParams,r=t.url,n=t.jsonpCallbackName,o=void 0===n?"callback":n,i=t.body,s=t.integrity;this.script=document.createElement("script"),s&&(this.script.integrity=s,this.script.crossOrigin="anonymous");var a="";i&&Object.entries(i).forEach((function(e){var t=e[0],r=e[1];a+=(a?"&":"")+t+"="+r})),a+=(a?"&":"")+o+"="+this.uuid,this.script.src=r+(r.includes("?")?"":"?")+a,this.jsonpCallback(),this.progressMonitory=I((function(t){e.finished||e.emit("progressUpdated",t)})),document.body.appendChild(this.script)}},t.prototype.clearSideEffect=function(e){if(void 0===e&&(e=!1),document.body.removeChild(this.script),e){var t=this.uuid;window[this.uuid]=function(){window[t]&&delete window[t]}}else delete window[this.uuid];this.script=null,this.uuid=null,this.finished=!0,this.data=null,this.clearTimeoutCheck()},t.prototype.jsonpCallback=function(){var e=this;this.script.onerror=function(t){var r;e.finished||(e.clearSideEffect(),null===(r=e.progressMonitory)||void 0===r||r.abort(),e.emit("error",new Error("string"==typeof t?t:"load jsonp script failed")))},window[this.uuid]=function(t){var r;if(!e.finished){var n=e.domParams,o=n.encoding,i=n.blobType,s=n.unZipOptions,a=n.beforeTransformData,c=n.afterTransformData;null===(r=e.progressMonitory)||void 0===r||r.finish(),e.clearSideEffect(),(a?a(t||""):Promise.resolve(t||"")).then((function(t){return A(t,{encoding:o,blobType:i,unZipOptions:s}).then((function(t){return(c?c(t):Promise.resolve(t)).then((function(t){return e.emit("finished",t)}))}))})).catch((function(t){return e.emit("error",t)}))}}},t.prototype.abort=function(){this.clearSideEffect(!0)},t}(x),H=function(e){function t(t){var r=e.call(this,t)||this;return r.socketParams=t||{},r}return n(t,e),t.prototype.write=function(e,t){e&&!this.finished&&(e instanceof Error?this.handleError(e):(this.data?this.appendData(e):this.data=e,this.handlePerCentUpdate(t)))},t.prototype.handlePerCentUpdate=function(e){void 0===e||this.finished||this.emit("progressUpdated",e)},t.prototype.handleError=function(e){this.data=null,this.finished=!0,this.clearTimeoutCheck(),this.emit("error",e)},t.prototype.appendData=function(e){a(e)===a(this.data)?"string"==typeof e?this.data+=e:Blob&&e instanceof Blob?this.data=new Blob([this.data,e],{type:e.type}):ArrayBuffer&&e instanceof ArrayBuffer&&(this.data=s(this.data,e)):this.handleError(new Error("every piece of the data format must be the same"))},t.prototype.end=function(e){var t=this;if(!this.finished){this.handlePerCentUpdate(100),e&&this.write(e);var r=this.socketParams,n=r.encoding,o=r.blobType,i=r.unZipOptions,s=r.beforeTransformData,a=r.afterTransformData;(s?s(this.data):Promise.resolve(this.data)).then((function(e){return A(e,{encoding:n,blobType:o,unZipOptions:i}).then((function(e){return(a?a(e):Promise.resolve(e)).then((function(e){return t.emit("finished",e)}))}))})).catch((function(e){return t.emit("error",e)})),this.data=null,this.finished=!0,this.clearTimeoutCheck()}},t.prototype.abort=function(){this.data=null,this.finished=!0,this.clearTimeoutCheck()},t}(x),F=function(t){function r(e){var r=t.call(this,e)||this;return r.xhrParams=e||{},r.xhrParams.headers=i({},r.xhrParams.headers||{}),r}return n(r,t),r.prototype.supportFetch=function(){return!!window.fetch&&window.AbortController&&window.Request},r.prototype.ajax=function(){var t=this;if(!this.finished)if(this.xhrParams.url){var r=this.xhrParams,n=r.headers,o=void 0===n?{}:n,s=r.url,a=r.body,c=void 0===a?{}:a,u=r.method,d=void 0===u?"POST":u,l=r.encoding,p=r.integrity;this.controller=this.supportFetch()?new AbortController:new XMLHttpRequest;var h=this.supportFetch()?I((function(e){t.finished||t.emit("progressUpdated",e)})):null;(this.supportFetch()?fetch(new Request(s,i({method:d,headers:o,body:"GET"===d?void 0:JSON.stringify(c),signal:this.controller.signal},p?{integrity:p,mode:"cors"}:{}))).then((function(t){return t.ok?l===e.TransformDataFormat.STRING?t.text():l===e.TransformDataFormat.ARRAY_BUFFER?t.arrayBuffer():t.blob():Promise.reject(new Error("xhr download "+s+" failed!"))})):new Promise((function(r,n){var i=new XMLHttpRequest;t.controller=i,i.open(d,s),i.responseType=l===e.TransformDataFormat.STRING?"text":l===e.TransformDataFormat.ARRAY_BUFFER?"arraybuffer":"blob",Object.entries(o).forEach((function(e){var t=e[0],r=e[1];i.setRequestHeader(t,r)})),i.onload=function(){var e=i.status,t=i.response,o=i.statusText;e>=200&&e<300||304===e?r(t):n(new Error(e+": "+o))},i.onprogress=function(e){var r=e||{},n=r.total,o=r.loaded;void 0===o||t.finished||(n?t.emit("progressUpdated",o/n*100):o&&!h&&(h=I((function(e){t.finished||t.emit("progressUpdated",e)}))))},i.onerror=function(){n(new Error("xhr download "+s+" failed!"))},i.send(JSON.stringify(c))}))).then((function(e){if(!t.finished){var r=t.xhrParams,n=r.encoding,o=r.blobType,i=r.unZipOptions,s=r.beforeTransformData,a=r.afterTransformData;null==h||h.finish(),t.finished=!0,t.clearTimeoutCheck(),(s?s(e):Promise.resolve(e)).then((function(e){return A(e,{encoding:n,blobType:o,unZipOptions:i}).then((function(e){return(a?a(e):Promise.resolve(e)).then((function(e){return t.emit("finished",e)}))}))})).catch((function(e){return t.emit("error",e)}))}})).catch((function(e){t.finished||(t.finished=!0,t.clearTimeoutCheck(),null==h||h.abort(),t.emit("error",e))}))}else this.emit("error",new Error("xhrDownloader url params invalid!"))},r.prototype.abort=function(){this.data=null,this.finished=!0,this.clearTimeoutCheck(),this.controller.abort()},r}(x),B=0,G=new T,W=function(){B-=1,G.emit("ThreadPoolReady")};(V=e.DownloaderType||(e.DownloaderType={})).XHR="xhr",V.DOM="dom",V.SOCKET="socket";var K=function(t){function r(r){var n=t.call(this)||this;return n.aborted=!1,n.downloadParmas=i({type:e.DownloaderType.XHR},r),n.id=u(),n}return n(r,t),r.prototype.start=function(){var t=this;B+=1,this.progress=0,this.emit("downloadStart"),this.onDownloadStartCallback&&this.onDownloadStartCallback();var r=this.downloadParmas,n=r.type,o=r.xhrParams,i=r.domParams,s=r.socketParams;switch(n){case e.DownloaderType.DOM:this.downloader=new j(i),this.downloader.jsonp();break;case e.DownloaderType.SOCKET:this.downloader=new H(s);break;default:this.downloader=new F(o),this.downloader.ajax()}return this.downloader.startTimeoutCheck(),this.downloader.on("error",(function(e){t.emit("error",e),t.onErrorCallback&&t.onErrorCallback(e),W()})).on("finished",(function(e){t.emit("complete",e),t.onCompleteCallback&&t.onCompleteCallback(e),W()})).on("progressUpdated",(function(e){t.progress=e,t.emit("progressUpdated",e),t.onProgressUpdatedCallback&&t.onProgressUpdatedCallback(e)})).on("timeout",(function(){t.emit("timeout"),t.onTimeoutCallback&&t.onTimeoutCallback(),W()})),this},r.prototype.abort=function(){if(this.aborted)return this;this.aborted=!0,this.downloader&&!this.downloader.finished&&this.downloader.abort();var e=new Error("file download has been aborted");return this.emit("abort",e),this.onAbortCallback&&this.onAbortCallback(e),W(),this},r.prototype.onDownloadStart=function(e){return this.onDownloadStartCallback=e,this},r.prototype.onProgressUpdated=function(e){return this.onProgressUpdatedCallback=e,this},r.prototype.onError=function(e){return this.onErrorCallback=e,this},r.prototype.onComplete=function(e){return this.onCompleteCallback=e,this},r.prototype.onAbort=function(e){return this.onAbortCallback=e,this},r.prototype.onTimeout=function(e){return this.onTimeoutCallback=e,this},r.prototype.isInProgress=function(){return void 0!==this.progress},r.prototype.isFinished=function(){return 100===this.progress},r}(T),q=function(){function e(e){this.taskList=[],this.options=e||{};var t=this.options.threadLimit;if((void 0===t?6:t)>6)throw new Error("threadLimit must be lower than 6");G.on("ThreadPoolReady",this.startNextTask.bind(this))}return e.prototype.download=function(e){var t=new K(e),r=this.removeTask.bind(this,t);return t.on("abort",r),this.taskList.push(t),this.checkTaskReady(t),t},e.prototype.startNextTask=function(){var e=this.taskList.find((function(e){return!e.isInProgress()}));e&&this.checkTaskReady(e)},e.prototype.checkTaskReady=function(e){var t=this.options.threadLimit,r=void 0===t?6:t;if(!(this.taskList.findIndex((function(e){return!e.isInProgress()}))>=r||B+1>6)){var n=this.removeTask.bind(this,e);e.on("complete",n),e.on("error",n),e.on("timeout",n),setTimeout((function(){return e.start()}),0)}},e.prototype.removeTask=function(e){var t=this;this.taskList.some((function(r,n){return r===e&&(setTimeout((function(){return e.removeAllListeners()}),0),t.taskList.splice(n,1),!0)}))},e}();e.DownloadTask=K,e.IDownloadManager=q,e.appendBuffer=s,e.arrayBufferToBlob=p,e.arrayBufferToString=h,e.blobToArrayBuffer=d,e.blobToText=l,e.genUuid=u,e.getDataFormat=a,e.getExtName=_,e.getFileName=y,e.getFullPathName=m,e.isImgFile=g,e.isJsonFile=S,e.isVersionFile=E,e.monitorProgress=I,e.sep="/",e.stringToArrayBuffer=v,e.stringToBlob=f,e.transformData=A,Object.defineProperty(e,"__esModule",{value:!0})}(t,Ap)}));uo(Ip);var Cp=uo(lo((function(e,t){!function(e,t){var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function n(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&c.length>o){c.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=c.length,u=d,"function"==typeof console.warn?console.warn(u):console.log(u)}}else c=s[t]=r,++e._eventsCount;return e}function f(e,t,r){var n=!1;function o(){e.removeListener(t,o),n||(n=!0,r.apply(e,arguments))}return o.listener=r,o}function v(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function _(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}function m(e){var t;return null===(t=null==e?void 0:e.path)||void 0===t?void 0:t.startsWith("ZipInfo:")}function y(e){return"string"==typeof e&&e.startsWith("ZipInfo:")}function g(e,t){return(Array.isArray(e)?e:[e]).some((function(e){if("number"!=typeof e.version)throw new Error("file version must be an int number");return e.version0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=r[s].listener,o=s;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new i,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,o=e.length;n0?Reflect.ownKeys(this._events):[]};var E,b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s),A=function(e){function r(t){var r=e.call(this)||this;if(r.ready=!1,r.openError=!1,r.isEnable()){var n=t||{},o=n.nameSpaceId,i=n.indexDbVersion;r.dbName=function(e){return"resource-manager"+(e?"-"+e:"")}(o);var s=indexedDB.open(r.dbName,i||1);s.addEventListener("error",(function(){r.openError=!0,r.checkReady(),r.emit("error",new Error("failed to open indexedDB"))})),s.addEventListener("success",(function(){r.db=s.result,r.checkReady()})),s.addEventListener("upgradeneeded",(function(){r.db=s.result,r.handleSuccess()})),setTimeout((function(){r.checkReady()}),5e3)}else r.checkReady();return r}return n(r,e),r.prototype.checkReady=function(){this.ready||(this.ready=!0,this.emit("ready"))},r.prototype.handleSuccess=function(){if(!this.db.objectStoreNames||0===this.db.objectStoreNames.length||!this.db.objectStoreNames.contains("resource")){var e=this.db.createObjectStore("resource",{keyPath:"path",autoIncrement:!1});e.createIndex("path","path"),e.createIndex("sourceURL","sourceURL",{unique:!1})}},r.prototype.createAction=function(e){var t=this.db.transaction(["resource"],e||"readonly");return{trans:t,store:t.objectStore("resource")}},r.prototype.handleAction=function(e,t){return new Promise((function(r,n){var o=t();e.addEventListener("complete",(function(){r(o.result)})),e.addEventListener("error",(function(){n(e.error||new Error("transaction error"))})),e.addEventListener("abort",(function(){n(e.error||new Error("transaction aborted"))}))}))},r.prototype.put=function(){for(var e=[],t=0;t=0;o--){var i=r.memoryFiles[o];("string"==typeof e&&(i.path===e||i.path.startsWith(""+e+t.sep))||e.path===i.path)&&r.memoryFiles.splice(o,1)}n(!0)}))},r.prototype.clear=function(){var e=this;return new Promise((function(t){e.memoryFiles=[],t(!0)}))},r.prototype.findFileByPath=function(e){var t=this;return new Promise((function(r){r(t.memoryFiles.filter((function(t){return t.path===e}))[0])}))},r.prototype.findFileBySourceURL=function(e){var t=this;return new Promise((function(r){r(t.memoryFiles.filter((function(t){return t.sourceURL===e})))}))},r.prototype.isDirectory=function(e){var r=this;return new Promise((function(n){y(e)?n(!1):n(r.memoryFiles.some((function(r){return r.path.startsWith(""+e+t.sep)})))}))},r.prototype.ls=function(e){var r=this;return new Promise((function(n){var o=[];r.memoryFiles.forEach((function(r){if(!m(r))if(e){if(r.path.startsWith(""+e+t.sep)){var n=r.path.split(""+e+t.sep)[1]||"";if(n.includes(t.sep)){var i=""+e+t.sep+n.split(t.sep)[0];return void(i&&!o.includes(i)&&o.push(i))}o.push(r)}}else if(r.path.includes(t.sep)){var s=r.path.split(t.sep)[0]||"";s&&!o.includes(s)&&o.push(s)}else o.push(r)})),n(o)}))},r}(b),C=function(e){function r(t){var r=e.call(this)||this;if(r.isLocalAvaliable=void 0,r.isEnable()){var n=(t||{}).nameSpaceId;r.storageName=function(e){return"resource-manager"+(e?"-"+e:"")}(n)}return r}return n(r,e),r.prototype.isEnable=function(){if(void 0!==this.isLocalAvaliable)return this.isLocalAvaliable;try{this.isLocalAvaliable=!0,localStorage.setItem("privateTest","")}catch(e){this.isLocalAvaliable=!1}return this.isLocalAvaliable},r.prototype.saveFile=function(e){var t=this;return this.isEnable()?new Promise((function(r){var n=t.getLocalFile();n.some((function(t,r){return t.path===e.path&&(n.splice(r,1,e),!0)}))||n.push(e),localStorage.setItem(t.storageName,JSON.stringify(n)),r(!0)})):Promise.resolve(!1)},r.prototype.getLocalFile=function(){var e=localStorage.getItem(this.storageName),t=[];if(e)try{t=JSON.parse(e)||"[]"}catch(e){console.log(e)}return t},r.prototype.removeFile=function(e){var r=this;return this.isEnable()?new Promise((function(n){for(var o=r.getLocalFile(),i=o.length-1;i>=0;i--){var s=o[i];("string"==typeof e&&(s.path===e||s.path.startsWith(""+e+t.sep))||e.path===s.path)&&o.splice(i,1)}localStorage.setItem(r.storageName,JSON.stringify(o)),n(!0)})):Promise.resolve(!1)},r.prototype.clear=function(){var e=this;return this.isEnable()?new Promise((function(t){localStorage.removeItem(e.storageName),t(!0)})):Promise.resolve(!1)},r.prototype.findFileByPath=function(e){var t=this;return this.isEnable()?new Promise((function(r){r(t.getLocalFile().filter((function(t){return t.path===e}))[0])})):Promise.resolve(void 0)},r.prototype.findFileBySourceURL=function(e){var t=this;return this.isEnable()?new Promise((function(r){r(t.getLocalFile().filter((function(t){return t.sourceURL===e})))})):Promise.resolve([])},r.prototype.isDirectory=function(e){var r=this;return this.isEnable()?new Promise((function(n){y(e)?n(!1):n(r.getLocalFile().some((function(r){return r.path.startsWith(""+e+t.sep)})))})):Promise.resolve(!1)},r.prototype.ls=function(e){var r=this;return this.isEnable()?new Promise((function(n){var o=[];r.getLocalFile().forEach((function(r){if(!m(r))if(e){if(r.path.startsWith(""+e+t.sep)){var n=r.path.split(""+e+t.sep)[1]||"";if(n.includes(t.sep)){var i=""+e+t.sep+n.split(t.sep)[0];return void(i&&!o.includes(i)&&o.push(i))}o.push(r)}}else if(r.path.includes(t.sep)){var s=r.path.split(t.sep)[0]||"";s&&!o.includes(s)&&o.push(s)}else o.push(r)})),n(o)})):Promise.resolve([])},r}(b);(E=e.FileStoreEnum||(e.FileStoreEnum={})).MEMORY="memoryStore",E.INDEX_DB="indexedDBStore",E.STORAGE="storageStore";var T=function(r){function i(e){var t=r.call(this)||this;return t.indexedDBStore=new A(e),t.memoryStore=new I,t.storageStore=new C(e),t}return n(i,r),i.prototype.saveFile=function(t,r,n){var i=this;void 0===r&&(r=!0);var s=(n||{}).forceSpecifyStore;return(r?this.findFileByPath(t.path,n):Promise.resolve(void 0)).then((function(r){if((null==r?void 0:r.version)&&g(t,r.version))throw new Error("there is an higher version file existed already");var n=o(o({},t),{createTime:r&&r.createTime||Date.now(),updateTime:Date.now()});return s&&i[s]&&i[s].isEnable()&&(s!==e.FileStoreEnum.STORAGE||i.isLocalStorageAvaliable(n))?i[s].saveFile(n):i[i.saveToTargetStoreRule(n)].saveFile(n)}))},i.prototype.isLocalStorageAvaliable=function(e){var r=e.data;return"string"===t.getDataFormat(r)&&r.length<=102400&&this.storageStore.isEnable()},i.prototype.saveToTargetStoreRule=function(t){return this.indexedDBStore.isEnable()?e.FileStoreEnum.INDEX_DB:this.isLocalStorageAvaliable(t)?e.FileStoreEnum.STORAGE:e.FileStoreEnum.MEMORY},i.prototype.removeFile=function(e,t){var r=(t||{}).forceSpecifyStore;return r&&this[r]?this[r].removeFile(e):Promise.all([this.indexedDBStore.removeFile(e),this.storageStore.removeFile(e),this.memoryStore.removeFile(e)]).then((function(){return!0}))},i.prototype.clear=function(e){var t=(e||{}).forceSpecifyStore;return t&&this[t]?this[t].clear():Promise.all([this.indexedDBStore.clear(),this.storageStore.clear(),this.memoryStore.clear()]).then((function(){return!0}))},i.prototype.findFileByPath=function(e,t){var r=this,n=(t||{}).forceSpecifyStore;return n&&this[n]?this[n].findFileByPath(e):S(this.searchInTargetStoreRule(),(function(t,n){return t?Promise.resolve(t):r[n].findFileByPath(e)}))},i.prototype.findFileBySourceURL=function(e,t){var r=this,n=(t||{}).forceSpecifyStore;return n&&this[n]?this[n].findFileBySourceURL(e):S(this.searchInTargetStoreRule(),(function(t,n){return r[n].findFileBySourceURL(e).then((function(e){return t?t.filter((function(t){return!e.some((function(e){return e.path===t.path}))})).concat(e||[]):e||[]}))}))},i.prototype.searchInTargetStoreRule=function(){return[e.FileStoreEnum.INDEX_DB,e.FileStoreEnum.STORAGE,e.FileStoreEnum.MEMORY]},i.prototype.isDirectory=function(e){var t=this;return e?S(this.searchInTargetStoreRule(),(function(r,n){return r?Promise.resolve(!0):t[n].isDirectory(e)})):Promise.resolve(!0)},i.prototype.ls=function(e){var t=this;return this.isDirectory(e).then((function(r){if(!r)throw new Error("path: "+e+" is an invalid directory path");return S(t.searchInTargetStoreRule(),(function(r,n){return t[n].ls(e).then((function(e){return r?(e||[]).concat(r.filter((function(t){return!e.some((function(e){return"string"==typeof t?e===t:"string"!=typeof e&&e.path===t.path}))}))):e}))}))}))},i}(s),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(s),w=function(e){function r(r){var n=e.call(this)||this,o=r||{},i=o.storeOptions,s=o.downloadManagerOptions;return n.downloadManager=new t.IDownloadManager(s),n.store=new T(i),n.store.indexedDBStore.on("ready",(function(){return n.emit("ready")})),n}return n(r,e),r.prototype.getFile=function(e,t,r){var n=this,o=new O,i=Promise.resolve(void 0),s=t||{},a=s.downloadOptions,c=s.forceDownload,u=s.saveRootPath;c?i=Promise.resolve(void 0):"string"==typeof e?i=this.store.findFileByPath(e,r):(null==e?void 0:e.sourceURL)?i=this.store.findFileBySourceURL(e.sourceURL):a&&(a.domParams||a.socketParams||a.xhrParams)&&(i=this.store.findFileBySourceURL(this.genSourceURL(a)));var d=null,l=new Promise((function(e){d=e}));return o.getDownloadTask=function(){return l},i=i.then((function(e){if(e&&(!Array.isArray(e)||e.length)){var t=e;if(Array.isArray(t)){var n=t.find((function(e){return m(e)}));if(!n)return;t=t.filter((function(e){return!m(e)}));var i=n.data;if("string"!=typeof i)return;if(!JSON.parse(i||"[]").every((function(e){return t.some((function(t){return t.path===e}))})))return}if(!(null==r?void 0:r.targetVersion)||!g(t,r.targetVersion))return o.emit("checkExpire",!1),t;o.emit("checkExpire",!0)}})).then((function(t){if(!t&&a){var i=n.downloadManager.download(a);return d(i),new Promise((function(t,s){i.on("complete",(function(i){setTimeout((function(){var s=Array.isArray(i)?i.map((function(e){var t=e.data,o=e.path,i=e.extName;return{path:n.genFilePath(u,o),sourceURL:n.genSourceURL(a),data:t,fileFormat:i||n.getFileFormat(a),version:(null==r?void 0:r.targetVersion)||1}})):{path:n.genFilePath(u,void 0),sourceURL:n.genSourceURL(a),data:i,fileFormat:n.getFileFormat(a),version:(null==r?void 0:r.targetVersion)||1};if(Array.isArray(s)&&"string"==typeof e&&e){var c=s.find((function(t){return t.path===e}));t(c||s)}else t(s);o.emit("beforeSet",s),n.beforeWrite(s,r).then((function(){o.emit("afterSet")})).catch((function(e){return o.emit("afterSet",e)}))}),0)})),i.on("abort",s),i.on("error",s),i.on("timeout",(function(){return s(new Error("download timeout"))}))}))}return d(void 0),t})).catch((function(e){return d(void 0),Promise.reject(e)})),o.getResult=function(){return i},o},r.prototype.genSourceURL=function(e){var r=e.domParams,n=e.type,o=e.xhrParams;if(n===t.DownloaderType.SOCKET)return null;var i=(n===t.DownloaderType.DOM?r:o)||{},s=i.url,a=void 0===s?"":s,c=i.body;return c&&Object.keys(c).length?a+(a.includes("?")?"&":"?")+"downloadBodyParams="+JSON.stringify(c):a},r.prototype.updateFile=function(e,t){return this.saveStore(e,!0,t)},r.prototype.beforeWrite=function(e,t){var r,n,o=this;return Array.isArray(e)?Promise.all(e.concat((r=e,n=r[0].sourceURL||"",{path:"ZipInfo:"+n,sourceURL:n,data:JSON.stringify(r.map((function(e){return e.path})))})).map((function(e){return o.saveStore(e,!1,t)}))).then((function(e){return e.filter((function(e){return!m(e)}))})):this.saveStore(e,!0,t)},r.prototype.getFileFormat=function(e){var r=e||{},n=r.xhrParams,o=r.domParams,i=r.socketParams,s=r.type;return s===t.DownloaderType.DOM&&(null==o?void 0:o.fileFormat)?o.fileFormat:s===t.DownloaderType.SOCKET&&(null==i?void 0:i.fileFormat)?i.fileFormat:(null==n?void 0:n.fileFormat)?n.fileFormat:"unknow"},r.prototype.genFilePath=function(e,r){return r?""+(e||"")+(e?t.sep:"")+r:e||""},r.prototype.saveStore=function(e,t,r){return void 0===t&&(t=!0),this.store.saveFile(e,t,r).then((function(t){if(t)return e;throw new Error("fail to save file in local store")}))},r.prototype.remove=function(e,t){return this.store.removeFile(e,t)},r.prototype.clear=function(e){return this.store.clear(e)},r.prototype.list=function(e){return this.store.ls(e)},r.prototype.updateVersion=function(e,t){var r=this;return this.store.findFileByPath(e).then((function(n){if(n)return r.saveStore(o(o({},n),{version:t})).then((function(){}));throw new Error("the target path: "+e+" isn't existed")}))},r.prototype.updateSourceURL=function(e,t){var r=this;return this.store.findFileByPath(e).then((function(n){if(n)return r.saveStore(o(o({},n),{sourceURL:t})).then((function(){}));throw new Error("the target path: "+e+" isn't existed")}))},r}(s);e.IResourceManager=w,Object.defineProperty(e,"__esModule",{value:!0})}(t,Ip)})));function Tp(e,t,r,n){const{meeting:{userId:o},audio:{localShareAudioUserMutedList:i}}=n;return i.filter(e=>e.userId!==t).forEach(t=>{e.setSharingAudioVolume(t.userId,!0)}),e.setSharingAudioVolume(t,r),t===o?nc(r):ec({userId:t,muted:r})}function Op(e,t,r){const{audio:{audioSsrc:n,activeMicrophone:o,activeSpeaker:i,isAllowToTalk:s,isSpeakerOnly:a},meeting:{svcUrl:c,conId:u,reportDomain:d,isAudioBridgeEnabled:l}}=t,p=Ea(t),h=a||fa(p.userRole)&&!s,f=null!=r?r:!h;return hd()&&!l&&console.warn("Cannot start audio due to the service is not ready."),e.joinComputerAudio(n,o,i,f,hd()?{rwgHost:c,cid:u,nginxHost:d}:void 0)}async function wp(e,t,r){const n=[],{audio:{isJoinComputerAudioBeforeSharingAudio:o,mutedBeforeSharingAudio:i}}=r,s=Ea(r);return!0===o&&(await Op(e,r),n.push(tc(void 0)),!1===i&&(n.push(Va(!0)),t.mute(s.userId,!1)),n.push(Xa(void 0))),n}async function Rp(e,t,r){const{audio:{isSharingAudio:n},meeting:{userId:o}}=r,i=[];if(i.push(Tp(e,o,!0,r)),n){await e.leaveSharingAudio(!1),i.push(oc(!1));const n=await wp(e,t,r);i.push(...n),setTimeout(()=>{Ks("SHARE_AUDIO_STATE_CHANGE",{state:"off"})},0)}return i.push(rc(!1)),i}async function Dp(e,t,r){const{audio:{audioSsrc:n,activeMicrophone:o,activeSpeaker:i}}=r,s=Ea(r),a=await async function(e,t){const r=[],n=Ea(t),{audio:{isMicrophoneForbidden:o}}=t;return"computer"===(null==n?void 0:n.audio)&&(r.push(tc(!0)),r.push(Xa(n.muted)),await e.leaveComputerAudio(),r.push(Ba(0)),o&&r.push(Fa(!1))),r}(e,r);return await e.leaveSharingAudio(!0),await e.joinSharingAudio({ssrc:n,microphoneDeviceId:o,speakerDeviceId:i,isCaptureAudio:fa(s.userRole)}),a.push(rc(!0)),a.push(oc(!0)),a.push(Tp(e,s.userId,!1,r)),a.findIndex(e=>e.type==="".concat(tc)&&!0===e.payload)>-1&&(a.push(Va(!0)),t.mute(r.meeting.userId,!0),Ks("AUDIO_CURRENT_USER_MUTED",{source:exports.MutedSource.SharingAudio})),setTimeout(()=>{Ks("SHARE_AUDIO_STATE_CHANGE",{state:"on"})},0),a}const Np=()=>{var e;const t=null===(e=di())||void 0===e?void 0:e.toLocaleLowerCase();if(t.indexOf("safari")>-1&&-1===t.indexOf("ios-safari")){var r;const e=null===(r=navigator.userAgent.match(/version\/(\d+\.?\d+)/i))||void 0===r?void 0:r[1];return yo(e||"","15.2")>=0}return!1},Pp=Ki.createAgent(),Mp=vd(es.getInstance()),kp=e=>e.audioConnectionStatus===As.ConnectSuccess&&!e.muted;var Up=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>Cn(e,12033).pipe(jt(t),Oe(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}}}),Ks("AUDIO_ACTIVE_SPEAKER",Object.values(s))),Na(s)})),unmuteConsentAfterSpotlighted:(e,t)=>Cn(e,16135).pipe(jt(t),kt(e=>{let[t,r]=e;const{payload:{body:{id:n,bLeadershipOn:o}}}=t,{audio:{bCanUnmute:i}}=r,s=Ea(r);if(s){const{isHost:e,bCoHost:t,userId:r,audio:a,muted:c}=s,u=e||t;o&&r>>10==n>>10&&(null!==a&&""!==a&&!0!==c||!u&&!i||Ks("AUDIO_UNMUTE_CONSENT",hs.Spotlight))}}),It(ee)),unmuteConsentEpic:(e,t)=>Cn(e,12037).pipe(jt(t),kt(e=>{let[,t]=e;const r=Ea(t);null!==(null==r?void 0:r.audio)&&""!==(null==r?void 0:r.audio)&&1==(null==r?void 0:r.muted)&&Ks("AUDIO_UNMUTE_CONSENT",hs.Unmute)}),It(ee)),setAudioAttributeEpic:(e,t)=>Cn(e,Li).pipe(tt(e=>e.payload.body&&["bCanUnmute","bMutedAll","bMutedUponEntry"].some(t=>void 0!==e.payload.body[t])),$u(e=>{if(void 0!==e.payload.body.bCanUnmute)return Pa(e.payload.body.bCanUnmute);if(void 0!==e.payload.body.bMutedAll){const r=Ea(t.value);if(("computer"===(null==r?void 0:r.audio)||"phone"===(null==r?void 0:r.audio))&&0==r.muted)return La(e.payload.body.bMutedAll)}return void 0!==e.payload.body.bMutedUponEntry?ja(e.payload.body.bMutedUponEntry):void 0})),currentUserAudioChangeEpic:(e,t)=>Cn(e,Ui).pipe(jt(t),tt(e=>{let[,t]=e;return t.socket.zoomSocketStatus===Da.Connected}),Fe(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]=ot(Ve(n),t=>t.id===e);i.subscribe(e=>{Ks("AUDIO_PARTICIPANT_AUDIO_UPDATE",e)});const{audio:{isActiveOperation:s,isMutedAll:a,isSpeakerOnly:c,isAllowToTalk:u,isShareAudioEnabled:d,isSharingAudio:l}}=r;let p=Ea(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=fa(p.userRole);return o.pipe(kt(async e=>{var t,r,n,o;if(e.audio!==(null===(t=p)||void 0===t?void 0:t.audio))if(""===e.audio)Ks("AUDIO_CURRENT_USER_LEAVE_AUDIO");else if("computer"===e.audio){const e=h&&!u||c;l&&Ks("AUDIO_CURRENT_USER_JOIN_BY_VOIP"),e&&Ks("AUDIO_CURRENT_USER_JOIN_BY_VOIP")}else if("phone"===e.audio){var i;"computer"===(null===(i=p)||void 0===i?void 0:i.audio)&&(await Mp.leaveComputerAudio(),Pp.joinOrLeaveVoip(!1)),Ks("AUDIO_CURRENT_USER_JOIN_BY_PHONE")}if(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))if(!0===e.muted){const e=s?exports.MutedSource.Active:a?exports.MutedSource.PassiveByMuteAll:exports.MutedSource.PassiveByMuteOne;Ks("AUDIO_CURRENT_USER_MUTED",{source:e}),d||Mp.muteAudio()}else!1===e.muted&&(Ks("AUDIO_CURRENT_USER_UNMUTED",{source:s?"active":"passive"}),Mp.unmuteAudio())}),tt(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)}),It(ae(Va(!1),La(!1))))}return ee})),handleDialOutEpic:(e,t)=>Cn(e,8198).pipe(jt(t),tt(e=>{let[t,r]=e;return t.payload.seq==r.audio.dialout.sequence}),kt(e=>{let[t]=e;const r=t.payload.body.result;Ks("AUDIO_DIALOUT_RESULT_CODE",{code:r}),r===exports.DialoutState.Success?Ks("AUDIO_DIALOUT_RESULT_SUCCESS"):-1===[exports.DialoutState.Calling,exports.DialoutState.Ringing,exports.DialoutState.Accepted,exports.DialoutState.Success].indexOf(r)&&Ks("DIALOUT_FAIL")}),Oe(e=>{let[t]=e;return ka(t.payload.body.result)})),handleDialouCancelEpic:e=>Cn(e,8198).pipe(tt(e=>{var t;return[exports.DialoutState.Canceling,exports.DialoutState.Canceled,exports.DialoutState.CancelFailed].includes(null===(t=e.payload.body)||void 0===t?void 0:t.result)}),kt(e=>{var t;const r=null===(t=e.payload.body)||void 0===t?void 0:t.result;Ks("AUDIO_DIALOUT_RESULT_CODE",{code:r}),r===exports.DialoutState.Canceled?Ks("AUDIO_DIALOUT_CANCEL_SUCCESS"):r===exports.DialoutState.CancelFailed&&Ks("DIALOUT_CANCEL_FAIL")}),Oe(e=>ka(e.payload.body.result))),handleAllowToTalkEpic:(e,t)=>Cn(e,12036).pipe(jt(t),Fe(e=>{let[t,r]=e;const n=Ea(r),{media:{audioEncodeStatus:o}}=r,{promoterID:i,bAllowTalk:s}=t.payload.body;if((null==n?void 0:n.userId)===i){if(Ks("AUDIO_ALLOW_TALK_CHANGE",s),s){let e=ae(!0);return"success"!==o&&(Mp.enableAudioEncode(),e=it(Js("AUDIO_ENCODE_SUCCESS",1).pipe(Et(!0)),Js("AUDIO_ENCODE_FAIL",1).pipe(Et(!1)))),e.pipe(Fe(e=>(e&&Ks("AUDIO_UNMUTE_CONSENT",hs.AllowToTalk),ee)),Ot(Ua(!0)))}if(Pp.mute(i,!0),"computer"===(null==n?void 0:n.audio))return Mp.leaveComputerAudio(),ct(300).pipe(kt(async()=>{(Np()?it(Qe(document,"click").pipe(yt(1)),Qe(document,"touchend").pipe(yt(1))).toPromise():Promise.resolve(!0)).then(()=>{Op(Mp,r,!1)})}),It(ee),Ot(Ua(!1)))}return ee})),handleAllowToTalkResponseEpic:e=>Cn(e,8205).pipe(kt(e=>{Ks("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)}),It(ee)),handleAttendeePromoteDepromote:(e,t)=>Tn(e,"POOL").pipe(tt(e=>e.payload.data.action===Al.Depromote||e.payload.data.action===Al.Promote),jt(t),kt(e=>{let[t,r]=e;const n=Ea(r);"phone"===(null==n?void 0:n.audio)?Pp.audioDrop(n.userId):"computer"===(null==n?void 0:n.audio)&&(t.payload.data.action,Al.Promote)}),It(ee)),setAudioSSRCEpic:(e,t)=>Cn(e,12035).pipe(jt(t),Fe(e=>{let[r,n]=e;const{meeting:{currentUserAudioBeforeReset:o},media:{audioDecodeStatus:i,audioEncodeStatus:s}}=n,{payload:{body:{ssrc:a}}}=r,c=dd(t).pipe(Fe(e=>{if("computer"===o&&(null==e||!e.audio)){const r=fa(e.userRole);return ud("audio",r?"success":s,i).pipe(tt(e=>{let[t,r]=e;return t&&r}),kt(()=>{(Np()?it(Qe(document,"click").pipe(yt(1)),Qe(document,"touchend").pipe(yt(1))).toPromise():Promise.resolve(!0)).then(()=>{Pp.joinOrLeaveVoip(!0),Op(Mp,t.value)})}),Et(Go(void 0)))}return ee}));return $e(ae(xa(a)),c)})),handleMergeAudioEpic:(e,t)=>Cn(e,7952).pipe(Nt(e=>Js("AUDIO_CURRENT_USER_JOIN_BY_PHONE",1).pipe(jt(t),kt(t=>{let[,r]=t;const{BindStatus:n,nOperatorUserId:o}=e.payload.body,i=r.participants.attendeesList.find(e=>e.userId===o);!0===n&&Ks("AUDIO_MERGE_AUDIO_INDICATION",{operatorName:null==i?void 0:i.displayName,operatorUserId:o,operatorRole:null==i?void 0:i.userRole})})))),handleUserGrantAudioCaptureEpic:(e,t)=>Rn(e,ls.UserGrantCaptureAudio).pipe(jt(t),Fe(e=>{let[,t]=e;Ks("AUDIO_CURRENT_USER_JOIN_BY_VOIP");const r=Ea(t),{meeting:{isCurrentUserMutedBeforeReset:n},audio:{bMutedUponEntry:o,isUserGrantCaptureAudio:i,isAllowToTalk:s}}=t,a=[Ha(!0)];if(r){!0===r.muted&&!1===s&&Pp.mute(r.userId,!0);const e=i||r.isHost||s;(!0===n||!e&&o)&&(Pp.mute(r.userId,!0),n&&a.push(Wo(void 0)))}return Ve(a)})),handleUserForbiddenMicrophoneEpic:e=>Rn(e,ls.UserForbiddedCaptureAudio).pipe(kt(()=>{Ks("USER_FORBIDDEN_MICROPHONE")}),Et(Fa(!0))),handleAudioSocketErrorEpic:e=>Rn(e,ls.AudioWebsocketBroken).pipe(kt(()=>{Ks("ESTABLISH_AUDIO_STREAM_ERROR")}),It(ee)),handleAudioZeroDataEpic:(e,t)=>Rn(e,ls.AudioZeroData).pipe(jt(t),$u(e=>{let[,t]=e;const{audio:{webrtcRestartCount:r,activeMicrophone:n}}=t;if(r<3)return Mp.restoreWebRTC(n),Ba(r+1)})),handleAutoPlayEpic:(e,t)=>e.pipe(Kt("".concat(za)),tt(e=>!1===e.payload),Fe(()=>(Ks("AUDIO_AUTO_PLAY_FAILED"),it(Qe(document,"click").pipe(yt(1)),Qe(document,"touchend").pipe(yt(1))).pipe(kt(()=>{Pp.joinOrLeaveVoip(!0),Op(Mp,t.value)}),Et(za(!0)))))),handleAudioActionCompleteEpic:e=>Rn(e,[ls.JoinComputerAudioComplete,ls.JoinSharingAudioComplete,ls.LeaveComputerAudioComplete,ls.LeaveSharingAudioComplete]).pipe(kt(()=>{fd.completeAudioAction()}),It(ee)),handleAudioQosDataEpic:(e,t)=>Rn(e,ls.audioQosData).pipe(jt(t),Oe(e=>{let[t,r]=e;const{meeting:{isWebinar:n},media:{audioEncodeStatus:o,audioDecodeStatus:i},participants:{xmppAttendeeList:s,allowTalkAttendeesList:a}}=r,c=Ea(r),u=Ra(r);let d=u.length>0,l=u.some(kp);n&&(d=d||Boolean(s.length),l=l||a.some(kp));const p=("computer"===(null==c?void 0:c.audio)||"phone"===(null==c?void 0:c.audio))&&o&&!(null!=c&&c.muted)&&d,h=("computer"===(null==c?void 0:c.audio)||"phone"===(null==c?void 0:c.audio))&&i&&d&&l;return t.payload.data.encoding?p?(Ks("AUDIO_STATISTIC_DATA",t.payload),ic(t.payload)):ic(Is):h?(Ks("AUDIO_STATISTIC_DATA",t.payload),sc(t.payload)):sc(Is)}))});const Lp=Ki.createAgent(),Vp=vd(es.getInstance());var xp=Object.freeze({__proto__:null,handleAddLocalShareAudioUserEpic:(e,t)=>Cn(e,Ui).pipe(tt(e=>{const t=e.payload.body.update;return t&&t.length>0&&t.findIndex(e=>void 0!==e.bShareOn)>-1}),jt(t),Fe(e=>{let[t,r]=e;const{payload:{body:{update:n}}}=t,{audio:{localShareAudioUserMutedList:o}}=r,i=n.filter(e=>!0===e.bShareOn&&!0===e.bShareAudioOn),s=[];return i.length>0&&i.forEach(e=>{-1===o.findIndex(t=>t.userId===e.id)&&s.push($a(e.id))}),Ve(s)})),handleShareWithAudioEpic:(e,t)=>Rn(e,ls.SharingDesktopStreamHaveAudio).pipe(Nt(()=>Cn(e,Ui).pipe(tt(e=>{var r;const{payload:{body:n}}=e,{meeting:{userId:o}}=t.value;return(null==n||null===(r=n.update)||void 0===r?void 0:r.findIndex(e=>e.id===o&&!0===e.bShareOn))>-1}),yt(1),rd(async()=>{const e=t.value;return await Dp(Vp,Lp,e)}),Ot(rc(!0))))),handleMediaSDKLeaveShareAudioEpic:(e,t)=>Rn(e,ls.SharingDesktopStreamHaveNoAudio).pipe(jt(t),tt(e=>{var t;let[,r]=e;return!0===(null===(t=r.audio)||void 0===t?void 0:t.isShareAudioEnabled)}),rd(async e=>{let[,t]=e;return await Rp(Vp,Lp,t)})),handleJoinComputerAudioAfterShareAudioEpic:(e,t)=>Cn(e,Ui).pipe(jt(t),tt(e=>{let[,t]=e;return t.socket.zoomSocketStatus===Da.Connected&&!0===t.audio.isSharingAudio}),Fe(e=>{var r;let[n,o]=e;if(null!==(r=n.payload.body.update)&&void 0!==r&&r.some(e=>void 0!==e.audio||void 0!==e.muted)){const{meeting:{userId:e}}=o,r=n.payload.body.update.filter(t=>t.id===e);return dd(t).pipe(Fe(e=>{const t=[];return r.findIndex(e=>"computer"===e.audio)>-1&&"computer"!==(null==e?void 0:e.audio)&&(t.push(tc(!0)),t.push(Xa(!0))),Ve(t)}))}return ee})),handleShareAudioWithCurrentShareStatusChangeEpic:(e,t)=>e.pipe(Kt("".concat(hc)),le(be),jt(t),tt(e=>{var t;let[,r]=e;return!0===(null===(t=r.audio)||void 0===t?void 0:t.isShareAudioEnabled)}),rd(async e=>{let[t,r]=e;const{payload:n}=t,{audio:{isShareAudioMuted:o,isSharingAudio:i}}=r,s=[];if(n===exports.ShareStatus.End){const e=await Rp(Vp,Lp,r);s.push(...e)}else if(n===exports.ShareStatus.Paused){if(!1===o&&!0===i){await Vp.leaveSharingAudio(!0),s.push(oc(!1));const e=await wp(Vp,Lp,r);s.push(...e),setTimeout(()=>{Ks("SHARE_AUDIO_STATE_CHANGE",{state:"off"})},0)}}else if(n===exports.ShareStatus.Sharing&&!1===o&&!1===i){const e=await Dp(Vp,Lp,r);s.push(...e)}return s}))});const jp=Ki.createAgent(),Hp=es.getInstance();var Fp=Object.freeze({__proto__:null,handleAudioBridgeTokenEpic:e=>Cn(e,4299).pipe(kt(e=>{const{payload:t}=e;Hp.passThroughRWGMessage(t)}),It(ee)),handleAudioBridgeReconnectEpic:e=>Rn(e,ls.AudioBridgeReconnectStart).pipe(kt(()=>{jp.joinOrLeaveVoip(!1)}),It(ee)),handleAudioBridgeReconnectSuccessEpic:e=>Rn(e,ls.AudioBridgeReconnectEnd).pipe(kt(()=>{jp.joinOrLeaveVoip(!0)}),It(ee))});const Bp={asnIds:{asn1:{userId:0,displayName:null},asn2:{userId:0,displayName:null},asn3:{userId:0,displayName:null}},microphoneDevicesList:[],speakerDevicesList:[],activeMicrophone:"default",activeSpeaker:"default",isMicrophoneForbidden:!1,audioSsrc:0,bCanUnmute:!1,bMutedUponEntry:!1,isAllowToTalk:void 0,dialout:{sequence:0,returnCode:-1},canPlayAudio:!1,isActiveOperation:!1,isMutedAll:!1,isUserGrantCaptureAudio:!1,webrtcRestartCount:0,isComputerAudioLoading:!1,isSpeakerOnly:!1,localShareAudioUserMutedList:[],statistic:{encode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0},decode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0}}},Gp=Fr({["".concat(Na)]:pl((e,t)=>{let{payload:r}=t;e.asnIds=c({},r)}),["".concat(Pa)]:pl((e,t)=>{let{payload:r}=t;e.bCanUnmute=r}),["".concat(Ma)]:pl((e,t)=>{let{payload:r}=t;const{dialout:n}=e;n.sequence=r}),["".concat(ka)]:pl((e,t)=>{let{payload:r}=t;const{dialout:n}=e;n.returnCode=r}),["".concat(Ua)]:pl((e,t)=>{let{payload:r}=t;e.isAllowToTalk=r,e.isAllowToTalkAttendeeConnected=!1}),["".concat(Va)]:pl((e,t)=>{let{payload:r}=t;e.isActiveOperation=r}),["".concat(La)]:pl((e,t)=>{let{payload:r}=t;e.isMutedAll=r}),["".concat(xa)]:pl((e,t)=>{let{payload:r}=t;e.audioSsrc=r}),["".concat(ja)]:pl((e,t)=>{let{payload:r}=t;e.bMutedUponEntry=r}),["".concat(Ha)]:pl((e,t)=>{let{payload:r}=t;e.isUserGrantCaptureAudio=r}),["".concat(Fa)]:pl((e,t)=>{let{payload:r}=t;e.isMicrophoneForbidden=r}),["".concat(Ba)]:pl((e,t)=>{let{payload:r}=t;e.webrtcRestartCount=r}),["".concat(Ga)]:pl((e,t)=>{let{payload:r}=t;e.microphoneDevicesList=r}),["".concat(Wa)]:pl((e,t)=>{let{payload:r}=t;e.speakerDevicesList=r}),["".concat(Ka)]:pl((e,t)=>{let{payload:r}=t;e.activeMicrophone=r}),["".concat(qa)]:pl((e,t)=>{let{payload:r}=t;e.activeSpeaker=r}),["".concat(za)]:pl((e,t)=>{let{payload:r}=t;e.canPlayAudio=r}),["".concat(Ja)]:e=>{let{dialout:{returnCode:t}}=e;return c(c({},Bp),{},{dialout:c(c({},Bp.dialout),{},{returnCode:t})})},["".concat(Qa)]:pl((e,t)=>{let{payload:r}=t;e.isComputerAudioLoading=r}),["".concat(Ya)]:pl((e,t)=>{let{payload:r}=t;e.isSpeakerOnly=r}),["".concat(Za)]:pl((e,t)=>{let{payload:r}=t;e.isAllowToTalkAttendeeConnected=r}),["".concat(Xa)]:pl((e,t)=>{let{payload:r}=t;e.mutedBeforeSharingAudio=r}),["".concat(oc)]:pl((e,t)=>{let{payload:r}=t;e.isSharingAudio=r}),["".concat(nc)]:pl((e,t)=>{let{payload:r}=t;e.isShareAudioMuted=r}),["".concat($a)]:pl((e,t)=>{let{payload:r}=t;e.localShareAudioUserMutedList.push({userId:r,muted:!1})}),["".concat(ec)]:pl((e,t)=>{let{payload:r}=t;const n=e.localShareAudioUserMutedList.find(e=>e.userId===r.userId);n&&(n.muted=r.muted)}),["".concat(tc)]:pl((e,t)=>{let{payload:r}=t;e.isJoinComputerAudioBeforeSharingAudio=r}),["".concat(rc)]:pl((e,t)=>{let{payload:r}=t;e.isShareAudioEnabled=r}),["".concat(ic)]:pl((e,t)=>{let{payload:r}=t;e.statistic.encode=r.data}),["".concat(sc)]:pl((e,t)=>{let{payload:r}=t;e.statistic.decode=r.data})},Bp),Wp=In(Up,xp,Fp),Kp=e=>4294966272&e,qp=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};async function zp(e,t,r){if("blur"===e)return"blur";{let n=e;if(t){const t=await function(e){return new Promise((t,r)=>{try{const r=document.createElement("canvas"),n=r.getContext("2d"),o=new Image;o.src=e;const i=16/9,s=1280,a=Math.floor(s/i);r.width=s,r.height=a,o.onload=()=>{const{width:e,height:c}=o,u=c*i;if(u>s){const t=e,r=Math.floor(e/i),u=0,d=(c-r)/2;null==n||n.drawImage(o,u,d,t,r,0,0,s,a)}else{const t=u,r=c,i=(e-t)/2,d=0;null==n||n.drawImage(o,i,d,t,r,0,0,s,a)}r.toBlob(e=>{t(e)})}}catch(e){e instanceof DOMException&&e.code===DOMException.SECURITY_ERR&&console.error("Image is not from the same origin, add CORS header to solve this issue"),r(e)}})}(e);n=URL.createObjectURL(t)}if(n){const e=Math.floor(100*Math.random()),o="".concat("__ZOOM_SDK_VIRTUAL_BACKGROUND_IMAGE_@__").concat(e),i=document.createElement("img");return i.src=n,i.id=o,i.style.display="none",i.onload=()=>{t&&URL.revokeObjectURL(n)},i.onerror=e=>{t&&URL.revokeObjectURL(n),console.error("Cannot load virtual background image.",e)},(null!=r?r:document.body).appendChild(i),new Promise(e=>{i.onload=()=>{t&&URL.revokeObjectURL(n),e(o)},i.onerror=r=>{t&&URL.revokeObjectURL(n),console.error("Cannot load virtual background image.",r),e(null)}})}}return null}const Jp=Ki.createAgent(),Qp=es.getInstance();var Yp=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>Rn(e,ls.StartVideoCaptureSuccess).pipe(jt(t),$u(e=>{let[,t]=e;const{video:{cameraDevicesList:r,activeCamera:n},meeting:{userId:o}}=t;return r.length<1?(Ks("CAN_NOT_DETECT_CAMERA",{reason:"Cannot detect camera devices"}),void Qp.stopCaptureVideo()):"default"===n||r.some(e=>e.deviceId===n)?void Jp.muteAttendeeVideo(o,!1):(Ks("CAN_NOT_FIND_CAMERA",{reason:"cannot find target camera"}),void Qp.stopCaptureVideo())})),startVideoResponse:(e,t)=>Cn(e,Ui).pipe(jt(t),tt(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}),tt(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)}),$u(()=>(Ks("VIDEO_CAPTURE_START_SUCCESS"),Rc(!0)))),handleForbiddenCaptureVideoEpic:e=>Rn(e,ls.UserForbiddedCaptureVideo).pipe(kt(()=>Ks("VIDEO_USER_FORBIDDEN_CAPTURE")),Et(Nc(!0))),handleCameraIsTakenByOtherProgramsEpic:e=>Rn(e,ls.UserCameraIsTakenByOtherPrograms).pipe(kt(()=>Ks("VIDEO_CAMERA_IS_TAKEN",{reason:"User camera is taken by other programs."})),Et(Lc(!0))),handleVideoSocketErrorEpic:e=>Rn(e,ls.VideoWebsocketBroken).pipe(kt(()=>{Ks("VIDEO_ESTABLISH_STREAM_ERROR",{reason:"Video websocket broken."})}),It(ee)),handleStopVideoCaptureFailedEpic:e=>Rn(e,ls.StopVideoCaptureFailed).pipe(kt(()=>{Ks("VIDEO_CAPTURE_STOP_RESULT",{failed:!0,reason:"Unknown."})}),It(ee)),handleStopVideoCaptureSuccessEpic:(e,t)=>Rn(e,ls.StopVideoCaptureSuccess).pipe(jt(t),$u(e=>{let[,t]=e;const{meeting:{userId:r},video:{isCurrentUserStartedVideo:n}}=t;n||Ks("VIDEO_CAPTURE_STOP_RESULT"),Jp.muteAttendeeVideo(r,!0)})),stopVideoResponse:(e,t)=>Cn(e,Ui).pipe(jt(t),tt(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}),tt(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)}),$u(()=>(Ks("VIDEO_CAPTURE_STOP_RESULT"),Rc(!1)))),receiveVideoMuteIndication:(e,t)=>Cn(e,16133).pipe(jt(t),tt(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}),$u(e=>{let[t]=e;const{id:r,bVideoMute:n}=t.payload.body;return Ks("RECEIVE_VIDEO_MUTE_INDICATION",{id:r,isVideoMuted:n}),!0===n&&Qp.stopCaptureVideo(),!1===n&&Ks("ASK_FOR_START_VIDEO_CONSENT",{id:r,isVideoMuted:n}),kc(n)})),receiveVideoActiveIndication:e=>Cn(e,16129).pipe(Oe(e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,n=Kp(t);return Ks("RECEIVE_VIDEO_ACTIVE_INDICATION",{bVideoOn:r,userId:n}),Tc({bVideoOn:r,userId:n})})),receiveVideoSsrcIndication:(e,t)=>Cn(e,16131).pipe(tt(e=>void 0!==e.payload.body.ssrc),jt(t),Nt(e=>{let[r,n]=e;const{meeting:{isCurrentUserStartVideoBeforeReset:o},media:{videoEncodeStatus:i},video:{captureCanvasList:s,activeCamera:a,isVerifiedVideoCaptureCanvasAfterFailover:c}}=n,{payload:{body:{ssrc:u}}}=r,d=dd(t).pipe(Fe(e=>e&&!0===o&&!0!==e.bVideoOn?ud("video",i,"success").pipe(tt(e=>{let[t,r]=e;return t&&r}),Fe(()=>{const e=[Rc(void 0)];return!1===c&&(Array.isArray(s)?s.forEach(e=>{pd(document.querySelector("#".concat(e)))}):pd(document.querySelector("#".concat(s))),e.push(xc(!0))),es.getInstance().startCaptureVideo(u,a,640,360),Ve(e)})):ee));return $e(ae(Cc(u)),d)})),receiveVideoDecodeMaxSizeEpic:e=>Rn(e,ls.VideoDecodeMaxSize).pipe(tt(e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data}),ed(e=>{const{size:t}=e.payload.data;return ae(Pc(t))})),spotlightVideoResponseEpic:e=>Cn(e,16135).pipe(Oe(e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,n=[];return t&&n.push(Kp(r)),Ks("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:n}),Dc(n)})),handleGroupLayoutIndicationEpic:(e,t)=>Cn(e,7958).pipe(jt(t),Oe(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=Ta(r);return o=o.filter(e=>i.findIndex(t=>t.userId===e)>=0),Ks("VIDEO_SPOTLIGHT_CHANGE",{spotlightList:o}),Dc(o)})),handleCurrentVideoResolution:e=>Rn(e,ls.CurrentVideoResolution).pipe($u(e=>(Ks("VIDEO_RENDER_START_SUCCESS"),Ks("RECEIVE_VIDEO_DIMENSION_CHANGE",e.payload.data),Hc(e.payload.data)))),handleMeetingVideoAttributeEpic:e=>Cn(e,Li).pipe(tt(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)}),Oe(e=>{const{payload:{body:{bFollowHostVideo:t,VideoHd:r,bCanUnmuteVideo:n}}}=e;return void 0!==t?(Ks("VIDEO_FOLLOW_HOST_ORDER_CHANGE",{bOn:t}),Gc(t)):void 0!==n?Qc(n):(Qp.enableHardwareAccelerationForVideoEncode(!1),zc(1===r))})),handleHostDragLayoutIndicationEpic:(e,t)=>Cn(e,7957).pipe(jt(t),Oe(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&&Ks("VIDEO_HOST_DRAG_LAYOUT_CHANGE",{layout:i}),Wc(i)})),handlePeerVideoStateChangeEpic:(e,t)=>Cn(e,Ui).pipe(jt(t),tt(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))}),kt(e=>{let[t,r]=e;const{payload:{body:{remove:n,update:o}}}=t,{video:{subscribedVideoList:i}}=r,s=Ca(r);if(n&&n.length>0&&n.filter(e=>i.includes(e.id)).forEach(e=>{Ks("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=>{Ks("VIDEO_OLD_USER_STOP",{userId:e.id})}),e.forEach(e=>{e.bVideoOn?Ks("VIDEO_NEW_USER_START",{userId:e.id}):Ks("VIDEO_OLD_USER_STOP",{userId:e.id})})}}),It(ee)),handleAudioQosDataEpic:(e,t)=>Rn(e,ls.videoQosData).pipe(jt(t),Oe(e=>{let[t,r]=e;const{video:{isCaptureForbidden:n,isCameraTaken:o},media:{videoEncodeStatus:i,videoDecodeStatus:s}}=r,a=Ea(r),c=Ra(r),u=c.length>0,d=(null==a?void 0:a.bVideoOn)&&!n&&!o,l=c.some(e=>e.bVideoOn),p=i&&d&&u,h=s&&u&&l;return t.payload.data.encoding?p?(Ks("VIDEO_STATISTIC_DATA",t.payload),$c(t.payload)):$c(Cs):h?(Ks("VIDEO_STATISTIC_DATA",t.payload),eu(t.payload)):eu(Cs)}))}),Zp=Object.freeze({__proto__:null,handleVBPreloadEpic:e=>Rn(e,[ls.VbModelPreloadingOk,ls.VbModelPreloading_3S,ls.VbModelPreloading_10S,ls.VbSettingParaError]).pipe(Fe(e=>{const{payload:{type:t,data:r}}=e,n=[];return[ls.VbModelPreloadingOk,ls.VbModelPreloading_3S,ls.VbModelPreloading_10S].includes(t)?(n.push(Yc(!0)),Ks("VIDEO_VIRTUAL_BACKGROUND_PRELOAD_READY",!0),t===ls.VbModelPreloading_10S&&console.warn("Virtual Background is taking longer than expected to load.")):t===ls.VbSettingParaError&&(r===Es.VBModelNotMatch?(Ks("VIDEO_VIRTUAL_BACKGROUND_PRELOAD_READY",!1),n.push(Yc(!1))):(Ks("VIDEO_VIRTUAL_BACKGROUND_SETTING_SUCCESS",!1),n.push(Zc(!1)))),Ve(n)})),handleVBSettingSuccessEpic:e=>Rn(e,ls.StartVideoStreamInVbSettingSuccess).pipe(Oe(()=>(Ks("VIDEO_VIRTUAL_BACKGROUND_SETTING_SUCCESS",!0),Zc(!0))))});const Xp={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,virtualBackground:{isVBConfigured:!1,isVBPreloadReady:void 0,imageSrc:void 0,cropped:void 0},statistic:{encode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0},decode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0}},hardwareAcceleration:{encode:!1,decode:!1}},$p=Fr({["".concat(Cc)]:pl((e,t)=>{let{payload:r}=t;e.videoSsrc=r}),["".concat(Oc)]:pl((e,t)=>{let{payload:r}=t;e.cameraDevicesList=r}),["".concat(wc)]:pl((e,t)=>{let{payload:r}=t;e.activeCamera=r}),["".concat(Tc)]:pl((e,t)=>{let{payload:r}=t;e.activeVideoId=r.userId}),["".concat(Rc)]:pl((e,t)=>{let{payload:r}=t;e.isCurrentUserStartedVideo=r}),["".concat(Dc)]:pl((e,t)=>{let{payload:r}=t;e.spotlightUserList=r}),["".concat(Nc)]:pl((e,t)=>{let{payload:r}=t;e.isCaptureForbidden=r}),["".concat(Pc)]:pl((e,t)=>{let{payload:r}=t;e.receivedVideoMaxQuality=r}),["".concat(Mc)]:pl((e,t)=>{let{payload:r}=t,n=r;Array.isArray(r)||(n=[r]),e.captureCanvasList=n}),["".concat(kc)]:pl((e,t)=>{let{payload:r}=t;e.isVideoMuted=r}),["".concat(Uc)]:pl((e,t)=>{let{payload:r}=t;e.isCaptureCameraLoading=r}),["".concat(Lc)]:pl((e,t)=>{let{payload:r}=t;e.isCameraTaken=r}),["".concat(xc)]:pl((e,t)=>{let{payload:r}=t;e.isVerifiedVideoCaptureCanvasAfterFailover=r}),["".concat(Vc)]:pl((e,t)=>{let{payload:r}=t;e.isVerifiedVideoRenderCanvasAfterFailover=r}),["".concat(Hc)]:pl((e,t)=>{let{payload:r}=t;e.receivedVideoDimension=r}),["".concat(Fc)]:pl((e,t)=>{let{payload:r}=t;e.subscribedVideoList.includes(r)||e.subscribedVideoList.push(r)}),["".concat(Bc)]:pl((e,t)=>{let{payload:r}=t;const n=e.subscribedVideoList.indexOf(r);n>=0&&e.subscribedVideoList.splice(n,1)}),["".concat(Kc)]:pl((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(qc)]:pl((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(Gc)]:pl((e,t)=>{let{payload:r}=t;e.isFollowHostVideoLayout=r}),["".concat(Wc)]:pl((e,t)=>{let{payload:r}=t;e.hostDragLayout=r}),["".concat(zc)]:pl((e,t)=>{let{payload:r}=t;e.isSupportHDVideo=r}),["".concat(Jc)]:pl((e,t)=>{let{payload:r}=t;e.highDefinitionVideoId=r}),["".concat(Qc)]:pl((e,t)=>{let{payload:r}=t;e.bCanUnmuteVideo=r}),["".concat(Yc)]:pl((e,t)=>{let{payload:r}=t;e.virtualBackground.isVBPreloadReady=r}),["".concat(Zc)]:pl((e,t)=>{let{payload:r}=t;e.virtualBackground.isVBConfigured=r}),["".concat(Xc)]:pl((e,t)=>{let{payload:r}=t;e.virtualBackground.imageSrc=r.imageSrc,e.virtualBackground.cropped=r.cropped}),["".concat(tu)]:pl((e,t)=>{let{payload:r}=t;const{encode:n,decode:o}=r;void 0!==n&&(e.hardwareAcceleration.encode=n),void 0!==o&&(e.hardwareAcceleration.decode=o)}),["".concat(jc)]:e=>c(c({},Xp),{},{captureCanvasList:e.captureCanvasList,activeCamera:e.activeCamera,isVerifiedVideoCaptureCanvasAfterFailover:!1,isVerifiedVideoRenderCanvasAfterFailover:!1}),["".concat($c)]:pl((e,t)=>{let{payload:r}=t;e.statistic.encode=r.data}),["".concat(eu)]:pl((e,t)=>{let{payload:r}=t;e.statistic.decode=r.data})},Xp),eh=In(Yp,Zp),{InitSuccessVideo:th,InitSuccessAudio:rh,InitSuccessSharing:nh,InitFailedVideo:oh,InitFailedAudio:ih,InitFailedSharing:sh}=ls;let ah;const ch=new J(An(np,vp,Sp,In(Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(Kt("".concat(ln)),jt(t),tt(e=>{let[,t]=e;return void 0!==t.media.assetsPath&&void 0!==t.media.mediaConstraints}),kt(e=>{let[,r]=e;const{media:{assetsPath:n,mediaConstraints:o,fileWithVersion:i,enforceMultipleVideos:s},meeting:{enableAudioQos:a,enableVideoQos:c}}=r;if(ah=es.getInstance(),n&&o){let e=void 0;_d()&&(e={resourceManager:Cp.IResourceManager,file:[{path:"".concat(n,"/vb-resources/vbbuffer.bin"),type:"bin"},{path:"".concat(n,"/vb-resources/tf.min.js"),type:"js"}],enableMultiDecodeVideoWithoutSAB:!!s}),ah.setAssetsAndConstraint(n,o,i,e)}dd(t).pipe(jt(t)).subscribe(e=>{let[t,r]=e;const{meeting:{svcUrl:n,meetingNumber:o,conId:i,e2eEncrypt:s,userId:u,isWebinar:d}}=r;var l;t&&(null===(l=ah)||void 0===l||l.connect({svcUrl:n,meetingNumber:o,conId:i,e2eEncrypt:s,isViewOnly:fa(t.userRole),currentUserId:u,isWebinar:d,enableAudioQos:a,enableVideoQos:c}))})}),Nt(()=>Ye(e=>{var t;return null===(t=ah)||void 0===t?void 0:t.registerCallback(e)},e=>{var t;return null===(t=ah)||void 0===t?void 0:t.unregisterCallback(e)},(e,t)=>({type:e,data:t})).pipe(Oe(e=>pn(e))))),connectedMediaStreamEpic:e=>Rn(e,[th,rh,nh,oh,ih,sh]).pipe(ed(e=>{const{payload:{type:t,data:r}}=e;if(t===rh||t===ih){if(r===ps.EncodeSuccess)return Ks("AUDIO_ENCODE_SUCCESS"),ae(hn("success"));if(r===ps.DecodeSuccess)return Ks("AUDIO_DECODE_SUCCESS"),ae(fn("success"));if(r===ps.EncodeFailed)return Ks("AUDIO_ENCODE_FAIL"),ae(hn("failed"));if(r===ps.DecodeFailed)return Ks("AUDIO_DECODE_FAIL"),ae(fn("failed"))}else if(t===th||t===oh){if(r===ps.EncodeSuccess)return Ks("VIDEO_ENCODE_SUCCESS"),ae(vn("success"));if(r===ps.DecodeSuccess)return Ks("VIDEO_DECODE_SUCCESS"),ae(_n("success"));if(r===ps.EncodeFailed)return Ks("VIDEO_ENCODE_FAIL"),ae(vn("failed"));if(r===ps.DecodeFailed)return Ks("VIDEO_DECODE_FAIL"),ae(_n("failed"))}else if(t===nh||t===sh){if(r===ps.EncodeSuccess)return Ks("SHARING_ENCODE_SUCCESS"),ae(mn("success"));if(r===ps.DecodeSuccess)return Ks("SHARING_DECODE_SUCCESS"),ae(yn("success"));if(r===ps.EncodeFailed)return Ks("SHARING_ENCODE_FAIL"),ae(mn("failed"));if(r===ps.DecodeFailed)return Ks("SHARING_DECODE_FAIL"),ae(yn("failed"));if(t===nh&&void 0===r)return Ks("SHARING_DECODE_SUCCESS"),ae(yn("success"))}})),mediaDeviceUpdateEpic:(e,t)=>Rn(e,[th,rh]).pipe(td(()=>{if("object"==typeof navigator.mediaDevices)return $e(ld(),$e(Rn(e,ls.StartVideoCaptureSuccess),Qe(navigator.mediaDevices,"devicechange"),Rn(e,ls.UserGrantCaptureAudio)).pipe(Fe(()=>ld().pipe(kt(()=>{Ks("MEDIA_DEVICE_CHANGE")}))))).pipe(jt(t),Fe(e=>{let[t,r]=e;const n=[Ga(t.microphones),Wa(t.speakers),Oc(t.cameras)];if(r.audio){const{audio:{activeMicrophone:e,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:c}}=r,{microphones:u,speakers:d}=t,l=a.filter(e=>-1===u.findIndex(t=>t.deviceId===e.deviceId)),p=c.filter(e=>-1===d.findIndex(t=>t.deviceId===e.deviceId));var o,i;l.length>0&&l[0].deviceId===e&&(null===(o=ah)||void 0===o||o.changeMicrophone("default"),n.push(Ka("default"))),p.length>0&&p[0].deviceId===s&&(null===(i=ah)||void 0===i||i.changeSpeaker("default"),n.push(qa("default")))}return Ve(n)}))})),sendUserNodeListToMediaSDKEpic:e=>wn(e,Ui).pipe(kt(e=>{const{type:t,payload:{body:r}}=e,n=es.getInstance(),o=t==="".concat(en);if(r.add){const e=r.add.map(e=>({userid:e.id,sn:e.zoomID&&_o(e.zoomID)}));o||n.sendUserNodeList(e),n.updateUserMediaSN({added:e,isFromMainSession:o,iVType:Ci.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:Ci.SHARING_DECODE}))}),It(ee)),handleMediaSdkGcmIVResponseEpic:e=>Rn(e,ls.AesGcmIvResponse).pipe(kt(e=>{const{payload:{data:{workerType:t,iv:r}}}=e,n=ui.get(wi.WebclientIVState);if(n){const e=c(c({},n),{},{[t]:r});ui.set(wi.WebclientIVState,e,ai.SessionStorage)}}),It(ee)),handleMediaEncryptIndication:e=>e.pipe(Kt("".concat(zr)),tt(e=>[Vi,xi,ki].includes(e.payload.evt)),Oe(e=>{const{payload:{evt:t,body:{encryptKey:r,additionalType:n}}}=e;return Sn({type:t===Vi?"audio":t===xi?"video":"sharing",encryptKey:r,additionalType:n})}))})))),uh=(e,t,r)=>ch.pipe(Fe(n=>n(e,t,r))),dh={meeting:rp,socket:fp,participants:gp,media:bp},lh=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 zt(i),c=new Jt(s,o.getState());return n.pipe(Oe((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})),Fe((function(e){return Ve(e).pipe(Rt(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}(),ph=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||E;function hh(e){return function(e){for(var t=Object.keys(e),r={},n=0;ne.userId===t);if(o.findIndex(e=>e===Ah.Attendee)>-1&&(i=Ia(n).find(e=>e.userId===t)),!i)return Promise.reject({type:Vs,reason:"no matching user"});{const{meeting:{userId:e}}=r.getState();for(let r=0;r1?n-1:0),s=1;s{if(this[mh][e]&&void 0===o.getState()[e]){const{epic:t,reducer:r,Client:n}=this[mh][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",Gp),o.injectEpic(Wp)),null!=n&&n.video&&void 0===o.getState().video&&(o.injectReducer("video",$p),o.injectEpic(eh)),null!=n&&n.screen&&void 0===o.getState().share&&(o.injectReducer("share",fl),o.injectEpic(vl))}return n(Do({apiKey:e,signature:t,language:a,useSDK:this.useSDK})),n(gn({mediaConstraints:r&&r.constraints||{},assetsPath:i,fileWithVersion:s,enforceMultipleVideos:null==r?void 0:r.enforceMultipleVideos})),new Promise((e,t)=>{null!=r&&r.skipJsMedia?e(""):ei(c,()=>{e("")},()=>{t({type:Vs,reason:"depedent assets are not accessible"})})})}on(e,t){((e,t)=>{const r=Hs[e];if(r){const n=Gs.get(e);if(n)n.push(t),Gs.set(e,n);else{const n=[t];Gs.set(e,n);const o=$e(...r.map(e=>{const{event:t,payload:r}=e;return Qe(Fs,t).pipe(Oe(e=>r(e)),le(Se))})).subscribe(t=>{const r=Gs.get(e);r&&r.forEach(e=>{e(t)})});Ws.push(o)}}})(e,t)}off(e,t){((e,t)=>{if(Hs[e]){const r=Gs.get(e);if(Array.isArray(r)){const n=r.filter(e=>e!==t);Gs.set(e,n)}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[vh]:e,[_h]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(Co()),ct(500).pipe(Et("")).toPromise()):Promise.resolve("")}end(){const{[vh]:e,[_h]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(To()),ct(500).pipe(kt(()=>{Qs()}),Et("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[fh].getState(),{meeting:{bAllowAttendeeRename:n}}=r,o=Ea(r),i=fa(o.userRole),s=ba(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 Dh.rename(t,ho(e),ho(o.displayName)),Xu(t,t=>t.displayName===e);{const n=Ia(r).find(e=>e.userId===t);return n?(Tl.getInstance().rename(n.jid,e),zs("UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",t=>{const r=t.find(e=>e.jid===n.jid);return r&&r.name===e})):Promise.reject({type:Vs,reason:"no matching user"})}}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})}return e===o.displayName?Promise.resolve():s||n?(Dh.rename(o.userId,ho(e),ho(o.displayName)),zs("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",t=>t.displayName===e)):Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host disallow rename themselves"})}makeHost(e){return Dh.assignHost(e,!1),Xu(e,e=>!0===e.isHost)}makeCoHost(e){const t=this[fh].getState(),r=Ta(t).find(t=>t.userId===e);return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:Vs,reason:"user:[".concat(e,"] is already co-host ")}):(Dh.assignHost(e,!0),Xu(e,e=>!0===e.bCoHost))}revokeCoHost(e){const t=this[fh].getState(),r=Ta(t).find(t=>t.userId===e);return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:Vs,reason:"user:[".concat(e,"] is not a co-host")}):(Dh.revokeCoHost(e),Xu(e,e=>!1===e.bCoHost))}isHost(){const e=this[fh].getState(),t=Ea(e);return!!t&&t.isHost}isCoHost(){const e=this[fh].getState(),t=Ea(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[vh]();return e}getCurrentUserInfo(){const e=this[fh].getState(),t=Ea(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:pa(t.userType),bRaiseHand:t.bRaiseHand,bHold:t.bHold,bVideoOn:t.bVideoOn,sharerOn:t.sharerOn,sharePause:t.sharerPause,feedback:t.feedback};if(e.meeting.isWebinar&&fa(t.userRole)){const{audio:t}=e,n=null==t?void 0:t.isAllowToTalk;Object.assign(r,{isAllowToTalk:n})}return r}return null}getParticipantsList(){const e=this[fh].getState(),{meeting:{meetingStatus:t}}=e,r=Ea(e);return"joined"===t&&r&&!r.bHold?Ta(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:pa(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[vh](),t=Oa(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:pa(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:u,network:d,topic:l,zlkJwtToken:p,userId:h,lang:f,inviteEmail:v,meetingId:_,participantID:m,h323Password:y,recordingDisclaimer:g,recordingDisclaimerForRecorder:S}}=this[vh](),E="joined"===e&&!t;if(p)return{topic:l,password:n,userName:o,isInMeeting:E,userId:h,meetingId:_};{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:v,meetingTopic:s,encryptionType:e,region:u,network:d,isInMeeting:E,userId:h,lang:f,webEndpoint:gl,meetingId:_,participantId:m,telPwd:y,recordingInfo:{recordingDisclaimer:g,recordingDisclaimerForRecorder:S,isUserEnableRecordingReminder:null==a?void 0:a.isUserEnableRecordingReminder}}}}}).prototype,"end",[Eh,gh],Object.getOwnPropertyDescriptor(Rh.prototype,"end"),Rh.prototype),l(Rh.prototype,"changeName",[gh],Object.getOwnPropertyDescriptor(Rh.prototype,"changeName"),Rh.prototype),l(Rh.prototype,"makeHost",[Th,Eh,gh],Object.getOwnPropertyDescriptor(Rh.prototype,"makeHost"),Rh.prototype),l(Rh.prototype,"makeCoHost",[Oh,Eh,gh],Object.getOwnPropertyDescriptor(Rh.prototype,"makeCoHost"),Rh.prototype),l(Rh.prototype,"revokeCoHost",[wh,Eh,gh],Object.getOwnPropertyDescriptor(Rh.prototype,"revokeCoHost"),Rh.prototype),Rh);var Ph=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>Tn(e,"Message").pipe(jt(t),Fe(e=>{let[t,r]=e;const{payload:{data:{sn:n,senderName:o,senderJid:i,receiver:s,text:a,type:c}}}=t,u=Ea(r),d=Ia(r),{meeting:{jid:l,userId:p},participants:{xmppAttendeeList:h}}=r;return Mi.beginDecrypt({decryptedText:a,type:Oi.XMPP_CHAT,zoomId:n}).then(e=>{var t;let{message:r}=e,n=null,a=0,f="";u&&fa(u.userRole)&&l===s?(n=h.find(e=>e.jid===i),a=p,f=u.displayName):c===Fi.Panelist&&(n=d.find(e=>e.jid===i),a=Fi.Panelist,f=Yi.displayName);const v={message:r,sender:{name:o,userId:(null===(t=n)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:f,userId:a},timestamp:(new Date).getTime()};return Ks("CHAT_RECEIVE_MESSAGE_EVENTS",v),cu(v)})})),receiveChatMessageFromRWGEpic:(e,t)=>Cn(e,7944).pipe(jt(t),Fe(e=>{let[t,r]=e;const{meeting:{bIbDisableChat:n,isWebinar:o},participants:{attendeesList:i}}=r,{payload:{body:{attendeeNodeID:s,sn:a,destNodeID:c,text:u,senderName:d,msgID:l}}}=t,p=Ea(r),h=Ia(r);if(p){const e=fa(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===Fi.SilentModeUsers){const t=fo(u),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=Mi.beginDecrypt({decryptedText:u,zoomId:t,type:Oi.RWG_CHAT}).then(e=>{let{message:t}=e;const r=i.find(e=>e.userId===c),n=d?fo(d):null==r?void 0:r.displayName;let a="";if(s===Fi.All)a=o?"All panelists and attendees":"Everyone";else if(s===Fi.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=>(Ks("CHAT_RECEIVE_MESSAGE_EVENTS",e),cu(e)))}}return ee})),changePrivilegeResponse:(e,t)=>Cn(e,Li).pipe(tt(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)}),jt(t),Oe(e=>{let[t,r]=e;const{payload:{body:{chatPriviledge:n,bAllowAttendeeChat:o}}}=t,{chat:{chatPrivilege:i}}=r;return void 0!==o?(Ks("CHAT_PRIVILEGE_CHANGE",!0===o?{chatPrivilege:i}:{chatPrivilege:Hi.NoAttendee}),du(o)):(Ks("CHAT_PRIVILEGE_CHANGE",{chatPrivilege:n}),au(n))})),chatResponseEpic:(e,t)=>Cn(e,4136).pipe(jt(t),Fe(e=>{let[t,r]=e;const{payload:{body:{result:n,destNodeID:o,msgID:i}}}=t,{meeting:{userId:s},chat:{chatHistory:a}}=r;if(n===Gi.Success){var c,u;const e=[];for(let t=a.length-1;t>=0;t--){const r=a[t];if(!r.id&&r.sender.userId===s&&[Fi.All,Fi.Panelist,o].includes(r.receiver.userId)&&e.unshift(r),r.id)break}const t=e.length>0&&null!==(c=null===(u=e[0])||void 0===u?void 0:u.highResTimeStampForIdentification)&&void 0!==c?c:0;return Ks("CHAT_MESSAGE_RESPONSE",{msgId:i,receiverId:o,identification:t}),ae(lu({destNodeID:o,msgID:i,userId:s}))}return n===Gi.Delete||n===Gi.Block?ae(pu({msgId:i})):ee})),chatCmdResponseEpic:e=>Cn(e,4238).pipe(Fe(e=>{const{payload:{body:{bSuccess:t,cmd:r,msgID:n}}}=e,o=[];if(t)switch(r){case Bi.Delete:o.push(pu({msgId:n})),Ks("CHAT_DELETE_MESSAGE_REPONSE",{id:n})}return Ve(o)})),chatCmdIndicationEpic:e=>Cn(e,7960).pipe(Fe(e=>{const{payload:{body:{cmd:t,msgID:r}}}=e,n=[];switch(t){case Bi.Delete:n.push(pu({msgId:r})),Ks("CHAT_DELETE_MESSAGE_REPONSE",{id:r})}return Ve(n)}))});const Mh={chatHistory:[],chatPrivilege:Hi.All,isAllowAttendeeChat:!0},kh=Fr({["".concat(cu)]:pl((e,t)=>{let{payload:r}=t;e.chatHistory.push(r)}),["".concat(au)]:pl((e,t)=>{let{payload:r}=t;e.chatPrivilege=r}),["".concat(du)]:pl((e,t)=>{let{payload:r}=t;e.isAllowAttendeeChat=r}),["".concat(lu)]:pl((e,t)=>{let{payload:r}=t;const{destNodeID:n,msgID:o,userId:i}=r,s=[];for(let t=e.chatHistory.length-1;t>=0;t--){const r=e.chatHistory[t];if(!r.id&&r.sender.userId===i&&[Fi.All,Fi.Panelist,n].includes(r.receiver.userId)&&s.unshift(r),r.id)break}s.length>0&&(s[0].id=o)}),["".concat(pu)]:pl((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(uu)]:()=>c({},Mh)},Mh);function Uh(e,t,r){if(null!=r&&r.host)return[Oa(e),...wa(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=[Oa(e),...wa(e),...e.participants.attendeesList.filter(e=>!(e.bCoHost||e.isHost||e.bHold))];if(null!=r&&r.includeAttendee){const t=Ia(e).filter(e=>!pa(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 Lh;const Vh=Ki.createAgent(),xh=Tl.getInstance(),jh=e=>{const{text:t,destId:r,sn:n,attendeeId:o}=e;return Mi.beginEncrypt({text:t,type:Oi.RWG_CHAT}).then(e=>{Vh.chat(e,r,n,o)})};let Hh=(l((Lh=class extends Ch{send(e,t){if(!e)return Promise.reject({type:Vs,reason:"Text is empty"});const{[vh]:r,[_h]:n}=this,o=r(),i=Ea(o),s=function(e,t){if(t===Fi.All)return Qi;if(t===Fi.Panelist)return Yi;if(t===Fi.SilentModeUsers)return Zi;{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:Vs,reason:"invalid target user"};const{chat:{chatPrivilege:o},meeting:{isWebinar:i}}=r,s=ba(r),a=t.isHost||t.bCoHost;if(!s)if(i&&fa(e.userRole)){if(o===Hi.NoAttendee||o===Hi.AllPanelist&&n!==Fi.Panelist||o===Hi.All&&n!==Fi.All&&n!==Fi.Panelist)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"}}else if(o===Hi.NoAttendee||o===Hi.Host&&!a||n===Fi.SilentModeUsers||o===Hi.EveryonePublicly&&n!==Fi.All&&!a)return{type:"INSUFFICIENT_PRIVILEGES",reason:"Insufficient chat privilege"};return null})(i,s,o);if(a)return Promise.reject(a);const{meeting:{isWebinar:u,encType:l}}=o,p=l===Ti.AES_GCM;let h=Promise.resolve(),f=!1;return t===Fi.SilentModeUsers?Vh.chat(ho(e),t):u?s.userRole===ua.Attendee?8==(8&s.clientCap)?h=jh({text:e,destId:Fi.IndividualCcPanelist,sn:null==i?void 0:i.zoomID,attendeeId:t}):(h=jh({text:e,destId:Fi.Panelist,sn:null==i?void 0:i.zoomID,attendeeId:t}).then(()=>(e=>{const{text:t,jid:r,isGCMEnabled:n}=e;return Mi.beginEncrypt({text:t,type:Oi.XMPP_CHAT}).then(e=>{xh.sendWebinarMsg(e,r,Fi.IndividualCcPanelist,n)})})({text:e,jid:s.jid,isGCMEnabled:p})),f=!0):s&&(h=jh({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID})):h=jh({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID}),h.then(()=>{const r=(new Date).getTime(),o=performance.now(),a={message:e,sender:{name:null==i?void 0:i.displayName,userId:null==i?void 0:i.userId,avatar:null==i?void 0:i.avatar},receiver:{name:null==s?void 0:s.displayName,userId:null==s?void 0:s.userId},timestamp:r,highResTimeStampForIdentification:o};return n(cu(a)),f?(Ks("CHAT_RECEIVE_MESSAGE_EVENTS",a),a):new Promise((e,r)=>{var n;Js("CHAT_MESSAGE_RESPONSE").pipe(function(e,t){return void 0===t&&(t=Ae),function(e,t,r){return void 0===r&&(r=Ae),function(n){var o=ht(e),i=o?+e-r.now():Math.abs(e);return n.lift(new Vt(i,o,t,r))}}(e,ce(new Te),t)}(5e3),(n=e=>o!==e.identification||!([e.receiverId,Fi.All,Fi.Panelist].includes(t)||e.receiverId===Fi.IndividualCcPanelist),function(e){return e.lift(new Ct(n))}),yt(1)).subscribe(t=>{const{msgId:r}=t,n=c({id:r},d(a,["highResTimeStampForIdentification"]));Ks("CHAT_RECEIVE_MESSAGE_EVENTS",n),e(n)},()=>{r({type:"OPERATION_TIMEOUT"})})})})}setPrivilege(e){const t=this[vh](),{meeting:{isWebinar:r},chat:{chatPrivilege:n}}=t;return n===e?Promise.resolve(""):!r&&!zi.includes(e)||r&&!Ji.includes(e)?Promise.reject({type:Vs,reason:"invalid privilege value of parameter"}):(Vh.setChatPriviledge(e),zs("CHAT_PRIVILEGE_CHANGE",t=>t.chatPrivilege===e))}deleteMessage(e){const t=this[vh](),{chat:{chatHistory:r},meeting:{meetingOptions:n,userId:o}}=t;if(null!=n&&n.isEnableDeleteChatMsg){const n=ba(t),i=r.find(t=>t.id===e);if(i){const{sender:t}=i;if(n)Vh.chatCmdReq(e,Bi.Delete);else{if(t.userId!==o)return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"can not delete message"});Vh.chatCmdReq(e,Bi.Delete)}return zs("CHAT_DELETE_MESSAGE_REPONSE",t=>t.id===e).then(()=>({id:e}))}return Promise.reject({type:Vs,reason:"msgId is wrong"})}return Promise.reject({type:Ls,reason:"can not delete messages"})}lockChat(e){const t=this[vh](),{meeting:{meetingOptions:r}}=t,n=null!=r&&r.isPrivateChatEnabled?Hi.All:Hi.EveryonePublicly;return this.setPrivilege(e?Hi.NoOne:n)}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[vh]();return t?e:Hi.NoAttendee}getReceivers(){const e=this[vh](),{chat:{chatPrivilege:t,isAllowAttendeeChat:r},meeting:{isWebinar:n}}=e;if(!n&&!r)return[];const o=Ea(e);if(o)if(n){if(!fa(o.userRole)){const t=Uh(e,o.userId,{includeAttendee:!0});return[Yi,Qi,...t]}if(!r)return[];if(t===Hi.All)return[Yi,Qi];if(t===Hi.AllPanelist)return[Yi];if(t===Hi.NoOne)return[]}else{const r=ba(e);if(t===Hi.All||r){const t=Uh(e,o.userId);return[Qi,...t]}if(t===Hi.Host)return Uh(e,o.userId,{host:!0});if(t===Hi.EveryonePublicly){const t=Uh(e,o.userId,{host:!0});return[Qi,...t]}if(t===Hi.NoOne)return[]}return[]}getHistory(){return this[vh]().chat.chatHistory.map(e=>d(e,["highResTimeStampForIdentification"]))}isAllowToDeleteMessages(){const e=this[vh](),{meeting:{meetingOptions:t}}=e;return null==t?void 0:t.isEnableDeleteChatMsg}}).prototype,"send",[gh],Object.getOwnPropertyDescriptor(Lh.prototype,"send"),Lh.prototype),l(Lh.prototype,"setPrivilege",[Sh,gh],Object.getOwnPropertyDescriptor(Lh.prototype,"setPrivilege"),Lh.prototype),l(Lh.prototype,"deleteMessage",[gh],Object.getOwnPropertyDescriptor(Lh.prototype,"deleteMessage"),Lh.prototype),l(Lh.prototype,"lockChat",[Sh,gh],Object.getOwnPropertyDescriptor(Lh.prototype,"lockChat"),Lh.prototype),Lh);const Fh=In(Ph);var Bh=Object.freeze({__proto__:null,receiveCloudRecordIndication:e=>Cn(e,Li).pipe(tt(e=>{var t,r,n;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.cmrServerStatus)||void 0!==(null===(r=e.payload.body)||void 0===r?void 0:r.disAllowClientStopAutoCmr)||void 0!==(null===(n=e.payload.body)||void 0===n?void 0:n.enableAutomicRecordingCloud)}),Fe(e=>{const{cmrServerStatus:t,disAllowClientStopAutoCmr:r,enableAutomicRecordingCloud:n}=e.payload.body,o=[];return void 0!==t&&(t!==cs.Init&&Ks("CLOUD_RECORDING_STATUS_CHANGE",{cmrServerStatus:t}),o.push(Zl(t))),void 0!==r&&o.push($l(!r)),void 0!==n&&o.push(ep(n)),Ve(o)})),receiveLocalRecordingIndicationEpic:e=>Cn(e,Ui).pipe(tt(e=>{const{payload:{body:{update:t}}}=e;return null==t?void 0:t.some(e=>void 0!==e.bLocalRecordStatus)}),kt(e=>{const{payload:{body:{update:t}}}=e;t.filter(e=>void 0!==e.bLocalRecordStatus).forEach(e=>{Ks("LOCAL_RECORDING_CHANGE",{userId:e.id,bLocalRecord:1===e.bLocalRecordStatus})})}),It(ee))});const Gh={cmrStatus:cs.Stop,recordingEnable:!1,allowStopAutoRecording:!1,automaticCloudRecordingEnable:!1},Wh=Fr({["".concat(Zl)]:pl((e,t)=>{let{payload:r}=t;e.cmrStatus=r}),["".concat(Xl)]:pl((e,t)=>{let{payload:r}=t;e.recordingEnable=r}),["".concat($l)]:pl((e,t)=>{let{payload:r}=t;e.allowStopAutoRecording=r}),["".concat(ep)]:pl((e,t)=>{let{payload:r}=t;e.automaticCloudRecordingEnable=r})},Gh);var Kh,qh,zh,Jh;const Qh=Ki.createAgent();let Yh=(Kh=bh("recording"),qh=bh("recording"),zh=bh("recording"),l((Jh=class extends Ch{startRecording(){const e=this[vh](),{meeting:{bIbDisableRecording:t,recordingEnable:r},recording:{cmrStatus:n}}=e;return t?Promise.reject({type:Ls,reason:"Rejected by Information Barrier"}):r?n===cs.Start?Promise.resolve(""):(Qh.recordMeeting(!0,!1),zs("CLOUD_RECORDING_STATUS_CHANGE",e=>e.cmrServerStatus===cs.Start)):Promise.reject({type:Ls,reason:"The account of the meeting disabled the cloud recording"})}pauseRecording(){const e=this[vh](),{recording:{cmrStatus:t}}=e;return t===cs.Pause?Promise.resolve(""):t!==cs.Start?Promise.reject({type:Ls,reason:"Recording is not started"}):(Qh.recordMeeting(!1,!0),zs("CLOUD_RECORDING_STATUS_CHANGE",e=>e.cmrServerStatus===cs.Pause))}stopRecording(){const e=this[vh](),{recording:{cmrStatus:t}}=e;return t===cs.Stop?Promise.resolve(""):(Qh.recordMeeting(!1,!1),zs("CLOUD_RECORDING_STATUS_CHANGE",e=>e.cmrServerStatus===cs.Stop))}getRecordingStatus(){const e=this[vh](),{recording:{cmrStatus:t}}=e;return t===cs.Start?exports.RecordingStatus.Recording:t===cs.Pause?exports.RecordingStatus.Paused:exports.RecordingStatus.Stopped}isRecordingEnabled(){const e=this[vh](),{recording:{recordingEnable:t}}=e;return t}isAllowedToStopAutoRecording(){const e=this[vh](),{recording:{allowStopAutoRecording:t}}=e;return t}isAutomaticCloudRecordingEnabled(){const e=this[vh](),{recording:{automaticCloudRecordingEnable:t}}=e;return t}}).prototype,"startRecording",[Sh,gh,Kh],Object.getOwnPropertyDescriptor(Jh.prototype,"startRecording"),Jh.prototype),l(Jh.prototype,"pauseRecording",[Sh,gh,qh],Object.getOwnPropertyDescriptor(Jh.prototype,"pauseRecording"),Jh.prototype),l(Jh.prototype,"stopRecording",[Sh,gh,zh],Object.getOwnPropertyDescriptor(Jh.prototype,"stopRecording"),Jh.prototype),Jh);const Zh=In(Bh);let Xh,$h;!function(e){e[e.All=1]="All",e[e.Private=2]="Private"}(Xh||(Xh={})),($h||($h={})).SUCCESS="success";const{updateCmdJid:ef,removeCmdJid:tf,setCmdChannelConnectionStatus:rf,resetCmdChannel:nf}=Ur("UPDATE_CMD_JID","REMOVE_CMD_JID","SET_CMD_CHANNEL_CONNECTION_STATUS","RESET_CMD_CHANNEL");var of=Object.freeze({__proto__:null,receiveCmdChannelResponseXMPPEpic:(e,t)=>On(e,24577).pipe(jt(t),$u(e=>{let[t]=e;const{payload:{body:{status:r}}}=t;if(r===$h.SUCCESS)return Ks("COMMAND_STATUS_EVENTS",exports.ConnectionState.Connected),rf(r)})),receiveCmdChannelMessageFromXMPPEpic:(e,t)=>On(e,24583).pipe(jt(t),kt(e=>{let[t,r]=e;const{meeting:{userId:n,encType:o},cmd:{jids:i}}=r,{payload:{body:{senderName:s,senderJid:a,text:c,type:u,receiver:d,msgid:l,sn:p}}}=t,h=mo(i,d),f=o===Ti.AES_GCM,v=mo(i,a),_=(new Date).getTime();let m=Promise.resolve({message:c});return f&&(m=Mi.beginDecrypt({decryptedText:c,type:Oi.XMPP_CHAT,zoomId:p})),m.then(e=>{let{message:t}=e;(u===Xh.Private&&parseInt(h,10)===n||u===Xh.All)&&Ks("COMMAND_RECEIVE_MESSAGE_EVENTS",{senderId:v,senderName:s,text:fo(t),timestamp:_,msgid:l})})}),It(ee)),receiveUserJidUpdateFromXMPPEpic:e=>On(e,24595).pipe(Oe(e=>{const{payload:{body:{action:t,data:r}}}=e;return["list","UPDATE","add"].includes(t)&&r?ef(r):"memberremove"===t&&r?tf(r):{type:""}}))});const sf={connectionStatus:"initial",jids:{}},af=Fr({["".concat(nf)]:()=>c({},sf),["".concat(ef)]:pl((e,t)=>{let{payload:r}=t;r.map(t=>{const{jid:r,node:n}=t;e.jids[n]=r})}),["".concat(tf)]:pl((e,t)=>{let{payload:r}=t;r.map(t=>{const{jid:r}=t,n=mo(e.jids,r);delete e.jids[n]})}),["".concat(rf)]:pl((e,t)=>{let{payload:r}=t;e.connectionStatus=r})},sf);var cf,uf;const df=Xi.getInstance(),lf=(e,t,r)=>{const n=t,o=ho(e);return r?Mi.beginEncrypt({text:o,type:Oi.XMPP_CHAT}).then(e=>{df.sendCommandMsg(e,n,!0)}):df.sendCommandMsg(o,n,!1)};let pf=(cf=function(e,t,r){const n=r.value;let o=void 0,i=!0;r.value=function(){if(!i)return Promise.reject({type:"OPERATION_LOCKED",reason:"Cannot complete the operation due to the rate limit(".concat(50,"ms)")});i=!1,o=window.setTimeout(()=>{i=!0,window.clearTimeout(o),o=void 0},50);for(var e=arguments.length,t=new Array(e),r=0;r512)return Promise.reject({type:Vs,reason:"Text too long > 512"});const{[vh]:r}=this,n=r(),{socket:{cmdChannelSocketStatus:o},meeting:{userId:i,encType:s},cmd:{jids:a,connectionStatus:c}}=n,u=s===Ti.AES_GCM;return o!==Da.Connected?Promise.reject({type:"IMPROPER_MEETING_STATE",reason:"cmd channel not ready"}):(c===$h.SUCCESS?Promise.resolve(!0):Js("COMMAND_STATUS_EVENTS",1).toPromise().then(e=>e===exports.ConnectionState.Connected||Promise.reject({type:Ls,reason:"Cannot establish the command channel"}))).then(()=>t?t in a?(lf(e,a[t],u),{timestamp:(new Date).getTime(),text:e,receiverId:t,senderId:i}):Promise.reject({type:Ls,reason:"can't find userId ".concat(t)}):(lf(e,"",u),{timestamp:(new Date).getTime(),text:e,receiverId:"",senderId:i}))}getJids(){const{[vh]:e}=this,t=e(),{cmd:{jids:r}}=t;return r}}).prototype,"send",[cf,gh],Object.getOwnPropertyDescriptor(uf.prototype,"send"),uf.prototype),uf);const hf=In(of),ff=(e,t,r,n)=>{const{getState:o,dispatch:i}=r,s=o(),{participants:{attendeesList:a},audio:{localShareAudioUserMutedList:c}}=s,u=a.find(t=>t.userId==e);if(u){if(u.bShareAudioOn){const r=c.find(t=>t.userId===e);return r&&r.muted===!t&&i(Tp(n,e,t,s)),Promise.resolve("")}return Promise.reject({type:Ls,reason:"Cannot ".concat(t?"mute":"unmute"," share audio when the user's share audio is not enable.")})}return Promise.reject({type:Vs,reason:"Cannot find the user"})},vf=sa([Ta],e=>e.filter(e=>e.bVideoOn)),_f=()=>"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(vs)}catch(e){return!1}}();var mf,yf,gf,Sf,Ef,bf,Af,If,Cf,Tf,Of,wf,Rf,Df,Nf,Pf,Mf,kf,Uf,Lf,Vf,xf,jf,Hf,Ff,Bf,Gf,Wf,Kf,qf,zf,Jf,Qf;let Yf=(mf=bh("audio"),yf=bh("audio"),gf=bh("audio"),Sf=bh("audio"),Ef=bh("audio"),bf=bh("audio"),Af=bh("audio"),If=bh("audio"),Cf=bh("audio"),Tf=bh("audio"),Of=bh("share"),wf=bh("audio"),Rf=bh("share"),Df=bh("video"),Nf=bh("video"),Pf=bh("video"),Mf=bh("video"),kf=bh("video"),Uf=bh("video"),Lf=bh("video"),Vf=bh("video"),xf=bh("video"),jf=bh("video"),Hf=bh("share"),Ff=bh("share"),Bf=bh("share"),Gf=bh("share"),Wf=bh("share"),Kf=bh("share"),qf=bh("share"),zf=bh("share"),Zf="isShareOptionLocked",Jf=function(e,t,r){const n=r.value;r.value=function(){const e=this[fh];if(e){const{meeting:{meetingOptions:t}}=e.getState();if(!0===t[Zf])return Promise.reject({type:"OPERATION_LOCKED",reason:"".concat(Zf," is locked")})}for(var t=arguments.length,r=new Array(t),o=0;o{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),{speakerOnly:a,autoStartAudioInSafari:c}=t||{},u=Ea(s);if("computer"===(null==u?void 0:u.audio))return Promise.resolve();if("phone"===(null==u?void 0:u.audio))return Promise.reject({type:Ls,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:t,canPlayAudio:d},media:{audioDecodeStatus:l,audioEncodeStatus:p}}=s;if(t)return Promise.reject({type:Ls,reason:"Computer audio has been loading, please wait."});if(a&&n(Ya(a)),!u)return Promise.reject({type:Ls,reason:"Please call `startAudio` method after the `join` has been resolved"});{const{userRole:t}=u,s=fa(t),h=s&&!e||a||hd()?"success":p,f=hd()?"success":l;if(Np()&&("success"!==f||"success"!==h))return Promise.reject({type:Ls,reason:"It is required to wait for the audio encoding and decoding to be ready before calling `startAudio` method"});n(Qa(!0)),ud("audio",h,f).subscribe(t=>{let[u,l]=t;if(u&&l){let t=d||Np()&&!c?Promise.resolve():function(){const e=URL.createObjectURL(fs),t=new Audio(e);return t.muted=!1,mi()?new Promise((r,n)=>{var o;t.addEventListener("canplaythrough",()=>{t.play().then(()=>{r(!0)}).catch(e=>{n(e)}).finally(()=>{URL.revokeObjectURL(e)})}),null===(o=t.load)||void 0===o||o.call(t)}):t.play().finally(()=>{URL.revokeObjectURL(e)})}();void 0===t&&(t=Promise.resolve()),t.then(()=>{const t=r(),{audio:{isSharingAudio:c}}=t;o.joinOrLeaveVoip(!0),c||Op(i,t,!(s&&!e||a)),s&&e&&n(Za(!0)),n(za(!0))}).catch(()=>{n(za(!1))})}})}return"failed"===p||"failed"===l?(n(Qa(!1)),Promise.reject({type:"INTERNAL_ERROR",reason:"audio encode or decode error"})):new Promise((e,t)=>{it(Js(Ps.JoinComputerAudio.success,1),$e(...Ps.JoinComputerAudio.fail.map(e=>Js(e,1).pipe(Fe(()=>ce({type:"INSUFFICIENT_PRIVILEGES",reason:e}))))),ct(45e3).pipe(Fe(()=>ce({type:"OPERATION_TIMEOUT"})))).subscribe(()=>{n(Qa(!1)),e("")},e=>{d&&o.joinOrLeaveVoip(!1),n(Qa(!1)),t(e)})})}})(this[yh],e)}stopAudio(){return(async e=>{const{store:{getState:t,dispatch:r},mediaAgent:n,rwgAgent:o}=e,i=t(),{audio:{isComputerAudioLoading:s,isShareAudioEnabled:a,isSharingAudio:c}}=i,u=Ea(i);if(s)return Promise.reject({type:Ls,reason:"Computer audio has not finished joining, please wait."});if(a){if(c)return Promise.reject({type:Ls,reason:"Cannot stop audio during sharing with audio"});r(tc(void 0)),r(Xa(void 0))}return"computer"===(null==u?void 0:u.audio)?(await n.leaveComputerAudio(),o.joinOrLeaveVoip(!1),r(Ba(0)),zs("AUDIO_CURRENT_USER_LEAVE_AUDIO")):Promise.resolve("")})(this[yh])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o}=e,i=r(),s=Ea(i);if(null==t||t===(null==s?void 0:s.userId))return""===(null==s?void 0:s.audio)||null===(null==s?void 0:s.audio)?Promise.reject({type:Ls,reason:"no audio joined"}):!0===(null==s?void 0:s.muted)?Promise.resolve(""):(i.audio.isShareAudioEnabled&&n(Xa(!0)),n(Va(!0)),o.mute(s.userId,!0),zs("AUDIO_CURRENT_USER_MUTED").then(()=>""));if(ba(i)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=i,n=e.concat(r).find(e=>e.userId===t);return n?""===n.audio||null===n?Promise.reject({type:Ls,reason:"no audio joined"}):!1===n.muted?(o.mute(t,!0),zs("AUDIO_PARTICIPANT_AUDIO_UPDATE",e=>e.id===t&&1==e.muted)):Promise.resolve(""):Promise.reject({type:Vs,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[yh],e)}unmuteAudio(e){return(async(e,t)=>{const{store:{getState:r,dispatch:n},rwgAgent:o,mediaAgent:i}=e,s=r(),a=Ea(s);if(void 0===t||t===(null==a?void 0:a.userId)){if(""===(null==a?void 0:a.audio)||null===(null==a?void 0:a.audio))return Promise.reject({type:Ls,reason:"no audio joined"});if(!1===(null==a?void 0:a.muted))return Promise.resolve("");if(s.audio.isShareAudioEnabled){if(s.audio.isSharingAudio)return Promise.reject({type:Ls,reason:"Cannot unmute audio during sharing with audio"});n(Xa(!1))}if(n(Va(!0)),s.audio.bCanUnmute||null!=a&&a.isHost||null!=a&&a.bCoHost){if(fa(a.userRole)){const{audio:{isAllowToTalk:e,isAllowToTalkAttendeeConnected:t}}=s;e?t||(await i.leaveComputerAudio(),await Op(i,s,!0),n(Za(!0))):Promise.reject({type:Ls,reason:"Webinar attendee cannot unmute self audio."})}return o.mute(a.userId,!1),zs("AUDIO_CURRENT_USER_UNMUTED").then(()=>"")}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES",reason:"host not allow unmute themselves"})}if(ba(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:Ls,reason:"no audio joined"}):(!0===n.muted&&o.mute(t,!1),Promise.resolve("")):Promise.reject({type:Vs,reason:"no matching user"})}return Promise.reject({type:"INSUFFICIENT_PRIVILEGES"})})(this[yh],e)}dialOut(e,t,r,n){return((e,t,r,n,o)=>{const{store:{getState:i,dispatch:s},rwgAgent:a}=e,c=i(),{meeting:{callOutCountry:u,isSupportCallOut:d}}=c;if(d&&Array.isArray(u)&&u.findIndex(e=>e.code===t)>-1){const{seq:e}=a.audioDialout(t+r,n,!(null==o||!o.callMe),!(null==o||!o.pressingOne),!(null==o||!o.greeting));return s(Ma(e)),qs(Ps.JoinAudioByCallMe)}return Promise.reject({type:Vs,reason:"no matching country code"})})(this[yh],e,t,r,n)}cancelDialOut(e,t,r){return((e,t,r,n)=>{const{rwgAgent:o}=e;return o.audioCancelDialout(t+r,!(null==n||!n.callMe)),qs(Ps.cancelDialOut)})(this[yh],e,t,r)}hangup(){return(e=>{const{store:{getState:t},rwgAgent:r}=e,n=t(),o=Ea(n);return"phone"===(null==o?void 0:o.audio)&&null!==o.userId?(r.audioDrop(o.userId),qs(Ps.hangup)):Promise.reject({type:Ls,reason:"not joined audio by phone"})})(this[yh])}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(Ka(t))),Promise.resolve(""))})(this[yh],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(qa(t))),Promise.resolve(""))})(this[yh],e)}muteShareAudio(e){return((e,t)=>{const{mediaAgent:r,rwgAgent:n,store:{getState:o,dispatch:i}}=e,s=o(),{meeting:{userId:a}}=s;if(t&&t!==a)return ff(t,!0,e.store,r);{const{audio:{isSharingAudio:e,isShareAudioEnabled:t,isShareAudioMuted:o}}=s;return t?o?Promise.resolve(""):(n.muteShareAudio(!0),e&&(null===(c=r.leaveSharingAudio(!0))||void 0===c||c.then(()=>{wp(r,n,s).then(e=>{e.forEach(e=>i(e))})})),Tp(r,a,!0,s),zs("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!1===e.bShareAudioOn).then(()=>(i(nc(!0)),e&&(i(oc(!1)),Ks("SHARE_AUDIO_STATE_CHANGE",{state:"off"})),""))):Promise.reject({type:Ls,reason:"Cannot mute sharing audio when sharing audio is not enable"});var c}})(this[yh],e)}unmuteShareAudio(e){return((e,t)=>{const{mediaAgent:r,rwgAgent:n,store:{getState:o,dispatch:i}}=e,s=o(),{meeting:{userId:a}}=s;if(t&&t!==a)return ff(t,!1,e.store,r);{const{audio:{isSharingAudio:e,isShareAudioEnabled:t,isShareAudioMuted:o},share:{status:c}}=s;return t?!1===o?Promise.resolve(""):(n.muteShareAudio(!1),!1===e&&c===exports.ShareStatus.Sharing&&Dp(r,n,s).then(e=>{e.forEach(e=>i(e))}),Tp(r,a,!1,s),zs("UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",e=>!0===e.bShareAudioOn).then(()=>(i(nc(!1)),!1===e&&c===exports.ShareStatus.Sharing&&(i(oc(!0)),Ks("SHARE_AUDIO_STATE_CHANGE",{state:"on"})),""))):Promise.reject({type:Ls,reason:"Cannot unmute sharing audio when sharing audio is not enable"})}})(this[yh],e)}getMicList(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?[...r.audio.microphoneDevicesList]:[]})(this[yh])}getSpeakerList(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?[...r.audio.speakerDevicesList]:[]})(this[yh])}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=Ea(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[yh],e)}getActiveMicrophone(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?r.audio.activeMicrophone:null})(this[yh])}getActiveSpeaker(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?r.audio.activeSpeaker:null})(this[yh])}isSupportCallOut(){return(e=>{let{store:{getState:t}}=e;const{meeting:{isSupportCallOut:r,callOutCountry:n}}=t();return r&&Array.isArray(n)&&(null==n?void 0:n.length)>0})(this[yh])}getDialOutStatus(){return(e=>{let{store:{getState:t}}=e;const{audio:r}=t();return null==r?void 0:r.dialout.returnCode})(this[yh])}getDialOutCountries(){return(e=>{let{store:{getState:t}}=e;const{meeting:{callOutCountry:r}}=t();return Array.isArray(r)?r:[]})(this[yh])}getShareAudioStatus(){return(e=>{let{store:{getState:t}}=e;const{audio:{isShareAudioEnabled:r,isShareAudioMuted:n,isSharingAudio:o}}=t();return{isShareAudioEnabled:r,isShareAudioMuted:n,isSharingAudio:o}})(this[yh])}isOthersShareAudioMutedLocally(e){return((e,t)=>{var r;let{store:{getState:n}}=e;const{audio:{localShareAudioUserMutedList:o}}=n();return null===(r=o.find(e=>e.userId===t))||void 0===r?void 0:r.muted})(this[yh],e)}startVideo(e){return((e,t)=>{const{store:{getState:r,dispatch:n},mediaAgent:o}=e,i=r(),{media:{videoDecodeStatus:s,videoEncodeStatus:a},video:{isCaptureCameraLoading:u,isCurrentUserStartedVideo:d,isVideoMuted:l}}=i;return d?Promise.reject({type:Ls,reason:"Video is started"}):u?Promise.reject({type:Ls,reason:"Camera is starting,please wait."}):l&&!ba(i)?Promise.reject({type:Ls,reason:"Video is muted by the host"}):!(!_f()&&bi()||Ii())||null!=t&&t.videoElement?!_d()&&null!=t&&t.virtualBackground?Promise.reject({type:Vs,reason:"Cannot start video with virtual background due to the restriction of platform"}):(n(Uc(!0)),ud("video",a,s).subscribe(e=>{let[i]=e;if(i){const e=r(),{video:{activeCamera:i,isSupportHDVideo:s,videoSsrc:a,virtualBackground:{isVBConfigured:u,isVBPreloadReady:d,imageSrc:l}}}=e,{cameraId:p=i,captureWidth:h=0,captureHeight:f=0,videoElement:v,mirrored:_,hd:m,virtualBackground:y}=t||{};_&&o.mirrorVideo(_);let g=void 0;if(v&&(v.id?g=v.id:(g="__ZOOM_SDK_SELF_VIDEO_@__".replace("@","".concat(Math.floor(1e4*Math.random()))),v.id=g)),m&&(console.log("HD support is currently limited, and comes with a number of restrictions and limitations. Please visit https://marketplace.zoom.us/docs/sdk/overview/720p for more details"),s&&es.isCompatibleHardwareForEncode()?es.isSupportVideoEncodeHardwareAcceleration().then(e=>{e?(o.enableHardwareAccelerationForVideoEncode(!0),n(tu({encode:e}))):console.warn("Cannot capture HD video due to hardware limitation")}):console.warn("Cannot capture HD video due to either account restriction and/or hardware limitation")),y||void 0===y&&l){const t=y||{imageUrl:void 0,cropped:void 0};(function(e){return void 0!==e?Ve(Promise.resolve(e)):Js("VIDEO_VIRTUAL_BACKGROUND_PRELOAD_READY",1).pipe(Oe(e=>e))})(d).subscribe(r=>{if(r){let r=void 0;r=u?t.imageUrl!==l?async function(e,t,r){if(e){const n=await zp(e,t);n&&(r.updateVirtualBackgroundImage(n),"blur"!==n&&setTimeout(()=>{var e;const t=document.getElementById(n);null==t||null===(e=t.parentNode)||void 0===e||e.removeChild(t)},0))}else r.updateVirtualBackgroundImage(null)}(t.imageUrl,t.cropped,o):Promise.resolve():async function(e,t,r,n){const o=(n,document.body),{imageUrl:i,cropped:s,captureHeight:a,captureWidth:c,cameraId:u}=e,d=document.createElement("div");d.style.display="none";let l=void 0;l=i?await zp(i,s,d):null;const p=Math.floor(100*Math.random());let h="".concat("__ZOOM_SDK_VIRTUAL_BACKGROUND_CANVAS_@__").concat(p);{const e=document.createElement("canvas");e.width=380,e.height=214,e.id=h,d.appendChild(e)}null==o||o.appendChild(d);const{video:{videoSsrc:f}}=r;return t.startVirtualBackgroundSetting(h,l,f,u,c,a),d}(c(c({},t),{},{captureWidth:h,captureHeight:f,cameraId:p}),o,e).then(e=>Js("VIDEO_VIRTUAL_BACKGROUND_SETTING_SUCCESS",1).toPromise().then(t=>{var r;return o.stopVirtualBackgroundSetting(),t?(null==e||null===(r=e.parentNode)||void 0===r||r.removeChild(e),!0):Promise.reject("vb setting error")})),r.then(()=>{n(Xc({imageSrc:t.imageUrl,cropped:t.cropped})),i!==p&&n(wc(p)),o.startCaptureVideo(a,p,h,f,g)}).catch(()=>{Ks("VIDEO_VITRUAL_BACKGROUND_FAILED",{reason:"Cannot set virtual background image."})})}else Ks("VIDEO_VITRUAL_BACKGROUND_FAILED",{reason:"Cannot load virtual background model."})})}else o.startCaptureVideo(a,p,h,f,g),i!==p&&n(wc(p))}else n(Uc(!1))}),qs(ws).then(()=>{n(Lc(!1)),n(Nc(!1))}).finally(()=>{n(Uc(!1))})):Promise.reject({type:Vs,reason:"You must pass a