index-legacy.419659e9.js 5.9 KB

1
  1. !function(){function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function n(n){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach((function(e){t(n,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(!e)return;if("string"==typeof e)return o(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,n)}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);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,s=!0,c=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==t.return||t.return()}finally{if(c)throw i}}}}function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function a(e,n,t,r,o,a,i){try{var s=e[a](i),c=s.value}catch(u){return void t(u)}s.done?n(c):Promise.resolve(c).then(r,o)}function i(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function s(e){a(i,r,o,s,c,"next",e)}function c(e){a(i,r,o,s,c,"throw",e)}s(void 0)}))}}System.register(["./App-legacy.e9a3d8ec.js"],(function(e){"use strict";var t,o,a,s,c,u,l,f,d,g;return{setters:[function(e){t=e.d,o=e.f,a=e.R,s=e._,c=e.U,u=e.j,l=e.a,f=e.V,d=e.q,g=e.y}],execute:function(){var m=t({name:"music-score",props:{score:{type:String,default:""},showPartNames:{type:Boolean,default:!1},onRerender:{type:Function,default:function(){}},opotions:{type:Object,default:function(){}},EngravingRules:{type:Object,default:function(){}}},data:function(){return{osmd:null,loading:!1}},watch:{score:function(){this.loadRender()}},methods:{loadRender:function(){var e=this;return i(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.loading=!0,!e.score){n.next=15;break}return n.prev=2,n.next=5,e.osmd.load(e.score);case 5:return e.osmd.zoom=o(),n.next=8,e.osmd.render();case 8:e.onRerender(null),n.next=15;break;case 11:n.prev=11,n.t0=n.catch(2),console.log(n.t0),e.onRerender(null);case 15:a.emit("loaded"),e.loading=!1;case 17:case"end":return n.stop()}}),n,null,[[2,11]])})))()},noteClickEvent:function(e){a.emit("container-click",e);var n,t=r(e.path||e.composedPath&&e.composedPath());try{for(t.s();!(n=t.n()).done;){var o=n.value;o.classList&&o.classList.contains("vf-stavenote")&&a.emit("click",e,o)}}catch(i){t.e(i)}finally{t.f()}}},beforeUnmount:function(){var e;null===(e=this.$refs.container)||void 0===e||e.removeEventListener("touchstart",this.noteClickEvent,!1)},mounted:function(){var e=this;return i(regeneratorRuntime.mark((function t(){var r,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log(e.$refs.container),e.$refs.container.addEventListener("touchstart",e.noteClickEvent,!1),t.next=4,s();case 4:return t.next=6,new c(e.$refs.container,n({followCursor:!1,autoResize:!0,drawSubtitle:!1,drawTitle:!1,autoBeam:!0,drawMetronomeMarks:!1,drawMeasureNumbers:!1,drawComposer:!1,drawLyricist:!1,drawPartNames:e.showPartNames},e.opotions));case 6:for(o in e.osmd=t.sent,e.osmd.EngravingRules.CompactMode=!0,e.osmd.EngravingRules.DYMinNoteWidth=3,e.osmd.EngravingRules.VoiceSpacingMultiplierVexflow=.65,e.osmd.EngravingRules.VoiceSpacingAddendVexflow=2,e.osmd.EngravingRules.MinSkyBottomDistBetweenStaves=2,e.osmd.EngravingRules.MinSkyBottomDistBetweenSystems=2,e.osmd.EngravingRules.MinimumStaffLineDistance=4,e.osmd.EngravingRules.BetweenStaffDistance=2.5,e.osmd.EngravingRules.StaffDistance=3.5,e.osmd.EngravingRules.MinimumDistanceBetweenSystems=1,e.osmd.EngravingRules.PageBottomMargin=0,e.osmd.EngravingRules.PageLeftMargin=2,e.osmd.EngravingRules.PageRightMargin=2,e.osmd.EngravingRules.PageTopMarginNarrow=3,e.osmd.EngravingRules.WedgeEndDistanceBetweenTimestampsFactor=1,e.osmd.rules.RehearsalMarkXOffset=-18,e.osmd.rules.RehearsalMarkYOffset=10,e.osmd.EngravingRules.DYWorkId=(null===(r=u.activeDetail)||void 0===r?void 0:r.parentCategoriesId)||0,e.EngravingRules)Object.prototype.hasOwnProperty.call(e.EngravingRules,o)&&(a=e.EngravingRules[o],e.osmd.EngravingRules[o]=a);console.log(null,e.$refs.container),e.loadRender();case 28:case"end":return t.stop()}}),t)})))()},render:function(){return l("div",{class:f.container,ref:"container"},null)}}),v={};console.log(v);e("default",t({name:"RenderTest",data:function(){return{scores:[]}},mounted:function(){var e=this;return i(regeneratorRuntime.mark((function n(){var t,r,o,a,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=[],r=0,o=Object.keys(v);case 2:if(!(r<o.length)){n.next=11;break}return a=o[r],n.next=6,d(a);case 6:i=n.sent,t.push(g(i,0));case 8:r++,n.next=2;break;case 11:console.log(t),e.scores=t;case 13:case"end":return n.stop()}}),n)})))()},render:function(){return this.scores.map((function(e,n){return l(m,{key:n,score:e,opotions:{drawMetronomeMarks:!0,drawTitle:!0},EngravingRules:{DYContainerId:"dy-container1",DYSVGContainerId:"dy-svg-container1"}},null)}))}}))}}}))}();