orbitchat 2.1.7 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/bin/dev-server.js +62 -0
- package/bin/orbitchat.js +223 -71
- package/dist/assets/{api-DZkCbfw-.js → api-iWGWe9XZ.js} +1 -1
- package/dist/assets/arc-m8RC5oDD-DxtXpPlf.js +1 -0
- package/dist/assets/{blockDiagram-c4efeb88-NvaZhZFT-2jTGmfzw.js → blockDiagram-c4efeb88-CZ2mpei3-B_3saIkQ.js} +7 -7
- package/dist/assets/{c4Diagram-c83219d4-gPr1eF38-DMPWXy6y.js → c4Diagram-c83219d4-DL2EmCLj-Dv5sdkpm.js} +2 -2
- package/dist/assets/channel-BKp1WYnX-Cc6fwi-B.js +1 -0
- package/dist/assets/classDiagram-beda092f-vKbJ2bcD-CpzCwdb3.js +2 -0
- package/dist/assets/classDiagram-v2-2358418a-BHXpn1Du-ClzQ61Pm.js +2 -0
- package/dist/assets/clone-B1V2003j-Cr3Uw-Zs.js +1 -0
- package/dist/assets/{createText-1719965b-D9Y3vUMn-DDdadCK5.js → createText-1719965b-C2-AT0ab-CWg8fDWo.js} +2 -2
- package/dist/assets/edges-96097737-Zk-qG_8u-HnJhTil4.js +4 -0
- package/dist/assets/{erDiagram-0228fc6a-BLw8FsIp-Cs8VClxW.js → erDiagram-0228fc6a-B94anMjz-ocfxI7NV.js} +3 -3
- package/dist/assets/{flowDb-c6c81e3f-DXVkMlSE-lHya7k5v.js → flowDb-c6c81e3f-CRRW-bQO-G1WHNmUV.js} +4 -4
- package/dist/assets/{flowDiagram-50d868cf-mkkB0hFd-S2mNfjcZ.js → flowDiagram-50d868cf-DPzQMhJv-DgwkjDqI.js} +4 -4
- package/dist/assets/flowDiagram-v2-4f6560a1-Si9enBmB-DYUBnRO1.js +1 -0
- package/dist/assets/{flowchart-elk-definition-6af322e1-D9IbjnSJ-RN3qt1rV.js → flowchart-elk-definition-6af322e1-CULhtvD--GZ9ilB9C.js} +1 -1
- package/dist/assets/{ganttDiagram-a2739b55-Cqs5_Zht-C5tqANPy.js → ganttDiagram-a2739b55-Bp8yOLEz-CqM7mRjt.js} +3 -3
- package/dist/assets/{gitGraphDiagram-82fe8481-txBzFn40-CsYRcfiT.js → gitGraphDiagram-82fe8481-BYtOQJl0-C2naxeTp.js} +1 -1
- package/dist/assets/{graph-BZahQKIN-CenQ9kLM.js → graph-BV6jB5rk-CELreG_k.js} +1 -1
- package/dist/assets/index-42QQgFVq.css +1 -0
- package/dist/assets/{index-5325376f-DsNDppci-BmtId_7h.js → index-5325376f-DrY72DrM-CA0ZD5ej.js} +1 -1
- package/dist/assets/index-BaIhc-dj.js +1008 -0
- package/dist/assets/index-DlFdZiHl-BkXTu13U.js +134 -0
- package/dist/assets/{infoDiagram-8eee0895-SbmhgTjv-DWbp8qIg.js → infoDiagram-8eee0895-C6GFnrZ7-BhM7Tkvh.js} +4 -4
- package/dist/assets/{journeyDiagram-c64418c1-C7AiwbKr-CR4ESCM3.js → journeyDiagram-c64418c1-daS1W8qe-DipmPDM8.js} +4 -4
- package/dist/assets/{layout-j-hMNqAM-d_O0ZYu6.js → layout-LXMv3mSS-fzT-WsR4.js} +1 -1
- package/dist/assets/{mindmap-definition-8da855dc-B1WjnfxE-C_ekkGNm.js → mindmap-definition-8da855dc-DmNQYVT1-BupnMO6G.js} +1 -1
- package/dist/assets/{pieDiagram-a8764435-zrkaw4r--nNryZ7xt.js → pieDiagram-a8764435-381urBY5-CJU6X8kv.js} +5 -5
- package/dist/assets/{quadrantDiagram-1e28029f-C2Wa5n16-DJsmIh09.js → quadrantDiagram-1e28029f-hgRmK2bX-fzcWnYUM.js} +4 -4
- package/dist/assets/{requirementDiagram-08caed73-BtHxx079-DyPYX9i4.js → requirementDiagram-08caed73-BB0Q-cI9-CPFdXDhT.js} +1 -1
- package/dist/assets/{sankeyDiagram-a04cb91d-DXlmqTKB-DF_MhieU.js → sankeyDiagram-a04cb91d-BpsipZNt-B3YPu4J8.js} +5 -5
- package/dist/assets/{sequenceDiagram-c5b8d532-BVQF3vcA-OQvBng6Z.js → sequenceDiagram-c5b8d532-xoAvPcQJ-B9rDXSoA.js} +4 -4
- package/dist/assets/{stateDiagram-1ecb1508-Dybc3i2m-DpShq5Fv.js → stateDiagram-1ecb1508-b721R49K-CWcqUIUo.js} +1 -1
- package/dist/assets/stateDiagram-v2-c2b004d7-BmSbrbqZ-DlbnZV5y.js +1 -0
- package/dist/assets/{styles-b4e223ce-BSiU4oYL-D8WR6bxO.js → styles-b4e223ce-TYmJC5IN-BHQXJFVt.js} +3 -3
- package/dist/assets/{styles-ca3715f6-DU7x0doE-BqM8h3vG.js → styles-ca3715f6-CfJZu0Yn-DtD2x1No.js} +2 -2
- package/dist/assets/{styles-d45a18b0-B_CU21kM-BP9RAefH.js → styles-d45a18b0-DZ8oSYcV-CvugbGS9.js} +3 -3
- package/dist/assets/{svgDrawCommon-b86b1483-sbEe2n2v-CFwc1_jc.js → svgDrawCommon-b86b1483-CXPkN8HW-DH97F0YX.js} +1 -1
- package/dist/assets/{timeline-definition-faaaa080-b82QCnJ9-D_9su1EE.js → timeline-definition-faaaa080-LDFf1jfb-DxM6VoSn.js} +6 -6
- package/dist/assets/{xychartDiagram-f5964ef8-BtRcO0uy-C_Ru9X19.js → xychartDiagram-f5964ef8-DdhO5-Bp-CevMp6HN.js} +3 -3
- package/dist/index.html +2 -2
- package/package.json +7 -3
- package/dist/assets/arc-CvECY7sY-CCUjLJq2.js +0 -1
- package/dist/assets/channel-6PI3wNcc-BxckuQvX.js +0 -1
- package/dist/assets/classDiagram-beda092f-B8axaKGu-Cu_ZIJ6u.js +0 -2
- package/dist/assets/classDiagram-v2-2358418a-DPdf2DxR-BZsTNggP.js +0 -2
- package/dist/assets/clone-D01vUIhD-DmY5mrln.js +0 -1
- package/dist/assets/edges-96097737-Zc6U9nQz-BzB5ko4h.js +0 -4
- package/dist/assets/flowDiagram-v2-4f6560a1-BRIhxQ3y-DOhW7LIb.js +0 -1
- package/dist/assets/index-CITIGg-2.css +0 -1
- package/dist/assets/index-CVRNWcf-.js +0 -1006
- package/dist/assets/stateDiagram-v2-c2b004d7-Bp8rRkv2-9nDDCxFS.js +0 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import{aa as os}from"./index-BaIhc-dj.js";function cs(T,g){for(var p=0;p<g.length;p++){const o=g[p];if(typeof o!="string"&&!Array.isArray(o)){for(const r in o)if(r!=="default"&&!(r in T)){const n=Object.getOwnPropertyDescriptor(o,r);n&&Object.defineProperty(T,r,n.get?n:{enumerable:!0,get:()=>o[r]})}}}return Object.freeze(Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}))}var Xe,Yr;function ls(){if(Yr)return Xe;Yr=1;var T="6.5.2";return Xe=T,Xe}var Ke,Rr;function Br(){if(Rr)return Ke;Rr=1;var T=function(p,o){var r=this;if(o||(o={}),r.qpm=o.qpm?parseInt(o.qpm,10):null,!r.qpm){var n=p.metaText?p.metaText.tempo:null;r.qpm=p.getBpm(n)}r.extraMeasuresAtBeginning=o.extraMeasuresAtBeginning?parseInt(o.extraMeasuresAtBeginning,10):0,r.beatCallback=o.beatCallback,r.eventCallback=o.eventCallback,r.lineEndCallback=o.lineEndCallback,r.lineEndAnticipation=o.lineEndAnticipation?parseInt(o.lineEndAnticipation,10):0,r.beatSubdivisions=o.beatSubdivisions?parseInt(o.beatSubdivisions,10):1,r.joggerTimer=null,r.replaceTarget=function(s){r.noteTimings=s.setTiming(r.qpm,r.extraMeasuresAtBeginning),s.noteTimings.length===0&&(r.noteTimings=s.setTiming(0,0)),r.lineEndCallback&&(r.lineEndTimings=g(s.noteTimings,r.lineEndAnticipation)),r.startTime=null,r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.currentTime=0,r.isPaused=!1,r.isRunning=!1,r.pausedPercent=null,r.justUnpaused=!1,r.newSeekPercent=0,r.lastTimestamp=0,r.noteTimings.length!==0&&(r.millisecondsPerBeat=1e3/(r.qpm/60)/r.beatSubdivisions,r.lastMoment=r.noteTimings[r.noteTimings.length-1].milliseconds,r.totalBeats=Math.round(r.lastMoment/r.millisecondsPerBeat))},r.replaceTarget(p),r.doTiming=function(s){if(r.lastTimestamp!==s&&(r.lastTimestamp=s,r.startTime||(r.startTime=s),!r.isPaused&&r.isRunning)){for(r.currentTime=s-r.startTime,r.currentTime+=16;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;){if(r.eventCallback&&r.noteTimings[r.currentEvent].type==="event"){var l=r.startTime;r.eventCallback(r.noteTimings[r.currentEvent]),l!==r.startTime&&(r.currentTime=s-r.startTime)}r.currentEvent++}if(r.lineEndCallback&&r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds<r.currentTime&&r.currentEvent<r.noteTimings.length){var d=r.noteTimings[r.currentEvent].milliseconds===r.currentTime?r.noteTimings[r.currentEvent]:r.noteTimings[r.currentEvent-1];r.lineEndCallback(r.lineEndTimings[r.currentLine],d,{line:r.currentLine,endTimings:r.lineEndTimings,currentTime:r.currentTime}),r.currentLine++}if(r.currentTime<r.lastMoment){if(requestAnimationFrame(r.doTiming),r.currentBeat*r.millisecondsPerBeat<r.currentTime){var f=r.doBeatCallback(s);f!==null&&(r.currentTime=f)}}else if(r.currentBeat<=r.totalBeats&&r.beatCallback){var u=r.doBeatCallback(s);u!==null&&(r.currentTime=u),requestAnimationFrame(r.doTiming)}if(r.currentTime>=r.lastMoment)if(r.eventCallback){var i=r.eventCallback(null);r.shouldStop(i).then(function(t){t&&r.stop()})}else r.stop()}},r.shouldStop=function(s){return new Promise(function(l){if(!s)return l(!0);if(s==="continue")return l(!1);s.then&&s.then(function(d){l(d!=="continue")})})},r.doBeatCallback=function(s){if(r.beatCallback){for(var l=r.currentEvent;l<r.noteTimings.length&&r.noteTimings[l].left===null;)l++;var d,f;if(l<r.noteTimings.length){for(d=r.noteTimings[l].milliseconds,l=Math.max(0,r.currentEvent-1);l>=0&&r.noteTimings[l].left===null;)l--;f=r.noteTimings[l]}var u={},i={};if(f){u.top=f.top,u.height=f.height;var t=Math.max(0,s-r.startTime-f.milliseconds),a=d-f.milliseconds,e=f.endX-f.left,h=a?t*e/a:0;u.left=f.left+h,r.currentEvent===0&&f.milliseconds>s-r.startTime&&(u.left=void 0),i={timestamp:s,startTime:r.startTime,ev:f,endMs:d,offMs:t,offPx:h,gapMs:a,gapPx:e}}else i={timestamp:s,startTime:r.startTime};var v=r.startTime;if(r.beatCallback(r.currentBeat/r.beatSubdivisions,r.totalBeats/r.beatSubdivisions,r.lastMoment,u,i),v!==r.startTime)return s-r.startTime;r.currentBeat++}return null};var c=60;r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,c))},r.start=function(s,l){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,s===void 0&&(r.justUnpaused=!0)),s)r.setProgress(s,l);else if(s===0)r.reset();else if(r.pausedPercent!==null){var d=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=d-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,c)},r.pause=function(){r.isPaused=!0;var s=performance.now();r.pausedPercent=(s-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.currentMillisecond=function(){return r.currentTime},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(s,l){var d;switch(l){case"seconds":r.currentTime=s*1e3,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),d=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=s*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),d=r.currentTime/r.lastMoment;break;default:d=s,d<0&&(d=0),d>1&&(d=1),r.currentTime=r.lastMoment*d;break}r.isRunning||(r.pausedPercent=d);var f=performance.now();for(r.startTime=f-r.currentTime,r.currentEvent,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].milliseconds<r.currentTime;)r.currentEvent++;if(r.lineEndCallback)for(r.currentLine=0;r.lineEndTimings.length>r.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation<r.currentTime;)r.currentLine++;var u=r.currentBeat;r.currentBeat=Math.floor(r.currentTime/r.millisecondsPerBeat),r.beatCallback&&u!==r.currentBeat&&r.doBeatCallback(r.startTime+r.currentTime),r.eventCallback&&r.currentEvent>=0&&r.noteTimings[r.currentEvent].type==="event"&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,c)}};function g(p,o){for(var r=[],n=null,c=0;c<p.length;c++){var s=p[c];s.type!=="end"&&s.top!==n&&(r.push({measureNumber:s.measureNumber,milliseconds:s.milliseconds-o,top:s.top,bottom:s.top+s.height}),n=s.top)}return r}return Ke=T,Ke}var Ue,Wr;function hs(){if(Wr)return Ue;Wr=1;var T=Br(),g={};return function(){var p,o;g.startAnimation=function(r,n,c){p&&(p.stop(),p=void 0),c.showCursor&&(o=r.querySelector(".abcjs-cursor"),o||(o=document.createElement("DIV"),o.className="abcjs-cursor cursor",o.style.position="absolute",r.appendChild(o),r.style.position="relative"));function s(a){for(var e=0;e<a.length;e++){var h=a[e];h.classList.contains("abcjs-bar")||(h.style.display="none")}}var l;function d(a){if(l){var e=r.querySelectorAll(l);s(e)}l=a}function f(a){var e=r.querySelectorAll(a);s(e)}function u(a){c.hideCurrentMeasure?f(a):c.hideFinishedMeasures&&d(a)}function i(a){return".abcjs-l"+a.line+".abcjs-m"+a.measureNumber}function t(a){if(a){if(a.measureStart){var e=i(a);e&&u(e)}o&&(o.style.left=a.left+"px",o.style.top=a.top+"px",o.style.width=a.width+"px",o.style.height=a.height+"px")}else p.stop(),p=void 0}p=new T(n,{qpm:c.bpm,eventCallback:t}),p.start()},g.pauseAnimation=function(r){p&&(r?p.pause():p.start())},g.stopAnimation=function(){p&&(p.stop(),p=void 0)}}(),Ue=g,Ue}var $e,Gr;function Ne(){if(Gr)return $e;Gr=1;var T={};return T.cloneArray=function(g){for(var p=[],o=0;o<g.length;o++)p.push(Object.assign({},g[o]));return p},T.cloneHashOfHash=function(g){var p={};for(var o in g)g.hasOwnProperty(o)&&(p[o]=Object.assign({},g[o]));return p},T.cloneHashOfArrayOfHash=function(g){var p={};for(var o in g)g.hasOwnProperty(o)&&(p[o]=T.cloneArray(g[o]));return p},T.strip=function(g){return g.replace(/^\s+/,"").replace(/\s+$/,"")},T.startsWith=function(g,p){return g.indexOf(p)===0},T.endsWith=function(g,p){var o=g.length-p.length;return o>=0&&g.lastIndexOf(p)===o},T.last=function(g){return g.length===0?null:g[g.length-1]},$e=T,$e}var Qe,qr;function Pr(){if(qr)return Qe;qr=1;var T=Ne(),g={};return function(){var p,o,r,n,c;g.initialize=function(y,k,w,O,z){p=y,o=k,r=w,n=O,c=z,s()};function s(){r.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},n.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},n.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},n.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},n.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},n.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},n.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},n.formatting.annotationfont=r.annotationfont,n.formatting.gchordfont=r.gchordfont,n.formatting.historyfont=r.historyfont,n.formatting.infofont=r.infofont,n.formatting.measurefont=r.measurefont,n.formatting.partsfont=r.partsfont,n.formatting.repeatfont=r.repeatfont,n.formatting.textfont=r.textfont,n.formatting.tripletfont=r.tripletfont,n.formatting.vocalfont=r.vocalfont,n.formatting.wordsfont=r.wordsfont}var l={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},d=function(y){switch(y){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}},f=function(y,k,w,O,z){function V(){var fe=parseInt(y[0].token);return y.shift(),k?y.length===0?{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:fe}:y.length===1&&y[0].token==="box"&&l[z]?{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:fe,box:!0}:(o("Extra parameters in font definition.",w,O),{face:k.face,weight:k.weight,style:k.style,decoration:k.decoration,size:fe}):(o("Can't set just the size of the font since there is no default value.",w,O),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:fe})}if(y[0].token==="*"){if(y.shift(),y[0].type==="number")return V();o("Expected font size number after *.",w,O)}if(y[0].type==="number")return V();for(var I=[],K,Q="normal",G="normal",ee="none",te=!1,ne="face",X=!1;y.length;){var ae=y.shift(),$=ae.token.toLowerCase();switch(ne){case"face":X||$!=="utf"&&ae.type!=="number"&&$!=="bold"&&$!=="italic"&&$!=="underline"&&$!=="box"?I.length>0&&ae.token==="-"?(X=!0,I[I.length-1]=I[I.length-1]+ae.token):X?(X=!1,I[I.length-1]=I[I.length-1]+ae.token):I.push(ae.token):ae.type==="number"?(K?o("Font size specified twice in font definition.",w,O):K=ae.token,ne="modifier"):$==="bold"?Q="bold":$==="italic"?G="italic":$==="underline"?ee="underline":$==="box"?(l[z]?te=!0:o(`This font style doesn't support "box"`,w,O),ne="finished"):$==="utf"?(ae=y.shift(),ne="size"):o("Unknown parameter "+ae.token+" in font definition.",w,O);break;case"size":ae.type==="number"?K?o("Font size specified twice in font definition.",w,O):K=ae.token:o("Expected font size in font definition.",w,O),ne="modifier";break;case"modifier":$==="bold"?Q="bold":$==="italic"?G="italic":$==="underline"?ee="underline":$==="box"?(l[z]?te=!0:o(`This font style doesn't support "box"`,w,O),ne="finished"):o("Unknown parameter "+ae.token+" in font definition.",w,O);break;case"finished":o('Extra characters found after "box" in font definition.',w,O);break}}K===void 0?k?K=k.size:(o("Must specify the size of the font since there is no default value.",w,O),K=12):K=parseFloat(K),I=I.join(" "),I===""&&(k?I=k.face:(o("Must specify the name of the font since there is no default value.",w,O),I="sans-serif"));var se=d(I),ce={};return se?(ce.face=se.face,ce.weight=se.weight,ce.style=se.style,ce.decoration=se.decoration,ce.size=K,te&&(ce.box=!0),ce):(ce.face=I,ce.weight=Q,ce.style=G,ce.decoration=ee,ce.size=K,te&&(ce.box=!0),ce)},u=function(y,k,w){return k.length===0?'Directive "'+y+'" requires a font as a parameter.':(r[y]=f(k,r[y],w,0,y),r.is_in_header&&(n.formatting[y]=r[y]),null)},i=function(y,k,w){return k.length===0?'Directive "'+y+'" requires a font as a parameter.':(n.formatting[y]=f(k,n.formatting[y],w,0,y),null)},t=function(y,k){var w="";k.forEach(function(z){w+=z.token});var O=parseFloat(w);if(isNaN(O)||O===0)return'Directive "'+y+'" requires a number as a parameter.';n.formatting.scale=O},a=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],e=function(y){var k=y.split(/\s+/);if(k.length!==2&&k.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var w=k[0],O=parseInt(k[1],10);if((isNaN(O)||O<35||O>81)&&k[1]&&(O=a.indexOf(k[1].toLowerCase())+35),isNaN(O)||O<35||O>81)return{error:'Expected drum name, received "'+k[1]+'"'};var z={sound:O};return k.length===3&&(z.noteHead=k[2]),{key:w,value:z}},h=function(y,k){var w=p.getMeasurement(k);return w.used===0||k.length!==0?{error:'Directive "'+y+'" requires a measurement as a parameter.'}:w.value},v=function(y,k){var w=p.getMeasurement(k);return w.used===0||k.length!==0?'Directive "'+y+'" requires a measurement as a parameter.':(n.formatting[y]=w.value,null)},m=function(y,k,w,O,z){if(w.length!==1||w[0].type!=="number")return'Directive "'+k+'" requires a number as a parameter.';var V=w[0].intt;return O!==void 0&&V<O?'Directive "'+k+'" requires a number greater than or equal to '+O+" as a parameter.":z!==void 0&&V>z?'Directive "'+k+'" requires a number less than or equal to '+z+" as a parameter.":(r[y]=V,null)},x=function(y,k,w){if(w.length===1&&(w[0].token==="true"||w[0].token==="false"))return r[y]=w[0].token==="true",null;var O=m(y,k,w,0,1);return O!==null?O:(r[y]=r[y]===1,null)},C=function(y,k,w,O){if(w.length!==1)return'Directive "'+k+'" requires one of [ '+O.join(", ")+" ] as a parameter.";for(var z=w[0].token,V=!1,I=0;!V&&I<O.length;I++)O[I]===z&&(V=!0);return V?(r[y]=z,null):'Directive "'+k+'" requires one of [ '+O.join(", ")+" ] as a parameter."},S=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],j=["gchord","ptstress","beatstring"],F=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],b=["program"],M=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],B=["beat"],A=["drone"],P=["portamento"],N=["expand","grace","trim"],E=["drum","chordname"],_=["bassprog","chordprog"],L=function(y,k,w){var O=y.shift().token,z=[];if(S.indexOf(O)>=0)y.length!==0&&o("Unexpected parameter in MIDI "+O,w,0);else if(j.indexOf(O)>=0)y.length!==1?o("Expected one parameter in MIDI "+O,w,0):z.push(y[0].token);else if(F.indexOf(O)>=0)y.length!==1?o("Expected one parameter in MIDI "+O,w,0):y[0].type!=="number"?o("Expected one integer parameter in MIDI "+O,w,0):z.push(y[0].intt);else if(b.indexOf(O)>=0)y.length!==1&&y.length!==2?o("Expected one or two parameters in MIDI "+O,w,0):y[0].type!=="number"||y.length===2&&y[1].type!=="number"?o("Expected integer parameter in MIDI "+O,w,0):(z.push(y[0].intt),y.length===2&&z.push(y[1].intt));else if(M.indexOf(O)>=0)y.length!==2?o("Expected two parameters in MIDI "+O,w,0):y[0].type!=="number"||y[1].type!=="number"?o("Expected two integer parameters in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[1].intt));else if(P.indexOf(O)>=0)y.length!==2?o("Expected two parameters in MIDI "+O,w,0):y[0].type!=="alpha"||y[1].type!=="number"?o("Expected one string and one integer parameters in MIDI "+O,w,0):(z.push(y[0].token),z.push(y[1].intt));else if(O==="drummap")y.length===2&&y[0].type==="alpha"&&y[1].type==="number"?(k.formatting||(k.formatting={}),k.formatting.midi||(k.formatting.midi={}),k.formatting.midi.drummap||(k.formatting.midi.drummap={}),k.formatting.midi.drummap[y[0].token]=y[1].intt,z=k.formatting.midi.drummap):y.length===3&&y[0].type==="punct"&&y[1].type==="alpha"&&y[2].type==="number"?(k.formatting||(k.formatting={}),k.formatting.midi||(k.formatting.midi={}),k.formatting.midi.drummap||(k.formatting.midi.drummap={}),k.formatting.midi.drummap[y[0].token+y[1].token]=y[2].intt,z=k.formatting.midi.drummap):o("Expected one note name and one integer parameter in MIDI "+O,w,0);else if(N.indexOf(O)>=0)y.length!==3||y[0].type!=="number"||y[1].token!=="/"||y[2].type!=="number"?o("Expected fraction parameter in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[2].intt));else if(B.indexOf(O)>=0)y.length!==4?o("Expected four parameters in MIDI "+O,w,0):y[0].type!=="number"||y[1].type!=="number"||y[2].type!=="number"||y[3].type!=="number"?o("Expected four integer parameters in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[1].intt),z.push(y[2].intt),z.push(y[3].intt));else if(A.indexOf(O)>=0)y.length!==5?o("Expected five parameters in MIDI "+O,w,0):y[0].type!=="number"||y[1].type!=="number"||y[2].type!=="number"||y[3].type!=="number"||y[4].type!=="number"?o("Expected five integer parameters in MIDI "+O,w,0):(z.push(y[0].intt),z.push(y[1].intt),z.push(y[2].intt),z.push(y[3].intt),z.push(y[4].intt));else if(b.indexOf(O)>=0)y.length!==1||y.length!==4?o("Expected one or two parameters in MIDI "+O,w,0):y[0].type!=="number"?o("Expected integer parameter in MIDI "+O,w,0):y.length===4?(y[1].token!=="octave"&&o("Expected octave parameter in MIDI "+O,w,0),y[2].token!=="="&&o("Expected octave parameter in MIDI "+O,w,0),y[3].type!=="number"&&o("Expected integer parameter for octave in MIDI "+O,w,0)):(z.push(y[0].intt),y.length===4&&z.push(y[3].intt));else if(E.indexOf(O)>=0)if(y.length<2)o("Expected string parameter and at least one integer parameter in MIDI "+O,w,0);else if(y[0].type!=="alpha")o("Expected string parameter and at least one integer parameter in MIDI "+O,w,0);else{var V=y.shift();for(z.push(V.token);y.length>0;)V=y.shift(),V.type!=="number"&&o("Expected integer parameter in MIDI "+O,w,0),z.push(V.intt)}else if(_.indexOf(O)>=0){if(y.length!==1&&y.length!==2)o("Expected one or two parameters in MIDI "+O,w,0);else if(y[0].type!=="number")o("Expected integer parameter in MIDI "+O,w,0);else if(y.length===2&&y[1].type!=="alpha")o("Expected alpha parameter in MIDI "+O,w,0);else if(z.push(y[0].intt),y.length===2){var I=y[1].token;I.indexOf("octave=")!=-1?(I=I.replace("octave=",""),I=parseInt(I),isNaN(I)?o("Expected octave value in MIDI"+O):(I<-1&&(o("Expected octave= in MIDI "+O+" to be >= -1 (recv:"+I+")"),I=-1),I>3&&(o("Expected octave= in MIDI "+O+" to be <= 3 (recv:"+I+")"),I=3),z.push(I))):o("Expected octave= in MIDI"+O)}}c.hasBeginMusic()?c.appendElement("midi",-1,-1,{cmd:O,params:z}):(k.formatting.midi===void 0&&(k.formatting.midi={}),k.formatting.midi[O]=z)};g.parseFontChangeLine=function(y){y=y.replace(/\$\$/g,"");var k=y.split("$");if(k.length>1&&r.setfont){var w=[];k[0]!==""&&w.push({text:k[0]});for(var O=1;O<k.length;O++)if(k[O][0]==="0")w.push({text:k[O].substring(1).replace(/\x03/g,"$$")});else{var z=parseInt(k[O][0],10);r.setfont[z]?w.push({font:r.setfont[z],text:k[O].substring(1).replace(/\x03/g,"$$")}):w[w.length-1].text+="$"+k[O].replace(/\x03/g,"$$")}return w}return y.replace(/\x03/g,"$$")};var D=["auto","above","below","hidden"];g.addDirective=function(y){var k=p.tokenize(y,0,y.length);if(k.length===0||k[0].type!=="alpha")return null;var w=y.substring(y.indexOf(k[0].token)+k[0].token.length);w=p.stripComment(w);var O=k.shift().token.toLowerCase(),z="",V;switch(O){case"bagpipes":n.formatting.bagpipes=!0;break;case"flatbeams":n.formatting.flatbeams=!0;break;case"jazzchords":n.formatting.jazzchords=!0;break;case"accentAbove":n.formatting.accentAbove=!0;break;case"germanAlphabet":n.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=w;break;case"graceslurs":if(k.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(k[0].token==="0"||k[0].token==="false")n.formatting.graceSlurs=!1;else if(k[0].token==="1"||k[0].token==="true")n.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+k[0].token+")";break;case"lineThickness":var I=H(k);if(I.value!==void 0&&(n.formatting.lineThickness=I.value),I.error)return I.error;break;case"stretchlast":var K=H(k);if(K.value!==void 0&&(n.formatting.stretchlast=K.value),K.error)return K.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":n.formatting.titleleft=!0;break;case"measurebox":n.formatting.measurebox=!0;break;case"vocal":return C("vocalPosition",O,k,D);case"dynamic":return C("dynamicPosition",O,k,D);case"gchord":return C("chordPosition",O,k,D);case"ornament":return C("ornamentPosition",O,k,D);case"volume":return C("volumePosition",O,k,D);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return v(O,k);case"voicescale":if(k.length!==1||k[0].type!=="number")return"voicescale requires one float as a parameter";var Q=k.shift();return r.currentVoice&&(r.currentVoice.scale=Q.floatt,c.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(k.length!==1)return"voicecolor requires one string as a parameter";var G=k.shift();return r.currentVoice&&(r.currentVoice.color=G.token,c.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var ee=Math.round(h(O,k));return ee.error?ee.error:(c.addSpacing(ee),null);case"scale":t(O,k);break;case"sep":if(k.length===0)c.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var te=p.getMeasurement(k);if(te.used===0)return'Directive "'+O+'" requires 3 numbers: space above, space below, length of line';var ne=te.value;if(te=p.getMeasurement(k),te.used===0)return'Directive "'+O+'" requires 3 numbers: space above, space below, length of line';var X=te.value;if(te=p.getMeasurement(k),te.used===0||k.length!==0)return'Directive "'+O+'" requires 3 numbers: space above, space below, length of line';var ae=te.value;c.addSeparator(ne,X,ae,{startChar:r.iChar,endChar:r.iChar+w.length})}break;case"barsperstaff":if(z=m("barsperstaff",O,k),z!==null)return z;break;case"staffnonote":if(k.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(k[0].token==="0")r.staffnonote=!0;else if(k[0].token==="1")r.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+k[0].token+")";break;case"printtempo":if(z=x("printTempo",O,k),z!==null)return z;break;case"partsbox":if(z=x("partsBox",O,k),z!==null)return z;r.partsfont.box=r.partsBox;break;case"freegchord":if(z=x("freegchord",O,k),z!==null)return z;break;case"measurenb":case"barnumbers":if(z=m("barNumbers",O,k),z!==null)return z;break;case"setbarnb":if(k.length!==1||k[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=c.setBarNumberImmediate(k[0].intt);break;case"keywarn":if(k.length!==1||k[0].type!=="number"||k[0].intt!==1&&k[0].intt!==0)return"Directive "+O+" requires 0 or 1 as a parameter.";r[O]=k[0].intt===1;break;case"begintext":var $="";for(V=p.nextLine();V&&V.indexOf("%%endtext")!==0;){if(T.startsWith(V,"%%")){var se=V.substring(2);se=se.trim()+`
|
|
2
|
+
`,$+=se}else $+=V.trim()+`
|
|
3
|
+
`;V=p.nextLine()}c.addText($,{startChar:r.iChar,endChar:r.iChar+$.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(V=p.nextLine();V&&V.indexOf("%%endps")!==0;)p.nextLine();o("Postscript ignored",y,0);break;case"deco":w.length>0&&r.ignoredDecorations.push(w.substring(0,w.indexOf(" "))),o("Decoration redefinition ignored",y,0);break;case"text":var ce=p.translateString(w);c.addText(g.parseFontChangeLine(ce),{startChar:r.iChar,endChar:r.iChar+w.length+7});break;case"center":var fe=p.translateString(w);c.addCentered(g.parseFontChangeLine(fe));break;case"font":break;case"setfont":var le=p.tokenize(w,0,w.length);if(le.length>=4&&le[0].token==="-"&&le[1].type==="number"){var ve=parseInt(le[1].token);ve>=1&&ve<=9&&(r.setfont||(r.setfont=[]),le.shift(),le.shift(),r.setfont[ve]=f(le,r.setfont[ve],y,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return u(O,k,y);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return i(O,k,y);case"barlabelfont":case"barnumberfont":case"barnumfont":return u("measurefont",k,y);case"staves":case"score":r.score_is_present=!0;for(var ge=function(Pe,ze,Ie,Ve,Ye){(ze||r.staves.length===0)&&r.staves.push({index:r.staves.length,numVoices:0});var Se=T.last(r.staves);Ie!==void 0&&Se.bracket===void 0&&(Se.bracket=Ie),Ve!==void 0&&Se.brace===void 0&&(Se.brace=Ve),Ye&&(Se.connectBarLines="end"),r.voices[Pe]===void 0&&(r.voices[Pe]={staffNum:Se.index,index:Se.numVoices},Se.numVoices++)},ye=!1,R=!1,q=!1,Y=!1,W=!1,U=!1,J=!1,re,he=function(){if(J=!0,re){var Pe="start";re.staffNum>0&&(r.staves[re.staffNum-1].connectBarLines==="start"||r.staves[re.staffNum-1].connectBarLines==="continue")&&(Pe="continue"),r.staves[re.staffNum].connectBarLines=Pe}};k.length;){var Z=k.shift();switch(Z.token){case"(":ye?o("Can't nest parenthesis in %%score",y,Z.start):(ye=!0,Y=!0);break;case")":!ye||Y?o("Unexpected close parenthesis in %%score",y,Z.start):ye=!1;break;case"[":R?o("Can't nest brackets in %%score",y,Z.start):(R=!0,W=!0);break;case"]":!R||W?o("Unexpected close bracket in %%score",y,Z.start):(R=!1,r.staves[re.staffNum].bracket="end");break;case"{":q?o("Can't nest braces in %%score",y,Z.start):(q=!0,U=!0);break;case"}":!q||U?o("Unexpected close brace in %%score",y,Z.start):(q=!1,r.staves[re.staffNum].brace="end");break;case"|":he();break;default:for(var ie="";(Z.type==="alpha"||Z.type==="number")&&(ie+=Z.token,Z.continueId);)Z=k.shift();var be=!ye||Y,pe=W?"start":R?"continue":void 0,oe=U?"start":q?"continue":void 0;ge(ie,be,pe,oe,J),Y=!1,W=!1,U=!1,J=!1,re=r.voices[ie],O==="staves"&&he();break}}break;case"maxstaves":var me=p.getInt(w);me.digits===0?o("Expected number of staves in maxstaves"):me.value>0&&(n.formatting.maxStaves=me.value);break;case"newpage":var Ee=p.getInt(w);c.addNewPage(Ee.digits===0?-1:Ee.value);break;case"abc":var ue=w.split(" ");switch(ue[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var xe=ue.shift();c.addMetaText(O+xe,ue.join(" "),{startChar:r.iChar,endChar:r.iChar+w.length+5});break;default:return"Unknown directive: "+O+ue[0]}break;case"header":case"footer":var we=p.getMeat(w,0,w.length);we=w.substring(we.start,we.end),we[0]==='"'&&we[we.length-1]==='"'&&(we=we.substring(1,we.length-1));var de=we.split(" "),Te={};de.length===1?Te={left:"",center:de[0],right:""}:de.length===2?Te={left:de[0],center:de[1],right:""}:Te={left:de[0],center:de[1],right:de[2]},de.length>3&&o("Too many tabs in "+O+": "+de.length+" found.",w,0),c.addMetaTextObj(O,Te,{startChar:r.iChar,endChar:r.iChar+y.length});break;case"midi":var ke=p.tokenize(w,0,w.length,!0);ke.length>0&&ke[0].token==="="&&ke.shift(),ke.length===0?o("Expected midi command",w,0):L(ke,n,w);break;case"percmap":var Be=e(w);Be.error?o(Be.error,y,8):(n.formatting.percmap||(n.formatting.percmap={}),n.formatting.percmap[Be.key]=Be.value);break;case"visualtranspose":var De=p.getInt(w);De.digits===0?o("Expected number of half steps in visualTranspose"):r.globalTranspose=De.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":n.formatting[O]=w;break;default:return"Unknown directive: "+O}return null},g.globalFormatting=function(y){for(var k in y)if(y.hasOwnProperty(k)){var w=""+y[k],O=p.tokenize(w,0,w.length),z;switch(k){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":u(k,O,w);break;case"scale":t(k,O);break;case"partsbox":z=x("partsBox",k,O),z!==null&&o(z),r.partsfont.box=r.partsBox;break;case"freegchord":z=x("freegchord",k,O),z!==null&&o(z);break;case"fontboxpadding":(O.length!==1||O[0].type!=="number")&&o('Directive "'+k+'" requires a number as a parameter.'),n.formatting.fontboxpadding=O[0].floatt;break;case"stafftopmargin":(O.length!==1||O[0].type!=="number")&&o('Directive "'+k+'" requires a number as a parameter.'),n.formatting.stafftopmargin=O[0].floatt;break;case"stretchlast":var V=H(O);if(V.value!==void 0&&(n.formatting.stretchlast=V.value),V.error)return V.error;break;default:o("Formatting directive unrecognized: ",k,0)}}};function H(y){if(y.length===0)return{value:1};if(y.length===1)if(y[0].type==="number"){if(y[0].floatt>=0||y[0].floatt<=1)return{value:y[0].floatt}}else{if(y[0].token==="false")return{value:0};if(y[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+y[0].token+")"}}}(),Qe=g,Qe}var Je,Xr;function us(){if(Xr)return Je;Xr=1;var T={};const g=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];return T.pitchIndex=function(p){return g.indexOf(p)},T.noteName=function(p){return g[p]},Je=T,Je}var Ze,Kr;function Mi(){if(Kr)return Ze;Kr=1;var T=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],g=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],p=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],o=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];function r(n,c,s,l){if(!c||c%12===0)return n;for(;c<0;)c+=12;c>11&&(c=c%12);var d=n.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!d)return n;var f=d[1],u=d[2],i=d[3],t=d[4],a=T.indexOf(f);if(a<0&&(a=g.indexOf(f)),a<0&&(a=p.indexOf(f)),a<0&&(a=o.indexOf(f)),a<0)return n;a+=c,a=a%12,s?l?n=o[a]:n=g[a]:l?n=p[a]:n=T[a];var e=u&&(u.indexOf("dim")>=0||u.indexOf("°")>=0);if(e&&n==="A#"&&(n="Bb"),e&&n==="D#"&&(n="Eb"),e&&n==="A♯"&&(n="B♭"),e&&n==="D♯"&&(n="E♭"),u&&(n+=u),i){var a=T.indexOf(i);a<0&&(a=g.indexOf(i)),a<0&&(a=p.indexOf(i)),a<0&&(a=o.indexOf(i)),n+="/",a>=0?(a+=c,a=a%12,s?l?n+=o[a]:n+=g[a]:l?n+=p[a]:n+=T[a]):n+=i}return t&&(n+=t),n}return Ze=r,Ze}var et,Ur;function Ai(){if(Ur)return et;Ur=1;var T={C:{modes:["CMaj","Amin","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","Bbmin","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","Bmin","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","Cmin","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","C#min","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","Dmin","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","Ebmin","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","Emin","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","Fmin","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","F#min","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","Gmin","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","G#min","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","A#min","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","D#min","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","Abmin","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},g=null;function p(){g={};for(var c=Object.keys(T),s=0;s<c.length;s++){var l=T[c[s]];g[c[s].toLowerCase()]=c[s];for(var d=0;d<l.modes.length;d++){var f=l.modes[d].toLowerCase();g[f]=c[s]}}}function o(c){g||p();var s=c.toLowerCase().match(/([a-g][b#]?)(maj|min|mix|dor|phr|lyd|loc|m)?/);if(!s||!s[2])return c;s=s[1]+s[2];var l=g[s];return l||c}function r(c,s){var l=T[c];if(!l||s==="")return c;var d=s.toLowerCase().match(/^(maj|min|mix|dor|phr|lyd|loc|m)/);if(!d)return c;for(var f=d[1],u=0;u<l.modes.length;u++){var i=l.modes[u],t=i.toLowerCase().indexOf(f);if(t!==-1&&t===i.length-f.length)return i.substring(0,i.length-f.length)}return c}function n(c,s){var l=T[c];if(!l)return c;for(;s<0;)s+=12;for(var d=(l.stepsFromC+s)%12,f=0;f<Object.keys(T).length;f++){var u=Object.keys(T)[f];if(T[u].stepsFromC===d)return u}return c}return et={relativeMajor:o,relativeMode:r,transposeKey:n},et}var tt,$r;function Ni(){if($r)return tt;$r=1;var{relativeMajor:T}=Ai(),g={acc:"sharp",note:"f"},p={acc:"sharp",note:"c"},o={acc:"sharp",note:"g"},r={acc:"sharp",note:"d"},n={acc:"sharp",note:"A"},c={acc:"sharp",note:"e"},s={acc:"sharp",note:"B"},l={acc:"flat",note:"B"},d={acc:"flat",note:"e"},f={acc:"flat",note:"A"},u={acc:"flat",note:"d"},i={acc:"flat",note:"G"},t={acc:"flat",note:"c"},a={acc:"flat",note:"F"},e={"C#":[g,p,o,r,n,c,s],"F#":[g,p,o,r,n,c],B:[g,p,o,r,n],E:[g,p,o,r],A:[g,p,o],D:[g,p],G:[g],C:[],F:[l],Bb:[l,d],Eb:[l,d,f],Cm:[l,d,f],Ab:[l,d,f,u],Db:[l,d,f,u,i],Gb:[l,d,f,u,i,t],Cb:[l,d,f,u,i,t,a],"A#":[l,d],"B#":[],"D#":[l,d,f],"E#":[l],"G#":[l,d,f,u],none:[]};function h(v){var m=e[T(v)];return m?JSON.parse(JSON.stringify(m)):null}return tt=h,tt}var rt,Qr;function Bi(){if(Qr)return rt;Qr=1;var T=us(),g=Mi(),p=Ni(),o={},r={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},n=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],c=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];o.keySignature=function(i,t,a,e,h){if(i.clef.type==="perc"||i.clef.type==="none")return{accidentals:p(t),root:a,acc:e};h||(h=0),i.localTransposeVerticalMovement=0,i.localTransposePreferFlats=!1;var v=p(t);if(!v)return i.key;if(i.localTranspose=(i.globalTranspose?i.globalTranspose:0)+h,!i.localTranspose)return{accidentals:v,root:a,acc:e};if(i.globalTransposeOrigKeySig=v,i.localTranspose%12===0)return i.localTransposeVerticalMovement=i.localTranspose/12*7,{accidentals:v,root:a,acc:e};var m=t[0];t[1]==="b"||t[1]==="#"?(m+=t[1],t=t.substr(2)):t=t.substr(1);var x=r[m],C=x!==void 0;C||(x=0,m="C",t="");for(var S=x+i.localTranspose;S<0;)S+=12;S>11&&(S=S%12);var j=t[0]==="m"?c[S]:n[S],F=j+t,b=p(F);(b.length===0||b[0].acc==="flat")&&(i.localTransposePreferFlats=!0);var M=F.charCodeAt(0)-m.charCodeAt(0);return i.localTranspose>0?(M<0||M===0&&(m[1]==="#"||F[1]==="b"))&&(M+=7):i.localTranspose<0&&(M>0||M===0&&(m[1]==="b"||F[1]==="#"))&&(M-=7),i.localTranspose>0?i.localTransposeVerticalMovement=M+Math.floor(i.localTranspose/12)*7:i.localTransposeVerticalMovement=M+Math.ceil(i.localTranspose/12)*7,C?{accidentals:b,root:j[0],acc:j.length>1?j[1]:""}:{accidentals:[],root:a,acc:e}},o.chordName=function(i,t){return g(t,i.localTranspose,i.localTransposePreferFlats,i.freegchord)};var s=["c","d","e","f","g","a","b"];function l(i,t,a,e,h){for(var v=s[(i+49)%7],m=0,x=0;x<e.length;x++)e[x].note.toLowerCase()===v&&(m=d[e[x].acc]);for(var C=d[a],S=C-m,j=s[(t+49)%7],F=0,b=0;b<h.accidentals.length;b++)h.accidentals[b].note.toLowerCase()===j&&(F=d[h.accidentals[b].acc]);var M=S+F;return M<-2&&(t--,M+=j==="c"||j==="f"?1:2),M>2&&(t++,M-=j==="b"||j==="e"?1:2),[t,M]}var d={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},f={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},u={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return o.note=function(i,t){if(!(!i.localTranspose||i.clef.type==="perc")){var a=t.pitch;if(i.localTransposeVerticalMovement&&(t.pitch=t.pitch+i.localTransposeVerticalMovement,t.name)){var e=t.accidental?t.name.substring(1):t.name,h=t.accidental?t.name[0]:"",v=T.pitchIndex(e);t.name=h+T.noteName(v+i.localTransposeVerticalMovement)}if(t.accidental){var m=l(a,t.pitch,t.accidental,i.globalTransposeOrigKeySig,i.targetKey);t.pitch=m[0],t.accidental=f[m[1]],t.name&&(t.name=u[m[1]]+t.name.replace(/[_^=]/g,""))}}},rt=o,rt}var at,Jr;function Lr(){if(Jr)return at;Jr=1;var T=Pr(),g=Bi(),p={};return function(){var o,r,n,c;p.initialize=function(t,a,e,h,v){o=t,r=a,n=e,c=v},p.standardKey=function(t,a,e,h){return g.keySignature(n,t,a,e,h)};var s={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},l=function(t,a){var e=s[t],h=e?e.mid:0;return h+a};p.fixClef=function(t){var a=s[t.type];a&&(t.clefPos=a.pitch,t.type=a.clef)},p.deepCopyKey=function(t){var a={accidentals:[],root:t.root,acc:t.acc,mode:t.mode};return t.accidentals.forEach(function(e){a.accidentals.push(Object.assign({},e))}),a};var d={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};p.addPosToKey=function(t,a){var e=t.verticalPos;a.accidentals.forEach(function(h){var v=d[h.note];v=v-e,h.verticalPos=v}),a.impliedNaturals&&a.impliedNaturals.forEach(function(h){var v=d[h.note];v=v-e,h.verticalPos=v}),e<-10?(a.accidentals.forEach(function(h){h.verticalPos-=7,(h.verticalPos>=11||h.verticalPos===10&&h.acc==="flat")&&(h.verticalPos-=7),h.note==="A"&&h.acc==="sharp"&&(h.verticalPos-=7),(h.note==="G"||h.note==="F")&&h.acc==="flat"&&(h.verticalPos-=7)}),a.impliedNaturals&&a.impliedNaturals.forEach(function(h){h.verticalPos-=7,(h.verticalPos>=11||h.verticalPos===10&&h.acc==="flat")&&(h.verticalPos-=7),h.note==="A"&&h.acc==="sharp"&&(h.verticalPos-=7),(h.note==="G"||h.note==="F")&&h.acc==="flat"&&(h.verticalPos-=7)})):e<-4?(a.accidentals.forEach(function(h){h.verticalPos-=7,e===-8&&(h.note==="f"||h.note==="g")&&h.acc==="sharp"&&(h.verticalPos-=7)}),a.impliedNaturals&&a.impliedNaturals.forEach(function(h){h.verticalPos-=7,e===-8&&(h.note==="f"||h.note==="g")&&h.acc==="sharp"&&(h.verticalPos-=7)})):e>=7&&(a.accidentals.forEach(function(h){h.verticalPos+=7}),a.impliedNaturals&&a.impliedNaturals.forEach(function(h){h.verticalPos+=7}))},p.fixKey=function(t,a){var e=Object.assign({},a);return p.addPosToKey(t,e),e};var f=function(t){var a=0,e=t[a++];(e==="^"||e==="_")&&(e=t[a++]);var h=d[e];for(h===void 0&&(h=6);a<t.length;a++)if(t[a]===",")h-=7;else if(t[a]==="'")h+=7;else break;return{mid:h-6,str:t.substring(a)}},u=function(t){for(var a=0;a<t.length;a++)t[a].note==="b"?t[a].note="B":t[a].note==="a"?t[a].note="A":t[a].note==="F"?t[a].note="f":t[a].note==="E"?t[a].note="e":t[a].note==="D"?t[a].note="d":t[a].note==="C"?t[a].note="c":t[a].note==="G"&&t[a].acc==="sharp"?t[a].note="g":t[a].note==="g"&&t[a].acc==="flat"&&(t[a].note="G")};p.parseKey=function(t,a){t.length===0&&(t="none");var e=o.tokenize(t,0,t.length),h={};if(e.length===0)return r("Must pass in key signature.",t,0),h;switch(e[0].token){case"HP":T.addDirective("bagpipes"),n.key={root:"HP",accidentals:[],acc:"",mode:""},h.foundKey=!0,e.shift();break;case"Hp":T.addDirective("bagpipes"),n.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},h.foundKey=!0,e.shift();break;case"none":n.key={root:"none",accidentals:[],acc:"",mode:""},h.foundKey=!0,e.shift();break;default:var v=o.getKeyPitch(e[0].token);if(v.len>0){h.foundKey=!0;var m="",x="";e[0].token.length>1?e[0].token=e[0].token.substring(1):e.shift();var C=v.token;if(e.length>0){var S=o.getSharpFlat(e[0].token);if(S.len>0&&(e[0].token.length>1?e[0].token=e[0].token.substring(1):e.shift(),C+=S.token,m=S.token),e.length>0){var j=o.getMode(e[0].token);j.len>0&&(e.shift(),C+=j.token,x=j.token)}if(p.standardKey(C,v.token,m,0)===void 0)return r("Unsupported key signature: "+C,t,0),h}var F=p.deepCopyKey(n.key),b=!a&&n.globalTranspose?-n.globalTranspose:0,M;if(a&&(M=n.globalTransposeOrigKeySig),n.key=p.deepCopyKey(p.standardKey(C,v.token,m,b)),a&&(n.globalTransposeOrigKeySig=M),n.key.mode=x,F&&n.keywarn!==!1){for(var B,A=0;A<n.key.accidentals.length;A++)for(B=0;B<F.accidentals.length;B++)F.accidentals[B].note&&n.key.accidentals[A].note.toLowerCase()===F.accidentals[B].note.toLowerCase()&&(F.accidentals[B].note=null);for(B=0;B<F.accidentals.length;B++)F.accidentals[B].note&&(n.key.impliedNaturals||(n.key.impliedNaturals=[]),n.key.impliedNaturals.push({acc:"natural",note:F.accidentals[B].note}))}}break}if(e.length===0||(e[0].token==="exp"&&e.shift(),e.length===0)||(e[0].token==="oct"&&e.shift(),e.length===0))return h;var P=o.getKeyAccidentals2(e);if(P.warn&&r(P.warn,t,0),P.accs){h.foundKey||(h.foundKey=!0,n.key={root:"none",acc:"",mode:"",accidentals:[]}),u(P.accs);for(var N=0;N<P.accs.length;N++){for(var E=!1,_=0;_<n.key.accidentals.length&&!E;_++)n.key.accidentals[_].note===P.accs[N].note&&(E=!0,n.key.accidentals[_].acc!==P.accs[N].acc&&(n.key.accidentals[_].acc=P.accs[N].acc,n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(P.accs[N])));if(!E&&(n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(P.accs[N]),n.key.accidentals.push(P.accs[N]),n.key.impliedNaturals))for(var L=0;L<n.key.impliedNaturals.length;L++)n.key.impliedNaturals[L].note===P.accs[N].note&&n.key.impliedNaturals.splice(L,1)}}for(var D;e.length>0;)switch(e[0].token){case"m":case"middle":if(e.shift(),e.length===0)return r("Expected = after middle",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after middle",t,D.start);break}if(e.length===0)return r("Expected parameter after middle=",t,0),h;var H=o.getPitchFromTokens(e);H.warn&&r(H.warn,t,0),H.position&&(n.clef.verticalPos=H.position-6);break;case"transpose":if(e.shift(),e.length===0)return r("Expected = after transpose",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after transpose",t,D.start);break}if(e.length===0)return r("Expected parameter after transpose=",t,0),h;if(e[0].type!=="number"){r("Expected number after transpose",t,e[0].start);break}n.clef.transpose=e[0].intt,e.shift();break;case"stafflines":if(e.shift(),e.length===0)return r("Expected = after stafflines",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after stafflines",t,D.start);break}if(e.length===0)return r("Expected parameter after stafflines=",t,0),h;if(e[0].type!=="number"){r("Expected number after stafflines",t,e[0].start);break}n.clef.stafflines=e[0].intt,e.shift();break;case"staffscale":if(e.shift(),e.length===0)return r("Expected = after staffscale",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after staffscale",t,D.start);break}if(e.length===0)return r("Expected parameter after staffscale=",t,0),h;if(e[0].type!=="number"){r("Expected number after staffscale",t,e[0].start);break}n.clef.staffscale=e[0].floatt,e.shift();break;case"octave":if(e.shift(),e.length===0)return r("Expected = after octave",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after octave",t,D.start);break}if(e.length===0)return r("Expected parameter after octave=",t,0),h;if(e[0].type!=="number"){r("Expected number after octave",t,e[0].start);break}n.octave=e[0].intt,e.shift();break;case"style":if(e.shift(),e.length===0)return r("Expected = after style",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after style",t,D.start);break}if(e.length===0)return r("Expected parameter after style=",t,0),h;switch(e[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":n.style=e[0].token,e.shift();break;default:r("error parsing style element: "+e[0].token,t,e[0].start);break}break;case"clef":if(e.shift(),e.length===0)return r("Expected = after clef",t,0),h;if(D=e.shift(),D.token!=="="){r("Expected = after clef",t,D.start);break}if(e.length===0)return r("Expected parameter after clef=",t,0),h;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var y=e.shift();switch(y.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":y.token="alto";break;case"F":y.token="bass";break;case"G":y.token="treble";break;case"c":y.token="alto";break;case"f":y.token="bass";break;case"g":y.token="treble";break;default:r("Expected clef name. Found "+y.token,t,y.start);break}e.length>0&&e[0].type==="number"&&(y.token+=e[0].token,e.shift()),e.length>1&&(e[0].token==="-"||e[0].token==="+"||e[0].token==="^"||e[0].token==="_")&&e[1].token==="8"&&(y.token+=e[0].token+e[1].token,e.shift(),e.shift()),n.clef={type:y.token,verticalPos:l(y.token,0)},n.currentVoice&&n.currentVoice.transpose!==void 0&&(n.clef.transpose=n.currentVoice.transpose),h.foundClef=!0;break;default:r("Unknown parameter: "+e[0].token,t,e[0].start),e.shift()}return h};var i=function(t){var a=n.voices[t];if(!(n.currentVoice&&n.currentVoice.index===a.index&&n.currentVoice.staffNum===a.staffNum))return n.currentVoice=a,c.setCurrentVoice(a.staffNum,a.index,t)};p.parseVoice=function(t,a,e){var h=o.getMeat(t,a,e),v=h.start,m=h.end,x=o.getToken(t,v,m);if(x.length===0){r("Expected a voice id",t,v);return}var C=!1;n.voices[x]===void 0&&(n.voices[x]={},C=!0,n.score_is_present&&r("Can't have an unknown V: id when the %score directive is present",t,v)),v+=x.length,v+=o.eatWhiteSpace(t,v);for(var S={startStaff:C},j=function(H){var y=o.getVoiceToken(t,v,m);y.warn!==void 0?r("Expected value for "+H+" in voice: "+y.warn,t,v):y.err!==void 0?r("Expected value for "+H+" in voice: "+y.err,t,v):y.token.length===0&&t[v]!=='"'?r("Expected value for "+H+" in voice",t,v):S[H]=y.token,v+=y.len},F=function(H,y,k){var w=o.getVoiceToken(t,v,m);w.warn!==void 0?r("Expected value for "+y+" in voice: "+w.warn,t,v):w.err!==void 0?r("Expected value for "+y+" in voice: "+w.err,t,v):w.token.length===0&&t[v]!=='"'?r("Expected value for "+y+" in voice",t,v):(w.token=parseFloat(w.token),n.voices[H][y]=w.token),v+=w.len},b=function(H,y){var k=o.getVoiceToken(t,v,m);if(k.warn!==void 0)r("Expected value for "+H+" in voice: "+k.warn,t,v);else if(k.err!==void 0)r("Expected value for "+H+" in voice: "+k.err,t,v);else if(k.token.length===0&&t[v]!=='"')r("Expected value for "+H+" in voice",t,v);else return k.token;v+=k.len},M=function(H,y){var k={_B:2,_E:9,_b:-10,_e:-3},w=o.getVoiceToken(t,v,m);if(w.warn!==void 0)r("Expected one of (_B, _E, _b, _e) for "+y+" in voice: "+w.warn,t,v);else if(w.token.length===0&&t[v]!=='"')r("Expected one of (_B, _E, _b, _e) for "+y+" in voice",t,v);else{var O=k[w.token];O?n.voices[H][y]=O:r("Expected one of (_B, _E, _b, _e) for "+y+" in voice",t,v)}v+=w.len};v<m;){var B=o.getVoiceToken(t,v,m);if(v+=B.len,B.warn)r("Error parsing voice: "+B.warn,t,v);else{var A=null;switch(B.token){case"clef":case"cl":j("clef");var P=0;S.clef!==void 0&&(S.clef=S.clef.replace(/[',]/g,""),S.clef.indexOf("+16")!==-1&&(P+=14,S.clef=S.clef.replace("+16","")),S.verticalPos=l(S.clef,P));break;case"treble":case"bass":case"tenor":case"alto":case"perc":case"none":case"treble'":case"bass'":case"tenor'":case"alto'":case"none'":case"treble''":case"bass''":case"tenor''":case"alto''":case"none''":case"treble,":case"bass,":case"tenor,":case"alto,":case"none,":case"treble,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":case"treble+8":case"treble-8":case"treble^8":case"treble_8":case"treble1":case"treble2":case"treble3":case"treble4":case"treble5":case"bass+8":case"bass-8":case"bass^8":case"bass_8":case"bass+16":case"bass-16":case"bass^16":case"bass_16":case"bass1":case"bass2":case"bass3":case"bass4":case"bass5":case"tenor1":case"tenor2":case"tenor3":case"tenor4":case"tenor5":case"alto1":case"alto2":case"alto3":case"alto4":case"alto5":case"alto+8":case"alto-8":case"alto^8":case"alto_8":var N=0;S.clef=B.token.replace(/[',]/g,""),S.verticalPos=l(S.clef,N),n.voices[x].clef=B.token;break;case"staves":case"stave":case"stv":j("staves");break;case"brace":case"brc":j("brace");break;case"bracket":case"brk":j("bracket");break;case"name":case"nm":j("name");break;case"subname":case"sname":case"snm":j("subname");break;case"merge":S.startStaff=!1;break;case"stem":case"stems":A=o.getVoiceToken(t,v,m),A.warn!==void 0?r("Expected value for stems in voice: "+A.warn,t,v):A.err!==void 0?r("Expected value for stems in voice: "+A.err,t,v):A.token==="up"||A.token==="down"?n.voices[x].stem=A.token:r("Expected up or down for voice stem",t,v),v+=A.len;break;case"up":case"down":n.voices[x].stem=B.token;break;case"middle":case"m":j("verticalPos"),S.verticalPos=f(S.verticalPos).mid;break;case"gchords":case"gch":n.voices[x].suppressChords=!0,A=o.getVoiceToken(t,v,m),A.token==="0"&&(v=v+A.len);break;case"space":case"spc":j("spacing");break;case"scale":F(x,"scale");break;case"score":M(x,"scoreTranspose");break;case"transpose":F(x,"transpose");break;case"stafflines":F(x,"stafflines");break;case"staffscale":F(x,"staffscale");break;case"octave":F(x,"octave");break;case"volume":F(x,"volume");break;case"cue":var E=b("cue");E==="on"?n.voices[x].scale=.6:n.voices[x].scale=1;break;case"style":A=o.getVoiceToken(t,v,m),A.warn!==void 0?r("Expected value for style in voice: "+A.warn,t,v):A.err!==void 0?r("Expected value for style in voice: "+A.err,t,v):A.token==="normal"||A.token==="harmonic"||A.token==="rhythm"||A.token==="x"||A.token==="triangle"?n.voices[x].style=A.token:r("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",t,v),v+=A.len;break}}v+=o.eatWhiteSpace(t,v)}if((S.startStaff||n.staves.length===0)&&(n.staves.push({index:n.staves.length,meter:n.origMeter}),n.score_is_present||(n.staves[n.staves.length-1].numVoices=0)),n.voices[x].staffNum===void 0){n.voices[x].staffNum=n.staves.length-1;var _=0;for(var L in n.voices)n.voices.hasOwnProperty(L)&&n.voices[L].staffNum===n.voices[x].staffNum&&_++;n.voices[x].index=_-1}var D=n.staves[n.voices[x].staffNum];return n.score_is_present||D.numVoices++,S.clef&&(D.clef={type:S.clef,verticalPos:S.verticalPos}),S.spacing&&(D.spacing_below_offset=S.spacing),S.verticalPos&&(D.verticalPos=S.verticalPos),S.name&&(D.name?D.name.push(S.name):D.name=[S.name]),S.subname&&(D.subname?D.subname.push(S.subname):D.subname=[S.subname]),i(x)}}(),at=p,at}var nt,Zr;function ds(){if(Zr)return nt;Zr=1;var T=Ne(),g=Pr(),p=Lr(),o=function(r,n,c,s,l){this.reset=function(u,i,t,a){p.initialize(u,i,t,a,l),g.initialize(u,i,t,a,l)},this.reset(r,n,c,s),this.setTitle=function(u,i){c.hasMainTitle?l.addSubtitle(u,{startChar:c.iChar,endChar:c.iChar+i+2}):(l.addMetaText("title",u,{startChar:c.iChar,endChar:c.iChar+i+2}),c.hasMainTitle=!0)},this.setMeter=function(u){if(u=r.stripComment(u),u==="C")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"common_time"};if(u==="C|")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"cut_time"};if(u==="o")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_perfectum"};if(u==="c")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_imperfectum"};if(u==="o.")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if(u==="c.")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(u.length===0||u.toLowerCase()==="none")return c.havent_set_length===!0&&(c.default_length=.125,c.havent_set_length=!1),null;var i=r.tokenize(u,0,u.length);try{var t=function(){var x={value:0,num:""},C=i.shift();for(C.token==="("&&(C=i.shift());;){if(C.type!=="number")throw"Expected top number of meter";if(x.value+=parseInt(C.token),x.num+=C.token,i.length===0||i[0].token==="/")return x;if(C=i.shift(),C.token===")"){if(i.length===0||i[0].token==="/")return x;throw"Unexpected paren in meter"}if(C.token!=="."&&C.token!=="+"||(x.num+=C.token,i.length===0))throw"Expected top number of meter";C=i.shift()}return x},a=function(){var x=t();if(i.length===0)return x;var C=i.shift();if(C.token!=="/")throw"Expected slash in meter";if(C=i.shift(),C.type!=="number")throw"Expected bottom number of meter";return x.den=C.token,x.value=x.value/parseInt(x.den),x};if(i.length===0)throw"Expected meter definition in M: line";for(var e={type:"specified",value:[]},h=0;;){var v=a();h+=v.value;var m={num:v.num};if(v.den!==void 0&&(m.den=v.den),e.value.push(m),i.length===0)break}return c.havent_set_length===!0&&(c.default_length=h<.75?.0625:.125,c.havent_set_length=!1),e}catch(x){n(x,u,0)}return null},this.calcTempo=function(u){var i=.25;c.meter&&c.meter.type==="specified"?i=1/parseInt(c.meter.value[0].den):c.origMeter&&c.origMeter.type==="specified"&&(i=1/parseInt(c.origMeter.value[0].den));for(var t=0;t<u.duration;t++)u.duration[t]=i*u.duration[t];return u},this.resolveTempo=function(){c.tempo&&(this.calcTempo(c.tempo),s.metaText.tempo=c.tempo,delete c.tempo)},this.addUserDefinition=function(u,i,t){var a=u.indexOf("=",i);if(a===-1){n("Need an = in a macro definition",u,i);return}var e=T.strip(u.substring(i,a)),h=T.strip(u.substring(a+1));if(e.length!==1){n("Macro definitions can only be one character",u,i);return}var v="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~";if(v.indexOf(e)===-1){n("Macro definitions must be H-Y, h-w, or tilde",u,i);return}if(h.length===0){n("Missing macro definition",u,i);return}c.macros===void 0&&(c.macros={}),c.macros[e]=h},this.setDefaultLength=function(u,i,t){var a=u.substring(i,t).replace(/ /g,""),e=a.split("/");if(e.length===2){var h=parseInt(e[0]),v=parseInt(e[1]);v>0&&(c.default_length=h/v,c.havent_set_length=!1)}else e.length===1&&e[0]==="1"&&(c.default_length=1,c.havent_set_length=!1)};var d={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(u,i,t,a){try{var e=r.tokenize(u,i,t);if(e.length===0)throw"Missing parameter in Q: field";var h={startChar:a+i-2,endChar:a+t},v=!0,m=e.shift();if(m.type==="quote"&&(h.preString=m.token,m=e.shift(),e.length===0))return d[h.preString.toLowerCase()]&&(h.bpm=d[h.preString.toLowerCase()],h.suppressBpm=!0),{type:"immediate",tempo:h};if(m.type==="alpha"&&m.token==="C"){if(e.length===0)throw"Missing tempo after C in Q: field";if(m=e.shift(),m.type==="punct"&&m.token==="="){if(e.length===0)throw"Missing tempo after = in Q: field";if(m=e.shift(),m.type!=="number")throw"Expected number after = in Q: field";h.duration=[1],h.bpm=parseInt(m.token)}else if(m.type==="number"){if(h.duration=[parseInt(m.token)],e.length===0)throw"Missing = after duration in Q: field";if(m=e.shift(),m.type!=="punct"||m.token!=="=")throw"Expected = after duration in Q: field";if(e.length===0)throw"Missing tempo after = in Q: field";if(m=e.shift(),m.type!=="number")throw"Expected number after = in Q: field";h.bpm=parseInt(m.token)}else throw"Expected number or equal after C in Q: field"}else if(m.type==="number"){var x=parseInt(m.token);if(e.length===0||e[0].type==="quote")h.duration=[1],h.bpm=x;else{if(v=!1,m=e.shift(),m.type!=="punct"&&m.token!=="/"||(m=e.shift(),m.type!=="number"))throw"Expected fraction in Q: field";var C=parseInt(m.token);for(h.duration=[x/C];e.length>0&&e[0].token!=="="&&e[0].type!=="quote";){if(m=e.shift(),m.type!=="number"||(x=parseInt(m.token),m=e.shift(),m.type!=="punct"&&m.token!=="/")||(m=e.shift(),m.type!=="number"))throw"Expected fraction in Q: field";C=parseInt(m.token),h.duration.push(x/C)}if(m=e.shift(),m.type!=="punct"&&m.token!=="=")throw"Expected = in Q: field";if(m=e.shift(),m.type!=="number")throw"Expected tempo in Q: field";h.bpm=parseInt(m.token)}}else throw"Unknown value in Q: field";if(e.length!==0&&(m=e.shift(),m.type==="quote"&&(h.postString=m.token,m=e.shift()),e.length!==0))throw"Unexpected string at end of Q: field";return c.printTempo===!1&&(h.suppress=!0),{type:v?"delaySet":"immediate",tempo:h}}catch(S){return n(S,u,i),{type:"none"}}},this.letter_to_inline_header=function(u,i,t){var a=!1,e=r.eatWhiteSpace(u,i);if(i+=e,u.length>=i+5&&u[i]==="["&&u[i+2]===":"){var h=u.indexOf("]",i),v=c.iChar+i,m=c.iChar+h+1;switch(u.substring(i,i+3)){case"[I:":var x=g.addDirective(u.substring(i+3,h));return x&&n(x,u,i),[h-i+1+e];case"[M:":var C=this.setMeter(u.substring(i+3,h));return l.hasBeginMusic()&&C?l.appendStartingElement("meter",v,m,C):c.meter=C,[h-i+1+e];case"[K:":var S=p.parseKey(u.substring(i+3,h),!0);return S.foundClef&&l.hasBeginMusic()&&l.appendStartingElement("clef",v,m,c.clef),S.foundKey&&l.hasBeginMusic()&&l.appendStartingElement("key",v,m,p.fixKey(c.clef,c.key)),[h-i+1+e];case"[P:":var j=g.parseFontChangeLine(u.substring(i+3,h));return t||s.lines.length<=s.lineNum?c.partForNextLine={title:j,startChar:v,endChar:m}:l.appendElement("part",v,m,{title:j}),[h-i+1+e];case"[L:":return this.setDefaultLength(u,i+3,h),[h-i+1+e];case"[Q:":if(h>0){var F=this.setTempo(u,i+3,h,c.iChar);return F.type==="delaySet"?l.hasBeginMusic()?l.appendElement("tempo",v,m,this.calcTempo(F.tempo)):c.tempoForNextLine=["tempo",v,m,this.calcTempo(F.tempo)]:F.type==="immediate"&&(!t&&l.hasBeginMusic()?l.appendElement("tempo",v,m,F.tempo):c.tempoForNextLine=["tempo",v,m,F.tempo]),[h-i+1+e,u[i+1],u.substring(i+3,h)]}break;case"[V:":if(h>0)return a=p.parseVoice(u,i+3,h),[h-i+1+e,u[i+1],u.substring(i+3,h),a];break;case"[r:":return[h-i+1+e]}}return[0]},this.letter_to_body_header=function(u,i){var t=!1;if(u.length>=i+3)switch(u.substring(i,i+2)){case"I:":var a=g.addDirective(u.substring(i+2));return a&&n(a,u,i),[u.length];case"M:":var e=this.setMeter(u.substring(i+2));return l.hasBeginMusic()&&e&&l.appendStartingElement("meter",c.iChar+i,c.iChar+u.length,e),[u.length];case"K:":var h=p.parseKey(u.substring(i+2),l.hasBeginMusic());return h.foundClef&&l.hasBeginMusic()&&c.keywarn!==!1&&l.appendStartingElement("clef",c.iChar+i,c.iChar+u.length,c.clef),h.foundKey&&l.hasBeginMusic()&&c.keywarn!==!1&&l.appendStartingElement("key",c.iChar+i,c.iChar+u.length,p.fixKey(c.clef,c.key)),[u.length];case"P:":return l.hasBeginMusic()&&l.appendElement("part",c.iChar+i,c.iChar+u.length,{title:u.substring(i+2)}),[u.length];case"L:":return this.setDefaultLength(u,i+2,u.length),[u.length];case"Q:":var v=u.indexOf("",i+2);v===-1&&(v=u.length);var m=this.setTempo(u,i+2,v,c.iChar);return m.type==="delaySet"?l.appendElement("tempo",c.iChar+i,c.iChar+u.length,this.calcTempo(m.tempo)):m.type==="immediate"&&l.appendElement("tempo",c.iChar+i,c.iChar+u.length,m.tempo),[v,u[i],T.strip(u.substring(i+2))];case"V:":return t=p.parseVoice(u,i+2,u.length),[u.length,u[i],T.strip(u.substring(i+2)),t]}return[0]};var f={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(u){var i=f[u[0]],t=u.length-2,a=r.translateString(r.stripComment(u.substring(2)));if(i==="unalignedWords"||i==="notes")l.addMetaTextArray(i,g.parseFontChangeLine(a),{startChar:c.iChar,endChar:c.iChar+u.length});else if(i!==void 0)l.addMetaText(i,g.parseFontChangeLine(a),{startChar:c.iChar,endChar:c.iChar+u.length});else{var e=c.iChar,h=e+u.length;switch(u[0]){case"H":for(l.addMetaTextArray("history",g.parseFontChangeLine(a),{startChar:c.iChar,endChar:c.iChar+u.length}),u=r.peekLine();u&&u[1]!==":";)r.nextLine(),l.addMetaTextArray("history",g.parseFontChangeLine(r.translateString(r.stripComment(u))),{startChar:c.iChar,endChar:c.iChar+u.length}),u=r.peekLine();break;case"K":this.resolveTempo();var v=p.parseKey(u.substring(2),!1);!c.is_in_header&&l.hasBeginMusic()&&c.keywarn!==!1&&(v.foundClef&&l.appendStartingElement("clef",e,h,c.clef),v.foundKey&&l.appendStartingElement("key",e,h,p.fixKey(c.clef,c.key))),c.is_in_header=!1;break;case"L":this.setDefaultLength(u,2,u.length);break;case"M":c.origMeter=c.meter=this.setMeter(u.substring(2));break;case"P":c.is_in_header?l.addMetaText("partOrder",g.parseFontChangeLine(a),{startChar:c.iChar,endChar:c.iChar+u.length}):c.partForNextLine={title:a,startChar:e,endChar:h};break;case"Q":var m=this.setTempo(u,2,u.length,c.iChar);m.type==="delaySet"?c.tempo=m.tempo:m.type==="immediate"&&(s.metaText.tempo?c.tempoForNextLine=["tempo",e,h,m.tempo]:s.metaText.tempo=m.tempo);break;case"T":c.titlecaps&&(a=a.toUpperCase()),this.setTitle(g.parseFontChangeLine(r.theReverser(a)),t);break;case"U":this.addUserDefinition(u,2,u.length);break;case"V":if(p.parseVoice(u,2,u.length),!c.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":n("Ignored header",u,0);break;default:return{regular:!0}}}return{}}};return nt=o,nt}var Ce={},ea;function fs(){return ea||(ea=1,Ce.legalAccents=["trill","trillh","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x","style=triangle","D.C.alcoda","D.C.alfine","D.S.alcoda","D.S.alfine","editorial","courtesy"],Ce.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],Ce.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],Ce.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],Ce.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],Ce.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",Ce.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],Ce.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},Ce.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},Ce.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},Ce.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),Ce}var it,ta;function ps(){if(ta)return it;ta=1;var T=Lr(),g=Bi(),p,o,r,n,c,s,{legalAccents:l,volumeDecorations:d,dynamicDecorations:f,accentPseudonyms:u,accentDynamicPseudonyms:i,nonDecorations:t,durations:a,pitches:e,rests:h,accMap:v,tripletQ:m}=fs(),x=function(y,k,w,O,z,V){p=y,o=k,r=w,n=O,c=z,s=V,this.lineContinuation=!1},C=function(y,k,w){if(y.inTie[k]===void 0)return!1;var O=y.currentVoice?y.currentVoice.staffNum*100+y.currentVoice.index:0;return!!(y.inTie[k][O]&&(w.pitches!==void 0||w.rest.type!=="spacer"))},S={};x.prototype.parseMusic=function(y){s.resolveTempo(),r.is_in_header=!1;for(var k=0,w=r.iChar;p.isWhiteSpace(y[k])&&k<y.length;)k++;if(!(k===y.length||y[k]==="%")){var O=r.start_new_line;r.continueall===void 0?r.start_new_line=!0:r.start_new_line=!1;var z=0,V=s.letter_to_body_header(y,k);V[0]>0&&(k+=V[0],V[1]==="V"&&this.startNewLine());for(var I=0;k<y.length;){var K=k;if(y[k]==="%")break;var Q=s.letter_to_inline_header(y,k,O);if(Q[0]>0)k+=Q[0],Q[1]==="V"&&(O=!0);else{(!c.hasBeginMusic()||O&&!this.lineContinuation)&&(this.startNewLine(),O=!1);for(var G;;)if(G=p.eatWhiteSpace(y,k),G>0&&(k+=G),k>0&&y[k-1]===""&&(G=s.letter_to_body_header(y,k),G[0]>0&&(G[1]==="V"&&this.startNewLine(),k=G[0],r.start_new_line=!1)),G=P(y,k),G[0]>0&&(k+=G[0]),G=F(y,k),G[0]>0){S.chord||(S.chord=[]);var ee=p.translateString(G[1]);ee=ee.replace(/;/g,`
|
|
4
|
+
`);for(var te=!1,ne=0;ne<S.chord.length;ne++)S.chord[ne].position===G[2]&&(te=!0,S.chord[ne].name+=`
|
|
5
|
+
`+ee);te===!1&&(G[2]===null&&G[3]?S.chord.push({name:ee,rel_position:G[3]}):S.chord.push({name:ee,position:G[2]})),k+=G[0];var X=p.skipWhiteSpace(y.substring(k));X>0&&(S.force_end_beam_last=!0),k+=X}else if(t.indexOf(y[k])===-1?G=A(y,k):G=[0],G[0]>0)G[1]===null?k+1<y.length&&this.startNewLine():G[1].length>0&&(G[1].indexOf("style=")===0?S.style=G[1].substr(6):(S.decoration===void 0&&(S.decoration=[]),G[1]==="beambr1"?S.beambr=1:G[1]==="beambr2"?S.beambr=2:S.decoration.push(G[1]))),k+=G[0];else if(G=b(y,k),G[0]>0)S.gracenotes=G[1],k+=G[0];else break;if(G=N(y,k),G[0]>0){I=0,S.gracenotes!==void 0&&(S.rest={type:"spacer"},S.duration=.125,r.addFormattingOptions(S,n.formatting,"note"),c.appendElement("note",w+k,w+k+G[0],S),r.measureNotEmpty=!0,S={});var ae={type:G[1]};ae.type.length===0?o("Unknown bar type",y,k):(r.inEnding&&ae.type!=="bar_thin"&&(ae.endEnding=!0,r.inEnding=!1),G[2]&&(ae.startEnding=G[2],r.inEnding&&(ae.endEnding=!0),r.inEnding=!0,G[1]==="bar_right_repeat"?r.restoreStartEndingHoldOvers():r.duplicateStartEndingHoldOvers()),S.decoration!==void 0&&(ae.decoration=S.decoration),S.chord!==void 0&&(ae.chord=S.chord),ae.startEnding&&r.barFirstEndingNum===void 0?r.barFirstEndingNum=r.currBarNumber:ae.startEnding&&ae.endEnding&&r.barFirstEndingNum?r.currBarNumber=r.barFirstEndingNum:ae.endEnding&&(r.barFirstEndingNum=void 0),ae.type!=="bar_invisible"&&r.measureNotEmpty&&H()&&(r.currBarNumber++,r.barNumbers&&r.currBarNumber%r.barNumbers===0&&(ae.barNumber=r.currBarNumber)),r.addFormattingOptions(S,n.formatting,"bar"),c.appendElement("bar",w+K,w+k+G[0],ae),r.measureNotEmpty=!1,S={}),k+=G[0]}else if(y[k]==="&")G=M(y,k),G[0]>0&&(c.appendElement("overlay",w,w+1,{}),k+=1,I++);else{if(G=E(y,k),G.consumed>0&&(G.startSlur!==void 0&&(S.startSlur=G.startSlur),G.dottedSlur&&(S.dottedSlur=!0),G.triplet!==void 0&&(z>0?o("Can't nest triplets",y,k):(S.startTriplet=G.triplet,S.tripletMultiplier=G.tripletQ/G.triplet,S.tripletR=G.num_notes,z=G.num_notes===void 0?G.triplet:G.num_notes)),k+=G.consumed),y[k]==="["){k++;for(var $=null,se=!1,ce=!1;!ce;){var fe=A(y,k);fe[0]>0&&(k+=fe[0]);var le=L(y,k,{},!1);if(le!==null&&le.pitch!==void 0)fe[0]>0&&fe[1].indexOf("style=")!==0&&(S.decoration===void 0&&(S.decoration=[]),S.decoration.push(fe[1])),le.end_beam&&(S.end_beam=!0,delete le.end_beam),S.pitches===void 0?(S.duration=le.duration,S.pitches=[le]):S.pitches.push(le),delete le.duration,fe[0]>0&&fe[1].indexOf("style=")===0&&(S.pitches[S.pitches.length-1].style=fe[1].substr(6)),r.inTieChord[S.pitches.length]&&(le.endTie=!0,r.inTieChord[S.pitches.length]=void 0),le.startTie&&(r.inTieChord[S.pitches.length]=!0),k=le.endChar,delete le.endChar;else if(y[k]===" ")o("Spaces are not allowed in chords",y,k),k++;else{if(k<y.length&&y[k]==="]"){k++,r.next_note_duration!==0&&(S.duration=S.duration*r.next_note_duration,r.next_note_duration=0),C(r,I,S)&&(S.pitches.forEach(function(U){U.endTie=!0}),j(r,I,!1)),z>0&&!(S.rest&&S.rest.type==="spacer")&&(z--,z===0&&(S.endTriplet=!0));for(var ve=!1;k<y.length&&!ve;){switch(y[k]){case" ":case" ":_(S);break;case")":S.endSlur===void 0?S.endSlur=1:S.endSlur++;break;case"-":S.pitches.forEach(function(U){U.startTie={}}),j(r,I,!0);break;case">":case"<":var ge=D(y,k);k+=ge[0]-1,r.next_note_duration=ge[2],$?$=$*ge[1]:$=ge[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var ye=p.getFraction(y,k);$=ye.value,k=ye.index;var R=y[k];R===" "&&(se=!0),R==="-"||R===")"||R===" "||R==="<"||R===">"?k--:ve=!0;break;case"0":$=0;break;default:ve=!0;break}ve||k++}}else o("Expected ']' to end the chords",y,k);S.pitches!==void 0&&($!==null&&(S.duration=S.duration*$,se&&_(S)),r.addFormattingOptions(S,n.formatting,"note"),c.appendElement("note",w+K,w+k,S),r.measureNotEmpty=!0,S={}),ce=!0}}}else{var q={},Y=L(y,k,q,!0);if(q.endTie!==void 0&&j(r,I,!0),Y!==null){Y.pitch!==void 0?(S.pitches=[{}],Y.accidental!==void 0&&(S.pitches[0].accidental=Y.accidental),S.pitches[0].pitch=Y.pitch,S.pitches[0].name=Y.name,(Y.midipitch||Y.midipitch===0)&&(S.pitches[0].midipitch=Y.midipitch),Y.endSlur!==void 0&&(S.pitches[0].endSlur=Y.endSlur),Y.endTie!==void 0&&(S.pitches[0].endTie=Y.endTie),Y.startSlur!==void 0&&(S.pitches[0].startSlur=Y.startSlur),S.startSlur!==void 0&&(S.pitches[0].startSlur=S.startSlur),S.dottedSlur!==void 0&&(S.pitches[0].dottedSlur=!0),Y.startTie!==void 0&&(S.pitches[0].startTie=Y.startTie),S.startTie!==void 0&&(S.pitches[0].startTie=S.startTie)):(S.rest=Y.rest,Y.rest.type==="multimeasure"&&H()&&(r.currBarNumber+=Y.rest.text-1),Y.endSlur!==void 0&&(S.endSlur=Y.endSlur),Y.endTie!==void 0&&(S.rest.endTie=Y.endTie),Y.startSlur!==void 0&&(S.startSlur=Y.startSlur),Y.startTie!==void 0&&(S.rest.startTie=Y.startTie),S.startTie!==void 0&&(S.rest.startTie=S.startTie)),Y.chord!==void 0&&(S.chord=Y.chord),Y.duration!==void 0&&(S.duration=Y.duration),Y.decoration!==void 0&&(S.decoration=Y.decoration),Y.graceNotes!==void 0&&(S.graceNotes=Y.graceNotes),delete S.startSlur,delete S.dottedSlur,C(r,I,S)&&(S.pitches!==void 0?S.pitches[0].endTie=!0:S.rest.type!=="spacer"&&(S.rest.endTie=!0),j(r,I,!1)),(Y.startTie||S.startTie)&&j(r,I,!0),k=Y.endChar,z>0&&!(Y.rest&&Y.rest.type==="spacer")&&(z--,z===0&&(S.endTriplet=!0)),Y.end_beam&&_(S),S.rest&&S.rest.type==="rest"&&S.duration===1&&B(r)<=1&&(S.rest.type="whole",S.duration=B(r)),S.duration<1&&a.indexOf(S.duration)===-1&&S.duration!==0&&(!S.rest||S.rest.type!=="spacer")&&o("Duration not representable: "+y.substring(K,k),y,k),r.addFormattingOptions(S,n.formatting,"note");var W=c.appendElement("note",w+K,w+k,S);W||(this.startNewLine(),c.appendElement("note",w+K,w+k,S)),r.measureNotEmpty=!0,S={}}}k===K&&(y[k]!==" "&&y[k]!=="`"&&o("Unknown character ignored",y,k),k++)}}}this.lineContinuation=y.indexOf("")>=0||V[0]>0,this.lineContinuation||(S={})}};var j=function(y,k,w){var O=y.currentVoice?y.currentVoice.staffNum*100+y.currentVoice.index:0;y.inTie[k]===void 0&&(y.inTie[k]=[]),y.inTie[k][O]=w},F=function(y,k){if(y[k]==='"'){var w=p.getBrackettedSubstring(y,k,5);if(w[2]||o("Missing the closing quote while parsing the chord symbol",y,k),w[0]>0&&w[1].length>0&&w[1][0]==="^")w[1]=w[1].substring(1),w[2]="above";else if(w[0]>0&&w[1].length>0&&w[1][0]==="_")w[1]=w[1].substring(1),w[2]="below";else if(w[0]>0&&w[1].length>0&&w[1][0]==="<")w[1]=w[1].substring(1),w[2]="left";else if(w[0]>0&&w[1].length>0&&w[1][0]===">")w[1]=w[1].substring(1),w[2]="right";else if(w[0]>0&&w[1].length>0&&w[1][0]==="@"){w[1]=w[1].substring(1);var O=p.getFloat(w[1]);if(O.digits===0)return o("Missing first position in absolutely positioned annotation.",y,k),w[1]=w[1].replace("@",""),w[2]="above",w;if(w[1]=w[1].substring(O.digits),w[1][0]!==",")return o("Missing comma absolutely positioned annotation.",y,k),w[1]=w[1].replace("@",""),w[2]="above",w;w[1]=w[1].substring(1);var z=p.getFloat(w[1]);if(z.digits===0)return o("Missing second position in absolutely positioned annotation.",y,k),w[1]=w[1].replace("@",""),w[2]="above",w;w[1]=w[1].substring(z.digits);var V=p.skipWhiteSpace(w[1]);w[1]=w[1].substring(V),w[2]=null,w[3]={x:O.value,y:z.value}}else r.freegchord!==!0&&(w[1]=w[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),w[1]=w[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),w[1]=w[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),w[1]=w[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),w[1]=w[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),w[1]=w[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),w[2]="default",w[1]=g.chordName(r,w[1]);return w}return[0,""]},b=function(y,k){if(y[k]==="{"){var w=p.getBrackettedSubstring(y,k,1,"}");w[2]||o("Missing the closing '}' while parsing grace note",y,k),y[k+w[0]]===")"&&(w[0]++,w[1]+=")");for(var O=[],z=0,V=!1;z<w[1].length;){var I=!1;w[1][z]==="/"&&(I=!0,z++);var K=L(w[1],z,{},!1);K!==null?(K.duration=K.duration/(r.default_length*8),I&&(K.acciaccatura=!0),K.rest?o("Rests not allowed as grace notes '"+w[1][z]+"' while parsing grace note",y,k):O.push(K),V&&(K.endTie=!0,V=!1),K.startTie&&(V=!0),z=K.endChar,delete K.endChar,K.end_beam&&(K.endBeam=!0,delete K.end_beam)):(w[1][z]===" "?O.length>0&&(O[O.length-1].endBeam=!0):o("Unknown character '"+w[1][z]+"' while parsing grace note",y,k),z++)}if(O.length)return[w[0],O]}return[0]};function M(y,k){if(y[k]==="&"){for(var w=k;y[k]&&y[k]!==":"&&y[k]!=="|";)k++;return[k-w,y.substring(w+1,k)]}return[0]}function B(y){var k=y.origMeter;return!k||k.type!=="specified"||!k.value||k.value.length===0?1:parseInt(k.value[0].num,10)/parseInt(k.value[0].den,10)}var A=function(y,k){var w=r.macros[y[k]];if(w!==void 0)return(w[0]==="!"||w[0]==="+")&&(w=w.substring(1)),(w[w.length-1]==="!"||w[w.length-1]==="+")&&(w=w.substring(0,w.length-1)),l.includes(w)?[1,w]:d.includes(w)?(r.volumePosition==="hidden"&&(w=""),[1,w]):f.includes(w)?(r.dynamicPosition==="hidden"&&(w=""),[1,w]):(r.ignoredDecorations.includes(w)||o("Unknown macro: "+w,y,k),[1,""]);switch(y[k]){case".":if(y[k+1]==="("||y[k+1]==="-")break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var O=p.getBrackettedSubstring(y,k,5);if(O[1].length>1&&(O[1][0]==="^"||O[1][0]==="_")&&(O[1]=O[1].substring(1)),l.includes(O[1]))return O;if(d.includes(O[1]))return r.volumePosition==="hidden"&&(O[1]=""),O;if(f.includes(O[1]))return r.dynamicPosition==="hidden"&&(O[1]=""),O;var z=u.findIndex(function(V){return O[1]===V[0]});return z>=0?(O[1]=u[z][1],O):(z=i.findIndex(function(V){return O[1]===V[0]}),z>=0?(O[1]=i[z][1],r.dynamicPosition==="hidden"&&(O[1]=""),O):y[k]==="!"&&(O[0]===1||y[k+O[0]-1]!=="!")?[1,null]:(o("Unknown decoration: "+O[1],y,k),O[1]="",O));case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"];case"t":return[1,"trillh"]}return[0,0]},P=function(y,k){for(var w=k;p.isWhiteSpace(y[k]);)k++;return[k-w]},N=function(y,k){var w=p.getBarLine(y,k);if(w.len===0)return[0,""];if(w.warn)return o(w.warn,y,k),[w.len,""];for(var O=0;O<y.length&&y[k+w.len+O]===" ";O++);var z=w.len;if(y[k+w.len+O]==="["&&(w.len+=O+1),y[k+w.len]==='"'&&y[k+w.len-1]==="["){var V=p.getBrackettedSubstring(y,k+w.len,5);return[w.len+V[0],w.token,V[1]]}var I=p.getTokenOf(y.substring(k+w.len),"1234567890-,");return I.len===0||I.token[0]==="-"?[z,w.token]:[w.len+I.len,w.token,I.token]},E=function(y,k){var w={},O=k;for(y[k]==="."&&y[k+1]==="("&&(w.dottedSlur=!0,k++);y[k]==="("||p.isWhiteSpace(y[k]);)y[k]==="("&&(k+1<y.length&&y[k+1]>="2"&&y[k+1]<="9"?(w.triplet!==void 0?o("Can't nest triplets",y,k):(w.triplet=y[k+1]-"0",w.tripletQ=m[w.triplet],w.num_notes=w.triplet,k+2<y.length&&y[k+2]===":"&&(k+3<y.length&&y[k+3]===":"?k+4<y.length&&y[k+4]>="1"&&y[k+4]<="9"?(w.num_notes=y[k+4]-"0",k+=3):o("expected number after the two colons after the triplet to mark the duration",y,k):k+3<y.length&&y[k+3]>="1"&&y[k+3]<="9"?(w.tripletQ=y[k+3]-"0",k+4<y.length&&y[k+4]===":"?k+5<y.length&&y[k+5]>="1"&&y[k+5]<="9"&&(w.num_notes=y[k+5]-"0",k+=4):k+=2):o("expected number after the triplet to mark the duration",y,k))),k++):w.startSlur===void 0?w.startSlur=1:w.startSlur++),k++;return w.consumed=k-O,w};x.prototype.startNewLine=function(){var y={startChar:-1,endChar:-1};r.partForNextLine.title&&(y.part=r.partForNextLine),y.clef=r.currentVoice&&r.staves[r.currentVoice.staffNum].clef!==void 0?Object.assign({},r.staves[r.currentVoice.staffNum].clef):Object.assign({},r.clef);var k=r.currentVoice?r.currentVoice.scoreTranspose:0;if(y.key=T.standardKey(r.key.root+r.key.acc+r.key.mode,r.key.root,r.key.acc,k),y.key.mode=r.key.mode,r.key.impliedNaturals&&(y.key.impliedNaturals=r.key.impliedNaturals),r.key.explicitAccidentals)for(var w=0;w<r.key.explicitAccidentals.length;w++){for(var O=!1,z=0;z<y.key.accidentals.length;z++)y.key.accidentals[z].note===r.key.explicitAccidentals[w].note&&(y.key.accidentals[z].acc=r.key.explicitAccidentals[w].acc,O=!0);O||y.key.accidentals.push(r.key.explicitAccidentals[w])}if(r.targetKey=y.key,y.key.explicitAccidentals&&delete y.key.explicitAccidentals,T.addPosToKey(y.clef,y.key),r.meter!==null?(r.currentVoice?(r.staves.forEach(function(Q){Q.meter=r.meter}),y.meter=r.staves[r.currentVoice.staffNum].meter,r.staves[r.currentVoice.staffNum].meter=null):y.meter=r.meter,r.meter=null):r.currentVoice&&r.staves[r.currentVoice.staffNum].meter&&(y.meter=r.staves[r.currentVoice.staffNum].meter,r.staves[r.currentVoice.staffNum].meter=null),r.currentVoice&&r.currentVoice.name&&(y.name=r.currentVoice.name),r.vocalfont&&(y.vocalfont=r.vocalfont),r.tripletfont&&(y.tripletfont=r.tripletfont),r.gchordfont&&(y.gchordfont=r.gchordfont),r.style&&(y.style=r.style),r.currentVoice){var V=r.staves[r.currentVoice.staffNum];V.brace&&(y.brace=V.brace),V.bracket&&(y.bracket=V.bracket),V.connectBarLines&&(y.connectBarLines=V.connectBarLines),V.name&&(y.name=V.name[r.currentVoice.index]),V.subname&&(y.subname=V.subname[r.currentVoice.index]),r.currentVoice.stem&&(y.stem=r.currentVoice.stem),r.currentVoice.stafflines&&(y.stafflines=r.currentVoice.stafflines),r.currentVoice.staffscale&&(y.staffscale=r.currentVoice.staffscale),r.currentVoice.scale&&(y.scale=r.currentVoice.scale),r.currentVoice.color&&(y.color=r.currentVoice.color),r.currentVoice.style&&(y.style=r.currentVoice.style),r.currentVoice.transpose&&(y.clef.transpose=r.currentVoice.transpose),y.currentVoice=r.currentVoice;for(var I=Object.keys(r.voices),K=0;K<I.length;K++)y.currentVoice.staffNum===r.voices[I[K]].staffNum&&y.currentVoice.index===r.voices[I[K]].index&&(y.currentVoiceName=I[K])}r.barNumbers===0&&H()&&r.currBarNumber!==1&&(y.barNumber=r.currBarNumber),c.startNewLine(y),r.key.impliedNaturals&&delete r.key.impliedNaturals,r.partForNextLine={},r.tempoForNextLine.length===4&&c.appendElement(r.tempoForNextLine[0],r.tempoForNextLine[1],r.tempoForNextLine[2],r.tempoForNextLine[3]),r.tempoForNextLine=[]};var _=function(y){return y.duration!==void 0&&y.duration<.25&&(y.end_beam=!0),y},L=function(y,k,w,O){var z=function(ne){return ne==="octave"||ne==="duration"||ne==="Zduration"||ne==="broken_rhythm"||ne==="end_slur"},V;y[k]==="."&&y[k+1]==="-"&&(V=!0,k++);for(var I="startSlur",K=!1;;){switch(y[k]){case"(":if(I==="startSlur")w.startSlur===void 0?w.startSlur=1:w.startSlur++;else return z(I)?(w.endChar=k,w):null;break;case")":if(z(I))w.endSlur===void 0?w.endSlur=1:w.endSlur++;else return null;break;case"^":if(I==="startSlur")w.accidental="sharp",I="sharp2";else if(I==="sharp2")w.accidental="dblsharp",I="pitch";else return z(I)?(w.endChar=k,w):null;break;case"_":if(I==="startSlur")w.accidental="flat",I="flat2";else if(I==="flat2")w.accidental="dblflat",I="pitch";else return z(I)?(w.endChar=k,w):null;break;case"=":if(I==="startSlur")w.accidental="natural",I="pitch";else return z(I)?(w.endChar=k,w):null;break;case"A":case"B":case"C":case"D":case"E":case"F":case"G":case"a":case"b":case"c":case"d":case"e":case"f":case"g":if(I==="startSlur"||I==="sharp2"||I==="flat2"||I==="pitch"){if(w.pitch=e[y[k]],w.pitch+=7*(r.currentVoice&&r.currentVoice.octave!==void 0?r.currentVoice.octave:r.octave),w.name=y[k],w.accidental&&(w.name=v[w.accidental]+w.name),g.note(r,w),I="octave",O&&r.next_note_duration!==0?(w.duration=r.default_length*r.next_note_duration,r.next_note_duration=0,K=!0):w.duration=r.default_length,r.clef&&r.clef.type==="perc"||r.currentVoice&&r.currentVoice.clef==="perc"){var Q=y[k];w.accidental&&(Q=v[w.accidental]+Q),n.formatting&&n.formatting.midi&&n.formatting.midi.drummap&&(w.midipitch=n.formatting.midi.drummap[Q])}}else return z(I)?(w.endChar=k,w):null;break;case",":if(I==="octave")w.pitch-=7,w.name+=",";else return z(I)?(w.endChar=k,w):null;break;case"'":if(I==="octave")w.pitch+=7,w.name+="'";else return z(I)?(w.endChar=k,w):null;break;case"x":case"X":case"y":case"z":case"Z":if(I==="startSlur")w.rest={type:h[y[k]]},delete w.accidental,delete w.startSlur,delete w.startTie,delete w.endSlur,delete w.endTie,delete w.end_beam,delete w.grace_notes,w.rest.type.indexOf("multimeasure")>=0?(w.duration=n.getBarLength(),w.rest.text=1,I="Zduration"):(O&&r.next_note_duration!==0?(w.duration=r.default_length*r.next_note_duration,r.next_note_duration=0,K=!0):w.duration=r.default_length,I="duration");else return z(I)?(w.endChar=k,w):null;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if(I==="octave"||I==="duration"){var G=p.getFraction(y,k);for(w.duration=w.duration*G.value,w.endChar=G.index;G.index<y.length&&(p.isWhiteSpace(y[G.index])||y[G.index]==="-");)y[G.index]==="-"?w.startTie={}:w=_(w),G.index++;k=G.index-1,I="broken_rhythm"}else if(I==="sharp2")w.accidental="quartersharp",I="pitch";else if(I==="flat2")w.accidental="quarterflat",I="pitch";else if(I==="Zduration"){var ee=p.getNumber(y,k);return w.duration=ee.num*n.getBarLength(),w.rest.text=ee.num,w.endChar=ee.index,w}else return null;break;case"-":if(I==="startSlur")c.addTieToLastNote(V),w.endTie=!0;else if(I==="octave"||I==="duration"||I==="end_slur")if(w.startTie={},!K&&O)I="broken_rhythm";else return p.isWhiteSpace(y[k+1])&&_(w),w.endChar=k+1,w;else return I==="broken_rhythm"?(w.endChar=k,w):null;break;case" ":case" ":if(z(I)){w.end_beam=!0,V=!1;do y[k]==="."&&y[k+1]==="-"&&(V=!0,k++),y[k]==="-"&&(w.startTie={},V&&(w.startTie.style="dotted")),k++;while(k<y.length&&(p.isWhiteSpace(y[k])||y[k]==="-")||y[k]==="."&&y[k+1]==="-");if(w.endChar=k,!K&&O&&(y[k]==="<"||y[k]===">"))k--,I="broken_rhythm";else return w}else return null;break;case">":case"<":if(z(I))if(O){var te=D(y,k);k+=te[0]-1,r.next_note_duration=te[2],w.duration=te[1]*w.duration,I="end_slur"}else return w.endChar=k,w;else return null;break;default:return z(I)?(w.endChar=k,w):null}if(k++,k===y.length)return z(I)?(w.endChar=k,w):null}return null},D=function(y,k){switch(y[k]){case">":return k<y.length-2&&y[k+1]===">"&&y[k+2]===">"?[3,1.875,.125]:k<y.length-1&&y[k+1]===">"?[2,1.75,.25]:[1,1.5,.5];case"<":return k<y.length-2&&y[k+1]==="<"&&y[k+2]==="<"?[3,.125,1.875]:k<y.length-1&&y[k+1]==="<"?[2,.25,1.75]:[1,.5,1.5]}return null};function H(){return r.currentVoice===void 0||r.currentVoice.staffNum===0&&r.currentVoice.index===0}return it=x,it}var st,ra;function ms(){if(ra)return st;ra=1;var T=Ne(),g=function(p,o){this.lineIndex=0,this.lines=p,this.multilineVars=o,this.skipWhiteSpace=function(t){for(var a=0;a<t.length;a++)if(!this.isWhiteSpace(t[a]))return a;return t.length};var r=function(t,a){return a>=t.length};this.eatWhiteSpace=function(t,a){for(var e=a;e<t.length;e++)if(!this.isWhiteSpace(t[e]))return e-a;return e-a},this.getKeyPitch=function(t){var a=this.skipWhiteSpace(t);if(r(t,a))return{len:0};switch(t[a]){case"A":return{len:a+1,token:"A"};case"B":return{len:a+1,token:"B"};case"C":return{len:a+1,token:"C"};case"D":return{len:a+1,token:"D"};case"E":return{len:a+1,token:"E"};case"F":return{len:a+1,token:"F"};case"G":return{len:a+1,token:"G"}}return{len:0}},this.getSharpFlat=function(t){if(t==="bass")return{len:0};switch(t[0]){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(t){var a=function(v,m){for(;m<v.length&&(v[m]>="a"&&v[m]<="z"||v[m]>="A"&&v[m]<="Z");)m++;return m},e=this.skipWhiteSpace(t);if(r(t,e))return{len:0};var h=t.substring(e,e+3).toLowerCase();switch((h.length>1&&h[1]===" "||h[1]==="^"||h[1]==="_"||h[1]==="=")&&(h=h[0]),h){case"mix":return{len:a(t,e),token:"Mix"};case"dor":return{len:a(t,e),token:"Dor"};case"phr":return{len:a(t,e),token:"Phr"};case"lyd":return{len:a(t,e),token:"Lyd"};case"loc":return{len:a(t,e),token:"Loc"};case"aeo":return{len:a(t,e),token:"m"};case"maj":return{len:a(t,e),token:""};case"ion":return{len:a(t,e),token:""};case"min":return{len:a(t,e),token:"m"};case"m":return{len:a(t,e),token:"m"}}return{len:0}},this.getClef=function(t,a){var e=t,h=this.skipWhiteSpace(t);if(r(t,h))return{len:0};var v=!1,m=t.substring(h);if(T.startsWith(m,"clef=")&&(v=!0,m=m.substring(5),h+=5),m.length===0&&v)return{len:h+5,warn:"No clef specified: "+e};var x=this.skipWhiteSpace(m);if(r(m,x))return{len:0};x>0&&(h+=x,m=m.substring(x));var C=null;if(T.startsWith(m,"treble"))C="treble";else if(T.startsWith(m,"bass3"))C="bass3";else if(T.startsWith(m,"bass"))C="bass";else if(T.startsWith(m,"tenor"))C="tenor";else if(T.startsWith(m,"alto2"))C="alto2";else if(T.startsWith(m,"alto1"))C="alto1";else if(T.startsWith(m,"alto"))C="alto";else if(!a&&v&&T.startsWith(m,"none"))C="none";else if(T.startsWith(m,"perc"))C="perc";else if(!a&&v&&T.startsWith(m,"C"))C="tenor";else if(!a&&v&&T.startsWith(m,"F"))C="bass";else if(!a&&v&&T.startsWith(m,"G"))C="treble";else return{len:h+5,warn:"Unknown clef specified: "+e};return m=m.substring(C.length),x=this.isMatch(m,"+8"),x>0?C+="+8":(x=this.isMatch(m,"-8"),x>0&&(C+="-8")),{len:h+C.length,token:C,explicit:v}},this.getBarLine=function(t,a){switch(t[a]){case"]":switch(++a,t[a]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++a,t[a]>="1"&&t[a]<="9"||t[a]==='"'?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}case":":switch(++a,t[a]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++a,t[a]){case"]":switch(++a,t[a]){case"|":return++a,t[a]===":"?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}case"|":return++a,t[a]===":"?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}default:return{len:1,warn:"Unknown bar symbol"}}case"[":if(++a,t[a]==="|")switch(++a,t[a]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}else return t[a]>="1"&&t[a]<="9"||t[a]==='"'?{len:1,token:"bar_invisible"}:{len:0};case"|":switch(++a,t[a]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++a,t[a]===":"?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var e=0;t[a+e]===":";)e++;return{len:1+e,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(t,a){for(var e=0;e<t.length;e++)if(a.indexOf(t[e])<0)return{len:e,token:t.substring(0,e)};return{len:e,token:t}},this.getToken=function(t,a,e){for(var h=a;h<e&&!this.isWhiteSpace(t[h]);)h++;return t.substring(a,h)},this.isMatch=function(t,a){var e=this.skipWhiteSpace(t);return r(t,e)?0:T.startsWith(t.substring(e),a)?e+a.length:0},this.getPitchFromTokens=function(t){var a={},e={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};if(a.position=e[t[0].token],a.position===void 0)return{warn:"Pitch expected. Found: "+t[0].token};for(t.shift();t.length;)switch(t[0].token){case",":a.position-=7,t.shift();break;case"'":a.position+=7,t.shift();break;default:return a}return a},this.getKeyAccidentals2=function(t){for(var a;t.length>0;){var e;if(t[0].token==="^"){if(e="sharp",t.shift(),t.length===0)return{accs:a,warn:"Expected note name after "+e};switch(t[0].token){case"^":e="dblsharp",t.shift();break;case"/":e="quartersharp",t.shift();break}}else if(t[0].token==="=")e="natural",t.shift();else if(t[0].token==="_"){if(e="flat",t.shift(),t.length===0)return{accs:a,warn:"Expected note name after "+e};switch(t[0].token){case"_":e="dblflat",t.shift();break;case"/":e="quarterflat",t.shift();break}}else return{accs:a};if(t.length===0)return{accs:a,warn:"Expected note name after "+e};switch(t[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":a===void 0&&(a=[]),a.push({acc:e,note:t[0].token[0]}),t[0].token.length===1?t.shift():t[0].token=t[0].token.substring(1);break;default:return{accs:a,warn:"Expected note name after "+e+" Found: "+t[0].token}}}return{accs:a}},this.getKeyAccidental=function(t){var a={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},e=this.skipWhiteSpace(t);if(r(t,e))return{len:0};var h=null;switch(t[e]){case"^":case"_":case"=":h=t[e];break;default:return{len:0}}if(e++,r(t,e))return{len:1,warn:"Expected note name after accidental"};switch(t[e]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:e+1,token:{acc:a[h],note:t[e]}};case"^":case"_":case"/":if(h+=t[e],e++,r(t,e))return{len:2,warn:"Expected note name after accidental"};switch(t[e]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:e+1,token:{acc:a[h],note:t[e]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(t){return t===" "||t===" "||t===""},this.getMeat=function(t,a,e){var h=t.indexOf("%",a);for(h>=0&&h<e&&(e=h);a<e&&(t[a]===" "||t[a]===" "||t[a]==="");)a++;for(;a<e&&(t[e-1]===" "||t[e-1]===" "||t[e-1]==="");)e--;return{start:a,end:e}};var n=function(t){return t>="A"&&t<="Z"||t>="a"&&t<="z"},c=function(t){return t>="0"&&t<="9"};this.tokenize=function(t,a,e,h){var v=this.getMeat(t,a,e);a=v.start,e=v.end;for(var m=[],x;a<e;){if(t[a]==='"'){for(x=a+1;x<e&&t[x]!=='"';)x++;m.push({type:"quote",token:t.substring(a+1,x),start:a+1,end:x}),x++}else if(n(t[a])){if(x=a+1,h)for(;x<e&&!this.isWhiteSpace(t[x]);)x++;else for(;x<e&&n(t[x]);)x++;m.push({type:"alpha",token:t.substring(a,x),continueId:c(t[x]),start:a,end:x}),a=x+1}else if(t[a]==="."&&c(t[x+1])){x=a+1;for(var C=null,S=null;x<e&&c(t[x]);)x++;S=parseFloat(t.substring(a,x)),m.push({type:"number",token:t.substring(a,x),intt:C,floatt:S,continueId:n(t[x]),start:a,end:x}),a=x+1}else if(c(t[a])||t[a]==="-"&&c(t[x+1])){x=a+1;for(var j=null,F=null;x<e&&c(t[x]);)x++;if(t[x]==="."&&c(t[x+1]))for(x++;x<e&&c(t[x]);)x++;else j=parseInt(t.substring(a,x));F=parseFloat(t.substring(a,x)),m.push({type:"number",token:t.substring(a,x),intt:j,floatt:F,continueId:n(t[x]),start:a,end:x}),a=x+1}else t[a]===" "||t[a]===" "||m.push({type:"punct",token:t[a],start:a,end:a+1}),x=a+1;a=x}return m},this.getVoiceToken=function(t,a,e){for(var h=a;h<e&&this.isWhiteSpace(t[h])||t[h]==="=";)h++;if(t[h]==='"'){var v=t.indexOf('"',h+1);return v===-1||v>=e?{len:1,err:"Missing close quote"}:{len:v-a+1,token:this.translateString(t.substring(h+1,v))}}else{for(var m=h;m<e&&!this.isWhiteSpace(t[m])&&t[m]!=="=";)m++;return{len:m-a+1,token:t.substring(h,m)}}};var s={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å",aa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å",AA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~N":"Ñ","~n":"ñ","=s":"š",vs:"š",DH:"Ð",dh:"ð",HO:"Ő",Ho:"ő",HU:"Ű",Hu:"ű","'Y":"Ý","'y":"ý","^Y":"Ŷ","^y":"ŷ",'"Y':"Ÿ",'"y':"ÿ",vS:"Š",vZ:"Ž",vz:"ž"},l={"#":"♯",b:"♭","=":"♮"},d={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:" ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};this.translateString=function(t){var a=t.split("\\");if(a.length===1)return t;var e=null;return a.forEach(function(h){if(e===null)e=h;else{var v=s[h.substring(0,2)];v!==void 0?e+=v+h.substring(2):(v=d[h.substring(0,3)],v!==void 0?e+=v+h.substring(3):(v=l[h.substring(0,1)],v!==void 0?e+=v+h.substring(1):e+="\\"+h))}}),e},this.getNumber=function(t,a){for(var e=0;a<t.length;)switch(t[a]){case"0":e=e*10,a++;break;case"1":e=e*10+1,a++;break;case"2":e=e*10+2,a++;break;case"3":e=e*10+3,a++;break;case"4":e=e*10+4,a++;break;case"5":e=e*10+5,a++;break;case"6":e=e*10+6,a++;break;case"7":e=e*10+7,a++;break;case"8":e=e*10+8,a++;break;case"9":e=e*10+9,a++;break;default:return{num:e,index:a}}return{num:e,index:a}},this.getFraction=function(t,a){var e=1,h=1;if(t[a]!=="/"){var v=this.getNumber(t,a);e=v.num,a=v.index}if(t[a]==="/")if(a++,t[a]==="/"){for(var m=.5;t[a++]==="/";)m=m/2;return{value:e*m,index:a-1}}else{var x=a,C=this.getNumber(t,a);C.num===0&&x===a&&(C.num=2),C.num!==0&&(h=C.num),a=C.index}return{value:e/h,index:a}};function f(t){const a=/^(\d+)\./.exec(t);return a?a[1]:null}var u=[{match:/,\s*The$/,replace:"The "},{match:/,\s*the$/,replace:"the "},{match:/,\s*A$/,replace:"A "},{match:/,\s*a$/,replace:"a "},{match:/,\s*An$/,replace:"An "},{match:/,\s*an$/,replace:"an "},{match:/,\s*Da$/,replace:"Da "},{match:/,\s*La$/,replace:"La "},{match:/,\s*Le$/,replace:"Le "},{match:/,\s*Les$/,replace:"Les "},{match:/,\s*Ye$/,replace:"Ye "}];this.theReverser=function(t){for(var a=0;a<u.length;a++){var e=u[a],h=t.match(e.match);if(h){var v=f(t);v&&(t=t.replace(v+".",""),t=t.trim());var m=h[0].length,x=e.replace+t.substring(0,t.length-m);return v&&(x=v+". "+x),x}}return t},this.stripComment=function(t){var a=t.indexOf("%");return a>=0?T.strip(t.substring(0,a)):T.strip(t)},this.getInt=function(t){var a=parseInt(t);if(isNaN(a))return{digits:0};var e=""+a,h=t.indexOf(e);return{value:a,digits:h+e.length}},this.getFloat=function(t){var a=parseFloat(t);if(isNaN(a))return{digits:0};var e=""+a,h=t.indexOf(e);return{value:a,digits:h+e.length}},this.getMeasurement=function(t){if(t.length===0)return{used:0};var a=1,e="";if(t[0].token==="-")t.shift(),e="-",a++;else if(t[0].type!=="number")return{used:0};if(e+=t.shift().token,t.length===0)return{used:1,value:parseInt(e)};var h=t.shift();if(h.token==="."){if(a++,t.length===0)return{used:a,value:parseInt(e)};if(t[0].type==="number"&&(h=t.shift(),e=e+"."+h.token,a++,t.length===0))return{used:a,value:parseFloat(e)};h=t.shift()}switch(h.token){case"pt":return{used:a+1,value:parseFloat(e)};case"px":return{used:a+1,value:parseFloat(e)};case"cm":return{used:a+1,value:parseFloat(e)/2.54*72};case"in":return{used:a+1,value:parseFloat(e)*72};default:return t.unshift(h),{used:a,value:parseFloat(e)}}};var i=function(t){return t=t.replace(/\\n/g,`
|
|
6
|
+
`),t=t.replace(/\\"/g,'"'),t};this.getBrackettedSubstring=function(t,a,e,h){for(var v=h||t[a],m=a+1,x=!1;m<t.length&&(x||t[m]!==v);)x=t[m]==="\\",++m;return t[m]===v?[m-a+1,i(t.substring(a+1,m)),!0]:(m=a+e,m>t.length-1&&(m=t.length-1),[m-a+1,i(t.substring(a+1,m)),!1])}};return g.prototype.peekLine=function(){return this.lines[this.lineIndex]},g.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex<this.lines.length){var p=this.lines[this.lineIndex];return this.lineIndex++,p}return null},st=g,st}var ot,aa;function Pi(){if(aa)return ot;aa=1;function T(f,u,i){if(!(!u||f.lines.length===0)){var t=f.deline({lineBreaks:!1}),a=p(t,u);f.lines=g(t,a,i),f.lineBreaks=a}}function g(f,u,i){for(var t=[],a=[],e=[],h=1,v=0;v<u.length;v++){var m=u[v];if(f[m.ogLine].staff){var x=f[m.ogLine].staff[m.staff];if(t[m.line]||(t[m.line]={staff:[]}),!t[m.line].staff[m.staff]){t[m.line].staff[m.staff]={voices:[]},i!==void 0&&m.staff===0&&m.line>0&&(t[m.line].staff[m.staff].barNumber=h);for(var C=Object.keys(x),S=0;S<C.length;S++){var j=C[S]==="voices";C[S]==="meter"&&m.line!==0&&(j=!0),j||(t[m.line].staff[m.staff][C[S]]=x[C[S]])}a[m.staff]&&(t[m.line].staff[m.staff].key=a[m.staff])}t[m.line].staff[m.staff].voices[m.voice]||(t[m.line].staff[m.staff].voices[m.voice]=[]),t[m.line].staff[m.staff].voices[m.voice]=f[m.ogLine].staff[m.staff].voices[m.voice].slice(m.start,m.end+1),e[m.staff*10+m.voice]&&t[m.line].staff[m.staff].voices[m.voice].unshift({el_type:"stem",direction:e[m.staff*10+m.voice].direction});for(var F=t[m.line].staff[m.staff].voices[m.voice],b=F.length-1;b>=0;b--)if(F[b].el_type==="key"){a[m.staff]={root:F[b].root,acc:F[b].acc,mode:F[b].mode,accidentals:F[b].accidentals.filter(function(B){return B.acc!=="natural"})};break}for(b=F.length-1;b>=0;b--)if(F[b].el_type==="stem"){e[m.staff*10+m.voice]={direction:F[b].direction};break}if(i!==void 0&&m.staff===0&&m.voice===0)for(b=0;b<F.length;b++)F[b].el_type==="bar"&&(h++,b===F.length-1?delete F[b].barNumber:F[b].barNumber=h)}else t[m.line]=f[m.ogLine]}for(var M=0;M<t.length;M++)t[M].staff&&(t[M].staff=t[M].staff.filter(function(B){return B!=null}));return t}function p(f,u){for(var i=[],t=0,a=0,e=0,h=0;h<f.length;h++){var v=f[h];if(v.staff){var m=a,x=u[t];t++;for(var C=0;C<v.staff.length;C++)for(var S=v.staff[C],j=0;j<S.voices.length;j++){e=m;for(var F=0,b=0,M=S.voices[j],B=0,A=0;A<M.length;A++){var P=M[A];P.el_type==="bar"&&(x[b]===F&&(i.push({ogLine:h,line:e,staff:C,voice:j,start:B,end:A}),B=A+1,e++,a=Math.max(a,e),b++),F++)}i.push({ogLine:h,line:e,staff:C,voice:j,start:B,end:M.length}),e++,a=Math.max(a,e)}}else i.push({ogLine:h,line:e}),e++,a=Math.max(a,e)}return i}function o(f,u){for(var i=[],t=[],a=0,e=0;e<f.length;e++){var h=f[e],v=a+h;if(v<u)a=v;else{var m=u-a,x=v-u;m<x&&a>0?(i.push(e-1),t.push(Math.round(a-h)),a=h):e<f.length-1&&(i.push(e),t.push(Math.round(a)),a=0)}}return t.push(Math.round(a)),{lineBreaks:i,totals:t}}function r(f){for(var u=[],i=0;i<f.length;i++)u.push(f[i]);return u}function n(f,u,i,t,a,e,h,v,m,x,C){for(var S=x;S<f.length;S++){var j=f[S];i+=j,t+=j;var F=Math.abs(i-u[v]),b=Math.abs(F-e)<u[0]/10;if(b)if(F<e){var M=r(a),B=r(m);B.push(S-1),M.push(t-j),C.push({accumulator:i,lineAccumulator:j,lineWidths:M,lastVariance:Math.abs(i-u[v+1]),highestVariance:Math.max(h,e),currLine:v+1,lineBreaks:B,startIndex:S+1})}else F>e&&S<f.length-1&&(M=r(a),B=r(m),C.push({accumulator:i,lineAccumulator:t,lineWidths:M,lastVariance:F,highestVariance:Math.max(h,F),currLine:v,lineBreaks:B,startIndex:S+1}));F>e?(m.push(S-1),v++,h=Math.max(h,e),e=Math.abs(i-u[v]),a.push(t-j),t=j):e=F}a.push(t)}function c(f,u,i,t){for(var a=Math.ceil(f.total/u),e=Math.floor(f.total/a),h=[],v=0;v<a;v++)h.push(e*(v+1));var m=[];m.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var x=0;x<m.length;)n(f.measureWidths,h,m[x].accumulator,m[x].lineAccumulator,m[x].lineWidths,m[x].lastVariance,m[x].highestVariance,m[x].currLine,m[x].lineBreaks,m[x].startIndex,m),x++;for(v=0;v<m.length;v++){var C=m[v];C.variances=[],C.aveVariance=0;for(var S=0;S<C.lineWidths.length;S++){var j=C.lineWidths[S];C.variances.push(j-h[0]),C.aveVariance+=Math.abs(j-h[0])}C.aveVariance=C.aveVariance/C.lineWidths.length,t.attempts.push({type:"optimizeLineWidths",lineBreaks:C.lineBreaks,variances:C.variances,aveVariance:C.aveVariance,widths:f.measureWidths})}var F=9999999,b=-1;for(v=0;v<m.length;v++)C=m[v],C.aveVariance<F&&(F=C.aveVariance,b=v);return{failed:!1,lineBreaks:m[b].lineBreaks,variance:m[b].highestVariance}}function s(f,u,i){for(var t=[],a=[],e=0,h=!1,v=0;v<f.length;v++)e+=f[v],e>u&&(h=!0),v%i===i-1&&(v!==f.length-1&&t.push(v),a.push(Math.round(e)),e=0);return{failed:h,totals:a,lineBreaks:t}}function l(f,u,i){var t={lineBreaks:f,staffwidth:u};for(var a in i)i.hasOwnProperty(a)&&a!=="wrap"&&a!=="staffwidth"&&(t[a]=i[a]);return{revisedParams:t}}function d(f,u,i){if(u.length===0||i.staffwidth<u[0].left)return{reParse:!1,explanation:"Staff width is narrower than the margin",revisedParams:i};var t=i.scale?Math.max(i.scale,.1):1,a=i.wrap.minSpacing?Math.max(parseFloat(i.wrap.minSpacing),1):1,e=i.wrap.minSpacingLimit?Math.max(parseFloat(i.wrap.minSpacingLimit),1):a-.1,h=i.wrap.maxSpacing?Math.max(parseFloat(i.wrap.maxSpacing),1):void 0;i.wrap.lastLineLimit&&!h&&(h=Math.max(parseFloat(i.wrap.lastLineLimit),1));for(var v=i.wrap.preferredMeasuresPerLine?Math.max(parseInt(i.wrap.preferredMeasuresPerLine,10),0):void 0,m=[],x=[],C=0;C<u.length;C++){var S=u[C],j=i.staffwidth-S.left,F=j/a/t,b=j/h/t,M=j/e/t,B={widths:S,lineBreakPoint:F,minLineSize:b,attempts:[],staffWidth:i.staffwidth,minWidth:Math.round(M)},A=null;if(v){var P=s(S.measureWidths,F,v);B.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:v,lineBreaks:P.lineBreaks,failed:P.failed,totals:P.totals}),P.failed||(A=P.lineBreaks)}if(!A){var N=o(S.measureWidths,F);B.attempts.push({type:"Free Form",lineBreaks:N.lineBreaks,totals:N.totals}),A=N.lineBreaks,A.length>0&&S.measureWidths.length<25&&(N=c(S,F,A,B),B.attempts.push({type:"Optimize",failed:N.failed,reason:N.reason,lineBreaks:N.lineBreaks,totals:N.totals}),N.failed||(A=N.lineBreaks))}m.push(A),x.push(B)}var E=i.staffwidth,_=l(m,E,i);return _.explanation=x,_.reParse=!0,_}return ot={wrapLines:T,calcLineWraps:d},ot}var ct,na;function _e(){if(na)return ct;na=1;var T={};return T.FONTEM=360,T.FONTSIZE=30,T.STEP=T.FONTSIZE*93/720,T.SPACE=10,T.TOPNOTE=15,T.STAVEHEIGHT=100,T.INDENT=50,ct=T,ct}var lt,ia;function Li(){if(ia)return lt;ia=1;var T,g=Ne();return function(){var p=1,o=128;T=function(e,h){h=h||{};var v,m=h.program||0,x=h.midiTranspose||0;e.visualTranspose&&(x-=e.visualTranspose);var C=h.channel||0,S=!1,j=h.drum||"",F=h.drumBars||1,b=h.drumIntro||0,M=j!=="",B=!!h.drumOff,A=[],P=50;m=parseInt(m,10),x=parseInt(x,10),C=parseInt(C,10),C===10&&(m=o),j=j.split(" "),F=parseInt(F,10),b=parseInt(b,10);var N=e.formatting.bagpipes;N&&(m=71);var E=[];if(e.formatting.midi){var _=e.formatting.midi;_.program&&_.program.length>0&&(m=_.program[0],_.program.length>1&&(m=_.program[1],C=_.program[0]),S=!0),_.transpose&&(x=_.transpose[0]),_.channel&&(C=_.channel[0],S=!0),_.drum&&(j=_.drum),_.drumbars&&(F=_.drumbars[0]),_.drumon&&(M=!0),C===10&&(m=o),_.beat&&E.push({el_type:"beat",beats:_.beat}),_.nobeataccents&&E.push({el_type:"beataccents",value:!1})}h.qpm?v=parseInt(h.qpm,10):e.metaText.tempo?v=d(e.metaText.tempo,e.getBeatLength()):h.defaultQpm?v=h.defaultQpm:v=180;var L=[];N&&L.push({el_type:"bagpipes"}),L.push({el_type:"instrument",program:m}),C&&L.push({el_type:"channel",channel:C}),x&&L.push({el_type:"transpose",transpose:x}),L.push({el_type:"tempo",qpm:v});for(var D=0;D<E.length;D++)L.push(E[D]);var H=[],y=[],k=[],w=[],O=[0],z={};z[0]={el_type:"tempo",qpm:v,timing:0};for(var V,I=[],K=[],Q=!1,G=e.lines,ee=0;ee<G.length;ee++){var te=G[ee];if(te.staff){let we=function(de){var Te={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]},ke;if(de.decoration){if(de.decoration.indexOf("pppp")>=0?ke="pppp":de.decoration.indexOf("ppp")>=0?ke="ppp":de.decoration.indexOf("pp")>=0?ke="pp":de.decoration.indexOf("p")>=0?ke="p":de.decoration.indexOf("mp")>=0?ke="mp":de.decoration.indexOf("mf")>=0?ke="mf":de.decoration.indexOf("f")>=0?ke="f":de.decoration.indexOf("ff")>=0?ke="ff":de.decoration.indexOf("fff")>=0?ke="fff":de.decoration.indexOf("ffff")>=0&&(ke="ffff"),ke){V=Te[ke].slice(0);let Ye=[V];Array.isArray(de.decoration)&&(Ye=[],de.decoration.forEach(Se=>{Se in Te&&Ye.push(Te[Se].slice(0))})),H[X].push({el_type:"beat",beats:V.slice(0),volumesPerNotePitch:Ye}),k[se]=!1,w[se]=!1}if(de.decoration.indexOf("crescendo(")>=0){var Be=r(ce,q,"crescendo)"),De=Math.min(127,V[0]+P),Pe=n(ce,q+Be+1,Object.keys(Te));Pe&&(De=Te[Pe][0]),Be>0?k[se]=Math.floor((De-V[0])/Be):k[se]=!1,w[se]=!1}else if(de.decoration.indexOf("crescendo)")>=0)k[se]=!1;else if(de.decoration.indexOf("diminuendo(")>=0){var ze=r(ce,q,"diminuendo)"),Ie=Math.max(15,V[0]-P),Ve=n(ce,q+ze+1,Object.keys(Te));Ve&&(Ie=Te[Ve][0]),k[se]=!1,ze>0?w[se]=Math.floor((Ie-V[0])/ze):w[se]=!1}else de.decoration.indexOf("diminuendo)")>=0&&(w[se]=!1)}};for(var ne=te.staff,X=0,ae=0;ae<ne.length;ae++){var $=ne[ae];if(!($.clef&&$.clef.type==="TAB"))for(var se=0;se<$.voices.length;se++){var ce=$.voices[se];if(!H[X]){H[X]=[].concat(JSON.parse(JSON.stringify(L)));var fe=l(te.staff,X);fe&&H[X].unshift({el_type:"name",trackName:fe})}if(x&&$.clef.type==="perc"&&H[X].push({el_type:"transpose",transpose:0}),$.clef&&$.clef.type==="perc"&&!S)for(var le=0;le<H[X].length;le++)H[X][le].el_type==="instrument"&&(H[X][le].program=o);else $.key&&i(H[X],$.key);$.meter&&t(H[X],$.meter),!Q&&M&&(H[X].push({el_type:"drum",params:{pattern:j,bars:F,on:M,intro:b}}),Q=!0),$.clef&&$.clef.type!=="perc"&&$.clef.transpose&&($.clef.el_type="clef",H[X].push({el_type:"transpose",transpose:$.clef.transpose}),y[X]=!1),$.clef&&$.clef.type&&($.clef.type.indexOf("-8")>=0?(H[X].push({el_type:"transpose",transpose:-12}),y[X]=!0):$.clef.type.indexOf("+8")>=0?(H[X].push({el_type:"transpose",transpose:12}),y[X]=!0):y[X]&&(H[X].push({el_type:"transpose",transpose:0}),y[X]=!1)),e.formatting.midi&&e.formatting.midi.drumoff&&(H[X].push({el_type:"bar"}),H[X].push({el_type:"drum",params:{pattern:"",on:!1}}));var ve=0,ge=0,ye=0,R=0;V=[105,95,85,1];for(var q=0;q<ce.length;q++){var Y=ce[q];switch(Y.el_type){case"note":if(k[se]&&(V[0]+=k[se],V[1]+=k[se],V[2]+=k[se],H[X].push({el_type:"beat",beats:V.slice(0)})),w[se]&&(V[0]+=w[se],V[1]+=w[se],V[2]+=w[se],H[X].push({el_type:"beat",beats:V.slice(0)})),we(Y),!Y.rest||Y.rest.type!=="spacer"){var W={elem:Y,el_type:"note",timing:O[X]};if(Y.style?W.style=Y.style:A[X]&&(W.style=A[X]),W.duration=Y.duration===0?.25:Y.duration,Y.startTriplet){if(ge=Y.tripletMultiplier,ye=Y.startTriplet*ge*Y.duration,Y.startTriplet!==Y.tripletR&&q+Y.tripletR<=ce.length){for(var U=0,J=q;J<q+Y.tripletR;J++)U+=ce[J].duration;ye=ge*U}W.duration=W.duration*ge,W.duration=Math.round(W.duration*1e6)/1e6,R=W.duration}else ge&&(Y.endTriplet?(ge=0,W.duration=Math.round((ye-R)*1e6)/1e6):(W.duration=W.duration*ge,W.duration=Math.round(W.duration*1e6)/1e6,R+=W.duration));Y.rest&&(W.rest=Y.rest),Y.decoration&&(W.decoration=Y.decoration.slice(0)),Y.pitches&&(W.pitches=g.cloneArray(Y.pitches)),Y.gracenotes&&(W.gracenotes=g.cloneArray(Y.gracenotes)),Y.chord&&(W.chord=g.cloneArray(Y.chord)),H[X].push(W),Y.style==="rhythm"&&s(H),ve++,O[X]+=W.duration}break;case"key":case"keySignature":i(H[X],Y);break;case"meter":t(H[X],Y);break;case"clef":Y.transpose&&H[X].push({el_type:"transpose",transpose:Y.transpose}),Y.type&&(Y.type.indexOf("-8")>=0?H[X].push({el_type:"transpose",transpose:-12}):Y.type.indexOf("+8")>=0&&H[X].push({el_type:"transpose",transpose:12}));break;case"tempo":v=d(Y,e.getBeatLength()),H[X].push({el_type:"tempo",qpm:v,timing:O[X]}),z[""+O[X]]={el_type:"tempo",qpm:v,timing:O[X]};break;case"bar":ve>0&&H[X].push({el_type:"bar"}),we(Y),ve=0;var re=Y.type==="bar_right_repeat"||Y.type==="bar_dbl_repeat",he=Y.startEnding==="1",Z=Y.type==="bar_left_repeat"||Y.type==="bar_dbl_repeat"||Y.type==="bar_right_repeat";if(re){var ie=I[X];ie||(ie=0);var be=K[X];be||(be=H[X].length);for(var pe=ie;pe<be;pe++){var oe=Object.assign({},H[X][pe]);oe.pitches&&(oe.pitches=g.cloneArray(oe.pitches)),H[X].push(oe)}K[X]=void 0,I[X]=void 0}he&&(K[X]=H[X].length),Z&&(I[X]=H[X].length);break;case"style":A[X]=Y.head;break;case"timeSignature":H[X].push(f(Y));break;case"part":break;case"stem":case"scale":case"break":case"font":break;case"midi":var me=!1;switch(Y.cmd){case"drumon":M=!0,me=!0;break;case"drumoff":M=!1,me=!0;break;case"drum":j=Y.params,me=!0;break;case"drumbars":F=Y.params[0],me=!0;break;case"drummap":break;case"channel":Y.params[0]===10&&H[X].push({el_type:"instrument",program:o});break;case"program":a(H[X],{el_type:"instrument",program:Y.params[0]}),S=!0;break;case"transpose":H[X].push({el_type:"transpose",transpose:Y.params[0]});break;case"gchordoff":H[X].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":H[X].push({el_type:"gchordOn",tacet:!1});break;case"beat":H[X].push({el_type:"beat",beats:Y.params});break;case"nobeataccents":H[X].push({el_type:"beataccents",value:!1});break;case"beataccents":H[X].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":H[X].push({el_type:Y.cmd,volume:Y.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":H[X].push({el_type:Y.cmd,param:Y.params[0]});break;case"bassprog":case"chordprog":H[X].push({el_type:Y.cmd,value:Y.params[0],octaveShift:Y.params[1]});break;case"gchordbars":H[X].push({el_type:Y.cmd,param:Y.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",Y.cmd,Y)}me&&(H[0].push({el_type:"drum",params:{pattern:j,bars:F,intro:b,on:M}}),Q=!0);break;default:console.log("MIDI: element type "+Y.el_type+" not handled.")}}X++,O[X]||(O[X]=0)}}}}if(c(H,z),b)for(var Ee=e.getPickupLength(),ue=0;ue<H.length;ue++){for(var xe=0;H[ue][xe].el_type!=="note"&&H[ue].length>xe;)xe++;if(H[ue].length>xe){for(var J=0;J<b;J++)Ee===0||J<b-1?(H[ue].splice(xe,0,{el_type:"note",rest:{type:"rest"},duration:p},{el_type:"bar"}),xe+=2):H[ue].splice(xe++,0,{el_type:"note",rest:{type:"rest"},duration:p-Ee});B&&(M=!1,H[ue].splice(xe++,0,{el_type:"drum",params:{pattern:j,bars:F,intro:b,on:M}}),B=!1)}}return H.length>0&&H[0].length>0&&(H[0][0].pickupLength=e.getPickupLength()),H};function r(e,h,v){for(var m=0,x=h+1;x<e.length;x++)if(e[x].el_type==="note"&&m++,e[x].decoration&&e[x].decoration.indexOf(v)>=0)return m;return m}function n(e,h,v){for(var m=Math.min(e.length,h+3),x=h;x<m;x++)if(e[x].el_type==="note"&&e[x].decoration){for(var C=0;C<e[x].decoration.length;C++)if(v.indexOf(e[x].decoration[C])>=0)return e[x].decoration[C]}return null}function c(e,h){if(!(!h||h.length===0))for(var v=Object.keys(h),m=0;m<e.length;m++)for(var x=e[m],C=h[0]?h[0].qpm:0,S=0;S<x.length;S++){var j=x[S];j.el_type==="tempo"&&(C=j.qpm),v.indexOf(""+j.timing)>=0&&C!==h[""+j.timing].qpm&&(C=h[""+j.timing].qpm,j.el_type==="tempo"?(j.qpm=h[""+j.timing].qpm,S++):(e[m].splice(S,0,{el_type:"tempo",qpm:h[""+j.timing].qpm,timing:j.timing}),S+=2))}}function s(e){for(var h=0;h<e.length;h++)for(var v=e[h],m=v.length-1;m>=0&&v[m].el_type!=="bar";)v[m].noChordVoice=!0,m--}function l(e,h){if(!(!e||e.length<=h||!e[h].title))return e[h].title.join(" ")}function d(e,h){var v=.25;e.duration&&(v=e.duration[0]);var m=60;return e.bpm&&(m=e.bpm),v*m/h}function f(e){var h;switch(e.type){case"common_time":h={el_type:"meter",num:4,den:4};break;case"cut_time":h={el_type:"meter",num:2,den:2};break;case"specified":h={el_type:"meter",num:e.value[0].num,den:e.value[0].den};break;default:h={el_type:"meter"}}return p=h.num/h.den,h}function u(e){for(var h=[],v=0;v<e.length;v++)e[v].acc!=="natural"&&h.push(e[v]);return h}function i(e,h){var v;h.root==="HP"?v={el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}:v={el_type:"key",accidentals:u(h.accidentals)},a(e,v)}function t(e,h){var v=f(h);a(e,v)}function a(e,h){for(var v=e.length-1;v>=0;v--)if(e[v].el_type===h.el_type){JSON.stringify(e[v])!==JSON.stringify(h)&&e.push(h);return}e.push(h)}}(),lt=T,lt}var ht,sa;function gs(){if(sa)return ht;sa=1;var T=function(l,d,f,u){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=l,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!d,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=u,this.tempoChangeFactor=1,this.bassInstrument=f.bassprog&&f.bassprog.length>=1?f.bassprog[0]:0,this.chordInstrument=f.chordprog&&f.chordprog.length>=1?f.chordprog[0]:0,this.bassOctaveShift=f.bassprog&&f.bassprog.length===2?f.bassprog[1]:0,this.chordOctaveShift=f.chordprog&&f.chordprog.length===2?f.chordprog[1]:0,this.boomVolume=f.bassvol&&f.bassvol.length===1?f.bassvol[0]:64,this.chickVolume=f.chordvol&&f.chordvol.length===1?f.chordvol[0]:48,f.gchord&&f.gchord.length>0?this.overridePattern=o(f.gchord[0]):this.overridePattern=void 0};T.prototype.setMeter=function(l){this.meter=l},T.prototype.setTempoChangeFactor=function(l){this.tempoChangeFactor=l},T.prototype.setLastBarTime=function(l){this.lastBarTime=l},T.prototype.setTranspose=function(l){this.transpose=l},T.prototype.setRhythmHead=function(l,d){this.hasRhythmHead=l;var f=[];if(l&&this.lastChord&&this.lastChord.chick)for(var u=0;u<this.lastChord.chick.length;u++){var i=Object.assign({},d.pitches[0]);i.actualPitch=this.lastChord.chick[u],f.push(i)}return f},T.prototype.barEnd=function(l){this.chordTrack.length>0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,c(l.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},T.prototype.gChordOn=function(l){this.chordsOff||(this.gChordTacet=l.tacet)},T.prototype.paramChange=function(l){switch(l.el_type){case"gchord":l.param&&l.param.length>0?this.overridePattern=o(l.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=l.value,l.octaveShift!=null&&l.octaveShift!=null?this.bassOctaveShift=l.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=l.value,l.octaveShift!=null&&l.octaveShift!=null?this.chordOctaveShift=l.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=l.param;break;case"chordvol":this.chickVolume=l.param;break;default:console.log("unhandled midi param",l)}},T.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},T.prototype.addTrack=function(l){this.chordTrackEmpty()||l.push(this.chordTrack)},T.prototype.findChord=function(l){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!l.chord||l.chord.length===0)return null;for(var d=0;d<l.chord.length;d++){var f=l.chord[d];if(f.position==="default")return f.name;if(this.breakSynonyms.indexOf(f.name.toLowerCase())>=0)return"break"}return null},T.prototype.interpretChord=function(l){if(l.length!==0){if(l==="break")return{chick:[]};var d=l.substring(0,1);if(d==="("){if(l=l.substring(1,l.length-1),l.length===0)return;d=l.substring(0,1)}var f=this.basses[d];if(f){for(var u=this.transpose;u<-8;)u+=12;for(;u>8;)u-=12;f+=u,f<33?f+=12:f>44&&(f-=12);var i=f;f+=this.bassOctaveShift*12;var t=f-5,a;l.length===1&&(a=this.chordNotes(f,""));var e=l.substring(1),h=e.substring(0,1);h==="b"||h==="♭"?(i--,f--,t--,e=e.substring(1)):(h==="#"||h==="♯")&&(i++,f++,t++,e=e.substring(1));var v=e.split("/");if(a=this.chordNotes(i,v[0]),a.length>=3){var m=a[2]-a[0];t=t+m-7}if(v.length===2){var x=this.basses[v[1].substring(0,1)];if(x){var C=v[1].substring(1),S={"#":1,"♯":1,b:-1,"♭":-1}[C]||0;f=this.basses[v[1].substring(0,1)]+S+u,f+=this.bassOctaveShift*12,t=f}}return{boom:f,boom2:t,chick:a}}}},T.prototype.chordNotes=function(l,d){var f=this.chordIntervals[d];f||(d.slice(0,2).toLowerCase()==="ma"||d[0]==="M"?f=this.chordIntervals.M:d[0]==="m"||d[0]==="-"?f=this.chordIntervals.m:f=this.chordIntervals.M),l+=12,l+=this.chordOctaveShift*12;for(var u=[],i=0;i<f.length;i++)u.push(l+f[i]);return u},T.prototype.writeNote=function(l,d,f,u,i,t){l!==void 0&&this.chordTrack.push({cmd:"note",pitch:l,volume:f,start:this.lastBarTime+u*s(d,this.tempoChangeFactor),duration:s(i,this.tempoChangeFactor),gap:0,instrument:t})},T.prototype.chordTrackEmpty=function(){for(var l=!0,d=0;d<this.chordTrack.length&&l;d++)this.chordTrack[d].cmd==="note"&&(l=!1);return l},T.prototype.resolveChords=function(l,d){if(!this.hasRhythmHead){var f=this.meter.num,u=this.meter.den,i=1/u,t=i/2,a=parseInt(f,10)/parseInt(u,10),e=a-(d-l)/this.tempoChangeFactor;Math.abs(e)<1e-5&&(e=0),(this.currentChords.length===0||this.currentChords[0].beat!==0)&&this.currentChords.unshift({beat:0,chord:this.chordLastBar});var h=r(this.currentChords,8*f/u),v=this.overridePattern?this.overridePattern:this.rhythmPatterns[f+"/"+u];if(e){v=[];for(var m=(d-l)/this.tempoChangeFactor*8,x=0;x<m/2;x+=2)v.push("chick"),v.push("")}if(!v){v=[];for(var x=0;x<8*f/u/2;x++)v.push("chick"),v.push("")}for(var C=!0,S=Math.min(v.length,h.length),x=0;x<S;x++){x>0&&h[x-1]&&h[x]&&h[x-1].boom!==h[x].boom&&(C=!0);var j=v[x],F=j.indexOf("boom")>=0,b=!F&&x!==0&&v[0].indexOf("boom")>=0&&(!h[x-1]||h[x-1].boom!==h[x].boom),M=g(h[x],j,C,b);F&&(C=!1);for(var B=0;B<M.length;B++)this.writeNote(M[B],.125,F||b?this.boomVolume:this.chickVolume,x,t,F||b?this.bassInstrument:this.chordInstrument),b?b=!1:F=!1}}},T.prototype.processChord=function(l){if(!this.chordTrackFinished){var d=this.findChord(l);if(d){var f=this.interpretChord(d);if(f){this.chordTrack.length===0&&this.chordTrack.push({cmd:"program",channel:this.chordChannel,instrument:this.chordInstrument}),this.lastChord=f;var u=n(this.lastBarTime,c(l.time));this.currentChords.push({chord:this.lastChord,beat:u,start:c(l.time)})}}}};function g(l,d,f,u){var i=[];if(!l)return i;d.indexOf("boom")>=0?i.push(f?l.boom:l.boom2):u&&i.push(l.boom);var t=l.chick.length;if(d.indexOf("chick")>=0)for(var a=0;a<t;a++)i.push(l.chick[a]);switch(d){case"DO":i.push(l.chick[0]);break;case"MI":i.push(l.chick[1]);break;case"SOL":i.push(p(l,2));break;case"TI":i.push(p(l,3));break;case"TOP":i.push(p(l,4));break;case"do":i.push(l.chick[0]+12);break;case"mi":i.push(l.chick[1]+12);break;case"sol":i.push(p(l,2)+12);break;case"ti":i.push(p(l,3)+12);break;case"top":i.push(p(l,4)+12);break}return i}function p(l,d){var f=Math.floor(d/l.chick.length),u=l.chick[d%l.chick.length];return u+f*12}function o(l){for(var d=[],f=0;f<l.length;f++){var u=l[f];switch(u){case"z":d.push("");break;case"2":d.push("");break;case"c":d.push("chick");break;case"b":d.push("boom&chick");break;case"f":d.push("boom");break;case"G":d.push("DO");break;case"H":d.push("MI");break;case"I":d.push("SOL");break;case"J":d.push("TI");break;case"K":d.push("TOP");break;case"g":d.push("do");break;case"h":d.push("mi");break;case"i":d.push("sol");break;case"j":d.push("ti");break;case"k":d.push("top");break}}return d}function r(l,d,f){var u=[];if(l.length===0)return u;for(var i=l[0].chord,t=1;t<l.length;t++){for(var a=l[t];u.length<a.beat;)u.push(i);i=a.chord}for(;u.length<d;)u.push(i);return u}function n(l,d){var f=d-l;return f*8}T.prototype.breakSynonyms=["break","(break)","no chord","n.c.","tacet"],T.prototype.basses={A:33,B:35,C:36,D:38,E:40,F:41,G:43},T.prototype.chordIntervals={dim:[0,3,6],"°":[0,3,6],"˚":[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"˚7":[0,3,6,9],ø7:[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7♭5":[0,3,6,10],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"7b5":[0,4,6,10],"7(b5)":[0,4,6,10],"7♭5":[0,4,6,10],"7(b9,b5)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7(#9,b5)":[0,4,6,10,15],"7#9b5":[0,4,6,10,15],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],m:[0,3,7],"-":[0,3,7],m6:[0,3,7,9],"-6":[0,3,7,9],m7:[0,3,7,10],"-7":[0,3,7,10],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"-6/9":[0,3,7,9,14],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-maj7":[0,3,7,11],"-9+7":[0,3,7,11,13],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-maj9":[0,3,7,11,14],"-∆9":[0,3,7,11,14],mM9:[0,3,7,11,14],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],"6add9":[0,4,7,9,14],69:[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,7,10,14,17],13:[0,4,7,10,14,21],"7b9":[0,4,7,10,13],"7♭9":[0,4,7,10,13],"7(b9)":[0,4,7,10,13],"7(#9)":[0,4,7,10,15],"7#9":[0,4,7,10,15],"(13)":[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7(#9,b13)":[0,4,7,10,15,20],"7(#11)":[0,4,7,10,14,18],"7#11":[0,4,7,10,14,18],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"9(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"13(#11)":[0,4,7,10,18,21],"13#11":[0,4,7,10,18,21],maj7:[0,4,7,11],"∆7":[0,4,7,11],Δ7:[0,4,7,11],maj9:[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7(11)":[0,4,7,11,17],"maj7(#11)":[0,4,7,11,18],"maj7(13)":[0,4,7,14,21],"maj7(9,13)":[0,4,7,11,14,21],"7sus4":[0,5,7,10],m7sus4:[0,3,7,10,17],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,10,14],"13sus4":[0,5,7,10,14,21],aug7:[0,4,8,10],"+7":[0,4,8,10],"+":[0,4,8],"7#5":[0,4,8,10],"7♯5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9♯5":[0,4,8,10,14],"9+5":[0,4,8,10,14],"-7(#5)":[0,3,8,10],"-7#5":[0,3,8,10],"7(#5)":[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"maj7(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5,#11)":[0,4,8,11,18],"maj7#5#11":[0,4,8,11,18],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,21],"13#5":[0,4,8,10,14,21],5:[0,7],"5(8)":[0,7,12],"5add8":[0,7,12]},T.prototype.rhythmPatterns={"2/2":["boom","","","","chick","","",""],"3/2":["boom","","","","chick","","","","chick","","",""],"4/2":["boom","","","","chick","","","","boom","","","","chick","","",""],"2/4":["boom","","chick",""],"3/4":["boom","","chick","","chick",""],"4/4":["boom","","chick","","boom","","chick",""],"5/4":["boom","","chick","","chick","","boom","","chick",""],"6/4":["boom","","chick","","boom","","chick","","boom","","chick",""],"3/8":["boom","","chick"],"5/8":["boom","chick","chick","boom","chick"],"6/8":["boom","","chick","boom","","chick"],"7/8":["boom","chick","chick","boom","chick","boom","chick"],"9/8":["boom","","chick","boom","","chick","boom","","chick"],"10/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick"],"11/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick","chick"],"12/8":["boom","","chick","boom","","chick","boom","","chick","boom","","chick"]};function c(l){return l/1e6}function s(l,d){return Math.round(l*d*1e6)/1e6}return ht=T,ht}var ut,oa;function Oi(){if(oa)return ut;oa=1;var T={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};function g(p){var o=(p.accidental?p.accidental[0]:"x")+p.verticalPos;return T[o]}return ut=g,ut}var dt,ca;function vs(){if(ca)return dt;ca=1;var T,g=gs(),p=Oi();return function(){var o,r,n,c,s,l=1,d,f,u,i,t,a,e={num:4,den:4},h=128,v,m=!0,x=105,C=95,S=85,j=[[x,C,S]],F=.25,b,M,B=0,A,P={},N,E=0,_,L=0,D=-.001,H=.4;T=function(R,q,Y,W){q||(q={}),W||(W={}),o=[],r=[0,0,0,0,0,0,0],c=[],s=q.qpm,l=1,d=void 0,f=void 0,u=void 0,i=void 0,t=0,_=Y,e={num:4,den:4},m=!0,x=105,C=95,S=85,j=[],F=.25,b=void 0,M=void 0,B=0,A=[],P={},N=1,R.length>0&&R[0].length>0&&(E=R[0][0].pickupLength),q.bassprog!==void 0&&!W.bassprog&&(W.bassprog=[q.bassprog]),q.bassvol!==void 0&&!W.bassvol&&(W.bassvol=[q.bassvol]),q.chordprog!==void 0&&!W.chordprog&&(W.chordprog=[q.chordprog]),q.chordvol!==void 0&&!W.chordvol&&(W.chordvol=[q.chordvol]),q.gchord!==void 0&&!W.gchord&&(W.gchord=[q.gchord]),a=new g(R.length,q.chordsOff,W,e),O(R,q);for(var U=0;U<R.length;U++){n=0,a.setTranspose(n);var J=R[U];u=[{cmd:"program",channel:U,instrument:d}],i=void 0,v=0,a.setLastBarTime(0);var re=!1;(q.voicesOff===!0||q.voicesOff&&q.voicesOff.length&&q.voicesOff.indexOf(U)>=0)&&(re=!0);for(var he=0;he<J.length;he++){var Z=J[he];switch(Z.el_type){case"name":i={cmd:"text",type:"name",text:Z.trackName};break;case"note":G(Z,re);break;case"key":r=X(Z);break;case"meter":e=Z,a.setMeter(e),F=z(e),ve();break;case"tempo":s?l=Z.qpm?s/Z.qpm:1:s=Z.qpm,a.setTempoChangeFactor(l);break;case"transpose":n=Z.transpose,a.setTranspose(n);break;case"bar":a.barEnd(Z),o=[],U===0&&ge(R.length+1),a.setRhythmHead(!1),v=k(Z.time),a.setLastBarTime(v);break;case"bagpipes":break;case"instrument":if(d===void 0&&(d=Z.program),f=Z.program,u.length>0&&u[u.length-1].cmd==="program")u[u.length-1].instrument=Z.program;else{var ie;for(ie=u.length-1;ie>=0&&u[ie].cmd!=="program";ie--);(ie<0||u[ie].instrument!==Z.program)&&u.push({cmd:"program",channel:0,instrument:Z.program})}break;case"channel":y(Z.channel);break;case"drum":P=le(Z.params),ve();break;case"gchordOn":a.gChordOn(Z);break;case"beat":x=Z.beats[0],C=Z.beats[1],S=Z.beats[2],Z.volumesPerNotePitch?j=Z.volumesPerNotePitch:j=[];break;case"vol":b=Z.volume;break;case"volinc":M=Z.volume;break;case"beataccents":m=Z.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":a.paramChange(Z);break;default:console.log("MIDI creation. Unknown el_type: "+Z.el_type+`
|
|
7
|
+
`);break}}u[0].instrument===void 0&&(u[0].instrument=d||0),i&&u.unshift(i),c.push(u),a.finish(),A.length>0}return q.detuneOctave&&ye(c,parseInt(q.detuneOctave,10)),a.addTrack(c),A.length>0&&c.push(A),{tempo:s,instrument:d,tracks:c,totalDuration:t}};function y(R){for(var q=u.length-1;q>=0;q--)if(u[q].cmd==="program"){u[q].channel=R;return}}function k(R){return R/1e6}function w(R){return Math.round(R*l*1e6)/1e6}function O(R,q){for(var Y=0;Y<R.length;Y++){for(var W=R[Y],U={},J=q.qpm,re=0,he=1,Z=0;Z<W.length;Z++){var ie=W[Z];if(ie.el_type==="tempo"){J?he=ie.qpm?J/ie.qpm:1:J=ie.qpm;continue}ie.time=re;var be=ie.duration?ie.duration:0;if(re+=Math.round(be*he*1e6),ie.pitches){for(var pe=0;pe<ie.pitches.length;pe++){var oe=ie.pitches[pe];if(oe){if(oe.duration=ie.duration,oe.startTie)U[oe.pitch]===void 0?U[oe.pitch]={el:Z,pitch:pe}:(W[U[oe.pitch].el].pitches[U[oe.pitch].pitch].duration+=oe.duration,ie.pitches[pe]=null);else if(oe.endTie){var me=U[oe.pitch];if(me){var Ee=oe.duration;delete W[me.el].pitches[me.pitch].startTie,W[me.el].pitches[me.pitch].duration+=Ee,ie.pitches[pe]=null,delete U[oe.pitch]}else delete oe.endTie}}}delete ie.duration}}for(var ue in U)if(U.hasOwnProperty(ue)){var xe=U[ue];delete W[xe.el].pitches[xe.pitch].startTie}}}function z(R){switch(parseInt(R.den,10)){case 2:return .5;case 4:return .25;case 8:return R.num%3===0?.375:.125;case 16:return .125}return .25}function V(R,q,Y){var W=Y-R;return W/q}function I(R,q,Y){if(q)return 0;let W=x,U=C,J=S;Y!==void 0&&j.length>=Y+1&&(W=j[Y][0],U=j[Y][1],J=j[Y][2]);var re;if(b!==void 0)re=b,b=void 0;else if(!m)re=U;else if(E>R)re=J;else{var he=V(v,z(e),R);he===0?re=W:parseInt(he,10)===he?re=U:re=J}return M&&(re+=M,M=void 0),re<0&&(re=0),re>127&&(re=127),q?0:re}function K(R,q){var Y={};if(R.decoration)for(var W=0;W<R.decoration.length;W++)R.decoration[W]==="staccato"?Y.thisBreakBetweenNotes="staccato":R.decoration[W]==="tenuto"?Y.thisBreakBetweenNotes="tenuto":R.decoration[W]==="accent"?Y.velocity=Math.min(127,q*1.5):R.decoration[W]==="trill"?Y.noteModification="trill":R.decoration[W]==="lowermordent"?Y.noteModification="lowermordent":R.decoration[W]==="uppermordent"?Y.noteModification="pralltriller":R.decoration[W]==="mordent"?Y.noteModification="mordent":R.decoration[W]==="turn"?Y.noteModification="turn":R.decoration[W]==="roll"?Y.noteModification="roll":R.decoration[W]==="pralltriller"?Y.noteModification="pralltriller":R.decoration[W]==="trillh"&&(Y.noteModification="trillh");return Y}function Q(R,q){var Y=q.start,W=q.duration,U=w(1/32);switch(R){case"trill":for(var J=2;W>0;)u.push({cmd:"note",pitch:q.pitch+J,volume:q.volume,start:Y,duration:U,gap:0,instrument:f,style:"decoration"}),J=J===2?0:2,W-=U,Y+=U;break;case"trillh":for(var J=1;W>0;)u.push({cmd:"note",pitch:q.pitch+J,volume:q.volume,start:Y,duration:U,gap:0,instrument:f,style:"decoration"}),J=J===1?0:1,W-=U,Y+=U;break;case"pralltriller":u.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:Y,duration:U,gap:0,instrument:f,style:"decoration"}),W-=U,Y+=U,u.push({cmd:"note",pitch:q.pitch+2,volume:q.volume,start:Y,duration:U,gap:0,instrument:f,style:"decoration"}),W-=U,Y+=U,u.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:Y,duration:W,gap:0,instrument:f});break;case"mordent":case"lowermordent":u.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:Y,duration:U,gap:0,instrument:f,style:"decoration"}),W-=U,Y+=U,u.push({cmd:"note",pitch:q.pitch-2,volume:q.volume,start:Y,duration:U,gap:0,instrument:f,style:"decoration"}),W-=U,Y+=U,u.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:Y,duration:W,gap:0,instrument:f});break;case"turn":U=q.duration/4,u.push({cmd:"note",pitch:q.pitch+2,volume:q.volume,start:Y,duration:U,gap:0,instrument:f,style:"decoration"}),u.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:Y+U,duration:U,gap:0,instrument:f,style:"decoration"}),u.push({cmd:"note",pitch:q.pitch-1,volume:q.volume,start:Y+U*2,duration:U,gap:0,instrument:f,style:"decoration"}),u.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:Y+U*3,duration:U,gap:0,instrument:f,style:"decoration"});break;case"roll":for(;W>0;)u.push({cmd:"note",pitch:q.pitch,volume:q.volume,start:Y,duration:U,gap:0,instrument:f,style:"decoration"}),W-=U*2,Y+=U*2;break}}function G(R,q){var Y=I(k(R.time),q);a.processChord(R);var W;if(R.gracenotes&&R.pitches&&R.pitches.length>0&&R.pitches[0]&&(W=ae(R.gracenotes,R.pitches[0].duration),R.elem&&(R.elem.midiGraceNotePitches=$(W,k(R.time),Y*2/3,f))),R.elem){var U=k(R.time),J=U/F/s*60*1e3;if(R.elem.currentTrackMilliseconds===void 0)R.elem.currentTrackMilliseconds=J,R.elem.currentTrackWholeNotes=U;else if(R.elem.currentTrackMilliseconds.length===void 0)R.elem.currentTrackMilliseconds!==J&&(R.elem.currentTrackMilliseconds=[R.elem.currentTrackMilliseconds,J],R.elem.currentTrackWholeNotes=[R.elem.currentTrackWholeNotes,U]);else{for(var re=!1,he=0;he<R.elem.currentTrackMilliseconds.length;he++)R.elem.currentTrackMilliseconds[he]===J&&(re=!0);re||(R.elem.currentTrackMilliseconds.push(J),R.elem.currentTrackWholeNotes.push(U))}}if(R.pitches){var Z="",ie=K(R,Y);ie.thisBreakBetweenNotes&&(Z=ie.thisBreakBetweenNotes),ie.velocity&&(Y=ie.velocity);var be=R.pitches;R.style==="rhythm"&&(be=a.setRhythmHead(!0,R)),R.elem&&(R.elem.midiPitches=[]);for(var pe=0;pe<be.length;pe++){let de=Y;!ie.velocity&&Array.isArray(R.decoration)&&R.decoration.length>pe&&(de=I(k(R.time),q,pe));var oe=be[pe];if(oe){oe.startSlur&&(B+=oe.startSlur.length),oe.endSlur&&(B-=oe.endSlur.length);var me=oe.actualPitch?oe.actualPitch:ne(oe);if(f===h&&_){var Ee=p(oe);Ee&&_[Ee]&&(me=_[Ee].sound)}var ue={cmd:"note",pitch:me,volume:de,start:k(R.time),duration:w(oe.duration),instrument:f,startChar:R.elem.startChar,endChar:R.elem.endChar};if(ue=se(ue),R.gracenotes&&(ue.duration=ue.duration/2,ue.start=ue.start+ue.duration),R.elem&&R.elem.midiPitches.push(ue),ie.noteModification)Q(ie.noteModification,ue);else{switch(B>0?ue.endType="tenuto":Z&&(ue.endType=Z),ue.endType){case"tenuto":ue.gap=D;break;case"staccato":var xe=ue.duration*H;ue.gap=s/60*xe;break;default:ue.gap=L;break}u.push(ue)}}}u.length-1}var we=ee(R);t=Math.max(t,k(R.time)+w(we))}function ee(R){return R.pitches&&R.pitches.length>0&&R.pitches[0]?R.pitches[0].duration:R.elem?R.elem.duration:R.duration}var te=[0,2,4,5,7,9,11];function ne(R){if(R.midipitch!==void 0)return R.midipitch;var q=R.pitch;if(R.accidental)switch(R.accidental){case"sharp":o[q]=1;break;case"flat":o[q]=-1;break;case"natural":o[q]=0;break;case"dblsharp":o[q]=2;break;case"dblflat":o[q]=-2;break;case"quartersharp":o[q]=.25;break;case"quarterflat":o[q]=-.25;break}var Y=ce(q)*12+te[fe(q)]+60;return o[q]!==void 0?Y+=o[q]:Y+=r[fe(q)],Y+=n,Y}function X(R){var q=[0,0,0,0,0,0,0];if(!R.accidentals)return q;for(var Y=0;Y<R.accidentals.length;Y++){var W=R.accidentals[Y],U;switch(W.acc){case"flat":U=-1;break;case"quarterflat":U=-.25;break;case"sharp":U=1;break;case"quartersharp":U=.25;break;default:U=0;break}var J=W.note.toLowerCase(),re=fe(J.charCodeAt(0)-99);q[re]+=U}return q}function ae(R,q){for(var Y=0,W=[],U,J=0;J<R.length;J++)U=R[J],Y+=U.duration;var re=q/2/Y;for(J=0;J<R.length;J++){U=R[J];var he=ne(U);if(f===h&&_){var Z=p(U);Z&&_[Z]&&(he=_[Z].sound)}var ie={pitch:he,duration:U.duration*re};ie=se(ie),W.push(ie)}return W}function $(R,q,Y,W){var U=[];Y=Math.round(Y);for(var J=0;J<R.length;J++){var re=R[J];u.push({cmd:"note",pitch:re.pitch,volume:Y,start:q,duration:re.duration,gap:0,instrument:W,style:"grace"}),U.push({pitch:re.pitch,durationInMeasures:re.duration,volume:Y,instrument:W}),q+=re.duration}return U}function se(R){var q=""+R.pitch;return q.indexOf(".75")>=0?(R.pitch=Math.round(R.pitch),R.cents=-50):q.indexOf(".25")>=0&&(R.pitch=Math.round(R.pitch),R.cents=50),R}function ce(R){return Math.floor(R/7)}function fe(R){return R=R%7,R<0&&(R+=7),R}function le(R){if(R.pattern.length===0||R.on===!1)return{on:!1};for(var q=R.pattern[0],Y=[],W="",U=0,J=0;J<q.length;J++)if(q[J]==="d"&&U++,q[J]==="d"||q[J]==="z")W.length!==0?(Y.push(W),W=q[J]):W=W+q[J];else{if(W.length===0)return{on:!1};W=W+q[J]}if(W.length!==0&&Y.push(W),R.pattern.length!==U*2+1)return{on:!1};for(var re={on:!0,bars:R.bars,pattern:[]},he=z(e),Z=0,ie=0;ie<Y.length;ie++){W=Y[ie];for(var be=1,pe=!1,oe=0,me=1;me<W.length;me++)switch(W[me]){case"/":oe!==0&&(be*=oe),oe=0,pe=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":oe=oe*10+W[me];break;default:return{on:!1}}pe?(oe===0&&(oe=2),be/=oe):oe&&(be*=oe),W[0]==="d"?(re.pattern.push({len:be*he,pitch:R.pattern[1+Z],velocity:R.pattern[1+Z+U]}),Z++):re.pattern.push({len:be*he,pitch:null})}return N=R.bars?R.bars:1,re}function ve(){if(!(!P||!P.pattern)){for(var R=P,q=0,Y=e.num/e.den,W=0;W<R.pattern.length;W++)q+=R.pattern[W].len;var U=q/N/Y;for(W=0;W<R.pattern.length;W++)R.pattern[W].len=R.pattern[W].len/U;P=R}}function ge(R){if(!(A.length===0&&!P.on)){var q=e.num/e.den;if(A.length===0){if(t<q)return;A.push({cmd:"program",channel:R,instrument:h})}if(P.on)for(var Y=v,W=0;W<P.pattern.length;W++){var U=w(P.pattern[W].len);P.pattern[W].pitch&&A.push({cmd:"note",pitch:P.pattern[W].pitch,volume:P.pattern[W].velocity,start:Y,duration:U,gap:0,instrument:h}),Y+=U}}}function ye(R,q){for(var Y={},W=0;W<R.length;W++)for(var U=0;U<R[W].length;U++){var J=R[W][U];J.cmd==="note"&&(Y[J.start]===void 0&&(Y[J.start]=[]),Y[J.start].push({track:W,event:U,pitch:J.pitch}))}var re=Object.keys(Y);for(W=0;W<re.length;W++){var he=Y[re[W]];if(he.length>1){he=he.sort(function(oe,me){return oe.pitch-me.pitch});var Z=he[he.length-1],ie=Z.pitch%12,be=!1;for(U=0;!be&&U<he.length-1;U++)he[U].pitch%12===ie&&(be=!0);if(be){var pe=R[Z.track][Z.event];pe.cents||(pe.cents=0),pe.cents+=q}}}}}(),dt=T,dt}var ft,la;function bs(){if(la)return ft;la=1;function T(l,d){d||(d={});for(var f=!!d.lineBreaks,u=[],i=!1,t=[],a=[],e=[],h=[],v=[],m=[],x=[],C=0;C<l.length;C++){var S=l[C];if(S.staff){if(i&&!S.vskip)for(var j=u[u.length-1],F=0;F<j.staff.length;F++){var b=S.staff[F],M=j.staff[F];if(b&&(c(b.meter,t[F])||(p(b.meter,b.voices),t[F]=b.meter,delete b.meter),c(b.key,a[F])||(o(b.key,b.voices),a[F]=b.key,delete b.key),b.title&&(M.abbrevTitle=b.title),c(b.clef,e[F])||(r(b.clef,b.voices),e[F]=b.clef,delete b.clef),c(b.vocalfont,h[F])||(n(b.vocalfont,b.voices,"vocalfont"),h[F]=b.vocalfont,delete b.vocalfont),c(b.gchordfont,v[F])||(n(b.gchordfont,b.voices,"gchordfont"),v[F]=b.gchordfont,delete b.gchordfont),c(b.tripletfont,m[F])||(n(b.tripletfont,b.voices,"tripletfont"),m[F]=b.tripletfont,delete b.tripletfont),c(b.annotationfont,x[F])||(n(b.annotationfont,b.voices,"annotationfont"),x[F]=b.annotationfont,delete b.annotationfont)),b)for(var B=0;B<M.voices.length;B++){var A=M.voices[B],P=b.voices[B];f&&A.push({el_type:"break"}),P&&(M.voices[B]=A.concat(P))}}else{for(var N=0;N<S.staff.length;N++)a[N]=S.staff[N].key,t[N]=S.staff[N].meter,e[N]=S.staff[N].clef;u.push(s(S))}i=!0}else i=!1,u.push(S)}return u}function g(l,d){return l==="abselem"?"abselem":d}function p(l,d){l.el_type="meter",l.startChar=-1,l.endChar=-1;for(var f=0;f<d.length;f++)d[f].unshift(l)}function o(l,d){l.el_type="key",l.startChar=-1,l.endChar=-1;for(var f=0;f<d.length;f++)d[f].unshift(l)}function r(l,d){l.el_type="clef",l.startChar=-1,l.endChar=-1;for(var f=0;f<d.length;f++)d[f].unshift(l)}function n(l,d,f){l.el_type="font",l.type=f,l.startChar=-1,l.endChar=-1;for(var u=0;u<d.length;u++)d[u].unshift(l)}function c(l,d){if(!l)return!0;var f=JSON.stringify(l,g),u=JSON.stringify(d,g);return f===u}function s(l){for(var d={},f=Object.keys(l),u=0;u<f.length;u++)if(f[u]!=="staff")d[f[u]]=l[f[u]];else{d.staff=[];for(var i=0;i<l.staff.length;i++){for(var t={},a=Object.keys(l.staff[i]),e=0;e<a.length;e++)if(a[e]!=="voices")t[a[e]]=l.staff[i][a[e]];else{t.voices=[];for(var h=0;h<l.staff[i].voices.length;h++)t.voices.push([].concat(l.staff[i].voices[h]))}d.staff.push(t)}}return d}return ft=T,ft}var pt,ha;function Hi(){if(ha)return pt;ha=1;var T=Ne(),g=_e(),p=Li(),o=vs(),r=bs(),n=function(){this.reset=function(){this.version="1.1.0",this.media="screen",this.metaText={},this.metaTextInfo={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0,this.runningFonts={},delete this.visualTranspose},this.reset();function c(i,t,a,e){for(var h=0;h<e.length;h++)i[a][e[h]]=t[a][e[h]]}this.copyTopInfo=function(i){var t=["tempo","title","header","rhythm","origin","composer","author","partOrder"];c(this,i,"metaText",t),c(this,i,"metaTextInfo",t)},this.copyBottomInfo=function(i){var t=["unalignedWords","book","source","discography","notes","transcription","history","abc-copyright","abc-creator","abc-edited-by","footer"];c(this,i,"metaText",t),c(this,i,"metaTextInfo",t)},this.getBeatLength=function(){var i=this.getMeterFraction(),t=1;return(i.num===6||i.num===9||i.num===12||i.num===3&&i.den===8)&&(t=3),t/i.den};function s(i,t){for(var a=0,e=0;e<i.length;e++)if(i[e].staff)for(var h=0;h<i[e].staff.length;h++)for(var v=0;v<i[e].staff[h].voices.length;v++)for(var m=i[e].staff[h].voices[v],x=1,C=0;C<m.length;C++){var S=m[C].rest&&m[C].rest.type==="spacer";if(m[C].startTriplet&&(x=m[C].tripletMultiplier),m[C].duration&&!S&&m[C].el_type!=="tempo"&&(a+=m[C].duration*x),m[C].endTriplet&&(x=1),a>=t&&(a-=t),m[C].el_type==="bar")return a}return a}this.getPickupLength=function(){var i=this.getBarLength(),t=s(this.lines,i);return t<1e-8||i-t<1e-8?0:t},this.getBarLength=function(){var i=this.getMeterFraction();return i.num/i.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(i){var t;if(i)t=i;else{var a=this.metaText?this.metaText.tempo:null;t=this.getBpm(a)}t<=0&&(t=1);var e=this.getBeatsPerMeasure(),h=e/t;return h*6e4},this.getBeatsPerMeasure=function(){var i=this.getBeatLength(),t=this.getBarLength();return t/i},this.getMeter=function(){for(var i=0;i<this.lines.length;i++){var t=this.lines[i];if(t.staff)for(var a=0;a<t.staff.length;a++){var e=t.staff[a].meter;if(e)return e}}return{type:"common_time"}},this.getMeterFraction=function(){var i=this.getMeter(),t=4,a=4;return i&&(i.type==="specified"?(t=parseInt(i.value[0].num,10),a=parseInt(i.value[0].den,10)):i.type==="cut_time"?(t=2,a=2):i.type==="common_time"&&(t=4,a=4)),this.meter={num:t,den:a},this.meter},this.getKeySignature=function(){for(var i=0;i<this.lines.length;i++){var t=this.lines[i];if(t.staff){for(var a=0;a<t.staff.length;a++)if(t.staff[a].key)return t.staff[a].key}}return{}},this.getElementFromChar=function(i){for(var t=0;t<this.lines.length;t++){var a=this.lines[t];if(a.staff)for(var e=0;e<a.staff.length;e++)for(var h=a.staff[e],v=0;v<h.voices.length;v++)for(var m=h.voices[v],x=0;x<m.length;x++){var C=m[x];if(C.startChar&&C.endChar&&C.startChar<=i&&C.endChar>i)return C}}return null};function l(i){for(var t,a,e,h,v=i.length-1;v>=0;v--){var m=i[v];m.type==="bar"?(m.top=e,m.nextTop=t,t=e,m.bottom=h,m.nextBottom=a,a=h):m.type==="event"&&(e=m.top,h=m.top+m.height)}}function d(i){var t=[];for(var a in i)i.hasOwnProperty(a)&&t.push(i[a]);return t=t.sort(function(e,h){var v=e.milliseconds-h.milliseconds;return v!==0?v:e.type==="bar"?-1:1}),t}this.addElementToEvents=function(i,t,a,e,h,v,m,x,C,S){if(t.hint)return{isTiedState:void 0,duration:0};var j=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&t.abcelem.rest.type==="spacer"&&(j=0),j>0){for(var F=[],b=0;b<t.elemset.length;b++)t.elemset[b]!==null&&F.push(t.elemset[b]);var M=t.startTie;if(C!==void 0)i["event"+C].elements.push(F),S&&(i["event"+a]||(i["event"+a]={type:"event",milliseconds:a,line:v,measureNumber:m,top:e,height:h,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),i["event"+a].measureStart=!0,S=!1),M||(C=void 0);else{if(!i["event"+a])i["event"+a]={type:"event",milliseconds:a,line:v,measureNumber:m,top:e,height:h,left:t.x,width:t.w,elements:[F],startChar:t.abcelem.startChar,endChar:t.abcelem.endChar,startCharArray:[t.abcelem.startChar],endCharArray:[t.abcelem.endChar],midiPitches:t.abcelem.midiPitches?T.cloneArray(t.abcelem.midiPitches):[]},t.abcelem.midiGraceNotePitches&&(i["event"+a].midiGraceNotePitches=T.cloneArray(t.abcelem.midiGraceNotePitches));else{if(i["event"+a].left?i["event"+a].left=Math.min(i["event"+a].left,t.x):i["event"+a].left=t.x,i["event"+a].elements.push(F),i["event"+a].startCharArray.push(t.abcelem.startChar),i["event"+a].endCharArray.push(t.abcelem.endChar),i["event"+a].startChar===null&&(i["event"+a].startChar=t.abcelem.startChar),i["event"+a].endChar===null&&(i["event"+a].endChar=t.abcelem.endChar),t.abcelem.midiPitches&&t.abcelem.midiPitches.length){i["event"+a].midiPitches||(i["event"+a].midiPitches=[]);for(var b=0;b<t.abcelem.midiPitches.length;b++)i["event"+a].midiPitches.push(t.abcelem.midiPitches[b])}if(t.abcelem.midiGraceNotePitches&&t.abcelem.midiGraceNotePitches.length){i["event"+a].midiGraceNotePitches||(i["event"+a].midiGraceNotePitches=[]);for(var B=0;B<t.abcelem.midiGraceNotePitches.length;B++)i["event"+a].midiGraceNotePitches.push(t.abcelem.midiGraceNotePitches[B])}}S&&(i["event"+a].measureStart=!0,S=!1)}}return{isTiedState:C,duration:j/x,nextIsBar:S||t.type==="bar"}},this.makeVoicesArray=function(){for(var i=[],t=[],a={},e=0;e<this.engraver.staffgroups.length;e++){var h=this.engraver.staffgroups[e];if(h&&h.staffs&&h.staffs.length>0){var v=h.staffs[0],m=v.absoluteY,x=m-v.top*g.STEP,C=h.staffs[h.staffs.length-1];m=C.absoluteY;for(var S=m-C.bottom*g.STEP,j=S-x,F=h.voices,b=0;b<F.length;b++)if(!(F[b].staff&&F[b].staff.isTabStaff)){var M=!1;i[b]||(i[b]=[]),t[b]===void 0&&(t[b]=0);for(var B=F[b].children,A=0;A<B.length;A++)B[A].type==="tempo"&&(a[t[b]]=this.getBpm(B[A].abcelem)),i[b].push({top:x,height:j,line:h.line,measureNumber:t[b],elem:B[A]}),B[A].type==="bar"&&M&&t[b]++,(B[A].type==="note"||B[A].type==="rest")&&(M=!0)}}}return this.tempoLocations=a,i},this.setupEvents=function(i,t,a,e){e||(e=1);for(var h=[],v={},m=i,x,C=!0,S=this.makeVoicesArray(),j=0,F=0;F<S.length;F++){var b=m,M=Math.round(b*1e3),B=0,A=-1,P=S[F],N=a;t=this.getBeatLength()*N/60;for(var E=-1,_=0;_<P.length;_++){var L=P[_].measureNumber;E!==L&&this.tempoLocations[L]&&(N=this.tempoLocations[L],t=e*this.getBeatLength()*N/60,E=L);var D=P[_].elem,H=this.addElementToEvents(v,D,M,P[_].top,P[_].height,P[_].line,P[_].measureNumber,t,x,C);x=H.isTiedState,C=H.nextIsBar,b+=H.duration;var y;if(D.duration>0&&v["event"+M]&&(y="event"+M),M=Math.round(b*1e3),D.type==="bar"){var k=D.abcelem.type,w=k==="bar_right_repeat"||k==="bar_dbl_repeat",O=D.abcelem.startEnding==="1",z=k==="bar_left_repeat"||k==="bar_dbl_repeat"||k==="bar_right_repeat";if(w){_>0&&(v[y].endX=D.x),A===-1&&(A=_);var V=0;E=-1;for(var I=B;I<A;I++){L=P[I].measureNumber,E!==L&&this.tempoLocations[L]&&(N=this.tempoLocations[L],t=e*this.getBeatLength()*N/60,E=L);var K=P[I].elem;H=this.addElementToEvents(v,K,M,P[I].top,P[I].height,P[I].line,P[I].measureNumber,t,x,C),x=H.isTiedState,C=H.nextIsBar,b+=H.duration,V=M,M=Math.round(b*1e3)}v["event"+V]&&(v["event"+V].endX=P[A].elem.x),C=!0,A=-1}O&&(A=_),z&&(B=_)}}j=Math.max(j,M)}return h=d(v),l(h),u(this.lines,h),h.push({type:"end",milliseconds:j}),this.addUsefulCallbackInfo(h,N*e),h},this.addUsefulCallbackInfo=function(i,t){for(var a=this.millisecondsPerMeasure(t),e=0;e<i.length;e++){var h=i[e];h.millisecondsPerMeasure=a}};function f(i,t){for(;t<i.length&&i[t].left===null;)t++;return i[t]}function u(i,t){if(!(t.length<1)){for(var a=0;a<t.length-1;a++){var e=t[a],h=f(t,a+1);if(e.left!==null){var v=h&&e.top===h.top?h.left:i[e.line].staffGroup.w;e.endX!==void 0?v>e.left&&(e.endX=Math.min(e.endX,v)):e.endX=v}}var m=t[t.length-1];m.endX=i[m.line].staffGroup.w}}this.getBpm=function(i){var t;if(i||(i=this.metaText?this.metaText.tempo:null),i){t=i.bpm;var a=this.getBeatLength(),e=i.duration&&i.duration.length>0?i.duration[0]:a;t=t*e/a}if(!t){t=180;var h=this.getMeterFraction();h&&h.num!==3&&h.num%3===0&&(t=120)}return t},this.setTiming=function(i,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var a=this.metaText?this.metaText.tempo:null,e=this.getBpm(a),h=1;i?a&&(h=i/e):i=e;var v=this.getBeatLength(),m=i/60,x=this.getBarLength(),C=x/v*t/m;C&&(C-=this.getPickupLength()/v/m);var S=v*m;return this.noteTimings=this.setupEvents(C,S,i,h),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*m):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(i){i||(i={});var t=p(this,i);return o(t,i,this.formatting.percmap,this.formatting.midi)},this.deline=function(i){return r(this.lines,i)},this.findSelectableElement=function(i){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(i):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}};return pt=n,pt}var mt,ua;function ys(){if(ua)return mt;ua=1;var T=Lr(),g=function(b){var M=this,B={},A="";b.reset(),this.setVisualTranspose=function(P){P!==void 0&&(b.visualTranspose=P)},this.cleanUp=function(P,N,E){t(b),delete b.runningFonts,o(b),b.metaText.tempo&&b.metaText.tempo.bpm&&!b.metaText.tempo.duration&&(b.metaText.tempo.duration=[b.getBeatLength()]);var _=!1,L,D,H;for(L=0;L<b.lines.length;L++)if(b.lines[L].staff!==void 0){var y=!1;for(D=0;D<b.lines[L].staff.length;D++)if(b.lines[L].staff[D]===void 0)_=!0,b.lines[L].staff[D]=null;else for(H=0;H<b.lines[L].staff[D].voices.length;H++)b.lines[L].staff[D].voices[H]===void 0?b.lines[L].staff[D].voices[H]=[]:a(b.lines[L].staff[D].voices[H])&&(y=!0);y||(b.lines[L]=null,_=!0)}if(_&&(b.lines=b.lines.filter(function(I){return!!I}),b.lines.forEach(function(I){I.staff&&(I.staff=I.staff.filter(function(K){return!!K}))})),P)for(;l(b.lines,P););if(N){for(_=!1,L=0;L<b.lines.length;L++)if(b.lines[L].staff!==void 0)for(D=0;D<b.lines[L].staff.length;D++){var k=!1;for(H=0;H<b.lines[L].staff[D].voices.length;H++)e(b.lines[L].staff[D].voices[H])&&(k=!0);k||(_=!0,b.lines[L].staff[D]=null)}_&&b.lines.forEach(function(I){I.staff&&(I.staff=I.staff.filter(function(K){return!!K}))})}for(c(b.lines),L=0;L<b.lines.length;L++)if(b.lines[L].staff)for(D=0;D<b.lines[L].staff.length;D++)delete b.lines[L].staff[D].workingClef;for(;r(b););for(var L=0;L<b.lines.length;L++){var w=b.lines[L].staff;if(w)for(b.staffNum=0;b.staffNum<w.length;b.staffNum++)for(w[b.staffNum].clef&&T.fixClef(w[b.staffNum].clef),b.voiceNum=0;b.voiceNum<w[b.staffNum].voices.length;b.voiceNum++){var O=w[b.staffNum].voices[b.voiceNum];s(O,b.staffNum,b.voiceNum,E);for(var z=0;z<O.length;z++)O[z].el_type==="clef"&&T.fixClef(O[z]);if(O.length>0&&O[O.length-1].barNumber){var V=f(b.lines,L);V&&(V.staff[0].barNumber=O[O.length-1].barNumber),delete O[O.length-1].barNumber}}}return delete b.staffNum,delete b.voiceNum,delete b.lineNum,delete b.potentialStartBeam,delete b.potentialEndBeam,delete b.vskipPending,E},this.addTieToLastNote=function(P){var N=u(b);return N&&N.pitches&&N.pitches.length>0?(N.pitches[0].startTie={},P&&(N.pitches[0].startTie.style="dotted"),!0):!1},this.appendElement=function(P,N,E,_){if(_.el_type=P,N!==null&&(_.startChar=N),E!==null&&(_.endChar=E),P==="note"){var L=i(_);L>=.25||_.force_end_beam_last&&b.potentialStartBeam!==void 0?x(b):_.end_beam&&b.potentialStartBeam!==void 0?_.rest===void 0?m(_,b):x(b):_.rest===void 0&&(b.potentialStartBeam===void 0?_.end_beam||(b.potentialStartBeam=_,delete b.potentialEndBeam):b.potentialEndBeam=_)}else x(b);return delete _.end_beam,delete _.force_end_beam_last,_.rest&&_.rest.type==="invisible"&&delete _.decoration,b.lines.length<=b.lineNum||b.lines[b.lineNum].staff.length<=b.staffNum?!1:(v(M,b,_,B,A),!0)},this.appendStartingElement=function(P,N,E,_){t(b);var L;P==="key"&&(L=_.impliedNaturals,delete _.impliedNaturals,delete _.explicitAccidentals);var D=Object.assign({},_);if(b.lines[b.lineNum]){var H=b.lines[b.lineNum].staff;if(H){H.length<=b.staffNum&&(H[b.staffNum]={},H[b.staffNum].clef=Object.assign({},H[0].clef),H[b.staffNum].key=Object.assign({},H[0].key),H[0].meter&&(H[b.staffNum].meter=Object.assign({},H[0].meter)),H[b.staffNum].workingClef=Object.assign({},H[0].workingClef),H[b.staffNum].voices=[[]]),P==="clef"&&(H[b.staffNum].workingClef=D);for(var y=H[b.staffNum].voices[b.voiceNum],k=0;k<y.length;k++){if(y[k].el_type==="note"||y[k].el_type==="bar"){D.el_type=P,D.startChar=N,D.endChar=E,L&&(D.accidentals=L.concat(D.accidentals)),y.push(D);return}if(y[k].el_type===P){D.el_type=P,D.startChar=N,D.endChar=E,L&&(D.accidentals=L.concat(D.accidentals)),y[k]=D;return}}H[b.staffNum][P]=_}}},this.addSubtitle=function(P,N){h(b,{subtitle:{text:P,startChar:N.startChar,endChar:N.endChar}})},this.addSpacing=function(P){b.vskipPending=P},this.addNewPage=function(P){h(b,{newpage:P})},this.addSeparator=function(P,N,E,_){h(b,{separator:{spaceAbove:Math.round(P),spaceBelow:Math.round(N),lineLength:Math.round(E),startChar:_.startChar,endChar:_.endChar}})},this.addText=function(P,N){h(b,{text:{text:P,startChar:N.startChar,endChar:N.endChar}})},this.addCentered=function(P){h(b,{text:[{text:P,center:!0}]})},this.changeVoiceScale=function(P){M.appendElement("scale",null,null,{size:P})},this.changeVoiceColor=function(P){M.appendElement("color",null,null,{color:P})},this.startNewLine=function(P){t(b),P.currentVoiceName&&(A=P.currentVoiceName,B[P.currentVoiceName]=P),b.lines[b.lineNum]===void 0?F(M,b,P):b.lines[b.lineNum].staff===void 0?(b.lineNum++,this.startNewLine(P)):b.lines[b.lineNum].staff[b.staffNum]===void 0?j(M,b,P):b.lines[b.lineNum].staff[b.staffNum].voices[b.voiceNum]===void 0?S(M,b,P):a(b.lines[b.lineNum].staff[b.staffNum].voices[b.voiceNum])?(b.lineNum++,this.startNewLine(P)):P.part&&M.appendElement("part",P.part.startChar,P.part.endChar,{title:P.part.title})},this.setRunningFont=function(P,N){b.runningFonts[P]=N},this.setBarNumberImmediate=function(P){var N=this.getCurrentVoice();if(N&&N.length>0){var E=N[N.length-1];if(E.el_type==="bar")E.barNumber!==void 0&&(E.barNumber=P);else return P-1}return P},this.hasBeginMusic=function(){for(var P=0;P<b.lines.length;P++)if(b.lines[P].staff)return!0;return!1},this.isFirstLine=function(P){for(var N=P-1;N>=0;N--)if(b.lines[N].staff!==void 0)return!1;return!0},this.getCurrentVoice=function(){var P=d(b.lines,b.lineNum);if(!P)return null;var N=P.staff[b.staffNum];return N&&N.voices[b.voiceNum]!==void 0?N.voices[b.voiceNum]:null},this.setCurrentVoice=function(P,N,E){b.staffNum=P,b.voiceNum=N,A=E;for(var _=0;_<b.lines.length;_++)if(b.lines[_].staff&&(b.lines[_].staff[P]===void 0||b.lines[_].staff[P].voices[N]===void 0||!a(b.lines[_].staff[P].voices[N])))return b.lineNum=_,!!(!b.lines[_].staff[P]||b.lines[_].staff[P].voices[N]);return b.lineNum=_,!1},this.addMetaText=function(P,N,E){b.metaText[P]===void 0?(b.metaText[P]=N,b.metaTextInfo[P]=E):(typeof b.metaText[P]=="string"&&typeof N=="string"?b.metaText[P]+=`
|
|
8
|
+
`+N:(b.metaText[P]==="string"&&(b.metaText[P]=[{text:b.metaText[P]}]),typeof N=="string"&&(N=[{text:N}]),b.metaText[P]=b.metaText[P].concat(N)),b.metaTextInfo[P].endChar=E.endChar)},this.addMetaTextArray=function(P,N,E){b.metaText[P]===void 0?(b.metaText[P]=[N],b.metaTextInfo[P]=E):(b.metaText[P].push(N),b.metaTextInfo[P].endChar=E.endChar)},this.addMetaTextObj=function(P,N,E){b.metaText[P]=N,b.metaTextInfo[P]=E}};function p(b){if(!b||typeof b=="string")return!1;for(var M=0;M<b.length;M++)if(typeof b[M]!="string")return!1;return!0}function o(b){p(b.metaText.notes)&&(b.metaText.notes=b.metaText.notes.join(`
|
|
9
|
+
`)),p(b.metaText.history)&&(b.metaText.history=b.metaText.history.join(`
|
|
10
|
+
`))}function r(b){for(var M=!1,B=[],A=0;A<b.lines.length;A++){var P=b.lines[A];if(P.staff)for(var N=0;N<P.staff.length;N++){for(var E=P.staff[N],_=[],L=0;L<E.voices.length;L++){var D=E.voices[L];_.push({hasOverlay:!1,voice:[],snip:[]}),B[A]=0;for(var H=0,y=!1,k=-1,w=0;w<D.length;w++){var O=D[w];if(O.el_type==="overlay"&&!y){M=!0,y=!0,k=w,_[L].hasOverlay=!0;for(var z=0;z<A;z++)B[z]&&b.lines[z].staff&&E.voices.length>=b.lines[z].staff[0].voices.length&&b.lines[z].staff[0].voices.push([{el_type:"note",duration:B[z],rest:{type:"invisible"},startChar:O.startChar,endChar:O.endChar}])}else O.el_type==="bar"?(y?(y=!1,_[L].snip.push({start:k,len:w-k}),_[L].voice.push(O)):(H>0&&_[L].voice.push({el_type:"note",duration:H,rest:{type:"invisible"},startChar:O.startChar,endChar:O.endChar}),_[L].voice.push(O)),H=0):O.el_type==="note"?y?_[L].voice.push(O):(H+=O.duration,B[A]+=O.duration):(O.el_type==="scale"||O.el_type==="stem"||O.el_type==="overlay"||O.el_type==="style"||O.el_type==="transpose"||O.el_type==="color")&&_[L].voice.push(O)}_[L].hasOverlay&&_[L].snip.length===0&&_[L].snip.push({start:k,len:D.length-k})}for(L=0;L<_.length;L++){var V=_[L];if(V.hasOverlay){V.voice.splice(0,0,{el_type:"stem",direction:"down"}),E.voices.push(V.voice);for(var I=V.snip.length-1;I>=0;I--){var K=V.snip[I];E.voices[L].splice(K.start,K.len),E.voices[L].splice(K.start+1,0,{el_type:"stem",direction:"auto"});var Q=n(E.voices[L],K.start);E.voices[L].splice(Q,0,{el_type:"stem",direction:"up"})}for(I=0;I<E.voices[E.voices.length-1].length;I++){E.voices[E.voices.length-1][I]=Object.assign({},E.voices[E.voices.length-1][I]);var G=E.voices[E.voices.length-1][I];G.el_type==="bar"&&G.startEnding&&delete G.startEnding,G.el_type==="bar"&&G.endEnding&&delete G.endEnding}}}}}return M}function n(b,M){for(var B=M-1;B>0&&b[B].el_type!=="bar";B--);return B}function c(b){for(var M=!0,B=0;B<b.length;B++){var A=b[B];if(A.staff){for(var P=0;P<A.staff.length;P++){var N=A.staff[P];if(N.title){for(var E=!1,_=0;_<N.title.length;_++)N.title[_]?(N.title[_]=M?N.title[_].name:N.title[_].subname,N.title[_]?E=!0:N.title[_]=""):N.title[_]="";E||delete N.title}}M=!1}}}function s(b,M,B,A){A[M]||(A[M]=[]),A[M][B]||(A[M][B]=[]);for(var P,N=function(I,K,Q){if(A[M][B][Q]===void 0){for(P=0;P<A[M][B].length;P++)if(A[M][B][P]!==void 0){Q=P;break}if(A[M][B][Q]===void 0){var G=Q*100+1;I.endSlur.forEach(function(ne){G===ne&&--G}),A[M][B][Q]=[G]}}for(var ee,te=0;te<K;te++)ee=A[M][B][Q].pop(),I.endSlur.push(ee);return A[M][B][Q].length===0&&delete A[M][B][Q],ee},E=function(I,K,Q,G){I.startSlur=[],A[M][B][Q]===void 0&&(A[M][B][Q]=[]);for(var ee=Q*100+1,te=0;te<K;te++)G&&(G.forEach(function(ne){ee===ne&&++ee}),G.forEach(function(ne){ee===ne&&++ee}),G.forEach(function(ne){ee===ne&&++ee})),A[M][B][Q].forEach(function(ne){ee===ne&&++ee}),A[M][B][Q].forEach(function(ne){ee===ne&&++ee}),A[M][B][Q].push(ee),I.startSlur.push({label:ee}),I.dottedSlur&&(I.startSlur[I.startSlur.length-1].style="dotted",delete I.dottedSlur),ee++},_=0;_<b.length;_++){var L=b[_];if(L.el_type==="note"){if(L.gracenotes)for(var D=0;D<L.gracenotes.length;D++){if(L.gracenotes[D].endSlur){var H=L.gracenotes[D].endSlur;L.gracenotes[D].endSlur=[];for(var y=0;y<H;y++)N(L.gracenotes[D],1,20)}L.gracenotes[D].startSlur&&(P=L.gracenotes[D].startSlur,E(L.gracenotes[D],P,20))}if(L.endSlur&&(P=L.endSlur,L.endSlur=[],N(L,P,0)),L.startSlur&&(P=L.startSlur,E(L,P,0)),L.pitches){for(var k=[],w=0;w<L.pitches.length;w++)if(L.pitches[w].endSlur){var O=L.pitches[w].endSlur;L.pitches[w].endSlur=[];for(var z=0;z<O;z++){var V=N(L.pitches[w],1,w+1);k.push(V)}}for(w=0;w<L.pitches.length;w++)L.pitches[w].startSlur&&(P=L.pitches[w].startSlur,E(L.pitches[w],P,w+1,k));L.gracenotes&&L.pitches[0].endSlur&&L.pitches[0].endSlur[0]===100&&L.pitches[0].startSlur&&(L.gracenotes[0].endSlur?L.gracenotes[0].endSlur.push(L.pitches[0].startSlur[0].label):L.gracenotes[0].endSlur=[L.pitches[0].startSlur[0].label],L.pitches[0].endSlur.length===1?delete L.pitches[0].endSlur:L.pitches[0].endSlur[0]===100?L.pitches[0].endSlur.shift():L.pitches[0].endSlur[L.pitches[0].endSlur.length-1]===100&&L.pitches[0].endSlur.pop(),A[M][B][1].length===1?delete A[M][B][1]:A[M][B][1].pop())}}}}function l(b,M){for(var B=0;B<b.length;B++)if(b[B].staff!==void 0)for(var A=0;A<b[B].staff.length;A++)for(var P=[],N=0;N<b[B].staff[A].voices.length;N++)for(var E=b[B].staff[A].voices[N],_=0,L=0;L<E.length;L++)if(E[L].el_type==="bar"){if(_++,_>=M&&L<E.length-1){var D=f(b,B);if(!D){var H=JSON.parse(JSON.stringify(b[B]));b.push(Object.assign({},H)),D=b[b.length-1];for(var y=0;y<D.staff.length;y++)for(var k=0;k<D.staff[y].voices.length;k++)D.staff[y].voices[k]=[]}var w=L+1,O=b[B].staff[A].voices[N].slice(w);return b[B].staff[A].voices[N]=b[B].staff[A].voices[N].slice(0,w),D.staff[A].voices[N]=P.concat(O.concat(D.staff[A].voices[N])),!0}}else E[L].duration||P.push(E[L]);return!1}function d(b,M){if(b.length<=M)return null;for(;M>=0;){if(b[M].staff)return b[M];M--}return null}function f(b,M){for(M++;b.length>M;){if(b[M].staff)return b[M];M++}return null}function u(b){if(!b.lines[b.lineNum]||!b.lines[b.lineNum].staff||!b.lines[b.lineNum].staff[b.staffNum])return null;var M=b.lines[b.lineNum].staff[b.staffNum].voices[b.voiceNum];if(!M)return null;for(var B=M.length-1;B>=0;B--){var A=M[B];if(A.el_type==="note")return A}return null}function i(b){return b.duration?b.duration:0}function t(b){b.potentialStartBeam&&b.potentialEndBeam&&(b.potentialStartBeam.startBeam=!0,b.potentialEndBeam.endBeam=!0),delete b.potentialStartBeam,delete b.potentialEndBeam}function a(b){for(var M=0;M<b.length;M++)if(b[M].el_type==="note"||b[M].el_type==="bar")return!0;return!1}function e(b){for(var M=0;M<b.length;M++)if(b[M].el_type==="note"&&(b[M].rest===void 0||b[M].chord!==void 0))return!0;return!1}function h(b,M){b.vskipPending&&(M.vskip=b.vskipPending,delete b.vskipPending),b.lines.push(M)}function v(b,M,B,A,P){var N=M.lines[M.lineNum].staff[M.staffNum];if(B.pitches!==void 0){var E=N.workingClef.verticalPos;B.pitches.forEach(function(L){L.verticalPos=L.pitch-E})}if(B.gracenotes!==void 0){var _=N.workingClef.verticalPos;B.gracenotes.forEach(function(L){L.verticalPos=L.pitch-_})}N.voices.length<=M.voiceNum&&(A[P]||(A[P]={}),S(b,M,A[P])),N.voices[M.voiceNum].push(B)}function m(b,M){M.potentialStartBeam.startBeam=!0,b.endBeam=!0,delete M.potentialStartBeam,delete M.potentialEndBeam}function x(b){b.potentialStartBeam!==void 0&&b.potentialEndBeam!==void 0&&(b.potentialStartBeam.startBeam=!0,b.potentialEndBeam.endBeam=!0),delete b.potentialStartBeam,delete b.potentialEndBeam}function C(b,M,B){if(b.runningFonts[M]){for(var A=!1,P=Object.keys(B),N=0;N<P.length;N++)b.runningFonts[M][P[N]]!==B[P[N]]&&(A=!0);A&&(b.lines[b.lineNum].staff[b.staffNum][M]=B)}b.runningFonts[M]=B}function S(b,M,B){var A=M.lines[M.lineNum].staff[M.staffNum];if(A.voices[M.voiceNum]=[],A.title||(A.title=[]),A.title[M.voiceNum]={name:B.name,subname:B.subname},B.style&&b.appendElement("style",null,null,{head:B.style}),B.stem)b.appendElement("stem",null,null,{direction:B.stem});else if(M.voiceNum>0){if(A.voices[0]!==void 0){for(var P=!1,N=0;N<A.voices[0].length;N++)A.voices[0].el_type==="stem"&&(P=!0);if(!P){var E={el_type:"stem",direction:"up"};A.voices[0].splice(0,0,E)}}b.appendElement("stem",null,null,{direction:"down"})}B.scale&&b.appendElement("scale",null,null,{size:B.scale}),B.color&&b.appendElement("color",null,null,{color:B.color})}function j(b,M,B){B.key&&B.key.impliedNaturals&&(B.key.accidentals=B.key.accidentals.concat(B.key.impliedNaturals),delete B.key.impliedNaturals),M.lines[M.lineNum].staff[M.staffNum]={voices:[],clef:B.clef,key:B.key,workingClef:B.clef};var A=M.lines[M.lineNum].staff[M.staffNum];B.stafflines!==void 0&&(A.clef.stafflines=B.stafflines,A.workingClef.stafflines=B.stafflines),B.staffscale&&(A.staffscale=B.staffscale),B.annotationfont&&C(M,"annotationfont",B.annotationfont),B.gchordfont&&C(M,"gchordfont",B.gchordfont),B.tripletfont&&C(M,"tripletfont",B.tripletfont),B.vocalfont&&C(M,"vocalfont",B.vocalfont),B.bracket&&(A.bracket=B.bracket),B.brace&&(A.brace=B.brace),B.connectBarLines&&(A.connectBarLines=B.connectBarLines),B.barNumber&&(A.barNumber=B.barNumber),S(b,M,B),B.part&&b.appendElement("part",B.part.startChar,B.part.endChar,{title:B.part.title}),B.meter!==void 0&&(A.meter=B.meter),M.vskipPending&&(M.lines[M.lineNum].vskip=M.vskipPending,delete M.vskipPending)}function F(b,M,B){M.lines[M.lineNum]={staff:[]},j(b,M,B)}return mt=g,mt}var gt,da;function ji(){if(da)return gt;da=1;var T=Ne(),g=Pr(),p=ds(),o=ps(),r=ms(),n=Pi(),c=Hi(),s=ys(),l=function(){var d=new c,f=new s(d),u,i="",t="";this.getTune=function(){var N={formatting:d.formatting,lines:d.lines,media:d.media,metaText:d.metaText,metaTextInfo:d.metaTextInfo,version:d.version,addElementToEvents:d.addElementToEvents,addUsefulCallbackInfo:d.addUsefulCallbackInfo,getTotalTime:d.getTotalTime,getTotalBeats:d.getTotalBeats,getBarLength:d.getBarLength,getBeatLength:d.getBeatLength,getBeatsPerMeasure:d.getBeatsPerMeasure,getBpm:d.getBpm,getMeter:d.getMeter,getMeterFraction:d.getMeterFraction,getPickupLength:d.getPickupLength,getKeySignature:d.getKeySignature,getElementFromChar:d.getElementFromChar,makeVoicesArray:d.makeVoicesArray,millisecondsPerMeasure:d.millisecondsPerMeasure,setupEvents:d.setupEvents,setTiming:d.setTiming,setUpAudio:d.setUpAudio,deline:d.deline,findSelectableElement:d.findSelectableElement,getSelectableArray:d.getSelectableArray};return d.lineBreaks&&(N.lineBreaks=d.lineBreaks),d.visualTranspose&&(N.visualTranspose=d.visualTranspose),N};function a(N,E,_){N.positioning||(N.positioning={}),N.positioning[E]=_}function e(N,E,_){N.fonts||(N.fonts={}),N.fonts[E]=_}var h={reset:function(){for(var N in this)this.hasOwnProperty(N)&&typeof this[N]!="function"&&delete this[N];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(N,E){return this[N].decoration!==E[N].decoration||this[N].face!==E[N].face||this[N].size!==E[N].size||this[N].style!==E[N].style||this[N].weight!==E[N].weight},addFormattingOptions:function(N,E,_){_==="note"?(this.vocalPosition!=="auto"&&a(N,"vocalPosition",this.vocalPosition),this.dynamicPosition!=="auto"&&a(N,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&a(N,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&a(N,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&a(N,"volumePosition",this.volumePosition),this.differentFont("annotationfont",E)&&e(N,"annotationfont",this.annotationfont),this.differentFont("gchordfont",E)&&e(N,"gchordfont",this.gchordfont),this.differentFont("vocalfont",E)&&e(N,"vocalfont",this.vocalfont),this.differentFont("tripletfont",E)&&e(N,"tripletfont",this.tripletfont)):_==="bar"&&(this.dynamicPosition!=="auto"&&a(N,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&a(N,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&a(N,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&a(N,"volumePosition",this.volumePosition),this.differentFont("measurefont",E)&&e(N,"measurefont",this.measurefont),this.differentFont("repeatfont",E)&&e(N,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var N=0;N<this.inTie.length;N++)if(this.endingHoldOver.inTie.push([]),this.inTie[N])for(var E=0;E<this.inTie[N].length;E++)this.endingHoldOver.inTie[N].push(this.inTie[N][E]);for(var _ in this.inTieChord)this.inTieChord.hasOwnProperty(_)&&(this.endingHoldOver.inTieChord[_]=this.inTieChord[_])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var N=0;N<this.endingHoldOver.inTie.length;N++){this.inTie.push([]);for(var E=0;E<this.endingHoldOver.inTie[N].length;E++)this.inTie[N].push(this.endingHoldOver.inTie[N][E])}for(var _ in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(_)&&(this.inTieChord[_]=this.endingHoldOver.inTieChord[_])}}},v=function(N){h.warnings||(h.warnings=[]),h.warnings.push(N)},m=function(N){h.warningObjects||(h.warningObjects=[]),h.warningObjects.push(N)},x=function(N){var E=N.replace(/\x12/g," ");return E=E.replace(/&/g,"&"),E=E.replace(/</g,"<"),E.replace(/>/g,">")},C=function(N,E,_){E||(E=" ");var L=E[_];(L===" "||!L)&&(L="SPACE");var D=x(E.substring(_-64,_))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+L+"</span>"+x(E.substring(_+1).substring(0,64));v("Music Line:"+u.lineIndex+":"+(_+1)+": "+N+": "+D),m({message:N,line:E,startChar:h.iChar+_,column:_})},S,j;this.getWarnings=function(){return h.warnings},this.getWarningObjects=function(){return h.warningObjects};var F=function(N,E){if(E.indexOf("")>=0){i+=E;return}if(E=i+E,i="",!N){C("Can't add words before the first line of music",N,0);return}E=T.strip(E),E[E.length-1]!=="-"&&(E=E+" ");for(var _=[],L=0,D=!1,H=function(w){var O=T.strip(E.substring(L,w));if(O=O.replace(/\\([-_*|~])/g,"$1"),L=w+1,O.length>0){D&&(O=O.replace(/~/g," "));var z=E[w];return z!=="_"&&z!=="-"&&(z=" "),_.push({syllable:u.translateString(O),divider:z}),D=!1,!0}return!1},y=!1,k=0;k<E.length;k++){switch(E[k]){case" ":case"":H(k);break;case"-":!y&&!H(k)&&_.length>0&&(T.last(_).divider="-",_.push({skip:!0,to:"next"}));break;case"_":y||(H(k),_.push({skip:!0,to:"slur"}));break;case"*":y||(H(k),_.push({skip:!0,to:"next"}));break;case"|":y||(H(k),_.push({skip:!0,to:"bar"}));break;case"~":y||(D=!0);break}y=E[k]==="\\"}N.forEach(function(w){if(_.length!==0){if(_[0].skip){switch(_[0].to){case"next":w.el_type==="note"&&w.pitches!==null&&_.shift();break;case"slur":w.el_type==="note"&&w.pitches!==null&&_.shift();break;case"bar":w.el_type==="bar"&&_.shift();break}w.el_type!=="bar"&&(w.lyric===void 0?w.lyric=[{syllable:"",divider:" "}]:w.lyric.push({syllable:"",divider:" "}))}else if(w.el_type==="note"&&w.rest===void 0){var O=_.shift();O.syllable&&(O.syllable=O.syllable.replace(/ +/g," ")),w.lyric===void 0?w.lyric=[O]:w.lyric.push(O)}}})},b=function(N,E){if(E.indexOf("")>=0){t+=E;return}if(E=t+E,t="",!N){C("Can't add symbols before the first line of music",N,0);return}E=T.strip(E),E[E.length-1]!=="-"&&(E=E+" ");for(var _=[],L=0,D=!1,H=function(k){var w=T.strip(E.substring(L,k));if(L=k+1,w.length>0){D&&(w=w.replace(/~/g," "));var O=E[k];return O!=="_"&&O!=="-"&&(O=" "),_.push({syllable:u.translateString(w),divider:O}),D=!1,!0}return!1},y=0;y<E.length;y++)switch(E[y]){case" ":case"":H(y);break;case"-":!H(y)&&_.length>0&&(T.last(_).divider="-",_.push({skip:!0,to:"next"}));break;case"_":H(y),_.push({skip:!0,to:"slur"});break;case"*":H(y),_.push({skip:!0,to:"next"});break;case"|":H(y),_.push({skip:!0,to:"bar"});break;case"~":D=!0;break}N.forEach(function(k){if(_.length!==0){if(_[0].skip)switch(_[0].to){case"next":k.el_type==="note"&&k.pitches!==null&&_.shift();break;case"slur":k.el_type==="note"&&k.pitches!==null&&_.shift();break;case"bar":k.el_type==="bar"&&_.shift();break}else if(k.el_type==="note"&&k.rest===void 0){var w=_.shift();k.lyric===void 0?k.lyric=[w]:k.lyric.push(w)}}})},M=function(N){if(T.startsWith(N,"%%")){var E=g.addDirective(N.substring(2));E&&C(E,N,2);return}var _=N.indexOf("%");if(_>=0&&(N=N.substring(0,_)),N=N.replace(/\s+$/,""),N.length!==0){if(i){F(f.getCurrentVoice(),N.substring(2));return}if(t){b(f.getCurrentVoice(),N.substring(2));return}if(N.length<2||N[1]!==":"||j.lineContinuation){j.parseMusic(N);return}var L=S.parseHeader(N);L.regular&&j.parseMusic(N),L.newline&&j.startNewLine(),L.words&&F(f.getCurrentVoice(),N.substring(2)),L.symbols&&b(f.getCurrentVoice(),N.substring(2))}};function B(N,E){N.push({el_type:"hint"});for(var _=0;_<E.length;_++){var L=E[_],D=Object.assign({},L);if(N.push(D),L.el_type==="bar")return}}function A(N,E){for(var _=0;_<N.length;_++){var L=N[_],D=E[_];if(D)for(var H=0;H<D.voices.length;H++){var y=D.voices[H],k=L.voices[H];k&&B(k,y)}}}function P(){for(var N=0;N<d.lines.length;N++){var E=d.lines[N].staff;if(E){for(var _=N+1;_<d.lines.length&&d.lines[_].staff===void 0;)_++;if(_<d.lines.length){var L=d.lines[_].staff;A(E,L)}}}}this.parse=function(N,E,_){E||(E={}),_||(_=0),d.reset(),N=N.replace(/\r\n?/g,`
|
|
11
|
+
`)+`
|
|
12
|
+
`;var L=N.split(`
|
|
13
|
+
\\`);if(L.length>1){for(var D=1;D<L.length;D++)for(;L[D].length>0&&L[D][0]!==`
|
|
14
|
+
`;)L[D]=L[D].substr(1),L[D-1]+=" ";N=L.join(" ")}N=N.replace(/\\([ \t]*)(%.*)*\n/g,function(V,I,K){var Q=K?Array(K.length+1).join(" "):"";return I+""+Q+`
|
|
15
|
+
`});var H=N.split(`
|
|
16
|
+
`);T.last(H).length===0&&H.pop(),u=new r(H,h),S=new p(u,C,h,d,f),j=new o(u,C,h,d,f,S),E.print&&(d.media="print"),h.reset(),h.iChar=_,E.visualTranspose?(h.globalTranspose=parseInt(E.visualTranspose),h.globalTranspose===0?h.globalTranspose=void 0:f.setVisualTranspose(E.visualTranspose)):h.globalTranspose=void 0,E.lineBreaks&&(h.lineBreaks=E.lineBreaks),S.reset(u,C,h,d);try{E.format&&g.globalFormatting(E.format);for(var y=u.nextLine();y;){if(E.header_only&&h.is_in_header===!1||E.stop_on_warning&&h.warnings)throw"normal_abort";var k=h.is_in_header;M(y),k&&!h.is_in_header&&(f.setRunningFont("annotationfont",h.annotationfont),f.setRunningFont("gchordfont",h.gchordfont),f.setRunningFont("tripletfont",h.tripletfont),f.setRunningFont("vocalfont",h.vocalfont)),y=u.nextLine()}i&&F(f.getCurrentVoice(),""),t&&b(f.getCurrentVoice(),""),h.openSlurs=f.cleanUp(h.barsperstaff,h.staffnonote,h.openSlurs)}catch(V){if(V!=="normal_abort")throw V}var w=792,O=8.5*72;switch(h.papersize){case"legal":w=1008,O=8.5*72;break;case"A4":w=11.7*72,O=8.3*72;break}if(h.landscape){var z=w;w=O,O=z}d.formatting.pagewidth||(d.formatting.pagewidth=O),d.formatting.pageheight||(d.formatting.pageheight=w),E.hint_measures&&P(),n.wrapLines(d,h.lineBreaks,h.barNumbers)}};return gt=l,gt}var vt,fa;function ks(){if(fa)return vt;fa=1;var T=Ne(),g=function(p){var o="",r=p.match(/(\s*)/);p=T.strip(p);for(var n=p.split(`
|
|
17
|
+
X:`),c=1;c<n.length;c++)n[c]="X:"+n[c];var s=r?r[0].length:0,l=[];if(n.forEach(function(i){l.push({abc:i,startPos:s}),s+=i.length+1}),l.length>1&&!T.startsWith(l[0].abc,"X:")){var d=l.shift(),f=d.abc.split(`
|
|
18
|
+
`);f.forEach(function(i){T.startsWith(i,"%%")&&(o+=i+`
|
|
19
|
+
`)})}var u=o;return l.forEach(function(i){var t=i.abc.indexOf(`
|
|
20
|
+
|
|
21
|
+
`);t>0&&(i.abc=i.abc.substring(0,t)),i.pure=i.abc,i.abc=o+i.abc,i.title="";var a=i.pure.split("T:");a.length>1&&(a=a[1].split(`
|
|
22
|
+
`),i.title=T.strip(a[0]));var e=i.pure.substring(2,i.pure.indexOf(`
|
|
23
|
+
`));i.id=T.strip(e)}),{header:u,tunes:l}};return vt=g,vt}var bt,pa;function xs(){if(pa)return bt;pa=1;function T(g,p){this.numLines=g,this.lineSpace=p,this.verticalSize=this.numLines*this.lineSpace;var o=3;this.bar={pitch:o,pitch2:p*g,height:5}}return T.prototype.bypass=function(g){var p=g.staffGroup.voices;return!!(p.length>0&&p[0].isPercussion)},T.prototype.setRelative=function(g,p,o){switch(g.type){case"bar":p.pitch=this.bar.pitch,p.pitch2=this.bar.pitch2,p.height=this.height;break;case"symbol":var r=this.bar.pitch2/2;if(g.name=="dots.dot")return o?(p.pitch=r,!1):(p.pitch=r+this.lineSpace,!0);break}return o},bt=T,bt}var yt,ma;function Fi(){if(ma)return yt;ma=1;var T=function(g,p){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=g,this.voicetotal=p,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return T.prototype.addChild=function(g){if(g.type==="bar"){for(var p=!0,o=0;p&&o<this.children.length;o++)this.children[o].type.indexOf("staff-extra")<0&&this.children[o].type!=="tempo"&&(p=!1);p||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=g,this.setRange(g)},T.prototype.setLimit=function(g,p){var o=p.specialY;o||(o=p),o[g]&&(this.specialY[g]?this.specialY[g]=Math.max(this.specialY[g],o[g]):this.specialY[g]=o[g])},T.prototype.adjustRange=function(g){g.bottom!==void 0&&(this.bottom=Math.min(this.bottom,g.bottom)),g.top!==void 0&&(this.top=Math.max(this.top,g.top))},T.prototype.setRange=function(g){this.adjustRange(g),this.setLimit("tempoHeightAbove",g),this.setLimit("partHeightAbove",g),this.setLimit("volumeHeightAbove",g),this.setLimit("dynamicHeightAbove",g),this.setLimit("endingHeightAbove",g),this.setLimit("chordHeightAbove",g),this.setLimit("lyricHeightAbove",g),this.setLimit("lyricHeightBelow",g),this.setLimit("chordHeightBelow",g),this.setLimit("volumeHeightBelow",g),this.setLimit("dynamicHeightBelow",g)},T.prototype.addOther=function(g){this.otherchildren.push(g),this.setRange(g)},T.prototype.addBeam=function(g){this.beams.push(g)},T.prototype.setWidth=function(g){this.w=g},yt=T,yt}var kt,ga;function Or(){if(ga)return kt;ga=1;var T=function(g,p,o,r){if(g)for(var n=0;n<g.length;n++){var c=g[n],s=c.getAttribute("highlight");s||(s="fill"),c.setAttribute(s,r);var l=c.getAttribute("class");l||(l=""),l=l.replace(o,""),l=l.replace(p,""),p.length>0&&(l.length>0&&l[l.length-1]!==" "&&(l+=" "),l+=p),c.setAttribute("class",l)}};return kt=T,kt}var xt,va;function Di(){if(va)return xt;va=1;var T=Or(),g=function(p,o){p===void 0&&(p="abcjs-note_selected"),o===void 0&&(o="#ff0000"),T(this.elemset,p,"",o)};return xt=g,xt}var wt,ba;function zi(){if(ba)return wt;ba=1;var T=Or(),g=function(p,o){p===void 0&&(p="abcjs-note_selected"),o===void 0&&(o="#000000"),T(this.elemset,"",p,o)};return wt=g,wt}var _t,ya;function je(){if(ya)return _t;ya=1;var T=Di(),g=zi(),p=function(o,r,n,c,s,l){l||(l={}),this.tuneNumber=s,this.abcelem=o,this.duration=r,this.durationClass=l.durationClassOveride?l.durationClassOveride:this.duration,this.minspacing=n||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=c,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return p.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},p.prototype.addExtra=function(o){this.fixed.w=Math.max(this.fixed.w,o.dx+o.w),this.fixed.t===void 0?this.fixed.t=o.top:this.fixed.t=Math.max(this.fixed.t,o.top),this.fixed.b===void 0?this.fixed.b=o.bottom:this.fixed.b=Math.min(this.fixed.b,o.bottom),o.dx<this.extraw&&(this.extraw=o.dx),this.extra[this.extra.length]=o,this._addChild(o)},p.prototype.addHead=function(o){o.dx<this.extraw&&(this.extraw=o.dx),this.heads[this.heads.length]=o,this.addRight(o)},p.prototype.addRight=function(o){this.fixed.w=Math.max(this.fixed.w,o.dx+o.w),o.top!==void 0&&(this.fixed.t===void 0?this.fixed.t=o.top:this.fixed.t=Math.max(this.fixed.t,o.top)),o.bottom!==void 0&&(this.fixed.b===void 0?this.fixed.b=o.bottom:this.fixed.b=Math.min(this.fixed.b,o.bottom)),o.dx+o.w>this.w&&(this.w=o.dx+o.w),this.right[this.right.length]=o,this._addChild(o)},p.prototype.addFixed=function(o){this._addChild(o)},p.prototype.addFixedX=function(o){this._addChild(o)},p.prototype.addCentered=function(o){var r=o.w/2;-r<this.extraw&&(this.extraw=-r),this.extra[this.extra.length]=o,o.dx+r>this.w&&(this.w=o.dx+r),this.right[this.right.length]=o,this._addChild(o)},p.prototype.setLimit=function(o,r){r[o]&&(this.specialY[o]?this.specialY[o]=Math.max(this.specialY[o],r[o]):this.specialY[o]=r[o])},p.prototype._addChild=function(o){var r=!0;this.abcelem.el_type=="clef"&&o.type=="barNumber"&&(r=!1),o.parent=this,this.children[this.children.length]=o,r&&this.pushTop(o.top),this.pushBottom(o.bottom),this.setLimit("tempoHeightAbove",o),this.setLimit("partHeightAbove",o),this.setLimit("volumeHeightAbove",o),this.setLimit("dynamicHeightAbove",o),this.setLimit("endingHeightAbove",o),this.setLimit("chordHeightAbove",o),this.setLimit("lyricHeightAbove",o),this.setLimit("lyricHeightBelow",o),this.setLimit("chordHeightBelow",o),this.setLimit("volumeHeightBelow",o),this.setLimit("dynamicHeightBelow",o)},p.prototype.pushTop=function(o){o!==void 0&&(this.top===void 0?this.top=o:this.top=Math.max(o,this.top))},p.prototype.pushBottom=function(o){o!==void 0&&(this.bottom===void 0?this.bottom=o:this.bottom=Math.min(o,this.bottom))},p.prototype.setX=function(o){this.x=o;for(var r=0;r<this.children.length;r++)this.children[r].setX(o)},p.prototype.center=function(o,r){var n=(r.x-o.x)/2+o.x;this.x=n-this.w/2;for(var c=0;c<this.children.length;c++)this.children[c].setX(this.x)},p.prototype.setHint=function(){this.hint=!0},p.prototype.highlight=function(o,r){T.bind(this)(o,r)},p.prototype.unhighlight=function(o,r){g.bind(this)(o,r)},_t=p,_t}var Tt,ka;function Me(){if(ka)return Tt;ka=1;var T=function(g,p,o,r,n){switch(n=n||{},this.x=0,this.c=g,this.dx=p,this.w=o,this.pitch=r,this.scalex=n.scalex||1,this.scaley=n.scaley||1,this.type=n.type||"symbol",this.pitch2=n.pitch2,this.linewidth=n.linewidth,this.klass=n.klass,this.anchor=n.anchor?n.anchor:"middle",this.top=r,this.pitch2!==void 0&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=r,this.pitch2!==void 0&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),n.thickness&&(this.top+=n.thickness/2,this.bottom-=n.thickness/2),n.stemHeight&&(n.stemHeight>0?this.top+=n.stemHeight:this.bottom+=n.stemHeight),n.dim&&(this.dim=n.dim),n.position&&(this.position=n.position),this.height=n.height?n.height:4,n.top&&(this.top=n.top),n.bottom&&(this.bottom=n.bottom),n.name?this.name=n.name:this.c?this.name=this.c:this.name=this.type,n.realWidth?this.realWidth=n.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":n.position&&n.position==="below"?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":n.position&&n.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":this.pitch===void 0?n.position&&n.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height;break}};return T.prototype.getChordDim=function(){if(this.type==="debug"||!this.chordHeightAbove&&!this.chordHeightBelow)return null;var g=0,p=this.type==="chord"?this.realWidth/2:0,o=this.x-p-g,r=o+this.realWidth+g;return{left:o,right:r}},T.prototype.invertLane=function(g){this.lane===void 0&&(this.lane=0),this.lane=g-this.lane-1},T.prototype.putChordInLane=function(g){this.lane=g,this.chordHeightAbove?this.chordHeightAbove=this.height*1.25*this.lane:this.chordHeightBelow=this.height*1.25*this.lane},T.prototype.getLane=function(){return this.lane===void 0?0:this.lane},T.prototype.setX=function(g){this.x=g+this.dx},Tt=T,Tt}var Ct,xa;function ws(){if(xa)return Ct;xa=1;var T=je(),g=Me();function p(e){return e!=null&&e.constructor===Object}function o(e,h){for(var v in h)h.hasOwnProperty(v)&&(Array.isArray(h[v])||p(h[v])||(e[v]=h[v]))}function r(e){var h=new T("",0,0,"",0);return o(h,e),h.top=0,h.bottom=-1,e.abcelem&&(h.abcelem={},o(h.abcelem,e.abcelem),h.abcelem.el_type==="note"&&(h.abcelem.el_type="tabNumber")),e.cloned=h,h}function n(e,h){var v=r(e);if(h)for(var m=e.children,x=!0,C=0;C<m.length;C++){var S=m[C],j=new g("",0,0,0,"");o(j,S),x=h.tablature.setRelative(S,j,x),v.children.push(j)}return v}function c(e,h,v){var m="tab.tiny",x=7.5;e.isTabBig&&(m="tab.big",x=10);var C={el_type:"tab",icon:m,Ypos:x};if(x+=e.tabSymbolOffset,!e.hideTabSymbol){var S=new T(C,0,0,"symbol",0);S.x=h;var j=new g(m,0,0,7.5,"tab");j.x=v,S.children.push(j),S.abcelem.el_type=="tab"&&(j.pitch=x)}return S}function s(e){if(e.extra)for(var h=0;h<e.extra.length;h++){var v=e.extra[h];if(v.type=="lyric")return{bottom:v.bottom,height:v.height}}return null}function l(){this.accidentals=null}function d(e){for(var h=0,v=0;v<e.length;v++)e[v].tabNameInfos||h++;return h}function f(e,h,v,m,x){var C=m.num;m.note.quarter!=null&&(C=C.toString(),C+=m.note.quarter);var S=e.semantics.stringToPitch(m.str);v.notes.push({num:C,str:m.str,pitch:m.note.emit()});var j={type:"tabNumber"},F=new g(C,0,0,S+.3,j);return F.x=h,F.isGrace=x,F.isAltered=m.note.isAltered,F}function u(e,h){var v=0;if(e.extra){for(var m=0;m<e.extra.length;m++)if(e.extra[m].c.indexOf("noteheads")>=0){if(v===h)return e.extra[m].x+e.extra[m].w/2;v++}}return-1}function i(e){if(e.abcelem){var h=e.abcelem;if(h.rest)return h.gracenotes}return null}function t(e,h,v){var m=e.semantics.notesToNumber(h,v);if(m.error)return e.setError(m.error),m;if(m.graces&&m.notes){var x=m.notes.length-1;m.notes[x].graces=m.graces}return m}function a(e,h,v,m,x){for(var C=0;C<m.length;C++){var S={el_type:"note",startChar:v.abcelem.startChar,endChar:v.abcelem.endChar,notes:[],grace:!0},j=u(v,C),F=m[C],b=f(e,j,S,F,!0);h.children.push(b),x.push(S)}}return l.prototype.build=function(e,h,v,m,x,C,S){d(h);var j=h[x+m],F=h[S],b=null,M=null;j.children[0].abcelem.el_type!="clef"&&C!="none"&&j.children.splice(0,0,C);for(var B=0;B<j.children.length;B++){var A=j.children[B],P=A.x,N=P;switch(A.isClef&&(F.children.push(c(e,P,N)),A.abcelem.type.indexOf("-8")>=0&&(e.semantics.clefTranspose=-12),A.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),A.type){case"staff-extra key-signature":this.accidentals=A.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var E=!1;B===j.children.length-1&&(E=!0);var _=n(A,e);if(_.abcelem.barNumber){delete _.abcelem.barNumber;for(var L=0;L<_.children.length;L++)if(_.children[L].type==="barNumber"){_.children.splice(L,1);break}}_.abcelem.lastBar=E,F.children.push(_),v.push({el_type:A.abcelem.el_type,type:A.abcelem.type,endChar:A.abcelem.endChar,startChar:A.abcelem.startChar,abselem:_});break;case"rest":var D=i(A);if(D){if(b=t(e,null,D),b.error)return;I={el_type:"note",startChar:A.abcelem.startChar,endChar:A.abcelem.endChar,notes:[],grace:!0},a(e,H,A,b.graces,v)}break;case"note":var H=r(A);H.x=A.heads[0].x+A.heads[0].w/2,H.lyricDim=s(A);var y=A.abcelem.pitches,k=A.abcelem.gracenotes;if(H.type="tabNumber",b=t(e,y,k),b.error)return;if(b.graces){var w=b.notes.length-1;b.notes[w].graces=b.graces}M={el_type:"note",startChar:A.abcelem.startChar,endChar:A.abcelem.endChar,notes:[]};for(var O=0;O<b.notes.length;O++){var z=b.notes[O];if(z.graces)for(var V=0;V<z.graces.length;V++){var I={el_type:"note",startChar:A.abcelem.startChar,endChar:A.abcelem.endChar,notes:[],grace:!0},K=u(A,V),Q=z.graces[V],G=f(e,K,I,Q,!0);H.children.push(G),v.push(I)}var ee=f(e,H.x+A.heads[O].dx,M,z,!1);H.children.push(ee)}M.notes.length>0&&(M.abselem=H,v.push(M),F.children.push(H));break}}},Ct=l,Ct}var Et,wa;function _s(){if(wa)return Et;wa=1;var T=Fi(),g=ws(),p=_e();function o(){return{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}}function r(e){for(var h=0,v=0;v<e.children.length;v++){var m=e.children[v];m.specialY&&m.specialY.lyricHeightBelow>h&&(h=m.specialY.lyricHeightBelow)}return h}function n(e,h,v){var m=e.semantics,x=h.controller.getTextSize,C=m.tabInfos(e),S=m.suppress(e),j=!0;if(S&&(j=!1),j){var F=x.calc(C,"tablabelfont","text instrumentname");return v.tabNameInfos={textSize:{height:F.height,width:F.width},name:C},F.height}return 0}function c(e,h){return h[e].isTabStaff?e===h.length-1?!0:!h[e+1].isTabStaff:!1}function s(e){for(var h=0,v=0;v<e.length;v++)e[v].isTabStaff||h++;return h}function l(e,h){for(var v=h;v>=0;v--)if(!e[v].isTabStaff)return v;return-1}function d(e){for(var h=0;h<e.length;h++)if(e[h].isTabStaff){var v=l(e,h);e[h].hasStaff=e[v],e[v].hasTab||(e[v].hasTab=[]),e[v].hasTab.push(e[h])}}function f(e,h){return s(e)===1&&h.voices.length>1}function u(e,h){for(var v=0,m=0,x=!0,C=0;x;){if(!h[v])return-1;if(h[v].isTabStaff||(C=h[v].voices.length),h[v].isTabStaff){if(m++,c(v,h)&&m<C)return v+1}else if(m=0,v>=e&&(v+1==h.length||!h[v+1].isTabStaff))return v+1;if(v++,v>h.length)return-1}}function i(e,h){for(var v=h;v>=0;v--)if(!e[v].isTabStaff)return e[v];return null}function t(e,h){var v=e[h],m=v.children[0].abcelem;return m.el_type==="clef"?null:h==0?"none":e[h-1].children[0]}function a(e,h,v,m){var x=new g,C={clef:{type:"TAB"}},S=e.linePitch*e.nbLines,j=v.staff;if(j){var F=j[0];if(F&&F.clef&&F.clef.stafflines==0){e.setError("No tablatures when stafflines=0");return}j.splice(j.length,0,C)}var b=v.staffGroup,M=b.voices,B=M[0],A=r(B),P=3,N=m,E=b.staffs[N],_=S+P-E.bottom-A;E.isTabStaff&&(_=E.top);var L={bottom:-1,isTabStaff:!0,specialY:o(),lines:e.nbLines,linePitch:e.linePitch,dy:.15,top:_},D=u(m,b.staffs);if(D!==-1){L.parentIndex=D-1,b.staffs.splice(D,0,L),b.height+=S+P;var H=i(b.staffs,D),y=1;f(b.staffs,H)&&(y=H.voices.length),C.voices=[];for(var k=0;k<y;k++){var w=new T(0,0);k>0&&(w.duplicate=!0);var O=n(e,h,w)/p.STEP;O=Math.max(O,1),b.staffs[m].top+=1,b.height+=O,w.staff=L;var z=M.length;M.splice(M.length,0,w);var V=t(M,k+m);C.voices[k]=[],x.build(e,M,C.voices[k],k,m,V,z)}d(b.staffs)}}return Et=a,Et}var St,_a;function Ii(){if(_a)return St;_a=1;var T={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},g=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];function p(r){var n=r.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(n&&n.length===5){var c=T[n[1]],s=g.indexOf(n[2]),l=n[4].length-n[3].length;return 48+s+c+l*12}return 0}function o(r){r=parseInt(r,10);var n=Math.floor(r/12),c=r%12,s=g[c];if(s==="-"&&(s="^"+g[c-1]),n>4)for(s=s.toLowerCase(),n-=5;n>0;)s+="'",n--;else for(;n<4;)s+=",",n++;return s}return St={noteToMidi:p,midiToNote:o},St}var Mt,Ta;function Vi(){if(Ta)return Mt;Ta=1;var{noteToMidi:T,midiToNote:g}=Ii();function p(r,n){var c=T(r);n&&(c+=n);var s=g(c),l=!1,d=!1,f=!1,u=null,i=null,t=!1,a=0;r.startsWith("_")?(l=!0,a=-1,r[1]=="/"?(l=!1,i="v",a=0):r[1]=="_"&&(t=!0,a-=1)):r.startsWith("^")?(d=!0,a=1,r[1]=="/"?(d=!1,i="^",a=0):r[1]=="^"&&(t=!0,a+=1)):r.startsWith("=")&&(u=!0,a=0),f=l||d||i!=null,(f||u)&&(i!=null||t?s=r.slice(2):s=r.slice(1));var e=(s.match(/,/g)||[]).length,h=(s.match(/'/g)||[]).length;this.pitch=c,this.pitchAltered=0,this.name=s,this.acc=a,this.isSharp=d,this.isKeySharp=!1,this.isDouble=t,this.isAltered=f,this.isFlat=l,this.isKeyFlat=!1,this.natural=u,this.quarter=i,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=e,this.isQuoted=h}function o(r){var n=r.name,c=new p(n);return c.pitch=r.pitch,c.hasComma=r.hasComma,c.isLower=r.isLower,c.isQuoted=r.isQuoted,c.isSharp=r.isSharp,c.isKeySharp=r.isKeySharp,c.isFlat=r.isFlat,c.isKeyFlat=r.isKeyFlat,c}return p.prototype.sameNoteAs=function(r){return r.pitch===this.pitch},p.prototype.isLowerThan=function(r){return r.pitch>this.pitch},p.prototype.checkKeyAccidentals=function(r,n){if(!(this.isAltered||this.natural)){if(n[this.name.toUpperCase()])switch(n[this.name.toUpperCase()]){case"__":this.acc=-2,this.pitchAltered=-2;return;case"_":this.acc=-1,this.pitchAltered=-1;return;case"=":this.acc=0,this.pitchAltered=0;return;case"^":this.acc=1,this.pitchAltered=1;return;case"^^":this.acc=2,this.pitchAltered=2;return}else if(r)for(var c=this.name,s=0;s<r.length;s++){var l=r[s];c==l.note.toUpperCase()&&(l.acc=="flat"&&(this.acc=-1,this.isKeyFlat=!0,this.pitchAltered=-1),l.acc=="sharp"&&(this.acc=1,this.isKeySharp=!0,this.pitchAltered=1))}}},p.prototype.getAccidentalEquiv=function(){var r=o(this);return r.isSharp||r.isKeySharp?(r=r.nextNote(),r.isFlat=!0,r.isSharp=!1,r.isKeySharp=!1):(r.isFlat||r.isKeyFlat)&&(r=r.prevNote(),r.isSharp=!0,r.isFlat=!1,r.isKeyFlat=!1),r},p.prototype.nextNote=function(){var r=g(this.pitch+1+this.pitchAltered);return new p(r)},p.prototype.prevNote=function(){var r=g(this.pitch-1+this.pitchAltered);return new p(r)},p.prototype.emitNoAccidentals=function(){var r=this.name;this.isLower&&(r=r.toLowerCase());for(var n=0;n<this.isQuoted;n++)r+="'";for(var c=0;c<this.hasComma;c++)r+=",";return r},p.prototype.emit=function(){var r=this.name;(this.isSharp||this.isKeySharp)&&(r="^"+r,this.isDouble&&(r="^"+r)),(this.isFlat||this.isKeyFlat)&&(r="_"+r,this.isDouble&&(r="_"+r)),this.quarter&&(this.quarter=="^"?r="^/"+r:r="_/"+r),this.natural&&(r="="+r);for(var n=1;n<=this.hasComma;n++)r+=",";if(this.isLower){r=r.toLowerCase();for(var c=1;c<=this.isQuoted;c++)r+="'"}return r},Mt=p,Mt}var At,Ca;function Ts(){if(Ca)return At;Ca=1;var T=Vi(),g=["A","B","C","D","E","F","G"];function p(o,r){var n=new T(o),c=new T(r);if(c.isLowerThan(n)){var s=n.emit(),l=c.emit();return{error:"Invalid string Instrument tuning : "+l+" string lower than "+s+" string"}}var d=[],f=g.indexOf(n.name),u=g.indexOf(c.name);if(f==-1||u==-1)return d;for(var i=!1;!i;)d.push(n.emit()),n=n.nextNote(),n.sameNoteAs(c)&&(i=!0);return d}return At=p,At}var Nt,Ea;function Cs(){if(Ea)return Nt;Ea=1;const{noteToMidi:T}=Ii();var g=Vi(),p=Ts();function o(i){var t=null,a=i.tuning;if(i.capo>0){t=[];for(var e=0;e<a.length;e++){for(var h=new g(a[e]),v=0;v<i.capo;v++)h=h.nextNote();t[e]=h.emit()}}return t}function r(i){var t=[],a=i.tuning;i.capo>0&&(a=i.capoTuning);for(var e=a.length-1,h=0;h<a.length;h++){var v=i.highestNote;h!=a.length-1&&(v=a[h+1]);var m=p(a[h],v);if(m.error)return m;t[e--]=m}return t}function n(i){var t=[];t[0]=[];for(var a=i.strings,e=1;e<a.length;e++)t[e]=a[e-1];return t}function c(i,t){for(var a=0;a<t.length-1;a++){var e=t[a],h=t[a+1];if(e.str==h.str){if(e.str==i.strings.length-1){e.num="?",h.num="?";return}h.num<e.num?(h.str++,h=l(i,h.note,h.str,i.secondPos,i.strings[h.str].length)):(e.str++,e=l(i,e.note,e.str,i.secondPos,i.strings[e.str].length)),t[a]=e,t[a+1]=h}}return null}function s(i,t){for(var a=[],e=0;e<t.length;e++)if(!t[e].endTie){var h=new g(t[e].name,i.clefTranspose);h.checkKeyAccidentals(i.accidentals,i.measureAccidentals);var v=d(i,h);a.push(v)}return c(i,a),a}function l(i,t,a,e,h){var v=i.strings;t.checkKeyAccidentals(i.accidentals,i.measureAccidentals),e&&(v=e);var m=t.emitNoAccidentals(),x=v[a].indexOf(m),C=t.acc;if(x!=-1){if(e&&(x+=h),(t.isFlat||t.acc==-1)&&x==0){var S=t.getAccidentalEquiv();a++,x=v[a].indexOf(S.emit()),C=0}return{num:x+C,str:a,note:t}}return null}function d(i,t){if(t.isAltered||t.natural){var a;t.isFlat?t.isDouble?a="__":a="_":t.isSharp?t.isDouble?a="^^":a="^":t.natural&&(a="="),i.measureAccidentals[t.name.toUpperCase()]=a}for(var e=i.stringPitches.length-1;e>=0;e--)if(t.pitch+t.pitchAltered>=i.stringPitches[e]){var h=t.pitch+t.pitchAltered-i.stringPitches[e];return t.quarter==="^"?h-=.5:t.quarter==="v"&&(h+=.5),{num:Math.round(h),str:i.stringPitches.length-1-e,note:t}}return{num:"?",str:i.stringPitches.length-1,note:t}}u.prototype.stringToPitch=function(i){var t=5.3,a=this.strings.length-1;return t+(a-i)*this.linePitch};function f(i,t){var a={num:"?",str:0,note:t};i.push(a),i.error=t.emit()+": unexpected note for instrument"}u.prototype.notesToNumber=function(i,t){var a,e,h=null,v=null;if(i&&(v=[],i.length>1?(v=s(this,i),v.error&&(h=v.error)):i[0].endTie||(a=new g(i[0].name,this.clefTranspose),a.checkKeyAccidentals(this.accidentals,this.measureAccidentals),e=d(this,a),e?v.push(e):(f(v,a),h=v.error))),h)return v;var m=null;if(t){m=[];for(var x=0;x<t.length;x++)a=new g(t[x].name,this.clefTranspose),a.checkKeyAccidentals(this.accidentals,this.measureAccidentals),e=d(this,a),e?m.push(e):(f(m,a),h=v.error)}return{notes:v,graces:m,error:h}},u.prototype.toString=function(){for(var i=[],t=0;t<this.tuning.length;t++){var a=this.tuning[t].replaceAll(",","").replaceAll("'","").toUpperCase();a[0]==="_"?a=a[1]+"b ":a[0]==="^"&&(a=a[1]+"# "),i.push(a)}return i.join("")},u.prototype.tabInfos=function(i){var t=i.params.label;if(t){var a=t.indexOf("%T"),e="";return a!=-1&&(e=this.toString(),i.capo>0&&(e+=" capo:"+i.capo),t=t.replace("%T",e)),t}return""},u.prototype.suppress=function(i){var t=i.params.suppress;return!!t};function u(i){var t=i.tuning,a=i.capo,e=i.params.highestNote;this.linePitch=i.linePitch,this.highestNote="a'",e&&(this.highestNote=e),this.measureAccidentals={},this.capo=0,a&&(this.capo=parseInt(a,10)),this.transpose=i.transpose?i.transpose:0,this.tuning=t,this.stringPitches=[];for(var h=0;h<this.tuning.length;h++){var v=T(this.tuning[h])+this.capo;this.stringPitches.push(v)}if(this.capo>0&&(this.capoTuning=o(this)),this.strings=r(this),this.strings.error){i.setError(this.strings.error),i.inError=!0;return}this.secondPos=n(this)}return Nt=u,Nt}var Bt,Sa;function Es(){if(Sa)return Bt;Sa=1;var T=xs(),g=_s(),p=Cs();o.prototype.init=function(n,c,s,l){this.tune=n,this.params=s,this.tuneNumber=c,this.inError=!1,this.abcTune=n,this.linePitch=3,this.nbLines=l.defaultTuning.length,this.isTabBig=l.isTabBig,this.tabSymbolOffset=l.tabSymbolOffset,this.capo=s.capo,this.transpose=s.visualTranspose,this.hideTabSymbol=s.hideTabSymbol,this.tablature=new T(this.nbLines,this.linePitch);var d=s.tuning;d||(d=l.defaultTuning),this.tuning=d,this.semantics=new p(this)},o.prototype.setError=function(n){n&&(this.error=n,this.inError=!0,this.tune.warnings?this.tune.warnings.push(n):this.tune.warnings=[n])},o.prototype.render=function(n,c,s){this.inError||this.tablature.bypass(c)||g(this,n,c,s)};function o(){}var r=function(){return{name:"StringTab",tablature:o}};return Bt=r,Bt}var Pt,Ma;function Yi(){if(Ma)return Pt;Ma=1;var T=Es(),g={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}},p={inited:!1,plugins:{},register:function(o){var r=o.name,n=o.tablature;this.plugins[r]=n},setError:function(o,r){o.warnings?o.warning.push(r):o.warnings=[r]},preparePlugins:function(o,r,n){this.inited||(this.register(new T),this.inited=!0);var c=null;if(n.tablature){var s=n.tablature;c=[];for(var l=0;l<s.length;l++){var d=s[l],f=d.instrument;if(f==null)return this.setError(o,"tablature 'instrument' is missing"),c;var u=g[f],i=null;if(u&&(i=this.plugins[u.name]),i){n.visualTranspose!=0&&(d.visualTranspose=n.visualTranspose),d.abcSrc=n.tablature.abcSrc;var t={classz:i,tuneNumber:r,params:d,instance:null,tabType:u};c.push(t)}else if(f==="")c.push(null);else return this.setError(o,"Undefined tablature plugin: "+f),c}}return c},layoutTablatures:function(o,r){var n=r.tablatures,c=0;if(n&&n.length>0)for(var s=n.length,l=0;l<s;++l)n[l]&&n[l].params.firstStaffOnly&&(n[l].params.suppress=!1);for(var d=0;d<r.lines.length;d++){var f=r.lines[d];if(f.staff&&c++,c>1&&n&&n.length>0)for(var s=n.length,l=0;l<s;++l)n[l].params.firstStaffOnly&&(n[l].params.suppress=!0);var u=f.staff;if(u){for(var i=u.length,t=0;t<u.length;t++)if(n[t]&&t<i){var a=n[t];a.instance==null&&(a.instance=new a.classz,a.instance.init(r,a.tuneNumber,a.params,a.tabType)),a.instance.render(o,f,t)}}}}};return Pt=p,Pt}var Lt,Aa;function We(){if(Aa)return Lt;Aa=1;var T=ji(),g=ks(),p=Yi(),o={};return function(){o.numberOfTunes=function(n){var c=n.split(`
|
|
24
|
+
X:`),s=c.length;return s===0&&(s=1),s};var r=o.TuneBook=function(n){var c=g(n);this.header=c.header,this.tunes=c.tunes};r.prototype.getTuneById=function(n){for(var c=0;c<this.tunes.length;c++)if(this.tunes[c].id===""+n)return this.tunes[c];return null},r.prototype.getTuneByTitle=function(n){for(var c=0;c<this.tunes.length;c++)if(this.tunes[c].title===n)return this.tunes[c];return null},o.parseOnly=function(n,c){for(var s=o.numberOfTunes(n),l=[],d=0;d<s;d++)l.push(1);function f(){}return o.renderEngine(f,l,n,c)},o.renderEngine=function(n,c,s,l){var d=[],f=function(x){return x&&!x.propertyIsEnumerable("length")&&typeof x=="object"&&typeof x.length=="number"};if(!(c===void 0||s===void 0)){f(c)||(c=[c]),l===void 0&&(l={});for(var u=l.startingTune?parseInt(l.startingTune,10):0,i=new r(s),t=new T,a=0;a<c.length;a++){var e=c[a];if(e==="*"||typeof e=="string"&&(e=document.getElementById(e)),e)if(u>=0&&u<i.tunes.length){t.parse(i.tunes[u].abc,l,i.tunes[u].startPos-i.header.length);var h=t.getTune();l.tablature&&(h.tablatures=p.preparePlugins(h,u,l));var v=t.getWarnings();v&&(h.warnings=v);var m=n(e,h,a,i.tunes[u].abc);d.push(m||h)}else e.innerHTML&&(e.innerHTML="");u++}return d}},o.extractMeasures=function(n){for(var c=[],s=new r(n),l=0;l<s.tunes.length;l++){for(var d=s.tunes[l],f=d.abc.split("K:"),u=f[1].split(`
|
|
25
|
+
`),i=f[0]+"K:"+u[0]+`
|
|
26
|
+
`,t=null,a=null,e=null,h=[],v=!1,m=o.parseOnly(d.abc)[0],x=m.getPickupLength()>0,C=0;C<m.lines.length;C++){var S=m.lines[C];if(S.staff)for(var j=0;j<1;j++)for(var F=S.staff[j],b=0;b<1;b++)for(var M=F.voices[b],B=0;B<M.length;B++){var A=M[B];if(e===null&&A.startChar>=0&&(e=A.startChar,A.chord===void 0?a=t:a=null),A.chord&&(t=A),A.el_type==="bar"){if(v){var P=d.abc.substring(e,A.endChar),N={abc:P};t=a&&a.chord&&a.chord.length>0?a.chord[0].name:null,t&&(N.lastChord=t),A.startEnding&&(N.startEnding=A.startEnding),A.endEnding&&(N.endEnding=A.endEnding),h.push(N),e=null,v=!1}}else A.el_type==="note"&&(v=!0)}}c.push({header:i,measures:h,hasPickup:x})}return c}}(),Lt=o,Lt}var Ot,Na;function Ss(){if(Na)return Ot;Na=1;var T=Ni(),{relativeMajor:g,transposeKey:p,relativeMode:o}=Ai(),r=Mi(),n;return function(){n=function(M,B,A){if(B==="TEST")return{keyAccidentals:T,relativeMajor:g,transposeKey:p,relativeMode:o,transposeChordName:r};A=parseInt(A,10);var P=[],N;for(N=0;N<B.length;N++)P=P.concat(c(M,B[N],A));P=P.sort(function(L,D){return D.start-L.start});var E=M.split("");for(N=0;N<P.length;N++){var _=P[N];E.splice(_.start,_.end-_.start,_.note)}return E.join("")};function c(M,B,A){var P=[],N=B.getKeySignature();if(N.root==="Hp"||N.root==="HP")return P;P=P.concat(s(M,A));for(var E=0;E<B.lines.length;E++){var _=B.lines[E].staff;if(_)for(var L=0;L<_.length;L++){var D=_[L];D.clef.type!=="perc"&&(P=P.concat(l(M,D.voices,D.key,A)))}}return P}function s(M,B){for(var A=[],P=M.split("K:"),N=P[0].length,E=1;E<P.length;E++){var _=P[E],L=_.match(/^( *)([A-G])([#b]?)( ?)(\w*)/);if(L){var D=N+2+L[1].length,H=L[2]+L[3]+L[4]+L[5],y=a({root:L[2],acc:L[3],mode:L[5]},B),k=y.root+y.acc+L[4]+y.mode;A.push({start:D,end:D+H.length,note:k})}N+=_.length+2}return A}function l(M,B,A,P){for(var N=[],E=a(A,P),_=0;_<B.length;_++)N=N.concat(u(M,B[_],A.root,d(A),E,P));return N}function d(M){for(var B={},A=0;A<M.accidentals.length;A++){var P=M.accidentals[A];P.acc==="flat"?B[P.note.toUpperCase()]="_":P.acc==="sharp"&&(B[P.note.toUpperCase()]="^")}return B}function f(M,B,A){var P=i.indexOf(M.root)-i.indexOf(B);return B==="none"&&(P=i.indexOf(M.root)),P===0?A>2?P+=7:A===-12&&(P-=7):A>0&&P<0?P+=7:A<0&&P>0&&(P-=7),A>12?P+=7:A<-12&&(P-=7),P}function u(M,B,A,P,N,E){for(var _=[],L=f(N,A,E),D={},H={},y=0;y<B.length;y++){var k=B[y];if(k.chord)for(var w=0;w<k.chord.length;w++){var O=k.chord[w];if(O.position==="default"){var z=N.accidentals.length&&N.accidentals[0].acc==="flat",V=r(O.name,E,z,!0);V=V.replace(/♭/g,"b").replace(/♯/g,"#"),V!==O.name&&_.push(F(M,k.startChar,k.endChar,V))}}if(k.el_type==="note"&&k.pitches){for(var I=0;I<k.pitches.length;I++){var K=C(k.pitches[I].name,A,P,D);K.acc&&(D[K.name.toUpperCase()]=K.acc);var Q=e(K,N,L,H);Q.acc&&(H[Q.upper]=Q.acc),_.push(S(M,k.startChar,k.endChar,Q.acc+Q.name,I))}if(k.gracenotes)for(var G=0;G<k.gracenotes.length;G++){var ee=C(k.gracenotes[G].name,A,P,D);ee.acc&&(D[ee.name.toUpperCase()]=ee.acc);var te=e(ee,N,L,D);te.acc&&(H[te.upper]=te.acc),_.push(j(M,k.startChar,k.endChar,te.acc+te.name,G))}}else k.el_type==="bar"?(D={},H={}):k.el_type==="keySignature"&&(A=k.root,P=d(k),N=a(k,E),L=f(N,A,E))}return _}var i="CDEFGAB",t=[",,,,",",,,",",,",",","","'","''","'''","''''"];function a(M,B){if(M.root==="none")return{root:p("C",B),mode:"",acc:"",accidentals:[]};var A=g(M.root+M.acc+M.mode),P=p(A,B),N=o(P,M.mode),E=T(P);return{root:N[0],mode:M.mode,acc:N.length>1?N[1]:"",accidentals:E}}function e(M,B,A,P){for(var N=M.pitch,E=i.indexOf(M.name),_=i.indexOf(B.root),L=(_+N)%7,D=E+A,H=M.oct;D>6;)H++,D-=7;for(;D<0;)H--,D+=7;for(var y=i[L],k="",w=M.adj,O="=",z=0;z<B.accidentals.length;z++)if(B.accidentals[z].note.toLowerCase()===y.toLowerCase()){w=w+(B.accidentals[z].acc==="flat"?-1:1),O=B.accidentals[z].acc==="flat"?"_":"^";break}switch(w){case-2:k="__";break;case-1:k="_";break;case 0:k="=";break;case 1:k="^";break;case 2:k="^^";break;case-3:var V={};return V.pitch=M.pitch-1,V.oct=M.oct,V.name=i[i.indexOf(M.name)-1],V.name||(V.name="B",V.oct--),V.name==="B"||V.name==="E"?V.adj=M.adj+1:V.adj=M.adj+2,e(V,B,A+1,P);case 3:var V={};return V.pitch=M.pitch+1,V.oct=M.oct,V.name=i[i.indexOf(M.name)+1],V.name||(V.name="C",V.oct++),V.name==="C"||V.name==="F"?V.adj=M.adj-1:V.adj=M.adj-2,e(V,B,A+1,P)}switch((P[y]===k||!P[y]&&k===O)&&!M.courtesy&&(k=""),H){case 0:y=y+",,,";break;case 1:y=y+",,";break;case 2:y=y+",";break;case 4:y=y.toLowerCase();break;case 5:y=y.toLowerCase()+"'";break;case 6:y=y.toLowerCase()+"''";break;case 7:y=y.toLowerCase()+"'''";break;case 8:y=y.toLowerCase()+"''''";break}return H>4&&(y=y.toLowerCase()),{acc:k,name:y,upper:y.toUpperCase()}}var h=/([_^=]*)([A-Ga-g])([,']*)/,v=/([_^=]*[A-Ga-g][,']*)(\d*\/*\d*)([\>\<\-\)\.\s\\]*)/,m=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/,x=/(\s*)$/;function C(M,B,A,P){var N=B==="none"?0:i.indexOf(B),E=M.match(h),_=E[2].toUpperCase(),L=i.indexOf(_)-N;L<0&&(L+=7);var D=t.indexOf(E[3]);_===E[2]&&D--;var H=P[_]||A[_]||"=";return{acc:E[1],name:_,pitch:L,oct:D,adj:b(E[1],A[_],P[_]),courtesy:E[1]===H}}function S(M,B,A,P,N){var E=M.substring(B,A),_=E.match(new RegExp(v.source+x.source));if(_){var L=_[1].length,D=_[2].length+_[3].length+_[4].length,H=A-B-L-D;B+=H,A-=D}else{var y=/([^\[]*)/,k=/\[/,w=/\-?](\d*\/*\d*)?([\>\<\-\)]*)/,O=new RegExp(y.source+k.source+"(?:"+m.source+"\\s*){1,8}"+w.source+x.source);if(_=E.match(O),_){var z=_[1].length+1,V=E.slice(_[1].length+1,E.lastIndexOf("]")),I=[],K=new RegExp(m.source+"\\s*","g");for(const ne of V.matchAll(K)){let X=ne[0].trim();X!==""&&I.push({text:X,index:ne.index})}if(N>=I.length)throw new Error("Chord index out of range for chord: "+E);var Q=I[N];let G=Q.text.match(/^(.+?)(\d+\/?\d*)?(-)?$/);G?G[1]:Q.text;let ee=G&&G[2]?G[2]:"",te=G&&G[3]?G[3]:"";P=P+ee+te,B+=z+Q.index,A=B+Q.text.length}}return{start:B,end:A,note:P}}function j(M,B,A,P,N){var E=M.substring(B,A),_=/\{/,L=/\}/,D=/([^\{]*)/,H=/(\/*)/,y=E.match(new RegExp(D.source+_.source+H.source+m.source+H.source+m.source+H.source+m.source+H.source+m.source+H.source+m.source+H.source+m.source+H.source+m.source+H.source+m.source+L.source));if(y){for(var k=1+y[1].length,w=0;w<N;w++)y[w*3+2]&&(k+=y[w*3+2].length),y[w*3+3]&&(k+=y[w*3+3].length),y[w*3+4]&&(k+=y[w*3+4].length),y[w*3+5]&&(k+=y[w*3+5].length);y[N*3+2]&&(k+=y[w*3+2].length),B+=k;var O=y[N*3+3]?y[N*3+3].length:0;O+=y[N*3+4]?y[N*3+4].length:0,O+=y[N*3+5]?y[N*3+5].length:0,A=B+O}return{start:B,end:A,note:P}}function F(M,B,A,P){var N=M.substring(B,A).match(/([^"]+)?(".+")+/);return N[1]&&(B+=N[1].length),A=B+N[2].length,{start:B+1,end:A-1,note:P}}function b(M,B,A){if(!M&&A&&(M=A),!M)return 0;switch(B){case void 0:switch(M){case"__":return-2;case"_":return-1;case"=":return 0;case"^":return 1;case"^^":return 2;default:return 0}case"_":switch(M){case"__":return-1;case"_":return 0;case"=":return 1;case"^":return 2;case"^^":return 3;default:return 0}case"^":switch(M){case"__":return-3;case"_":return-2;case"=":return-1;case"^":return 0;case"^^":return 1;default:return 0}}return 0}}(),Ot=n,Ot}var Ht,Ba;function Ms(){if(Ba)return Ht;Ba=1;var T=function(p,o,r,n){this.type="BeamElem",this.isflat=!!r,this.isgrace=!!(o&&o==="grace"),this.forceup=!!(this.isgrace||o&&o==="up"),this.forcedown=!!(o&&o==="down"),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=p,this.beams=[],n&&n.duration?(this.duration=n.duration,n.startTriplet&&(this.duration*=n.tripletMultiplier),this.duration=Math.round(this.duration*1e3)/1e3):this.duration=0};T.prototype.setHint=function(){this.hint=!0},T.prototype.runningDirection=function(p){var o=p.averagepitch;o!==void 0&&(this.total=Math.round(this.total+o),this.count||(this.count=0),this.count++)},T.prototype.add=function(p){var o=p.abcelem.averagepitch;o!==void 0&&(p.abcelem.rest||(this.allrests=!1),p.beam=this,this.elems.push(p),this.total=Math.round(this.total+o),(this.min===void 0||p.abcelem.minpitch<this.min)&&(this.min=p.abcelem.minpitch),(this.max===void 0||p.abcelem.maxpitch>this.max)&&(this.max=p.abcelem.maxpitch))},T.prototype.addBeam=function(p){this.beams.push(p)},T.prototype.setStemDirection=function(){if(this.average=g(this.total,this.count),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var p=6;this.stemsUp=this.average<p}delete this.count,this.total=0},T.prototype.calcDir=function(){if(this.average=g(this.total,this.elems.length),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var p=6;this.stemsUp=this.average<p}for(var o=this.stemsUp?"up":"down",r=0;r<this.elems.length;r++)for(var n=0;n<this.elems[r].heads.length;n++)this.elems[r].heads[n].stemDir=o};function g(p,o){return o?p/o:0}return Ht=T,Ht}var jt,Pa;function As(){if(Pa)return jt;Pa=1;var T=function(g,p){this.startVoice=g,this.type=p};return T.prototype.setBottomStaff=function(g){this.endVoice=g,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},T.prototype.continuing=function(g){this.lastContinuedVoice=g},T.prototype.getWidth=function(){return 10},T.prototype.isStartVoice=function(g){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===g)},jt=T,jt}var Ft,La;function Le(){if(La)return Ft;La=1;var T=_e(),g={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"tab.big":{d:[["M",20.16,-21.66],["c",.24,-.09,.66,.09,.78,.36],["c",.09,.21,.09,.24,-.18,.54],["c",-.78,.81,-1.86,1.44,-2.94,1.71],["c",-.87,.24,-1.71,.24,-2.55,.03],["l",-.06,-.03],["l",-.18,.99],["c",-.33,1.98,-.75,4.26,-.96,5.04],["c",-.42,1.65,-1.26,3.18,-2.28,4.14],["c",-.57,.57,-1.17,.9,-1.86,1.08],["c",-.18,.06,-.33,.06,-.66,.06],["c",-.54,0,-.78,-.03,-1.23,-.27],["c",-.39,-.18,-.66,-.39,-1.38,-.99],["c",-.3,-.24,-.66,-.51,-.75,-.57],["c",-.21,-.15,-.27,-.24,-.24,-.45],["c",.06,-.27,.36,-.6,.6,-.66],["c",.18,-.03,.33,.06,.9,.57],["c",.48,.42,.72,.57,.93,.69],["c",.66,.33,1.38,.21,1.95,-.36],["c",.63,-.6,1.05,-1.62,1.23,-3],["c",.03,-.18,.09,-.66,.09,-1.11],["c",.09,-1.56,.33,-3.81,.57,-5.49],["c",.06,-.33,.09,-.63,.09,-.63],["c",-.03,-.03,-.81,-.12,-1.02,-.12],["c",-.57,0,-1.32,.12,-1.8,.33],["c",-.87,.3,-1.35,.78,-1.5,1.41],["c",-.18,.63,.09,1.26,.66,1.65],["c",.12,.06,.15,.12,.18,.24],["c",.09,.27,.06,.57,-.09,.75],["c",-.03,.06,-.12,.09,-.27,.15],["c",-.72,.21,-1.44,.15,-2.1,-.18],["c",-.54,-.27,-.96,-.66,-1.2,-1.14],["c",-.39,-.75,-.33,-1.74,.15,-2.52],["c",.27,-.42,.84,-.93,1.41,-1.23],["c",1.17,-.57,2.88,-.9,4.8,-.9],["c",.69,0,.78,0,1.08,.06],["c",.45,.09,1.11,.3,2.07,.6],["c",1.47,.48,1.83,.57,2.55,.54],["c",1.02,-.06,2.04,-.45,2.94,-1.11],["c",.12,-.09,.24,-.18,.27,-.18],["z"],["m",-5.88,13.05],["c",.21,-.03,.81,0,1.08,.06],["c",.48,.12,.9,.42,.99,.69],["c",.03,.09,.03,.15,0,.27],["c",0,.09,-.03,.57,-.06,1.08],["c",-.09,2.19,-.24,5.76,-.39,8.28],["c",-.06,1.53,-.06,1.77,.03,2.01],["c",.09,.18,.15,.24,.3,.3],["c",.24,.12,.54,.06,1.23,-.27],["c",.57,-.27,.66,-.3,.75,-.24],["c",.09,.06,.18,.3,.18,.45],["c",0,.33,-.15,.51,-.45,.63],["c",-.12,.03,-.39,.15,-.6,.27],["c",-1.17,.6,-1.38,.69,-1.8,.72],["c",-.45,.03,-.78,-.09,-1.08,-.39],["c",-.39,-.42,-.66,-1.2,-1.02,-3.12],["c",-.24,-1.23,-.36,-2.07,-.54,-3.75],["l",0,-.18],["l",-.36,.45],["c",-.6,.75,-1.32,1.59,-1.95,2.25],["c",-.15,.18,-.27,.3,-.27,.33],["c",0,0,.06,.09,.15,.18],["c",.24,.33,.6,.57,1.05,.69],["c",.18,.06,.3,.06,.69,.06],["l",.48,.03],["l",.06,.12],["c",.15,.27,.03,.72,-.21,.9],["c",-.18,.12,-.93,.27,-1.41,.27],["c",-.84,0,-1.59,-.3,-1.98,-.84],["l",-.12,-.15],["l",-.45,.42],["c",-.99,.87,-1.53,1.32,-2.16,1.74],["c",-.78,.51,-1.5,.84,-2.1,.93],["c",-.69,.12,-1.2,.03,-1.95,-.42],["c",-.21,-.12,-.51,-.27,-.66,-.36],["c",-.24,-.12,-.3,-.18,-.33,-.24],["c",-.12,-.27,.15,-.78,.45,-.93],["c",.24,-.12,.33,-.09,.9,.18],["c",.6,.3,.84,.39,1.2,.36],["c",.87,-.09,1.77,-.69,3.24,-2.31],["c",2.67,-2.85,4.59,-5.94,5.7,-9.15],["c",.15,-.45,.24,-.63,.42,-.81],["c",.21,-.24,.6,-.45,.99,-.51],["z"],["m",-3.99,16.05],["c",.18,0,.69,-.03,1.17,0],["c",3.27,.03,5.37,.75,6,2.07],["c",.45,.99,.12,2.4,-.81,3.42],["c",-.24,.27,-.57,.57,-.84,.75],["c",-.09,.06,-.18,.09,-.18,.12],["c",0,0,.18,.03,.42,.09],["c",1.23,.3,2.01,.81,2.37,1.59],["c",.27,.54,.3,1.32,.09,2.1],["c",-.12,.36,-.45,1.05,-.69,1.35],["c",-.87,1.17,-2.1,1.92,-3.54,2.25],["c",-.36,.06,-.48,.06,-.96,.06],["c",-.45,0,-.66,0,-.84,-.03],["c",-.84,-.18,-1.47,-.51,-2.07,-1.11],["c",-.33,-.33,-.45,-.51,-.45,-.63],["c",0,-.06,.03,-.15,.06,-.24],["c",.18,-.33,.69,-.6,.93,-.48],["c",.03,.03,.15,.12,.27,.24],["c",.39,.42,.99,.57,1.62,.45],["c",1.05,-.21,1.98,-1.02,2.31,-2.01],["c",.48,-1.53,-.48,-2.55,-2.58,-2.67],["c",-.21,0,-.36,-.03,-.42,-.06],["c",-.15,-.09,-.21,-.51,-.06,-.78],["c",.12,-.27,.24,-.33,.6,-.36],["c",.57,-.06,1.11,-.42,1.5,-.99],["c",.48,-.72,.54,-1.59,.18,-2.31],["c",-.12,-.21,-.45,-.54,-.69,-.69],["c",-.33,-.21,-.93,-.45,-1.35,-.51],["l",-.12,-.03],["l",-.06,.48],["c",-.54,2.94,-1.14,6.24,-1.29,6.75],["c",-.33,1.35,-.93,2.61,-1.65,3.6],["c",-.3,.36,-.81,.9,-1.14,1.14],["c",-.3,.24,-.84,.48,-1.14,.57],["c",-.33,.09,-.96,.09,-1.26,.03],["c",-.45,-.12,-.87,-.39,-1.53,-.96],["c",-.24,-.15,-.51,-.39,-.63,-.48],["c",-.3,-.21,-.33,-.33,-.21,-.63],["c",.12,-.18,.27,-.36,.42,-.45],["c",.27,-.12,.36,-.09,.87,.33],["c",.78,.6,1.08,.75,1.65,.72],["c",.45,-.03,.81,-.21,1.17,-.54],["c",.87,-.9,1.38,-2.85,1.38,-5.37],["c",0,-.6,.03,-1.11,.12,-2.04],["c",.06,-.69,.24,-2.01,.33,-2.58],["c",.06,-.24,.06,-.42,.06,-.42],["c",0,0,-.12,.03,-.21,.09],["c",-1.44,.57,-2.16,1.65,-1.74,2.55],["c",.09,.15,.18,.24,.27,.33],["c",.24,.21,.3,.27,.33,.39],["c",.06,.24,0,.63,-.15,.78],["c",-.09,.12,-.54,.21,-.96,.24],["c",-1.02,.03,-2.01,-.48,-2.43,-1.32],["c",-.21,-.45,-.27,-.9,-.15,-1.44],["c",.06,-.27,.21,-.66,.39,-.93],["c",.87,-1.29,3,-2.22,5.64,-2.43],["z"]],w:19.643,h:43.325},"tab.tiny":{d:[["M",16.02,-17.25],["c",.12,-.09,.15,-.09,.27,-.09],["c",.21,.03,.51,.3,.51,.45],["c",0,.06,-.12,.18,-.3,.36],["c",-1.11,1.08,-2.55,1.59,-3.84,1.41],["c",-.15,-.03,-.33,-.06,-.39,-.09],["c",-.06,-.03,-.09,-.03,-.12,-.03],["c",0,0,-.06,.42,-.15,.93],["c",-.33,2.01,-.66,3.69,-.84,4.26],["c",-.42,1.41,-1.23,2.67,-2.16,3.33],["c",-.27,.18,-.75,.42,-.99,.48],["c",-.3,.09,-.72,.09,-1.02,.06],["c",-.45,-.09,-.84,-.33,-1.53,-.9],["c",-.21,-.18,-.51,-.39,-.63,-.48],["c",-.27,-.21,-.3,-.24,-.3,-.36],["c",0,-.12,.09,-.36,.18,-.45],["c",.09,-.09,.27,-.18,.36,-.18],["c",.12,0,.3,.12,.66,.45],["c",.57,.51,.87,.69,1.23,.72],["c",.93,.06,1.68,-.78,1.98,-2.37],["c",.09,-.39,.15,-.75,.18,-1.53],["c",.06,-.99,.24,-2.79,.42,-4.05],["c",.03,-.3,.06,-.57,.06,-.6],["c",0,-.06,-.03,-.09,-.15,-.12],["c",-.9,-.18,-2.13,.06,-2.76,.57],["c",-.36,.3,-.51,.6,-.51,1.02],["c",0,.45,.15,.75,.48,.99],["c",.06,.06,.15,.18,.18,.24],["c",.12,.24,.03,.63,-.15,.69],["c",-.24,.12,-.6,.15,-.9,.15],["c",-.36,-.03,-.57,-.09,-.87,-.24],["c",-.78,-.36,-1.23,-1.11,-1.2,-1.92],["c",.12,-1.53,1.74,-2.49,4.62,-2.7],["c",1.2,-.09,1.47,-.03,3.33,.57],["c",.9,.3,1.14,.36,1.56,.39],["c",.45,0,.93,-.06,1.38,-.21],["c",.51,-.18,.81,-.33,1.41,-.75],["z"],["m",-4.68,10.38],["c",.39,-.06,.84,0,1.2,.15],["c",.24,.12,.36,.21,.45,.36],["l",.09,.09],["l",-.06,1.41],["c",-.09,2.19,-.18,3.96,-.27,5.49],["c",-.03,.78,-.06,1.59,-.06,1.86],["c",0,.42,0,.48,.06,.57],["c",.06,.18,.18,.24,.36,.27],["c",.18,0,.39,-.06,.84,-.27],["c",.45,-.21,.54,-.24,.63,-.18],["c",.12,.12,.15,.54,.03,.69],["c",-.03,.03,-.15,.12,-.27,.18],["c",-.15,.03,-.3,.12,-.36,.15],["c",-.87,.45,-1.02,.51,-1.26,.57],["c",-.33,.09,-.6,.06,-.84,-.06],["c",-.42,-.18,-.63,-.6,-.87,-1.44],["c",-.3,-1.23,-.57,-2.97,-.66,-4.08],["c",0,-.18,-.03,-.3,-.03,-.33],["l",-.06,.06],["c",-.18,.27,-1.11,1.38,-1.68,2.01],["l",-.33,.33],["l",.06,.09],["c",.06,.15,.27,.33,.48,.42],["c",.27,.18,.51,.24,.96,.27],["l",.39,0],["l",.03,.12],["c",.12,.21,.03,.57,-.15,.69],["c",-.03,.03,-.21,.09,-.36,.15],["c",-.27,.06,-.39,.06,-.75,.06],["c",-.48,0,-.75,-.03,-1.08,-.21],["c",-.21,-.12,-.51,-.36,-.57,-.48],["l",-.03,-.09],["l",-.39,.36],["c",-1.47,1.35,-2.49,1.98,-3.42,2.13],["c",-.54,.09,-.96,-.03,-1.62,-.39],["c",-.21,-.15,-.45,-.27,-.54,-.3],["c",-.18,-.09,-.21,-.21,-.12,-.45],["c",.06,-.27,.33,-.48,.54,-.48],["c",.03,0,.27,.09,.48,.21],["c",.48,.24,.69,.27,.99,.27],["c",.6,-.06,1.17,-.42,2.1,-1.35],["c",2.22,-2.22,4.02,-4.98,4.95,-7.59],["c",.21,-.57,.3,-.78,.48,-.93],["c",.15,-.15,.42,-.27,.66,-.33],["z"],["m",-3.06,12.84],["c",.27,-.03,1.68,0,2.01,.03],["c",1.92,.18,3.15,.69,3.63,1.5],["c",.18,.33,.24,.51,.21,.93],["c",0,.45,-.06,.72,-.24,1.11],["c",-.24,.51,-.69,1.02,-1.17,1.35],["c",-.21,.15,-.21,.15,-.12,.18],["c",.72,.15,1.11,.3,1.5,.57],["c",.39,.24,.63,.57,.75,.96],["c",.09,.3,.09,.96,0,1.29],["c",-.15,.57,-.39,1.05,-.78,1.5],["c",-.66,.75,-1.62,1.32,-2.61,1.53],["c",-.27,.06,-.42,.06,-.84,.06],["c",-.48,0,-.57,0,-.81,-.06],["c",-.6,-.18,-1.05,-.42,-1.47,-.81],["c",-.36,-.39,-.42,-.51,-.3,-.75],["c",.12,-.21,.39,-.39,.6,-.39],["c",.09,0,.15,.03,.33,.18],["c",.12,.12,.27,.24,.36,.27],["c",.96,.48,2.46,-.33,2.82,-1.5],["c",.24,-.81,-.03,-1.44,-.69,-1.77],["c",-.39,-.21,-1.02,-.33,-1.53,-.33],["c",-.18,0,-.21,0,-.27,-.09],["c",-.06,-.09,-.06,-.3,-.03,-.48],["c",.06,-.18,.18,-.36,.33,-.36],["c",.39,-.06,.51,-.09,.72,-.18],["c",.69,-.36,1.11,-1.23,.99,-2.01],["c",-.09,-.51,-.42,-.9,-.93,-1.17],["c",-.24,-.12,-.6,-.27,-.87,-.3],["c",-.09,-.03,-.09,-.03,-.12,.12],["c",0,.09,-.21,1.11,-.42,2.25],["c",-.66,3.75,-.72,3.99,-1.26,5.07],["c",-.9,1.89,-2.25,2.85,-3.48,2.61],["c",-.39,-.09,-.69,-.27,-1.38,-.84],["c",-.63,-.51,-.63,-.48,-.63,-.6],["c",0,-.18,.18,-.48,.39,-.57],["c",.21,-.12,.3,-.09,.81,.33],["c",.15,.15,.39,.3,.54,.36],["c",.18,.12,.27,.12,.48,.15],["c",.99,.06,1.71,-.78,2.04,-2.46],["c",.12,-.66,.18,-1.14,.21,-2.22],["c",.03,-1.23,.12,-2.25,.36,-3.63],["c",.03,-.24,.06,-.45,.06,-.48],["c",-.06,-.03,-.66,.27,-.9,.42],["c",-.06,.06,-.21,.18,-.33,.3],["c",-.57,.57,-.6,1.35,-.06,1.74],["c",.18,.12,.24,.24,.21,.51],["c",-.03,.3,-.15,.42,-.57,.48],["c",-1.11,.24,-2.22,-.42,-2.43,-1.38],["c",-.09,-.45,.03,-1.02,.3,-1.47],["c",.18,-.24,.6,-.63,.9,-.84],["c",.9,-.6,2.28,-1.02,3.69,-1.11],["z"]],w:15.709,h:34.656},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.85,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84}};g["noteheads.slash.whole"]={d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},g["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},g["noteheads.harmonic.quarter"]={d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165},g["noteheads.triangle.quarter"]={d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9};var p=function(n){for(var c=[],s=0,l=n.length;s<l;s++){c[s]=[];for(var d=0,f=n[s].length;d<f;d++)c[s][d]=n[s][d]}return c},o=function(n,c,s){for(var l=0,d=n.length;l<d;l++){var f=n[l],u,i;for(u=1,i=f.length;u<i;u++)f[u]*=u%2?c:s}},r={printSymbol:function(n,c,s,l,d){if(!g[s])return null;var f=p(g[s].d);f[0][1]+=n,f[0][2]+=c;for(var u="",i=0;i<f.length;i++)u+=f[i].join(" ");return d.path=u,l.path(d)},getPathForSymbol:function(n,c,s,l,d){if(l=l||1,d=d||1,!g[s])return null;var f=p(g[s].d);return(l!==1||d!==1)&&o(f,l,d),f[0][1]+=n,f[0][2]+=c,f},getSymbolWidth:function(n){return g[n]?g[n].w:0},symbolHeightInPitches:function(n){var c=g[n]?g[n].h:0;return c/T.STEP},getSymbolAlign:function(n){return n.substring(0,7)==="scripts"&&n!=="scripts.roll"?"center":"left"},getYCorr:function(n){switch(n){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":return-2;case"timesig.common":case"timesig.cut":return 0;case"flags.d32nd":return-1;case"flags.d64th":return-2;case"flags.u32nd":return 1;case"flags.u64th":return 3;case"rests.whole":return 1;case"rests.half":return-1;case"rests.8th":return-1;case"rests.quarter":return-1;case"rests.16th":return-1;case"rests.32nd":return-1;case"rests.64th":return-1;case"f":case"m":case"p":case"s":case"z":return-4;case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"scripts.dfermata":return 1;default:return 0}},setSymbol:function(n,c){g[n]=c}};return Ft=r,Ft}var Dt,Oa;function Ns(){if(Oa)return Dt;Oa=1;var T=je(),g=Le(),p=Me(),o=function(n,c){var s,l=0;n.el_type="clef";var d=new T(n,0,10,"staff-extra clef",c);switch(d.isClef=!0,n.type){case"treble":s="clefs.G";break;case"tenor":s="clefs.C";break;case"alto":s="clefs.C";break;case"bass":s="clefs.F";break;case"treble+8":s="clefs.G",l=1;break;case"tenor+8":s="clefs.C",l=1;break;case"bass+8":s="clefs.F",l=1;break;case"alto+8":s="clefs.C",l=1;break;case"treble-8":s="clefs.G",l=-1;break;case"tenor-8":s="clefs.C",l=-1;break;case"bass-8":s="clefs.F",l=-1;break;case"alto-8":s="clefs.C",l=-1;break;case"none":return null;case"perc":s="clefs.perc";break;default:d.addFixed(new p("clef="+n.type,0,0,void 0,{type:"debug"}))}var f=5;if(s){var u=g.symbolHeightInPitches(s),i=r(s);if(d.addRight(new p(s,f,g.getSymbolWidth(s),n.clefPos,{top:u+n.clefPos+i,bottom:n.clefPos+i})),l!==0){var t=.6666666666666666,a=(g.getSymbolWidth(s)-g.getSymbolWidth("8")*t)/2,e=l>0?d.top+3:d.bottom-1,h=l>0?d.top+3:d.bottom-3,v=h-2;n.type==="bass-8"&&(e=3,a=0),d.addRight(new p("8",f+a,g.getSymbolWidth("8")*t,e,{scalex:t,scaley:t,top:h,bottom:v}))}}return d};function r(n){switch(n){case"clefs.G":return-5;case"clefs.C":return-4;case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}return Dt=o,Dt}var zt,Ha;function Bs(){if(Ha)return zt;Ha=1;var T=je(),g=Le(),p=Me(),o=function(r,n){if(r.el_type="keySignature",!r.accidentals||r.accidentals.length===0)return null;var c=new T(r,0,10,"staff-extra key-signature",n);c.isKeySig=!0;var s=0;return r.accidentals.forEach(function(l){var d,f=0;switch(l.acc){case"sharp":d="accidentals.sharp",f=-3;break;case"natural":d="accidentals.nat";break;case"flat":d="accidentals.flat",f=-1.2;break;case"quartersharp":d="accidentals.halfsharp",f=-2.5;break;case"quarterflat":d="accidentals.halfflat",f=-1.2;break;default:d="accidentals.flat"}c.addRight(new p(d,s,g.getSymbolWidth(d),l.verticalPos,{thickness:g.symbolHeightInPitches(d),top:l.verticalPos+g.symbolHeightInPitches(d)+f,bottom:l.verticalPos+f})),s+=g.getSymbolWidth(d)+2},this),c};return zt=o,zt}var It,ja;function Ps(){if(ja)return It;ja=1;var T=Le(),g=Me(),p=function(o,r,n,c){c||(c={});var s=c.dir!==void 0?c.dir:null,l=c.headx!==void 0?c.headx:0,d=c.extrax!==void 0?c.extrax:0,f=c.flag!==void 0?c.flag:null,u=c.dot!==void 0?c.dot:0,i=c.dotshiftx!==void 0?c.dotshiftx:0,t=c.scale!==void 0?c.scale:1,a=c.accidentalSlot!==void 0?c.accidentalSlot:[],e=c.shouldExtendStem!==void 0?c.shouldExtendStem:!1,h=c.printAccidentals!==void 0?c.printAccidentals:!0,v=n.verticalPos,m,x=0,C=0,S=0;if(r===void 0)o.addFixed(new g("pitch is undefined",0,0,0,{type:"debug"}));else if(r==="")m=new g(null,0,0,v);else{var j=l;if(n.printer_shift){var F=n.printer_shift==="same"?1:0;j=s==="down"?-T.getSymbolWidth(r)*t+F:T.getSymbolWidth(r)*t-F}var b={scalex:t,scaley:t,thickness:T.symbolHeightInPitches(r)*t,name:n.name};if(m=new g(r,j,T.getSymbolWidth(r)*t,v,b),m.stemDir=s,f){var M=v+(s==="down"?-7:7)*t;e&&(s==="down"&&M>6&&(M=6),s==="up"&&M<6&&(M=6));var B=s==="down"?l:l+m.w-.6;o.addRight(new g(f,B,T.getSymbolWidth(f)*t,M,{scalex:t,scaley:t}))}for(C=m.w+i-2+5*u;u>0;u--){var A=1-Math.abs(v)%2;o.addRight(new g("dots.dot",m.w+i-2+5*u,T.getSymbolWidth("dots.dot"),v+A))}}if(m&&(m.highestVert=n.highestVert),h&&n.accidental){var P;switch(n.accidental){case"quartersharp":P="accidentals.halfsharp";break;case"dblsharp":P="accidentals.dblsharp";break;case"sharp":P="accidentals.sharp";break;case"quarterflat":P="accidentals.halfflat";break;case"flat":P="accidentals.flat";break;case"dblflat":P="accidentals.dblflat";break;case"natural":P="accidentals.nat"}for(var N=!1,E=d,_=0;_<a.length;_++)if(v-a[_][0]>=6){a[_][0]=v,E=a[_][1],N=!0;break}N===!1&&(E-=T.getSymbolWidth(P)*t+2,a.push([v,E]),x=T.getSymbolWidth(P)*t+2);var L=T.symbolHeightInPitches(P);o.addExtra(new g(P,E,T.getSymbolWidth(P),v,{scalex:t,scaley:t,top:v+L/2,bottom:v-L/2})),S=T.getSymbolWidth(P)/2}return{notehead:m,accidentalshiftx:x,dotshiftx:C,extraLeft:S}};return It=p,It}var Vt,Fa;function Ls(){if(Fa)return Vt;Fa=1;var T=je(),g=Le(),p=Me(),o=function(r,n){r.el_type="timeSignature";var c=new T(r,0,10,"staff-extra time-signature",n);if(r.type==="specified")for(var s=0,l=0;l<r.value.length;l++)if(l!==0&&(c.addRight(new p("+",s+1,g.getSymbolWidth("+"),6,{thickness:g.symbolHeightInPitches("+")})),s+=g.getSymbolWidth("+")+2),r.value[l].den){for(var d=0,f=0;f<r.value[l].num.length;f++)d+=g.getSymbolWidth(r.value[l].num[f]);var u=0;for(f=0;f<r.value[l].num.length;f++)u+=g.getSymbolWidth(r.value[l].den[f]);var i=Math.max(d,u);c.addRight(new p(r.value[l].num,s+(i-d)/2,d,8,{thickness:g.symbolHeightInPitches(r.value[l].num[0])})),c.addRight(new p(r.value[l].den,s+(i-u)/2,u,4,{thickness:g.symbolHeightInPitches(r.value[l].den[0])})),s+=i}else{for(var t=0,a=0;a<r.value[l].num.length;a++)t+=g.getSymbolWidth(r.value[l].num[a]);c.addRight(new p(r.value[l].num,s,t,6,{thickness:g.symbolHeightInPitches(r.value[l].num[0])})),s+=t}else r.type==="common_time"?c.addRight(new p("timesig.common",0,g.getSymbolWidth("timesig.common"),6,{thickness:g.symbolHeightInPitches("timesig.common")})):r.type==="cut_time"?c.addRight(new p("timesig.cut",0,g.getSymbolWidth("timesig.cut"),6,{thickness:g.symbolHeightInPitches("timesig.cut")})):r.type==="tempus_imperfectum"?c.addRight(new p("timesig.imperfectum",0,g.getSymbolWidth("timesig.imperfectum"),6,{thickness:g.symbolHeightInPitches("timesig.imperfectum")})):r.type==="tempus_imperfectum_prolatio"?c.addRight(new p("timesig.imperfectum2",0,g.getSymbolWidth("timesig.imperfectum2"),6,{thickness:g.symbolHeightInPitches("timesig.imperfectum2")})):r.type==="tempus_perfectum"?c.addRight(new p("timesig.perfectum",0,g.getSymbolWidth("timesig.perfectum"),6,{thickness:g.symbolHeightInPitches("timesig.perfectum")})):r.type==="tempus_perfectum_prolatio"?c.addRight(new p("timesig.perfectum2",0,g.getSymbolWidth("timesig.perfectum2"),6,{thickness:g.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",r);return c};return Vt=o,Vt}var Yt,Da;function Os(){if(Da)return Yt;Da=1;var T=function(g,p,o){this.type="DynamicDecoration",this.anchor=g,this.dec=p,o==="below"?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0};return Yt=T,Yt}var Rt,za;function Hs(){if(za)return Rt;za=1;var T=function(g,p,o,r){this.type="CrescendoElem",this.anchor1=g,this.anchor2=p,this.dir=o,r==="above"?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0};return Rt=T,Rt}var Wt,Ia;function js(){if(Ia)return Wt;Ia=1;var T=function(g,p){this.type="GlissandoElem",this.anchor1=g,this.anchor2=p};return Wt=T,Wt}var Gt,Va;function Ri(){if(Va)return Gt;Va=1;var T=function(g){this.type="TieElem",this.anchor1=g.anchor1,this.anchor2=g.anchor2,g.isGrace&&(this.isGrace=!0),g.fixedY&&(this.fixedY=!0),g.stemDir&&(this.stemDir=g.stemDir),g.voiceNumber!==void 0&&(this.voiceNumber=g.voiceNumber),g.style!==void 0&&(this.dotted=!0),this.internalNotes=[]};return T.prototype.addInternalNote=function(g){this.internalNotes.push(g)},T.prototype.setEndAnchor=function(g){this.anchor2=g,this.anchor1?(this.top=Math.max(this.anchor1.pitch,this.anchor2.pitch)+4,this.bottom=Math.min(this.anchor1.pitch,this.anchor2.pitch)-4):(this.top=this.anchor2.pitch+4,this.bottom=this.anchor2.pitch-4)},T.prototype.setStartX=function(g){this.startLimitX=g},T.prototype.setEndX=function(g){this.endLimitX=g},T.prototype.setHint=function(){this.hint=!0},T.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var g;this.anchor1?g=this.anchor1.pitch:this.anchor2?g=this.anchor2.pitch:g=14,this.anchor1&&this.anchor1.stemDir==="down"&&this.anchor2&&this.anchor2.stemDir==="down"?this.above=!0:this.anchor1&&this.anchor1.stemDir==="up"&&this.anchor2&&this.anchor2.stemDir==="up"?this.above=!1:this.anchor1&&this.anchor2?this.above=g>=6:this.anchor1?this.above=this.anchor1.stemDir==="down":this.anchor2?this.above=this.anchor2.stemDir==="down":this.above=g>=6}},T.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var g=!1;this.anchor1&&this.anchor1.stemDir==="down"&&(g=!0),this.anchor2&&this.anchor2.stemDir==="down"&&(g=!0);for(var p=0;p<this.internalNotes.length;p++){var o=this.internalNotes[p];o.stemDir==="down"&&(g=!0)}this.above=g}},T.prototype.calcX=function(g,p){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.anchor2?this.startX=this.anchor2.x-20:this.startX=g,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=p},T.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0},T.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&this.anchor1.stemDir==="up"&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var g=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,p=(this.anchor2.highestVert+this.anchor2.pitch)/2;if(this.above&&this.anchor2.stemDir==="up"&&!this.fixedY&&!g&&p<this.startY?(this.endY=p,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&g?this.anchor2.highestVert:this.anchor2.pitch,this.anchor1.scalex===1){var o=!!this.anchor1.parent.beam,r=!!this.anchor2.parent.beam;if(o){var n=this.anchor1.parent===this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1];n||(this.above?this.startY=this.anchor1.parent.fixed.t:this.startY=this.anchor1.parent.fixed.b)}if(r){var c=this.anchor2.parent===this.anchor2.parent.beam.elems[0];c||(this.above?this.endY=this.anchor2.parent.fixed.t:this.endY=this.anchor2.parent.fixed.b)}}}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},T.prototype.avoidCollisionAbove=function(){if(this.above){for(var g=-50,p=0;p<this.internalNotes.length;p++)this.internalNotes[p].highestVert>g&&(g=this.internalNotes[p].highestVert);g>this.startY&&g>this.endY&&(this.startY=this.endY=g-1)}},T.prototype.getYBounds=function(){var g=10,p=1e3;this.isTie?(this.calcTieDirection(),this.calcX(g,p),this.calcTieY()):(this.calcSlurDirection(),this.calcX(g,p),this.calcSlurY());var o,r;return this.above?(r=Math.min(this.startY,this.endY),o=r+3):(o=Math.min(this.startY,this.endY),r=o-3),[o,r]},Gt=T,Gt}var qt,Ya;function Fs(){if(Ya)return qt;Ya=1;var T=Os(),g=Hs(),p=js(),o=Le(),r=Me(),n=Ri(),c=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},s=function(i,t,a,e,h,v,m,x,C){for(var S,j=0;j<t.length;j++){if(t[j]==="staccato"||t[j]==="tenuto"||t[j]==="accent"&&!C){var F="scripts."+t[j];if(t[j]==="accent"&&(F="scripts.sforzato"),S===void 0?S=m==="down"?a+2:x-2:S=m==="down"?S+2:S-2,t[j]==="accent")m==="up"?S--:S++;else switch(S){case 2:case 4:case 6:case 8:case 10:m==="up"?S--:S++;break}a>9&&S++;var b=e/2;o.getSymbolAlign(F)!=="center"&&(b-=o.getSymbolWidth(F)/2),h.addFixedX(new r(F,b,o.getSymbolWidth(F),S))}if(t[j]==="slide"&&h.heads[0]){var M=h.heads[0].pitch;M-=2;var B=new r("",-v-15,0,M-1),A=new r("",-v-5,0,M+1);h.addFixedX(B),h.addFixedX(A),i.addOther(new n({anchor1:B,anchor2:A,fixedY:!0}))}}return S===void 0&&(S=a),{above:S,below:h.bottom}},l=function(i,t,a,e){for(var h=0;h<t.length;h++)switch(t[h]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var v=new T(a,t[h],e);i.addOther(v)}},d=function(i,t,a,e,h){function v(){if(e.heads.length===0)return 10;for(var S=e.heads[0].pitch,j=1;j<e.heads.length;j++)S=Math.max(S,e.heads[j].pitch);return S}function m(){if(e.heads.length===0)return 2;for(var S=e.heads[0].pitch,j=1;j<e.heads.length;j++)S=Math.min(S,e.heads[j].pitch);return S}function x(S,j){var F=h==="down"?m()+1:v()+9;h!=="down"&&j===1&&F--;var b=a/2;b+=h==="down"?-5:3;for(var M=0;M<j;M++)F-=1,e.addFixedX(new r(S,b,o.getSymbolWidth(S),F))}for(var C=0;C<i.length;C++)switch(i[C]){case"/":x("flags.ugrace",1);break;case"//":x("flags.ugrace",2);break;case"///":x("flags.ugrace",3);break;case"////":x("flags.ugrace",4);break}},f=function(i,t,a,e,h,v,m,x){function C(A,P){A==="above"?e.above+=P:e.below-=P}function S(A){var P;return A==="above"?(P=e.above,P<v&&(P=v)):(P=e.below,P>m&&(P=m)),P}function j(A,P,N){var E=S(P),_=2,L=5;a.addFixedX(new r(A,t/2,0,E+_,{type:"decoration",klass:"ornament",thickness:3,anchor:N})),C(P,L)}function F(A,P){var N=t/2;o.getSymbolAlign(A)!=="center"&&(N-=o.getSymbolWidth(A)/2);var E=o.symbolHeightInPitches(A)+1,_=S(P);_=P==="above"?_+E/2:_-E/2,a.addFixedX(new r(A,N,o.getSymbolWidth(A),_,{klass:"ornament",thickness:o.symbolHeightInPitches(A),position:P})),C(P,E)}for(var b={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",trillh:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},M=!1,B=0;B<i.length;B++)switch(i[B]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":j(i[B],h,"middle"),M=!0;break;case"D.C.alcoda":j("D.C. al coda",h,"end"),M=!0;break;case"D.C.alfine":j("D.C. al fine",h,"end"),M=!0;break;case"D.S.alcoda":j("D.S. al coda",h,"end"),M=!0;break;case"D.S.alfine":j("D.S. al fine",h,"end"),M=!0;break;case"fine":j("FINE",h,"middle"),M=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"trillh":case"roll":case"irishroll":case"marcato":case"dmarcato":case"turn":case"uppermordent":case"pralltriller":case"mordent":case"lowermordent":case"downbow":case"upbow":case"fermata":case"breath":case"umarcato":case"coda":case"segno":F(b[i[B]],h),M=!0;break;case"invertedfermata":F(b[i[B]],"below"),M=!0;break;case"mark":a.klass="mark";break;case"accent":x&&(F("scripts.sforzato",h),M=!0);break}return M};function u(i,t,a){for(var e=0;e<i.length;e++)switch(i[e]){case"arpeggio":for(var h=t.abcelem.minpitch-1;h<=t.abcelem.maxpitch;h+=2)t.addExtra(new r("scripts.arpeggio",-o.getSymbolWidth("scripts.arpeggio")*2-a,0,h+2,{klass:"ornament",thickness:o.symbolHeightInPitches("scripts.arpeggio")}));break}}return c.prototype.dynamicDecoration=function(i,t,a,e){for(var h,v,m,x=0;x<t.length;x++)switch(t[x]){case"diminuendo(":this.startDiminuendoX=a,h=void 0;break;case"diminuendo)":h={start:this.startDiminuendoX,stop:a},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=a,v=void 0;break;case"crescendo)":v={start:this.startCrescendoX,stop:a},this.startCrescendoX=void 0;break;case"~(":case"glissando(":this.startGlissandoX=a,m=void 0;break;case"~)":case"glissando)":m={start:this.startGlissandoX,stop:a},this.startGlissandoX=void 0;break}h&&i.addOther(new g(h.start,h.stop,">",e)),v&&i.addOther(new g(v.start,v.stop,"<",e)),m&&i.addOther(new p(m.start,m.stop))},c.prototype.createDecoration=function(i,t,a,e,h,v,m,x,C,S,j){C||(C={ornamentPosition:"above",volumePosition:S?"above":"below",dynamicPosition:S?"above":"below"}),l(i,t,h,C.volumePosition),this.dynamicDecoration(i,t,h,C.dynamicPosition),d(t,a,e,h,m);var F=s(i,t,a,e,h,v,m,x,j);F.above=Math.max(F.above,this.minTop),F.below=Math.min(F.below,x),f(t,e,h,F,C.ornamentPosition,this.minTop,x,j),u(t,h,v)},qt=c,qt}var Xt,Ra;function Ds(){if(Ra)return Xt;Ra=1;var T=function(g,p,o){this.type="EndingElem",this.text=g,this.anchor1=p,this.anchor2=o,this.endingHeightAbove=5,this.pitch=void 0};return Xt=T,Xt}var Kt,Wa;function zs(){if(Wa)return Kt;Wa=1;var T=function(g){for(var p=0,o=0;o<g.voices.length;o++){var r=g.voices[o].staff;g.voices[o].duplicate||(p+=r.top,p+=-r.bottom)}return p};return Kt=T,Kt}var Ut,Ga;function Is(){if(Ga)return Ut;Ga=1;var T=zs(),g=function(p){this.getTextSize=p,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};return g.prototype.setLimit=function(p,o){o.specialY[p]&&(o.staff.specialY[p]?o.staff.specialY[p]=Math.max(o.staff.specialY[p],o.specialY[p]):o.staff.specialY[p]=o.specialY[p])},g.prototype.addVoice=function(p,o,r){var n=this.voices.length;this.voices[n]=p,this.staffs[o]?this.staffs[o].voices.push(n):this.staffs[this.staffs.length]={top:10,bottom:2,lines:r,voices:[n],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},p.staff=this.staffs[o]},g.prototype.setHeight=function(){this.height=T(this)},g.prototype.setWidth=function(p){this.w=p;for(var o=0;o<this.voices.length;o++)this.voices[o].setWidth(p)},g.prototype.setStaffLimits=function(p){p.staff.top=Math.max(p.staff.top,p.top),p.staff.bottom=Math.min(p.staff.bottom,p.bottom),this.setLimit("tempoHeightAbove",p),this.setLimit("partHeightAbove",p),this.setLimit("volumeHeightAbove",p),this.setLimit("dynamicHeightAbove",p),this.setLimit("endingHeightAbove",p),this.setLimit("chordHeightAbove",p),this.setLimit("lyricHeightAbove",p),this.setLimit("lyricHeightBelow",p),this.setLimit("chordHeightBelow",p),this.setLimit("volumeHeightBelow",p),this.setLimit("dynamicHeightBelow",p)},Ut=g,Ut}var $t,qa;function Vs(){if(qa)return $t;qa=1;var T=je(),g=Me(),p=function(o,r,n){this.type="TempoElement",this.tempo=o,this.tempo.type="tempo",this.tuneNumber=r,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(n,o,r))};return p.prototype.setX=function(o){this.x=o},p.prototype.createNote=function(o,r,n){var c=.75,s=r.duration[0],l=new T(r,s,1,"tempo",n),d,f,u;s<=1/32?(u="noteheads.quarter",f="flags.u32nd",d=0):s<=1/16?(u="noteheads.quarter",f="flags.u16th",d=0):s<=3/32?(u="noteheads.quarter",f="flags.u16nd",d=1):s<=1/8?(u="noteheads.quarter",f="flags.u8th",d=0):s<=3/16?(u="noteheads.quarter",f="flags.u8th",d=1):s<=1/4?(u="noteheads.quarter",d=0):s<=3/8?(u="noteheads.quarter",d=1):s<=1/2?(u="noteheads.half",d=0):s<=3/4?(u="noteheads.half",d=1):s<=1?(u="noteheads.whole",d=0):s<=1.5?(u="noteheads.whole",d=1):s<=2?(u="noteheads.dbl",d=0):(u="noteheads.dbl",d=1);var i=o(l,u,{verticalPos:0},{dir:"up",flag:f,dot:d,scale:c}),t=i.notehead;l.addHead(t);var a;if(u!=="noteheads.whole"&&u!=="noteheads.dbl"){var e=.3333333333333333*c,h=5*c,v=t.dx+t.w,m=-.6;a=new g(null,v,0,e,{type:"stem",pitch2:h,linewidth:m}),l.addRight(a)}return l},$t=p,$t}var Qt,Xa;function Ys(){if(Xa)return Qt;Xa=1;var T=function(g,p,o){this.type="TripletElem",this.anchor1=p,this.number=g,this.durationClass=("d"+Math.round(p.parent.durationClass*1e3)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=o.flatBeams};return T.prototype.isClosed=function(){return!!this.anchor2},T.prototype.middleNote=function(g){this.middleElems.push(g)},T.prototype.setCloseAnchor=function(g){this.anchor2=g,(!this.anchor1.parent.beam||this.anchor1.stemDir==="up")&&(this.endingHeightAbove=4)},Qt=T,Qt}var Jt,Ka;function Rs(){if(Ka)return Jt;Ka=1;function T(p){switch(p){case"B#":return"H#";case"B♯":return"H♯";case"B":return"H";case"Bb":return"B";case"B♭":return"B"}return p}function g(p,o,r){var n=p.split(`
|
|
27
|
+
`);for(let c=0;c<n.length;c++){let s=n[c].match(/^([ABCDEFG][♯♭]?)?([^\/]+)?(\/([ABCDEFG][#b♯♭]?))?/);if(!s)continue;let l=s[1]||"",d=s[2]||"",f=s[4]||"";r&&(l=T(l),f=T(f));const u=o?"":"",i=f?"/"+f:"";n[c]=[l,d,i].join(u)}return n.join(`
|
|
28
|
+
`)}return Jt=g,Jt}var Zt,Ua;function Ws(){if(Ua)return Zt;Ua=1;var T=Me(),g=_e();const p=Rs();var o=function(n,c,s,l,d,f,u,i){for(var t=0;t<s.chord.length;t++){var a=s.chord[t].position,e=s.chord[t].rel_position,h=a==="left"||a==="right"||a==="below"||a==="above"||!!e,v,m;h?(v="annotationfont",m="abcjs-annotation"):(v="gchordfont",m="abcjs-chord");var x=n.attr(v,m),C=s.chord[t].name,S;if(typeof C=="string")S=r(C,a,e,h,v,m,x,n,c,s,l,d,f,u,i),l=S.roomTaken,d=S.roomTakenRight;else for(var j=0;j<C.length;j++)S=r(C[j].text,a,e,h,v,m,x,n,c,s,l,d,f,u,i),l=S.roomTaken,d=S.roomTakenRight}return{roomTaken:l,roomTakenRight:d}};function r(n,c,s,l,d,f,u,i,t,a,e,h,v,m,x){for(var C=n.split(`
|
|
29
|
+
`),S=C.length-1;S>=0;S--){var j=C[S],F=0,b;l||(j=p(j,m,x));var M=i.calc(j,d,f),B=M.width,A=M.height/g.STEP;switch(c){case"left":e+=B+7,F=-e,b=a.averagepitch,t.addExtra(new T(j,F,B+4,b,{type:"text",height:A,dim:u,position:"left"}));break;case"right":h+=4,F=h,b=a.averagepitch,t.addRight(new T(j,F,B+4,b,{type:"text",height:A,dim:u,position:"right"}));break;case"below":t.addRight(new T(j,0,0,void 0,{type:"text",position:"below",height:A,dim:u,realWidth:B}));break;case"above":t.addRight(new T(j,0,0,void 0,{type:"text",position:"above",height:A,dim:u,realWidth:B}));break;default:if(s){var P=s.y+3*g.STEP;t.addRight(new T(j,F+s.x,0,a.minpitch+P/g.STEP,{position:"relative",type:"text",height:A,dim:u}))}else{var N="above";a.positioning&&a.positioning.chordPosition&&(N=a.positioning.chordPosition),N!=="hidden"&&t.addCentered(new T(j,v/2,B,void 0,{type:"chord",position:N,height:A,dim:u,realWidth:B}))}}}return{roomTaken:e,roomTakenRight:h}}return Zt=o,Zt}var e0,$a;function Gs(){if($a)return e0;$a=1;var T=je(),g=Ms(),p=As(),o=Ns(),r=Bs(),n=Ps(),c=Ls(),s=Fs(),l=Ds(),d=Le(),f=Me(),u=_e(),i=Is(),t=Vs(),a=Ri(),e=Ys(),h=Fi(),v=Ws(),m=Oi(),x=Ne(),C=function(E){var _=0;return E.duration&&(_=E.duration),_},S=!1,j={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},triangle:{"-1":"noteheads.triangle.quarter",0:"noteheads.triangle.quarter",1:"noteheads.triangle.quarter",2:"noteheads.triangle.quarter",3:"noteheads.triangle.quarter",4:"noteheads.triangle.quarter",5:"noteheads.triangle.quarter",6:"noteheads.triangle.quarter",7:"noteheads.triangle.quarter",nostem:"noteheads.triangle.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}},F=function(E,_,L){this.decoration=new s,this.getTextSize=E,this.tuneNumber=_,this.isBagpipes=L.bagpipes,this.flatBeams=L.flatbeams,this.graceSlurs=L.graceSlurs,this.percmap=L.percmap,this.initialClef=L.initialClef,this.jazzchords=!!L.jazzchords,this.accentAbove=!!L.accentAbove,this.germanAlphabet=!!L.germanAlphabet,this.reset()};F.prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.voiceColor=void 0,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.colorByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},F.prototype.setStemHeight=function(E){this.stemHeight=Math.round(E*10/u.STEP)/10},F.prototype.getCurrentVoiceId=function(E,_){return"s"+E+"v"+_},F.prototype.pushCrossLineElems=function(E,_){this.slursbyvoice[this.getCurrentVoiceId(E,_)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(E,_)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(E,_)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(E,_)]=this.voiceScale,this.voiceColor&&(this.colorByVoice[this.getCurrentVoiceId(E,_)]=this.voiceColor)},F.prototype.popCrossLineElems=function(E,_){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(E,_)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(E,_)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(E,_)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(E,_)],this.voiceScale===void 0&&(this.voiceScale=1),this.voiceColor=this.colorByVoice[this.getCurrentVoiceId(E,_)]},F.prototype.containsLyrics=function(E){for(var _=0;_<E.length;_++)for(var L=0;L<E[_].voices.length;L++)for(var D=0;D<E[_].voices[L].length;D++){var H=E[_].voices[L][D];if(H.lyric){(!H.positioning||H.positioning.vocalPosition==="below")&&(this.hasVocals=!0);return}}},F.prototype.createABCLine=function(E,_,L){this.minY=2,this.containsLyrics(E);var D=new i(this.getTextSize);this.tempoSet=!1;for(var H=0;H<E.length;H++)S&&this.restoreState(),S=!1,this.createABCStaff(D,E[H],_,H,L);return D},F.prototype.createABCStaff=function(E,_,L,D,H){E.getTextSize.updateFonts(_);for(var y=0;y<_.voices.length;y++){var k=new h(y,_.voices.length);y===0?(k.barfrom=_.connectBarLines==="start"||_.connectBarLines==="continue",k.barto=_.connectBarLines==="continue"||_.connectBarLines==="end"):k.duplicate=!0,_.title&&_.title[y]&&(k.header=_.title[y].replace(/\\n/g,`
|
|
30
|
+
`),k.headerPosition=6+E.getTextSize.baselineToCenter(k.header,"voicefont","staff-extra voice-name",y,_.voices.length)/u.STEP),_.clef&&_.clef.type==="perc"&&(k.isPercussion=!0);var w=(!this.initialClef||H===0)&&o(_.clef,this.tuneNumber);w&&(y===0&&_.barNumber&&this.addMeasureNumber(_.barNumber,w),k.addChild(w),this.startlimitelem=w);var O=r(_.key,this.tuneNumber);if(O&&(k.addChild(O),this.startlimitelem=O),_.meter){_.meter.type==="specified"?this.measureLength=_.meter.value[0].num/_.meter.value[0].den:this.measureLength=1;var z=c(_.meter,this.tuneNumber);k.addChild(z),this.startlimitelem=z}k.duplicate&&(k.children=[]);var V=_.clef.stafflines||_.clef.stafflines===0?_.clef.stafflines:5;E.addVoice(k,D,V);var I=V===1;this.createABCVoice(_.voices[y],L,D,y,I,k),E.setStaffLimits(k),y===0&&(_.brace==="start"||!E.brace&&_.brace?(E.brace||(E.brace=[]),E.brace.push(new p(k,"brace"))):_.brace==="end"&&E.brace?E.brace[E.brace.length-1].setBottomStaff(k):_.brace==="continue"&&E.brace&&E.brace[E.brace.length-1].continuing(k),_.bracket==="start"||!E.bracket&&_.bracket?(E.bracket||(E.bracket=[]),E.bracket.push(new p(k,"bracket"))):_.bracket==="end"&&E.bracket?E.bracket[E.bracket.length-1].setBottomStaff(k):_.bracket==="continue"&&E.bracket&&E.bracket[E.bracket.length-1].continuing(k))}};function b(E,_){var L=E[_];if(L.el_type!=="note"||!L.startBeam||L.endBeam)return{count:1,elem:L};for(var D=[];_<E.length&&E[_].el_type==="note"&&(D.push(E[_]),!E[_].endBeam);)_++;return{count:D.length,elem:D}}F.prototype.createABCVoice=function(E,_,L,D,H,y){this.popCrossLineElems(L,D),this.stemdir=this.isBagpipes?"down":null,this.abcline=E,this.partstartelem&&(this.partstartelem=new l("",null,null),y.addOther(this.partstartelem));var k=y.voicetotal<2?-1:y.voicenumber;for(var w in this.slurs)this.slurs.hasOwnProperty(w)&&(this.slurs[w]=new a({force:this.slurs[w].force,voiceNumber:k,stemDir:this.slurs[w].stemDir,style:this.slurs[w].dotted}),S&&this.slurs[w].setHint(),y.addOther(this.slurs[w]));for(var O=0;O<this.ties.length;O++)this.ties[O]=new a({force:this.ties[O].force,stemDir:this.ties[O].stemDir,voiceNumber:k,style:this.ties[O].dotted}),S&&this.ties[O].setHint(),y.addOther(this.ties[O]);for(var z=0;z<this.abcline.length;z++)M(this.abcline[z]),this.minY=Math.min(this.abcline[z].minpitch,this.minY);for(var V=L===0,I=0;I<this.abcline.length;){var K=b(this.abcline,I),Q=this.createABCElement(V,H,y,K.elem);if(Q)for(O=0;O<Q.length;O++){if(!this.tempoSet&&_&&!_.suppress){this.tempoSet=!0;var G=new T(_,0,0,"tempo",this.tuneNumber,{});G.addFixedX(new t(_,this.tuneNumber,n)),y.addChild(G)}y.addChild(Q[O])}I+=K.count}this.pushCrossLineElems(L,D)},F.prototype.saveState=function(){this.tiesSave=x.cloneArray(this.ties),this.slursSave=x.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=x.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=x.cloneHashOfArrayOfHash(this.tiesbyvoice)},F.prototype.restoreState=function(){this.ties=x.cloneArray(this.tiesSave),this.slurs=x.cloneHashOfHash(this.slursSave),this.slursbyvoice=x.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=x.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},F.prototype.createABCElement=function(E,_,L,D){var H=[];switch(D.el_type){case void 0:H=this.createBeam(_,L,D);break;case"note":H[0]=this.createNote(D,!1,_,L),this.triplet&&this.triplet.isClosed()&&(L.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":H[0]=this.createBarLine(L,D,E),L.duplicate&&H.length>0&&(H[0].invisible=!0);break;case"meter":H[0]=c(D,this.tuneNumber),this.startlimitelem=H[0],L.duplicate&&H.length>0&&(H[0].invisible=!0);break;case"clef":if(H[0]=o(D,this.tuneNumber),!H[0])return null;L.duplicate&&H.length>0&&(H[0].invisible=!0);break;case"key":var y=r(D,this.tuneNumber);y&&(H[0]=y,this.startlimitelem=H[0]),L.duplicate&&H.length>0&&(H[0].invisible=!0);break;case"stem":this.stemdir=D.direction==="auto"?void 0:D.direction;break;case"part":var k=new T(D,0,0,"part",this.tuneNumber),w=this.getTextSize.calc(D.title,"partsfont","part");k.addFixedX(new f(D.title,0,0,void 0,{type:"part",height:w.height/u.STEP})),H[0]=k;break;case"tempo":var O=new T(D,0,0,"tempo",this.tuneNumber);O.addFixedX(new t(D,this.tuneNumber,n)),H[0]=O;break;case"style":D.head==="normal"?delete this.style:this.style=D.head;break;case"hint":S=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=D.size;break;case"color":this.voiceColor=D.color,L.color=this.voiceColor;break;default:var z=new T(D,0,0,"unsupported",this.tuneNumber);z.addFixed(new f("element type "+D.el_type,0,0,void 0,{type:"debug"})),H[0]=z}return H};function M(E){if(E.pitches){B(E);for(var _=0,L=0;L<E.pitches.length;L++)_+=E.pitches[L].verticalPos;E.averagepitch=_/E.pitches.length,E.minpitch=E.pitches[0].verticalPos,E.maxpitch=E.pitches[E.pitches.length-1].verticalPos}}F.prototype.createBeam=function(E,_,L){var D=[],H=new g(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,L[0]);S&&H.setHint();for(var y=0;y<L.length;y++)H.runningDirection(L[y]);H.setStemDirection();var k=this.stemdir;for(this.stemdir=H.stemsUp?"up":"down",y=0;y<L.length;y++){var w=L[y],O=this.createNote(w,!0,E,_);D.push(O),H.add(O),this.triplet&&this.triplet.isClosed()&&(_.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return H.calcDir(),_.addBeam(H),this.stemdir=k,D};var B=function(E){var _;do{_=!0;for(var L=0;L<E.pitches.length-1;L++)if(E.pitches[L].pitch>E.pitches[L+1].pitch){_=!1;var D=E.pitches[L];E.pitches[L]=E.pitches[L+1],E.pitches[L+1]=D}}while(!_)},A=function(E,_,L,D,H,y,k,w,O){for(var z=L;z>11;z--)z%2===0&&!D&&E.addFixed(new f(null,w,(H+4)*O,z,{type:"ledger"}));for(z=_;z<1;z++)z%2===0&&!D&&E.addFixed(new f(null,w,(H+4)*O,z,{type:"ledger"}));for(z=0;z<y.length;z++){var V=H;k==="down"&&(V=-V),E.addFixed(new f(null,V+w,(H+4)*O,y[z],{type:"ledger"}))}};F.prototype.addGraceNotes=function(E,_,L,D,H,y,k){var w=.6,O=3.5/5;H=Math.round(H*O);var z=null,V;E.gracenotes.length>1&&(z=new g(H,"grace",y),S&&z.setHint(),z.mainNote=L);var I,K=[];for(I=E.gracenotes.length-1;I>=0;I--)k+=10,K[I]=k,E.gracenotes[I].accidental&&(k+=7);for(I=0;I<E.gracenotes.length;I++){var Q=E.gracenotes[I].verticalPos;V=z?null:j.uflags[y?5:3];var G=[],ee=n(L,"noteheads.quarter",E.gracenotes[I],{dir:"up",headx:-K[I],extrax:-K[I],flag:V,scale:w*this.voiceScale,accidentalSlot:G});ee.notehead.highestVert=ee.notehead.pitch+H;var te=ee.notehead;if(this.addSlursAndTies(L,E.gracenotes[I],te,_,"up",!0),L.addExtra(te),E.gracenotes[I].acciaccatura){var ne=E.gracenotes[I].verticalPos+7*w,X=z?5:6;L.addRight(new f("flags.ugrace",-K[I]+X,0,ne,{scalex:w,scaley:w}))}if(z){var ae=E.gracenotes[I].duration/2;y&&(ae/=2);var $={heads:[te],abcelem:{averagepitch:Q,minpitch:Q,maxpitch:Q,duration:ae}};z.add($)}else{var se=Q+.3333333333333333*w,ce=Q+7*w,fe=te.dx+te.w,le=-.6;L.addExtra(new f(null,fe,0,se,{type:"stem",pitch2:ce,linewidth:le}))}A(L,Q,Q,!1,d.getSymbolWidth("noteheads.quarter"),[],!0,te.dx-1,.6);var ve=E.rest&&(E.rest.type==="spacer"||E.rest.type==="invisible");I===0&&!y&&this.graceSlurs&&!ve&&_.addOther(new a({anchor1:te,anchor2:D,isGrace:!0}))}return z&&(z.calcDir(),_.addBeam(z)),k};function P(E,_,L,D,H,y,k,w,O){var z,V=7,I,K,Q;switch(H&&(y==="down"&&(V=3),y==="up"&&(V=11)),k&&(L<.5||L<1?V=7:V=5),_.rest.type){case"whole":z=j.rest[0],_.averagepitch=V,_.minpitch=V,_.maxpitch=V,D=0;break;case"rest":_.style==="rhythm"?z=j.rhythm[-w]:z=j.rest[-w],_.averagepitch=V,_.minpitch=V,_.maxpitch=V;break;case"invisible":case"invisible-multimeasure":case"spacer":z="",_.averagepitch=V,_.minpitch=V,_.maxpitch=V;break;case"multimeasure":z=j.rest.multi,_.averagepitch=V,_.minpitch=V,_.maxpitch=V,D=0;var G=d.getSymbolWidth(z);E.addHead(new f(z,G,G*2,7));var ee=new f(""+_.rest.text,G,G,16,{type:"multimeasure-text"});E.addExtra(ee)}if(_.rest.type.indexOf("multimeasure")<0&&_.rest.type!=="invisible"){var te=n(E,z,{verticalPos:V},{dot:D,scale:O});I=te.notehead,I&&(E.addHead(I),K=te.accidentalshiftx,Q=te.dotshiftx)}return{noteHead:I,roomTaken:K,roomTakenRight:Q}}function N(E,_){for(var L=0;L<E.length;L++)if(JSON.stringify(E[L])===JSON.stringify(_))return;E.push(_)}return F.prototype.addNoteToAbcElement=function(E,_,L,D,H,y,k,w,O){var z=0,V,I=0,K=0,Q,G,ee=[],te=[],ne=0,X=_.averagepitch>=6?"down":"up";D&&(X=D),H=_.style?_.style:H,(!H||H==="normal")&&(H="note");var ae;y?ae=j[H].nostem:ae=j[H][-k],ae||console.log("noteSymbol:",H,k,y);var $;for($=X==="down"?_.pitches.length-2:1;X==="down"?$>=0:$<_.pitches.length;$=X==="down"?$-1:$+1){var se=_.pitches[X==="down"?$+1:$-1],ce=_.pitches[$],fe=X==="down"?se.pitch-ce.pitch:ce.pitch-se.pitch;fe<=1&&!se.printer_shift&&(ce.printer_shift=fe?"different":"same",(ce.verticalPos>11||ce.verticalPos<1)&&ee.push(ce.verticalPos-ce.verticalPos%2),X==="down"?I=d.getSymbolWidth(ae)+2:z=d.getSymbolWidth(ae)+2)}var le=_.pitches.length;for($=0;$<_.pitches.length;$++){if(!w){var ve;X==="down"&&$!==0||X==="up"&&$!==le-1?ve=null:ve=j[X==="down"?"dflags":"uflags"][-k]}var ge;if(_.pitches[$].style)ge=j[_.pitches[$].style][-k];else if(O.isPercussion&&this.percmap){ge=ae;var ye=this.percmap[m(_.pitches[$])];ye&&ye.noteHead&&j[ye.noteHead]&&(ge=j[ye.noteHead][-k])}else ge=ae;_.pitches[$].highestVert=_.pitches[$].verticalPos;var R=(D==="up"||X==="up")&&$===0,q=(D==="down"||X==="down")&&$===le-1;if(R||q){if((_.startSlur||le===1)&&(_.pitches[$].highestVert=_.pitches[le-1].verticalPos,C(_)<1&&(D==="up"||X==="up")&&(_.pitches[$].highestVert+=6)),_.startSlur)for(_.pitches[$].startSlur||(_.pitches[$].startSlur=[]),G=0;G<_.startSlur.length;G++)N(_.pitches[$].startSlur,_.startSlur[G]);if(_.endSlur)for(_.pitches[$].highestVert=_.pitches[le-1].verticalPos,C(_)<1&&(D==="up"||X==="up")&&(_.pitches[$].highestVert+=6),_.pitches[$].endSlur||(_.pitches[$].endSlur=[]),G=0;G<_.endSlur.length;G++)N(_.pitches[$].endSlur,_.endSlur[G])}var Y=!w&&k<=-1,W=n(E,ge,_.pitches[$],{dir:X,extrax:-I,flag:ve,dot:L,dotshiftx:z,scale:this.voiceScale,accidentalSlot:te,shouldExtendStem:!D,printAccidentals:!O.isPercussion});ne=Math.max(d.getSymbolWidth(ge),ne),E.extraw-=W.extraLeft,V=W.notehead,V&&(this.addSlursAndTies(E,_.pitches[$],V,O,Y?X:null,!1),_.gracenotes&&_.gracenotes.length>0&&(V.bottom=V.bottom-1),E.addHead(V)),I+=W.accidentalshiftx,K=Math.max(K,W.dotshiftx)}if(Y){var U=Math.round(70*this.voiceScale)/10,J=X==="down"?_.minpitch-U:_.minpitch+1/3;J>6&&!D&&(J=6);var re=X==="down"?_.maxpitch-1/3:_.maxpitch+U;re<6&&!D&&(re=6);var he=X==="down"||E.heads.length===0?0:E.heads[0].w,Z=X==="down"?1:-1;V&&V.c==="noteheads.slash.quarter"&&(X==="down"?re-=1:J+=1),V&&V.c==="noteheads.triangle.quarter"&&(X==="down"?re-=.7:J-=1.2),E.addRight(new f(null,he,0,J,{type:"stem",pitch2:re,linewidth:Z,bottom:J-1})),Q=Math.min(J,re)}return{noteHead:V,roomTaken:I,roomTakenRight:K,min:Q,additionalLedgers:ee,dir:X,symbolWidth:ne}},F.prototype.addLyric=function(E,_){var L="";_.lyric.forEach(function(y){var k=y.divider===" "?"":y.divider;L+=y.syllable+k+`
|
|
31
|
+
`});var D=this.getTextSize.calc(L,"vocalfont","lyric"),H=_.positioning?_.positioning.vocalPosition:"below";E.addCentered(new f(L,0,D.width,void 0,{type:"lyric",position:H,height:D.height/u.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},F.prototype.createNote=function(E,_,L,D){var H=null,y=0,k=0,w=0,O=[],z,V=C(E),I=!1;V===0&&(I=!0,V=.25,_=!0);for(var K=Math.floor(Math.log(V)/Math.log(2)),Q=0,G=Math.pow(2,K),ee=G/2;G<V;Q++,G+=ee,ee/=2);E.startTriplet&&(this.tripletmultiplier=E.tripletMultiplier);var te=V*this.tripletmultiplier;E.rest&&E.rest.type==="multimeasure"&&(te=1),E.rest&&E.rest.type==="invisible-multimeasure"&&(te=this.measureLength*E.rest.text);var ne=E.rest?"rest":"note",X=new T(E,te,1,ne,this.tuneNumber,{durationClassOveride:E.duration*this.tripletmultiplier});if(S&&X.setHint(),E.rest){this.measureLength===V&&E.rest.type!=="invisible"&&E.rest.type!=="spacer"&&E.rest.type.indexOf("multimeasure")<0&&(E.rest.type="whole");var ae=P(X,E,V,Q,D.voicetotal>1,this.stemdir,L,K,this.voiceScale);H=ae.noteHead,y=ae.roomTaken,k=ae.roomTakenRight}else{var $=this.addNoteToAbcElement(X,E,Q,this.stemdir,this.style,I,K,_,D);$.min!==void 0&&(this.minY=Math.min($.min,this.minY)),H=$.noteHead,y=$.roomTaken,k=$.roomTakenRight,O=$.additionalLedgers,z=$.dir,w=$.symbolWidth}if(E.lyric!==void 0&&this.addLyric(X,E),E.gracenotes!==void 0&&(y+=this.addGraceNotes(E,D,X,H,this.stemHeight*this.voiceScale,this.isBagpipes,y)),E.decoration){var se=_&&z!=="up"?Math.min(-3,X.bottom-6):X.bottom;this.decoration.createDecoration(D,E.decoration,X.top,H?H.w:0,X,y,z,se,E.positioning,this.hasVocals,this.accentAbove)}if(E.barNumber&&X.addFixed(new f(E.barNumber,-10,0,0,{type:"barNumber"})),A(X,E.minpitch,E.maxpitch,E.rest,w,O,z,-2,1),E.chord!==void 0){var ce=v(this.getTextSize,X,E,y,k,w,this.jazzchords,this.germanAlphabet);y=ce.roomTaken,k=ce.roomTakenRight}return E.startTriplet&&(this.triplet=new e(E.startTriplet,H,{flatBeams:this.flatBeams})),E.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(H),this.triplet&&!E.startTriplet&&!E.endTriplet&&!(E.rest&&E.rest.type==="spacer")&&this.triplet.middleNote(H),X},F.prototype.addSlursAndTies=function(E,_,L,D,H,y){if(_.endTie&&this.ties.length>0){for(var k=!1,w=0;w<this.ties.length;w++)if(this.ties[w].anchor1&&this.ties[w].anchor1.pitch===L.pitch){this.ties[w].setEndAnchor(L),D.setRange(this.ties[w]),this.ties.splice(w,1),k=!0;break}k||(this.ties[0].setEndAnchor(L),D.setRange(this.ties[0]),this.ties.splice(0,1))}var O=D.voicetotal<2?-1:D.voicenumber;if(_.startTie){var z=new a({anchor1:L,force:this.stemdir==="down"||this.stemdir==="up",stemDir:this.stemdir,isGrace:y,voiceNumber:O,style:_.startTie.style});S&&z.setHint(),this.ties[this.ties.length]=z,D.addOther(z),E.startTie=!0}var V,I;if(_.endSlur)for(var K=0;K<_.endSlur.length;K++)I=_.endSlur[K],this.slurs[I]?(V=this.slurs[I],V.setEndAnchor(L),D.setRange(V),delete this.slurs[I]):(V=new a({anchor2:L,stemDir:this.stemdir,voiceNumber:O}),S&&V.setHint(),D.addOther(V)),this.startlimitelem&&V.setStartX(this.startlimitelem);else if(!y)for(var Q in this.slurs)this.slurs.hasOwnProperty(Q)&&this.slurs[Q].addInternalNote(L);if(_.startSlur)for(K=0;K<_.startSlur.length;K++)I=_.startSlur[K].label,V=new a({anchor1:L,stemDir:this.stemdir,voiceNumber:O,style:_.startSlur[K].style}),S&&V.setHint(),this.slurs[I]=V,D.addOther(V)},F.prototype.addMeasureNumber=function(E,_){var L=this.getTextSize.calc(E,"measurefont","bar-number"),D=0;_.isClef&&(D+=L.width/2);var H=L.width>10&&_.abcelem.type==="treble"?13.5:11;_.addFixed(new f(E,D,L.width,H+L.height/u.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},F.prototype.createBarLine=function(E,_,L){var D=new T(_,0,10,"bar",this.tuneNumber),H=null,y=0;_.barNumber&&this.addMeasureNumber(_.barNumber,D);var k=_.type==="bar_right_repeat"||_.type==="bar_dbl_repeat",w=_.type!=="bar_left_repeat"&&_.type!=="bar_thick_thin"&&_.type!=="bar_invisible",O=_.type==="bar_right_repeat"||_.type==="bar_dbl_repeat"||_.type==="bar_left_repeat"||_.type==="bar_thin_thick"||_.type==="bar_thick_thin",z=_.type==="bar_left_repeat"||_.type==="bar_thick_thin"||_.type==="bar_thin_thin"||_.type==="bar_dbl_repeat",V=_.type==="bar_left_repeat"||_.type==="bar_dbl_repeat";if(k||V){for(var I in this.slurs)this.slurs.hasOwnProperty(I)&&this.slurs[I].setEndX(D);this.startlimitelem=D}if(k&&(D.addRight(new f("dots.dot",y,1,7)),D.addRight(new f("dots.dot",y,1,5)),y+=6),w&&(H=new f(null,y,1,2,{type:"bar",pitch2:10,linewidth:.6}),D.addRight(H)),_.type==="bar_invisible"&&(H=new f(null,y,1,2,{type:"none",pitch2:10,linewidth:.6}),D.addRight(H)),_.decoration&&this.decoration.createDecoration(E,_.decoration,12,O?3:1,D,0,"down",2,_.positioning,this.hasVocals,this.accentAbove),O&&(y+=4,H=new f(null,y,4,2,{type:"bar",pitch2:10,linewidth:4}),D.addRight(H),y+=5),this.partstartelem&&_.endEnding&&(this.partstartelem.anchor2=H,this.partstartelem=null),z&&(y+=3,H=new f(null,y,1,2,{type:"bar",pitch2:10,linewidth:.6}),D.addRight(H)),V&&(y+=3,D.addRight(new f("dots.dot",y,1,7)),D.addRight(new f("dots.dot",y,1,5))),_.startEnding&&L&&E.voicenumber===0){var K=this.getTextSize.calc(_.startEnding,"repeatfont","").width;D.minspacing+=K+10,this.partstartelem=new l(_.startEnding,H,null),E.addOther(this.partstartelem)}return D.extraw-=5,_.chord!==void 0&&v(this.getTextSize,D,_,0,0,0,!1,this.germanAlphabet),D},e0=F,e0}var t0,Qa;function qs(){if(Qa)return t0;Qa=1;var T="http://www.w3.org/2000/svg";function g(c){this.svg=n(),this.currentGroup=[],c.appendChild(this.svg)}g.prototype.clear=function(){if(this.svg){var c=this.svg.parentNode;this.svg=n(),this.currentGroup=[],c&&(c.innerHTML="",c.appendChild(this.svg))}},g.prototype.setTitle=function(c){var s=document.createElement("title"),l=document.createTextNode(c);s.appendChild(l),this.svg.insertBefore(s,this.svg.firstChild)},g.prototype.setResponsiveWidth=function(c,s){if(this.svg.setAttribute("viewBox","0 0 "+c+" "+s),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var l=this.svg.parentNode.getAttribute("class");l?l.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",l+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var d=s/c*100;this.svg.parentNode.style["padding-bottom"]=d+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},g.prototype.setSize=function(c,s){this.svg.setAttribute("width",c),this.svg.setAttribute("height",s)},g.prototype.setAttribute=function(c,s){this.svg.setAttribute(c,s)},g.prototype.setScale=function(c){c!==1?(this.svg.style.transform="scale("+c+","+c+")",this.svg.style["-ms-transform"]="scale("+c+","+c+")",this.svg.style["-webkit-transform"]="scale("+c+","+c+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},g.prototype.insertStyles=function(c){var s=document.createElementNS(T,"style");s.textContent=c,this.svg.insertBefore(s,this.svg.firstChild)},g.prototype.setParentStyles=function(c){for(var s in c)c.hasOwnProperty(s)&&this.svg.parentNode&&(this.svg.parentNode.style[s]=c[s]);if(this.dummySvg){var l=document.querySelector("body");l.removeChild(this.dummySvg),this.dummySvg=null}};function p(c,s,l){var d=l-c;return"M "+c+" "+s+" l "+d+" 0 l 0 1 l "+-d+" 0 z "}function o(c,s,l){var d=l-s;return"M "+c+" "+s+" l 0 "+d+" l 1 0 l 0 "+-d+" z "}g.prototype.rect=function(c){var s=[],l=c.x,d=c.y,f=c.x+c.width,u=c.y+c.height;return s.push(p(l,d,f)),s.push(p(l,u,f)),s.push(o(f,d,u)),s.push(o(l,u,d)),this.path({path:s.join(" "),stroke:"none","data-name":c["data-name"]})},g.prototype.dottedLine=function(c){var s=document.createElementNS(T,"line");s.setAttribute("x1",c.x1),s.setAttribute("x2",c.x2),s.setAttribute("y1",c.y1),s.setAttribute("y2",c.y2),s.setAttribute("stroke",c.stroke),s.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(s,this.svg.firstChild)},g.prototype.rectBeneath=function(c){var s=document.createElementNS(T,"rect");s.setAttribute("x",c.x),s.setAttribute("width",c.width),s.setAttribute("y",c.y),s.setAttribute("height",c.height),c.stroke&&s.setAttribute("stroke",c.stroke),c["stroke-opacity"]&&s.setAttribute("stroke-opacity",c["stroke-opacity"]),c.fill&&s.setAttribute("fill",c.fill),c["fill-opacity"]&&s.setAttribute("fill-opacity",c["fill-opacity"]),this.svg.insertBefore(s,this.svg.firstChild)},g.prototype.text=function(c,s,l){var d=document.createElementNS(T,"text");d.setAttribute("stroke","none");for(var f in s)s.hasOwnProperty(f)&&d.setAttribute(f,s[f]);for(var u=s["data-name"]=="free-text",i=(""+c).split(`
|
|
32
|
+
`),t=0;t<i.length;t++)if(!(u&&i[t]=="")){var a=document.createElementNS(T,"tspan");if(a.setAttribute("x",s.x?s.x:0),t!==0&&a.setAttribute("dy","1.2em"),i[t].indexOf("")!==-1){var e=i[t].split("");if(a.textContent=e[0],e[1]){var h=document.createElementNS(T,"tspan");h.setAttribute("dy","-0.3em"),h.setAttribute("style","font-size:0.7em"),h.textContent=e[1],a.appendChild(h)}if(e[2]){var v=e[1]?"0.4em":"0.1em",m=document.createElementNS(T,"tspan");m.setAttribute("dy",v),m.setAttribute("style","font-size:0.7em"),m.textContent=e[2],a.appendChild(m)}}else u&&i[t].trim()==""?a.innerHTML=" ":a.textContent=i[t];d.appendChild(a)}return l?l.appendChild(d):this.append(d),d},g.prototype.richTextLine=function(c,s,l,d,f,u){var i=document.createElementNS(T,"text");i.setAttribute("stroke","none"),i.setAttribute("class",d),i.setAttribute("x",s),i.setAttribute("y",l),i.setAttribute("text-anchor",f),i.setAttribute("dominant-baseline","middle");for(var t=0;t<c.length;t++){for(var a=c[t],e=document.createElementNS(T,"tspan"),h=Object.keys(a.attrs),v=0;v<h.length;v++){var m=a.attrs[h[v]];m!==""&&e.setAttribute(h[v],m)}e.textContent=a.content,i.appendChild(e)}return u?u.appendChild(i):this.append(i),i},g.prototype.guessWidth=function(c,s){var l=this.createDummySvg(),d=this.text(c,s,l),f;try{f=d.getBBox(),isNaN(f.height)||!f.height?f={width:s["font-size"]/2,height:s["font-size"]+2}:f={width:f.width,height:f.height}}catch{f={width:s["font-size"]/2,height:s["font-size"]+2}}return l.removeChild(d),f},g.prototype.createDummySvg=function(){if(!this.dummySvg){this.dummySvg=n();var c=["display: block !important;","height: 1px;","width: 1px;","position: absolute;"];this.dummySvg.setAttribute("style",c.join(""));var s=document.querySelector("body");s.appendChild(this.dummySvg)}return this.dummySvg};var r={};g.prototype.getTextSize=function(c,s,l){if(typeof c=="number"&&(c=""+c),!c||c.match(/^\s+$/))return{width:0,height:0};var d;if(c.length<20&&(d=c+JSON.stringify(s),r[d]))return r[d];var f=!l;l||(l=this.text(c,s));var u;try{u=l.getBBox(),isNaN(u.height)||!u.height?u=this.guessWidth(c,s):u={width:u.width,height:u.height}}catch{u=this.guessWidth(c,s)}return f&&(this.currentGroup.length>0?this.currentGroup[0].removeChild(l):this.svg.removeChild(l)),d&&(r[d]=u),u},g.prototype.openGroup=function(c){c=c||{};var s=document.createElementNS(T,"g");return c.klass&&s.setAttribute("class",c.klass),c.fill&&s.setAttribute("fill",c.fill),c.stroke&&s.setAttribute("stroke",c.stroke),c["data-name"]&&s.setAttribute("data-name",c["data-name"]),c.prepend?this.prepend(s):this.append(s),this.currentGroup.unshift(s),s},g.prototype.closeGroup=function(){var c=this.currentGroup.shift();return c&&c.children.length===0?(c.parentElement.removeChild(c),null):c},g.prototype.path=function(c){var s=document.createElementNS(T,"path");for(var l in c)c.hasOwnProperty(l)&&(l==="path"?s.setAttributeNS(null,"d",c.path):l==="klass"?s.setAttributeNS(null,"class",c[l]):c[l]!==void 0&&s.setAttributeNS(null,l,c[l]));return this.append(s),s},g.prototype.pathToBack=function(c){var s=document.createElementNS(T,"path");for(var l in c)c.hasOwnProperty(l)&&(l==="path"?s.setAttributeNS(null,"d",c.path):l==="klass"?s.setAttributeNS(null,"class",c[l]):s.setAttributeNS(null,l,c[l]));return this.prepend(s),s},g.prototype.lineToBack=function(c){for(var s=document.createElementNS(T,"line"),l=Object.keys(c),d=0;d<l.length;d++)s.setAttribute(l[d],c[l[d]]);return this.prepend(s),s},g.prototype.append=function(c){this.currentGroup.length>0?this.currentGroup[0].appendChild(c):this.svg.appendChild(c)},g.prototype.prepend=function(c){this.currentGroup.length>0?this.currentGroup[0].appendChild(c):this.svg.insertBefore(c,this.svg.firstChild)},g.prototype.setAttributeOnElement=function(c,s){for(var l in s)s.hasOwnProperty(l)&&c.setAttributeNS(null,l,s[l])},g.prototype.moveElementToChild=function(c,s){c.appendChild(s)};function n(){var c=document.createElementNS(T,"svg");return c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),c.setAttribute("role","img"),c.setAttribute("fill","currentColor"),c.setAttribute("stroke","currentColor"),c}return t0=g,t0}var r0,Ja;function Xs(){if(Ja)return r0;Ja=1;var T=_e(),g=qs(),p=function(o){this.paper=new g(o),this.controller=null,this.space=3*T.SPACE,this.padding={},this.reset(),this.firefox112=navigator.userAgent.indexOf("Firefox/112.0")>=0};return p.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},p.prototype.newTune=function(o){this.abctune=o,this.setVerticalSpace(o.formatting),this.isPrint=o.media==="print",this.setPadding(o)},p.prototype.setLineThickness=function(o){this.lineThickness=o},p.prototype.setPaddingOverride=function(o){this.paddingOverride={top:o.paddingtop,bottom:o.paddingbottom,right:o.paddingright,left:o.paddingleft}},p.prototype.setPadding=function(o){function r(n,c,s,l,d){o.formatting[s]!==void 0?n.padding[c]=o.formatting[s]:n.paddingOverride[c]!==void 0?n.padding[c]=n.paddingOverride[c]:n.isPrint?n.padding[c]=l:n.padding[c]=d}r(this,"top","topmargin",38,15),r(this,"bottom","botmargin",38,15),r(this,"left","leftmargin",68,15),r(this,"right","rightmargin",68,15)},p.prototype.adjustNonScaledItems=function(o){this.padding.top/=o,this.padding.bottom/=o,this.padding.left/=o,this.padding.right/=o,this.abctune.formatting.headerfont.size/=o,this.abctune.formatting.footerfont.size/=o},p.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:26.67+10,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},p.prototype.setVerticalSpace=function(o){o.staffsep!==void 0&&(this.spacing.staffSeparation=o.staffsep*4/3),o.composerspace!==void 0&&(this.spacing.composer=o.composerspace*4/3),o.partsspace!==void 0&&(this.spacing.parts=o.partsspace*4/3),o.textspace!==void 0&&(this.spacing.text=o.textspace*4/3),o.musicspace!==void 0&&(this.spacing.music=o.musicspace*4/3),o.titlespace!==void 0&&(this.spacing.title=o.titlespace*4/3),o.sysstaffsep!==void 0&&(this.spacing.systemStaffSeparation=o.sysstaffsep*4/3),o.stafftopmargin!==void 0&&(this.spacing.staffTopMargin=o.stafftopmargin*4/3),o.subtitlespace!==void 0&&(this.spacing.subtitle=o.subtitlespace*4/3),o.topspace!==void 0&&(this.spacing.top=o.topspace*4/3),o.vocalspace!==void 0&&(this.spacing.vocal=o.vocalspace*4/3),o.wordsspace!==void 0&&(this.spacing.words=o.wordsspace*4/3)},p.prototype.calcY=function(o){return this.y-o*T.STEP},p.prototype.moveY=function(o,r){r===void 0&&(r=1),this.y+=o*r},p.prototype.absolutemoveY=function(o){this.y=o},r0=p,r0}var a0,Za;function Ks(){if(Za)return a0;Za=1;function T(g,p,o,r,n,c){var s=g.text;this.rows=[];var l;p&&this.rows.push({move:p});var d=o.calc("textfont","defined-text");if(s==="")this.rows.push({move:d.attr["font-size"]*2});else if(typeof s=="string"){let h=function(v){return v.replace(/^[ \t]*\n/gm,`X
|
|
33
|
+
`)};this.rows.push({move:d.attr["font-size"]/2}),this.rows.push({left:r,text:s,font:"textfont",klass:"defined-text",anchor:"start",startChar:g.startChar,endChar:g.endChar,absElemType:"freeText",name:"free-text"});var f=h(s);l=c.calc(f,"textfont","defined-text"),this.rows.push({move:l.height})}else if(s){for(var u=0,i=r,t="textfont",a=0;a<s.length;a++)s[a].font?t=s[a].font:t="textfont",this.rows.push({left:i,text:s[a].text,font:t,klass:"defined-text",anchor:"start",startChar:g.startChar,endChar:g.endChar,absElemType:"freeText",name:"free-text"}),l=c.calc(s[a].text,o.calc(t,"defined-text").font,"defined-text"),i+=l.width+l.height/2,u=Math.max(u,l.height);this.rows.push({move:u})}else if(g.length===1){var e=n/2;this.rows.push({left:e,text:g[0].text,font:"textfont",klass:"defined-text",anchor:"middle",startChar:g.startChar,endChar:g.endChar,absElemType:"freeText",name:"free-text"}),l=c.calc(g[0].text,"textfont","defined-text"),this.rows.push({move:l.height})}}return a0=T,a0}var n0,en;function Us(){if(en)return n0;en=1;function T(g,p,o){this.rows=[],g&&this.rows.push({move:g}),this.rows.push({separator:p,absElemType:"separator"}),o&&this.rows.push({move:o})}return n0=T,n0}var i0,tn;function $s(){if(tn)return i0;tn=1;function T(g,p,o,r,n,c){this.rows=[],g&&this.rows.push({move:g});var s=p.titleleft?"start":"middle",l=p.titleleft?n:r;this.rows.push({left:l,text:o.text,font:"subtitlefont",klass:"text subtitle",anchor:s,startChar:o.startChar,endChar:o.endChar,absElemType:"subtitle",name:"subtitle"});var d=c.calc(o.text,"subtitlefont","text subtitle");this.rows.push({move:d.height})}return i0=T,i0}var s0,rn;function Hr(){if(rn)return s0;rn=1;function T(g,p,o){if(p.text){p.marginLeft||(p.marginLeft=0),p.klass||(p.klass=""),p.anchor||(p.anchor="start"),p.info||(p.info={startChar:-2,endChar:-2}),p.marginTop&&g.push({move:p.marginTop});var r={left:p.marginLeft,text:p.text,font:p.font,anchor:p.anchor,startChar:p.info.startChar,endChar:p.info.endChar,"dominant-baseline":p["dominant-baseline"]};p.absElemType&&(r.absElemType=p.absElemType),!p.inGroup&&p.klass&&(r.klass=p.klass),p.name&&(r.name=p.name),g.push(r);var n=o.calc("A",p.font,p.klass),c=p.text.split(`
|
|
34
|
+
`).length;if(p.text[p.text.length-1]===`
|
|
35
|
+
`&&c--,!p.noMove){var s=n.height*1.1*c;g.push({move:Math.round(s)}),p.marginBottom&&g.push({move:p.marginBottom})}}}return s0=T,s0}var o0,an;function Wi(){if(an)return o0;an=1;const T=Hr();function g(p,o,r,n,c,s,l,d){var f=d.calc("i",r,n);if(o==="")p.push({move:f.height});else{if(typeof o=="string"){T(p,{marginLeft:s,text:o,font:r,klass:n,marginTop:l.marginTop,anchor:l.anchor,absElemType:l.absElemType,info:l.info,name:c},d);return}l.marginTop&&p.push({move:l.marginTop});var u=0,i={left:s,anchor:l.anchor,phrases:[]};n&&(i.klass=n),p.push(i);for(var t=0;t<o.length;t++){var a=o[t],e=a.font?a.font:d.attr(r,n).font,h={content:a.text};e&&(h.attrs={"font-family":d.getFamily(e.face),"font-size":e.size,"font-weight":e.weight,"font-style":e.style,"font-decoration":e.decoration}),i.phrases.push(h);var v=d.calc(a.text,e,n);u=Math.max(u,v.height),a.text[a.text.length-1]===" "&&f.width}p.push({move:u})}}return o0=g,o0}var c0,nn;function Qs(){if(nn)return c0;nn=1;const T=Hr(),g=Wi();function p(o,r,n,c,s,l,d,f,u,i){if(this.rows=[],o.header&&l){var t=i.calc("X","headerfont","abcjs-header abcjs-meta-top").height;T(this.rows,{marginLeft:d,text:o.header.left,font:"headerfont",klass:"header meta-top",marginTop:-t,info:r.header,name:"header"},i),T(this.rows,{marginLeft:d+s/2,text:o.header.center,font:"headerfont",klass:"header meta-top",marginTop:-t,anchor:"middle",info:r.header,name:"header"},i),T(this.rows,{marginLeft:d+s,text:o.header.right,font:"headerfont",klass:"header meta-top",marginTop:-t,anchor:"end",info:r.header,name:"header"},i)}l&&this.rows.push({move:f.top});var a=n.titleleft?"start":"middle",e=n.titleleft?d:d+s/2;if(o.title){var h=u?"abcjs-title":"";g(this.rows,o.title,"titlefont",h,"title",e,{marginTop:f.title,anchor:a,absElemType:"title",info:r.title},i)}if(c.length)for(var v=0;v<c.length&&c[v].subtitle;){var h=u?"abcjs-text abcjs-subtitle":"";g(this.rows,c[v].subtitle.text,"subtitlefont",h,"subtitle",e,{marginTop:f.subtitle,anchor:a,absElemType:"subtitle",info:c[v].subtitle},i),v++}if(o.rhythm||o.origin||o.composer){if(this.rows.push({move:f.composer}),o.rhythm&&o.rhythm.length>0){var m=!!(o.composer||o.origin),h=u?"abcjs-rhythm":"";T(this.rows,{marginLeft:d,text:o.rhythm,font:"infofont",klass:h,absElemType:"rhythm",noMove:m,info:r.rhythm,name:"rhythm"},i)}o.composer&&o.composer,o.origin&&o.origin;var x=o.composer?o.composer:"";if(o.origin&&(typeof x=="string"&&typeof o.origin=="string"?x+=" ("+o.origin+")":typeof x=="string"&&typeof o.origin!="string"?(x=[{text:x}],x.push({text:" ("}),x=x.concat(o.origin),x.push({text:")"})):(x.push({text:" ("}),x=x.concat(o.origin),x.push({text:")"}))),x){var h=u?"abcjs-composer":"";g(this.rows,x,"composerfont",h,"composer",d+s,{anchor:"end",absElemType:"composer",info:r.composer,ingroup:!0},i)}}if(o.author&&o.author.length>0){var h=u?"abcjs-author":"";g(this.rows,o.author,"composerfont",h,"author",d+s,{anchor:"end",absElemType:"author",info:r.author},i)}if(o.partOrder&&o.partOrder.length>0){var h=u?"abcjs-part-order":"";g(this.rows,o.partOrder,"partsfont",h,"part-order",d,{absElemType:"partOrder",info:r.partOrder,anchor:"start"},i)}}return c0=p,c0}var l0,sn;function Js(){if(sn)return l0;sn=1;const T=Hr(),g=Wi();function p(n,c,s,l,d,f,u){this.rows=[],n.unalignedWords&&n.unalignedWords.length>0&&this.unalignedWords(n.unalignedWords,l,d,f,u),this.extraText(n,l,d,f,u),n.footer&&s&&this.footer(n.footer,c,l,u)}p.prototype.unalignedWords=function(n,c,s,l,d){var f=l?"abcjs-unaligned-words":"",u="wordsfont",i=d.calc("i",u,f);this.rows.push({move:s.words}),r(this.rows,"",n,c,u,"unalignedWords","unalignedWords",f,"unalignedWords",s,l,d),this.rows.push({move:i.height})};function o(n,c,s,l,d,f,u){s&&(c&&(typeof s=="string"?s=c+s:s=[{text:c}].concat(s)),d=f?"abcjs-extra-text "+d:"",g(n,s,"historyfont",d,"description",l,{absElemType:"extraText",anchor:"start"},u))}function r(n,c,s,l,d,f,u,i,t,a,e,h){if(s){i=e?"abcjs-extra-text "+i:"";var v=h.calc("A",d,i);if(typeof s=="string")c&&(s=c+`
|
|
36
|
+
`+s),T(n,{marginLeft:l,text:s,font:d,absElemType:"extraText",name:t,"dominant-baseline":"middle",klass:i},h);else{n.push({startGroup:u,klass:i,name:t}),n.push({move:a.info}),c&&(T(n,{marginLeft:l,text:c,font:d,absElemType:"extraText",name:t,"dominant-baseline":"middle"},h),n.push({move:v.height*3/4}));for(var m=0;m<s.length;m++)g(n,s[m],d,"",t,l,{anchor:"start"},h),m<s.length-1&&typeof s[m]=="string"&&typeof s[m+1]!="string"&&n.push({move:v.height*3/4});n.push({endGroup:u,absElemType:f,startChar:-1,endChar:-1,name:t}),n.push({move:v.height})}}}return p.prototype.extraText=function(n,c,s,l,d){o(this.rows,"Book: ",n.book,c,"abcjs-book",l,d),o(this.rows,"Source: ",n.source,c,"abcjs-source",l,d),o(this.rows,"Discography: ",n.discography,c,"abcjs-discography",l,d),r(this.rows,"Notes:",n.notes,c,"historyfont","extraText","notes","abcjs-notes","description",s,l,d),o(this.rows,"Transcription: ",n.transcription,c,"abcjs-transcription",l,d),r(this.rows,"History:",n.history,c,"historyfont","extraText","history","abcjs-history","description",s,l,d),o(this.rows,"Copyright: ",n["abc-copyright"],c,"abcjs-copyright",l,d),o(this.rows,"Creator: ",n["abc-creator"],c,"abcjs-creator",l,d),o(this.rows,"Edited By: ",n["abc-edited-by"],c,"abcjs-edited-by",l,d)},p.prototype.footer=function(n,c,s,l){var d="header meta-bottom",f="footerfont";this.rows.push({startGroup:"footer",klass:d}),T(this.rows,{marginLeft:s,text:n.left,font:f,klass:d,name:"footer"},l),T(this.rows,{marginLeft:s+c/2,text:n.center,font:f,klass:d,anchor:"middle",name:"footer"},l),T(this.rows,{marginLeft:s+c,text:n.right,font:f,klass:d,anchor:"end",name:"footer"},l)},l0=p,l0}var h0,on;function Gi(){if(on)return h0;on=1;function T(p,o,r,n){if(p.indexOf(o)===0){var c=p.replace(o,""),s=parseInt(c,10);""+s===c&&(r[n]=s)}}function g(p,o){var r=[];if(p.absEl.elemset){for(var n={},c=0;c<p.absEl.elemset.length;c++){var s=p.absEl.elemset[c];if(s)for(var l=s.getAttribute("class").split(" "),d=0;d<l.length;d++)n[l[d]]=!0}for(var f=0;f<Object.keys(n).length;f++)r.push(Object.keys(n)[f])}for(var u={},i=0;i<r.length;i++)T(r[i],"abcjs-v",u,"voice"),T(r[i],"abcjs-l",u,"line"),T(r[i],"abcjs-m",u,"measure");p.staffPos&&(u.staffPos=p.staffPos);for(var t=o.target;t&&t.dataset&&!t.dataset.name&&t.tagName.toLowerCase()!=="svg";)t=t.parentNode;for(var a=o.target;a&&a.dataset&&!a.dataset.index&&a.tagName.toLowerCase()!=="svg";)a=a.parentNode;return a&&a.dataset&&(u.name=a.dataset.name,u.clickedName=t.dataset.name,u.parentClasses=a.classList),t&&t.classList&&(u.clickedClasses=t.classList),u.selectableElement=p.svgEl,{classes:r,analysis:u}}return h0=g,h0}var u0,cn;function Zs(){if(cn)return u0;cn=1;var T=_e(),g=Gi();function p(b,M){if(b.rangeHighlight=x,b.dragging)for(var B=0;B<b.selectables.length;B++){var A=b.selectables[B];A.svgEl.getAttribute("selectable")==="true"&&(A.svgEl.setAttribute("tabindex",0),A.svgEl.setAttribute("data-index",B),A.svgEl.addEventListener("keydown",n.bind(b)),A.svgEl.addEventListener("keyup",c.bind(b)),A.svgEl.addEventListener("focus",r.bind(b)))}for(var P=0;P<M.length;P++)M[P].addEventListener("touchstart",t.bind(b),{passive:!0}),M[P].addEventListener("touchmove",a.bind(b),{passive:!0}),M[P].addEventListener("touchend",e.bind(b),{passive:!0}),M[P].addEventListener("mousedown",t.bind(b)),M[P].addEventListener("mousemove",a.bind(b)),M[P].addEventListener("mouseup",e.bind(b))}function o(b){var M=1,B=1,A=b.target.closest("svg"),P=0;A&&A.viewBox&&A.viewBox.baseVal&&(A.viewBox.baseVal.width!==0&&(M=A.viewBox.baseVal.width/A.clientWidth),A.viewBox.baseVal.height!==0&&(B=A.viewBox.baseVal.height/A.clientHeight),P=A.viewBox.baseVal.y);var N=b.target&&b.target.tagName==="svg",E,_;return N?(E=b.offsetX,_=b.offsetY):(E=b.layerX,_=b.layerY),E=E*M,_=_*B,[E,_+P]}function r(b){this.dragMechanism==="keyboard"&&this.dragYStep!==0&&this.dragTarget&&v.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,b),this.dragYStep=0}function n(b){switch(b.keyCode){case 38:case 40:b.preventDefault()}}function c(b){var M=!1,B=b.target.dataset.index;switch(b.keyCode){case 13:case 32:M=!0,this.dragTarget=this.selectables[B],this.dragIndex=B,this.dragMechanism="keyboard",e.bind(this)(b);break;case 38:M=!0,this.dragTarget=this.selectables[B],this.dragIndex=B,this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*T.STEP+")"));break;case 40:M=!0,this.dragTarget=this.selectables[B],this.dragIndex=B,this.dragMechanism="keyboard",this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*T.STEP+")"));break;case 9:this.dragYStep!==0&&e.bind(this)(b);break}M&&b.preventDefault()}function s(b,M){if(!M)return-1;var B=M.dataset;if(!B)return-1;for(var A=B.index,P=0;P<b.length;P++){var N=b[P].svgEl.dataset;if(N&&A===N.index)return P}return-1}function l(b,M,B){for(var A=9999999,P=-1,N=0;N<b.selectables.length&&A>0;N++){var E=b.selectables[N];if(b.getDim(E),E.dim.left<M&&E.dim.right>M&&E.dim.top<B&&E.dim.bottom>B)P=N,A=0;else if(E.dim.top<B&&E.dim.bottom>B){var _=Math.min(Math.abs(E.dim.left-M),Math.abs(E.dim.right-M));_<A&&(A=_,P=N)}else if(E.dim.left<M&&E.dim.right>M){var L=Math.min(Math.abs(E.dim.top-B),Math.abs(E.dim.bottom-B));L<A&&(A=L,P=N)}else{var D=Math.abs(M-E.dim.left)>Math.abs(M-E.dim.right)?Math.abs(M-E.dim.right):Math.abs(M-E.dim.left),H=Math.abs(B-E.dim.top)>Math.abs(B-E.dim.bottom)?Math.abs(B-E.dim.bottom):Math.abs(B-E.dim.top),y=Math.sqrt(D*D+H*H);y<A&&(A=y,P=N)}}return P>=0&&A<=12?P:-1}function d(b,M,B){if(b.x<=M.offsetX&&b.x+b.width>=M.offsetX&&b.y<=M.offsetY&&b.y+b.height>=M.offsetY)return[M.offsetX,M.offsetY];var A=Math.abs(M.layerY/B-M.offsetY);return A<3?[M.offsetX,M.offsetY]:[M.layerX,M.layerY]}function f(b){if(!b)return null;if(b.tagName==="svg")return b;if(!b.getAttribute)return null;for(var M=b.getAttribute("selectable");!M;)b.parentElement?(b=b.parentElement,b.tagName==="svg"?M=!0:M=b.getAttribute("selectable")):M=!0;return b}function u(b,M){var B,A,P,N=s(b.selectables,f(M.target));return N>=0?(P=d(b.selectables[N].svgEl.getBBox(),M,b.scale),B=P[0],A=P[1]):(P=o(M),B=P[0],A=P[1],N=l(b,B,A)),{x:B,y:A,clickedOn:N}}function i(b){if(!(!b||!b.target||!b.touches||b.touches.length<1)){var M=b.target.getBoundingClientRect(),B=b.touches[0].pageX-M.left,A=b.touches[0].pageY-M.top;b.touches[0].offsetX=B,b.touches[0].offsetY=A,b.touches[0].layerX=b.touches[0].pageX,b.touches[0].layerY=b.touches[0].pageY}}function t(b){var M=b;b.type==="touchstart"&&(i(b),b.touches.length>0&&(M=b.touches[0]));var B=u(this,M);B.clickedOn>=0&&(b.type==="touchstart"||b.button===0)&&this.selectables[B.clickedOn]&&(this.dragTarget=this.selectables[B.clickedOn],this.dragIndex=B.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:B.x,y:B.y},this.dragging&&this.dragTarget.isDraggable&&(j(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function a(b){var M=b;if(b.type==="touchmove"&&(i(b),b.touches.length>0&&(M=b.touches[0])),this.lastTouchMove=b,!(!this.dragTarget||!this.dragging||!this.dragTarget.isDraggable||this.dragMechanism!=="mouse"||!this.dragMouseStart)){var B=u(this,M),A=Math.round((B.y-this.dragMouseStart.y)/T.STEP);A!==this.dragYStep&&(this.dragYStep=A,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+A*T.STEP+")"))}}function e(b){var M=b;b.type==="touchend"&&this.lastTouchMove&&(i(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(M=this.lastTouchMove.touches[0])),this.dragTarget&&(m.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),v.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,M),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),F(this.renderer.svg,"abcjs-dragging-in-progress"))}function h(b){b>=0&&b<this.selectables.length&&(this.dragTarget=this.selectables[b],this.dragIndex=b,this.dragMechanism="keyboard",e.bind(this)({target:this.dragTarget.svgEl}))}function v(b,M,B,A,P){for(var N=g(b,P),E=N.classes,_=N.analysis,L=0;L<this.listeners.length;L++)this.listeners[L](b.absEl.abcelem,b.absEl.tuneNumber,E.join(" "),_,{step:M,max:B,index:A,setSelection:h.bind(this)},P)}function m(){for(var b=0;b<this.selected.length;b++)this.selected[b].unhighlight(void 0,this.renderer.foregroundColor);this.selected=[]}function x(b,M){m.bind(this)();for(var B=0;B<this.staffgroups.length;B++)for(var A=this.staffgroups[B].voices,P=0;P<A.length;P++)for(var N=A[P].children,E=0;E<N.length;E++){var _=N[E].abcelem.startChar,L=N[E].abcelem.endChar;(M>_&&b<L||M===b&&M===L)&&(this.selected[this.selected.length]=N[E],N[E].highlight(void 0,this.selectionColor))}}function C(b){var M=b.getAttribute("class");M||(M="");for(var B=M.split(" "),A={},P=0;P<B.length;P++)A[B[P]]=!0;return A}function S(b,M){var B=[];for(var A in M)M.hasOwnProperty(A)&&B.push(A);b.setAttribute("class",B.join(" "))}function j(b,M){if(b){var B=C(b.svg);B[M]=!0,S(b.svg,B)}}function F(b,M){if(b){var B=C(b.svg);delete B[M],S(b.svg,B)}}return u0=p,u0}var d0,ln;function jr(){if(ln)return d0;ln=1;function T(g,p,o,r,n){return p+(r-p)/(o-g)*(n-g)}return d0=T,d0}var f0,hn;function eo(){if(hn)return f0;hn=1;var T=Me(),g=_e(),p=jr(),o=function(i){if(!(i.elems.length===0||i.allrests)){var t=s(i.stemsUp,i.isgrace),a=i.elems[0],e=i.elems[i.elems.length-1],h=0,v=i.stemsUp?a.abcelem.maxpitch:a.abcelem.minpitch;h=n(a,i.stemsUp,v,h),h=n(e,i.stemsUp,v,h),h=Math.max(i.stemHeight,h+3);var m=d(i.average,i.elems.length,h,i.stemsUp,a.abcelem.averagepitch,e.abcelem.averagepitch,i.isflat,i.min,i.max,i.isgrace),x=l(i.stemsUp,a,e);i.addBeam({startX:x[0],endX:x[1],startY:m[0],endY:m[1],dy:t});for(var C=u(i.elems,i.stemsUp,i.beams[0],i.isgrace,t),S=0;S<C.length;S++)i.addBeam(C[S]);f(i.elems,i.stemsUp,i.beams[0],t,i.mainNote)}},r=function(i){return i===void 0?0:Math.floor(Math.log(i)/Math.log(2))};function n(i,t,a,e){if(!i.children)return e;for(var h=0;h<i.children.length;h++){var v=i.children[h];t&&v.top!==void 0&&v.c==="flags.ugrace"?e=Math.max(e,v.top-a):!t&&v.bottom!==void 0&&v.c==="flags.ugrace"&&(e=Math.max(e,a-v.bottom+7))}return e}function c(i,t,a,e){if(e)return 0;var h=i-t,v=a/2;return h>v&&(h=v),h<-v&&(h=-v),h}function s(i,t){var a=i?g.STEP:-g.STEP;return t&&(a=a*.4),a}function l(i,t,a){var e=t.heads[i?0:t.heads.length-1],h=a.heads[i?0:a.heads.length-1],v=e.x;i&&(v+=e.w-.6);var m=h.x;return m+=i?h.w:.6,[v,m]}function d(i,t,a,e,h,v,m,x,C,S){var j=a-2,F=a-2,b=Math.round(e?Math.max(i+j,C+F):Math.min(i-j,x-F)),M=c(h,v,t,m),B=b+Math.floor(M/2),A=b+Math.floor(-M/2);return S||(e&&b<6||!e&&b>6)&&(B=6,A=6),[B,A]}function f(i,t,a,e,h){for(var v=0;v<i.length;v++){var m=i[v];if(!m.abcelem.rest){var x=!m.addExtra,C=x?h:m,S=m.heads[t?0:m.heads.length-1],j=1/5,F=S.pitch+(t?j:-j),b=t?S.w:0;x||(b+=S.dx);var M=S.x+b,B=p(a.startX,a.startY,a.endX,a.endY,M),A=t?-.6:.6;t||(B-=e/2/g.STEP),x&&(b+=m.heads[0].dx),S.c==="noteheads.slash.quarter"&&(t?F+=1:F-=1);var P=new T(null,b,0,F,{type:"stem",pitch2:B,linewidth:A});P.setX(C.x),C.addRight(P)}}}function u(i,t,a,e,h){for(var v=[],m=[],x=0;x<i.length;x++){var C=i[x];if(!C.abcelem.rest){var S=C.heads[t?0:C.heads.length-1],j=S.x+(t?S.w:0),F=p(a.startX,a.startY,a.endX,a.endY,j),b=t?-1.5:1.5;e&&(b=b*2/3);var M=C.abcelem.duration;M===0&&(M=.25);for(var B=r(M);B<-3;B++){var A=-4-B;if(m[A]?m[A].single=!1:m[A]={x:j+(t?-.6:0),y:F+b*(A+1),durlog:B,single:!0},x>0&&C.abcelem.beambr&&C.abcelem.beambr<=A+1){m[A].split||(m[A].split=[m[A].x]);var P=l(t,i[x-1],C);m[A].split[m[A].split.length-1]>=P[0]&&(P[0]+=C.w),m[A].split.push(P[0]),m[A].split.push(P[1])}}for(var N=m.length-1;N>=0;N--)if(x===i.length-1||r(i[x+1].abcelem.duration)>-N-4){var E=j,_=F+b*(N+1);m[N].single&&(E=x===0?j+5:j-5,_=p(a.startX,a.startY,a.endX,a.endY,E)+b*(N+1));var L={startX:m[N].x,endX:E,startY:m[N].y,endY:_,dy:h};if(m[N].split!==void 0){var D=m[N].split;L.endX<=D[D.length-1]&&(D[D.length-1]-=C.w),D.push(L.endX),L.split=m[N].split}v.push(L),m=m.slice(0,N)}}}return v}return f0=o,f0}var p0,un;function to(){if(un)return p0;un=1;var T=jr();function g(n){if(n.anchor1&&n.anchor2){n.hasBeam=!!n.anchor1.parent.beam&&n.anchor1.parent.beam===n.anchor2.parent.beam;var c=n.anchor1.parent.beam;if(n.hasBeam&&(c.elems[0]!==n.anchor1.parent||c.elems[c.elems.length-1]!==n.anchor2.parent)&&(n.hasBeam=!1),n.hasBeam){var s=p(c)?n.anchor1.x+n.anchor1.w:n.anchor1.x;n.yTextPos=o(s,n.anchor2.x,c),n.yTextPos+=p(c)?3:-2,n.xTextPos=r(s,n.anchor2.x),n.top=n.yTextPos+1,n.bottom=n.yTextPos-2,p(c)&&(n.endingHeightAbove=4)}else{n.startNote=Math.max(n.anchor1.parent.top,9)+4,n.endNote=Math.max(n.anchor2.parent.top,9)+4,n.anchor1.parent.type==="rest"&&n.anchor2.parent.type!=="rest"?n.startNote=n.endNote:n.anchor2.parent.type==="rest"&&n.anchor1.parent.type!=="rest"&&(n.endNote=n.startNote);for(var l=0,d=0;d<n.middleElems.length;d++)l=Math.max(l,n.middleElems[d].top);l+=4,(l>n.startNote||l>n.endNote)&&(n.startNote=l,n.endNote=l),n.flatBeams&&(n.startNote=Math.max(n.startNote,n.endNote),n.endNote=Math.max(n.startNote,n.endNote)),n.yTextPos=n.startNote+(n.endNote-n.startNote)/2,n.xTextPos=n.anchor1.x+(n.anchor2.x+n.anchor2.w-n.anchor1.x)/2,n.top=n.yTextPos+1}}delete n.middleElems,delete n.flatBeams}function p(n){return n.stemsUp}function o(n,c,s){if(s.beams.length===0)return 0;s=s.beams[0];var l=n+(c-n)/2;return T(s.startX,s.startY,s.endX,s.endY,l)}function r(n,c){return n+(c-n)/2}return p0=g,p0}var m0,dn;function ro(){if(dn)return m0;dn=1;var T=eo(),g=jr(),p=to(),o=function(f){for(var u=0;u<f.beams.length;u++)if(f.beams[u].type==="BeamElem"){T(f.beams[u]),r(f.beams[u]);for(var i=0;i<f.beams[u].elems.length;i++)f.adjustRange(f.beams[u].elems[i])}for(f.staff.specialY.chordLines=c(f.children),u=0;u<f.otherchildren.length;u++){var t=f.otherchildren[u];t.type==="TripletElem"&&(p(t),f.adjustRange(t))}f.staff.top=Math.max(f.staff.top,f.top),f.staff.bottom=Math.min(f.staff.bottom,f.bottom)};function r(f){for(var u=1.5,i=0;i<f.elems.length;i++){var t=f.elems[i];if(t.top)for(var a=d(t,f),e=0;e<t.children.length;e++){var h=t.children[e];if(h.klass==="ornament"&&h.position!=="below"&&h.bottom-u<a){var v=a-h.bottom+u;h.bottom+=v,h.top+=v,h.pitch+=v,a=t.top=h.top}}}}function n(f,u){var i=u.getChordDim();if(i){for(var t=0;t<f.length;t++){var a=f[t]<i.left;if(a){t>0&&u.putChordInLane(t),f[t]=i.right;return}}f.push(i.right),u.putChordInLane(f.length-1)}}function c(f){var u=[0],i=[0],t,a,e;for(t=0;t<f.length;t++){for(a=0;a<f[t].children.length;a++)e=f[t].children[a],e.chordHeightAbove&&n(u,e);for(a=f[t].children.length-1;a>=0;a--)e=f[t].children[a],e.chordHeightBelow&&n(i,e)}return(u.length>1||i.length>1)&&l(f,u.length,i.length),{above:u.length,below:i.length}}function s(f){for(var u=0,i=0;i<f.children.length;i++){var t=f.children[i];t.chordHeightBelow&&u++}return u}function l(f,u,i){for(var t=0;t<f.length;t++){s(f[t]);for(var a=0;a<f[t].children.length;a++){var e=f[t].children[a];e.chordHeightAbove&&e.invertLane(u)}}}function d(f,u){return u=u.beams[0],g(u.startX,u.startY,u.endX,u.endY,f.x)}return m0=o,m0}var g0,fn;function ao(){if(fn)return g0;fn=1;var T=_e(),g=function(u,i){for(var t,a=0;a<i.staffs.length;a++){var e=i.staffs[a],h={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(u.showDebug&&u.showDebug.indexOf("box")>=0&&(e.originalTop=e.top,e.originalBottom=e.bottom),o(e,h,"lyricHeightAbove"),o(e,h,"chordHeightAbove",e.specialY.chordLines.above),e.specialY.endingHeightAbove&&(e.specialY.chordHeightAbove?e.top+=2:e.top+=e.specialY.endingHeightAbove+p,h.endingHeightAbove=e.top),e.specialY.dynamicHeightAbove&&e.specialY.volumeHeightAbove?(e.top+=Math.max(e.specialY.dynamicHeightAbove,e.specialY.volumeHeightAbove)+p,h.dynamicHeightAbove=e.top,h.volumeHeightAbove=e.top):(o(e,h,"dynamicHeightAbove"),o(e,h,"volumeHeightAbove")),o(e,h,"partHeightAbove"),o(e,h,"tempoHeightAbove"),e.specialY.lyricHeightBelow&&(e.specialY.lyricHeightBelow+=u.spacing.vocal/T.STEP,h.lyricHeightBelow=e.bottom,e.bottom-=e.specialY.lyricHeightBelow+p),e.specialY.chordHeightBelow){h.chordHeightBelow=e.bottom;var v=e.specialY.chordHeightBelow;e.specialY.chordLines.below&&(v*=e.specialY.chordLines.below),e.bottom-=v+p}e.specialY.volumeHeightBelow&&e.specialY.dynamicHeightBelow?(h.volumeHeightBelow=e.bottom,h.dynamicHeightBelow=e.bottom,e.bottom-=Math.max(e.specialY.volumeHeightBelow,e.specialY.dynamicHeightBelow)+p):e.specialY.volumeHeightBelow?(h.volumeHeightBelow=e.bottom,e.bottom-=e.specialY.volumeHeightBelow+p):e.specialY.dynamicHeightBelow&&(h.dynamicHeightBelow=e.bottom,e.bottom-=e.specialY.dynamicHeightBelow+p),u.showDebug&&u.showDebug.indexOf("box")>=0&&(e.positionY=h);for(var m=0;m<e.voices.length;m++){var x=i.voices[e.voices[m]];r(h,x,u.spacing)}if(t!==void 0){var C=e.top-10,S=t+C,j=u.spacing.systemStaffSeparation/T.STEP,F=j-S;F>0&&(e.top+=F)}e.top+=u.spacing.staffTopMargin/T.STEP,t=2-e.bottom}},p=1;function o(u,i,t,a){if(u.specialY[t]){var e=u.specialY[t];a&&(e*=a),u.top+=e+p,i[t]=u.top}}function r(u,i,t){var a,e;for(a=0;a<i.children.length;a++)e=i.children[a],n(u,e,t);for(a=0;a<i.otherchildren.length;a++)switch(e=i.otherchildren[a],e.type){case"CrescendoElem":c(u,e);break;case"DynamicDecoration":s(u,e);break;case"EndingElem":l(u,e);break;case"TieElem":var h=e.getYBounds();i.staff.top=Math.max(i.staff.top,h[0]),i.staff.top=Math.max(i.staff.top,h[1]),i.staff.bottom=Math.min(i.staff.bottom,h[0]),i.staff.bottom=Math.min(i.staff.bottom,h[1]);break}}function n(u,i,t){for(var a=0;a<i.children.length;a++){var e=i.children[a];for(var h in i.specialY)i.specialY.hasOwnProperty(h)&&e[h]&&(e.pitch=u[h],e.top===void 0&&(e.type==="TempoElement"?d(u,e):f(u,e,t),i.pushTop(e.top),i.pushBottom(e.bottom)))}}function c(u,i){i.dynamicHeightAbove?i.pitch=u.dynamicHeightAbove:i.pitch=u.dynamicHeightBelow}function s(u,i){i.volumeHeightAbove?i.pitch=u.volumeHeightAbove:i.pitch=u.volumeHeightBelow}function l(u,i){i.pitch=u.endingHeightAbove-2}function d(u,i){if(i.pitch=u.tempoHeightAbove,i.top=u.tempoHeightAbove,i.bottom=u.tempoHeightAbove,i.note){var t=i.pitch-i.totalHeightInPitches+1;i.note.top=t,i.note.bottom=t;for(var a=0;a<i.note.children.length;a++){var e=i.note.children[a];e.top+=t,e.bottom+=t,e.pitch+=t,e.pitch2!==void 0&&(e.pitch2+=t)}}}function f(u,i,t){switch(i.type){case"part":i.top=u.partHeightAbove+i.height,i.bottom=u.partHeightAbove;break;case"text":case"chord":i.chordHeightAbove?(i.top=u.chordHeightAbove,i.bottom=u.chordHeightAbove):(i.top=u.chordHeightBelow,i.bottom=u.chordHeightBelow);break;case"lyric":i.lyricHeightAbove?(i.top=u.lyricHeightAbove,i.bottom=u.lyricHeightAbove):(i.top=u.lyricHeightBelow+t.vocal/T.STEP,i.bottom=u.lyricHeightBelow+t.vocal/T.STEP,i.pitch-=t.vocal/T.STEP);break;case"debug":i.top=u.chordHeightAbove,i.bottom=u.chordHeightAbove;break}(i.pitch===void 0||i.top===void 0)&&console.error("RelativeElement position not set.",i.type,i.pitch,i.top,u)}return g0=g,g0}var v0,pn;function no(){if(pn)return v0;pn=1;var T=function(){};T.beginLayout=function(o,r){r.i=0,r.durationindex=0,r.startx=o,r.minx=o,r.nextx=o,r.spacingduration=0},T.layoutEnded=function(o){return o.i>=o.children.length},T.getNextX=function(o){return Math.max(o.minx,o.nextx)},T.getSpacingUnits=function(o){return Math.sqrt(o.spacingduration*8)},T.layoutOneItem=function(o,r,n,c,s){var l=n.children[n.i];if(!l)return 0;var d=o-n.minx,f=n.durationindex+l.duration>0?c:0;if(l.abcelem.el_type==="note"&&!l.abcelem.rest&&n.voicenumber!==0&&s){var u=s.children[s.i],i=u&&(l.abcelem.maxpitch<=u.abcelem.maxpitch+1&&l.abcelem.maxpitch>=u.abcelem.minpitch-1||l.abcelem.minpitch<=u.abcelem.maxpitch+1&&l.abcelem.minpitch>=u.abcelem.minpitch-1);if(i&&l.abcelem.minpitch===u.abcelem.minpitch&&l.abcelem.maxpitch===u.abcelem.maxpitch&&u.heads&&u.heads.length>0&&l.heads&&l.heads.length>0&&u.heads[0].c===l.heads[0].c&&(i=!1),i){var t=u.heads&&u.heads.length>0?u.heads[0].realWidth:u.fixed.w;l.adjustedWidth||(l.adjustedWidth=t+l.w),l.w=l.adjustedWidth;for(var a=0;a<l.children.length;a++){var e=l.children[a];e.name.indexOf("accidental")<0&&(e.adjustedWidth||(e.adjustedWidth=e.dx+t),e.dx=e.adjustedWidth)}}}var h=g(l,f);return d<h&&(n.i===0||l.type!=="bar"||n.children[n.i-1].type!=="part"&&n.children[n.i-1].type!=="tempo")&&(o+=h-d),l.setX(o),n.spacingduration=l.duration,n.minx=o+p(l),n.i!==n.children.length-1&&(n.minx+=l.minspacing),this.updateNextX(o,r,n),o},T.shiftRight=function(o,r){var n=r.children[r.i];n&&(n.setX(n.x+o),r.minx+=o,r.nextx+=o)},T.updateNextX=function(o,r,n){n.nextx=o+r*this.getSpacingUnits(n)},T.updateIndices=function(o){this.layoutEnded(o)||(o.durationindex+=o.children[o.i].duration,o.children[o.i].type==="bar"&&(o.durationindex=Math.round(o.durationindex*64)/64),o.i++)};function g(o,r){var n=0;return(o.type==="note"||o.type==="bar")&&(n=r),-o.extraw+n}function p(o){return o.w}return v0=T,v0}var b0,mn;function io(){if(mn)return b0;mn=1;var T=no();function g(c){for(var s=0,l=0;l<c.length;l++){var d=c[l];if(d.children.length>0){var f=d.children.length-1,u=d.children[f];if(u.abcelem.el_type==="bar"){var i=u.children[0].x;i>s?s=i:u.children[0].x=s}}}}var p=function(c,s,l,d,f){var u=1e-7,i=0,t=1e3,a=f;d.startx=a;var e,h=0;for(l&&console.log("init layout",c),e=0;e<d.voices.length;e++)T.beginLayout(a,d.voices[e]);for(var v=0;!o(d.voices);){for(h=null,e=0;e<d.voices.length;e++)!T.layoutEnded(d.voices[e])&&(!h||r(d.voices[e])<h)&&(h=r(d.voices[e]));var m=[],x=[];for(e=0;e<d.voices.length;e++){var C=r(d.voices[e]);C-h>u?x.push(d.voices[e]):m.push(d.voices[e])}v=0;var S=0;for(e=0;e<m.length;e++)T.getNextX(m[e])>a&&(a=T.getNextX(m[e]),v=T.getSpacingUnits(m[e]),S=m[e].spacingduration);i+=v,t=Math.min(t,v),l&&console.log("currentduration: ",h,i,t);var j=void 0;for(e=0;e<m.length;e++){var F=m[e];F.voicenumber===0&&(j=e);var b=j!==void 0&&m[j].voicenumber!==F.voicenumber?m[j]:void 0;n(F,b)||(b=void 0);var M=T.layoutOneItem(a,c,F,s,b),B=M-a;if(B>0){a=M;for(var A=0;A<e;A++)T.shiftRight(B,m[A])}}for(e=0;e<x.length;e++)x[e].spacingduration-=S,T.updateNextX(a,c,x[e]);for(e=0;e<m.length;e++){var P=m[e];T.updateIndices(P)}}for(e=0;e<d.voices.length;e++)T.getNextX(d.voices[e])>a&&(a=T.getNextX(d.voices[e]),v=T.getSpacingUnits(d.voices[e]));return g(d.voices),i+=v,d.setWidth(a),{spacingUnits:i,minSpace:t}};function o(c){for(var s=0;s<c.length;s++)if(!T.layoutEnded(c[s]))return!1;return!0}function r(c){return c.durationindex-(c.children[c.i]&&c.children[c.i].duration>0?0:5e-7)}function n(c,s){return!c||!c.staff||!c.staff.voices||c.staff.voices.length===0||!s||!s.staff||!s.staff.voices||s.staff.voices.length===0?!1:c.staff.voices[0]===s.staff.voices[0]}return b0=p,b0}var y0,gn;function qi(){if(gn)return y0;gn=1;function T(r,n,c,s,l){var d=r.padding.left,f=0,u,i;for(u=0;u<c.length;u++)c[u].header&&(i=n.calc(c[u].header,"voicefont",""),f=Math.max(f,i.width));if(f=g(f,s,n),f=g(f,l,n),f){var t=n.calc("A","voicefont","");f+=t.width}d+=f;var a=0;return a=p(s,d,a),a=p(l,d,a),d+a}function g(r,n,c){if(n){for(var s=0;s<n.length;s++)if(n[s].header){var l=c.calc(n[s].header,"voicefont","");r=Math.max(r,l.width)}}return r}function p(r,n,c){if(r)for(var s=0;s<r.length;s++)o(n,r[s]),c=Math.max(c,r[s].getWidth());return c}function o(r,n){n.x=r}return y0=T,y0}var k0,vn;function so(){if(vn)return k0;vn=1;var T=qi();function g(o,r,n){var c=T(o,r.getTextSize,r.voices,r.brace,r.bracket),s=p(r,n.minPadding),l=s.totalDuration,d=s.minSpacing,f=d*l;n.minWidth&&(f=Math.max(f,n.minWidth));var u=n.minPadding?n.minPadding/2:2;r.startx=c,r.w=f+c;for(var i=0;i<r.voices.length;i++){var t=r.voices[i];t.startx=c,t.w=f+c;for(var a=c,e=!1,h=0,v=0;v<t.children.length;v++){var m=t.children[v];e||(m.duration!==0?(e=!0,h=(f+c-a)/l,r.gridStart=a):(m.x=a,a+=m.w+m.minspacing)),e&&(n.align==="center"?m.x=a+m.duration*h/2-m.w/2:m.duration===0?m.x=a+1-m.w:m.x=a+u-m.extraw,a+=m.duration*h);for(var x=0;x<m.children.length;x++){var C=m.children[x],S=C.dx?C.dx:0;C.x=m.x+S}}r.gridEnd=a}return f}function p(o,r){for(var n=0,c=0,s=0;s<o.voices.length;s++){for(var l=0,d=o.voices[s],f=0;f<d.children.length;f++){var u=d.children[f];if(l+=u.duration,u.duration){var i=(u.w+r)/u.duration;n=Math.max(n,i)}}c=Math.max(c,l)}return{totalDuration:c,minSpacing:n}}return k0=g,k0}var x0,bn;function oo(){if(bn)return x0;bn=1;var T=ro(),g=ao(),p=io(),o=qi(),r=so(),n=function(d,f,u,i,t,a){var e,h,v=u;for(e=0;e<f.lines.length;e++)if(h=f.lines[e],h.staff){var m;a!==void 0?m=r(d,h.staffGroup,a):m=c(d,v,i,h.staffGroup,f.formatting,e===f.lines.length-1,!1),Math.round(m)>Math.round(v)&&(v=m,t&&(e=-1))}for(e=0;e<f.lines.length;e++)if(h=f.lines[e],h.staffGroup&&h.staffGroup.voices){for(var x=0;x<h.staffGroup.voices.length;x++)T(h.staffGroup.voices[x]);g(d,h.staffGroup)}for(e=0;e<f.lines.length;e++)h=f.lines[e],h.staffGroup&&h.staffGroup.setHeight();return v},c=function(d,f,u,i,t,a,e){for(var h=o(d,i.getTextSize,i.voices,i.brace,i.bracket),v=u,m=0;m<8;m++){var x=p(v,d.minPadding,e,i,h);if(v=s(a,t.stretchlast,f+d.padding.left,i.w,v,x.spacingUnits,x.minSpace,d.padding.left+d.padding.right),v===null)break}return l(i.voices),i.w-h};function s(d,f,u,i,t,a,e,h){if(d)if(f===void 0){if(i/u<.66)return null}else{var v=1-(i+h)/u,m=v<f;if(!m)return null}if(Math.abs(u-i)<2)return null;var x=a*t,C=i-x;return a>0?(t=(u-C)/a,t*e>50&&(t=50/e),t):null}function l(d){for(var f=0;f<d.length;f++)for(var u=d[f],i=1;i<u.children.length-1;i++){var t=u.children[i];if(t.abcelem.rest&&(t.abcelem.rest.type==="whole"||t.abcelem.rest.type==="multimeasure")){var a=u.children[i-1],e=u.children[i+1];t.center(a,e)}}}return x0=n,x0}var w0,yn;function co(){if(yn)return w0;yn=1;var T=function(g){this.shouldAddClasses=g.shouldAddClasses,this.reset()};return T.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null},T.prototype.incrLine=function(){this.lineNumber===null?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},T.prototype.incrVoice=function(){this.voiceNumber===null?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},T.prototype.isInMeasure=function(){return this.measureNumber!==null},T.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null},T.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},T.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},T.prototype.incrNote=function(){this.noteNumber++},T.prototype.measureTotal=function(){for(var g=0,p=0;p<this.lineNumber;p++)g+=this.measureTotalPerLine[p]?this.measureTotalPerLine[p]:0;return this.measureNumber&&(g+=this.measureNumber),g},T.prototype.getCurrent=function(g){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}},T.prototype.generate=function(g){if(!this.shouldAddClasses)return"";var p=[];if(g&&g.length>0&&p.push(g),g==="abcjs-tab-number")return p.join(" ");if(g==="text instrument-name")return"abcjs-text abcjs-instrument-name";if(this.lineNumber!==null&&p.push("l"+this.lineNumber),this.measureNumber!==null&&p.push("m"+this.measureNumber),this.measureNumber!==null&&p.push("mm"+this.measureTotal()),this.voiceNumber!==null&&p.push("v"+this.voiceNumber),g&&(g.indexOf("note")>=0||g.indexOf("rest")>=0||g.indexOf("lyric")>=0)&&this.noteNumber!==null&&p.push("n"+this.noteNumber),p.length>0){p=p.join(" "),p=p.split(" ");for(var o=0;o<p.length;o++)p[o].indexOf("abcjs-")!==0&&p[o].length>0&&(p[o]="abcjs-"+p[o])}return p.join(" ")},w0=T,w0}var _0,kn;function lo(){if(kn)return _0;kn=1;var T=function(g,p){this.formatting=g,this.classes=p};return T.prototype.updateFonts=function(g){g.gchordfont&&(this.formatting.gchordfont=g.gchordfont),g.tripletfont&&(this.formatting.tripletfont=g.tripletfont),g.annotationfont&&(this.formatting.annotationfont=g.annotationfont),g.vocalfont&&(this.formatting.vocalfont=g.vocalfont)},T.prototype.getFamily=function(g){return g[0]==='"'&&g[g.length-1]==='"'?g.substring(1,g.length-1):g},T.prototype.calc=function(g,p){var o;typeof g=="string"?(o=this.formatting[g],o?o={face:o.face,size:Math.round(o.size*4/3),decoration:o.decoration,style:o.style,weight:o.weight,box:o.box}:o={face:"Arial",size:Math.round(48/3),decoration:"underline",style:"normal",weight:"normal"}):o={face:g.face,size:Math.round(g.size*4/3),decoration:g.decoration,style:g.style,weight:g.weight,box:g.box};var r=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;o.padding=o.size*r;var n={"font-size":o.size,"font-style":o.style,"font-family":this.getFamily(o.face),"font-weight":o.weight,"text-decoration":o.decoration,class:this.classes.generate(p)};return{font:o,attr:n}},_0=T,_0}var T0,xn;function ho(){if(xn)return T0;xn=1;var T=function(g,p){this.getFontAndAttr=g,this.svg=p};return T.prototype.updateFonts=function(g){this.getFontAndAttr.updateFonts(g)},T.prototype.attr=function(g,p){return this.getFontAndAttr.calc(g,p)},T.prototype.getFamily=function(g){return g[0]==='"'&&g[g.length-1]==='"'?g.substring(1,g.length-1):g},T.prototype.calc=function(g,p,o,r){var n;typeof p=="string"?n=this.attr(p,o):n={font:{face:p.face,size:p.size,decoration:p.decoration,style:p.style,weight:p.weight},attr:{"font-size":p.size,"font-style":p.style,"font-family":this.getFamily(p.face),"font-weight":p.weight,"text-decoration":p.decoration,class:this.getFontAndAttr.classes.generate(o)}};var c=this.svg.getTextSize(g,n.attr,r);return n.font.box?{height:c.height+n.font.padding*4,width:c.width+n.font.padding*4}:c},T.prototype.baselineToCenter=function(g,p,o,r,n){var c=this.calc(g,p,o).height,s=this.attr(p,o).font.size;return c*.5+(n-r-2)*s},T0=T,T0}var C0,wn;function He(){if(wn)return C0;wn=1;var T=function(){for(var g=0,p,o=arguments[g++],r=[],n,c,s,l;o;){if(n=/^[^\x25]+/.exec(o))r.push(n[0]);else if(n=/^\x25{2}/.exec(o))r.push("%");else if(n=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)){if((p=arguments[n[1]||g++])==null||p==null)throw"Too few arguments.";if(/[^s]/.test(n[7])&&typeof p!="number")throw"Expecting number but found "+typeof p;switch(n[7]){case"b":p=p.toString(2);break;case"c":p=String.fromCharCode(p);break;case"d":p=parseInt(p);break;case"e":p=n[6]?p.toExponential(n[6]):p.toExponential();break;case"f":p=n[6]?parseFloat(p).toFixed(n[6]):parseFloat(p);break;case"o":p=p.toString(8);break;case"s":p=(p=String(p))&&n[6]?p.substring(0,n[6]):p;break;case"u":p=Math.abs(p);break;case"x":p=p.toString(16);break;case"X":p=p.toString(16).toUpperCase();break}p=/[def]/.test(n[7])&&n[2]&&p>0?"+"+p:p,s=n[3]?n[3]=="0"?"0":n[3][1]:" ",l=n[5]-String(p).length,c=n[5]?str_repeat(s,l):"",r.push(n[4]?p+c:c+p)}else throw"Huh ?!";o=o.substring(n[0].length)}return r.join("")};return C0=T,C0}var E0,_n;function Ae(){if(_n)return E0;_n=1;function T(g){return parseFloat(g.toFixed(2))}return E0=T,E0}var S0,Tn;function Oe(){if(Tn)return S0;Tn=1;var T=Ae();function g(p,o,r){var n=o.y;if(o.phrases){var d=p.paper.richTextLine(o.phrases,o.x,o.y,o.klass,o.anchor);return d}if(o.lane){var c=o.dim.font.size*.25;n+=(o.dim.font.size+c)*o.lane}var s;o.dim?(s=o.dim,s.attr.class=o.klass):s=p.controller.getFontAndAttr.calc(o.type,o.klass),o.anchor&&(s.attr["text-anchor"]=o.anchor),o["dominant-baseline"]&&(s.attr["dominant-baseline"]=o["dominant-baseline"]),s.attr.x=o.x,s.attr.y=n,o.centerVertically||(s.attr.y+=s.font.size),o.type==="debugfont"&&(console.log("Debug msg: "+o.text),s.attr.stroke="#ff0000"),o.cursor&&(s.attr.cursor=o.cursor);var l;o.name=="free-text"?l=o.text.replace(/^[ \t]*\n/gm,`
|
|
37
|
+
`):l=o.text.replace(/\n\n/g,`
|
|
38
|
+
|
|
39
|
+
`),l=l.replace(/^\n/,`
|
|
40
|
+
`),s.font.box&&(r||p.paper.openGroup({klass:s.attr.class,fill:p.foregroundColor,"data-name":o.name}),s.attr["text-anchor"]==="end"?s.attr.x-=s.font.padding:s.attr["text-anchor"]==="start"&&(s.attr.x+=s.font.padding),s.attr.y+=s.font.padding,delete s.attr.class),o.noClass&&delete s.attr.class,s.attr.x=T(s.attr.x),s.attr.y=T(s.attr.y),o.name&&(s.attr["data-name"]=o.name);var d=p.paper.text(l,s.attr);if(s.font.box){var f=d.getBBox(),u=0;s.attr["text-anchor"]==="middle"?u=f.width/2+s.font.padding:s.attr["text-anchor"]==="end"&&(u=f.width+s.font.padding*2);var i=0;o.centerVertically&&(i=f.height-s.font.padding),p.paper.rect({"data-name":"box",x:Math.round(o.x-u),y:Math.round(n-i),width:Math.round(f.width+s.font.padding*2),height:Math.round(f.height+s.font.padding*2)}),r||(d=p.paper.closeGroup())}return d}return S0=g,S0}var M0,Cn;function uo(){if(Cn)return M0;Cn=1;var T=He(),g=_e(),p=Oe();function o(l,d,f){var u=d.startVoice.staff.absoluteY-g.STEP*10;return d.endVoice&&d.endVoice.staff?d.endY=d.endVoice.staff.absoluteY-g.STEP*2:d.lastContinuedVoice&&d.lastContinuedVoice.staff?d.endY=d.lastContinuedVoice.staff.absoluteY-g.STEP*2:d.endY=d.startVoice.staff.absoluteY-g.STEP*2,s(l,d.x,u,d.endY,d.type,d.header,f)}function r(l,d,f,u,i){d+=g.STEP;var t=g.STEP*.75,a=g.STEP*.75,e=u-f,h=T("M %f %f l %f %f l %f %f l %f %f z",d,f-a,0,e+a*2,t,0,0,-(e+a*2)),v=g.STEP*2,m=g.STEP;return h+=T("M %f %f q %f %f %f %f q %f %f %f %f z",d+t,f-a,v*.6,m*.2,v,-m,-v*.1,m*.3,-v,m+g.STEP),h+=T("M %f %f q %f %f %f %f q %f %f %f %f z",d+t,f+a+e,v*.6,-m*.2,v,m,-v*.1,-m*.3,-v,-m-g.STEP),l.paper.path({path:h,stroke:l.foregroundColor,fill:l.foregroundColor,class:l.controller.classes.generate(i),"data-name":i})}function n(l,d,f,u,i){var t=u-f,a=c(d,f,[7.5,-8,21,0,18.5,-10.5,7.5],[0,t/5.5,t/3.14,t/2,t/2.93,t/4.88,0]);return a+=c(d,f,[0,17.5,-7.5,6.6,-5,20,0],[t/2,t/1.46,t/1.22,t,t/1.19,t/1.42,t/2]),l.paper.path({path:a,stroke:l.foregroundColor,fill:l.foregroundColor,class:l.controller.classes.generate(i),"data-name":i})}function c(l,d,f,u){return T("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",l+f[0],d+u[0],l+f[1],d+u[1],l+f[2],d+u[2],l+f[3],d+u[3],l+f[4],d+u[4],l+f[5],d+u[5],l+f[6],d+u[6])}var s=function(l,d,f,u,i,t,a){var e;if(t){l.paper.openGroup({klass:l.controller.classes.generate("staff-extra voice-name"),"data-name":i});var h=f+(u-f)/2;h=h-l.controller.getTextSize.baselineToCenter(t,"voicefont","staff-extra voice-name",0,1),p(l,{x:l.padding.left,y:h,text:t,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return i==="brace"?e=n(l,d,f,u,i):i==="bracket"&&(e=r(l,d,f,u,i)),t&&(e=l.paper.closeGroup()),a.wrapSvgEl({el_type:i,startChar:-1,endChar:-1},e),e};return M0=o,M0}var A0,En;function Re(){if(En)return A0;En=1;function T(g,p,o){var r=g.paper.path(p);return r}return A0=T,A0}var N0,Sn;function fo(){if(Sn)return N0;Sn=1;var T=He(),g=Re(),p=Ae();function o(e,h,v){(!h.anchor1||!h.anchor2||!h.anchor1.heads||!h.anchor2.heads||h.anchor1.heads.length===0||h.anchor2.heads.length===0)&&window.console.error("Glissando Element not set.");var m=4,x=e.calcY(h.anchor1.heads[0].pitch),C=e.calcY(h.anchor2.heads[0].pitch),S=h.anchor1.x+h.anchor1.w/2,j=h.anchor2.x+h.anchor2.w/2,F=r(S,x,j,C),b=h.anchor1.w/2+m,M=h.anchor2.w/2+m,B=n(S,x,j,C),A=c(x,B,b);c(C,B,-M);var P=s(F-b-M),N=a(e,S+b,A,P,B);return v.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},N),[N]}function r(e,h,v,m){var x=v-e,C=m-h;return Math.sqrt(x*x+C*C)}function n(e,h,v,m){return(m-h)/(v-e)}function c(e,h,v){return p(e+v*h)}function s(e){var h=5;return Math.max(2,Math.floor((e-h*2)/6))}var l=[[3.5,-4.8]],d=[[1.5,-1],[.3,-.3],[-3.5,3.8]],f=[[-1.5,2]],u=[[3,4],[3,-4]],i=[[-3,4],[-3,-4]];function t(e,h){for(var v="",m=0;m<e.length;m++)v+="l"+e[m][0]+" "+c(e[m][1],h,e[m][0]);return v}var a=function(e,h,v,m,x){var C=T("M %f %f",h,v);C+=t(l,x);var S;for(S=0;S<m;S++)C+=t(u,x);for(C+=t(d,x),S=0;S<m;S++)C+=t(i,x);return C+=t(f,x)+"z",g(e,{path:C,highlight:"stroke",stroke:e.foregroundColor,class:e.controller.classes.generate("decoration"),"data-name":"glissando"})};return N0=o,N0}var B0,Mn;function po(){if(Mn)return B0;Mn=1;var T=He(),g=Re(),p=Ae();function o(n,c,s){c.pitch===void 0&&window.console.error("Crescendo Element y-coordinate not set.");var l=n.calcY(c.pitch)+4,d=8,f=c.anchor1?c.anchor1.x:0,u=c.anchor2?c.anchor2.x:800,i;return c.dir==="<"?i=r(n,l+d/2,l,l+d/2,l+d,f,u):i=r(n,l,l+d/2,l+d,l+d/2,f,u),s.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},i),[i]}var r=function(n,c,s,l,d,f,u){c=p(c),s=p(s),l=p(l),d=p(d),f=p(f),u=p(u);var i=T("M %f %f L %f %f M %f %f L %f %f",f,c,u,s,f,l,u,d);return g(n,{path:i,highlight:"stroke",stroke:n.foregroundColor,class:n.controller.classes.generate("dynamics decoration"),"data-name":"dynamics"})};return B0=o,B0}var P0,An;function Fr(){if(An)return P0;An=1;var T=Ae();function g(){this.ingroup=!1}g.prototype.beginGroup=function(o,r){this.paper=o,this.controller=r,this.path=[],this.lastM=[0,0],this.ingroup=!0,this.paper.openGroup()},g.prototype.isInGroup=function(){return this.ingroup},g.prototype.addPath=function(o){if(o=o||[],o.length!==0){o[0][0]="m",o[0][1]=T(o[0][1]-this.lastM[0]),o[0][2]=T(o[0][2]-this.lastM[1]),this.lastM[0]+=o[0][1],this.lastM[1]+=o[0][2],this.path.push(o[0]);for(var r=1,n=o.length;r<n;r++)o[r][0]==="m"&&(this.lastM[0]+=o[r][1],this.lastM[1]+=o[r][2]),this.path.push(o[r])}},g.prototype.endGroup=function(o,r){this.ingroup=!1;for(var n="",c=0;c<this.path.length;c++)n+=this.path[c].join(" ");this.path=[];var s=this.paper.closeGroup();return s&&(s.setAttribute("class",this.controller.classes.generate(o)),s.setAttribute("fill",this.controller.renderer.foregroundColor),s.setAttribute("stroke","none"),s.setAttribute("data-name",r)),s};var p=new g;return P0=p,P0}var L0,Nn;function Xi(){if(Nn)return L0;Nn=1;var T=Oe(),g=Le(),p=Fr();function o(n,c,s,l,d){var f,u;if(!l)return null;if(l.length>1&&l.indexOf(".")<0){var i=p.isInGroup()?"":d.klass;n.paper.openGroup({"data-name":d.name,klass:i});for(var t=0,a=0;a<l.length;a++){var e=l[a];u=g.getYCorr(e),f=g.printSymbol(c+t,n.calcY(s+u),e,n.paper,{stroke:d.stroke,fill:d.fill}),f?a<l.length-1&&(t+=r(e,l[a+1],g.getSymbolWidth(e))):T(n,{x:c,y:n.y,text:"no symbol:"+l,type:"debugfont",klass:"debug-msg",anchor:"start"},!1)}var h=n.paper.closeGroup();return h}else return u=g.getYCorr(l),p.isInGroup()?f=g.printSymbol(c,n.calcY(s+u),l,n.paper,{"data-name":d.name}):f=g.printSymbol(c,n.calcY(s+u),l,n.paper,{klass:d.klass,stroke:d.stroke,fill:d.fill,"data-name":d.name}),f||(T(n,{x:c,y:n.y,text:"no symbol:"+l,type:"debugfont",klass:"debug-msg",anchor:"start"},!1),null)}function r(n,c,s){var l=s;return n==="f"&&c==="f"&&(l=l*2/3),n==="p"&&c==="p"&&(l=l*5/6),n==="f"&&c==="z"&&(l=l*5/8),l}return L0=o,L0}var O0,Bn;function mo(){if(Bn)return O0;Bn=1;var T=Xi();function g(p,o,r){o.pitch===void 0&&window.console.error("Dynamic Element y-coordinate not set.");var n=1,c=1,s=T(p,o.anchor.x,o.pitch,o.dec,{scalex:n,scaley:c,klass:p.controller.classes.generate("decoration dynamics"),fill:p.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:o.dec},s),[s]}return O0=g,O0}var H0,Pn;function go(){if(Pn)return H0;Pn=1;var T=He(),g=Oe(),p=Re(),o=Ae();function r(s,l,d){s.paper.openGroup({klass:s.controller.classes.generate("triplet "+l.durationClass),"data-name":"triplet"}),l.hasBeam||c(s,l.anchor1.x,l.startNote,l.anchor2.x+l.anchor2.w,l.endNote),g(s,{x:l.xTextPos,y:s.calcY(l.yTextPos-1),text:""+l.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0,name:""+l.number},!0);var f=s.paper.closeGroup();return d.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},f),f}function n(s,l,d,f){return T("M %f %f L %f %f",o(s),o(l),o(d),o(f))}function c(s,l,d,f,u){d=s.calcY(d),u=s.calcY(u);var i=5,t="";t+=n(l,d,l,d+i),t+=n(f,u,f,u+i);var a=l+(f-l)/2,e=8,h=(u-d)/(f-l),v=a-e,m=d+(v-l)*h;t+=n(l,d,v,m);var x=a+e,C=d+(x-l)*h;t+=n(x,C,f,u),p(s,{path:t,stroke:s.foregroundColor,"data-name":"triplet-bracket"})}return H0=r,H0}var j0,Ln;function vo(){if(Ln)return j0;Ln=1;var T=He(),g=Oe(),p=Re(),o=Ae();function r(n,c,s,l,d){c.pitch===void 0&&window.console.error("Ending Element y-coordinate not set.");var f=o(n.calcY(c.pitch)),u=20,i="";c.anchor1&&(s=o(c.anchor1.x+c.anchor1.w),i+=T("M %f %f L %f %f ",s,f,s,o(f+u))),c.anchor2&&(l=o(c.anchor2.x),i+=T("M %f %f L %f %f ",l,f,l,o(f+u))),i+=T("M %f %f L %f %f ",s,f,l,f),n.paper.openGroup({klass:n.controller.classes.generate("ending"),fill:n.foregroundColor,"data-name":"ending"}),p(n,{path:i,stroke:n.foregroundColor,fill:n.foregroundColor,"data-name":"line"}),c.anchor1&&g(n,{x:o(s+5),y:o(n.calcY(c.pitch-.5)),text:c.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:c.text});var t=n.paper.closeGroup();return d.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},t),[t]}return j0=r,j0}var F0,On;function bo(){if(On)return F0;On=1;var T=He(),g=Ae();function p(n,c,s,l,d){o(c,s,l);var f="";c.anchor1?f+="abcjs-start-m"+c.anchor1.parent.counters.measure+"-n"+c.anchor1.parent.counters.note:f+="abcjs-start-edge",c.anchor2?f+=" abcjs-end-m"+c.anchor2.parent.counters.measure+"-n"+c.anchor2.parent.counters.note:f+=" abcjs-end-edge",c.hint&&(f="abcjs-hint");var u=c.fixedY?1.5:0,i=r(n,c.startX,c.endX,c.startY+u,c.endY+u,c.above,f,c.isTie,c.dotted),t=-1;c.anchor1&&!c.isTie&&(t=c.anchor1.parent.abcelem.startChar-1);var a=-1;return c.anchor2&&!c.isTie&&(a=c.anchor2.parent.abcelem.endChar+1),d.wrapSvgEl({el_type:"slur",startChar:t,endChar:a},i),[i]}var o=function(n,c,s){!n.anchor1||!n.anchor2||n.anchor1.pitch===n.anchor2.pitch&&n.internalNotes.length===0?n.isTie=!0:n.isTie=!1,n.isTie?(n.calcTieDirection(),n.calcX(c,s),n.calcTieY()):(n.calcSlurDirection(),n.calcX(c,s),n.calcSlurY()),n.avoidCollisionAbove()},r=function(n,c,s,l,d,f,u,i,t){var a=i?1.2:1.5;c=g(c+6),s=g(s+4),l=l+(f?a:-a),d=d+(f?a:-a);var e=g(n.calcY(l)),h=g(n.calcY(d)),v=s-c,m=h-e,x=Math.sqrt(v*v+m*m),C=v/x,S=m/x,j=x/3.5,F=i?10:25,b=(f?-1:1)*Math.min(F,Math.max(4,j)),M=g(c+j*C-b*S),B=g(e+j*S+b*C),A=g(s-j*C-b*S),P=g(h-j*S+b*C),N=2;u?u+=" slur":u="slur",u+=i?" tie":" legato";var E;if(t){u+=" dotted";var _=T("M %f %f C %f %f %f %f %f %f",c,e,M,B,A,P,s,h);E=n.paper.path({path:_,stroke:n.foregroundColor,fill:"none","stroke-dasharray":"5 5",class:n.controller.classes.generate(u),"data-name":i?"tie":"slur"})}else{var L=T("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",c,e,M,B,A,P,s,h,g(A-N*S),g(P+N*C),g(M-N*S),g(B+N*C),c,e);E=n.paper.path({path:L,stroke:"none",fill:n.foregroundColor,class:n.controller.classes.generate(u),"data-name":i?"tie":"slur"})}return E};return F0=p,F0}var D0,Hn;function yo(){if(Hn)return D0;Hn=1;var T=Re(),g=Ae();function p(c,s){if(s.beams.length!==0){for(var l="",d=0;d<s.beams.length;d++){var f=s.beams[d];if(f.split){for(var u=r(c,f.startX,f.startY,f.endX,f.endY),i=[],t=0;t<f.split.length;t+=2)i.push([f.split[t],f.split[t+1]]);for(t=0;t<i.length;t++){var a=n(f.startX,f.startY,u,i[t][0]),e=n(f.startX,f.startY,u,i[t][1]);l+=o(c,i[t][0],a,i[t][1],e,f.dy)}}else l+=o(c,f.startX,f.startY,f.endX,f.endY,f.dy)}var h=("abcjs-d"+s.duration).replace(/\./g,"-"),v=c.controller.classes.generate("beam-elem "+h),m=T(c,{path:l,stroke:"none",fill:c.foregroundColor,class:v});return[m]}}function o(c,s,l,d,f,u){l=g(c.calcY(l)),f=g(c.calcY(f)),s=g(s),d=g(d);var i=g(l+u),t=g(f+u);return"M"+s+" "+l+" L"+d+" "+f+"L"+d+" "+t+" L"+s+" "+i+"z"}function r(c,s,l,d,f){return(f-l)/(d-s)}function n(c,s,l,d){var f=d-c;return s+f*l}return D0=p,D0}var z0,jn;function Ki(){if(jn)return z0;jn=1;var T=Fr(),g=Ae();function p(o,r,n,c,s,l,d){if(n<0||c<s){var f=g(s);s=g(c),c=f}else c=g(c),s=g(s);r=g(r);var u=g(r+n);if(o.firefox112){r+=n/2;var i={x1:r,x2:r,y1:c,y2:s,stroke:o.foregroundColor,"stroke-width":Math.abs(n)};return l&&(i.class=l),d&&(i["data-name"]=d),o.paper.lineToBack(i)}for(var t=[["M",r,c],["L",r,s],["L",u,s],["L",u,c],["z"]],i={path:""},a=0;a<t.length;a++)i.path+=t[a].join(" ");return l&&(i.class=l),d&&(i["data-name"]=d),T.isInGroup()||(i.stroke="none",i.fill=o.foregroundColor),o.paper.pathToBack(i)}return z0=p,z0}var I0,Fn;function ko(){if(Fn)return I0;Fn=1;var T=He(),g=Ae();function p(o,r,n,c,s,l,d){var f=o.foregroundColor;r=g(r),n=g(n);var u=g(c-d),i=g(c+d);if(o.firefox112){c+=d/2;var t={x1:r,x2:n,y1:c,y2:c,stroke:o.foregroundColor,"stroke-width":Math.abs(d*2)};return s&&(t.class=s),l&&(t["data-name"]=l),o.paper.lineToBack(t)}var a=T("M %f %f L %f %f L %f %f L %f %f z",r,u,n,u,n,i,r,i),e={path:a,stroke:"none",fill:f};l&&(e["data-name"]=l),s&&(e.class=s);var h=o.paper.pathToBack(e);return h}return I0=p,I0}var V0,Dn;function Ui(){if(Dn)return V0;Dn=1;var T=ko();function g(p,o,r,n,c,s,l){var d=p.calcY(n);return T(p,o,r,d,c,s,l)}return V0=g,V0}var Y0,zn;function $i(){if(zn)return Y0;zn=1;var T=Oe(),g=Ki(),p=Ui(),o=Xi();function r(c,s,l){s.pitch===void 0&&window.console.error(s.type+" Relative Element y-coordinate not set.");var d=c.calcY(s.pitch);switch(s.type){case"symbol":if(s.c===null)return null;var f="symbol";s.klass&&(f+=" "+s.klass),s.graphelem=o(c,s.x,s.pitch,s.c,{scalex:s.scalex,scaley:s.scaley,klass:c.controller.classes.generate(f),name:s.name});break;case"debug":s.graphelem=T(c,{x:s.x,y:c.calcY(15),text:""+s.c,type:"debugfont",klass:c.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:s.dim},!1);break;case"tabNumber":var u="middle",i="tabnumberfont",t="abcjs-tab-number";s.isGrace&&(i="tabgracefont",d+=2.5,t="tab-grace"),s.graphelem=T(c,{x:s.x,y:d,text:""+s.c,type:i,klass:c.controller.classes.generate(t),anchor:u,centerVertically:!1,dim:s.dim,cursor:"default"},!1);break;case"barNumber":s.graphelem=T(c,{x:s.x,y:d,text:""+s.c,type:"measurefont",klass:c.controller.classes.generate("bar-number"),anchor:"middle",dim:s.dim,name:"bar-number"},!0);break;case"lyric":s.graphelem=T(c,{x:s.x,y:d,text:s.c,type:"vocalfont",klass:c.controller.classes.generate("lyric"),anchor:"middle",dim:s.dim,name:"lyric"},!1);break;case"chord":s.graphelem=T(c,{x:s.x,y:d,text:s.c,type:"gchordfont",klass:c.controller.classes.generate("chord"),anchor:"middle",dim:s.dim,lane:s.getLane(),name:"chord"},!1);break;case"decoration":s.graphelem=T(c,{x:s.x,y:d+6,text:s.c,type:"annotationfont",klass:c.controller.classes.generate("annotation"),anchor:s.anchor,centerVertically:!0,dim:s.dim},!1);break;case"text":s.graphelem=T(c,{x:s.x,y:d,text:s.c,type:"annotationfont",klass:c.controller.classes.generate("annotation"),anchor:"start",centerVertically:s.centerVertically,dim:s.dim,lane:s.getLane(),name:"annotation"},!1);break;case"multimeasure-text":s.graphelem=T(c,{x:s.x+s.w/2,y:d,text:s.c,type:"tempofont",klass:c.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:s.dim},!1);break;case"part":s.graphelem=T(c,{x:s.x,y:d,text:s.c,type:"partsfont",klass:c.controller.classes.generate("part"),anchor:"start",dim:s.dim,name:s.c},!0);break;case"bar":s.graphelem=g(c,s.x,s.linewidth+c.lineThickness,d,l||c.calcY(s.pitch2),null,"bar");break;case"stem":var a=s.linewidth>0?s.linewidth+c.lineThickness:s.linewidth-c.lineThickness;s.graphelem=g(c,s.x,a,d,c.calcY(s.pitch2),"abcjs-stem","stem");break;case"ledger":s.graphelem=p(c,s.x,s.x+s.w,s.pitch,"abcjs-ledger","ledger",.35+c.lineThickness);break}return s.scalex!==1&&s.graphelem&&n(c.paper,s.graphelem,s.scalex,s.scaley,s.x,d),s.graphelem}function n(c,s,l,d,f,u){c.setAttributeOnElement(s,{style:"transform:scale("+l+","+d+");transform-origin:"+f+"px "+u+"px;"})}return Y0=r,Y0}var R0,In;function xo(){if(In)return R0;In=1;var T=$i(),g=Oe();function p(o,r){var n=r.x;r.pitch===void 0&&window.console.error("Tempo Element y-coordinate not set."),r.tempo.el_type="tempo";var c=o.calcY(r.pitch)+2,s,l;if(r.tempo.preString){s=g(o,{x:n,y:c,text:r.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0),l=o.controller.getTextSize.calc(r.tempo.preString,"tempofont","tempo",s);var d=l.width,f=d/r.tempo.preString.length;n+=d+f}if(r.note){r.note.setX(n);for(var u=0;u<r.note.children.length;u++)T(o,r.note.children[u],n);n+=r.note.w+5;var i="= "+r.tempo.bpm;s=g(o,{x:n,y:c,text:i,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"beats"}),l=o.controller.getTextSize.calc(i,"tempofont","tempo",s);var t=l.width,a=t/i.length;n+=t+a}r.tempo.postString&&g(o,{x:n,y:c,text:r.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"post"},!0)}return R0=p,R0}var W0,Vn;function wo(){if(Vn)return W0;Vn=1;var T=xo(),g=$i(),p=_e(),o=Or(),r=Fr();function n(c,s,l,d,f){if(!s.invisible){var u=s.children.length>0&&s.children[0].type==="TempoElement";s.elemset=[],r.beginGroup(c.paper,c.controller);for(var i=0;i<s.children.length;i++){var t=s.children[i];switch(t.type){case"TempoElement":T(c,t);break;default:var a=g(c,t,l);t.type==="symbol"&&t.c&&t.c.indexOf("notehead")>=0&&a.setAttribute("class","abcjs-notehead")}}var e=s.type;if((s.type==="note"||s.type==="rest")&&(s.counters=c.controller.classes.getCurrent(),e+=" d"+Math.round(s.durationClass*1e3)/1e3,e=e.replace(/\./g,"-"),s.abcelem.pitches))for(var h=0;h<s.abcelem.pitches.length;h++)e+=" p"+s.abcelem.pitches[h].pitch;var v=r.endGroup(e,s.type);if(v){if(s.cloned&&(s.cloned.overrideClasses=v.className.baseVal),s.overrideClasses){var m=v.classList&&v.classList.length>0?v.classList[0]+" ":"";v.setAttribute("class",m+s.overrideClasses)}if(u)s.startChar=s.abcelem.startChar,s.endChar=s.abcelem.endChar,d.add(s,v,!1,f);else{s.elemset.push(v);var x=!1;(s.type==="note"||s.type==="tabNumber")&&(x=!0),d.add(s,v,x,f)}}else s.elemset.length>0&&d.add(s,s.elemset[0],s.type==="note",f);if(s.klass&&o(s.elemset,"mark","","#00ff00"),s.hint&&o(s.elemset,"abcjs-hint","",null),s.abcelem.abselem=s,s.heads&&s.heads.length>0){s.notePositions=[];for(var C=0;C<s.heads.length;C++)s.notePositions.push({x:s.heads[C].x+s.heads[C].w/2,y:f.zero-s.heads[C].pitch*p.STEP})}}}return W0=n,W0}var G0,Yn;function _o(){if(Yn)return G0;Yn=1;var T=fo(),g=po(),p=mo(),o=go(),r=vo(),n=bo(),c=yo(),s=Oe(),l=wo();function d(u,i,t,a,e){var h=i.w-1;u.staffbottom=i.staff.bottom;var v=u.foregroundColor;if(i.color&&(u.foregroundColor=i.color),i.header){var m=s(u,{x:u.padding.left,y:u.calcY(i.headerPosition),text:i.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0,name:"voice-name"},!0);a.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:i.header},m)}var x,C,S=!1;for(x=0;x<i.children.length;x++){C=i.children[x],(C.type==="note"||C.type==="rest")&&(S=!0);var j=!1;C.type!=="staff-extra"&&!u.controller.classes.isInMeasure()&&(u.controller.classes.startMeasure(),j=!0),i.staff.isTabStaff&&(C.invisible=!1,C.type=="bar"&&C.abcelem.lastBar&&(t=i.topLine)),l(u,C,i.barto||x===i.children.length-1?t:0,a,e),(C.type==="note"||f(C))&&u.controller.classes.incrNote(),C.type==="bar"&&!j&&S&&u.controller.classes.incrMeasure()}for(u.controller.classes.startMeasure(),x=0;x<i.beams.length;x++){var F=i.beams[x];F==="bar"?u.controller.classes.incrMeasure():c(u,F,a)}for(u.controller.classes.startMeasure(),x=0;x<i.otherchildren.length;x++)if(C=i.otherchildren[x],C==="bar")u.controller.classes.incrMeasure();else switch(C.type){case"GlissandoElem":C.elemset=T(u,C,a);break;case"CrescendoElem":C.elemset=g(u,C,a);break;case"DynamicDecoration":C.elemset=p(u,C,a);break;case"TripletElem":o(u,C,a);break;case"EndingElem":C.elemset=r(u,C,i.startx+10,h,a);break;case"TieElem":C.elemset=n(u,C,i.startx+10,h,a);break;default:console.log(C),l(u,C,i.startx+10,h,a,e)}u.foregroundColor=v}function f(u){return u.type!=="rest"?!1:!!(u.abcelem&&u.abcelem.rest&&u.abcelem.rest.type!=="spacer")}return G0=d,G0}var q0,Rn;function To(){if(Rn)return q0;Rn=1;var T=Ui();function g(p,o,r,n,c,s){var l="abcjs-top-line",d=2;c&&(d=c),p.paper.openGroup({prepend:!0,klass:p.controller.classes.generate("abcjs-staff")});var f=0,u=0;if(n===1)T(p,o,r,6,l,null,s+p.lineThickness),f=p.calcY(10),u=p.calcY(2);else for(var i=n-1;i>=0;i--){var t=(i+1)*d;u=p.calcY(t),f===0&&(f=u),T(p,o,r,t,l,null,s+p.lineThickness),l=void 0}return p.paper.closeGroup(),[f,u]}return q0=g,q0}var X0,Wn;function Co(){if(Wn)return X0;Wn=1;function T(g,p,o){var r=g.paper.rectBeneath(p);return o&&g.paper.text(o,{x:0,y:p.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),r}return X0=T,X0}var K0,Gn;function Eo(){if(Gn)return K0;Gn=1;function T(g,p){var o="rgba(0,0,0,255)",r="rgba(0,0,0,0)",n=Math.round(g.y),c=g.controller.width,s=(c-p)/2,l=s+p,d="M "+s+" "+n+" L "+l+" "+n+" L "+l+" "+(n+1)+" L "+s+" "+(n+1)+" L "+s+" "+n+" z";g.paper.pathToBack({path:d,stroke:r,fill:o,class:g.controller.classes.generate("defined-text")})}return K0=T,K0}var U0,qn;function Qi(){if(qn)return U0;qn=1;var T=Eo(),g=Oe();function p(o,r,n){for(var c=0;c<r.rows.length;c++){var s=r.rows[c];if(s.absmove)o.absolutemoveY(s.absmove);else if(s.move)o.moveY(s.move);else if(s.text||s.phrases){var l=s.left?s.left:0,d=g(o,{x:l,y:o.y,text:s.text,phrases:s.phrases,"dominant-baseline":s["dominant-baseline"],type:s.font,klass:s.klass,name:s.name,anchor:s.anchor});s.absElemType&&n.wrapSvgEl({el_type:s.absElemType,name:s.name,startChar:s.startChar,endChar:s.endChar,text:s.text},d)}else if(s.separator)T(o,s.separator);else if(s.startGroup)o.paper.openGroup({klass:s.klass,"data-name":s.name});else if(s.endGroup){var f=o.paper.closeGroup();s.absElemType&&n.wrapSvgEl({el_type:s.absElemType,name:s.name,startChar:s.startChar,endChar:s.endChar,text:""},f)}}}return U0=p,U0}var $0,Xn;function So(){if(Xn)return $0;Xn=1;var T=_e(),g=uo(),p=_o(),o=To(),r=Co(),n=Ki(),c=Qi();function s(f,u,i,t){for(var a,e=f.y,h=0;h<u.staffs.length;h++){var v=u.staffs[h];f.moveY(T.STEP,v.top),v.absoluteY=f.y,f.showDebug&&(f.showDebug.indexOf("box")>=0&&v.voices&&d(f,u.voices,v.voices),f.showDebug.indexOf("grid")>=0&&(f.paper.dottedLine({x1:f.padding.left,x2:f.padding.left+f.controller.width,y1:e,y2:e,stroke:"#0000ff"}),r(f,{x:f.padding.left,y:f.calcY(v.originalTop),width:f.controller.width,height:f.calcY(v.originalBottom)-f.calcY(v.originalTop),fill:f.foregroundColor,stroke:f.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),a=0,E(v,"chordHeightAbove"),E(v,"chordHeightBelow"),E(v,"dynamicHeightAbove"),E(v,"dynamicHeightBelow"),E(v,"endingHeightAbove"),E(v,"lyricHeightAbove"),E(v,"lyricHeightBelow"),E(v,"partHeightAbove"),E(v,"tempoHeightAbove"),E(v,"volumeHeightAbove"),E(v,"volumeHeightBelow"))),f.moveY(T.STEP,-v.bottom),f.showDebug&&f.showDebug.indexOf("grid")>=0&&f.paper.dottedLine({x1:f.padding.left,x2:f.padding.left+f.controller.width,y1:f.y,y2:f.y,stroke:"#0000aa"})}for(var m,x,C=2,S=0,j=0;j<u.voices.length;j++){var F=u.voices[j].staff,b=u.voices[j].tabNameInfos;if(f.y=F.absoluteY,f.controller.classes.incrVoice(),!u.voices[j].duplicate){if(m||(m=f.calcY(10)),x=f.calcY(C),F.lines!==0){F.linePitch&&(C=F.linePitch),f.controller.classes.newMeasure();var M=o(f,u.startx,u.w,F.lines,F.linePitch,.35);x=M[1],F.bottomLine=x,F.topLine=M[0],F.hasTab&&(S=F.topLine),F.hasStaff&&(S=F.hasStaff.topLine,u.voices[j].barto=!0,u.voices[j].topLine=m)}l(f,F.absoluteY,u.brace,j,i),l(f,F.absoluteY,u.bracket,j,i)}p(f,u.voices[j],S,i,{top:e,zero:f.y,height:u.height*T.STEP});var B=0;if(b){var A={rows:[]};A.rows.push({absmove:x+2});var P=8;A.rows.push({left:u.startx+P,text:b.name,font:"tablabelfont",klass:"text instrument-name",anchor:"start"}),A.rows.push({move:b.textSize.height}),c(f,A),B=b.textSize.height}f.controller.classes.newMeasure(),u.voices[j].duplicate||(S=f.calcY(2+B))}f.controller.classes.newMeasure();var N=u.staffs.length;N>1&&(m=u.staffs[0].topLine,x=u.staffs[N-1].bottomLine,n(f,u.startx,.6,m,x,null)),f.y=e;function E(_,L){var D=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(_.positionY&&_.positionY[L]){var H=_.specialY[L]*T.STEP;L==="chordHeightAbove"&&_.specialY.chordLines&&_.specialY.chordLines.above&&(H*=_.specialY.chordLines.above),L==="chordHeightBelow"&&_.specialY.chordLines&&_.specialY.chordLines.below&&(H*=_.specialY.chordLines.below),r(f,{x:f.padding.left,y:f.calcY(_.positionY[L]),width:f.controller.width,height:H,fill:D[a],stroke:D[a],"fill-opacity":.4,"stroke-opacity":.4},L.substr(0,4)),a+=1,a>6&&(a=0)}}}function l(f,u,i,t,a){if(i)for(var e=0;e<i.length;e++)i[e].isStartVoice(t)&&(i[e].startY=u-T.STEP*10,i[e].elemset=g(f,i[e],a))}function d(f,u,i){for(var t=0;t<i.length;t++)for(var a=u[i[t]].children,e=0;e<a.length;e++){var h=a[e],v=h.getFixedCoords();if(!(h.invisible||v.t===void 0||v.b===void 0)){var m=(v.t-v.b)*T.STEP;r(f,{x:v.x,y:f.calcY(v.t),width:v.w,height:m,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var x=0;x<h.children.length;x++){var C=h.children[x],S=C.getChordDim();if(S){var j=f.calcY(C.pitch);j+=C.dim.font.size*C.getLane(),r(f,{x:S.left,y:j,width:S.right-S.left,height:C.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}return $0=s,$0}var Q0,Kn;function Mo(){if(Kn)return Q0;Kn=1;function T(g,p,o,r){var n=(p+g.padding.left+g.padding.right)*o,c=(g.y+g.padding.bottom)*o;if(g.isPrint&&(c=Math.max(c,1056)),g.ariaLabel!==""){var s="Sheet Music";g.abctune&&g.abctune.metaText&&g.abctune.metaText.title&&(s+=' for "'+g.abctune.metaText.title+'"'),g.paper.setTitle(s);var l=g.ariaLabel?g.ariaLabel:s;g.paper.setAttribute("aria-label",l)}var d=["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"];g.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+d.join(" ")+"}");var f={overflow:"hidden"};r==="resize"?g.paper.setResponsiveWidth(n,c):(f.width="",f.height=c+"px",o<1?(f.width=n+"px",g.paper.setSize(n/o,c/o)):g.paper.setSize(n,c)),g.paper.setScale(o),g.paper.setParentStyles(f)}return Q0=T,Q0}var J0,Un;function Ao(){if(Un)return J0;Un=1;var T=Di(),g=zi();function p(o,r,n){this.elements=[],this.paper=o,this.tuneNumber=n,this.selectTypes=r}return p.prototype.getElements=function(){return this.elements},p.prototype.add=function(o,r,n,c){if(this.canSelect(o)){var s;this.selectTypes===void 0?s={selectable:!1,"data-index":this.elements.length}:s={selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(r,s);var l={absEl:o,svgEl:r,isDraggable:n};c!==void 0&&(l.staffPos=c),this.elements.push(l)}},p.prototype.canSelect=function(o){return this.selectTypes===!1||!o||!o.abcelem?!1:this.selectTypes===!0?!0:this.selectTypes===void 0?o.abcelem.el_type==="note"||o.abcelem.el_type==="tabNumber":this.selectTypes.indexOf(o.abcelem.el_type)>=0},p.prototype.wrapSvgEl=function(o,r){var n={tuneNumber:this.tuneNumber,abcelem:o,elemset:[r],highlight:T,unhighlight:g};this.add(n,r,!1)},J0=p,J0}var Z0,$n;function No(){if($n)return Z0;$n=1;var T=So(),g=Mo(),p=Qi(),o=_e(),r=Ao();function n(l,d,f,u,i,t,a,e,h,v){var m=new r(l.paper,e,h),x={};d.shouldAddClasses&&(x.klass="abcjs-meta-top"),l.paper.openGroup(x),l.moveY(l.padding.top),p(l,f.topText,m),l.paper.closeGroup(),l.moveY(l.spacing.music);for(var C=[],S=0,j=0;j<f.lines.length;j++){d.incrLine();var F=f.lines[j];if(F.staff){if(S++,f.formatting.maxStaves&&S>f.formatting.maxStaves)break;d.shouldAddClasses&&(x.klass="abcjs-staff-wrapper abcjs-l"+d.lineNumber),l.paper.openGroup(x),F.vskip&&l.moveY(F.vskip),C.length>=1&&s(l,l.spacing.staffSeparation,C[C.length-1],F.staffGroup);var b=c(l,F.staffGroup,m,j);b.line=v+j,C.push(b),l.paper.closeGroup()}else F.nonMusic&&(d.shouldAddClasses&&(x.klass="abcjs-non-music"),l.paper.openGroup(x),p(l,F.nonMusic,m),l.paper.closeGroup())}return d.reset(),f.bottomText&&f.bottomText.rows&&f.bottomText.rows.length>0&&(d.shouldAddClasses&&(x.klass="abcjs-meta-bottom"),l.paper.openGroup(x),l.moveY(24),p(l,f.bottomText,m),l.paper.closeGroup()),g(l,i,a,t),{staffgroups:C,selectables:m.getElements()}}function c(l,d,f,u){T(l,d,f,u);var i=d.height*o.STEP;return l.y+=i,d}function s(l,d,f,u){var i=f.staffs[f.staffs.length-1],t=-(i.bottom-2),a=u.staffs[0].top-10,e=a+t,h=e*o.STEP;h<d&&l.moveY(d-h)}return Z0=n,Z0}var er,Qn;function Bo(){if(Qn)return er;Qn=1;var T=Gi();function g(p){for(var o=p;o&&o.attributes&&o.tagName.toLowerCase()!=="svg"&&!o.attributes.selectable;)o=o.parentNode;if(o&&o.attributes&&o.attributes.selectable){var r=o.attributes["data-index"].nodeValue;if(r&&(r=parseInt(r,10),r>=0&&r<this.selectables.length)){var n=this.selectables[r],c=T(n,p);return c.index=r,c.element=n,c}}return null}return er=g,er}var tr,Jn;function Ji(){if(Jn)return tr;Jn=1;var T=_e(),g=Gs(),p=Xs(),o=Ks(),r=Us(),n=$s(),c=Qs(),s=Js(),l=Zs(),d=oo(),f=co(),u=lo(),i=ho(),t=No(),a=Yi(),e=Bo(),h=function(x,C){C=C||{},this.findSelectableElement=e,this.oneSvgPerLine=C.oneSvgPerLine,this.selectionColor=C.selectionColor,this.dragColor=C.dragColor?C.dragColor:C.selectionColor,this.dragging=!!C.dragging,this.selectTypes=C.selectTypes,this.responsive=C.responsive,this.space=3*T.SPACE,this.initialClef=C.initialClef,this.timeBasedLayout=C.timeBasedLayout,this.expandToWidest=!!C.expandToWidest,this.scale=C.scale?parseFloat(C.scale):0,this.classes=new f({shouldAddClasses:C.add_classes}),this.scale>.1||(this.scale=void 0),C.staffwidth?(this.staffwidthScreen=C.staffwidth,this.staffwidthPrint=C.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],C.clickListener&&this.addSelectListener(C.clickListener),this.renderer=new p(x),this.renderer.setPaddingOverride(C),C.showDebug&&(this.renderer.showDebug=C.showDebug),C.jazzchords&&(this.jazzchords=C.jazzchords),C.accentAbove&&(this.accentAbove=C.accentAbove),C.germanAlphabet&&(this.germanAlphabet=C.germanAlphabet),C.lineThickness&&(this.lineThickness=C.lineThickness),this.renderer.controller=this,this.renderer.foregroundColor=C.foregroundColor?C.foregroundColor:"currentColor",C.ariaLabel!==void 0&&(this.renderer.ariaLabel=C.ariaLabel),this.renderer.minPadding=C.minPadding?C.minPadding:0,this.reset()};h.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0,this.lineThickness&&this.renderer.setLineThickness(this.lineThickness)},h.prototype.engraveABC=function(x,C,S){x[0]===void 0&&(x=[x]),this.reset();for(var j=0;j<x.length;j++)C===void 0&&(C=j),this.getFontAndAttr=new u(x[j].formatting,this.classes),this.getTextSize=new i(this.getFontAndAttr,this.renderer.paper),this.engraveTune(x[j],C,S)},h.prototype.adjustNonScaledItems=function(x){this.width/=x,this.renderer.adjustNonScaledItems(x)},h.prototype.getMeasureWidths=function(x){this.reset(),this.getFontAndAttr=new u(x.formatting,this.classes),this.getTextSize=new i(this.getFontAndAttr,this.renderer.paper);var C=this.jazzchords;this.setupTune(x,0),this.constructTuneElements(x),d(this.renderer,x,0,this.space,this.timeBasedLayout);for(var S=[],j,F=!0,b=0;b<x.lines.length;b++){var M=x.lines[b];if(M.staff){if(F&&(j={left:0,measureWidths:[],total:0},S.push(j),F=!1),M.staffGroup.voices.length>0)for(var B=M.staffGroup.voices[0],A=!1,P=0,N=0;N<B.children.length;N++){var E=B.children[N];!A&&!E.isClef&&!E.isKeySig&&(A=!0,j.left=E.x,P=E.x),E.type==="bar"&&(j.measureWidths.push(E.x-P),j.total+=E.x-P,P=E.x)}}else F=!0}return this.jazzchords=C,S},h.prototype.setupTune=function(x,C){this.classes.reset(),x.formatting.jazzchords!==void 0&&(this.jazzchords=x.formatting.jazzchords),x.formatting.accentAbove!==void 0&&(this.accentAbove=x.formatting.accentAbove),this.renderer.newTune(x),this.engraver=new g(this.getTextSize,C,{bagpipes:x.formatting.bagpipes,flatbeams:x.formatting.flatbeams,graceSlurs:x.formatting.graceSlurs!==!1,percmap:x.formatting.percmap,initialClef:this.initialClef,jazzchords:this.jazzchords,timeBasedLayout:this.timeBasedLayout,accentAbove:this.accentAbove,germanAlphabet:this.germanAlphabet}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=x.getMeterFraction().num/x.getMeterFraction().den,x.formatting.staffwidth?this.width=x.formatting.staffwidth*1.33:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var S=x.formatting.scale?x.formatting.scale:this.scale;return this.responsive==="resize"&&(S=void 0),S===void 0&&(S=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(S),S},h.prototype.constructTuneElements=function(x){x.topText=new c(x.metaText,x.metaTextInfo,x.formatting,x.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize);var C,S,j=!1,F=!1;for(C=0;C<x.lines.length;C++)if(S=x.lines[C],S.staff)F=!0,S.staffGroup=this.engraver.createABCLine(S.staff,j?null:x.metaText.tempo,C),j=!0;else if(S.subtitle){if(F){var b=this.width/2+this.renderer.padding.left;S.nonMusic=new n(this.renderer.spacing.subtitle,x.formatting,S.subtitle,b,this.renderer.padding.left,this.getTextSize)}}else S.text!==void 0?(F=!0,S.nonMusic=new o(S.text,S.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):S.separator!==void 0&&S.separator.lineLength&&(F=!0,S.nonMusic=new r(S.separator.spaceAbove,S.separator.lineLength,S.separator.spaceBelow));x.bottomText=new s(x.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize)},h.prototype.engraveTune=function(x,C,S){var j=this.jazzchords,F=this.setupTune(x,C);this.constructTuneElements(x);var b=d(this.renderer,x,this.width,this.space,this.expandToWidest,this.timeBasedLayout);if(this.expandToWidest&&b>this.width+1&&(x.topText=new c(x.metaText,x.metaTextInfo,x.formatting,x.lines,b,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),x.lines&&x.lines.length>0))for(var M=x.lines.length,B=0;B<M;++B){var A=x.lines[B];if(A.nonMusic&&A.nonMusic.rows&&A.nonMusic.rows.length>0)for(var P=A.nonMusic.rows.length,N=0;N<P;++N){var E=A.nonMusic.rows[N];E.left&&(A.subtitle?E.left=b/2+this.renderer.padding.left:A.text&&A.text.length>0&&A.text[0].center&&(E.left=b/2+this.renderer.padding.left))}}x.tablatures&&a.layoutTablatures(this.renderer,x);var _=t(this.renderer,this.classes,x,this.width,b,this.responsive,F,this.selectTypes,C,S);if(this.staffgroups=_.staffgroups,this.selectables=_.selectables,this.oneSvgPerLine){var L=this.renderer.paper.svg.parentNode;this.svgs=v(this.renderer,L,x.metaText.title,this.responsive,F)}else this.svgs=[this.renderer.paper.svg];l(this,this.svgs),this.jazzchords=j};function v(x,C,S,j,F){S||(S="Untitled");var b=C.querySelector("svg");j==="resize"&&(C.style.paddingBottom="");for(var M=b.querySelector("style"),B=j==="resize"?b.viewBox.baseVal.width:b.getAttribute("width"),A=C.querySelectorAll("svg > g"),P=0,N=[],E=0;E<A.length;E++){var _=A[E],L=_.getBBox(),D=L.y-P,H=L.height+D,y=document.createElement("div"),k="overflow: hidden;";j!=="resize"&&(k+="height:"+H*F+"px;"),y.setAttribute("style",k);var w=m(b),O='Sheet Music for "'+S+'" section '+(E+1);w.setAttribute("aria-label",O),j!=="resize"&&w.setAttribute("height",H),j==="resize"&&(w.style.position="");var z=x.firefox112?H+1:H;w.setAttribute("viewBox","0 "+P+" "+B+" "+z),w.appendChild(M.cloneNode(!0));var V=document.createElement("title");V.innerText=O,w.appendChild(V),w.appendChild(_),y.appendChild(w),N.push(w),C.appendChild(y),P=L.y+L.height}return C.removeChild(b),N}function m(x){for(var C="http://www.w3.org/2000/svg",S=document.createElementNS(C,"svg"),j=0;j<x.attributes.length;j++){var F=x.attributes[j];F.name!=="height"&&F.name!="aria-label"&&S.setAttribute(F.name,F.value)}return S}return h.prototype.getDim=function(x){if(!x.dim){var C=x.svgEl.getBBox();x.dim={left:Math.round(C.x),top:Math.round(C.y),right:Math.round(C.x+C.width),bottom:Math.round(C.y+C.height)}}return x.dim},h.prototype.addSelectListener=function(x){this.listeners[this.listeners.length]=x},tr=h,tr}var rr,Zn;function Zi(){if(Zn)return rr;Zn=1;var T=We();Hi();var g=Ji(),p=ji(),o=Pi(),r={};function n(){var d=window.innerWidth;for(var f in r)if(r.hasOwnProperty(f)){var u=r[f],i=u.offsetLeft;d-=i*2,u.style.width=d+"px"}}try{window.addEventListener("resize",n),window.addEventListener("orientationChange",n)}catch{}function c(d,f,u,i,t){u.viewportHorizontal?(d.innerHTML='<div class="abcjs-inner"></div>',u.scrollHorizontal?(d.style.overflowX="auto",d.style.overflowY="hidden"):d.style.overflow="hidden",r[d.id]=d,d=d.children[0]):u.viewportVertical?(d.innerHTML='<div class="abcjs-inner scroll-amount"></div>',d.style.overflowX="hidden",d.style.overflowY="auto",d=d.children[0]):d.innerHTML="";var a=new g(d,u);if(a.engraveABC(f,i,t),f.engraver=a,u.viewportVertical||u.viewportHorizontal){var e=d.parentNode;e.style.width=d.style.width}}var s=function(d,f,u,i,t){var a={},e;if(u){for(e in u)u.hasOwnProperty(e)&&(a[e]=u[e]);a.warnings_id&&a.tablature&&(a.tablature.warning_id=a.warnings_id)}if(i)for(e in i)i.hasOwnProperty(e)&&(e==="listener"?i[e].highlight&&(a.clickListener=i[e].highlight):a[e]=i[e]);if(t)for(e in t)t.hasOwnProperty(e)&&(a[e]=t[e]);function h(v,m,x,C){var S=!1;return v==="*"&&(S=!0,v=document.createElement("div"),v.setAttribute("style","visibility: hidden;"),document.body.appendChild(v)),!S&&a.wrap&&a.staffwidth?(m=l(v,m,x,C,a),m):(a.afterParsing&&a.afterParsing(m,x,C),c(v,m,a,x,0),S&&v.parentNode.removeChild(v),null)}return T.renderEngine(h,d,f,a)};function l(d,f,u,i,t){var a=new g(d,t),e=a.getMeasureWidths(f),h=o.calcLineWraps(f,e,t);if(h.reParse){var v=new p;v.parse(i,h.revisedParams),f=v.getTune();var m=v.getWarnings();m&&(f.warnings=m)}return t.afterParsing&&t.afterParsing(f,u,i),c(d,f,h.revisedParams,u,0),f.explanation=h.explanation,f}return rr=s,rr}var ar,ei;function Po(){if(ei)return ar;ei=1;var T=We(),g=Ji(),p=function(o,r){function n(c,s,l,d){c=document.createElement("div"),c.setAttribute("style","visibility: hidden;"),document.body.appendChild(c);var f=new g(c,r),u=f.getMeasureWidths(s);return c.parentNode.removeChild(c),{sections:u}}return T.renderEngine(n,"*",o,r)};return ar=p,ar}var nr,ti;function Dr(){if(ti)return nr;ti=1;var T={};return nr=T,nr}var ir,ri;function Lo(){if(ri)return ir;ri=1;var T=Dr(),g=function(p,o,r,n){T[o]||(T[o]={});var c=T[o];return c[r]||(c[r]=new Promise(function(s,l){var d=new XMLHttpRequest;let f=p+o+"-mp3/"+r+".mp3";d.open("GET",f,!0),d.responseType="arraybuffer",d.onload=function(){if(d.status!==200){l(Error("Can't load sound at "+f+" status="+d.status));return}var u=function(t){s({instrument:o,name:r,status:"loaded",audioBuffer:t})},i=n.decodeAudioData(d.response,u,function(){l(Error("Can't decode sound at "+f))});i&&typeof i.catch=="function"&&i.catch(l)},d.onerror=function(){l(Error("Can't load sound at "+f))},d.send()}).catch(s=>{throw console.error("Didn't load note",o,r,":",s.message),s})),c[r]};return ir=g,ir}var sr,ai;function zr(){if(ai)return sr;ai=1;var T=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];return sr=T,sr}var or,ni;function Oo(){if(ni)return or;ni=1;var T=zr(),g=function(p){for(var o=[],r=0;r<p.tracks.length;r++)o.push([]);var n=T[0];return p.tracks.forEach(function(c,s){c.forEach(function(l){switch(l.cmd){case"note":var d=l.instrument!==void 0?T[l.instrument]:n;if(l.duration>0){var f=l.gap?l.gap:0,u=l.duration;f=Math.min(f,u*2/3);var i={pitch:l.pitch,instrument:d,start:Math.round(l.start*1e6)/1e6,end:Math.round((l.start+u-f)*1e6)/1e6,volume:l.volume};l.startChar&&(i.startChar=l.startChar),l.endChar&&(i.endChar=l.endChar),l.style&&(i.style=l.style),l.cents&&(i.cents=l.cents),o[s].push(i)}break;case"program":n=T[l.instrument];break;case"text":break;default:console.log("Unhandled midi event",l)}})}),o};return or=g,or}var cr,ii;function Ge(){if(ii)return cr;ii=1;function T(g){if(g)window.abcjsAudioContext=g;else if(!window.abcjsAudioContext){var p=window.AudioContext||window.webkitAudioContext;if(p)window.abcjsAudioContext=new p;else return!1}return window.abcjsAudioContext.state!=="suspended"}return cr=T,cr}var lr,si;function Fe(){if(si)return lr;si=1;var T=Ge();function g(){return window.abcjsAudioContext||T(),window.abcjsAudioContext}return lr=g,lr}var hr,oi;function qe(){if(oi)return hr;oi=1;var T=Fe();function g(){if(!window.Promise||!window.AudioContext&&!window.webkitAudioContext&&!navigator.mozAudioContext&&!navigator.msAudioContext)return!1;var p=T();if(p)return p.resume!==void 0}return hr=g,hr}var ur,ci;function Ir(){if(ci)return ur;ci=1;var T={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"};return ur=T,ur}var dr,li;function Ho(){if(li)return dr;li=1;var T=function(p){return window.URL.createObjectURL(g(p.audioBuffers))};function g(p){var o=p[0],r=o.numberOfChannels,n=o.length*r*2+44,c=new ArrayBuffer(n),s=new DataView(c),l=[],d,f,u=0,i=0;for(a(1179011410),a(n-8),a(1163280727),a(544501094),a(16),t(1),t(r),a(o.sampleRate),a(o.sampleRate*2*r),t(r*2),t(16),a(1635017060),a(n-i-4),d=0;d<r;d++)l.push(o.getChannelData(d));for(;i<n;){for(d=0;d<l.length;d++)f=Math.max(-1,Math.min(1,l[d][u])),f=(.5+f<0?f*32768:f*32767)|0,s.setInt16(i,f,!0),i+=2;u++}return new Blob([c],{type:"audio/wav"});function t(e){s.setUint16(i,e,!0),i+=2}function a(e){s.setUint32(i,e,!0),i+=4}}return dr=T,dr}var fr,hi;function es(){if(hi)return fr;hi=1;function T(g){return Math.pow(2,g/1200)}return fr=T,fr}var pr,ui;function jo(){if(ui)return pr;ui=1;var T=Dr(),g=Ir(),p=es();function o(n,c,s,l,d,f,u,i,t){var a=window.OfflineAudioContext||window.webkitOfflineAudioContext,e=s.len*s.tempoMultiplier;f&&(e+=f/1e3),e-=i,e<0&&(e=.005);var h=new a(2,Math.floor((e+u)*c),c),v=g[s.pitch];if(!T[s.instrument])return t&&t("placeNote skipped (instrument empty): "+s.instrument+":"+v),Promise.resolve();var m=T[s.instrument][v];return m?m.then(function(x){var C=h.createBufferSource();C.buffer=x.audioBuffer;var S=s.volume/96*d;C.gainNode=h.createGain(),s.pan&&h.createStereoPanner&&(C.panNode=h.createStereoPanner(),C.panNode.pan.setValueAtTime(s.pan,0)),C.gainNode.gain.value=S,C.gainNode.gain.linearRampToValueAtTime(C.gainNode.gain.value,e),C.gainNode.gain.linearRampToValueAtTime(0,e+u),s.cents&&(C.playbackRate.value=p(s.cents)),C.panNode?(C.panNode.connect(h.destination),C.gainNode.connect(C.panNode)):C.gainNode.connect(h.destination),C.connect(C.gainNode),C.start(0),C.noteOff?C.noteOff(e+u):C.stop(e+u);var j;return h.oncomplete=function(F){if(F.renderedBuffer&&F.renderedBuffer.getChannelData)for(var b=0;b<l.length;b++){var M=l[b]*s.tempoMultiplier;f&&(M-=f/1e3),M<0&&(M=0),M=Math.floor(M*c),r(n,F.renderedBuffer,M)}t&&t("placeNote: "+s.instrument+":"+v),j()},h.startRendering(),new Promise(function(F){j=F})}).catch(function(x){return t&&t("placeNote catch: "+x.message),Promise.reject(x)}):(t&&t("placeNote skipped: "+s.instrument+":"+v),Promise.resolve())}var r=function(n,c,s){for(var l=0;l<2;l++)for(var d=c.getChannelData(l),f=n.getChannelData(l),u=0;u<d.length;u++)f[u+s]+=d[u]};return pr=o,pr}var mr,di;function Vr(){if(di)return mr;di=1;var T=Lo(),g=Oo(),p=Ge(),o=Fe(),r=qe(),n=Ir(),c=zr(),s=Ho(),l=jo(),d=Dr(),f="MIDI is not supported in this browser.",u="https://paulrosen.github.io/midi-js-soundfonts/abcjs/",i="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/",t="https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/";function a(){var e=this;e.audioBufferPossible=void 0,e.directSource=[],e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.audioBuffers=[],e.duration=void 0,e.isRunning=!1,e.options={},e.pickupLength=0,e.init=function(m){m||(m={}),m.options&&(e.options=m.options),p(m.audioContext);var x=o().currentTime;if(e.debugCallback=m.debugCallback,e.debugCallback&&e.debugCallback("init called"),e.audioBufferPossible=e._deviceCapable(),!e.audioBufferPossible)return Promise.reject({status:"NotSupported",message:f});var C=m.options?m.options:{};e.soundFontUrl=C.soundFontUrl?C.soundFontUrl:i,e.soundFontUrl[e.soundFontUrl.length-1]!=="/"&&(e.soundFontUrl+="/"),C.soundFontVolumeMultiplier||C.soundFontVolumeMultiplier===0?e.soundFontVolumeMultiplier=C.soundFontVolumeMultiplier:e.soundFontUrl===i||e.soundFontUrl===t?e.soundFontVolumeMultiplier=3:e.soundFontUrl===u?e.soundFontVolumeMultiplier=.4:e.soundFontVolumeMultiplier=1,C.programOffsets?e.programOffsets=C.programOffsets:e.soundFontUrl===u?e.programOffsets={bright_acoustic_piano:20,honkytonk_piano:20,electric_piano_1:30,electric_piano_2:30,harpsichord:40,clavinet:20,celesta:20,glockenspiel:40,vibraphone:30,marimba:35,xylophone:30,tubular_bells:35,dulcimer:30,drawbar_organ:20,percussive_organ:25,rock_organ:20,church_organ:40,reed_organ:40,accordion:40,harmonica:40,acoustic_guitar_nylon:20,acoustic_guitar_steel:30,electric_guitar_jazz:25,electric_guitar_clean:15,electric_guitar_muted:35,overdriven_guitar:25,distortion_guitar:20,guitar_harmonics:30,electric_bass_finger:15,electric_bass_pick:30,fretless_bass:40,violin:105,viola:50,cello:40,contrabass:60,trumpet:10,trombone:90,alto_sax:20,tenor_sax:20,clarinet:20,flute:50,banjo:50,woodblock:20}:e.programOffsets={};var S=C.fadeLength!==void 0?parseInt(C.fadeLength,10):NaN;if(e.fadeLength=isNaN(S)?200:S,S=C.noteEnd!==void 0?parseInt(C.noteEnd,10):NaN,e.noteEnd=isNaN(S)?0:S,e.pan=C.pan,e.meterSize=1,m.visualObj){e.flattened=m.visualObj.setUpAudio(C);var j=m.visualObj.getMeterFraction();j.den&&(e.meterSize=m.visualObj.getMeterFraction().num/m.visualObj.getMeterFraction().den),e.pickupLength=m.visualObj.getPickupLength()}else if(m.sequence)e.flattened=m.sequence;else return Promise.reject(new Error("Must pass in either a visualObj or a sequence"));e.millisecondsPerMeasure=m.millisecondsPerMeasure?m.millisecondsPerMeasure:m.visualObj?m.visualObj.millisecondsPerMeasure(e.flattened.tempo):1e3,e.beatsPerMeasure=m.visualObj?m.visualObj.getBeatsPerMeasure():4,e.sequenceCallback=C.sequenceCallback,e.callbackContext=C.callbackContext,e.onEnded=C.onEnded,e.meterFraction=m.visualObj?m.visualObj.getMeterFraction():{den:1};var F={},b=[],M=[],B=c[0];e.flattened.tracks.forEach(function(_){_.forEach(function(L){if(L.cmd==="program"&&c[L.instrument]&&(B=c[L.instrument]),L.pitch!==void 0){var D=L.pitch,H=n[D],y=L.instrument!==void 0?c[L.instrument]:B;if(H)if(F[y]||(F[y]={}),!d[y]||!d[y][H])F[y][H]=!0;else{var k=y+":"+H;b.indexOf(k)<0&&b.push(k)}else{var w=y+":"+H;console.log("Can't find note: ",D,w),M.indexOf(w)<0&&M.push(w)}}})}),e.debugCallback&&e.debugCallback("note gathering time = "+Math.floor((o().currentTime-x)*1e3)+"ms"),x=o().currentTime;var A=[];Object.keys(F).forEach(function(_){Object.keys(F[_]).forEach(function(L){A.push({instrument:_,note:L})})}),e.debugCallback&&e.debugCallback("notes "+JSON.stringify(A));for(var P=[],N=256,E=0;E<A.length;E+=N)P.push(A.slice(E,E+N));return new Promise(function(_,L){var D={cached:b,error:M,loaded:[]},H=0,y=function(){e.debugCallback&&e.debugCallback("loadBatch idx="+H+" len="+P.length),H<P.length?e._loadBatch(P[H],e.soundFontUrl,x).then(function(k){e.debugCallback&&e.debugCallback("loadBatch then"),x=o().currentTime,k&&(k.error&&(D.error=D.error.concat(k.error)),k.loaded&&(D.loaded=D.loaded.concat(k.loaded))),H++,y()},L):(e.debugCallback&&e.debugCallback("resolve init"),_(D))};y()})},e._loadBatch=function(m,x,C,S){var j=[];return m.forEach(function(F){e.debugCallback&&e.debugCallback("getNote "+F.instrument+":"+F.note),j.push(T(x,F.instrument,F.note,o()))}),Promise.all(j).then(function(F){e.debugCallback&&e.debugCallback("mp3 load time = "+Math.floor((o().currentTime-C)*1e3)+"ms");for(var b=[],M=[],B=[],A=[],P=0;P<F.length;P++){var N=F[P],E=N.instrument+":"+N.name;N.status==="loaded"?b.push(E):N.status==="pending"?B.push(E):N.status==="cached"?M.push(E):A.push(E+" "+N.message)}if(B.length>0){if(e.debugCallback&&e.debugCallback("pending "+JSON.stringify(B)),S?S=S*2:S=50,S<9e4)return new Promise(function(D,H){setTimeout(function(){var y=[];for(P=0;P<B.length;P++)E=B[P].split(":"),y.push({instrument:E[0],note:E[1]});e.debugCallback&&e.debugCallback("retry "+JSON.stringify(y)),e._loadBatch(y,x,C,S).then(function(k){D(k)}).catch(function(k){H(k)})},S)});for(var _=[],L=0;L<m.length;L++)_.push(m[L].instrument+"/"+m[L].note);return e.debugCallback&&e.debugCallback("loadBatch timeout"),Promise.reject(new Error("timeout attempting to load: "+_.join(", ")))}else return e.debugCallback&&e.debugCallback("loadBatch resolve"),Promise.resolve({loaded:b,cached:M,error:A})}).catch(function(F){e.debugCallback&&e.debugCallback("loadBatch catch "+F.message)})},e.prime=function(){var m=e.fadeLength/1e3;return e.isRunning=!1,e.audioBufferPossible?(e.debugCallback&&e.debugCallback("prime called"),new Promise(function(x,C){try{let D=function(H){var y=H&&H.audioBuffers&&H.audioBuffers.length>0?H.audioBuffers[0].duration:0;return{status:o().state,duration:y}};var S=o().currentTime,j=e.millisecondsPerMeasure/1e3/e.meterSize;if(e.duration=e.flattened.totalDuration*j,e.duration<=0)return e.audioBuffers=[],x({status:"empty",seconds:0});e.duration+=m;var F=Math.floor(o().sampleRate*e.duration);e.stop();var b=g(e.flattened);e.options.swing&&v(b,e.options.swing,e.meterFraction,e.pickupLength),e.sequenceCallback&&e.sequenceCallback(b,e.callbackContext);var M=h(b.length,e.pan),B={};b.forEach(function(H,y){var k=M&&M.length>y?M[y]:0;H.forEach(function(w){var O=w.instrument+":"+w.pitch+":"+w.volume+":"+Math.round((w.end-w.start)*1e3)/1e3+":"+k+":"+j+":"+(w.cents?w.cents:0);e.debugCallback&&e.debugCallback("noteMapTrack "+O),B[O]||(B[O]=[]),B[O].push(w.start)})});for(var A=[],P=o().createBuffer(2,F,o().sampleRate),N=0;N<Object.keys(B).length;N++){var E=Object.keys(B)[N],_=E.split(":"),L=_[6]!==void 0?parseFloat(_[6]):0;_={instrument:_[0],pitch:parseInt(_[1],10),volume:parseInt(_[2],10),len:parseFloat(_[3]),pan:parseFloat(_[4]),tempoMultiplier:parseFloat(_[5]),cents:L},A.push(l(P,o().sampleRate,_,B[E],e.soundFontVolumeMultiplier,e.programOffsets[_.instrument],m,e.noteEnd/1e3,e.debugCallback))}e.audioBuffers=[P],e.debugCallback&&(e.debugCallback("sampleRate = "+o().sampleRate),e.debugCallback("totalSamples = "+F),e.debugCallback("creationTime = "+Math.floor((o().currentTime-S)*1e3)+"ms")),Promise.all(A).then(function(){o().state==="suspended"?o().resume().then(function(){x(D(e))}):o().state==="interrupted"?o().suspend().then(function(){o().resume().then(function(){x(D(e))})}):x(D(e))}).catch(function(H){C(H)})}catch(D){C(D)}})):Promise.reject(new Error(f))};function h(m,x){if(x==null)return null;var C=[];if(x.length){for(var S=0;S<m;S++)if(S<x.length){var j=parseFloat(x[S]);j<-1?j=-1:j>1&&(j=1),C.push(j)}else C.push(0);return C}else{var F=parseFloat(x);if(F*(m-1)>2)return null;for(var b=m%2===0,M=b?0-F/2:0,B=M+F,A=0;A<m;A++)b=A%2===0,b?(C.push(M),M-=F):(C.push(B),B+=F);return C}}e.start=function(){if(!e.audioBufferPossible)throw new Error(f);e.debugCallback&&e.debugCallback("start called");var m=e.pausedTimeSec?e.pausedTimeSec:0;e._kickOffSound(m),e.startTimeSec=o().currentTime-m,e.pausedTimeSec=void 0,e.debugCallback&&e.debugCallback("MIDI STARTED",e.startTimeSec)},e.pause=function(){if(!e.audioBufferPossible)throw new Error(f);return e.debugCallback&&e.debugCallback("pause called"),e.pausedTimeSec=e.stop(),e.pausedTimeSec},e.resume=function(){e.start()},e.seek=function(m,x){var C;switch(x){case"seconds":C=m;break;case"beats":C=m*e.millisecondsPerMeasure/e.beatsPerMeasure/1e3;break;default:C=(e.duration-e.fadeLength/1e3)*m;break}if(!e.audioBufferPossible)throw new Error(f);e.debugCallback&&e.debugCallback("seek called sec="+C),e.isRunning?(e.stop(),e._kickOffSound(C)):e.pausedTimeSec=C,e.pausedTimeSec=C},e.stop=function(){e.isRunning=!1,e.pausedTimeSec=void 0,e.directSource.forEach(function(x){try{x.stop()}catch(C){console.log("direct source didn't stop:",C)}}),e.directSource=[];var m=o().currentTime-e.startTimeSec;return m},e.finished=function(){e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.isRunning=!1},e.download=function(){return s(e)},e.getAudioBuffer=function(){return e.audioBuffers[0]},e.getIsRunning=function(){return e.isRunning},e._deviceCapable=function(){return r()?!0:(console.warn(f),e.debugCallback&&e.debugCallback(f),!1)},e._kickOffSound=function(m){e.isRunning=!0,e.directSource=[],e.audioBuffers.forEach(function(x,C){e.directSource[C]=o().createBufferSource(),e.directSource[C].buffer=x,e.directSource[C].connect(o().destination)}),e.directSource.forEach(function(x){x.start(0,m)}),e.onEnded&&(e.directSource[0].onended=function(){e.onEnded(e.callbackContext)})};function v(m,x,C,S){if(!(C.den!=4&&C.den!=8)&&(x=parseFloat(x),!(isNaN(x)||x<=50))){x>75&&(x=75),x=x/50-1;var j=0,F=.25;C.den===8&&(F=F/2);for(var b=F/2,M=b*x,B=0;B<m.length;B++)for(var A=m[B],P=0;P<A.length;P++){var N=A[P];if((N.start-S)%b==0&&(N.start-S)%F!=0&&(P==0||A[P-1].start<=A[P].start-b)&&(P==A.length-1||A[P+1].start>=A[P].start+b)){var E=N.start;N.start+=M,N.volume*=1+j,P>0&&A[P-1].end==E&&(A[P-1].end=N.start,A[P-1].volume*=1-j)}}}}}return mr=a,mr}var gr,fi;function ts(){if(fi)return gr;fi=1;var T=function(){var g=this;g.tracks=[],g.totalDuration=0,g.currentInstrument=[],g.starts=[],g.addTrack=function(){return g.tracks.push([]),g.currentInstrument.push(0),g.starts.push(0),g.tracks.length-1},g.setInstrument=function(p,o){g.tracks[p].push({channel:0,cmd:"program",instrument:o}),g.currentInstrument[p]=o},g.appendNote=function(p,o,r,n,c){var s={cmd:"note",duration:r,gap:0,instrument:g.currentInstrument[p],pitch:o,start:g.starts[p],volume:n};c&&(s.cents=c),g.tracks[p].push(s),g.starts[p]+=r,g.totalDuration=Math.max(g.totalDuration,g.starts[p])}};return gr=T,gr}var vr,pi;function Fo(){if(pi)return vr;pi=1;var T=`
|
|
41
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" preserveAspectRatio="xMidYMid meet">
|
|
42
|
+
<g transform="translate(0,700) scale(0.1,-0.1)" >
|
|
43
|
+
<path d="M3111 6981 c-20 -37 -90 -55 -364 -96 -120 -18 -190 -33 -244 -55
|
|
44
|
+
-42 -17 -124 -42 -182 -56 -78 -18 -119 -34 -157 -60 -28 -19 -86 -46 -128
|
|
45
|
+
-60 -43 -13 -107 -42 -144 -64 -37 -23 -84 -46 -106 -52 -21 -7 -56 -29 -79
|
|
46
|
+
-50 -22 -22 -61 -50 -86 -63 -26 -13 -67 -40 -91 -60 -24 -20 -65 -47 -90 -60
|
|
47
|
+
-25 -13 -53 -31 -61 -41 -8 -9 -32 -30 -54 -46 -75 -54 -486 -460 -512 -507
|
|
48
|
+
-15 -25 -48 -69 -75 -98 -26 -28 -48 -57 -48 -63 0 -6 -18 -29 -39 -53 -21
|
|
49
|
+
-23 -56 -71 -77 -107 -20 -36 -50 -80 -65 -97 -16 -18 -33 -52 -40 -75 -12
|
|
50
|
+
-47 -47 -115 -84 -166 -13 -18 -30 -56 -38 -83 -8 -27 -34 -80 -56 -118 -33
|
|
51
|
+
-53 -46 -91 -62 -167 -12 -63 -34 -127 -59 -179 -42 -84 -60 -166 -60 -270 0
|
|
52
|
+
-90 26 -122 125 -154 54 -17 96 -19 430 -20 305 -1 381 2 430 14 82 22 140 51
|
|
53
|
+
153 78 6 12 22 47 37 77 14 30 38 77 54 103 15 27 34 73 40 103 7 30 28 78 48
|
|
54
|
+
107 19 28 44 74 55 101 10 28 34 67 53 87 18 20 49 61 68 90 19 30 44 63 57
|
|
55
|
+
74 13 11 36 40 52 65 59 94 232 270 306 313 20 11 57 37 82 58 25 20 70 52
|
|
56
|
+
100 72 30 19 66 47 79 61 13 14 49 35 80 46 30 12 80 37 111 56 31 19 95 45
|
|
57
|
+
143 58 48 12 110 37 139 55 63 40 127 55 323 76 83 9 208 28 279 41 156 29
|
|
58
|
+
165 29 330 4 453 -71 514 -84 606 -130 31 -16 83 -36 116 -45 32 -9 84 -34
|
|
59
|
+
115 -56 31 -21 82 -48 113 -60 32 -11 72 -33 89 -48 18 -16 59 -45 92 -65 33
|
|
60
|
+
-21 74 -51 90 -66 17 -15 49 -40 73 -54 52 -32 65 -61 50 -113 -8 -31 -61 -90
|
|
61
|
+
-277 -308 -300 -303 -361 -382 -369 -481 -2 -29 0 -66 6 -81 13 -40 88 -138
|
|
62
|
+
115 -151 12 -6 54 -26 92 -44 l70 -33 945 -2 c520 -1 975 2 1012 7 64 8 191
|
|
63
|
+
50 231 76 11 7 33 34 50 60 22 34 42 51 65 58 l32 9 0 1101 0 1102 -32 9 c-21
|
|
64
|
+
7 -44 26 -64 55 -60 84 -77 97 -140 110 -44 9 -76 10 -127 2 -59 -9 -77 -17
|
|
65
|
+
-134 -62 -37 -28 -172 -155 -301 -281 -129 -127 -249 -237 -267 -245 -25 -10
|
|
66
|
+
-41 -11 -71 -2 -58 15 -112 45 -124 69 -6 11 -35 35 -64 54 -28 18 -58 41 -66
|
|
67
|
+
50 -8 9 -41 35 -75 58 -33 22 -77 56 -99 75 -21 18 -64 46 -95 61 -31 14 -73
|
|
68
|
+
39 -93 55 -20 15 -70 40 -110 55 -40 15 -97 44 -127 64 -29 21 -78 44 -107 53
|
|
69
|
+
-30 8 -77 31 -105 51 -42 28 -73 39 -173 60 -68 14 -154 39 -196 58 -95 43
|
|
70
|
+
-131 51 -343 76 -209 24 -242 32 -279 70 l-30 29 -328 0 c-312 0 -330 -1 -339
|
|
71
|
+
-19z"></path>
|
|
72
|
+
<path d="M254 2875 c-89 -16 -107 -26 -145 -78 -32 -44 -62 -66 -91 -67 -17 0
|
|
73
|
+
-18 -61 -18 -1140 l0 -1140 24 0 c16 0 41 -17 72 -50 40 -42 61 -55 117 -72
|
|
74
|
+
l69 -21 82 23 c44 12 96 30 114 39 18 9 148 132 290 272 141 141 267 261 279
|
|
75
|
+
268 51 26 86 14 176 -61 32 -26 62 -48 66 -48 5 0 36 -25 70 -55 34 -30 74
|
|
76
|
+
-61 89 -69 15 -8 37 -28 50 -45 12 -17 50 -45 84 -62 34 -17 78 -44 98 -60 19
|
|
77
|
+
-16 61 -37 93 -48 32 -11 81 -37 107 -56 27 -20 76 -45 109 -56 33 -12 75 -31
|
|
78
|
+
93 -44 62 -45 93 -58 191 -82 54 -12 130 -37 168 -54 68 -29 180 -58 226 -59
|
|
79
|
+
62 0 183 -64 183 -96 0 -12 88 -14 639 -14 l639 0 12 30 c18 44 76 66 233 89
|
|
80
|
+
89 14 160 30 200 47 34 15 106 42 159 60 54 18 112 44 130 57 47 35 85 52 146
|
|
81
|
+
67 29 7 76 28 105 48 29 20 77 48 107 63 30 15 66 39 80 54 14 15 50 40 81 56
|
|
82
|
+
31 15 78 46 104 69 26 22 61 46 79 54 17 7 43 26 56 42 14 16 41 41 60 56 64
|
|
83
|
+
48 380 362 408 405 15 23 40 51 55 63 15 12 36 38 46 58 11 21 37 57 58 82 22
|
|
84
|
+
25 49 62 62 83 13 20 38 56 57 78 19 23 50 74 69 113 19 39 46 86 59 104 14
|
|
85
|
+
18 34 62 46 98 12 36 32 77 45 92 31 38 60 97 80 167 9 33 26 76 37 95 29 50
|
|
86
|
+
47 103 68 206 10 52 32 117 51 155 29 56 33 74 34 140 0 94 -10 108 -101 138
|
|
87
|
+
-61 20 -83 21 -463 21 -226 0 -421 -4 -451 -10 -63 -12 -86 -30 -110 -85 -10
|
|
88
|
+
-22 -33 -63 -52 -92 -21 -31 -42 -80 -53 -123 -11 -44 -32 -93 -56 -128 -20
|
|
89
|
+
-32 -47 -83 -59 -115 -12 -32 -37 -77 -56 -100 -19 -23 -50 -65 -69 -94 -19
|
|
90
|
+
-29 -44 -57 -54 -63 -11 -5 -29 -27 -42 -47 -52 -85 -234 -277 -300 -315 -25
|
|
91
|
+
-15 -53 -38 -62 -51 -9 -14 -42 -39 -74 -57 -32 -18 -75 -48 -95 -66 -21 -18
|
|
92
|
+
-59 -44 -85 -58 -26 -13 -72 -40 -100 -59 -35 -24 -78 -41 -128 -52 -47 -11
|
|
93
|
+
-99 -31 -139 -56 -69 -42 -94 -49 -391 -110 -245 -51 -425 -66 -595 -50 -168
|
|
94
|
+
16 -230 27 -330 61 -47 16 -123 35 -170 44 -98 17 -123 25 -172 58 -20 14 -71
|
|
95
|
+
37 -114 53 -44 15 -95 40 -115 56 -20 16 -70 42 -110 59 -40 16 -88 45 -108
|
|
96
|
+
63 -20 19 -55 46 -78 61 -24 14 -49 35 -55 47 -7 11 -34 33 -60 49 -50 31 -65
|
|
97
|
+
61 -53 102 4 13 130 147 281 298 236 238 277 283 299 335 15 32 35 71 46 86
|
|
98
|
+
12 18 19 44 19 76 0 42 -8 63 -53 138 -92 151 11 139 -1207 141 -798 2 -1030
|
|
99
|
+
0 -1086 -11z"></path>
|
|
100
|
+
</g>
|
|
101
|
+
</svg>
|
|
102
|
+
`;return vr=T,vr}var br,mi;function Do(){if(mi)return br;mi=1;var T=`
|
|
103
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-play-svg">
|
|
104
|
+
<g>
|
|
105
|
+
<polygon points="4 0 23 12.5 4 25"/>
|
|
106
|
+
</g>
|
|
107
|
+
</svg>
|
|
108
|
+
`;return br=T,br}var yr,gi;function zo(){if(gi)return yr;gi=1;var T=`
|
|
109
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-pause-svg">
|
|
110
|
+
<g>
|
|
111
|
+
<rect width="8.23" height="25"/>
|
|
112
|
+
<rect width="8.23" height="25" x="17"/>
|
|
113
|
+
</g>
|
|
114
|
+
</svg>
|
|
115
|
+
`;return yr=T,yr}var kr,vi;function Io(){if(vi)return kr;vi=1;var T=`
|
|
116
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="abcjs-loading-svg">
|
|
117
|
+
<circle cx="50" cy="50" fill="none" stroke-width="20" r="35" stroke-dasharray="160 55"></circle>
|
|
118
|
+
</svg>
|
|
119
|
+
`;return kr=T,kr}var xr,bi;function Vo(){if(bi)return xr;bi=1;var T=`
|
|
120
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25">
|
|
121
|
+
<g>
|
|
122
|
+
<polygon points="5 12.5 24 0 24 25"/>
|
|
123
|
+
<rect width="3" height="25" x="0" y="0"/>
|
|
124
|
+
</g>
|
|
125
|
+
</svg>
|
|
126
|
+
`;return xr=T,xr}var wr,yi;function rs(){if(yi)return wr;yi=1;var T=qe(),g=Ge(),p=Fe(),o=Fo(),r=Do(),n=zo(),c=Io(),s=Vo();function l(t,a){var e=this;if(typeof t=="string"){var h=t;if(t=document.querySelector(h),!t)throw new Error('Cannot find element "'+h+'" in the DOM.')}else if(!(t instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(e.parent=t,e.options={},a&&(e.options=Object.assign({},a)),e.options.ac&&g(e.options.ac),d(e.parent,e.options),i(e),e.disable=function(m){var x=e.parent.querySelector(".abcjs-inline-audio");m?x.classList.add("abcjs-disabled"):x.classList.remove("abcjs-disabled")},e.setWarp=function(m,x){var C=e.parent.querySelector(".abcjs-midi-tempo");C.value=Math.round(x),e.setTempo(m)},e.setTempo=function(m){var x=e.parent.querySelector(".abcjs-midi-current-tempo");x&&(x.innerHTML=Math.round(m))},e.resetAll=function(){for(var m=e.parent.querySelectorAll(".abcjs-pushed"),x=0;x<m.length;x++){var C=m[x];C.classList.remove("abcjs-pushed")}},e.pushPlay=function(m){var x=e.parent.querySelector(".abcjs-midi-start");x&&(m?x.classList.add("abcjs-pushed"):x.classList.remove("abcjs-pushed"))},e.pushLoop=function(m){var x=e.parent.querySelector(".abcjs-midi-loop");x&&(m?x.classList.add("abcjs-pushed"):x.classList.remove("abcjs-pushed"))},e.setProgress=function(m,x){var C=e.parent.querySelector(".abcjs-midi-progress-background"),S=e.parent.querySelector(".abcjs-midi-progress-indicator");if(!(!C||!S)){var j=C.clientWidth,F=j*m;S.style.left=F+"px";var b=e.parent.querySelector(".abcjs-midi-clock");if(b){var M=x*m/1e3,B=Math.floor(M/60),A=Math.floor(M%60),P=A<10?"0"+A:A;b.innerHTML=B+":"+P}}},e.options.afterResume){var v=!1;e.options.ac?v=e.options.ac.state!=="suspended":p()&&(v=p().state!=="suspended"),v&&e.options.afterResume()}}function d(t,a){var e=!!a.loopHandler,h=!!a.restartHandler,v=!!a.playHandler||!!a.playPromiseHandler,m=!!a.progressHandler,x=!!a.warpHandler,C=a.hasClock!==!1,S=`<div class="abcjs-inline-audio">
|
|
127
|
+
`;if(e){var j=a.repeatTitle?a.repeatTitle:"Click to toggle play once/repeat.",F=a.repeatAria?a.repeatAria:j;S+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+j+'" aria-label="'+F+'">'+o+`</button>
|
|
128
|
+
`}if(h){var b=a.restartTitle?a.restartTitle:"Click to go to beginning.",M=a.restartAria?a.restartAria:b;S+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+b+'" aria-label="'+M+'">'+s+`</button>
|
|
129
|
+
`}if(v){var B=a.playTitle?a.playTitle:"Click to play/pause.",A=a.playAria?a.playAria:B;S+='<button type="button" class="abcjs-midi-start abcjs-btn" title="'+B+'" aria-label="'+A+'">'+r+n+c+`</button>
|
|
130
|
+
`}if(m){var P=a.randomTitle?a.randomTitle:"Click to change the playback position.",N=a.randomAria?a.randomAria:P;S+='<button type="button" class="abcjs-midi-progress-background" title="'+P+'" aria-label="'+N+`"><span class="abcjs-midi-progress-indicator"></span></button>
|
|
131
|
+
`}if(C&&(S+=`<span class="abcjs-midi-clock"></span>
|
|
132
|
+
`),x){var E=a.warpTitle?a.warpTitle:"Change the playback speed.",_=a.warpAria?a.warpAria:E,L=a.bpm?a.bpm:"BPM";S+='<span class="abcjs-tempo-wrapper"><label><input class="abcjs-midi-tempo" type="number" min="1" max="300" value="100" title="'+E+'" aria-label="'+_+'">%</label><span> (<span class="abcjs-midi-current-tempo"></span> '+L+`)</span></span>
|
|
133
|
+
`}S+='<div class="abcjs-css-warning" style="font-size: 12px;color:red;border: 1px solid red;text-align: center;width: 300px;margin-top: 4px;font-weight: bold;border-radius: 4px;">CSS required: load abcjs-audio.css</div>',S+=`</div>
|
|
134
|
+
`,t.innerHTML=S}function f(t,a,e,h,v){var m=!0;if(p()?m=p().state==="suspended":g(),!T())throw{status:"NotSupported",message:"This browser does not support audio."};(m||v)&&e&&e.classList.add("abcjs-loading"),m?p().resume().then(function(){h?h().then(function(x){u(t,a,e,v)}):u(t,a,e,v)}):u(t,a,e,v)}function u(t,a,e,h){h?t(a).then(function(){e&&e.classList.remove("abcjs-loading")}):(t(a),e&&e.classList.remove("abcjs-loading"))}function i(t){var a=!!t.options.loopHandler,e=!!t.options.restartHandler,h=!!t.options.playHandler||!!t.options.playPromiseHandler,v=!!t.options.progressHandler,m=!!t.options.warpHandler,x=t.parent.querySelector(".abcjs-midi-start");a&&t.parent.querySelector(".abcjs-midi-loop").addEventListener("click",function(C){f(t.options.loopHandler,C,x,t.options.afterResume)}),e&&t.parent.querySelector(".abcjs-midi-reset").addEventListener("click",function(C){f(t.options.restartHandler,C,x,t.options.afterResume)}),h&&x.addEventListener("click",function(C){f(t.options.playPromiseHandler||t.options.playHandler,C,x,t.options.afterResume,!!t.options.playPromiseHandler)}),v&&t.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",function(C){f(t.options.progressHandler,C,x,t.options.afterResume)}),m&&t.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",function(C){f(t.options.warpHandler,C,x,t.options.afterResume)})}return wr=l,wr}var _r,ki;function Yo(){if(ki)return _r;ki=1;var T=ts(),g=Vr(),p=Fe();function o(n,c,s,l,d){for(var f=new T,u=0;u<n.length;u++){var i=n[u],t=f.addTrack();if(f.setInstrument(t,i.instrument),u===0&&c)for(var a=0;a<c.length;a++){var e=c[a];f.appendNote(t,e.pitch,1/64,e.volume,e.cents)}f.appendNote(t,i.pitch,i.duration,i.volume,i.cents)}var h=p();return h.state==="suspended"?h.resume().then(function(){return r(f,s,l,d)}):r(f,s,l,d)}function r(n,c,s,l){var d=new g;return d.init({sequence:n,millisecondsPerMeasure:c,options:{soundFontUrl:s},debugCallback:l}).then(function(){return d.prime()}).then(function(){return d.start(),Promise.resolve()})}return _r=o,_r}var Tr,xi;function as(){if(xi)return Tr;xi=1;var T=rs(),g=Vr(),p=Br(),o=Fe();function r(){var n=this;n.warp=100,n.cursorControl=null,n.visualObj=null,n.timer=null,n.midiBuffer=null,n.options=null,n.currentTempo=null,n.control=null,n.isLooping=!1,n.isStarted=!1,n.isLoaded=!1,n.isLoading=!1,n.load=function(s,l,d){d||(d={}),d.displayPlay===void 0&&(d.displayPlay=!0),d.displayProgress===void 0&&(d.displayProgress=!0),n.control=new T(s,{loopHandler:d.displayLoop?n.toggleLoop:void 0,restartHandler:d.displayRestart?n.restart:void 0,playPromiseHandler:d.displayPlay?n.play:void 0,progressHandler:d.displayProgress?n.randomAccess:void 0,warpHandler:d.displayWarp?n.onWarp:void 0,afterResume:n.init}),n.cursorControl=l,n.disable(!0)},n.disable=function(s){n.control&&n.control.disable(s)},n.setTune=function(s,l,d){return n.visualObj=s,n.disable(!1),n.options=d||{},n.control&&(n.pause(),n.setProgress(0,1),n.control.resetAll(),n.restart(),n.isStarted=!1),n.isLooping=!1,l?n.go():Promise.resolve({status:"no-audio-context"})},n.go=function(){n.isLoading=!0;var s=n.visualObj.millisecondsPerMeasure()*100/n.warp;n.currentTempo=Math.round(n.visualObj.getBeatsPerMeasure()/s*6e4),n.control&&n.control.setTempo(n.currentTempo),n.percent=0;var l;return n.midiBuffer||(n.midiBuffer=new g),o().resume().then(function(d){return n.midiBuffer.init({visualObj:n.visualObj,options:n.options,millisecondsPerMeasure:s})}).then(function(d){return l=d,n.midiBuffer.prime()}).then(function(){var d=16;return n.cursorControl&&n.cursorControl.beatSubdivisions!==void 0&&parseInt(n.cursorControl.beatSubdivisions,10)>=1&&parseInt(n.cursorControl.beatSubdivisions,10)<=64&&(d=parseInt(n.cursorControl.beatSubdivisions,10)),n.timer=new p(n.visualObj,{beatCallback:n.beatCallback,eventCallback:n.eventCallback,lineEndCallback:n.lineEndCallback,qpm:n.currentTempo,extraMeasuresAtBeginning:n.cursorControl?n.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:n.cursorControl?n.cursorControl.lineEndAnticipation:0,beatSubdivisions:d}),n.cursorControl&&n.cursorControl.onReady&&typeof n.cursorControl.onReady=="function"&&n.cursorControl.onReady(n),n.isLoaded=!0,n.isLoading=!1,Promise.resolve({status:"created",notesStatus:l})})},n.destroy=function(){n.timer&&(n.timer.reset(),n.timer.stop(),n.timer=null),n.midiBuffer&&(n.midiBuffer.stop(),n.midiBuffer=null),n.setProgress(0,1),n.control&&n.control.resetAll()},n.play=function(){return n.runWhenReady(n._play,void 0)};function c(s){return new Promise(function(l){setTimeout(l,s)})}n.runWhenReady=function(s,l){return n.visualObj?n.isLoading?c(500).then(function(){return n.isLoading?n.runWhenReady(s,l):s(l)}):n.isLoaded?s(l):n.go().then(function(){return s(l)}):Promise.resolve({status:"loading"})},n._play=function(){return o().resume().then(function(){return n.isStarted=!n.isStarted,n.isStarted?(n.cursorControl&&n.cursorControl.onStart&&typeof n.cursorControl.onStart=="function"&&n.cursorControl.onStart(),n.midiBuffer.start(),n.timer.start(n.percent),n.control&&n.control.pushPlay(!0)):n.pause(),Promise.resolve({status:"ok"})})},n.pause=function(){n.timer&&(n.timer.pause(),n.midiBuffer.pause(),n.control&&n.control.pushPlay(!1))},n.toggleLoop=function(){n.isLooping=!n.isLooping,n.control&&n.control.pushLoop(n.isLooping)},n.restart=function(){n.timer&&(n.timer.setProgress(0),n.midiBuffer.seek(0))},n.randomAccess=function(s){return n.runWhenReady(n._randomAccess,s)},n._randomAccess=function(s){var l=s.target.classList.contains("abcjs-midi-progress-indicator")?s.target.parentNode:s.target,d=(s.x-l.getBoundingClientRect().left)/l.offsetWidth;return d<0&&(d=0),d>1&&(d=1),n.seek(d),Promise.resolve({status:"ok"})},n.seek=function(s,l){n.timer&&n.midiBuffer&&(n.timer.setProgress(s,l),n.midiBuffer.seek(s,l))},n.setWarp=function(s){if(parseInt(s,10)>0){n.warp=parseInt(s,10);var l=n.isStarted,d=n.percent;return n.destroy(),n.isStarted=!1,n.go().then(function(){return n.setProgress(d,n.midiBuffer.duration*1e3),n.control&&n.control.setWarp(n.currentTempo,n.warp),l?n.play().then(function(){return n.seek(d),Promise.resolve()}):(n.seek(d),Promise.resolve())})}return Promise.resolve()},n.onWarp=function(s){var l=s.target.value;return n.setWarp(l)},n.setProgress=function(s,l){n.percent=s,n.control&&n.control.setProgress(s,l)},n.finished=function(){if(n.timer.reset(),n.isLooping)return n.timer.start(0),n.midiBuffer.finished(),n.midiBuffer.start(),"continue";n.timer.stop(),n.isStarted&&(n.control&&n.control.pushPlay(!1),n.isStarted=!1,n.midiBuffer.finished(),n.cursorControl&&n.cursorControl.onFinished&&typeof n.cursorControl.onFinished=="function"&&n.cursorControl.onFinished(),n.setProgress(0,1))},n.beatCallback=function(s,l,d,f){var u=s/l;n.setProgress(u,d),n.cursorControl&&n.cursorControl.onBeat&&typeof n.cursorControl.onBeat=="function"&&n.cursorControl.onBeat(s,l,d,f)},n.eventCallback=function(s){if(s)n.cursorControl&&n.cursorControl.onEvent&&typeof n.cursorControl.onEvent=="function"&&n.cursorControl.onEvent(s);else return n.finished()},n.lineEndCallback=function(s,l){n.cursorControl&&n.cursorControl.onLineEnd&&typeof n.cursorControl.onLineEnd=="function"&&n.cursorControl.onLineEnd(s,l)},n.getUrl=function(){return n.midiBuffer.download()},n.download=function(s){var l=n.getUrl(),d=document.createElement("a");document.body.appendChild(d),d.setAttribute("style","display: none;"),d.href=l,d.download=s||"output.wav",d.click(),window.URL.revokeObjectURL(l),document.body.removeChild(d)}}return Tr=r,Tr}var Cr,wi;function ns(){if(wi)return Cr;wi=1;var T=es(),g;return function(){function p(i,t){for(var a in t)t.hasOwnProperty(a)&&i.setAttribute(a,t[a]);return i}function o(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}o.prototype.setTempo=function(i){this.trackcount===0&&(this.startTrack(),this.track+="%00%FF%51%03"+d(Math.round(6e7/i),6),this.endTrack())},o.prototype.setGlobalInfo=function(i,t,a,e){if(this.trackcount===0){this.startTrack();var h=Math.round(6e7/i);this.track+="%00%FF%51%03"+d(h,6),a&&(this.track+=c(a)),e&&(this.track+=s(e)),t&&(this.track+=n(t,"%01")),this.endTrack()}},o.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},o.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var i=d(this.track.length/3+4,8);this.track="MTrk"+i+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},o.prototype.setText=function(i,t){switch(i){case"name":this.trackName=n(t,"%03");break}},o.prototype.setInstrument=function(i){this.trackInstrument="%00%C0"+d(i,2),this.instrument=i},o.prototype.setChannel=function(i,t){this.channel=i;var a="%00%B"+this.channel.toString(16);this.track+=a+"%79%00",this.track+=a+"%40%00",this.track+=a+"%5B%30",t||(t=0),t=Math.round((t+1)*64),this.track+=a+"%0A"+d(t,2),this.track+=a+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};var r=4096;o.prototype.startNote=function(i,t,a){if(this.track+=u(this.silencelength),this.silencelength=0,a){this.track+="%e"+this.channel.toString(16);var e=Math.round(T(a)*r);this.track+=f(8192+e),this.track+=u(0),this.noteWarped[i]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+i.toString(16)+d(t,2)},o.prototype.endNote=function(i){this.track+=u(this.silencelength),this.silencelength=0,this.noteWarped[i]&&(this.track+="%e"+this.channel.toString(16),this.track+=f(8192),this.track+=u(0),this.noteWarped[i]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+i.toString(16)+"%00"},o.prototype.addRest=function(i){this.silencelength+=i,this.silencelength<0&&(this.silencelength=0)},o.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+d(this.trackcount,4)+"%01%e0"+this.trackstrings},o.prototype.embed=function(i,t){var a=this.getData(),e=p(document.createElement("a"),{href:a});if(e.innerHTML="download midi",i.insertBefore(e,i.firstChild),!t){var h=p(document.createElement("embed"),{src:a,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});i.insertBefore(h,i.firstChild)}};function n(i,t){for(var a="",e=0;e<i.length;e++)a+=d(i.charCodeAt(e),2);return"%00%FF"+t+d(a.length/3,2)+a}function c(i){if(!i||!i.accidentals)return"";for(var t="%00%FF%59%02",a=0,e=256,h=0;h<i.accidentals.length;h++)i.accidentals[h].acc==="sharp"?a++:i.accidentals[h].acc==="flat"&&e--;var v=d(e!==256?e:a,2),m=i.mode==="m"?"%01":"%00";return t+v+m}function s(i){var t="%00%FF%58%04"+d(i.num,2),a={1:0,2:1,4:2,8:3,16:4,32:5},e=a[i.den];if(!e)return"";t+=d(e,2);var h;switch(i.num+"/"+i.den){case"2/4":case"3/4":case"4/4":case"5/4":h=24;break;case"6/4":h=72;break;case"2/2":case"3/2":case"4/2":h=48;break;case"3/8":case"6/8":case"9/8":case"12/8":h=36;break}return h?(t+=d(h,2),t+"%08"):""}function l(i){for(var t="",a=0;a<i.length;a+=2)t+="%",t+=i.substr(a,2);return t}function d(i,t){var a=i.toString(16);for(a=a.split(".")[0];a.length<t;)a="0"+a;return a.length>t&&(a=a.substring(0,t)),l(a)}function f(i){i=Math.round(i);var t=i%128,a=i-t;return d(a*2+t,4)}function u(i){var t=0,a=[];for(i=Math.round(i);i!==0;)a.push(i&127),i=i>>7;for(var e=a.length-1;e>=0;e--){t=t<<8;var h=a[e];e!==0&&(h=h|128),t=t|h}var v=t.toString(16).length;return v+=v%2,d(t,v)}g=function(){return new o}}(),Cr=g,Cr}var Er,_i;function Ro(){if(_i)return Er;_i=1;var T=ns(),g;return function(){var p=1920;g=function(r,n){n===void 0&&(n={});var c=r.setUpAudio(n),s=T(),l=r.metaText?r.metaText.title:void 0;l&&l.length>128&&(l=l.substring(0,124)+"...");var d=r.getKeySignature(),f=r.getMeterFraction(),u=c.tempo,i=u/60;if(f.den==8){var t=r.millisecondsPerMeasure();u=6e4/(t/f.num)/2,i=u/60}s.setGlobalInfo(u,l,d,f);for(var a=0;a<c.tracks.length;a++){s.startTrack();for(var e={},h=0;h<c.tracks[a].length;h++){var v=c.tracks[a][h];switch(v.cmd){case"text":s.setText(v.type,v.text);break;case"program":var m=0;n.pan&&n.pan.length>a&&(m=n.pan[a]),v.instrument===128?(s.setChannel(9,m),s.setInstrument(0)):(s.setChannel(v.channel,m),s.setInstrument(v.instrument));break;case"note":var x=v.gap*i,C=v.start,S=C+v.duration-x;e[C]||(e[C]=[]),e[C].push({pitch:v.pitch,volume:v.volume,cents:v.cents}),e[S]||(e[S]=[]),e[S].push({pitch:v.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+v.cmd)}}o(s,e,p),s.endTrack()}return s.getData()};function o(r,n,c){for(var s=Object.keys(n),l=0;l<s.length;l++)s[l]=parseFloat(s[l]);s.sort(function(e,h){return e-h});for(var d=0,f=0;f<s.length;f++){var u=n[s[f]];if(s[f]>d){var i=(s[f]-d)*c;r.addRest(i),d=s[f]}for(var t=0;t<u.length;t++){var a=u[t];a.volume?r.startNote(a.pitch,a.volume,a.cents):r.endNote(a.pitch)}}}}(),Er=g,Er}var Sr,Ti;function Wo(){if(Ti)return Sr;Ti=1;var T=We(),g=Ro(),p=function(n,c){var s={};if(c)for(var l in c)c.hasOwnProperty(l)&&(s[l]=c[l]);s.generateInline=!1;function d(f,u,i){var t=g(u,s);switch(s.midiOutputType){case"encoded":return t;case"binary":var a=t.replace("data:audio/midi,","");a=a.replace(/MThd/g,"%4d%54%68%64"),a=a.replace(/MTrk/g,"%4d%54%72%6b");for(var e=new ArrayBuffer(a.length/3),h=new Uint8Array(e),v=0;v<a.length/3;v++){var m=v*3+1,x=parseInt(a.substring(m,m+2),16);h[v]=x}return h;case"link":default:return r(u,s,t,i)}}return typeof n=="string"?T.renderEngine(d,"*",n,s):d(null,n,0)};function o(n){var c={};return n&&c.toString.call(n)==="[object Function]"}var r=function(n,c,s,l){var d=["abcjs-download-midi","abcjs-midi-"+l];c.downloadClass&&d.push(c.downloadClass);var f='<div class="'+d.join(" ")+'">';c.preTextDownload&&(f+=c.preTextDownload);var u=n.metaText&&n.metaText.title?n.metaText.title:"Untitled",i;c.downloadLabel&&o(c.downloadLabel)?i=c.downloadLabel(n,l):c.downloadLabel?i=c.downloadLabel.replace(/%T/,u):i='Download MIDI for "'+u+'"',u=u.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_");var t=c.fileName?c.fileName:u+".midi";return f+='<a download="'+t+'" href="'+s+'">'+i+"</a>",c.postTextDownload&&(f+=c.postTextDownload),f+"</div>"};return Sr=p,Sr}var Mr,Ci;function is(){if(Ci)return Mr;Ci=1;try{if(typeof window.CustomEvent!="function"){var T=function(p,o){o=o||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(p,o.bubbles,o.cancelable,o.detail),r};T.prototype=window.Event.prototype,window.CustomEvent=T}}catch{}var g=function(p){this.isEditArea=!0,typeof p=="string"?(this.textarea=document.getElementById(p),this.textarea||(this.textarea=document.querySelector(p))):this.textarea=p,this.initialText=this.textarea.value,this.isDragging=!1};return g.prototype.addSelectionListener=function(p){this.textarea.onmousemove=function(o){this.isDragging&&p.fireSelectionChanged()}},g.prototype.addChangeListener=function(p){this.changelistener=p,this.textarea.onkeyup=function(){p.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,p.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,p.fireChanged()},this.textarea.onchange=function(){p.fireChanged()}},g.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},g.prototype.setSelection=function(p,o){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(p,o);else if(this.textarea.createTextRange){var r=this.textarea.createTextRange();r.collapse(!0),r.moveEnd("character",o),r.moveStart("character",p),r.select()}this.textarea.focus()},g.prototype.getString=function(){return this.textarea.value},g.prototype.setString=function(p){this.textarea.value=p,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},g.prototype.getElem=function(){return this.textarea},Mr=g,Mr}var Ar,Ei;function Go(){if(Ei)return Ar;Ei=1;var T=Ne(),g=as(),p=qe(),o=Zi(),r=is();function n(s){var l={},d;if(s.abcjsParams)for(d in s.abcjsParams)s.abcjsParams.hasOwnProperty(d)&&(l[d]=s.abcjsParams[d]);if(s.midi_options)for(d in s.midi_options)s.midi_options.hasOwnProperty(d)&&(l[d]=s.midi_options[d]);if(s.parser_options)for(d in s.parser_options)s.parser_options.hasOwnProperty(d)&&(l[d]=s.parser_options[d]);if(s.render_options)for(d in s.render_options)s.render_options.hasOwnProperty(d)&&(l[d]=s.render_options[d]);return l.tablature&&s.warnings_id&&(l.tablature.warnings_id=s.warnings_id),l}var c=function(s,l){this.abcjsParams=n(l),l.indicate_changed&&(this.indicate_changed=!0),typeof s=="string"?this.editarea=new r(s):s.isEditArea?this.editarea=s:this.editarea=new r(s),this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),l.canvas_id?this.div=l.canvas_id:l.paper_id?this.div=l.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),typeof this.div=="string"&&(this.div=document.getElementById(this.div)),l.selectionChangeCallback&&(this.selectionChangeCallback=l.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),l.synth&&p()&&(this.synth={el:l.synth.el,cursorControl:l.synth.cursorControl,options:l.synth.options}),l.generate_midi&&(this.generate_midi=l.generate_midi,this.abcjsParams.generateDownload&&(typeof l.midi_download_id=="string"?this.downloadMidi=document.getElementById(l.midi_download_id):l.midi_download_id&&(this.downloadMidi=l.midi_download_id)),this.abcjsParams.generateInline!==!1&&(typeof l.midi_id=="string"?this.inlineMidi=document.getElementById(l.midi_id):l.midi_id&&(this.inlineMidi=l.midi_id))),l.warnings_id?typeof l.warnings_id=="string"?this.warningsdiv=document.getElementById(l.warnings_id):this.warningsdiv=l.warnings_id:l.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=l.onchange,this.redrawCallback=l.redrawCallback,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(d,f){var u=function(i,t){var a=i.className;return a.length>0&&(a===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(a))};return u(d,f)||(d.className+=(d.className?" ":"")+f),d},this.removeClassName=function(d,f){return d.className=T.strip(d.className.replace(new RegExp("(^|\\s+)"+f+"(\\s+|$)")," ")),d},this.setReadOnly=function(d){var f="abc_textarea_readonly",u=this.editarea.getElem();d?(u.setAttribute("readonly","yes"),this.addClassName(u,f)):(u.removeAttribute("readonly"),this.removeClassName(u,f))}};return c.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var s=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(s)}if(this.synth){var l=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new g,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],l,this.synth.options)}},c.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.redrawCallback&&this.redrawCallback(!0),this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=o(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.redrawCallback&&this.redrawCallback(!1)}catch(s){console.error("ABCJS error: ",s),this.warnings||(this.warnings=[]),this.warnings.push(s.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.updateSelection(),this.bReentry=!1}},c.prototype.paramChanged=function(s){if(s)for(var l in s)s.hasOwnProperty(l)&&(this.abcjsParams[l]=s[l]);this.currentAbc="",this.fireChanged()},c.prototype.getTunes=function(){return this.tunes},c.prototype.synthParamChanged=function(s){if(this.synth){if(this.synth.options={},s)for(var l in s)s.hasOwnProperty(l)&&(this.synth.options[l]=s[l]);this.currentAbc="",this.fireChanged()}},c.prototype.parseABC=function(){var s=this.editarea.getString();return s===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=s,!0)},c.prototype.updateSelection=function(){var s=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(s.start,s.end)}catch{}this.selectionChangeCallback&&this.selectionChangeCallback(s.start,s.end)},c.prototype.fireSelectionChanged=function(){this.updateSelection()},c.prototype.setDirtyStyle=function(s){if(this.indicate_changed!==void 0){var l=function(i,t){var a=function(e,h){var v=e.className;return v.length>0&&(v===h||new RegExp("(^|\\s)"+h+"(\\s|$)").test(v))};return a(i,t)||(i.className+=(i.className?" ":"")+t),i},d=function(i,t){return i.className=T.strip(i.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ")),i},f="abc_textarea_dirty",u=this.editarea.getElem();s?l(u,f):d(u,f)}},c.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var s=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){s.modelChanged()},300);var l=this.isDirty();this.wasDirty!==l&&(this.wasDirty=l,this.setDirtyStyle(l)),this.onchangeCallback&&this.onchangeCallback(this)}},c.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},c.prototype.isDirty=function(){return this.indicate_changed===void 0?!1:this.editarea.initialText!==this.editarea.getString()},c.prototype.highlight=function(s,l,d,f,u,i){this.editarea.setSelection(s.startChar,s.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(s.startChar,s.endChar),this.clientClickListener&&this.clientClickListener(s,l,d,f,u,i)},c.prototype.pause=function(s){this.bIsPaused=s,s||this.fireChanged()},c.prototype.millisecondsPerMeasure=function(){return!this.synth||!this.synth.synthControl||!this.synth.synthControl.visualObj?0:this.synth.synthControl.visualObj.millisecondsPerMeasure()},c.prototype.pauseMidi=function(s){this.midiPause=s,s||this.redrawMidi()},Ar=c,Ar}var Nr,Si;function qo(){if(Si)return Nr;Si=1;var T=ls(),g=hs(),p=We(),o=Li(),r=Ss(),n={};n.signature="abcjs-basic v"+T,Object.keys(g).forEach(function(x){n[x]=g[x]}),Object.keys(p).forEach(function(x){n[x]=p[x]}),n.renderAbc=Zi(),n.tuneMetrics=Po(),n.TimingCallbacks=Br();var c=Le();n.setGlyph=c.setSymbol,n.strTranspose=r;var s=Vr(),l=zr(),d=Ir(),f=ts(),u=rs(),i=Ge(),t=Fe(),a=qe(),e=Yo(),h=as(),v=Wo(),m=ns();return n.synth={CreateSynth:s,instrumentIndexToName:l,pitchToNoteName:d,SynthController:h,SynthSequence:f,CreateSynthControl:u,registerAudioContext:i,activeAudioContext:t,supportsAudio:a,playEvent:e,getMidiFile:v,sequence:o,midiRenderer:m},n.Editor=Go(),n.EditArea=is(),Nr=n,Nr}var ss=qo();const Xo=os(ss),Uo=cs({__proto__:null,default:Xo},[ss]);export{Uo as i};
|