mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-25 23:11:05 +00:00
1 line
458 KiB
JavaScript
1 line
458 KiB
JavaScript
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,function(){return r={1045:function(e,t,n){var r=n(1185),i=n(6306),a=n(1592),s=n(1028),o=n(5633),c={},r=(c.signature="abcjs-basic v"+r,Object.keys(i).forEach(function(e){c[e]=i[e]}),Object.keys(a).forEach(function(e){c[e]=a[e]}),c.renderAbc=n(6859),c.TimingCallbacks=n(5681),n(6020)),r=(c.setGlyph=r.setSymbol,c.strTranspose=o,n(5594)),o=n(8471),l=n(522),h=n(2029),u=n(6313),d=n(5281),f=n(8702),p=n(5049),m=n(4718),g=n(3450),v=n(562),b=n(9991);c.synth={CreateSynth:r,instrumentIndexToName:o,pitchToNoteName:l,SynthController:g,SynthSequence:h,CreateSynthControl:u,registerAudioContext:d,activeAudioContext:f,supportsAudio:p,playEvent:m,getMidiFile:v,sequence:s,midiRenderer:b},c.Editor=n(5294),c.EditArea=n(2945),e.exports=c},6306:function(e,t,n){var c=n(5681),r={};!function(){"use strict";var s,o;r.startAnimation=function(n,e,r){function i(e){for(var t=0;t<e.length;t++){var n=e[t];n.classList.contains("abcjs-bar")||(n.style.display="none")}}var a;s&&(s.stop(),s=void 0),r.showCursor&&!(o=n.querySelector(".abcjs-cursor"))&&((o=document.createElement("DIV")).className="abcjs-cursor cursor",o.style.position="absolute",n.appendChild(o),n.style.position="relative"),(s=new c(e,{qpm:r.bpm,eventCallback:function(e){var t;e?(e.measureStart&&(t=".abcjs-l"+e.line+".abcjs-m"+e.measureNumber)&&(t=t,r.hideCurrentMeasure?i(n.querySelectorAll(t)):r.hideFinishedMeasures&&(t=t,a&&i(n.querySelectorAll(a)),a=t)),o&&(o.style.left=e.left+"px",o.style.top=e.top+"px",o.style.width=e.width+"px",o.style.height=e.height+"px")):(s.stop(),s=void 0)}})).start()},r.pauseAnimation=function(e){s&&(e?s.pause():s.start())},r.stopAnimation=function(){s&&(s.stop(),s=void 0)}}(),e.exports=r},4321:function(e,t,n){var r=n(6074),h={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}};e.exports={inited:!1,plugins:{},register:function(e){var t=e.name,e=e.tablature;this.plugins[t]=e},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(e,t,n){var r=null;if(n.tablature)for(var i=n.tablature,r=[],a=0;a<i.length;a++){var s=i[a],o=s.instrument;if(null==o)return this.setError(e,"tablature 'instrument' is missing"),r;var c=h[o],l=null;if(l=c?this.plugins[c.name]:l)0!=n.visualTranspose&&(s.visualTranspose=n.visualTranspose),s.abcSrc=n.tablature.abcSrc,r.push({classz:l,tuneNumber:t,params:s,instance:null,tabType:c});else{if(""!==o)return this.setError(e,"Undefined tablature plugin: "+o),r;r.push(null)}}return r},layoutTablatures:function(e,t){var n=t.tablatures,r=0;if(n&&0<n.length)for(var i=n.length,a=0;a<i;++a)n[a]&&n[a].params.firstStaffOnly&&(n[a].params.suppress=!1);for(var s=0;s<t.lines.length;s++){var o=t.lines[s];if(o.staff&&r++,1<r&&n&&0<n.length)for(i=n.length,a=0;a<i;++a)n[a].params.firstStaffOnly&&(n[a].params.suppress=!0);var c,l=o.staff;if(l)for(var h=l.length,u=0;u<l.length;u++)n[u]&&u<h&&(null==(c=n[u]).instance&&(c.instance=new c.classz,c.instance.init(t,c.tuneNumber,c.params,u,c.tabType)),c.instance.render(e,o,u))}},init:function(){this.inited||(this.register(new r),this.inited=!0)}}},5681:function(e){e.exports=function(e,t){var n,h=this;h.qpm=(t=t||{}).qpm?parseInt(t.qpm,10):null,h.qpm||(n=e.metaText?e.metaText.tempo:null,h.qpm=e.getBpm(n)),h.extraMeasuresAtBeginning=t.extraMeasuresAtBeginning?parseInt(t.extraMeasuresAtBeginning,10):0,h.beatCallback=t.beatCallback,h.eventCallback=t.eventCallback,h.lineEndCallback=t.lineEndCallback,h.lineEndAnticipation=t.lineEndAnticipation?parseInt(t.lineEndAnticipation,10):0,h.beatSubdivis
|