1 |
- var $=Object.defineProperty,J=Object.defineProperties;var Z=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var W=(i,t,n)=>t in i?$(i,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[t]=n,T=(i,t)=>{for(var n in t||(t={}))ee.call(t,n)&&W(i,n,t[n]);if(P)for(var n of P(t))te.call(t,n)&&W(i,n,t[n]);return i},k=(i,t)=>J(i,Z(t));import{D as ae,p as v,d as j,y as le,c as e,f as a,B as se,F as L,P as Y,A as oe,u as ne,v as M,b as _,E as ue,r as U,C as re,K as ie,g as ce,n as de}from"./base.d7a641ab.js";import{s as O}from"./index.module.bb7c4c94.js";/* empty css */import{u as K,Q as G,R as A,y as pe,E as Ae,M as me,r as X,G as ve,T as fe,U as he,V as Fe,W as ge,X as ye,Y as Ce}from"./index.181476b5.js";import{h as Ee,N as m,c as N}from"./index.d46fada7.js";import{s as Se}from"./state.401ef5ef.js";import{w as xe}from"./wx_bg.fc243df2.js";import{S as Ne}from"./index.8a8e6a58.js";import"./TransposeCalculator.3ece0f8f.js";import"./index.7de565cb.js";import"./index.6829aadf.js";import"./index.b892a4d8.js";import"./music.b35eb5be.js";import"./index.aaf143c8.js";import"./index.31e4ae2e.js";function je(){import("data:text/javascript,")}const _e="_musicSheet_wp4zc_1",we="_btn_wp4zc_8",Ie="_btnCont_wp4zc_15",be="_popup_wp4zc_21";var Be={musicSheet:_e,btn:we,btnCont:Ie,popup:be};const De="_header_15pat_1",Te="_center_15pat_4",Oe="_info_15pat_20",Le="_demos_15pat_29",Re="_maininfo_15pat_52",ke="_line_15pat_103",Me="_back_15pat_117",Ge="_btns_15pat_124",He="_pop_15pat_130",qe="_close_15pat_166",Pe="_trybtn_15pat_187";var F={header:De,center:Te,info:Oe,demos:Le,maininfo:Re,line:ke,back:Me,btns:Ge,pop:He,close:qe,try:"_try_15pat_181",trybtn:Pe},We="./assets/explain.9e197a0a.svg",Ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAAHeq0ewAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAC6ADAAQAAAABAAAACwAAAACBvloGAAABH0lEQVQYGW1Ru0oDURA9s27EQrETEbv8g3+RSgub7IoELASF7CYGbbYQFHLjB4gI2WAT8LPEWjCd7Hjm3t1VwWnmdeacmXsFo3SMSi9iqF4CuodgRRGLj7K+YqvbAbLkru4hYrAD69CY6Ckgz1gu1wR5ck+qK1/wDUJmC4ngyonBA9o8J/410vg2qd4wne9DRDFKrqFYl0aVxQfqDIl8FAYmXHk6wSvc4ijC+GTa8isODRShqjJ4RGlHgOd/whZvkXVgfO8c2Q05d3XzQdgkdZ7FGoIVDnrb9QLp089xNU3jTHKze4yi+ArPao08mdUnNDD6X0qWIe/f8PDbFmFMKh9/lOwtXJnFxHcguuLACz/t3OT8oOqAlzoOnTHfsNo35fxqh9SRnu4AAAAASUVORK5CYII=";const Q=ae(),V=K(),h=v("pitch"),w=v(!1),z=v(!1);var Ue=j({name:"ColexiuReportHeader",props:{detail:{type:Object},record:{type:Object},className:{type:String}},emits:["activeChange"],setup(i,{emit:t,expose:n}){return n({autoShow:()=>{localStorage.getItem("explain-view")!="1"&&(w.value=!0,setTimeout(()=>{w.value=!1,localStorage.setItem("explain-view","1")},5e3))}}),()=>{var y,b;const{detail:g,record:o}=le(i),E=()=>{var B,D;const{origin:r}=location;let I=r+"/student/#/music-detail";I+=`?id=${(D=(B=o.value)==null?void 0:B.musicalNotesPlayStats)==null?void 0:D.examSongId}`;const x={url:I,action:V.action||"h5",pageTag:V.pageTag||1},R=encodeURIComponent(JSON.stringify(x));/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.location.href=`ColexiuStudent://linkUrl=${R}`:/(Android)/i.test(navigator.userAgent)?(x.url=encodeURIComponent(x.url),window.location.href=`colexiustudent://html:8888/SplashActivity?url=${encodeURIComponent(JSON.stringify(x))}`):oe("\u8BF7\u7528\u624B\u673A\u6216\u79FB\u52A8\u8BBE\u5907\u6253\u5F00")},S=()=>{Q.weixin?z.value=!0:(E(),Q.isApp||setTimeout(()=>{location.href=location.origin+"/student/#/download"},3e3))};return e("header",{class:[F.header,F.className]},[e("div",{class:F.info},[o.value&&((y=o.value)==null?void 0:y.heardLevel)?e(G,{class:F.center,columnNum:5},{default:()=>[e(A,{class:"van-hairline--right"},{text:()=>e("span",null,[a("\u96BE\u5EA6")]),icon:()=>{var r;return e("span",null,[Ee[(r=o.value)==null?void 0:r.heardLevel]])}}),e(A,{class:"van-hairline--right"},{text:()=>e("span",null,[a("\u8BC4\u6D4B\u5206\u6570")]),icon:()=>{var r;return e("span",null,[(r=o.value)==null?void 0:r.score,a("\u5206")])}}),e(A,{class:"van-hairline--right",onClick:()=>{h.value="pitch",t("activeChange","pitch")}},{text:()=>e("span",{class:["switch",{active:h.value==="pitch"}]},[a("\u97F3\u51C6")]),icon:()=>{var r;return e("span",{style:{color:"#2DC7AA"}},[(r=o.value)==null?void 0:r.intonation,a("\u5206")])}}),e(A,{class:"van-hairline--right",onClick:()=>{h.value="rhythm",t("activeChange","rhythm")}},{text:()=>e("span",{class:["switch",{active:h.value==="rhythm"}]},[a("\u8282\u594F")]),icon:()=>{var r;return e("span",{style:{color:"#FF4E19"}},[(r=o.value)==null?void 0:r.cadence,a("\u5206")])}}),e(A,{onClick:()=>{h.value="completion",t("activeChange","completion")}},{text:()=>e("span",{class:["switch",{active:h.value==="completion"}]},[a("\u65F6\u503C")]),icon:()=>{var r;return e("span",{style:{color:"#FFC459"}},[(r=o.value)==null?void 0:r.integrity,a("\u5206")])}})]}):null,e(G,{columnNum:3,class:F.btns},{default:()=>[e(A,{onClick:()=>w.value=!0},{text:()=>e("span",null,[a("\u91CA\u4E49")]),icon:()=>e("img",{src:We},null)})]})]),(b=o.value)!=null&&b.score?e("div",{class:F.try},[e(se,{class:F.trybtn,onClick:S},{default:()=>[a("\u6211\u6765\u8BD5\u4E00\u8BD5")]})]):null,o.value?e("div",{class:F.demos},[h.value==="pitch"&&e(L,null,[e("div",null,[e(m,{fill:"#FFAB25",shadow:!0,x:-3,y:0},null),e("span",null,[a("\u97F3\u9AD8\u4E86")])]),e("div",null,[e(m,{fill:"#FFAB25",shadow:!0,x:-1,y:-2},null),e("span",null,[a("\u97F3\u4F4E\u4E86")])])]),Se.isPercussion?null:e(L,null,[h.value==="rhythm"&&e(L,null,[e("div",null,[e(m,{fill:"#FF4444",shadow:!0,x:0},null),e("span",null,[a("\u8282\u594F\u5FEB\u4E86")])]),e("div",null,[e(m,{fill:"#FF4444",shadow:!0,x:-3,y:-2},null),e("span",null,[a("\u8282\u594F\u6162\u4E86")])])]),h.value==="completion"&&e("div",null,[e(m,{fill:"#CC75FF"},null),e("span",null,[a("\u65F6\u503C\u4E0D\u8DB3")])])])]):null,e(Y,{show:z.value,position:"top",style:{background:"none"}},{default:()=>[e("img",{src:xe,style:{width:"80%",display:"block",margin:"auto"}},null)]}),e(Y,{teleport:"body",show:w.value,class:F.pop,style:{width:"60vw"},onClickOverlay:()=>w.value=!1},{default:()=>[e("div",{class:F.close,onClick:()=>w.value=!1},[e("img",{src:Ye},null)]),e("h2",null,[a("\u56FE\u6807\u91CA\u4E49")]),e(G,{columnNum:2,class:F.btns,border:!1},{default:()=>[e(A,null,{text:()=>e("span",null,[a("\u7EFF\u8272\u97F3\u7B26\uFF1A\u6F14\u594F\u6B63\u786E")]),icon:()=>e(m,{fill:"#01C1B5"},null)}),e(A,null,{text:()=>e("span",null,[a("\u7EA2\u8272\u97F3\u7B26\uFF1A\u9519\u97F3")]),icon:()=>e(m,{fill:"#FF4444"},null)}),e(A,null,{text:()=>e("span",null,[a("\u97F3\u7B26\u91CD\u5F71(\u7EA2\u8272\u5728\u524D)\uFF1A\u8282\u594F\u8FC7\u5FEB")]),icon:()=>e(m,{fill:"#FF4444",shadow:!0,x:0},null)}),e(A,null,{text:()=>e("span",null,[a("\u97F3\u7B26\u91CD\u5F71(\u7EA2\u8272\u5728\u540E)\uFF1A\u8282\u594F\u6162\u4E86")]),icon:()=>e(m,{fill:"#FF4444",shadow:!0,x:-3,y:-2},null)}),e(A,null,{text:()=>e("span",null,[a("\u97F3\u7B26\u91CD\u5F71(\u9EC4\u8272\u5728\u4E0A)\uFF1A\u97F3\u9AD8\u4E86")]),icon:()=>e(m,{fill:"#FFAB25",shadow:!0,x:-3,y:0},null)}),e(A,null,{text:()=>e("span",null,[a("\u97F3\u7B26\u91CD\u5F71(\u9EC4\u8272\u5728\u4E0B)\uFF1A\u97F3\u4F4E\u4E86")]),icon:()=>e(m,{fill:"#FFAB25",shadow:!0,x:-1,y:-2},null)}),e(A,null,{text:()=>e("span",null,[a("\u7D2B\u8272\u97F3\u7B26\uFF1A\u5B8C\u6574\u5EA6\u4E0D\u8DB3")]),icon:()=>e(m,{fill:"#CC75FF"},null)}),e(A,null,{text:()=>e("span",null,[a("\u7070\u8272\u97F3\u7B26\uFF1A\u672A\u6F14\u594F")]),icon:()=>e(m,{fill:"#AEAEAE"},null)})]})]})])}}});const H=K(),Xe=async(i,t)=>{const n=await re(i);let p=v("");const g=ge(n);p.value=ye(g.parsedXML,{title:t.musicSheetName});const o=Number(H["part-index"])||0;return p.value=Ce(p.value,o),p},Qe=i=>{const t=v("loading"),n=v({}),p=v({});return ue(async()=>{var g;t.value="loading";try{const o=await U.get("/sysMusicRecord/getLastEvaluationMusicalNotesPlayStats",{params:{recordId:H.id}});if(!o.data){t.value="error";return}p.value=o.data,console.log(p.value);const E=await U.get(`/music/sheet/detail/${(g=p.value)==null?void 0:g.musicalNotesPlayStats.examSongId}`);n.value=E.data,_.partIndex=o.data.partIndex||0,t.value="success"}catch(o){t.value="error",console.log(o)}}),[t,n,p]};var Ve=j({name:"Colexiu",setup(){const i=v(),t=v(!0),n=v(!1),p=v(""),g=v([]),o=v([]),[E,S,y]=Qe(H.id);ne(E,async()=>{if(E.value==="success"&&S.value.xmlFileUrl){const l=await Xe(S.value.xmlFileUrl,S.value);p.value=l.value}}),pe();const b=l=>{switch(l){case"CADENCE_FAST":return"translateX(2px)";case"CADENCE_SLOW":return"translateX(-2px)";case"INTONATION_HIGH":return"translateY(-2px)";case"INTONATION_LOW":return"translateY(2px)";default:return""}},r=()=>{const l=["RIGHT","WRONG","CADENCE_WRONG"];return h.value==="pitch"?l.push("CADENCE_FAST","CADENCE_SLOW"):h.value==="rhythm"?l.push("INTONATION_HIGH","INTONATION_LOW"):h.value==="completion"&&l.push("INTEGRITY_WRONG"),y.value.musicalNotesPlayStats.notesData.filter(c=>l.includes(c.musicalErrorType))},I=()=>{R(),t.value=!1;for(const l of r()){const c=o.value[l.musicalNotesIndex];setTimeout(()=>{if(g.value.includes(c.id))return;g.value.push(c.id);const s=document.getElementById("vf-"+c.id),u=document.getElementById("vf-"+c.id+"-stem"),d=l.musicalErrorType,C=["INTONATION_HIGH","INTONATION_LOW","CADENCE_FAST","CADENCE_SLOW"].includes(d);if(u==null||u.classList.add(N[d]),s==null||s.classList.add(N[d]),s&&C){u==null||u.classList.remove(N[d]),u==null||u.classList.add(N.RIGHT),s==null||s.classList.remove(N[d]),s==null||s.classList.add(N.RIGHT);const f=s.querySelector(".vf-notehead").cloneNode(!0);f.style.transform=b(d),s.style.opacity=".7",u&&(u.style.opacity=".7"),f.id="vf-"+c.id+"-copy",f==null||f.classList.add(N[d]),osmd==null||osmd.container.querySelector("svg").insertAdjacentElement("afterbegin",f)}},300)}},x=l=>{if(!l)return;const c=l.classList.values();for(const s of c)(s==null?void 0:s.indexOf("vf-"))!==0&&l.classList.remove(s)},R=()=>{for(const l of g.value){x(document.getElementById("vf-"+l)),x(document.getElementById("vf-"+l+"-stem"));const c="vf-"+l+"-copy",s=document.getElementById(c);s&&s.remove()}g.value=[]},B=l=>{var s;t.value=!1,(s=i.value)==null||s.autoShow(),setTimeout(()=>{var u;for(const d of Array.from(document.querySelectorAll(".vf-beam")))(u=d.querySelector("path"))==null||u.setAttribute("fill","#aeaeae")}),X.osmd=l,o.value=ve(X.osmd),I();const c=(u,d,C=!0)=>{const f=he(u);_.evaluatings=k(T({},_.evaluatings),{[f.measureIndex]:k(T(T({},f),Fe(d.score)),{score:d.score,dontTransition:C})})};if(y.value.userMeasureScore){for(const u in y.value.userMeasureScore)if(Object.prototype.hasOwnProperty.call(y.value.userMeasureScore,u)){const d=y.value.userMeasureScore[u];for(const C of o.value)if(d.measureRenderIndex==C.noteElement.sourceMeasure.MeasureNumberXML-1)if(!C.noteElement.tie)c(C,d);else for(const f of C.noteElement.tie.notes){const q=fe(f);!q||c(q,d,f!==C.noteElement.tie.StartNote)}}}},D=()=>{n.value=!0,t.value=!1};return()=>{const l=t.value||E.value==="loading",c=n.value||E.value==="error";return e("div",{class:[O.container,M.sett.eyeProtection&&"eyeProtection",M.sett.camera&&"openCamera"]},[e(Ue,{className:O.header,detail:S.value,record:y,ref:i,style:{paddingLeft:_.isSpecialShapedScreen?_.notchHeight/2+"px":"auto"},onActiveChange:()=>I()},null),e("div",{id:"colexiu-detail-music-sheet",class:[O.musicSheet,Be.musicSheet],style:{paddingLeft:_.isSpecialShapedScreen?_.notchHeight/2+"px":"auto"}},[l&&!c&&e(Ne,{class:O.skeleton,rowWidth:"80%",title:!0,row:3},null),c&&e(Ae,null,null),p.value&&e(L,null,[e("h3",{style:{fontSize:"24px",fontWeight:"normal",textAlign:"center",padding:"0 10px",marginTop:"36px",marginBottom:"0px",marginLeft:"auto"},class:"van-ellipsis"},[S.value.musicSheetName]),e(me,{score:p.value,showSection:!0,opotions:{drawTitle:!1,drawComposer:!1,drawLyricist:!1,drawMetronomeMarks:!0,drawMeasureNumbers:!0,autoResize:!1},EngravingRules:{DefaultColorNotehead:"#aeaeae",DefaultColorRest:"#aeaeae",DefaultColorMusic:"#aeaeae",DefaultColorStem:"#aeaeae",DefaultColorChordSymbol:"#aeaeae",DefaultColorLabel:"#aeaeae",DYMusicScoreType:M.sett.type},onRerender:B,onRenderError:D},null)])])])}}});document.body.style.setProperty("--osdm-zoom",""+ie());ce();de(Ve).mount("#app");export{je as __vite_legacy_guard};
|