index-legacy-7ca7931c-1723427255937.js 24 KB

1
  1. System.register(["./index-legacy-91c612f3-1723427255937.js","./icon_back-legacy-a8ad0d25-1723427255937.js","./icon_separator-legacy-74573619-1723427255937.js","./index-legacy-65cade9d-1723427255937.js","./index-legacy-de1428c5-1723427255937.js","./icon-collect-active-legacy-b7c75e66-1723427255937.js","./icon_default-legacy-fa9bb009-1723427255937.js","./catchData-legacy-08855c2b-1723427255937.js","./api-legacy-d55df6b2-1723427255937.js","./index-legacy-7dba2a59-1723427255937.js","./api-legacy-7abfbc56-1723427255937.js","./index-legacy-64c93de3-1723427255937.js","./index-legacy-feb78e27-1723427255937.js","./urlUtils-legacy-0ad6488a-1723427255937.js","./contants-legacy-6ddd2d26-1723427255937.js","./index-legacy-3a53d110-1723427255937.js","./Slider-legacy-5771e8ee-1723427255937.js","./index-legacy-683194f3-1723427255937.js","./Scrollbar-legacy-5da347ec-1723427255937.js"],(function(e,t){"use strict";var i,l,a,s,n,o,r,c,d,_,u,m,p,g,h,w,v,f,y,b,x,S,I,k,A,T,B,C,L,P,F,j,N,M,R,U,E,z,$,W,D,G,O,J,V,q,Q,X,Y,H,K,Z,ee,te;return{setters:[e=>{i=e.d,l=e.e,a=e.$,s=e.r,n=e.q,o=e.C,r=e.T,c=e.f,d=e.a0,_=e.a1,u=e.k,m=e.F,p=e.c,g=e.a,h=e.u,w=e.U,v=e.aP,f=e.A,y=e.x,b=e.aQ,x=e.aR,S=e.j,I=e.w,k=e.E,A=e.z,T=e.aC,B=e._,C=e.l,L=e.m,P=e.D,F=e.aS},e=>{j=e.i},e=>{N=e.i},e=>{M=e.T},e=>{R=e.P,U=e.T,E=e.i,z=e.a},e=>{$=e.i,W=e.a},e=>{D=e.i},e=>{G=e.u},e=>{O=e.c,J=e.d,V=e.e},e=>{q=e.g,Q=e.s},e=>{X=e.g,Y=e.s},e=>{H=e.T},e=>{K=e.u},e=>{Z=e.v},e=>{ee=e.a},e=>{te=e.C},null,null,null],execute:function(){var ie=document.createElement("style");ie.textContent="._container_1el4t_1{display:flex;flex-direction:column;height:100%}._container_1el4t_1 ._iconBack_1el4t_6{width:1.875vw;height:1.875vw}._container_1el4t_1 .n-breadcrumb .n-breadcrumb-item{font-size:max(.83333333rem,12Px)!important}._container_1el4t_1 .n-breadcrumb>ul{display:flex;align-items:center}._container_1el4t_1 .n-breadcrumb>ul .n-breadcrumb-item{display:flex;align-items:center}._container_1el4t_1 .n-breadcrumb>ul .n-breadcrumb-item__separator{display:none}._container_1el4t_1 .n-breadcrumb>ul .n-breadcrumb-item__link{padding:.26041667vw .9375vw;background:#FFFFFF;border-radius:.83333333vw;color:#21225d;line-height:1.04166667vw}._container_1el4t_1 .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link{color:#fff;background:var(--product-color)}._container_1el4t_1>.n-space{height:1.875vw;flex-shrink:0}._container_1el4t_1 ._separator_1el4t_39{width:.46875vw;height:.78125vw;margin:0 .83333333vw}._wrap_1el4t_44{padding-top:.78125vw;flex:1;transition:padding .3s;overflow:hidden}._wrap_1el4t_44._wrapBottom_1el4t_50{padding-bottom:5.625vw}._content_1el4t_53{display:flex;flex-direction:column;height:100%;background:#DDF2FF;border-radius:1.04166667vw}._tools_1el4t_60{padding:1.04166667vw;display:flex;align-items:center;flex-shrink:0}._tools_1el4t_60 .n-input{margin-left:auto;width:18.80208333vw}._tools_1el4t_60 .n-input__input-el{height:100%;line-height:100%}._tools_1el4t_60 .n-button{--n-height: 1.92708333vw !important;height:1.92708333vw;padding:0 1.25vw;font-size:max(.9375rem,13Px)}._tools_1el4t_60 .n-button.n-button--primary-type{font-weight:700!important;color:#fff}._contentWrap_1el4t_84{flex:1;display:flex;padding:0 1.04166667vw 1.04166667vw;overflow:hidden;gap:0 1.66666667vw}._musicList_1el4t_91{background-color:#fff;border-radius:.83333333vw;width:26.66666667vw;min-width:15.3125vw;height:100%;overflow-x:hidden;overflow-y:auto;min-width:330Px}._musicList_1el4t_91::-webkit-scrollbar{width:0;display:none}._musicList_1el4t_91 ._wrapList_1el4t_105{width:26.66666667vw;min-width:15.3125vw;min-height:100%;border-radius:.83333333vw}._musicList_1el4t_91 ._empty_1el4t_111{display:flex;align-items:center;justify-content:center;height:50vh}._searchSection_1el4t_117{position:sticky;top:0;left:0;z-index:9;padding:1.25vw;background-color:#fff;display:flex;align-items:center}._searchSection_1el4t_117 .TheSearch{background:#F5F6FA;--n-color-focus: #F5F6FA !important}._searchSection_1el4t_117 .nBaseCascaser{border-radius:5.20833333vw;width:10.46875vw;background:#F5F6FA;margin-right:.83333333vw}._searchSection_1el4t_117 .nBaseCascaser .n-base-selection__border{border-color:#f5f6fa}._itemContainer_1el4t_140{width:100%;border-radius:.83333333vw;padding:.20833333vw .41666667vw}._itemContainer_1el4t_140:first-child{padding-top:.41666667vw}._itemContainer_1el4t_140:last-child{padding-bottom:.41666667vw}._item_1el4t_140{position:relative;display:flex;align-items:center;padding:.52083333vw;border-radius:.625vw;cursor:pointer}._item_1el4t_140:hover{background-color:rgba(0,0,0,.05)}._item_1el4t_140._active_1el4t_162{background-color:#ddf2ff}._item_1el4t_140._active_1el4t_162 ._arrow_1el4t_165{opacity:1}._item_1el4t_140 ._img_1el4t_168{position:relative;width:3.125vw;height:3.125vw;border-radius:.41666667vw;margin-right:.625vw;overflow:hidden;flex-shrink:0}._item_1el4t_140 ._img_1el4t_168 .n-image{width:3.125vw;height:3.125vw}._item_1el4t_140 ._img_1el4t_168 img{transition:opacity .3s;opacity:0;height:100%;width:100%}._item_1el4t_140 ._img_1el4t_168 img[data-loaded=true]{opacity:1}._item_1el4t_140 ._title_1el4t_190{flex:1;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start}._item_1el4t_140 ._title_1el4t_190 ._titleName_1el4t_197{font-size:max(.9375rem,13Px);font-weight:600;color:#131415;line-height:1.45833333vw;width:100%}._item_1el4t_140 ._title_1el4t_190 ._titleDes_1el4t_204{font-size:max(.72916667rem,11Px);font-weight:400;color:#777;line-height:1.04166667vw;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}._item_1el4t_140 ._btn_1el4t_214{margin-left:auto;width:4.375vw;height:1.875vw;background:linear-gradient(to right,#44CAFF,#259DFE);border:none;padding:0;font-weight:700!important;flex-shrink:0;min-width:3.22916667vw;min-height:1.5625vw;font-size:max(.9375rem,12Px)}._item_1el4t_140 ._btn_1el4t_214 .n-button__content>img{margin-left:.52083333vw;width:.46875vw;height:.625vw}._item_1el4t_140 ._arrow_1el4t_165{position:absolute;top:50%;right:.625vw;transform:translate(124%,-50%);opacity:0}._item_1el4t_140 ._showPlayLoading_1el4t_239{opacity:0}._loadingWrap_1el4t_242{display:flex;justify-content:center;min-height:4.16666667vw}._loadingWrap_1el4t_242._showLoading_1el4t_247{height:0;opacity:0;min-height:0;display:none}._musicStaff_1el4t_253{display:flex;flex-direction:column;position:relative;left:-.41666667vw;flex:1;background-color:#fff;border-radius:.83333333vw;z-index:1;overflow:hidden}._musicStaff_1el4t_253::-webkit-scrollbar{width:0;display:none}._musicStaff_1el4t_253 ._goBtn_1el4t_268{position:absolute;left:50%;bottom:2.39583333vw;transform:translate(-50%);height:3.64583333vw;cursor:pointer;transition:all .2s ease-in}._musicStaff_1el4t_253 ._rightBtns_1el4t_277{position:absolute;top:1.04166667vw;right:1.25vw;display:flex;align-items:center}._musicStaff_1el4t_253 ._rightBtns_1el4t_277 ._textBtn_1el4t_284{margin-right:1.25vw;padding:1px .83333333vw!important;line-height:1.92708333vw!important;height:1.92708333vw!important;background:#F5F6FA;--n-border: #F5F6FA !important}._musicStaff_1el4t_253 ._rightBtns_1el4t_277 ._transBtn_1el4t_292{width:2.34375vw;cursor:pointer;margin-right:.78125vw}._musicStaff_1el4t_253 ._favitor_1el4t_297{width:2.5vw;height:2.5vw;cursor:pointer;transition:all .3s}._musicStaff_1el4t_253 ._favitor_1el4t_297:hover{transform:scale(1.1)}._musicStaff_1el4t_253 ._favitor_1el4t_297>img{display:block;width:100%;height:100%;filter:drop-shadow(0 0 .52083333vw rgba(27,35,55,.1))}._musicName_1el4t_312{padding-top:1.5625vw;font-size:1.35416667rem;font-weight:500;color:#333;line-height:1.25vw;text-align:center}._staffImgs_1el4t_320{flex:1;overflow-y:auto;height:100%;padding:0 1.5625vw}._staffImgs_1el4t_320>img{width:100%}.van-fade-enter-active,.van-fade-leave-active{transition:all .3s}.van-fade-enter-from,.van-fade-leave-to{opacity:0}._previewWindow_1el4t_337{width:85%;height:85vh;position:relative}._previewWindow_1el4t_337 ._previewClose_1el4t_342{position:absolute;left:2.08333333vw;top:2.08333333vw;width:3.125vw;height:3.38541667vw}._previewWindow_1el4t_337 ._previewIframe_1el4t_349{width:100%;height:85vh;background-color:#fff;border-radius:.83333333vw}._popSelect_1el4t_355{font-size:.83333333rem;width:15.625vw;max-height:26.04166667vw;overflow-y:scroll;box-shadow:0 .10416667vw .83333333vw rgba(0,0,0,.08);border-radius:.57291667vw;--n-option-height: 1.77083333vw}._popSelect_1el4t_355 .n-base-select-option__content{width:80%!important}._popSelect1_1el4t_367{font-size:.83333333rem;width:12.5vw;box-shadow:0 .10416667vw .83333333vw rgba(0,0,0,.08);border-radius:.57291667vw;--n-option-height: 1.77083333vw}._popSelect1_1el4t_367 .n-base-select-option__content{width:80%!important}._popTrans_1el4t_377{font-size:.83333333rem;width:10.41666667vw;overflow-y:scroll;box-shadow:0 2 .83333333vw rgba(0,0,0,.08);border-radius:.57291667vw;--n-option-height: 1.77083333vw}._popTrans_1el4t_377 .n-base-select-option__content{width:80%!important}._textBtn_1el4t_284 ._iconArrow_1el4t_388{display:inline-block;margin-left:.41666667vw;margin-top:.10416667vw;width:.41666667vw;height:.26041667vw;background:url("+new URL("icon-arrow-66c56d73.svg",t.meta.url).href+") no-repeat center center / contain;transform:rotate(180deg);color:#131415;fill:#131415}._textBtn_1el4t_284:hover,._textBtn_1el4t_284._textBtnActive_1el4t_400{background:#198CFE!important;font-weight:500!important;color:#fff!important}._textBtn_1el4t_284:hover ._iconArrow_1el4t_388,._textBtn_1el4t_284._textBtnActive_1el4t_400 ._iconArrow_1el4t_388{transform:rotate(0);background:url("+new URL("icon-arrow2-3d2121db.svg",t.meta.url).href+") no-repeat center center / contain;color:#fff;fill:#fff;margin-top:0}\n",document.head.appendChild(ie);const le={container:"_container_1el4t_1",iconBack:"_iconBack_1el4t_6",separator:"_separator_1el4t_39",wrap:"_wrap_1el4t_44",wrapBottom:"_wrapBottom_1el4t_50",content:"_content_1el4t_53",tools:"_tools_1el4t_60",contentWrap:"_contentWrap_1el4t_84",musicList:"_musicList_1el4t_91",wrapList:"_wrapList_1el4t_105",empty:"_empty_1el4t_111",searchSection:"_searchSection_1el4t_117",itemContainer:"_itemContainer_1el4t_140",item:"_item_1el4t_140",active:"_active_1el4t_162",arrow:"_arrow_1el4t_165",img:"_img_1el4t_168",title:"_title_1el4t_190",titleName:"_titleName_1el4t_197",titleDes:"_titleDes_1el4t_204",btn:"_btn_1el4t_214",showPlayLoading:"_showPlayLoading_1el4t_239",loadingWrap:"_loadingWrap_1el4t_242",showLoading:"_showLoading_1el4t_247",musicStaff:"_musicStaff_1el4t_253",goBtn:"_goBtn_1el4t_268",rightBtns:"_rightBtns_1el4t_277",textBtn:"_textBtn_1el4t_284",transBtn:"_transBtn_1el4t_292",favitor:"_favitor_1el4t_297",musicName:"_musicName_1el4t_312",staffImgs:"_staffImgs_1el4t_320",previewWindow:"_previewWindow_1el4t_337",previewClose:"_previewClose_1el4t_342",previewIframe:"_previewIframe_1el4t_349",popSelect:"_popSelect_1el4t_355",popSelect1:"_popSelect1_1el4t_367",popTrans:"_popTrans_1el4t_377",iconArrow:"_iconArrow_1el4t_388",textBtnActive:"_textBtnActive_1el4t_400"},ae=""+new URL("icon_goXiaoku-5d0db670.png",t.meta.url).href,se=""+new URL("icon-close-1bf25bcf.png",t.meta.url).href,ne=""+new URL("icon_trans-e9b9e2da.png",t.meta.url).href,oe=i({name:"music-guide",emits:["close"],setup(e,{emit:t}){const i=l({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:q("music1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:a(-4),left:a(0),width:a(533),height:a(271)},btnsStyle:{bottom:a(40),left:a(-10)},eleRectPadding:{left:7,top:7,width:14,height:14},boxStyle:{}},{ele:"",img:q("music2.png"),imgStyle:{top:a(-4),left:a(-205),width:a(420),height:a(228)},btnsStyle:{bottom:a(35),left:a(-48)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:q("music3.png"),imgStyle:{top:"100%",left:a(-130),width:a(401),height:a(304)},btnsStyle:{bottom:a(100),left:a(30)},boxStyle:{borderRadius:"40px"},eleRectPadding:{left:7,top:7,width:14,height:14},type:"bottom"}],step:0}),p=s(!1),g=s({});(async()=>{try{const e=await X({guideTag:"teacher-guideInfo"});e.data?g.value=JSON.parse(e.data?.guideValue)||null:g.value={},g.value&&g.value.musicGuide?p.value=!1:p.value=!0}catch(e){console.log(e)}})();const h=()=>{const e=document.getElementById(`music-${i.step}`);if(e){const t=e.getBoundingClientRect();if(console.log(e.style.display,"ele"),"none"==e.style.display)return void f();const l=i.steps[i.step].eleRectPadding?.left||0,a=i.steps[i.step].eleRectPadding?.top||0,s=i.steps[i.step].eleRectPadding?.width||0,n=i.steps[i.step].eleRectPadding?.height||0;i.box={left:t.x-l+"px",top:t.y-a+"px",width:t.width+s+"px",height:t.height+n+"px"}}else f()},w=async e=>{try{if("xiaoku-music"!==e)return;g.value?g.value.musicGuide=!1:g.value={musicGuide:!1};try{await Y({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(g.value)})}catch(t){console.log(t)}i.step=0,h(),p.value=!0}catch{}};n((()=>{h(),window.addEventListener("resize",v),o.on("teacher-guideInfo",w)}));const v=()=>{h()};r((()=>{window.removeEventListener("resize",v),o.off("teacher-guideInfo",w)}));const f=()=>{i.step>=3?y():(i.step=i.step+1,h())},y=async()=>{g.value?g.value.musicGuide=!0:g.value={musicGuide:!0};try{await Y({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(g.value)})}catch(e){console.log(e)}p.value=!1};return()=>c(m,null,[p.value?d(c("div",{"onUpdate:show":e=>p.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[c("div",{class:Q.content,onClick:()=>f()},[c("div",{class:Q.backBtn,onClick:e=>{e.stopPropagation(),y()}},[u("跳过")]),c("div",{class:Q.box,style:{...i.box,...i.steps[i.step].boxStyle},id:`modeType-${i.step}`},[i.steps.map(((e,t)=>c("div",{onClick:e=>e.stopPropagation(),class:Q.item,style:"bottom"==e.type?{display:t===i.step?"":"none",left:`${e.eleRect?.left}px`,top:`-${e.imgStyle?.height}`}:{display:t===i.step?"":"none",left:`${e.eleRect?.left}px`,top:`${i.box?.height}`}},[c("img",{class:Q.img,style:e.imgStyle,src:e.img},null),c("div",{class:Q.btns,style:e.btnsStyle},[i.step+1==i.steps.length?c(m,null,[c("div",{class:[Q.endBtn],onClick:()=>y()},[u("完成")]),c("div",{class:Q.nextBtn,onClick:()=>{i.step=0,h()}},[u("再看一遍")])]):c("div",{class:Q.btn,onClick:()=>f()},[u("下一步 ("),i.step+1,u("/"),i.steps.length,u(")")])])])))])])]),[[_,p.value,"show"]]):null])}});e("default",i({name:"XiaokuMusic",setup(){const e=G(),t=p(),i=g(),a=h(),o=l({page:1,rows:20,status:!0,name:"",audioPlayTypes:"",musicSheetCategoriesId:i.query.id||""}),d=l({loading:!1,finshed:!1,reshing:!1,tags:[],tagIndex:0,musicalInstrumentId:"",musicSubject:"",list:[],listActive:0,musicInstrumentIndex:0,playState:"pause",showPlayer:!1,previewModal:!1,showPreivew:!1,previewUrl:"",showCloseBtn:!0,audioPlayTypeList:[],iframeSrc:"",showMusicImg:"staff",trackList:[],showTransBtn:!0,trackName:"切换声轨"}),_=s(""),q=s(!1),Q=p(),X=e=>{for(const t of e)t.instruments&&t.instruments.length>0&&(t.instruments.forEach((e=>{e.columnName="乐器"})),t.children=t.instruments,X(t.instruments))},Y=async()=>{d.loading=!0;let e={};try{const{audioPlayTypes:t,...i}=o;e=await O({...i,audioPlayTypes:t?"PLAY_SING"===t?["PLAY","SING"]:[t]:[],musicSubject:d.musicSubject,musicalInstrumentId:d.musicalInstrumentId})}catch(t){console.log(t)}d.reshing&&(d.list=[],d.reshing=!1),200===e?.code&&Array.isArray(e?.data?.rows)?(d.list=[...d.list,...e.data.rows],d.finshed=e.data.rows.length<o.rows):d.finshed=!0,d.list[d.listActive]&&de(d.list[d.listActive]),d.loading=!1,setTimeout((()=>{q.value=!0}),500)},ie=()=>{d.listActive=0,d.showPlayer=!1,d.playState="pause",o.page=1,d.finshed=!1,Y()},re=s(),ce=e=>{"api_fingerPreView"===e.data?.api&&(d.showCloseBtn=!e.data.state)};n((async()=>{const t=Object.keys(ee).map((e=>({value:e,label:ee[e]})));d.audioPlayTypeList=[{label:"全部",value:""},...t],await e.getSubjects(),K(document.querySelector(".musicList-container"),(e=>{const t=e[0],{height:i}=t.contentRect;document.documentElement.style.setProperty("--xiaoku-music-height",i+"px")})),(async()=>{const t=e.getSubjectList,i=sessionStorage.getItem("musicSubjectList")?JSON.parse(sessionStorage.getItem("musicSubjectList")):[],l=[];console.log(t,i,"subjectList"),t.forEach((e=>{i.find((t=>t.id===e.id))&&l.push(e)})),X(l),d.tags=[{columnName:"声部",name:"全部声部",id:""},...l]})(),await Y(),new IntersectionObserver((e=>{e[0].intersectionRatio>0&&(d.loading||d.finshed||(o.page=o.page+1,Y()))})).observe(re.value),fe(),window.addEventListener("message",ce)})),r((()=>{window.removeEventListener("message",ce)}));const de=async e=>{const t=await J({type:"MUSIC",materialId:e.id});200===t?.code&&(e.favitor=t.data)},_e=w((()=>(d.list[d.listActive]&&(Z(),d.list[d.listActive]?.xmlFileUrl,Q.getToken),d.list[d.listActive]||{}))),ue=()=>{d.list[d.listActive].favitor=!d.list[d.listActive].favitor,V({favoriteFlag:d.list[d.listActive].favitor,type:"MUSIC",materialId:d.list[d.listActive].id})},me=e=>{const t=d.list.findIndex((t=>t.id===e.id));t>-1&&(d.listActive===t?d.playState="play"===d.playState?"pause":"play":d.playState="play",d.showPlayer=!0,d.listActive=t)};w((()=>{const e=d.list[d.listActive],t=[];return(e?.musicalInstruments||[]).forEach(((e,i)=>{t.push({label:e.name,value:i})})),t}));const pe=w((()=>{if(d.list.length){const e=d.list[d.listActive]?.musicSheetType;return"SINGLE"!==e}return!1})),ge=(e,t)=>!!(e||""===e||null==e||["JIAN","FIRST"].includes(t)&&!e),he=()=>{const e=Q.getToken,t=d.list[d.listActive],i="first"===d.showMusicImg?"firstTone":"fixed"===d.showMusicImg?"fixedTone":(d.showMusicImg,"staff");d.iframeSrc=`${Z()}/instrument/?id=${t.id}&modelType=practise&modeType=json&Authorization=${e}&isPreView=true&part-index=${d.musicInstrumentIndex}&musicRenderType=${i}`},we=e=>{"play"===e?d.playState="play":"pause"===e?d.playState="pause":"pre"===e?d.list[d.listActive-1]&&me(d.list[d.listActive-1]):"next"===e?d.list[d.listActive+1]&&me(d.list[d.listActive+1]):"favitor"===e&&ue()},ve=w((()=>{const e=d.list[d.listActive],{scoreType:t,isConvertibleScore:i}=e||{},l=[{value:"first",label:"首调"},{value:"fixed",label:"固定调"}];return["JIAN","FIRST"].includes(t)&&!1===i||null==i||l.unshift({value:"staff",label:"五线谱"}),l})),fe=async()=>{const e=d.list[d.listActive];if("CONCERT"===e?.musicSheetType){if(e.xmlFileUrl){const t=await fetch(e.xmlFileUrl).then((e=>e.text()));ye(t)}}else{const{scoreType:t,isConvertibleScore:i}=e||{};let l="first";l="STAVE"===t?"staff":"JIAN"===t?"fixed":"first",d.showMusicImg=l,d.showTransBtn=ge(i,t)}},ye=e=>{const t=(new DOMParser).parseFromString(e,"text/xml"),i=t.getElementsByTagName("part-list")?.[0]?.getElementsByTagName("score-part")||[],l=Array.from(i).map((e=>e.getElementsByTagName("part-name")?.[0]?.textContent?.trim()||""));"COMMON"===l[0]?.toLocaleUpperCase?.()&&l.shift();const a=d.list[d.listActive]?.multiTracksSelection,s=a?a?.split(","):[],n=l.map(((e,t)=>{const i=!(0!=s.length&&!s.includes(e)),l=v(e);return{label:e+(l?`(${l})`:""),value:t,sortId:F(l,t),canselect:i,track:e}})).filter((e=>e.canselect)).sort(((e,t)=>e.sortId-t.sortId));d.trackList=n;const o=d.list[d.listActive],{scoreType:r,isConvertibleScore:c}=o||{};let _="first";_="STAVE"===r?"staff":"JIAN"===r?"fixed":"first",d.showMusicImg=_,d.showTransBtn=ge(c,r)};f((()=>d.listActive),(async()=>{d.musicInstrumentIndex=0,fe()})),f((()=>d.musicInstrumentIndex),(async()=>{d.trackName=d.trackList.find((e=>e.value===d.musicInstrumentIndex))?.label||"切换声轨",he()})),f((()=>d.showMusicImg),(()=>{pe.value&&he()}));const be=w((()=>{let e=[];if("first"===d.showMusicImg){const t=_e.value?.musicFirstImg;e=t?t.split(","):[]}else if("fixed"===d.showMusicImg){const t=_e.value?.musicJianImg;e=t?t.split(","):[]}else if("staff"===d.showMusicImg){const t=_e.value?.musicImg||_e.value?.musicSvg;e=t?t.split(","):[]}return e}));return()=>{let e;return c("div",{class:le.container},[c(y,{align:"center",wrapItem:!1,size:16},{default:()=>[c("img",{style:{cursor:"pointer"},src:j,class:le.iconBack,onClick:()=>a.push({path:"/xiaoku-ai"})},null),c(b,{separator:""},{default:()=>[c(x,{onClick:()=>a.push({path:"/xiaoku-ai"})},{default:()=>[u("全部列表")]}),c("img",{class:le.separator,src:N},null),c(x,null,{default:()=>[i.query.name]})]})]}),c("div",{class:[le.wrap,d.showPlayer?le.wrapBottom:""]},[c("div",{class:le.content},[c("div",{class:le.tools},[c(y,{style:{width:"100%"},size:[12,6],wrapItem:!1},(l=e=d.audioPlayTypeList.map((e=>c(S,{round:!0,textColor:o.audioPlayTypes===e.value?"#fff":"#000",color:o.audioPlayTypes===e.value?"#198CFE":"#fff",type:o.audioPlayTypes===e.value?"primary":"default",onClick:()=>{o.audioPlayTypes=e.value||"","SING"===e.value&&(d.musicalInstrumentId="",d.musicSubject=""),d.reshing=!0,document.querySelector(".musicList-container")?.scroll(0,0),ie()}},{default:()=>[e.label]}))),"function"==typeof l||"[object Object]"===Object.prototype.toString.call(l)&&!P(l)?e:{default:()=>[e]}))]),c("div",{class:le.contentWrap},[c("div",{class:[le.musicList,"musicList-container"]},[c("div",{class:le.searchSection},["SING"!==o.audioPlayTypes&&c(te,{placeholder:"全部乐器",arrowType:"small",class:le.instrumentSection,value:_.value,"onUpdate:value":e=>_.value=e,options:d.tags,onMoreId:e=>{d.musicalInstrumentId=e.childId,d.musicSubject=e.parentId,d.reshing=!0,document.querySelector(".musicList-container")?.scroll(0,0),ie()}},null),c(M,{style:{marginLeft:"auto"},round:!0,border:!1,onSearch:e=>{o.name=e,d.reshing=!0,ie()}},null)]),c("div",{class:[le.wrapList,"music-wrap-list"]},[d.list.map(((e,t)=>c("div",{class:le.itemContainer},[c("div",{class:[le.item,d.listActive===t&&le.active],onClick:()=>{(e=>{const t=d.list.findIndex((t=>t.id===e.id));t>-1&&(d.listActive=t),de(e)})(e),he()}},[c("div",{class:le.img},[c(I,{lazy:!0,objectFit:"cover",previewDisabled:!0,src:e.titleImg||D,onLoad:e=>{e.target.dataset.loaded="true"}},null),c(R,{class:[d.listActive===t&&"play"===d.playState?"":le.showPlayLoading]},null)]),c("div",{class:le.title},[c("div",{class:le.titleName},[c(U,{text:e.musicSheetName},null)]),c("div",{class:le.titleDes},[e.composer])]),c("img",{class:le.arrow,src:E},null)])]))),c("div",{ref:re,class:[le.loadingWrap,d.finshed&&le.showLoading]},[c(k,{show:!0},null)]),!d.loading&&0===d.list.length&&c("div",{class:le.empty},[c(H,null,null)])])]),c("div",{class:le.musicStaff},[c("div",{class:le.musicName},[_e.value.musicSheetName]),c("img",{id:"music-2",style:{display:_e.value.id?"":"none"},class:[le.goBtn],src:ae,onClick:()=>{we("pause");let e="staff";"first"===d.showMusicImg?e="firstTone":"fixed"===d.showMusicImg?e="fixedTone":"staff"===d.showMusicImg&&(e="staff");let i=`${Z()}/instrument?v=${+new Date}&platform=pc&showGuide=true&id=${_e.value.id}&Authorization=${t.getToken}&musicRenderType=${e}&showGuide=true&part-index=${d.musicInstrumentIndex}`;d.tagIndex&&(i+="&instrumentId="+d.tagIndex),window.matchMedia("(display-mode: standalone)").matches?(A.application=window.matchMedia("(display-mode: standalone)").matches,d.previewModal=!0,d.previewUrl=i,d.showPreivew=!1):window.open(i)}},null),c("div",{class:le.rightBtns,style:{display:_e.value.id?"":"none"}},[pe.value&&c(T,{options:d.trackList,trigger:"hover",value:d.musicInstrumentIndex,"onUpdate:value":[e=>d.musicInstrumentIndex=e,async e=>{await fe()}],class:[le.popSelect]},{default:()=>[c(S,{round:!0,class:[le.textBtn]},{default:()=>[d.trackName,c("i",{class:le.iconArrow},null)]})]}),d.showTransBtn&&c(T,{options:ve.value,trigger:"hover",value:d.showMusicImg,"onUpdate:value":[e=>d.showMusicImg=e,async e=>{d.showMusicImg=e}],class:[le.popTrans]},{default:()=>[c("img",{class:[le.transBtn],src:ne},null)]}),c("div",{class:le.favitor,onClick:()=>ue()},[c(B,{name:"favitor",mode:"out-in"},{default:()=>[_e.value.favitor?c("img",{src:$,key:"1"},null):c("img",{src:W,key:"2"},null)]})])]),c("div",{class:le.staffImgs},[pe.value?c("iframe",{id:"staffIframeRef",style:{width:"100%",height:"100%",paddingTop:"20px"},src:d.iframeSrc,onLoad:he},null):c(m,null,[be.value.length>0?be.value.map((e=>c("img",{src:e,key:e},null))):c(H,null,null)])])])])])]),0!==d.list.length&&c(z,{show:d.showPlayer,playState:d.playState,item:_e.value,onChange:e=>we(e)},null),q.value?c(oe,null,null):null,c(C,{maskClosable:L,show:d.previewModal,"onUpdate:show":[e=>d.previewModal=e,e=>{e||(d.previewUrl="")}],class:le.previewWindow,showIcon:!1,displayDirective:"show"},{default:()=>[c(k,{show:d.showPreivew,style:"--n-opacity-spinning: 1;"},{default:()=>[c("img",{style:{display:d.showCloseBtn?"":"none"},src:se,class:le.previewClose,onClick:()=>{d.previewModal=!1,d.previewUrl=""}},null),c("iframe",{class:le.previewIframe,onLoad:()=>{d.showPreivew=!1},frameborder:"0",src:d.previewUrl},null)]})]})]);var l}}}))}}}));