marked-abc 0.0.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/LICENSE +21 -0
- package/README.md +40 -0
- package/lib/index.d.ts +18 -0
- package/lib/index.esm.js +204 -0
- package/lib/index.esm.js.map +7 -0
- package/lib/index.umd.js +207 -0
- package/lib/index.umd.js.map +7 -0
- package/package.json +64 -0
- package/src/index.ts +120 -0
package/lib/index.umd.js
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f()}else if("function"==typeof define && define.amd){define("markedAbc",f)}else {g["markedAbc"]=f()}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(){var exports={};var __exports=exports;var module={exports};
|
|
2
|
+
var Wh=Object.create;var X0=Object.defineProperty;var Xh=Object.getOwnPropertyDescriptor;var Uh=Object.getOwnPropertyNames;var Vh=Object.getPrototypeOf,jh=Object.prototype.hasOwnProperty;var Yr=(e,t)=>()=>(e&&(t=e(e=0)),t);var L=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Kh=(e,t)=>{for(var r in t)X0(e,r,{get:t[r],enumerable:!0})},Sn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Uh(t))!jh.call(e,a)&&a!==r&&X0(e,a,{get:()=>t[a],enumerable:!(n=Xh(t,a))||n.enumerable});return e};var Qh=(e,t,r)=>(r=e!=null?Wh(Vh(e)):{},Sn(t||!e||!e.__esModule?X0(r,"default",{value:e,enumerable:!0}):r,e)),Zh=e=>Sn(X0({},"__esModule",{value:!0}),e);function Ur(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function Pn(e){Dt=e}function ae(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ae.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,t)};return n}function ut(e,t){if(t){if(Ae.escapeTest.test(e))return e.replace(Ae.escapeReplace,An)}else if(Ae.escapeTestNoEncode.test(e))return e.replace(Ae.escapeReplaceNoEncode,An);return e}function Mn(e){try{e=encodeURI(e).replace(Ae.percentDecode,"%")}catch{return null}return e}function Bn(e,t){let r=e.replace(Ae.findPipe,(i,s,o)=>{let c=!1,h=s;for(;--h>=0&&o[h]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Ae.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ae.slashPipe,"|");return n}function b0(e,t,r){let n=e.length;if(n===0)return"";let a=0;for(;a<n;){let i=e.charAt(n-a-1);if(i===t&&!r)a++;else if(i!==t&&r)a++;else break}return e.slice(0,n-a)}function Ff(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function Hf(e,t=0){let r=t,n="";for(let a of e)if(a===" "){let i=4-r%4;n+=" ".repeat(i),r+=i}else n+=a,r++;return n}function Nn(e,t,r,n,a){let i=t.href,s=t.title||null,o=e[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,c}function Rf(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let a=n[1];return t.split(`
|
|
3
|
+
`).map(i=>{let s=i.match(r.other.beginningSpace);if(s===null)return i;let[o]=s;return o.length>=a.length?i.slice(a.length):i}).join(`
|
|
4
|
+
`)}function fe(e,t){return It.parse(e,t)}var Dt,qt,Jh,Ae,ef,tf,rf,y0,af,Vr,Ln,qn,nf,jr,sf,Kr,of,cf,Q0,Qr,lf,In,hf,Zr,_n,ff,uf,df,pf,Dn,gf,Z0,Jr,zn,vf,On,bf,mf,Fn,yf,wf,xf,Hn,kf,Cf,Rn,Tf,Sf,_f,Ef,Af,Mf,Bf,Nf,Pf,Lf,V0,qf,Gn,Yn,If,En,ea,Df,$r,zf,U0,v0,Of,An,j0,Je,K0,ta,et,m0,Gf,It,P5,L5,q5,I5,D5,z5,O5,$n=Yr(()=>{Dt=Ur();qt={exec:()=>null};Jh=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ae={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},ef=/^(?:[ \t]*(?:\n|$))+/,tf=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,rf=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,y0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,af=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ln=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qn=ae(Ln).replace(/bull/g,Vr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nf=ae(Ln).replace(/bull/g,Vr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),jr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,sf=/^[^\n]+/,Kr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,of=ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Kr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),cf=ae(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vr).getRegex(),Q0="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Qr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,lf=ae("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Qr).replace("tag",Q0).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),In=ae(jr).replace("hr",y0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q0).getRegex(),hf=ae(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",In).getRegex(),Zr={blockquote:hf,code:tf,def:of,fences:rf,heading:af,hr:y0,html:lf,lheading:qn,list:cf,newline:ef,paragraph:In,table:qt,text:sf},_n=ae("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",y0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q0).getRegex(),ff={...Zr,lheading:nf,table:_n,paragraph:ae(jr).replace("hr",y0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_n).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q0).getRegex()},uf={...Zr,html:ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Qr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ae(jr).replace("hr",y0).replace("heading",` *#{1,6} *[^
|
|
5
|
+
]`).replace("lheading",qn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},df=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,pf=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dn=/^( {2,}|\\)\n(?!\s*$)/,gf=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Z0=/[\p{P}\p{S}]/u,Jr=/[\s\p{P}\p{S}]/u,zn=/[^\s\p{P}\p{S}]/u,vf=ae(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Jr).getRegex(),On=/(?!~)[\p{P}\p{S}]/u,bf=/(?!~)[\s\p{P}\p{S}]/u,mf=/(?:[^\s\p{P}\p{S}]|~)/u,Fn=/(?![*_])[\p{P}\p{S}]/u,yf=/(?![*_])[\s\p{P}\p{S}]/u,wf=/(?:[^\s\p{P}\p{S}]|[*_])/u,xf=ae(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Jh?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Hn=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,kf=ae(Hn,"u").replace(/punct/g,Z0).getRegex(),Cf=ae(Hn,"u").replace(/punct/g,On).getRegex(),Rn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Tf=ae(Rn,"gu").replace(/notPunctSpace/g,zn).replace(/punctSpace/g,Jr).replace(/punct/g,Z0).getRegex(),Sf=ae(Rn,"gu").replace(/notPunctSpace/g,mf).replace(/punctSpace/g,bf).replace(/punct/g,On).getRegex(),_f=ae("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zn).replace(/punctSpace/g,Jr).replace(/punct/g,Z0).getRegex(),Ef=ae(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Fn).getRegex(),Af="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Mf=ae(Af,"gu").replace(/notPunctSpace/g,wf).replace(/punctSpace/g,yf).replace(/punct/g,Fn).getRegex(),Bf=ae(/\\(punct)/,"gu").replace(/punct/g,Z0).getRegex(),Nf=ae(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pf=ae(Qr).replace("(?:-->|$)","-->").getRegex(),Lf=ae("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Pf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,qf=ae(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",V0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Gn=ae(/^!?\[(label)\]\[(ref)\]/).replace("label",V0).replace("ref",Kr).getRegex(),Yn=ae(/^!?\[(ref)\](?:\[\])?/).replace("ref",Kr).getRegex(),If=ae("reflink|nolink(?!\\()","g").replace("reflink",Gn).replace("nolink",Yn).getRegex(),En=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ea={_backpedal:qt,anyPunctuation:Bf,autolink:Nf,blockSkip:xf,br:Dn,code:pf,del:qt,delLDelim:qt,delRDelim:qt,emStrongLDelim:kf,emStrongRDelimAst:Tf,emStrongRDelimUnd:_f,escape:df,link:qf,nolink:Yn,punctuation:vf,reflink:Gn,reflinkSearch:If,tag:Lf,text:gf,url:qt},Df={...ea,link:ae(/^!?\[(label)\]\((.*?)\)/).replace("label",V0).getRegex(),reflink:ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V0).getRegex()},$r={...ea,emStrongRDelimAst:Sf,emStrongLDelim:Cf,delLDelim:Ef,delRDelim:Mf,url:ae(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",En).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ae(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",En).getRegex()},zf={...$r,br:ae(Dn).replace("{2,}","*").getRegex(),text:ae($r.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},U0={normal:Zr,gfm:ff,pedantic:uf},v0={normal:ea,gfm:$r,breaks:zf,pedantic:Df},Of={"&":"&","<":"<",">":">",'"':""","'":"'"},An=e=>Of[e];j0=class{options;rules;lexer;constructor(e){this.options=e||Dt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:b0(r,`
|
|
6
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=Rf(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=b0(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:b0(t[0],`
|
|
7
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=b0(t[0],`
|
|
8
|
+
`).split(`
|
|
9
|
+
`),n="",a="",i=[];for(;r.length>0;){let s=!1,o=[],c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))o.push(r[c]),s=!0;else if(!s)o.push(r[c]);else break;r=r.slice(c);let h=o.join(`
|
|
10
|
+
`),d=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
11
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
12
|
+
${h}`:h,a=a?`${a}
|
|
13
|
+
${d}`:d;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=l,r.length===0)break;let f=i.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let u=f,p=u.raw+`
|
|
14
|
+
`+r.join(`
|
|
15
|
+
`),g=this.blockquote(p);i[i.length-1]=g,n=n.substring(0,n.length-u.raw.length)+g.raw,a=a.substring(0,a.length-u.text.length)+g.text;break}else if(f?.type==="list"){let u=f,p=u.raw+`
|
|
16
|
+
`+r.join(`
|
|
17
|
+
`),g=this.list(p);i[i.length-1]=g,n=n.substring(0,n.length-f.raw.length)+g.raw,a=a.substring(0,a.length-u.raw.length)+g.raw,r=p.substring(i.at(-1).raw.length).split(`
|
|
18
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:a}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,a={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let i=this.rules.other.listItemRegex(r),s=!1;for(;e;){let c=!1,h="",d="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let l=Hf(t[2].split(`
|
|
19
|
+
`,1)[0],t[1].length),f=e.split(`
|
|
20
|
+
`,1)[0],u=!l.trim(),p=0;if(this.options.pedantic?(p=2,d=l.trimStart()):u?p=t[1].length+1:(p=l.search(this.rules.other.nonSpaceChar),p=p>4?1:p,d=l.slice(p),p+=t[1].length),u&&this.rules.other.blankLine.test(f)&&(h+=f+`
|
|
21
|
+
`,e=e.substring(f.length+1),c=!0),!c){let g=this.rules.other.nextBulletRegex(p),v=this.rules.other.hrRegex(p),m=this.rules.other.fencesBeginRegex(p),w=this.rules.other.headingBeginRegex(p),k=this.rules.other.htmlBeginRegex(p),b=this.rules.other.blockquoteBeginRegex(p);for(;e;){let y=e.split(`
|
|
22
|
+
`,1)[0],C;if(f=y,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),C=f):C=f.replace(this.rules.other.tabCharGlobal," "),m.test(f)||w.test(f)||k.test(f)||b.test(f)||g.test(f)||v.test(f))break;if(C.search(this.rules.other.nonSpaceChar)>=p||!f.trim())d+=`
|
|
23
|
+
`+C.slice(p);else{if(u||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||m.test(l)||w.test(l)||v.test(l))break;d+=`
|
|
24
|
+
`+f}u=!f.trim(),h+=y+`
|
|
25
|
+
`,e=e.substring(y.length+1),l=C.slice(p)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0)),a.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),a.raw+=h}let o=a.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c of a.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}}let h=this.rules.other.listTaskCheckbox.exec(c.raw);if(h){let d={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};c.checked=d.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=d.raw+c.tokens[0].raw,c.tokens[0].text=d.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(d)):c.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):c.tokens.unshift(d)}}if(!a.loose){let h=c.tokens.filter(l=>l.type==="space"),d=h.length>0&&h.some(l=>this.rules.other.anyLine.test(l.raw));a.loose=d}}if(a.loose)for(let c of a.items){c.loose=!0;for(let h of c.tokens)h.type==="text"&&(h.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:a}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=Bn(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
26
|
+
`):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let s of n)this.rules.other.tableAlignRight.test(s)?i.align.push("right"):this.rules.other.tableAlignCenter.test(s)?i.align.push("center"):this.rules.other.tableAlignLeft.test(s)?i.align.push("left"):i.align.push(null);for(let s=0;s<r.length;s++)i.header.push({text:r[s],tokens:this.lexer.inline(r[s]),header:!0,align:i.align[s]});for(let s of a)i.rows.push(Bn(s,i.header.length).map((o,c)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[c]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
|
|
27
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=b0(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=Ff(t[2],"()");if(i===-2)return;if(i>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let n=t[2],a="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],a=i[3])}else a=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Nn(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=t[n.toLowerCase()];if(!a){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Nn(r,a,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let a=[...n[0]].length-1,i,s,o=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);(n=h.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(s=[...i].length,n[3]||n[4]){o+=s;continue}else if((n[5]||n[6])&&a%3&&!((a+s)%3)){c+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+c);let d=[...n[0]][0].length,l=e.slice(0,a+n.index+d+s);if(Math.min(a,s)%2){let u=l.slice(1,-1);return{type:"em",raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}let f=l.slice(2,-2);return{type:"strong",raw:l,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),a=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&a&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let a=[...n[0]].length-1,i,s,o=a,c=this.rules.inline.delRDelim;for(c.lastIndex=0,t=t.slice(-1*e.length+a);(n=c.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i||(s=[...i].length,s!==a))continue;if(n[3]||n[4]){o+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o);let h=[...n[0]][0].length,d=e.slice(0,a+n.index+h+s),l=d.slice(a,-a);return{type:"del",raw:d,text:l,tokens:this.lexer.inlineTokens(l)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,n;if(t[2]==="@")r=t[0],n="mailto:"+r;else{let a;do a=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(a!==t[0]);r=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},Je=class Wr{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Dt,this.options.tokenizer=this.options.tokenizer||new j0,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Ae,block:U0.normal,inline:v0.normal};this.options.pedantic?(r.block=U0.pedantic,r.inline=v0.pedantic):this.options.gfm&&(r.block=U0.gfm,this.options.breaks?r.inline=v0.breaks:r.inline=v0.gfm),this.tokenizer.rules=r}static get rules(){return{block:U0,inline:v0}}static lex(t,r){return new Wr(r).lex(t)}static lexInline(t,r){return new Wr(r).inlineTokens(t)}lex(t){t=t.replace(Ae.carriageReturn,`
|
|
28
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){for(this.options.pedantic&&(t=t.replace(Ae.tabCharGlobal," ").replace(Ae.spaceLine,""));t;){let a;if(this.options.extensions?.block?.some(s=>(a=s.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let s=r.at(-1);a.raw.length===1&&s!==void 0?s.raw+=`
|
|
29
|
+
`:r.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
30
|
+
`)?"":`
|
|
31
|
+
`)+a.raw,s.text+=`
|
|
32
|
+
`+a.text,this.inlineQueue.at(-1).src=s.text):r.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
33
|
+
`)?"":`
|
|
34
|
+
`)+a.raw,s.text+=`
|
|
35
|
+
`+a.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},r.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),r.push(a);continue}let i=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),c;this.options.extensions.startBlock.forEach(h=>{c=h.call({lexer:this},o),typeof c=="number"&&c>=0&&(s=Math.min(s,c))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(a=this.tokenizer.paragraph(i))){let s=r.at(-1);n&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
|
|
36
|
+
`)?"":`
|
|
37
|
+
`)+a.raw,s.text+=`
|
|
38
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(a),n=i.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
39
|
+
`)?"":`
|
|
40
|
+
`)+a.raw,s.text+=`
|
|
41
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(a);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,a=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=a[2]?a[2].length:0,n=n.slice(0,a.index+i)+"["+"a".repeat(a[0].length-i-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let s=!1,o="";for(;t;){s||(o=""),s=!1;let c;if(this.options.extensions?.inline?.some(d=>(c=d.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);let d=r.at(-1);c.type==="text"&&d?.type==="text"?(d.raw+=c.raw,d.text+=c.text):r.push(c);continue}if(c=this.tokenizer.emStrong(t,n,o)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.del(t,n,o)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),r.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),r.push(c);continue}let h=t;if(this.options.extensions?.startInline){let d=1/0,l=t.slice(1),f;this.options.extensions.startInline.forEach(u=>{f=u.call({lexer:this},l),typeof f=="number"&&f>=0&&(d=Math.min(d,f))}),d<1/0&&d>=0&&(h=t.substring(0,d+1))}if(c=this.tokenizer.inlineText(h)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(o=c.raw.slice(-1)),s=!0;let d=r.at(-1);d?.type==="text"?(d.raw+=c.raw,d.text+=c.text):r.push(c);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return r}},K0=class{options;parser;constructor(e){this.options=e||Dt}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(Ae.notSpaceStart)?.[0],a=e.replace(Ae.endingNewline,"")+`
|
|
42
|
+
`;return n?'<pre><code class="language-'+ut(n)+'">'+(r?a:ut(a,!0))+`</code></pre>
|
|
43
|
+
`:"<pre><code>"+(r?a:ut(a,!0))+`</code></pre>
|
|
44
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
45
|
+
${this.parser.parse(e)}</blockquote>
|
|
46
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
47
|
+
`}hr(e){return`<hr>
|
|
48
|
+
`}list(e){let t=e.ordered,r=e.start,n="";for(let s=0;s<e.items.length;s++){let o=e.items[s];n+=this.listitem(o)}let a=t?"ol":"ul",i=t&&r!==1?' start="'+r+'"':"";return"<"+a+i+`>
|
|
49
|
+
`+n+"</"+a+`>
|
|
50
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
51
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
52
|
+
`}table(e){let t="",r="";for(let a=0;a<e.header.length;a++)r+=this.tablecell(e.header[a]);t+=this.tablerow({text:r});let n="";for(let a=0;a<e.rows.length;a++){let i=e.rows[a];r="";for(let s=0;s<i.length;s++)r+=this.tablecell(i[s]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
53
|
+
<thead>
|
|
54
|
+
`+t+`</thead>
|
|
55
|
+
`+n+`</table>
|
|
56
|
+
`}tablerow({text:e}){return`<tr>
|
|
57
|
+
${e}</tr>
|
|
58
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
59
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ut(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),a=Mn(e);if(a===null)return n;e=a;let i='<a href="'+e+'"';return t&&(i+=' title="'+ut(t)+'"'),i+=">"+n+"</a>",i}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let a=Mn(e);if(a===null)return ut(r);e=a;let i=`<img src="${e}" alt="${ut(r)}"`;return t&&(i+=` title="${ut(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ut(e.text)}},ta=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},et=class Xr{options;renderer;textRenderer;constructor(t){this.options=t||Dt,this.options.renderer=this.options.renderer||new K0,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ta}static parse(t,r){return new Xr(r).parse(t)}static parseInline(t,r){return new Xr(r).parseInline(t)}parse(t){let r="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let s=a,o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){r+=o||"";continue}}let i=a;switch(i.type){case"space":{r+=this.renderer.space(i);break}case"hr":{r+=this.renderer.hr(i);break}case"heading":{r+=this.renderer.heading(i);break}case"code":{r+=this.renderer.code(i);break}case"table":{r+=this.renderer.table(i);break}case"blockquote":{r+=this.renderer.blockquote(i);break}case"list":{r+=this.renderer.list(i);break}case"checkbox":{r+=this.renderer.checkbox(i);break}case"html":{r+=this.renderer.html(i);break}case"def":{r+=this.renderer.def(i);break}case"paragraph":{r+=this.renderer.paragraph(i);break}case"text":{r+=this.renderer.text(i);break}default:{let s='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}parseInline(t,r=this.renderer){let n="";for(let a=0;a<t.length;a++){let i=t[a];if(this.options.extensions?.renderers?.[i.type]){let o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=o||"";continue}}let s=i;switch(s.type){case"escape":{n+=r.text(s);break}case"html":{n+=r.html(s);break}case"link":{n+=r.link(s);break}case"image":{n+=r.image(s);break}case"checkbox":{n+=r.checkbox(s);break}case"strong":{n+=r.strong(s);break}case"em":{n+=r.em(s);break}case"codespan":{n+=r.codespan(s);break}case"br":{n+=r.br(s);break}case"del":{n+=r.del(s);break}case"text":{n+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},m0=class{options;block;constructor(e){this.options=e||Dt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Je.lex:Je.lexInline}provideParser(){return this.block?et.parse:et.parseInline}},Gf=class{defaults=Ur();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=et;Renderer=K0;TextRenderer=ta;Lexer=Je;Tokenizer=j0;Hooks=m0;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{let a=n;for(let i of a.header)r=r.concat(this.walkTokens(i.tokens,t));for(let i of a.rows)for(let s of i)r=r.concat(this.walkTokens(s.tokens,t));break}case"list":{let a=n;r=r.concat(this.walkTokens(a.items,t));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(i=>{let s=a[i].flat(1/0);r=r.concat(this.walkTokens(s,t))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let i=t.renderers[a.name];i?t.renderers[a.name]=function(...s){let o=a.renderer.apply(this,s);return o===!1&&(o=i.apply(this,s)),o}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[a.level];i?i.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),n.extensions=t),r.renderer){let a=this.defaults.renderer||new K0(this.defaults);for(let i in r.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let s=i,o=r.renderer[s],c=a[s];a[s]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d||""}}n.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new j0(this.defaults);for(let i in r.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let s=i,o=r.tokenizer[s],c=a[s];a[s]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}n.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new m0;for(let i in r.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let s=i,o=r.hooks[s],c=a[s];m0.passThroughHooks.has(i)?a[s]=h=>{if(this.defaults.async&&m0.passThroughHooksRespectAsync.has(i))return(async()=>{let l=await o.call(a,h);return c.call(a,l)})();let d=o.call(a,h);return c.call(a,d)}:a[s]=(...h)=>{if(this.defaults.async)return(async()=>{let l=await o.apply(a,h);return l===!1&&(l=await c.apply(a,h)),l})();let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}n.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,i=r.walkTokens;n.walkTokens=function(s){let o=[];return o.push(i.call(this,s)),a&&(o=o.concat(a.call(this,s))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Je.lex(e,t??this.defaults)}parser(e,t){return et.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},a={...this.defaults,...n},i=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=e),a.async)return(async()=>{let s=a.hooks?await a.hooks.preprocess(t):t,o=await(a.hooks?await a.hooks.provideLexer():e?Je.lex:Je.lexInline)(s,a),c=a.hooks?await a.hooks.processAllTokens(o):o;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():e?et.parse:et.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(i);try{a.hooks&&(t=a.hooks.preprocess(t));let s=(a.hooks?a.hooks.provideLexer():e?Je.lex:Je.lexInline)(t,a);a.hooks&&(s=a.hooks.processAllTokens(s)),a.walkTokens&&this.walkTokens(s,a.walkTokens);let o=(a.hooks?a.hooks.provideParser():e?et.parse:et.parseInline)(s,a);return a.hooks&&(o=a.hooks.postprocess(o)),o}catch(s){return i(s)}}}onError(e,t){return r=>{if(r.message+=`
|
|
60
|
+
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+ut(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},It=new Gf;fe.options=fe.setOptions=function(e){return It.setOptions(e),fe.defaults=It.defaults,Pn(fe.defaults),fe};fe.getDefaults=Ur;fe.defaults=Dt;fe.use=function(...e){return It.use(...e),fe.defaults=It.defaults,Pn(fe.defaults),fe};fe.walkTokens=function(e,t){return It.walkTokens(e,t)};fe.parseInline=It.parseInline;fe.Parser=et;fe.parser=et.parse;fe.Renderer=K0;fe.TextRenderer=ta;fe.Lexer=Je;fe.lexer=Je.lex;fe.Tokenizer=j0;fe.Hooks=m0;fe.parse=fe;P5=fe.options,L5=fe.setOptions,q5=fe.use,I5=fe.walkTokens,D5=fe.parseInline,z5=et.parse,O5=Je.lex});var Xn=L((W5,Wn)=>{var Yf="6.6.2";Wn.exports=Yf});var J0=L((X5,Un)=>{var $f=function(e,t){var r=this;if(t||(t={}),r.qpm=t.qpm?parseInt(t.qpm,10):null,!r.qpm){var n=e.metaText?e.metaText.tempo:null;r.qpm=e.getBpm(n)}r.extraMeasuresAtBeginning=t.extraMeasuresAtBeginning?parseInt(t.extraMeasuresAtBeginning,10):0,r.beatCallback=t.beatCallback,r.eventCallback=t.eventCallback,r.lineEndCallback=t.lineEndCallback,r.lineEndAnticipation=t.lineEndAnticipation?parseInt(t.lineEndAnticipation,10):0,r.beatSubdivisions=t.beatSubdivisions?parseInt(t.beatSubdivisions,10):1,r.beatSubdivisions||(r.beatSubdivisions=1),r.joggerTimer=null,r.replaceTarget=function(i){if(r.noteTimings=i.setTiming(r.qpm,r.extraMeasuresAtBeginning),i.noteTimings.length===0&&(r.noteTimings=i.setTiming(0,0)),r.lineEndCallback&&(r.lineEndTimings=Wf(i.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;var s=i.getMeter(),o="";if(s&&s.type==="specified"&&s.value&&s.value.length>0&&s.value[0].num.indexOf("+")>0&&(o=s.value[0].num),r.beatStarts=[],o){for(var c=r.noteTimings[r.noteTimings.length-1].millisecondsPerMeasure,h=r.lastMoment/c,d=o.split("+"),l=0;l<d.length;l++)d[l]=parseInt(d[l],10)/2;for(var f=0,u=0,p=0;p<h;p++)for(var g=p*c,v=0,m=0;m<d.length;m++){var w=d[m];if(r.beatSubdivisions===1)r.beatSubdivisions===1&&f<r.lastMoment&&r.beatStarts.push({b:u,ts:f}),f+=w*r.millisecondsPerBeat;else for(var k=w*r.beatSubdivisions,b=0;b<Math.floor(k);b++){var y=b/k,C=Math.round(g+v*r.millisecondsPerBeat);C<r.lastMoment&&r.beatStarts.push({b:u+y,ts:C}),v++}u++}r.beatStarts.push({b:h*d.length,ts:r.lastMoment}),r.totalBeats=r.beatStarts.length}else{r.totalBeats=Math.round(r.lastMoment/r.millisecondsPerBeat);for(var A=0;A<r.totalBeats+1;A++)r.beatStarts.push({b:A/r.beatSubdivisions,ts:Math.round(A*r.millisecondsPerBeat)})}}},r.replaceTarget(e),r.doTiming=function(i){if(r.lastTimestamp!==i&&(r.lastTimestamp=i,!r.isPaused&&r.isRunning)){for(r.startTime||(r.startTime=i),r.currentTime=i-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 s=r.startTime;r.eventCallback(r.noteTimings[r.currentEvent]),s!==r.startTime&&(r.currentTime=i-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 o=r.noteTimings[r.currentEvent].milliseconds===r.currentTime?r.noteTimings[r.currentEvent]:r.noteTimings[r.currentEvent-1];r.lineEndCallback(r.lineEndTimings[r.currentLine],o,{line:r.currentLine,endTimings:r.lineEndTimings,currentTime:r.currentTime}),r.currentLine++}if(r.currentTime<r.lastMoment){if(requestAnimationFrame(r.doTiming),r.currentBeat<r.beatStarts.length&&r.beatStarts[r.currentBeat].ts<=r.currentTime){var c=r.doBeatCallback(i);r.currentBeat++,c!==null&&(r.currentTime=c)}}else if(r.currentBeat<=r.totalBeats&&r.beatCallback){var h=r.doBeatCallback(i);r.currentBeat++,h!==null&&(r.currentTime=h),requestAnimationFrame(r.doTiming)}if(r.currentTime>=r.lastMoment)if(r.eventCallback){var d=r.eventCallback(null);r.shouldStop(d).then(function(l){l&&r.stop()})}else r.stop()}},r.shouldStop=function(i){return new Promise(function(s){if(!i)return s(!0);if(i==="continue")return s(!1);i.then&&i.then(function(o){s(o!=="continue")})})},r.doBeatCallback=function(i){if(r.beatCallback){for(var s=r.currentEvent;s<r.noteTimings.length&&r.noteTimings[s].left===null;)s++;var o,c;if(s<r.noteTimings.length){for(o=r.noteTimings[s].milliseconds,s=Math.max(0,r.currentEvent-1);s>=0&&r.noteTimings[s].left===null;)s--;c=r.noteTimings[s]}var h={},d={};if(c){h.top=c.top,h.height=c.height;var l=Math.max(0,i-r.startTime-c.milliseconds),f=o-c.milliseconds,u=c.endX-c.left,p=f?l*u/f:0;h.left=c.left+p,r.currentEvent===0&&c.milliseconds>i-r.startTime&&(h.left=void 0),d={timestamp:i,startTime:r.startTime,ev:c,endMs:o,offMs:l,offPx:p,gapMs:f,gapPx:u}}else d={timestamp:i,startTime:r.startTime};var g=r.startTime;if(r.beatCallback(r.beatStarts[r.currentBeat].b,r.totalBeats/r.beatSubdivisions,r.lastMoment,h,d),g!==r.startTime)return i-r.startTime}return null};var a=60;r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,a))},r.start=function(i,s){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,i===void 0&&(r.justUnpaused=!0)),i)r.setProgress(i,s);else if(i===0)r.reset();else if(r.pausedPercent!==null){var o=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=o-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,a)},r.pause=function(){r.isPaused=!0;var i=performance.now();r.pausedPercent=(i-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(i,s){var o;switch(s){case"seconds":r.currentTime=i*1e3,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),o=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=i*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),o=r.currentTime/r.lastMoment;break;default:o=i,o<0&&(o=0),o>1&&(o=1),r.currentTime=r.lastMoment*o;break}r.isRunning||(r.pausedPercent=o);var c=performance.now();for(r.startTime=c-r.currentTime,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 h=r.currentBeat;for(r.currentBeat=0;r.currentBeat<r.beatStarts.length&&!(r.beatStarts[r.currentBeat].ts>r.currentTime);r.currentBeat++);r.currentBeat--,r.beatCallback&&h!==r.currentBeat&&(r.doBeatCallback(r.startTime+r.currentTime),r.currentBeat++),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,a)}};function Wf(e,t){for(var r=[],n=null,a=0;a<e.length;a++){var i=e[a];i.type!=="end"&&i.top!==n&&(r.push({measureNumber:i.measureNumber,milliseconds:i.milliseconds-t,top:i.top,bottom:i.top+i.height}),n=i.top)}return r}Un.exports=$f});var jn=L((U5,Vn)=>{var Xf=J0(),er={};(function(){"use strict";var e,t;er.startAnimation=function(r,n,a){e&&(e.stop(),e=void 0),a.showCursor&&(t=r.querySelector(".abcjs-cursor"),t||(t=document.createElement("DIV"),t.className="abcjs-cursor cursor",t.style.position="absolute",r.appendChild(t),r.style.position="relative"));function i(f){for(var u=0;u<f.length;u++){var p=f[u];p.classList.contains("abcjs-bar")||(p.style.display="none")}}var s;function o(f){if(s){var u=r.querySelectorAll(s);i(u)}s=f}function c(f){var u=r.querySelectorAll(f);i(u)}function h(f){a.hideCurrentMeasure?c(f):a.hideFinishedMeasures&&o(f)}function d(f){return".abcjs-l"+f.line+".abcjs-m"+f.measureNumber}function l(f){if(f){if(f.measureStart){var u=d(f);u&&h(u)}t&&(t.style.left=f.left+"px",t.style.top=f.top+"px",t.style.width=f.width+"px",t.style.height=f.height+"px")}else e.stop(),e=void 0}e=new Xf(n,{qpm:a.bpm,eventCallback:l}),e.start()},er.pauseAnimation=function(r){e&&(r?e.pause():e.start())},er.stopAnimation=function(){e&&(e.stop(),e=void 0)}})();Vn.exports=er});var tt=L((V5,Kn)=>{var mt={};mt.cloneArray=function(e){for(var t=[],r=0;r<e.length;r++)t.push(Object.assign({},e[r]));return t};mt.cloneHashOfHash=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=Object.assign({},e[r]));return t};mt.cloneHashOfArrayOfHash=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=mt.cloneArray(e[r]));return t};mt.strip=function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")};mt.startsWith=function(e,t){return e.indexOf(t)===0};mt.endsWith=function(e,t){var r=e.length-t.length;return r>=0&&e.lastIndexOf(t)===r};mt.last=function(e){return e.length===0?null:e[e.length-1]};Kn.exports=mt});var tr=L((j5,Zn)=>{var Qn=tt(),zt={};(function(){"use strict";var e,t,r,n,a;zt.initialize=function(x,T,N,E,R){e=x,t=T,r=N,n=E,a=R,i()};function i(){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 s={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},o=function(x){switch(x){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}},c=function(x,T,N,E,R){function ee(){var je=parseInt(x[0].token);return x.shift(),T?x.length===0?{face:T.face,weight:T.weight,style:T.style,decoration:T.decoration,size:je}:x.length===1&&x[0].token==="box"&&s[R]?{face:T.face,weight:T.weight,style:T.style,decoration:T.decoration,size:je,box:!0}:(t("Extra parameters in font definition.",N,E),{face:T.face,weight:T.weight,style:T.style,decoration:T.decoration,size:je}):(t("Can't set just the size of the font since there is no default value.",N,E),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:je})}if(x[0].token==="*"){if(x.shift(),x[0].type==="number")return ee();t("Expected font size number after *.",N,E)}if(x[0].type==="number")return ee();for(var V=[],ie,Ue="normal",Ve="normal",Pe="none",Ce=!1,Le="face",X=!1;x.length;){var be=x.shift(),te=be.token.toLowerCase();switch(Le){case"face":X||te!=="utf"&&be.type!=="number"&&te!=="bold"&&te!=="italic"&&te!=="underline"&&te!=="box"?V.length>0&&be.token==="-"?(X=!0,V[V.length-1]=V[V.length-1]+be.token):X?(X=!1,V[V.length-1]=V[V.length-1]+be.token):V.push(be.token):be.type==="number"?(ie?t("Font size specified twice in font definition.",N,E):ie=be.token,Le="modifier"):te==="bold"?Ue="bold":te==="italic"?Ve="italic":te==="underline"?Pe="underline":te==="box"?(s[R]?Ce=!0:t(`This font style doesn't support "box"`,N,E),Le="finished"):te==="utf"?(be=x.shift(),Le="size"):t("Unknown parameter "+be.token+" in font definition.",N,E);break;case"size":be.type==="number"?ie?t("Font size specified twice in font definition.",N,E):ie=be.token:t("Expected font size in font definition.",N,E),Le="modifier";break;case"modifier":te==="bold"?Ue="bold":te==="italic"?Ve="italic":te==="underline"?Pe="underline":te==="box"?(s[R]?Ce=!0:t(`This font style doesn't support "box"`,N,E),Le="finished"):t("Unknown parameter "+be.token+" in font definition.",N,E);break;case"finished":t('Extra characters found after "box" in font definition.',N,E);break}}ie===void 0?T?ie=T.size:(t("Must specify the size of the font since there is no default value.",N,E),ie=12):ie=parseFloat(ie),V=V.join(" "),V===""&&(T?V=T.face:(t("Must specify the name of the font since there is no default value.",N,E),V="sans-serif"));var ne=o(V),ue={};return ne?(ue.face=ne.face,ue.weight=ne.weight,ue.style=ne.style,ue.decoration=ne.decoration,ue.size=ie,Ce&&(ue.box=!0),ue):(ue.face=V,ue.weight=Ue,ue.style=Ve,ue.decoration=Pe,ue.size=ie,Ce&&(ue.box=!0),ue)},h=function(x,T,N){return T.length===0?'Directive "'+x+'" requires a font as a parameter.':(r[x]=c(T,r[x],N,0,x),r.is_in_header&&(n.formatting[x]=r[x]),null)},d=function(x,T,N){return T.length===0?'Directive "'+x+'" requires a font as a parameter.':(n.formatting[x]=c(T,n.formatting[x],N,0,x),null)},l=function(x,T){var N="";T.forEach(function(R){N+=R.token});var E=parseFloat(N);if(isNaN(E)||E===0)return'Directive "'+x+'" requires a number as a parameter.';n.formatting.scale=E},f=["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"],u=function(x){var T=x.split(/\s+/);if(T.length!==2&&T.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var N=T[0],E=parseInt(T[1],10);if((isNaN(E)||E<35||E>81)&&T[1]&&(E=f.indexOf(T[1].toLowerCase())+35),isNaN(E)||E<35||E>81)return{error:'Expected drum name, received "'+T[1]+'"'};var R={sound:E};return T.length===3&&(R.noteHead=T[2]),{key:N,value:R}},p=function(x,T){var N=e.getMeasurement(T);return N.used===0||T.length!==0?{error:'Directive "'+x+'" requires a measurement as a parameter.'}:N.value},g=function(x,T){var N=e.getMeasurement(T);return N.used===0||T.length!==0?'Directive "'+x+'" requires a measurement as a parameter.':(n.formatting[x]=N.value,null)},v=function(x,T,N,E,R){if(N.length!==1||N[0].type!=="number")return'Directive "'+T+'" requires a number as a parameter.';var ee=N[0].intt;return E!==void 0&&ee<E?'Directive "'+T+'" requires a number greater than or equal to '+E+" as a parameter.":R!==void 0&&ee>R?'Directive "'+T+'" requires a number less than or equal to '+R+" as a parameter.":(r[x]=ee,null)},m=function(x,T,N){if(N.length===1&&(N[0].token==="true"||N[0].token==="false"))return r[x]=N[0].token==="true",null;var E=v(x,T,N,0,1);return E!==null?E:(r[x]=r[x]===1,null)},w=function(x,T,N,E){if(N.length!==1)return'Directive "'+T+'" requires one of [ '+E.join(", ")+" ] as a parameter.";for(var R=N[0].token,ee=!1,V=0;!ee&&V<E.length;V++)E[V]===R&&(ee=!0);return ee?(r[x]=R,null):'Directive "'+T+'" requires one of [ '+E.join(", ")+" ] as a parameter."},k=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],b=["gchord","ptstress","beatstring"],y=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],C=["program"],A=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],P=["beat"],_=["drone"],B=["portamento"],O=["expand","grace","trim"],q=["drum","chordname"],I=["bassprog","chordprog"],G=function(x,T,N){var E=x.shift().token,R=[];if(k.indexOf(E)>=0)x.length!==0&&t("Unexpected parameter in MIDI "+E,N,0);else if(b.indexOf(E)>=0)x.length!==1?t("Expected one parameter in MIDI "+E,N,0):R.push(x[0].token);else if(y.indexOf(E)>=0)x.length!==1?t("Expected one parameter in MIDI "+E,N,0):x[0].type!=="number"?t("Expected one integer parameter in MIDI "+E,N,0):R.push(x[0].intt);else if(C.indexOf(E)>=0)x.length!==1&&x.length!==2?t("Expected one or two parameters in MIDI "+E,N,0):x[0].type!=="number"||x.length===2&&x[1].type!=="number"?t("Expected integer parameter in MIDI "+E,N,0):(R.push(x[0].intt),x.length===2&&R.push(x[1].intt));else if(A.indexOf(E)>=0)x.length!==2?t("Expected two parameters in MIDI "+E,N,0):x[0].type!=="number"||x[1].type!=="number"?t("Expected two integer parameters in MIDI "+E,N,0):(R.push(x[0].intt),R.push(x[1].intt));else if(B.indexOf(E)>=0)x.length!==2?t("Expected two parameters in MIDI "+E,N,0):x[0].type!=="alpha"||x[1].type!=="number"?t("Expected one string and one integer parameters in MIDI "+E,N,0):(R.push(x[0].token),R.push(x[1].intt));else if(E==="drummap")x.length===2&&x[0].type==="alpha"&&x[1].type==="number"?(T.formatting||(T.formatting={}),T.formatting.midi||(T.formatting.midi={}),T.formatting.midi.drummap||(T.formatting.midi.drummap={}),T.formatting.midi.drummap[x[0].token]=x[1].intt,R=T.formatting.midi.drummap):x.length===3&&x[0].type==="punct"&&x[1].type==="alpha"&&x[2].type==="number"?(T.formatting||(T.formatting={}),T.formatting.midi||(T.formatting.midi={}),T.formatting.midi.drummap||(T.formatting.midi.drummap={}),T.formatting.midi.drummap[x[0].token+x[1].token]=x[2].intt,R=T.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+E,N,0);else if(O.indexOf(E)>=0)x.length!==3||x[0].type!=="number"||x[1].token!=="/"||x[2].type!=="number"?t("Expected fraction parameter in MIDI "+E,N,0):(R.push(x[0].intt),R.push(x[2].intt));else if(P.indexOf(E)>=0)x.length!==4?t("Expected four parameters in MIDI "+E,N,0):x[0].type!=="number"||x[1].type!=="number"||x[2].type!=="number"||x[3].type!=="number"?t("Expected four integer parameters in MIDI "+E,N,0):(R.push(x[0].intt),R.push(x[1].intt),R.push(x[2].intt),R.push(x[3].intt));else if(_.indexOf(E)>=0)x.length!==5?t("Expected five parameters in MIDI "+E,N,0):x[0].type!=="number"||x[1].type!=="number"||x[2].type!=="number"||x[3].type!=="number"||x[4].type!=="number"?t("Expected five integer parameters in MIDI "+E,N,0):(R.push(x[0].intt),R.push(x[1].intt),R.push(x[2].intt),R.push(x[3].intt),R.push(x[4].intt));else if(C.indexOf(E)>=0)x.length!==1||x.length!==4?t("Expected one or two parameters in MIDI "+E,N,0):x[0].type!=="number"?t("Expected integer parameter in MIDI "+E,N,0):x.length===4?(x[1].token!=="octave"&&t("Expected octave parameter in MIDI "+E,N,0),x[2].token!=="="&&t("Expected octave parameter in MIDI "+E,N,0),x[3].type!=="number"&&t("Expected integer parameter for octave in MIDI "+E,N,0)):(R.push(x[0].intt),x.length===4&&R.push(x[3].intt));else if(q.indexOf(E)>=0)if(x.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+E,N,0);else if(x[0].type!=="alpha")t("Expected string parameter and at least one integer parameter in MIDI "+E,N,0);else{var ee=x.shift();for(R.push(ee.token);x.length>0;)ee=x.shift(),ee.type!=="number"&&t("Expected integer parameter in MIDI "+E,N,0),R.push(ee.intt)}else if(I.indexOf(E)>=0){if(x.length!==1&&x.length!==2)t("Expected one or two parameters in MIDI "+E,N,0);else if(x[0].type!=="number")t("Expected integer parameter in MIDI "+E,N,0);else if(x.length===2&&x[1].type!=="alpha")t("Expected alpha parameter in MIDI "+E,N,0);else if(R.push(x[0].intt),x.length===2){var V=x[1].token;V.indexOf("octave=")!=-1?(V=V.replace("octave=",""),V=parseInt(V),isNaN(V)?t("Expected octave value in MIDI"+E):(V<-1&&(t("Expected octave= in MIDI "+E+" to be >= -1 (recv:"+V+")"),V=-1),V>3&&(t("Expected octave= in MIDI "+E+" to be <= 3 (recv:"+V+")"),V=3),R.push(V))):t("Expected octave= in MIDI"+E)}}a.hasBeginMusic()?a.appendElement("midi",-1,-1,{cmd:E,params:R}):(T.formatting.midi===void 0&&(T.formatting.midi={}),T.formatting.midi[E]=R)};zt.parseFontChangeLine=function(x){x=x.replace(/\$\$/g,"");var T=x.split("$");if(T.length>1&&r.setfont){var N=[];T[0]!==""&&N.push({text:T[0]});for(var E=1;E<T.length;E++)if(T[E][0]==="0")N.push({text:T[E].substring(1).replace(/\x03/g,"$$")});else{var R=parseInt(T[E][0],10);r.setfont[R]?N.push({font:r.setfont[R],text:T[E].substring(1).replace(/\x03/g,"$$")}):N[N.length-1].text+="$"+T[E].replace(/\x03/g,"$$")}return N}return x.replace(/\x03/g,"$$")};var Y=["auto","above","below","hidden"];zt.addDirective=function(x){var T=e.tokenize(x,0,x.length);if(T.length===0||T[0].type!=="alpha")return null;var N=x.substring(x.indexOf(T[0].token)+T[0].token.length);N=e.stripComment(N);var E=T.shift().token.toLowerCase(),R="",ee;switch(E){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=N;break;case"graceslurs":if(T.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(T[0].token==="0"||T[0].token==="false")n.formatting.graceSlurs=!1;else if(T[0].token==="1"||T[0].token==="true")n.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+T[0].token+")";break;case"lineThickness":var V=Z(T);if(V.value!==void 0&&(n.formatting.lineThickness=V.value),V.error)return V.error;break;case"stretchlast":var ie=Z(T);if(ie.value!==void 0&&(n.formatting.stretchlast=ie.value),ie.error)return ie.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 w("vocalPosition",E,T,Y);case"dynamic":return w("dynamicPosition",E,T,Y);case"gchord":return w("chordPosition",E,T,Y);case"ornament":return w("ornamentPosition",E,T,Y);case"volume":return w("volumePosition",E,T,Y);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 g(E,T);case"voicescale":if(T.length!==1||T[0].type!=="number")return"voicescale requires one float as a parameter";var Ue=T.shift();return r.currentVoice&&(r.currentVoice.scale=Ue.floatt,a.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(T.length!==1)return"voicecolor requires one string as a parameter";var Ve=T.shift();return r.currentVoice&&(r.currentVoice.color=Ve.token,a.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var Pe=Math.round(p(E,T));return Pe.error?Pe.error:(a.addSpacing(Pe),null);case"scale":l(E,T);break;case"sep":if(T.length===0)a.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var Ce=e.getMeasurement(T);if(Ce.used===0)return'Directive "'+E+'" requires 3 numbers: space above, space below, length of line';var Le=Ce.value;if(Ce=e.getMeasurement(T),Ce.used===0)return'Directive "'+E+'" requires 3 numbers: space above, space below, length of line';var X=Ce.value;if(Ce=e.getMeasurement(T),Ce.used===0||T.length!==0)return'Directive "'+E+'" requires 3 numbers: space above, space below, length of line';var be=Ce.value;a.addSeparator(Le,X,be,{startChar:r.iChar,endChar:r.iChar+N.length})}break;case"barsperstaff":if(R=v("barsperstaff",E,T),R!==null)return R;break;case"staffnonote":if(T.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(T[0].token==="0")r.staffnonote=!0;else if(T[0].token==="1")r.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+T[0].token+")";break;case"printtempo":if(R=m("printTempo",E,T),R!==null)return R;break;case"partsbox":if(R=m("partsBox",E,T),R!==null)return R;r.partsfont.box=r.partsBox;break;case"freegchord":if(R=m("freegchord",E,T),R!==null)return R;break;case"measurenb":case"barnumbers":if(R=v("barNumbers",E,T),R!==null)return R;break;case"setbarnb":if(T.length!==1||T[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=a.setBarNumberImmediate(T[0].intt);break;case"keywarn":if(T.length!==1||T[0].type!=="number"||T[0].intt!==1&&T[0].intt!==0)return"Directive "+E+" requires 0 or 1 as a parameter.";r[E]=T[0].intt===1;break;case"begintext":var te="";for(ee=e.nextLine();ee&&ee.indexOf("%%endtext")!==0;){if(Qn.startsWith(ee,"%%")){var ne=ee.substring(2);ne=ne.trim()+`
|
|
61
|
+
`,te+=ne}else te+=ee.trim()+`
|
|
62
|
+
`;ee=e.nextLine()}a.addText(te,{startChar:r.iChar,endChar:r.iChar+te.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(ee=e.nextLine();ee&&ee.indexOf("%%endps")!==0;)e.nextLine();t("Postscript ignored",x,0);break;case"deco":N.length>0&&r.ignoredDecorations.push(N.substring(0,N.indexOf(" "))),t("Decoration redefinition ignored",x,0);break;case"text":var ue=e.translateString(N);a.addText(zt.parseFontChangeLine(ue),{startChar:r.iChar,endChar:r.iChar+N.length+7});break;case"center":var je=e.translateString(N);a.addCentered(zt.parseFontChangeLine(je));break;case"font":break;case"setfont":var qe=e.tokenize(N,0,N.length);if(qe.length>=4&&qe[0].token==="-"&&qe[1].type==="number"){var Ke=parseInt(qe[1].token);Ke>=1&&Ke<=9&&(r.setfont||(r.setfont=[]),qe.shift(),qe.shift(),r.setfont[Ke]=c(qe,r.setfont[Ke],x,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 h(E,T,x);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return d(E,T,x);case"barlabelfont":case"barnumberfont":case"barnumfont":return h("measurefont",T,x);case"staves":case"score":r.score_is_present=!0;for(var Qe=function(g0,Yh,Cn,Tn,$h){(Yh||r.staves.length===0)&&r.staves.push({index:r.staves.length,numVoices:0});var _t=Qn.last(r.staves);Cn!==void 0&&_t.bracket===void 0&&(_t.bracket=Cn),Tn!==void 0&&_t.brace===void 0&&(_t.brace=Tn),$h&&(_t.connectBarLines="end"),r.voices[g0]===void 0&&(r.voices[g0]={staffNum:_t.index,index:_t.numVoices},_t.numVoices++)},Ie=!1,Ze=!1,Te=!1,U=!1,ce=!1,M=!1,D=!1,$,F=function(){if(D=!0,$){var g0="start";$.staffNum>0&&(r.staves[$.staffNum-1].connectBarLines==="start"||r.staves[$.staffNum-1].connectBarLines==="continue")&&(g0="continue"),r.staves[$.staffNum].connectBarLines=g0}};T.length;){var H=T.shift();switch(H.token){case"(":Ie?t("Can't nest parenthesis in %%score",x,H.start):(Ie=!0,U=!0);break;case")":!Ie||U?t("Unexpected close parenthesis in %%score",x,H.start):Ie=!1;break;case"[":Ze?t("Can't nest brackets in %%score",x,H.start):(Ze=!0,ce=!0);break;case"]":!Ze||ce?t("Unexpected close bracket in %%score",x,H.start):(Ze=!1,r.staves[$.staffNum].bracket="end");break;case"{":Te?t("Can't nest braces in %%score",x,H.start):(Te=!0,M=!0);break;case"}":!Te||M?t("Unexpected close brace in %%score",x,H.start):(Te=!1,r.staves[$.staffNum].brace="end");break;case"|":F();break;default:for(var Q="";(H.type==="alpha"||H.type==="number")&&(Q+=H.token,H.continueId);)H=T.shift();var j=!Ie||U,K=ce?"start":Ze?"continue":void 0,W=M?"start":Te?"continue":void 0;Qe(Q,j,K,W,D),U=!1,ce=!1,M=!1,D=!1,$=r.voices[Q],E==="staves"&&F();break}}break;case"maxstaves":var J=e.getInt(N);J.digits===0?t("Expected number of staves in maxstaves"):J.value>0&&(n.formatting.maxStaves=J.value);break;case"newpage":var se=e.getInt(N);a.addNewPage(se.digits===0?-1:se.value);break;case"abc":var le=N.split(" ");switch(le[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var re=le.shift();a.addMetaText(E+re,le.join(" "),{startChar:r.iChar,endChar:r.iChar+N.length+5});break;default:return"Unknown directive: "+E+le[0]}break;case"header":case"footer":var oe=e.getMeat(N,0,N.length);oe=N.substring(oe.start,oe.end),oe[0]==='"'&&oe[oe.length-1]==='"'&&(oe=oe.substring(1,oe.length-1));var xe=oe.split(" "),he={};xe.length===1?he={left:"",center:xe[0],right:""}:xe.length===2?he={left:xe[0],center:xe[1],right:""}:he={left:xe[0],center:xe[1],right:xe[2]},xe.length>3&&t("Too many tabs in "+E+": "+xe.length+" found.",N,0),a.addMetaTextObj(E,he,{startChar:r.iChar,endChar:r.iChar+x.length});break;case"midi":var De=e.tokenize(N,0,N.length,!0);De.length>0&&De[0].token==="="&&De.shift(),De.length===0?t("Expected midi command",N,0):G(De,n,N);break;case"percmap":var ft=u(N);ft.error?t(ft.error,x,8):(n.formatting.percmap||(n.formatting.percmap={}),n.formatting.percmap[ft.key]=ft.value);break;case"visualtranspose":var St=e.getInt(N);St.digits===0?t("Expected number of half steps in visualTranspose"):r.globalTranspose=St.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":n.formatting[E]=N;break;default:return"Unknown directive: "+E}return null},zt.globalFormatting=function(x){for(var T in x)if(x.hasOwnProperty(T)){var N=""+x[T],E=e.tokenize(N,0,N.length),R;switch(T){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":h(T,E,N);break;case"scale":l(T,E);break;case"partsbox":R=m("partsBox",T,E),R!==null&&t(R),r.partsfont.box=r.partsBox;break;case"freegchord":R=m("freegchord",T,E),R!==null&&t(R);break;case"fontboxpadding":(E.length!==1||E[0].type!=="number")&&t('Directive "'+T+'" requires a number as a parameter.'),n.formatting.fontboxpadding=E[0].floatt;break;case"stafftopmargin":(E.length!==1||E[0].type!=="number")&&t('Directive "'+T+'" requires a number as a parameter.'),n.formatting.stafftopmargin=E[0].floatt;break;case"stretchlast":var ee=Z(E);if(ee.value!==void 0&&(n.formatting.stretchlast=ee.value),ee.error)return ee.error;break;default:t("Formatting directive unrecognized: ",T,0)}}};function Z(x){if(x.length===0)return{value:1};if(x.length===1)if(x[0].type==="number"){if(x[0].floatt>=0||x[0].floatt<=1)return{value:x[0].floatt}}else{if(x[0].token==="false")return{value:0};if(x[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+x[0].token+")"}}})();Zn.exports=zt});var ti=L((K5,ei)=>{var ra={},Jn=["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'''"];ra.pitchIndex=function(e){return Jn.indexOf(e)};ra.noteName=function(e){return Jn[e]};ei.exports=ra});var aa=L((Q5,ri)=>{var rr=["C","C\u266F","D","D\u266F","E","F","F\u266F","G","G\u266F","A","A\u266F","B"],ar=["C","D\u266D","D","E\u266D","E","F","G\u266D","G","A\u266D","A","B\u266D","B"],nr=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],ir=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];function Uf(e,t,r,n){if(!t||t%12===0)return e;for(;t<0;)t+=12;t>11&&(t=t%12);var a=e.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!a)return e;var i=a[1],s=a[2],o=a[3],c=a[4],h=rr.indexOf(i);if(h<0&&(h=ar.indexOf(i)),h<0&&(h=nr.indexOf(i)),h<0&&(h=ir.indexOf(i)),h<0)return e;h+=t,h=h%12,r?n?e=ir[h]:e=ar[h]:n?e=nr[h]:e=rr[h];var d=s&&(s.indexOf("dim")>=0||s.indexOf("\xB0")>=0);if(d&&e==="A#"&&(e="Bb"),d&&e==="D#"&&(e="Eb"),d&&e==="A\u266F"&&(e="B\u266D"),d&&e==="D\u266F"&&(e="E\u266D"),s&&(e+=s),o){var h=rr.indexOf(o);h<0&&(h=ar.indexOf(o)),h<0&&(h=nr.indexOf(o)),h<0&&(h=ir.indexOf(o)),e+="/",h>=0?(h+=t,h=h%12,r?n?e+=ir[h]:e+=ar[h]:n?e+=nr[h]:e+=rr[h]):e+=o}return c&&(e+=c),e}ri.exports=Uf});var na=L((Z5,ai)=>{var Ot={C:{modes:["CMaj","CIon","Amin","AAeo","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","DbIon","Bbmin","BbAeo","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","DIon","Bmin","BAeo","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","EbIon","Cmin","CAeo","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","EIon","C#min","C#Aeo","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","FIon","Dmin","DAeo","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","GbIon","Ebmin","EbAeo","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","GIon","Emin","EAeo","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","AbIon","Fmin","FAeo","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","AIon","F#min","F#Aeo","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","BbIon","Gmin","GAeo","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","BIon","G#min","G#Aeo","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","C#Ion","A#min","A#Aeo","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","F#Ion","D#min","D#Aeo","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","CbIon","Abmin","AbAeo","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},Vf=["maj","ion","min","aeo","m","mix","dor","phr","lyd","loc"];function jf(e){return Vf.indexOf(e.toLowerCase())>=0}var w0=null;function Kf(){w0={};for(var e=Object.keys(Ot),t=0;t<e.length;t++){var r=Ot[e[t]];w0[e[t].toLowerCase()]=e[t];for(var n=0;n<r.modes.length;n++){var a=r.modes[n].toLowerCase();w0[a]=e[t]}}}function Qf(e){w0||Kf();var t=e.toLowerCase().match(/([a-g][b#]?)(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)?/);if(!t||!t[2])return e;t=t[1]+t[2];var r=w0[t];return r||e}function Zf(e,t){var r=Ot[e];if(!r||t==="")return e;var n=t.toLowerCase().match(/^(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)/);if(!n)return e;for(var a=n[1],i=0;i<r.modes.length;i++){var s=r.modes[i],o=s.toLowerCase().indexOf(a);if(o!==-1&&o===s.length-a.length)return s.substring(0,s.length-a.length)}return e}function Jf(e,t){var r=Ot[e];if(!r)return e;for(;t<0;)t+=12;for(var n=(r.stepsFromC+t)%12,a=0;a<Object.keys(Ot).length;a++){var i=Object.keys(Ot)[a];if(Ot[i].stepsFromC===n)return i}return e}ai.exports={relativeMajor:Qf,relativeMode:Zf,transposeKey:Jf,isLegalMode:jf}});var oa=L((J5,si)=>{var{relativeMajor:eu}=na(),Ft={acc:"sharp",note:"f"},Kt={acc:"sharp",note:"c"},x0={acc:"sharp",note:"g"},sr={acc:"sharp",note:"d"},ia={acc:"sharp",note:"A"},ni={acc:"sharp",note:"e"},tu={acc:"sharp",note:"B"},Re={acc:"flat",note:"B"},dt={acc:"flat",note:"e"},Et={acc:"flat",note:"A"},k0={acc:"flat",note:"d"},sa={acc:"flat",note:"G"},ii={acc:"flat",note:"c"},ru={acc:"flat",note:"F"},au={"C#":[Ft,Kt,x0,sr,ia,ni,tu],"F#":[Ft,Kt,x0,sr,ia,ni],B:[Ft,Kt,x0,sr,ia],E:[Ft,Kt,x0,sr],A:[Ft,Kt,x0],D:[Ft,Kt],G:[Ft],C:[],F:[Re],Bb:[Re,dt],Eb:[Re,dt,Et],Cm:[Re,dt,Et],Ab:[Re,dt,Et,k0],Db:[Re,dt,Et,k0,sa],Gb:[Re,dt,Et,k0,sa,ii],Cb:[Re,dt,Et,k0,sa,ii,ru],"A#":[Re,dt],"B#":[],"D#":[Re,dt,Et],"E#":[Re],"G#":[Re,dt,Et,k0],none:[]};function nu(e){var t=au[eu(e)];return t?JSON.parse(JSON.stringify(t)):null}si.exports=nu});var ha=L((e4,li)=>{var oi=ti(),iu=aa(),ca=oa(),or={},su={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},ou=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],cu=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];or.keySignature=function(e,t,r,n,a){if(e.clef.type==="perc"||e.clef.type==="none")return{accidentals:ca(t),root:r,acc:n};a||(a=0),e.localTransposeVerticalMovement=0,e.localTransposePreferFlats=!1;var i=ca(t);if(!i)return e.key;if(e.localTranspose=(e.globalTranspose?e.globalTranspose:0)+a,!e.localTranspose)return{accidentals:i,root:r,acc:n};if(e.globalTransposeOrigKeySig=i,e.localTranspose%12===0)return e.localTransposeVerticalMovement=e.localTranspose/12*7,{accidentals:i,root:r,acc:n};var s=t[0];t[1]==="b"||t[1]==="#"?(s+=t[1],t=t.substr(2)):t=t.substr(1);var o=su[s],c=o!==void 0;c||(o=0,s="C",t="");for(var h=o+e.localTranspose;h<0;)h+=12;h>11&&(h=h%12);var d=t[0]==="m"?cu[h]:ou[h],l=d+t,f=ca(l);(f.length===0||f[0].acc==="flat")&&(e.localTransposePreferFlats=!0);var u=l.charCodeAt(0)-s.charCodeAt(0);return e.localTranspose>0?(u<0||u===0&&(s[1]==="#"||l[1]==="b"))&&(u+=7):e.localTranspose<0&&(u>0||u===0&&(s[1]==="b"||l[1]==="#"))&&(u-=7),e.localTranspose>0?e.localTransposeVerticalMovement=u+Math.floor(e.localTranspose/12)*7:e.localTransposeVerticalMovement=u+Math.ceil(e.localTranspose/12)*7,c?{accidentals:f,root:d[0],acc:d.length>1?d[1]:""}:{accidentals:[],root:r,acc:n}};or.chordName=function(e,t){return iu(t,e.localTranspose,e.localTransposePreferFlats,e.freegchord)};var ci=["c","d","e","f","g","a","b"];function lu(e,t,r,n,a){for(var i=ci[(e+49)%7],s=0,o=0;o<n.length;o++)n[o].note.toLowerCase()===i&&(s=la[n[o].acc]);for(var c=la[r],h=c-s,d=ci[(t+49)%7],l=0,f=0;f<a.accidentals.length;f++)a.accidentals[f].note.toLowerCase()===d&&(l=la[a.accidentals[f].acc]);var u=h+l;return u<-2&&(t--,u+=d==="c"||d==="f"?1:2),u>2&&(t++,u-=d==="b"||d==="e"?1:2),[t,u]}var la={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},hu={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},fu={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};or.note=function(e,t){if(!(!e.localTranspose||e.clef.type==="perc")){var r=t.pitch;if(e.localTransposeVerticalMovement&&(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.name)){var n=t.accidental?t.name.substring(1):t.name,a=t.accidental?t.name[0]:"",i=oi.pitchIndex(n);t.name=a+oi.noteName(i+e.localTransposeVerticalMovement)}if(t.accidental){var s=lu(r,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=s[0],t.accidental=hu[s[1]],t.name&&(t.name=fu[s[1]]+t.name.replace(/[_^=]/g,""))}}};li.exports=or});var cr=L((t4,fi)=>{var hi=tr(),uu=ha(),Be={};(function(){var e,t,r,n,a;Be.initialize=function(l,f,u,p,g){e=l,t=f,r=u,n=p,a=g},Be.standardKey=function(l,f,u,p){return uu.keySignature(r,l,f,u,p)};var i={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}},s=function(l,f){var u=i[l],p=u?u.mid:0;return p+f};Be.fixClef=function(l){var f=i[l.type];f&&(l.clefPos=f.pitch,l.type=f.clef)},Be.deepCopyKey=function(l){var f={accidentals:[],root:l.root,acc:l.acc,mode:l.mode};return l.accidentals.forEach(function(u){f.accidentals.push(Object.assign({},u))}),f};var o={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};Be.addPosToKey=function(l,f){var u=l.verticalPos;f.accidentals.forEach(function(p){var g=o[p.note];g=g-u,p.verticalPos=g}),f.impliedNaturals&&f.impliedNaturals.forEach(function(p){var g=o[p.note];g=g-u,p.verticalPos=g}),u<-10?(f.accidentals.forEach(function(p){p.verticalPos-=7,(p.verticalPos>=11||p.verticalPos===10&&p.acc==="flat")&&(p.verticalPos-=7),p.note==="A"&&p.acc==="sharp"&&(p.verticalPos-=7),(p.note==="G"||p.note==="F")&&p.acc==="flat"&&(p.verticalPos-=7)}),f.impliedNaturals&&f.impliedNaturals.forEach(function(p){p.verticalPos-=7,(p.verticalPos>=11||p.verticalPos===10&&p.acc==="flat")&&(p.verticalPos-=7),p.note==="A"&&p.acc==="sharp"&&(p.verticalPos-=7),(p.note==="G"||p.note==="F")&&p.acc==="flat"&&(p.verticalPos-=7)})):u<-4?(f.accidentals.forEach(function(p){p.verticalPos-=7,u===-8&&(p.note==="f"||p.note==="g")&&p.acc==="sharp"&&(p.verticalPos-=7)}),f.impliedNaturals&&f.impliedNaturals.forEach(function(p){p.verticalPos-=7,u===-8&&(p.note==="f"||p.note==="g")&&p.acc==="sharp"&&(p.verticalPos-=7)})):u>=7&&(f.accidentals.forEach(function(p){p.verticalPos+=7}),f.impliedNaturals&&f.impliedNaturals.forEach(function(p){p.verticalPos+=7}))},Be.fixKey=function(l,f){var u=Object.assign({},f);return Be.addPosToKey(l,u),u};var c=function(l){var f=0,u=l[f++];(u==="^"||u==="_")&&(u=l[f++]);var p=o[u];for(p===void 0&&(p=6);f<l.length;f++)if(l[f]===",")p-=7;else if(l[f]==="'")p+=7;else break;return{mid:p-6,str:l.substring(f)}},h=function(l){for(var f=0;f<l.length;f++)l[f].note==="b"?l[f].note="B":l[f].note==="a"?l[f].note="A":l[f].note==="F"?l[f].note="f":l[f].note==="E"?l[f].note="e":l[f].note==="D"?l[f].note="d":l[f].note==="C"?l[f].note="c":l[f].note==="G"&&l[f].acc==="sharp"?l[f].note="g":l[f].note==="g"&&l[f].acc==="flat"&&(l[f].note="G")};Be.parseKey=function(l,f){l.length===0&&(l="none");var u=e.tokenize(l,0,l.length),p={};if(u.length===0)return t("Must pass in key signature.",l,0),p;switch(u[0].token){case"HP":hi.addDirective("bagpipes"),r.key={root:"HP",accidentals:[],acc:"",mode:""},p.foundKey=!0,u.shift();break;case"Hp":hi.addDirective("bagpipes"),r.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},p.foundKey=!0,u.shift();break;case"none":r.key={root:"none",accidentals:[],acc:"",mode:""},p.foundKey=!0,u.shift();break;default:var g=e.getKeyPitch(u[0].token);if(g.len>0){p.foundKey=!0;var v="",m="";u[0].token.length>1?u[0].token=u[0].token.substring(1):u.shift();var w=g.token;if(u.length>0){var k=e.getSharpFlat(u[0].token);if(k.len>0&&(u[0].token.length>1?u[0].token=u[0].token.substring(1):u.shift(),w+=k.token,v=k.token),u.length>0){var b=e.getMode(u[0].token);b.len>0&&(u.shift(),w+=b.token,m=b.token)}if(Be.standardKey(w,g.token,v,0)===void 0)return t("Unsupported key signature: "+w,l,0),p}var y=Be.deepCopyKey(r.key),C=!f&&r.globalTranspose?-r.globalTranspose:0,A;if(f&&(A=r.globalTransposeOrigKeySig),r.key=Be.deepCopyKey(Be.standardKey(w,g.token,v,C)),f&&(r.globalTransposeOrigKeySig=A),r.key.mode=m,y&&r.keywarn!==!1){for(var P,_=0;_<r.key.accidentals.length;_++)for(P=0;P<y.accidentals.length;P++)y.accidentals[P].note&&r.key.accidentals[_].note.toLowerCase()===y.accidentals[P].note.toLowerCase()&&(y.accidentals[P].note=null);for(P=0;P<y.accidentals.length;P++)y.accidentals[P].note&&(r.key.impliedNaturals||(r.key.impliedNaturals=[]),r.key.impliedNaturals.push({acc:"natural",note:y.accidentals[P].note}))}}break}if(u.length===0||(u[0].token==="exp"&&u.shift(),u.length===0)||(u[0].token==="oct"&&u.shift(),u.length===0))return p;var B=e.getKeyAccidentals2(u);if(B.warn&&t(B.warn,l,0),B.accs){p.foundKey||(p.foundKey=!0,r.key={root:"none",acc:"",mode:"",accidentals:[]}),h(B.accs);for(var O=0;O<B.accs.length;O++){for(var q=!1,I=0;I<r.key.accidentals.length&&!q;I++)r.key.accidentals[I].note===B.accs[O].note&&(q=!0,r.key.accidentals[I].acc!==B.accs[O].acc&&(r.key.accidentals[I].acc=B.accs[O].acc,r.key.explicitAccidentals||(r.key.explicitAccidentals=[]),r.key.explicitAccidentals.push(B.accs[O])));if(!q&&(r.key.explicitAccidentals||(r.key.explicitAccidentals=[]),r.key.explicitAccidentals.push(B.accs[O]),r.key.accidentals.push(B.accs[O]),r.key.impliedNaturals))for(var G=0;G<r.key.impliedNaturals.length;G++)r.key.impliedNaturals[G].note===B.accs[O].note&&r.key.impliedNaturals.splice(G,1)}}for(var Y;u.length>0;)switch(u[0].token){case"m":case"middle":if(u.shift(),u.length===0)return t("Expected = after middle",l,0),p;if(Y=u.shift(),Y.token!=="="){t("Expected = after middle",l,Y.start);break}if(u.length===0)return t("Expected parameter after middle=",l,0),p;var Z=e.getPitchFromTokens(u);Z.warn&&t(Z.warn,l,0),Z.position&&(r.clef.verticalPos=Z.position-6);break;case"transpose":if(u.shift(),u.length===0)return t("Expected = after transpose",l,0),p;if(Y=u.shift(),Y.token!=="="){t("Expected = after transpose",l,Y.start);break}if(u.length===0)return t("Expected parameter after transpose=",l,0),p;if(u[0].type!=="number"){t("Expected number after transpose",l,u[0].start);break}r.clef.transpose=u[0].intt,u.shift();break;case"stafflines":if(u.shift(),u.length===0)return t("Expected = after stafflines",l,0),p;if(Y=u.shift(),Y.token!=="="){t("Expected = after stafflines",l,Y.start);break}if(u.length===0)return t("Expected parameter after stafflines=",l,0),p;if(u[0].type!=="number"){t("Expected number after stafflines",l,u[0].start);break}r.clef.stafflines=u[0].intt,u.shift();break;case"staffscale":if(u.shift(),u.length===0)return t("Expected = after staffscale",l,0),p;if(Y=u.shift(),Y.token!=="="){t("Expected = after staffscale",l,Y.start);break}if(u.length===0)return t("Expected parameter after staffscale=",l,0),p;if(u[0].type!=="number"){t("Expected number after staffscale",l,u[0].start);break}r.clef.staffscale=u[0].floatt,u.shift();break;case"octave":if(u.shift(),u.length===0)return t("Expected = after octave",l,0),p;if(Y=u.shift(),Y.token!=="="){t("Expected = after octave",l,Y.start);break}if(u.length===0)return t("Expected parameter after octave=",l,0),p;if(u[0].type!=="number"){t("Expected number after octave",l,u[0].start);break}r.octave=u[0].intt,u.shift();break;case"style":if(u.shift(),u.length===0)return t("Expected = after style",l,0),p;if(Y=u.shift(),Y.token!=="="){t("Expected = after style",l,Y.start);break}if(u.length===0)return t("Expected parameter after style=",l,0),p;switch(u[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=u[0].token,u.shift();break;default:t("error parsing style element: "+u[0].token,l,u[0].start);break}break;case"clef":if(u.shift(),u.length===0)return t("Expected = after clef",l,0),p;if(Y=u.shift(),Y.token!=="="){t("Expected = after clef",l,Y.start);break}if(u.length===0)return t("Expected parameter after clef=",l,0),p;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var x=u.shift();switch(x.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":x.token="alto";break;case"F":x.token="bass";break;case"G":x.token="treble";break;case"c":x.token="alto";break;case"f":x.token="bass";break;case"g":x.token="treble";break;default:t("Expected clef name. Found "+x.token,l,x.start);break}u.length>0&&u[0].type==="number"&&(x.token+=u[0].token,u.shift()),u.length>1&&(u[0].token==="-"||u[0].token==="+"||u[0].token==="^"||u[0].token==="_")&&u[1].token==="8"&&(x.token+=u[0].token+u[1].token,u.shift(),u.shift()),r.clef={type:x.token,verticalPos:s(x.token,0)},r.currentVoice&&r.currentVoice.transpose!==void 0&&(r.clef.transpose=r.currentVoice.transpose),p.foundClef=!0;break;default:t("Unknown parameter: "+u[0].token,l,u[0].start),u.shift()}return p};var d=function(l){var f=r.voices[l];if(!(r.currentVoice&&r.currentVoice.index===f.index&&r.currentVoice.staffNum===f.staffNum))return r.currentVoice=f,a.setCurrentVoice(f.staffNum,f.index,l)};Be.parseVoice=function(l,f,u){var p=e.getMeat(l,f,u),g=p.start,v=p.end,m=e.getToken(l,g,v);if(m.length===0){t("Expected a voice id",l,g);return}var w=!1;r.voices[m]===void 0&&(r.voices[m]={},w=!0,r.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",l,g)),g+=m.length,g+=e.eatWhiteSpace(l,g);for(var k={startStaff:w},b=function(Z){var x=e.getVoiceToken(l,g,v);x.warn!==void 0?t("Expected value for "+Z+" in voice: "+x.warn,l,g):x.err!==void 0?t("Expected value for "+Z+" in voice: "+x.err,l,g):x.token.length===0&&l[g]!=='"'?t("Expected value for "+Z+" in voice",l,g):k[Z]=x.token,g+=x.len},y=function(Z,x,T){var N=e.getVoiceToken(l,g,v);N.warn!==void 0?t("Expected value for "+x+" in voice: "+N.warn,l,g):N.err!==void 0?t("Expected value for "+x+" in voice: "+N.err,l,g):N.token.length===0&&l[g]!=='"'?t("Expected value for "+x+" in voice",l,g):(T==="number"&&(N.token=parseFloat(N.token)),r.voices[Z][x]=N.token),g+=N.len},C=function(Z,x){var T=e.getVoiceToken(l,g,v);if(T.warn!==void 0)t("Expected value for "+Z+" in voice: "+T.warn,l,g);else if(T.err!==void 0)t("Expected value for "+Z+" in voice: "+T.err,l,g);else if(T.token.length===0&&l[g]!=='"')t("Expected value for "+Z+" in voice",l,g);else return x==="number"&&(T.token=parseFloat(T.token)),T.token;g+=T.len},A=function(Z,x){var T={_B:2,_E:9,_b:-10,_e:-3},N=e.getVoiceToken(l,g,v);if(N.warn!==void 0)t("Expected one of (_B, _E, _b, _e) for "+x+" in voice: "+N.warn,l,g);else if(N.token.length===0&&l[g]!=='"')t("Expected one of (_B, _E, _b, _e) for "+x+" in voice",l,g);else{var E=T[N.token];E?r.voices[Z][x]=E:t("Expected one of (_B, _E, _b, _e) for "+x+" in voice",l,g)}g+=N.len};g<v;){var P=e.getVoiceToken(l,g,v);if(g+=P.len,P.warn)t("Error parsing voice: "+P.warn,l,g);else{var _=null;switch(P.token){case"clef":case"cl":b("clef");var B=0;k.clef!==void 0&&(k.clef=k.clef.replace(/[',]/g,""),k.clef.indexOf("+16")!==-1&&(B+=14,k.clef=k.clef.replace("+16","")),k.verticalPos=s(k.clef,B));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 O=0;k.clef=P.token.replace(/[',]/g,""),k.verticalPos=s(k.clef,O),r.voices[m].clef=P.token;break;case"staves":case"stave":case"stv":b("staves");break;case"brace":case"brc":b("brace");break;case"bracket":case"brk":b("bracket");break;case"name":case"nm":b("name");break;case"subname":case"sname":case"snm":b("subname");break;case"merge":k.startStaff=!1;break;case"stem":case"stems":_=e.getVoiceToken(l,g,v),_.warn!==void 0?t("Expected value for stems in voice: "+_.warn,l,g):_.err!==void 0?t("Expected value for stems in voice: "+_.err,l,g):_.token==="up"||_.token==="down"?r.voices[m].stem=_.token:t("Expected up or down for voice stem",l,g),g+=_.len;break;case"up":case"down":r.voices[m].stem=P.token;break;case"middle":case"m":b("verticalPos"),k.verticalPos=c(k.verticalPos).mid;break;case"gchords":case"gch":r.voices[m].suppressChords=!0,_=e.getVoiceToken(l,g,v),_.token==="0"&&(g=g+_.len);break;case"space":case"spc":b("spacing");break;case"scale":y(m,"scale","number");break;case"score":A(m,"scoreTranspose");break;case"transpose":y(m,"transpose","number");break;case"stafflines":y(m,"stafflines","number");break;case"staffscale":y(m,"staffscale","number");break;case"octave":y(m,"octave","number");break;case"volume":y(m,"volume","number");break;case"cue":var q=C("cue","string");q==="on"?r.voices[m].scale=.6:r.voices[m].scale=1;break;case"style":_=e.getVoiceToken(l,g,v),_.warn!==void 0?t("Expected value for style in voice: "+_.warn,l,g):_.err!==void 0?t("Expected value for style in voice: "+_.err,l,g):_.token==="normal"||_.token==="harmonic"||_.token==="rhythm"||_.token==="x"||_.token==="triangle"?r.voices[m].style=_.token:t("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",l,g),g+=_.len;break}}g+=e.eatWhiteSpace(l,g)}if((k.startStaff||r.staves.length===0)&&(r.staves.push({index:r.staves.length,meter:r.origMeter}),r.score_is_present||(r.staves[r.staves.length-1].numVoices=0)),r.voices[m].staffNum===void 0){r.voices[m].staffNum=r.staves.length-1;var I=0;for(var G in r.voices)r.voices.hasOwnProperty(G)&&r.voices[G].staffNum===r.voices[m].staffNum&&I++;r.voices[m].index=I-1}var Y=r.staves[r.voices[m].staffNum];return r.score_is_present||Y.numVoices++,k.clef&&(Y.clef={type:k.clef,verticalPos:k.verticalPos}),k.spacing&&(Y.spacing_below_offset=k.spacing),k.verticalPos&&(Y.verticalPos=k.verticalPos),k.name&&(Y.name?Y.name.push(k.name):Y.name=[k.name]),k.subname&&(Y.subname?Y.subname.push(k.subname):Y.subname=[k.subname]),d(m)}})();fi.exports=Be});var di=L((r4,ui)=>{var lr=tt(),pt=tr(),gt=cr(),du=function(e,t,r,n,a){this.reset=function(o,c,h,d){gt.initialize(o,c,h,d,a),pt.initialize(o,c,h,d,a)},this.reset(e,t,r,n),this.setTitle=function(o,c){r.hasMainTitle?a.addSubtitle(o,{startChar:r.iChar,endChar:r.iChar+c+2}):(a.addMetaText("title",o,{startChar:r.iChar,endChar:r.iChar+c+2}),r.hasMainTitle=!0)},this.setMeter=function(o){if(o=e.stripComment(o),o==="C")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"common_time"};if(o==="C|")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"cut_time"};if(o==="o")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum"};if(o==="c")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum"};if(o==="o.")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if(o==="c.")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(o.length===0||o.toLowerCase()==="none")return r.havent_set_length===!0&&(r.default_length=.125,r.havent_set_length=!1),null;var c=e.tokenize(o,0,o.length);try{var h=function(){var g={value:0,num:""},v=c.shift();for(v.token==="("&&(v=c.shift());;){if(v.type!=="number")throw"Expected top number of meter";if(g.value+=parseInt(v.token),g.num+=v.token,c.length===0||c[0].token==="/")return g;if(v=c.shift(),v.token===")"){if(c.length===0||c[0].token==="/")return g;throw"Unexpected paren in meter"}if(v.token!=="."&&v.token!=="+"||(g.num+=v.token,c.length===0))throw"Expected top number of meter";v=c.shift()}return g},d=function(){var g=h();if(c.length===0)return g;var v=c.shift();if(v.token!=="/")throw"Expected slash in meter";if(v=c.shift(),v.type!=="number")throw"Expected bottom number of meter";return g.den=v.token,g.value=g.value/parseInt(g.den),g};if(c.length===0)throw"Expected meter definition in M: line";for(var l={type:"specified",value:[]},f=0;;){var u=d();f+=u.value;var p={num:u.num};if(u.den!==void 0&&(p.den=u.den),l.value.push(p),c.length===0)break}return r.havent_set_length===!0&&(r.default_length=f<.75?.0625:.125,r.havent_set_length=!1),l}catch(g){t(g,o,0)}return null},this.calcTempo=function(o){var c=.25;r.meter&&r.meter.type==="specified"?c=1/parseInt(r.meter.value[0].den):r.origMeter&&r.origMeter.type==="specified"&&(c=1/parseInt(r.origMeter.value[0].den));for(var h=0;h<o.duration;h++)o.duration[h]=c*o.duration[h];return o},this.resolveTempo=function(){r.tempo&&(this.calcTempo(r.tempo),n.metaText.tempo=r.tempo,delete r.tempo)},this.addUserDefinition=function(o,c,h){var d=o.indexOf("=",c);if(d===-1){t("Need an = in a macro definition",o,c);return}var l=lr.strip(o.substring(c,d)),f=lr.strip(o.substring(d+1));if(l.length!==1){t("Macro definitions can only be one character",o,c);return}var u="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~";if(u.indexOf(l)===-1){t("Macro definitions must be H-Y, h-w, or tilde",o,c);return}if(f.length===0){t("Missing macro definition",o,c);return}r.macros===void 0&&(r.macros={}),r.macros[l]=f},this.setDefaultLength=function(o,c,h){var d=o.substring(c,h).replace(/ /g,""),l=d.split("/");if(l.length===2){var f=parseInt(l[0]),u=parseInt(l[1]);u>0&&(r.default_length=f/u,r.havent_set_length=!1)}else l.length===1&&l[0]==="1"&&(r.default_length=1,r.havent_set_length=!1)};var i={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(o,c,h,d){try{var l=e.tokenize(o,c,h);if(l.length===0)throw"Missing parameter in Q: field";var f={startChar:d+c-2,endChar:d+h},u=!0,p=l.shift();if(p.type==="quote"&&(f.preString=p.token,p=l.shift(),l.length===0))return i[f.preString.toLowerCase()]&&(f.bpm=i[f.preString.toLowerCase()],f.suppressBpm=!0),{type:"immediate",tempo:f};if(p.type==="alpha"&&p.token==="C"){if(l.length===0)throw"Missing tempo after C in Q: field";if(p=l.shift(),p.type==="punct"&&p.token==="="){if(l.length===0)throw"Missing tempo after = in Q: field";if(p=l.shift(),p.type!=="number")throw"Expected number after = in Q: field";f.duration=[1],f.bpm=parseInt(p.token)}else if(p.type==="number"){if(f.duration=[parseInt(p.token)],l.length===0)throw"Missing = after duration in Q: field";if(p=l.shift(),p.type!=="punct"||p.token!=="=")throw"Expected = after duration in Q: field";if(l.length===0)throw"Missing tempo after = in Q: field";if(p=l.shift(),p.type!=="number")throw"Expected number after = in Q: field";f.bpm=parseInt(p.token)}else throw"Expected number or equal after C in Q: field"}else if(p.type==="number"){var g=parseInt(p.token);if(l.length===0||l[0].type==="quote")f.duration=[1],f.bpm=g;else{if(u=!1,p=l.shift(),p.type!=="punct"&&p.token!=="/"||(p=l.shift(),p.type!=="number"))throw"Expected fraction in Q: field";var v=parseInt(p.token);for(f.duration=[g/v];l.length>0&&l[0].token!=="="&&l[0].type!=="quote";){if(p=l.shift(),p.type!=="number"||(g=parseInt(p.token),p=l.shift(),p.type!=="punct"&&p.token!=="/")||(p=l.shift(),p.type!=="number"))throw"Expected fraction in Q: field";v=parseInt(p.token),f.duration.push(g/v)}if(p=l.shift(),p.type!=="punct"&&p.token!=="=")throw"Expected = in Q: field";if(p=l.shift(),p.type!=="number")throw"Expected tempo in Q: field";f.bpm=parseInt(p.token)}}else throw"Unknown value in Q: field";if(l.length!==0&&(p=l.shift(),p.type==="quote"&&(f.postString=p.token,p=l.shift()),l.length!==0))throw"Unexpected string at end of Q: field";return r.printTempo===!1&&(f.suppress=!0),{type:u?"delaySet":"immediate",tempo:f}}catch(m){return t(m,o,c),{type:"none"}}},this.letter_to_inline_header=function(o,c,h){var d=!1,l=e.eatWhiteSpace(o,c);if(c+=l,o.length>=c+5&&o[c]==="["&&o[c+2]===":"){var f=o.indexOf("]",c),u=r.iChar+c,p=r.iChar+f+1;switch(o.substring(c,c+3)){case"[I:":var g=pt.addDirective(o.substring(c+3,f));return g&&t(g,o,c),[f-c+1+l];case"[M:":var v=this.setMeter(o.substring(c+3,f));return a.hasBeginMusic()&&v?a.appendStartingElement("meter",u,p,v):r.meter=v,[f-c+1+l];case"[K:":var m=gt.parseKey(o.substring(c+3,f),!0);return m.foundClef&&a.hasBeginMusic()&&a.appendStartingElement("clef",u,p,r.clef),m.foundKey&&a.hasBeginMusic()&&a.appendStartingElement("key",u,p,gt.fixKey(r.clef,r.key)),[f-c+1+l];case"[P:":var w=pt.parseFontChangeLine(o.substring(c+3,f));return h||n.lines.length<=n.lineNum?r.partForNextLine={title:w,startChar:u,endChar:p}:a.appendElement("part",u,p,{title:w}),[f-c+1+l];case"[L:":return this.setDefaultLength(o,c+3,f),[f-c+1+l];case"[Q:":if(f>0){var k=this.setTempo(o,c+3,f,r.iChar);return k.type==="delaySet"?a.hasBeginMusic()?a.appendElement("tempo",u,p,this.calcTempo(k.tempo)):r.tempoForNextLine=["tempo",u,p,this.calcTempo(k.tempo)]:k.type==="immediate"&&(!h&&a.hasBeginMusic()?a.appendElement("tempo",u,p,k.tempo):r.tempoForNextLine=["tempo",u,p,k.tempo]),[f-c+1+l,o[c+1],o.substring(c+3,f)]}break;case"[V:":if(f>0)return d=gt.parseVoice(o,c+3,f),[f-c+1+l,o[c+1],o.substring(c+3,f),d];break;case"[r:":return[f-c+1+l];default:}}return[0]},this.letter_to_body_header=function(o,c){var h=!1;if(o.length>=c+3)switch(o.substring(c,c+2)){case"I:":var d=pt.addDirective(o.substring(c+2));return d&&t(d,o,c),[o.length];case"M:":var l=this.setMeter(o.substring(c+2));return a.hasBeginMusic()&&l&&a.appendStartingElement("meter",r.iChar+c,r.iChar+o.length,l),[o.length];case"K:":var f=gt.parseKey(o.substring(c+2),a.hasBeginMusic());return f.foundClef&&a.hasBeginMusic()&&r.keywarn!==!1&&a.appendStartingElement("clef",r.iChar+c,r.iChar+o.length,r.clef),f.foundKey&&a.hasBeginMusic()&&r.keywarn!==!1&&a.appendStartingElement("key",r.iChar+c,r.iChar+o.length,gt.fixKey(r.clef,r.key)),[o.length];case"P:":return a.hasBeginMusic()&&a.appendElement("part",r.iChar+c,r.iChar+o.length,{title:o.substring(c+2)}),[o.length];case"L:":return this.setDefaultLength(o,c+2,o.length),[o.length];case"Q:":var u=o.indexOf("",c+2);u===-1&&(u=o.length);var p=this.setTempo(o,c+2,u,r.iChar);return p.type==="delaySet"?a.appendElement("tempo",r.iChar+c,r.iChar+o.length,this.calcTempo(p.tempo)):p.type==="immediate"&&a.appendElement("tempo",r.iChar+c,r.iChar+o.length,p.tempo),[u,o[c],lr.strip(o.substring(c+2))];case"V:":return h=gt.parseVoice(o,c+2,o.length),[o.length,o[c],lr.strip(o.substring(c+2)),h];default:}return[0]};var s={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(o){var c=s[o[0]],h=o.length-2,d=e.translateString(e.stripComment(o.substring(2)));if(c==="unalignedWords"||c==="notes")a.addMetaTextArray(c,pt.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+o.length});else if(c!==void 0)a.addMetaText(c,pt.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+o.length});else{var l=r.iChar,f=l+o.length;switch(o[0]){case"H":for(a.addMetaTextArray("history",pt.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+o.length}),o=e.peekLine();o&&o[1]!==":";)e.nextLine(),a.addMetaTextArray("history",pt.parseFontChangeLine(e.translateString(e.stripComment(o))),{startChar:r.iChar,endChar:r.iChar+o.length}),o=e.peekLine();break;case"K":this.resolveTempo();var u=gt.parseKey(o.substring(2),!1);!r.is_in_header&&a.hasBeginMusic()&&r.keywarn!==!1&&(u.foundClef&&a.appendStartingElement("clef",l,f,r.clef),u.foundKey&&a.appendStartingElement("key",l,f,gt.fixKey(r.clef,r.key))),r.is_in_header=!1;break;case"L":this.setDefaultLength(o,2,o.length);break;case"M":r.origMeter=r.meter=this.setMeter(o.substring(2));break;case"P":r.is_in_header?a.addMetaText("partOrder",pt.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+o.length}):r.partForNextLine={title:d,startChar:l,endChar:f};break;case"Q":var p=this.setTempo(o,2,o.length,r.iChar);p.type==="delaySet"?r.tempo=p.tempo:p.type==="immediate"&&(n.metaText.tempo?r.tempoForNextLine=["tempo",l,f,p.tempo]:n.metaText.tempo=p.tempo);break;case"T":r.titlecaps&&(d=d.toUpperCase()),this.setTitle(pt.parseFontChangeLine(e.theReverser(d)),h);break;case"U":this.addUserDefinition(o,2,o.length);break;case"V":if(gt.parseVoice(o,2,o.length),!r.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",o,0);break;default:return{regular:!0}}}return{}}};ui.exports=du});var pi=L((a4,Ge)=>{Ge.exports.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"];Ge.exports.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"];Ge.exports.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"];Ge.exports.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]];Ge.exports.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]];Ge.exports.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{";Ge.exports.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];Ge.exports.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};Ge.exports.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"};Ge.exports.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"};Ge.exports.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}});var Ai=L((n4,Ei)=>{var gi=cr(),Si=ha(),ge,ke,S,at,rt,T0,{legalAccents:vi,volumeDecorations:bi,dynamicDecorations:mi,accentPseudonyms:yi,accentDynamicPseudonyms:wi,nonDecorations:pu,durations:gu,pitches:vu,rests:bu,accMap:xi,tripletQ:mu}=pi(),da=function(e,t,r,n,a,i){ge=e,ke=t,S=r,at=n,rt=a,T0=i,this.lineContinuation=!1},ki=function(e,t,r){if(e.inTie[t]===void 0)return!1;var n=e.currentVoice?e.currentVoice.staffNum*100+e.currentVoice.index:0;return!!(e.inTie[t][n]&&(r.pitches!==void 0||r.rest.type!=="spacer"))},z={};da.prototype.parseMusic=function(e){T0.resolveTempo(),S.is_in_header=!1;for(var t=0,r=S.iChar;ge.isWhiteSpace(e[t])&&t<e.length;)t++;if(!(t===e.length||e[t]==="%")){var n=S.start_new_line;S.continueall===void 0?S.start_new_line=!0:S.start_new_line=!1;var a=0,i=T0.letter_to_body_header(e,t);i[0]>0&&(t+=i[0],i[1]==="V"&&this.startNewLine());for(var s=0;t<e.length;){var o=t;if(e[t]==="%")break;var c=T0.letter_to_inline_header(e,t,n);if(c[0]>0)t+=c[0],c[1]==="V"&&(n=!0);else{(!rt.hasBeginMusic()||n&&!this.lineContinuation)&&(this.startNewLine(),n=!1);for(var h;;)if(h=ge.eatWhiteSpace(e,t),h>0&&(t+=h),t>0&&e[t-1]===""&&(h=T0.letter_to_body_header(e,t),h[0]>0&&(h[1]==="V"&&this.startNewLine(),t=h[0],S.start_new_line=!1)),h=ku(e,t),h[0]>0&&(t+=h[0]),h=yu(e,t),h[0]>0){z.chord||(z.chord=[]);var d=ge.translateString(h[1]);d=d.replace(/;/g,`
|
|
63
|
+
`);for(var l=!1,f=0;f<z.chord.length;f++)z.chord[f].position===h[2]&&(l=!0,z.chord[f].name+=`
|
|
64
|
+
`+d);l===!1&&(h[2]===null&&h[3]?z.chord.push({name:d,rel_position:h[3]}):z.chord.push({name:d,position:h[2]})),t+=h[0];var u=ge.skipWhiteSpace(e.substring(t));u>0&&(z.force_end_beam_last=!0),t+=u}else if(pu.indexOf(e[t])===-1?h=Ti(e,t):h=[0],h[0]>0)h[1]===null?t+1<e.length&&this.startNewLine():h[1].length>0&&(h[1].indexOf("style=")===0?z.style=h[1].substr(6):(z.decoration===void 0&&(z.decoration=[]),h[1]==="beambr1"?z.beambr=1:h[1]==="beambr2"?z.beambr=2:z.decoration.push(h[1]))),t+=h[0];else if(h=wu(e,t),h[0]>0)z.gracenotes=h[1],t+=h[0];else break;if(h=Cu(e,t),h[0]>0){s=0,z.gracenotes!==void 0&&(z.rest={type:"spacer"},z.duration=.125,S.addFormattingOptions(z,at.formatting,"note"),rt.appendElement("note",r+t,r+t+h[0],z),S.measureNotEmpty=!0,z={});var p={type:h[1]};p.type.length===0?ke("Unknown bar type",e,t):(S.inEnding&&p.type!=="bar_thin"&&(p.endEnding=!0,S.inEnding=!1),h[2]&&(p.startEnding=h[2],S.inEnding&&(p.endEnding=!0),S.inEnding=!0,h[1]==="bar_right_repeat"?S.restoreStartEndingHoldOvers():S.duplicateStartEndingHoldOvers()),z.decoration!==void 0&&(p.decoration=z.decoration),z.chord!==void 0&&(p.chord=z.chord),p.startEnding&&S.barFirstEndingNum===void 0?S.barFirstEndingNum=S.currBarNumber:p.startEnding&&p.endEnding&&S.barFirstEndingNum?S.currBarNumber=S.barFirstEndingNum:p.endEnding&&(S.barFirstEndingNum=void 0),p.type!=="bar_invisible"&&S.measureNotEmpty&&ua()&&(S.currBarNumber++,S.barNumbers&&S.currBarNumber%S.barNumbers===0&&(p.barNumber=S.currBarNumber)),S.addFormattingOptions(z,at.formatting,"bar"),rt.appendElement("bar",r+o,r+t+h[0],p),S.measureNotEmpty=!1,z={}),t+=h[0]}else if(e[t]==="&")h=xu(e,t),h[0]>0&&(rt.appendElement("overlay",r,r+1,{}),t+=1,s++);else{if(h=Tu(e,t),h.consumed>0&&(h.startSlur!==void 0&&(z.startSlur=h.startSlur),h.dottedSlur&&(z.dottedSlur=!0),h.triplet!==void 0&&(a>0?ke("Can't nest triplets",e,t):(z.startTriplet=h.triplet,z.tripletMultiplier=h.tripletQ/h.triplet,z.tripletR=h.num_notes,a=h.num_notes===void 0?h.triplet:h.num_notes)),t+=h.consumed),e[t]==="["){var g=t;t++;for(var v=null,m=!1,w=!1;!w;){var k=Ti(e,t);k[0]>0&&(t+=k[0]);var b=fa(e,t,{},!1);if(b!==null&&b.pitch!==void 0)k[0]>0&&k[1].indexOf("style=")!==0&&(z.decoration===void 0&&(z.decoration=[]),z.decoration.push(k[1])),b.end_beam&&(z.end_beam=!0,delete b.end_beam),z.pitches===void 0?(z.duration=b.duration,z.pitches=[b]):z.pitches.push(b),delete b.duration,k[0]>0&&k[1].indexOf("style=")===0&&(z.pitches[z.pitches.length-1].style=k[1].substr(6)),S.inTieChord[z.pitches.length]&&(b.endTie=!0,S.inTieChord[z.pitches.length]=void 0),b.startTie&&(S.inTieChord[z.pitches.length]=!0),t=b.endChar,delete b.endChar;else if(e[t]===" ")ke("Spaces are not allowed in chords",e,t),t++;else{if(t<e.length&&e[t]==="]"){t++,S.next_note_duration!==0&&(z.duration=z.duration*S.next_note_duration,S.next_note_duration=0),ki(S,s,z)&&(z.pitches.forEach(function(q){q.endTie=!0}),C0(S,s,!1)),a>0&&!(z.rest&&z.rest.type==="spacer")&&(a--,a===0&&(z.endTriplet=!0));for(var y=!1;t<e.length&&!y;){switch(e[t]){case" ":case" ":S0(z);break;case")":z.endSlur===void 0?z.endSlur=1:z.endSlur++;break;case"-":z.pitches.forEach(function(q){q.startTie={}}),C0(S,s,!0);break;case">":case"<":var C=_i(e,t);t+=C[0]-1,S.next_note_duration=C[2],v?v=v*C[1]:v=C[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var A=ge.getFraction(e,t);v=A.value,t=A.index;var P=e[t];P===" "&&(m=!0),P==="-"||P===")"||P===" "||P==="<"||P===">"?t--:y=!0;break;case"0":v=0;break;default:y=!0;break}y||t++}}else ke("Expected ']' to end the chords",e,t);z.pitches!==void 0&&(v!==null&&(z.duration=z.duration*v,m&&S0(z)),S.addFormattingOptions(z,at.formatting,"note"),rt.appendElement("note",r+o,r+t,z),S.measureNotEmpty=!0,z={}),w=!0}}}else{var _={},B=fa(e,t,_,!0);if(_.endTie!==void 0&&C0(S,s,!0),B!==null){B.pitch!==void 0?(z.pitches=[{}],B.accidental!==void 0&&(z.pitches[0].accidental=B.accidental),z.pitches[0].pitch=B.pitch,z.pitches[0].name=B.name,(B.midipitch||B.midipitch===0)&&(z.pitches[0].midipitch=B.midipitch),B.endSlur!==void 0&&(z.pitches[0].endSlur=B.endSlur),B.endTie!==void 0&&(z.pitches[0].endTie=B.endTie),B.startSlur!==void 0&&(z.pitches[0].startSlur=B.startSlur),z.startSlur!==void 0&&(z.pitches[0].startSlur=z.startSlur),z.dottedSlur!==void 0&&(z.pitches[0].dottedSlur=!0),B.startTie!==void 0&&(z.pitches[0].startTie=B.startTie),z.startTie!==void 0&&(z.pitches[0].startTie=z.startTie)):(z.rest=B.rest,B.rest.type==="multimeasure"&&ua()&&(S.currBarNumber+=B.rest.text-1),B.endSlur!==void 0&&(z.endSlur=B.endSlur),B.endTie!==void 0&&(z.rest.endTie=B.endTie),B.startSlur!==void 0&&(z.startSlur=B.startSlur),B.startTie!==void 0&&(z.rest.startTie=B.startTie),z.startTie!==void 0&&(z.rest.startTie=z.startTie)),B.chord!==void 0&&(z.chord=B.chord),B.duration!==void 0&&(z.duration=B.duration),B.decoration!==void 0&&(z.decoration=B.decoration),B.graceNotes!==void 0&&(z.graceNotes=B.graceNotes),delete z.startSlur,delete z.dottedSlur,ki(S,s,z)&&(z.pitches!==void 0?z.pitches[0].endTie=!0:z.rest.type!=="spacer"&&(z.rest.endTie=!0),C0(S,s,!1)),(B.startTie||z.startTie)&&C0(S,s,!0),t=B.endChar,a>0&&!(B.rest&&B.rest.type==="spacer")&&(a--,a===0&&(z.endTriplet=!0)),B.end_beam&&S0(z),z.rest&&z.rest.type==="rest"&&z.duration===1&&Ci(S)<=1&&(z.rest.type="whole",z.duration=Ci(S)),z.duration<1&&gu.indexOf(z.duration)===-1&&z.duration!==0&&(!z.rest||z.rest.type!=="spacer")&&ke("Duration not representable: "+e.substring(o,t),e,t),S.addFormattingOptions(z,at.formatting,"note");var O=rt.appendElement("note",r+o,r+t,z);O||(this.startNewLine(),rt.appendElement("note",r+o,r+t,z)),S.measureNotEmpty=!0,z={}}}t===o&&(e[t]!==" "&&e[t]!=="`"&&ke("Unknown character ignored",e,t),t++)}}}this.lineContinuation=e.indexOf("")>=0||i[0]>0,this.lineContinuation||(z={})}};var C0=function(e,t,r){var n=e.currentVoice?e.currentVoice.staffNum*100+e.currentVoice.index:0;e.inTie[t]===void 0&&(e.inTie[t]=[]),e.inTie[t][n]=r},yu=function(e,t){if(e[t]==='"'){var r=ge.getBrackettedSubstring(e,t,5);if(r[2]||ke("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&r[1][0]==="^")r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&r[1][0]==="_")r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&r[1][0]==="<")r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&r[1][0]===">")r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&r[1][0]==="@"){r[1]=r[1].substring(1);var n=ge.getFloat(r[1]);if(n.digits===0)return ke("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;if(r[1]=r[1].substring(n.digits),r[1][0]!==",")return ke("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(1);var a=ge.getFloat(r[1]);if(a.digits===0)return ke("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(a.digits);var i=ge.skipWhiteSpace(r[1]);r[1]=r[1].substring(i),r[2]=null,r[3]={x:n.value,y:a.value}}else S.freegchord!==!0&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1\u266D"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1\u266F"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2\xB0$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2\xB0"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2\xF8$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2\u2206$3")),r[2]="default",r[1]=Si.chordName(S,r[1]);return r}return[0,""]},wu=function(e,t){if(e[t]==="{"){var r=ge.getBrackettedSubstring(e,t,1,"}");r[2]||ke("Missing the closing '}' while parsing grace note",e,t),e[t+r[0]]===")"&&(r[0]++,r[1]+=")");for(var n=[],a=0,i=!1;a<r[1].length;){var s=!1;r[1][a]==="/"&&(s=!0,a++);var o=fa(r[1],a,{},!1);o!==null?(o.duration=o.duration/(S.default_length*8),s&&(o.acciaccatura=!0),o.rest?ke("Rests not allowed as grace notes '"+r[1][a]+"' while parsing grace note",e,t):n.push(o),i&&(o.endTie=!0,i=!1),o.startTie&&(i=!0),a=o.endChar,delete o.endChar,o.end_beam&&(o.endBeam=!0,delete o.end_beam)):(r[1][a]===" "?n.length>0&&(n[n.length-1].endBeam=!0):ke("Unknown character '"+r[1][a]+"' while parsing grace note",e,t),a++)}if(n.length)return[r[0],n]}return[0]};function xu(e,t){if(e[t]==="&"){for(var r=t;e[t]&&e[t]!==":"&&e[t]!=="|";)t++;return[t-r,e.substring(r+1,t)]}return[0]}function Ci(e){var t=e.origMeter;return!t||t.type!=="specified"||!t.value||t.value.length===0?1:parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10)}var Ti=function(e,t){var r=S.macros[e[t]];if(r!==void 0)return(r[0]==="!"||r[0]==="+")&&(r=r.substring(1)),(r[r.length-1]==="!"||r[r.length-1]==="+")&&(r=r.substring(0,r.length-1)),vi.includes(r)?[1,r]:bi.includes(r)?(S.volumePosition==="hidden"&&(r=""),[1,r]):mi.includes(r)?(S.dynamicPosition==="hidden"&&(r=""),[1,r]):(S.ignoredDecorations.includes(r)||ke("Unknown macro: "+r,e,t),[1,""]);switch(e[t]){case".":if(e[t+1]==="("||e[t+1]==="-")break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var n=ge.getBrackettedSubstring(e,t,5);if(n[1].length>1&&(n[1][0]==="^"||n[1][0]==="_")&&(n[1]=n[1].substring(1)),vi.includes(n[1]))return n;if(bi.includes(n[1]))return S.volumePosition==="hidden"&&(n[1]=""),n;if(mi.includes(n[1]))return S.dynamicPosition==="hidden"&&(n[1]=""),n;var a=yi.findIndex(function(i){return n[1]===i[0]});return a>=0?(n[1]=yi[a][1],n):(a=wi.findIndex(function(i){return n[1]===i[0]}),a>=0?(n[1]=wi[a][1],S.dynamicPosition==="hidden"&&(n[1]=""),n):e[t]==="!"&&(n[0]===1||e[t+n[0]-1]!=="!")?[1,null]:(ke("Unknown decoration: "+n[1],e,t),n[1]="",n));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]},ku=function(e,t){for(var r=t;ge.isWhiteSpace(e[t]);)t++;return[t-r]},Cu=function(e,t){var r=ge.getBarLine(e,t);if(r.len===0)return[0,""];if(r.warn)return ke(r.warn,e,t),[r.len,""];for(var n=0;n<e.length&&e[t+r.len+n]===" ";n++);var a=r.len;if(e[t+r.len+n]==="["&&(r.len+=n+1),e[t+r.len]==='"'&&e[t+r.len-1]==="["){var i=ge.getBrackettedSubstring(e,t+r.len,5);return[r.len+i[0],r.token,i[1]]}var s=ge.getTokenOf(e.substring(t+r.len),"1234567890-,");return s.len===0||s.token[0]==="-"?[a,r.token]:[r.len+s.len,r.token,s.token]},Tu=function(e,t){var r={},n=t;for(e[t]==="."&&e[t+1]==="("&&(r.dottedSlur=!0,t++);e[t]==="("||ge.isWhiteSpace(e[t]);)e[t]==="("&&(t+1<e.length&&e[t+1]>="2"&&e[t+1]<="9"?(r.triplet!==void 0?ke("Can't nest triplets",e,t):(r.triplet=e[t+1]-"0",r.tripletQ=mu[r.triplet],r.num_notes=r.triplet,t+2<e.length&&e[t+2]===":"&&(t+3<e.length&&e[t+3]===":"?t+4<e.length&&e[t+4]>="1"&&e[t+4]<="9"?(r.num_notes=e[t+4]-"0",t+=3):ke("expected number after the two colons after the triplet to mark the duration",e,t):t+3<e.length&&e[t+3]>="1"&&e[t+3]<="9"?(r.tripletQ=e[t+3]-"0",t+4<e.length&&e[t+4]===":"?t+5<e.length&&e[t+5]>="1"&&e[t+5]<="9"&&(r.num_notes=e[t+5]-"0",t+=4):t+=2):ke("expected number after the triplet to mark the duration",e,t))),t++):r.startSlur===void 0?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-n,r};da.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};S.partForNextLine.title&&(e.part=S.partForNextLine),e.clef=S.currentVoice&&S.staves[S.currentVoice.staffNum].clef!==void 0?Object.assign({},S.staves[S.currentVoice.staffNum].clef):Object.assign({},S.clef);var t=S.currentVoice?S.currentVoice.scoreTranspose:0;if(e.key=gi.standardKey(S.key.root+S.key.acc+S.key.mode,S.key.root,S.key.acc,t),e.key.mode=S.key.mode,S.key.impliedNaturals&&(e.key.impliedNaturals=S.key.impliedNaturals),S.key.explicitAccidentals)for(var r=0;r<S.key.explicitAccidentals.length;r++){for(var n=!1,a=0;a<e.key.accidentals.length;a++)e.key.accidentals[a].note===S.key.explicitAccidentals[r].note&&(e.key.accidentals[a].acc=S.key.explicitAccidentals[r].acc,n=!0);n||e.key.accidentals.push(S.key.explicitAccidentals[r])}if(S.targetKey=e.key,e.key.explicitAccidentals&&delete e.key.explicitAccidentals,gi.addPosToKey(e.clef,e.key),S.meter!==null?(S.currentVoice?(S.staves.forEach(function(c){c.meter=S.meter}),e.meter=S.staves[S.currentVoice.staffNum].meter,S.staves[S.currentVoice.staffNum].meter=null):e.meter=S.meter,S.meter=null):S.currentVoice&&S.staves[S.currentVoice.staffNum].meter&&(e.meter=S.staves[S.currentVoice.staffNum].meter,S.staves[S.currentVoice.staffNum].meter=null),S.currentVoice&&S.currentVoice.name&&(e.name=S.currentVoice.name),S.vocalfont&&(e.vocalfont=S.vocalfont),S.tripletfont&&(e.tripletfont=S.tripletfont),S.gchordfont&&(e.gchordfont=S.gchordfont),S.style&&(e.style=S.style),S.currentVoice){var i=S.staves[S.currentVoice.staffNum];i.brace&&(e.brace=i.brace),i.bracket&&(e.bracket=i.bracket),i.connectBarLines&&(e.connectBarLines=i.connectBarLines),i.name&&(e.name=i.name[S.currentVoice.index]),i.subname&&(e.subname=i.subname[S.currentVoice.index]),S.currentVoice.stem&&(e.stem=S.currentVoice.stem),S.currentVoice.stafflines&&(e.stafflines=S.currentVoice.stafflines),S.currentVoice.staffscale&&(e.staffscale=S.currentVoice.staffscale),S.currentVoice.scale&&(e.scale=S.currentVoice.scale),S.currentVoice.color&&(e.color=S.currentVoice.color),S.currentVoice.style&&(e.style=S.currentVoice.style),S.currentVoice.transpose&&(e.clef.transpose=S.currentVoice.transpose),e.currentVoice=S.currentVoice;for(var s=Object.keys(S.voices),o=0;o<s.length;o++)e.currentVoice.staffNum===S.voices[s[o]].staffNum&&e.currentVoice.index===S.voices[s[o]].index&&(e.currentVoiceName=s[o])}S.barNumbers===0&&ua()&&S.currBarNumber!==1&&(e.barNumber=S.currBarNumber),rt.startNewLine(e),S.key.impliedNaturals&&delete S.key.impliedNaturals,S.partForNextLine={},S.tempoForNextLine.length===4&&rt.appendElement(S.tempoForNextLine[0],S.tempoForNextLine[1],S.tempoForNextLine[2],S.tempoForNextLine[3]),S.tempoForNextLine=[]};var S0=function(e){return e.duration!==void 0&&e.duration<.25&&(e.end_beam=!0),e},fa=function(e,t,r,n){var a=function(f){return f==="octave"||f==="duration"||f==="Zduration"||f==="broken_rhythm"||f==="end_slur"},i;e[t]==="."&&e[t+1]==="-"&&(i=!0,t++);for(var s="startSlur",o=!1;;){switch(e[t]){case"(":if(s==="startSlur")r.startSlur===void 0?r.startSlur=1:r.startSlur++;else return a(s)?(r.endChar=t,r):null;break;case")":if(a(s))r.endSlur===void 0?r.endSlur=1:r.endSlur++;else return null;break;case"^":if(s==="startSlur")r.accidental="sharp",s="sharp2";else if(s==="sharp2")r.accidental="dblsharp",s="pitch";else return a(s)?(r.endChar=t,r):null;break;case"_":if(s==="startSlur")r.accidental="flat",s="flat2";else if(s==="flat2")r.accidental="dblflat",s="pitch";else return a(s)?(r.endChar=t,r):null;break;case"=":if(s==="startSlur")r.accidental="natural",s="pitch";else return a(s)?(r.endChar=t,r):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(s==="startSlur"||s==="sharp2"||s==="flat2"||s==="pitch"){if(r.pitch=vu[e[t]],r.pitch+=7*(S.currentVoice&&S.currentVoice.octave!==void 0?S.currentVoice.octave:S.octave),r.name=e[t],r.accidental&&(r.name=xi[r.accidental]+r.name),Si.note(S,r),s="octave",n&&S.next_note_duration!==0?(r.duration=S.default_length*S.next_note_duration,S.next_note_duration=0,o=!0):r.duration=S.default_length,S.clef&&S.clef.type==="perc"||S.currentVoice&&S.currentVoice.clef==="perc"){var c=e[t];r.accidental&&(c=xi[r.accidental]+c),at.formatting&&at.formatting.midi&&at.formatting.midi.drummap&&(r.midipitch=at.formatting.midi.drummap[c])}}else return a(s)?(r.endChar=t,r):null;break;case",":if(s==="octave")r.pitch-=7,r.name+=",";else return a(s)?(r.endChar=t,r):null;break;case"'":if(s==="octave")r.pitch+=7,r.name+="'";else return a(s)?(r.endChar=t,r):null;break;case"x":case"X":case"y":case"z":case"Z":if(s==="startSlur")r.rest={type:bu[e[t]]},delete r.accidental,delete r.startSlur,delete r.startTie,delete r.endSlur,delete r.endTie,delete r.end_beam,delete r.grace_notes,r.rest.type.indexOf("multimeasure")>=0?(r.duration=at.getBarLength(),r.rest.text=1,s="Zduration"):(n&&S.next_note_duration!==0?(r.duration=S.default_length*S.next_note_duration,S.next_note_duration=0,o=!0):r.duration=S.default_length,s="duration");else return a(s)?(r.endChar=t,r):null;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if(s==="octave"||s==="duration"){var h=ge.getFraction(e,t);for(r.duration=r.duration*h.value,r.endChar=h.index;h.index<e.length&&(ge.isWhiteSpace(e[h.index])||e[h.index]==="-");)e[h.index]==="-"?r.startTie={}:r=S0(r),h.index++;t=h.index-1,s="broken_rhythm"}else if(s==="sharp2")r.accidental="quartersharp",s="pitch";else if(s==="flat2")r.accidental="quarterflat",s="pitch";else if(s==="Zduration"){var d=ge.getNumber(e,t);return r.duration=d.num*at.getBarLength(),r.rest.text=d.num,r.endChar=d.index,r}else return null;break;case"-":if(s==="startSlur")rt.addTieToLastNote(i),r.endTie=!0;else if(s==="octave"||s==="duration"||s==="end_slur")if(r.startTie={},!o&&n)s="broken_rhythm";else return ge.isWhiteSpace(e[t+1])&&S0(r),r.endChar=t+1,r;else return s==="broken_rhythm"?(r.endChar=t,r):null;break;case" ":case" ":if(a(s)){r.end_beam=!0,i=!1;do e[t]==="."&&e[t+1]==="-"&&(i=!0,t++),e[t]==="-"&&(r.startTie={},i&&(r.startTie.style="dotted")),t++;while(t<e.length&&(ge.isWhiteSpace(e[t])||e[t]==="-")||e[t]==="."&&e[t+1]==="-");if(r.endChar=t,!o&&n&&(e[t]==="<"||e[t]===">"))t--,s="broken_rhythm";else return r}else return null;break;case">":case"<":if(a(s))if(n){var l=_i(e,t);t+=l[0]-1,S.next_note_duration=l[2],r.duration=l[1]*r.duration,s="end_slur"}else return r.endChar=t,r;else return null;break;default:return a(s)?(r.endChar=t,r):null}if(t++,t===e.length)return a(s)?(r.endChar=t,r):null}return null},_i=function(e,t){switch(e[t]){case">":return t<e.length-2&&e[t+1]===">"&&e[t+2]===">"?[3,1.875,.125]:t<e.length-1&&e[t+1]===">"?[2,1.75,.25]:[1,1.5,.5];case"<":return t<e.length-2&&e[t+1]==="<"&&e[t+2]==="<"?[3,.125,1.875]:t<e.length-1&&e[t+1]==="<"?[2,.25,1.75]:[1,.5,1.5]}return null};function ua(){return S.currentVoice===void 0||S.currentVoice.staffNum===0&&S.currentVoice.index===0}Ei.exports=da});var Bi=L((i4,Mi)=>{var Ee=tt(),pa=function(e,t){this.lineIndex=0,this.lines=e,this.multilineVars=t,this.skipWhiteSpace=function(l){for(var f=0;f<l.length;f++)if(!this.isWhiteSpace(l[f]))return f;return l.length};var r=function(l,f){return f>=l.length};this.eatWhiteSpace=function(l,f){for(var u=f;u<l.length;u++)if(!this.isWhiteSpace(l[u]))return u-f;return u-f},this.getKeyPitch=function(l){var f=this.skipWhiteSpace(l);if(r(l,f))return{len:0};switch(l[f]){case"A":return{len:f+1,token:"A"};case"B":return{len:f+1,token:"B"};case"C":return{len:f+1,token:"C"};case"D":return{len:f+1,token:"D"};case"E":return{len:f+1,token:"E"};case"F":return{len:f+1,token:"F"};case"G":return{len:f+1,token:"G"}}return{len:0}},this.getSharpFlat=function(l){if(l==="bass")return{len:0};switch(l[0]){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(l){var f=function(g,v){for(;v<g.length&&(g[v]>="a"&&g[v]<="z"||g[v]>="A"&&g[v]<="Z");)v++;return v},u=this.skipWhiteSpace(l);if(r(l,u))return{len:0};var p=l.substring(u,u+3).toLowerCase();switch((p.length>1&&p[1]===" "||p[1]==="^"||p[1]==="_"||p[1]==="=")&&(p=p[0]),p){case"mix":return{len:f(l,u),token:"Mix"};case"dor":return{len:f(l,u),token:"Dor"};case"phr":return{len:f(l,u),token:"Phr"};case"lyd":return{len:f(l,u),token:"Lyd"};case"loc":return{len:f(l,u),token:"Loc"};case"aeo":return{len:f(l,u),token:"m"};case"maj":return{len:f(l,u),token:""};case"ion":return{len:f(l,u),token:""};case"min":return{len:f(l,u),token:"m"};case"m":return{len:f(l,u),token:"m"}}return{len:0}},this.getClef=function(l,f){var u=l,p=this.skipWhiteSpace(l);if(r(l,p))return{len:0};var g=!1,v=l.substring(p);if(Ee.startsWith(v,"clef=")&&(g=!0,v=v.substring(5),p+=5),v.length===0&&g)return{len:p+5,warn:"No clef specified: "+u};var m=this.skipWhiteSpace(v);if(r(v,m))return{len:0};m>0&&(p+=m,v=v.substring(m));var w=null;if(Ee.startsWith(v,"treble"))w="treble";else if(Ee.startsWith(v,"bass3"))w="bass3";else if(Ee.startsWith(v,"bass"))w="bass";else if(Ee.startsWith(v,"tenor"))w="tenor";else if(Ee.startsWith(v,"alto2"))w="alto2";else if(Ee.startsWith(v,"alto1"))w="alto1";else if(Ee.startsWith(v,"alto"))w="alto";else if(!f&&g&&Ee.startsWith(v,"none"))w="none";else if(Ee.startsWith(v,"perc"))w="perc";else if(!f&&g&&Ee.startsWith(v,"C"))w="tenor";else if(!f&&g&&Ee.startsWith(v,"F"))w="bass";else if(!f&&g&&Ee.startsWith(v,"G"))w="treble";else return{len:p+5,warn:"Unknown clef specified: "+u};return v=v.substring(w.length),m=this.isMatch(v,"+8"),m>0?w+="+8":(m=this.isMatch(v,"-8"),m>0&&(w+="-8")),{len:p+w.length,token:w,explicit:g}},this.getBarLine=function(l,f){switch(l[f]){case"]":switch(++f,l[f]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++f,l[f]>="1"&&l[f]<="9"||l[f]==='"'?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(++f,l[f]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++f,l[f]){case"]":return++f,l[f]==="|"?(++f,l[f]===":"?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"}):{len:3,token:"bar_right_repeat"};case"|":return++f,l[f]===":"?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if(++f,l[f]==="|")switch(++f,l[f]){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 l[f]>="1"&&l[f]<="9"||l[f]==='"'?{len:1,token:"bar_invisible"}:{len:0};break;case"|":switch(++f,l[f]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++f,l[f]===":"?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var u=0;l[f+u]===":";)u++;return{len:1+u,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}break}return{len:0}},this.getTokenOf=function(l,f){for(var u=0;u<l.length;u++)if(f.indexOf(l[u])<0)return{len:u,token:l.substring(0,u)};return{len:u,token:l}},this.getToken=function(l,f,u){for(var p=f;p<u&&!this.isWhiteSpace(l[p]);)p++;return l.substring(f,p)},this.isMatch=function(l,f){var u=this.skipWhiteSpace(l);return r(l,u)?0:Ee.startsWith(l.substring(u),f)?u+f.length:0},this.getPitchFromTokens=function(l){var f={},u={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(f.position=u[l[0].token],f.position===void 0)return{warn:"Pitch expected. Found: "+l[0].token};for(l.shift();l.length;)switch(l[0].token){case",":f.position-=7,l.shift();break;case"'":f.position+=7,l.shift();break;default:return f}return f},this.getKeyAccidentals2=function(l){for(var f;l.length>0;){var u;if(l[0].token==="^"){if(u="sharp",l.shift(),l.length===0)return{accs:f,warn:"Expected note name after "+u};switch(l[0].token){case"^":u="dblsharp",l.shift();break;case"/":u="quartersharp",l.shift();break}}else if(l[0].token==="=")u="natural",l.shift();else if(l[0].token==="_"){if(u="flat",l.shift(),l.length===0)return{accs:f,warn:"Expected note name after "+u};switch(l[0].token){case"_":u="dblflat",l.shift();break;case"/":u="quarterflat",l.shift();break}}else return{accs:f};if(l.length===0)return{accs:f,warn:"Expected note name after "+u};switch(l[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":f===void 0&&(f=[]),f.push({acc:u,note:l[0].token[0]}),l[0].token.length===1?l.shift():l[0].token=l[0].token.substring(1);break;default:return{accs:f,warn:"Expected note name after "+u+" Found: "+l[0].token}}}return{accs:f}},this.getKeyAccidental=function(l){var f={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},u=this.skipWhiteSpace(l);if(r(l,u))return{len:0};var p=null;switch(l[u]){case"^":case"_":case"=":p=l[u];break;default:return{len:0}}if(u++,r(l,u))return{len:1,warn:"Expected note name after accidental"};switch(l[u]){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:u+1,token:{acc:f[p],note:l[u]}};case"^":case"_":case"/":if(p+=l[u],u++,r(l,u))return{len:2,warn:"Expected note name after accidental"};switch(l[u]){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:u+1,token:{acc:f[p],note:l[u]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(l){return l===" "||l===" "||l===""},this.getMeat=function(l,f,u){var p=l.indexOf("%",f);for(p>=0&&p<u&&(u=p);f<u&&(l[f]===" "||l[f]===" "||l[f]==="");)f++;for(;f<u&&(l[u-1]===" "||l[u-1]===" "||l[u-1]==="");)u--;return{start:f,end:u}};var n=function(l){return l>="A"&&l<="Z"||l>="a"&&l<="z"},a=function(l){return l>="0"&&l<="9"};this.tokenize=function(l,f,u,p){var g=this.getMeat(l,f,u);f=g.start,u=g.end;for(var v=[],m;f<u;){if(l[f]==='"'){for(m=f+1;m<u&&l[m]!=='"';)m++;v.push({type:"quote",token:l.substring(f+1,m),start:f+1,end:m}),m++}else if(n(l[f])){if(m=f+1,p)for(;m<u&&!this.isWhiteSpace(l[m]);)m++;else for(;m<u&&n(l[m]);)m++;v.push({type:"alpha",token:l.substring(f,m),continueId:a(l[m]),start:f,end:m}),f=m+1}else if(l[f]==="."&&a(l[m+1])){m=f+1;for(var w=null,k=null;m<u&&a(l[m]);)m++;k=parseFloat(l.substring(f,m)),v.push({type:"number",token:l.substring(f,m),intt:w,floatt:k,continueId:n(l[m]),start:f,end:m}),f=m+1}else if(a(l[f])||l[f]==="-"&&a(l[m+1])){m=f+1;for(var b=null,y=null;m<u&&a(l[m]);)m++;if(l[m]==="."&&a(l[m+1]))for(m++;m<u&&a(l[m]);)m++;else b=parseInt(l.substring(f,m));y=parseFloat(l.substring(f,m)),v.push({type:"number",token:l.substring(f,m),intt:b,floatt:y,continueId:n(l[m]),start:f,end:m}),f=m+1}else l[f]===" "||l[f]===" "||v.push({type:"punct",token:l[f],start:f,end:f+1}),m=f+1;f=m}return v},this.getVoiceToken=function(l,f,u){for(var p=f;p<u&&this.isWhiteSpace(l[p])||l[p]==="=";)p++;if(l[p]==='"'){var g=l.indexOf('"',p+1);return g===-1||g>=u?{len:1,err:"Missing close quote"}:{len:g-f+1,token:this.translateString(l.substring(p+1,g))}}else{for(var v=p;v<u&&!this.isWhiteSpace(l[v])&&l[v]!=="=";)v++;return{len:v-f+1,token:l.substring(p,v)}}};var i={"`a":"\xE0","'a":"\xE1","^a":"\xE2","~a":"\xE3",'"a':"\xE4",oa:"\xE5",aa:"\xE5","=a":"\u0101",ua:"\u0103",";a":"\u0105","`e":"\xE8","'e":"\xE9","^e":"\xEA",'"e':"\xEB","=e":"\u0113",ue:"\u0115",";e":"\u0119",".e":"\u0117","`i":"\xEC","'i":"\xED","^i":"\xEE",'"i':"\xEF","=i":"\u012B",ui:"\u012D",";i":"\u012F","`o":"\xF2","'o":"\xF3","^o":"\xF4","~o":"\xF5",'"o':"\xF6","=o":"\u014D",uo:"\u014F","/o":"\xF8","`u":"\xF9","'u":"\xFA","^u":"\xFB","~u":"\u0169",'"u':"\xFC",ou:"\u016F","=u":"\u016B",uu:"\u016D",";u":"\u0173","`A":"\xC0","'A":"\xC1","^A":"\xC2","~A":"\xC3",'"A':"\xC4",oA:"\xC5",AA:"\xC5","=A":"\u0100",uA:"\u0102",";A":"\u0104","`E":"\xC8","'E":"\xC9","^E":"\xCA",'"E':"\xCB","=E":"\u0112",uE:"\u0114",";E":"\u0118",".E":"\u0116","`I":"\xCC","'I":"\xCD","^I":"\xCE","~I":"\u0128",'"I':"\xCF","=I":"\u012A",uI:"\u012C",";I":"\u012E",".I":"\u0130","`O":"\xD2","'O":"\xD3","^O":"\xD4","~O":"\xD5",'"O':"\xD6","=O":"\u014C",uO:"\u014E","/O":"\xD8","`U":"\xD9","'U":"\xDA","^U":"\xDB","~U":"\u0168",'"U':"\xDC",oU:"\u016E","=U":"\u016A",uU:"\u016C",";U":"\u0172",ae:"\xE6",AE:"\xC6",oe:"\u0153",OE:"\u0152",ss:"\xDF","'c":"\u0107","^c":"\u0109",uc:"\u010D",cc:"\xE7",".c":"\u010B",cC:"\xC7","'C":"\u0106","^C":"\u0108",uC:"\u010C",".C":"\u010A","~N":"\xD1","~n":"\xF1","=s":"\u0161",vs:"\u0161",DH:"\xD0",dh:"\xF0",HO:"\u0150",Ho:"\u0151",HU:"\u0170",Hu:"\u0171","'Y":"\xDD","'y":"\xFD","^Y":"\u0176","^y":"\u0177",'"Y':"\u0178",'"y':"\xFF",vS:"\u0160",vZ:"\u017D",vz:"\u017E"},s={"#":"\u266F",b:"\u266D","=":"\u266E"},o={201:"\u266F",202:"\u266D",203:"\u266E",241:"\xA1",242:"\xA2",252:"a",262:"2",272:"o",302:"\xC2",312:"\xCA",322:"\xD2",332:"\xDA",342:"\xE2",352:"\xEA",362:"\xF2",372:"\xFA",243:"\xA3",253:"\xAB",263:"3",273:"\xBB",303:"\xC3",313:"\xCB",323:"\xD3",333:"\xDB",343:"\xE3",353:"\xEB",363:"\xF3",373:"\xFB",244:"\xA4",254:"\xAC",264:" \u0301",274:"1\u20444",304:"\xC4",314:"\xCC",324:"\xD4",334:"\xDC",344:"\xE4",354:"\xEC",364:"\xF4",374:"\xFC",245:"\xA5",255:"-",265:"\u03BC",275:"1\u20442",305:"\xC5",315:"\xCD",325:"\xD5",335:"\xDD",345:"\xE5",355:"\xED",365:"\xF5",375:"\xFD",246:"\xA6",256:"\xAE",266:"\xB6",276:"3\u20444",306:"\xC6",316:"\xCE",326:"\xD6",336:"\xDE",346:"\xE6",356:"\xEE",366:"\xF6",376:"\xFE",247:"\xA7",257:" \u0304",267:"\xB7",277:"\xBF",307:"\xC7",317:"\xCF",327:"\xD7",337:"\xDF",347:"\xE7",357:"\xEF",367:"\xF7",377:"\xFF",250:" \u0308",260:"\xB0",270:" \u0327",300:"\xC0",310:"\xC8",320:"\xD0",330:"\xD8",340:"\xE0",350:"\xE8",360:"\xF0",370:"\xF8",251:"\xA9",261:"\xB1",271:"1",301:"\xC1",311:"\xC9",321:"\xD1",331:"\xD9",341:"\xE1",351:"\xE9",361:"\xF1",371:"\xF9"};this.translateString=function(l){var f=l.split("\\");if(f.length===1)return l;var u=null;return f.forEach(function(p){if(u===null)u=p;else{var g=i[p.substring(0,2)];g!==void 0?u+=g+p.substring(2):(g=o[p.substring(0,3)],g!==void 0?u+=g+p.substring(3):(g=s[p.substring(0,1)],g!==void 0?u+=g+p.substring(1):u+="\\"+p))}}),u},this.getNumber=function(l,f){for(var u=0;f<l.length;)switch(l[f]){case"0":u=u*10,f++;break;case"1":u=u*10+1,f++;break;case"2":u=u*10+2,f++;break;case"3":u=u*10+3,f++;break;case"4":u=u*10+4,f++;break;case"5":u=u*10+5,f++;break;case"6":u=u*10+6,f++;break;case"7":u=u*10+7,f++;break;case"8":u=u*10+8,f++;break;case"9":u=u*10+9,f++;break;default:return{num:u,index:f}}return{num:u,index:f}},this.getFraction=function(l,f){var u=1,p=1;if(l[f]!=="/"){var g=this.getNumber(l,f);u=g.num,f=g.index}if(l[f]==="/")if(f++,l[f]==="/"){for(var v=.5;l[f++]==="/";)v=v/2;return{value:u*v,index:f-1}}else{var m=f,w=this.getNumber(l,f);w.num===0&&m===f&&(w.num=2),w.num!==0&&(p=w.num),f=w.index}return{value:u/p,index:f}};function c(l){let u=/^(\d+)\./.exec(l);return u?u[1]:null}var h=[{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(l){for(var f=0;f<h.length;f++){var u=h[f],p=l.match(u.match);if(p){var g=c(l);g&&(l=l.replace(g+".",""),l=l.trim());var v=p[0].length,m=u.replace+l.substring(0,l.length-v);return g&&(m=g+". "+m),m}}return l},this.stripComment=function(l){var f=l.indexOf("%");return f>=0?Ee.strip(l.substring(0,f)):Ee.strip(l)},this.getInt=function(l){var f=parseInt(l);if(isNaN(f))return{digits:0};var u=""+f,p=l.indexOf(u);return{value:f,digits:p+u.length}},this.getFloat=function(l){var f=parseFloat(l);if(isNaN(f))return{digits:0};var u=""+f,p=l.indexOf(u);return{value:f,digits:p+u.length}},this.getMeasurement=function(l){if(l.length===0)return{used:0};var f=1,u="";if(l[0].token==="-")l.shift(),u="-",f++;else if(l[0].type!=="number")return{used:0};if(u+=l.shift().token,l.length===0)return{used:1,value:parseInt(u)};var p=l.shift();if(p.token==="."){if(f++,l.length===0)return{used:f,value:parseInt(u)};if(l[0].type==="number"&&(p=l.shift(),u=u+"."+p.token,f++,l.length===0))return{used:f,value:parseFloat(u)};p=l.shift()}switch(p.token){case"pt":return{used:f+1,value:parseFloat(u)};case"px":return{used:f+1,value:parseFloat(u)};case"cm":return{used:f+1,value:parseFloat(u)/2.54*72};case"in":return{used:f+1,value:parseFloat(u)*72};default:return l.unshift(p),{used:f,value:parseFloat(u)}}};var d=function(l){return l=l.replace(/\\n/g,`
|
|
65
|
+
`),l=l.replace(/\\"/g,'"'),l};this.getBrackettedSubstring=function(l,f,u,p){for(var g=p||l[f],v=f+1,m=!1;v<l.length&&(m||l[v]!==g);)m=l[v]==="\\",++v;return l[v]===g?[v-f+1,d(l.substring(f+1,v)),!0]:(v=f+u,v>l.length-1&&(v=l.length-1),[v-f+1,d(l.substring(f+1,v)),!1])}};pa.prototype.peekLine=function(){return this.lines[this.lineIndex]};pa.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex<this.lines.length){var e=this.lines[this.lineIndex];return this.lineIndex++,e}return null};Mi.exports=pa});var ga=L((s4,Ni)=>{function Su(e,t,r){if(!(!t||e.lines.length===0)){var n=e.deline({lineBreaks:!1}),a=Eu(n,t);e.lines=_u(n,a,r),e.lineBreaks=a}}function _u(e,t,r){for(var n=[],a=[],i=[],s=1,o=0;o<t.length;o++){var c=t[o];if(e[c.ogLine].staff){var h=e[c.ogLine].staff[c.staff];if(n[c.line]||(n[c.line]={staff:[]}),!n[c.line].staff[c.staff]){n[c.line].staff[c.staff]={voices:[]},r!==void 0&&c.staff===0&&c.line>0&&(n[c.line].staff[c.staff].barNumber=s);for(var d=Object.keys(h),l=0;l<d.length;l++){var f=d[l]==="voices";d[l]==="meter"&&c.line!==0&&(f=!0),f||(n[c.line].staff[c.staff][d[l]]=h[d[l]])}a[c.staff]&&(n[c.line].staff[c.staff].key=a[c.staff])}n[c.line].staff[c.staff].voices[c.voice]||(n[c.line].staff[c.staff].voices[c.voice]=[]),n[c.line].staff[c.staff].voices[c.voice]=e[c.ogLine].staff[c.staff].voices[c.voice].slice(c.start,c.end+1),i[c.staff*10+c.voice]&&n[c.line].staff[c.staff].voices[c.voice].unshift({el_type:"stem",direction:i[c.staff*10+c.voice].direction});for(var u=n[c.line].staff[c.staff].voices[c.voice],p=u.length-1;p>=0;p--)if(u[p].el_type==="key"){a[c.staff]={root:u[p].root,acc:u[p].acc,mode:u[p].mode,accidentals:u[p].accidentals.filter(function(v){return v.acc!=="natural"})};break}for(p=u.length-1;p>=0;p--)if(u[p].el_type==="stem"){i[c.staff*10+c.voice]={direction:u[p].direction};break}if(r!==void 0&&c.staff===0&&c.voice===0)for(p=0;p<u.length;p++)u[p].el_type==="bar"&&(s++,p===u.length-1?delete u[p].barNumber:u[p].barNumber=s)}else n[c.line]=e[c.ogLine]}for(var g=0;g<n.length;g++)n[g].staff&&(n[g].staff=n[g].staff.filter(function(v){return v!=null}));return n}function Eu(e,t){for(var r=[],n=0,a=0,i=0,s=0;s<e.length;s++){var o=e[s];if(o.staff){var c=a,h=t[n];n++;for(var d=0;d<o.staff.length;d++)for(var l=o.staff[d],f=0;f<l.voices.length;f++){i=c;for(var u=0,p=0,g=l.voices[f],v=0,m=0;m<g.length;m++){var w=g[m];w.el_type==="bar"&&(h[p]===u&&(r.push({ogLine:s,line:i,staff:d,voice:f,start:v,end:m}),v=m+1,i++,a=Math.max(a,i),p++),u++)}r.push({ogLine:s,line:i,staff:d,voice:f,start:v,end:g.length}),i++,a=Math.max(a,i)}}else r.push({ogLine:s,line:i}),i++,a=Math.max(a,i)}return r}function Au(e,t){for(var r=[],n=[],a=0,i=0;i<e.length;i++){var s=e[i],o=a+s;if(o<t)a=o;else{var c=t-a,h=o-t;c<h&&a>0?(r.push(i-1),n.push(Math.round(a-s)),a=s):i<e.length-1&&(r.push(i),n.push(Math.round(a)),a=0)}}return n.push(Math.round(a)),{lineBreaks:r,totals:n}}function hr(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t}function Mu(e,t,r,n,a,i,s,o,c,h,d){for(var l=h;l<e.length;l++){var f=e[l];r+=f,n+=f;var u=Math.abs(r-t[o]),p=Math.abs(u-i)<t[0]/10;if(p)if(u<i){var g=hr(a),v=hr(c);v.push(l-1),g.push(n-f),d.push({accumulator:r,lineAccumulator:f,lineWidths:g,lastVariance:Math.abs(r-t[o+1]),highestVariance:Math.max(s,i),currLine:o+1,lineBreaks:v,startIndex:l+1})}else u>i&&l<e.length-1&&(g=hr(a),v=hr(c),d.push({accumulator:r,lineAccumulator:n,lineWidths:g,lastVariance:u,highestVariance:Math.max(s,u),currLine:o,lineBreaks:v,startIndex:l+1}));u>i?(c.push(l-1),o++,s=Math.max(s,i),i=Math.abs(r-t[o]),a.push(n-f),n=f):i=u}a.push(n)}function Bu(e,t,r,n){for(var a=Math.ceil(e.total/t),i=Math.floor(e.total/a),s=[],o=0;o<a;o++)s.push(i*(o+1));var c=[];c.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var h=0;h<c.length;)Mu(e.measureWidths,s,c[h].accumulator,c[h].lineAccumulator,c[h].lineWidths,c[h].lastVariance,c[h].highestVariance,c[h].currLine,c[h].lineBreaks,c[h].startIndex,c),h++;for(o=0;o<c.length;o++){var d=c[o];d.variances=[],d.aveVariance=0;for(var l=0;l<d.lineWidths.length;l++){var f=d.lineWidths[l];d.variances.push(f-s[0]),d.aveVariance+=Math.abs(f-s[0])}d.aveVariance=d.aveVariance/d.lineWidths.length,n.attempts.push({type:"optimizeLineWidths",lineBreaks:d.lineBreaks,variances:d.variances,aveVariance:d.aveVariance,widths:e.measureWidths})}var u=9999999,p=-1;for(o=0;o<c.length;o++)d=c[o],d.aveVariance<u&&(u=d.aveVariance,p=o);return{failed:!1,lineBreaks:c[p].lineBreaks,variance:c[p].highestVariance}}function Nu(e,t,r){for(var n=[],a=[],i=0,s=!1,o=0;o<e.length;o++)i+=e[o],i>t&&(s=!0),o%r===r-1&&(o!==e.length-1&&n.push(o),a.push(Math.round(i)),i=0);return{failed:s,totals:a,lineBreaks:n}}function Pu(e,t,r){var n={lineBreaks:e,staffwidth:t};for(var a in r)r.hasOwnProperty(a)&&a!=="wrap"&&a!=="staffwidth"&&(n[a]=r[a]);return{revisedParams:n}}function Lu(e,t,r){if(t.length===0||r.staffwidth<t[0].left)return{reParse:!1,explanation:"Staff width is narrower than the margin",revisedParams:r};var n=r.scale?Math.max(r.scale,.1):1,a=r.wrap.minSpacing?Math.max(parseFloat(r.wrap.minSpacing),1):1,i=r.wrap.minSpacingLimit?Math.max(parseFloat(r.wrap.minSpacingLimit),1):a-.1,s=r.wrap.maxSpacing?Math.max(parseFloat(r.wrap.maxSpacing),1):void 0;r.wrap.lastLineLimit&&!s&&(s=Math.max(parseFloat(r.wrap.lastLineLimit),1));for(var o=r.wrap.preferredMeasuresPerLine?Math.max(parseInt(r.wrap.preferredMeasuresPerLine,10),0):void 0,c=[],h=[],d=0;d<t.length;d++){var l=t[d],f=r.staffwidth-l.left,u=f/a/n,p=f/s/n,g=f/i/n,v={widths:l,lineBreakPoint:u,minLineSize:p,attempts:[],staffWidth:r.staffwidth,minWidth:Math.round(g)},m=null;if(o){var w=Nu(l.measureWidths,u,o);v.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:o,lineBreaks:w.lineBreaks,failed:w.failed,totals:w.totals}),w.failed||(m=w.lineBreaks)}if(!m){var k=Au(l.measureWidths,u);v.attempts.push({type:"Free Form",lineBreaks:k.lineBreaks,totals:k.totals}),m=k.lineBreaks,m.length>0&&l.measureWidths.length<25&&(k=Bu(l,u,m,v),v.attempts.push({type:"Optimize",failed:k.failed,reason:k.reason,lineBreaks:k.lineBreaks,totals:k.totals}),k.failed||(m=k.lineBreaks))}c.push(m),h.push(v)}var b=r.staffwidth,y=Pu(c,b,r);return y.explanation=h,y.reParse=!0,y}Ni.exports={wrapLines:Su,calcLineWraps:Lu}});var Ii=L((o4,qi)=>{function qu(e){let t=e.getMeterFraction(),r=t.num===4&&t.den===4;if(!(t.num===2&&t.den===2)&&!r)throw new Error("notCommonTime");let a=e.deline(),i=[],s=!1;return a.forEach(o=>{if(o.subtitle)s&&i.push({type:"subtitle",subtitle:o.subtitle.text});else if(o.text)s=!0,i.push({type:"text",text:o.text.text});else if(o.staff){s=!0;let c=o.staff,h=Iu(c);i=i.concat(h)}}),zu(i),Ou(i),Fu(i),i}var Pi=["break","(break)","no chord","n.c.","tacet"];function Iu(e){let t=[],r="",n=[],a={chord:["","","",""]},i="",s="";if(e.forEach((o,c)=>{o.voices&&o.voices.forEach((h,d)=>{let l=0,f=0,u=0;h.forEach(p=>{if(p.el_type==="part")n.length>0&&c===0&&d===0&&(t.push({type:"part",name:r,lines:[n]}),n=[]),r=p.title;else if(p.el_type==="note"){Li(p,a);let g=Math.floor(f);if(p.chord&&p.chord.length>0){let v=p.chord[0],m=v.position==="default"||Pi.indexOf(v.name.toLowerCase())>=0?v.name:"";m&&(g>0&&!a.chord[0]&&(a.chord[0]=i),i=m,a.chord[g]?g<4&&!a.chord[g+1]&&(a.chord[g+1]=m):a.chord[g]=m),p.chord.forEach(w=>{w.position!=="default"&&Pi.indexOf(v.name.toLowerCase())<0&&(a.annotations||(a.annotations=[]),a.annotations.push(w.name))})}if(!p.rest||p.rest.type!=="spacer"){let v=p.duration===0&&!p.rest?.25:p.duration,m=Math.floor(v*4);if(m>4)u+=Math.floor(m/4),f=0;else{let w=v*4;p.tripletMultiplier&&(w*=p.tripletMultiplier),f+=w}}}else if(p.el_type==="bar"){if(s&&(a.ending=s,s=""),Li(p,a),p.chord&&p.chord.forEach(g=>{g.position!=="default"&&(a.annotations||(a.annotations=[]),a.annotations.push(g.name))}),(p.type==="bar_dbl_repeat"||p.type==="bar_left_repeat")&&(a.hasStartRepeat=!0),(p.type==="bar_dbl_repeat"||p.type==="bar_right_repeat")&&(a.hasEndRepeat=!0),p.startEnding&&(s=p.startEnding),f>=4){if(a.chord[0]===""&&(a.chord[1]||a.chord[2]||a.chord[3])&&(a.chord[0]=Du(n)),c===0&&d===0)n.push(a);else{let g=u,v=0;for(;g>=t[v].lines[0].length&&v<t.length;)g-=t[v].lines[0].length,v++;if(v<t.length&&g<t[v].lines[0].length){let m=t[v].lines[0][g];!m.chord[0]&&a.chord[0]&&(m.chord[0]=a.chord[0]),!m.chord[1]&&a.chord[1]&&(m.chord[1]=a.chord[1]),!m.chord[2]&&a.chord[2]&&(m.chord[2]=a.chord[2]),!m.chord[3]&&a.chord[3]&&(m.chord[3]=a.chord[3]),a.annotations&&(m.annotations?m.annotations=m.annotations.concat(a.annotations):m.annotations=a.annotations)}u++}a={chord:["","","",""]}}else a.chord=["","","",""];f=0}else p.el_type}),c===0&&d===0&&t.push({type:"part",name:r,lines:[n]})})}),!i)throw new Error("noChords");return t}function Du(e){for(let t=e.length-1;t>=0;t--)for(let r=e[t].chord.length-1;r>=0;r--)if(e[t].chord[r])return e[t].chord[r]}function zu(e){e.forEach(t=>{if(t.type==="part"){let r=t.lines[0],n=r.findIndex(i=>!!i.ending),a=r.findIndex((i,s)=>s>n&&!!i.ending);if(n>=0&&a>=0&&a-n===r.length-a){let i=!0;for(let s=0;s<a-n&&i;s++){let o=r[n+s],c=r[a+s];if(o.chord[0]!==c.chord[0]&&(i=!1),o.chord[1]!==c.chord[1]&&(i=!1),o.chord[2]!==c.chord[2]&&(i=!1),o.chord[3]!==c.chord[3]&&(i=!1),o.annotations&&!c.annotations&&(i=!1),!o.annotations&&c.annotations&&(i=!1),o.annotations&&c.annotations)if(o.annotations.length!==c.annotations.length)i=!1;else for(let h=0;h<o.annotations.length;h++)o.annotations[h]!==c.annotations[h]&&(i=!1)}i&&(delete r[n].ending,r.splice(a,r.length-a))}}})}function Ou(e){e.forEach(t=>{if(t.type==="part"){let r=[],n=t.lines[0],a=!1,i=n.findIndex(c=>!!c.hasEndRepeat);(i>=0?Math.min(i+1,n.length):n.length)===12&&(a=!0);let o=a?4:8;for(let c=0;c<n.length;c+=o){let h=n.slice(c,c+o),d=h.findIndex(l=>!!l.hasEndRepeat);d>=0&&d<h.length-1?(r.push(h.slice(0,d+1)),r.push(h.slice(d+1))):r.push(h)}for(let c=0;c<r.length;c++)if(r[c][0].ending){let h=Math.max(0,c-1),d=r[h].length-r[c].length,l=[];for(let f=0;f<d;f++)l.push({noBorder:!0,chord:["","","",""]});r[c]=l.concat(r[c])}t.lines=r}})}function Fu(e){e.forEach(t=>{if(t.lines){let r=!1,n="";t.lines.forEach(a=>{a.forEach(i=>{if(!i.noBorder){let s=i.chord;!s[0]&&!s[1]&&!s[2]&&!s[3]?(r?n&&(s[0]="%"):s[0]=n,r=!0):!s[1]&&!s[2]&&!s[3]?(r=!0,n=s[0]):(r=!1,n=s[3]||s[2]||s[1])}})})}})}function Li(e,t){if(e.decoration)for(let r=0;r<e.decoration.length;r++)switch(e.decoration[r]){case"fermata":case"segno":case"coda":case"D.C.":case"D.S.":case"D.C.alcoda":case"D.C.alfine":case"D.S.alcoda":case"D.S.alfine":case"fine":t.annotations||(t.annotations=[]),t.annotations.push(e.decoration[r]);break}}qi.exports=qu});var Me=L((c4,Di)=>{var yt={};yt.FONTEM=360;yt.FONTSIZE=30;yt.STEP=yt.FONTSIZE*93/720;yt.SPACE=10;yt.TOPNOTE=15;yt.STAVEHEIGHT=100;yt.INDENT=50;Di.exports=yt});var Oi=L((l4,zi)=>{var Hu=tt();function Ru(e){this.sections=[{type:"startRepeat",index:-1}],this.addBar=function(t){var r=e.length-1,n=t.type==="bar_left_repeat"||t.type==="bar_dbl_repeat",a=t.type==="bar_right_repeat"||t.type==="bar_dbl_repeat",i=t.startEnding?$u(t.startEnding):void 0;a&&(this.sections.length>0&&this.sections[this.sections.length-1].type==="endRepeat"&&this.sections.push({type:"startRepeat",index:this.sections[this.sections.length-1].index}),this.sections.push({type:"endRepeat",index:r})),n&&this.sections.push({type:"startRepeat",index:r}),i&&this.sections.push({type:"startEnding",index:r,endings:i})},this.resolveRepeats=function(){var t,r=this.sections[this.sections.length-1],n=e.length-1;if(r.type==="startRepeat"?r.end=n:r.index+1<n&&this.sections.push({type:"startRepeat",index:r.index+1}),this.sections.length<2)return e;for(var a=[],i=null,s=0;s<this.sections.length;s++){var o=this.sections[s];switch(o.type){case"startRepeat":if(i){if(i.common.end||(i.common.end=o.index),i.endings)for(t=0;t<i.endings.length;t++)i.endings[t]&&!i.endings[t].end&&i.endings[t].start!==o.index&&(i.endings[t].end=o.index);this.sections[s-1].type==="endRepeat"&&i.endings&&i.endings.length&&(i.endings[i.endings.length]={start:-1,end:-1}),a.push(i)}if(i){var c=i.common.end;if(i.endings)for(t=0;t<i.endings.length;t++)i.endings[t]&&(c=Math.max(c,i.endings[t].end));c<o.index-1&&a.push({common:{start:c+1,end:o.index}})}i={common:{start:o.index}};break;case"startEnding":{if(i)for(i.common.end||(i.common.end=o.index),i.endings||(i.endings=[]),t=0;t<o.endings.length;t++)i.endings[o.endings[t]]={start:o.index+1};break}case"endRepeat":if(i){if(i.endings||(i.endings=[]),i.endings.length>0)for(t=0;t<i.endings.length;t++)i.endings[t]&&!i.endings[t].end&&(i.endings[t].end=o.index);i.common.end||(i.common.end=o.index)}break}}if(i){if(i.common.end||(i.common.end=n),i.endings)for(t=0;t<i.endings.length;t++)i.endings[t]&&!i.endings[t].end&&(i.endings[t].end=n);a.push(i)}for(var h=[],d=-1,l=0;l<a.length;l++){var f=a[l];if(!f.endings)_0(e,h,f.common.start,f.common.end);else if(f.endings.length===0)_0(e,h,f.common.start,f.common.end),_0(e,h,f.common.start,f.common.end);else for(t=0;t<f.endings.length;t++){var u=f.endings[t];u&&(_0(e,h,f.common.start,f.common.end),u.start>0&&_0(e,h,u.start,u.end),d=Math.max(d,u.end))}}return h}}function _0(e,t,r,n){r<0&&(r=0),t.length>0&&e[r].el_type==="bar"&&t[t.length-1].el_type==="bar"&&r++;for(var a=r;a<=n;a++){var i,s=!1;if(e[a].el_type==="key"||e[a].el_type==="meter"||e[a].el_type==="tempo"||e[a].el_type==="instrument"){for(i=t.length-1;i>=0&&t[i].el_type!==e[a].el_type;)i--;i>=0&&(e[a].el_type==="key"&&Yu(e[a],t[i])||e[a].el_type==="meter"&&e[a].num===t[i].num&&e[a].den===t[i].den||e[a].el_type==="instrument"&&e[a].program===t[i].program||e[a].el_type==="tempo"&&e[a].qpm===t[i].qpm)&&(s=!0)}s||t.push(Gu(e[a]))}}function Gu(e){var t=Object.assign({},e);return t.pitches&&(t.pitches=Hu.cloneArray(t.pitches)),t}function Yu(e,t){return!e.accidentals||!t.accidentals?!1:JSON.stringify(e.accidentals)===JSON.stringify(t.accidentals)}function $u(e){var t=[],r,n,a;if(e.indexOf(",")>0)for(n=e.split(","),a=0;a<n.length;a++)r=parseInt(n[a],10),r>0&&t.push(r);else if(e.indexOf("-")>0){n=e.split("-");var i=parseInt(n[0],10),s=parseInt(n[1],10);for(a=i;a<=s;a++)t.push(a)}else r=parseInt(e,10),r>0&&t.push(r);return t}zi.exports=Ru});var ba=L((h4,Hi)=>{var Fi,va=tt(),Wu=Oi();(function(){"use strict";var e=1,t=128;Fi=function(u,p){p=p||{};var g,v=p.program||0,m=p.midiTranspose||0;u.visualTranspose&&(m-=u.visualTranspose);var w=p.channel||0,k=!1,b=p.drum||"",y=p.drumBars||1,C=p.drumIntro||0,A=b!=="",P=!!p.drumOff,_=[],B=!1,O=50;v=parseInt(v,10),m=parseInt(m,10),w=parseInt(w,10),w===10&&(v=t),b=b.split(" "),y=parseInt(y,10),C=parseInt(C,10);var q=u.formatting.bagpipes;q&&(v=71);var I=[];if(u.formatting.midi){var G=u.formatting.midi;G.program&&G.program.length>0&&(v=G.program[0],G.program.length>1&&(v=G.program[1],w=G.program[0]),k=!0),G.transpose&&(m=G.transpose[0]),G.channel&&(w=G.channel[0],k=!0),G.drum&&(b=G.drum),G.drumbars&&(y=G.drumbars[0]),G.drumon&&(A=!0),w===10&&(v=t),G.beat&&I.push({el_type:"beat",beats:G.beat}),G.nobeataccents&&I.push({el_type:"beataccents",value:!1})}p.qpm?g=parseInt(p.qpm,10):u.metaText.tempo?g=o(u.metaText.tempo,u.getBeatLength()):p.defaultQpm?g=p.defaultQpm:g=180;var Y=[];q&&Y.push({el_type:"bagpipes"}),Y.push({el_type:"instrument",program:v}),w&&Y.push({el_type:"channel",channel:w}),m&&Y.push({el_type:"transpose",transpose:m}),Y.push({el_type:"tempo",qpm:g});for(var Z=0;Z<I.length;Z++)Y.push(I[Z]);var x=[],T=[],N=[],E=[],R=[0],ee={};ee[0]={el_type:"tempo",qpm:g,timing:0};for(var V,ie=[],Ue=!1,Ve=u.lines,Pe=0;Pe<Ve.length;Pe++){var Ce=Ve[Pe];if(Ce.staff){let K=function(W){var J={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]},se;if(W.decoration){if(W.decoration.indexOf("pppp")>=0?se="pppp":W.decoration.indexOf("ppp")>=0?se="ppp":W.decoration.indexOf("pp")>=0?se="pp":W.decoration.indexOf("p")>=0?se="p":W.decoration.indexOf("mp")>=0?se="mp":W.decoration.indexOf("mf")>=0?se="mf":W.decoration.indexOf("f")>=0?se="f":W.decoration.indexOf("ff")>=0?se="ff":W.decoration.indexOf("fff")>=0?se="fff":W.decoration.indexOf("ffff")>=0&&(se="ffff"),se){V=J[se].slice(0);let ft=[V];Array.isArray(W.decoration)&&(ft=[],W.decoration.forEach(St=>{St in J&&ft.push(J[St].slice(0))})),x[X].push({el_type:"beat",beats:V.slice(0),volumesPerNotePitch:ft}),N[ne]=!1,E[ne]=!1}if(W.decoration.indexOf("crescendo(")>=0){var le=r(ue,Te,"crescendo)"),re=Math.min(127,V[0]+O),oe=n(ue,Te+le+1,Object.keys(J));oe&&(re=J[oe][0]),le>0?N[ne]=Math.floor((re-V[0])/le):N[ne]=!1,E[ne]=!1}else if(W.decoration.indexOf("crescendo)")>=0)N[ne]=!1;else if(W.decoration.indexOf("diminuendo(")>=0){var xe=r(ue,Te,"diminuendo)"),he=Math.max(15,V[0]-O),De=n(ue,Te+xe+1,Object.keys(J));De&&(he=J[De][0]),N[ne]=!1,xe>0?E[ne]=Math.floor((he-V[0])/xe):E[ne]=!1}else W.decoration.indexOf("diminuendo)")>=0&&(E[ne]=!1)}};for(var Le=Ce.staff,X=0,be=0;be<Le.length;be++){var te=Le[be];if(!(te.clef&&te.clef.type==="TAB"))for(var ne=0;ne<te.voices.length;ne++){var ue=te.voices[ne];if(!x[X]){x[X]=[].concat(JSON.parse(JSON.stringify(Y)));var je=s(Ce.staff,X);je&&x[X].unshift({el_type:"name",trackName:je}),ie[X]=new Wu(x[X])}if(m&&te.clef.type==="perc"&&x[X].push({el_type:"transpose",transpose:0}),te.clef&&te.clef.type==="perc"&&!k)for(var qe=0;qe<x[X].length;qe++)x[X][qe].el_type==="instrument"&&(x[X][qe].program=t);else te.key&&d(x[X],te.key);te.meter&&l(x[X],te.meter),!Ue&&A&&(x[X].push({el_type:"drum",params:{pattern:b,bars:y,on:A,intro:C}}),Ue=!0),te.clef&&te.clef.type!=="perc"&&te.clef.transpose&&(te.clef.el_type="clef",x[X].push({el_type:"transpose",transpose:te.clef.transpose}),T[X]=!1),te.clef&&te.clef.type&&(te.clef.type.indexOf("-8")>=0?(x[X].push({el_type:"transpose",transpose:-12}),T[X]=!0):te.clef.type.indexOf("+8")>=0?(x[X].push({el_type:"transpose",transpose:12}),T[X]=!0):T[X]&&(x[X].push({el_type:"transpose",transpose:0}),T[X]=!1)),u.formatting.midi&&u.formatting.midi.drumoff&&(x[X].push({el_type:"bar"}),x[X].push({el_type:"drum",params:{pattern:"",on:!1}}));var Ke=0,Qe=0,Ie=0,Ze=0;V=[105,95,85,1];for(var Te=0;Te<ue.length;Te++){var U=ue[Te];switch(U.el_type){case"note":if(N[ne]&&(V[0]+=N[ne],V[1]+=N[ne],V[2]+=N[ne],x[X].push({el_type:"beat",beats:V.slice(0)})),E[ne]&&(V[0]+=E[ne],V[1]+=E[ne],V[2]+=E[ne],x[X].push({el_type:"beat",beats:V.slice(0)})),K(U),!U.rest||U.rest.type!=="spacer"){var ce={elem:U,el_type:"note",timing:R[X]};if(U.style?ce.style=U.style:_[X]&&(ce.style=_[X]),ce.duration=U.duration===0?.25:U.duration,U.startTriplet){if(Qe=U.tripletMultiplier,Ie=U.startTriplet*Qe*U.duration,U.startTriplet!==U.tripletR&&Te+U.tripletR<=ue.length){for(var M=0,D=Te;D<Te+U.tripletR;D++)M+=ue[D].duration;Ie=Qe*M}ce.duration=ce.duration*Qe,ce.duration=Math.round(ce.duration*1e6)/1e6,Ze=ce.duration}else Qe&&(U.endTriplet?(Qe=0,ce.duration=Math.round((Ie-Ze)*1e6)/1e6):(ce.duration=ce.duration*Qe,ce.duration=Math.round(ce.duration*1e6)/1e6,Ze+=ce.duration));U.rest&&(ce.rest=U.rest),U.decoration&&(ce.decoration=U.decoration.slice(0)),U.pitches&&(ce.pitches=va.cloneArray(U.pitches)),U.gracenotes&&(ce.gracenotes=va.cloneArray(U.gracenotes)),U.chord&&(ce.chord=va.cloneArray(U.chord)),x[X].push(ce),U.style==="rhythm"&&(B=!0,i(x)),Ke++,R[X]+=ce.duration}break;case"key":case"keySignature":d(x[X],U);break;case"meter":l(x[X],U);break;case"clef":U.transpose&&x[X].push({el_type:"transpose",transpose:U.transpose}),U.type&&(U.type.indexOf("-8")>=0?x[X].push({el_type:"transpose",transpose:-12}):U.type.indexOf("+8")>=0&&x[X].push({el_type:"transpose",transpose:12}));break;case"tempo":g=o(U,u.getBeatLength()),x[X].push({el_type:"tempo",qpm:g,timing:R[X]}),ee[""+R[X]]={el_type:"tempo",qpm:g,timing:R[X]};break;case"bar":Ke>0&&x[X].push({el_type:"bar"}),K(U),Ke=0,ie[X].addBar(U,X),B=!1;break;case"style":_[X]=U.head;break;case"timeSignature":x[X].push(c(U));break;case"part":break;case"stem":case"scale":case"break":case"font":break;case"midi":var $=!1;switch(U.cmd){case"drumon":A=!0,$=!0;break;case"drumoff":A=!1,$=!0;break;case"drum":b=U.params,$=!0;break;case"drumbars":y=U.params[0],$=!0;break;case"drummap":break;case"channel":U.params[0]===10&&x[X].push({el_type:"instrument",program:t});break;case"program":f(x[X],{el_type:"instrument",program:U.params[0]}),k=!0;break;case"transpose":x[X].push({el_type:"transpose",transpose:U.params[0]});break;case"gchordoff":x[X].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":x[X].push({el_type:"gchordOn",tacet:!1});break;case"beat":x[X].push({el_type:"beat",beats:U.params});break;case"nobeataccents":x[X].push({el_type:"beataccents",value:!1});break;case"beataccents":x[X].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":x[X].push({el_type:U.cmd,volume:U.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":x[X].push({el_type:U.cmd,param:U.params[0]});break;case"bassprog":case"chordprog":x[X].push({el_type:U.cmd,value:U.params[0],octaveShift:U.params[1]});break;case"gchordbars":x[X].push({el_type:U.cmd,param:U.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",U.cmd,U)}$&&(x[0].push({el_type:"drum",params:{pattern:b,bars:y,intro:C,on:A}}),Ue=!0);break;default:console.log("MIDI: element type "+U.el_type+" not handled.")}}X++,R[X]||(R[X]=0)}}}}for(var F=0;F<ie.length;F++)x[F]=ie[F].resolveRepeats();if(a(x,ee),C)for(var H=u.getPickupLength(),Q=0;Q<x.length;Q++){for(var j=0;x[Q][j].el_type!=="note"&&x[Q].length>j;)j++;if(x[Q].length>j){for(var D=0;D<C;D++)H===0||D<C-1?(x[Q].splice(j,0,{el_type:"note",rest:{type:"rest"},duration:e},{el_type:"bar"}),j+=2):x[Q].splice(j++,0,{el_type:"note",rest:{type:"rest"},duration:e-H});P&&(A=!1,x[Q].splice(j++,0,{el_type:"drum",params:{pattern:b,bars:y,intro:C,on:A}}),P=!1)}}return x.length>0&&x[0].length>0&&(x[0][0].pickupLength=u.getPickupLength()),x};function r(u,p,g){for(var v=0,m=p+1;m<u.length;m++)if(u[m].el_type==="note"&&v++,u[m].decoration&&u[m].decoration.indexOf(g)>=0)return v;return v}function n(u,p,g){for(var v=Math.min(u.length,p+3),m=p;m<v;m++)if(u[m].el_type==="note"&&u[m].decoration){for(var w=0;w<u[m].decoration.length;w++)if(g.indexOf(u[m].decoration[w])>=0)return u[m].decoration[w]}return null}function a(u,p){if(!(!p||p.length===0))for(var g=Object.keys(p),v=0;v<u.length;v++)for(var m=u[v],w=p[0]?p[0].qpm:0,k=0;k<m.length;k++){var b=m[k];b.el_type==="tempo"&&(w=b.qpm),g.indexOf(""+b.timing)>=0&&w!==p[""+b.timing].qpm&&(w=p[""+b.timing].qpm,b.el_type==="tempo"?(b.qpm=p[""+b.timing].qpm,k++):(u[v].splice(k,0,{el_type:"tempo",qpm:p[""+b.timing].qpm,timing:b.timing}),k+=2))}}function i(u){for(var p=0;p<u.length;p++)for(var g=u[p],v=g.length-1;v>=0&&g[v].el_type!=="bar";)g[v].noChordVoice=!0,v--}function s(u,p){if(!(!u||u.length<=p||!u[p].title))return u[p].title.join(" ")}function o(u,p){var g=.25;u.duration&&(g=u.duration[0]);var v=60;return u.bpm&&(v=u.bpm),g*v/p}function c(u){var p;switch(u.type){case"common_time":p={el_type:"meter",num:4,den:4},e=4/4;break;case"cut_time":p={el_type:"meter",num:2,den:2},e=2/2;break;case"specified":let m=0;if(u.value&&u.value.length>0&&u.value[0].num.indexOf("+")>0)for(var g=u.value[0].num.split("+"),v=0;v<g.length;v++)m+=parseInt(g[v],10);else m=parseInt(u.value[0].num,10);p={el_type:"meter",num:m,den:u.value[0].den},e=m/parseInt(u.value[0].den,10);break;default:p={el_type:"meter"},e=1}return p}function h(u){for(var p=[],g=0;g<u.length;g++)u[g].acc!=="natural"&&p.push(u[g]);return p}function d(u,p){var g;p.root==="HP"?g={el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}:g={el_type:"key",accidentals:h(p.accidentals)},f(u,g)}function l(u,p){var g=c(p);f(u,g)}function f(u,p){for(var g=u.length-1;g>=0;g--)if(u[g].el_type===p.el_type){JSON.stringify(u[g])!==JSON.stringify(p)&&u.push(p);return}u.push(p)}})();Hi.exports=Fi});var $i=L((f4,Yi)=>{var ve=function(t,r,n,a){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=t,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!r,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=a,this.tempoChangeFactor=1,this.bassInstrument=n.bassprog&&n.bassprog.length>=1?n.bassprog[0]:0,this.chordInstrument=n.chordprog&&n.chordprog.length>=1?n.chordprog[0]:0,this.bassOctaveShift=n.bassprog&&n.bassprog.length===2?n.bassprog[1]:0,this.chordOctaveShift=n.chordprog&&n.chordprog.length===2?n.chordprog[1]:0,this.boomVolume=n.bassvol&&n.bassvol.length===1?n.bassvol[0]:64,this.chickVolume=n.chordvol&&n.chordvol.length===1?n.chordvol[0]:48,n.gchord&&n.gchord.length>0?this.overridePattern=Gi(n.gchord[0]):this.overridePattern=void 0};ve.prototype.setMeter=function(e){this.meter=e};ve.prototype.setTempoChangeFactor=function(e){this.tempoChangeFactor=e};ve.prototype.setLastBarTime=function(e){this.lastBarTime=e};ve.prototype.setTranspose=function(e){this.transpose=e};ve.prototype.setRhythmHead=function(e,t){this.hasRhythmHead=e;var r=[];if(e&&this.lastChord&&this.lastChord.chick)for(var n=0;n<this.lastChord.chick.length;n++){var a=Object.assign({},t.pitches[0]);a.actualPitch=this.lastChord.chick[n],r.push(a)}return r};ve.prototype.barEnd=function(e){this.chordTrack.length>0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,ma(e.time)),this.currentChords=[]),this.chordLastBar=this.lastChord};ve.prototype.gChordOn=function(e){this.chordsOff||(this.gChordTacet=e.tacet)};ve.prototype.paramChange=function(e){switch(e.el_type){case"gchord":e.param&&e.param.length>0?this.overridePattern=Gi(e.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=e.value,e.octaveShift!=null&&e.octaveShift!=null?this.bassOctaveShift=e.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=e.value,e.octaveShift!=null&&e.octaveShift!=null?this.chordOctaveShift=e.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=e.param;break;case"chordvol":this.chickVolume=e.param;break;default:console.log("unhandled midi param",e)}};ve.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)};ve.prototype.addTrack=function(e){this.chordTrackEmpty()||e.push(this.chordTrack)};ve.prototype.findChord=function(e){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!e.chord||e.chord.length===0)return null;for(var t=0;t<e.chord.length;t++){var r=e.chord[t];if(r.position==="default")return r.name;if(this.breakSynonyms.indexOf(r.name.toLowerCase())>=0)return"break"}return null};ve.prototype.interpretChord=function(e){if(e.length!==0){if(e==="break")return{chick:[]};var t=e.substring(0,1);if(t==="("){if(e=e.substring(1,e.length-1),e.length===0)return;t=e.substring(0,1)}var r=this.basses[t];if(r){for(var n=this.transpose;n<-8;)n+=12;for(;n>8;)n-=12;r+=n,r<33?r+=12:r>44&&(r-=12);var a=r;r+=this.bassOctaveShift*12;var i=r-5,s;e.length===1&&(s=this.chordNotes(r,""));var o=e.substring(1),c=o.substring(0,1);c==="b"||c==="\u266D"?(a--,r--,i--,o=o.substring(1)):(c==="#"||c==="\u266F")&&(a++,r++,i++,o=o.substring(1));var h=o.split("/");if(s=this.chordNotes(a,h[0]),s.length>=3){var d=s[2]-s[0];i=i+d-7}if(h.length===2){var l=this.basses[h[1].substring(0,1)];if(l){var f=h[1].substring(1),u={"#":1,"\u266F":1,b:-1,"\u266D":-1}[f]||0;r=this.basses[h[1].substring(0,1)]+u+n,r+=this.bassOctaveShift*12,i=r}}return{boom:r,boom2:i,chick:s}}}};ve.prototype.chordNotes=function(e,t){var r=this.chordIntervals[t];r||(t.slice(0,2).toLowerCase()==="ma"||t[0]==="M"?r=this.chordIntervals.M:t[0]==="m"||t[0]==="-"?r=this.chordIntervals.m:r=this.chordIntervals.M),e+=12,e+=this.chordOctaveShift*12;for(var n=[],a=0;a<r.length;a++)n.push(e+r[a]);return n};ve.prototype.writeNote=function(e,t,r,n,a,i){e!==void 0&&this.chordTrack.push({cmd:"note",pitch:e,volume:r,start:this.lastBarTime+n*Ri(t,this.tempoChangeFactor),duration:Ri(a,this.tempoChangeFactor),gap:0,instrument:i})};ve.prototype.chordTrackEmpty=function(){for(var e=!0,t=0;t<this.chordTrack.length&&e;t++)this.chordTrack[t].cmd==="note"&&(e=!1);return e};ve.prototype.resolveChords=function(e,t){if(!this.hasRhythmHead){var r=this.meter.num,n=this.meter.den,a=1/n,i=a/2,s=parseInt(r,10)/parseInt(n,10),o=s-(t-e)/this.tempoChangeFactor;Math.abs(o)<1e-5&&(o=0),(this.currentChords.length===0||this.currentChords[0].beat!==0)&&this.currentChords.unshift({beat:0,chord:this.chordLastBar});var c=Uu(this.currentChords,8*r/n,a),h=this.overridePattern?this.overridePattern:this.rhythmPatterns[r+"/"+n];if(o){h=[];for(var d=(t-e)/this.tempoChangeFactor*8,l=0;l<d/2;l+=2)h.push("chick"),h.push("")}if(!h){h=[];for(var l=0;l<8*r/n/2;l++)h.push("chick"),h.push("")}for(var f=!0,u=Math.min(h.length,c.length),l=0;l<u;l++){l>0&&c[l-1]&&c[l]&&c[l-1].boom!==c[l].boom&&(f=!0);var p=h[l],g=p.indexOf("boom")>=0,v=!g&&l!==0&&h[0].indexOf("boom")>=0&&(!c[l-1]||c[l-1].boom!==c[l].boom),m=Xu(c[l],p,f,v);g&&(f=!1);for(var w=0;w<m.length;w++)this.writeNote(m[w],.125,g||v?this.boomVolume:this.chickVolume,l,i,g||v?this.bassInstrument:this.chordInstrument),v?v=!1:g=!1}}};ve.prototype.processChord=function(e){if(!this.chordTrackFinished){var t=this.findChord(e);if(t){var r=this.interpretChord(t);if(r){this.chordTrack.length===0&&this.chordTrack.push({cmd:"program",channel:this.chordChannel,instrument:this.chordInstrument}),this.lastChord=r;var n=Vu(this.lastBarTime,ma(e.time));this.currentChords.push({chord:this.lastChord,beat:n,start:ma(e.time)})}}}};function Xu(e,t,r,n){var a=[];if(!e)return a;t.indexOf("boom")>=0?a.push(r?e.boom:e.boom2):n&&a.push(e.boom);var i=e.chick.length;if(t.indexOf("chick")>=0)for(var s=0;s<i;s++)a.push(e.chick[s]);switch(t){case"DO":a.push(e.chick[0]);break;case"MI":a.push(e.chick[1]);break;case"SOL":a.push(Qt(e,2));break;case"TI":a.push(Qt(e,3));break;case"TOP":a.push(Qt(e,4));break;case"do":a.push(e.chick[0]+12);break;case"mi":a.push(e.chick[1]+12);break;case"sol":a.push(Qt(e,2)+12);break;case"ti":a.push(Qt(e,3)+12);break;case"top":a.push(Qt(e,4)+12);break}return a}function Qt(e,t){var r=Math.floor(t/e.chick.length),n=e.chick[t%e.chick.length];return n+r*12}function Gi(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];switch(n){case"z":t.push("");break;case"2":t.push("");break;case"c":t.push("chick");break;case"b":t.push("boom&chick");break;case"f":t.push("boom");break;case"G":t.push("DO");break;case"H":t.push("MI");break;case"I":t.push("SOL");break;case"J":t.push("TI");break;case"K":t.push("TOP");break;case"g":t.push("do");break;case"h":t.push("mi");break;case"i":t.push("sol");break;case"j":t.push("ti");break;case"k":t.push("top");break}}return t}function Uu(e,t,r){r=r*8;var n=[];if(e.length===0)return n;for(var a=e[0].chord,i=1;i<e.length;i++){for(var s=e[i];n.length<s.beat;)n.push(a);a=s.chord}for(;n.length<t;)n.push(a);return n}function Vu(e,t){var r=t-e;return r*8}ve.prototype.breakSynonyms=["break","(break)","no chord","n.c.","tacet"];ve.prototype.basses={A:33,B:35,C:36,D:38,E:40,F:41,G:43};ve.prototype.chordIntervals={dim:[0,3,6],"\xB0":[0,3,6],"\u02DA":[0,3,6],dim7:[0,3,6,9],"\xB07":[0,3,6,9],"\u02DA7":[0,3,6,9],\u00F87:[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7\u266D5":[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\u266D5":[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],"-\u22069":[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\u266D9":[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],"\u22067":[0,4,7,11],\u03947:[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\u266F5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9\u266F5":[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]};ve.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 ma(e){return e/1e6}function Ri(e,t){return Math.round(e*t*1e6)/1e6}Yi.exports=ve});var ya=L((u4,Wi)=>{var ju={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 Ku(e){var t=(e.accidental?e.accidental[0]:"x")+e.verticalPos;return ju[t]}Wi.exports=Ku});var ji=L((d4,Vi)=>{var Ui,Qu=$i(),Xi=ya();(function(){"use strict";var e,t,r,n,a,i,s,o=1,c,h,d,l,f,u,p,g={num:4,den:4},v=128,m,w=!0,k=105,b=95,y=85,C=[[k,b,y]],A=.25,P,_,B=0,O,q,I={},G,Y=0,Z,x=0,T=-.001,N=.4;Ui=function(M,D,$,F){D||(D={}),F||(F={}),e=[],t=[0,0,0,0,0,0,0],n=!1,a=[],i=D.qpm,s=void 0,o=1,c=void 0,h=void 0,d=void 0,f=void 0,u=0,Z=$,g={num:4,den:4},w=!0,k=105,b=95,y=85,C=[],A=.25,P=void 0,_=void 0,B=0,O=[],q=!1,I={},G=1,M.length>0&&M[0].length>0&&(Y=M[0][0].pickupLength),D.bassprog!==void 0&&!F.bassprog&&(F.bassprog=[D.bassprog]),D.bassvol!==void 0&&!F.bassvol&&(F.bassvol=[D.bassvol]),D.chordprog!==void 0&&!F.chordprog&&(F.chordprog=[D.chordprog]),D.chordvol!==void 0&&!F.chordvol&&(F.chordvol=[D.chordvol]),D.gchord!==void 0&&!F.gchord&&(F.gchord=[D.gchord]),p=new Qu(M.length,D.chordsOff,F,g),V(M,D);for(var H=0;H<M.length;H++){r=0,p.setTranspose(r),l=-1;var Q=M[H];d=[{cmd:"program",channel:H,instrument:c}],f=void 0,m=0,p.setLastBarTime(0);var j=!1;(D.voicesOff===!0||D.voicesOff&&D.voicesOff.length&&D.voicesOff.indexOf(H)>=0)&&(j=!0);for(var K=0;K<Q.length;K++){var W=Q[K];switch(W.el_type){case"name":f={cmd:"text",type:"name",text:W.trackName};break;case"note":Le(W,j);break;case"key":t=ne(W);break;case"meter":s||(s=W),g=W,p.setMeter(g),A=ie(g),Te();break;case"tempo":i?o=W.qpm?i/W.qpm:1:i=W.qpm,p.setTempoChangeFactor(o);break;case"transpose":r=W.transpose,p.setTranspose(r);break;case"bar":p.barEnd(W),e=[],H===0&&U(M.length+1),p.setRhythmHead(!1),m=R(W.time),p.setLastBarTime(m);break;case"bagpipes":n=!0;break;case"instrument":if(c===void 0&&(c=W.program),h=W.program,d.length>0&&d[d.length-1].cmd==="program")d[d.length-1].instrument=W.program;else{var J;for(J=d.length-1;J>=0&&d[J].cmd!=="program";J--);(J<0||d[J].instrument!==W.program)&&d.push({cmd:"program",channel:0,instrument:W.program})}break;case"channel":E(W.channel);break;case"drum":I=Ze(W.params),Te();break;case"gchordOn":p.gChordOn(W);break;case"beat":k=W.beats[0],b=W.beats[1],y=W.beats[2],W.volumesPerNotePitch?C=W.volumesPerNotePitch:C=[];break;case"vol":P=W.volume;break;case"volinc":_=W.volume;break;case"beataccents":w=W.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":p.paramChange(W);break;default:console.log("MIDI creation. Unknown el_type: "+W.el_type+`
|
|
66
|
+
`);break}}d[0].instrument===void 0&&(d[0].instrument=c||0),f&&d.unshift(f),a.push(d),p.finish(),O.length>0&&(q=!0)}return D.detuneOctave&&ce(a,parseInt(D.detuneOctave,10)),p.addTrack(a),O.length>0&&a.push(O),{tempo:i,instrument:c,tracks:a,totalDuration:u}};function E(M){for(var D=d.length-1;D>=0;D--)if(d[D].cmd==="program"){d[D].channel=M;return}}function R(M){return M/1e6}function ee(M){return Math.round(M*o*1e6)/1e6}function V(M,D){for(var $=0;$<M.length;$++){for(var F=M[$],H={},Q=D.qpm,j=0,K=1,W=0;W<F.length;W++){var J=F[W];if(J.el_type==="tempo"){Q?K=J.qpm?Q/J.qpm:1:Q=J.qpm;continue}J.time=j;var se=J.duration?J.duration:0;if(j+=Math.round(se*K*1e6),J.pitches){for(var le=0;le<J.pitches.length;le++){var re=J.pitches[le];if(re){if(re.duration=J.duration,re.startTie)H[re.pitch]===void 0?H[re.pitch]={el:W,pitch:le}:(F[H[re.pitch].el].pitches[H[re.pitch].pitch].duration+=re.duration,J.pitches[le]=null);else if(re.endTie){var oe=H[re.pitch];if(oe){var xe=re.duration;delete F[oe.el].pitches[oe.pitch].startTie,F[oe.el].pitches[oe.pitch].duration+=xe,J.pitches[le]=null,delete H[re.pitch]}else delete re.endTie}}}delete J.duration}}for(var he in H)if(H.hasOwnProperty(he)){var De=H[he];delete F[De.el].pitches[De.pitch].startTie}}}function ie(M){switch(parseInt(M.den,10)){case 2:return .5;case 4:return .25;case 8:return M.num%3===0?.375:.125;case 16:return .125}return .25}function Ue(M,D,$){var F=$-M;return F/D}function Ve(M,D,$){if(D)return 0;let F=k,H=b,Q=y;$!==void 0&&C.length>=$+1&&(F=C[$][0],H=C[$][1],Q=C[$][2]);var j;if(P!==void 0)j=P,P=void 0;else if(!w)j=H;else if(Y>M)j=Q;else{var K=Ue(m,ie(g),M);K===0?j=F:parseInt(K,10)===K?j=H:j=Q}return _&&(j+=_,_=void 0),j<0&&(j=0),j>127&&(j=127),D?0:j}function Pe(M,D){var $={};if(M.decoration)for(var F=0;F<M.decoration.length;F++)M.decoration[F]==="staccato"?$.thisBreakBetweenNotes="staccato":M.decoration[F]==="tenuto"?$.thisBreakBetweenNotes="tenuto":M.decoration[F]==="accent"?$.velocity=Math.min(127,D*1.5):M.decoration[F]==="trill"?$.noteModification="trill":M.decoration[F]==="lowermordent"?$.noteModification="lowermordent":M.decoration[F]==="uppermordent"?$.noteModification="pralltriller":M.decoration[F]==="mordent"?$.noteModification="mordent":M.decoration[F]==="turn"?$.noteModification="turn":M.decoration[F]==="roll"?$.noteModification="roll":M.decoration[F]==="pralltriller"?$.noteModification="pralltriller":M.decoration[F]==="trillh"&&($.noteModification="trillh");return $}function Ce(M,D){var $,F,H=D.start,Q,j=D.duration,K=ee(1/32);switch(M){case"trill":for(var W=2;j>0;)d.push({cmd:"note",pitch:D.pitch+W,volume:D.volume,start:H,duration:K,gap:0,instrument:h,style:"decoration"}),W=W===2?0:2,j-=K,H+=K;break;case"trillh":for(var W=1;j>0;)d.push({cmd:"note",pitch:D.pitch+W,volume:D.volume,start:H,duration:K,gap:0,instrument:h,style:"decoration"}),W=W===1?0:1,j-=K,H+=K;break;case"pralltriller":d.push({cmd:"note",pitch:D.pitch,volume:D.volume,start:H,duration:K,gap:0,instrument:h,style:"decoration"}),j-=K,H+=K,d.push({cmd:"note",pitch:D.pitch+2,volume:D.volume,start:H,duration:K,gap:0,instrument:h,style:"decoration"}),j-=K,H+=K,d.push({cmd:"note",pitch:D.pitch,volume:D.volume,start:H,duration:j,gap:0,instrument:h});break;case"mordent":case"lowermordent":d.push({cmd:"note",pitch:D.pitch,volume:D.volume,start:H,duration:K,gap:0,instrument:h,style:"decoration"}),j-=K,H+=K,d.push({cmd:"note",pitch:D.pitch-2,volume:D.volume,start:H,duration:K,gap:0,instrument:h,style:"decoration"}),j-=K,H+=K,d.push({cmd:"note",pitch:D.pitch,volume:D.volume,start:H,duration:j,gap:0,instrument:h});break;case"turn":K=D.duration/4,d.push({cmd:"note",pitch:D.pitch+2,volume:D.volume,start:H,duration:K,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:D.pitch,volume:D.volume,start:H+K,duration:K,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:D.pitch-1,volume:D.volume,start:H+K*2,duration:K,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:D.pitch,volume:D.volume,start:H+K*3,duration:K,gap:0,instrument:h,style:"decoration"});break;case"roll":for(;j>0;)d.push({cmd:"note",pitch:D.pitch,volume:D.volume,start:H,duration:K,gap:0,instrument:h,style:"decoration"}),j-=K*2,H+=K*2;break}}function Le(M,D){var $=Ve(R(M.time),D);p.processChord(M);var F;if(M.gracenotes&&M.pitches&&M.pitches.length>0&&M.pitches[0]&&(F=ue(M.gracenotes,M.pitches[0].duration),M.elem&&(M.elem.midiGraceNotePitches=je(F,R(M.time),$*2/3,h))),M.elem){var H=R(M.time),Q=H/A/i*60*1e3;if(M.elem.currentTrackMilliseconds===void 0)M.elem.currentTrackMilliseconds=Q,M.elem.currentTrackWholeNotes=H;else if(M.elem.currentTrackMilliseconds.length===void 0)M.elem.currentTrackMilliseconds!==Q&&(M.elem.currentTrackMilliseconds=[M.elem.currentTrackMilliseconds,Q],M.elem.currentTrackWholeNotes=[M.elem.currentTrackWholeNotes,H]);else{for(var j=!1,K=0;K<M.elem.currentTrackMilliseconds.length;K++)M.elem.currentTrackMilliseconds[K]===Q&&(j=!0);j||(M.elem.currentTrackMilliseconds.push(Q),M.elem.currentTrackWholeNotes.push(H))}}if(M.pitches){var W="",J=Pe(M,$);J.thisBreakBetweenNotes&&(W=J.thisBreakBetweenNotes),J.velocity&&($=J.velocity);var se=M.pitches;M.style==="rhythm"&&(se=p.setRhythmHead(!0,M)),M.elem&&(M.elem.midiPitches=[]);for(var le=0;le<se.length;le++){let St=$;!J.velocity&&Array.isArray(M.decoration)&&M.decoration.length>le&&(St=Ve(R(M.time),D,le));var re=se[le];if(re){re.startSlur&&(B+=re.startSlur.length),re.endSlur&&(B-=re.endSlur.length);var oe=re.actualPitch?re.actualPitch:te(re);if(h===v&&Z){var xe=Xi(re);xe&&Z[xe]&&(oe=Z[xe].sound)}var he={cmd:"note",pitch:oe,volume:St,start:R(M.time),duration:ee(re.duration),instrument:h,startChar:M.elem.startChar,endChar:M.elem.endChar};if(he=Ke(he),M.gracenotes&&(he.duration=he.duration/2,he.start=he.start+he.duration),M.elem&&M.elem.midiPitches.push(he),J.noteModification)Ce(J.noteModification,he);else{switch(B>0?he.endType="tenuto":W&&(he.endType=W),he.endType){case"tenuto":he.gap=T;break;case"staccato":var De=he.duration*N;he.gap=i/60*De;break;default:he.gap=x;break}d.push(he)}}}l=d.length-1}var ft=X(M);u=Math.max(u,R(M.time)+ee(ft))}function X(M){return M.pitches&&M.pitches.length>0&&M.pitches[0]?M.pitches[0].duration:M.elem?M.elem.duration:M.duration}var be=[0,2,4,5,7,9,11];function te(M){if(M.midipitch!==void 0)return M.midipitch;var D=M.pitch;if(M.accidental)switch(M.accidental){case"sharp":e[D]=1;break;case"flat":e[D]=-1;break;case"natural":e[D]=0;break;case"dblsharp":e[D]=2;break;case"dblflat":e[D]=-2;break;case"quartersharp":e[D]=.25;break;case"quarterflat":e[D]=-.25;break}var $=Qe(D)*12+be[Ie(D)]+60;return e[D]!==void 0?$+=e[D]:$+=t[Ie(D)],$+=r,$}function ne(M){var D=[0,0,0,0,0,0,0];if(!M.accidentals)return D;for(var $=0;$<M.accidentals.length;$++){var F=M.accidentals[$],H;switch(F.acc){case"flat":H=-1;break;case"quarterflat":H=-.25;break;case"sharp":H=1;break;case"quartersharp":H=.25;break;default:H=0;break}var Q=F.note.toLowerCase(),j=Ie(Q.charCodeAt(0)-99);D[j]+=H}return D}function ue(M,D){for(var $=0,F=[],H,Q=0;Q<M.length;Q++)H=M[Q],$+=H.duration;var j=D/2/$;for(Q=0;Q<M.length;Q++){H=M[Q];var K=te(H);if(h===v&&Z){var W=Xi(H);W&&Z[W]&&(K=Z[W].sound)}var J={pitch:K,duration:H.duration*j};J=Ke(J),F.push(J)}return F}function je(M,D,$,F){var H=[];$=Math.round($);for(var Q=0;Q<M.length;Q++){var j=M[Q];d.push({cmd:"note",pitch:j.pitch,volume:$,start:D,duration:j.duration,gap:0,instrument:F,style:"grace"}),H.push({pitch:j.pitch,durationInMeasures:j.duration,volume:$,instrument:F}),D+=j.duration}return H}var qe=.02930223664349;function Ke(M){var D=""+M.pitch;return D.indexOf(".75")>=0?(M.pitch=Math.round(M.pitch),M.cents=-50):D.indexOf(".25")>=0&&(M.pitch=Math.round(M.pitch),M.cents=50),M}function Qe(M){return Math.floor(M/7)}function Ie(M){return M=M%7,M<0&&(M+=7),M}function Ze(M){if(M.pattern.length===0||M.on===!1)return{on:!1};for(var D=M.pattern[0],$=[],F="",H=0,Q=0;Q<D.length;Q++)if(D[Q]==="d"&&H++,D[Q]==="d"||D[Q]==="z")F.length!==0?($.push(F),F=D[Q]):F=F+D[Q];else{if(F.length===0)return{on:!1};F=F+D[Q]}if(F.length!==0&&$.push(F),M.pattern.length!==H*2+1)return{on:!1};for(var j={on:!0,bars:M.bars,pattern:[]},K=ie(g),W=0,J=0;J<$.length;J++){F=$[J];for(var se=1,le=!1,re=0,oe=1;oe<F.length;oe++)switch(F[oe]){case"/":re!==0&&(se*=re),re=0,le=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":re=re*10+F[oe];break;default:return{on:!1}}le?(re===0&&(re=2),se/=re):re&&(se*=re),F[0]==="d"?(j.pattern.push({len:se*K,pitch:M.pattern[1+W],velocity:M.pattern[1+W+H]}),W++):j.pattern.push({len:se*K,pitch:null})}return G=M.bars?M.bars:1,j}function Te(){if(!(!I||!I.pattern)){for(var M=I,D=0,$=g.num/g.den,F=0;F<M.pattern.length;F++)D+=M.pattern[F].len;var H=D/G/$;for(F=0;F<M.pattern.length;F++)M.pattern[F].len=M.pattern[F].len/H;I=M}}function U(M){if(!(O.length===0&&!I.on)){var D=g.num/g.den;if(O.length===0){if(u<D)return;O.push({cmd:"program",channel:M,instrument:v})}if(I.on)for(var $=m,F=0;F<I.pattern.length;F++){var H=ee(I.pattern[F].len);I.pattern[F].pitch&&O.push({cmd:"note",pitch:I.pattern[F].pitch,volume:I.pattern[F].velocity,start:$,duration:H,gap:0,instrument:v}),$+=H}}}function ce(M,D){for(var $={},F=0;F<M.length;F++)for(var H=0;H<M[F].length;H++){var Q=M[F][H];Q.cmd==="note"&&($[Q.start]===void 0&&($[Q.start]=[]),$[Q.start].push({track:F,event:H,pitch:Q.pitch}))}var j=Object.keys($);for(F=0;F<j.length;F++){var K=$[j[F]];if(K.length>1){K=K.sort(function(re,oe){return re.pitch-oe.pitch});var W=K[K.length-1],J=W.pitch%12,se=!1;for(H=0;!se&&H<K.length-1;H++)K[H].pitch%12===J&&(se=!0);if(se){var le=M[W.track][W.event];le.cents||(le.cents=0),le.cents+=D}}}}})();Vi.exports=Ui});var Ji=L((p4,Zi)=>{function Zu(e,t){t||(t={});for(var r=!!t.lineBreaks,n=[],a=!1,i=[],s=[],o=[],c=[],h=[],d=[],l=[],f=0;f<e.length;f++){var u=Qi(e[f]);if(u.staff){if(a&&!u.vskip)for(var p=n[n.length-1],g=0;g<p.staff.length;g++){var v=u.staff[g],m=p.staff[g];if(v&&(Ht(v.meter,i[g])||(Ju(v.meter,v.voices),i[g]=v.meter,delete v.meter),Ht(v.key,s[g])||(ed(v.key,v.voices),s[g]=v.key,delete v.key),v.title&&(m.abbrevTitle=v.title),Ht(v.clef,o[g])||(td(v.clef,v.voices),o[g]=v.clef,delete v.clef),Ht(v.vocalfont,c[g])||(fr(v.vocalfont,v.voices,"vocalfont"),c[g]=v.vocalfont,delete v.vocalfont),Ht(v.gchordfont,h[g])||(fr(v.gchordfont,v.voices,"gchordfont"),h[g]=v.gchordfont,delete v.gchordfont),Ht(v.tripletfont,d[g])||(fr(v.tripletfont,v.voices,"tripletfont"),d[g]=v.tripletfont,delete v.tripletfont),Ht(v.annotationfont,l[g])||(fr(v.annotationfont,v.voices,"annotationfont"),l[g]=v.annotationfont,delete v.annotationfont)),v)for(var w=0;w<m.voices.length;w++){var k=m.voices[w],b=v.voices[w];r&&k.push({el_type:"break"}),b&&(m.voices[w]=k.concat(b))}}else{for(var y=0;y<u.staff.length;y++)s[y]=u.staff[y].key,i[y]=u.staff[y].meter,o[y]=u.staff[y].clef;n.push(Qi(u))}a=!0}else a=!1,n.push(u)}return n}function Ki(e,t){return e==="abselem"?"abselem":t}function Ju(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function ed(e,t){e.el_type="key",e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function td(e,t){e.el_type="clef",e.startChar=-1,e.endChar=-1;for(var r=0;r<t.length;r++)t[r].unshift(e)}function fr(e,t,r){e.el_type="font",e.type=r,e.startChar=-1,e.endChar=-1;for(var n=0;n<t.length;n++)t[n].unshift(e)}function Ht(e,t){if(!e)return!0;var r=JSON.stringify(e,Ki),n=JSON.stringify(t,Ki);return r===n}function Qi(e){for(var t={},r=Object.keys(e),n=0;n<r.length;n++)if(r[n]!=="staff")t[r[n]]=e[r[n]];else{t.staff=[];for(var a=0;a<e.staff.length;a++){for(var i={},s=Object.keys(e.staff[a]),o=0;o<s.length;o++)if(s[o]!=="voices")i[s[o]]=e.staff[a][s[o]];else{i.voices=[];for(var c=0;c<e.staff[a].voices.length;c++)i.voices.push([].concat(e.staff[a].voices[c]))}t.staff.push(i)}}return t}Zi.exports=Zu});var wa=L((g4,rs)=>{var es=tt(),ts=Me(),rd=ba(),ad=ji(),nd=Ji(),id=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 e(s,o,c,h){for(var d=0;d<h.length;d++)s[c][h[d]]=o[c][h[d]]}this.copyTopInfo=function(s){var o=["tempo","title","header","rhythm","origin","composer","author","partOrder"];e(this,s,"metaText",o),e(this,s,"metaTextInfo",o)},this.copyBottomInfo=function(s){var o=["unalignedWords","book","source","discography","notes","transcription","history","abc-copyright","abc-creator","abc-edited-by","footer"];e(this,s,"metaText",o),e(this,s,"metaTextInfo",o)},this.getBeatLength=function(){var s=this.getMeterFraction(),o=1;return s.num===6||s.num===9||s.num===12||s.num===3&&s.den===8?o=3:s.den===8&&(s.num===5||s.num===7)&&(o=2),o/s.den};function t(s,o){for(var c=0,h=0;h<s.length;h++)if(s[h].staff)for(var d=0;d<s[h].staff.length;d++)for(var l=0;l<s[h].staff[d].voices.length;l++)for(var f=s[h].staff[d].voices[l],u=1,p=0;p<f.length;p++){var g=f[p].rest&&f[p].rest.type==="spacer";if(f[p].startTriplet&&(u=f[p].tripletMultiplier),f[p].duration&&!g&&f[p].el_type!=="tempo"&&(c+=f[p].duration*u),f[p].endTriplet&&(u=1),c>=o&&(c-=o),f[p].el_type==="bar")return c}return c}this.getPickupLength=function(){var s=this.getBarLength(),o=t(this.lines,s);return o<1e-8||s-o<1e-8?0:o},this.getBarLength=function(){var s=this.getMeterFraction();return s.num/s.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(s){var o;if(s)o=s;else{var c=this.metaText?this.metaText.tempo:null;o=this.getBpm(c)}o<=0&&(o=1);var h=this.getBeatsPerMeasure(),d=h/o;return d*6e4},this.getBeatsPerMeasure=function(){var s=this.getBeatLength(),o=this.getBarLength();return o/s},this.getMeter=function(){for(var s=0;s<this.lines.length;s++){var o=this.lines[s];if(o.staff)for(var c=0;c<o.staff.length;c++){var h=o.staff[c].meter;if(h)return h}}return{type:"common_time"}},this.getMeterFraction=function(){var s=this.getMeter(),o=4,c=4;if(s)if(s.type==="specified"){if(s.value&&s.value.length>0&&s.value[0].num.indexOf("+")>0){var h=s.value[0].num.split("+");o=0;for(var d=0;d<h.length;d++)o+=parseInt(h[d],10)}else o=parseInt(s.value[0].num,10);c=parseInt(s.value[0].den,10)}else s.type==="cut_time"?(o=2,c=2):s.type==="common_time"&&(o=4,c=4);return this.meter={num:o,den:c},this.meter},this.getKeySignature=function(){for(var s=0;s<this.lines.length;s++){var o=this.lines[s];if(o.staff){for(var c=0;c<o.staff.length;c++)if(o.staff[c].key)return o.staff[c].key}}return{}},this.getElementFromChar=function(s){for(var o=0;o<this.lines.length;o++){var c=this.lines[o];if(c.staff)for(var h=0;h<c.staff.length;h++)for(var d=c.staff[h],l=0;l<d.voices.length;l++)for(var f=d.voices[l],u=0;u<f.length;u++){var p=f[u];if(p.startChar&&p.endChar&&p.startChar<=s&&p.endChar>s)return p}}return null};function r(s){for(var o,c,h,d,l=s.length-1;l>=0;l--){var f=s[l];f.type==="bar"?(f.top=h,f.nextTop=o,o=h,f.bottom=d,f.nextBottom=c,c=d):f.type==="event"&&(h=f.top,d=f.top+f.height)}}function n(s){var o=[];for(var c in s)s.hasOwnProperty(c)&&o.push(s[c]);return o=o.sort(function(h,d){var l=h.milliseconds-d.milliseconds;return l!==0?l:h.type==="bar"?-1:1}),o}this.addElementToEvents=function(s,o,c,h,d,l,f,u,p,g){if(o.hint)return{isTiedState:void 0,duration:0};var v=o.durationClass?o.durationClass:o.duration;if(o.abcelem.rest&&o.abcelem.rest.type==="spacer"&&(v=0),v>0){for(var m=[],w=0;w<o.elemset.length;w++)o.elemset[w]!==null&&m.push(o.elemset[w]);var k=o.startTie;if(p!==void 0)s["event"+p].elements.push(m),g&&(s["event"+c]||(s["event"+c]={type:"event",milliseconds:c,line:l,measureNumber:f,top:h,height:d,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),s["event"+c].measureStart=!0,g=!1),k||(p=void 0);else{if(!s["event"+c])s["event"+c]={type:"event",milliseconds:c,line:l,measureNumber:f,top:h,height:d,left:o.x,width:o.w,elements:[m],startChar:o.abcelem.startChar,endChar:o.abcelem.endChar,startCharArray:[o.abcelem.startChar],endCharArray:[o.abcelem.endChar],midiPitches:o.abcelem.midiPitches?es.cloneArray(o.abcelem.midiPitches):[]},o.abcelem.midiGraceNotePitches&&(s["event"+c].midiGraceNotePitches=es.cloneArray(o.abcelem.midiGraceNotePitches));else{if(s["event"+c].left?s["event"+c].left=Math.min(s["event"+c].left,o.x):s["event"+c].left=o.x,s["event"+c].elements.push(m),s["event"+c].startCharArray.push(o.abcelem.startChar),s["event"+c].endCharArray.push(o.abcelem.endChar),s["event"+c].startChar===null&&(s["event"+c].startChar=o.abcelem.startChar),s["event"+c].endChar===null&&(s["event"+c].endChar=o.abcelem.endChar),o.abcelem.midiPitches&&o.abcelem.midiPitches.length){s["event"+c].midiPitches||(s["event"+c].midiPitches=[]);for(var w=0;w<o.abcelem.midiPitches.length;w++)s["event"+c].midiPitches.push(o.abcelem.midiPitches[w])}if(o.abcelem.midiGraceNotePitches&&o.abcelem.midiGraceNotePitches.length){s["event"+c].midiGraceNotePitches||(s["event"+c].midiGraceNotePitches=[]);for(var b=0;b<o.abcelem.midiGraceNotePitches.length;b++)s["event"+c].midiGraceNotePitches.push(o.abcelem.midiGraceNotePitches[b])}}g&&(s["event"+c].measureStart=!0,g=!1)}}return{isTiedState:p,duration:v/u,nextIsBar:g||o.type==="bar"}},this.makeVoicesArray=function(){for(var s=[],o=[],c={},h=0;h<this.engraver.staffgroups.length;h++){var d=this.engraver.staffgroups[h];if(d&&d.staffs&&d.staffs.length>0){var l=d.staffs[0],f=l.absoluteY,u=f-l.top*ts.STEP,p=d.staffs[d.staffs.length-1];f=p.absoluteY;for(var g=f-p.bottom*ts.STEP,v=g-u,m=d.voices,w=0;w<m.length;w++)if(!(m[w].staff&&m[w].staff.isTabStaff)){var k=!1;s[w]||(s[w]=[]),o[w]===void 0&&(o[w]=0);for(var b=m[w].children,y=0;y<b.length;y++)b[y].type==="tempo"&&(c[o[w]]=this.getBpm(b[y].abcelem)),s[w].push({top:u,height:v,line:d.line,measureNumber:o[w],elem:b[y]}),b[y].type==="bar"&&k&&o[w]++,(b[y].type==="note"||b[y].type==="rest")&&(k=!0)}}}return this.tempoLocations=c,s},this.setupEvents=function(s,o,c,h){h||(h=1);for(var d=[],l={},f=s,u,p=!0,g=this.makeVoicesArray(),v=0,m=0;m<g.length;m++){var w=f,k=Math.round(w*1e3),b=0,y=-1,C=g[m],A=c;o=this.getBeatLength()*A/60;for(var P=-1,_=0;_<C.length;_++){var B=C[_].measureNumber;P!==B&&this.tempoLocations[B]&&(A=this.tempoLocations[B],o=h*this.getBeatLength()*A/60,P=B);var O=C[_].elem,q=this.addElementToEvents(l,O,k,C[_].top,C[_].height,C[_].line,C[_].measureNumber,o,u,p);u=q.isTiedState,p=q.nextIsBar,w+=q.duration;var I;if(O.duration>0&&l["event"+k]&&(I="event"+k),k=Math.round(w*1e3),O.type==="bar"){var G=O.abcelem.type,Y=G==="bar_right_repeat"||G==="bar_dbl_repeat",Z=O.abcelem.startEnding==="1",x=G==="bar_left_repeat"||G==="bar_dbl_repeat"||G==="bar_right_repeat";if(Y){_>0&&(l[I].endX=O.x),y===-1&&(y=_);var T=0;P=-1;for(var N=b;N<y;N++){B=C[N].measureNumber,P!==B&&this.tempoLocations[B]&&(A=this.tempoLocations[B],o=h*this.getBeatLength()*A/60,P=B);var E=C[N].elem;q=this.addElementToEvents(l,E,k,C[N].top,C[N].height,C[N].line,C[N].measureNumber,o,u,p),u=q.isTiedState,p=q.nextIsBar,w+=q.duration,T=k,k=Math.round(w*1e3)}l["event"+T]&&(l["event"+T].endX=C[y].elem.x),p=!0,y=-1}Z&&(y=_),x&&(b=_)}}v=Math.max(v,k)}return d=n(l),r(d),i(this.lines,d),d.push({type:"end",milliseconds:v}),this.addUsefulCallbackInfo(d,A*h),d},this.addUsefulCallbackInfo=function(s,o){for(var c=this.millisecondsPerMeasure(o),h=0;h<s.length;h++){var d=s[h];d.millisecondsPerMeasure=c}};function a(s,o){for(;o<s.length&&s[o].left===null;)o++;return s[o]}function i(s,o){if(!(o.length<1)){for(var c=0;c<o.length-1;c++){var h=o[c],d=a(o,c+1);if(h.left!==null){var l=d&&h.top===d.top?d.left:s[h.line].staffGroup.w;h.endX!==void 0?l>h.left&&(h.endX=Math.min(h.endX,l)):h.endX=l}}var f=o[o.length-1];f.endX=s[f.line].staffGroup.w}}this.getBpm=function(s){var o;if(s||(s=this.metaText?this.metaText.tempo:null),s){o=s.bpm;var c=this.getBeatLength(),h=s.duration&&s.duration.length>0?s.duration[0]:c;o=o*h/c}if(!o){o=180;var d=this.getMeterFraction();d&&d.num!==3&&d.num%3===0&&(o=120)}return o},this.setTiming=function(s,o){if(o=o||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var c=this.metaText?this.metaText.tempo:null,h=this.getBpm(c),d=1;s?c&&(d=s/h):s=h;var l=this.getBeatLength(),f=s/60,u=this.getBarLength(),p=u/l*o/f;p&&(p-=this.getPickupLength()/l/f);var g=l*f;return this.noteTimings=this.setupEvents(p,g,s,d),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*f):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(s){s||(s={});var o=rd(this,s);return ad(o,s,this.formatting.percmap,this.formatting.midi)},this.deline=function(s){return nd(this.lines,s)},this.findSelectableElement=function(s){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(s):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}};rs.exports=id});var ls=L((v4,cs)=>{var as=cr(),sd=function(e){var t=this,r={},n="";e.reset(),this.setVisualTranspose=function(a){a!==void 0&&(e.visualTranspose=a)},this.cleanUp=function(a,i,s){xa(e),delete e.runningFonts,od(e),e.metaText.tempo&&e.metaText.tempo.bpm&&!e.metaText.tempo.duration&&(e.metaText.tempo.duration=[e.getBeatLength()]);var o=!1,c,h,d;for(c=0;c<e.lines.length;c++)if(e.lines[c].staff!==void 0){var l=!1;for(h=0;h<e.lines[c].staff.length;h++)if(e.lines[c].staff[h]===void 0)o=!0,e.lines[c].staff[h]=null;else for(d=0;d<e.lines[c].staff[h].voices.length;d++)e.lines[c].staff[h].voices[d]===void 0?e.lines[c].staff[h].voices[d]=[]:ka(e.lines[c].staff[h].voices[d])&&(l=!0);l||(e.lines[c]=null,o=!0)}if(o&&(e.lines=e.lines.filter(function(b){return!!b}),e.lines.forEach(function(b){b.staff&&(b.staff=b.staff.filter(function(y){return!!y}))})),a)for(;ud(e.lines,a););if(i){for(o=!1,c=0;c<e.lines.length;c++)if(e.lines[c].staff!==void 0)for(h=0;h<e.lines[c].staff.length;h++){var f=!1;for(d=0;d<e.lines[c].staff[h].voices.length;d++)vd(e.lines[c].staff[h].voices[d])&&(f=!0);f||(o=!0,e.lines[c].staff[h]=null)}o&&e.lines.forEach(function(b){b.staff&&(b.staff=b.staff.filter(function(y){return!!y}))})}for(hd(e.lines),c=0;c<e.lines.length;c++)if(e.lines[c].staff)for(h=0;h<e.lines[c].staff.length;h++)delete e.lines[c].staff[h].workingClef;for(var u=!1;cd(e);)u=!0;if(u)for(var p=0,g=is(e.lines,p);g!=="not-found";)g=is(e.lines,p),g?p++:wd(e.lines,p);for(var c=0;c<e.lines.length;c++){var v=e.lines[c].staff;if(v)for(e.staffNum=0;e.staffNum<v.length;e.staffNum++)for(v[e.staffNum].clef&&as.fixClef(v[e.staffNum].clef),e.voiceNum=0;e.voiceNum<v[e.staffNum].voices.length;e.voiceNum++){var m=v[e.staffNum].voices[e.voiceNum];fd(m,e.staffNum,e.voiceNum,s);for(var w=0;w<m.length;w++)m[w].el_type==="clef"&&as.fixClef(m[w]);if(m.length>0&&m[m.length-1].barNumber){var k=ss(e.lines,c);k&&(k.staff[0].barNumber=m[m.length-1].barNumber),delete m[m.length-1].barNumber}}}return delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,s},this.addTieToLastNote=function(a){var i=pd(e);return i&&i.pitches&&i.pitches.length>0?(i.pitches[0].startTie={},a&&(i.pitches[0].startTie.style="dotted"),!0):!1},this.appendElement=function(a,i,s,o){if(o.el_type=a,i!==null&&(o.startChar=i),s!==null&&(o.endChar=s),a==="note"){var c=gd(o);c>=.25||o.force_end_beam_last&&e.potentialStartBeam!==void 0?ur(e):o.end_beam&&e.potentialStartBeam!==void 0?o.rest===void 0?md(o,e):ur(e):o.rest===void 0&&(e.potentialStartBeam===void 0?o.end_beam||(e.potentialStartBeam=o,delete e.potentialEndBeam):e.potentialEndBeam=o)}else ur(e);return delete o.end_beam,delete o.force_end_beam_last,o.rest&&o.rest.type==="invisible"&&delete o.decoration,e.lines.length<=e.lineNum||e.lines[e.lineNum].staff.length<=e.staffNum?!1:(bd(t,e,o,r,n),!0)},this.appendStartingElement=function(a,i,s,o){xa(e);var c;a==="key"&&(c=o.impliedNaturals,delete o.impliedNaturals,delete o.explicitAccidentals);var h=Object.assign({},o);if(e.lines[e.lineNum]){var d=e.lines[e.lineNum].staff;if(d){d.length<=e.staffNum&&(d[e.staffNum]={},d[e.staffNum].clef=Object.assign({},d[0].clef),d[e.staffNum].key=Object.assign({},d[0].key),d[0].meter&&(d[e.staffNum].meter=Object.assign({},d[0].meter)),d[e.staffNum].workingClef=Object.assign({},d[0].workingClef),d[e.staffNum].voices=[[]]),a==="clef"&&(d[e.staffNum].workingClef=h);for(var l=d[e.staffNum].voices[e.voiceNum],f=0;f<l.length;f++){if(l[f].el_type==="note"||l[f].el_type==="bar"){h.el_type=a,h.startChar=i,h.endChar=s,c&&(h.accidentals=c.concat(h.accidentals)),l.push(h);return}if(l[f].el_type===a){h.el_type=a,h.startChar=i,h.endChar=s,c&&(h.accidentals=c.concat(h.accidentals)),l[f]=h;return}}d[e.staffNum][a]=o}}},this.addSubtitle=function(a,i){E0(e,{subtitle:{text:a,startChar:i.startChar,endChar:i.endChar}})},this.addSpacing=function(a){e.vskipPending=a},this.addNewPage=function(a){E0(e,{newpage:a})},this.addSeparator=function(a,i,s,o){E0(e,{separator:{spaceAbove:Math.round(a),spaceBelow:Math.round(i),lineLength:Math.round(s),startChar:o.startChar,endChar:o.endChar}})},this.addText=function(a,i){E0(e,{text:{text:a,startChar:i.startChar,endChar:i.endChar}})},this.addCentered=function(a){E0(e,{text:[{text:a,center:!0}]})},this.changeVoiceScale=function(a){t.appendElement("scale",null,null,{size:a})},this.changeVoiceColor=function(a){t.appendElement("color",null,null,{color:a})},this.startNewLine=function(a){xa(e),a.currentVoiceName&&(n=a.currentVoiceName,r[a.currentVoiceName]=a),e.lines[e.lineNum]===void 0?yd(t,e,a):e.lines[e.lineNum].staff===void 0?(e.lineNum++,this.startNewLine(a)):e.lines[e.lineNum].staff[e.staffNum]===void 0?os(t,e,a):e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum]===void 0?Ca(t,e,a):ka(e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum])?(e.lineNum++,this.startNewLine(a)):a.part&&t.appendElement("part",a.part.startChar,a.part.endChar,{title:a.part.title})},this.setRunningFont=function(a,i){e.runningFonts[a]=i},this.setBarNumberImmediate=function(a){var i=this.getCurrentVoice();if(i&&i.length>0){var s=i[i.length-1];if(s.el_type==="bar")s.barNumber!==void 0&&(s.barNumber=a);else return a-1}return a},this.hasBeginMusic=function(){for(var a=0;a<e.lines.length;a++)if(e.lines[a].staff)return!0;return!1},this.isFirstLine=function(a){for(var i=a-1;i>=0;i--)if(e.lines[i].staff!==void 0)return!1;return!0},this.getCurrentVoice=function(){var a=dd(e.lines,e.lineNum);if(!a)return null;var i=a.staff[e.staffNum];return i&&i.voices[e.voiceNum]!==void 0?i.voices[e.voiceNum]:null},this.setCurrentVoice=function(a,i,s){e.staffNum=a,e.voiceNum=i,n=s;for(var o=0;o<e.lines.length;o++)if(e.lines[o].staff&&(e.lines[o].staff[a]===void 0||e.lines[o].staff[a].voices[i]===void 0||!ka(e.lines[o].staff[a].voices[i])))return e.lineNum=o,!!(!e.lines[o].staff[a]||e.lines[o].staff[a].voices[i]);return e.lineNum=o,!1},this.addMetaText=function(a,i,s){e.metaText[a]===void 0?(e.metaText[a]=i,e.metaTextInfo[a]=s):(typeof e.metaText[a]=="string"&&typeof i=="string"?e.metaText[a]+=`
|
|
67
|
+
`+i:(e.metaText[a]==="string"&&(e.metaText[a]=[{text:e.metaText[a]}]),typeof i=="string"&&(i=[{text:i}]),e.metaText[a]=e.metaText[a].concat(i)),e.metaTextInfo[a].endChar=s.endChar)},this.addMetaTextArray=function(a,i,s){e.metaText[a]===void 0?(e.metaText[a]=[i],e.metaTextInfo[a]=s):(e.metaText[a].push(i),e.metaTextInfo[a].endChar=s.endChar)},this.addMetaTextObj=function(a,i,s){e.metaText[a]=i,e.metaTextInfo[a]=s}};function ns(e){if(!e||typeof e=="string")return!1;for(var t=0;t<e.length;t++)if(typeof e[t]!="string")return!1;return!0}function od(e){ns(e.metaText.notes)&&(e.metaText.notes=e.metaText.notes.join(`
|
|
68
|
+
`)),ns(e.metaText.history)&&(e.metaText.history=e.metaText.history.join(`
|
|
69
|
+
`))}function cd(e){for(var t=!1,r=0;r<e.lines.length;r++){var n=e.lines[r];if(n.staff)for(var a=0;a<n.staff.length;a++){for(var i=n.staff[a],s=[],o=0;o<i.voices.length;o++){var c=i.voices[o];s.push({hasOverlay:!1,voice:[],snip:[]});for(var h=0,d=!1,l=-1,f=0;f<c.length;f++){var u=c[f];if(u.el_type==="overlay"&&!d){t=!0,d=!0,l=f,s[o].hasOverlay=!0;for(var p=0;p<r;p++)e.lines[p].staff&&e.lines[p].staff.forEach(b=>{i.voices.length>=b.voices.length&&b.voices.forEach(y=>{let C=[];y.forEach(A=>{A.el_type==="bar"?C.push(A):A.el_type==="note"&&C.push({el_type:"note",duration:A.duration,rest:{type:"invisible"},startChar:A.startChar,endChar:A.endChar})}),b.voices.push(C)})})}else u.el_type==="bar"?(d?(d=!1,s[o].snip.push({start:l,len:f-l}),s[o].voice.push(u)):(h>0&&s[o].voice.push({el_type:"note",duration:h,rest:{type:"invisible"},startChar:u.startChar,endChar:u.endChar}),s[o].voice.push(u)),h=0):u.el_type==="note"?d?s[o].voice.push(u):(!u.rest||u.rest.type!=="spacer")&&(h+=u.duration):(u.el_type==="scale"||u.el_type==="stem"||u.el_type==="overlay"||u.el_type==="style"||u.el_type==="transpose"||u.el_type==="color")&&s[o].voice.push(u)}s[o].hasOverlay&&s[o].snip.length===0&&s[o].snip.push({start:l,len:c.length-l})}for(o=0;o<s.length;o++){var g=s[o];if(g.hasOverlay){g.voice.splice(0,0,{el_type:"stem",direction:"down"}),i.voices.push(g.voice);for(var v=g.snip.length-1;v>=0;v--){var m=g.snip[v];i.voices[o].splice(m.start,m.len),i.voices[o].splice(m.start+1,0,{el_type:"stem",direction:"auto"});var w=ld(i.voices[o],m.start);i.voices[o].splice(w,0,{el_type:"stem",direction:"up"})}for(v=0;v<i.voices[i.voices.length-1].length;v++){i.voices[i.voices.length-1][v]=Object.assign({},i.voices[i.voices.length-1][v]);var k=i.voices[i.voices.length-1][v];k.el_type==="bar"&&k.startEnding&&delete k.startEnding,k.el_type==="bar"&&k.endEnding&&delete k.endEnding}}}}}return t}function ld(e,t){for(var r=t-1;r>0&&e[r].el_type!=="bar";r--);return r}function hd(e){for(var t=!0,r=0;r<e.length;r++){var n=e[r];if(n.staff){for(var a=0;a<n.staff.length;a++){var i=n.staff[a];if(i.title){for(var s=!1,o=0;o<i.title.length;o++)i.title[o]?(i.title[o]=t?i.title[o].name:i.title[o].subname,i.title[o]?s=!0:i.title[o]=""):i.title[o]="";s||delete i.title}}t=!1}}}function fd(e,t,r,n){n[t]||(n[t]=[]),n[t][r]||(n[t][r]=[]);for(var a,i=function(m,w,k){if(n[t][r][k]===void 0){for(a=0;a<n[t][r].length;a++)if(n[t][r][a]!==void 0){k=a;break}if(n[t][r][k]===void 0){var b=k*100+1;m.endSlur.forEach(function(A){b===A&&--b}),n[t][r][k]=[b]}}for(var y,C=0;C<w;C++)y=n[t][r][k].pop(),m.endSlur.push(y);return n[t][r][k].length===0&&delete n[t][r][k],y},s=function(m,w,k,b){m.startSlur=[],n[t][r][k]===void 0&&(n[t][r][k]=[]);for(var y=k*100+1,C=0;C<w;C++)b&&(b.forEach(function(A){y===A&&++y}),b.forEach(function(A){y===A&&++y}),b.forEach(function(A){y===A&&++y})),n[t][r][k].forEach(function(A){y===A&&++y}),n[t][r][k].forEach(function(A){y===A&&++y}),n[t][r][k].push(y),m.startSlur.push({label:y}),m.dottedSlur&&(m.startSlur[m.startSlur.length-1].style="dotted",delete m.dottedSlur),y++},o=0;o<e.length;o++){var c=e[o];if(c.el_type==="note"){if(c.gracenotes)for(var h=0;h<c.gracenotes.length;h++){if(c.gracenotes[h].endSlur){var d=c.gracenotes[h].endSlur;c.gracenotes[h].endSlur=[];for(var l=0;l<d;l++)i(c.gracenotes[h],1,20)}c.gracenotes[h].startSlur&&(a=c.gracenotes[h].startSlur,s(c.gracenotes[h],a,20))}if(c.endSlur&&(a=c.endSlur,c.endSlur=[],i(c,a,0)),c.startSlur&&(a=c.startSlur,s(c,a,0)),c.pitches){for(var f=[],u=0;u<c.pitches.length;u++)if(c.pitches[u].endSlur){var p=c.pitches[u].endSlur;c.pitches[u].endSlur=[];for(var g=0;g<p;g++){var v=i(c.pitches[u],1,u+1);f.push(v)}}for(u=0;u<c.pitches.length;u++)c.pitches[u].startSlur&&(a=c.pitches[u].startSlur,s(c.pitches[u],a,u+1,f));c.gracenotes&&c.pitches[0].endSlur&&c.pitches[0].endSlur[0]===100&&c.pitches[0].startSlur&&(c.gracenotes[0].endSlur?c.gracenotes[0].endSlur.push(c.pitches[0].startSlur[0].label):c.gracenotes[0].endSlur=[c.pitches[0].startSlur[0].label],c.pitches[0].endSlur.length===1?delete c.pitches[0].endSlur:c.pitches[0].endSlur[0]===100?c.pitches[0].endSlur.shift():c.pitches[0].endSlur[c.pitches[0].endSlur.length-1]===100&&c.pitches[0].endSlur.pop(),n[t][r][1].length===1?delete n[t][r][1]:n[t][r][1].pop())}}}}function ud(e,t){for(var r=0;r<e.length;r++)if(e[r].staff!==void 0)for(var n=0;n<e[r].staff.length;n++)for(var a=[],i=0;i<e[r].staff[n].voices.length;i++)for(var s=e[r].staff[n].voices[i],o=0,c=0;c<s.length;c++)if(s[c].el_type==="bar"){if(o++,o>=t&&c<s.length-1){var h=ss(e,r);if(!h){var d=JSON.parse(JSON.stringify(e[r]));e.push(Object.assign({},d)),h=e[e.length-1];for(var l=0;l<h.staff.length;l++)for(var f=0;f<h.staff[l].voices.length;f++)h.staff[l].voices[f]=[]}var u=c+1,p=e[r].staff[n].voices[i].slice(u);return e[r].staff[n].voices[i]=e[r].staff[n].voices[i].slice(0,u),h.staff[n].voices[i]=a.concat(p.concat(h.staff[n].voices[i])),!0}}else s[c].duration||a.push(s[c]);return!1}function dd(e,t){if(e.length<=t)return null;for(;t>=0;){if(e[t].staff)return e[t];t--}return null}function ss(e,t){for(t++;e.length>t;){if(e[t].staff)return e[t];t++}return null}function pd(e){if(!e.lines[e.lineNum]||!e.lines[e.lineNum].staff||!e.lines[e.lineNum].staff[e.staffNum])return null;var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum];if(!t)return null;for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.el_type==="note")return n}return null}function gd(e){return e.duration?e.duration:0}function xa(e){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function ka(e){for(var t=0;t<e.length;t++)if(e[t].el_type==="note"||e[t].el_type==="bar")return!0;return!1}function vd(e){for(var t=0;t<e.length;t++)if(e[t].el_type==="note"&&(e[t].rest===void 0||e[t].chord!==void 0))return!0;return!1}function E0(e,t){e.vskipPending&&(t.vskip=e.vskipPending,delete e.vskipPending),e.lines.push(t)}function bd(e,t,r,n,a){var i=t.lines[t.lineNum].staff[t.staffNum];if(r.pitches!==void 0){var s=i.workingClef.verticalPos;r.pitches.forEach(function(c){c.verticalPos=c.pitch-s})}if(r.gracenotes!==void 0){var o=i.workingClef.verticalPos;r.gracenotes.forEach(function(c){c.verticalPos=c.pitch-o})}i.voices.length<=t.voiceNum&&(n[a]||(n[a]={}),Ca(e,t,n[a])),i.voices[t.voiceNum].push(r)}function md(e,t){t.potentialStartBeam.startBeam=!0,e.endBeam=!0,delete t.potentialStartBeam,delete t.potentialEndBeam}function ur(e){e.potentialStartBeam!==void 0&&e.potentialEndBeam!==void 0&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function dr(e,t,r){if(e.runningFonts[t]){for(var n=!1,a=Object.keys(r),i=0;i<a.length;i++)e.runningFonts[t][a[i]]!==r[a[i]]&&(n=!0);n&&(e.lines[e.lineNum].staff[e.staffNum][t]=r)}e.runningFonts[t]=r}function Ca(e,t,r){var n=t.lines[t.lineNum].staff[t.staffNum];if(n.voices[t.voiceNum]=[],n.title||(n.title=[]),n.title[t.voiceNum]={name:r.name,subname:r.subname},r.style&&e.appendElement("style",null,null,{head:r.style}),r.stem)e.appendElement("stem",null,null,{direction:r.stem});else if(t.voiceNum>0){if(n.voices[0]!==void 0){for(var a=!1,i=0;i<n.voices[0].length;i++)n.voices[0].el_type==="stem"&&(a=!0);if(!a){var s={el_type:"stem",direction:"up"};n.voices[0].splice(0,0,s)}}e.appendElement("stem",null,null,{direction:"down"})}r.scale&&e.appendElement("scale",null,null,{size:r.scale}),r.color&&e.appendElement("color",null,null,{color:r.color})}function os(e,t,r){r.key&&r.key.impliedNaturals&&(r.key.accidentals=r.key.accidentals.concat(r.key.impliedNaturals),delete r.key.impliedNaturals),t.lines[t.lineNum].staff[t.staffNum]={voices:[],clef:r.clef,key:r.key,workingClef:r.clef};var n=t.lines[t.lineNum].staff[t.staffNum];r.stafflines!==void 0&&(n.clef.stafflines=r.stafflines,n.workingClef.stafflines=r.stafflines),r.staffscale&&(n.staffscale=r.staffscale),r.annotationfont&&dr(t,"annotationfont",r.annotationfont),r.gchordfont&&dr(t,"gchordfont",r.gchordfont),r.tripletfont&&dr(t,"tripletfont",r.tripletfont),r.vocalfont&&dr(t,"vocalfont",r.vocalfont),r.bracket&&(n.bracket=r.bracket),r.brace&&(n.brace=r.brace),r.connectBarLines&&(n.connectBarLines=r.connectBarLines),r.barNumber&&(n.barNumber=r.barNumber),Ca(e,t,r),r.part&&e.appendElement("part",r.part.startChar,r.part.endChar,{title:r.part.title}),r.meter!==void 0&&(n.meter=r.meter),t.vskipPending&&(t.lines[t.lineNum].vskip=t.vskipPending,delete t.vskipPending)}function yd(e,t,r){t.lines[t.lineNum]={staff:[]},os(e,t,r)}function is(e,t){for(var r=!1,n=!1,a=0;a<e.length;a++){var i=e[a].staff;if(i)for(var s=0;s<i.length;s++){var o=i[s];if(t<o.voices.length){n=!0;for(var c=o.voices[t],h=[],d=0;d<c.length;d++){var l=c[d];l.el_type==="note"&&(!l.rest||l.chord)&&(r=!0)}}}}return n?r:"not-found"}function wd(e,t){for(var r=0;r<e.length;r++){var n=e[r].staff;if(n)for(var a=0;a<n.length;a++){var i=n[a];t<i.voices.length&&i.voices.splice(t,1)}}}cs.exports=sd});var Ta=L((b4,fs)=>{var At=tt(),hs=tr(),xd=di(),kd=Ai(),Cd=Bi(),Td=ga(),Sd=Ii(),_d=wa(),Ed=ls(),Ad=function(){"use strict";var e=new _d,t=new Ed(e),r,n="",a="";this.getTune=function(){var b={formatting:e.formatting,lines:e.lines,media:e.media,metaText:e.metaText,metaTextInfo:e.metaTextInfo,version:e.version,addElementToEvents:e.addElementToEvents,addUsefulCallbackInfo:e.addUsefulCallbackInfo,getTotalTime:e.getTotalTime,getTotalBeats:e.getTotalBeats,getBarLength:e.getBarLength,getBeatLength:e.getBeatLength,getBeatsPerMeasure:e.getBeatsPerMeasure,getBpm:e.getBpm,getMeter:e.getMeter,getMeterFraction:e.getMeterFraction,getPickupLength:e.getPickupLength,getKeySignature:e.getKeySignature,getElementFromChar:e.getElementFromChar,makeVoicesArray:e.makeVoicesArray,millisecondsPerMeasure:e.millisecondsPerMeasure,setupEvents:e.setupEvents,setTiming:e.setTiming,setUpAudio:e.setUpAudio,deline:e.deline,findSelectableElement:e.findSelectableElement,getSelectableArray:e.getSelectableArray};return e.lineBreaks&&(b.lineBreaks=e.lineBreaks),e.visualTranspose&&(b.visualTranspose=e.visualTranspose),e.chordGrid&&(b.chordGrid=e.chordGrid),b};function i(b,y,C){b.positioning||(b.positioning={}),b.positioning[y]=C}function s(b,y,C){b.fonts||(b.fonts={}),b.fonts[y]=C}var o={reset:function(){for(var b in this)this.hasOwnProperty(b)&&typeof this[b]!="function"&&delete this[b];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(b,y){return this[b].decoration!==y[b].decoration||this[b].face!==y[b].face||this[b].size!==y[b].size||this[b].style!==y[b].style||this[b].weight!==y[b].weight},addFormattingOptions:function(b,y,C){C==="note"?(this.vocalPosition!=="auto"&&i(b,"vocalPosition",this.vocalPosition),this.dynamicPosition!=="auto"&&i(b,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&i(b,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&i(b,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&i(b,"volumePosition",this.volumePosition),this.differentFont("annotationfont",y)&&s(b,"annotationfont",this.annotationfont),this.differentFont("gchordfont",y)&&s(b,"gchordfont",this.gchordfont),this.differentFont("vocalfont",y)&&s(b,"vocalfont",this.vocalfont),this.differentFont("tripletfont",y)&&s(b,"tripletfont",this.tripletfont)):C==="bar"&&(this.dynamicPosition!=="auto"&&i(b,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&i(b,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&i(b,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&i(b,"volumePosition",this.volumePosition),this.differentFont("measurefont",y)&&s(b,"measurefont",this.measurefont),this.differentFont("repeatfont",y)&&s(b,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var b=0;b<this.inTie.length;b++)if(this.endingHoldOver.inTie.push([]),this.inTie[b])for(var y=0;y<this.inTie[b].length;y++)this.endingHoldOver.inTie[b].push(this.inTie[b][y]);for(var C in this.inTieChord)this.inTieChord.hasOwnProperty(C)&&(this.endingHoldOver.inTieChord[C]=this.inTieChord[C])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var b=0;b<this.endingHoldOver.inTie.length;b++){this.inTie.push([]);for(var y=0;y<this.endingHoldOver.inTie[b].length;y++)this.inTie[b].push(this.endingHoldOver.inTie[b][y])}for(var C in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(C)&&(this.inTieChord[C]=this.endingHoldOver.inTieChord[C])}}},c=function(b){o.warnings||(o.warnings=[]),o.warnings.push(b)},h=function(b){o.warningObjects||(o.warningObjects=[]),o.warningObjects.push(b)},d=function(b){var y=b.replace(/\x12/g," ");return y=y.replace(/&/g,"&"),y=y.replace(/</g,"<"),y.replace(/>/g,">")},l=function(b,y,C){y||(y=" ");var A=y[C];(A===" "||!A)&&(A="SPACE");var P=d(y.substring(C-64,C))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+A+"</span>"+d(y.substring(C+1).substring(0,64));c("Music Line:"+r.lineIndex+":"+(C+1)+": "+b+": "+P),h({message:b,line:y,startChar:o.iChar+C,column:C})},f,u;this.getWarnings=function(){return o.warnings},this.getWarningObjects=function(){return o.warningObjects};var p=function(b,y){if(y.indexOf("")>=0){n+=y;return}if(y=n+y,n="",!b){l("Can't add words before the first line of music",b,0);return}y=At.strip(y),y[y.length-1]!=="-"&&(y=y+" ");for(var C=[],A=0,P=!1,_=function(I){var G=At.strip(y.substring(A,I));if(G=G.replace(/\\([-_*|~])/g,"$1"),A=I+1,G.length>0){P&&(G=G.replace(/~/g," "));var Y=y[I];return Y!=="_"&&Y!=="-"&&(Y=" "),C.push({syllable:r.translateString(G),divider:Y}),P=!1,!0}return!1},B=!1,O=0;O<y.length;O++){switch(y[O]){case" ":case"":_(O);break;case"-":!B&&!_(O)&&C.length>0&&(At.last(C).divider="-",C.push({skip:!0,to:"next"}));break;case"_":B||(_(O),C.push({skip:!0,to:"slur"}));break;case"*":B||(_(O),C.push({skip:!0,to:"next"}));break;case"|":B||(_(O),C.push({skip:!0,to:"bar"}));break;case"~":B||(P=!0);break}B=y[O]==="\\"}var q=!1;b.forEach(function(I){if(C.length!==0){if(C[0].skip){switch(C[0].to){case"next":I.el_type==="note"&&I.pitches!==null&&!q&&C.shift();break;case"slur":I.el_type==="note"&&I.pitches!==null&&C.shift();break;case"bar":I.el_type==="bar"&&C.shift();break}I.el_type!=="bar"&&(I.lyric===void 0?I.lyric=[{syllable:"",divider:" "}]:I.lyric.push({syllable:"",divider:" "}))}else if(I.el_type==="note"&&I.rest===void 0&&!q){var G=C.shift();G.syllable&&(G.syllable=G.syllable.replace(/ +/g,"\xA0")),I.lyric===void 0?I.lyric=[G]:I.lyric.push(G)}}})},g=function(b,y){if(y.indexOf("")>=0){a+=y;return}if(y=a+y,a="",!b){l("Can't add symbols before the first line of music",b,0);return}y=At.strip(y),y[y.length-1]!=="-"&&(y=y+" ");for(var C=[],A=0,P=!1,_=function(q){var I=At.strip(y.substring(A,q));if(A=q+1,I.length>0){P&&(I=I.replace(/~/g," "));var G=y[q];return G!=="_"&&G!=="-"&&(G=" "),C.push({syllable:r.translateString(I),divider:G}),P=!1,!0}return!1},B=0;B<y.length;B++)switch(y[B]){case" ":case"":_(B);break;case"-":!_(B)&&C.length>0&&(At.last(C).divider="-",C.push({skip:!0,to:"next"}));break;case"_":_(B),C.push({skip:!0,to:"slur"});break;case"*":_(B),C.push({skip:!0,to:"next"});break;case"|":_(B),C.push({skip:!0,to:"bar"});break;case"~":P=!0;break}var O=!1;b.forEach(function(q){if(C.length!==0){if(C[0].skip)switch(C[0].to){case"next":q.el_type==="note"&&q.pitches!==null&&!O&&C.shift();break;case"slur":q.el_type==="note"&&q.pitches!==null&&C.shift();break;case"bar":q.el_type==="bar"&&C.shift();break}else if(q.el_type==="note"&&q.rest===void 0&&!O){var I=C.shift();q.lyric===void 0?q.lyric=[I]:q.lyric.push(I)}}})},v=function(b){if(At.startsWith(b,"%%")){var y=hs.addDirective(b.substring(2));y&&l(y,b,2);return}var C=b.indexOf("%");if(C>=0&&(b=b.substring(0,C)),b=b.replace(/\s+$/,""),b.length!==0){if(n){p(t.getCurrentVoice(),b.substring(2));return}if(a){g(t.getCurrentVoice(),b.substring(2));return}if(b.length<2||b[1]!==":"||u.lineContinuation){u.parseMusic(b);return}var A=f.parseHeader(b);A.regular&&u.parseMusic(b),A.newline&&u.startNewLine(),A.words&&p(t.getCurrentVoice(),b.substring(2)),A.symbols&&g(t.getCurrentVoice(),b.substring(2))}};function m(b,y){b.push({el_type:"hint"});for(var C=0;C<y.length;C++){var A=y[C],P=Object.assign({},A);if(b.push(P),A.el_type==="bar")return}}function w(b,y){for(var C=0;C<b.length;C++){var A=b[C],P=y[C];if(P)for(var _=0;_<P.voices.length;_++){var B=P.voices[_],O=A.voices[_];O&&m(O,B)}}}function k(){for(var b=0;b<e.lines.length;b++){var y=e.lines[b].staff;if(y){for(var C=b+1;C<e.lines.length&&e.lines[C].staff===void 0;)C++;if(C<e.lines.length){var A=e.lines[C].staff;w(y,A)}}}}this.parse=function(b,y,C){y||(y={}),C||(C=0),e.reset(),b=b.replace(/\r\n?/g,`
|
|
70
|
+
`)+`
|
|
71
|
+
`;var A=b.split(`
|
|
72
|
+
\\`);if(A.length>1){for(var P=1;P<A.length;P++)for(;A[P].length>0&&A[P][0]!==`
|
|
73
|
+
`;)A[P]=A[P].substr(1),A[P-1]+=" ";b=A.join(" ")}b=b.replace(/\\([ \t]*)(%.*)*\n/g,function(Y,Z,x){var T=x?Array(x.length+1).join(" "):"";return Z+""+T+`
|
|
74
|
+
`});var _=b.split(`
|
|
75
|
+
`);At.last(_).length===0&&_.pop(),r=new Cd(_,o),f=new xd(r,l,o,e,t),u=new kd(r,l,o,e,t,f),y.print&&(e.media="print"),o.reset(),o.iChar=C,y.visualTranspose?(o.globalTranspose=parseInt(y.visualTranspose),o.globalTranspose===0?o.globalTranspose=void 0:t.setVisualTranspose(y.visualTranspose)):o.globalTranspose=void 0,y.lineBreaks&&(o.lineBreaks=y.lineBreaks),f.reset(r,l,o,e);try{y.format&&hs.globalFormatting(y.format);for(var B=r.nextLine();B;){if(y.header_only&&o.is_in_header===!1||y.stop_on_warning&&o.warnings)throw"normal_abort";var O=o.is_in_header;v(B),O&&!o.is_in_header&&(t.setRunningFont("annotationfont",o.annotationfont),t.setRunningFont("gchordfont",o.gchordfont),t.setRunningFont("tripletfont",o.tripletfont),t.setRunningFont("vocalfont",o.vocalfont)),B=r.nextLine()}n&&p(t.getCurrentVoice(),""),a&&g(t.getCurrentVoice(),""),o.openSlurs=t.cleanUp(o.barsperstaff,o.staffnonote,o.openSlurs)}catch(Y){if(Y!=="normal_abort")throw Y}var q=792,I=8.5*72;switch(o.papersize){case"legal":q=1008,I=8.5*72;break;case"A4":q=11.7*72,I=8.3*72;break}if(o.landscape){var G=q;q=I,I=G}if(e.formatting.pagewidth||(e.formatting.pagewidth=I),e.formatting.pageheight||(e.formatting.pageheight=q),y.hint_measures&&k(),Td.wrapLines(e,o.lineBreaks,o.barNumbers),y.chordGrid)try{e.chordGrid=Sd(e)}catch(Y){switch(Y.message){case"notCommonTime":l("Chord grid only works for 2/2 and 4/4 time.",0,0);break;case"noChords":l("No chords are found in the tune.",0,0);break;default:l(Y.message,0,0)}}}};fs.exports=Ad});var ds=L((m4,us)=>{var A0=tt(),Md=function(e){"use strict";var t="",r=e.match(/(\s*)/);e=A0.strip(e);for(var n=e.split(`
|
|
76
|
+
X:`),a=1;a<n.length;a++)n[a]="X:"+n[a];var i=r?r[0].length:0,s=[];if(n.forEach(function(d){s.push({abc:d,startPos:i}),i+=d.length+1}),s.length>1&&!A0.startsWith(s[0].abc,"X:")){var o=s.shift(),c=o.abc.split(`
|
|
77
|
+
`);c.forEach(function(d){A0.startsWith(d,"%%")&&(t+=d+`
|
|
78
|
+
`)})}var h=t;return s.forEach(function(d){var l=d.abc.indexOf(`
|
|
79
|
+
|
|
80
|
+
`);l>0&&(d.abc=d.abc.substring(0,l)),d.pure=d.abc,d.abc=t+d.abc,d.title="";var f=d.pure.split("T:");f.length>1&&(f=f[1].split(`
|
|
81
|
+
`),d.title=A0.strip(f[0]));var u=d.pure.substring(2,d.pure.indexOf(`
|
|
82
|
+
`));d.id=A0.strip(u)}),{header:h,tunes:s}};us.exports=Md});var gs=L((y4,ps)=>{function Sa(e,t){this.numLines=e,this.lineSpace=t,this.verticalSize=this.numLines*this.lineSpace;var r=3;this.bar={pitch:r,pitch2:t*e,height:5}}Sa.prototype.bypass=function(e){var t=e.staffGroup.voices;return!!(t.length>0&&t[0].isPercussion)};Sa.prototype.setRelative=function(e,t,r){switch(e.type){case"bar":t.pitch=this.bar.pitch,t.pitch2=this.bar.pitch2,t.height=this.height;break;case"symbol":var n=this.bar.pitch2/2;if(e.name=="dots.dot")return r?(t.pitch=n,!1):(t.pitch=n+this.lineSpace,!0);break}return r};ps.exports=Sa});var _a=L((w4,vs)=>{var Mt=function(t,r){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=t,this.voicetotal=r,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}};Mt.prototype.addChild=function(e){if(e.type==="bar"){for(var t=!0,r=0;t&&r<this.children.length;r++)this.children[r].type.indexOf("staff-extra")<0&&this.children[r].type!=="tempo"&&(t=!1);t||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=e,this.setRange(e)};Mt.prototype.setLimit=function(e,t){var r=t.specialY;r||(r=t),r[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],r[e]):this.specialY[e]=r[e])};Mt.prototype.adjustRange=function(e){e.bottom!==void 0&&(this.bottom=Math.min(this.bottom,e.bottom)),e.top!==void 0&&(this.top=Math.max(this.top,e.top))};Mt.prototype.setRange=function(e){this.adjustRange(e),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)};Mt.prototype.addOther=function(e){this.otherchildren.push(e),this.setRange(e)};Mt.prototype.addBeam=function(e){this.beams.push(e)};Mt.prototype.setWidth=function(e){this.w=e};vs.exports=Mt});var pr=L((x4,bs)=>{var Bd=function(e,t,r,n){if(e)for(var a=0;a<e.length;a++){var i=e[a],s=i.getAttribute("highlight");s||(s="fill"),i.setAttribute(s,n);var o=i.getAttribute("class");o||(o=""),o=o.replace(r,""),o=o.replace(t,""),t.length>0&&(o.length>0&&o[o.length-1]!==" "&&(o+=" "),o+=t),i.setAttribute("class",o)}};bs.exports=Bd});var Ea=L((k4,ms)=>{var Nd=pr(),Pd=function(e,t){e===void 0&&(e="abcjs-note_selected"),t===void 0&&(t="#ff0000"),Nd(this.elemset,e,"",t)};ms.exports=Pd});var Aa=L((C4,ys)=>{var Ld=pr(),qd=function(e,t){e===void 0&&(e="abcjs-note_selected"),t===void 0&&(t="#000000"),Ld(this.elemset,"",e,t)};ys.exports=qd});var Rt=L((T4,ws)=>{var Id=Ea(),Dd=Aa(),Se=function(t,r,n,a,i,s){s||(s={}),this.tuneNumber=i,this.abcelem=t,this.duration=r,this.durationClass=s.durationClassOveride?s.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=a,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}};Se.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}};Se.prototype.addExtra=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),this.fixed.t===void 0?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top),this.fixed.b===void 0?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom),e.dx<this.extraw&&(this.extraw=e.dx),this.extra[this.extra.length]=e,this._addChild(e)};Se.prototype.addHead=function(e){e.dx<this.extraw&&(this.extraw=e.dx),this.heads[this.heads.length]=e,this.addRight(e)};Se.prototype.addRight=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),e.top!==void 0&&(this.fixed.t===void 0?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top)),e.bottom!==void 0&&(this.fixed.b===void 0?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom)),e.dx+e.w>this.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)};Se.prototype.addFixed=function(e){this._addChild(e)};Se.prototype.addFixedX=function(e){this._addChild(e)};Se.prototype.addCentered=function(e){var t=e.w/2;-t<this.extraw&&(this.extraw=-t),this.extra[this.extra.length]=e,e.dx+t>this.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)};Se.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])};Se.prototype._addChild=function(e){var t=!0;this.abcelem.el_type=="clef"&&e.type=="barNumber"&&(t=!1),e.parent=this,this.children[this.children.length]=e,t&&this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)};Se.prototype.pushTop=function(e){e!==void 0&&(this.top===void 0?this.top=e:this.top=Math.max(e,this.top))};Se.prototype.pushBottom=function(e){e!==void 0&&(this.bottom===void 0?this.bottom=e:this.bottom=Math.min(e,this.bottom))};Se.prototype.setX=function(e){this.x=e;for(var t=0;t<this.children.length;t++)this.children[t].setX(e)};Se.prototype.center=function(e,t){var r=(t.x-e.x)/2+e.x;this.x=r-this.w/2;for(var n=0;n<this.children.length;n++)this.children[n].setX(this.x)};Se.prototype.setHint=function(){this.hint=!0};Se.prototype.highlight=function(e,t){Id.bind(this)(e,t)};Se.prototype.unhighlight=function(e,t){Dd.bind(this)(e,t)};ws.exports=Se});var nt=L((S4,xs)=>{var Zt=function(t,r,n,a,i){switch(i=i||{},this.x=0,this.c=t,this.dx=r,this.w=n,this.pitch=a,this.scalex=i.scalex||1,this.scaley=i.scaley||1,this.type=i.type||"symbol",this.pitch2=i.pitch2,this.linewidth=i.linewidth,this.klass=i.klass,this.anchor=i.anchor?i.anchor:"middle",this.top=a,this.pitch2!==void 0&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=a,this.pitch2!==void 0&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),i.thickness&&(this.top+=i.thickness/2,this.bottom-=i.thickness/2),i.stemHeight&&(i.stemHeight>0?this.top+=i.stemHeight:this.bottom+=i.stemHeight),i.dim&&(this.dim=i.dim),i.position&&(this.position=i.position),this.height=i.height?i.height:4,i.top&&(this.top=i.top),i.bottom&&(this.bottom=i.bottom),i.name?this.name=i.name:this.c?this.name=this.c:this.name=this.type,i.realWidth?this.realWidth=i.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":i.position&&i.position==="below"?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":i.position&&i.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":this.pitch===void 0?i.position&&i.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height;break}};Zt.prototype.getChordDim=function(){if(this.type==="debug"||!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e=0,t=this.type==="chord"?this.realWidth/2:0,r=this.x-t-e,n=r+this.realWidth+e;return{left:r,right:n}};Zt.prototype.invertLane=function(e){this.lane===void 0&&(this.lane=0),this.lane=e-this.lane-1};Zt.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=this.height*1.25*this.lane:this.chordHeightBelow=this.height*1.25*this.lane};Zt.prototype.getLane=function(){return this.lane===void 0?0:this.lane};Zt.prototype.setX=function(e){this.x=e+this.dx};xs.exports=Zt});var As=L((_4,Es)=>{var Cs=Rt(),Na=nt();function zd(e){return e!=null&&e.constructor===Object}function Ma(e,t){for(var r in t)t.hasOwnProperty(r)&&(Array.isArray(t[r])||zd(t[r])||(e[r]=t[r]))}function Ts(e){var t=new Cs("",0,0,"",0);return Ma(t,e),t.top=0,t.bottom=-1,e.abcelem&&(t.abcelem={},Ma(t.abcelem,e.abcelem),t.abcelem.el_type==="note"&&(t.abcelem.el_type="tabNumber")),e.cloned=t,t}function Od(e,t){var r=Ts(e);if(t)for(var n=e.children,a=!0,i=0;i<n.length;i++){var s=n[i],o=new Na("",0,0,0,"");Ma(o,s),a=t.tablature.setRelative(s,o,a),r.children.push(o)}return r}function Fd(e,t,r){var n="tab.tiny",a=7.5;e.isTabBig&&(n="tab.big",a=10);var i={el_type:"tab",icon:n,Ypos:a};if(a+=e.tabSymbolOffset,!e.hideTabSymbol){var s=new Cs(i,0,0,"symbol",0);s.x=t;var o=new Na(n,0,0,7.5,"tab");o.x=r,s.children.push(o),s.abcelem.el_type=="tab"&&(o.pitch=a)}return s}function Hd(e){if(e.extra)for(var t=0;t<e.extra.length;t++){var r=e.extra[t];if(r.type=="lyric")return{bottom:r.bottom,height:r.height}}return null}function Ss(){this.accidentals=null}function Rd(e){for(var t=0,r=0;r<e.length;r++)e[r].tabNameInfos||t++;return t}function Ba(e,t,r,n,a){var i=n.num;n.note.quarter!=null&&(i=i.toString(),i+=n.note.quarter);var s=e.semantics.stringToPitch(n.str);r.notes.push({num:i,str:n.str,pitch:n.note.emit()});var o={type:"tabNumber"},c=new Na(i,0,0,s+.3,o);return c.x=t,c.isGrace=a,c.isAltered=n.note.isAltered,c}function _s(e,t){var r=0;if(e.extra){for(var n=0;n<e.extra.length;n++)if(e.extra[n].c.indexOf("noteheads")>=0){if(r===t)return e.extra[n].x+e.extra[n].w/2;r++}}return-1}function Gd(e){if(e.abcelem){var t=e.abcelem;if(t.rest)return t.gracenotes}return null}function ks(e,t,r){var n=e.semantics.notesToNumber(t,r);if(n.error)return e.setError(n.error),n;if(n.graces&&n.notes){var a=n.notes.length-1;n.notes[a].graces=n.graces}return n}function Yd(e,t,r,n,a){for(var i=0;i<n.length;i++){var s={el_type:"note",startChar:r.abcelem.startChar,endChar:r.abcelem.endChar,notes:[],grace:!0},o=_s(r,i),c=n[i],h=Ba(e,o,s,c,!0);t.children.push(h),a.push(s)}}Ss.prototype.build=function(e,t,r,n,a,i,s){var o=Rd(t),c=t[a+n],h=t[s],d=null,l=null;c.children[0].abcelem.el_type!="clef"&&i!="none"&&c.children.splice(0,0,i);for(var f=0;f<c.children.length;f++){var u=c.children[f],p=u.x,g=p;switch(u.isClef&&(h.children.push(Fd(e,p,g)),u.abcelem.type.indexOf("-8")>=0&&(e.semantics.clefTranspose=-12),u.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),u.type){case"staff-extra key-signature":this.accidentals=u.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var v=!1;f===c.children.length-1&&(v=!0);var m=Od(u,e);if(m.abcelem.barNumber){delete m.abcelem.barNumber;for(var w=0;w<m.children.length;w++)if(m.children[w].type==="barNumber"){m.children.splice(w,1);break}}m.abcelem.lastBar=v,h.children.push(m),r.push({el_type:u.abcelem.el_type,type:u.abcelem.type,endChar:u.abcelem.endChar,startChar:u.abcelem.startChar,abselem:m});break;case"rest":var k=Gd(u);if(k){if(d=ks(e,null,k),d.error)return;O={el_type:"note",startChar:u.abcelem.startChar,endChar:u.abcelem.endChar,notes:[],grace:!0},Yd(e,b,u,d.graces,r)}break;case"note":var b=Ts(u);b.x=u.heads[0].x+u.heads[0].w/2,b.lyricDim=Hd(u);var y=u.abcelem.pitches,C=u.abcelem.gracenotes;if(b.type="tabNumber",d=ks(e,y,C),d.error)return;if(d.graces){var A=d.notes.length-1;d.notes[A].graces=d.graces}l={el_type:"note",startChar:u.abcelem.startChar,endChar:u.abcelem.endChar,notes:[]};for(var P=0;P<d.notes.length;P++){var _=d.notes[P];if(_.graces)for(var B=0;B<_.graces.length;B++){var O={el_type:"note",startChar:u.abcelem.startChar,endChar:u.abcelem.endChar,notes:[],grace:!0},q=_s(u,B),I=_.graces[B],G=Ba(e,q,O,I,!0);b.children.push(G),r.push(O)}var Y=Ba(e,b.x+u.heads[P].dx,l,_,!1);b.children.push(Y)}l.notes.length>0&&(l.abselem=b,r.push(l),h.children.push(b));break}}};Es.exports=Ss});var Bs=L((E4,Ms)=>{var $d=_a(),Wd=As(),Xd=Me();function Ud(){return{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}}function Vd(e){for(var t=0,r=0;r<e.children.length;r++){var n=e.children[r];n.specialY&&n.specialY.lyricHeightBelow>t&&(t=n.specialY.lyricHeightBelow)}return t}function jd(e,t,r){var n=e.semantics,a=t.controller.getTextSize,i=n.tabInfos(e),s=n.suppress(e),o=!0;if(s&&(o=!1),o){var c=a.calc(i,"tablabelfont","text instrumentname");return r.tabNameInfos={textSize:{height:c.height,width:c.width},name:i},c.height}return 0}function Kd(e,t){return t[e].isTabStaff?e===t.length-1?!0:!t[e+1].isTabStaff:!1}function Qd(e){for(var t=0,r=0;r<e.length;r++)e[r].isTabStaff||t++;return t}function Zd(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return r;return-1}function Jd(e){for(var t=0;t<e.length;t++)if(e[t].isTabStaff){var r=Zd(e,t);e[t].hasStaff=e[r],e[r].hasTab||(e[r].hasTab=[]),e[r].hasTab.push(e[t])}}function e2(e,t){return Qd(e)===1&&t.voices.length>1}function t2(e,t){for(var r=0,n=0,a=!0,i=0;a;){if(!t[r])return-1;if(t[r].isTabStaff||(i=t[r].voices.length),t[r].isTabStaff){if(n++,Kd(r,t)&&n<i)return r+1}else if(n=0,r>=e&&(r+1==t.length||!t[r+1].isTabStaff))return r+1;if(r++,r>t.length)return-1}}function r2(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return e[r];return null}function a2(e,t){var r=e[t],n=r.children[0].abcelem;return n.el_type==="clef"?null:t==0?"none":e[t-1].children[0]}function n2(e,t,r,n){var a=new Wd,i={clef:{type:"TAB"}},s=e.linePitch*e.nbLines,o=r.staff;if(o){var c=o[0];if(c&&c.clef&&c.clef.stafflines==0){e.setError("No tablatures when stafflines=0");return}o.splice(o.length,0,i)}var h=r.staffGroup,d=h.voices,l=d[0],f=Vd(l),u=3,p=n,g=h.staffs[p],v=s+u-g.bottom-f;g.isTabStaff&&(v=g.top);var m={bottom:-1,isTabStaff:!0,specialY:Ud(),lines:e.nbLines,linePitch:e.linePitch,dy:.15,top:v},w=t2(n,h.staffs);if(w!==-1){m.parentIndex=w-1,h.staffs.splice(w,0,m),h.height+=s+u;var k=r2(h.staffs,w),b=1;e2(h.staffs,k)&&(b=k.voices.length),i.voices=[];for(var y=0;y<b;y++){var C=new $d(0,0);y>0&&(C.duplicate=!0);var A=jd(e,t,C)/Xd.STEP;A=Math.max(A,1),h.staffs[n].top+=1,h.height+=A,C.staff=m;var P=d.length;d.splice(d.length,0,C);var _=a2(d,y+n);i.voices[y]=[],a.build(e,d,i.voices[y],y,n,_,P)}Jd(h.staffs)}}Ms.exports=n2});var La=L((A4,Ns)=>{var i2={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},Pa=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];function s2(e){var t=e.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(t&&t.length===5){var r=i2[t[1]],n=Pa.indexOf(t[2]),a=t[4].length-t[3].length;return 48+n+r+a*12}return 0}function o2(e){e=parseInt(e,10);var t=Math.floor(e/12),r=e%12,n=Pa[r];if(n==="-"&&(n="^"+Pa[r-1]),t>4)for(n=n.toLowerCase(),t-=5;t>0;)n+="'",t--;else for(;t<4;)n+=",",t++;return n}Ns.exports={noteToMidi:s2,midiToNote:o2}});var Ia=L((M4,Ps)=>{var{noteToMidi:c2,midiToNote:qa}=La();function Ye(e,t){var r=c2(e);t&&(r+=t);var n=qa(r),a=!1,i=!1,s=!1,o=null,c=null,h=!1,d=0;e.startsWith("_")?(a=!0,d=-1,e[1]=="/"?(a=!1,c="v",d=0):e[1]=="_"&&(h=!0,d-=1)):e.startsWith("^")?(i=!0,d=1,e[1]=="/"?(i=!1,c="^",d=0):e[1]=="^"&&(h=!0,d+=1)):e.startsWith("=")&&(o=!0,d=0),s=a||i||c!=null,(s||o)&&(c!=null||h?n=e.slice(2):n=e.slice(1));var l=(n.match(/,/g)||[]).length,f=(n.match(/'/g)||[]).length;this.pitch=r,this.pitchAltered=0,this.name=n,this.acc=d,this.isSharp=i,this.isKeySharp=!1,this.isDouble=h,this.isAltered=s,this.isFlat=a,this.isKeyFlat=!1,this.natural=o,this.quarter=c,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=l,this.isQuoted=f}function l2(e){var t=e.name,r=new Ye(t);return r.pitch=e.pitch,r.hasComma=e.hasComma,r.isLower=e.isLower,r.isQuoted=e.isQuoted,r.isSharp=e.isSharp,r.isKeySharp=e.isKeySharp,r.isFlat=e.isFlat,r.isKeyFlat=e.isKeyFlat,r}Ye.prototype.sameNoteAs=function(e){return e.pitch===this.pitch};Ye.prototype.isLowerThan=function(e){return e.pitch>this.pitch};Ye.prototype.checkKeyAccidentals=function(e,t){if(!(this.isAltered||this.natural)){if(t[this.name.toUpperCase()])switch(t[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(e)for(var r=this.name,n=0;n<e.length;n++){var a=e[n];r==a.note.toUpperCase()&&(a.acc=="flat"&&(this.acc=-1,this.isKeyFlat=!0,this.pitchAltered=-1),a.acc=="sharp"&&(this.acc=1,this.isKeySharp=!0,this.pitchAltered=1))}}};Ye.prototype.getAccidentalEquiv=function(){var e=l2(this);return e.isSharp||e.isKeySharp?(e=e.nextNote(),e.isFlat=!0,e.isSharp=!1,e.isKeySharp=!1):(e.isFlat||e.isKeyFlat)&&(e=e.prevNote(),e.isSharp=!0,e.isFlat=!1,e.isKeyFlat=!1),e};Ye.prototype.nextNote=function(){var e=qa(this.pitch+1+this.pitchAltered);return new Ye(e)};Ye.prototype.prevNote=function(){var e=qa(this.pitch-1+this.pitchAltered);return new Ye(e)};Ye.prototype.emitNoAccidentals=function(){var e=this.name;this.isLower&&(e=e.toLowerCase());for(var t=0;t<this.isQuoted;t++)e+="'";for(var r=0;r<this.hasComma;r++)e+=",";return e};Ye.prototype.emit=function(){var e=this.name;(this.isSharp||this.isKeySharp)&&(e="^"+e,this.isDouble&&(e="^"+e)),(this.isFlat||this.isKeyFlat)&&(e="_"+e,this.isDouble&&(e="_"+e)),this.quarter&&(this.quarter=="^"?e="^/"+e:e="_/"+e),this.natural&&(e="="+e);for(var t=1;t<=this.hasComma;t++)e+=",";if(this.isLower){e=e.toLowerCase();for(var r=1;r<=this.isQuoted;r++)e+="'"}return e};Ps.exports=Ye});var Ds=L((B4,Is)=>{var Ls=Ia(),qs=["A","B","C","D","E","F","G"];function h2(e,t){var r=new Ls(e),n=new Ls(t);if(n.isLowerThan(r)){var a=r.emit(),i=n.emit();return{error:"Invalid string Instrument tuning : "+i+" string lower than "+a+" string"}}var s=[],o=qs.indexOf(r.name),c=qs.indexOf(n.name);if(o==-1||c==-1)return s;for(var h=!1;!h;)s.push(r.emit()),r=r.nextNote(),r.sameNoteAs(n)&&(h=!0);return s}Is.exports=h2});var Hs=L((N4,Fs)=>{var{noteToMidi:f2}=La(),gr=Ia(),u2=Ds();function d2(e){var t=null,r=e.tuning;if(e.capo>0){t=[];for(var n=0;n<r.length;n++){for(var a=new gr(r[n]),i=0;i<e.capo;i++)a=a.nextNote();t[n]=a.emit()}}return t}function p2(e){var t=[],r=e.tuning;e.capo>0&&(r=e.capoTuning);for(var n=r.length-1,a=0;a<r.length;a++){var i=e.highestNote;a!=r.length-1&&(i=r[a+1]);var s=u2(r[a],i);if(s.error)return s;t[n--]=s}return t}function g2(e){var t=[];t[0]=[];for(var r=e.strings,n=1;n<r.length;n++)t[n]=r[n-1];return t}function v2(e,t){for(var r=0;r<t.length-1;r++){var n=t[r],a=t[r+1];if(n.str==a.str){if(n.str==e.strings.length-1){n.num="?",a.num="?";return}a.num<n.num?(a.str++,a=zs(e,a.note,a.str,e.secondPos,e.strings[a.str].length)):(n.str++,n=zs(e,n.note,n.str,e.secondPos,e.strings[n.str].length)),t[r]=n,t[r+1]=a}}return null}function b2(e,t){for(var r=[],n=0;n<t.length;n++)if(!t[n].endTie){var a=new gr(t[n].name,e.clefTranspose);a.checkKeyAccidentals(e.accidentals,e.measureAccidentals);var i=Da(e,a);r.push(i)}return v2(e,r),r}function zs(e,t,r,n,a){var i=e.strings;t.checkKeyAccidentals(e.accidentals,e.measureAccidentals),n&&(i=n);var s=t.emitNoAccidentals(),o=i[r].indexOf(s),c=t.acc;if(o!=-1){if(n&&(o+=a),(t.isFlat||t.acc==-1)&&o==0){var h=t.getAccidentalEquiv();r++,o=i[r].indexOf(h.emit()),c=0}return{num:o+c,str:r,note:t}}return null}function Da(e,t){if(t.isAltered||t.natural){var r;t.isFlat?t.isDouble?r="__":r="_":t.isSharp?t.isDouble?r="^^":r="^":t.natural&&(r="="),e.measureAccidentals[t.name.toUpperCase()]=r}for(var n=e.stringPitches.length-1;n>=0;n--)if(t.pitch+t.pitchAltered>=e.stringPitches[n]){var a=t.pitch+t.pitchAltered-e.stringPitches[n];return t.quarter==="^"?a-=.5:t.quarter==="v"&&(a+=.5),{num:Math.round(a),str:e.stringPitches.length-1-n,note:t}}return{num:"?",str:e.stringPitches.length-1,note:t}}Jt.prototype.stringToPitch=function(e){var t=5.3,r=this.strings.length-1;return t+(r-e)*this.linePitch};function Os(e,t){var r={num:"?",str:0,note:t};e.push(r),e.error=t.emit()+": unexpected note for instrument"}Jt.prototype.notesToNumber=function(e,t){var r,n,a=null,i=null;if(e&&(i=[],e.length>1?(i=b2(this,e),i.error&&(a=i.error)):e[0].endTie||(r=new gr(e[0].name,this.clefTranspose),r.checkKeyAccidentals(this.accidentals,this.measureAccidentals),n=Da(this,r),n?i.push(n):(Os(i,r),a=i.error))),a)return i;var s=null;if(t){s=[];for(var o=0;o<t.length;o++)r=new gr(t[o].name,this.clefTranspose),r.checkKeyAccidentals(this.accidentals,this.measureAccidentals),n=Da(this,r),n?s.push(n):(Os(s,r),a=i.error)}return{notes:i,graces:s,error:a}};Jt.prototype.toString=function(){for(var e=[],t=0;t<this.tuning.length;t++){var r=this.tuning[t].replaceAll(",","").replaceAll("'","").toUpperCase();r[0]==="_"?r=r[1]+"b ":r[0]==="^"&&(r=r[1]+"# "),e.push(r)}return e.join("")};Jt.prototype.tabInfos=function(e){var t=e.params.label;if(t){var r=t.indexOf("%T"),n="";return r!=-1&&(n=this.toString(),e.capo>0&&(n+=" capo:"+e.capo),t=t.replace("%T",n)),t}return""};Jt.prototype.suppress=function(e){var t=e.params.suppress;return!!t};function Jt(e){var t=e.tuning,r=e.capo,n=e.params.highestNote;this.linePitch=e.linePitch,this.highestNote="a'",n&&(this.highestNote=n),this.measureAccidentals={},this.capo=0,r&&(this.capo=parseInt(r,10)),this.transpose=e.transpose?e.transpose:0,this.tuning=t,this.stringPitches=[];for(var a=0;a<this.tuning.length;a++){var i=f2(this.tuning[a])+this.capo;this.stringPitches.push(i)}if(this.capo>0&&(this.capoTuning=d2(this)),this.strings=p2(this),this.strings.error){e.setError(this.strings.error),e.inError=!0;return}this.secondPos=g2(this)}Fs.exports=Jt});var Gs=L((P4,Rs)=>{var m2=gs(),y2=Bs(),w2=Hs();vr.prototype.init=function(e,t,r,n){this.tune=e,this.params=r,this.tuneNumber=t,this.inError=!1,this.abcTune=e,this.linePitch=3,this.nbLines=n.defaultTuning.length,this.isTabBig=n.isTabBig,this.tabSymbolOffset=n.tabSymbolOffset,this.capo=r.capo,this.transpose=r.visualTranspose,this.hideTabSymbol=r.hideTabSymbol,this.tablature=new m2(this.nbLines,this.linePitch);var a=r.tuning;a||(a=n.defaultTuning),this.tuning=a,this.semantics=new w2(this)};vr.prototype.setError=function(e){e&&(this.error=e,this.inError=!0,this.tune.warnings?this.tune.warnings.push(e):this.tune.warnings=[e])};vr.prototype.render=function(e,t,r){this.inError||this.tablature.bypass(t)||y2(this,e,t,r)};function vr(){}var x2=function(){return{name:"StringTab",tablature:vr}};Rs.exports=x2});var za=L((L4,Ys)=>{var k2=Gs(),C2={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}},T2={inited:!1,plugins:{},register:function(e){var t=e.name,r=e.tablature;this.plugins[t]=r},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(e,t,r){this.inited||(this.register(new k2),this.inited=!0);var n=null,a=0;if(r.tablature){var i=r.tablature;n=[];for(var s=0;s<i.length;s++){var o=i[s],c=o.instrument;if(c==null)return this.setError(e,"tablature 'instrument' is missing"),n;var h=C2[c],d=null;if(h&&(d=this.plugins[h.name]),d){r.visualTranspose!=0&&(o.visualTranspose=r.visualTranspose),o.abcSrc=r.tablature.abcSrc;var l={classz:d,tuneNumber:t,params:o,instance:null,tabType:h};n.push(l),a++}else if(c==="")n.push(null);else return this.setError(e,"Undefined tablature plugin: "+c),n}}return n},layoutTablatures:function(t,r){var n=r.tablatures,a=0;if(n&&n.length>0)for(var i=n.length,s=0;s<i;++s)n[s]&&n[s].params.firstStaffOnly&&(n[s].params.suppress=!1);for(var o=0;o<r.lines.length;o++){var c=r.lines[o];if(c.staff&&a++,a>1&&n&&n.length>0)for(var i=n.length,s=0;s<i;++s)n[s].params.firstStaffOnly&&(n[s].params.suppress=!0);var h=c.staff;if(h){for(var d=h.length,l=0;l<h.length;l++)if(n[l]&&l<d){var f=n[l];f.instance==null&&(f.instance=new f.classz,f.instance.init(r,f.tuneNumber,f.params,f.tabType)),f.instance.render(t,c,l)}}}}};Ys.exports=T2});var M0=L((q4,$s)=>{var S2=Ta(),_2=ds(),E2=za(),wt={};(function(){"use strict";wt.numberOfTunes=function(n){var a=n.split(`
|
|
83
|
+
X:`),i=a.length;return i===0&&(i=1),i};var e=wt.TuneBook=function(n){var a=_2(n);this.header=a.header,this.tunes=a.tunes};e.prototype.getTuneById=function(n){for(var a=0;a<this.tunes.length;a++)if(this.tunes[a].id===""+n)return this.tunes[a];return null},e.prototype.getTuneByTitle=function(n){for(var a=0;a<this.tunes.length;a++)if(this.tunes[a].title===n)return this.tunes[a];return null},wt.parseOnly=function(n,a){for(var i=wt.numberOfTunes(n),s=[],o=0;o<i;o++)s.push(1);function c(){}return wt.renderEngine(c,s,n,a)},wt.renderEngine=function(n,a,i,s){var o=[],c=function(m){return m&&!m.propertyIsEnumerable("length")&&typeof m=="object"&&typeof m.length=="number"};if(!(a===void 0||i===void 0)){c(a)||(a=[a]),s===void 0&&(s={});for(var h=s.startingTune?parseInt(s.startingTune,10):0,d=new e(i),l=new S2,f=0;f<a.length;f++){var u=a[f];if(u==="*"||typeof u=="string"&&(u=document.getElementById(u)),u)if(h>=0&&h<d.tunes.length){l.parse(d.tunes[h].abc,s,d.tunes[h].startPos-d.header.length);var p=l.getTune();s.tablature&&(p.tablatures=E2.preparePlugins(p,h,s));var g=l.getWarnings();g&&(p.warnings=g);var v=n(u,p,f,d.tunes[h].abc);o.push(v||p)}else u.innerHTML&&(u.innerHTML="");h++}return o}};function t(n){for(var a=[],i=0;i<n.lines.length;i++){var s=n.lines[i];if(s.staff)for(var o=0;o<s.staff.length;o++){var c=s.staff[o];if(!a[o])a[o]=c;else for(var h=0;h<c.voices.length;h++)a[o].voices[h]&&(a[o].voices[h]=a[o].voices[h].concat(c.voices[h]))}}return a}function r(n,a){for(var i=[],s=null,o=null,c=null,h=!1,d=0;d<n.voices.length;d++){var l=n.voices[d];i.push([]);for(var f=0;f<l.length;f++){var u=l[f];if(c===null&&u.startChar>=0&&(c=u.startChar,u.chord===void 0?o=s:o=null),u.chord&&(s=u),u.el_type==="bar"){if(h){var p=a.abc.substring(c,u.endChar),g={abc:p};s=o&&o.chord&&o.chord.length>0?o.chord[0].name:null,s&&(g.lastChord=s),u.startEnding&&(g.startEnding=u.startEnding),u.endEnding&&(g.endEnding=u.endEnding),i[d].push(g),c=null,h=!1}}else u.el_type==="note"&&(h=!0)}}return i}wt.extractMeasures=function(n){for(var a=[],i=new e(n),s=0;s<i.tunes.length;s++){for(var o=i.tunes[s],c=o.abc.split("K:"),h=c[1].split(`
|
|
84
|
+
`),d=c[0]+"K:"+h[0]+`
|
|
85
|
+
`,l=null,f=null,u=null,p=[],g=!1,v=wt.parseOnly(o.abc)[0],m=v.getPickupLength()>0,w=0;w<v.lines.length;w++){var k=v.lines[w];if(k.staff)for(var b=0;b<1;b++)for(var y=k.staff[b],C=0;C<1;C++)for(var A=y.voices[C],P=0;P<A.length;P++){var _=A[P];if(u===null&&_.startChar>=0&&(u=_.startChar,_.chord===void 0?f=l:f=null),_.chord&&(l=_),_.el_type==="bar"){if(g){var B=o.abc.substring(u,_.endChar),O={abc:B};l=f&&f.chord&&f.chord.length>0?f.chord[0].name:null,l&&(O.lastChord=l),_.startEnding&&(O.startEnding=_.startEnding),_.endEnding&&(O.endEnding=_.endEnding),p.push(O),u=null,g=!1}}else _.el_type==="note"&&(g=!0)}}a.push({header:d,measures:p,hasPickup:m})}return a}})();$s.exports=wt});var Qs=L((I4,Ks)=>{var Ws=oa(),{relativeMajor:Xs,transposeKey:Oa,relativeMode:Us,isLegalMode:A2}=na(),Vs=aa(),js;(function(){"use strict";js=function(w,k,b){if(k==="TEST")return{keyAccidentals:Ws,relativeMajor:Xs,transposeKey:Oa,relativeMode:Us,transposeChordName:Vs};b=parseInt(b,10);var y=[],C;for(C=0;C<k.length;C++)y=y.concat(e(w,k[C],b));y=y.sort(function(_,B){return B.start-_.start});var A=w.split("");for(C=0;C<y.length;C++){var P=y[C];A.splice(P.start,P.end-P.start,P.note)}return A.join("")};function e(w,k,b){var y=[],C=k.getKeySignature();if(C.root==="Hp"||C.root==="HP")return y;y=y.concat(t(w,b));for(var A=0;A<k.lines.length;A++){var P=k.lines[A].staff;if(P)for(var _=0;_<P.length;_++){var B=P[_];B.clef.type!=="perc"&&(y=y.concat(r(w,B.voices,B.key,b)))}}return y}function t(w,k){for(var b=[],y=w.split("K:"),C=y[0].length,A=1;A<y.length;A++){var P=y[A],_=P.match(/^( *)([A-G])([#b]?)( ?)(\w*)/);if(_){var B=C+2+_[1].length,O=A2(_[5])?_[5]:"",q=_[2]+_[3]+_[4]+O,I=c({root:_[2],acc:_[3],mode:O},k),G=I.root+I.acc+_[4]+I.mode;b.push({start:B,end:B+q.length,note:G})}C+=P.length+2}return b}function r(w,k,b,y){for(var C=[],A=c(b,y),P=0;P<k.length;P++)C=C.concat(i(w,k[P],b.root,n(b),A,y));return C}function n(w){for(var k={},b=0;b<w.accidentals.length;b++){var y=w.accidentals[b];y.acc==="flat"?k[y.note.toUpperCase()]="_":y.acc==="sharp"&&(k[y.note.toUpperCase()]="^")}return k}function a(w,k,b){var y=s.indexOf(w.root)-s.indexOf(k);return k==="none"&&(y=s.indexOf(w.root)),y===0?b>2?y+=7:b===-12&&(y-=7):b>0&&y<0?y+=7:b<0&&y>0&&(y-=7),b>12?y+=7:b<-12&&(y-=7),y}function i(w,k,b,y,C,A){for(var P=[],_=a(C,b,A),B={},O={},q=0;q<k.length;q++){var I=k[q];if(I.chord)for(var G=0;G<I.chord.length;G++){var Y=I.chord[G];if(Y.position==="default"){var Z=C.accidentals.length&&C.accidentals[0].acc==="flat",x=Vs(Y.name,A,Z,!0);x=x.replace(/♭/g,"b").replace(/♯/g,"#"),x!==Y.name&&P.push(v(w,I.startChar,I.endChar,x))}}if(I.el_type==="note"&&I.pitches){for(var T=p(w,I.startChar,I.endChar),N=0;N<T.length;N++){var E=u(T[N].note,b,y,B);E.acc&&(B[E.name.toUpperCase()]=E.acc);var R=h(E,C,_,O);R.acc&&(O[R.upper]=R.acc),P.push({note:R.acc+R.name,start:T[N].index,end:T[N].index+T[N].note.length})}if(I.gracenotes)for(var ee=0;ee<I.gracenotes.length;ee++){var V=u(I.gracenotes[ee].name,b,y,B);V.acc&&(B[V.name.toUpperCase()]=V.acc);var ie=h(V,C,_,B);ie.acc&&(O[ie.upper]=ie.acc),P.push(g(w,I.startChar,I.endChar,ie.acc+ie.name,ee))}}else I.el_type==="bar"?(B={},O={}):I.el_type==="keySignature"&&(b=I.root,y=n(I),C=c(I,A),_=a(C,b,A))}return P}var s="CDEFGAB",o=[",,,,",",,,",",,",",","","'","''","'''","''''"];function c(w,k){if(w.root==="none")return{root:Oa("C",k),mode:"",acc:"",accidentals:[]};var b=Xs(w.root+w.acc+w.mode),y=Oa(b,k),C=Us(y,w.mode),A=Ws(y);return{root:C[0],mode:w.mode,acc:C.length>1?C[1]:"",accidentals:A}}function h(w,k,b,y){for(var C=w.pitch,A=s.indexOf(w.name),P=s.indexOf(k.root),_=(P+C)%7,B=A+b,O=w.oct;B>6;)O++,B-=7;for(;B<0;)O--,B+=7;for(var q=s[_],I="",G=w.adj,Y="=",Z=0;Z<k.accidentals.length;Z++)if(k.accidentals[Z].note.toLowerCase()===q.toLowerCase()){G=G+(k.accidentals[Z].acc==="flat"?-1:1),Y=k.accidentals[Z].acc==="flat"?"_":"^";break}var x;switch(G){case-2:I="__";break;case-1:I="_";break;case 0:I="=";break;case 1:I="^";break;case 2:I="^^";break;case-3:return x={},x.pitch=w.pitch-1,x.oct=w.oct,x.name=s[s.indexOf(w.name)-1],x.name||(x.name="B",x.oct--),x.name==="B"||x.name==="E"?x.adj=w.adj+1:x.adj=w.adj+2,h(x,k,b+1,y);case 3:return x={},x.pitch=w.pitch+1,x.oct=w.oct,x.name=s[s.indexOf(w.name)+1],x.name||(x.name="C",x.oct++),x.name==="C"||x.name==="F"?x.adj=w.adj-1:x.adj=w.adj-2,h(x,k,b+1,y)}switch((y[q]===I||!y[q]&&I===Y)&&!w.courtesy&&(I=""),O){case 0:q=q+",,,";break;case 1:q=q+",,";break;case 2:q=q+",";break;case 4:q=q.toLowerCase();break;case 5:q=q.toLowerCase()+"'";break;case 6:q=q.toLowerCase()+"''";break;case 7:q=q.toLowerCase()+"'''";break;case 8:q=q.toLowerCase()+"''''";break}return O>4&&(q=q.toLowerCase()),{acc:I,name:q,upper:q.toUpperCase()}}var d=/([_^=]*)([A-Ga-g])([,']*)/,l=/([_^=]*[A-Ga-g][,']*)(\d*\/*\d*)([\>\<\-\)\.\s\\]*)/,f=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/;function u(w,k,b,y){var C=k==="none"?0:s.indexOf(k),A=w.match(d),P=A[2].toUpperCase(),_=s.indexOf(P)-C;_<0&&(_+=7);var B=o.indexOf(A[3]);P===A[2]&&B--;var O=y[P]||b[P]||"=";return{acc:A[1],name:P,pitch:_,oct:B,adj:m(A[1],b[P],y[P]),courtesy:A[1]===O}}function p(w,k,b){for(var y=w.substring(k,b),C,A=[],P=/("[^"]+")+/g;(C=P.exec(y))!==null;)A.push({start:P.lastIndex-C[0].length,end:P.lastIndex});for(var _=/(![^!]+!)+/g;(C=_.exec(y))!==null;)A.push({start:_.lastIndex-C[0].length,end:_.lastIndex});for(var B=[],O=/([_^=]*)([A-Ga-g])([,']*)/g;(C=O.exec(y))!==null;){for(var q=!1,I=0;I<A.length;I++)O.lastIndex>=A[I].start&&O.lastIndex<=A[I].end&&(q=!0);q||B.push({note:C[0],index:k+O.lastIndex-C[0].length})}return B}function g(w,k,b,y,C){var A=w.substring(k,b),P=/\{/,_=/\}/,B=/([^\{]*)/,O=/(\/*)/,q=A.match(new RegExp(B.source+P.source+O.source+f.source+O.source+f.source+O.source+f.source+O.source+f.source+O.source+f.source+O.source+f.source+O.source+f.source+O.source+f.source+_.source));if(q){for(var I=1+q[1].length,G=0;G<C;G++)q[G*3+2]&&(I+=q[G*3+2].length),q[G*3+3]&&(I+=q[G*3+3].length),q[G*3+4]&&(I+=q[G*3+4].length),q[G*3+5]&&(I+=q[G*3+5].length);q[C*3+2]&&(I+=q[G*3+2].length),k+=I;var Y=q[C*3+3]?q[C*3+3].length:0;Y+=q[C*3+4]?q[C*3+4].length:0,Y+=q[C*3+5]?q[C*3+5].length:0,b=k+Y}return{start:k,end:b,note:y}}function v(w,k,b,y){var C=w.substring(k,b).match(/([^"]+)?(".+")+/);return C[1]&&(k+=C[1].length),b=k+C[2].length,{start:k+1,end:b-1,note:y}}function m(w,k,b){if(!w&&b&&(w=b),!w)return 0;switch(k){case void 0:switch(w){case"__":return-2;case"_":return-1;case"=":return 0;case"^":return 1;case"^^":return 2;default:return 0}case"_":switch(w){case"__":return-1;case"_":return 0;case"=":return 1;case"^":return 2;case"^^":return 3;default:return 0}case"^":switch(w){case"__":return-3;case"_":return-2;case"=":return-1;case"^":return 0;case"^^":return 1;default:return 0}}return 0}})();Ks.exports=js});var eo=L((D4,Js)=>{var Gt=function(t,r,n,a){this.type="BeamElem",this.isflat=!!n,this.isgrace=!!(r&&r==="grace"),this.forceup=!!(this.isgrace||r&&r==="up"),this.forcedown=!!(r&&r==="down"),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=t,this.beams=[],a&&a.duration?(this.duration=a.duration,a.startTriplet&&(this.duration*=a.tripletMultiplier),this.duration=Math.round(this.duration*1e3)/1e3):this.duration=0};Gt.prototype.setHint=function(){this.hint=!0};Gt.prototype.runningDirection=function(e){var t=e.averagepitch;t!==void 0&&(this.total=Math.round(this.total+t),this.count||(this.count=0),this.count++)};Gt.prototype.add=function(e){var t=e.abcelem.averagepitch;t!==void 0&&(e.abcelem.rest||(this.allrests=!1),e.beam=this,this.elems.push(e),this.total=Math.round(this.total+t),(this.min===void 0||e.abcelem.minpitch<this.min)&&(this.min=e.abcelem.minpitch),(this.max===void 0||e.abcelem.maxpitch>this.max)&&(this.max=e.abcelem.maxpitch))};Gt.prototype.addBeam=function(e){this.beams.push(e)};Gt.prototype.setStemDirection=function(){if(this.average=Zs(this.total,this.count),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var e=6;this.stemsUp=this.average<e}delete this.count,this.total=0};Gt.prototype.calcDir=function(){if(this.average=Zs(this.total,this.elems.length),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var e=6;this.stemsUp=this.average<e}for(var t=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=t};function Zs(e,t){return t?e/t:0}Js.exports=Gt});var ro=L((z4,to)=>{var B0=function(t,r){this.startVoice=t,this.type=r};B0.prototype.setBottomStaff=function(e){this.endVoice=e,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)};B0.prototype.continuing=function(e){this.lastContinuedVoice=e};B0.prototype.getWidth=function(){return 10};B0.prototype.isStartVoice=function(e){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===e)};to.exports=B0});var xt=L((O4,no)=>{var M2=Me(),ze={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}};ze["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};ze["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9};ze["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};ze["noteheads.triangle.quarter"]={d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9};var ao=function(e){for(var t=[],r=0,n=e.length;r<n;r++){t[r]=[];for(var a=0,i=e[r].length;a<i;a++)t[r][a]=e[r][a]}return t},B2=function(e,t,r){for(var n=0,a=e.length;n<a;n++){var i=e[n],s,o;for(s=1,o=i.length;s<o;s++)i[s]*=s%2?t:r}},N2={printSymbol:function(e,t,r,n,a){if(!ze[r])return null;var i=ao(ze[r].d);i[0][1]+=e,i[0][2]+=t;for(var s="",o=0;o<i.length;o++)s+=i[o].join(" ");return a.path=s,n.path(a)},getPathForSymbol:function(e,t,r,n,a){if(n=n||1,a=a||1,!ze[r])return null;var i=ao(ze[r].d);return(n!==1||a!==1)&&B2(i,n,a),i[0][1]+=e,i[0][2]+=t,i},getSymbolWidth:function(e){return ze[e]?ze[e].w:0},symbolHeightInPitches:function(e){var t=ze[e]?ze[e].h:0;return t/M2.STEP},getSymbolAlign:function(e){return e.substring(0,7)==="scripts"&&e!=="scripts.roll"?"center":"left"},getYCorr:function(e){switch(e){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(e,t){ze[e]=t}};no.exports=N2});var so=L((F4,io)=>{var P2=Rt(),N0=xt(),Fa=nt(),L2=function(e,t){var r,n=0;e.el_type="clef";var a=new P2(e,0,10,"staff-extra clef",t);switch(a.isClef=!0,e.type){case"treble":r="clefs.G";break;case"tenor":r="clefs.C";break;case"alto":r="clefs.C";break;case"bass":r="clefs.F";break;case"treble+8":r="clefs.G",n=1;break;case"tenor+8":r="clefs.C",n=1;break;case"bass+8":r="clefs.F",n=1;break;case"alto+8":r="clefs.C",n=1;break;case"treble-8":r="clefs.G",n=-1;break;case"tenor-8":r="clefs.C",n=-1;break;case"bass-8":r="clefs.F",n=-1;break;case"alto-8":r="clefs.C",n=-1;break;case"none":return null;case"perc":r="clefs.perc";break;default:a.addFixed(new Fa("clef="+e.type,0,0,void 0,{type:"debug"}))}var i=5;if(r){var s=N0.symbolHeightInPitches(r),o=q2(r);if(a.addRight(new Fa(r,i,N0.getSymbolWidth(r),e.clefPos,{top:s+e.clefPos+o,bottom:e.clefPos+o})),n!==0){var c=.6666666666666666,h=(N0.getSymbolWidth(r)-N0.getSymbolWidth("8")*c)/2,d=n>0?a.top+3:a.bottom-1,l=n>0?a.top+3:a.bottom-3,f=l-2;e.type==="bass-8"&&(d=3,h=0),a.addRight(new Fa("8",i+h,N0.getSymbolWidth("8")*c,d,{scalex:c,scaley:c,top:l,bottom:f}))}}return a};function q2(e){switch(e){case"clefs.G":return-5;case"clefs.C":return-4;case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}io.exports=L2});var co=L((H4,oo)=>{var I2=Rt(),br=xt(),D2=nt(),z2=function(e,t){if(e.el_type="keySignature",!e.accidentals||e.accidentals.length===0)return null;var r=new I2(e,0,10,"staff-extra key-signature",t);r.isKeySig=!0;var n=0;return e.accidentals.forEach(function(a){var i,s=0;switch(a.acc){case"sharp":i="accidentals.sharp",s=-3;break;case"natural":i="accidentals.nat";break;case"flat":i="accidentals.flat",s=-1.2;break;case"quartersharp":i="accidentals.halfsharp",s=-2.5;break;case"quarterflat":i="accidentals.halfflat",s=-1.2;break;default:i="accidentals.flat"}r.addRight(new D2(i,n,br.getSymbolWidth(i),a.verticalPos,{thickness:br.symbolHeightInPitches(i),top:a.verticalPos+br.symbolHeightInPitches(i)+s,bottom:a.verticalPos+s})),n+=br.getSymbolWidth(i)+2},this),r};oo.exports=z2});var ho=L((R4,lo)=>{var it=xt(),e0=nt(),O2=function(e,t,r,n){n||(n={});var a=n.dir!==void 0?n.dir:null,i=n.headx!==void 0?n.headx:0,s=n.extrax!==void 0?n.extrax:0,o=n.flag!==void 0?n.flag:null,c=n.dot!==void 0?n.dot:0,h=n.dotshiftx!==void 0?n.dotshiftx:0,d=n.scale!==void 0?n.scale:1,l=n.accidentalSlot!==void 0?n.accidentalSlot:[],f=n.shouldExtendStem!==void 0?n.shouldExtendStem:!1,u=n.printAccidentals!==void 0?n.printAccidentals:!0,p=r.verticalPos,g,v=0,m=0,w=0;if(t===void 0)e.addFixed(new e0("pitch is undefined",0,0,0,{type:"debug"}));else if(t==="")g=new e0(null,0,0,p);else{var k=i;if(r.printer_shift){var b=r.printer_shift==="same"?1:0;k=a==="down"?-it.getSymbolWidth(t)*d+b:it.getSymbolWidth(t)*d-b}var y={scalex:d,scaley:d,thickness:it.symbolHeightInPitches(t)*d,name:r.name};if(g=new e0(t,k,it.getSymbolWidth(t)*d,p,y),g.stemDir=a,o){var C=p+(a==="down"?-7:7)*d;f&&(a==="down"&&C>6&&(C=6),a==="up"&&C<6&&(C=6));var A=a==="down"?i:i+g.w-.6;e.addRight(new e0(o,A,it.getSymbolWidth(o)*d,C,{scalex:d,scaley:d}))}for(m=g.w+h-2+5*c;c>0;c--){var P=1-Math.abs(p)%2;e.addRight(new e0("dots.dot",g.w+h-2+5*c,it.getSymbolWidth("dots.dot"),p+P))}}if(g&&(g.highestVert=r.highestVert),u&&r.accidental){var _;switch(r.accidental){case"quartersharp":_="accidentals.halfsharp";break;case"dblsharp":_="accidentals.dblsharp";break;case"sharp":_="accidentals.sharp";break;case"quarterflat":_="accidentals.halfflat";break;case"flat":_="accidentals.flat";break;case"dblflat":_="accidentals.dblflat";break;case"natural":_="accidentals.nat"}for(var B=!1,O=s,q=0;q<l.length;q++)if(p-l[q][0]>=6){l[q][0]=p,O=l[q][1],B=!0;break}B===!1&&(O-=it.getSymbolWidth(_)*d+2,l.push([p,O]),v=it.getSymbolWidth(_)*d+2);var I=it.symbolHeightInPitches(_);e.addExtra(new e0(_,O,it.getSymbolWidth(_),p,{scalex:d,scaley:d,top:p+I/2,bottom:p-I/2})),w=it.getSymbolWidth(_)/2}return{notehead:g,accidentalshiftx:v,dotshiftx:m,extraLeft:w}};lo.exports=O2});var uo=L((G4,fo)=>{var F2=Rt(),me=xt(),vt=nt(),H2=function(e,t){e.el_type="timeSignature";var r=new F2(e,0,10,"staff-extra time-signature",t);if(e.type==="specified")for(var n=0,a=0;a<e.value.length;a++)if(a!==0&&(r.addRight(new vt("+",n+1,me.getSymbolWidth("+"),6,{thickness:me.symbolHeightInPitches("+")})),n+=me.getSymbolWidth("+")+2),e.value[a].den){for(var i=0,s=0;s<e.value[a].num.length;s++)i+=me.getSymbolWidth(e.value[a].num[s]);var o=0;for(s=0;s<e.value[a].num.length;s++)o+=me.getSymbolWidth(e.value[a].den[s]);var c=Math.max(i,o);r.addRight(new vt(e.value[a].num,n+(c-i)/2,i,8,{thickness:me.symbolHeightInPitches(e.value[a].num[0])})),r.addRight(new vt(e.value[a].den,n+(c-o)/2,o,4,{thickness:me.symbolHeightInPitches(e.value[a].den[0])})),n+=c}else{for(var h=0,d=0;d<e.value[a].num.length;d++)h+=me.getSymbolWidth(e.value[a].num[d]);r.addRight(new vt(e.value[a].num,n,h,6,{thickness:me.symbolHeightInPitches(e.value[a].num[0])})),n+=h}else e.type==="common_time"?r.addRight(new vt("timesig.common",0,me.getSymbolWidth("timesig.common"),6,{thickness:me.symbolHeightInPitches("timesig.common")})):e.type==="cut_time"?r.addRight(new vt("timesig.cut",0,me.getSymbolWidth("timesig.cut"),6,{thickness:me.symbolHeightInPitches("timesig.cut")})):e.type==="tempus_imperfectum"?r.addRight(new vt("timesig.imperfectum",0,me.getSymbolWidth("timesig.imperfectum"),6,{thickness:me.symbolHeightInPitches("timesig.imperfectum")})):e.type==="tempus_imperfectum_prolatio"?r.addRight(new vt("timesig.imperfectum2",0,me.getSymbolWidth("timesig.imperfectum2"),6,{thickness:me.symbolHeightInPitches("timesig.imperfectum2")})):e.type==="tempus_perfectum"?r.addRight(new vt("timesig.perfectum",0,me.getSymbolWidth("timesig.perfectum"),6,{thickness:me.symbolHeightInPitches("timesig.perfectum")})):e.type==="tempus_perfectum_prolatio"?r.addRight(new vt("timesig.perfectum2",0,me.getSymbolWidth("timesig.perfectum2"),6,{thickness:me.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",e);return r};fo.exports=H2});var go=L((Y4,po)=>{var R2=function(t,r,n){this.type="DynamicDecoration",this.anchor=t,this.dec=r,n==="below"?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0};po.exports=R2});var bo=L(($4,vo)=>{var G2=function(t,r,n,a){this.type="CrescendoElem",this.anchor1=t,this.anchor2=r,this.dir=n,a==="above"?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0};vo.exports=G2});var yo=L((W4,mo)=>{var Y2=function(t,r){this.type="GlissandoElem",this.anchor1=t,this.anchor2=r};mo.exports=Y2});var Ha=L((X4,wo)=>{var Oe=function(t){this.type="TieElem",this.anchor1=t.anchor1,this.anchor2=t.anchor2,t.isGrace&&(this.isGrace=!0),t.fixedY&&(this.fixedY=!0),t.stemDir&&(this.stemDir=t.stemDir),t.voiceNumber!==void 0&&(this.voiceNumber=t.voiceNumber),t.style!==void 0&&(this.dotted=!0),this.internalNotes=[]};Oe.prototype.addInternalNote=function(e){this.internalNotes.push(e)};Oe.prototype.setEndAnchor=function(e){this.anchor2=e,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)};Oe.prototype.setStartX=function(e){this.startLimitX=e};Oe.prototype.setEndX=function(e){this.endLimitX=e};Oe.prototype.setHint=function(){this.hint=!0};Oe.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 e;this.anchor1?e=this.anchor1.pitch:this.anchor2?e=this.anchor2.pitch:e=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=e>=6:this.anchor1?this.above=this.anchor1.stemDir==="down":this.anchor2?this.above=this.anchor2.stemDir==="down":this.above=e>=6}};Oe.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 e=!1;this.anchor1&&this.anchor1.stemDir==="down"&&(e=!0),this.anchor2&&this.anchor2.stemDir==="down"&&(e=!0);for(var t=0;t<this.internalNotes.length;t++){var r=this.internalNotes[t];r.stemDir==="down"&&(e=!0)}this.above=e}};Oe.prototype.calcX=function(e,t){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=e,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=t};Oe.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};Oe.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 e=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,t=(this.anchor2.highestVert+this.anchor2.pitch)/2;if(this.above&&this.anchor2.stemDir==="up"&&!this.fixedY&&!e&&t<this.startY?(this.endY=t,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&e?this.anchor2.highestVert:this.anchor2.pitch,this.anchor1.scalex===1){var r=!!this.anchor1.parent.beam,n=!!this.anchor2.parent.beam;if(r){var a=this.anchor1.parent===this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1];a||(this.above?this.startY=this.anchor1.parent.fixed.t:this.startY=this.anchor1.parent.fixed.b)}if(n){var i=this.anchor2.parent===this.anchor2.parent.beam.elems[0];i||(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)};Oe.prototype.avoidCollisionAbove=function(){if(this.above){for(var e=-50,t=0;t<this.internalNotes.length;t++)this.internalNotes[t].highestVert>e&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}};Oe.prototype.getYBounds=function(){var e=10,t=1e3;this.isTie?(this.calcTieDirection(),this.calcX(e,t),this.calcTieY()):(this.calcSlurDirection(),this.calcX(e,t),this.calcSlurY());var r,n;return this.above?(n=Math.min(this.startY,this.endY),r=n+3):(r=Math.min(this.startY,this.endY),n=r-3),[r,n]};wo.exports=Oe});var To=L((U4,Co)=>{var $2=go(),mr=bo(),W2=yo(),st=xt(),Yt=nt(),X2=Ha(),yr=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},U2=function(e,t,r,n,a,i,s,o,c){for(var h,d=0;d<t.length;d++){if(t[d]==="staccato"||t[d]==="tenuto"||t[d]==="accent"&&!c){var l="scripts."+t[d];if(t[d]==="accent"&&(l="scripts.sforzato"),h===void 0?h=s==="down"?r+2:o-2:h=s==="down"?h+2:h-2,t[d]==="accent")s==="up"?h--:h++;else switch(h){case 2:case 4:case 6:case 8:case 10:s==="up"?h--:h++;break}r>9&&h++;var f=n/2;st.getSymbolAlign(l)!=="center"&&(f-=st.getSymbolWidth(l)/2),a.addFixedX(new Yt(l,f,st.getSymbolWidth(l),h))}if(t[d]==="slide"&&a.heads[0]){var u=a.heads[0].pitch;u-=2;var p=new Yt("",-i-15,0,u-1),g=new Yt("",-i-5,0,u+1);a.addFixedX(p),a.addFixedX(g),e.addOther(new X2({anchor1:p,anchor2:g,fixedY:!0}))}}return h===void 0&&(h=r),{above:h,below:a.bottom}},V2=function(e,t,r,n){for(var a=0;a<t.length;a++)switch(t[a]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var i=new $2(r,t[a],n);e.addOther(i)}},j2=function(e,t,r,n,a){function i(){if(n.heads.length===0)return 10;for(var h=n.heads[0].pitch,d=1;d<n.heads.length;d++)h=Math.max(h,n.heads[d].pitch);return h}function s(){if(n.heads.length===0)return 2;for(var h=n.heads[0].pitch,d=1;d<n.heads.length;d++)h=Math.min(h,n.heads[d].pitch);return h}function o(h,d){var l=a==="down"?s()+1:i()+9;a!=="down"&&d===1&&l--;var f=r/2;f+=a==="down"?-5:3;for(var u=0;u<d;u++)l-=1,n.addFixedX(new Yt(h,f,st.getSymbolWidth(h),l))}for(var c=0;c<e.length;c++)switch(e[c]){case"/":o("flags.ugrace",1);break;case"//":o("flags.ugrace",2);break;case"///":o("flags.ugrace",3);break;case"////":o("flags.ugrace",4);break}},K2=function(e,t,r,n,a,i,s,o){function c(g,v){g==="above"?n.above+=v:n.below-=v}function h(g){var v;return g==="above"?(v=n.above,v<i&&(v=i)):(v=n.below,v>s&&(v=s)),v}function d(g,v,m){var w=h(v),k=2,b=5;r.addFixedX(new Yt(g,t/2,0,w+k,{type:"decoration",klass:"ornament",thickness:3,anchor:m})),c(v,b)}function l(g,v){var m=t/2;st.getSymbolAlign(g)!=="center"&&(m-=st.getSymbolWidth(g)/2);var w=st.symbolHeightInPitches(g)+1,k=h(v);k=v==="above"?k+w/2:k-w/2,r.addFixedX(new Yt(g,m,st.getSymbolWidth(g),k,{klass:"ornament",thickness:st.symbolHeightInPitches(g),position:v})),c(v,w)}for(var f={"+":"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"},u=!1,p=0;p<e.length;p++)switch(e[p]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":d(e[p],a,"middle"),u=!0;break;case"D.C.alcoda":d("D.C. al coda",a,"end"),u=!0;break;case"D.C.alfine":d("D.C. al fine",a,"end"),u=!0;break;case"D.S.alcoda":d("D.S. al coda",a,"end"),u=!0;break;case"D.S.alfine":d("D.S. al fine",a,"end"),u=!0;break;case"fine":d("FINE",a,"middle"),u=!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":l(f[e[p]],a),u=!0;break;case"invertedfermata":l(f[e[p]],"below"),u=!0;break;case"mark":r.klass="mark";break;case"accent":o&&(l("scripts.sforzato",a),u=!0);break}return u};function Q2(e,t,r){for(var n=0;n<e.length;n++)switch(e[n]){case"arpeggio":for(var a=t.abcelem.minpitch-1;a<=t.abcelem.maxpitch;a+=2)t.addExtra(new Yt("scripts.arpeggio",-st.getSymbolWidth("scripts.arpeggio")*2-r,0,a+2,{klass:"ornament",thickness:st.symbolHeightInPitches("scripts.arpeggio")}));break}}yr.prototype.endLine=function(e){this.startDiminuendoX&&(e.addOther(new mr(this.startDiminuendoX,ko(e.children),">",this.dynamicPositioning)),this.startDiminuendoX=void 0),this.startCrescendoX&&(e.addOther(new mr(this.startCrescendoX,ko(e.children),"<",this.dynamicPositioning)),this.startCrescendoX=void 0)};yr.prototype.dynamicDecoration=function(e,t,r,n){for(var a,i,s,o=0;o<t.length;o++)switch(t[o]){case"diminuendo(":this.startDiminuendoX=r,this.dynamicPositioning=n,a=void 0;break;case"diminuendo)":this.startDiminuendoX||(this.startDiminuendoX=xo(e.children)),a={start:this.startDiminuendoX,stop:r},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=r,this.dynamicPositioning=n,i=void 0;break;case"crescendo)":this.startCrescendoX||(this.startCrescendoX=xo(e.children)),i={start:this.startCrescendoX,stop:r},this.startCrescendoX=void 0;break;case"~(":case"glissando(":this.startGlissandoX=r,s=void 0;break;case"~)":case"glissando)":s={start:this.startGlissandoX,stop:r},this.startGlissandoX=void 0;break}a&&e.addOther(new mr(a.start,a.stop,">",n)),i&&e.addOther(new mr(i.start,i.stop,"<",n)),s&&e.addOther(new W2(s.start,s.stop))};function xo(e){for(var t=0;t<e.length;t++)if(e[t].abcelem.pitches)return e[t];return null}function ko(e){return e[e.length-1]}yr.prototype.createDecoration=function(e,t,r,n,a,i,s,o,c,h,d){c||(c={ornamentPosition:"above",volumePosition:h?"above":"below",dynamicPosition:h?"above":"below"}),V2(e,t,a,c.volumePosition),this.dynamicDecoration(e,t,a,c.dynamicPosition),j2(t,r,n,a,s);var l=U2(e,t,r,n,a,i,s,o,d);l.above=Math.max(l.above,this.minTop),l.below=Math.min(l.below,o);var f=K2(t,n,a,l,c.ornamentPosition,this.minTop,o,d);Q2(t,a,i)};Co.exports=yr});var _o=L((V4,So)=>{var Z2=function(t,r,n){this.type="EndingElem",this.text=t,this.anchor1=r,this.anchor2=n,this.endingHeightAbove=5,this.pitch=void 0};So.exports=Z2});var Ao=L((j4,Eo)=>{var J2=function(e){for(var t=0,r=0;r<e.voices.length;r++){var n=e.voices[r].staff;e.voices[r].duplicate||(t+=n.top,t+=-n.bottom)}return t};Eo.exports=J2});var Bo=L((K4,Mo)=>{var ep=Ao(),t0=function(e){this.getTextSize=e,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};t0.prototype.setLimit=function(e,t){t.specialY[e]&&(t.staff.specialY[e]?t.staff.specialY[e]=Math.max(t.staff.specialY[e],t.specialY[e]):t.staff.specialY[e]=t.specialY[e])};t0.prototype.addVoice=function(e,t,r){var n=this.voices.length;this.voices[n]=e,this.staffs[t]?this.staffs[t].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}},e.staff=this.staffs[t]};t0.prototype.setHeight=function(){this.height=ep(this)};t0.prototype.setWidth=function(e){this.w=e;for(var t=0;t<this.voices.length;t++)this.voices[t].setWidth(e)};t0.prototype.setStaffLimits=function(e){e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)};Mo.exports=t0});var Po=L((Q4,No)=>{var tp=Rt(),rp=nt(),Ra=function(t,r,n){this.type="TempoElement",this.tempo=t,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,t,r))};Ra.prototype.setX=function(e){this.x=e};Ra.prototype.createNote=function(e,t,r){var n=.75,a=t.duration[0],i=new tp(t,a,1,"tempo",r),s,o,c;a<=1/32?(c="noteheads.quarter",o="flags.u32nd",s=0):a<=1/16?(c="noteheads.quarter",o="flags.u16th",s=0):a<=3/32?(c="noteheads.quarter",o="flags.u16nd",s=1):a<=1/8?(c="noteheads.quarter",o="flags.u8th",s=0):a<=3/16?(c="noteheads.quarter",o="flags.u8th",s=1):a<=1/4?(c="noteheads.quarter",s=0):a<=3/8?(c="noteheads.quarter",s=1):a<=1/2?(c="noteheads.half",s=0):a<=3/4?(c="noteheads.half",s=1):a<=1?(c="noteheads.whole",s=0):a<=1.5?(c="noteheads.whole",s=1):a<=2?(c="noteheads.dbl",s=0):(c="noteheads.dbl",s=1);var h=e(i,c,{verticalPos:0},{dir:"up",flag:o,dot:s,scale:n}),d=h.notehead;i.addHead(d);var l;if(c!=="noteheads.whole"&&c!=="noteheads.dbl"){var f=.3333333333333333*n,u=5*n,p=d.dx+d.w,g=-.6;l=new rp(null,p,0,f,{type:"stem",pitch2:u,linewidth:g}),i.addRight(l)}return i};No.exports=Ra});var qo=L((Z4,Lo)=>{var wr=function(t,r,n){this.type="TripletElem",this.anchor1=r,this.number=t,this.durationClass=("d"+Math.round(r.parent.durationClass*1e3)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=n.flatBeams};wr.prototype.isClosed=function(){return!!this.anchor2};wr.prototype.middleNote=function(e){this.middleElems.push(e)};wr.prototype.setCloseAnchor=function(e){this.anchor2=e,(!this.anchor1.parent.beam||this.anchor1.stemDir==="up")&&(this.endingHeightAbove=4)};Lo.exports=wr});var zo=L((J4,Do)=>{function Io(e){switch(e){case"B#":return"H#";case"B\u266F":return"H\u266F";case"B":return"H";case"Bb":return"B";case"B\u266D":return"B"}return e}function ap(e,t,r){var n=e.split(`
|
|
86
|
+
`);for(let a=0;a<n.length;a++){let s=n[a].match(/^([ABCDEFG][♯♭]?)?([^\/]+)?(\/([ABCDEFG][#b♯♭]?))?/);if(!s)continue;let o=s[1]||"",c=s[2]||"",h=s[4]||"";r&&(o=Io(o),h=Io(h));let d=t?"":"",l=h?"/"+h:"";n[a]=[o,c,l].join(d)}return n.join(`
|
|
87
|
+
`)}Do.exports=ap});var Ho=L((eb,Fo)=>{var r0=nt(),Ga=Me(),np=zo(),ip=function(e,t,r,n,a,i,s,o){for(var c=0;c<r.chord.length;c++){var h=r.chord[c].position,d=r.chord[c].rel_position,l=h==="left"||h==="right"||h==="below"||h==="above"||!!d,f,u;l?(f="annotationfont",u="abcjs-annotation"):(f="gchordfont",u="abcjs-chord");var p=e.attr(f,u),g=r.chord[c].name,v;if(typeof g=="string")v=Oo(g,h,d,l,f,u,p,e,t,r,n,a,i,s,o),n=v.roomTaken,a=v.roomTakenRight;else for(var m=0;m<g.length;m++)v=Oo(g[m].text,h,d,l,f,u,p,e,t,r,n,a,i,s,o),n=v.roomTaken,a=v.roomTakenRight}return{roomTaken:n,roomTakenRight:a}};function Oo(e,t,r,n,a,i,s,o,c,h,d,l,f,u,p){for(var g=e.split(`
|
|
88
|
+
`),v=g.length-1;v>=0;v--){var m=g[v],w=0,k;n||(m=np(m,u,p));var b=o.calc(m,a,i),y=b.width,C=b.height/Ga.STEP;switch(t){case"left":d+=y+7,w=-d,k=h.averagepitch,c.addExtra(new r0(m,w,y+4,k,{type:"text",height:C,dim:s,position:"left"}));break;case"right":l+=4,w=l,k=h.averagepitch,c.addRight(new r0(m,w,y+4,k,{type:"text",height:C,dim:s,position:"right"}));break;case"below":c.addRight(new r0(m,0,0,void 0,{type:"text",position:"below",height:C,dim:s,realWidth:y}));break;case"above":c.addRight(new r0(m,0,0,void 0,{type:"text",position:"above",height:C,dim:s,realWidth:y}));break;default:if(r){var A=r.y+3*Ga.STEP;c.addRight(new r0(m,w+r.x,0,h.minpitch+A/Ga.STEP,{position:"relative",type:"text",height:C,dim:s}))}else{var P="above";h.positioning&&h.positioning.chordPosition&&(P=h.positioning.chordPosition),P!=="hidden"&&c.addCentered(new r0(m,f/2,y,void 0,{type:"chord",position:P,height:C,dim:s,realWidth:y}))}}}return{roomTaken:d,roomTakenRight:l}}Fo.exports=ip});var Zo=L((tb,Qo)=>{var a0=Rt(),Yo=eo(),Ro=ro(),$o=so(),Wo=co(),L0=ho(),Xo=uo(),sp=To(),Uo=_o(),P0=xt(),ye=nt(),q0=Me(),op=Bo(),Vo=Po(),n0=Ha(),cp=qo(),lp=_a(),jo=Ho(),hp=ya(),Bt=tt(),Ya=function(e){var t=0;return e.duration&&(t=e.duration),t},ct=!1,ot={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"}},we=function(e,t,r){this.decoration=new sp,this.getTextSize=e,this.tuneNumber=t,this.isBagpipes=r.bagpipes,this.flatBeams=r.flatbeams,this.graceSlurs=r.graceSlurs,this.percmap=r.percmap,this.initialClef=r.initialClef,this.jazzchords=!!r.jazzchords,this.accentAbove=!!r.accentAbove,this.germanAlphabet=!!r.germanAlphabet,this.reset()};we.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};we.prototype.setStemHeight=function(e){this.stemHeight=Math.round(e*10/q0.STEP)/10};we.prototype.getCurrentVoiceId=function(e,t){return"s"+e+"v"+t};we.prototype.pushCrossLineElems=function(e,t){this.slursbyvoice[this.getCurrentVoiceId(e,t)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(e,t)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(e,t)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(e,t)]=this.voiceScale,this.voiceColor&&(this.colorByVoice[this.getCurrentVoiceId(e,t)]=this.voiceColor)};we.prototype.popCrossLineElems=function(e,t){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(e,t)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(e,t)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(e,t)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(e,t)],this.voiceScale===void 0&&(this.voiceScale=1),this.voiceColor=this.colorByVoice[this.getCurrentVoiceId(e,t)]};we.prototype.containsLyrics=function(e){for(var t=0;t<e.length;t++)for(var r=0;r<e[t].voices.length;r++)for(var n=0;n<e[t].voices[r].length;n++){var a=e[t].voices[r][n];if(a.lyric){(!a.positioning||a.positioning.vocalPosition==="below")&&(this.hasVocals=!0);return}}};we.prototype.createABCLine=function(e,t,r){this.minY=2,this.containsLyrics(e);var n=new op(this.getTextSize);this.tempoSet=!1;for(var a=0;a<e.length;a++)ct&&this.restoreState(),ct=!1,this.createABCStaff(n,e[a],t,a,r);return n};we.prototype.createABCStaff=function(e,t,r,n,a){e.getTextSize.updateFonts(t);for(var i=0;i<t.voices.length;i++){var s=new lp(i,t.voices.length);i===0?(s.barfrom=t.connectBarLines==="start"||t.connectBarLines==="continue",s.barto=t.connectBarLines==="continue"||t.connectBarLines==="end"):s.duplicate=!0,t.title&&t.title[i]&&(s.header=t.title[i].replace(/\\n/g,`
|
|
89
|
+
`),s.headerPosition=6+e.getTextSize.baselineToCenter(s.header,"voicefont","staff-extra voice-name",i,t.voices.length)/q0.STEP),t.clef&&t.clef.type==="perc"&&(s.isPercussion=!0);var o=(!this.initialClef||a===0)&&$o(t.clef,this.tuneNumber);o&&(i===0&&t.barNumber&&this.addMeasureNumber(t.barNumber,o),s.addChild(o),this.startlimitelem=o);var c=Wo(t.key,this.tuneNumber);if(c&&(s.addChild(c),this.startlimitelem=c),t.meter){t.meter.type==="specified"?this.measureLength=t.meter.value[0].num/t.meter.value[0].den:this.measureLength=1;var h=Xo(t.meter,this.tuneNumber);s.addChild(h),this.startlimitelem=h}s.duplicate&&(s.children=[]);var d=t.clef.stafflines||t.clef.stafflines===0?t.clef.stafflines:5;e.addVoice(s,n,d);var l=d===1;this.createABCVoice(t.voices[i],r,n,i,l,s),e.setStaffLimits(s),i===0&&(t.brace==="start"||!e.brace&&t.brace?(e.brace||(e.brace=[]),e.brace.push(new Ro(s,"brace"))):t.brace==="end"&&e.brace?e.brace[e.brace.length-1].setBottomStaff(s):t.brace==="continue"&&e.brace&&e.brace[e.brace.length-1].continuing(s),t.bracket==="start"||!e.bracket&&t.bracket?(e.bracket||(e.bracket=[]),e.bracket.push(new Ro(s,"bracket"))):t.bracket==="end"&&e.bracket?e.bracket[e.bracket.length-1].setBottomStaff(s):t.bracket==="continue"&&e.bracket&&e.bracket[e.bracket.length-1].continuing(s))}};function fp(e,t){var r=e[t];if(r.el_type!=="note"||!r.startBeam||r.endBeam)return{count:1,elem:r};for(var n=[];t<e.length&&e[t].el_type==="note"&&(n.push(e[t]),!e[t].endBeam);)t++;return{count:n.length,elem:n}}we.prototype.createABCVoice=function(e,t,r,n,a,i){this.popCrossLineElems(r,n),this.stemdir=this.isBagpipes?"down":null,this.abcline=e,this.partstartelem&&(this.partstartelem=new Uo("",null,null),i.addOther(this.partstartelem));var s=i.voicetotal<2?-1:i.voicenumber;for(var o in this.slurs)this.slurs.hasOwnProperty(o)&&(this.slurs[o]=new n0({force:this.slurs[o].force,voiceNumber:s,stemDir:this.slurs[o].stemDir,style:this.slurs[o].dotted}),ct&&this.slurs[o].setHint(),i.addOther(this.slurs[o]));for(var c=0;c<this.ties.length;c++)this.ties[c]=new n0({force:this.ties[c].force,stemDir:this.ties[c].stemDir,voiceNumber:s,style:this.ties[c].dotted}),ct&&this.ties[c].setHint(),i.addOther(this.ties[c]);for(var h=0;h<this.abcline.length;h++)up(this.abcline[h]),this.minY=Math.min(this.abcline[h].minpitch,this.minY);for(var d=r===0,l=0;l<this.abcline.length;){var f=fp(this.abcline,l),u=this.createABCElement(d,a,i,f.elem);if(u)for(c=0;c<u.length;c++){if(!this.tempoSet&&t&&!t.suppress){this.tempoSet=!0;var p=new a0(t,0,0,"tempo",this.tuneNumber,{});p.addFixedX(new Vo(t,this.tuneNumber,L0)),i.addChild(p)}i.addChild(u[c])}l+=f.count}this.decoration.endLine(i),this.pushCrossLineElems(r,n)};we.prototype.saveState=function(){this.tiesSave=Bt.cloneArray(this.ties),this.slursSave=Bt.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=Bt.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=Bt.cloneHashOfArrayOfHash(this.tiesbyvoice)};we.prototype.restoreState=function(){this.ties=Bt.cloneArray(this.tiesSave),this.slurs=Bt.cloneHashOfHash(this.slursSave),this.slursbyvoice=Bt.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=Bt.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)};we.prototype.createABCElement=function(e,t,r,n){var a=[];switch(n.el_type){case void 0:a=this.createBeam(t,r,n);break;case"note":a[0]=this.createNote(n,!1,t,r),this.triplet&&this.triplet.isClosed()&&(r.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":a[0]=this.createBarLine(r,n,e),r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"meter":a[0]=Xo(n,this.tuneNumber),this.startlimitelem=a[0],r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"clef":if(a[0]=$o(n,this.tuneNumber),!a[0])return null;r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"key":var i=Wo(n,this.tuneNumber);i&&(a[0]=i,this.startlimitelem=a[0]),r.duplicate&&a.length>0&&(a[0].invisible=!0);break;case"stem":this.stemdir=n.direction==="auto"?void 0:n.direction;break;case"part":var s=new a0(n,0,0,"part",this.tuneNumber),o=this.getTextSize.calc(n.title,"partsfont","part");s.addFixedX(new ye(n.title,0,0,void 0,{type:"part",height:o.height/q0.STEP})),a[0]=s;break;case"tempo":var c=new a0(n,0,0,"tempo",this.tuneNumber);n.suppress||c.addFixedX(new Vo(n,this.tuneNumber,L0)),a[0]=c;break;case"style":n.head==="normal"?delete this.style:this.style=n.head;break;case"hint":ct=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=n.size;break;case"color":this.voiceColor=n.color,r.color=this.voiceColor;break;default:var h=new a0(n,0,0,"unsupported",this.tuneNumber);h.addFixed(new ye("element type "+n.el_type,0,0,void 0,{type:"debug"})),a[0]=h}return a};function up(e){if(e.pitches){dp(e);for(var t=0,r=0;r<e.pitches.length;r++)t+=e.pitches[r].verticalPos;e.averagepitch=t/e.pitches.length,e.minpitch=e.pitches[0].verticalPos,e.maxpitch=e.pitches[e.pitches.length-1].verticalPos}}we.prototype.createBeam=function(e,t,r){var n=[],a=new Yo(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);ct&&a.setHint();for(var i=0;i<r.length;i++)a.runningDirection(r[i]);a.setStemDirection();var s=this.stemdir;for(this.stemdir=a.stemsUp?"up":"down",i=0;i<r.length;i++){var o=r[i],c=this.createNote(o,!0,e,t);n.push(c),a.add(c),this.triplet&&this.triplet.isClosed()&&(t.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return a.calcDir(),t.addBeam(a),this.stemdir=s,n};var dp=function(e){var t;do{t=!0;for(var r=0;r<e.pitches.length-1;r++)if(e.pitches[r].pitch>e.pitches[r+1].pitch){t=!1;var n=e.pitches[r];e.pitches[r]=e.pitches[r+1],e.pitches[r+1]=n}}while(!t)},Ko=function(e,t,r,n,a,i,s,o,c){for(var h=r;h>11;h--)h%2===0&&!n&&e.addFixed(new ye(null,o,(a+4)*c,h,{type:"ledger"}));for(h=t;h<1;h++)h%2===0&&!n&&e.addFixed(new ye(null,o,(a+4)*c,h,{type:"ledger"}));for(h=0;h<i.length;h++){var d=a;s==="down"&&(d=-d),e.addFixed(new ye(null,d+o,(a+4)*c,i[h],{type:"ledger"}))}};we.prototype.addGraceNotes=function(e,t,r,n,a,i,s){var o=.6,c=3.5/5;a=Math.round(a*c);var h=null,d;e.gracenotes.length>1&&(h=new Yo(a,"grace",i),ct&&h.setHint(),h.mainNote=r);var l,f=[];for(l=e.gracenotes.length-1;l>=0;l--)s+=10,f[l]=s,e.gracenotes[l].accidental&&(s+=7);for(l=0;l<e.gracenotes.length;l++){var u=e.gracenotes[l].verticalPos;d=h?null:ot.uflags[i?5:3];var p=[],g=L0(r,"noteheads.quarter",e.gracenotes[l],{dir:"up",headx:-f[l],extrax:-f[l],flag:d,scale:o*this.voiceScale,accidentalSlot:p});g.notehead.highestVert=g.notehead.pitch+a;var v=g.notehead;if(this.addSlursAndTies(r,e.gracenotes[l],v,t,"up",!0),r.addExtra(v),e.gracenotes[l].acciaccatura){var m=e.gracenotes[l].verticalPos+7*o,w=h?5:6;r.addRight(new ye("flags.ugrace",-f[l]+w,0,m,{scalex:o,scaley:o}))}if(h){var k=e.gracenotes[l].duration/2;i&&(k/=2);var b={heads:[v],abcelem:{averagepitch:u,minpitch:u,maxpitch:u,duration:k}};h.add(b)}else{var y=u+.3333333333333333*o,C=u+7*o,A=v.dx+v.w,P=-.6;r.addExtra(new ye(null,A,0,y,{type:"stem",pitch2:C,linewidth:P}))}Ko(r,u,u,!1,P0.getSymbolWidth("noteheads.quarter"),[],!0,v.dx-1,.6);var _=e.rest&&(e.rest.type==="spacer"||e.rest.type==="invisible");l===0&&!i&&this.graceSlurs&&!_&&t.addOther(new n0({anchor1:v,anchor2:n,isGrace:!0}))}return h&&(h.calcDir(),t.addBeam(h)),s};function pp(e,t,r,n,a,i,s,o,c){var h,d=7,l,f,u;switch(a&&(i==="down"&&(d=3),i==="up"&&(d=11)),s&&(r<.5||r<1?d=7:d=5),t.rest.type){case"whole":h=ot.rest[0],t.averagepitch=d,t.minpitch=d,t.maxpitch=d,n=0;break;case"rest":t.style==="rhythm"?h=ot.rhythm[-o]:h=ot.rest[-o],t.averagepitch=d,t.minpitch=d,t.maxpitch=d;break;case"invisible":case"invisible-multimeasure":case"spacer":h="",t.averagepitch=d,t.minpitch=d,t.maxpitch=d;break;case"multimeasure":h=ot.rest.multi,t.averagepitch=d,t.minpitch=d,t.maxpitch=d,n=0;var p=P0.getSymbolWidth(h);e.addHead(new ye(h,p,p*2,7));var g=new ye(""+t.rest.text,p,p,16,{type:"multimeasure-text"});e.addExtra(g)}if(t.rest.type.indexOf("multimeasure")<0&&t.rest.type!=="invisible"){var v=L0(e,h,{verticalPos:d},{dot:n,scale:c});l=v.notehead,l&&(e.addHead(l),f=v.accidentalshiftx,u=v.dotshiftx)}return{noteHead:l,roomTaken:f,roomTakenRight:u}}function Go(e,t){for(var r=0;r<e.length;r++)if(JSON.stringify(e[r])===JSON.stringify(t))return;e.push(t)}we.prototype.addNoteToAbcElement=function(e,t,r,n,a,i,s,o,c){var h=0,d,l=0,f=0,u,p,g=[],v=[],m=0,w=t.averagepitch>=6?"down":"up";n&&(w=n),a=t.style?t.style:a,(!a||a==="normal")&&(a="note");var k;i?k=ot[a].nostem:k=ot[a][-s],k||console.log("noteSymbol:",a,s,i);var b;for(b=w==="down"?t.pitches.length-2:1;w==="down"?b>=0:b<t.pitches.length;b=w==="down"?b-1:b+1){var y=t.pitches[w==="down"?b+1:b-1],C=t.pitches[b],A=w==="down"?y.pitch-C.pitch:C.pitch-y.pitch;A<=1&&!y.printer_shift&&(C.printer_shift=A?"different":"same",(C.verticalPos>11||C.verticalPos<1)&&g.push(C.verticalPos-C.verticalPos%2),w==="down"?l=P0.getSymbolWidth(k)+2:h=P0.getSymbolWidth(k)+2)}var P=t.pitches.length;for(b=0;b<t.pitches.length;b++){if(!o){var _;w==="down"&&b!==0||w==="up"&&b!==P-1?_=null:_=ot[w==="down"?"dflags":"uflags"][-s]}var B;if(t.pitches[b].style)B=ot[t.pitches[b].style][-s];else if(c.isPercussion&&this.percmap){B=k;var O=this.percmap[hp(t.pitches[b])];O&&O.noteHead&&ot[O.noteHead]&&(B=ot[O.noteHead][-s])}else B=k;t.pitches[b].highestVert=t.pitches[b].verticalPos;var q=(n==="up"||w==="up")&&b===0,I=(n==="down"||w==="down")&&b===P-1;if(q||I){if((t.startSlur||P===1)&&(t.pitches[b].highestVert=t.pitches[P-1].verticalPos,Ya(t)<1&&(n==="up"||w==="up")&&(t.pitches[b].highestVert+=6)),t.startSlur)for(t.pitches[b].startSlur||(t.pitches[b].startSlur=[]),p=0;p<t.startSlur.length;p++)Go(t.pitches[b].startSlur,t.startSlur[p]);if(t.endSlur)for(t.pitches[b].highestVert=t.pitches[P-1].verticalPos,Ya(t)<1&&(n==="up"||w==="up")&&(t.pitches[b].highestVert+=6),t.pitches[b].endSlur||(t.pitches[b].endSlur=[]),p=0;p<t.endSlur.length;p++)Go(t.pitches[b].endSlur,t.endSlur[p])}var G=!o&&s<=-1,Y=L0(e,B,t.pitches[b],{dir:w,extrax:-l,flag:_,dot:r,dotshiftx:h,scale:this.voiceScale,accidentalSlot:v,shouldExtendStem:!n,printAccidentals:!c.isPercussion});m=Math.max(P0.getSymbolWidth(B),m),e.extraw-=Y.extraLeft,d=Y.notehead,d&&(this.addSlursAndTies(e,t.pitches[b],d,c,G?w:null,!1),t.gracenotes&&t.gracenotes.length>0&&(d.bottom=d.bottom-1),e.addHead(d)),l+=Y.accidentalshiftx,f=Math.max(f,Y.dotshiftx)}if(G){var Z=Math.round(70*this.voiceScale)/10,x=w==="down"?t.minpitch-Z:t.minpitch+1/3;x>6&&!n&&(x=6);var T=w==="down"?t.maxpitch-1/3:t.maxpitch+Z;T<6&&!n&&(T=6);var N=w==="down"||e.heads.length===0?0:e.heads[0].w,E=w==="down"?1:-1;d&&d.c==="noteheads.slash.quarter"&&(w==="down"?T-=1:x+=1),d&&d.c==="noteheads.triangle.quarter"&&(w==="down"?T-=.7:x-=1.2),e.addRight(new ye(null,N,0,x,{type:"stem",pitch2:T,linewidth:E,bottom:x-1})),u=Math.min(x,T)}return{noteHead:d,roomTaken:l,roomTakenRight:f,min:u,additionalLedgers:g,dir:w,symbolWidth:m}};we.prototype.addLyric=function(e,t){var r="";t.lyric.forEach(function(i){var s=i.divider===" "?"":i.divider;r+=i.syllable+s+`
|
|
90
|
+
`});var n=this.getTextSize.calc(r,"vocalfont","lyric"),a=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new ye(r,0,n.width,void 0,{type:"lyric",position:a,height:n.height/q0.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))};we.prototype.createNote=function(e,t,r,n){var a=null,i=0,s=0,o=0,c=[],h,d=Ya(e),l=!1;d===0&&(l=!0,d=.25,t=!0);for(var f=Math.floor(Math.log(d)/Math.log(2)),u=0,p=Math.pow(2,f),g=p/2;p<d;u++,p+=g,g/=2);e.startTriplet&&(this.tripletmultiplier=e.tripletMultiplier);var v=d*this.tripletmultiplier;e.rest&&e.rest.type==="multimeasure"&&(v=1),e.rest&&e.rest.type==="invisible-multimeasure"&&(v=this.measureLength*e.rest.text);var m=e.rest?"rest":"note",w=new a0(e,v,1,m,this.tuneNumber,{durationClassOveride:e.duration*this.tripletmultiplier});if(ct&&w.setHint(),e.rest){this.measureLength===d&&e.rest.type!=="invisible"&&e.rest.type!=="spacer"&&e.rest.type.indexOf("multimeasure")<0&&(e.rest.type="whole");var k=pp(w,e,d,u,n.voicetotal>1,this.stemdir,r,f,this.voiceScale);a=k.noteHead,i=k.roomTaken,s=k.roomTakenRight}else{var b=this.addNoteToAbcElement(w,e,u,this.stemdir,this.style,l,f,t,n);b.min!==void 0&&(this.minY=Math.min(b.min,this.minY)),a=b.noteHead,i=b.roomTaken,s=b.roomTakenRight,c=b.additionalLedgers,h=b.dir,o=b.symbolWidth}if(e.lyric!==void 0&&this.addLyric(w,e),e.gracenotes!==void 0&&(i+=this.addGraceNotes(e,n,w,a,this.stemHeight*this.voiceScale,this.isBagpipes,i)),e.decoration){var y=t&&h!=="up"?Math.min(-3,w.bottom-6):w.bottom;this.decoration.createDecoration(n,e.decoration,w.top,a?a.w:0,w,i,h,y,e.positioning,this.hasVocals,this.accentAbove)}if(e.barNumber&&w.addFixed(new ye(e.barNumber,-10,0,0,{type:"barNumber"})),Ko(w,e.minpitch,e.maxpitch,e.rest,o,c,h,-2,1),e.chord!==void 0){var C=jo(this.getTextSize,w,e,i,s,o,this.jazzchords,this.germanAlphabet);i=C.roomTaken,s=C.roomTakenRight}return e.startTriplet&&(this.triplet=new cp(e.startTriplet,a,{flatBeams:this.flatBeams})),e.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(a),this.triplet&&!e.startTriplet&&!e.endTriplet&&!(e.rest&&e.rest.type==="spacer")&&this.triplet.middleNote(a),w};we.prototype.addSlursAndTies=function(e,t,r,n,a,i){if(t.endTie&&this.ties.length>0){for(var s=!1,o=0;o<this.ties.length;o++)if(this.ties[o].anchor1&&this.ties[o].anchor1.pitch===r.pitch){this.ties[o].setEndAnchor(r),n.setRange(this.ties[o]),this.ties.splice(o,1),s=!0;break}s||(this.ties[0].setEndAnchor(r),n.setRange(this.ties[0]),this.ties.splice(0,1))}var c=n.voicetotal<2?-1:n.voicenumber;if(t.startTie){var h=new n0({anchor1:r,force:this.stemdir==="down"||this.stemdir==="up",stemDir:this.stemdir,isGrace:i,voiceNumber:c,style:t.startTie.style});ct&&h.setHint(),this.ties[this.ties.length]=h,n.addOther(h),e.startTie=!0}var d,l;if(t.endSlur)for(var f=0;f<t.endSlur.length;f++)l=t.endSlur[f],this.slurs[l]?(d=this.slurs[l],d.setEndAnchor(r),n.setRange(d),delete this.slurs[l]):(d=new n0({anchor2:r,stemDir:this.stemdir,voiceNumber:c}),ct&&d.setHint(),n.addOther(d)),this.startlimitelem&&d.setStartX(this.startlimitelem);else if(!i)for(var u in this.slurs)this.slurs.hasOwnProperty(u)&&this.slurs[u].addInternalNote(r);if(t.startSlur)for(f=0;f<t.startSlur.length;f++)l=t.startSlur[f].label,d=new n0({anchor1:r,stemDir:this.stemdir,voiceNumber:c,style:t.startSlur[f].style}),ct&&d.setHint(),this.slurs[l]=d,n.addOther(d)};we.prototype.addMeasureNumber=function(e,t){var r=this.getTextSize.calc(e,"measurefont","bar-number"),n=0;t.isClef&&(n+=r.width/2);var a=r.width>10&&t.abcelem.type==="treble"?13.5:11;t.addFixed(new ye(e,n,r.width,a+r.height/q0.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))};we.prototype.createBarLine=function(e,t,r){var n=new a0(t,0,10,"bar",this.tuneNumber),a=null,i=0;t.barNumber&&this.addMeasureNumber(t.barNumber,n);var s=t.type==="bar_right_repeat"||t.type==="bar_dbl_repeat",o=t.type!=="bar_left_repeat"&&t.type!=="bar_thick_thin"&&t.type!=="bar_invisible",c=t.type==="bar_right_repeat"||t.type==="bar_dbl_repeat"||t.type==="bar_left_repeat"||t.type==="bar_thin_thick"||t.type==="bar_thick_thin",h=t.type==="bar_left_repeat"||t.type==="bar_thick_thin"||t.type==="bar_thin_thin"||t.type==="bar_dbl_repeat",d=t.type==="bar_left_repeat"||t.type==="bar_dbl_repeat";if(s||d){for(var l in this.slurs)this.slurs.hasOwnProperty(l)&&this.slurs[l].setEndX(n);this.startlimitelem=n}if(s&&(n.addRight(new ye("dots.dot",i,1,7)),n.addRight(new ye("dots.dot",i,1,5)),i+=6),o&&(a=new ye(null,i,1,2,{type:"bar",pitch2:10,linewidth:.6}),n.addRight(a)),t.type==="bar_invisible"&&(a=new ye(null,i,1,2,{type:"none",pitch2:10,linewidth:.6}),n.addRight(a)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,c?3:1,n,0,"down",2,t.positioning,this.hasVocals,this.accentAbove),c&&(i+=4,a=new ye(null,i,4,2,{type:"bar",pitch2:10,linewidth:4}),n.addRight(a),i+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=a,this.partstartelem=null),h&&(i+=3,a=new ye(null,i,1,2,{type:"bar",pitch2:10,linewidth:.6}),n.addRight(a)),d&&(i+=3,n.addRight(new ye("dots.dot",i,1,7)),n.addRight(new ye("dots.dot",i,1,5))),t.startEnding&&r&&e.voicenumber===0){var f=this.getTextSize.calc(t.startEnding,"repeatfont","").width;n.minspacing+=f+10,this.partstartelem=new Uo(t.startEnding,a,null),e.addOther(this.partstartelem)}if(n.extraw-=5,t.chord!==void 0)var u=jo(this.getTextSize,n,t,0,0,0,!1,this.germanAlphabet);return n};Qo.exports=we});var rc=L((rb,tc)=>{var Ne="http://www.w3.org/2000/svg";function de(e){this.svg=Wa(),this.currentGroup=[],e.appendChild(this.svg)}de.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=Wa(),this.currentGroup=[],e&&(e.innerHTML="",e.appendChild(this.svg))}};de.prototype.setTitle=function(e){var t=document.createElement("title"),r=document.createTextNode(e);t.appendChild(r),this.svg.insertBefore(t,this.svg.firstChild)};de.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),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 r=this.svg.parentNode.getAttribute("class");r?r.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",r+" 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 n=t/e*100;this.svg.parentNode.style["padding-bottom"]=n+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}};de.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)};de.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)};de.prototype.setScale=function(e){e!==1?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",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"]="")};de.prototype.insertStyles=function(e){var t=document.createElementNS(Ne,"style");t.textContent=e,this.svg.insertBefore(t,this.svg.firstChild)};de.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);if(this.dummySvg){var r=document.querySelector("body");r.removeChild(this.dummySvg),this.dummySvg=null}};function Jo(e,t,r){var n=r-e;return"M "+e+" "+t+" l "+n+" 0 l 0 1 l "+-n+" 0 z "}function ec(e,t,r){var n=r-t;return"M "+e+" "+t+" l 0 "+n+" l 1 0 l 0 "+-n+" z "}de.prototype.rect=function(e){var t=[],r=e.x,n=e.y,a=e.x+e.width,i=e.y+e.height;return t.push(Jo(r,n,a)),t.push(Jo(r,i,a)),t.push(ec(a,n,i)),t.push(ec(r,i,n)),this.path({path:t.join(" "),stroke:"none","data-name":e["data-name"]})};de.prototype.dottedLine=function(e){var t=document.createElementNS(Ne,"line");t.setAttribute("x1",e.x1),t.setAttribute("x2",e.x2),t.setAttribute("y1",e.y1),t.setAttribute("y2",e.y2),t.setAttribute("stroke",e.stroke),t.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(t,this.svg.firstChild)};de.prototype.rectBeneath=function(e){var t=document.createElementNS(Ne,"rect");t.setAttribute("x",e.x),t.setAttribute("width",e.width),t.setAttribute("y",e.y),t.setAttribute("height",e.height),e.stroke&&t.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&t.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&t.setAttribute("fill",e.fill),e["fill-opacity"]&&t.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(t,this.svg.firstChild)};de.prototype.text=function(e,t,r,n){var a=document.createElementNS(Ne,"text");a.setAttribute("stroke","none");for(var i in t)t.hasOwnProperty(i)&&a.setAttribute(i,t[i]);for(var s=t["data-name"]=="free-text",o=(""+e).split(`
|
|
91
|
+
`),c=0;c<o.length;c++)if(!(s&&o[c]=="")){var h=document.createElementNS(Ne,"tspan");if(n)for(var d in n)n.hasOwnProperty(d)&&h.setAttribute(d,n[d]);if(h.setAttribute("x",t.x?t.x:0),c!==0&&h.setAttribute("dy","1.2em"),o[c].indexOf("")!==-1){var l=o[c].split("");if(h.textContent=l[0],l[1]){var f=document.createElementNS(Ne,"tspan");f.setAttribute("dy","-0.3em"),f.setAttribute("style","font-size:0.7em"),f.textContent=l[1],h.appendChild(f)}if(l[2]){var u=l[1]?"0.4em":"0.1em",p=document.createElementNS(Ne,"tspan");p.setAttribute("dy",u),p.setAttribute("style","font-size:0.7em"),p.textContent=l[2],h.appendChild(p)}}else s&&o[c].trim()==""?h.innerHTML=" ":h.textContent=o[c];a.appendChild(h)}return r?r.appendChild(a):this.append(a),a};de.prototype.richTextLine=function(e,t,r,n,a,i){var s=document.createElementNS(Ne,"text");s.setAttribute("stroke","none"),s.setAttribute("class",n),s.setAttribute("x",t),s.setAttribute("y",r),s.setAttribute("text-anchor",a),s.setAttribute("dominant-baseline","middle");for(var o=0;o<e.length;o++){for(var c=e[o],h=document.createElementNS(Ne,"tspan"),d=Object.keys(c.attrs),l=0;l<d.length;l++){var f=c.attrs[d[l]];f!==""&&h.setAttribute(d[l],f)}h.textContent=c.content,s.appendChild(h)}return i?i.appendChild(s):this.append(s),s};de.prototype.guessWidth=function(e,t){var r=this.createDummySvg(),n=this.text(e,t,r),a;try{a=n.getBBox(),isNaN(a.height)||!a.height?a={width:t["font-size"]/2,height:t["font-size"]+2}:a={width:a.width,height:a.height}}catch{a={width:t["font-size"]/2,height:t["font-size"]+2}}return r.removeChild(n),a};de.prototype.createDummySvg=function(){if(!this.dummySvg){this.dummySvg=Wa();var e=["display: block !important;","height: 1px;","width: 1px;","position: absolute;"];this.dummySvg.setAttribute("style",e.join(""));var t=document.querySelector("body");t.appendChild(this.dummySvg)}return this.dummySvg};var $a={};de.prototype.getTextSize=function(e,t,r){if(typeof e=="number"&&(e=""+e),!e||e.match(/^\s+$/))return{width:0,height:0};var n;if(e.length<20&&(n=e+JSON.stringify(t),$a[n]))return $a[n];var a=!r;r||(r=this.text(e,t));var i;try{i=r.getBBox(),isNaN(i.height)||!i.height?i=this.guessWidth(e,t):i={width:i.width,height:i.height}}catch{i=this.guessWidth(e,t)}return a&&(this.currentGroup.length>0?this.currentGroup[0].removeChild(r):this.svg.removeChild(r)),n&&($a[n]=i),i};de.prototype.openGroup=function(e){e=e||{};var t=document.createElementNS(Ne,"g");return e.klass&&t.setAttribute("class",e.klass),e.fill&&t.setAttribute("fill",e.fill),e.stroke&&t.setAttribute("stroke",e.stroke),e["data-name"]&&t.setAttribute("data-name",e["data-name"]),e.prepend?this.prepend(t):this.append(t),this.currentGroup.unshift(t),t};de.prototype.closeGroup=function(){var e=this.currentGroup.shift();return e&&e.children.length===0?(e.parentElement.removeChild(e),null):e};de.prototype.path=function(e){var t=document.createElementNS(Ne,"path");for(var r in e)e.hasOwnProperty(r)&&(r==="path"?t.setAttributeNS(null,"d",e.path):r==="klass"?t.setAttributeNS(null,"class",e[r]):e[r]!==void 0&&t.setAttributeNS(null,r,e[r]));return this.append(t),t};de.prototype.pathToBack=function(e){var t=document.createElementNS(Ne,"path");for(var r in e)e.hasOwnProperty(r)&&(r==="path"?t.setAttributeNS(null,"d",e.path):r==="klass"?t.setAttributeNS(null,"class",e[r]):t.setAttributeNS(null,r,e[r]));return this.prepend(t),t};de.prototype.lineToBack=function(e){for(var t=document.createElementNS(Ne,"line"),r=Object.keys(e),n=0;n<r.length;n++)t.setAttribute(r[n],e[r[n]]);return this.prepend(t),t};de.prototype.append=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.appendChild(e)};de.prototype.prepend=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)};de.prototype.setAttributeOnElement=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setAttributeNS(null,r,t[r])};de.prototype.moveElementToChild=function(e,t){e.appendChild(t)};function Wa(){var e=document.createElementNS(Ne,"svg");return e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),e.setAttribute("role","img"),e.setAttribute("fill","currentColor"),e.setAttribute("stroke","currentColor"),e}tc.exports=de});var nc=L((ab,ac)=>{var Xa=Me(),gp=rc(),Fe=function(e){this.paper=new gp(e),this.controller=null,this.space=3*Xa.SPACE,this.padding={},this.reset(),this.firefox112=navigator.userAgent.indexOf("Firefox/112.0")>=0};Fe.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()};Fe.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint=e.media==="print",this.setPadding(e)};Fe.prototype.setLineThickness=function(e){this.lineThickness=e};Fe.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}};Fe.prototype.setPadding=function(e){function t(r,n,a,i,s){e.formatting[a]!==void 0?r.padding[n]=e.formatting[a]:r.paddingOverride[n]!==void 0?r.padding[n]=r.paddingOverride[n]:r.isPrint?r.padding[n]=i:r.padding[n]=s}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)};Fe.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e};Fe.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}};Fe.prototype.setVerticalSpace=function(e){e.staffsep!==void 0&&(this.spacing.staffSeparation=e.staffsep*4/3),e.composerspace!==void 0&&(this.spacing.composer=e.composerspace*4/3),e.partsspace!==void 0&&(this.spacing.parts=e.partsspace*4/3),e.textspace!==void 0&&(this.spacing.text=e.textspace*4/3),e.musicspace!==void 0&&(this.spacing.music=e.musicspace*4/3),e.titlespace!==void 0&&(this.spacing.title=e.titlespace*4/3),e.sysstaffsep!==void 0&&(this.spacing.systemStaffSeparation=e.sysstaffsep*4/3),e.stafftopmargin!==void 0&&(this.spacing.staffTopMargin=e.stafftopmargin*4/3),e.subtitlespace!==void 0&&(this.spacing.subtitle=e.subtitlespace*4/3),e.topspace!==void 0&&(this.spacing.top=e.topspace*4/3),e.vocalspace!==void 0&&(this.spacing.vocal=e.vocalspace*4/3),e.wordsspace!==void 0&&(this.spacing.words=e.wordsspace*4/3)};Fe.prototype.calcY=function(e){return this.y-e*Xa.STEP};Fe.prototype.yToPitch=function(e){return e/Xa.STEP};Fe.prototype.moveY=function(e,t){t===void 0&&(t=1),this.y+=e*t};Fe.prototype.absolutemoveY=function(e){this.y=e};ac.exports=Fe});var sc=L((nb,ic)=>{function vp(e,t,r,n,a,i){var s=e.text;this.rows=[];var o;t&&this.rows.push({move:t});var c=r.calc("textfont","defined-text");if(s==="")this.rows.push({move:c.attr["font-size"]*2});else if(typeof s=="string"){let v=function(m){return m.replace(/^[ \t]*\n/gm,`X
|
|
92
|
+
`)};var g=v;this.rows.push({move:c.attr["font-size"]/2}),this.rows.push({left:n,text:s,font:"textfont",klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"});var h=v(s);o=i.calc(h,"textfont","defined-text"),this.rows.push({move:o.height})}else if(s){for(var d=0,l=n,f="textfont",u=0;u<s.length;u++)s[u].font?f=s[u].font:f="textfont",this.rows.push({left:l,text:s[u].text,font:f,klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),o=i.calc(s[u].text,r.calc(f,"defined-text").font,"defined-text"),l+=o.width+o.height/2,d=Math.max(d,o.height);this.rows.push({move:d})}else if(e.length===1){var p=a/2;this.rows.push({left:p,text:e[0].text,font:"textfont",klass:"defined-text",anchor:"middle",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),o=i.calc(e[0].text,"textfont","defined-text"),this.rows.push({move:o.height})}}ic.exports=vp});var cc=L((ib,oc)=>{function bp(e,t,r){this.rows=[],e&&this.rows.push({move:e}),this.rows.push({separator:t,absElemType:"separator"}),r&&this.rows.push({move:r})}oc.exports=bp});var hc=L((sb,lc)=>{function mp(e,t,r,n,a,i){this.rows=[],e&&this.rows.push({move:e});var s=t.titleleft?"start":"middle",o=t.titleleft?a:n;this.rows.push({left:o,text:r.text,font:"subtitlefont",klass:"text subtitle",anchor:s,startChar:r.startChar,endChar:r.endChar,absElemType:"subtitle",name:"subtitle"});var c=i.calc(r.text,"subtitlefont","text subtitle");this.rows.push({move:c.height})}lc.exports=mp});var xr=L((ob,fc)=>{function yp(e,t,r){if(t.text){t.marginLeft||(t.marginLeft=0),t.klass||(t.klass=""),t.anchor||(t.anchor="start"),t.info||(t.info={startChar:-2,endChar:-2}),t.marginTop&&e.push({move:t.marginTop});var n={left:t.marginLeft,text:t.text,font:t.font,anchor:t.anchor,startChar:t.info.startChar,endChar:t.info.endChar,"dominant-baseline":t["dominant-baseline"]};t.absElemType&&(n.absElemType=t.absElemType),!t.inGroup&&t.klass&&(n.klass=t.klass),t.name&&(n.name=t.name),e.push(n);var a=r.calc("A",t.font,t.klass),i=t.text.split(`
|
|
93
|
+
`).length;if(t.text[t.text.length-1]===`
|
|
94
|
+
`&&i--,!t.noMove){var s=a.height*1.1*i;e.push({move:Math.round(s)}),t.marginBottom&&e.push({move:t.marginBottom})}}}fc.exports=yp});var Ua=L((cb,uc)=>{var wp=xr();function xp(e,t,r,n,a,i,s,o){var c=o.calc("i",r,n);if(t==="")e.push({move:c.height});else{if(typeof t=="string"){wp(e,{marginLeft:i,text:t,font:r,klass:n,marginTop:s.marginTop,anchor:s.anchor,absElemType:s.absElemType,info:s.info,name:a},o);return}s.marginTop&&e.push({move:s.marginTop});var h=0,d=0,l={left:i,anchor:s.anchor,phrases:[]};n&&(l.klass=n),e.push(l);for(var f=0;f<t.length;f++){var u=t[f],p=u.font?u.font:o.attr(r,n).font,g={content:u.text};p&&(g.attrs={"font-family":o.getFamily(p.face),"font-size":p.size,"font-weight":p.weight,"font-style":p.style,"font-decoration":p.decoration}),l.phrases.push(g);var v=o.calc(u.text,p,n);h=Math.max(h,v.height),u.text[u.text.length-1]===" "&&(d=c.width)}e.push({move:h})}}uc.exports=xp});var pc=L((lb,dc)=>{var kr=xr(),I0=Ua();function kp(e,t,r,n,a,i,s,o,c,h){if(this.rows=[],e.header&&i){var d=h.calc("X","headerfont","abcjs-header abcjs-meta-top").height;kr(this.rows,{marginLeft:s,text:e.header.left,font:"headerfont",klass:"header meta-top",marginTop:-d,info:t.header,name:"header"},h),kr(this.rows,{marginLeft:s+a/2,text:e.header.center,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"middle",info:t.header,name:"header"},h),kr(this.rows,{marginLeft:s+a,text:e.header.right,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"end",info:t.header,name:"header"},h)}i&&this.rows.push({move:o.top});var l=r.titleleft?"start":"middle",f=r.titleleft?s:s+a/2;if(e.title){var u=c?"abcjs-title":"";I0(this.rows,e.title,"titlefont",u,"title",f,{marginTop:o.title,anchor:l,absElemType:"title",info:t.title},h)}if(n.length)for(var p=0;p<n.length&&n[p].subtitle;){var u=c?"abcjs-text abcjs-subtitle":"";I0(this.rows,n[p].subtitle.text,"subtitlefont",u,"subtitle",f,{marginTop:o.subtitle,anchor:l,absElemType:"subtitle",info:n[p].subtitle},h),p++}if(e.rhythm||e.origin||e.composer){if(this.rows.push({move:o.composer}),e.rhythm&&e.rhythm.length>0){var g=!!(e.composer||e.origin),u=c?"abcjs-rhythm":"";kr(this.rows,{marginLeft:s,text:e.rhythm,font:"infofont",klass:u,absElemType:"rhythm",noMove:g,info:t.rhythm,name:"rhythm"},h)}var v=!0;e.composer&&typeof e.composer!="string"&&(v=!1),e.origin&&typeof e.origin!="string"&&(v=!1);var m=e.composer?e.composer:"";if(e.origin&&(typeof m=="string"&&typeof e.origin=="string"?m+=" ("+e.origin+")":typeof m=="string"&&typeof e.origin!="string"?(m=[{text:m}],m.push({text:" ("}),m=m.concat(e.origin),m.push({text:")"})):(m.push({text:" ("}),m=m.concat(e.origin),m.push({text:")"}))),m){var u=c?"abcjs-composer":"";I0(this.rows,m,"composerfont",u,"composer",s+a,{anchor:"end",absElemType:"composer",info:t.composer,ingroup:!0},h)}}if(e.author&&e.author.length>0){var u=c?"abcjs-author":"";I0(this.rows,e.author,"composerfont",u,"author",s+a,{anchor:"end",absElemType:"author",info:t.author},h)}if(e.partOrder&&e.partOrder.length>0){var u=c?"abcjs-part-order":"";I0(this.rows,e.partOrder,"partsfont",u,"part-order",s,{absElemType:"partOrder",info:t.partOrder,anchor:"start"},h)}}dc.exports=kp});var bc=L((hb,vc)=>{var D0=xr(),gc=Ua();function Cr(e,t,r,n,a,i,s){this.rows=[],e.unalignedWords&&e.unalignedWords.length>0&&this.unalignedWords(e.unalignedWords,n,a,i,s),this.extraText(e,n,a,i,s),e.footer&&r&&this.footer(e.footer,t,n,s)}Cr.prototype.unalignedWords=function(e,t,r,n,a){var i=n?"abcjs-unaligned-words":"",s="wordsfont",o=a.calc("i",s,i);this.rows.push({move:r.words}),Va(this.rows,"",e,t,s,"unalignedWords","unalignedWords",i,"unalignedWords",r,n,a),this.rows.push({move:o.height})};function $t(e,t,r,n,a,i,s){r&&(t&&(typeof r=="string"?r=t+r:r=[{text:t}].concat(r)),a=i?"abcjs-extra-text "+a:"",gc(e,r,"historyfont",a,"description",n,{absElemType:"extraText",anchor:"start"},s))}function Va(e,t,r,n,a,i,s,o,c,h,d,l){if(r){o=d?"abcjs-extra-text "+o:"";var f=l.calc("A",a,o);if(typeof r=="string")t&&(r=t+`
|
|
95
|
+
`+r),D0(e,{marginLeft:n,text:r,font:a,absElemType:"extraText",name:c,"dominant-baseline":"middle",klass:o},l);else{e.push({startGroup:s,klass:o,name:c}),e.push({move:h.info}),t&&(D0(e,{marginLeft:n,text:t,font:a,absElemType:"extraText",name:c,"dominant-baseline":"middle"},l),e.push({move:f.height*3/4}));for(var u=0;u<r.length;u++)gc(e,r[u],a,"",c,n,{anchor:"start"},l),u<r.length-1&&typeof r[u]=="string"&&typeof r[u+1]!="string"&&e.push({move:f.height*3/4});e.push({endGroup:s,absElemType:i,startChar:-1,endChar:-1,name:c}),e.push({move:f.height})}}}Cr.prototype.extraText=function(e,t,r,n,a){$t(this.rows,"Book: ",e.book,t,"abcjs-book",n,a),$t(this.rows,"Source: ",e.source,t,"abcjs-source",n,a),$t(this.rows,"Discography: ",e.discography,t,"abcjs-discography",n,a),Va(this.rows,"Notes:",e.notes,t,"historyfont","extraText","notes","abcjs-notes","description",r,n,a),$t(this.rows,"Transcription: ",e.transcription,t,"abcjs-transcription",n,a),Va(this.rows,"History:",e.history,t,"historyfont","extraText","history","abcjs-history","description",r,n,a),$t(this.rows,"Copyright: ",e["abc-copyright"],t,"abcjs-copyright",n,a),$t(this.rows,"Creator: ",e["abc-creator"],t,"abcjs-creator",n,a),$t(this.rows,"Edited By: ",e["abc-edited-by"],t,"abcjs-edited-by",n,a)};Cr.prototype.footer=function(e,t,r,n){var a="header meta-bottom",i="footerfont";this.rows.push({startGroup:"footer",klass:a}),D0(this.rows,{marginLeft:r,text:e.left,font:i,klass:a,name:"footer"},n),D0(this.rows,{marginLeft:r+t/2,text:e.center,font:i,klass:a,anchor:"middle",name:"footer"},n),D0(this.rows,{marginLeft:r+t,text:e.right,font:i,klass:a,anchor:"end",name:"footer"},n)};vc.exports=Cr});var Ka=L((fb,mc)=>{function ja(e,t,r,n){if(e.indexOf(t)===0){var a=e.replace(t,""),i=parseInt(a,10);""+i===a&&(r[n]=i)}}function Cp(e,t){var r=[];if(e.absEl.elemset){for(var n={},a=0;a<e.absEl.elemset.length;a++){var i=e.absEl.elemset[a];if(i)for(var s=i.getAttribute("class").split(" "),o=0;o<s.length;o++)n[s[o]]=!0}for(var c=0;c<Object.keys(n).length;c++)r.push(Object.keys(n)[c])}for(var h={},d=0;d<r.length;d++)ja(r[d],"abcjs-v",h,"voice"),ja(r[d],"abcjs-l",h,"line"),ja(r[d],"abcjs-m",h,"measure");e.staffPos&&(h.staffPos=e.staffPos);for(var l=t.target;l&&l.dataset&&!l.dataset.name&&l.tagName.toLowerCase()!=="svg";)l=l.parentNode;for(var f=t.target;f&&f.dataset&&!f.dataset.index&&f.tagName.toLowerCase()!=="svg";)f=f.parentNode;return f&&f.dataset&&(h.name=f.dataset.name,h.clickedName=l.dataset.name,h.parentClasses=f.classList),l&&l.classList&&(h.clickedClasses=l.classList),h.selectableElement=e.svgEl,{classes:r,analysis:h}}mc.exports=Cp});var Ec=L((ub,_c)=>{var Tr=Me(),Tp=Ka();function Sp(e,t){if(e.rangeHighlight=Ip,e.dragging)for(var r=0;r<e.selectables.length;r++){var n=e.selectables[r];n.svgEl.getAttribute("selectable")==="true"&&(n.svgEl.setAttribute("tabindex",0),n.svgEl.setAttribute("data-index",r),n.svgEl.addEventListener("keydown",Ap.bind(e)),n.svgEl.addEventListener("keyup",Mp.bind(e)),n.svgEl.addEventListener("focus",Ep.bind(e)))}for(var a=0;a<t.length;a++)t[a].addEventListener("touchstart",yc.bind(e),{passive:!0}),t[a].addEventListener("touchmove",wc.bind(e),{passive:!0}),t[a].addEventListener("touchend",z0.bind(e),{passive:!0}),t[a].addEventListener("mousedown",yc.bind(e)),t[a].addEventListener("mousemove",wc.bind(e)),t[a].addEventListener("mouseup",z0.bind(e))}function _p(e){var t=1,r=1,n=e.target.closest("svg"),a=0;n&&n.viewBox&&n.viewBox.baseVal&&(n.viewBox.baseVal.width!==0&&(t=n.viewBox.baseVal.width/n.clientWidth),n.viewBox.baseVal.height!==0&&(r=n.viewBox.baseVal.height/n.clientHeight),a=n.viewBox.baseVal.y);var i=e.target&&e.target.tagName==="svg",s,o;return i?(s=e.offsetX,o=e.offsetY):(s=e.layerX,o=e.layerY),s=s*t,o=o*r,[s,o+a]}function Ep(e){this.dragMechanism==="keyboard"&&this.dragYStep!==0&&this.dragTarget&&kc.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,e),this.dragYStep=0}function Ap(e){switch(e.keyCode){case 38:case 40:e.preventDefault()}}function Mp(e){var t=!1,r=e.target.dataset.index;switch(e.keyCode){case 13:case 32:t=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,this.dragMechanism="keyboard",z0.bind(this)(e);break;case 38:t=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,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*Tr.STEP+")"));break;case 40:t=!0,this.dragTarget=this.selectables[r],this.dragIndex=r,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*Tr.STEP+")"));break;case 9:this.dragYStep!==0&&z0.bind(this)(e);break;default:break}t&&e.preventDefault()}function Bp(e,t){if(!t)return-1;var r=t.dataset;if(!r)return-1;for(var n=r.index,a=0;a<e.length;a++){var i=e[a].svgEl.dataset;if(i&&n===i.index)return a}return-1}function Np(e,t,r){for(var n=9999999,a=-1,i=0;i<e.selectables.length&&n>0;i++){var s=e.selectables[i];if(e.getDim(s),s.dim.left<t&&s.dim.right>t&&s.dim.top<r&&s.dim.bottom>r)a=i,n=0;else if(s.dim.top<r&&s.dim.bottom>r){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));o<n&&(n=o,a=i)}else if(s.dim.left<t&&s.dim.right>t){var c=Math.min(Math.abs(s.dim.top-r),Math.abs(s.dim.bottom-r));c<n&&(n=c,a=i)}else{var h=Math.abs(t-s.dim.left)>Math.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),d=Math.abs(r-s.dim.top)>Math.abs(r-s.dim.bottom)?Math.abs(r-s.dim.bottom):Math.abs(r-s.dim.top),l=Math.sqrt(h*h+d*d);l<n&&(n=l,a=i)}}return a>=0&&n<=12?a:-1}function Pp(e,t,r){if(e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY)return[t.offsetX,t.offsetY];var n=Math.abs(t.layerY/r-t.offsetY);return n<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}function Lp(e){if(!e)return null;if(e.tagName==="svg")return e;if(!e.getAttribute)return null;for(var t=e.getAttribute("selectable");!t;)e.parentElement?(e=e.parentElement,e.tagName==="svg"?t=!0:t=e.getAttribute("selectable")):t=!0;return e}function xc(e,t){var r,n,a,i=Bp(e.selectables,Lp(t.target));return i>=0?(a=Pp(e.selectables[i].svgEl.getBBox(),t,e.scale),r=a[0],n=a[1]):(a=_p(t),r=a[0],n=a[1],i=Np(e,r,n)),{x:r,y:n,clickedOn:i}}function Qa(e){if(!(!e||!e.target||!e.touches||e.touches.length<1)){var t=e.target.getBoundingClientRect(),r=e.touches[0].pageX-t.left,n=e.touches[0].pageY-t.top;e.touches[0].offsetX=r,e.touches[0].offsetY=n,e.touches[0].layerX=e.touches[0].pageX,e.touches[0].layerY=e.touches[0].pageY}}function yc(e){var t=e;e.type==="touchstart"&&(Qa(e),e.touches.length>0&&(t=e.touches[0]));var r=xc(this,t);r.clickedOn>=0&&(e.type==="touchstart"||e.button===0)&&this.selectables[r.clickedOn]&&(this.dragTarget=this.selectables[r.clickedOn],this.dragIndex=r.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:r.x,y:r.y},this.dragging&&this.dragTarget.isDraggable&&(Dp(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function wc(e){var t=e;if(e.type==="touchmove"&&(Qa(e),e.touches.length>0&&(t=e.touches[0])),this.lastTouchMove=e,!(!this.dragTarget||!this.dragging||!this.dragTarget.isDraggable||this.dragMechanism!=="mouse"||!this.dragMouseStart)){var r=xc(this,t),n=Math.round((r.y-this.dragMouseStart.y)/Tr.STEP);n!==this.dragYStep&&(this.dragYStep=n,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+n*Tr.STEP+")"))}}function z0(e){var t=e;e.type==="touchend"&&this.lastTouchMove&&(Qa(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(t=this.lastTouchMove.touches[0])),this.dragTarget&&(Cc.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),kc.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,t),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),zp(this.renderer.svg,"abcjs-dragging-in-progress"))}function qp(e){e>=0&&e<this.selectables.length&&(this.dragTarget=this.selectables[e],this.dragIndex=e,this.dragMechanism="keyboard",z0.bind(this)({target:this.dragTarget.svgEl}))}function kc(e,t,r,n,a){for(var i=Tp(e,a),s=i.classes,o=i.analysis,c=0;c<this.listeners.length;c++)this.listeners[c](e.absEl.abcelem,e.absEl.tuneNumber,s.join(" "),o,{step:t,max:r,index:n,setSelection:qp.bind(this)},a)}function Cc(){for(var e=0;e<this.selected.length;e++)this.selected[e].unhighlight(void 0,this.renderer.foregroundColor);this.selected=[]}function Ip(e,t){Cc.bind(this)();for(var r=0;r<this.staffgroups.length;r++)for(var n=this.staffgroups[r].voices,a=0;a<n.length;a++)for(var i=n[a].children,s=0;s<i.length;s++){var o=i[s].abcelem.startChar,c=i[s].abcelem.endChar;(t>o&&e<c||t===e&&t===c)&&(this.selected[this.selected.length]=i[s],i[s].highlight(void 0,this.selectionColor))}}function Tc(e){var t=e.getAttribute("class");t||(t="");for(var r=t.split(" "),n={},a=0;a<r.length;a++)n[r[a]]=!0;return n}function Sc(e,t){var r=[];for(var n in t)t.hasOwnProperty(n)&&r.push(n);e.setAttribute("class",r.join(" "))}function Dp(e,t){if(e){var r=Tc(e.svg);r[t]=!0,Sc(e.svg,r)}}function zp(e,t){if(e){var r=Tc(e.svg);delete r[t],Sc(e.svg,r)}}_c.exports=Sp});var Sr=L((db,Ac)=>{function Op(e,t,r,n,a){return t+(n-t)/(r-e)*(a-e)}Ac.exports=Op});var Lc=L((pb,Pc)=>{var Fp=nt(),Za=Me(),Ja=Sr(),Hp=function(e){if(!(e.elems.length===0||e.allrests)){var t=Gp(e.stemsUp,e.isgrace),r=e.elems[0],n=e.elems[e.elems.length-1],a=0,i=e.stemsUp?r.abcelem.maxpitch:r.abcelem.minpitch;a=Bc(r,e.stemsUp,i,a),a=Bc(n,e.stemsUp,i,a),a=Math.max(e.stemHeight,a+3);var s=Yp(e.average,e.elems.length,a,e.stemsUp,r.abcelem.averagepitch,n.abcelem.averagepitch,e.isflat,e.min,e.max,e.isgrace),o=Nc(e.stemsUp,r,n);e.addBeam({startX:o[0],endX:o[1],startY:s[0],endY:s[1],dy:t});for(var c=Up(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),h=0;h<c.length;h++)e.addBeam(c[h]);$p(e.elems,e.stemsUp,e.beams[0],t,e.mainNote)}},Mc=function(e){return e===void 0?0:Math.floor(Math.log(e)/Math.log(2))};function Bc(e,t,r,n){if(!e.children)return n;for(var a=0;a<e.children.length;a++){var i=e.children[a];t&&i.top!==void 0&&i.c==="flags.ugrace"?n=Math.max(n,i.top-r):!t&&i.bottom!==void 0&&i.c==="flags.ugrace"&&(n=Math.max(n,r-i.bottom+7))}return n}function Rp(e,t,r,n){if(n)return 0;var a=e-t,i=r/2;return a>i&&(a=i),a<-i&&(a=-i),a}function Gp(e,t){var r=e?Za.STEP:-Za.STEP;return t&&(r=r*.4),r}function Nc(e,t,r){var n=t.heads[e?0:t.heads.length-1],a=r.heads[e?0:r.heads.length-1],i=n.x;e&&(i+=n.w-.6);var s=a.x;return s+=e?a.w:.6,[i,s]}function Yp(e,t,r,n,a,i,s,o,c,h){var d=r-2,l=r-2,f=Math.round(n?Math.max(e+d,c+l):Math.min(e-d,o-l)),u=Rp(a,i,t,s),p=f+Math.floor(u/2),g=f+Math.floor(-u/2);return h||(n&&f<6||!n&&f>6)&&(p=6,g=6),[p,g]}function $p(e,t,r,n,a){for(var i=0;i<e.length;i++){var s=e[i];if(!s.abcelem.rest){var o=!s.addExtra,c=o?a:s,h=s.heads[t?0:s.heads.length-1],d=1/5,l=h.pitch+(t?d:-d),f=t?h.w:0;o||(f+=h.dx);var u=h.x+f,p=Ja(r.startX,r.startY,r.endX,r.endY,u),g=t?-.6:.6;t||(p-=n/2/Za.STEP),o&&(f+=s.heads[0].dx),h.c==="noteheads.slash.quarter"&&(t?l+=1:l-=1);var v=new Fp(null,f,0,l,{type:"stem",pitch2:p,linewidth:g});v.setX(c.x),c.addRight(v)}}}function Wp(e,t){for(var r=t+1;r<e.length;r++)if(!e[r].abcelem.rest)return r;return-1}function Xp(e,t){for(var r=t-1;r>=0;r--)if(!e[r].abcelem.rest)return r;return-1}function Up(e,t,r,n,a){for(var i=[],s=[],o=0;o<e.length;o++){var c=e[o];if(!c.abcelem.rest){var h=c.heads[t?0:c.heads.length-1],d=h.x+(t?h.w:0),l=Ja(r.startX,r.startY,r.endX,r.endY,d),f=t?-1.5:1.5;n&&(f=f*2/3);var u=c.abcelem.duration;u===0&&(u=.25);for(var p=Mc(u);p<-3;p++){var g=-4-p;if(s[g]?s[g].single=!1:s[g]={x:d+(t?-.6:0),y:l+f*(g+1),durlog:p,single:!0},o>0&&c.abcelem.beambr&&c.abcelem.beambr<=g+1){s[g].split||(s[g].split=[s[g].x]);var v=Nc(t,e[o-1],c);s[g].split[s[g].split.length-1]>=v[0]&&(v[0]+=c.w),s[g].split.push(v[0]),s[g].split.push(v[1])}}for(var m=s.length-1;m>=0;m--){var w=Wp(e,o),k=w===-1||w<e.length&&Mc(e[w].abcelem.duration)>-m-4;if(k){var b=d,y=l+f*(m+1);if(s[m].single){var C=Xp(e,o),A=C===-1,P=w===-1;if(A)b=d+5;else if(P)b=d-5;else{var _=e[C].abcelem.duration,B=e[w].abcelem.duration;_===B?b=o%2===0?d+5:d-5:b=_<B?d+5:d-5}y=Ja(r.startX,r.startY,r.endX,r.endY,b)+f*(m+1)}var O={startX:s[m].x,endX:b,startY:s[m].y,endY:y,dy:a};if(s[m].split!==void 0){var q=s[m].split;O.endX<=q[q.length-1]&&(q[q.length-1]-=c.w),q.push(O.endX),O.split=s[m].split}i.push(O),s=s.slice(0,m)}}}}return i}Pc.exports=Hp});var Ic=L((gb,qc)=>{var Vp=Sr();function jp(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(e.hasBeam&&(t.elems[0]!==e.anchor1.parent||t.elems[t.elems.length-1]!==e.anchor2.parent)&&(e.hasBeam=!1),e.hasBeam){var r=en(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=Kp(r,e.anchor2.x,t),e.yTextPos+=en(t)?3:-2,e.xTextPos=Qp(r,e.anchor2.x),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,en(t)&&(e.endingHeightAbove=4)}else{e.startNote=Math.max(e.anchor1.parent.top,9)+4,e.endNote=Math.max(e.anchor2.parent.top,9)+4,e.anchor1.parent.type==="rest"&&e.anchor2.parent.type!=="rest"?e.startNote=e.endNote:e.anchor2.parent.type==="rest"&&e.anchor1.parent.type!=="rest"&&(e.endNote=e.startNote);for(var n=0,a=0;a<e.middleElems.length;a++)n=Math.max(n,e.middleElems[a].top);n+=4,(n>e.startNote||n>e.endNote)&&(e.startNote=n,e.endNote=n),e.flatBeams&&(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1}}delete e.middleElems,delete e.flatBeams}function en(e){return e.stemsUp}function Kp(e,t,r){if(r.beams.length===0)return 0;r=r.beams[0];var n=e+(t-e)/2;return Vp(r.startX,r.startY,r.endX,r.endY,n)}function Qp(e,t){return e+(t-e)/2}qc.exports=jp});var Oc=L((vb,zc)=>{var Zp=Lc(),Jp=Sr(),e3=Ic(),t3=function(e){for(var t=0;t<e.beams.length;t++)if(e.beams[t].type==="BeamElem"){Zp(e.beams[t]),r3(e.beams[t]);for(var r=0;r<e.beams[t].elems.length;r++)e.adjustRange(e.beams[t].elems[r])}for(e.staff.specialY.chordLines=a3(e.children),t=0;t<e.otherchildren.length;t++){var n=e.otherchildren[t];n.type==="TripletElem"&&(e3(n),e.adjustRange(n))}e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom)};function r3(e){for(var t=1.5,r=0;r<e.elems.length;r++){var n=e.elems[r];if(n.top)for(var a=s3(n,e),i=0;i<n.children.length;i++){var s=n.children[i];if(s.klass==="ornament"&&s.position!=="below"&&s.bottom-t<a){var o=a-s.bottom+t;s.bottom+=o,s.top+=o,s.pitch+=o,a=n.top=s.top}}}}function Dc(e,t){var r=t.getChordDim();if(r){for(var n=0;n<e.length;n++){var a=e[n]<r.left;if(a){n>0&&t.putChordInLane(n),e[n]=r.right;return}}e.push(r.right),t.putChordInLane(e.length-1)}}function a3(e){var t=[0],r=[0],n,a,i;for(n=0;n<e.length;n++){for(a=0;a<e[n].children.length;a++)i=e[n].children[a],i.chordHeightAbove&&Dc(t,i);for(a=e[n].children.length-1;a>=0;a--)i=e[n].children[a],i.chordHeightBelow&&Dc(r,i)}return(t.length>1||r.length>1)&&i3(e,t.length,r.length),{above:t.length,below:r.length}}function n3(e){for(var t=0,r=0;r<e.children.length;r++){var n=e.children[r];n.chordHeightBelow&&t++}return t}function i3(e,t,r){for(var n=0;n<e.length;n++)for(var a=n3(e[n]),i=0;i<e[n].children.length;i++){var s=e[n].children[i];s.chordHeightAbove&&s.invertLane(t)}}function s3(e,t){return t=t.beams[0],Jp(t.startX,t.startY,t.endX,t.endY,e.x)}zc.exports=t3});var Hc=L((bb,Fc)=>{var s0=Me(),o3=function(e,t){for(var r,n=0;n<t.staffs.length;n++){var a=t.staffs[n],i={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(e.showDebug&&e.showDebug.indexOf("box")>=0&&(a.originalTop=a.top,a.originalBottom=a.bottom),i0(a,i,"lyricHeightAbove"),i0(a,i,"chordHeightAbove",a.specialY.chordLines.above),a.specialY.endingHeightAbove&&(a.specialY.chordHeightAbove?a.top+=2:a.top+=a.specialY.endingHeightAbove+Nt,i.endingHeightAbove=a.top),a.specialY.dynamicHeightAbove&&a.specialY.volumeHeightAbove?(a.top+=Math.max(a.specialY.dynamicHeightAbove,a.specialY.volumeHeightAbove)+Nt,i.dynamicHeightAbove=a.top,i.volumeHeightAbove=a.top):(i0(a,i,"dynamicHeightAbove"),i0(a,i,"volumeHeightAbove")),i0(a,i,"partHeightAbove"),i0(a,i,"tempoHeightAbove"),a.specialY.lyricHeightBelow&&(a.specialY.lyricHeightBelow+=e.spacing.vocal/s0.STEP,i.lyricHeightBelow=a.bottom,a.bottom-=a.specialY.lyricHeightBelow+Nt),a.specialY.chordHeightBelow){i.chordHeightBelow=a.bottom;var s=a.specialY.chordHeightBelow;a.specialY.chordLines.below&&(s*=a.specialY.chordLines.below),a.bottom-=s+Nt}a.specialY.volumeHeightBelow&&a.specialY.dynamicHeightBelow?(i.volumeHeightBelow=a.bottom,i.dynamicHeightBelow=a.bottom,a.bottom-=Math.max(a.specialY.volumeHeightBelow,a.specialY.dynamicHeightBelow)+Nt):a.specialY.volumeHeightBelow?(i.volumeHeightBelow=a.bottom,a.bottom-=a.specialY.volumeHeightBelow+Nt):a.specialY.dynamicHeightBelow&&(i.dynamicHeightBelow=a.bottom,a.bottom-=a.specialY.dynamicHeightBelow+Nt),e.showDebug&&e.showDebug.indexOf("box")>=0&&(a.positionY=i);for(var o=0;o<a.voices.length;o++){var c=t.voices[a.voices[o]];c3(i,c,e.spacing)}if(r!==void 0){var h=a.top-10,d=r+h,l=e.spacing.systemStaffSeparation/s0.STEP,f=l-d;f>0&&(a.top+=f)}a.top+=e.spacing.staffTopMargin/s0.STEP,r=2-a.bottom}},Nt=1;function i0(e,t,r,n){if(e.specialY[r]){var a=e.specialY[r];n&&(a*=n),e.top+=a+Nt,t[r]=e.top}}function c3(e,t,r){var n,a;for(n=0;n<t.children.length;n++)a=t.children[n],l3(e,a,r);for(n=0;n<t.otherchildren.length;n++)switch(a=t.otherchildren[n],a.type){case"CrescendoElem":h3(e,a);break;case"DynamicDecoration":f3(e,a);break;case"EndingElem":u3(e,a);break;case"TieElem":var i=a.getYBounds();t.staff.top=Math.max(t.staff.top,i[0]),t.staff.top=Math.max(t.staff.top,i[1]),t.staff.bottom=Math.min(t.staff.bottom,i[0]),t.staff.bottom=Math.min(t.staff.bottom,i[1]);break}}function l3(e,t,r){for(var n=0;n<t.children.length;n++){var a=t.children[n];for(var i in t.specialY)t.specialY.hasOwnProperty(i)&&a[i]&&(a.pitch=e[i],a.top===void 0&&(a.type==="TempoElement"?d3(e,a):p3(e,a,r),t.pushTop(a.top),t.pushBottom(a.bottom)))}}function h3(e,t){t.dynamicHeightAbove?t.pitch=e.dynamicHeightAbove:t.pitch=e.dynamicHeightBelow}function f3(e,t){t.volumeHeightAbove?t.pitch=e.volumeHeightAbove:t.pitch=e.volumeHeightBelow}function u3(e,t){t.pitch=e.endingHeightAbove-2}function d3(e,t){if(t.pitch=e.tempoHeightAbove,t.top=e.tempoHeightAbove,t.bottom=e.tempoHeightAbove,t.note){var r=t.pitch-t.totalHeightInPitches+1;t.note.top=r,t.note.bottom=r;for(var n=0;n<t.note.children.length;n++){var a=t.note.children[n];a.top+=r,a.bottom+=r,a.pitch+=r,a.pitch2!==void 0&&(a.pitch2+=r)}}}function p3(e,t,r){switch(t.type){case"part":t.top=e.partHeightAbove+t.height,t.bottom=e.partHeightAbove;break;case"text":case"chord":t.chordHeightAbove?(t.top=e.chordHeightAbove,t.bottom=e.chordHeightAbove):(t.top=e.chordHeightBelow,t.bottom=e.chordHeightBelow);break;case"lyric":t.lyricHeightAbove?(t.top=e.lyricHeightAbove,t.bottom=e.lyricHeightAbove):(t.top=e.lyricHeightBelow+r.vocal/s0.STEP,t.bottom=e.lyricHeightBelow+r.vocal/s0.STEP,t.pitch-=r.vocal/s0.STEP);break;case"debug":t.top=e.chordHeightAbove,t.bottom=e.chordHeightAbove;break}(t.pitch===void 0||t.top===void 0)&&console.error("RelativeElement position not set.",t.type,t.pitch,t.top,e)}Fc.exports=o3});var Gc=L((mb,Rc)=>{var kt=function(){};kt.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0};kt.layoutEnded=function(e){return e.i>=e.children.length};kt.getNextX=function(e){return Math.max(e.minx,e.nextx)};kt.getSpacingUnits=function(e){return Math.sqrt(e.spacingduration*8)};kt.layoutOneItem=function(e,t,r,n,a){var i=r.children[r.i];if(!i)return 0;var s=e-r.minx,o=r.durationindex+i.duration>0?n:0;if(i.abcelem.el_type==="note"&&!i.abcelem.rest&&r.voicenumber!==0&&a){var c=a.children[a.i],h=c&&(i.abcelem.maxpitch<=c.abcelem.maxpitch+1&&i.abcelem.maxpitch>=c.abcelem.minpitch-1||i.abcelem.minpitch<=c.abcelem.maxpitch+1&&i.abcelem.minpitch>=c.abcelem.minpitch-1);if(h&&i.abcelem.minpitch===c.abcelem.minpitch&&i.abcelem.maxpitch===c.abcelem.maxpitch&&c.heads&&c.heads.length>0&&i.heads&&i.heads.length>0&&c.heads[0].c===i.heads[0].c&&(h=!1),h){var d=c.heads&&c.heads.length>0?c.heads[0].realWidth:c.fixed.w;i.adjustedWidth||(i.adjustedWidth=d+i.w),i.w=i.adjustedWidth;for(var l=0;l<i.children.length;l++){var f=i.children[l];f.name.indexOf("accidental")<0&&(f.adjustedWidth||(f.adjustedWidth=f.dx+d),f.dx=f.adjustedWidth)}}}var u=g3(i,o);return s<u&&(r.i===0||i.type!=="bar"||r.children[r.i-1].type!=="part"&&r.children[r.i-1].type!=="tempo")&&(e+=u-s),i.setX(e),r.spacingduration=i.duration,r.minx=e+v3(i),r.i!==r.children.length-1&&(r.minx+=i.minspacing),this.updateNextX(e,t,r),e};kt.shiftRight=function(e,t){var r=t.children[t.i];r&&(r.setX(r.x+e),t.minx+=e,t.nextx+=e)};kt.updateNextX=function(e,t,r){r.nextx=e+t*this.getSpacingUnits(r)};kt.updateIndices=function(e){this.layoutEnded(e)||(e.durationindex+=e.children[e.i].duration,e.children[e.i].type==="bar"&&(e.durationindex=Math.round(e.durationindex*64)/64),e.i++)};function g3(e,t){var r=0;return(e.type==="note"||e.type==="bar")&&(r=t),-e.extraw+r}function v3(e){return e.w}Rc.exports=kt});var $c=L((yb,Yc)=>{var He=Gc();function b3(e){for(var t=0,r=0;r<e.length;r++){var n=e[r];if(n.children.length>0){var a=n.children.length-1,i=n.children[a];if(i.abcelem.el_type==="bar"){var s=i.children[0].x;s>t?t=s:i.children[0].x=t}}}}var m3=function(e,t,r,n,a){var i=1e-7,s=0,o=1e3,c=a;n.startx=c;var h,d=0;for(r&&console.log("init layout",e),h=0;h<n.voices.length;h++)He.beginLayout(c,n.voices[h]);for(var l=0;!y3(n.voices);){for(d=null,h=0;h<n.voices.length;h++)!He.layoutEnded(n.voices[h])&&(!d||tn(n.voices[h])<d)&&(d=tn(n.voices[h]));var f=[],u=[];for(h=0;h<n.voices.length;h++){var p=tn(n.voices[h]);p-d>i?u.push(n.voices[h]):f.push(n.voices[h])}l=0;var g=0;for(h=0;h<f.length;h++)He.getNextX(f[h])>c&&(c=He.getNextX(f[h]),l=He.getSpacingUnits(f[h]),g=f[h].spacingduration);s+=l,o=Math.min(o,l),r&&console.log("currentduration: ",d,s,o);var v=void 0;for(h=0;h<f.length;h++){var m=f[h];m.voicenumber===0&&(v=h);var w=v!==void 0&&f[v].voicenumber!==m.voicenumber?f[v]:void 0;w3(m,w)||(w=void 0);var k=He.layoutOneItem(c,e,m,t,w),b=k-c;if(b>0){c=k;for(var y=0;y<h;y++)He.shiftRight(b,f[y])}}for(h=0;h<u.length;h++)u[h].spacingduration-=g,He.updateNextX(c,e,u[h]);for(h=0;h<f.length;h++){var C=f[h];He.updateIndices(C)}}for(h=0;h<n.voices.length;h++)He.getNextX(n.voices[h])>c&&(c=He.getNextX(n.voices[h]),l=He.getSpacingUnits(n.voices[h]));return b3(n.voices),s+=l,n.setWidth(c),{spacingUnits:s,minSpace:o}};function y3(e){for(var t=0;t<e.length;t++)if(!He.layoutEnded(e[t]))return!1;return!0}function tn(e){return e.durationindex-(e.children[e.i]&&e.children[e.i].duration>0?0:5e-7)}function w3(e,t){return!e||!e.staff||!e.staff.voices||e.staff.voices.length===0||!t||!t.staff||!t.staff.voices||t.staff.voices.length===0?!1:e.staff.voices[0]===t.staff.voices[0]}Yc.exports=m3});var rn=L((wb,Uc)=>{function x3(e,t,r,n,a){var i=e.padding.left,s=0,o,c;for(o=0;o<r.length;o++)r[o].header&&(c=t.calc(r[o].header,"voicefont",""),s=Math.max(s,c.width));if(s=Wc(s,n,t),s=Wc(s,a,t),s){var h=t.calc("A","voicefont","");s+=h.width}i+=s;var d=0;return d=Xc(n,i,d),d=Xc(a,i,d),i+d}function Wc(e,t,r){if(t){for(var n=0;n<t.length;n++)if(t[n].header){var a=r.calc(t[n].header,"voicefont","");e=Math.max(e,a.width)}}return e}function Xc(e,t,r){if(e)for(var n=0;n<e.length;n++)k3(t,e[n]),r=Math.max(r,e[n].getWidth());return r}function k3(e,t){t.x=e}Uc.exports=x3});var jc=L((xb,Vc)=>{var C3=rn();function T3(e,t,r){var n=C3(e,t.getTextSize,t.voices,t.brace,t.bracket),a=S3(t,r.minPadding),i=a.totalDuration,s=a.minSpacing,o=s*i;r.minWidth&&(o=Math.max(o,r.minWidth));var c=r.minPadding?r.minPadding/2:2;t.startx=n,t.w=o+n;for(var h=0;h<t.voices.length;h++){var d=t.voices[h];d.startx=n,d.w=o+n;for(var l=n,f=!1,u=0,p=0;p<d.children.length;p++){var g=d.children[p];f||(g.duration!==0?(f=!0,u=(o+n-l)/i,t.gridStart=l):(g.x=l,l+=g.w+g.minspacing)),f&&(r.align==="center"?g.x=l+g.duration*u/2-g.w/2:g.duration===0?g.x=l+1-g.w:g.x=l+c-g.extraw,l+=g.duration*u);for(var v=0;v<g.children.length;v++){var m=g.children[v],w=m.dx?m.dx:0;m.x=g.x+w}}t.gridEnd=l}return o}function S3(e,t){for(var r=0,n=0,a=0;a<e.voices.length;a++){for(var i=0,s=e.voices[a],o=0;o<s.children.length;o++){var c=s.children[o];if(i+=c.duration,c.duration){var h=(c.w+t)/c.duration;r=Math.max(r,h)}}n=Math.max(n,i)}return{totalDuration:n,minSpacing:r}}Vc.exports=T3});var Qc=L((kb,Kc)=>{var _3=Oc(),E3=Hc(),A3=$c(),M3=rn(),B3=jc(),N3=function(e,t,r,n,a,i){var s,o,c=r;for(s=0;s<t.lines.length;s++)if(o=t.lines[s],o.staff){var h;i!==void 0?h=B3(e,o.staffGroup,i):h=P3(e,c,n,o.staffGroup,t.formatting,s===t.lines.length-1,!1),Math.round(h)>Math.round(c)&&(c=h,a&&(s=-1))}for(s=0;s<t.lines.length;s++)if(o=t.lines[s],o.staffGroup&&o.staffGroup.voices){for(var d=0;d<o.staffGroup.voices.length;d++)_3(o.staffGroup.voices[d]);E3(e,o.staffGroup)}for(s=0;s<t.lines.length;s++)o=t.lines[s],o.staffGroup&&o.staffGroup.setHeight();return c},P3=function(e,t,r,n,a,i,s){for(var o=M3(e,n.getTextSize,n.voices,n.brace,n.bracket),c=r,h=0;h<8;h++){var d=A3(c,e.minPadding,s,n,o);if(c=L3(i,a.stretchlast,t+e.padding.left,n.w,c,d.spacingUnits,d.minSpace,e.padding.left+e.padding.right),s&&console.log("setXSpace",h,n.w,c,n.minspace),c===null)break}return q3(n.voices),n.w-o};function L3(e,t,r,n,a,i,s,o){if(e)if(t===void 0){if(n/r<.66)return null}else{var c=1-(n+o)/r,h=c<t;if(!h)return null}if(Math.abs(r-n)<2)return null;var d=i*a,l=n-d;return i>0?(a=(r-l)/i,a*s>50&&(a=50/s),a):null}function q3(e){for(var t=0;t<e.length;t++)for(var r=e[t],n=1;n<r.children.length-1;n++){var a=r.children[n];if(a.abcelem.rest&&(a.abcelem.rest.type==="whole"||a.abcelem.rest.type==="multimeasure")){var i=r.children[n-1],s=r.children[n+1];a.center(i,s)}}}Kc.exports=N3});var Jc=L((Cb,Zc)=>{var $e=function(t){this.shouldAddClasses=t.shouldAddClasses,this.reset()};$e.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null};$e.prototype.incrLine=function(){this.lineNumber===null?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null};$e.prototype.incrVoice=function(){this.voiceNumber===null?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null};$e.prototype.isInMeasure=function(){return this.measureNumber!==null};$e.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null};$e.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0};$e.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0};$e.prototype.incrNote=function(){this.noteNumber++};$e.prototype.measureTotal=function(){for(var e=0,t=0;t<this.lineNumber;t++)e+=this.measureTotalPerLine[t]?this.measureTotalPerLine[t]:0;return this.measureNumber&&(e+=this.measureNumber),e};$e.prototype.getCurrent=function(e){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}};$e.prototype.generate=function(e){if(!this.shouldAddClasses)return"";var t=[];if(e&&e.length>0&&t.push(e),e==="abcjs-tab-number")return t.join(" ");if(e==="text instrument-name")return"abcjs-text abcjs-instrument-name";if(this.lineNumber!==null&&t.push("l"+this.lineNumber),this.measureNumber!==null&&t.push("m"+this.measureNumber),this.measureNumber!==null&&t.push("mm"+this.measureTotal()),this.voiceNumber!==null&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&this.noteNumber!==null&&t.push("n"+this.noteNumber),t.length>0){t=t.join(" "),t=t.split(" ");for(var r=0;r<t.length;r++)t[r].indexOf("abcjs-")!==0&&t[r].length>0&&(t[r]="abcjs-"+t[r])}return t.join(" ")};Zc.exports=$e});var tl=L((Tb,el)=>{var _r=function(t,r){this.formatting=t,this.classes=r};_r.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)};_r.prototype.getFamily=function(e){return e[0]==='"'&&e[e.length-1]==='"'?e.substring(1,e.length-1):e};_r.prototype.calc=function(e,t){var r;typeof e=="string"?(r=this.formatting[e],r?r={face:r.face,size:Math.round(r.size*4/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box}:r={face:"Arial",size:Math.round(48/3),decoration:"underline",style:"normal",weight:"normal"}):r={face:e.face,size:Math.round(e.size*4/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var n=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;r.padding=r.size*n;var a={"font-size":r.size,"font-style":r.style,"font-family":this.getFamily(r.face),"font-weight":r.weight,"text-decoration":r.decoration,class:this.classes.generate(t)};return{font:r,attr:a}};el.exports=_r});var al=L((Sb,rl)=>{var o0=function(t,r){this.getFontAndAttr=t,this.svg=r};o0.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)};o0.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)};o0.prototype.getFamily=function(e){return e[0]==='"'&&e[e.length-1]==='"'?e.substring(1,e.length-1):e};o0.prototype.calc=function(e,t,r,n){var a;typeof t=="string"?a=this.attr(t,r):a={font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":this.getFamily(t.face),"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(r)}};var i=this.svg.getTextSize(e,a.attr,n);return a.font.box?{height:i.height+a.font.padding*4,width:i.width+a.font.padding*4}:i};o0.prototype.baselineToCenter=function(e,t,r,n,a){var i=this.calc(e,t,r).height,s=this.attr(t,r).font.size;return i*.5+(a-n-2)*s};rl.exports=o0});var Pt=L((_b,nl)=>{var I3=function(){for(var e=0,t,r=arguments[e++],n=[],a,i,s,o;r;){if(a=/^[^\x25]+/.exec(r))n.push(a[0]);else if(a=/^\x25{2}/.exec(r))n.push("%");else if(a=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(r)){if((t=arguments[a[1]||e++])==null||t==null)throw"Too few arguments.";if(/[^s]/.test(a[7])&&typeof t!="number")throw"Expecting number but found "+typeof t;switch(a[7]){case"b":t=t.toString(2);break;case"c":t=String.fromCharCode(t);break;case"d":t=parseInt(t);break;case"e":t=a[6]?t.toExponential(a[6]):t.toExponential();break;case"f":t=a[6]?parseFloat(t).toFixed(a[6]):parseFloat(t);break;case"o":t=t.toString(8);break;case"s":t=(t=String(t))&&a[6]?t.substring(0,a[6]):t;break;case"u":t=Math.abs(t);break;case"x":t=t.toString(16);break;case"X":t=t.toString(16).toUpperCase();break}t=/[def]/.test(a[7])&&a[2]&&t>0?"+"+t:t,s=a[3]?a[3]=="0"?"0":a[3][1]:" ",o=a[5]-String(t).length,i=a[5]?str_repeat(s,o):"",n.push(a[4]?t+i:i+t)}else throw"Huh ?!";r=r.substring(a[0].length)}return n.join("")};nl.exports=I3});var lt=L((Eb,il)=>{function D3(e){return parseFloat(e.toFixed(2))}il.exports=D3});var Ct=L((Ab,ol)=>{var sl=lt();function z3(e,t,r){var n=t.y;if(t.phrases){var o=e.paper.richTextLine(t.phrases,t.x,t.y,t.klass,t.anchor);return o}if(t.lane){var a=t.dim.font.size*.25;n+=(t.dim.font.size+a)*t.lane}var i;t.dim?(i=t.dim,i.attr.class=t.klass):i=e.controller.getFontAndAttr.calc(t.type,t.klass),t.anchor&&(i.attr["text-anchor"]=t.anchor),t["dominant-baseline"]&&(i.attr["dominant-baseline"]=t["dominant-baseline"]),i.attr.x=t.x,i.attr.y=n,t.centerVertically||(i.attr.y+=i.font.size),t.type==="debugfont"&&(console.log("Debug msg: "+t.text),i.attr.stroke="#ff0000"),t.cursor&&(i.attr.cursor=t.cursor);var s;t.name==="free-text"?s=t.text.replace(/^[ \t]*\n/gm,`
|
|
96
|
+
`):s=t.text.replace(/\n\n/g,`
|
|
97
|
+
|
|
98
|
+
`),s=s.replace(/^\n/,`\xA0
|
|
99
|
+
`),i.font.box&&(r||e.paper.openGroup({klass:i.attr.class,fill:e.foregroundColor,"data-name":t.name}),i.attr["text-anchor"]==="end"?i.attr.x-=i.font.padding:i.attr["text-anchor"]==="start"&&(i.attr.x+=i.font.padding),i.attr.y+=i.font.padding,delete i.attr.class),t.noClass&&delete i.attr.class,i.attr.x=sl(i.attr.x),i.attr.y=sl(i.attr.y),t.name&&(i.attr["data-name"]=t.name);var o=e.paper.text(s,i.attr);if(i.font.box){var c=o.getBBox(),h=0;i.attr["text-anchor"]==="middle"?h=c.width/2+i.font.padding:i.attr["text-anchor"]==="end"&&(h=c.width+i.font.padding*2);var d=0;t.centerVertically&&(d=c.height-i.font.padding),e.paper.rect({"data-name":"box",x:Math.round(t.x-h),y:Math.round(n-d),width:Math.round(c.width+i.font.padding*2),height:Math.round(c.height+i.font.padding*2)}),r||(o=e.paper.closeGroup())}return o}ol.exports=z3});var hl=L((Mb,ll)=>{var Er=Pt(),ht=Me(),O3=Ct();function F3(e,t,r){var n=t.startVoice.staff.absoluteY-ht.STEP*10;return t.endVoice&&t.endVoice.staff?t.endY=t.endVoice.staff.absoluteY-ht.STEP*2:t.lastContinuedVoice&&t.lastContinuedVoice.staff?t.endY=t.lastContinuedVoice.staff.absoluteY-ht.STEP*2:t.endY=t.startVoice.staff.absoluteY-ht.STEP*2,G3(e,t.x,n,t.endY,t.type,t.header,r)}function H3(e,t,r,n,a){t+=ht.STEP;var i=ht.STEP*.75,s=ht.STEP*.75,o=n-r,c=Er("M %f %f l %f %f l %f %f l %f %f z",t,r-s,0,o+s*2,i,0,0,-(o+s*2)),h=ht.STEP*2,d=ht.STEP;return c+=Er("M %f %f q %f %f %f %f q %f %f %f %f z",t+i,r-s,h*.6,d*.2,h,-d,-h*.1,d*.3,-h,d+ht.STEP),c+=Er("M %f %f q %f %f %f %f q %f %f %f %f z",t+i,r+s+o,h*.6,-d*.2,h,d,-h*.1,-d*.3,-h,-d-ht.STEP),e.paper.path({path:c,stroke:e.foregroundColor,fill:e.foregroundColor,class:e.controller.classes.generate(a),"data-name":a})}function R3(e,t,r,n,a){var i=n-r,s=cl(t,r,[7.5,-8,21,0,18.5,-10.5,7.5],[0,i/5.5,i/3.14,i/2,i/2.93,i/4.88,0]);return s+=cl(t,r,[0,17.5,-7.5,6.6,-5,20,0],[i/2,i/1.46,i/1.22,i,i/1.19,i/1.42,i/2]),e.paper.path({path:s,stroke:e.foregroundColor,fill:e.foregroundColor,class:e.controller.classes.generate(a),"data-name":a})}function cl(e,t,r,n){return Er("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",e+r[0],t+n[0],e+r[1],t+n[1],e+r[2],t+n[2],e+r[3],t+n[3],e+r[4],t+n[4],e+r[5],t+n[5],e+r[6],t+n[6])}var G3=function(e,t,r,n,a,i,s){var o;if(i){e.paper.openGroup({klass:e.controller.classes.generate("staff-extra voice-name"),"data-name":a});var c=r+(n-r)/2;c=c-e.controller.getTextSize.baselineToCenter(i,"voicefont","staff-extra voice-name",0,1),O3(e,{x:e.padding.left,y:c,text:i,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return a==="brace"?o=R3(e,t,r,n,a):a==="bracket"&&(o=H3(e,t,r,n,a)),i&&(o=e.paper.closeGroup()),s.wrapSvgEl({el_type:a,startChar:-1,endChar:-1},o),o};ll.exports=F3});var c0=L((Bb,fl)=>{function Y3(e,t,r){var n=e.paper.path(t);return n}fl.exports=Y3});var dl=L((Nb,ul)=>{var $3=Pt(),W3=c0(),X3=lt();function U3(e,t,r){(!t.anchor1||!t.anchor2||!t.anchor1.heads||!t.anchor2.heads||t.anchor1.heads.length===0||t.anchor2.heads.length===0)&&window.console.error("Glissando Element not set.");var n=4,a=e.calcY(t.anchor1.heads[0].pitch),i=e.calcY(t.anchor2.heads[0].pitch),s=t.anchor1.x+t.anchor1.w/2,o=t.anchor2.x+t.anchor2.w/2,c=V3(s,a,o,i),h=t.anchor1.w/2+n,d=t.anchor2.w/2+n,l=j3(s,a,o,i),f=an(a,l,h),u=an(i,l,-d),p=K3(c-h-d),g=rg(e,s+h,f,p,l);return r.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},g),[g]}function V3(e,t,r,n){var a=r-e,i=n-t;return Math.sqrt(a*a+i*i)}function j3(e,t,r,n){return(n-t)/(r-e)}function an(e,t,r){return X3(e+r*t)}function K3(e){var t=5;return Math.max(2,Math.floor((e-t*2)/6))}var Q3=[[3.5,-4.8]],Z3=[[1.5,-1],[.3,-.3],[-3.5,3.8]],J3=[[-1.5,2]],eg=[[3,4],[3,-4]],tg=[[-3,4],[-3,-4]];function O0(e,t){for(var r="",n=0;n<e.length;n++)r+="l"+e[n][0]+" "+an(e[n][1],t,e[n][0]);return r}var rg=function(e,t,r,n,a){var i=$3("M %f %f",t,r);i+=O0(Q3,a);var s;for(s=0;s<n;s++)i+=O0(eg,a);for(i+=O0(Z3,a),s=0;s<n;s++)i+=O0(tg,a);return i+=O0(J3,a)+"z",W3(e,{path:i,highlight:"stroke",stroke:e.foregroundColor,class:e.controller.classes.generate("decoration"),"data-name":"glissando"})};ul.exports=U3});var vl=L((Pb,gl)=>{var ag=Pt(),ng=c0(),l0=lt();function ig(e,t,r){t.pitch===void 0&&window.console.error("Crescendo Element y-coordinate not set.");var n=e.calcY(t.pitch)+4,a=8,i=t.anchor1?t.anchor1.x:0,s=t.anchor2?t.anchor2.x:800,o;return t.dir==="<"?o=pl(e,n+a/2,n,n+a/2,n+a,i,s):o=pl(e,n,n+a/2,n+a,n+a/2,i,s),r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},o),[o]}var pl=function(e,t,r,n,a,i,s){t=l0(t),r=l0(r),n=l0(n),a=l0(a),i=l0(i),s=l0(s);var o=ag("M %f %f L %f %f M %f %f L %f %f",i,t,s,r,i,n,s,a);return ng(e,{path:o,highlight:"stroke",stroke:e.foregroundColor,class:e.controller.classes.generate("dynamics decoration"),"data-name":"dynamics"})};gl.exports=ig});var Ar=L((Lb,ml)=>{var bl=lt();function F0(){this.ingroup=!1}F0.prototype.beginGroup=function(e,t){this.paper=e,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0,this.paper.openGroup()};F0.prototype.isInGroup=function(){return this.ingroup};F0.prototype.addPath=function(e){if(e=e||[],e.length!==0){e[0][0]="m",e[0][1]=bl(e[0][1]-this.lastM[0]),e[0][2]=bl(e[0][2]-this.lastM[1]),this.lastM[0]+=e[0][1],this.lastM[1]+=e[0][2],this.path.push(e[0]);for(var t=1,r=e.length;t<r;t++)e[t][0]==="m"&&(this.lastM[0]+=e[t][1],this.lastM[1]+=e[t][2]),this.path.push(e[t])}};F0.prototype.endGroup=function(e,t){this.ingroup=!1;for(var r="",n=0;n<this.path.length;n++)r+=this.path[n].join(" ");this.path=[];var a=this.paper.closeGroup();return a&&(a.setAttribute("class",this.controller.classes.generate(e)),a.setAttribute("fill",this.controller.renderer.foregroundColor),a.setAttribute("stroke","none"),a.setAttribute("data-name",t)),a};var sg=new F0;ml.exports=sg});var Mr=L((qb,xl)=>{var yl=Ct(),h0=xt(),wl=Ar();function og(e,t,r,n,a){var i,s;if(!n)return null;if(n.length>1&&n.indexOf(".")<0){var o=wl.isInGroup()?"":a.klass;e.paper.openGroup({"data-name":a.name,klass:o});for(var c=0,h=0;h<n.length;h++){var d=n[h];s=h0.getYCorr(d),i=h0.printSymbol(t+c,e.calcY(r+s),d,e.paper,{stroke:a.stroke,fill:a.fill}),i?h<n.length-1&&(c+=cg(d,n[h+1],h0.getSymbolWidth(d))):yl(e,{x:t,y:e.y,text:"no symbol:"+n,type:"debugfont",klass:"debug-msg",anchor:"start"},!1)}var l=e.paper.closeGroup();return l}else return s=h0.getYCorr(n),wl.isInGroup()?i=h0.printSymbol(t,e.calcY(r+s),n,e.paper,{"data-name":a.name}):i=h0.printSymbol(t,e.calcY(r+s),n,e.paper,{klass:a.klass,stroke:a.stroke,fill:a.fill,"data-name":a.name}),i||(yl(e,{x:t,y:e.y,text:"no symbol:"+n,type:"debugfont",klass:"debug-msg",anchor:"start"},!1),null)}function cg(e,t,r){var n=r;return e==="f"&&t==="f"&&(n=n*2/3),e==="p"&&t==="p"&&(n=n*5/6),e==="f"&&t==="z"&&(n=n*5/8),n}xl.exports=og});var Cl=L((Ib,kl)=>{var lg=Mr();function hg(e,t,r){t.pitch===void 0&&window.console.error("Dynamic Element y-coordinate not set.");var n=1,a=1,i=lg(e,t.anchor.x,t.pitch,t.dec,{scalex:n,scaley:a,klass:e.controller.classes.generate("decoration dynamics"),fill:e.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},i),[i]}kl.exports=hg});var Sl=L((Db,Tl)=>{var fg=Pt(),ug=Ct(),dg=c0(),Br=lt();function pg(e,t,r){e.paper.openGroup({klass:e.controller.classes.generate("triplet "+t.durationClass),"data-name":"triplet"}),t.hasBeam||gg(e,t.anchor1.x,t.startNote,t.anchor2.x+t.anchor2.w,t.endNote),ug(e,{x:t.xTextPos,y:e.calcY(t.yTextPos-1),text:""+t.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0,name:""+t.number},!0);var n=e.paper.closeGroup();return r.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},n),n}function Nr(e,t,r,n){return fg("M %f %f L %f %f",Br(e),Br(t),Br(r),Br(n))}function gg(e,t,r,n,a){r=e.calcY(r),a=e.calcY(a);var i=5,s="";s+=Nr(t,r,t,r+i),s+=Nr(n,a,n,a+i);var o=t+(n-t)/2,c=8,h=(a-r)/(n-t),d=o-c,l=r+(d-t)*h;s+=Nr(t,r,d,l);var f=o+c,u=r+(f-t)*h;s+=Nr(f,u,n,a),dg(e,{path:s,stroke:e.foregroundColor,"data-name":"triplet-bracket"})}Tl.exports=pg});var El=L((zb,_l)=>{var nn=Pt(),vg=Ct(),bg=c0(),Wt=lt();function mg(e,t,r,n,a){t.pitch===void 0&&window.console.error("Ending Element y-coordinate not set.");var i=Wt(e.calcY(t.pitch)),s=20,o="";t.anchor1&&(r=Wt(t.anchor1.x+t.anchor1.w),o+=nn("M %f %f L %f %f ",r,i,r,Wt(i+s))),t.anchor2&&(n=Wt(t.anchor2.x),o+=nn("M %f %f L %f %f ",n,i,n,Wt(i+s))),o+=nn("M %f %f L %f %f ",r,i,n,i),e.paper.openGroup({klass:e.controller.classes.generate("ending"),fill:e.foregroundColor,"data-name":"ending"}),bg(e,{path:o,stroke:e.foregroundColor,fill:e.foregroundColor,"data-name":"line"}),t.anchor1&&vg(e,{x:Wt(r+5),y:Wt(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:t.text});var c=e.paper.closeGroup();return a.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},c),[c]}_l.exports=mg});var Bl=L((Ob,Ml)=>{var Al=Pt(),We=lt();function yg(e,t,r,n,a){wg(t,r,n);var i="";t.anchor1?i+="abcjs-start-m"+t.anchor1.parent.counters.measure+"-n"+t.anchor1.parent.counters.note:i+="abcjs-start-edge",t.anchor2?i+=" abcjs-end-m"+t.anchor2.parent.counters.measure+"-n"+t.anchor2.parent.counters.note:i+=" abcjs-end-edge",t.hint&&(i="abcjs-hint");var s=t.fixedY?1.5:0,o=xg(e,t.startX,t.endX,t.startY+s,t.endY+s,t.above,i,t.isTie,t.dotted),c=-1;t.anchor1&&!t.isTie&&(c=t.anchor1.parent.abcelem.startChar-1);var h=-1;return t.anchor2&&!t.isTie&&(h=t.anchor2.parent.abcelem.endChar+1),a.wrapSvgEl({el_type:"slur",startChar:c,endChar:h},o),[o]}var wg=function(e,t,r){!e.anchor1||!e.anchor2||e.anchor1.pitch===e.anchor2.pitch&&e.internalNotes.length===0?e.isTie=!0:e.isTie=!1,e.isTie?(e.calcTieDirection(),e.calcX(t,r),e.calcTieY()):(e.calcSlurDirection(),e.calcX(t,r),e.calcSlurY()),e.avoidCollisionAbove()},xg=function(e,t,r,n,a,i,s,o,c){var h=o?1.2:1.5;t=We(t+6),r=We(r+4),n=n+(i?h:-h),a=a+(i?h:-h);var d=We(e.calcY(n)),l=We(e.calcY(a)),f=r-t,u=l-d,p=Math.sqrt(f*f+u*u),g=f/p,v=u/p,m=p/3.5,w=o?10:25,k=(i?-1:1)*Math.min(w,Math.max(4,m)),b=We(t+m*g-k*v),y=We(d+m*v+k*g),C=We(r-m*g-k*v),A=We(l-m*v+k*g),P=2;s?s+=" slur":s="slur",s+=o?" tie":" legato";var _;if(c){s+=" dotted";var B=Al("M %f %f C %f %f %f %f %f %f",t,d,b,y,C,A,r,l);_=e.paper.path({path:B,stroke:e.foregroundColor,fill:"none","stroke-dasharray":"5 5",class:e.controller.classes.generate(s),"data-name":o?"tie":"slur"})}else{var O=Al("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t,d,b,y,C,A,r,l,We(C-P*v),We(A+P*g),We(b-P*v),We(y+P*g),t,d);_=e.paper.path({path:O,stroke:"none",fill:e.foregroundColor,class:e.controller.classes.generate(s),"data-name":o?"tie":"slur"})}return _};Ml.exports=yg});var ql=L((Fb,Ll)=>{var kg=c0(),f0=lt();function Cg(e,t){if(t.beams.length!==0){for(var r="",n=0;n<t.beams.length;n++){var a=t.beams[n];if(a.split){for(var i=Tg(e,a.startX,a.startY,a.endX,a.endY),s=[],o=0;o<a.split.length;o+=2)s.push([a.split[o],a.split[o+1]]);for(o=0;o<s.length;o++){var c=Pl(a.startX,a.startY,i,s[o][0]),h=Pl(a.startX,a.startY,i,s[o][1]);r+=Nl(e,s[o][0],c,s[o][1],h,a.dy)}}else r+=Nl(e,a.startX,a.startY,a.endX,a.endY,a.dy)}var d=("abcjs-d"+t.duration).replace(/\./g,"-"),l=e.controller.classes.generate("beam-elem "+d),f=kg(e,{path:r,stroke:"none",fill:e.foregroundColor,class:l});return[f]}}function Nl(e,t,r,n,a,i){r=f0(e.calcY(r)),a=f0(e.calcY(a)),t=f0(t),n=f0(n);var s=f0(r+i),o=f0(a+i);return"M"+t+" "+r+" L"+n+" "+a+"L"+n+" "+o+" L"+t+" "+s+"z"}function Tg(e,t,r,n,a){return(a-r)/(n-t)}function Pl(e,t,r,n){var a=n-e;return t+a*r}Ll.exports=Cg});var Pr=L((Hb,Il)=>{var Sg=Ar(),u0=lt();function _g(e,t,r,n,a,i,s){if(r<0||n<a){var o=u0(a);a=u0(n),n=o}else n=u0(n),a=u0(a);t=u0(t);var c=u0(t+r);if(e.firefox112){t+=r/2;var d={x1:t,x2:t,y1:n,y2:a,stroke:e.foregroundColor,"stroke-width":Math.abs(r)};return i&&(d.class=i),s&&(d["data-name"]=s),e.paper.lineToBack(d)}for(var h=[["M",t,n],["L",t,a],["L",c,a],["L",c,n],["z"]],d={path:""},l=0;l<h.length;l++)d.path+=h[l].join(" ");return i&&(d.class=i),s&&(d["data-name"]=s),Sg.isInGroup()||(d.stroke="none",d.fill=e.foregroundColor),e.paper.pathToBack(d)}Il.exports=_g});var zl=L((Rb,Dl)=>{var Eg=Pt(),Lr=lt();function Ag(e,t,r,n,a,i,s){var o=e.foregroundColor;t=Lr(t),r=Lr(r);var c=Lr(n-s),h=Lr(n+s);if(e.firefox112){n+=s/2;var d={x1:t,x2:r,y1:n,y2:n,stroke:e.foregroundColor,"stroke-width":Math.abs(s*2)};return a&&(d.class=a),i&&(d["data-name"]=i),e.paper.lineToBack(d)}var l=Eg("M %f %f L %f %f L %f %f L %f %f z",t,c,r,c,r,h,t,h),f={path:l,stroke:"none",fill:o};i&&(f["data-name"]=i),a&&(f.class=a);var u=e.paper.pathToBack(f);return u}Dl.exports=Ag});var sn=L((Gb,Ol)=>{var Mg=zl();function Bg(e,t,r,n,a,i,s){var o=e.calcY(n);return Mg(e,t,r,o,a,i,s)}Ol.exports=Bg});var on=L((Yb,Hl)=>{var Tt=Ct(),Fl=Pr(),Ng=sn(),Pg=Mr();function Lg(e,t,r){t.pitch===void 0&&window.console.error(t.type+" Relative Element y-coordinate not set.");var n=e.calcY(t.pitch);switch(t.type){case"symbol":if(t.c===null)return null;var a="symbol";t.klass&&(a+=" "+t.klass),t.graphelem=Pg(e,t.x,t.pitch,t.c,{scalex:t.scalex,scaley:t.scaley,klass:e.controller.classes.generate(a),name:t.name});break;case"debug":t.graphelem=Tt(e,{x:t.x,y:e.calcY(15),text:""+t.c,type:"debugfont",klass:e.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:t.dim},!1);break;case"tabNumber":var i="middle",s="tabnumberfont",o="abcjs-tab-number";t.isGrace&&(s="tabgracefont",n+=2.5,o="tab-grace"),t.graphelem=Tt(e,{x:t.x,y:n,text:""+t.c,type:s,klass:e.controller.classes.generate(o),anchor:i,centerVertically:!1,dim:t.dim,cursor:"default"},!1);break;case"barNumber":t.graphelem=Tt(e,{x:t.x,y:n,text:""+t.c,type:"measurefont",klass:e.controller.classes.generate("bar-number"),anchor:"middle",dim:t.dim,name:"bar-number"},!0);break;case"lyric":t.graphelem=Tt(e,{x:t.x,y:n,text:t.c,type:"vocalfont",klass:e.controller.classes.generate("lyric"),anchor:"middle",dim:t.dim,name:"lyric"},!1);break;case"chord":t.graphelem=Tt(e,{x:t.x,y:n,text:t.c,type:"gchordfont",klass:e.controller.classes.generate("chord"),anchor:"middle",dim:t.dim,lane:t.getLane(),name:"chord"},!1);break;case"decoration":t.graphelem=Tt(e,{x:t.x,y:n+6,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:t.anchor,centerVertically:!0,dim:t.dim},!1);break;case"text":t.graphelem=Tt(e,{x:t.x,y:n,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"start",centerVertically:t.centerVertically,dim:t.dim,lane:t.getLane(),name:"annotation"},!1);break;case"multimeasure-text":t.graphelem=Tt(e,{x:t.x+t.w/2,y:n,text:t.c,type:"tempofont",klass:e.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:t.dim},!1);break;case"part":t.graphelem=Tt(e,{x:t.x,y:n,text:t.c,type:"partsfont",klass:e.controller.classes.generate("part"),anchor:"start",dim:t.dim,name:t.c},!0);break;case"bar":t.graphelem=Fl(e,t.x,t.linewidth+e.lineThickness,n,r||e.calcY(t.pitch2),null,"bar");break;case"stem":var c=t.linewidth>0?t.linewidth+e.lineThickness:t.linewidth-e.lineThickness;t.graphelem=Fl(e,t.x,c,n,e.calcY(t.pitch2),"abcjs-stem","stem");break;case"ledger":t.graphelem=Ng(e,t.x,t.x+t.w,t.pitch,"abcjs-ledger","ledger",.35+e.lineThickness);break}return t.scalex!==1&&t.graphelem&&qg(e.paper,t.graphelem,t.scalex,t.scaley,t.x,n),t.graphelem}function qg(e,t,r,n,a,i){e.setAttributeOnElement(t,{style:"transform:scale("+r+","+n+");transform-origin:"+a+"px "+i+"px;"})}Hl.exports=Lg});var Gl=L(($b,Rl)=>{var Ig=on(),cn=Ct();function Dg(e,t){var r=t.x;t.pitch===void 0&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo";var n=2,a=e.calcY(t.pitch)+2,i,s;if(t.tempo.preString){i=cn(e,{x:r,y:a,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0),s=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",i);var o=s.width,c=o/t.tempo.preString.length;r+=o+c}if(t.note){t.note.setX(r);for(var h=0;h<t.note.children.length;h++)Ig(e,t.note.children[h],r);r+=t.note.w+5;var d="= "+t.tempo.bpm;i=cn(e,{x:r,y:a,text:d,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"beats"}),s=e.controller.getTextSize.calc(d,"tempofont","tempo",i);var l=s.width,f=l/d.length;r+=l+f}t.tempo.postString&&cn(e,{x:r,y:a,text:t.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"post"},!0)}Rl.exports=Dg});var Xl=L((Wb,Wl)=>{var zg=Gl(),Og=on(),Fg=Me(),Yl=pr(),$l=Ar();function Hg(e,t,r,n,a){if(!t.invisible){var i=t.children.length>0&&t.children[0].type==="TempoElement";t.elemset=[],$l.beginGroup(e.paper,e.controller);for(var s=0;s<t.children.length;s++){var o=t.children[s];if(o.type==="TempoElement")zg(e,o);else{var c=Og(e,o,r);o.type==="symbol"&&o.c&&o.c.indexOf("notehead")>=0&&c.setAttribute("class","abcjs-notehead")}}var h=t.type;if((t.type==="note"||t.type==="rest")&&(t.counters=e.controller.classes.getCurrent(),h+=" d"+Math.round(t.durationClass*1e3)/1e3,h=h.replace(/\./g,"-"),t.abcelem.pitches))for(var d=0;d<t.abcelem.pitches.length;d++)h+=" p"+t.abcelem.pitches[d].pitch;var l=$l.endGroup(h,t.type);if(l){if(t.cloned&&(t.cloned.overrideClasses=l.className.baseVal),t.overrideClasses){var f=l.classList&&l.classList.length>0?l.classList[0]+" ":"";l.setAttribute("class",f+t.overrideClasses)}if(i)t.startChar=t.abcelem.startChar,t.endChar=t.abcelem.endChar,n.add(t,l,!1,a);else{t.elemset.push(l);var u=!1;(t.type==="note"||t.type==="tabNumber")&&(u=!0),n.add(t,l,u,a)}}else t.elemset.length>0&&n.add(t,t.elemset[0],t.type==="note",a);if(t.klass&&Yl(t.elemset,"mark","","#00ff00"),t.hint&&Yl(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t,t.heads&&t.heads.length>0){t.notePositions=[];for(var p=0;p<t.heads.length;p++)t.notePositions.push({x:t.heads[p].x+t.heads[p].w/2,y:a.zero-t.heads[p].pitch*Fg.STEP})}}}Wl.exports=Hg});var jl=L((Xb,Vl)=>{var Rg=dl(),Gg=vl(),Yg=Cl(),$g=Sl(),Wg=El(),Xg=Bl(),Ug=ql(),Vg=Ct(),Ul=Xl();function jg(e,t,r,n,a){var i=t.w-1;e.staffbottom=t.staff.bottom;var s=e.foregroundColor;if(t.color&&(e.foregroundColor=t.color),t.header){var o=Vg(e,{x:e.padding.left,y:e.calcY(t.headerPosition),text:t.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0,name:"voice-name"},!0);n.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:t.header},o)}var c,h,d=!1;for(c=0;c<t.children.length;c++){h=t.children[c],(h.type==="note"||h.type==="rest")&&(d=!0);var l=!1;h.type!=="staff-extra"&&!e.controller.classes.isInMeasure()&&(e.controller.classes.startMeasure(),l=!0),t.staff.isTabStaff&&(h.invisible=!1,h.type=="bar"&&h.abcelem.lastBar&&(r=t.topLine)),Ul(e,h,t.barto||c===t.children.length-1?r:0,n,a),(h.type==="note"||Kg(h))&&e.controller.classes.incrNote(),h.type==="bar"&&!l&&d&&e.controller.classes.incrMeasure()}for(e.controller.classes.startMeasure(),c=0;c<t.beams.length;c++){var f=t.beams[c];f==="bar"?e.controller.classes.incrMeasure():Ug(e,f,n)}for(e.controller.classes.startMeasure(),c=0;c<t.otherchildren.length;c++)if(h=t.otherchildren[c],h==="bar")e.controller.classes.incrMeasure();else switch(h.type){case"GlissandoElem":h.elemset=Rg(e,h,n);break;case"CrescendoElem":h.elemset=Gg(e,h,n);break;case"DynamicDecoration":h.elemset=Yg(e,h,n);break;case"TripletElem":$g(e,h,n);break;case"EndingElem":h.elemset=Wg(e,h,t.startx+10,i,n);break;case"TieElem":h.elemset=Xg(e,h,t.startx+10,i,n);break;default:console.log(h),Ul(e,h,t.startx+10,i,n,a)}e.foregroundColor=s}function Kg(e){return e.type!=="rest"?!1:!!(e.abcelem&&e.abcelem.rest&&e.abcelem.rest.type!=="spacer")}Vl.exports=jg});var Zl=L((Ub,Ql)=>{var Kl=sn();function Qg(e,t,r,n,a,i){var s="abcjs-top-line",o=2;a&&(o=a),e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")});var c=0,h=0;if(n===1)Kl(e,t,r,6,s,null,i+e.lineThickness),c=e.calcY(10),h=e.calcY(2);else for(var d=n-1;d>=0;d--){var l=(d+1)*o;h=e.calcY(l),c===0&&(c=h),Kl(e,t,r,l,s,null,i+e.lineThickness),s=void 0}return e.paper.closeGroup(),[c,h]}Ql.exports=Qg});var e1=L((Vb,Jl)=>{function Zg(e,t,r){var n=e.paper.rectBeneath(t);return r&&e.paper.text(r,{x:0,y:t.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),n}Jl.exports=Zg});var r1=L((jb,t1)=>{function Jg(e,t){var r="rgba(0,0,0,255)",n="rgba(0,0,0,0)",a=Math.round(e.y),i=e.controller.width,s=(i-t)/2,o=s+t,c="M "+s+" "+a+" L "+o+" "+a+" L "+o+" "+(a+1)+" L "+s+" "+(a+1)+" L "+s+" "+a+" z";e.paper.pathToBack({path:c,stroke:n,fill:r,class:e.controller.classes.generate("defined-text")})}t1.exports=Jg});var ln=L((Kb,a1)=>{var ev=r1(),tv=Ct();function rv(e,t,r){for(var n=0;n<t.rows.length;n++){var a=t.rows[n];if(a.absmove)e.absolutemoveY(a.absmove);else if(a.move)e.moveY(a.move);else if(a.text||a.phrases){var i=a.left?a.left:0,s=tv(e,{x:i,y:e.y,text:a.text,phrases:a.phrases,"dominant-baseline":a["dominant-baseline"],type:a.font,klass:a.klass,name:a.name,anchor:a.anchor});a.absElemType&&r.wrapSvgEl({el_type:a.absElemType,name:a.name,startChar:a.startChar,endChar:a.endChar,text:a.text},s)}else if(a.separator)ev(e,a.separator);else if(a.startGroup)e.paper.openGroup({klass:a.klass,"data-name":a.name});else if(a.endGroup){var o=e.paper.closeGroup();a.absElemType&&r.wrapSvgEl({el_type:a.absElemType,name:a.name,startChar:a.startChar,endChar:a.endChar,text:""},o)}}}a1.exports=rv});var s1=L((Qb,i1)=>{var d0=Me(),av=hl(),nv=jl(),iv=Zl(),qr=e1(),sv=Pr(),ov=ln();function cv(e,t,r,n){for(var a,i=e.y,s=0;s<t.staffs.length;s++){var o=t.staffs[s];e.moveY(d0.STEP,o.top),o.absoluteY=e.y,e.showDebug&&(e.showDebug.indexOf("box")>=0&&o.voices&&lv(e,t.voices,o.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:i,y2:i,stroke:"#0000ff"}),qr(e,{x:e.padding.left,y:e.calcY(o.originalTop),width:e.controller.width,height:e.calcY(o.originalBottom)-e.calcY(o.originalTop),fill:e.foregroundColor,stroke:e.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),a=0,b(o,"chordHeightAbove"),b(o,"chordHeightBelow"),b(o,"dynamicHeightAbove"),b(o,"dynamicHeightBelow"),b(o,"endingHeightAbove"),b(o,"lyricHeightAbove"),b(o,"lyricHeightBelow"),b(o,"partHeightAbove"),b(o,"tempoHeightAbove"),b(o,"volumeHeightAbove"),b(o,"volumeHeightBelow"))),e.moveY(d0.STEP,-o.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var c,h,d=2,l=0,f=0;f<t.voices.length;f++){var u=t.voices[f].staff,p=t.voices[f].tabNameInfos;if(e.y=u.absoluteY,e.controller.classes.incrVoice(),!t.voices[f].duplicate){if(c||(c=e.calcY(10)),h=e.calcY(d),u.lines!==0){u.linePitch&&(d=u.linePitch),e.controller.classes.newMeasure();var g=iv(e,t.startx,t.w,u.lines,u.linePitch,.35);h=g[1],u.bottomLine=h,u.topLine=g[0],u.hasTab&&(l=u.topLine),u.hasStaff&&(l=u.hasStaff.topLine,t.voices[f].barto=!0,t.voices[f].topLine=c)}n1(e,u.absoluteY,t.brace,f,r),n1(e,u.absoluteY,t.bracket,f,r)}nv(e,t.voices[f],l,r,{top:i,zero:e.y,height:t.height*d0.STEP});var v=0;if(p){var m={rows:[]};m.rows.push({absmove:h+2});var w=8;m.rows.push({left:t.startx+w,text:p.name,font:"tablabelfont",klass:"text instrument-name",anchor:"start"}),m.rows.push({move:p.textSize.height}),ov(e,m),v=p.textSize.height}e.controller.classes.newMeasure(),t.voices[f].duplicate||(l=e.calcY(2+v))}e.controller.classes.newMeasure();var k=t.staffs.length;k>1&&(c=t.staffs[0].topLine,h=t.staffs[k-1].bottomLine,sv(e,t.startx,.6,c,h,null)),e.y=i;function b(y,C){var A=["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(y.positionY&&y.positionY[C]){var P=y.specialY[C]*d0.STEP;C==="chordHeightAbove"&&y.specialY.chordLines&&y.specialY.chordLines.above&&(P*=y.specialY.chordLines.above),C==="chordHeightBelow"&&y.specialY.chordLines&&y.specialY.chordLines.below&&(P*=y.specialY.chordLines.below),qr(e,{x:e.padding.left,y:e.calcY(y.positionY[C]),width:e.controller.width,height:P,fill:A[a],stroke:A[a],"fill-opacity":.4,"stroke-opacity":.4},C.substr(0,4)),a+=1,a>6&&(a=0)}}}function n1(e,t,r,n,a){if(r)for(var i=0;i<r.length;i++)r[i].isStartVoice(n)&&(r[i].startY=t-d0.STEP*10,r[i].elemset=av(e,r[i],a))}function lv(e,t,r){for(var n=0;n<r.length;n++)for(var a=t[r[n]].children,i=0;i<a.length;i++){var s=a[i],o=s.getFixedCoords();if(!(s.invisible||o.t===void 0||o.b===void 0)){var c=(o.t-o.b)*d0.STEP;qr(e,{x:o.x,y:e.calcY(o.t),width:o.w,height:c,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var h=0;h<s.children.length;h++){var d=s.children[h],l=d.getChordDim();if(l){var f=e.calcY(d.pitch);f+=d.dim.font.size*d.getLane(),qr(e,{x:l.left,y:f,width:l.right-l.left,height:d.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}i1.exports=cv});var c1=L((Zb,o1)=>{function hv(e,t,r,n){var a=(t+e.padding.left+e.padding.right)*r,i=(e.y+e.padding.bottom)*r;if(e.isPrint&&(i=Math.max(i,1056)),e.ariaLabel!==""){var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s);var o=e.ariaLabel?e.ariaLabel:s;e.paper.setAttribute("aria-label",o)}var c=["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"];e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+c.join(" ")+"}");var h={overflow:"hidden"};n==="resize"?e.paper.setResponsiveWidth(a,i):(h.width="",h.height=i+"px",r<1?(h.width=a+"px",e.paper.setSize(a/r,i/r)):e.paper.setSize(a,i)),e.paper.setScale(r),e.paper.setParentStyles(h)}o1.exports=hv});var h1=L((Jb,l1)=>{var fv=Ea(),uv=Aa();function H0(e,t,r){this.elements=[],this.paper=e,this.tuneNumber=r,this.selectTypes=t}H0.prototype.getElements=function(){return this.elements};H0.prototype.add=function(e,t,r,n){if(this.canSelect(e)){var a;this.selectTypes===void 0?a={selectable:!1,"data-index":this.elements.length}:a={selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,a);var i={absEl:e,svgEl:t,isDraggable:r};n!==void 0&&(i.staffPos=n),this.elements.push(i)}};H0.prototype.canSelect=function(e){return this.selectTypes===!1||!e||!e.abcelem?!1:this.selectTypes===!0?!0:this.selectTypes===void 0?e.abcelem.el_type==="note"||e.abcelem.el_type==="tabNumber":this.selectTypes.indexOf(e.abcelem.el_type)>=0};H0.prototype.wrapSvgEl=function(e,t){var r={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:fv,unhighlight:uv};this.add(r,t,!1)};l1.exports=H0});var g1=L((em,p1)=>{var R0=Mr(),dv=Pr();function pv(e,t,r,n,a){let i=a.gchordfont,s=a.partsfont,o=a.annotationfont,c=a.repeatfont,h=a.textfont,d=a.subtitlefont,l=50,f=10,u=14,p=10,g=20,v=16;e.paper.openGroup({klass:"abcjs-chord-grid"}),t.forEach(m=>{switch(m.type){case"text":p0(e,m.text,r,e.y,16,h,null,null,!1),e.moveY(v);break;case"subtitle":p0(e,m.subtitle,r,e.y+p,20,d,null,"abcjs-subtitle",!1),e.moveY(g);break;case"part":if(m.lines.length>0){p0(e,m.name,r,e.y+p,20,d,m.name,"abcjs-part",!1),e.moveY(g);let w=m.lines[0].length,k=n/w;m.lines.forEach((b,y)=>{let C=!1,A=!1;b.forEach(_=>{_.ending&&(C=!0),_.annotations&&_.annotations.length>0&&(A=!0)});let P=A?u:C?f:0;b.forEach((_,B)=>{if(!_.noBorder){e.paper.rect({x:r+B*k,y:e.y,width:k,height:P+l}),e.paper.rect({x:r+B*k+1,y:e.y+1,width:k-2,height:P+l-2});let q=0,I=0,G=e.y,Y=r+k*B;_.hasStartRepeat&&(f1(e,Y,G,G+l+P,!0,P),q=12),_.hasEndRepeat&&(f1(e,Y+k,G,G+l+P,!1,P),I=12);let Z=0;_.ending&&(Z=p0(e,_.ending,r+B*k+4,G+10,12,c,null,null,!1).getBBox().width+4),bv(e,G,r+q,k,y,B,_.chord,i,q+I,l,P),_.annotations&&_.annotations.length>0&&vv(e,G,r+B*k+Z,_.annotations,o),P&&e.paper.rectBeneath({x:r+B*k,y:e.y,width:k,height:P,fill:"#e8e8e8",stroke:"none"})}}),e.moveY(P+l)}),e.moveY(g)}break}}),e.paper.closeGroup()}function gv(e,t,r,n){var a=t-10,i=t+10,s=r+10,o=r-10,c=t-10,h=-e.yToPitch(n)+2,d=t+6.5,l=-e.yToPitch(n)-2.3;e.paper.lineToBack({x1:a,x2:i,y1:s,y2:o,"stroke-width":"3px","stroke-linecap":"round"}),R0(e,c,h,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),R0(e,d,l,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"})}function f1(e,t,r,n,a,i){let s=a?t+2:t-4,o=a?t+9:t-11;e.paper.openGroup({klass:"abcjs-repeat"}),dv(e,s,3+e.lineThickness,r,n,null,"bar"),R0(e,o,-e.yToPitch(i)-4,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),R0(e,o,-e.yToPitch(i)-8,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),e.paper.closeGroup()}var u1={segno:"scripts.segno",coda:"scripts.coda",fermata:"scripts.ufermata"};function vv(e,t,r,n,a){r+=3;let i;for(let s=0;s<n.length;s++)switch(n[s]){case"segno":case"coda":case"fermata":{r+=12,i=R0(e,r,-3,u1[n[s]],{scalex:1,scaley:1,name:u1[n[s]]});let o=i.getBBox();r+=o.width}break;default:p0(e,n[s],r,t+12,12,a,null,null,!1)}}function bv(e,t,r,n,a,i,s,o,c,h,d){let l=r+n*i;!s[1]&&!s[2]&&!s[3]?yv(e,l,t+d,n-c,h,s[0],o,d):!s[1]&&!s[3]?wv(e,l,t,n-c,h,s[0],s[2],o,d):xv(e,l,t,n-c,h,s,o,d)}function Xt(e,t,r,n,a,i,s){let o=p0(e,a,t,r,n,i,null,"abcjs-chord",!0),c=o.getBBox(),h=n;for(;c.width>s&&h>=14;)h-=2,o.setAttribute("font-size",h),c=o.getBBox()}var mv=34,d1=26,Ir=20,Ut=-3;function yv(e,t,r,n,a,i,s,o){i==="%"?gv(e,t+n/2,r+a/2,o+a/2):Xt(e,t+n/2,r+a/2+Ut,mv,i,s,n)}function wv(e,t,r,n,a,i,s,o,c){e.paper.lineToBack({x1:t,x2:t+n,y1:r+a+c,y2:r+2}),Xt(e,t+n/4,r+a/4+5+c+Ut,d1,i,o,n/2),Xt(e,t+3*n/4,r+3*a/4+c+Ut,d1,s,o,n/2)}function xv(e,t,r,n,a,i,s,o){e.paper.lineToBack({x1:t+3,x2:t+n-3,y1:r+a/2+o,y2:r+a/2+o}),e.paper.lineToBack({x1:t+n/2,x2:t+n/2,y1:r+3+o,y2:r+a-3+o}),i[0]&&Xt(e,t+n/4,r+a/4+2+o+Ut,Ir,Dr(i[0]),s,n/2),i[1]&&Xt(e,t+3*n/4,r+a/4+2+o+Ut,Ir,Dr(i[1]),s,n/2),i[2]&&Xt(e,t+n/4,r+3*a/4+o+Ut,Ir,Dr(i[2]),s,n/2),i[3]&&Xt(e,t+3*n/4,r+3*a/4+o+Ut,Ir,Dr(i[3]),s,n/2)}function Dr(e){return e==="No Chord"?"N.C.":e}function p0(e,t,r,n,a,i,s,o,c){let h={x:r,y:n,stroke:"none","font-size":a,"font-style":i.style,"font-family":i.face,"font-weight":i.weight,"text-decoration":i.decoration};return s&&(h["data-name"]=s),o&&(h.class=o),h["text-anchor"]=c?"middle":"start",e.paper.text(t,h,null,{"alignment-baseline":"middle"})}p1.exports=pv});var m1=L((tm,b1)=>{var kv=s1(),Cv=c1(),hn=ln(),v1=Me(),Tv=h1(),Sv=g1();function _v(e,t,r,n,a,i,s,o,c,h,d){var l=new Tv(e.paper,o,c),f={};t.shouldAddClasses&&(f.klass="abcjs-meta-top"),e.paper.openGroup(f),e.moveY(e.padding.top),hn(e,r.topText,l),e.paper.closeGroup(),e.moveY(e.spacing.music);let u=!1;d&&r.chordGrid&&(Sv(e,r.chordGrid,e.padding.left,n,r.formatting),d==="noMusic"&&(u=!0));var p=[],g=0;if(!u)for(var v=0;v<r.lines.length;v++){t.incrLine();var m=r.lines[v];if(m.staff){if(g++,r.formatting.maxStaves&&g>r.formatting.maxStaves)break;t.shouldAddClasses&&(f.klass="abcjs-staff-wrapper abcjs-l"+t.lineNumber),e.paper.openGroup(f),m.vskip&&e.moveY(m.vskip),p.length>=1&&Av(e,e.spacing.staffSeparation,p[p.length-1],m.staffGroup);var w=Ev(e,m.staffGroup,l,v);w.line=h+v,p.push(w),e.paper.closeGroup()}else m.nonMusic&&(t.shouldAddClasses&&(f.klass="abcjs-non-music"),e.paper.openGroup(f),hn(e,m.nonMusic,l),e.paper.closeGroup())}return t.reset(),u||r.bottomText&&r.bottomText.rows&&r.bottomText.rows.length>0&&(t.shouldAddClasses&&(f.klass="abcjs-meta-bottom"),e.paper.openGroup(f),e.moveY(24),hn(e,r.bottomText,l),e.paper.closeGroup()),Cv(e,a,s,i),{staffgroups:p,selectables:l.getElements()}}function Ev(e,t,r,n){kv(e,t,r,n);var a=t.height*v1.STEP;return e.y+=a,t}function Av(e,t,r,n){var a=r.staffs[r.staffs.length-1],i=-(a.bottom-2),s=n.staffs[0].top-10,o=s+i,c=o*v1.STEP;c<t&&e.moveY(t-c)}b1.exports=_v});var w1=L((rm,y1)=>{var Mv=Ka();function Bv(e){for(var t=e;t&&t.attributes&&t.tagName.toLowerCase()!=="svg"&&!t.attributes.selectable;)t=t.parentNode;if(t&&t.attributes&&t.attributes.selectable){var r=t.attributes["data-index"].nodeValue;if(r&&(r=parseInt(r,10),r>=0&&r<this.selectables.length)){var n=this.selectables[r],a=Mv(n,e);return a.index=r,a.element=n,a}}return null}y1.exports=Bv});var fn=L((am,S1)=>{var Nv=Me(),Pv=Zo(),Lv=nc(),qv=sc(),Iv=cc(),Dv=hc(),x1=pc(),zv=bc(),Ov=Ec(),k1=Qc(),Fv=Jc(),C1=tl(),T1=al(),Hv=m1(),Rv=za(),Gv=w1(),bt=function(e,t){t=t||{},this.findSelectableElement=Gv,this.oneSvgPerLine=t.oneSvgPerLine,this.selectionColor=t.selectionColor,this.dragColor=t.dragColor?t.dragColor:t.selectionColor,this.dragging=!!t.dragging,this.selectTypes=t.selectTypes,this.responsive=t.responsive,this.space=3*Nv.SPACE,this.initialClef=t.initialClef,this.timeBasedLayout=t.timeBasedLayout,this.expandToWidest=!!t.expandToWidest,this.scale=t.scale?parseFloat(t.scale):0,this.classes=new Fv({shouldAddClasses:t.add_classes}),this.scale>.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new Lv(e),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),t.jazzchords&&(this.jazzchords=t.jazzchords),t.accentAbove&&(this.accentAbove=t.accentAbove),t.germanAlphabet&&(this.germanAlphabet=t.germanAlphabet),t.lineThickness&&(this.lineThickness=t.lineThickness),t.chordGrid&&(this.chordGrid=t.chordGrid),this.renderer.controller=this,this.renderer.foregroundColor=t.foregroundColor?t.foregroundColor:"currentColor",t.ariaLabel!==void 0&&(this.renderer.ariaLabel=t.ariaLabel),this.renderer.minPadding=t.minPadding?t.minPadding:0,this.reset()};bt.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)};bt.prototype.engraveABC=function(e,t,r){e[0]===void 0&&(e=[e]),this.reset();for(var n=0;n<e.length;n++)t===void 0&&(t=n),this.getFontAndAttr=new C1(e[n].formatting,this.classes),this.getTextSize=new T1(this.getFontAndAttr,this.renderer.paper),this.engraveTune(e[n],t,r)};bt.prototype.adjustNonScaledItems=function(e){this.width/=e,this.renderer.adjustNonScaledItems(e)};bt.prototype.getMeasureWidths=function(e){this.reset(),this.getFontAndAttr=new C1(e.formatting,this.classes),this.getTextSize=new T1(this.getFontAndAttr,this.renderer.paper);var t=this.jazzchords;this.setupTune(e,0),this.constructTuneElements(e),k1(this.renderer,e,0,this.space,this.timeBasedLayout);for(var r=[],n,a=!0,i=0;i<e.lines.length;i++){var s=e.lines[i];if(s.staff){if(a&&(n={left:0,measureWidths:[],total:0},r.push(n),a=!1),s.staffGroup.voices.length>0)for(var o=s.staffGroup.voices[0],c=!1,h=0,d=0;d<o.children.length;d++){var l=o.children[d];!c&&!l.isClef&&!l.isKeySig&&(c=!0,n.left=l.x,h=l.x),l.type==="bar"&&(n.measureWidths.push(l.x-h),n.total+=l.x-h,h=l.x)}}else a=!0}return this.jazzchords=t,r};bt.prototype.setupTune=function(e,t){this.classes.reset(),e.formatting.jazzchords!==void 0&&(this.jazzchords=e.formatting.jazzchords),e.formatting.accentAbove!==void 0&&(this.accentAbove=e.formatting.accentAbove),this.renderer.newTune(e),this.engraver=new Pv(this.getTextSize,t,{bagpipes:e.formatting.bagpipes,flatbeams:e.formatting.flatbeams,graceSlurs:e.formatting.graceSlurs!==!1,percmap:e.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=e.getMeterFraction().num/e.getMeterFraction().den,e.formatting.staffwidth?this.width=e.formatting.staffwidth*1.33:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var r=e.formatting.scale?e.formatting.scale:this.scale;return this.responsive==="resize"&&(r=void 0),r===void 0&&(r=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(r),r};bt.prototype.constructTuneElements=function(e){e.topText=new x1(e.metaText,e.metaTextInfo,e.formatting,e.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize);var t,r,n=!1,a=!1;for(t=0;t<e.lines.length;t++)if(r=e.lines[t],r.staff)a=!0,r.staffGroup=this.engraver.createABCLine(r.staff,n?null:e.metaText.tempo,t),n=!0;else if(r.subtitle){if(a){var i=this.width/2+this.renderer.padding.left;r.nonMusic=new Dv(this.renderer.spacing.subtitle,e.formatting,r.subtitle,i,this.renderer.padding.left,this.getTextSize)}}else r.text!==void 0?(a=!0,r.nonMusic=new qv(r.text,r.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):r.separator!==void 0&&r.separator.lineLength&&(a=!0,r.nonMusic=new Iv(r.separator.spaceAbove,r.separator.lineLength,r.separator.spaceBelow));e.bottomText=new zv(e.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize)};bt.prototype.engraveTune=function(e,t,r){var n=this.jazzchords,a=this.setupTune(e,t);this.constructTuneElements(e);var i=k1(this.renderer,e,this.width,this.space,this.expandToWidest,this.timeBasedLayout);if(this.expandToWidest&&i>this.width+1&&(e.topText=new x1(e.metaText,e.metaTextInfo,e.formatting,e.lines,i,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),e.lines&&e.lines.length>0))for(var s=e.lines.length,o=0;o<s;++o){var c=e.lines[o];if(c.nonMusic&&c.nonMusic.rows&&c.nonMusic.rows.length>0)for(var h=c.nonMusic.rows.length,d=0;d<h;++d){var l=c.nonMusic.rows[d];l.left&&(c.subtitle?l.left=i/2+this.renderer.padding.left:c.text&&c.text.length>0&&c.text[0].center&&(l.left=i/2+this.renderer.padding.left))}}e.tablatures&&Rv.layoutTablatures(this.renderer,e);var f=Hv(this.renderer,this.classes,e,this.width,i,this.responsive,a,this.selectTypes,t,r,this.chordGrid);if(this.staffgroups=f.staffgroups,this.selectables=f.selectables,this.oneSvgPerLine){var u=this.renderer.paper.svg.parentNode;this.svgs=Yv(this.renderer,u,e.metaText.title,this.responsive,a)}else this.svgs=[this.renderer.paper.svg];Ov(this,this.svgs),this.jazzchords=n};function Yv(e,t,r,n,a){r||(r="Untitled");var i=t.querySelector("svg");n==="resize"&&(t.style.paddingBottom="");for(var s=i.querySelector("style"),o=n==="resize"?i.viewBox.baseVal.width:i.getAttribute("width"),c=t.querySelectorAll("svg > g"),h=0,d=[],l=[],f=0;f<c.length;f++){var u=c[f],p=u.getBBox(),g=p.y-h,v=p.height+g,m=document.createElement("div"),w="overflow: hidden;";n!=="resize"&&(w+="height:"+v*a+"px;"),m.setAttribute("style",w);var k=$v(i),b='Sheet Music for "'+r+'" section '+(f+1);k.setAttribute("aria-label",b),n!=="resize"&&k.setAttribute("height",v),n==="resize"&&(k.style.position="");var y=e.firefox112?v+1:v;k.setAttribute("viewBox","0 "+h+" "+o+" "+y),k.appendChild(s.cloneNode(!0));var C=document.createElement("title");C.innerText=b,k.appendChild(C),k.appendChild(u),m.appendChild(k),l.push(k),t.appendChild(m),h=p.y+p.height}return t.removeChild(i),l}function $v(e){for(var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg"),n=0;n<e.attributes.length;n++){var a=e.attributes[n];a.name!=="height"&&a.name!="aria-label"&&r.setAttribute(a.name,a.value)}return r}bt.prototype.getDim=function(e){if(!e.dim){var t=e.svgEl.getBBox();e.dim={left:Math.round(t.x),top:Math.round(t.y),right:Math.round(t.x+t.width),bottom:Math.round(t.y+t.height)}}return e.dim};bt.prototype.addSelectListener=function(e){this.listeners[this.listeners.length]=e};S1.exports=bt});var un=L((im,M1)=>{var Wv=M0(),nm=wa(),E1=fn(),Xv=Ta(),Uv=ga(),zr={};function _1(){var e=window.innerWidth;for(var t in zr)if(zr.hasOwnProperty(t)){var r=zr[t],n=r.offsetLeft;e-=n*2,r.style.width=e+"px"}}try{window.addEventListener("resize",_1),window.addEventListener("orientationChange",_1)}catch{}function A1(e,t,r,n,a){r.viewportHorizontal?(e.innerHTML='<div class="abcjs-inner"></div>',r.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",zr[e.id]=e,e=e.children[0]):r.viewportVertical?(e.innerHTML='<div class="abcjs-inner scroll-amount"></div>',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var i=new E1(e,r);if(i.engraveABC(t,n,a),t.engraver=i,r.viewportVertical||r.viewportHorizontal){var s=e.parentNode;s.style.width=e.style.width}}var Vv=function(e,t,r,n,a){var i={},s;if(r){for(s in r)r.hasOwnProperty(s)&&(i[s]=r[s]);i.warnings_id&&i.tablature&&(i.tablature.warning_id=i.warnings_id)}if(n)for(s in n)n.hasOwnProperty(s)&&(s==="listener"?n[s].highlight&&(i.clickListener=n[s].highlight):i[s]=n[s]);if(a)for(s in a)a.hasOwnProperty(s)&&(i[s]=a[s]);function o(c,h,d,l){var f=!1;return c==="*"&&(f=!0,c=document.createElement("div"),c.setAttribute("style","visibility: hidden;"),document.body.appendChild(c)),!f&&i.wrap&&i.staffwidth?(h=jv(c,h,d,l,i),h):(i.afterParsing&&i.afterParsing(h,d,l),A1(c,h,i,d,0),f&&c.parentNode.removeChild(c),null)}return Wv.renderEngine(o,e,t,i)};function jv(e,t,r,n,a){var i=new E1(e,a),s=i.getMeasureWidths(t),o=Uv.calcLineWraps(t,s,a);if(o.reParse){var c=new Xv;c.parse(n,o.revisedParams),t=c.getTune();var h=c.getWarnings();h&&(t.warnings=h)}return a.afterParsing&&a.afterParsing(t,r,n),A1(e,t,o.revisedParams,r,0),t.explanation=o.explanation,t}M1.exports=Vv});var N1=L((sm,B1)=>{var Kv=M0(),Qv=fn(),Zv=function(e,t){function r(n,a,i,s){n=document.createElement("div"),n.setAttribute("style","visibility: hidden;"),document.body.appendChild(n);var o=new Qv(n,t),c=o.getMeasureWidths(a);return n.parentNode.removeChild(n),{sections:c}}return Kv.renderEngine(r,"*",e,t)};B1.exports=Zv});var Or=L((om,P1)=>{var Jv={};P1.exports=Jv});var q1=L((cm,L1)=>{var dn=Or(),e6=function(e,t,r,n){dn[t]||(dn[t]={});var a=dn[t];return a[r]||(a[r]=new Promise(function(i,s){var o=new XMLHttpRequest;let c=e+t+"-mp3/"+r+".mp3";o.open("GET",c,!0),o.responseType="arraybuffer",o.onload=function(){if(o.status!==200){s(Error("Can't load sound at "+c+" status="+o.status));return}var h=function(l){i({instrument:t,name:r,status:"loaded",audioBuffer:l})},d=n.decodeAudioData(o.response,h,function(){s(Error("Can't decode sound at "+c))});d&&typeof d.catch=="function"&&d.catch(s)},o.onerror=function(){s(Error("Can't load sound at "+c))},o.send()}).catch(i=>{throw console.error("Didn't load note",t,r,":",i.message),i})),a[r]};L1.exports=e6});var Fr=L((lm,I1)=>{var t6=["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"];I1.exports=t6});var z1=L((hm,D1)=>{var pn=Fr(),r6=function(e){for(var t=[],r=0;r<e.tracks.length;r++)t.push([]);var n={},a=pn[0];return e.tracks.forEach(function(i,s){i.forEach(function(o){switch(o.cmd){case"note":var c=o.instrument!==void 0?pn[o.instrument]:a;if(o.duration>0){var h=o.gap?o.gap:0,d=o.duration;h=Math.min(h,d*2/3);var l={pitch:o.pitch,instrument:c,start:Math.round(o.start*1e6)/1e6,end:Math.round((o.start+d-h)*1e6)/1e6,volume:o.volume};o.startChar&&(l.startChar=o.startChar),o.endChar&&(l.endChar=o.endChar),o.style&&(l.style=o.style),o.cents&&(l.cents=o.cents),t[s].push(l)}break;case"program":a=pn[o.instrument];break;case"text":break;default:console.log("Unhandled midi event",o)}})}),t};D1.exports=r6});var G0=L((fm,O1)=>{function a6(e){if(e)window.abcjsAudioContext=e;else if(!window.abcjsAudioContext){var t=window.AudioContext||window.webkitAudioContext;if(t)window.abcjsAudioContext=new t;else return!1}return window.abcjsAudioContext.state!=="suspended"}O1.exports=a6});var Vt=L((um,F1)=>{var n6=G0();function i6(){return window.abcjsAudioContext||n6(),window.abcjsAudioContext}F1.exports=i6});var Y0=L((dm,H1)=>{var s6=Vt();function o6(){if(!window.Promise||!window.AudioContext&&!window.webkitAudioContext&&!navigator.mozAudioContext&&!navigator.msAudioContext)return!1;var e=s6();if(e)return e.resume!==void 0}H1.exports=o6});var Hr=L((pm,R1)=>{var c6={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"};R1.exports=c6});var Y1=L((gm,G1)=>{var l6=function(e){return window.URL.createObjectURL(h6(e.audioBuffers))};function h6(e){var t=e[0],r=t.numberOfChannels,n=t.length*r*2+44,a=new ArrayBuffer(n),i=new DataView(a),s=[],o,c,h=0,d=0;for(f(1179011410),f(n-8),f(1163280727),f(544501094),f(16),l(1),l(r),f(t.sampleRate),f(t.sampleRate*2*r),l(r*2),l(16),f(1635017060),f(n-d-4),o=0;o<r;o++)s.push(t.getChannelData(o));for(;d<n;){for(o=0;o<s.length;o++)c=Math.max(-1,Math.min(1,s[o][h])),c=(.5+c<0?c*32768:c*32767)|0,i.setInt16(d,c,!0),d+=2;h++}return new Blob([a],{type:"audio/wav"});function l(u){i.setUint16(d,u,!0),d+=2}function f(u){i.setUint32(d,u,!0),d+=4}}G1.exports=l6});var gn=L((vm,$1)=>{function f6(e){return Math.pow(2,e/1200)}$1.exports=f6});var U1=L((bm,X1)=>{var W1=Or(),u6=Hr(),d6=gn();function p6(e,t,r,n,a,i,s,o,c){var h=window.OfflineAudioContext||window.webkitOfflineAudioContext,d=r.len*r.tempoMultiplier;i&&(d+=i/1e3),d-=o,d<0&&(d=.005);var l=new h(2,Math.floor((d+s)*t),t),f=u6[r.pitch];if(!W1[r.instrument])return c&&c("placeNote skipped (instrument empty): "+r.instrument+":"+f),Promise.resolve();var u=W1[r.instrument][f];return u?u.then(function(p){var g=l.createBufferSource();g.buffer=p.audioBuffer;var v=r.volume/96*a;g.gainNode=l.createGain(),r.pan&&l.createStereoPanner&&(g.panNode=l.createStereoPanner(),g.panNode.pan.setValueAtTime(r.pan,0)),g.gainNode.gain.value=v,g.gainNode.gain.linearRampToValueAtTime(g.gainNode.gain.value,d),g.gainNode.gain.linearRampToValueAtTime(0,d+s),r.cents&&(g.playbackRate.value=d6(r.cents)),g.panNode?(g.panNode.connect(l.destination),g.gainNode.connect(g.panNode)):g.gainNode.connect(l.destination),g.connect(g.gainNode),g.start(0),g.noteOff?g.noteOff(d+s):g.stop(d+s);var m;return l.oncomplete=function(w){if(w.renderedBuffer&&w.renderedBuffer.getChannelData)for(var k=0;k<n.length;k++){var b=n[k]*r.tempoMultiplier;i&&(b-=i/1e3),b<0&&(b=0),b=Math.floor(b*t),g6(e,w.renderedBuffer,b)}c&&c("placeNote: "+r.instrument+":"+f),m()},l.startRendering(),new Promise(function(w){m=w})}).catch(function(p){return c&&c("placeNote catch: "+p.message),Promise.reject(p)}):(c&&c("placeNote skipped: "+r.instrument+":"+f),Promise.resolve())}var g6=function(e,t,r){for(var n=0;n<2;n++)for(var a=t.getChannelData(n),i=e.getChannelData(n),s=0;s<a.length;s++)i[s+r]+=a[s]};X1.exports=p6});var Gr=L((mm,Q1)=>{var v6=q1(),b6=z1(),m6=G0(),pe=Vt(),y6=Y0(),w6=Hr(),Rr=Fr(),x6=Y1(),k6=U1(),V1=Or(),jt="MIDI is not supported in this browser.",j1="https://paulrosen.github.io/midi-js-soundfonts/abcjs/",K1="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/",C6="https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/";function T6(){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(n){n||(n={}),n.options&&(e.options=n.options),m6(n.audioContext);var a=pe().currentTime;if(e.debugCallback=n.debugCallback,e.debugCallback&&e.debugCallback("init called"),e.audioBufferPossible=e._deviceCapable(),!e.audioBufferPossible)return Promise.reject({status:"NotSupported",message:jt});var i=n.options?n.options:{};e.soundFontUrl=i.soundFontUrl?i.soundFontUrl:K1,e.soundFontUrl[e.soundFontUrl.length-1]!=="/"&&(e.soundFontUrl+="/"),i.soundFontVolumeMultiplier||i.soundFontVolumeMultiplier===0?e.soundFontVolumeMultiplier=i.soundFontVolumeMultiplier:e.soundFontUrl===K1||e.soundFontUrl===C6?e.soundFontVolumeMultiplier=3:e.soundFontUrl===j1?e.soundFontVolumeMultiplier=.4:e.soundFontVolumeMultiplier=1,i.programOffsets?e.programOffsets=i.programOffsets:e.soundFontUrl===j1?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=i.fadeLength!==void 0?parseInt(i.fadeLength,10):NaN;if(e.fadeLength=isNaN(s)?200:s,s=i.noteEnd!==void 0?parseInt(i.noteEnd,10):NaN,e.noteEnd=isNaN(s)?0:s,e.pan=i.pan,e.meterSize=1,n.visualObj){e.flattened=n.visualObj.setUpAudio(i);var o=n.visualObj.getMeterFraction();o.den&&(e.meterSize=o.num/o.den),e.pickupLength=n.visualObj.getPickupLength()}else if(n.sequence)e.flattened=n.sequence;else return Promise.reject(new Error("Must pass in either a visualObj or a sequence"));e.millisecondsPerMeasure=n.millisecondsPerMeasure?n.millisecondsPerMeasure:n.visualObj?n.visualObj.millisecondsPerMeasure(e.flattened.tempo):1e3,e.beatsPerMeasure=n.visualObj?n.visualObj.getBeatsPerMeasure():4,e.sequenceCallback=i.sequenceCallback,e.callbackContext=i.callbackContext,e.onEnded=i.onEnded,e.meterFraction=n.visualObj?n.visualObj.getMeterFraction():{den:1};var c={},h=[],d=[],l=Rr[0];e.flattened.tracks.forEach(function(v){v.forEach(function(m){if(m.cmd==="program"&&Rr[m.instrument]&&(l=Rr[m.instrument]),m.pitch!==void 0){var w=m.pitch,k=w6[w],b=m.instrument!==void 0?Rr[m.instrument]:l;if(k)if(c[b]||(c[b]={}),!V1[b]||!V1[b][k])c[b][k]=!0;else{var y=b+":"+k;h.indexOf(y)<0&&h.push(y)}else{var C=b+":"+k;console.log("Can't find note: ",w,C),d.indexOf(C)<0&&d.push(C)}}})}),e.debugCallback&&e.debugCallback("note gathering time = "+Math.floor((pe().currentTime-a)*1e3)+"ms"),a=pe().currentTime;var f=[];Object.keys(c).forEach(function(v){Object.keys(c[v]).forEach(function(m){f.push({instrument:v,note:m})})}),e.debugCallback&&e.debugCallback("notes "+JSON.stringify(f));for(var u=[],p=256,g=0;g<f.length;g+=p)u.push(f.slice(g,g+p));return new Promise(function(v,m){var w={cached:h,error:d,loaded:[]},k=0,b=function(){e.debugCallback&&e.debugCallback("loadBatch idx="+k+" len="+u.length),k<u.length?e._loadBatch(u[k],e.soundFontUrl,a).then(function(y){e.debugCallback&&e.debugCallback("loadBatch then"),a=pe().currentTime,y&&(y.error&&(w.error=w.error.concat(y.error)),y.loaded&&(w.loaded=w.loaded.concat(y.loaded))),k++,b()},m):(e.debugCallback&&e.debugCallback("resolve init"),v(w))};b()})},e._loadBatch=(function(n,a,i,s){var o=[];return n.forEach(function(c){e.debugCallback&&e.debugCallback("getNote "+c.instrument+":"+c.note),o.push(v6(a,c.instrument,c.note,pe()))}),Promise.all(o).then(function(c){e.debugCallback&&e.debugCallback("mp3 load time = "+Math.floor((pe().currentTime-i)*1e3)+"ms");for(var h=[],d=[],l=[],f=[],u=0;u<c.length;u++){var p=c[u],g=p.instrument+":"+p.name;p.status==="loaded"?h.push(g):p.status==="pending"?l.push(g):p.status==="cached"?d.push(g):f.push(g+" "+p.message)}if(l.length>0){if(e.debugCallback&&e.debugCallback("pending "+JSON.stringify(l)),s?s=s*2:s=50,s<9e4)return new Promise(function(w,k){setTimeout(function(){var b=[];for(u=0;u<l.length;u++)g=l[u].split(":"),b.push({instrument:g[0],note:g[1]});e.debugCallback&&e.debugCallback("retry "+JSON.stringify(b)),e._loadBatch(b,a,i,s).then(function(y){w(y)}).catch(function(y){k(y)})},s)});for(var v=[],m=0;m<n.length;m++)v.push(n[m].instrument+"/"+n[m].note);return e.debugCallback&&e.debugCallback("loadBatch timeout"),Promise.reject(new Error("timeout attempting to load: "+v.join(", ")))}else return e.debugCallback&&e.debugCallback("loadBatch resolve"),Promise.resolve({loaded:h,cached:d,error:f})}).catch(function(c){e.debugCallback&&e.debugCallback("loadBatch catch "+c.message)})}),e.prime=function(){var n=e.fadeLength/1e3;return e.isRunning=!1,e.audioBufferPossible?(e.debugCallback&&e.debugCallback("prime called"),new Promise(function(a,i){try{let k=function(b){var y=b&&b.audioBuffers&&b.audioBuffers.length>0?b.audioBuffers[0].duration:0;return{status:pe().state,duration:y}};var w=k,s=pe().currentTime,o=e.millisecondsPerMeasure/1e3/e.meterSize;if(e.duration=e.flattened.totalDuration*o,e.duration<=0)return e.audioBuffers=[],a({status:"empty",seconds:0});e.duration+=n;var c=Math.floor(pe().sampleRate*e.duration);e.stop();var h=b6(e.flattened);e.options.swing&&r(h,e.options.swing,e.meterFraction,e.pickupLength),e.sequenceCallback&&e.sequenceCallback(h,e.callbackContext);var d=t(h.length,e.pan),l={};h.forEach(function(b,y){var C=d&&d.length>y?d[y]:0;b.forEach(function(A){var P=A.instrument+":"+A.pitch+":"+A.volume+":"+Math.round((A.end-A.start)*1e3)/1e3+":"+C+":"+o+":"+(A.cents?A.cents:0);e.debugCallback&&e.debugCallback("noteMapTrack "+P),l[P]||(l[P]=[]),l[P].push(A.start)})});for(var f=[],u=pe().createBuffer(2,c,pe().sampleRate),p=0;p<Object.keys(l).length;p++){var g=Object.keys(l)[p],v=g.split(":"),m=v[6]!==void 0?parseFloat(v[6]):0;v={instrument:v[0],pitch:parseInt(v[1],10),volume:parseInt(v[2],10),len:parseFloat(v[3]),pan:parseFloat(v[4]),tempoMultiplier:parseFloat(v[5]),cents:m},f.push(k6(u,pe().sampleRate,v,l[g],e.soundFontVolumeMultiplier,e.programOffsets[v.instrument],n,e.noteEnd/1e3,e.debugCallback))}e.audioBuffers=[u],e.debugCallback&&(e.debugCallback("sampleRate = "+pe().sampleRate),e.debugCallback("totalSamples = "+c),e.debugCallback("creationTime = "+Math.floor((pe().currentTime-s)*1e3)+"ms")),Promise.all(f).then(function(){pe().state==="suspended"?pe().resume().then(function(){a(k(e))}):pe().state==="interrupted"?pe().suspend().then(function(){pe().resume().then(function(){a(k(e))})}):a(k(e))}).catch(function(b){i(b)})}catch(k){i(k)}})):Promise.reject(new Error(jt))};function t(n,a){if(a==null)return null;var i=[];if(a.length){for(var s=0;s<n;s++)if(s<a.length){var o=parseFloat(a[s]);o<-1?o=-1:o>1&&(o=1),i.push(o)}else i.push(0);return i}else{var c=parseFloat(a);if(c*(n-1)>2)return null;for(var h=n%2===0,d=h?0-c/2:0,l=d+c,f=0;f<n;f++)h=f%2===0,h?(i.push(d),d-=c):(i.push(l),l+=c);return i}return null}e.start=function(){if(!e.audioBufferPossible)throw new Error(jt);e.debugCallback&&e.debugCallback("start called");var n=e.pausedTimeSec?e.pausedTimeSec:0;e._kickOffSound(n),e.startTimeSec=pe().currentTime-n,e.pausedTimeSec=void 0,e.debugCallback&&e.debugCallback("MIDI STARTED",e.startTimeSec)},e.pause=function(){if(!e.audioBufferPossible)throw new Error(jt);return e.debugCallback&&e.debugCallback("pause called"),e.pausedTimeSec=e.stop(),e.pausedTimeSec},e.resume=function(){e.start()},e.seek=function(n,a){var i;switch(a){case"seconds":i=n;break;case"beats":i=n*e.millisecondsPerMeasure/e.beatsPerMeasure/1e3;break;default:i=(e.duration-e.fadeLength/1e3)*n;break}if(!e.audioBufferPossible)throw new Error(jt);e.debugCallback&&e.debugCallback("seek called sec="+i),e.isRunning?(e.stop(),e._kickOffSound(i)):e.pausedTimeSec=i,e.pausedTimeSec=i},e.stop=function(){e.isRunning=!1,e.pausedTimeSec=void 0,e.directSource.forEach(function(a){try{a.stop()}catch(i){console.log("direct source didn't stop:",i)}}),e.directSource=[];var n=pe().currentTime-e.startTimeSec;return n},e.finished=function(){e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.isRunning=!1},e.download=function(){return x6(e)},e.getAudioBuffer=function(){return e.audioBuffers[0]},e.getIsRunning=function(){return e.isRunning},e._deviceCapable=function(){return y6()?!0:(console.warn(jt),e.debugCallback&&e.debugCallback(jt),!1)},e._kickOffSound=function(n){e.isRunning=!0,e.directSource=[],e.audioBuffers.forEach(function(a,i){e.directSource[i]=pe().createBufferSource(),e.directSource[i].buffer=a,e.directSource[i].connect(pe().destination)}),e.directSource.forEach(function(a){a.start(0,n)}),e.onEnded&&(e.directSource[0].onended=function(){e.onEnded(e.callbackContext)})};function r(n,a,i,s){if(!(i.den!=4&&i.den!=8)&&(a=parseFloat(a),!(isNaN(a)||a<=50))){a>75&&(a=75),a=a/50-1;var o=0,c=.25;i.den===8&&(c=c/2);for(var h=c/2,d=h*a,l=0;l<n.length;l++)for(var f=n[l],u=0;u<f.length;u++){var p=f[u];if((p.start-s)%h==0&&(p.start-s)%c!=0&&(u==0||f[u-1].start<=f[u].start-h)&&(u==f.length-1||f[u+1].start>=f[u].start+h)){var g=p.start;p.start+=d,p.volume*=1+o,u>0&&f[u-1].end==g&&(f[u-1].end=p.start,f[u-1].volume*=1-o)}}}}}Q1.exports=T6});var vn=L((ym,Z1)=>{var S6=function(){var e=this;e.tracks=[],e.totalDuration=0,e.currentInstrument=[],e.starts=[],e.addTrack=function(){return e.tracks.push([]),e.currentInstrument.push(0),e.starts.push(0),e.tracks.length-1},e.setInstrument=function(t,r){e.tracks[t].push({channel:0,cmd:"program",instrument:r}),e.currentInstrument[t]=r},e.appendNote=function(t,r,n,a,i){var s={cmd:"note",duration:n,gap:0,instrument:e.currentInstrument[t],pitch:r,start:e.starts[t],volume:a};i&&(s.cents=i),e.tracks[t].push(s),e.starts[t]+=n,e.totalDuration=Math.max(e.totalDuration,e.starts[t])}};Z1.exports=S6});var eh=L((wm,J1)=>{var _6=`
|
|
100
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" preserveAspectRatio="xMidYMid meet">
|
|
101
|
+
<g transform="translate(0,700) scale(0.1,-0.1)" >
|
|
102
|
+
<path d="M3111 6981 c-20 -37 -90 -55 -364 -96 -120 -18 -190 -33 -244 -55
|
|
103
|
+
-42 -17 -124 -42 -182 -56 -78 -18 -119 -34 -157 -60 -28 -19 -86 -46 -128
|
|
104
|
+
-60 -43 -13 -107 -42 -144 -64 -37 -23 -84 -46 -106 -52 -21 -7 -56 -29 -79
|
|
105
|
+
-50 -22 -22 -61 -50 -86 -63 -26 -13 -67 -40 -91 -60 -24 -20 -65 -47 -90 -60
|
|
106
|
+
-25 -13 -53 -31 -61 -41 -8 -9 -32 -30 -54 -46 -75 -54 -486 -460 -512 -507
|
|
107
|
+
-15 -25 -48 -69 -75 -98 -26 -28 -48 -57 -48 -63 0 -6 -18 -29 -39 -53 -21
|
|
108
|
+
-23 -56 -71 -77 -107 -20 -36 -50 -80 -65 -97 -16 -18 -33 -52 -40 -75 -12
|
|
109
|
+
-47 -47 -115 -84 -166 -13 -18 -30 -56 -38 -83 -8 -27 -34 -80 -56 -118 -33
|
|
110
|
+
-53 -46 -91 -62 -167 -12 -63 -34 -127 -59 -179 -42 -84 -60 -166 -60 -270 0
|
|
111
|
+
-90 26 -122 125 -154 54 -17 96 -19 430 -20 305 -1 381 2 430 14 82 22 140 51
|
|
112
|
+
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
|
|
113
|
+
107 19 28 44 74 55 101 10 28 34 67 53 87 18 20 49 61 68 90 19 30 44 63 57
|
|
114
|
+
74 13 11 36 40 52 65 59 94 232 270 306 313 20 11 57 37 82 58 25 20 70 52
|
|
115
|
+
100 72 30 19 66 47 79 61 13 14 49 35 80 46 30 12 80 37 111 56 31 19 95 45
|
|
116
|
+
143 58 48 12 110 37 139 55 63 40 127 55 323 76 83 9 208 28 279 41 156 29
|
|
117
|
+
165 29 330 4 453 -71 514 -84 606 -130 31 -16 83 -36 116 -45 32 -9 84 -34
|
|
118
|
+
115 -56 31 -21 82 -48 113 -60 32 -11 72 -33 89 -48 18 -16 59 -45 92 -65 33
|
|
119
|
+
-21 74 -51 90 -66 17 -15 49 -40 73 -54 52 -32 65 -61 50 -113 -8 -31 -61 -90
|
|
120
|
+
-277 -308 -300 -303 -361 -382 -369 -481 -2 -29 0 -66 6 -81 13 -40 88 -138
|
|
121
|
+
115 -151 12 -6 54 -26 92 -44 l70 -33 945 -2 c520 -1 975 2 1012 7 64 8 191
|
|
122
|
+
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
|
|
123
|
+
7 -44 26 -64 55 -60 84 -77 97 -140 110 -44 9 -76 10 -127 2 -59 -9 -77 -17
|
|
124
|
+
-134 -62 -37 -28 -172 -155 -301 -281 -129 -127 -249 -237 -267 -245 -25 -10
|
|
125
|
+
-41 -11 -71 -2 -58 15 -112 45 -124 69 -6 11 -35 35 -64 54 -28 18 -58 41 -66
|
|
126
|
+
50 -8 9 -41 35 -75 58 -33 22 -77 56 -99 75 -21 18 -64 46 -95 61 -31 14 -73
|
|
127
|
+
39 -93 55 -20 15 -70 40 -110 55 -40 15 -97 44 -127 64 -29 21 -78 44 -107 53
|
|
128
|
+
-30 8 -77 31 -105 51 -42 28 -73 39 -173 60 -68 14 -154 39 -196 58 -95 43
|
|
129
|
+
-131 51 -343 76 -209 24 -242 32 -279 70 l-30 29 -328 0 c-312 0 -330 -1 -339
|
|
130
|
+
-19z"></path>
|
|
131
|
+
<path d="M254 2875 c-89 -16 -107 -26 -145 -78 -32 -44 -62 -66 -91 -67 -17 0
|
|
132
|
+
-18 -61 -18 -1140 l0 -1140 24 0 c16 0 41 -17 72 -50 40 -42 61 -55 117 -72
|
|
133
|
+
l69 -21 82 23 c44 12 96 30 114 39 18 9 148 132 290 272 141 141 267 261 279
|
|
134
|
+
268 51 26 86 14 176 -61 32 -26 62 -48 66 -48 5 0 36 -25 70 -55 34 -30 74
|
|
135
|
+
-61 89 -69 15 -8 37 -28 50 -45 12 -17 50 -45 84 -62 34 -17 78 -44 98 -60 19
|
|
136
|
+
-16 61 -37 93 -48 32 -11 81 -37 107 -56 27 -20 76 -45 109 -56 33 -12 75 -31
|
|
137
|
+
93 -44 62 -45 93 -58 191 -82 54 -12 130 -37 168 -54 68 -29 180 -58 226 -59
|
|
138
|
+
62 0 183 -64 183 -96 0 -12 88 -14 639 -14 l639 0 12 30 c18 44 76 66 233 89
|
|
139
|
+
89 14 160 30 200 47 34 15 106 42 159 60 54 18 112 44 130 57 47 35 85 52 146
|
|
140
|
+
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
|
|
141
|
+
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
|
|
142
|
+
48 380 362 408 405 15 23 40 51 55 63 15 12 36 38 46 58 11 21 37 57 58 82 22
|
|
143
|
+
25 49 62 62 83 13 20 38 56 57 78 19 23 50 74 69 113 19 39 46 86 59 104 14
|
|
144
|
+
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
|
|
145
|
+
47 103 68 206 10 52 32 117 51 155 29 56 33 74 34 140 0 94 -10 108 -101 138
|
|
146
|
+
-61 20 -83 21 -463 21 -226 0 -421 -4 -451 -10 -63 -12 -86 -30 -110 -85 -10
|
|
147
|
+
-22 -33 -63 -52 -92 -21 -31 -42 -80 -53 -123 -11 -44 -32 -93 -56 -128 -20
|
|
148
|
+
-32 -47 -83 -59 -115 -12 -32 -37 -77 -56 -100 -19 -23 -50 -65 -69 -94 -19
|
|
149
|
+
-29 -44 -57 -54 -63 -11 -5 -29 -27 -42 -47 -52 -85 -234 -277 -300 -315 -25
|
|
150
|
+
-15 -53 -38 -62 -51 -9 -14 -42 -39 -74 -57 -32 -18 -75 -48 -95 -66 -21 -18
|
|
151
|
+
-59 -44 -85 -58 -26 -13 -72 -40 -100 -59 -35 -24 -78 -41 -128 -52 -47 -11
|
|
152
|
+
-99 -31 -139 -56 -69 -42 -94 -49 -391 -110 -245 -51 -425 -66 -595 -50 -168
|
|
153
|
+
16 -230 27 -330 61 -47 16 -123 35 -170 44 -98 17 -123 25 -172 58 -20 14 -71
|
|
154
|
+
37 -114 53 -44 15 -95 40 -115 56 -20 16 -70 42 -110 59 -40 16 -88 45 -108
|
|
155
|
+
63 -20 19 -55 46 -78 61 -24 14 -49 35 -55 47 -7 11 -34 33 -60 49 -50 31 -65
|
|
156
|
+
61 -53 102 4 13 130 147 281 298 236 238 277 283 299 335 15 32 35 71 46 86
|
|
157
|
+
12 18 19 44 19 76 0 42 -8 63 -53 138 -92 151 11 139 -1207 141 -798 2 -1030
|
|
158
|
+
0 -1086 -11z"></path>
|
|
159
|
+
</g>
|
|
160
|
+
</svg>
|
|
161
|
+
`;J1.exports=_6});var rh=L((xm,th)=>{var E6=`
|
|
162
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-play-svg">
|
|
163
|
+
<g>
|
|
164
|
+
<polygon points="4 0 23 12.5 4 25"/>
|
|
165
|
+
</g>
|
|
166
|
+
</svg>
|
|
167
|
+
`;th.exports=E6});var nh=L((km,ah)=>{var A6=`
|
|
168
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-pause-svg">
|
|
169
|
+
<g>
|
|
170
|
+
<rect width="8.23" height="25"/>
|
|
171
|
+
<rect width="8.23" height="25" x="17"/>
|
|
172
|
+
</g>
|
|
173
|
+
</svg>
|
|
174
|
+
`;ah.exports=A6});var sh=L((Cm,ih)=>{var M6=`
|
|
175
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="abcjs-loading-svg">
|
|
176
|
+
<circle cx="50" cy="50" fill="none" stroke-width="20" r="35" stroke-dasharray="160 55"></circle>
|
|
177
|
+
</svg>
|
|
178
|
+
`;ih.exports=M6});var ch=L((Tm,oh)=>{var B6=`
|
|
179
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25">
|
|
180
|
+
<g>
|
|
181
|
+
<polygon points="5 12.5 24 0 24 25"/>
|
|
182
|
+
<rect width="3" height="25" x="0" y="0"/>
|
|
183
|
+
</g>
|
|
184
|
+
</svg>
|
|
185
|
+
`;oh.exports=B6});var mn=L((Sm,hh)=>{var N6=Y0(),lh=G0(),W0=Vt(),P6=eh(),L6=rh(),q6=nh(),I6=sh(),D6=ch();function z6(e,t){var r=this;if(typeof e=="string"){var n=e;if(e=document.querySelector(n),!e)throw new Error('Cannot find element "'+n+'" in the DOM.')}else if(!(e instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(r.parent=e,r.options={},t&&(r.options=Object.assign({},t)),r.options.ac&&lh(r.options.ac),O6(r.parent,r.options),F6(r),r.disable=function(i){var s=r.parent.querySelector(".abcjs-inline-audio");i?s.classList.add("abcjs-disabled"):s.classList.remove("abcjs-disabled")},r.setWarp=function(i,s){var o=r.parent.querySelector(".abcjs-midi-tempo");o.value=Math.round(s),r.setTempo(i)},r.setTempo=function(i){var s=r.parent.querySelector(".abcjs-midi-current-tempo");s&&(s.innerHTML=Math.round(i))},r.resetAll=function(){for(var i=r.parent.querySelectorAll(".abcjs-pushed"),s=0;s<i.length;s++){var o=i[s];o.classList.remove("abcjs-pushed")}},r.pushPlay=function(i){var s=r.parent.querySelector(".abcjs-midi-start");s&&(i?s.classList.add("abcjs-pushed"):s.classList.remove("abcjs-pushed"))},r.pushLoop=function(i){var s=r.parent.querySelector(".abcjs-midi-loop");s&&(i?s.classList.add("abcjs-pushed"):s.classList.remove("abcjs-pushed"))},r.setProgress=function(i,s){var o=r.parent.querySelector(".abcjs-midi-progress-background"),c=r.parent.querySelector(".abcjs-midi-progress-indicator");if(!(!o||!c)){var h=o.clientWidth,d=h*i;c.style.left=d+"px";var l=r.parent.querySelector(".abcjs-midi-clock");if(l){var f=s*i/1e3,u=Math.floor(f/60),p=Math.floor(f%60),g=p<10?"0"+p:p;l.innerHTML=u+":"+g}}},r.options.afterResume){var a=!1;r.options.ac?a=r.options.ac.state!=="suspended":W0()&&(a=W0().state!=="suspended"),a&&r.options.afterResume()}}function O6(e,t){var r=!!t.loopHandler,n=!!t.restartHandler,a=!!t.playHandler||!!t.playPromiseHandler,i=!!t.progressHandler,s=!!t.warpHandler,o=t.hasClock!==!1,c=`<div class="abcjs-inline-audio">
|
|
186
|
+
`;if(r){var h=t.repeatTitle?t.repeatTitle:"Click to toggle play once/repeat.",d=t.repeatAria?t.repeatAria:h;c+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+h+'" aria-label="'+d+'">'+P6+`</button>
|
|
187
|
+
`}if(n){var l=t.restartTitle?t.restartTitle:"Click to go to beginning.",f=t.restartAria?t.restartAria:l;c+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+l+'" aria-label="'+f+'">'+D6+`</button>
|
|
188
|
+
`}if(a){var u=t.playTitle?t.playTitle:"Click to play/pause.",p=t.playAria?t.playAria:u;c+='<button type="button" class="abcjs-midi-start abcjs-btn" title="'+u+'" aria-label="'+p+'">'+L6+q6+I6+`</button>
|
|
189
|
+
`}if(i){var g=t.randomTitle?t.randomTitle:"Click to change the playback position.",v=t.randomAria?t.randomAria:g;c+='<button type="button" class="abcjs-midi-progress-background" title="'+g+'" aria-label="'+v+`"><span class="abcjs-midi-progress-indicator"></span></button>
|
|
190
|
+
`}if(o&&(c+=`<span class="abcjs-midi-clock"></span>
|
|
191
|
+
`),s){var m=t.warpTitle?t.warpTitle:"Change the playback speed.",w=t.warpAria?t.warpAria:m,k=t.bpm?t.bpm:"BPM";c+='<span class="abcjs-tempo-wrapper"><label><input class="abcjs-midi-tempo" type="number" min="1" max="300" value="100" title="'+m+'" aria-label="'+w+'">%</label><span> (<span class="abcjs-midi-current-tempo"></span> '+k+`)</span></span>
|
|
192
|
+
`}c+='<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>',c+=`</div>
|
|
193
|
+
`,e.innerHTML=c}function $0(e,t,r,n,a){var i=!0;if(W0()?i=W0().state==="suspended":lh(),!N6())throw{status:"NotSupported",message:"This browser does not support audio."};(i||a)&&r&&r.classList.add("abcjs-loading"),i?W0().resume().then(function(){n?n().then(function(s){bn(e,t,r,a)}):bn(e,t,r,a)}):bn(e,t,r,a)}function bn(e,t,r,n){n?e(t).then(function(){r&&r.classList.remove("abcjs-loading")}):(e(t),r&&r.classList.remove("abcjs-loading"))}function F6(e){var t=!!e.options.loopHandler,r=!!e.options.restartHandler,n=!!e.options.playHandler||!!e.options.playPromiseHandler,a=!!e.options.progressHandler,i=!!e.options.warpHandler,s=e.parent.querySelector(".abcjs-midi-start");t&&e.parent.querySelector(".abcjs-midi-loop").addEventListener("click",function(o){$0(e.options.loopHandler,o,s,e.options.afterResume)}),r&&e.parent.querySelector(".abcjs-midi-reset").addEventListener("click",function(o){$0(e.options.restartHandler,o,s,e.options.afterResume)}),n&&s.addEventListener("click",function(o){$0(e.options.playPromiseHandler||e.options.playHandler,o,s,e.options.afterResume,!!e.options.playPromiseHandler)}),a&&e.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",function(o){$0(e.options.progressHandler,o,s,e.options.afterResume)}),i&&e.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",function(o){$0(e.options.warpHandler,o,s,e.options.afterResume)})}hh.exports=z6});var dh=L((_m,uh)=>{var H6=vn(),R6=Gr(),G6=Vt();function Y6(e,t,r,n,a){for(var i=new H6,s=0;s<e.length;s++){var o=e[s],c=i.addTrack();if(i.setInstrument(c,o.instrument),s===0&&t)for(var h=0;h<t.length;h++){var d=t[h];i.appendNote(c,d.pitch,1/64,d.volume,d.cents)}i.appendNote(c,o.pitch,o.duration,o.volume,o.cents)}var l=G6();return l.state==="suspended"?l.resume().then(function(){return fh(i,r,n,a)}):fh(i,r,n,a)}function fh(e,t,r,n){var a=new R6;return a.init({sequence:e,millisecondsPerMeasure:t,options:{soundFontUrl:r},debugCallback:n}).then(function(){return a.prime()}).then(function(){return a.start(),Promise.resolve()})}uh.exports=Y6});var yn=L((Em,gh)=>{var $6=mn(),W6=Gr(),X6=J0(),ph=Vt();function U6(){var e=this;e.warp=100,e.cursorControl=null,e.visualObj=null,e.timer=null,e.midiBuffer=null,e.options=null,e.currentTempo=null,e.control=null,e.isLooping=!1,e.isStarted=!1,e.isLoaded=!1,e.isLoading=!1,e.load=function(r,n,a){a||(a={}),a.displayPlay===void 0&&(a.displayPlay=!0),a.displayProgress===void 0&&(a.displayProgress=!0),e.control=new $6(r,{loopHandler:a.displayLoop?e.toggleLoop:void 0,restartHandler:a.displayRestart?e.restart:void 0,playPromiseHandler:a.displayPlay?e.play:void 0,progressHandler:a.displayProgress?e.randomAccess:void 0,warpHandler:a.displayWarp?e.onWarp:void 0,afterResume:e.init}),e.cursorControl=n,e.disable(!0)},e.disable=function(r){e.control&&e.control.disable(r)},e.setTune=function(r,n,a){return e.visualObj=r,e.disable(!1),e.options=a||{},e.control&&(e.pause(),e.setProgress(0,1),e.control.resetAll(),e.restart(),e.isStarted=!1),e.isLooping=!1,n?e.go():Promise.resolve({status:"no-audio-context"})},e.go=function(){e.isLoading=!0;var r=e.visualObj.millisecondsPerMeasure()*100/e.warp;e.currentTempo=Math.round(e.visualObj.getBeatsPerMeasure()/r*6e4),e.control&&e.control.setTempo(e.currentTempo),e.percent=0;var n;return e.midiBuffer||(e.midiBuffer=new W6),ph().resume().then(function(a){return e.midiBuffer.init({visualObj:e.visualObj,options:e.options,millisecondsPerMeasure:r})}).then(function(a){return n=a,e.midiBuffer.prime()}).then(function(){var a=16;return e.cursorControl&&e.cursorControl.beatSubdivisions!==void 0&&parseInt(e.cursorControl.beatSubdivisions,10)>=1&&parseInt(e.cursorControl.beatSubdivisions,10)<=64&&(a=parseInt(e.cursorControl.beatSubdivisions,10)),e.timer=new X6(e.visualObj,{beatCallback:e.beatCallback,eventCallback:e.eventCallback,lineEndCallback:e.lineEndCallback,qpm:e.currentTempo,extraMeasuresAtBeginning:e.cursorControl?e.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:e.cursorControl?e.cursorControl.lineEndAnticipation:0,beatSubdivisions:a}),e.cursorControl&&e.cursorControl.onReady&&typeof e.cursorControl.onReady=="function"&&e.cursorControl.onReady(e),e.isLoaded=!0,e.isLoading=!1,Promise.resolve({status:"created",notesStatus:n})})},e.destroy=function(){e.timer&&(e.timer.reset(),e.timer.stop(),e.timer=null),e.midiBuffer&&(e.midiBuffer.stop(),e.midiBuffer=null),e.setProgress(0,1),e.control&&e.control.resetAll()},e.play=function(){return e.runWhenReady(e._play,void 0)};function t(r){return new Promise(function(n){setTimeout(n,r)})}e.runWhenReady=function(r,n){return e.visualObj?e.isLoading?t(500).then(function(){return e.isLoading?e.runWhenReady(r,n):r(n)}):e.isLoaded?r(n):e.go().then(function(){return r(n)}):Promise.resolve({status:"loading"})},e._play=function(){return ph().resume().then(function(){return e.isStarted=!e.isStarted,e.isStarted?(e.cursorControl&&e.cursorControl.onStart&&typeof e.cursorControl.onStart=="function"&&e.cursorControl.onStart(),e.midiBuffer.start(),e.timer.start(e.percent),e.control&&e.control.pushPlay(!0)):e.pause(),Promise.resolve({status:"ok"})})},e.pause=function(){e.timer&&(e.timer.pause(),e.midiBuffer.pause(),e.control&&e.control.pushPlay(!1))},e.toggleLoop=function(){e.isLooping=!e.isLooping,e.control&&e.control.pushLoop(e.isLooping)},e.restart=function(){e.timer&&(e.timer.setProgress(0),e.midiBuffer.seek(0))},e.randomAccess=function(r){return e.runWhenReady(e._randomAccess,r)},e._randomAccess=function(r){var n=r.target.classList.contains("abcjs-midi-progress-indicator")?r.target.parentNode:r.target,a=(r.x-n.getBoundingClientRect().left)/n.offsetWidth;return a<0&&(a=0),a>1&&(a=1),e.seek(a),Promise.resolve({status:"ok"})},e.seek=function(r,n){e.timer&&e.midiBuffer&&(e.timer.setProgress(r,n),e.midiBuffer.seek(r,n))},e.setWarp=function(r){if(parseInt(r,10)>0){e.warp=parseInt(r,10);var n=e.isStarted,a=e.percent;return e.destroy(),e.isStarted=!1,e.go().then(function(){return e.setProgress(a,e.midiBuffer.duration*1e3),e.control&&e.control.setWarp(e.currentTempo,e.warp),n?e.play().then(function(){return e.seek(a),Promise.resolve()}):(e.seek(a),Promise.resolve())})}return Promise.resolve()},e.onWarp=function(r){var n=r.target.value;return e.setWarp(n)},e.setProgress=function(r,n){e.percent=r,e.control&&e.control.setProgress(r,n)},e.finished=function(){if(e.timer.reset(),e.isLooping)return e.timer.start(0),e.midiBuffer.finished(),e.midiBuffer.start(),"continue";e.timer.stop(),e.isStarted&&(e.control&&e.control.pushPlay(!1),e.isStarted=!1,e.midiBuffer.finished(),e.cursorControl&&e.cursorControl.onFinished&&typeof e.cursorControl.onFinished=="function"&&e.cursorControl.onFinished(),e.setProgress(0,1))},e.beatCallback=function(r,n,a,i){var s=r/n;e.setProgress(s,a),e.cursorControl&&e.cursorControl.onBeat&&typeof e.cursorControl.onBeat=="function"&&e.cursorControl.onBeat(r,n,a,i)},e.eventCallback=function(r){if(r)e.cursorControl&&e.cursorControl.onEvent&&typeof e.cursorControl.onEvent=="function"&&e.cursorControl.onEvent(r);else return e.finished()},e.lineEndCallback=function(r,n){e.cursorControl&&e.cursorControl.onLineEnd&&typeof e.cursorControl.onLineEnd=="function"&&e.cursorControl.onLineEnd(r,n)},e.getUrl=function(){return e.midiBuffer.download()},e.download=function(r){var n=e.getUrl(),a=document.createElement("a");document.body.appendChild(a),a.setAttribute("style","display: none;"),a.href=n,a.download=r||"output.wav",a.click(),window.URL.revokeObjectURL(n),document.body.removeChild(a)}}gh.exports=U6});var wn=L((Am,bh)=>{var V6=gn(),vh;(function(){"use strict";function e(d,l){for(var f in l)l.hasOwnProperty(f)&&d.setAttribute(f,l[f]);return d}function t(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}t.prototype.setTempo=function(d){this.trackcount===0&&(this.startTrack(),this.track+="%00%FF%51%03"+o(Math.round(6e7/d),6),this.endTrack())},t.prototype.setGlobalInfo=function(d,l,f,u){if(this.trackcount===0){this.startTrack();var p=Math.round(6e7/d);this.track+="%00%FF%51%03"+o(p,6),f&&(this.track+=a(f)),u&&(this.track+=i(u)),l&&(this.track+=n(l,"%01")),this.endTrack()}},t.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},t.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var d=o(this.track.length/3+4,8);this.track="MTrk"+d+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},t.prototype.setText=function(d,l){d==="name"&&(this.trackName=n(l,"%03"))},t.prototype.setInstrument=function(d){this.trackInstrument="%00%C0"+o(d,2),this.instrument=d},t.prototype.setChannel=function(d,l){this.channel=d;var f="%00%B"+this.channel.toString(16);this.track+=f+"%79%00",this.track+=f+"%40%00",this.track+=f+"%5B%30",l||(l=0),l=Math.round((l+1)*64),this.track+=f+"%0A"+o(l,2),this.track+=f+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};var r=4096;t.prototype.startNote=function(d,l,f){if(this.track+=h(this.silencelength),this.silencelength=0,f){this.track+="%e"+this.channel.toString(16);var u=Math.round(V6(f)*r);this.track+=c(8192+u),this.track+=h(0),this.noteWarped[d]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+d.toString(16)+o(l,2)},t.prototype.endNote=function(d){this.track+=h(this.silencelength),this.silencelength=0,this.noteWarped[d]&&(this.track+="%e"+this.channel.toString(16),this.track+=c(8192),this.track+=h(0),this.noteWarped[d]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+d.toString(16)+"%00"},t.prototype.addRest=function(d){this.silencelength+=d,this.silencelength<0&&(this.silencelength=0)},t.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+o(this.trackcount,4)+"%01%e0"+this.trackstrings},t.prototype.embed=function(d,l){var f=this.getData(),u=e(document.createElement("a"),{href:f});if(u.innerHTML="download midi",d.insertBefore(u,d.firstChild),!l){var p=e(document.createElement("embed"),{src:f,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});d.insertBefore(p,d.firstChild)}};function n(d,l){for(var f="",u=0;u<d.length;u++)f+=o(d.charCodeAt(u),2);return"%00%FF"+l+o(f.length/3,2)+f}function a(d){if(!d||!d.accidentals)return"";for(var l="%00%FF%59%02",f=0,u=256,p=0;p<d.accidentals.length;p++)d.accidentals[p].acc==="sharp"?f++:d.accidentals[p].acc==="flat"&&u--;var g=o(u!==256?u:f,2),v=d.mode==="m"?"%01":"%00";return l+g+v}function i(d){var l="%00%FF%58%04"+o(d.num,2),f={1:0,2:1,4:2,8:3,16:4,32:5},u=f[d.den];if(!u)return"";l+=o(u,2);var p;switch(d.num+"/"+d.den){case"2/4":case"3/4":case"4/4":case"5/4":p=24;break;case"6/4":p=72;break;case"2/2":case"3/2":case"4/2":p=48;break;case"3/8":case"6/8":case"9/8":case"12/8":p=36;break}return p?(l+=o(p,2),l+"%08"):""}function s(d){for(var l="",f=0;f<d.length;f+=2)l+="%",l+=d.substr(f,2);return l}function o(d,l){var f=d.toString(16);for(f=f.split(".")[0];f.length<l;)f="0"+f;return f.length>l&&(f=f.substring(0,l)),s(f)}function c(d){d=Math.round(d);var l=d%128,f=d-l;return o(f*2+l,4)}function h(d){var l=0,f=[];for(d=Math.round(d);d!==0;)f.push(d&127),d=d>>7;for(var u=f.length-1;u>=0;u--){l=l<<8;var p=f[u];u!==0&&(p=p|128),l=l|p}var g=l.toString(16).length;return g+=g%2,o(l,g)}vh=function(){return new t}})();bh.exports=vh});var wh=L((Mm,yh)=>{var j6=wn(),mh;(function(){"use strict";var e=1920;mh=function(n,a){a===void 0&&(a={});var i=n.setUpAudio(a),s=j6(),o=n.metaText?n.metaText.title:void 0;o&&o.length>128&&(o=o.substring(0,124)+"...");var c=n.getKeySignature(),h=n.getMeterFraction(),d=i.tempo,l=d/60;if(h.den===8&&h.num!==5&&h.num!==7){var f=n.millisecondsPerMeasure();d=6e4/(f/h.num)/2,l=d/60}s.setGlobalInfo(d,o,c,h);for(var u=0;u<i.tracks.length;u++){s.startTrack();for(var p={},g=0;g<i.tracks[u].length;g++){var v=i.tracks[u][g];switch(v.cmd){case"text":s.setText(v.type,v.text);break;case"program":var m=0;a.pan&&a.pan.length>u&&(m=a.pan[u]),v.instrument===128?(s.setChannel(9,m),s.setInstrument(0)):(s.setChannel(v.channel,m),s.setInstrument(v.instrument));break;case"note":var w=v.gap*l,k=v.start,b=k+v.duration-w;p[k]||(p[k]=[]),p[k].push({pitch:v.pitch,volume:v.volume,cents:v.cents}),p[b]||(p[b]=[]),p[b].push({pitch:v.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+v.cmd)}}t(s,p,e),s.endTrack()}return s.getData()};function t(r,n,a){for(var i=Object.keys(n),s=0;s<i.length;s++)i[s]=parseFloat(i[s]);i.sort(function(u,p){return u-p});for(var o=0,c=0;c<i.length;c++){var h=n[i[c]];if(i[c]>o){var d=(i[c]-o)*a;r.addRest(d),o=i[c]}for(var l=0;l<h.length;l++){var f=h[l];f.volume?r.startNote(f.pitch,f.volume,f.cents):r.endNote(f.pitch)}}}})();yh.exports=mh});var kh=L((Bm,xh)=>{var K6=M0(),Q6=wh(),Z6=function(e,t){var r={};if(t)for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.generateInline=!1;function a(i,s,o){var c=Q6(s,r);switch(r.midiOutputType){case"encoded":return c;case"binary":var h=c.replace("data:audio/midi,","");h=h.replace(/MThd/g,"%4d%54%68%64"),h=h.replace(/MTrk/g,"%4d%54%72%6b");for(var d=new ArrayBuffer(h.length/3),l=new Uint8Array(d),f=0;f<h.length/3;f++){var u=f*3+1,p=parseInt(h.substring(u,u+2),16);l[f]=p}return l;default:return e5(s,r,c,o)}}return typeof e=="string"?K6.renderEngine(a,"*",e,r):a(null,e,0)};function J6(e){var t={};return e&&t.toString.call(e)==="[object Function]"}var e5=function(e,t,r,n){var a=["abcjs-download-midi","abcjs-midi-"+n];t.downloadClass&&a.push(t.downloadClass);var i='<div class="'+a.join(" ")+'">';t.preTextDownload&&(i+=t.preTextDownload);var s=e.metaText&&e.metaText.title?e.metaText.title:"Untitled",o;t.downloadLabel&&J6(t.downloadLabel)?o=t.downloadLabel(e,n):t.downloadLabel?o=t.downloadLabel.replace(/%T/,s):o='Download MIDI for "'+s+'"',s=s.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_");var c=t.fileName?t.fileName:s+".midi";return i+='<a download="'+c+'" href="'+r+'">'+o+"</a>",t.postTextDownload&&(i+=t.postTextDownload),i+"</div>"};xh.exports=Z6});var kn=L((Nm,Ch)=>{try{typeof window.CustomEvent!="function"&&(xn=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r},xn.prototype=window.Event.prototype,window.CustomEvent=xn)}catch{}var xn,Lt=function(e){this.isEditArea=!0,typeof e=="string"?(this.textarea=document.getElementById(e),this.textarea||(this.textarea=document.querySelector(e))):this.textarea=e,this.initialText=this.textarea.value,this.isDragging=!1};Lt.prototype.addSelectionListener=function(e){this.textarea.onmousemove=function(t){this.isDragging&&e.fireSelectionChanged()}};Lt.prototype.addChangeListener=function(e){this.changelistener=e,this.textarea.onkeyup=function(){e.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,e.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,e.fireChanged()},this.textarea.onchange=function(){e.fireChanged()}};Lt.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}};Lt.prototype.setSelection=function(e,t){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(e,t);else if(this.textarea.createTextRange){var r=this.textarea.createTextRange();r.collapse(!0),r.moveEnd("character",t),r.moveStart("character",e),r.select()}this.textarea.focus()};Lt.prototype.getString=function(){return this.textarea.value};Lt.prototype.setString=function(e){this.textarea.value=e,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()};Lt.prototype.getElem=function(){return this.textarea};Ch.exports=Lt});var Eh=L((Pm,_h)=>{var Sh=tt(),t5=yn(),r5=Y0(),a5=un(),Th=kn();function n5(e){var t={},r;if(e.abcjsParams)for(r in e.abcjsParams)e.abcjsParams.hasOwnProperty(r)&&(t[r]=e.abcjsParams[r]);if(e.midi_options)for(r in e.midi_options)e.midi_options.hasOwnProperty(r)&&(t[r]=e.midi_options[r]);if(e.parser_options)for(r in e.parser_options)e.parser_options.hasOwnProperty(r)&&(t[r]=e.parser_options[r]);if(e.render_options)for(r in e.render_options)e.render_options.hasOwnProperty(r)&&(t[r]=e.render_options[r]);return t.tablature&&e.warnings_id&&(t.tablature.warnings_id=e.warnings_id),t}var _e=function(e,t){this.abcjsParams=n5(t),t.indicate_changed&&(this.indicate_changed=!0),typeof e=="string"?this.editarea=new Th(e):e.isEditArea?this.editarea=e:this.editarea=new Th(e),this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),t.canvas_id?this.div=t.canvas_id:t.paper_id?this.div=t.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)),t.selectionChangeCallback&&(this.selectionChangeCallback=t.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),t.synth&&r5()&&(this.synth={el:t.synth.el,cursorControl:t.synth.cursorControl,options:t.synth.options}),t.generate_midi&&(this.generate_midi=t.generate_midi,this.abcjsParams.generateDownload&&(typeof t.midi_download_id=="string"?this.downloadMidi=document.getElementById(t.midi_download_id):t.midi_download_id&&(this.downloadMidi=t.midi_download_id)),this.abcjsParams.generateInline!==!1&&(typeof t.midi_id=="string"?this.inlineMidi=document.getElementById(t.midi_id):t.midi_id&&(this.inlineMidi=t.midi_id))),t.warnings_id?typeof t.warnings_id=="string"?this.warningsdiv=document.getElementById(t.warnings_id):this.warningsdiv=t.warnings_id:t.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=t.onchange,this.redrawCallback=t.redrawCallback,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(r,n){var a=function(i,s){var o=i.className;return o.length>0&&(o===s||new RegExp("(^|\\s)"+s+"(\\s|$)").test(o))};return a(r,n)||(r.className+=(r.className?" ":"")+n),r},this.removeClassName=function(r,n){return r.className=Sh.strip(r.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ")),r},this.setReadOnly=function(r){var n="abc_textarea_readonly",a=this.editarea.getElem();r?(a.setAttribute("readonly","yes"),this.addClassName(a,n)):(a.removeAttribute("readonly"),this.removeClassName(a,n))}};_e.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var e=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(e)}if(this.synth){var t=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new t5,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],t,this.synth.options)}};_e.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=a5(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.redrawCallback&&this.redrawCallback(!1)}catch(e){console.error("ABCJS error: ",e),this.warnings||(this.warnings=[]),this.warnings.push(e.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.updateSelection(),this.bReentry=!1}};_e.prototype.paramChanged=function(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this.abcjsParams[t]=e[t]);this.currentAbc="",this.fireChanged()};_e.prototype.getTunes=function(){return this.tunes};_e.prototype.synthParamChanged=function(e){if(this.synth){if(this.synth.options={},e)for(var t in e)e.hasOwnProperty(t)&&(this.synth.options[t]=e[t]);this.currentAbc="",this.fireChanged()}};_e.prototype.parseABC=function(){var e=this.editarea.getString();return e===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=e,!0)};_e.prototype.updateSelection=function(){var e=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(e.start,e.end)}catch{}this.selectionChangeCallback&&this.selectionChangeCallback(e.start,e.end)};_e.prototype.fireSelectionChanged=function(){this.updateSelection()};_e.prototype.setDirtyStyle=function(e){if(this.indicate_changed!==void 0){var t=function(i,s){var o=function(c,h){var d=c.className;return d.length>0&&(d===h||new RegExp("(^|\\s)"+h+"(\\s|$)").test(d))};return o(i,s)||(i.className+=(i.className?" ":"")+s),i},r=function(i,s){return i.className=Sh.strip(i.className.replace(new RegExp("(^|\\s+)"+s+"(\\s+|$)")," ")),i},n="abc_textarea_dirty",a=this.editarea.getElem();e?t(a,n):r(a,n)}};_e.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var e=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){e.modelChanged()},300);var t=this.isDirty();this.wasDirty!==t&&(this.wasDirty=t,this.setDirtyStyle(t)),this.onchangeCallback&&this.onchangeCallback(this)}};_e.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)};_e.prototype.isDirty=function(){return this.indicate_changed===void 0?!1:this.editarea.initialText!==this.editarea.getString()};_e.prototype.highlight=function(e,t,r,n,a,i){this.editarea.setSelection(e.startChar,e.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(e.startChar,e.endChar),this.clientClickListener&&this.clientClickListener(e,t,r,n,a,i)};_e.prototype.pause=function(e){this.bIsPaused=e,e||this.fireChanged()};_e.prototype.millisecondsPerMeasure=function(){return!this.synth||!this.synth.synthControl||!this.synth.synthControl.visualObj?0:this.synth.synthControl.visualObj.millisecondsPerMeasure()};_e.prototype.pauseMidi=function(e){this.midiPause=e,e||this.redrawMidi()};_h.exports=_e});var Nh=L((Lm,Bh)=>{var i5=Xn(),Ah=jn(),Mh=M0(),s5=ba(),o5=Qs(),Xe={};Xe.signature="abcjs-basic v"+i5;Object.keys(Ah).forEach(function(e){Xe[e]=Ah[e]});Object.keys(Mh).forEach(function(e){Xe[e]=Mh[e]});Xe.renderAbc=un();Xe.tuneMetrics=N1();Xe.TimingCallbacks=J0();var c5=xt();Xe.setGlyph=c5.setSymbol;Xe.strTranspose=o5;var l5=Gr(),h5=Fr(),f5=Hr(),u5=vn(),d5=mn(),p5=G0(),g5=Vt(),v5=Y0(),b5=dh(),m5=yn(),y5=kh(),w5=wn();Xe.synth={CreateSynth:l5,instrumentIndexToName:h5,pitchToNoteName:f5,SynthController:m5,SynthSequence:u5,CreateSynthControl:d5,registerAudioContext:p5,activeAudioContext:g5,supportsAudio:v5,playEvent:b5,getMidiFile:y5,sequence:s5,midiRenderer:w5};Xe.Editor=Eh();Xe.EditArea=kn();Bh.exports=Xe});function Ph(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Lh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ph(Object(r),!0).forEach(function(n){x5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ph(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x5(e,t,r){return t=k5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k5(e){var t=C5(e,"string");return typeof t=="symbol"?t:String(t)}function C5(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ih(e){return t.withOptions=r=>Ih(Lh(Lh({},e),r)),t;function t(r,...n){let a=typeof r=="string"?[r]:r.raw,{alignValues:i=!1,escapeSpecialCharacters:s=Array.isArray(r),trimWhitespace:o=!0}=e,c="";for(let l=0;l<a.length;l++){let f=a[l];if(s&&(f=f.replace(/\\\n[ \t]*/g,"").replace(/\\`/g,"`").replace(/\\\$/g,"$").replace(/\\\{/g,"{")),c+=f,l<n.length){let u=i?S5(n[l],c):n[l];c+=u}}let h=c.split(`
|
|
194
|
+
`),d=null;for(let l of h){let f=l.match(/^(\s+)\S+/);if(f){let u=f[1].length;d?d=Math.min(d,u):d=u}}if(d!==null){let l=d;c=h.map(f=>f[0]===" "||f[0]===" "?f.slice(l):f).join(`
|
|
195
|
+
`)}return o&&(c=c.trim()),s&&(c=c.replace(/\\n/g,`
|
|
196
|
+
`)),typeof Bun<"u"&&(c=c.replace(/\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g,(l,f,u)=>{var p;let g=(p=f??u)!==null&&p!==void 0?p:"";return String.fromCodePoint(parseInt(g,16))})),c}}function S5(e,t){if(typeof e!="string"||!e.includes(`
|
|
197
|
+
`))return e;let n=t.slice(t.lastIndexOf(`
|
|
198
|
+
`)+1).match(/^(\s+)/);if(n){let a=n[1];return e.replace(/\n/g,`
|
|
199
|
+
${a}`)}return e}var T5,qh,Dh=Yr(()=>{T5=Ih({}),qh=T5});var Rh={};Kh(Rh,{default:()=>B5});function E5(e){return e.replace(/[\x26\x0A\<>'"]/g,t=>"&#"+t.charCodeAt(0)+";")}function A5(e){return new Promise(t=>{let r=document.querySelector(e);if(r)return t(r);let n=new MutationObserver(a=>{let i=document.querySelector(e);i&&(n.disconnect(),t(i))});n.observe(document.body,{childList:!0,subtree:!0})})}function M5(e,t){return e.split(`
|
|
200
|
+
`).map(r=>t+r).join(`
|
|
201
|
+
`)}function B5(e={}){return{extensions:[{name:"abcScore",level:"block",start(t){return Hh.exec(t)?.index},tokenizer(t){if(!zh.exec(t))return;let r=Oh.exec(t);if(r===null)throw Error('Unterminated <score lang="ABC"> block');let n=r.index+r[0].length,a=t.slice(0,n),i=a.replace(zh,"").replace(Oh,"");return{type:"abcScore",raw:a,abc:i}},renderer(t){let r=`abc-score-${++_5}`,n=e.sanitizer??E5;return"document"in globalThis&&A5(`#${r}`).then(a=>{Fh.renderAbc(a,t.abc,e.abcOptions)}),qh`<div class="abc-score" id="${r}">
|
|
202
|
+
${M5(n(t.abc)," ")}
|
|
203
|
+
</div>
|
|
204
|
+
`}}]}}var Fh,_5,Hh,zh,Oh,Gh=Yr(()=>{"use strict";$n();Fh=Qh(Nh(),1);Dh();_5=0;Hh=/<score\s+lang="(ABC|abc)"\s*>/,zh=new RegExp("^"+Hh.source),Oh=/<\/score>/});module.exports=(Gh(),Zh(Rh)).default;
|
|
205
|
+
|
|
206
|
+
if(__exports != exports)module.exports = exports;return module.exports}));
|
|
207
|
+
//# sourceMappingURL=index.umd.js.map
|