1 |
- System.register(["./index-legacy-7b7e9dd3-1706878948624.js","./icon_back-legacy-a8ad0d25-1706878948624.js","./index-legacy-e9e02c99-1706878948624.js","./index-legacy-fdff87c4-1706878948624.js","./icon-collect-active-legacy-b7c75e66-1706878948624.js","./icon_default-legacy-fa9bb009-1706878948624.js","./index-legacy-fe1b8bf5-1706878948624.js","./catchData-legacy-04b7ed30-1706878948624.js","./api-legacy-bf5fe270-1706878948624.js","./api-legacy-bd2ea348-1706878948624.js","./index-legacy-89152299-1706878948624.js","./state-legacy-fb278d54-1706878948624.js","./index-legacy-ff849a63-1706878948624.js","./urlUtils-legacy-6df7f30c-1706878948624.js","./Slider-legacy-31ca6926-1706878948624.js","./index-legacy-04db3630-1706878948624.js"],(function(e,t){"use strict";var i,s,n,a,l,o,r,c,d,_,u,m,g,p,f,h,v,w,y,x,b,I,S,k,A,C,L,B,T,F,P,j,M,R,E,U,N,z,$,O,D,W,J,V,G,q,X,H,K,Q,Y,Z,ee,te,ie;return{setters:[e=>{i=e.d,s=e.e,n=e.X,a=e.r,l=e.p,o=e.H,r=e.O,c=e.f,d=e.c1,_=e.bT,u=e.k,m=e.F,g=e.c,p=e.a,f=e.u,h=e.U,v=e.cm,w=e.y,y=e.w,x=e.ck,b=e.cl,I=e.cn,S=e.j,k=e.v,A=e.x,C=e.A,L=e.W,B=e.a6,T=e.l,F=e.aV,P=e.co},e=>{j=e.i},e=>{M=e.i,R=e.P,E=e.a,U=e.b,N=e.c,z=e.d},e=>{$=e.T},e=>{O=e.i,D=e.a},e=>{W=e.i},e=>{J=e.T},e=>{V=e.u},e=>{G=e.c,q=e.d,X=e.e},e=>{H=e.g,K=e.s,Q=e.a,Y=e.b},e=>{Z=e.T},e=>{ee=e.s},e=>{te=e.u},e=>{ie=e.a},null,null],execute:function(){var se=document.createElement("style");se.textContent="._container_1n2es_1{display:flex;flex-direction:column;height:100%}._container_1n2es_1 ._iconBack_1n2es_6{width:1.875vw;height:1.875vw}._container_1n2es_1 .n-breadcrumb .n-breadcrumb-item{font-size:max(.83333333rem,12Px)!important}._container_1n2es_1 .n-breadcrumb>ul{display:flex;align-items:center}._container_1n2es_1 .n-breadcrumb>ul .n-breadcrumb-item{display:flex;align-items:center}._container_1n2es_1 .n-breadcrumb>ul .n-breadcrumb-item__separator{display:none}._container_1n2es_1 .n-breadcrumb>ul .n-breadcrumb-item__link{padding:.26041667vw .9375vw;background:#FFFFFF;border-radius:.83333333vw;color:#21225d;line-height:1.04166667vw}._container_1n2es_1 .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link{color:#fff;background:var(--product-color)}._container_1n2es_1>.n-space{height:1.875vw;flex-shrink:0}._container_1n2es_1 ._separator_1n2es_39{width:.46875vw;height:.78125vw;margin:0 .83333333vw}._wrap_1n2es_44{padding-top:.78125vw;flex:1;transition:padding .3s;overflow:hidden}._wrap_1n2es_44._wrapBottom_1n2es_50{padding-bottom:5.625vw}._content_1n2es_53{display:flex;flex-direction:column;height:100%;background:#DDF2FF;border-radius:1.04166667vw}._tools_1n2es_60{padding:1.04166667vw;display:flex;align-items:center;flex-shrink:0}._tools_1n2es_60 .n-input{margin-left:auto;width:18.80208333vw}._tools_1n2es_60 .n-input__input-el{height:100%;line-height:100%}._tools_1n2es_60 .n-button{--n-height: 1.92708333vw !important;height:1.92708333vw;padding:0 1.25vw;font-size:max(.9375rem,13Px)}._tools_1n2es_60 .n-button.n-button--primary-type{font-weight:700!important;color:#fff}._contentWrap_1n2es_84{flex:1;display:flex;padding:0 1.04166667vw 1.04166667vw;overflow:hidden;gap:0 1.66666667vw}._musicList_1n2es_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_1n2es_91::-webkit-scrollbar{width:0;display:none}._musicList_1n2es_91 ._wrapList_1n2es_105{width:26.66666667vw;min-width:15.3125vw;min-height:100%;border-radius:.83333333vw}._musicList_1n2es_91 ._empty_1n2es_111{display:flex;align-items:center;justify-content:center;height:50vh}._itemContainer_1n2es_117{width:100%;border-radius:.83333333vw;padding:.20833333vw .41666667vw}._itemContainer_1n2es_117:first-child{padding-top:.41666667vw}._itemContainer_1n2es_117:last-child{padding-bottom:.41666667vw}._item_1n2es_117{position:relative;display:flex;align-items:center;padding:.52083333vw;border-radius:.625vw;cursor:pointer}._item_1n2es_117:hover{background-color:rgba(0,0,0,.05)}._item_1n2es_117._active_1n2es_139{background-color:#ddf2ff}._item_1n2es_117._active_1n2es_139 ._arrow_1n2es_142{opacity:1}._item_1n2es_117 ._img_1n2es_145{position:relative;width:3.125vw;height:3.125vw;border-radius:.41666667vw;margin-right:.625vw;overflow:hidden;flex-shrink:0}._item_1n2es_117 ._img_1n2es_145 .n-image{width:3.125vw;height:3.125vw}._item_1n2es_117 ._img_1n2es_145 img{transition:opacity .3s;opacity:0;height:100%;width:100%}._item_1n2es_117 ._img_1n2es_145 img[data-loaded=true]{opacity:1}._item_1n2es_117 ._title_1n2es_167{flex:1;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start}._item_1n2es_117 ._title_1n2es_167 ._titleName_1n2es_174{font-size:max(.9375rem,13Px);font-weight:600;color:#131415;line-height:1.45833333vw;width:100%}._item_1n2es_117 ._title_1n2es_167 ._titleDes_1n2es_181{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_1n2es_117 ._btn_1n2es_191{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_1n2es_117 ._btn_1n2es_191 .n-button__content>img{margin-left:.52083333vw;width:.46875vw;height:.625vw}._item_1n2es_117 ._arrow_1n2es_142{position:absolute;top:50%;right:.625vw;transform:translate(124%,-50%);opacity:0}._item_1n2es_117 ._showPlayLoading_1n2es_216{opacity:0}._loadingWrap_1n2es_219{display:flex;justify-content:center;min-height:4.16666667vw}._loadingWrap_1n2es_219._showLoading_1n2es_224{height:0;opacity:0;min-height:0}._musicStaff_1n2es_229{display:flex;flex-direction:column;position:relative;left:-.41666667vw;flex:1;background-color:#fff;border-radius:.83333333vw;z-index:1;overflow:hidden}._musicStaff_1n2es_229::-webkit-scrollbar{width:0;display:none}._musicStaff_1n2es_229 ._goBtn_1n2es_244{position:absolute;left:50%;bottom:2.39583333vw;transform:translate(-50%);height:3.64583333vw;cursor:pointer;transition:all .2s ease-in}._musicStaff_1n2es_229 ._rightBtns_1n2es_253{position:absolute;top:1.04166667vw;right:1.25vw;display:flex;align-items:center}._musicStaff_1n2es_229 ._rightBtns_1n2es_253 ._textBtn_1n2es_260{margin-right:1.25vw;padding:1px .83333333vw!important;line-height:1.92708333vw!important;height:1.92708333vw!important;background:#F5F6FA;--n-border: #F5F6FA !important}._musicStaff_1n2es_229 ._rightBtns_1n2es_253 ._transBtn_1n2es_268{width:2.34375vw;cursor:pointer;margin-right:.78125vw}._musicStaff_1n2es_229 ._favitor_1n2es_273{width:2.5vw;height:2.5vw;cursor:pointer;transition:all .3s}._musicStaff_1n2es_229 ._favitor_1n2es_273:hover{transform:scale(1.1)}._musicStaff_1n2es_229 ._favitor_1n2es_273>img{display:block;width:100%;height:100%;filter:drop-shadow(0 0 .52083333vw rgba(27,35,55,.1))}._musicName_1n2es_288{padding-top:1.5625vw;font-size:1.25rem;font-weight:500;color:#333;line-height:1.25vw;text-align:center}._staffImgs_1n2es_296{flex:1;overflow-y:auto;height:100%;padding:0 1.5625vw}._staffImgs_1n2es_296>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_1n2es_313{width:85%;height:85vh;position:relative}._previewWindow_1n2es_313 ._previewClose_1n2es_318{position:absolute;left:2.08333333vw;top:2.08333333vw;width:3.125vw;height:3.38541667vw}._previewWindow_1n2es_313 ._previewIframe_1n2es_325{width:100%;height:85vh;background-color:#fff;border-radius:.83333333vw}._popSelect_1n2es_331{font-size:.83333333rem;width:15.625vw;max-height:26.04166667vw;overflow-y:scroll;box-shadow:0 2 .83333333vw rgba(0,0,0,.08);border-radius:.57291667vw;--n-option-height: 1.77083333vw}._popSelect_1n2es_331 .n-base-select-option__content{width:80%!important}._popTrans_1n2es_343{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_1n2es_343 .n-base-select-option__content{width:80%!important}._textBtn_1n2es_260 ._iconArrow_1n2es_354{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_1n2es_260:hover,._textBtn_1n2es_260._textBtnActive_1n2es_366{background:#198CFE!important;font-weight:500!important;color:#fff!important}._textBtn_1n2es_260:hover ._iconArrow_1n2es_354,._textBtn_1n2es_260._textBtnActive_1n2es_366 ._iconArrow_1n2es_354{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(se);const ne="_container_1n2es_1",ae="_iconBack_1n2es_6",le="_separator_1n2es_39",oe="_wrap_1n2es_44",re="_wrapBottom_1n2es_50",ce="_content_1n2es_53",de="_tools_1n2es_60",_e="_contentWrap_1n2es_84",ue="_musicList_1n2es_91",me="_wrapList_1n2es_105",ge="_empty_1n2es_111",pe="_itemContainer_1n2es_117",fe="_item_1n2es_117",he="_active_1n2es_139",ve="_arrow_1n2es_142",we="_img_1n2es_145",ye="_title_1n2es_167",xe="_titleName_1n2es_174",be="_titleDes_1n2es_181",Ie="_btn_1n2es_191",Se="_showPlayLoading_1n2es_216",ke="_loadingWrap_1n2es_219",Ae="_showLoading_1n2es_224",Ce="_musicStaff_1n2es_229",Le="_goBtn_1n2es_244",Be="_rightBtns_1n2es_253",Te="_textBtn_1n2es_260",Fe="_transBtn_1n2es_268",Pe="_favitor_1n2es_273",je="_musicName_1n2es_288",Me="_staffImgs_1n2es_296",Re="_previewWindow_1n2es_313",Ee="_previewClose_1n2es_318",Ue="_previewIframe_1n2es_325",Ne="_popSelect_1n2es_331",ze="_popTrans_1n2es_343",$e="_iconArrow_1n2es_354",Oe="_textBtnActive_1n2es_366",De=""+new URL("icon_goXiaoku-5d0db670.png",t.meta.url).href,We=""+new URL("icon-close-1bf25bcf.png",t.meta.url).href,Je=""+new URL("icon_trans-e9b9e2da.png",t.meta.url).href,Ve=i({name:"music-guide",emits:["close"],setup(e,{emit:t}){const i=s({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:H("music1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:n(-4),left:n(0),width:n(533),height:n(271)},btnsStyle:{bottom:n(40),left:n(159)},eleRectPadding:{left:7,top:7,width:14,height:14},boxStyle:{}},{ele:"",img:H("music2.png"),imgStyle:{top:n(-4),left:n(-205),width:n(420),height:n(228)},btnsStyle:{bottom:n(35),left:n(-48)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:H("music3.png"),imgStyle:{top:"100%",left:n(-130),width:n(401),height:n(304)},btnsStyle:{bottom:n(100),left:n(30)},boxStyle:{borderRadius:"40px"},eleRectPadding:{left:7,top:7,width:14,height:14},type:"bottom"}],step:0}),g=a(!1),p=a({});(async()=>{try{const e=await Q({guideTag:"teacher-guideInfo"});e.data?p.value=JSON.parse(e.data?.guideValue)||null:p.value={},p.value&&p.value.musicGuide?g.value=!1:g.value=!0}catch(e){console.log(e)}})();const f=()=>{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 w();const s=i.steps[i.step].eleRectPadding?.left||0,n=i.steps[i.step].eleRectPadding?.top||0,a=i.steps[i.step].eleRectPadding?.width||0,l=i.steps[i.step].eleRectPadding?.height||0;i.box={left:t.x-s+"px",top:t.y-n+"px",width:t.width+a+"px",height:t.height+l+"px"}}else w()},h=async e=>{try{if("xiaoku-music"!==e)return;p.value?p.value.musicGuide=!1:p.value={musicGuide:!1};try{await Y({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(p.value)})}catch(t){console.log(t)}i.step=0,f(),g.value=!0}catch{}};l((()=>{f(),window.addEventListener("resize",v),o.on("teacher-guideInfo",(e=>h(e)))}));const v=()=>{f()};r((()=>{window.removeEventListener("resize",v),o.off("teacher-guideInfo",h)}));const w=()=>{i.step>=3?y():(i.step=i.step+1,f())},y=async()=>{p.value?p.value.musicGuide=!0:p.value={musicGuide:!0};try{await Y({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(p.value)})}catch(e){console.log(e)}g.value=!1};return()=>c(m,null,[g.value?d(c("div",{"onUpdate:show":e=>g.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[c("div",{class:K.content,onClick:()=>w()},[c("div",{class:K.backBtn,onClick:e=>{e.stopPropagation(),y()}},[u("跳过")]),c("div",{class:K.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:K.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:K.img,style:e.imgStyle,src:e.img},null),c("div",{class:K.btns,style:e.btnsStyle},[i.step+1==i.steps.length?c(m,null,[c("div",{class:[K.endBtn],onClick:()=>y()},[u("完成")]),c("div",{class:K.nextBtn,onClick:()=>{i.step=0,f()}},[u("再看一遍")])]):c("div",{class:K.btn,onClick:()=>w()},[u("下一步 ("),i.step+1,u("/"),i.steps.length,u(")")])])])))])])]),[[_,g.value,"show"]]):null])}});e("default",i({name:"XiaokuMusic",setup(){const e=V(),t=g(),i=p(),n=f(),o=s({page:1,rows:20,status:!0,name:"",musicSheetCategoriesId:i.query.id||""}),d=s({loading:!1,finshed:!1,reshing:!1,tags:[],tagIndex:0,list:[],listActive:0,musicInstrumentIndex:0,playState:"pause",showPlayer:!1,previewModal:!1,showPreivew:!1,previewUrl:"",showCloseBtn:!0,iframeSrc:"",showMusicImg:"staff",trackList:[],showTransBtn:!0,trackName:"切换声轨"}),_=a(!1),m=g(),H=async()=>{d.loading=!0;let e={};try{e=await G({...o,musicalInstrumentId:d.tagIndex?d.tagIndex:""})}catch(t){console.log(t)}console.log(e,"data",d.reshing,"musicSubject"),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.list[d.listActive]&&se(d.list[d.listActive]),d.loading=!1,setTimeout((()=>{_.value=!0}),500)},K=()=>{d.listActive=0,d.showPlayer=!1,d.playState="pause",o.page=1,d.finshed=!1,H()},Q=a(),Y=e=>{"api_fingerPreView"===e.data?.api&&(d.showCloseBtn=!e.data.state)};l((async()=>{await e.getSubjects(),te(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.getSubjectInstruments,i=sessionStorage.getItem("musicSubjectList")?JSON.parse(sessionStorage.getItem("musicSubjectList")):[],s=[];t.forEach((e=>{i.find((t=>t.id===e.id))&&s.push(e)})),d.tags=[{name:"全部",id:0,value:0,label:"全部"},...s]})(),await H(),new IntersectionObserver((e=>{e[0].intersectionRatio>0&&(d.loading||d.finshed||(o.page=o.page+1,H()))})).observe(Q.value),et(),window.addEventListener("message",Y)})),r((()=>{window.removeEventListener("message",Y)}));const se=async e=>{const t=await q({type:"MUSIC",materialId:e.id});200===t?.code&&(e.favitor=t.data)},Ge=e=>{const t={};return e?.forEach((e=>{e.id===d.tagIndex&&(t.selected=!0,t.name=e.name)})),t},qe=h((()=>(d.list[d.listActive]&&(ie(),d.list[d.listActive].xmlFileUrl,m.getToken),d.list[d.listActive]||{}))),Xe=()=>{d.list[d.listActive].favitor=!d.list[d.listActive].favitor,X({favoriteFlag:d.list[d.listActive].favitor,type:"MUSIC",materialId:d.list[d.listActive].id})},He=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)};h((()=>{const e=d.list[d.listActive],t=[];return(e?.musicalInstruments||[]).forEach(((e,i)=>{t.push({label:e.name,value:i})})),t}));const Ke=h((()=>{const e=d.list[d.listActive],t=e?.musicalInstruments;return!!(t&&t.length>1)})),Qe=()=>{const e=m.getToken,t=d.list[d.listActive],i="first"===d.showMusicImg?"firstTone":"fixed"===d.showMusicImg?"fixedTone":"staff"===d.showMusicImg?"staff":"firstTone";d.iframeSrc=`${ie()}/instrument/?id=${t.id}&modelType=practise&modeType=json&Authorization=${e}&isPreView=true&part-index=${d.musicInstrumentIndex}&musicRenderType=${i}`},Ye=e=>{"play"===e?d.playState="play":"pause"===e?d.playState="pause":"pre"===e?d.list[d.listActive-1]&&He(d.list[d.listActive-1]):"next"===e?d.list[d.listActive+1]&&He(d.list[d.listActive+1]):"favitor"===e&&Xe()},Ze=[{value:"staff",label:"五线谱"},{value:"first",label:"首调"},{value:"fixed",label:"固定调"}],et=async()=>{const e=d.list[d.listActive];if(e.musicalInstruments?.length>1){if(e.xmlFileUrl){const t=await fetch(e.xmlFileUrl).then((e=>e.text()));tt(t)}}else{const{defaultScore:t,transferFlag:i}=e.musicalInstruments[0]||{};let s="staff";s="STAVE"===t?"staff":"JIAN"===t?"fixed":"FIRST"===t?"first":"staff",d.showMusicImg=s,d.showTransBtn=i}},tt=e=>{const t=(new DOMParser).parseFromString(e,"text/xml"),i=t.getElementsByTagName("part-list")?.[0]?.getElementsByTagName("score-part")||[],s=Array.from(i).map((e=>e.getElementsByTagName("part-name")?.[0]?.textContent?.trim()||""));t.getElementsByTagName("part"),"COMMON"===s[0]?.toLocaleUpperCase?.()&&s.shift();const n=d.list[d.listActive]?.multiTracksSelection,a=n?n?.split(","):[],l=s.map(((e,t)=>{const i=!(0!=a.length&&!a.includes(e)),s=v(e);return{label:e+(s?`(${s})`:""),value:t,sortId:P(s,t),canselect:i,track:e}})).filter((e=>e.canselect)).sort(((e,t)=>e.sortId-t.sortId));d.trackList=l;let o=l.find((e=>e.value===d.musicInstrumentIndex))?.track;o=o.replace(/[0-9]+/g,"").replace(/\s/g,"").toLocaleLowerCase();let r="first",c=!0;d.list[d.listActive]?.musicalInstruments.forEach((e=>{e.code.toLocaleLowerCase()===o&&(r="STAVE"===e.defaultScore?"staff":"JIAN"===e.defaultScore?"fixed":(e.defaultScore,"first"),c=e.transferFlag)})),d.showTransBtn=c,d.showMusicImg=r};w((()=>d.listActive),(async()=>{d.musicInstrumentIndex=0,et()})),w((()=>d.musicInstrumentIndex),(async()=>{d.trackName=d.trackList.find((e=>e.value===d.musicInstrumentIndex))?.label||"切换声轨",Qe()}));const it=h((()=>{let e=[];if("first"===d.showMusicImg){const t=qe.value?.musicFirstSvg;e=t?t.split(","):[]}else if("fixed"===d.showMusicImg){const t=qe.value?.musicJianSvg;e=t?t.split(","):[]}else if("staff"===d.showMusicImg){const t=qe.value?.musicImg||qe.value?.musicSvg;e=t?t.split(","):[]}return e}));return()=>{let e;return c("div",{class:ne},[c(y,{align:"center",wrapItem:!1,size:16},{default:()=>[c("img",{style:{cursor:"pointer"},src:j,class:ae,onClick:()=>n.push({path:"/xiaoku-ai"})},null),c(x,{separator:""},{default:()=>[c(b,{onClick:()=>n.push({path:"/xiaoku-ai"})},{default:()=>[u("全部列表")]}),c("img",{class:le,src:M},null),c(b,null,{default:()=>[i.query.name]})]})]}),c("div",{class:[oe,d.showPlayer?re:""]},[c("div",{class:ce},[c("div",{class:de},[c(y,{style:{width:"100%"},size:[24,12],wrapItem:!1},{default:()=>{return[c("div",{id:"music-0"},[c(y,{style:{width:"100%"},size:[24,12],wrapItem:!1},(t=e=d.tags.map((e=>e.instruments&&e.instruments.length>1?c(I,{options:e.instruments,trigger:"hover",value:d.tagIndex,"onUpdate:value":[e=>d.tagIndex=e,()=>{d.reshing=!0,document.querySelector(".musicList-container").scroll(0,0),K()}],key:e.value,class:[Ne]},{default:()=>[c(S,{round:!0,textColor:Ge(e.instruments).selected?"#fff":"#000",color:Ge(e.instruments).selected?"#198CFE":"#fff",type:Ge(e.instruments).selected?"primary":"default",class:[Te,Ge(e.instruments).selected&&Oe]},{default:()=>[Ge(e.instruments).name||e.name,c("i",{class:$e},null)]})]}):c(S,{round:!0,textColor:d.tagIndex===e.value?"#fff":"#000",color:d.tagIndex===e.value?"#198CFE":"#fff",type:d.tagIndex===e.value?"primary":"default",onClick:()=>{d.tagIndex=e.value||0,d.reshing=!0,document.querySelector(".musicList-container").scroll(0,0),K()}},{default:()=>[e.name]}))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!F(t)?e:{default:()=>[e]}))])];var t}}),c($,{style:{marginLeft:"auto"},round:!0,border:!1,onSearch:e=>{o.name=e,d.reshing=!0,K()}},null)]),c("div",{class:_e},[c("div",{class:[ue,"musicList-container"]},[c("div",{class:[me,"music-wrap-list"]},[d.list.map(((e,t)=>c("div",{class:pe},[c("div",{class:[fe,d.listActive===t&&he],onClick:()=>{(e=>{const t=d.list.findIndex((t=>t.id===e.id));t>-1&&(d.listActive=t),se(e)})(e),Qe()}},[c("div",{class:we},[c(k,{lazy:!0,objectFit:"cover",previewDisabled:!0,src:e.titleImg||W,onLoad:e=>{e.target.dataset.loaded="true"}},null),c(R,{class:[d.listActive===t&&"play"===d.playState?"":Se]},null)]),c("div",{class:ye},[c("div",{class:xe},[c(J,{text:e.musicSheetName},null)]),c("div",{class:be},[e.composer])]),c(S,0==t?A({color:"#259CFE",textColor:"#fff"},{id:"music-1"},{round:!0,class:Ie,type:"primary",onClick:t=>{t.stopPropagation(),He(e)}}):{color:"#259CFE",textColor:"#fff",round:!0,class:Ie,type:"primary",onClick:t=>{t.stopPropagation(),He(e)}},{default:()=>[u("试听"),c("img",{src:d.listActive===t&&"play"===d.playState?E:U},null)]}),c("img",{class:ve,src:N},null)])]))),c("div",{ref:Q,class:[ke,d.finshed&&Ae]},[c(C,{show:!0},null)]),!d.loading&&0===d.list.length&&c("div",{class:ge},[c(Z,null,null)])])]),c("div",{class:Ce},[c("div",{class:je},[qe.value.musicSheetName]),c("img",{id:"music-2",style:{display:qe.value.id?"":"none"},class:[Le],src:De,onClick:()=>{Ye("pause");let e="staff";"first"===d.showMusicImg?e="firstTone":"fixed"===d.showMusicImg?e="fixedTone":"staff"===d.showMusicImg&&(e="staff");const i=`${ie()}/instrument?v=${+new Date}&platform=pc&showGuide=true&id=${qe.value.id}&Authorization=${t.getToken}&musicRenderType=${e}&showGuide=true&part-index=${d.musicInstrumentIndex}`;window.matchMedia("(display-mode: standalone)").matches?(ee.application=window.matchMedia("(display-mode: standalone)").matches,d.previewModal=!0,d.previewUrl=i,d.showPreivew=!1):window.open(i)}},null),c("div",{class:Be,style:{display:qe.value.id?"":"none"}},[Ke.value&&c(I,{options:d.trackList,trigger:"hover",value:d.musicInstrumentIndex,"onUpdate:value":[e=>d.musicInstrumentIndex=e,async e=>{}],class:[Ne]},{default:()=>[c(S,{round:!0,class:[Te]},{default:()=>[d.trackName,c("i",{class:$e},null)]})]}),d.showTransBtn&&c(I,{options:Ze,trigger:"hover",value:d.showMusicImg,"onUpdate:value":[e=>d.showMusicImg=e,async e=>{d.showMusicImg=e}],class:[ze]},{default:()=>[c("img",{class:[Fe],src:Je},null)]}),c("div",{class:Pe,onClick:()=>Xe()},[c(L,{name:"favitor",mode:"out-in"},{default:()=>[qe.value.favitor?c("img",{src:O,key:"1"},null):c("img",{src:D,key:"2"},null)]})])]),c("div",{class:Me},[Ke.value?c("iframe",{id:"staffIframeRef",style:{width:"100%",height:"100%"},src:d.iframeSrc,onLoad:Qe},null):c(B,{name:"van-fade"},{default:()=>[it.value.length>0?it.value.map((e=>c("img",{src:e,key:e},null))):c(Z,null,null)]})])])])])]),0!==d.list.length&&c(z,{show:d.showPlayer,playState:d.playState,item:qe.value,onChange:e=>Ye(e)},null),_.value?c(Ve,null,null):null,c(T,{show:d.previewModal,"onUpdate:show":[e=>d.previewModal=e,e=>{e||(d.previewUrl="")}],class:Re,showIcon:!1,displayDirective:"show"},{default:()=>[c(C,{show:d.showPreivew,style:"--n-opacity-spinning: 1;"},{default:()=>[c("img",{style:{display:d.showCloseBtn?"":"none"},src:We,class:Ee,onClick:()=>{d.previewModal=!1,d.previewUrl=""}},null),c("iframe",{class:Ue,onLoad:()=>{d.showPreivew=!1},frameborder:"0",src:d.previewUrl},null)]})]})])}}}))}}}));
|