index-legacy-8030ba84-1706882452509.js 23 KB

1
  1. System.register(["./index-legacy-26fae7cb-1706882452509.js","./icon_back-legacy-a8ad0d25-1706882452509.js","./index-legacy-6ada26a2-1706882452509.js","./index-legacy-a6603fd2-1706882452509.js","./icon-collect-active-legacy-b7c75e66-1706882452509.js","./icon_default-legacy-fa9bb009-1706882452509.js","./index-legacy-880f2fa6-1706882452509.js","./catchData-legacy-b505675a-1706882452509.js","./api-legacy-d91cda67-1706882452509.js","./api-legacy-e2085bf2-1706882452509.js","./index-legacy-1996d6d9-1706882452509.js","./state-legacy-8ade60ca-1706882452509.js","./index-legacy-c3652b8b-1706882452509.js","./urlUtils-legacy-6df7f30c-1706882452509.js","./Slider-legacy-e664244c-1706882452509.js","./index-legacy-d162f44b-1706882452509.js"],(function(e,t){"use strict";var i,n,l,a,s,o,r,c,p,d,_,v,u,m,g,h,f,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,n=e.e,l=e.X,a=e.r,s=e.p,o=e.H,r=e.O,c=e.f,p=e.c1,d=e.bT,_=e.k,v=e.F,u=e.c,m=e.a,g=e.u,h=e.U,f=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 ne=document.createElement("style");ne.textContent="._container_lv7pn_1{display:flex;flex-direction:column;height:100%}._container_lv7pn_1 ._iconBack_lv7pn_6{width:1.875vw;height:1.875vw}._container_lv7pn_1 .n-breadcrumb .n-breadcrumb-item{font-size:max(.83333333rem,12Px)!important}._container_lv7pn_1 .n-breadcrumb>ul{display:flex;align-items:center}._container_lv7pn_1 .n-breadcrumb>ul .n-breadcrumb-item{display:flex;align-items:center}._container_lv7pn_1 .n-breadcrumb>ul .n-breadcrumb-item__separator{display:none}._container_lv7pn_1 .n-breadcrumb>ul .n-breadcrumb-item__link{padding:.26041667vw .9375vw;background:#FFFFFF;border-radius:.83333333vw;color:#21225d;line-height:1.04166667vw}._container_lv7pn_1 .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link{color:#fff;background:var(--product-color)}._container_lv7pn_1>.n-space{height:1.875vw;flex-shrink:0}._container_lv7pn_1 ._separator_lv7pn_39{width:.46875vw;height:.78125vw;margin:0 .83333333vw}._wrap_lv7pn_44{padding-top:.78125vw;flex:1;transition:padding .3s;overflow:hidden}._wrap_lv7pn_44._wrapBottom_lv7pn_50{padding-bottom:5.625vw}._content_lv7pn_53{display:flex;flex-direction:column;height:100%;background:#DDF2FF;border-radius:1.04166667vw}._tools_lv7pn_60{padding:1.04166667vw;display:flex;align-items:center;flex-shrink:0}._tools_lv7pn_60 .n-input{margin-left:auto;width:18.80208333vw}._tools_lv7pn_60 .n-input__input-el{height:100%;line-height:100%}._tools_lv7pn_60 .n-button{--n-height: 1.92708333vw !important;height:1.92708333vw;padding:0 1.25vw;font-size:max(.9375rem,13Px)}._tools_lv7pn_60 .n-button.n-button--primary-type{font-weight:700!important;color:#fff}._contentWrap_lv7pn_84{flex:1;display:flex;padding:0 1.04166667vw 1.04166667vw;overflow:hidden;gap:0 1.66666667vw}._musicList_lv7pn_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_lv7pn_91::-webkit-scrollbar{width:0;display:none}._musicList_lv7pn_91 ._wrapList_lv7pn_105{width:26.66666667vw;min-width:15.3125vw;min-height:100%;border-radius:.83333333vw}._musicList_lv7pn_91 ._empty_lv7pn_111{display:flex;align-items:center;justify-content:center;height:50vh}._itemContainer_lv7pn_117{width:100%;border-radius:.83333333vw;padding:.20833333vw .41666667vw}._itemContainer_lv7pn_117:first-child{padding-top:.41666667vw}._itemContainer_lv7pn_117:last-child{padding-bottom:.41666667vw}._item_lv7pn_117{position:relative;display:flex;align-items:center;padding:.52083333vw;border-radius:.625vw;cursor:pointer}._item_lv7pn_117:hover{background-color:rgba(0,0,0,.05)}._item_lv7pn_117._active_lv7pn_139{background-color:#ddf2ff}._item_lv7pn_117._active_lv7pn_139 ._arrow_lv7pn_142{opacity:1}._item_lv7pn_117 ._img_lv7pn_145{position:relative;width:3.125vw;height:3.125vw;border-radius:.41666667vw;margin-right:.625vw;overflow:hidden;flex-shrink:0}._item_lv7pn_117 ._img_lv7pn_145 .n-image{width:3.125vw;height:3.125vw}._item_lv7pn_117 ._img_lv7pn_145 img{transition:opacity .3s;opacity:0;height:100%;width:100%}._item_lv7pn_117 ._img_lv7pn_145 img[data-loaded=true]{opacity:1}._item_lv7pn_117 ._title_lv7pn_167{flex:1;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start}._item_lv7pn_117 ._title_lv7pn_167 ._titleName_lv7pn_174{font-size:max(.9375rem,13Px);font-weight:600;color:#131415;line-height:1.45833333vw;width:100%}._item_lv7pn_117 ._title_lv7pn_167 ._titleDes_lv7pn_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_lv7pn_117 ._btn_lv7pn_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_lv7pn_117 ._btn_lv7pn_191 .n-button__content>img{margin-left:.52083333vw;width:.46875vw;height:.625vw}._item_lv7pn_117 ._arrow_lv7pn_142{position:absolute;top:50%;right:.625vw;transform:translate(124%,-50%);opacity:0}._item_lv7pn_117 ._showPlayLoading_lv7pn_216{opacity:0}._loadingWrap_lv7pn_219{display:flex;justify-content:center;min-height:4.16666667vw}._loadingWrap_lv7pn_219._showLoading_lv7pn_224{height:0;opacity:0;min-height:0}._musicStaff_lv7pn_229{display:flex;flex-direction:column;position:relative;left:-.41666667vw;flex:1;background-color:#fff;border-radius:.83333333vw;z-index:1;overflow:hidden}._musicStaff_lv7pn_229::-webkit-scrollbar{width:0;display:none}._musicStaff_lv7pn_229 ._goBtn_lv7pn_244{position:absolute;left:50%;bottom:2.39583333vw;transform:translate(-50%);height:3.64583333vw;cursor:pointer;transition:all .2s ease-in}._musicStaff_lv7pn_229 ._rightBtns_lv7pn_253{position:absolute;top:1.04166667vw;right:1.25vw;display:flex;align-items:center}._musicStaff_lv7pn_229 ._rightBtns_lv7pn_253 ._textBtn_lv7pn_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_lv7pn_229 ._rightBtns_lv7pn_253 ._transBtn_lv7pn_268{width:2.34375vw;cursor:pointer;margin-right:.78125vw}._musicStaff_lv7pn_229 ._favitor_lv7pn_273{width:2.5vw;height:2.5vw;cursor:pointer;transition:all .3s}._musicStaff_lv7pn_229 ._favitor_lv7pn_273:hover{transform:scale(1.1)}._musicStaff_lv7pn_229 ._favitor_lv7pn_273>img{display:block;width:100%;height:100%;filter:drop-shadow(0 0 .52083333vw rgba(27,35,55,.1))}._musicName_lv7pn_288{padding-top:1.5625vw;font-size:1.25rem;font-weight:500;color:#333;line-height:1.25vw;text-align:center}._staffImgs_lv7pn_296{flex:1;overflow-y:auto;height:100%;padding:0 1.5625vw}._staffImgs_lv7pn_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_lv7pn_313{width:85%;height:85vh;position:relative}._previewWindow_lv7pn_313 ._previewClose_lv7pn_318{position:absolute;left:2.08333333vw;top:2.08333333vw;width:3.125vw;height:3.38541667vw}._previewWindow_lv7pn_313 ._previewIframe_lv7pn_325{width:100%;height:85vh;background-color:#fff;border-radius:.83333333vw}._popSelect_lv7pn_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_lv7pn_331 .n-base-select-option__content{width:80%!important}._popSelect1_lv7pn_343{font-size:.83333333rem;width:12.5vw;box-shadow:0 2 .83333333vw rgba(0,0,0,.08);border-radius:.57291667vw;--n-option-height: 1.77083333vw}._popSelect1_lv7pn_343 .n-base-select-option__content{width:80%!important}._popTrans_lv7pn_353{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_lv7pn_353 .n-base-select-option__content{width:80%!important}._textBtn_lv7pn_260 ._iconArrow_lv7pn_364{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_lv7pn_260:hover,._textBtn_lv7pn_260._textBtnActive_lv7pn_376{background:#198CFE!important;font-weight:500!important;color:#fff!important}._textBtn_lv7pn_260:hover ._iconArrow_lv7pn_364,._textBtn_lv7pn_260._textBtnActive_lv7pn_376 ._iconArrow_lv7pn_364{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(ne);const le="_container_lv7pn_1",ae="_iconBack_lv7pn_6",se="_separator_lv7pn_39",oe="_wrap_lv7pn_44",re="_wrapBottom_lv7pn_50",ce="_content_lv7pn_53",pe="_tools_lv7pn_60",de="_contentWrap_lv7pn_84",_e="_musicList_lv7pn_91",ve="_wrapList_lv7pn_105",ue="_empty_lv7pn_111",me="_itemContainer_lv7pn_117",ge="_item_lv7pn_117",he="_active_lv7pn_139",fe="_arrow_lv7pn_142",we="_img_lv7pn_145",ye="_title_lv7pn_167",xe="_titleName_lv7pn_174",be="_titleDes_lv7pn_181",Ie="_btn_lv7pn_191",Se="_showPlayLoading_lv7pn_216",ke="_loadingWrap_lv7pn_219",Ae="_showLoading_lv7pn_224",Ce="_musicStaff_lv7pn_229",Le="_goBtn_lv7pn_244",Be="_rightBtns_lv7pn_253",Te="_textBtn_lv7pn_260",Fe="_transBtn_lv7pn_268",Pe="_favitor_lv7pn_273",je="_musicName_lv7pn_288",Me="_staffImgs_lv7pn_296",Re="_previewWindow_lv7pn_313",Ee="_previewClose_lv7pn_318",Ue="_previewIframe_lv7pn_325",Ne="_popSelect_lv7pn_331",ze="_popSelect1_lv7pn_343",$e="_popTrans_lv7pn_353",Oe="_iconArrow_lv7pn_364",De="_textBtnActive_lv7pn_376",We=""+new URL("icon_goXiaoku-5d0db670.png",t.meta.url).href,Je=""+new URL("icon-close-1bf25bcf.png",t.meta.url).href,Ve=""+new URL("icon_trans-e9b9e2da.png",t.meta.url).href,Ge=i({name:"music-guide",emits:["close"],setup(e,{emit:t}){const i=n({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:H("music1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:l(-4),left:l(0),width:l(533),height:l(271)},btnsStyle:{bottom:l(40),left:l(159)},eleRectPadding:{left:7,top:7,width:14,height:14},boxStyle:{}},{ele:"",img:H("music2.png"),imgStyle:{top:l(-4),left:l(-205),width:l(420),height:l(228)},btnsStyle:{bottom:l(35),left:l(-48)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:H("music3.png"),imgStyle:{top:"100%",left:l(-130),width:l(401),height:l(304)},btnsStyle:{bottom:l(100),left:l(30)},boxStyle:{borderRadius:"40px"},eleRectPadding:{left:7,top:7,width:14,height:14},type:"bottom"}],step:0}),u=a(!1),m=a({});(async()=>{try{const e=await Q({guideTag:"teacher-guideInfo"});e.data?m.value=JSON.parse(e.data?.guideValue)||null:m.value={},m.value&&m.value.musicGuide?u.value=!1:u.value=!0}catch(e){console.log(e)}})();const g=()=>{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 n=i.steps[i.step].eleRectPadding?.left||0,l=i.steps[i.step].eleRectPadding?.top||0,a=i.steps[i.step].eleRectPadding?.width||0,s=i.steps[i.step].eleRectPadding?.height||0;i.box={left:t.x-n+"px",top:t.y-l+"px",width:t.width+a+"px",height:t.height+s+"px"}}else w()},h=async e=>{try{if("xiaoku-music"!==e)return;m.value?m.value.musicGuide=!1:m.value={musicGuide:!1};try{await Y({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(m.value)})}catch(t){console.log(t)}i.step=0,g(),u.value=!0}catch{}};s((()=>{g(),window.addEventListener("resize",f),o.on("teacher-guideInfo",(e=>h(e)))}));const f=()=>{g()};r((()=>{window.removeEventListener("resize",f),o.off("teacher-guideInfo",h)}));const w=()=>{i.step>=3?y():(i.step=i.step+1,g())},y=async()=>{m.value?m.value.musicGuide=!0:m.value={musicGuide:!0};try{await Y({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(m.value)})}catch(e){console.log(e)}u.value=!1};return()=>c(v,null,[u.value?p(c("div",{"onUpdate:show":e=>u.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()}},[_("跳过")]),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(v,null,[c("div",{class:[K.endBtn],onClick:()=>y()},[_("完成")]),c("div",{class:K.nextBtn,onClick:()=>{i.step=0,g()}},[_("再看一遍")])]):c("div",{class:K.btn,onClick:()=>w()},[_("下一步 ("),i.step+1,_("/"),i.steps.length,_(")")])])])))])])]),[[d,u.value,"show"]]):null])}});e("default",i({name:"XiaokuMusic",setup(){const e=V(),t=u(),i=m(),l=g(),o=n({page:1,rows:20,status:!0,name:"",musicSheetCategoriesId:i.query.id||""}),p=n({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:"切换声轨"}),d=a(!1),v=u(),H=async()=>{p.loading=!0;let e={};try{e=await G({...o,musicalInstrumentId:p.tagIndex?p.tagIndex:""})}catch(t){console.log(t)}console.log(e,"data",p.reshing,"musicSubject"),p.reshing&&(p.list=[],p.reshing=!1),200===e?.code&&Array.isArray(e?.data?.rows)&&(p.list=[...p.list,...e.data.rows],p.finshed=e.data.rows.length<o.rows),p.list[p.listActive]&&ne(p.list[p.listActive]),p.loading=!1,setTimeout((()=>{d.value=!0}),500)},K=()=>{p.listActive=0,p.showPlayer=!1,p.playState="pause",o.page=1,p.finshed=!1,H()},Q=a(),Y=e=>{"api_fingerPreView"===e.data?.api&&(p.showCloseBtn=!e.data.state)};s((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")):[],n=[];t.forEach((e=>{i.find((t=>t.id===e.id))&&n.push(e)})),p.tags=[{name:"全部",id:0,value:0,label:"全部"},...n]})(),await H(),new IntersectionObserver((e=>{e[0].intersectionRatio>0&&(p.loading||p.finshed||(o.page=o.page+1,H()))})).observe(Q.value),tt(),window.addEventListener("message",Y)})),r((()=>{window.removeEventListener("message",Y)}));const ne=async e=>{const t=await q({type:"MUSIC",materialId:e.id});200===t?.code&&(e.favitor=t.data)},qe=e=>{const t={};return e?.forEach((e=>{e.id===p.tagIndex&&(t.selected=!0,t.name=e.name)})),t},Xe=h((()=>(p.list[p.listActive]&&(ie(),p.list[p.listActive].xmlFileUrl,v.getToken),p.list[p.listActive]||{}))),He=()=>{p.list[p.listActive].favitor=!p.list[p.listActive].favitor,X({favoriteFlag:p.list[p.listActive].favitor,type:"MUSIC",materialId:p.list[p.listActive].id})},Ke=e=>{const t=p.list.findIndex((t=>t.id===e.id));t>-1&&(p.listActive===t?p.playState="play"===p.playState?"pause":"play":p.playState="play",p.showPlayer=!0,p.listActive=t)};h((()=>{const e=p.list[p.listActive],t=[];return(e?.musicalInstruments||[]).forEach(((e,i)=>{t.push({label:e.name,value:i})})),t}));const Qe=h((()=>{const e=p.list[p.listActive],t=e?.musicalInstruments;return!!(t&&t.length>1)})),Ye=()=>{const e=v.getToken,t=p.list[p.listActive],i="first"===p.showMusicImg?"firstTone":"fixed"===p.showMusicImg?"fixedTone":"staff"===p.showMusicImg?"staff":"firstTone";p.iframeSrc=`${ie()}/instrument/?id=${t.id}&modelType=practise&modeType=json&Authorization=${e}&isPreView=true&part-index=${p.musicInstrumentIndex}&musicRenderType=${i}`},Ze=e=>{"play"===e?p.playState="play":"pause"===e?p.playState="pause":"pre"===e?p.list[p.listActive-1]&&Ke(p.list[p.listActive-1]):"next"===e?p.list[p.listActive+1]&&Ke(p.list[p.listActive+1]):"favitor"===e&&He()},et=[{value:"staff",label:"五线谱"},{value:"first",label:"首调"},{value:"fixed",label:"固定调"}],tt=async()=>{const e=p.list[p.listActive];if(e.musicalInstruments?.length>1){if(e.xmlFileUrl){const t=await fetch(e.xmlFileUrl).then((e=>e.text()));it(t)}}else{const{defaultScore:t,transferFlag:i}=e.musicalInstruments[0]||{};let n="staff";n="STAVE"===t?"staff":"JIAN"===t?"fixed":"FIRST"===t?"first":"staff",p.showMusicImg=n,p.showTransBtn=i}},it=e=>{const t=(new DOMParser).parseFromString(e,"text/xml"),i=t.getElementsByTagName("part-list")?.[0]?.getElementsByTagName("score-part")||[],n=Array.from(i).map((e=>e.getElementsByTagName("part-name")?.[0]?.textContent?.trim()||""));t.getElementsByTagName("part"),"COMMON"===n[0]?.toLocaleUpperCase?.()&&n.shift();const l=p.list[p.listActive]?.multiTracksSelection,a=l?l?.split(","):[],s=n.map(((e,t)=>{const i=!(0!=a.length&&!a.includes(e)),n=f(e);return{label:e+(n?`(${n})`:""),value:t,sortId:P(n,t),canselect:i,track:e}})).filter((e=>e.canselect)).sort(((e,t)=>e.sortId-t.sortId));p.trackList=s;let o=s.find((e=>e.value===p.musicInstrumentIndex))?.track;o=o.replace(/[0-9]+/g,"").replace(/\s/g,"").toLocaleLowerCase();let r="first",c=!0;p.list[p.listActive]?.musicalInstruments.forEach((e=>{e.code.toLocaleLowerCase()===o&&(r="STAVE"===e.defaultScore?"staff":"JIAN"===e.defaultScore?"fixed":(e.defaultScore,"first"),c=e.transferFlag)})),p.showTransBtn=c,p.showMusicImg=r};w((()=>p.listActive),(async()=>{p.musicInstrumentIndex=0,tt()})),w((()=>p.musicInstrumentIndex),(async()=>{p.trackName=p.trackList.find((e=>e.value===p.musicInstrumentIndex))?.label||"切换声轨",Ye()}));const nt=h((()=>{let e=[];if("first"===p.showMusicImg){const t=Xe.value?.musicFirstSvg;e=t?t.split(","):[]}else if("fixed"===p.showMusicImg){const t=Xe.value?.musicJianSvg;e=t?t.split(","):[]}else if("staff"===p.showMusicImg){const t=Xe.value?.musicImg||Xe.value?.musicSvg;e=t?t.split(","):[]}return e}));return()=>{let e;return c("div",{class:le},[c(y,{align:"center",wrapItem:!1,size:16},{default:()=>[c("img",{style:{cursor:"pointer"},src:j,class:ae,onClick:()=>l.push({path:"/xiaoku-ai"})},null),c(x,{separator:""},{default:()=>[c(b,{onClick:()=>l.push({path:"/xiaoku-ai"})},{default:()=>[_("全部列表")]}),c("img",{class:se,src:M},null),c(b,null,{default:()=>[i.query.name]})]})]}),c("div",{class:[oe,p.showPlayer?re:""]},[c("div",{class:ce},[c("div",{class:pe},[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=p.tags.map((e=>e.instruments&&e.instruments.length>1?c(I,{options:e.instruments,trigger:"hover",value:p.tagIndex,"onUpdate:value":[e=>p.tagIndex=e,()=>{p.reshing=!0,document.querySelector(".musicList-container").scroll(0,0),K()}],key:e.value,class:[ze]},{default:()=>[c(S,{round:!0,textColor:qe(e.instruments).selected?"#fff":"#000",color:qe(e.instruments).selected?"#198CFE":"#fff",type:qe(e.instruments).selected?"primary":"default",class:[Te,qe(e.instruments).selected&&De]},{default:()=>[qe(e.instruments).name||e.name,c("i",{class:Oe},null)]})]}):c(S,{round:!0,textColor:p.tagIndex===e.value?"#fff":"#000",color:p.tagIndex===e.value?"#198CFE":"#fff",type:p.tagIndex===e.value?"primary":"default",onClick:()=>{p.tagIndex=e.value||0,p.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,p.reshing=!0,K()}},null)]),c("div",{class:de},[c("div",{class:[_e,"musicList-container"]},[c("div",{class:[ve,"music-wrap-list"]},[p.list.map(((e,t)=>c("div",{class:me},[c("div",{class:[ge,p.listActive===t&&he],onClick:()=>{(e=>{const t=p.list.findIndex((t=>t.id===e.id));t>-1&&(p.listActive=t),ne(e)})(e),Ye()}},[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:[p.listActive===t&&"play"===p.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(),Ke(e)}}):{color:"#259CFE",textColor:"#fff",round:!0,class:Ie,type:"primary",onClick:t=>{t.stopPropagation(),Ke(e)}},{default:()=>[_("试听"),c("img",{src:p.listActive===t&&"play"===p.playState?E:U},null)]}),c("img",{class:fe,src:N},null)])]))),c("div",{ref:Q,class:[ke,p.finshed&&Ae]},[c(C,{show:!0},null)]),!p.loading&&0===p.list.length&&c("div",{class:ue},[c(Z,null,null)])])]),c("div",{class:Ce},[c("div",{class:je},[Xe.value.musicSheetName]),c("img",{id:"music-2",style:{display:Xe.value.id?"":"none"},class:[Le],src:We,onClick:()=>{Ze("pause");let e="staff";"first"===p.showMusicImg?e="firstTone":"fixed"===p.showMusicImg?e="fixedTone":"staff"===p.showMusicImg&&(e="staff");const i=`${ie()}/instrument?v=${+new Date}&platform=pc&showGuide=true&id=${Xe.value.id}&Authorization=${t.getToken}&musicRenderType=${e}&showGuide=true&part-index=${p.musicInstrumentIndex}`;window.matchMedia("(display-mode: standalone)").matches?(ee.application=window.matchMedia("(display-mode: standalone)").matches,p.previewModal=!0,p.previewUrl=i,p.showPreivew=!1):window.open(i)}},null),c("div",{class:Be,style:{display:Xe.value.id?"":"none"}},[Qe.value&&c(I,{options:p.trackList,trigger:"hover",value:p.musicInstrumentIndex,"onUpdate:value":[e=>p.musicInstrumentIndex=e,async e=>{}],class:[Ne]},{default:()=>[c(S,{round:!0,class:[Te]},{default:()=>[p.trackName,c("i",{class:Oe},null)]})]}),p.showTransBtn&&c(I,{options:et,trigger:"hover",value:p.showMusicImg,"onUpdate:value":[e=>p.showMusicImg=e,async e=>{p.showMusicImg=e}],class:[$e]},{default:()=>[c("img",{class:[Fe],src:Ve},null)]}),c("div",{class:Pe,onClick:()=>He()},[c(L,{name:"favitor",mode:"out-in"},{default:()=>[Xe.value.favitor?c("img",{src:O,key:"1"},null):c("img",{src:D,key:"2"},null)]})])]),c("div",{class:Me},[Qe.value?c("iframe",{id:"staffIframeRef",style:{width:"100%",height:"100%"},src:p.iframeSrc,onLoad:Ye},null):c(B,{name:"van-fade"},{default:()=>[nt.value.length>0?nt.value.map((e=>c("img",{src:e,key:e},null))):c(Z,null,null)]})])])])])]),0!==p.list.length&&c(z,{show:p.showPlayer,playState:p.playState,item:Xe.value,onChange:e=>Ze(e)},null),d.value?c(Ge,null,null):null,c(T,{show:p.previewModal,"onUpdate:show":[e=>p.previewModal=e,e=>{e||(p.previewUrl="")}],class:Re,showIcon:!1,displayDirective:"show"},{default:()=>[c(C,{show:p.showPreivew,style:"--n-opacity-spinning: 1;"},{default:()=>[c("img",{style:{display:p.showCloseBtn?"":"none"},src:Je,class:Ee,onClick:()=>{p.previewModal=!1,p.previewUrl=""}},null),c("iframe",{class:Ue,onLoad:()=>{p.showPreivew=!1},frameborder:"0",src:p.previewUrl},null)]})]})])}}}))}}}));