Files
amb_wechatapp/public/assets/pc/live.ac0450bf.js
T

2 lines
41 KiB
JavaScript

import{r as $e,_ as et,e as tt}from"./index.f9a502e2.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{a as it,m as st}from"./video.635b4c2f.js";import{g as nt}from"./goods-small.533bdf96.js";import{aY as Y,x as w,y as P,B as d,aA as b,a$ as g,aT as W,b0 as G,a_ as H,b2 as q,A as at,aG as $,b1 as Ee,z as he,bO as rt,bR as lt,by as ot,bP as ct,bN as ut,bL as ft,bj as dt,bB as ht,bC as mt,bM as pt,c3 as gt,c6 as _t,c5 as yt,bW as vt,bX as wt,bY as kt,bA as bt,cd as Tt,b$ as St,bq as Et,br as Lt}from"./arco.c6cced51.js";import"./chart.e0a67bf9.js";import"./vue.6689c566.js";/* empty css */import"./mobile-jump-code.791b2397.js";import"./qrcode.vue.esm.bf2da592.js";var B=function(){var e="mqttdms.aodianyun.com",n="https://cdn.aodianyun.com/dms/";function l(){this.callback_map_={}}l.prototype.On=function(C,I){if(typeof I!="function"||typeof C!="string")throw new Error("error arguments ");var L=this.callback_map_[C];L==null&&(L=this.callback_map_[C]=new Array),L.push(I)},l.prototype.Emit=function(C,I,L){var A=this.callback_map_[C];if(A!=null)for(var D in A)try{A[D]&&A[D](I,L)}catch(T){window.console&&window.console.log("catch err at "+C+" callback",T)}},l.prototype.Off=function(C,I=""){if(typeof C!="string")throw new Error("event must be a string");const L=this.callback_map_[C];if(!!L)if(typeof I=="function"){for(let A=L.length-1;A>=0;A--)L[A]===I&&L.splice(A,1);L.length===0&&delete this.callback_map_[C]}else delete this.callback_map_[C]};var u=new l,a=[],_=function(){var C=null,I=null,L=null,A=!1,D=0,T=4,N=5,le=6,O=7,R=D,Z=5e3,ne=1e3,r=ne,f=null,Q=0,J=null;function ee(){if(f==null){if(r>Z){u.Emit("losed","");return}(R==N||R==O)&&(R=O,f=setTimeout(U,r),r+=ne)}}function oe(y,o){R==N&&(isNaN(o)&&(o=0),L.subscribe(y,{qos:o}))}function ce(y){R==N&&L.unsubscribe(y)}function U(){if(f=null,R==O&&u.Emit("reconnect"),J==null&&(console.log(J),J="ws2-"+Paho.MQTT.NewGuid()),A){var y=443;e="mqttdms.aodianyun.com"}else var y=8e3;if(L)try{L.disconnect()}catch{}L=new Paho.MQTT.Client(e,y,J),L.onConnectionLost=function(o){o.errorCode!==0&&(u.Emit("offline",o.errorMessage),ee())},L.onMessageArrived=function(o){if(o.destinationName=="__sys__")try{var M=JSON.parse(o.payloadString);if(M.cmd=="kill"){u.Emit("connectold"),u.Emit("losed"),v();return}}catch{}u.Emit("publish_data",o.payloadString,o.destinationName)};try{L.connect({timeout:10,userName:C,password:I,keepAliveInterval:60,cleanSession:!0,useSSL:A,onSuccess:function(){R=N,r=ne;for(var o=0;o<a.length;o++)oe(a[o].topic,a[o].qos);u.Emit("enter_suc")},onFailure:function(o){R==T?(console.log(o),Q++>=3?(R=le,Q=0,u.Emit("enter_fail",o.errorMessage),v()):setTimeout(U,1e3)):R==O&&(console.log(o),u.Emit("offline",o.errorMessage),ee())}})}catch(o){console.log(o),ee()}}function v(){R=D,Q=0,clearTimeout(r);try{L&&L.disconnect()}catch{}}function V(y){var o=document.createElement("script");o.type="text/javascript",o.async=!1,o.src=n+"ws.js?v=2.0.0",o.charset="UTF-8",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(o);var M=100,j=setInterval(function(){typeof Paho<"u"&&(clearInterval(j),y()),M--,M<=0&&(clearInterval(j),y("load ws fail"))},10)}return{Enter:function(y,o,M,j){R==D&&(R=T,C=y,A=!!j,I=o,I==null&&(I=y),M!=null&&(J=M),typeof Paho>"u"?V(function(F){if(F!=null){u.Emit("enter_fail",F);return}U()}):U())},Leave:v,On:function(y,o){u.On(y,o)},Off:function(y,o){u.Off(y,o)},Publish:function(y,o,M,j){if(R==N){var F=new Paho.MQTT.Message(y);F.destinationName=o,isNaN(Number(M))?F.qos=0:F.qos=Number(M),F.retained=Boolean(j),L.send(F)}},Subscribe:function(y,o){if(y=y.toString(),o=Number(o),o==null&&(o=0),isNaN(o)&&(o=0),o>2&&(o=2),o<0&&(o=0),!(!y||y.length==0)){for(var M=0;M<a.length;M++)if(a[M].topic==y)return;a.push({topic:y,qos:o}),oe(y,o)}},UnSubscribe:function(y){if(y=y.toString(),!(!y||y.length==0)){for(var o=0;o<a.length;o++)if(a[o].topic==y){a.splice(o,1),ce(y);return}}}}},pe=function(){var C=function(){var r="undefined",f="object",Q="Shockwave Flash",J="ShockwaveFlash.ShockwaveFlash",ee="application/x-shockwave-flash",oe="SWFObjectExprInst",ce="onreadystatechange",U=window,v=document,V=navigator,y=!1,o=[],M=[],j=[],F=[],ue,ge,we,k,K=!1,_e=!1,ae,Le,Re=!0,Ce=!1,p=function(){var t=typeof v.getElementById!=r&&typeof v.getElementsByTagName!=r&&typeof v.createElement!=r,i=V.userAgent.toLowerCase(),s=V.platform.toLowerCase(),c=s?/win/.test(s):/win/.test(i),m=s?/mac/.test(s):/mac/.test(i),h=/webkit/.test(i)?parseFloat(i.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,S=V.appName==="Microsoft Internet Explorer",x=[0,0,0],E=null;if(typeof V.plugins!=r&&typeof V.plugins[Q]==f)E=V.plugins[Q].description,E&&typeof V.mimeTypes!=r&&V.mimeTypes[ee]&&V.mimeTypes[ee].enabledPlugin&&(y=!0,S=!1,E=E.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),x[0]=z(E.replace(/^(.*)\..*$/,"$1")),x[1]=z(E.replace(/^.*\.(.*)\s.*$/,"$1")),x[2]=/[a-zA-Z]/.test(E)?z(E.replace(/^.*[a-zA-Z]+(.*)$/,"$1")):0);else if(typeof U.ActiveXObject!=r)try{var ie=new ActiveXObject(J);ie&&(E=ie.GetVariable("$version"),E&&(S=!0,E=E.split(" ")[1].split(","),x=[z(E[0]),z(E[1]),z(E[2])]))}catch{}return{w3:t,pv:x,wk:h,ie:S,win:c,mac:m}}();(function(){!p.w3||((typeof v.readyState!=r&&(v.readyState==="complete"||v.readyState==="interactive")||typeof v.readyState==r&&(v.getElementsByTagName("body")[0]||v.body))&&ke(),K||(typeof v.addEventListener!=r&&v.addEventListener("DOMContentLoaded",ke,!1),p.ie&&(v.attachEvent(ce,function t(){v.readyState=="complete"&&(v.detachEvent(ce,t),ke())}),U==top&&function t(){if(!K){try{v.documentElement.doScroll("left")}catch{setTimeout(t,0);return}ke()}}()),p.wk&&function t(){if(!K){if(!/loaded|complete/.test(v.readyState)){setTimeout(t,0);return}ke()}}()))})();function ke(){if(!(K||!document.getElementsByTagName("body")[0])){try{var t,i=te("span");i.style.display="none",t=v.getElementsByTagName("body")[0].appendChild(i),t.parentNode.removeChild(t),t=null,i=null}catch{return}K=!0;for(var s=o.length,c=0;c<s;c++)o[c]()}}function Ue(t){K?t():o[o.length]=t}function He(t){if(typeof U.addEventListener!=r)U.addEventListener("load",t,!1);else if(typeof v.addEventListener!=r)v.addEventListener("load",t,!1);else if(typeof U.attachEvent!=r)Ze(U,"onload",t);else if(typeof U.onload=="function"){var i=U.onload;U.onload=function(){i(),t()}}else U.onload=t}function Je(){var t=v.getElementsByTagName("body")[0],i=te(f);i.setAttribute("style","visibility: hidden;"),i.setAttribute("type",ee);var s=t.appendChild(i);if(s){var c=0;(function m(){if(typeof s.GetVariable!=r)try{var h=s.GetVariable("$version");h&&(h=h.split(" ")[1].split(","),p.pv=[z(h[0]),z(h[1]),z(h[2])])}catch{p.pv=[8,0,0]}else if(c<10){c++,setTimeout(m,10);return}t.removeChild(i),s=null,Me()})()}else Me()}function Me(){var t=M.length;if(t>0)for(var i=0;i<t;i++){var s=M[i].id,c=M[i].callbackFn,m={success:!1,id:s};if(p.pv[0]>0){var h=fe(s);if(h)if(Se(M[i].swfVersion)&&!(p.wk&&p.wk<312))de(s,!0),c&&(m.success=!0,m.ref=Oe(s),m.id=s,c(m));else if(M[i].expressInstall&&Pe()){var S={};S.data=M[i].expressInstall,S.width=h.getAttribute("width")||"0",S.height=h.getAttribute("height")||"0",h.getAttribute("class")&&(S.styleclass=h.getAttribute("class")),h.getAttribute("align")&&(S.align=h.getAttribute("align"));for(var x={},E=h.getElementsByTagName("param"),ie=E.length,X=0;X<ie;X++)E[X].getAttribute("name").toLowerCase()!="movie"&&(x[E[X].getAttribute("name")]=E[X].getAttribute("value"));xe(S,x,s,c)}else Ke(h),c&&c(m)}else if(de(s,!0),c){var se=Oe(s);se&&typeof se.SetVariable!=r&&(m.success=!0,m.ref=se,m.id=se.id),c(m)}}}o[0]=function(){y?Je():Me()};function Oe(t){var i=null,s=fe(t);return s&&s.nodeName.toUpperCase()==="OBJECT"&&(typeof s.SetVariable!==r?i=s:i=s.getElementsByTagName(f)[0]||s),i}function Pe(){return!_e&&Se("6.0.65")&&(p.win||p.mac)&&!(p.wk&&p.wk<312)}function xe(t,i,s,c){var m=fe(s);if(s=Ne(s),_e=!0,we=c||null,k={success:!1,id:s},m){m.nodeName.toUpperCase()=="OBJECT"?(ue=Ie(m),ge=null):(ue=m,ge=s),t.id=oe,(typeof t.width==r||!/%$/.test(t.width)&&z(t.width)<310)&&(t.width="310"),(typeof t.height==r||!/%$/.test(t.height)&&z(t.height)<137)&&(t.height="137");var h=p.ie?"ActiveX":"PlugIn",S="MMredirectURL="+encodeURIComponent(U.location.toString().replace(/&/g,"%26"))+"&MMplayerType="+h+"&MMdoctitle="+encodeURIComponent(v.title.slice(0,47)+" - Flash Player Installation");if(typeof i.flashvars!=r?i.flashvars+="&"+S:i.flashvars=S,p.ie&&m.readyState!=4){var x=te("div");s+="SWFObjectNew",x.setAttribute("id",s),m.parentNode.insertBefore(x,m),m.style.display="none",Te(m)}Ae(t,i,s)}}function Ke(t){if(p.ie&&t.readyState!=4){t.style.display="none";var i=te("div");t.parentNode.insertBefore(i,t),i.parentNode.replaceChild(Ie(t),i),Te(t)}else t.parentNode.replaceChild(Ie(t),t)}function Ie(t){var i=te("div");if(p.win&&p.ie)i.innerHTML=t.innerHTML;else{var s=t.getElementsByTagName(f)[0];if(s){var c=s.childNodes;if(c)for(var m=c.length,h=0;h<m;h++)!(c[h].nodeType==1&&c[h].nodeName=="PARAM")&&c[h].nodeType!=8&&i.appendChild(c[h].cloneNode(!0))}}return i}function Xe(t,i){var s=te("div");return s.innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'><param name='movie' value='"+t+"'>"+i+"</object>",s.firstChild}function Ae(t,i,s){var c,m=fe(s);if(s=Ne(s),p.wk&&p.wk<312)return c;if(m){var h=p.ie?te("div"):te(f),S,x,E;typeof t.id==r&&(t.id=s);for(E in i)i.hasOwnProperty(E)&&E.toLowerCase()!=="movie"&&Ye(h,E,i[E]);p.ie&&(h=Xe(t.data,h.innerHTML));for(S in t)t.hasOwnProperty(S)&&(x=S.toLowerCase(),x==="styleclass"?h.setAttribute("class",t[S]):x!=="classid"&&x!=="data"&&h.setAttribute(S,t[S]));p.ie?j[j.length]=t.id:(h.setAttribute("type",ee),h.setAttribute("data",t.data)),m.parentNode.replaceChild(h,m),c=h}return c}function Ye(t,i,s){var c=te("param");c.setAttribute("name",i),c.setAttribute("value",s),t.appendChild(c)}function Te(t){var i=fe(t);i&&i.nodeName.toUpperCase()=="OBJECT"&&(p.ie?(i.style.display="none",function s(){if(i.readyState==4){for(var c in i)typeof i[c]=="function"&&(i[c]=null);i.parentNode.removeChild(i)}else setTimeout(s,10)}()):i.parentNode.removeChild(i))}function Be(t){return t&&t.nodeType&&t.nodeType===1}function Ne(t){return Be(t)?t.id:t}function fe(t){if(Be(t))return t;var i=null;try{i=v.getElementById(t)}catch{}return i}function te(t){return v.createElement(t)}function z(t){return parseInt(t,10)}function Ze(t,i,s){t.attachEvent(i,s),F[F.length]=[t,i,s]}function Se(t){t+="";var i=p.pv,s=t.split(".");return s[0]=z(s[0]),s[1]=z(s[1])||0,s[2]=z(s[2])||0,i[0]>s[0]||i[0]==s[0]&&i[1]>s[1]||i[0]==s[0]&&i[1]==s[1]&&i[2]>=s[2]}function Qe(t,i,s,c){var m=v.getElementsByTagName("head")[0];if(!!m){var h=typeof s=="string"?s:"screen";if(c&&(ae=null,Le=null),!ae||Le!=h){var S=te("style");S.setAttribute("type","text/css"),S.setAttribute("media",h),ae=m.appendChild(S),p.ie&&typeof v.styleSheets!=r&&v.styleSheets.length>0&&(ae=v.styleSheets[v.styleSheets.length-1]),Le=h}ae&&(typeof ae.addRule!=r?ae.addRule(t,i):typeof v.createTextNode!=r&&ae.appendChild(v.createTextNode(t+" {"+i+"}")))}}function de(t,i){if(!!Re){var s=i?"visible":"hidden",c=fe(t);K&&c?c.style.visibility=s:typeof t=="string"&&Qe("#"+t,"visibility:"+s)}}function Fe(t){var i=/[\\\"<>\.;]/,s=i.exec(t)!=null;return s&&typeof encodeURIComponent!=r?encodeURIComponent(t):t}return function(){p.ie&&window.attachEvent("onunload",function(){for(var t=F.length,i=0;i<t;i++)F[i][0].detachEvent(F[i][1],F[i][2]);for(var s=j.length,c=0;c<s;c++)Te(j[c]);for(var m in p)p[m]=null;p=null;for(var h in C)C[h]=null;C=null})}(),{registerObject:function(t,i,s,c){if(p.w3&&t&&i){var m={};m.id=t,m.swfVersion=i,m.expressInstall=s,m.callbackFn=c,M[M.length]=m,de(t,!1)}else c&&c({success:!1,id:t})},getObjectById:function(t){if(p.w3)return Oe(t)},embedSWF:function(t,i,s,c,m,h,S,x,E,ie){var X=Ne(i),se={success:!1,id:X};p.w3&&!(p.wk&&p.wk<312)&&t&&i&&s&&c&&m?(de(X,!1),Ue(function(){s+="",c+="";var re={};if(E&&typeof E===f)for(var Ve in E)re[Ve]=E[Ve];re.data=t,re.width=s,re.height=c;var ye={};if(x&&typeof x===f)for(var je in x)ye[je]=x[je];if(S&&typeof S===f){for(var be in S)if(S.hasOwnProperty(be)){var qe=Ce?encodeURIComponent(be):be,ze=Ce?encodeURIComponent(S[be]):S[be];typeof ye.flashvars!=r?ye.flashvars+="&"+qe+"="+ze:ye.flashvars=qe+"="+ze}}if(Se(m)){var We=Ae(re,ye,i);re.id==X&&de(X,!0),se.success=!0,se.ref=We,se.id=We.id}else if(h&&Pe()){re.data=h,xe(re,ye,i,ie);return}else de(X,!0);ie&&ie(se)})):ie&&ie(se)},switchOffAutoHideShow:function(){Re=!1},enableUriEncoding:function(t){Ce=typeof t===r?!0:t},ua:p,getFlashPlayerVersion:function(){return{major:p.pv[0],minor:p.pv[1],release:p.pv[2]}},hasFlashPlayerVersion:Se,createSWF:function(t,i,s){if(p.w3)return Ae(t,i,s)},showExpressInstall:function(t,i,s,c){p.w3&&Pe()&&xe(t,i,s,c)},removeSWF:function(t){p.w3&&Te(t)},createCSS:function(t,i,s,c){p.w3&&Qe(t,i,s,c)},addDomLoadEvent:Ue,addLoadEvent:He,getQueryParamValue:function(t){var i=v.location.search||v.location.hash;if(i){if(/\?/.test(i)&&(i=i.split("?")[1]),t==null)return Fe(i);for(var s=i.split("&"),c=0;c<s.length;c++)if(s[c].substring(0,s[c].indexOf("="))==t)return Fe(s[c].substring(s[c].indexOf("=")+1))}return""},expressInstallCallback:function(){if(_e){var t=fe(oe);t&&ue&&(t.parentNode.replaceChild(ue,t),ge&&(de(ge,!0),p.ie&&(ue.style.display="block")),we&&we(k)),_e=!1}},version:"2.3"}}(),I=!1,L=function(r){if(C.getObjectById("ROP_client")!=null){r({success:!0});return}if(!document.getElementById("rop_context")){var f=document.createElement("div");f.id="rop_context",document.getElementsByTagName("body")[0].appendChild(f)}C.embedSWF(n+"ROPClient.swf","rop_context","0","0","11.0.0","playerProductInstall.swf",{id:"ROP_client"},{AllowScriptAccess:"always",wmode:"Transparent"},{id:"ROP_client",name:"ROP_client"},r)},A=!0,D=!0,T=null,N=null,le="",O=null,R=0,Z=!1;window.ROP_OnPublish=function(r,f){u.Emit("publish_data",r,f)},window.ROP_EnterFail=function(r){u.Emit("enter_fail",r)},window.ROP_EnterSuc=function(){for(var r=0;r<a.length;r++)Z&&O&&O.flash_Subscribe(a[r].topic,a[r].qos);u.Emit("enter_suc")},window.ROP_SwfReady=function(){D=!0},window.ROP_Offline=function(){u.Emit("offline")},window.ROP_Reconnecting=function(){u.Emit("reconnect")},window.ROP_PageReady=function(){return A},window.ROP_Losed=function(){u.Emit("losed")},window.ROP_ConnectOld=function(){u.Emit("connectold")};function ne(){if(R++>500){u.Emit("enter_fail","flash load fail");return}O=C.getObjectById("ROP_client"),O&&O.flash_Init&&D?(Z=!0,O.flash_Init(e,1883),(T==""||T==null)&&(T="----"),O.flash_Enter(T,N,le)):setTimeout(ne,10)}return{Enter:function(r,f,Q){T=r,N=f,f==null&&(N=r),Q!=null&&(le=Q),I?Z&&O&&O.flash_Enter(T,N,le):(I=!0,L(function(J){J.success?ne():u.Emit("enter_fail","flash_init_fail")}))},Leave:function(){Z&&O&&O.flash_Leave()},On:function(r,f){u.On(r,f)},Off:function(r,f){u.Off(r,f)},Publish:function(r,f,Q,J){Z&&O&&O.flash_Publish(r,f,Q,J)},Subscribe:function(r,f){if(f=Number(f),f==null&&(f=0),isNaN(f)&&(f=0),f>2&&(f=2),f<0&&(f=0),r=r.toString(),!(!r||r.length==0)){for(var Q=0;Q<a.length;Q++)if(a[Q].topic==r)return;a.push({topic:r,qos:f}),Z&&O&&O.flash_Subscribe(r,f)}},UnSubscribe:function(r){if(r=r.toString(),!(!r||r.length==0)){for(var f=0;f<a.length;f++)if(a[f].topic==r){a.splice(f,1),Z&&O&&O.flash_UnSubscribe(r);return}}}}};return window.WebSocket?_():pe()}();function Ge(e){return $e.post("api/live/Message/getAliyunAuth",{course_id:e})}const Ct="/assets/pc/start.5fb02fa2.png",De="/assets/pc/file.9d157ef5.png",Mt="/assets/pc/gift.2e56a392.png";const Ot="https://g.alicdn.com/apsara-media-box/imp-interaction/1.9.0/alivc-im.iife.js";let ve=null;const Pt={components:{mediaVideo:it,goodsSmall:nt,mobileJumpPopover:st},data(){return{panelTab:"talk",pageParams:{},data:{},roomData:{config:{},push_url:{},live_room:{}},isLive:!0,loading:!1,coursewareLoading:!1,userinfo:{},coursewareList:[],playBackList:[],interactionList:[],linkTalk:{status:"offline",tipText:"\u6B63\u5728\u8FDE\u63A5"},msg:"",messageList:[],messageForm:{page:1,limit:10},videoUrl:"",isMessageLoad:!1,currentQuality:null,userSelectedQuality:!1,bufferingTimer:null,bufferingStartTime:0,lastPromptTime:0,onlineUserNum:0,onlineUserTimer:null,aliyyun:{engine:null,groupManager:null,messageManager:null,authData:null,sdkLoaded:!1}}},beforeUnmount(){this.destroyMessageService(),this.clearBufferingTimer(),this.stopOnlineUserPolling()},props:{},computed:{isMessageEnabled(){var e=this.roomData&&this.roomData.message_enabled;return e==null?!0:e!==0&&e!=="0"&&e!==!1},showVideoPlayer(){return!!(this.roomData.status=="online"||this.roomData.status=="run_playback"&&this.videoUrl)},showViewerCount(){return this.roomData.config&&this.roomData.config.views==1&&this.roomData.message_enabled==1},isVideoUrlLive(){if(this.roomData.status=="run_playback")return!1;if(this.videoUrl){var e=String(this.videoUrl).toLowerCase().split("?")[0];if(e.endsWith(".mp4"))return!1}return!0},showQualitySwitch(){return this.roomData.qualities&&this.roomData.qualities.length>=2&&this.roomData.status==="online"},sortedQualities(){return!this.roomData.qualities||this.roomData.qualities.length===0?[]:[...this.roomData.qualities].sort((e,n)=>n.level-e.level)},qualityOptions(){var n;return this.sortedQualities.length>0?this.sortedQualities.map(l=>{var u;return{name:l.name,level:l.level,template_id:l.template_id,url:(u=l.url)==null?void 0:u.hls,isOriginal:!1}}):[{name:"\u539F\u753B",level:1/0,template_id:"",url:(n=this.roomData.push_url)==null?void 0:n.hls,isOriginal:!0}]},currentQualityName(){return this.currentQuality?this.currentQuality.name:this.showQualitySwitch&&this.sortedQualities.length>0?this.sortedQualities[0].name:"\u539F\u753B"},currentQualityUrl(){var e;return this.currentQuality?this.currentQuality.url:((e=this.roomData.push_url)==null?void 0:e.hls)||this.videoUrl}},mounted(){this.pageParams=this.$route.params,this.getData()},methods:{changeTab(e){this.panelTab=e},refresh(){this.getData()},onM3u8Retry(){},handleQualitySelect(e){if(!(!e||!e.url||e.url===this.currentQualityUrl)){if(this.userSelectedQuality=!0,this.currentQuality=e.isOriginal?null:e,this.videoUrl=e.url,this.currentQuality&&this.currentQuality.template_id)try{localStorage.setItem("live_quality_"+this.pageParams.id,this.currentQuality.template_id)}catch{}this.clearBufferingTimer(),this.$message.success("\u6E05\u6670\u5EA6\u5207\u6362\u6210\u529F")}},onPlayerWaiting(){if(!this.showQualitySwitch)return;const e=Math.min(...this.roomData.qualities.map(l=>l.level));(this.currentQuality?this.currentQuality.level:1/0)<=e||(this.bufferingStartTime||(this.bufferingStartTime=Date.now()),this.bufferingTimer&&clearTimeout(this.bufferingTimer),this.bufferingTimer=setTimeout(()=>{this.promptSwitchQuality(),this.clearBufferingTimer()},5e3))},onPlayerPlaying(){this.clearBufferingTimer()},clearBufferingTimer(){this.bufferingTimer&&(clearTimeout(this.bufferingTimer),this.bufferingTimer=null),this.bufferingStartTime=0},promptSwitchQuality(){if(!this.showQualitySwitch)return;const e=Date.now();if(e-this.lastPromptTime<6e4)return;this.lastPromptTime=e;const n=this.currentQuality?this.currentQuality.level:1/0;this.qualityOptions.some(u=>!u.isOriginal&&u.level<n)&&this.$message.info("\u5F53\u524D\u7F51\u7EDC\u4E0D\u4F73\uFF0C\u5EFA\u8BAE\u5207\u6362\u8F83\u4F4E\u6E05\u6670\u5EA6")},getData(){this.loading=!0,this.$request.post("api/course/course/detail",{id:this.pageParams.id}).then(e=>{this.data=e.data,this.getUserInfo(),this.getRoomDetail(),this.getCoursewareList(),this.getColumnCourse(),this.loading=!1}).catch(e=>{this.loading=!1,this.$message.warning(e.msg)})},initDefaultQuality(e){var pe,C,I,L,A,D;const n=e.qualities||[];if(n.length===0){this.currentQuality=null,this.videoUrl=((pe=e.push_url)==null?void 0:pe.hls)||"";return}const l=[...n].sort((T,N)=>N.level-T.level);if(this.currentQuality){const T=l.find(N=>N.template_id==this.currentQuality.template_id);if(T&&((C=T.url)==null?void 0:C.hls)){this.currentQuality={name:T.name,level:T.level,template_id:T.template_id,url:T.url.hls},this.videoUrl=T.url.hls;return}}const u="live_quality_"+this.pageParams.id;let a="";try{a=localStorage.getItem(u)||""}catch{}if(a){const T=l.find(N=>N.template_id==a);if(T&&((I=T.url)==null?void 0:I.hls)){this.currentQuality={name:T.name,level:T.level,template_id:T.template_id,url:T.url.hls},this.videoUrl=T.url.hls;return}}const _=l[0];this.currentQuality={name:_.name,level:_.level,template_id:_.template_id,url:(L=_.url)==null?void 0:L.hls},this.videoUrl=((A=_.url)==null?void 0:A.hls)||((D=e.push_url)==null?void 0:D.hls)||""},getRoomDetail(){this.loading=!0,this.$request.post("api/live/room/getRoomDetail",{course_id:this.pageParams.id}).then(e=>{this.roomData=e.data,this.initDefaultQuality(e.data),this.clearBufferingTimer(),this.getPlayBack(),this.isMessageEnabled&&(this.linkMessage(),this.loadmoreMessage()),this.showViewerCount?this.startOnlineUserPolling():this.stopOnlineUserPolling()}).catch(e=>{this.loading=!1,this.$message.warning(e.msg)})},startOnlineUserPolling(){this.stopOnlineUserPolling(),this.fetchOnlineUserNum(),this.onlineUserTimer=setInterval(()=>{this.fetchOnlineUserNum()},15e3)},stopOnlineUserPolling(){this.onlineUserTimer&&(clearInterval(this.onlineUserTimer),this.onlineUserTimer=null)},fetchOnlineUserNum(){this.$request.post("api/live/room/getOnlineUserNum",{course_id:this.pageParams.id}).then(e=>{e&&e.code==1&&(this.onlineUserNum=e.data||0)}).catch(()=>{})},getCoursewareList(){this.coursewareLoading=!0,this.$request.post("api/live/courseware/getCoursewareList",{course_id:this.pageParams.id}).then(e=>{this.coursewareList=e.data,this.coursewareLoading=!1}).catch(e=>{this.coursewareLoading=!1,this.$message.warning(e.msg)})},download(e){if(!e.fullurl)return this.$message.warning("\u8D2D\u4E70\u8BFE\u7A0B\u540E\u53EF\u4E0B\u8F7D"),!1;window.open(e.fullurl)},getPlayBack(){this.$request.post("api/live/room/getPlaybackList",{course_id:this.pageParams.id}).then(e=>{this.playBackList=e.data,this.roomData.status=="run_playback"&&this.playBackList.length>0&&this.playback(e.data[0].file_path)}).catch(e=>{this.loading=!1,this.$message.warning(e.msg)})},playback(e){this.videoUrl=e,this.isLive=!1},getColumnCourse(){this.loading=!0,this.$request.post("api/app/exam/exercises/getCourseBindExam",{course_id:this.pageParams.id}).then(e=>{this.interactionList=e.data}).catch(e=>{this.loading=!1,this.$message.warning(e.msg)})},reLink(){this.linkTalk.status="relink",this.linkTalk.tipText="\u91CD\u65B0\u8FDE\u63A5\u4E2D\u2026",this.linkMessage()},currentMessageProvider(){return this.roomData.message_provider==="aliyun"?"aliyun":"aodianyun"},linkMessage(){if(this.currentMessageProvider()==="aliyun"){this.linkAliyunMessage();return}this.linkAodianyunMessage()},linkAodianyunMessage(){var e=this;B.Leave();let n=tt();if(location.protocol==="https:")var l=!0;else var l=!1;B.Enter(e.roomData.message_pubkey,e.roomData.message_subkey,n,l),B.Subscribe(e.roomData.message_topic),B.Off("publish_data"),B.Off("losed"),B.Off("enter_fail"),B.Off("reconnect"),B.Off("offline"),B.Off("connectold"),B.Off("enter_suc"),B.On("publish_data",function(u,a){e.receive(u,a)}),B.On("losed",function(){e.linkTalk.status="losed",e.linkTalk.tipText="\u4E0E\u901A\u4FE1\u670D\u52A1\u5668\u65AD\u5F00\u8FDE\u63A5"}),B.On("enter_fail",function(u){e.linkTalk.status="fail",e.linkTalk.tipText="\u4E0E\u901A\u4FE1\u670D\u52A1\u5668\u8FDE\u63A5\u5931\u8D25"}),B.On("reconnect",function(){e.linkTalk.status="reconnect",e.linkTalk.tipText="\u6B63\u5728\u91CD\u65B0\u8FDE\u63A5\u901A\u4FE1\u670D\u52A1\u5668"}),B.On("offline",function(u){e.linkTalk.status="offline",e.linkTalk.tipText="\u5F53\u524D\u901A\u4FE1\u670D\u52A1\u5DF2\u79BB\u7EBF"}),B.On("connectold",function(u){e.linkTalk.status="connectold",e.linkTalk.tipText="\u8D26\u6237\u5728\u522B\u5904\u767B\u5F55"}),B.On("enter_suc",function(){e.linkTalk.status="success",e.linkTalk.tipText="\u8FDE\u63A5\u901A\u4FE1\u670D\u52A1\u5668\u6210\u529F"})},async linkAliyunMessage(){try{await this.loadAliyunImSdk();const e=await Ge(this.pageParams.id);if(!e||e.code!==1){this.linkTalk.status="fail",this.linkTalk.tipText="\u83B7\u53D6\u6D88\u606F\u670D\u52A1\u9274\u6743\u5931\u8D25",this.$message.warning(e&&e.msg||"\u83B7\u53D6\u6D88\u606F\u670D\u52A1\u9274\u6743\u5931\u8D25");return}const n=e.data;this.aliyyun.authData=n;const{ImEngine:l,ImLogLevel:u}=window.AliVCInteraction,a=l.createEngine();this.aliyyun.engine=a,await a.init({appId:n.app_id,appSign:n.app_sign,logLevel:u.ERROR}),this.bindAliyunEngineEvents(a),await a.login({user:{userId:n.auth.user_id,userExtension:JSON.stringify({nickname:this.userinfo.nickname||"",avatar:this.userinfo.avatar||""})},userAuth:{timestamp:n.auth.timestamp,nonce:n.auth.nonce,role:n.auth.role,token:n.app_token}}),this.aliyyun.groupManager=a.getGroupManager(),this.aliyyun.messageManager=a.getMessageManager();const _=this.roomData.message_topic;await this.aliyyun.groupManager.joinGroup(_),this.bindAliyunMessageEvents(),this.linkTalk.status="success",this.linkTalk.tipText="\u8FDE\u63A5\u6D88\u606F\u670D\u52A1\u6210\u529F"}catch(e){console.error("\u963F\u91CC\u4E91\u6D88\u606F\u670D\u52A1\u8FDE\u63A5\u5931\u8D25",e),this.linkTalk.status="fail",this.linkTalk.tipText="\u6D88\u606F\u670D\u52A1\u8FDE\u63A5\u5931\u8D25",this.$message.warning("\u6D88\u606F\u670D\u52A1\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")}},loadAliyunImSdk(){return window.AliVCInteraction?(this.aliyyun.sdkLoaded=!0,Promise.resolve()):ve||(ve=new Promise((e,n)=>{const l=document.createElement("script");l.src=Ot,l.async=!0,l.charset="UTF-8",l.onload=()=>{window.AliVCInteraction?(this.aliyyun.sdkLoaded=!0,e()):(ve=null,n(new Error("\u963F\u91CC\u4E91 SDK \u52A0\u8F7D\u5B8C\u6210\u4F46\u672A\u627E\u5230\u5168\u5C40\u5BF9\u8C61")))},l.onerror=()=>{ve=null,n(new Error("\u963F\u91CC\u4E91 SDK \u52A0\u8F7D\u5931\u8D25"))},document.getElementsByTagName("head")[0].appendChild(l)}),ve)},bindAliyunEngineEvents(e){const n=this;e.on("connectsuccess",()=>{console.log("[alivc-im] connect success")}),e.on("connectfailed",l=>{console.warn("[alivc-im] connect failed",l),n.linkTalk.status="fail",n.linkTalk.tipText="\u4E0E\u6D88\u606F\u670D\u52A1\u5668\u8FDE\u63A5\u5931\u8D25"}),e.on("disconnect",l=>{console.warn("[alivc-im] disconnect",l),l===4?(n.linkTalk.status="connectold",n.linkTalk.tipText="\u8D26\u6237\u5728\u522B\u5904\u767B\u5F55"):(n.linkTalk.status="losed",n.linkTalk.tipText="\u4E0E\u6D88\u606F\u670D\u52A1\u5668\u65AD\u5F00\u8FDE\u63A5")}),e.on("tokenexpired",async l=>{console.log("[alivc-im] token expired, refreshing");try{const u=await Ge(n.pageParams.id);if(!u||u.code!==1){l(new Error("\u5237\u65B0\u9274\u6743\u5931\u8D25"));return}const a=u.data;n.aliyyun.authData=a,l(null,{timestamp:a.auth.timestamp,nonce:a.auth.nonce,role:a.auth.role,token:a.app_token})}catch(u){l(u)}})},bindAliyunMessageEvents(){const e=this,n=this.aliyyun.messageManager;!n||(n.on("recvgroupmessage",(l,u)=>{e.receiveAliyunMessage(l,u)}),n.on("deletegroupmessage",(l,u)=>{e.removeAliyunMessage(l,u)}))},receiveAliyunMessage(e,n){if(!e||n!==this.roomData.message_topic)return;let l;try{l=typeof e.data=="string"?JSON.parse(e.data):e.data}catch(a){console.warn("[alivc-im] \u89E3\u6790\u6D88\u606F\u5931\u8D25",a,e);return}if(!!l&&(l.uniqueId=this.generateMessageId(l),!this.isMessageDuplicate(l.uniqueId)&&(l.is_my=l.user_id==this.userinfo.id,this.messageList.push(l),this.$refs.messageRef))){var u=this;setTimeout(function(){u.$refs.messageRef.scrollTop(9999999)},100)}},removeAliyunMessage(e,n){n===this.roomData.message_topic&&(this.messageList=this.messageList.filter(l=>l.msg_tid!==e&&l.message_id!==e))},destroyMessageService(){if(this.currentMessageProvider()==="aliyun")this.destroyAliyunMessageService();else try{B.Leave()}catch{}},async destroyAliyunMessageService(){try{const e=this.aliyyun.groupManager,n=this.aliyyun.messageManager;n&&n.removeAllListeners&&n.removeAllListeners(),e&&e.removeAllListeners&&e.removeAllListeners(),this.roomData.message_topic&&e&&e.leaveGroup&&await e.leaveGroup(this.roomData.message_topic),this.aliyyun.engine&&(this.aliyyun.engine.isLogin&&this.aliyyun.engine.isLogin()&&await this.aliyyun.engine.logout(),this.aliyyun.engine.unInit())}catch(e){console.warn("[alivc-im] \u9500\u6BC1\u6D88\u606F\u670D\u52A1\u5F02\u5E38",e)}finally{this.aliyyun.engine=null,this.aliyyun.groupManager=null,this.aliyyun.messageManager=null,this.aliyyun.authData=null}},getUserInfo(){this.loading=!0,this.$request.post("api/user/info/index",{}).then(e=>{this.userinfo=e.data,this.loading=!1}).catch(e=>{this.loading=!1,this.$message.warning(e.msg)})},receive(e,n){var l=this;if(n==l.roomData.message_topic){var u=this.messageList,e=JSON.parse(e);if(e.uniqueId=this.generateMessageId(e),this.isMessageDuplicate(e.uniqueId))return;e.user_id==l.userinfo.id?e.is_my=!0:e.is_my=!1,u.push(e),l.messageList=u,l.$refs.messageRef&&setTimeout(function(){l.$refs.messageRef.scrollTop(9999999)},100)}},send(){if(!this.isMessageEnabled)return this.$message.warning("\u6682\u672A\u5F00\u542F\u6D88\u606F\u670D\u52A1"),!1;if(!this.msg)return this.$message.warning("\u8BF7\u5148\u8F93\u5165\u6D88\u606F"),!1;this.$request.post("api/live/message/send",{course_id:this.pageParams.id,message:this.msg}).then(e=>{this.msg=""}).catch(e=>{this.$message.warning(e.msg)})},messageScroll(e){e.srcElement.scrollTop==0&&this.loadmoreMessage()},async loadmoreMessage(){if(this.isMessageLoad)return!1;if(this.isMessageLoad=!0,this.messageForm.page>1){var e=document.getElementById("msg-container").getBoundingClientRect();await this.getMessage(),await this.$nextTick();var n=document.getElementById("msg-container").getBoundingClientRect()}else await this.getMessage();this.$refs.messageRef&&(this.messageForm.page==2||this.messageForm.page==1?this.$refs.messageRef.scrollTop(9999999):this.$refs.messageRef.scrollTop(n.height-e.height+Math.random()))},async getMessage(){var e=this;e.messageForm.course_id=this.pageParams.id,await this.$request.post("api/live/message/getMessageList",e.messageForm).then(n=>{for(var l in n.data)e.messageList.unshift(n.data[l]);e.messageForm.page==1&&e.notice&&e.messageList.push({is_my:!1,avatar:"",message:e.notice,nickname:"\u516C\u544A",type:"text",time:Date.now()/1e3}),n.data.length>=e.messageForm.limit&&(e.messageForm.page++,e.isMessageLoad=!1)}).catch(n=>{e.isMessageLoad=!1,this.$message.warning(n.msg)})},customRequest(e){return this.$request.upload(e)},handleUploadOk(e){this.msg="",e.response.code==1?this.$request.post("api/live/message/send",{course_id:this.pageParams.id,message:e.response.data.full_url,type:"image"}).then(n=>{}).catch(n=>{this.$message.warning(n.msg)}):this.$message.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u91CD\u8BD5")},generateMessageId(e){const n=new Date().getTime(),l=Math.floor(Math.random()*1e4),u=this.hashCode(JSON.stringify(e));return e.message_id?`msg_${e.message_id}`:`gen_${u}_${n}_${l}`},hashCode(e){let n=0;for(let l=0;l<e.length;l++){const u=e.charCodeAt(l);n=(n<<5)-n+u,n=n&n}return n},isMessageDuplicate(e){return this.messageList.some(n=>n.uniqueId===e)}},watch:{}},me=e=>(Et("data-v-15e31bd6"),e=e(),Lt(),e),xt={class:"live-box"},It={class:"inner-container",style:{height:"100vh"}},At={class:"pv"},Nt={style:{color:"var(--color-bg-white)","font-size":"12px"}},Dt={class:"content row",style:{height:"100vh"}},Rt={class:"video-ppt-wrapper"},Ut={key:0,class:"quality-switch-wrap"},Bt={key:1,class:"live-status-cover"},Qt=["src"],Ft={class:"live-status-mask"},Vt={class:"live-status-content"},jt={class:"live-status-text"},qt={class:"interaction totalHeight row"},zt={class:"interaction-tab"},Wt={class:"content-container"},Gt={key:0,class:"scroll-wrapper"},Ht={key:0,class:"file-empty"},Jt=me(()=>d("img",{src:Ct},null,-1)),Kt={class:"text-tip1"},Xt={class:"msg-part-container",id:"msg-container"},Yt={class:"msg-part"},Zt={class:"text-msg-wrapper"},$t={class:"content-msg-wrapper"},ei={class:"msg-wrapper"},ti=["src"],ii={class:"nickname single-row-dot"},si={class:"name-render-wrap"},ni={class:"time aliveDataTime"},ai={key:0,class:"gift-pop"},ri={key:1,class:"talkReplyWrapper talkReplyContent"},li={class:"msg_content"},oi={class:"src-msg-img"},ci={key:1,class:"picture"},ui={key:2,class:"error"},fi={class:"course-file",style:{height:"100%"}},di={key:1,class:"file-empty"},hi=me(()=>d("img",{src:De},null,-1)),mi=me(()=>d("div",{class:"text-tip1"},"\u6682\u65E0\u4E92\u52A8\u8BFE\u7A0B",-1)),pi=[hi,mi],gi={class:"course-file",style:{height:"100%"}},_i={class:"arco-list-item-meta-title",style:{"font-size":"12px",width:"fit-content"}},yi={key:1,class:"file-empty"},vi=me(()=>d("img",{src:De},null,-1)),wi=me(()=>d("div",{class:"text-tip1"},"\u6682\u65E0\u56DE\u653E",-1)),ki=[vi,wi],bi={class:"course-file",style:{height:"100%"}},Ti=["src"],Si={class:"arco-list-item-meta-title"},Ei=me(()=>d("div",{class:"file-empty"},[d("img",{src:De}),d("div",{class:"text-tip1"},"\u6682\u65E0\u8BFE\u4EF6"),d("div",{class:"text-tip2"},"\u8BB2\u5E08\u672A\u4E0A\u4F20\u8BFE\u4EF6")],-1)),Li={title:"",class:"input-container dragTarget",style:{height:"209px"}},Ci={class:"content-header"},Mi=me(()=>d("img",{src:Mt,alt:"\u793C\u7269",style:{width:"16px",height:"16px"}},null,-1)),Oi={class:"content-body"},Pi={class:"content-footer"},xi={key:1,style:{display:"flex","align-items":"center","justify-content":"center",height:"100%",color:"#999","font-size":"14px"}};function Ii(e,n,l,u,a,_){const pe=rt,C=Y("icon-left"),I=Y("icon-sun-fill"),L=lt,A=Y("icon-user"),D=ot,T=Y("icon-loading"),N=Y("icon-refresh"),le=Y("icon-mobile"),O=Y("mobile-jump-popover"),R=ct,Z=ut,ne=ft,r=Y("icon-down"),f=dt,Q=ht,J=mt,ee=Y("media-video"),oe=Y("icon-video-camera"),ce=pt,U=gt,v=_t,V=yt,y=Y("goods-small"),o=vt,M=wt,j=kt,F=bt,ue=Y("icon-image"),ge=Tt,we=St;return w(),P("div",xt,[d("section",It,[b(R,{style:at([{background:"#2b2f38"},{padding:"10px 0"}]),onBack:n[0]||(n[0]=k=>e.$router.back())},{title:g(()=>[b(pe,{heading:6,style:{color:"#fff"}},{default:g(()=>[W(G(a.data.name),1)]),_:1})]),"back-icon":g(()=>[b(C)]),subtitle:g(()=>[b(D,{size:"large"},{default:g(()=>[b(L,{color:a.roomData.status=="online"?"arcoblue":"gray"},{icon:g(()=>[b(I)]),default:g(()=>[W(" "+G(a.roomData.status_text),1)]),_:1},8,["color"]),_.showViewerCount?(w(),H(D,{key:0},{default:g(()=>[b(A),d("span",At,G(a.onlineUserNum),1)]),_:1})):q("",!0),a.loading?(w(),H(T,{key:1})):q("",!0),a.loading?q("",!0):(w(),H(N,{key:2,onClick:_.refresh},null,8,["onClick"]))]),_:1})]),extra:g(()=>[b(O,{type:"course",id:a.pageParams.id},{default:g(()=>[d("span",Nt,[b(le),W("\u624B\u673A\u89C2\u770B")])]),_:1},8,["id"])]),_:1}),d("section",Dt,[d("div",Rt,[b(ce,{loading:a.loading,tip:"\u52A0\u8F7D\u4E2D...",style:{width:"100%",height:"100%"}},{default:g(()=>[a.loading?(w(),H(ne,{key:0,animation:!0},{default:g(()=>[b(D,{direction:"vertical",style:{width:"100%"},size:"large"},{default:g(()=>[b(Z,{rows:200})]),_:1})]),_:1})):(w(),P($,{key:1},[_.showVideoPlayer?(w(),P($,{key:0},[_.showQualitySwitch?(w(),P("div",Ut,[b(J,{position:"br",onSelect:_.handleQualitySelect},{content:g(()=>[(w(!0),P($,null,Ee(_.qualityOptions,(k,K)=>(w(),H(Q,{key:K,value:k,class:he({"quality-active":k.url===_.currentQualityUrl})},{default:g(()=>[W(G(k.name),1)]),_:2},1032,["value","class"]))),128))]),default:g(()=>[b(f,{type:"text",class:"quality-switch-btn"},{default:g(()=>[W(G(_.currentQualityName)+" ",1),b(r)]),_:1})]),_:1},8,["onSelect"])])):q("",!0),b(ee,{source:a.videoUrl,cover:a.data.warm_up_cover?a.data.warm_up_cover:a.data.cover,"is-live":_.isVideoUrlLive,bulletScreen:a.data.bullet_screen?a.data.bullet_screen:!1,views:_.showViewerCount?a.onlineUserNum:!1,onStop:e.stopHandle,"error-msg":a.roomData.status_text,onOnM3u8Retry:_.onM3u8Retry,onWaiting:_.onPlayerWaiting,onPlaying:_.onPlayerPlaying},null,8,["source","cover","is-live","bulletScreen","views","onStop","error-msg","onOnM3u8Retry","onWaiting","onPlaying"])],64)):(w(),P("div",Bt,[d("img",{src:a.data.warm_up_cover?a.data.warm_up_cover:a.data.cover,class:"live-status-bg"},null,8,Qt),d("div",Ft,[d("div",Vt,[b(oe,{class:"live-status-icon"}),d("div",jt,G(a.roomData.status_text||"\u76F4\u64AD\u52A0\u8F7D\u4E2D"),1),a.roomData.status!="end"?(w(),H(f,{key:0,type:"outline",class:"live-status-refresh",onClick:_.refresh},{default:g(()=>[b(N),W(" \u5237\u65B0 ")]),_:1},8,["onClick"])):q("",!0)])])]))],64))]),_:1},8,["loading"])]),d("div",qt,[d("div",zt,[d("div",{class:he([{active:a.panelTab=="talk"}]),onClick:n[1]||(n[1]=k=>_.changeTab("talk"))}," \u8BA8\u8BBA ",2),d("div",{class:he([{active:a.panelTab=="record"}]),onClick:n[2]||(n[2]=k=>_.changeTab("record"))}," \u56DE\u653E ",2),d("div",{class:he([{active:a.panelTab=="file"}]),onClick:n[4]||(n[4]=k=>_.changeTab("file"))},[W(" \u8BFE\u4EF6 "),b(N,{onClick:n[3]||(n[3]=k=>_.getCoursewareList())})],2),d("div",{class:he([{active:a.panelTab=="interaction"}]),onClick:n[5]||(n[5]=k=>_.changeTab("interaction"))}," \u4E92\u52A8 ",2)]),d("div",Wt,[a.panelTab=="talk"?(w(),P("div",Gt,[a.linkTalk.status!="success"?(w(),P("div",Ht,[b(D,{direction:"vertical",fill:""},{default:g(()=>[Jt,d("div",Kt,G(a.linkTalk.tipText),1),a.linkTalk.status!="relink"?(w(),H(f,{key:0,type:"primary",onClick:_.reLink},{default:g(()=>[W("\u91CD\u65B0\u8FDE\u63A5")]),_:1},8,["onClick"])):q("",!0)]),_:1})])):(w(),H(V,{key:1,ref:"messageRef",onScroll:_.messageScroll,"outer-style":"height:100%;",style:{height:"100%","overflow-y":"auto"}},{default:g(()=>[d("div",Xt,[(w(!0),P($,null,Ee(a.messageList,(k,K)=>(w(),P("div",Yt,[d("div",Zt,[d("div",$t,[d("div",ei,[d("p",{class:he(["basic-info-act",{right:k.is_my}])},[d("img",{src:k.avatar,alt:"avatar",class:"avatar"},null,8,ti),d("span",ii,[d("span",si,G(k.nickname),1)]),d("span",ni,G(e.$format.formatDate(k.time)),1)],2),d("div",{class:he(["content",{right:k.is_my}])},[k.type=="gift"?(w(),P("div",ai,[W(" \u9001\u51FA\u793C\u7269 "),d("span",null,G(k.message),1)])):(w(),P("div",ri,[d("div",li,[d("span",oi,[k.type=="text"?(w(),P($,{key:0},[W(G(k.message),1)],64)):q("",!0),k.type=="image"?(w(),P("view",ci,[b(U,{width:"140",fit:"cover",src:k.message},null,8,["src"])])):q("",!0),k.error?(w(),P("view",ui,[b(v,{type:"error"},{default:g(()=>[W(G(k.error),1)]),_:2},1024)])):q("",!0)])])]))],2)])])])]))),256))])]),_:1},8,["onScroll"]))])):q("",!0),a.panelTab=="interaction"?(w(),P($,{key:1},[a.interactionList&&a.interactionList.length>0?(w(),H(V,{key:0,onScroll:_.messageScroll,"outer-style":"height:100%;",style:{height:"100%","overflow-y":"auto"}},{default:g(()=>[d("div",fi,[b(y,{list:a.interactionList,"title-color":"#fff"},null,8,["list"])])]),_:1},8,["onScroll"])):(w(),P("div",di,pi))],64)):q("",!0),a.panelTab=="record"?(w(),P($,{key:2},[a.playBackList&&a.playBackList.length>0?(w(),H(V,{key:0,onScroll:_.messageScroll,"outer-style":"height:100%;",style:{height:"100%","overflow-y":"auto"}},{default:g(()=>[d("div",gi,[b(j,{bordered:!1,scrollbar:!1,hoverable:!1,split:!1},{default:g(()=>[(w(!0),P($,null,Ee(a.playBackList,(k,K)=>(w(),H(M,{key:e.idx,style:{padding:"5px 0px"}},{actions:g(()=>[b(f,{onClick:_e=>_.playback(k.file_path),type:"primary",size:"mini"},{default:g(()=>[W("\u64AD\u653E")]),_:2},1032,["onClick"])]),default:g(()=>[b(o,null,{title:g(()=>[d("div",_i,G(k.time),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})])]),_:1},8,["onScroll"])):(w(),P("div",yi,ki))],64)):q("",!0),a.panelTab=="file"?(w(),P($,{key:3},[a.coursewareList&&a.coursewareList.length>0?(w(),H(V,{key:0,onScroll:_.messageScroll,"outer-style":"height:100%;",style:{height:"100%","overflow-y":"auto"}},{default:g(()=>[d("div",bi,[b(ce,{loading:a.coursewareLoading,tip:"\u52A0\u8F7D\u4E2D...",style:{width:"100%"}},{default:g(()=>[b(j,{bordered:!1,scrollbar:!1,hoverable:!1,split:!1},{default:g(()=>[(w(!0),P($,null,Ee(a.coursewareList,(k,K)=>(w(),H(M,{key:e.idx,style:{padding:"5px 0px"}},{actions:g(()=>[b(f,{onClick:_e=>_.download(k),type:"primary",size:"mini"},{default:g(()=>[W("\u4E0B\u8F7D")]),_:2},1032,["onClick"])]),default:g(()=>[b(o,{description:e.$format.FormatSize(k.filesize)},{avatar:g(()=>[b(F,{shape:"square"},{default:g(()=>[d("img",{alt:"avatar",src:"/assets/pc/assets/images/filetype/"+k.filetype+".png"},null,8,Ti)]),_:2},1024)]),title:g(()=>[d("div",Si,G(k.filename),1)]),_:2},1032,["description"])]),_:2},1024))),128))]),_:1})]),_:1},8,["loading"])])]),_:1},8,["onScroll"])):q("",!0),Ei],64)):q("",!0)]),d("div",Li,[_.isMessageEnabled?(w(),P($,{key:0},[d("div",Ci,[b(D,{align:"center",size:14},{default:g(()=>[b(ge,{"custom-request":_.customRequest,ref:"uploadRef","auto-upload":!0,onSuccess:_.handleUploadOk,multiple:!1,accept:".png,.jpg,.bmp,.gif,.jpeg","show-file-list":!1,"show-upload-button":!0},{"upload-button":g(()=>[b(ue,{size:"18px"})]),_:1},8,["custom-request","onSuccess"]),a.roomData.config.gift==1?(w(),H(O,{key:0,type:"course",id:a.pageParams.id,tip:"\u8D60\u9001\u793C\u7269\u8BF7\u79FB\u6B65\u624B\u673A\u7AEF\u64CD\u4F5C"},{default:g(()=>[Mi]),_:1},8,["id"])):q("",!0)]),_:1})]),d("div",Oi,[b(we,{class:"inputer a-textarea",modelValue:a.msg,"onUpdate:modelValue":n[6]||(n[6]=k=>a.msg=k),placeholder:"\u8BF7\u8F93\u5165\u60A8\u7684\u8BA8\u8BBA\u5185\u5BB9","max-length":200,"allow-clear":"","show-word-limit":""},null,8,["modelValue"])]),d("div",Pi,[b(f,{type:"primary",size:"small",long:"",onClick:_.send},{default:g(()=>[W("\u53D1\u9001")]),_:1},8,["onClick"])])],64)):(w(),P("div",xi," \u6682\u672A\u5F00\u542F\u6D88\u606F "))])])])])])}const as=et(Pt,[["render",Ii],["__scopeId","data-v-15e31bd6"]]);export{as as default};