index-legacy-49aa6f48.js 16 KB

1
  1. System.register(["./index-legacy-93dca29b.js","./index-legacy-450f0c6c.js","./index-legacy-2dc4ee95.js","./Slider-legacy-2bf56512.js","./api-legacy-69104875.js"],(function(e,t){"use strict";var i,a,n,s,o,l,r,_,d,f,c,m,h,g,u,p,w,v,x,y,b,P,k,S,F,A,C,I,L,B,j;return{setters:[e=>{i=e.d,a=e.e,n=e.r,s=e.$,o=e.cl,l=e.w,r=e.f,_=e.o,d=e.cm,f=e.j,c=e.c,m=e.a,h=e.u,g=e.q,u=e.aK,p=e.B,w=e.cj,v=e.ck,x=e.k,y=e.bX,b=e.cn,P=e.T,k=e.O,S=e.aG},e=>{F=e.T},e=>{A=e.T,C=e.i,I=e.a},e=>{L=e.N},e=>{B=e.c,j=e.d}],execute:function(){var T=document.createElement("style");T.textContent="._container_1n0wf_1{display:flex;flex-direction:column;height:100%}._container_1n0wf_1 .n-breadcrumb>ul{display:flex;align-items:center}._container_1n0wf_1 .n-breadcrumb>ul .n-breadcrumb-item{display:flex;align-items:center}._container_1n0wf_1 .n-breadcrumb>ul .n-breadcrumb-item__separator{display:none}._container_1n0wf_1 .n-breadcrumb>ul .n-breadcrumb-item__link{padding:5Px 18Px;background:#FFFFFF;border-radius:16Px;color:#21225d;line-height:20Px}._container_1n0wf_1 .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link{color:#fff;background:var(--product-color)}._container_1n0wf_1>.n-space{height:36Px;flex-shrink:0}._container_1n0wf_1 ._separator_1n0wf_32{height:18Px;margin:0 16Px}._wrap_1n0wf_36{padding-top:20Px;flex:1;transition:padding .3s;overflow:hidden}._content_1n0wf_42{display:flex;flex-direction:column;height:100%;background:#DDF2FF;border-radius:20Px}._tools_1n0wf_49{padding:20Px;display:flex;align-items:center;flex-shrink:0}._tools_1n0wf_49 .n-input{margin-left:auto;width:361Px}._contentWrap_1n0wf_59{flex:1;display:flex;padding:0 20Px 20Px;overflow:hidden}._musicList_1n0wf_65{width:28.54167vw;height:100%;overflow-x:hidden;overflow-y:auto;min-width:330Px}._musicList_1n0wf_65::-webkit-scrollbar{width:0;display:none}._musicList_1n0wf_65 ._wrapList_1n0wf_76{width:26.66667vw;min-width:294Px;min-height:300Px;background:#fff;border-radius:16Px}._musicList_1n0wf_65 ._empty_1n0wf_83{display:flex;align-items:center;justify-content:center;min-height:300Px}._itemContainer_1n0wf_89{border-radius:16Px;padding:4Px 8Px}._itemContainer_1n0wf_89:first-child{padding-top:8Px}._itemContainer_1n0wf_89:last-child{padding-bottom:8Px}._item_1n0wf_89{position:relative;display:flex;align-items:center;padding:10Px;border-radius:12Px;cursor:pointer}._item_1n0wf_89:hover{background-color:rgba(0,0,0,.05)}._item_1n0wf_89._active_1n0wf_110{background-color:#ddf2ff}._item_1n0wf_89._active_1n0wf_110 ._arrow_1n0wf_113{opacity:1}._item_1n0wf_89 ._img_1n0wf_116{position:relative;width:60Px;height:60Px;border-radius:8Px;margin-right:12Px;box-shadow:0 0 .52083vw .20833vw rgba(27,35,55,.1);overflow:hidden;flex-shrink:0}._item_1n0wf_89 ._img_1n0wf_116 .n-image{width:100%;height:100%}._item_1n0wf_89 ._img_1n0wf_116 img{transition:opacity .3s;opacity:0}._item_1n0wf_89 ._img_1n0wf_116 img[data-loaded=true]{opacity:1}._item_1n0wf_89 ._title_1n0wf_137{flex:1;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start}._item_1n0wf_89 ._title_1n0wf_137 ._titleName_1n0wf_144{font-size:16Px;font-weight:600;color:#131415;line-height:28Px;width:100%}._item_1n0wf_89 ._title_1n0wf_137 ._titleDes_1n0wf_151{font-size:14Px;font-weight:400;color:#777;line-height:20Px;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}._item_1n0wf_89 ._btn_1n0wf_161{margin-left:auto;width:4.375vw;height:2.08333vw;background:linear-gradient(to right,#44CAFF,#259DFE);border:none;padding:0;font-weight:700!important;flex-shrink:0;min-width:62Px;min-height:30Px}._item_1n0wf_89 ._btn_1n0wf_161 .n-button__content>img{margin-left:10Px}._item_1n0wf_89 ._arrow_1n0wf_113{position:absolute;top:50%;right:0;transform:translate(124%,-50%);opacity:0}._item_1n0wf_89 ._showPlayLoading_1n0wf_183{opacity:0}._loadingWrap_1n0wf_186{display:flex;justify-content:center;min-height:80Px}._musicStaff_1n0wf_191{display:flex;flex-direction:column;position:relative;left:-8Px;flex:1;background-color:#fff;border-radius:16Px;height:100%;z-index:1;overflow:hidden}._musicStaff_1n0wf_191::-webkit-scrollbar{width:0;display:none}._musicStaff_1n0wf_191 ._goBtn_1n0wf_207{position:absolute;left:50%;bottom:46Px;transform:translate(-50%);height:70Px;cursor:pointer}._musicStaff_1n0wf_191 ._favitor_1n0wf_215{position:absolute;top:1.04167vw;right:1.25vw;width:2.5vw;height:2.5vw;cursor:pointer;transition:all .3s}._musicStaff_1n0wf_191 ._favitor_1n0wf_215:hover{transform:scale(1.1)}._musicStaff_1n0wf_191 ._favitor_1n0wf_215>img{display:block;width:100%;height:100%;filter:drop-shadow(0 0 .52083vw rgba(27,35,55,.1))}._musicName_1n0wf_233{padding-top:30Px;font-size:24Px;font-weight:500;color:#333;line-height:24Px;text-align:center}._staffImgs_1n0wf_241{flex:1;overflow-y:auto}._staffImgs_1n0wf_241>img{width:100%}.van-fade-enter-active,.van-fade-leave-active{transition:all .3s}.van-fade-enter-from,.van-fade-leave-to{opacity:0}._container_hsosf_1{position:fixed;left:5.20833vw;bottom:0;right:0;display:flex;align-items:center;height:108Px;padding:0 60Px;background-color:#fff;box-shadow:0 .10417vw .625vw rgba(0,0,0,.1);z-index:10;transition:all .3s}._hidden_hsosf_15{transform:translateY(100%);opacity:0}._item_hsosf_19{position:relative;display:flex;align-items:center;width:100%}._item_hsosf_19 ._img_hsosf_25{position:relative;width:64Px;height:64Px;border-radius:50%;margin-right:12Px;background-color:#000;box-shadow:0 0 .52083vw .20833vw rgba(27,35,55,.1);padding:7Px;overflow:hidden;flex-shrink:0}._item_hsosf_19 ._img_hsosf_25 .n-image{border-radius:50%;width:100%;height:100%}._item_hsosf_19 ._img_hsosf_25 img{transition:opacity .3s;opacity:0;animation:_rotateImg_hsosf_1 6s linear infinite}._item_hsosf_19 ._img_hsosf_25 img[data-loaded=true]{opacity:1}._item_hsosf_19 ._svgcontainer_hsosf_50{position:fixed;z-index:-1000;pointer-events:none}._item_hsosf_19 ._progress_hsosf_55{position:absolute;left:4Px;top:4Px;width:56Px;pointer-events:none;transform:rotate(180deg)}._item_hsosf_19 ._progress_hsosf_55 .n-progress-graph .n-progress-graph-circle .n-progress-graph-circle-fill{stroke:url(#GradientProgress)}._item_hsosf_19 ._title_hsosf_66{margin-right:15Px;width:200Px}._item_hsosf_19 ._title_hsosf_66 ._titleName_hsosf_70{font-size:16Px;font-weight:600;color:#131415;line-height:28Px;white-space:nowrap}._item_hsosf_19 ._title_hsosf_66 ._titleDes_hsosf_77{font-size:14Px;font-weight:400;color:#777;line-height:20Px;white-space:nowrap}@keyframes _rotateImg_hsosf_1{to{transform:rotate(360deg)}}._playBtns_hsosf_89{margin-left:7.29167vw;display:flex;align-items:center}._playBtns_hsosf_89 .n-button{width:40Px;height:40Px}._playBtns_hsosf_89 .n-button img{width:100%;height:100%}._playBtns_hsosf_89 ._playBtn_hsosf_89{width:50Px;height:50Px;margin:0 2.5vw;background:linear-gradient(to right bottom,#44CAFE,#007AFE)}._playBtns_hsosf_89 ._playBtn_hsosf_89 img{display:block}._timeWrap_hsosf_111{flex:1;display:flex;align-items:center;margin-left:4.58333vw}._timeWrap_hsosf_111 ._timeProgress_hsosf_117{margin-right:1.25vw;border-radius:6Px;--n-rail-height: 8Px !important}._timeWrap_hsosf_111 ._time_hsosf_111{width:90Px;white-space:nowrap;flex-shrink:0}._audioAnimate_29dwa_1{position:absolute;left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.6);display:flex;justify-content:center;align-items:flex-end;padding-bottom:30%}._audioAnimate_29dwa_1 div{width:.26042vw;height:1.04167vw;background:linear-gradient(135deg,#34FFC5 0%,#1BD2FF 100%);transform-origin:bottom;border-radius:.26042vw .26042vw 0 0;margin:0 .10417vw}._audioAnimate_29dwa_1 div:nth-child(1){animation:_musicWave_29dwa_1 .5s infinite linear both alternate}._audioAnimate_29dwa_1 div:nth-child(2){animation:_musicWave_29dwa_1 .2s infinite linear both alternate}._audioAnimate_29dwa_1 div:nth-child(3){animation:_musicWave_29dwa_1 .6s infinite linear both alternate}._audioAnimate_29dwa_1 div:nth-child(4){animation:_musicWave_29dwa_1 .3s infinite linear both alternate}@keyframes _musicWave_29dwa_1{0%{height:5px}to{height:20px}}\n",document.head.appendChild(T);const W="_container_1n0wf_1",z="_separator_1n0wf_32",D="_wrap_1n0wf_36",N="_content_1n0wf_42",U="_tools_1n0wf_49",R="_contentWrap_1n0wf_59",E="_musicList_1n0wf_65",$="_wrapList_1n0wf_76",G="_empty_1n0wf_83",O="_itemContainer_1n0wf_89",X="_item_1n0wf_89",q="_active_1n0wf_110",K="_arrow_1n0wf_113",M="_img_1n0wf_116",Y="_title_1n0wf_137",H="_titleName_1n0wf_144",J="_titleDes_1n0wf_151",Q="_btn_1n0wf_161",V="_showPlayLoading_1n0wf_183",Z="_loadingWrap_1n0wf_186",ee="_musicStaff_1n0wf_191",te="_goBtn_1n0wf_207",ie="_favitor_1n0wf_215",ae="_musicName_1n0wf_233",ne="_staffImgs_1n0wf_241",se=""+new URL("icon_back-57d35e72.svg",t.meta.url).href,oe=""+new URL("icon_separator-7cca8458.svg",t.meta.url).href,le=""+new URL("icon_arrow-b4fee1f7.svg",t.meta.url).href,re=""+new URL("icon_play-43b52923.svg",t.meta.url).href,_e=""+new URL("icon_pause-6dbc64e3.svg",t.meta.url).href,de=""+new URL("icon_goXiaoku-c05e1880.svg",t.meta.url).href,fe={container:"_container_hsosf_1",hidden:"_hidden_hsosf_15",item:"_item_hsosf_19",img:"_img_hsosf_25",rotateImg:"_rotateImg_hsosf_1",svgcontainer:"_svgcontainer_hsosf_50",progress:"_progress_hsosf_55",title:"_title_hsosf_66",titleName:"_titleName_hsosf_70",titleDes:"_titleDes_hsosf_77",playBtns:"_playBtns_hsosf_89",playBtn:"_playBtn_hsosf_89",timeWrap:"_timeWrap_hsosf_111",timeProgress:"_timeProgress_hsosf_117",time:"_time_hsosf_111"},ce=""+new URL("icon_pre-20929b0c.svg",t.meta.url).href,me=""+new URL("icon_next-7dc20456.svg",t.meta.url).href,he=i({name:"playItem",props:{item:{type:Object,default:()=>({})},show:{type:Boolean,default:!1},playState:{type:String,default:"pause"}},emits:["change"],setup(e,{emit:t}){let i=null;const c=a({isFirst:!0,duration:0,currentTime:0}),m=n(),h=()=>{c.duration=m.value.duration,c.isFirst?c.isFirst=!1:"play"===e.playState&&m.value.play()},g=s((()=>`${o(c.currentTime)} / ${o(c.duration)}`));return l((()=>e.playState),(e=>{"play"===e?m.value.play():m.value.pause()})),()=>r("div",{class:[fe.container,e.show?fe.show:fe.hidden]},[r("div",{class:[fe.item]},[r("div",{class:fe.img},[r(_,{lazy:!0,objectFit:"cover",previewDisabled:!0,src:e.item.titleImg,onLoad:e=>{e.target.dataset.loaded="true"}},null),r("svg",{class:fe.svgcontainer},[r("defs",null,[r("linearGradient",{id:"GradientProgress"},[r("stop",{"stop-color":"#5BECFF",offset:"0%"},null),r("stop",{"stop-color":"#259CFE",offset:"100%"},null)])])]),r(d,{type:"circle",class:fe.progress,showIndicator:!1,percentage:c.currentTime/c.duration*100},null)]),r("div",{class:fe.title},[r("div",{class:fe.titleName},[r(A,{text:e.item.musicSheetName},null)]),r("div",{class:fe.titleDes},[e.item.composer])]),r("div",{class:fe.playBtns},[r(f,{color:"rgba(246,246,246,1)",circle:!0,bordered:!1,onClick:()=>t("change","pre")},{default:()=>[r("img",{src:ce},null)]}),r(f,{color:"rgba(57,130,246,1)",class:fe.playBtn,circle:!0,bordered:!1,onClick:()=>t("change","pause"===e.playState?"play":"pause")},{default:()=>[r("img",{style:{display:"pause"===e.playState?"":"none",transform:"scale(1.5) translateX(1Px)"},src:re},null),r("img",{style:{display:"play"===e.playState?"":"none",transform:"scale(1.5)"},src:_e},null)]}),r(f,{color:"rgba(246,246,246,1)",circle:!0,bordered:!1,onClick:()=>t("change","next")},{default:()=>[r("img",{src:me},null)]})]),r("div",{class:fe.timeWrap},[r(L,{tooltip:!1,step:.01,class:fe.timeProgress,value:c.currentTime,max:c.duration,"onUpdate:value":t=>(t=>{m.value.pause(),c.currentTime=t,clearTimeout(i),i=setTimeout((()=>{m.value.currentTime=t,"play"===e.playState&&m.value.play(),i=null}),300)})(t)},null),r("div",{class:fe.time},[g.value]),r("audio",{ref:m,src:e.item.audioFileUrl||e.item.metronomeUrl,onLoadedmetadata:h,onTimeupdate:()=>{i||(c.currentTime=m.value.currentTime)}},null)])])])}}),ge="_audioAnimate_29dwa_1",ue=i({name:"playLoading",setup:()=>()=>r("div",{class:ge},[r("div",null,null),r("div",null,null),r("div",null,null),r("div",null,null)])});e("default",i({name:"XiaokuMusic",setup(){const e=c(),t=m(),i=h(),o=a({page:1,rows:20,status:!0,keyword:"",musicSheetCategoriesId:t.query.id||""}),l=a({loading:!1,finshed:!1,reshing:!1,tags:[],tagIndex:0,list:[],listActive:0,playState:"pause",showPlayer:!1}),d=async()=>{l.loading=!0;let e={};try{e=await j({...o,musicSubject:l.tagIndex?l.tagIndex:""})}catch(t){console.log(t)}l.reshing&&(l.list=[],l.reshing=!1),200===e?.code&&Array.isArray(e?.data?.rows)&&(l.list=[...l.list,...e.data.rows],l.finshed=e.data.rows.length<o.rows,console.log("🚀 ~ data.finshed:",l.finshed)),l.loading=!1},L=()=>{o.page=1,l.finshed=!1,d()},T=n();g((async()=>{(async()=>{const e=await B();Array.isArray(e?.data)&&(l.tags=[{name:"全部",id:0},...e.data])})(),await d();const e=new IntersectionObserver((e=>{e[0].intersectionRatio>0&&(console.log(l.finshed),l.loading||l.finshed||(o.page=o.page+1,d()))}));u((()=>{e.observe(T.value)}))}));const fe=s((()=>l.list[l.listActive]||{})),ce=()=>{l.list[l.listActive].delFlag=!l.list[l.listActive].delFlag},me=e=>{const t=l.list.findIndex((t=>t.id===e.id));t>-1&&(l.listActive===t?l.playState="play"===l.playState?"pause":"play":l.playState="play",l.showPlayer=!0,l.listActive=t)},ge=e=>{"play"===e?l.playState="play":"pause"===e?l.playState="pause":"pre"===e?l.list[l.listActive-1]&&me(l.list[l.listActive-1]):"next"===e?l.list[l.listActive+1]&&me(l.list[l.listActive+1]):"favitor"===e&&ce()};return()=>{let a;return r("div",{class:W},[r(p,{align:"center",wrapItem:!1,size:16},{default:()=>[r("img",{style:{cursor:"pointer"},src:se,onClick:()=>i.push({path:"/xiaoku-ai"})},null),r(w,{separator:""},{default:()=>[r(v,{onClick:()=>i.push({path:"/xiaoku-ai"})},{default:()=>[x("曲谱列表")]}),r("img",{class:z,src:oe},null),r(v,null,{default:()=>[t.query.name]})]})]}),r("div",{class:D,style:{paddingBottom:l.showPlayer?"108Px":""}},[r("div",{class:N},[r("div",{class:U},[r(p,{style:{width:"100%"},size:[24,12],wrapItem:!1},(n=a=l.tags.map((e=>r(f,{round:!0,textColor:l.tagIndex===e.id?"#fff":"#000",color:l.tagIndex===e.id?"#198CFE":"#fff",onClick:()=>{l.tagIndex=e.id,l.reshing=!0,L()}},{default:()=>[e.name]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!S(n)?a:{default:()=>[a]})),r(F,{style:{marginLeft:"auto"},round:!0,onSearch:e=>{o.keyword=e,l.reshing=!0,L()}},null)]),r("div",{class:R},[r("div",{class:E},[r("div",{class:$},[l.list.map(((e,t)=>r("div",{class:O},[r("div",{class:[X,l.listActive===t&&q],onClick:()=>(e=>{const t=l.list.findIndex((t=>t.id===e.id));t>-1&&(l.listActive=t)})(e)},[r("div",{class:M},[r(_,{lazy:!0,objectFit:"cover",previewDisabled:!0,src:e.titleImg,onLoad:e=>{e.target.dataset.loaded="true"}},null),r(ue,{class:[l.listActive===t&&"play"===l.playState?"":V]},null)]),r("div",{class:Y},[r("div",{class:H},[r(A,{text:e.musicSheetName},null)]),r("div",{class:J},[e.composer])]),r(f,{color:"#259CFE",textColor:"#fff",round:!0,class:Q,type:"primary",onClick:t=>{t.stopPropagation(),me(e)}},{default:()=>[x("试听"),r("img",{src:l.listActive===t&&"play"===l.playState?_e:re},null)]}),r("img",{class:K,src:le},null)])]))),!l.finshed&&r("div",{ref:T,class:Z},[r(y,{show:!0},null)]),!l.loading&&0===l.list.length&&r("div",{class:G},[r(b,null,null)])])]),r("div",{class:ee},[r("div",{class:ae},[fe.value.musicSheetName]),r("img",{style:{display:fe.value.id?"":"none"},class:te,src:de,onClick:()=>{ge("pause");const t=`${/(localhost|192)/.test(location.host)?"https://test.lexiaoya.cn":location.origin}/instrument?platform=pc&id=${fe.value.id}&Authorization=${e.getToken}`;window.open(t)}},null),r("div",{style:{display:fe.value.id?"":"none"},class:ie,onClick:()=>ce()},[r(P,{name:"favitor",mode:"out-in"},{default:()=>[fe.value.delFlag?r("img",{src:C,key:"1"},null):r("img",{src:I,key:"2"},null)]})]),r("div",{class:ne},[r(k,{name:"van-fade"},{default:()=>[fe.value?.firstTone?.split(",").map(((e,t)=>r("img",{src:e,key:e},null)))]})])])])])]),r(he,{show:l.showPlayer,playState:l.playState,item:fe.value,onChange:e=>ge(e)},null)]);var n}}}))}}}));