@polyv/live-watch-sdk
Version:
SDK for creating a live stream viewing page using Polyv's services.
1 lines • 1.03 MB
JavaScript
"use strict";var e,t,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={exports:{}};function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e){if(Array.isArray(e))return e}function o(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(o=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new o(e)}function s(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){s(a,r,i,o,c,"next",e)}function c(e){s(a,r,i,o,c,"throw",e)}o(void 0)})}}function u(e,t,n){var r;return t=p(t),(r=T()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))&&("object"===E(r)||"function"==typeof r)?r:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e,t,n){return(d=T()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&S(i,n.prototype),i}).apply(null,arguments)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}function y(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){v(e,t,n[t])})}return e}function k(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function x(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function C(e,t){return a(e)||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}(e,t)||P(e,t)||m()}function w(e){return a(e)||_(e)||P(e)||m()}function I(e){return function(e){if(Array.isArray(e))return i(e)}(e)||_(e)||P(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function P(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}}function M(e){var t="function"==typeof Map?new Map:void 0;return(M=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),S(n,e)})(e)}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}function A(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}r.exports;var L=(t||(t=1,function(e,t){function r(){var e;try{e="2.17.0"}catch(e){}return e}var i,a,s,d,f,p,_,m,S,P,T,L,R,D,O,W,N,U,j,B,F,V,q,z,H,G,Q,K,$,J,X,Y,Z,ee,et,en,er,ei,ea,eo,es,ec,eu,el,ed,ef,eh,ev,ep,eg,ey,e_,em,eb,ek,ex,eS,eC,ew,eI,eE,eP,eM,eT,eA,eL,eR,eD,eO,eW,eN,eU,ej,eB,eF,eV,eq,ez,eH,eG,eQ,eK,e$,eJ,eX,eY,eZ,e0,e1,e2,e4,e3,e5,e6,e8,e7,e9,te,tt,tn,tr,ti,ta,to,ts,tc,tu,tl,td,tf,th,tv,tp,tg,ty,t_,tm,tb,tk,tx,tS,tC,tw,tI,tE,tP,tM,tT,tA,tL,tR,tD,tO,tW,tN,tU,tj,tB,tF,tV,tq,tz,tH,tG,tQ,tK,t$,tJ,tX,tY,tZ,t0,t1,t2,t4,t3,t5,t6,t8,t7,t9,ne,nt,nn,nr,ni,na,no,ns,nc,nu,nl,nd,nf,nh,nv,np,ng,ny,n_,nm,nb,nk,nx,nS,nC,nw,nI,nE,nP,nM,nT,nA,nL,nR,nD,nO,nW,nN,nU,nj,nB,nF,nV,nq,nz,nH,nG,nQ,nK,n$,nJ,nX,nY,nZ,n0,n1,n2,n4,n3,n5,n6,n8,n7,n9,re,rt,rn,rr,ri,ra,ro,rs,rc,ru,rl,rd,rf,rh,rv,rp,rg,ry,r_,rm,rb,rk,rx,rS,rC,rw,rI,rE,rP,rM,rT,rA,rL,rR,rD,rO,rW,rN=['"',"'","&","<",">"," "],rU=[""","'","&","<",">"," "],rj=Object.create(null),rB=Object.create(null);rN.forEach(function(e,t){rj[e]=rU[t],rB[rU[t]]=e});var rF=RegExp("["+rN.join("")+"]","g"),rV=RegExp("("+rU.join("|")+")","g");function rq(e){return null==e?e:String(e).replace(rF,function(e){return rj[e]})}function rz(e){return null==e?e:String(e).replace(rV,function(e){return rB[e]})}function rH(){var e=Date.now();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)})}var rG=function(){function e(){l(this,e),this.__eventStore={}}return h(e,[{key:"__addOnEvent",value:function(e,t,n,r){if(t&&n){var i=this.__eventStore[t];i||(i=[]),i.push({type:e,handler:n,callbackHandler:n.bind(r)}),this.__eventStore[t]=i}}},{key:"on",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this.__addOnEvent("normal",e,t,n)}},{key:"once",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this.__addOnEvent("once",e,t,n)}},{key:"off",value:function(e,t){var n=this.__eventStore[e];n&&(n=n.filter(function(e){return e.handler!==t}),this.__eventStore[e]=n)}},{key:"emit",value:function(e,t,n){var r=this,i=this.__eventStore[e];i&&i.forEach(function(i){try{var a=i.type,o=i.handler,s=i.callbackHandler;"function"==typeof s&&s(t,n),"once"===a&&r.off(e,o)}catch(e){console.error(e)}})}},{key:"destroy",value:function(){this.__eventStore={}}}]),e}(),rQ=((T={}).LoginRefuse="LOGIN_REFUSE",T.OnSliceStart="onSliceStart",T.OnSliceId="onSliceID",T.SeminarRestartLive="restartLive",T.SeminarStopLive="stopLive",T.TokenExpired="TOKEN_EXPIRED",T.ProductMessage="PRODUCT_MESSAGE",T.ImageTextMenuChange="IMAGE_TEXT_FOR_SHUNFENG",T.Speak="SPEAK",T.Likes="LIKES",T.IsUnderstand="isUnderstand",T.Login="LOGIN",T.Logout="LOGOUT",T.ExitWhenIsMain="EXIT_WHEN_IS_MAIN",T.SetNick="SET_NICK",T.ChatImg="CHAT_IMG",T.StudentQuestion="S_QUESTION",T.TeacherAnswer="T_ANSWER",T.GetFullMessage="GET_FULL_MESSAGE",T.FinanceRiskEvaluationReset="RESET",T.ProductClick="PRODUCT_CLICK",T.ProductBuyTimes="PRODUCT_BUY_TIMES",T.SignInTimes="SIGN_IN_TIMES",T.TeacherSetPermission="TEACHER_SET_PERMISSION",T.ChangeVideoAndPPTPosition="changeVideoAndPPTPosition",T.AddTimeAxisMarkPoint="ADD_DOT",T.DeleteTimeAxisMarkPoint="DELETE_DOT",T.EditTimeAxisMarkPoint="EDIT_DOT",T.SubtitlesEnable="ENABLE",T.SubtitlesRealCC="ADD",T.SubtitlesTranslate="TRANSLATE",T.ChangeDoubleMode="changeDoubleMode",T.FinishClass="finishClass",T.TransmitChannelSwitch="SWITCH_TRANSMIT_CHANNEL",T.MotivationLikes="LIKES",T.InviteActivityOver="OVER",T.InviteActivityChangeEndTimer="CHANGE_TIMMER",T.RemoveUser="REMOVE_USER",T.SpeakToTop="TO_TOP",T.SpeakCancelTop="CANCEL_TOP",T.ListenLanguage="LISTEN_LANGUAGE",T.ToggleGongGao="TOGGLE_GONGGAO",T.Debug="DEBUG",T.GuideStreamVideoSizeChange="videoSize",T),rK=((L={}).Bubble="bubble",L.Emotion="emotion",L.Message="message",L.Speak="speak",L.FinanceRiskEvaluation="evaluation",L.Product="product",L.JoinRequest="joinRequest",L.JoinResponse="joinResponse",L.JoinLeave="joinLeave",L.JoinSuccess="joinSuccess",L.Video="video",L.Subtitles="subtitles",L.Transmit="transmit",L.CustomMessage="customMessage",L.Motivation="motivation",L.Invite="invite",L.WhiteList="whiteList",L.InteractEvent="interactEvent",L.Withdrawal="withdrawal",L),r$=((R={}).GetChatHistory="/front/getChatHistory",R.GetHistoryBySessionId="/front/getHistoryBySessionId",R.GetEmotionImage="/front/getEmotionImages",R.GetEnEmotionImage="/front/getEmotionImages/en",R.TemporarySaveUserMsg="/front/temporarySaveUserMsg",R.GetUserListNew="/front/viewer/user-list",R.GetUserListSession="/front/viewer/user-list/session",R.GetAskHistoryNew="/front/channel/question-list-by-user/get",R.GetSubtitlesHistory="/front/channel/subtitles/get",R.GetHistoryByTime="/front/channel/chat-history-by-timestamp/get",R.GetHistoryByTimeEncrypt="/front/channel/chat-history-list-by-timestamp/get",R.GetChannelFileList="/front/channel/file-list/get",R),rJ=((D={}).ChatSdkV2Setuped="ChatSdkV2Setuped",D.ChatInfoChange="ChatInfoChange",D.ChatReconnectSuccess="ChatReconnectSuccess",D.ChatConnectFail="ChatConnectFail",D.ChatMessage="ChatMessage",D.ReplaceChatMessage="ReplaceChatMessage",D.ChatLike="ChatLike",D.ChatLikeCountChange="ChatLikeCountChange",D.ChatEmotionalFeedback="ChatEmotionalFeedback",D.ChatUserLogin="ChatUserLogin",D.ChatUserLogout="ChatUserLogout",D.CurrentUserRelogin="CurrentUserRelogin",D.ClearMsgHistory="ClearMsgHistory",D.RemoveChatMsg="RemoveChatMsg",D.CloseChatRoom="CloseChatRoom",D.OpenChatRoom="OpenChatRoom",D.OnlineUserCountChange="OnlineUserCountChange",D.OnlineUserListChange="OnlineUserListChange",D.ChatMsgReplayReload="ChatMsgReplayReload",D.ChatMsgReplayStatusChange="ChatMsgReplayStatusChange",D.ChatMsgReplaying="ChatMsgReplaying",D.ChatMsgReplayCurrentDetailList="ChatMsgReplayCurrentDetailList",D.ChatMsgReplayTimeUpdate="ChatMsgReplayTimeUpdate",D.SelfSpeak="SelfSpeak",D.OverMaxOnlineCount="OverMaxOnlineCount",D.WhiteListRemoveUser="WhiteListRemoveUser",D.SpeakToTop="SpeakToTop",D.SpeakCancelTop="SpeakCancelTop",D.OverLoginLimit="OverLoginLimit",D),rX=((O={}).Top="top",O.CancelTop="cancelTop",O),rY=((W={}).File="file",W),rZ=((N={}).Student="student",N.Slice="slice",N.Viewer="viewer",N.Teacher="teacher",N.Assistant="assistant",N.Manager="manager",N.Guest="guest",N.Attendee="attendee",N.Listener="listener",N.Host="host",N.Dummy="dummy",N),r0=((U={}).TokenExpired="TokenExpired",U.SocketConnectError="SocketConnectError",U.SocketConnectTimeout="SocketConnectTimeout",U.SocketReconnectAttempt="SocketReconnectAttempt",U),r1=((j={}).Speak="speak",j.Image="image",j.Emotion="emotion",j.Reward="reward",j.File="file",j.Redpaper="redpaper",j.RedpaperReceive="redpaperReceive",j.CustomerMessage="customerMessage",j.CustomMessage="customMessage",j.System="system",j.MotivationLike="motivationLike",j.SpeakTop="speakTop",j.SpeakCancelTop="speakCancelTop",j.Effect="effect",j.IarPushCard="iarPushCard",j.IarCheckIn="iarCheckIn",j.IarAnswerCard="iarAnswerCard",j.IarQuestionnaire="iarQuestionnaire",j.Unknown="unknown",j),r2=((B={})[B.No=0]="No",B[B.Yes=1]="Yes",B),r4=((F={}).Prev="prev",F.Next="next",F),r3=((V={}).Loading="loading",V.Fail="fail",V.Default="default",V),r5=((q={}).Compact="compact",q.Loose="loose",q),r6=((z={}).System="SYSTEM",z.Festival="FESTIVAL",z.Custom="CUSTOM",z),r8=((H={}).Speak="speak",H.Mic="mic",H),r7=((G={})[G.Init=0]="Init",G[G.Pre=1]="Pre",G[G.Next=2]="Next",G),r9=((Q={}).Wait="Wait",Q.InitFail="InitFail",Q.InitSuccess="InitSuccess",Q.RequestHistoryFail="RequestHistoryFail",Q),ie=/^(?:([a-z]+):)?\/{2,3}/i;function it(e,t){return ie.test(t)||(t+="://"),ie.test(e)?e.replace(ie,t):t+e}var ir=function(){function e(t){l(this,e),v(this,"__watchCore",void 0),this.__watchCore=t}return h(e,[{key:"getWatchCore",value:function(){return this.__watchCore}},{key:"updateAppConfig",value:function(e){}},{key:"setup",value:function(){}},{key:"bindSocketEvents",value:function(){}},{key:"destroy",value:function(){}}]),e}(),ii=function(e){function t(e){var n;return l(this,t),v(n=u(this,t,[e]),"eventEmitter",new rG),v(n,"__chatCoreConfig",{}),v(n,"__chatCore",void 0),v(n,"socketTarget",void 0),v(n,"chatTarget",void 0),n}return g(t,e),h(t,[{key:"getChatCoreConfig",value:function(){return this.__chatCoreConfig}},{key:"updateChatCoreConfig",value:function(e){this.__chatCoreConfig=b({},this.__chatCoreConfig,e)}},{key:"_setChatCore",value:function(e){this.__chatCore=e}},{key:"_setupChatCoreModule",value:function(){var e=this;return c(function(){return A(this,function(t){switch(t.label){case 0:if(!e.__chatCore)throw Error("[chat-module] please setChatCore");return[4,e.__chatCore.setup()];case 1:return t.sent(),[2]}})})()}},{key:"getChatCore",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(e&&!this.__chatCore)throw Error("未创建 chatCore");return this.__chatCore}},{key:"getSocket",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=this.getChatCore(!1);if(e&&!(null==t?void 0:t.socket))throw Error("未创建 chatCore 或未创建 socket");return null==t?void 0:t.socket}},{key:"emitChatWs",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.getChatCore(!0);return new Promise(function(i){r.emitWs(e,JSON.stringify(t),c(function(){var e,t,r,a=arguments;return A(this,function(o){for(t=Array(e=a.length),r=0;r<e;r++)t[r]=a[r];return n?i(t=t.map(function(e){return JSON.parse(e)})):i(t),[2]})}))})}},{key:"_destroyChatCore",value:function(){var e=this;return c(function(){return A(this,function(t){switch(t.label){case 0:if(!e.__chatCore)return[3,2];return[4,e.__chatCore.destroy()];case 1:t.sent(),e.__chatCore=void 0,t.label=2;case 2:return[2]}})})()}},{key:"_destroyChatCoreModule",value:function(){this._destroyChatCore(),this.eventEmitter.destroy()}}]),t}(ir),ia=((K={}).Cash="cash",K.Good="good",K);function io(e,t){var n=String(e).toUpperCase();if("Y"!==n&&"N"!==n){if(null==t)throw Error('The value argument must be "Y" or "N"');n=String(t).toUpperCase()}return"Y"===n}var is=(($={}).GetApiToken="/v3/common/channel/viewer/get-api-token",$.VerifyViewerLoginToken="/v3/common/auth/api-auth/viewer/set-info",$.GetChannelDetail="/v3/common/channel/detail",$.GetViewerInfo="/v3/common/channel/viewer",$.GetViewerPlaybackInfo="/v3/common/channel/viewer/playback-info",$.VerifyViewerUnique="/v3/watch/channel/verify/unique",$.GetPlayToken="/v3/watch/playback/video/get-play-token",$.VerifyNoneAuth="/v3/common/auth/none-auth/viewer/set-info",$.VerifyPhoneAuth="/v3/common/auth/phone-auth/check",$.GetAuthPayData="/v3/common/auth/pay-auth/check",$.CheckAuthPayStatus="/v3/common/auth/pay-auth/check-status",$.GetWechatPayCheckData="/v3/common/auth/pay-auth/get-pay-check",$.CheckAuthWechatPayStatus="/v3/common/auth/pay-auth/pay-check",$.VerifyCodeAuth="/v3/common/auth/code-auth/check-auth-code",$.VerifyInfoAuth="/v3/common/auth/info-auth/save",$.LoginInfoAuth="/v3/common/auth/info-auth/check",$.GetCustomAuthUrl="/v3/common/auth/custom-auth/get-url",$.VerifyCustomAuth="/v3/common/auth/custom-auth/check",$.VerifyExternalAuth="/v3/common/auth/external-auth/check",$.VerifyDirectAuth="/v3/common/auth/direct-auth/check",$.VerifyInviteWatchAuth="/v3/common/auth/invite-auth/check",$.GetInviteWatchAuthInfo="/v3/common/auth/invite-auth/get-info-status",$.CreateImageCaptcha="/v3/common/kaptcha",$.SendSmsVerifyCode="/v3/common/sms/verify-code/send",$.GetMultiMeetingLiveStatus="/v3/watch/channel/multi-meeting/live-status",$.GetWechatAuthUrl="/v3/common/wx/auth",$.GetWorkWechatAuthUrl="/v3/common/wx-work/auth",$.GetWorkWeixinCode="/v3/common/wx-work/code",$.GetWeixinSdkSign="/v3/secure/wx/get-share-sign",$.GetWorkWeixinSdkSign="/v3/secure/wx-work/get-share-sign",$.SubmitEnrollForm="/v3/watch/channel/enroll/save",$.CheckEnrollMobile="/v3/watch/channel/enroll/check-mobile",$.LoginEnroll="/v3/watch/channel/enroll/login",$.InviteCurrentRank="/v3/watch/channel/invite/current-rank",$.InviteDetailList="/v3/watch/channel/invite/list",$.InviteDetailStatus="/v3/watch/channel/invite/export-status",$.InviteDetailExport="/v3/watch/channel/invite/export",$.SendLike="/v3/watch/channel/like",$.SetNick="/v3/watch/channel/viewer/set-nickname",$.PayDonate="/v3/watch/channel/donate/donate",$.CheckDonatePayStatus="/v3/watch/channel/donate/check-status",$.PayDonatePoint="/v3/watch/channel/point-donate/donate",$.GetDonateSurplusPoint="/v3/watch/channel/point-donate/get-point",$.SubmitLiveBooking="/v3/common/channel/booking",$.CancelLiveBooking="/v3/common/channel/booking/cancel",$.SubmitSmsLiveBooking="/v3/common/channel/booking/sms",$.CancelSmsLiveBooking="/v3/common/channel/booking/sms/cancel",$.WxLiveBooking="/v3/common/channel/booking/wx",$.CancelWxLiveBooking="/v3/common/channel/booking/wx/cancel",$.SendRedpack="/v3/watch/channel/redpack/send",$.ApplyWithdraw="/v3/watch/channel/withdraw/apply",$.ApplyWithdrawTransferBill="/v3/watch/channel/withdraw/transfer/bill",$.CancelApplyWithdrawTransferBill="/v3/watch/channel/withdraw/transfer/bill/cancel",$.CheckWithdrawStatus="/v3/watch/channel/withdraw/transfer/bill/out-bill-no",$.GetUserWithdrawStatistics="/v3/watch/channel/withdraw/user/statistics",$.GetWithdrawRecord="/v3/watch/channel/withdraw/list",$.TranslateText="/v3/watch/channel/translate",$.GetPlaybackList="/v3/watch/playback/video/list",$.GetPlaybackId="/v3/watch/playback/video/get",$.GetPushInfo="/v3/common/channel/push/get",$.GetMicroActivityDetail="/v3/watch/channel/micro-activity/get",$.PostChannelTrialInfo="/v3/common/channel/trial",$.GetChannelRiskConfirmInfo="/v3/watch/channel/risk-confirm/get",$.PostChannelRiskConfirmSave="/v3/watch/channel/risk-confirm/save",$.GetMultiMeetingList="/v3/watch/channel/multi-meeting/page",$.ResaveRealNameUserId="/v3/watch/channel/viewer-verification/re-save",$.GetRealNameStatus="/v3/watch/channel/viewer-verification/verification",$.SaveRealNameData="/v3/watch/channel/viewer-verification/save",$.GetInvitePoster="/v3/watch/channel/invite/get",$.GetChannelAgreement="/v3/common/channel/agreement",$.PostInviteCustomerAuthCheck="/v3/common/auth/invite-customer-auth/check",$.GetTaskActivityStatus="/v3/common/channel/task-reward/activity-task-status",$.GetTaskRewardList="/v3/common/channel/task-reward/get",$.SubmitTaskQuestionnaire="/v3/common/channel/task-reward/submit-questionnaire-answer",$.SubmitTaskRewardReceive="/v3/common/channel/task-reward/submit-accept-info",$.CreateOrder="/v3/watch/channel/product/order/create",$.OrderPay="/v3/watch/channel/product/order/pay",$.SubtitleLanguageListAll="/v3/common/channel/subtitle/language/list-all",$.TaskActivityOnlineTaskReach="/v3/common/channel/task-reward/online-task/reach",$.GetPayProviders="/v3/watch/channel/product/order/payment-providers/get",$.GetChannelSessionList="/v3/watch/channel/session/list",$.GetAnchorInfo="/v3/common/channel/anchor/detail",$.GetAnchorChannelList="/v3/common/channel/anchor/channel-list",$.SmallClassLoginCheck="/v3/common/channel/login-check",$),ic=function(e){var t=e.channelId,n=e.pageNumber,r=e.pageSize;return"/v3/common/channel/invite/rank/list-".concat(t,"-").concat(n,"-").concat(r)},iu=((J={}).Y="Y",J.N="N",J),il=function(e){function t(){return l(this,t),u(this,t,arguments)}return g(t,e),h(t,[{key:"getDonateConfig",value:function(){var e=this.getWatchCore().channel.getChannelDetail(!1);if(!e||!e.donateSetting)return console.warn("[donate-module] getDonateConfig will return default value"),t.generateDefaultDonateConfig();var n=e.donateSetting;return{donateCashEnabled:io(n.donateCashEnabled,iu.N),donateGoodEnabled:io(n.donateGoodEnabled,iu.N),donatePointEnabled:io(n.donatePointEnabled,iu.N),donateCashMin:n.cashMin||0,donateCashQuickOptions:n.cashes||[],donatePointUnit:n.pointUnit||"",donateScoreUnit:n.scoreUnit||""}}},{key:"isShowDonateCash",value:function(){var e=this.getWatchCore(),t=e.weixin.getWeixinAccountFunctionEnabled(),n=e.weixin.getWeixinPayEnabled();return this.getDonateConfig().donateCashEnabled&&t&&n}},{key:"isShowDonateCashGood",value:function(){var e=this.getWatchCore(),t=e.weixin.getWeixinAccountFunctionEnabled(),n=e.weixin.getWeixinPayEnabled();return this.getDonateConfig().donateGoodEnabled&&t&&(n||this._isExistFreeGood())}},{key:"isShowDonatePointGood",value:function(){return this.getDonateConfig().donatePointEnabled}},{key:"_isExistFreeGood",value:function(){return -1!==this._getCashGoods().findIndex(function(e){return 0===e.goodPrice&&io(e.goodEnabled,iu.Y)})}},{key:"isFreeReward",value:function(e){var t=this._getCashGoods().find(function(t){return t.goodName===e});return!!t&&0===t.goodPrice}},{key:"__formateGoodList",value:function(e){return e.map(function(e,t){return k(b({},e),{goodId:"".concat(t+1),goodImage:e.dynamicImg||e.goodImg})})}},{key:"_getPointGoods",value:function(){var e,t=this.getWatchCore().channel.getChannelDetail(!1);return this.__formateGoodList((null==t?void 0:null===(e=t.donateSetting)||void 0===e?void 0:e.pointGoods)||[])}},{key:"_getCashGoods",value:function(){var e,t=this.getWatchCore().channel.getChannelDetail(!1);return this.__formateGoodList((null==t?void 0:null===(e=t.donateSetting)||void 0===e?void 0:e.goods)||[])}},{key:"getDonateGoods",value:function(){var e=this,t=this._getCashGoods(),n=this.isShowDonateCash(),r=this.isShowDonateCashGood();!n&&r&&(t=t.filter(function(t){return e.isFreeReward(t.goodName)}));var i=this._getPointGoods();return{goods:this.isShowDonatePointGood()?i:t,cashGoods:t,pointGoods:i}}},{key:"payDonate",value:function(e){var t=this;return c(function(){var n,r,i,a,o,s,c;return A(this,function(u){switch(u.label){case 0:return i=t.getWatchCore(),o=void 0===(a=e.goodCount)?1:a,[4,i.polyvWatchApi.post(is.PayDonate,{roomId:i.chat.getChatRoomId(),sessionId:i.getCurrentTargetSessionId(),donateType:e.donateType,goodId:e.goodId,goodNum:o,amount:e.amount})];case 1:return s=u.sent(),c={goodId:e.goodId,goodCount:o,amount:e.amount,logId:s.logId,donateType:s.donateType,isFree:io(s.freeDonate,iu.N)},(null===(n=s.wxPayOrder)||void 0===n?void 0:n.payId)&&(c.logId=s.wxPayOrder.payId),(null===(r=s.wxPayOrder)||void 0===r?void 0:r.codeUrl)&&(c.codeUrl=s.wxPayOrder.codeUrl,c.qrCodeUrl=i.utils.generateQrcodeUrl(s.wxPayOrder.codeUrl)),s.wxPayOrder&&s.wxPayOrder.timeStamp&&s.wxPayOrder.nonceStr&&s.wxPayOrder.prepayId&&s.wxPayOrder.signType&&s.wxPayOrder.paySign&&(c.wxPaySignData={timestamp:Number(s.wxPayOrder.timeStamp),nonceStr:s.wxPayOrder.nonceStr,package:s.wxPayOrder.prepayId,signType:s.wxPayOrder.signType,paySign:s.wxPayOrder.paySign}),[2,c]}})})()}},{key:"checkDonatePayStatus",value:function(e){var t=this;return c(function(){return A(this,function(n){switch(n.label){case 0:return[4,t.getWatchCore().polyvWatchApi.post(is.CheckDonatePayStatus,{logId:e.logId,donateType:e.donateType})];case 1:return[2,{paySuccess:io(n.sent().hasPay,iu.N)}]}})})()}},{key:"getDonateSurplusPoint",value:function(){var e=this;return c(function(){var t;return A(this,function(n){switch(n.label){case 0:return[4,(t=e.getWatchCore()).polyvWatchApi.get(is.GetDonateSurplusPoint,{channelId:t.channel.getChannelId()})];case 1:return[2,n.sent().point||0]}})})()}},{key:"payDonatePoint",value:function(e){var t=this;return c(function(){var n;return A(this,function(r){switch(r.label){case 0:return[4,(n=t.getWatchCore()).polyvWatchApi.post(is.PayDonatePoint,{roomId:n.chat.getChatRoomId(),sessionId:n.getCurrentTargetSessionId(),goodId:e.goodId,goodNum:e.goodCount})];case 1:return[2,r.sent().point||0]}})})()}},{key:"__getDefaultSvgaDir",value:function(){var e=this.getWatchCore().domain.getDomainInfo();return"".concat(e.resourceDomain,"/default-img/donate-svga")}},{key:"getDonateSvgaUrl",value:function(e){var n=t.svgaMap,r=document.createElement("a");r.href=e;var i=r.pathname.split("/"),a=i[i.length-1].split(".")[0];if(n[a])return"".concat(this.__getDefaultSvgaDir(),"/").concat(n[a])}}],[{key:"generateDefaultDonateConfig",value:function(){return{donateCashEnabled:!1,donateGoodEnabled:!1,donatePointEnabled:!1,donateCashMin:0,donateCashQuickOptions:[],donatePointUnit:"",donateScoreUnit:""}}}]),t}(ir);function id(e){return"string"==typeof e}function ih(e){return"number"==typeof e}function iv(e){return"boolean"==typeof e}function ip(e){return void 0===e}function ig(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",n="",r=0;r<e;r++)n+=t.charAt(Math.floor(Math.random()*t.length));return n}function iy(e,t){return Math.floor(Math.random()*(t-e+1))+e}function i_(e,t){var n=t.replace(/^\+/,"");return"".concat(n,"-").concat(e)}function im(e){var t=e.match(/[^.]+$/);return t?t[0]:""}function ib(e){if("string"!=typeof e||!e.trim())return 0;var t=e.split(":");return 3600*Number(t[0])+60*Number(t[1])+Number(t[2])}function ik(e){var t=e;try{return t=JSON.parse(t),{success:!0,data:t}}catch(e){return{success:!1,data:t}}}function ix(e,t,n){var r,i=n||{},a=i.maxCount,o=void 0===a?1/0:a,s=i.immediate,c=0,u=function(){r=window.setTimeout(function(){e(),++c<o?u():window.clearTimeout(r)},"function"==typeof t?t():t)};return void 0!==s&&s&&e(),u(),{clear:function(){window.setTimeout(function(){window.clearTimeout(r)},0)}}}function iS(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3;return new Promise(function(t){setTimeout(function(){t()},e)})}function iC(e){return 0===e.length?null:e[e.length-1]}function iw(e,t){var n=function(e){var t=C(e.split("-")[0].split(".").map(Number),3);return{major:t[0],minor:t[1],patch:t[2]}},r=n(e),i=n(t);return r.major!==i.major?r.major>i.major:r.minor!==i.minor?r.minor>i.minor:r.patch===i.patch||r.patch>i.patch}v(il,"svgaMap",{coffee:"coffee.svga",like:"like.svga",handclap:"handclap.svga",666:"666.svga",star:"star.svga",diamond:"diamond.svga",car:"car.svga",rocket:"rocket.svga",bear:"bear.svga",crown:"crown.svga",cup:"cup.svga",microphone:"microphone.svga",villa:"villa.svga",house:"villa.svga"});var iI=["ppt","pptx","pdf","xlsx","xls","doc","docx"];function iE(e){return iI.includes(e.toLocaleLowerCase())}function iP(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return e.replace(/<|>|"|&/g,function(e){switch(e){case"<":return"<";case">":return">";case""":return'""';case"&":return"&";default:return""}}).length>t}var iM=function(){function e(t,n){l(this,e),v(this,"__chatModule",void 0),v(this,"__watchCore",void 0),this.__chatModule=t,this.__watchCore=n}return h(e,[{key:"__getMsgUid",value:function(e){var t=e.user;if("uid"in t)return t.uid}},{key:"filterApiMsgList",value:function(e){var t=this,n=[];return e.forEach(function(e){var r;switch(e.msgSource){case"chatImg":r=t.filterImgApiMsg(e);break;case"reward":r=t.filterRewardApiMsg(e);break;case"file":r=t.filterFileApiMsg(e);break;case"redpaper":r=t.filterRedpaperApiMsg(e);break;case"customerMessage":r=t.filterCustomerApiMsg(e);break;case"custom":r=t.filterCustomApiMsg(e);break;default:var i=t.__getMsgUid(e);i&&(r=t.__filterApiMsgByUid(i,e)),r||(r=t.filterSpeakApiMsg(e))}r&&n.push(r)}),n}},{key:"__filterApiMsgByUid",value:function(e,t){if("1"===e)return this.filterRewardApiMsg(t)}},{key:"filterApiQuote",value:function(e){if(void 0!==e){var t,n=e.user?this.__filterUser(e.user).nick:e.nick;switch(e.msgType){case"chatImg":t={msgSource:r1.Image,imageUrl:e.image.url,size:{width:e.image.width,height:e.image.height},userId:e.userId,nick:n};break;case"redpaper":var r=JSON.parse(e.content);t=k(b({msgSource:r1.Redpaper},r),{nick:n});break;case"customerMessage":t={msgSource:r1.CustomerMessage,content:e.content,nick:n};break;default:t={msgSource:r1.Speak,content:e.content,userId:e.userId,nick:n}}return t}}},{key:"__filterUser",value:function(e){if(e&&!e.userId&&(e.userId="system"),e&&e.nick){var t=this.__chatModule.getWatchCore(),n=t.user.isSpecialUserType(e.userType,e.actor),r=t.user.isCurrentUser(e.userId);n||r||(e.nick=t.utils.processForceHiddenNickname(e.nick))}return e}},{key:"filterCommonApiMsg",value:function(e,t){var n=this.__filterUser(e.user);return{id:e.id,msgSource:t,time:e.time,user:n}}},{key:"filterSpeakApiMsg",value:function(e){return k(b({},this.filterCommonApiMsg(e,r1.Speak)),{content:e.content,quote:this.filterApiQuote(e.quote),isOverLength:!!e.overLen||iP(e.content),overLen:!!e.overLen})}},{key:"filterImgApiMsg",value:function(e){return"chatImg"===e.content.type?k(b({},this.filterCommonApiMsg(e,r1.Image)),{imageId:e.content.id,imageUrl:e.content.uploadImgUrl,size:e.content.size}):k(b({},this.filterCommonApiMsg(e,r1.Emotion)),{emotionId:e.content.id,emotionUrl:e.content.uploadImgUrl,size:e.content.size})}},{key:"filterRewardApiMsg",value:function(e){return k(b({},this.filterCommonApiMsg(e,r1.Reward)),{gimg:e.content.gimg,goodNum:e.content.goodNum,donateType:e.content.gimg?ia.Good:ia.Cash,rewardContent:e.content.rewardContent,isSelf:this.__watchCore.user.isCurrentUser(e.user.userId),isFree:this.__watchCore.donate.isFreeReward(e.content.rewardContent)})}},{key:"filterFileApiMsg",value:function(e){var t=JSON.parse(e.content);return iE(im(t.name))?k(b({},this.filterCommonApiMsg(e,r1.File)),{fileUrl:t.url,fileName:t.name}):k(b({},this.filterCommonApiMsg(e,r1.Image)),{imageId:rH(),imageUrl:t.url})}},{key:"filterRedpaperApiMsg",value:function(e){var t,n=null===(t=e.userTags)||void 0===t?void 0:t.map(function(e){return Number(e)}),r=b(k(b({},e),{userLabels:n}),this.filterCommonApiMsg(e,r1.Redpaper));return delete r.userTags,r}},{key:"filterCustomerApiMsg",value:function(e){return k(b({},this.filterCommonApiMsg(e,r1.CustomerMessage)),{content:e.content})}},{key:"filterCustomApiMsg",value:function(e){return b({},e,this.filterCommonApiMsg(e,r1.CustomMessage))}}]),e}(),iT=function(){function e(t,n){l(this,e),v(this,"__chatModule",void 0),v(this,"__watchCore",void 0),this.__chatModule=t,this.__watchCore=n}return h(e,[{key:"__filterMsgUser",value:function(e){if(!e)return e;if(e.userId||(e.userId="system"),e&&e.nick){var t=this.__chatModule.getWatchCore(),n=t.user.isSpecialUserType(e.userType,e.actor),r=t.user.isCurrentUser(e.userId);n||r||(e.nick=t.utils.processForceHiddenNickname(e.nick))}return e}},{key:"filterMsgOriginQuote",value:function(e){var t,n=this.__filterMsgUser(e.user).nick;switch(e.msgSource){case r1.Speak:t={msgSource:r1.Speak,content:e.content,userId:e.user.userId,nick:n};break;case r1.Image:t={msgSource:r1.Image,imageUrl:e.imageUrl,size:e.size,userId:e.user.userId,nick:n};break;case r1.Redpaper:t=k(b({},e),{nick:n,msgSource:r1.Redpaper});break;case r1.CustomerMessage:t={msgSource:r1.CustomerMessage,nick:n,content:e.content}}return t}},{key:"filterSdkQuote",value:function(e){if(void 0!==e){var t,n=e.user?this.__filterMsgUser(e.user).nick:e.nick;switch(e.msgType){case"CHAT_IMG":t={msgSource:r1.Image,imageUrl:e.image.url,size:{width:e.image.width,height:e.image.height},userId:e.userId,nick:n};break;case"REDPAPER":t=k(b({},e.content),{nick:n,msgSource:r1.Redpaper});break;case"NORMAL":t={msgSource:r1.Speak,content:e.content,userId:e.userId,nick:n}}return t}}},{key:"filterSpeakSdkMsg",value:function(e){return"FILE"===e.msgType?this.filterFileSdkMsg(e):{msgSource:r1.Speak,id:e.id,time:e.time,user:this.__filterMsgUser(e.user),content:e.content,quote:this.filterSdkQuote(e.quote),isOverLength:!!e.overLen||iP(e.content),overLen:!!e.overLen}}},{key:"filterFileSdkMsg",value:function(e){return iE(im(e.content.name))?{msgSource:r1.File,id:e.id,time:e.time,user:this.__filterMsgUser(e.user),fileName:e.content.name,fileUrl:e.content.url}:{msgSource:r1.Image,id:e.id,time:e.time,user:this.__filterMsgUser(e.user),imageId:rH(),imageUrl:e.content.url}}},{key:"filterChatImgSdkMsg",value:function(e){var t={msgSource:r1.Image,id:e.id,time:e.time,user:this.__filterMsgUser(e.user),imageId:e.content.id,imageUrl:e.content.uploadImgUrl,size:e.content.size};return iv(e.result)&&!1===e.result&&(t.isIllegal=!0),t}},{key:"filterEmotionSdkMsg",value:function(e){return{msgSource:r1.Emotion,id:e.id,time:Date.now(),emotionUrl:e.content.uploadImgUrl,user:this.__filterMsgUser(e.user)}}},{key:"filterRewardSdkMsg",value:function(e){return{msgSource:r1.Reward,id:rH(),time:Date.now(),gimg:e.content.gimg,goodNum:e.content.goodNum,rewardContent:e.content.rewardContent,donateType:e.content.gimg?ia.Good:ia.Cash,isSelf:this.__watchCore.user.isCurrentUser(e.content.rewardUser.userId),isFree:this.__watchCore.donate.isFreeReward(e.content.rewardContent),user:this.__filterMsgUser({userId:e.content.rewardUser.userId,nick:e.content.unick,pic:e.content.uimg,userType:this.__watchCore.user.getUserType()})}}},{key:"filterRedpaperSdkMsg",value:function(e){return k(b({},e),{msgSource:r1.Redpaper,id:rH(),time:e.timestamp,user:this.__filterMsgUser(e.user)})}},{key:"filterRedpaperReceiveSdkMsg",value:function(e){var t="redpaper-receive-msg-"+rH();return{msgSource:r1.RedpaperReceive,id:t,time:Date.now(),nick:this.__filterMsgUser({userId:e.redpackId,nick:e.nick,userType:rZ.Viewer}).nick,type:e.type,isOver:io(e.isOver,iu.N)}}},{key:"filterCustomerSdkMsg",value:function(e){return{msgSource:r1.CustomerMessage,id:e.id,time:Date.now(),user:this.__filterMsgUser(e.user),content:e.content}}},{key:"filterCustomSdkMsg",value:function(e){return k(b({},e),{msgSource:r1.CustomMessage,user:this.__filterMsgUser(e.user)})}}]),e}(),iA=((X={}).ChannelSetupFail="ChannelSetupFail",X.LiveStatusChange="LiveStatusChange",X.SessionIdChange="SessionIdChange",X.SeminarHostJoinInGroup="SeminarHostJoinInGroup",X.SeminarHostLeaveGroup="SeminarHostLeaveGroup",X.ForceChangePlaybackStatus="ForceChangePlaybackStatus",X.ViewerWatchDuration="ViewerWatchDuration",X.TransmitDoubleRoomChange="TransmitDoubleRoomChange",X.TransmitChannelSwitch="TransmitChannelSwitch",X.ManagerBulletinMarquee="ManagerBulletinMarquee",X.TestModeChange="TestModeChange",X.AuthExpired="AuthExpired",X),iL=((Y={}).Alone="alone",Y.Ppt="ppt",Y.Seminar="seminar",Y),iR=((Z={}).Undefined="undefined",Z.TopClass="topclass",Z.Train="train",Z.Double="double",Z.Seminar="seminar",Z.Alone="alone",Z.Portrait="portrait",Z.Meeting="meeting",Z.Mr="mr",Z.SmallClass="smallclass",Z),iD=((ee={}).Live="live",ee.Waiting="waiting",ee.End="end",ee.Playback="playback",ee.Stop="stop",ee.UnStart="unStart",ee),iO=((et={}).Desc="desc",et.Chat="chat",et.Text="text",et.Seat="seat",et.Quiz="quiz",et.Iframe="iframe",et.Previous="previous",et.Tuwen="tuwen",et.QA="qa",et.Buy="buy",et.Subtitle="realTimeSubtitle",et.Invite="invite",et.Members="members",et.Vote="vote",et.MicroActivity="microActivity",et.MultiMeeting="multiMeeting",et.AIAssistant="aiAssistant",et.AISummary="aiSummary",et),iW=((en={}).MenuDisplay="menuDisplay",en.CurrentPage="currentPage",en.NewPage="newPage",en),iN=((er={}).Player="player",er.Desc="desc",er),iU=((ei={}).Single="single",ei.Double="double",ei),ij=((ea={}).Normal="normal",ea.Transmit="transmit",ea.Receive="receive",ea),iB=((eo={}).Warm="warm",eo.Record="record",eo.Playback="playback",eo.Live="live",eo.End="end",eo),iF=((es={}).Normal="normal",es.Portrait="portrait",es),iV=((ec={}).Ppt="ppt",ec.Video="video",ec.FollowTeacher="followTeacher",ec.OnlyVideo="only-video",ec),iq=((eu={}).Player="player",eu.Doc="doc",eu),iz=((el={}).Normal="normal",el.Large="large",el),iH=((ed={}).Black="black",ed.Red="red",ed.Blue="blue",ed.White="white",ed.Green="green",ed.Golden="golden",ed.Freshblue="freshblue",ed),iG=((ef={}).Skin="skin",ef.Theme="theme",ef),iQ=((eh={}).Unknow="Unknow",eh.RemoteLogin="RemoteLogin",eh),iK=((ev={}).CustomLiveAudio="CustomLiveAudio",ev.NormalAudio="NormalAudio",ev.OnlyAudio="OnlyAudio",ev.VrAudio="VrAudio",ev),i$=((ep={}).NetworkError="NetworkError",ep.NetworkRequestTimeout="NetworkRequestTimeout",ep.NotAllowDomain="NotAllowDomain",ep.NotAllowAccess="NotAllowAccess",ep.NotAvailableSession="NotAvailableSession",ep.Unknown="Unknown",ep),iJ=((eg={}).Client="client",eg.Pull="pull",eg.ThirdPull="thirdpull",eg.Disk="disk",eg.Audio="audio",eg.Vr="vr",eg),iX=((ey={}).Cover="0",ey.Contain="2",ey),iY=((e_={}).UnStart="unStart",e_.End="end",e_.Live="live",e_.Playback="playback",e_.Expired="expired",e_),iZ=((em={}).LiveScreenshot="liveScreenshot",em.SystemDefault="systemDefault",em.Custom="custom",em),i0=((eb={}).COMMON="common",eb.MULTI_PLATFORM="multiplatform",eb),i1=((ek={}).Single="Single",ek.Normal="Normal",ek.MultiLanguageTrack="MultiLanguageTrack",ek),i2=((ex={}).Text="text",ex.Image="image",ex),i4=((eS={}).LivePlayback="livePlayback",eS.Live="live",eS.Playback="playback",eS);function i3(e,t){return e===t||e!=e&&t!=t}function i5(e,t){for(var n=e.length;n--;)if(i3(e[n][0],t))return n;return -1}var i6=Array.prototype.splice;function i8(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}i8.prototype.clear=function(){this.__data__=[],this.size=0},i8.prototype.delete=function(e){var t=this.__data__,n=i5(t,e);return!(n<0)&&(n==t.length-1?t.pop():i6.call(t,n,1),--this.size,!0)},i8.prototype.get=function(e){var t=this.__data__,n=i5(t,e);return n<0?void 0:t[n][1]},i8.prototype.has=function(e){return i5(this.__data__,e)>-1},i8.prototype.set=function(e,t){var n=this.__data__,r=i5(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var i7="object"==E(n)&&n&&n.Object===Object&&n,i9=("undefined"==typeof self?"undefined":E(self))=="object"&&self&&self.Object===Object&&self,ae=i7||i9||Function("return this")(),at=ae.Symbol,an=Object.prototype,ar=an.hasOwnProperty,ai=an.toString,aa=at?at.toStringTag:void 0,ao=Object.prototype.toString,as=at?at.toStringTag:void 0;function ac(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":as&&as in Object(e)?function(e){var t=ar.call(e,aa),n=e[aa];try{e[aa]=void 0;var r=!0}catch(e){}var i=ai.call(e);return r&&(t?e[aa]=n:delete e[aa]),i}(e):ao.call(e)}function au(e){var t=void 0===e?"undefined":E(e);return null!=e&&("object"==t||"function"==t)}function al(e){if(!au(e))return!1;var t=ac(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var ad=ae["__core-js_shared__"],af=(eC=/[^.]+$/.exec(ad&&ad.keys&&ad.keys.IE_PROTO||""))?"Symbol(src)_1."+eC:"",ah=Function.prototype.toString;function av(e){if(null!=e){try{return ah.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ap=/^\[object .+?Constructor\]$/,ag=Object.prototype,ay=Function.prototype.toString,a_=ag.hasOwnProperty,am=RegExp("^"+ay.call(a_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ab(e,t){var n=null==e?void 0:e[t];return au(n)&&(!af||!(af in n))&&(al(n)?am:ap).test(av(n))?n:void 0}var ak=ab(ae,"Map"),ax=ab(Object,"create"),aS=Object.prototype.hasOwnProperty,aC=Object.prototype.hasOwnProperty;function aw(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function aI(e,t){var n,r=e.__data__;return("string"==(n=void 0===t?"undefined":E(t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?r["string"==typeof t?"string":"hash"]:r.map}function aE(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function aP(e){var t=this.__data__=new i8(e);this.size=t.size}aw.prototype.clear=function(){this.__data__=ax?ax(null):{},this.size=0},aw.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},aw.prototype.get=function(e){var t=this.__data__;if(ax){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return aS.call(t,e)?t[e]:void 0},aw.prototype.has=function(e){var t=this.__data__;return ax?void 0!==t[e]:aC.call(t,e)},aw.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ax&&void 0===t?"__lodash_hash_undefined__":t,this},aE.prototype.clear=function(){this.size=0,this.__data__={hash:new aw,map:new(ak||i8),string:new aw}},aE.prototype.delete=function(e){var t=aI(this,e).delete(e);return this.size-=t?1:0,t},aE.prototype.get=function(e){return aI(this,e).get(e)},aE.prototype.has=function(e){return aI(this,e).has(e)},aE.prototype.set=function(e,t){var n=aI(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},aP.prototype.clear=function(){this.__data__=new i8,this.size=0},aP.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},aP.prototype.get=function(e){return this.__data__.get(e)},aP.prototype.has=function(e){return this.__data__.has(e)},aP.prototype.set=function(e,t){var n=this.__data__;if(y(n,i8)){var r=n.__data__;if(!ak||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new aE(r)}return n.set(e,t),this.size=n.size,this};var aM=function(){try{var e=ab(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function aT(e,t,n){"__proto__"==t&&aM?aM(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var aA=Object.prototype.hasOwnProperty;function aL(e,t,n){var r=e[t];aA.call(e,t)&&i3(r,n)&&(void 0!==n||t in e)||aT(e,t,n)}function aR(e){return null!=e&&(void 0===e?"undefined":E(e))=="object"}function aD(e){return aR(e)&&"[object Arguments]"==ac(e)}var aO=Object.prototype,aW=aO.hasOwnProperty,aN=aO.propertyIsEnumerable,aU=aD(function(){return arguments}())?aD:function(e){return aR(e)&&aW.call(e,"callee")&&!aN.call(e,"callee")},aj=Array.isArray,aB=t&&!t.nodeType&&t,aF=aB&&e&&!e.nodeType&&e,aV=aF&&aF.exports===aB?ae.Buffer:void 0,aq=(aV?aV.isBuffer:void 0)||function(){return!1},az=/^(?:0|[1-9]\d*)$/;function aH(e,t){var n=void 0===e?"undefined":E(e);return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&az.test(e))&&e>-1&&e%1==0&&e<t}function aG(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}var aQ={};function aK(e){return function(t){return e(t)}}aQ["[object Float32Array]"]=aQ["[object Float64Array]"]=aQ["[object Int8Array]"]=aQ["[object Int16Array]"]=aQ["[object Int32Array]"]=aQ["[object Uint8Array]"]=aQ["[object Uint8ClampedArray]"]=aQ["[object Uint16Array]"]=aQ["[object Uint32Array]"]=!0,aQ["[object Arguments]"]=aQ["[object Array]"]=aQ["[object ArrayBuffer]"]=aQ["[object Boolean]"]=aQ["[object DataView]"]=aQ["[object Date]"]=aQ["[object Error]"]=aQ["[object Function]"]=aQ["[object Map]"]=aQ["[object Number]"]=aQ["[object Object]"]=aQ["[object RegExp]"]=aQ["[object Set]"]=aQ["[object String]"]=aQ["[object WeakMap]"]=!1;var a$=t&&!t.nodeType&&t,aJ=a$&&e&&!e.nodeType&&e,aX=aJ&&aJ.exports===a$&&i7.process,aY=function(){try{var e=aJ&&aJ.require&&aJ.require("util").types;if(e)return e;return aX&&aX.binding&&aX.binding("util")}catch(e){}}(),aZ=aY&&aY.isTypedArray,a0=aZ?aK(aZ):function(e){return aR(e)&&aG(e.length)&&!!aQ[ac(e)]},a1=Object.prototype.hasOwnProperty;function a2(e,t){var n=aj(e),r=!n&&aU(e),i=!n&&!r&&aq(e),a=!n&&!r&&!i&&a0(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var u in e)(t||a1.call(e,u))&&!(o&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||aH(u,c)))&&s.push(u);return s}var a4=Object.prototype;function a3(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||a4)}function a5(e,t){return function(n){return e(t(n))}}var a6=a5(Object.keys,Object),a8=Object.prototype.hasOwnProperty;function a7(e){return null!=e&&aG(e.length)&&!al(e)}function a9(e){return a7(e)?a2(e):function(e){if(!a3(e))return a6(e);var t=[];for(var n in Object(e))a8.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var oe=Object.prototype.hasOwnProperty;function ot(e){return a7(e)?a2(e,!0):function(e){if(!au(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=a3(e),n=[];for(var r in e)"constructor"==r&&(t||!oe.call(e,r))||n.push(r);return n}(e)}var on=t&&!t.nodeType&&t,or=on&&e&&!e.nodeType&&e,oi=or&&or.exports===on?ae.Buffer:void 0,oa=oi?oi.allocUnsafe:void 0;function oo(e,t){if(t)return e.slice();var n=e.length,r=oa?oa(n):new e.constructor(n);return e.copy(r),r}var os=Object.prototype.propertyIsEnumerable,oc=Object.getOwnPropertySymbols,ou=oc?function(e){return null==e?[]:function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(oc(e=Object(e)),function(t){return os.call(e,t)})}:function(){return[]},ol=a5(Object.getPrototypeOf,Object);function od(e){var t;return t=a9(e),aj(e)?t:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(t,ou(e))}var of=ab(ae,"DataView"),oh=ab(ae,"Promise"),ov=ab(ae,"Set"),op=ab(ae,"WeakMap"),og="[object Map]",oy="[object Promise]",o_="[object Set]",om="[object WeakMap]",ob="[object DataView]",ok=av(of),ox=av(ak),oS=av(oh),oC=av(ov),ow=av(op),oI=ac;(of&&oI(new of(new ArrayBuffer(1)))!=ob||ak&&oI(new ak)!=og||oh&&oI(oh.resolve())!=oy||ov&&oI(new ov)!=o_||op&&oI(new op)!=om)&&(oI=function(e){var t=ac(e),n="[object Object]"==t?e.constructor:void 0,r=n?av(n):"";if(r)switch(r){case ok:return ob;case ox:return og;case oS:return oy;case oC:return o_;case ow:return om}return t});var oE=Object.prototype.hasOwnProperty,oP=ae.Uint8Array;function oM(e){var t=new e.constructor(e.byteLength);return new oP(t).set(new oP(e)),t}var oT=/\w*$/,oA=at?at.prototype:void 0,oL=oA?oA.valueOf:void 0;function oR(e,t){var n=t?oM(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var oD=Object.create,oO=function(){function e(){}return function(t){if(!au(t))return{};if(oD)return oD(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function oW(e){return"function"!=typeof e.constructor||a3(e)?{}:oO(ol(e))}var oN=aY&&aY.isMap,oU=oN?aK(oN):function(e){return aR(e)&&"[object Map]"==oI(e)},oj=aY&&aY.isSet,oB=oj?aK(oj):function(e){return aR(e)&&"[object Set]"==oI(e)},oF="[object Arguments]",oV="[object Function]",oq="[object Object]",oz={};function oH(e){return function e(t,n,r,i,a,o){var s,c,u,l=1&n;if(void 0!==u)return u;if(!au(t))return t;var d=aj(t);if(d)s=t.length,c=new t.constructor(s),s&&"string"==typeof t[0]&&oE.call(t,"index")&&(c.index=t.index,c.input=t.input),u=c;else{var f=oI(t),h=f==oV||"[object GeneratorFunction]"==f;if(aq(t))return oo(t,l);if(f==oq||f==oF||h&&!a)u=h?{}:oW(t);else{if(!oz[f])return a?t:{};u=function(e,t,n){var r,i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return oM(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return r=oM(e.buffer),new e.constructor(r,e.byteOffset,e.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return oR(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new e.constructor(e.source,oT.exec(e))).lastIndex=e.lastIndex,i;case"[object Symbol]":return oL?Object(oL.call(e)):{}}}(t,f,l)}}o||(o=new aP);var v=o.get(t);if(v)return v;o.set(t,u),oB(t)?t.forEach(function(i){u.add(e(i,n,r,i,t,o))}):oU(t)&&t.forEach(function(i,a){u.set(a,e(i,n,r,a,t,o))});var p=d?void 0:od(t);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(p||t,function(i,a){p&&(i=t[a=i]),aL(u,a,e(i,n,r,a,t,o))}),u}(e,5)}function oG(e,t,n){(void 0===n||i3(e[t],n))&&(void 0!==n||t in e)||aT(e,t,n)}oz[oF]=oz["[object Array]"]=oz["[object ArrayBuffer]"]=oz["[object DataView]"]=o