1 |
- !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){n(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw i}}}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(c){u=!0,a=c}finally{try{i||null==n.return||n.return()}finally{if(u)throw a}}return o}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n,r,a,o,i){try{var u=e[o](i),c=u.value}catch(s){return void n(s)}u.done?t(c):Promise.resolve(c).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){u(o,r,a,i,c,"next",e)}function c(e){u(o,r,a,i,c,"throw",e)}i(void 0)}))}}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var f=document.createElement("style");f.innerHTML="._container_1fh7z_1{min-height:17.73333rem}._musicSheet_1fh7z_4{padding-top:.13333rem;background:#fff}._musicSheet_1fh7z_4 img{display:none!important}._btn_1fh7z_11{position:fixed;bottom:.4rem;z-index:9;left:50%;transform:translate(-50%)}._btn_1fh7z_11 ._btnCont_1fh7z_18{height:auto;padding:0;background-color:transparent;border:none}\n",document.head.appendChild(f),System.register(["./App-legacy.a7c1546c.js","./lib-flexible-legacy.e8ca3d6a.js","./index-legacy.f25f109a.js","./index-legacy.baf8f8e7.js","./index-legacy.640d8697.js"],(function(){"use strict";var e,o,i,u,s,f,p,v,d,b,h,m,g,y,x,w,k,S,_,O,j,R,P,M,z,C,E,T,F,A,D;return{setters:[function(t){e=t.a0,o=t.a1,i=t.u,u=t.d,s=t.r,f=t.w,p=t.h,v=t.a,d=t.i,b=t.j,h=t.S,m=t.E,g=t.M,y=t.W,x=t.B,w=t.k,k=t.o,S=t.l,_=t.a2,O=t.m,j=t.n,R=t.p,P=t.q,M=t.v,z=t.x,C=t.y,E=t.z,T=t.C,F=t.D,A=t.c},function(){},function(){},function(e){D=e.P},function(){}],execute:function(){var I={container:"_container_1fh7z_1",musicSheet:"_musicSheet_1fh7z_4",btn:"_btn_1fh7z_11",btnCont:"_btnCont_1fh7z_18"};window.OffscreenCanvas||(window.OffscreenCanvas=l((function e(t,n){var r=this;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.canvas=document.createElement("canvas"),this.canvas.width=t,this.canvas.height=n,this.canvas.convertToBlob=function(){return new Promise((function(e){r.canvas.toBlob(e)}))},this.canvas})));var B=e.offscreen();function L(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){return t(r.result)},r.readAsDataURL(e)}))}function N(e,t,n){return U.apply(this,arguments)}function U(){return(U=c(regeneratorRuntime.mark((function e(t,n,r){var a,i,u,c,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new OffscreenCanvas(n,r),(i=a.getContext("2d")).fillStyle="#FFFFFF",e.next=5,o.fromString(i,t,B);case 5:return(u=e.sent).resize(2*n,2*r,"xMidYMid meet"),e.next=9,u.start();case 9:return e.next=11,a.convertToBlob();case 11:return c=e.sent,e.next=14,L(c);case 14:return s=e.sent,e.abrupt("return",s);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var X=i();console.log(X,"search");var W=function(){var e=c(regeneratorRuntime.mark((function e(t,n){var r,a,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(t);case 2:return r=e.sent,a=s(""),o=M(r),a.value=z(o.parsedXML,{title:n.musicSheetName}),i=Number(X["part-index"])||0,a.value=C(a.value,i),e.abrupt("return",a);case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),H=u({name:"ColexiuWebSite",setup:function(){var e=s(!0),o=s(!1),i=s(""),u=function(e){var t=s("loading"),n=s({}),r=s({});return k(c(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.value="loading",e.prev=1,e.next=4,S.get("/open/music/sheet/detail/".concat(X.id),{prefix:"/api-website"});case 4:r=e.sent,n.value=r.data,b.partIndex=0,t.value="success",e.next=14;break;case 10:e.prev=10,e.t0=e.catch(1),t.value="error",console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])})))),[t,n,r]}(X.id),l=a(u,3),P=l[0],M=l[1],z=l[2],C=new _(650,884);f(P,c(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("success"!==P.value||!M.value.xmlFileUrl){e.next=5;break}return e.next=3,W(M.value.xmlFileUrl,M.value);case 3:t=e.sent,i.value=t.value;case 5:case"end":return e.stop()}}),e)})))),p();var F=function(){var e=c(regeneratorRuntime.mark((function e(t){var n,a,o,i,u,c,s,l,f,p,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=22;break}n=r(t.Drawer.Backends),e.prev=2,n.s();case 4:if((a=n.n()).done){e.next=14;break}return o=a.value,i=o.ctx,u=i.state,c=i.width,s=i.height,l=u.scale,f=l.x,p=l.y,v=(new XMLSerializer).serializeToString(o.ctx.svg),e.next=11,N(v,c/f,s/p);case 11:return e.abrupt("return",e.sent);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),n.e(e.t0);case 19:return e.prev=19,n.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[2,16,19,22]])})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=c(regeneratorRuntime.mark((function e(t){var n,r,a,o,i,u,c,s,l,f,p,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=18;break}if(n=[],!(t.Drawer.Backends.length>0)){e.next=18;break}r=0,a=t.Drawer.Backends.length;case 4:if(!(r<a)){e.next=17;break}return o=t.Drawer.Backends[r],i=o.ctx,u=i.state,c=i.width,s=i.height,l=u.scale,f=l.x,p=l.y,v=(new XMLSerializer).serializeToString(o.ctx.svg),e.t0=n,e.next=12,N(v,c/f,s/p);case 12:e.t1=e.sent,e.t0.push.call(e.t0,e.t1);case 14:r++,e.next=4;break;case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),B=function(){var a=c(regeneratorRuntime.mark((function a(o){var i,u,c,s,l,f,p,v,d,h,m,g;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!window.parent){a.next=13;break}if("multiple"!==X.pageType){a.next=7;break}return a.next=4,A(o);case 4:a.t0=a.sent,a.next=10;break;case 7:return a.next=9,F(o);case 9:a.t0=a.sent;case 10:i=a.t0,console.log(i,"img"),window.parent.postMessage(i,"*");case 13:if(O.osmd=o,u=j(o),e.value=!1,c=function(e,r){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=E(e);b.evaluatings=t(t({},b.evaluatings),{},n({},o.measureIndex,t(t(t({},o),T(r.score)),{},{score:r.score,dontTransition:a})))},!z.value.userMeasureScore){a.next=64;break}a.t1=regeneratorRuntime.keys(z.value.userMeasureScore);case 19:if((a.t2=a.t1()).done){a.next=64;break}if(s=a.t2.value,!Object.prototype.hasOwnProperty.call(z.value.userMeasureScore,s)){a.next=62;break}l=z.value.userMeasureScore[s],f=r(u),a.prev=24,f.s();case 26:if((p=f.n()).done){a.next=54;break}if(v=p.value,l.measureRenderIndex!=v.noteElement.sourceMeasure.MeasureNumberXML-1){a.next=52;break}if(v.noteElement.tie){a.next=33;break}c(v,l),a.next=52;break;case 33:d=r(v.noteElement.tie.notes),a.prev=34,d.s();case 36:if((h=d.n()).done){a.next=44;break}if(m=h.value,g=R(m)){a.next=41;break}return a.abrupt("continue",42);case 41:c(g,l,m!==v.noteElement.tie.StartNote);case 42:a.next=36;break;case 44:a.next=49;break;case 46:a.prev=46,a.t3=a.catch(34),d.e(a.t3);case 49:return a.prev=49,d.f(),a.finish(49);case 52:a.next=26;break;case 54:a.next=59;break;case 56:a.prev=56,a.t4=a.catch(24),f.e(a.t4);case 59:return a.prev=59,f.f(),a.finish(59);case 62:a.next=19;break;case 64:case"end":return a.stop()}}),a,null,[[24,56,59,62],[34,46,49,52]])})));return function(e){return a.apply(this,arguments)}}(),L=function(){o.value=!0,e.value=!1};return function(){var t,n,r=e.value||"loading"===P.value,a=o.value||"error"===P.value;return v("div",{class:[d.container,w.sett.eyeProtection&&"eyeProtection",w.sett.camera&&"openCamera"]},[v("div",{id:"colexiu-detail-music-sheet",class:[d.musicSheet,I.musicSheet],style:{paddingLeft:b.isSpecialShapedScreen?b.notchHeight/2+"px":"auto"}},[r&&!a&&v(h,{class:d.skeleton,rowWidth:"80%",title:!0,row:15},null),a&&v(m,null,null),i.value&&v(g,{score:i.value,opotions:{drawTitle:!1,drawComposer:!1,drawLyricist:!1,drawMetronomeMarks:!0,drawMeasureNumbers:!0},EngravingRules:"multiple"===X.pageType?{PageFormat:C}:{},onRerender:B,onRenderError:L},null)]),null!==(t=z.value)&&void 0!==t&&t.videoFilePath&&0===(null===(n=z.value)||void 0===n?void 0:n.expire)?v(D,y(z.value,{btnClass:I.btn,popupClass:I.popup}),{default:function(){return[v(x,{class:I.btnCont},{default:function(){return[v("img",{src:ReplayIcon},null)]}})]}}):null])}}});F(),A(H).mount("#app")}}}))}();
|