index-legacy.47132079.js 21 KB

1
  1. !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function t(t){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?e(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function o(e,t,n,i,r,o,a){try{var l=e[o](a),u=l.value}catch(s){return void n(s)}l.done?t(u):Promise.resolve(u).then(i,r)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function l(e){o(a,i,r,l,u,"next",e)}function u(e){o(a,i,r,l,u,"throw",e)}l(void 0)}))}}var l=document.createElement("style");l.innerHTML="._playContent_xbrqo_1{width:100vw;height:100vh;background-color:#000;overflow:hidden}._coursewarePlay_xbrqo_7{position:relative;height:100vh;margin:0 auto;overflow:hidden}._playModel_xbrqo_13{position:absolute;left:0;top:0;right:0;bottom:0;box-shadow:inset 0 0 4.37333rem #000;pointer-events:none}._headerContainer_xbrqo_22{position:fixed;top:0;left:0;right:0;z-index:1;padding:.26667rem .64rem;display:flex;align-items:center;color:#fff;font-size:.32rem;background:linear-gradient(180deg,rgba(0,0,0,.6),transparent)}._backBtn_xbrqo_35{color:#fff;width:1.06667rem;height:.69333rem;display:flex;justify-content:space-between;align-items:center;z-index:10}._goPractice_xbrqo_44{width:2.37333rem;height:.85333rem;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQsAAABgCAMAAAA9z6dNAAAAxlBMVEUAAAAAAAD///8WFhY1NTX///8pKSny8vIAAACHh4f9/f0AAABxcXFVVVUAAADo6OiBgYH4+Pj5+fkAAADm5ub4+PiOjo4AAAD+/v709PT7+/v6+vpFRUV4eHj8/Pz5+fns7Oy4uLheXl4AAAAAAADw8PDl5eWysrL19fXOzs6fn5+kpKSrq6v9/f329vYAAAAAAADd3d3Y2NiYmJjh4eHDw8NqamrV1dXIyMjAwMDr6+vf39/u7u7b29u8vLzj4+PS0tL///9gzRnKAAAAQXRSTlMsAPsvNf0yyQZO9ClEPAuvTN7lJqvbURn3z+voOEfu4rprPyMRxKhn04NZXWLx2B8TmZJWoXdCjnxztZ2/lW+liaPm4r8AAAmsSURBVHja5NbBigIxDIDhWJUJ1g1ohYiICq2K46EFVzz3/V9qT8LYmdWop3b+R/hIk8JAEiJSYGuNhpzSxloOhIgDSQILcuwN5Jzx7Oh7CwxW5zUM3WltA35jgcQlONzTTPihBToPpeUdfmIRMluU0nUa3rYgC6Vm6S0LLGpPpGlGuYXL+4S+zjihBTKUH6PEgsq7Hl15em1Bpb+Pe4ZaFn2lSDHaFq7k+5GmXWLRX4omRtuC+kUBoOnBop+7onNnQK8p7hipBXqQt57Wp0O13SyXm211ONXTNWSaxw4LBmnD+rabqdhIzXa3eghZxm0LJ5Y4VisVW6lVd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Ev2YDQ2Hsjva4u8daLjn5tX+ZAWKSygCy24ipSq1QGk2L97vM8xEBWLG1o/StIaoj5gKj13UsFjq5JLQHZjJZb06pH+fLrNB/Gki5XE082UdOqEEJstYByLGpL94IgFjJdVfiuyv1ssTWzNe3tsy1DFqaQhMPasvCzrp87Ymhak8NK5A5Au1ItTDop1q2OnK08Wlx5YJ/RZfE0ELD1j72u3/PQUvg4DTbwIDX6Svug3BywGH04alCxzYXMTUvyQvtPPil/Ml3Myr4fALcuWPzisJxsszBQYgiMCmtJ3pRjsNmkLHhBg96UYQQGuAsOxSLbJnH5/SUoRlKlUbi7CIv21xMX+d0dzCxoEReyqhZ4HRUxOiTVMUw9KL071EKqFKuspAtPOhRUgBIYL962TI6p4u1NBklrikM+avB/bxwYSrxGwqtCsnhY9VjsVpdUrK633aIOfokoM4fMkWRp3rXZH9MA97GhhYe9a65kzHfyXkUOPNusRpNP6A60uO9Oxqzj0dtW/+zZhTgz/U0ckU6L28Afwxog/Y0PoPJP3fRnH/AZBnH3f6SJvPRmL2n8cleVyJPXx1FtC0CLfzvva5fPdA/vn31xtOA+vWfCaqzvv5L87e9O7YBGAiBINiM+6/RiW9JXcBQAtIjPrjh1m8Zq3YL2bsbnDKZq0dWtxciw30bp2x/2X7mQ61ggbRZMGL6krGDagVTqlnBGqsVDLoMOjZhNiGzcmYlyzTLlHE745Z9PPuYiZ2JzUqflc7Q/wx9txV+31Zwc+PqBVTQy3c80GpTAAAAAElFTkSuQmCC) no-repeat center;background-size:contain;position:absolute;right:.32rem;bottom:1.86667rem;z-index:11;transition:all .5s ease}._goPractice_xbrqo_44._hide_xbrqo_55{transform:translate(1.73333rem)}._menu_xbrqo_58{flex:1;display:flex;justify-content:center;color:#fff}._tabsContent_xbrqo_64{width:100vw;height:100vh}._tabsContent_xbrqo_64 .van-tabs__wrap{display:none!important}._tabsContent_xbrqo_64 .van-tabs__content{width:100%;height:100%}._loadWrap_xbrqo_75{position:absolute;left:0;top:0;right:0;bottom:0;background:linear-gradient(45deg,#21232a,#111218);display:flex;justify-content:center;align-items:center}._itemDiv_xbrqo_86{position:relative;width:100%;height:100%}._itemDiv_xbrqo_86 video{width:100%;height:100%}._itemDiv_xbrqo_86 img{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}._itemDiv_xbrqo_86 ._videoSection_xbrqo_101{position:absolute;top:0;left:0;right:0;bottom:0;z-index:8}._videoModel_xbrqo_109{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}._videoModel_xbrqo_109>img{width:1.33333rem;height:1.33333rem}._rightFixedBtns_xbrqo_123{position:fixed;top:50%;transform:translateY(-50%);right:.53333rem}._rightFixedBtns_xbrqo_123 ._point_xbrqo_129{margin-top:.26667rem;border-bottom-left-radius:0;border-bottom-right-radius:0}._rightFixedBtns_xbrqo_123 ._point_xbrqo_129+._fullBtn_xbrqo_134{border-top-left-radius:0;border-top-right-radius:0}._leftFixedBtns_xbrqo_138{position:fixed;top:50%;transform:translateY(-50%);left:.53333rem}._leftFixedBtns_xbrqo_138 ._prePoint_xbrqo_144{margin-bottom:.21333rem}._fullBtn_xbrqo_134{width:1.01333rem;height:1.46667rem;background:rgba(51,51,51,.15);border-radius:.21333rem;display:flex;flex-direction:column;align-items:center;color:#fff;justify-content:space-evenly}._fullBtn_xbrqo_134:active{opacity:.8}._bottomFixedContainer_xbrqo_161{position:absolute;left:0;right:0;bottom:0;z-index:10;background:linear-gradient(0deg,rgba(0,0,0,.5),transparent);padding:0 .8rem}._bottomFixedContainer_xbrqo_161 ._time_xbrqo_170{display:flex;color:#fff;font-size:.26667rem;padding:.10667rem 0}._bottomFixedContainer_xbrqo_161 ._slider_xbrqo_176{padding:.26667rem 0}._bottomFixedContainer_xbrqo_161 ._actions_xbrqo_179{display:flex;justify-content:space-between;color:#fff;font-size:.32rem;align-items:center}._bottomFixedContainer_xbrqo_161 ._actions_xbrqo_179 ._actionBtn_xbrqo_186{display:flex}._bottomFixedContainer_xbrqo_161 ._actions_xbrqo_179 ._actionBtn_xbrqo_186>img{width:.69333rem;height:.69333rem;display:block;padding:.21333rem .21333rem .37333rem}._popup_xbrqo_195{background:rgba(0,0,0,.5)}._overlayClass_xbrqo_198{--van-overlay-background: transparent}.top-enter-active,.top-leave-active{transition:transform .5s}.top-enter-from,.top-leave-to{transform:translateY(-100%)}.left-enter-active,.left-leave-active{transition:all .5s}.left-enter-from,.left-leave-to{left:-1.6rem}.right-enter-active,.right-leave-active{transition:all .5s}.right-enter-from,.right-leave-to{right:-1.6rem}.bottom-enter-active,.bottom-leave-active{transition:transform .5s}.bottom-enter-from,.bottom-leave-to{transform:translateY(100%)}\n",document.head.appendChild(l),System.register(["./ResizeObserver.es-legacy.99c32bce.js","./plyr-legacy.2bfabaee.js","./tcplayer.min-legacy.83adebe6.js","./useFee-legacy.0daaabdb.js","./tcplayer.v4.9.1.min-legacy.f64208e7.js","./index-legacy.092080dd.js","./index-legacy.c73765da.js"],(function(e){"use strict";var n,r,o,l,u,s,c,d,v,m,p,f,g,b,_,x,h,y,A,q,B,w,T,C,I,O,D,P,j,S,k,z,L,F,R,M;return{setters:[function(e){n=e.d,r=e.u,o=e.bN,l=e.U,u=e.a1,s=e.$,c=e.c,d=e.bg,v=e.bi,m=e.t,p=e.F,f=e.a0,g=e.b2,b=e.r,_=e.b9,x=e.aj,h=e.ai,y=e.f,A=e.e,q=e.V,B=e.a7,w=e.g,T=e.an,C=e.n,I=e.bj,O=e.q,D=e.bf},function(){},function(e){P=e.i,j=e.a,S=e.p,k=e.b},function(e){z=e.h},function(e){L=e.T},function(e){F=e.S},function(e){R=e.S,M=e.a}],execute:function(){var N={playContent:"_playContent_xbrqo_1",coursewarePlay:"_coursewarePlay_xbrqo_7",playModel:"_playModel_xbrqo_13",headerContainer:"_headerContainer_xbrqo_22",backBtn:"_backBtn_xbrqo_35",goPractice:"_goPractice_xbrqo_44",hide:"_hide_xbrqo_55",menu:"_menu_xbrqo_58",tabsContent:"_tabsContent_xbrqo_64",loadWrap:"_loadWrap_xbrqo_75",itemDiv:"_itemDiv_xbrqo_86",videoSection:"_videoSection_xbrqo_101",videoModel:"_videoModel_xbrqo_109",rightFixedBtns:"_rightFixedBtns_xbrqo_123",point:"_point_xbrqo_129",fullBtn:"_fullBtn_xbrqo_134",leftFixedBtns:"_leftFixedBtns_xbrqo_138",prePoint:"_prePoint_xbrqo_144",bottomFixedContainer:"_bottomFixedContainer_xbrqo_161",time:"_time_xbrqo_170",slider:"_slider_xbrqo_176",actions:"_actions_xbrqo_179",actionBtn:"_actionBtn_xbrqo_186",popup:"_popup_xbrqo_195",overlayClass:"_overlayClass_xbrqo_198"},U=n({name:"video-class",props:{item:{type:Object,default:function(){return{}}},modal:{type:Boolean,default:!0}},emits:["loadedmetadata","togglePlay","ended","reset","error","close","changeModal"],setup:function(e,t){var n=t.emit,i=r(),a=o(e),g=a.item,b=a.modal,_=l(),x="video"+Date.now()+Math.floor(100*Math.random()),h=function(){_.value&&(f((function(){var e;null===(e=_.value)||void 0===e||e.pause()})),_.value.poster(e.item.coverImg),_.value.src(e.item.content),_.value.loop(e.item.loop),_.value.autoplay(e.item.autoplay),_.value.one("loadedmetadata",(function(e){var t,i,r,o,a,l,u=_.value;(g.value.duration=u.duration(),g.value.videoEle=u,g.value.loaded=!0,n("loadedmetadata",_.value),g.value.autoplay&&_.value)?(g.value.muted=!1,null===(t=_.value)||void 0===t||t.muted(!1),null===(i=_.value)||void 0===i||i.volume(1),null===(r=_.value)||void 0===r||r.play()):(g.value.muted=!1,null===(o=_.value)||void 0===o||o.muted(!1),null===(a=_.value)||void 0===a||a.volume(1),null===(l=_.value)||void 0===l||l.pause())})),_.value.on("timeupdate",(function(){if(g.value.loaded){var e=_.value;g.value.currentTime=e.currentTime()}})),_.value.on("ended",(function(){n("ended",g.value)})),_.value.on("pause",(function(){var e;console.log("暂停"),g.value.paused=!0,null===(e=_.value)||void 0===e||e.pause(),setTimeout((function(){var e;null===(e=_.value)||void 0===e||e.pause()}),100)})),_.value.on("play",(function(){var e,t,n;(g.value.paused=!1,g.value.muted)&&(g.value.muted=!1,null===(e=_.value)||void 0===e||e.muted(!1),null===(t=_.value)||void 0===t||t.volume(1),null===(n=_.value)||void 0===n||n.pause())})),_.value.on("error",(function(e){n("error"),i._uploadErrorLog(e)})))};return u((function(){_.value=L(x,{appID:"",controls:!1,loop:g.value.loop,muted:!1}),h()})),s((function(){return e.item}),(function(){h()})),function(){return c(p,null,[c("div",{class:N.itemDiv,onClick:function(){clearTimeout(g.value.timer),n("changeModal",!b.value)}},[c("video",{id:x,style:{height:"100%",width:"100%"},playsinline:"false",preload:"auto",class:"player",poster:"./assets/icon-videobg.2414ec8d.png","data-vid":g.value.id,src:g.value.content},[c("source",{src:g.value.content,type:"video/mp4"},null)]),c("div",{class:N.videoSection},null)]),c(d,{name:"bottom"},{default:function(){return[b.value&&!g.value.muted&&c("div",{class:N.bottomFixedContainer},[c("div",{class:N.time},[c("span",null,[v(g.value.currentTime)]),m("/"),c("span",null,[v(g.value.duration)])]),c("div",{class:N.slider},[g.value.duration&&c(F,{buttonSize:16,modelValue:g.value.currentTime,min:0,max:g.value.duration},null)]),c("div",{class:N.actions},[c("div",{class:N.actionBtn},[g.value.paused?c("img",{src:P,onClick:function(){var e;clearTimeout(g.value.timer),null===(e=g.value.videoEle)||void 0===e||e.play(),g.value.paused=!1,g.value.timer=setTimeout((function(){n("changeModal",!1)}),4e3)}},null):c("img",{src:j,onClick:function(){var e;clearTimeout(g.value.timer),null===(e=g.value.videoEle)||void 0===e||e.pause(),g.value.paused=!0}},null)])])])]}})])}}});var E="VIDEO",V="SONG";e("default",n({name:"exercise-after-class",setup:function(){var e=g(),n=b({width:"100vw"}),r=function(){var e=Math.min(screen.width,screen.height)*(16/9);e>Math.max(screen.width,screen.height)?n.width="100vw":n.width=e+"px"},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;r(),A({api:"setRequestedOrientation",content:{orientation:e}}),A({api:"setStatusBarVisibility",content:{isVisibility:e}})};o(),_((function(){o(1)}));var v=x();h();var f=v.query,P=y(),j=l(),L=b({videoData:null,trainings:[],expireTimeFlag:!1,trainingTimes:0,itemList:[],showHead:!0,loading:!0,recordLoading:!1,isPlayBaseStatus:!0,isPlayAll:!0}),F=b({nowTime:0,model:!0,timer:null,item:null}),Y=function(){var e=a(regeneratorRuntime.mark((function e(){var t,n,r,o,a,l,u,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,C.post(w.platformApi+"/studentLessonTraining/trainingRecord/".concat(f.courseScheduleId,"?userId=").concat(null===(t=w.user)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.id),{hideLoading:!0});case 3:if(a=e.sent,L.expireTimeFlag=(null===(r=a.data)||void 0===r?void 0:r.expireTimeFlag)||!1,!Array.isArray(null==a||null===(o=a.data)||void 0===o?void 0:o.trainings)){e.next=11;break}return u=(null==a||null===(l=a.data)||void 0===l?void 0:l.trainings)||[],s=[],u.forEach((function(e){s.push.apply(s,i(e.studentLessonTrainingDetails||[]))})),s.forEach((function(e){var t={};try{t=JSON.parse(e.trainingContent)}catch(n){t=""}t.practiceTimes!==e.trainingTimes+""&&(L.isPlayAll=!1),e.materialId==v.query.materialId&&(G.tabName=e.knowledgePointName)})),e.abrupt("return",s);case 11:e.next=15;break;case 13:e.prev=13,e.t0=e.catch(0);case 15:return e.abrupt("return",[]);case 16:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(){return e.apply(this,arguments)}}(),J=function(){var e=a(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Array.isArray(n)&&(L.trainings=n.map((function(e){var n,i=e.materialRefs?e.materialRefs:[],r=i.length>0?i[0].resourceId:null;try{e.trainingContent=JSON.parse(e.trainingContent)}catch(o){e.trainingContent=""}return t(t({},e),{},{materialMusicId:r,currentTime:0,duration:100,paused:!0,loop:!1,videoEle:null,timer:null,muted:!0,autoplay:!(null===(n=w.user.data)||void 0===n||!n.vipMember)})})),console.log(L.trainings,"trainings"),L.itemList=L.trainings.filter((function(e){return e.materialId==v.query.materialId})),L.videoData=L.itemList[0],Z());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();u(a(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y();case 2:(t=e.sent).forEach((function(e){var t={};try{t=JSON.parse(e.trainingContent)}catch(n){t=""}t.practiceTimes!==e.trainingTimes+""&&(L.isPlayBaseStatus=!1)})),J(t),z();case 6:case"end":return e.stop()}}),e)}))));var X=function(){A({api:"back"})},W=l(),G=b({firstIndex:0,open:!1,activeIndex:-1,tabActive:"",tabName:"",itemActive:"",itemName:""}),H=function(){var e=a(regeneratorRuntime.mark((function e(t){var n,i,r,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!L.recordLoading&&!L.expireTimeFlag){e.next=2;break}return e.abrupt("return");case 2:return console.log("记录观看次数"),L.recordLoading=!0,i=v.query,r={materialType:"VIDEO",record:{sourceTime:t.duration,clientType:w.platformType,feature:"LESSON_TRAINING",deviceType:P.android?"ANDROID":P.isApp?"IOS":"WEB"},courseScheduleId:i.courseScheduleId,lessonTrainingId:i.lessonTrainingId,materialId:(null===(n=L.videoData)||void 0===n?void 0:n.materialId)||""},e.prev=6,e.next=9,C.post(w.platformApi+"/studentLessonTraining/lessonTrainingRecord",{data:r,hideLoading:!0});case 9:e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:return L.recordLoading=!1,e.prev=15,e.next=18,Y();case 18:o=e.sent,Array.isArray(o)&&(a=o.find((function(e){var t;return e.materialId==(null===(t=L.videoData)||void 0===t?void 0:t.materialId)})))&&(L.videoData.trainingTimes=a.trainingTimes,Z()),e.next=24;break;case 22:e.prev=22,e.t1=e.catch(15);case 24:case"end":return e.stop()}}),e,null,[[6,12],[15,22]])})));return function(t){return e.apply(this,arguments)}}(),Q=function(){L.itemList.forEach((function(e){var t;null===(t=e.videoEle)||void 0===t||t.pause()}))},Z=function e(){var t,n,i,r;if(0!=(null==L||null===(t=L.videoData)||void 0===t?void 0:t.trainingTimes)&&(null==L||null===(n=L.videoData)||void 0===n?void 0:n.trainingTimes)+""===(null===(i=L.videoData)||void 0===i||null===(r=i.trainingContent)||void 0===r?void 0:r.practiceTimes)){var a=!1,l=0;if(L.isPlayBaseStatus)l=L.trainings.findIndex((function(e){var t;return e.materialId==(null===(t=L.videoData)||void 0===t?void 0:t.materialId)})),a=l===L.trainings.length-1;else{var u=-1,s=!0;L.trainings.forEach((function(e,t){e.trainingContent.practiceTimes!==e.trainingTimes+""&&-1===u&&(u=t),e.trainingContent.practiceTimes!==e.trainingTimes+""&&(s=!1)})),l=-1!=u?u-1:-1,a=s}I({title:"课后作业",message:"你已完成该练习~",confirmButtonColor:"var(--van-primary)",confirmButtonText:a?"完成":"下一题",cancelButtonText:"继续"}).then((function(){if(a)A({api:"goBack"});else{var t,n=L.trainings[l+1];if(null===(t=L.videoData)||void 0===t||t.expired,n.expired)return void O("该资源已过期");if(n.knowledgePointName&&(G.tabName=n.knowledgePointName),(null==n?void 0:n.type)===E&&(L.itemList=[n],L.videoData=n,e()),(null==n?void 0:n.type)===V){o(1),X();var i=D.stringify({id:n.content,courseScheduleId:f.courseScheduleId,lessonTrainingId:f.lessonTrainingId,materialId:n.materialId}),r="".concat(location.origin,"/orchestra-music-score/?")+i;A({api:"openAccompanyWebView",content:{url:r,orientation:0,c_orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})}}})).catch((function(){L.trainings[l].currentTime=0}))}};s(e,(function(e){Q(),"visible"==e&&A({api:"setRequestedOrientation",content:{orientation:0}},(function(){console.log(234)}))}));var K=function(e){Q(),e.stopPropagation();var t=D.stringify({id:L.videoData.materialMusicId}),n="".concat(location.origin,"/orchestra-music-score/?")+t;console.log(n,"src"),A({api:"openAccompanyWebView",content:{url:n,orientation:0,c_orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})};return function(){var e,t,i,r;return c("div",{class:N.playContent},[c("div",{class:N.coursewarePlay,style:{width:n.width}},[c(R,{style:{height:"100%"},ref:W,showIndicators:!1,loop:!1,vertical:!0,lazyRender:!0,touchable:!1,duration:0},(r=i=L.itemList.map((function(e,t){return c(M,null,{default:function(){return[c(p,null,[c(U,{item:e,modal:F.model,onEnded:function(e){return H(e)},onChangeModal:function(e){F.model=e}},null),e.muted&&c("div",{class:N.loadWrap},[c(q,{animationData:S},null)])])]}})})),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!T(r)?i:{default:function(){return[i]}})),c(d,{name:"top"},{default:function(){var e,t,n;return[F.model&&c("div",{class:N.headerContainer,ref:j},[c("div",{class:N.backBtn,onClick:function(){return X()}},[c(B,{name:k},null),m("返回")]),c("div",{class:N.menu},[G.tabName]),!L.expireTimeFlag&&c("div",{class:N.nums},[m("观看视频模仿并练习:"),(null===(e=L.videoData)||void 0===e?void 0:e.trainingTimes)||0,m("/"),(null===(t=L.videoData)||void 0===t||null===(n=t.trainingContent)||void 0===n?void 0:n.practiceTimes)||0])])]}}),(null===(e=L.videoData)||void 0===e?void 0:e.materialMusicId)&&"SCHOOL"!==w.platformType&&!(null!==(t=L.videoData)&&void 0!==t&&t.expired)&&c("div",{class:[N.goPractice,F.model?"":N.hide],onClick:K},null)])])}}}))}}}))}();