summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/css/markdown.css9
-rw-r--r--public/css/slide.css9
-rw-r--r--public/docs/features.md14
-rw-r--r--public/js/extra.js22
-rw-r--r--public/vendor/abcjs_basic_3.1.1-min.js17
-rw-r--r--webpackBaseConfig.js9
6 files changed, 73 insertions, 7 deletions
diff --git a/public/css/markdown.css b/public/css/markdown.css
index 1de90250..ad3a655f 100644
--- a/public/css/markdown.css
+++ b/public/css/markdown.css
@@ -113,7 +113,8 @@
.markdown-body pre.flow-chart,
.markdown-body pre.sequence-diagram,
.markdown-body pre.graphviz,
-.markdown-body pre.mermaid {
+.markdown-body pre.mermaid,
+.markdown-body pre.abc {
text-align: center;
background-color: inherit;
border-radius: 0;
@@ -123,14 +124,16 @@
.markdown-body pre.flow-chart > code,
.markdown-body pre.sequence-diagram > code,
.markdown-body pre.graphviz > code,
-.markdown-body pre.mermaid > code {
+.markdown-body pre.mermaid > code,
+.markdown-body pre.abc > code {
text-align: left;
}
.markdown-body pre.flow-chart > svg,
.markdown-body pre.sequence-diagram > svg,
.markdown-body pre.graphviz > svg,
-.markdown-body pre.mermaid > svg {
+.markdown-body pre.mermaid > svg,
+.markdown-body pre.abc > svg {
max-width: 100%;
height: 100%;
}
diff --git a/public/css/slide.css b/public/css/slide.css
index b68ccb10..74bc03c8 100644
--- a/public/css/slide.css
+++ b/public/css/slide.css
@@ -221,7 +221,8 @@ code[data-gist-id]:after {
pre.flow-chart,
pre.sequence-diagram,
pre.graphviz,
-pre.mermaid {
+pre.mermaid,
+pre.abc {
text-align: center;
background-color: white;
border-radius: 0;
@@ -231,14 +232,16 @@ pre.mermaid {
pre.flow-chart > code,
pre.sequence-diagram > code,
pre.graphviz > code,
-pre.mermaid > code {
+pre.mermaid > code,
+pre.abc > code {
text-align: left;
}
pre.flow-chart > svg,
pre.sequence-diagram > svg,
pre.graphviz > svg,
-pre.mermaid > svg {
+pre.mermaid > svg,
+pre.abc > svg {
max-width: 100%;
height: 100%;
}
diff --git a/public/docs/features.md b/public/docs/features.md
index 614984dd..da4d0032 100644
--- a/public/docs/features.md
+++ b/public/docs/features.md
@@ -280,10 +280,24 @@ gantt
anther task : 24d
```
+### Abc
+```abc
+X:1
+T:Speed the Plough
+M:4/4
+C:Trad.
+K:G
+|:GABc dedB|dedB dedB|c2ec B2dB|c2A2 A2BA|
+GABc dedB|dedB dedB|c2ec B2dB|A2F2 G4:|
+|:g2gf gdBd|g2f2 e2d2|c2ec B2dB|c2A2 A2df|
+g2gf g2Bd|g2f2 e2d2|c2ec B2dB|A2F2 G4:|
+```
+
> More information about **sequence diagrams** syntax [here](http://bramp.github.io/js-sequence-diagrams/).
> More information about **flow charts** syntax [here](http://adrai.github.io/flowchart.js/).
> More information about **graphviz** syntax [here](http://www.tonyballantyne.com/graphs.html)
> More information about **mermaid** syntax [here](http://knsv.github.io/mermaid)
+> More information about **abc** syntax [here](http://abcnotation.com/learn)
Alert Area
---
diff --git a/public/js/extra.js b/public/js/extra.js
index d237a2f2..605c8305 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -386,6 +386,26 @@ export function finishView (view) {
console.warn(err)
}
})
+ // abc.js
+ const abcs = view.find('div.abc.raw').removeClass('raw')
+ abcs.each((key, value) => {
+ try {
+ var $value = $(value)
+ var $ele = $(value).parent().parent()
+
+ ABCJS.renderAbc(value, $value.text())
+
+ $ele.addClass('abc')
+ $value.children().unwrap().unwrap()
+ const svg = $ele.find('> svg')
+ svg[0].setAttribute('viewBox', `0 0 ${svg.attr('width')} ${svg.attr('height')}`)
+ svg[0].setAttribute('preserveAspectRatio', 'xMidYMid meet')
+ } catch (err) {
+ $value.unwrap()
+ $value.parent().append('<div class="alert alert-warning">' + err + '</div>')
+ console.warn(err)
+ }
+ })
// image href new window(emoji not included)
const images = view.find('img.raw[src]').removeClass('raw')
images.each((key, value) => {
@@ -888,6 +908,8 @@ function highlightRender (code, lang) {
return `<div class="graphviz raw">${code}</div>`
} else if (lang === 'mermaid') {
return `<div class="mermaid raw">${code}</div>`
+ } else if (lang === 'abc') {
+ return `<div class="abc raw">${code}</div>`
}
const result = {
value: code
diff --git a/public/vendor/abcjs_basic_3.1.1-min.js b/public/vendor/abcjs_basic_3.1.1-min.js
new file mode 100644
index 00000000..c2e84f03
--- /dev/null
+++ b/public/vendor/abcjs_basic_3.1.1-min.js
@@ -0,0 +1,17 @@
+/*! abcjs v3.1.1 Copyright © 2009-2016 Paul Rosen and Gregory Dyke (http://abcjs.net) */
+function calcHorizontalSpacing(isLastLine,stretchLast,targetWidth,lineWidth,spacing,spacingUnits,minSpace){if(isLastLine&&lineWidth/targetWidth<.66&&!stretchLast)return null;if(Math.abs(targetWidth-lineWidth)<2)return null;var relSpace=spacingUnits*spacing,constSpace=lineWidth-relSpace;return spacingUnits>0?(spacing=(targetWidth-constSpace)/spacingUnits,spacing*minSpace>50&&(spacing=50/minSpace),spacing):null}function centerWholeRests(voices){for(var i=0;i<voices.length;i++)for(var voice=voices[i],j=1;j<voice.children.length-1;j++){var absElem=voice.children[j];if(absElem.abcelem.rest&&"whole"===absElem.abcelem.rest.type){var before=voice.children[j-1],after=voice.children[j+1],midpoint=(after.x-before.x)/2+before.x;absElem.x=midpoint-absElem.w/2;for(var k=0;k<absElem.children.length;k++)absElem.children[k].x=absElem.x}}}function kernSymbols(lastSymbol,thisSymbol,lastSymbolWidth){var width=lastSymbolWidth;return"f"===lastSymbol&&"f"===thisSymbol&&(width=2*width/3),"p"===lastSymbol&&"p"===thisSymbol&&(width=5*width/6),"f"===lastSymbol&&"z"===thisSymbol&&(width=5*width/8),width}!function(glob){var current_event,stop,version="0.4.2",has="hasOwnProperty",separator=/[\.\/]/,wildcard="*",fun=function(){},numsort=function(a,b){return a-b},events={n:{}},eve=function(name,scope){name=String(name);var l,oldstop=stop,args=Array.prototype.slice.call(arguments,2),listeners=eve.listeners(name),z=0,indexed=[],queue={},out=[],ce=current_event;current_event=name,stop=0;for(var i=0,ii=listeners.length;i<ii;i++)"zIndex"in listeners[i]&&(indexed.push(listeners[i].zIndex),listeners[i].zIndex<0&&(queue[listeners[i].zIndex]=listeners[i]));for(indexed.sort(numsort);indexed[z]<0;)if(l=queue[indexed[z++]],out.push(l.apply(scope,args)),stop)return stop=oldstop,out;for(i=0;i<ii;i++)if(l=listeners[i],"zIndex"in l)if(l.zIndex==indexed[z]){if(out.push(l.apply(scope,args)),stop)break;do if(z++,l=queue[indexed[z]],l&&out.push(l.apply(scope,args)),stop)break;while(l)}else queue[l.zIndex]=l;else if(out.push(l.apply(scope,args)),stop)break;return stop=oldstop,current_event=ce,out.length?out:null};eve._events=events,eve.listeners=function(name){var item,items,k,i,ii,j,jj,nes,names=name.split(separator),e=events,es=[e],out=[];for(i=0,ii=names.length;i<ii;i++){for(nes=[],j=0,jj=es.length;j<jj;j++)for(e=es[j].n,items=[e[names[i]],e[wildcard]],k=2;k--;)item=items[k],item&&(nes.push(item),out=out.concat(item.f||[]));es=nes}return out},eve.on=function(name,f){if(name=String(name),"function"!=typeof f)return function(){};for(var names=name.split(separator),e=events,i=0,ii=names.length;i<ii;i++)e=e.n,e=e.hasOwnProperty(names[i])&&e[names[i]]||(e[names[i]]={n:{}});for(e.f=e.f||[],i=0,ii=e.f.length;i<ii;i++)if(e.f[i]==f)return fun;return e.f.push(f),function(zIndex){+zIndex==+zIndex&&(f.zIndex=+zIndex)}},eve.f=function(event){var attrs=[].slice.call(arguments,1);return function(){eve.apply(null,[event,null].concat(attrs).concat([].slice.call(arguments,0)))}},eve.stop=function(){stop=1},eve.nt=function(subname){return subname?new RegExp("(?:\\.|\\/|^)"+subname+"(?:\\.|\\/|$)").test(current_event):current_event},eve.nts=function(){return current_event.split(separator)},eve.off=eve.unbind=function(name,f){if(!name)return void(eve._events=events={n:{}});var e,key,splice,i,ii,j,jj,names=name.split(separator),cur=[events];for(i=0,ii=names.length;i<ii;i++)for(j=0;j<cur.length;j+=splice.length-2){if(splice=[j,1],e=cur[j].n,names[i]!=wildcard)e[names[i]]&&splice.push(e[names[i]]);else for(key in e)e[has](key)&&splice.push(e[key]);cur.splice.apply(cur,splice)}for(i=0,ii=cur.length;i<ii;i++)for(e=cur[i];e.n;){if(f){if(e.f){for(j=0,jj=e.f.length;j<jj;j++)if(e.f[j]==f){e.f.splice(j,1);break}!e.f.length&&delete e.f}for(key in e.n)if(e.n[has](key)&&e.n[key].f){var funcs=e.n[key].f;for(j=0,jj=funcs.length;j<jj;j++)if(funcs[j]==f){funcs.splice(j,1);break}!funcs.length&&delete e.n[key].f}}else{delete e.f;for(key in e.n)e.n[has](key)&&e.n[key].f&&delete e.n[key].f}e=e.n}},eve.once=function(name,f){var f2=function(){return eve.unbind(name,f2),f.apply(this,arguments)};return eve.on(name,f2)},eve.version=version,eve.toString=function(){return"You are running Eve "+version},"undefined"!=typeof module&&module.exports?module.exports=eve:"undefined"!=typeof define?define("eve",[],function(){return eve}):glob.eve=eve}(this),function(glob,factory){"function"==typeof define&&define.amd?define(["eve"],function(eve){return factory(glob,eve)}):factory(glob,glob.eve)}(this,function(window,eve){function R(first){if(R.is(first,"function"))return loaded?first():eve.on("raphael.DOMload",first);if(R.is(first,array))return R._engine.create[apply](R,first.splice(0,3+R.is(first[0],nu))).add(first);var args=Array.prototype.slice.call(arguments,0);if(R.is(args[args.length-1],"function")){var f=args.pop();return loaded?f.call(R._engine.create[apply](R,args)):eve.on("raphael.DOMload",function(){f.call(R._engine.create[apply](R,args))})}return R._engine.create[apply](R,arguments)}function clone(obj){if("function"==typeof obj||Object(obj)!==obj)return obj;var res=new obj.constructor;for(var key in obj)obj[has](key)&&(res[key]=clone(obj[key]));return res}function repush(array,item){for(var i=0,ii=array.length;i<ii;i++)if(array[i]===item)return array.push(array.splice(i,1)[0])}function cacher(f,scope,postprocessor){function newf(){var arg=Array.prototype.slice.call(arguments,0),args=arg.join("␀"),cache=newf.cache=newf.cache||{},count=newf.count=newf.count||[];return cache[has](args)?(repush(count,args),postprocessor?postprocessor(cache[args]):cache[args]):(count.length>=1e3&&delete cache[count.shift()],count.push(args),cache[args]=f[apply](scope,arg),postprocessor?postprocessor(cache[args]):cache[args])}return newf}function clrToString(){return this.hex}function catmullRom2bezier(crp,z){for(var d=[],i=0,iLen=crp.length;iLen-2*!z>i;i+=2){var p=[{x:+crp[i-2],y:+crp[i-1]},{x:+crp[i],y:+crp[i+1]},{x:+crp[i+2],y:+crp[i+3]},{x:+crp[i+4],y:+crp[i+5]}];z?i?iLen-4==i?p[3]={x:+crp[0],y:+crp[1]}:iLen-2==i&&(p[2]={x:+crp[0],y:+crp[1]},p[3]={x:+crp[2],y:+crp[3]}):p[0]={x:+crp[iLen-2],y:+crp[iLen-1]}:iLen-4==i?p[3]=p[2]:i||(p[0]={x:+crp[i],y:+crp[i+1]}),d.push(["C",(-p[0].x+6*p[1].x+p[2].x)/6,(-p[0].y+6*p[1].y+p[2].y)/6,(p[1].x+6*p[2].x-p[3].x)/6,(p[1].y+6*p[2].y-p[3].y)/6,p[2].x,p[2].y])}return d}function base3(t,p1,p2,p3,p4){var t1=-3*p1+9*p2-9*p3+3*p4,t2=t*t1+6*p1-12*p2+6*p3;return t*t2-3*p1+3*p2}function bezlen(x1,y1,x2,y2,x3,y3,x4,y4,z){null==z&&(z=1),z=z>1?1:z<0?0:z;for(var z2=z/2,n=12,Tvalues=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],Cvalues=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],sum=0,i=0;i<n;i++){var ct=z2*Tvalues[i]+z2,xbase=base3(ct,x1,x2,x3,x4),ybase=base3(ct,y1,y2,y3,y4),comb=xbase*xbase+ybase*ybase;sum+=Cvalues[i]*math.sqrt(comb)}return z2*sum}function getTatLen(x1,y1,x2,y2,x3,y3,x4,y4,ll){if(!(ll<0||bezlen(x1,y1,x2,y2,x3,y3,x4,y4)<ll)){var l,t=1,step=t/2,t2=t-step,e=.01;for(l=bezlen(x1,y1,x2,y2,x3,y3,x4,y4,t2);abs(l-ll)>e;)step/=2,t2+=(l<ll?1:-1)*step,l=bezlen(x1,y1,x2,y2,x3,y3,x4,y4,t2);return t2}}function intersect(x1,y1,x2,y2,x3,y3,x4,y4){if(!(mmax(x1,x2)<mmin(x3,x4)||mmin(x1,x2)>mmax(x3,x4)||mmax(y1,y2)<mmin(y3,y4)||mmin(y1,y2)>mmax(y3,y4))){var nx=(x1*y2-y1*x2)*(x3-x4)-(x1-x2)*(x3*y4-y3*x4),ny=(x1*y2-y1*x2)*(y3-y4)-(y1-y2)*(x3*y4-y3*x4),denominator=(x1-x2)*(y3-y4)-(y1-y2)*(x3-x4);if(denominator){var px=nx/denominator,py=ny/denominator,px2=+px.toFixed(2),py2=+py.toFixed(2);if(!(px2<+mmin(x1,x2).toFixed(2)||px2>+mmax(x1,x2).toFixed(2)||px2<+mmin(x3,x4).toFixed(2)||px2>+mmax(x3,x4).toFixed(2)||py2<+mmin(y1,y2).toFixed(2)||py2>+mmax(y1,y2).toFixed(2)||py2<+mmin(y3,y4).toFixed(2)||py2>+mmax(y3,y4).toFixed(2)))return{x:px,y:py}}}}function interHelper(bez1,bez2,justCount){var bbox1=R.bezierBBox(bez1),bbox2=R.bezierBBox(bez2);if(!R.isBBoxIntersect(bbox1,bbox2))return justCount?0:[];for(var l1=bezlen.apply(0,bez1),l2=bezlen.apply(0,bez2),n1=mmax(~~(l1/5),1),n2=mmax(~~(l2/5),1),dots1=[],dots2=[],xy={},res=justCount?0:[],i=0;i<n1+1;i++){var p=R.findDotsAtSegment.apply(R,bez1.concat(i/n1));dots1.push({x:p.x,y:p.y,t:i/n1})}for(i=0;i<n2+1;i++)p=R.findDotsAtSegment.apply(R,bez2.concat(i/n2)),dots2.push({x:p.x,y:p.y,t:i/n2});for(i=0;i<n1;i++)for(var j=0;j<n2;j++){var di=dots1[i],di1=dots1[i+1],dj=dots2[j],dj1=dots2[j+1],ci=abs(di1.x-di.x)<.001?"y":"x",cj=abs(dj1.x-dj.x)<.001?"y":"x",is=intersect(di.x,di.y,di1.x,di1.y,dj.x,dj.y,dj1.x,dj1.y);if(is){if(xy[is.x.toFixed(4)]==is.y.toFixed(4))continue;xy[is.x.toFixed(4)]=is.y.toFixed(4);var t1=di.t+abs((is[ci]-di[ci])/(di1[ci]-di[ci]))*(di1.t-di.t),t2=dj.t+abs((is[cj]-dj[cj])/(dj1[cj]-dj[cj]))*(dj1.t-dj.t);t1>=0&&t1<=1.001&&t2>=0&&t2<=1.001&&(justCount?res++:res.push({x:is.x,y:is.y,t1:mmin(t1,1),t2:mmin(t2,1)}))}}return res}function interPathHelper(path1,path2,justCount){path1=R._path2curve(path1),path2=R._path2curve(path2);for(var x1,y1,x2,y2,x1m,y1m,x2m,y2m,bez1,bez2,res=justCount?0:[],i=0,ii=path1.length;i<ii;i++){var pi=path1[i];if("M"==pi[0])x1=x1m=pi[1],y1=y1m=pi[2];else{"C"==pi[0]?(bez1=[x1,y1].concat(pi.slice(1)),x1=bez1[6],y1=bez1[7]):(bez1=[x1,y1,x1,y1,x1m,y1m,x1m,y1m],x1=x1m,y1=y1m);for(var j=0,jj=path2.length;j<jj;j++){var pj=path2[j];if("M"==pj[0])x2=x2m=pj[1],y2=y2m=pj[2];else{"C"==pj[0]?(bez2=[x2,y2].concat(pj.slice(1)),x2=bez2[6],y2=bez2[7]):(bez2=[x2,y2,x2,y2,x2m,y2m,x2m,y2m],x2=x2m,y2=y2m);var intr=interHelper(bez1,bez2,justCount);if(justCount)res+=intr;else{for(var k=0,kk=intr.length;k<kk;k++)intr[k].segment1=i,intr[k].segment2=j,intr[k].bez1=bez1,intr[k].bez2=bez2;res=res.concat(intr)}}}}}return res}function Matrix(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function x_y_w_h(){return this.x+S+this.y+S+this.width+" × "+this.height}function CubicBezierAtTime(t,p1x,p1y,p2x,p2y,duration){function sampleCurveX(t){return((ax*t+bx)*t+cx)*t}function solve(x,epsilon){var t=solveCurveX(x,epsilon);return((ay*t+by)*t+cy)*t}function solveCurveX(x,epsilon){var t0,t1,t2,x2,d2,i;for(t2=x,i=0;i<8;i++){if(x2=sampleCurveX(t2)-x,abs(x2)<epsilon)return t2;if(d2=(3*ax*t2+2*bx)*t2+cx,abs(d2)<1e-6)break;t2-=x2/d2}if(t0=0,t1=1,t2=x,t2<t0)return t0;if(t2>t1)return t1;for(;t0<t1;){if(x2=sampleCurveX(t2),abs(x2-x)<epsilon)return t2;x>x2?t0=t2:t1=t2,t2=(t1-t0)/2+t0}return t2}var cx=3*p1x,bx=3*(p2x-p1x)-cx,ax=1-cx-bx,cy=3*p1y,by=3*(p2y-p1y)-cy,ay=1-cy-by;return solve(t,1/(200*duration))}function Animation(anim,ms){var percents=[],newAnim={};if(this.ms=ms,this.times=1,anim){for(var attr in anim)anim[has](attr)&&(newAnim[toFloat(attr)]=anim[attr],percents.push(toFloat(attr)));percents.sort(sortByNumber)}this.anim=newAnim,this.top=percents[percents.length-1],this.percents=percents}function runAnimation(anim,element,percent,status,totalOrigin,times){percent=toFloat(percent);var params,isInAnim,isInAnimSet,next,prev,timestamp,ms=anim.ms,from={},to={},diff={};if(status)for(i=0,ii=animationElements.length;i<ii;i++){var e=animationElements[i];if(e.el.id==element.id&&e.anim==anim){e.percent!=percent?(animationElements.splice(i,1),isInAnimSet=1):isInAnim=e,element.attr(e.totalOrigin);break}}else status=+to;for(var i=0,ii=anim.percents.length;i<ii;i++){if(anim.percents[i]==percent||anim.percents[i]>status*anim.top){percent=anim.percents[i],prev=anim.percents[i-1]||0,ms=ms/anim.top*(percent-prev),next=anim.percents[i+1],params=anim.anim[percent];break}status&&element.attr(anim.anim[anim.percents[i]])}if(params){if(isInAnim)isInAnim.initstatus=status,isInAnim.start=new Date-isInAnim.ms*status;else{for(var attr in params)if(params[has](attr)&&(availableAnimAttrs[has](attr)||element.paper.customAttributes[has](attr)))switch(from[attr]=element.attr(attr),null==from[attr]&&(from[attr]=availableAttrs[attr]),to[attr]=params[attr],availableAnimAttrs[attr]){case nu:diff[attr]=(to[attr]-from[attr])/ms;break;case"colour":from[attr]=R.getRGB(from[attr]);var toColour=R.getRGB(to[attr]);diff[attr]={r:(toColour.r-from[attr].r)/ms,g:(toColour.g-from[attr].g)/ms,b:(toColour.b-from[attr].b)/ms};break;case"path":var pathes=path2curve(from[attr],to[attr]),toPath=pathes[1];for(from[attr]=pathes[0],diff[attr]=[],i=0,ii=from[attr].length;i<ii;i++){diff[attr][i]=[0];for(var j=1,jj=from[attr][i].length;j<jj;j++)diff[attr][i][j]=(toPath[i][j]-from[attr][i][j])/ms}break;case"transform":var _=element._,eq=equaliseTransform(_[attr],to[attr]);if(eq)for(from[attr]=eq.from,to[attr]=eq.to,diff[attr]=[],diff[attr].real=!0,i=0,ii=from[attr].length;i<ii;i++)for(diff[attr][i]=[from[attr][i][0]],j=1,jj=from[attr][i].length;j<jj;j++)diff[attr][i][j]=(to[attr][i][j]-from[attr][i][j])/ms;else{var m=element.matrix||new Matrix,to2={_:{transform:_.transform},getBBox:function(){return element.getBBox(1)}};from[attr]=[m.a,m.b,m.c,m.d,m.e,m.f],extractTransform(to2,to[attr]),to[attr]=to2._.transform,diff[attr]=[(to2.matrix.a-m.a)/ms,(to2.matrix.b-m.b)/ms,(to2.matrix.c-m.c)/ms,(to2.matrix.d-m.d)/ms,(to2.matrix.e-m.e)/ms,(to2.matrix.f-m.f)/ms]}break;case"csv":var values=Str(params[attr])[split](separator),from2=Str(from[attr])[split](separator);if("clip-rect"==attr)for(from[attr]=from2,diff[attr]=[],i=from2.length;i--;)diff[attr][i]=(values[i]-from[attr][i])/ms;to[attr]=values;break;default:for(values=[][concat](params[attr]),from2=[][concat](from[attr]),diff[attr]=[],i=element.paper.customAttributes[attr].length;i--;)diff[attr][i]=((values[i]||0)-(from2[i]||0))/ms}var easing=params.easing,easyeasy=R.easing_formulas[easing];if(!easyeasy)if(easyeasy=Str(easing).match(bezierrg),easyeasy&&5==easyeasy.length){var curve=easyeasy;easyeasy=function(t){return CubicBezierAtTime(t,+curve[1],+curve[2],+curve[3],+curve[4],ms)}}else easyeasy=pipe;if(timestamp=params.start||anim.start||+new Date,e={anim:anim,percent:percent,timestamp:timestamp,start:timestamp+(anim.del||0),status:0,initstatus:status||0,stop:!1,ms:ms,easing:easyeasy,from:from,diff:diff,to:to,el:element,callback:params.callback,prev:prev,next:next,repeat:times||anim.times,origin:element.attr(),totalOrigin:totalOrigin},animationElements.push(e),status&&!isInAnim&&!isInAnimSet&&(e.stop=!0,e.start=new Date-ms*status,1==animationElements.length))return animation();isInAnimSet&&(e.start=new Date-e.ms*status),1==animationElements.length&&requestAnimFrame(animation)}eve("raphael.anim.start."+element.id,element,anim)}}function stopAnimation(paper){for(var i=0;i<animationElements.length;i++)animationElements[i].el.paper==paper&&animationElements.splice(i--,1)}R.version="2.1.2",R.eve=eve;var loaded,paperproto,separator=/[, ]+/,elements={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},formatrg=/\{(\d+)\}/g,has="hasOwnProperty",g={doc:document,win:window},oldRaphael={was:Object.prototype[has].call(g.win,"Raphael"),is:g.win.Raphael},Paper=function(){this.ca=this.customAttributes={}},apply="apply",concat="concat",supportsTouch="ontouchstart"in g.win||g.win.DocumentTouch&&g.doc instanceof DocumentTouch,E="",S=" ",Str=String,split="split",events="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S),touchMap={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},lowerCase=Str.prototype.toLowerCase,math=Math,mmax=math.max,mmin=math.min,abs=math.abs,pow=math.pow,PI=math.PI,nu="number",string="string",array="array",objectToString=Object.prototype.toString,colourRegExp=(R._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),isnan={NaN:1,Infinity:1,"-Infinity":1},bezierrg=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,round=math.round,toFloat=parseFloat,toInt=parseInt,upperCase=Str.prototype.toUpperCase,availableAttrs=R._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},availableAnimAttrs=R._availableAnimAttrs={blur:nu,"clip-rect":"csv",cx:nu,cy:nu,fill:"colour","fill-opacity":nu,"font-size":nu,height:nu,opacity:nu,path:"path",r:nu,rx:nu,ry:nu,stroke:"colour","stroke-opacity":nu,"stroke-width":nu,transform:"transform",width:nu,x:nu,y:nu},commaSpaces=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,hsrg={hs:1,rg:1},p2s=/,?([achlmqrstvxz]),?/gi,pathCommand=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,tCommand=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,pathValues=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,eldata=(R._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),sortByNumber=function(a,b){return toFloat(a)-toFloat(b)},fun=function(){},pipe=function(x){return x},rectPath=R._rectPath=function(x,y,w,h,r){return r?[["M",x+r,y],["l",w-2*r,0],["a",r,r,0,0,1,r,r],["l",0,h-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-w,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-h],["a",r,r,0,0,1,r,-r],["z"]]:[["M",x,y],["l",w,0],["l",0,h],["l",-w,0],["z"]]},ellipsePath=function(x,y,rx,ry){return null==ry&&(ry=rx),[["M",x,y],["m",0,-ry],["a",rx,ry,0,1,1,0,2*ry],["a",rx,ry,0,1,1,0,-2*ry],["z"]]},getPath=R._getPath={path:function(el){return el.attr("path")},circle:function(el){var a=el.attrs;return ellipsePath(a.cx,a.cy,a.r)},ellipse:function(el){var a=el.attrs;return ellipsePath(a.cx,a.cy,a.rx,a.ry)},rect:function(el){var a=el.attrs;return rectPath(a.x,a.y,a.width,a.height,a.r)},image:function(el){var a=el.attrs;return rectPath(a.x,a.y,a.width,a.height)},text:function(el){var bbox=el._getBBox();return rectPath(bbox.x,bbox.y,bbox.width,bbox.height)},set:function(el){var bbox=el._getBBox();return rectPath(bbox.x,bbox.y,bbox.width,bbox.height)}},mapPath=R.mapPath=function(path,matrix){if(!matrix)return path;var x,y,i,j,ii,jj,pathi;for(path=path2curve(path),i=0,ii=path.length;i<ii;i++)for(pathi=path[i],j=1,jj=pathi.length;j<jj;j+=2)x=matrix.x(pathi[j],pathi[j+1]),y=matrix.y(pathi[j],pathi[j+1]),pathi[j]=x,pathi[j+1]=y;return path};if(R._g=g,R.type=g.win.SVGAngle||g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==R.type){var b,d=g.doc.createElement("div");if(d.innerHTML='<v:shape adj="1"/>',b=d.firstChild,b.style.behavior="url(#default#VML)",!b||"object"!=typeof b.adj)return R.type=E;d=null}R.svg=!(R.vml="VML"==R.type),R._Paper=Paper,R.fn=paperproto=Paper.prototype=R.prototype,R._id=0,R._oid=0,R.is=function(o,type){return type=lowerCase.call(type),"finite"==type?!isnan[has](+o):"array"==type?o instanceof Array:"null"==type&&null===o||type==typeof o&&null!==o||"object"==type&&o===Object(o)||"array"==type&&Array.isArray&&Array.isArray(o)||objectToString.call(o).slice(8,-1).toLowerCase()==type},R.angle=function(x1,y1,x2,y2,x3,y3){if(null==x3){var x=x1-x2,y=y1-y2;return x||y?(180+180*math.atan2(-y,-x)/PI+360)%360:0}return R.angle(x1,y1,x3,y3)-R.angle(x2,y2,x3,y3)},R.rad=function(deg){return deg%360*PI/180},R.deg=function(rad){return 180*rad/PI%360},R.snapTo=function(values,value,tolerance){if(tolerance=R.is(tolerance,"finite")?tolerance:10,R.is(values,array)){for(var i=values.length;i--;)if(abs(values[i]-value)<=tolerance)return values[i]}else{values=+values;var rem=value%values;if(rem<tolerance)return value-rem;if(rem>values-tolerance)return value-rem+values}return value};R.createUUID=function(uuidRegEx,uuidReplacer){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx,uuidReplacer).toUpperCase()}}(/[xy]/g,function(c){var r=16*math.random()|0,v="x"==c?r:3&r|8;return v.toString(16)});R.setWindow=function(newwin){eve("raphael.setWindow",R,g.win,newwin),g.win=newwin,g.doc=g.win.document,R._engine.initWin&&R._engine.initWin(g.win)};var toHex=function(color){if(R.vml){var bod,trim=/^\s+|\s+$/g;try{var docum=new ActiveXObject("htmlfile");docum.write("<body>"),docum.close(),bod=docum.body}catch(e){bod=createPopup().document.body}var range=bod.createTextRange();toHex=cacher(function(color){try{bod.style.color=Str(color).replace(trim,E);var value=range.queryCommandValue("ForeColor");return value=(255&value)<<16|65280&value|(16711680&value)>>>16,"#"+("000000"+value.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=g.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",g.doc.body.appendChild(i),toHex=cacher(function(color){return i.style.color=color,g.doc.defaultView.getComputedStyle(i,E).getPropertyValue("color")})}return toHex(color)},hsbtoString=function(){return"hsb("+[this.h,this.s,this.b]+")"},hsltoString=function(){return"hsl("+[this.h,this.s,this.l]+")"},rgbtoString=function(){return this.hex},prepareRGB=function(r,g,b){if(null==g&&R.is(r,"object")&&"r"in r&&"g"in r&&"b"in r&&(b=r.b,g=r.g,r=r.r),null==g&&R.is(r,string)){var clr=R.getRGB(r);r=clr.r,g=clr.g,b=clr.b}return(r>1||g>1||b>1)&&(r/=255,g/=255,b/=255),[r,g,b]},packageRGB=function(r,g,b,o){r*=255,g*=255,b*=255;var rgb={r:r,g:g,b:b,hex:R.rgb(r,g,b),toString:rgbtoString};return R.is(o,"finite")&&(rgb.opacity=o),rgb};R.color=function(clr){var rgb;return R.is(clr,"object")&&"h"in clr&&"s"in clr&&"b"in clr?(rgb=R.hsb2rgb(clr),clr.r=rgb.r,clr.g=rgb.g,clr.b=rgb.b,clr.hex=rgb.hex):R.is(clr,"object")&&"h"in clr&&"s"in clr&&"l"in clr?(rgb=R.hsl2rgb(clr),clr.r=rgb.r,clr.g=rgb.g,clr.b=rgb.b,clr.hex=rgb.hex):(R.is(clr,"string")&&(clr=R.getRGB(clr)),R.is(clr,"object")&&"r"in clr&&"g"in clr&&"b"in clr?(rgb=R.rgb2hsl(clr),clr.h=rgb.h,clr.s=rgb.s,clr.l=rgb.l,rgb=R.rgb2hsb(clr),clr.v=rgb.b):(clr={hex:"none"},clr.r=clr.g=clr.b=clr.h=clr.s=clr.v=clr.l=-1)),clr.toString=rgbtoString,clr},R.hsb2rgb=function(h,s,v,o){this.is(h,"object")&&"h"in h&&"s"in h&&"b"in h&&(v=h.b,s=h.s,h=h.h,o=h.o),h*=360;var R,G,B,X,C;return h=h%360/60,C=v*s,X=C*(1-abs(h%2-1)),R=G=B=v-C,h=~~h,R+=[C,X,0,0,X,C][h],G+=[X,C,C,X,0,0][h],B+=[0,0,X,C,C,X][h],packageRGB(R,G,B,o)},R.hsl2rgb=function(h,s,l,o){this.is(h,"object")&&"h"in h&&"s"in h&&"l"in h&&(l=h.l,s=h.s,h=h.h),(h>1||s>1||l>1)&&(h/=360,s/=100,l/=100),h*=360;var R,G,B,X,C;return h=h%360/60,C=2*s*(l<.5?l:1-l),X=C*(1-abs(h%2-1)),R=G=B=l-C/2,h=~~h,R+=[C,X,0,0,X,C][h],G+=[X,C,C,X,0,0][h],B+=[0,0,X,C,C,X][h],packageRGB(R,G,B,o)},R.rgb2hsb=function(r,g,b){b=prepareRGB(r,g,b),r=b[0],g=b[1],b=b[2];var H,S,V,C;return V=mmax(r,g,b),C=V-mmin(r,g,b),H=0==C?null:V==r?(g-b)/C:V==g?(b-r)/C+2:(r-g)/C+4,H=(H+360)%6*60/360,S=0==C?0:C/V,{h:H,s:S,b:V,toString:hsbtoString}},R.rgb2hsl=function(r,g,b){b=prepareRGB(r,g,b),r=b[0],g=b[1],b=b[2];var H,S,L,M,m,C;return M=mmax(r,g,b),m=mmin(r,g,b),C=M-m,H=0==C?null:M==r?(g-b)/C:M==g?(b-r)/C+2:(r-g)/C+4,H=(H+360)%6*60/360,L=(M+m)/2,S=0==C?0:L<.5?C/(2*L):C/(2-2*L),{h:H,s:S,l:L,toString:hsltoString}},R._path2string=function(){return this.join(",").replace(p2s,"$1")};R._preload=function(src,f){var img=g.doc.createElement("img");img.style.cssText="position:absolute;left:-9999em;top:-9999em",img.onload=function(){f.call(this),this.onload=null,g.doc.body.removeChild(this)},img.onerror=function(){g.doc.body.removeChild(this)},g.doc.body.appendChild(img),img.src=src};R.getRGB=cacher(function(colour){if(!colour||(colour=Str(colour)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:clrToString};if("none"==colour)return{r:-1,g:-1,b:-1,hex:"none",toString:clrToString};!(hsrg[has](colour.toLowerCase().substring(0,2))||"#"==colour.charAt())&&(colour=toHex(colour));var red,green,blue,opacity,t,values,rgb=colour.match(colourRegExp);return rgb?(rgb[2]&&(blue=toInt(rgb[2].substring(5),16),green=toInt(rgb[2].substring(3,5),16),red=toInt(rgb[2].substring(1,3),16)),rgb[3]&&(blue=toInt((t=rgb[3].charAt(3))+t,16),green=toInt((t=rgb[3].charAt(2))+t,16),red=toInt((t=rgb[3].charAt(1))+t,16)),rgb[4]&&(values=rgb[4][split](commaSpaces),red=toFloat(values[0]),"%"==values[0].slice(-1)&&(red*=2.55),green=toFloat(values[1]),"%"==values[1].slice(-1)&&(green*=2.55),blue=toFloat(values[2]),"%"==values[2].slice(-1)&&(blue*=2.55),"rgba"==rgb[1].toLowerCase().slice(0,4)&&(opacity=toFloat(values[3])),values[3]&&"%"==values[3].slice(-1)&&(opacity/=100)),rgb[5]?(values=rgb[5][split](commaSpaces),red=toFloat(values[0]),"%"==values[0].slice(-1)&&(red*=2.55),green=toFloat(values[1]),"%"==values[1].slice(-1)&&(green*=2.55),blue=toFloat(values[2]),"%"==values[2].slice(-1)&&(blue*=2.55),("deg"==values[0].slice(-3)||"°"==values[0].slice(-1))&&(red/=360),"hsba"==rgb[1].toLowerCase().slice(0,4)&&(opacity=toFloat(values[3])),values[3]&&"%"==values[3].slice(-1)&&(opacity/=100),R.hsb2rgb(red,green,blue,opacity)):rgb[6]?(values=rgb[6][split](commaSpaces),red=toFloat(values[0]),"%"==values[0].slice(-1)&&(red*=2.55),green=toFloat(values[1]),"%"==values[1].slice(-1)&&(green*=2.55),blue=toFloat(values[2]),"%"==values[2].slice(-1)&&(blue*=2.55),("deg"==values[0].slice(-3)||"°"==values[0].slice(-1))&&(red/=360),"hsla"==rgb[1].toLowerCase().slice(0,4)&&(opacity=toFloat(values[3])),values[3]&&"%"==values[3].slice(-1)&&(opacity/=100),R.hsl2rgb(red,green,blue,opacity)):(rgb={r:red,g:green,b:blue,toString:clrToString},rgb.hex="#"+(16777216|blue|green<<8|red<<16).toString(16).slice(1),R.is(opacity,"finite")&&(rgb.opacity=opacity),rgb)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:clrToString}},R),R.hsb=cacher(function(h,s,b){return R.hsb2rgb(h,s,b).hex}),R.hsl=cacher(function(h,s,l){return R.hsl2rgb(h,s,l).hex}),R.rgb=cacher(function(r,g,b){return"#"+(16777216|b|g<<8|r<<16).toString(16).slice(1)}),R.getColor=function(value){var start=this.getColor.start=this.getColor.start||{h:0,s:1,b:value||.75},rgb=this.hsb2rgb(start.h,start.s,start.b);return start.h+=.075,start.h>1&&(start.h=0,start.s-=.2,start.s<=0&&(this.getColor.start={h:0,s:1,b:start.b})),rgb.hex},R.getColor.reset=function(){delete this.start},R.parsePathString=function(pathString){if(!pathString)return null;var pth=paths(pathString);if(pth.arr)return pathClone(pth.arr);var paramCounts={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},data=[];return R.is(pathString,array)&&R.is(pathString[0],array)&&(data=pathClone(pathString)),data.length||Str(pathString).replace(pathCommand,function(a,b,c){var params=[],name=b.toLowerCase();if(c.replace(pathValues,function(a,b){b&&params.push(+b)}),"m"==name&&params.length>2&&(data.push([b][concat](params.splice(0,2))),name="l",b="m"==b?"l":"L"),"r"==name)data.push([b][concat](params));else for(;params.length>=paramCounts[name]&&(data.push([b][concat](params.splice(0,paramCounts[name]))),paramCounts[name]););}),data.toString=R._path2string,pth.arr=pathClone(data),data},R.parseTransformString=cacher(function(TString){if(!TString)return null;var data=[];return R.is(TString,array)&&R.is(TString[0],array)&&(data=pathClone(TString)),data.length||Str(TString).replace(tCommand,function(a,b,c){var params=[];lowerCase.call(b);c.replace(pathValues,function(a,b){b&&params.push(+b)}),data.push([b][concat](params))}),data.toString=R._path2string,data});var paths=function(ps){var p=paths.ps=paths.ps||{};return p[ps]?p[ps].sleep=1:p[ps]={sleep:1},setTimeout(function(){for(var key in p)p[has](key)&&key!=ps&&(p[key].sleep--,!p[key].sleep&&delete p[key])}),p[ps]};R.findDotsAtSegment=function(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y,t){var t1=1-t,t13=pow(t1,3),t12=pow(t1,2),t2=t*t,t3=t2*t,x=t13*p1x+3*t12*t*c1x+3*t1*t*t*c2x+t3*p2x,y=t13*p1y+3*t12*t*c1y+3*t1*t*t*c2y+t3*p2y,mx=p1x+2*t*(c1x-p1x)+t2*(c2x-2*c1x+p1x),my=p1y+2*t*(c1y-p1y)+t2*(c2y-2*c1y+p1y),nx=c1x+2*t*(c2x-c1x)+t2*(p2x-2*c2x+c1x),ny=c1y+2*t*(c2y-c1y)+t2*(p2y-2*c2y+c1y),ax=t1*p1x+t*c1x,ay=t1*p1y+t*c1y,cx=t1*c2x+t*p2x,cy=t1*c2y+t*p2y,alpha=90-180*math.atan2(mx-nx,my-ny)/PI;return(mx>nx||my<ny)&&(alpha+=180),{x:x,y:y,m:{x:mx,y:my},n:{x:nx,y:ny},start:{x:ax,y:ay},end:{x:cx,y:cy},alpha:alpha}},R.bezierBBox=function(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y){R.is(p1x,"array")||(p1x=[p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y]);var bbox=curveDim.apply(null,p1x);return{x:bbox.min.x,y:bbox.min.y,x2:bbox.max.x,y2:bbox.max.y,width:bbox.max.x-bbox.min.x,height:bbox.max.y-bbox.min.y}},R.isPointInsideBBox=function(bbox,x,y){return x>=bbox.x&&x<=bbox.x2&&y>=bbox.y&&y<=bbox.y2},R.isBBoxIntersect=function(bbox1,bbox2){var i=R.isPointInsideBBox;return i(bbox2,bbox1.x,bbox1.y)||i(bbox2,bbox1.x2,bbox1.y)||i(bbox2,bbox1.x,bbox1.y2)||i(bbox2,bbox1.x2,bbox1.y2)||i(bbox1,bbox2.x,bbox2.y)||i(bbox1,bbox2.x2,bbox2.y)||i(bbox1,bbox2.x,bbox2.y2)||i(bbox1,bbox2.x2,bbox2.y2)||(bbox1.x<bbox2.x2&&bbox1.x>bbox2.x||bbox2.x<bbox1.x2&&bbox2.x>bbox1.x)&&(bbox1.y<bbox2.y2&&bbox1.y>bbox2.y||bbox2.y<bbox1.y2&&bbox2.y>bbox1.y)},R.pathIntersection=function(path1,path2){return interPathHelper(path1,path2)},R.pathIntersectionNumber=function(path1,path2){return interPathHelper(path1,path2,1)},R.isPointInsidePath=function(path,x,y){var bbox=R.pathBBox(path);return R.isPointInsideBBox(bbox,x,y)&&interPathHelper(path,[["M",x,y],["H",bbox.x2+10]],1)%2==1},R._removedFactory=function(methodname){return function(){eve("raphael.log",null,"Raphaël: you are calling to method “"+methodname+"” of removed object",methodname)}};var pathDimensions=R.pathBBox=function(path){var pth=paths(path);if(pth.bbox)return clone(pth.bbox);if(!path)return{x:0,y:0,width:0,height:0,x2:0,y2:0};path=path2curve(path);for(var p,x=0,y=0,X=[],Y=[],i=0,ii=path.length;i<ii;i++)if(p=path[i],"M"==p[0])x=p[1],y=p[2],X.push(x),Y.push(y);else{var dim=curveDim(x,y,p[1],p[2],p[3],p[4],p[5],p[6]);X=X[concat](dim.min.x,dim.max.x),Y=Y[concat](dim.min.y,dim.max.y),x=p[5],y=p[6]}var xmin=mmin[apply](0,X),ymin=mmin[apply](0,Y),xmax=mmax[apply](0,X),ymax=mmax[apply](0,Y),width=xmax-xmin,height=ymax-ymin,bb={x:xmin,y:ymin,x2:xmax,y2:ymax,width:width,height:height,cx:xmin+width/2,cy:ymin+height/2};return pth.bbox=clone(bb),bb},pathClone=function(pathArray){var res=clone(pathArray);return res.toString=R._path2string,res},pathToRelative=R._pathToRelative=function(pathArray){var pth=paths(pathArray);if(pth.rel)return pathClone(pth.rel);R.is(pathArray,array)&&R.is(pathArray&&pathArray[0],array)||(pathArray=R.parsePathString(pathArray));
+var res=[],x=0,y=0,mx=0,my=0,start=0;"M"==pathArray[0][0]&&(x=pathArray[0][1],y=pathArray[0][2],mx=x,my=y,start++,res.push(["M",x,y]));for(var i=start,ii=pathArray.length;i<ii;i++){var r=res[i]=[],pa=pathArray[i];if(pa[0]!=lowerCase.call(pa[0]))switch(r[0]=lowerCase.call(pa[0]),r[0]){case"a":r[1]=pa[1],r[2]=pa[2],r[3]=pa[3],r[4]=pa[4],r[5]=pa[5],r[6]=+(pa[6]-x).toFixed(3),r[7]=+(pa[7]-y).toFixed(3);break;case"v":r[1]=+(pa[1]-y).toFixed(3);break;case"m":mx=pa[1],my=pa[2];default:for(var j=1,jj=pa.length;j<jj;j++)r[j]=+(pa[j]-(j%2?x:y)).toFixed(3)}else{r=res[i]=[],"m"==pa[0]&&(mx=pa[1]+x,my=pa[2]+y);for(var k=0,kk=pa.length;k<kk;k++)res[i][k]=pa[k]}var len=res[i].length;switch(res[i][0]){case"z":x=mx,y=my;break;case"h":x+=+res[i][len-1];break;case"v":y+=+res[i][len-1];break;default:x+=+res[i][len-2],y+=+res[i][len-1]}}return res.toString=R._path2string,pth.rel=pathClone(res),res},pathToAbsolute=R._pathToAbsolute=function(pathArray){var pth=paths(pathArray);if(pth.abs)return pathClone(pth.abs);if(R.is(pathArray,array)&&R.is(pathArray&&pathArray[0],array)||(pathArray=R.parsePathString(pathArray)),!pathArray||!pathArray.length)return[["M",0,0]];var res=[],x=0,y=0,mx=0,my=0,start=0;"M"==pathArray[0][0]&&(x=+pathArray[0][1],y=+pathArray[0][2],mx=x,my=y,start++,res[0]=["M",x,y]);for(var r,pa,crz=3==pathArray.length&&"M"==pathArray[0][0]&&"R"==pathArray[1][0].toUpperCase()&&"Z"==pathArray[2][0].toUpperCase(),i=start,ii=pathArray.length;i<ii;i++){if(res.push(r=[]),pa=pathArray[i],pa[0]!=upperCase.call(pa[0]))switch(r[0]=upperCase.call(pa[0]),r[0]){case"A":r[1]=pa[1],r[2]=pa[2],r[3]=pa[3],r[4]=pa[4],r[5]=pa[5],r[6]=+(pa[6]+x),r[7]=+(pa[7]+y);break;case"V":r[1]=+pa[1]+y;break;case"H":r[1]=+pa[1]+x;break;case"R":for(var dots=[x,y][concat](pa.slice(1)),j=2,jj=dots.length;j<jj;j++)dots[j]=+dots[j]+x,dots[++j]=+dots[j]+y;res.pop(),res=res[concat](catmullRom2bezier(dots,crz));break;case"M":mx=+pa[1]+x,my=+pa[2]+y;default:for(j=1,jj=pa.length;j<jj;j++)r[j]=+pa[j]+(j%2?x:y)}else if("R"==pa[0])dots=[x,y][concat](pa.slice(1)),res.pop(),res=res[concat](catmullRom2bezier(dots,crz)),r=["R"][concat](pa.slice(-2));else for(var k=0,kk=pa.length;k<kk;k++)r[k]=pa[k];switch(r[0]){case"Z":x=mx,y=my;break;case"H":x=r[1];break;case"V":y=r[1];break;case"M":mx=r[r.length-2],my=r[r.length-1];default:x=r[r.length-2],y=r[r.length-1]}}return res.toString=R._path2string,pth.abs=pathClone(res),res},l2c=function(x1,y1,x2,y2){return[x1,y1,x2,y2,x2,y2]},q2c=function(x1,y1,ax,ay,x2,y2){var _13=1/3,_23=2/3;return[_13*x1+_23*ax,_13*y1+_23*ay,_13*x2+_23*ax,_13*y2+_23*ay,x2,y2]},a2c=function(x1,y1,rx,ry,angle,large_arc_flag,sweep_flag,x2,y2,recursive){var xy,_120=120*PI/180,rad=PI/180*(+angle||0),res=[],rotate=cacher(function(x,y,rad){var X=x*math.cos(rad)-y*math.sin(rad),Y=x*math.sin(rad)+y*math.cos(rad);return{x:X,y:Y}});if(recursive)f1=recursive[0],f2=recursive[1],cx=recursive[2],cy=recursive[3];else{xy=rotate(x1,y1,-rad),x1=xy.x,y1=xy.y,xy=rotate(x2,y2,-rad),x2=xy.x,y2=xy.y;var x=(math.cos(PI/180*angle),math.sin(PI/180*angle),(x1-x2)/2),y=(y1-y2)/2,h=x*x/(rx*rx)+y*y/(ry*ry);h>1&&(h=math.sqrt(h),rx*=h,ry*=h);var rx2=rx*rx,ry2=ry*ry,k=(large_arc_flag==sweep_flag?-1:1)*math.sqrt(abs((rx2*ry2-rx2*y*y-ry2*x*x)/(rx2*y*y+ry2*x*x))),cx=k*rx*y/ry+(x1+x2)/2,cy=k*-ry*x/rx+(y1+y2)/2,f1=math.asin(((y1-cy)/ry).toFixed(9)),f2=math.asin(((y2-cy)/ry).toFixed(9));f1=x1<cx?PI-f1:f1,f2=x2<cx?PI-f2:f2,f1<0&&(f1=2*PI+f1),f2<0&&(f2=2*PI+f2),sweep_flag&&f1>f2&&(f1-=2*PI),!sweep_flag&&f2>f1&&(f2-=2*PI)}var df=f2-f1;if(abs(df)>_120){var f2old=f2,x2old=x2,y2old=y2;f2=f1+_120*(sweep_flag&&f2>f1?1:-1),x2=cx+rx*math.cos(f2),y2=cy+ry*math.sin(f2),res=a2c(x2,y2,rx,ry,angle,0,sweep_flag,x2old,y2old,[f2,f2old,cx,cy])}df=f2-f1;var c1=math.cos(f1),s1=math.sin(f1),c2=math.cos(f2),s2=math.sin(f2),t=math.tan(df/4),hx=4/3*rx*t,hy=4/3*ry*t,m1=[x1,y1],m2=[x1+hx*s1,y1-hy*c1],m3=[x2+hx*s2,y2-hy*c2],m4=[x2,y2];if(m2[0]=2*m1[0]-m2[0],m2[1]=2*m1[1]-m2[1],recursive)return[m2,m3,m4][concat](res);res=[m2,m3,m4][concat](res).join()[split](",");for(var newres=[],i=0,ii=res.length;i<ii;i++)newres[i]=i%2?rotate(res[i-1],res[i],rad).y:rotate(res[i],res[i+1],rad).x;return newres},findDotAtSegment=function(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y,t){var t1=1-t;return{x:pow(t1,3)*p1x+3*pow(t1,2)*t*c1x+3*t1*t*t*c2x+pow(t,3)*p2x,y:pow(t1,3)*p1y+3*pow(t1,2)*t*c1y+3*t1*t*t*c2y+pow(t,3)*p2y}},curveDim=cacher(function(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y){var dot,a=c2x-2*c1x+p1x-(p2x-2*c2x+c1x),b=2*(c1x-p1x)-2*(c2x-c1x),c=p1x-c1x,t1=(-b+math.sqrt(b*b-4*a*c))/2/a,t2=(-b-math.sqrt(b*b-4*a*c))/2/a,y=[p1y,p2y],x=[p1x,p2x];return abs(t1)>"1e12"&&(t1=.5),abs(t2)>"1e12"&&(t2=.5),t1>0&&t1<1&&(dot=findDotAtSegment(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y,t1),x.push(dot.x),y.push(dot.y)),t2>0&&t2<1&&(dot=findDotAtSegment(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y,t2),x.push(dot.x),y.push(dot.y)),a=c2y-2*c1y+p1y-(p2y-2*c2y+c1y),b=2*(c1y-p1y)-2*(c2y-c1y),c=p1y-c1y,t1=(-b+math.sqrt(b*b-4*a*c))/2/a,t2=(-b-math.sqrt(b*b-4*a*c))/2/a,abs(t1)>"1e12"&&(t1=.5),abs(t2)>"1e12"&&(t2=.5),t1>0&&t1<1&&(dot=findDotAtSegment(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y,t1),x.push(dot.x),y.push(dot.y)),t2>0&&t2<1&&(dot=findDotAtSegment(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y,t2),x.push(dot.x),y.push(dot.y)),{min:{x:mmin[apply](0,x),y:mmin[apply](0,y)},max:{x:mmax[apply](0,x),y:mmax[apply](0,y)}}}),path2curve=R._path2curve=cacher(function(path,path2){var pth=!path2&&paths(path);if(!path2&&pth.curve)return pathClone(pth.curve);for(var p=pathToAbsolute(path),p2=path2&&pathToAbsolute(path2),attrs={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},attrs2={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},processPath=(function(path,d,pcom){var nx,ny;if(!path)return["C",d.x,d.y,d.x,d.y,d.x,d.y];switch(!(path[0]in{T:1,Q:1})&&(d.qx=d.qy=null),path[0]){case"M":d.X=path[1],d.Y=path[2];break;case"A":path=["C"][concat](a2c[apply](0,[d.x,d.y][concat](path.slice(1))));break;case"S":"C"==pcom||"S"==pcom?(nx=2*d.x-d.bx,ny=2*d.y-d.by):(nx=d.x,ny=d.y),path=["C",nx,ny][concat](path.slice(1));break;case"T":"Q"==pcom||"T"==pcom?(d.qx=2*d.x-d.qx,d.qy=2*d.y-d.qy):(d.qx=d.x,d.qy=d.y),path=["C"][concat](q2c(d.x,d.y,d.qx,d.qy,path[1],path[2]));break;case"Q":d.qx=path[1],d.qy=path[2],path=["C"][concat](q2c(d.x,d.y,path[1],path[2],path[3],path[4]));break;case"L":path=["C"][concat](l2c(d.x,d.y,path[1],path[2]));break;case"H":path=["C"][concat](l2c(d.x,d.y,path[1],d.y));break;case"V":path=["C"][concat](l2c(d.x,d.y,d.x,path[1]));break;case"Z":path=["C"][concat](l2c(d.x,d.y,d.X,d.Y))}return path}),fixArc=function(pp,i){if(pp[i].length>7){pp[i].shift();for(var pi=pp[i];pi.length;)pp.splice(i++,0,["C"][concat](pi.splice(0,6)));pp.splice(i,1),ii=mmax(p.length,p2&&p2.length||0)}},fixM=function(path1,path2,a1,a2,i){path1&&path2&&"M"==path1[i][0]&&"M"!=path2[i][0]&&(path2.splice(i,0,["M",a2.x,a2.y]),a1.bx=0,a1.by=0,a1.x=path1[i][1],a1.y=path1[i][2],ii=mmax(p.length,p2&&p2.length||0))},i=0,ii=mmax(p.length,p2&&p2.length||0);i<ii;i++){p[i]=processPath(p[i],attrs),fixArc(p,i),p2&&(p2[i]=processPath(p2[i],attrs2)),p2&&fixArc(p2,i),fixM(p,p2,attrs,attrs2,i),fixM(p2,p,attrs2,attrs,i);var seg=p[i],seg2=p2&&p2[i],seglen=seg.length,seg2len=p2&&seg2.length;attrs.x=seg[seglen-2],attrs.y=seg[seglen-1],attrs.bx=toFloat(seg[seglen-4])||attrs.x,attrs.by=toFloat(seg[seglen-3])||attrs.y,attrs2.bx=p2&&(toFloat(seg2[seg2len-4])||attrs2.x),attrs2.by=p2&&(toFloat(seg2[seg2len-3])||attrs2.y),attrs2.x=p2&&seg2[seg2len-2],attrs2.y=p2&&seg2[seg2len-1]}return p2||(pth.curve=pathClone(p)),p2?[p,p2]:p},null,pathClone),tear=(R._parseDots=cacher(function(gradient){for(var dots=[],i=0,ii=gradient.length;i<ii;i++){var dot={},par=gradient[i].match(/^([^:]*):?([\d\.]*)/);if(dot.color=R.getRGB(par[1]),dot.color.error)return null;dot.color=dot.color.hex,par[2]&&(dot.offset=par[2]+"%"),dots.push(dot)}for(i=1,ii=dots.length-1;i<ii;i++)if(!dots[i].offset){for(var start=toFloat(dots[i-1].offset||0),end=0,j=i+1;j<ii;j++)if(dots[j].offset){end=dots[j].offset;break}end||(end=100,j=ii),end=toFloat(end);for(var d=(end-start)/(j-i+1);i<j;i++)start+=d,dots[i].offset=start+"%"}return dots}),R._tear=function(el,paper){el==paper.top&&(paper.top=el.prev),el==paper.bottom&&(paper.bottom=el.next),el.next&&(el.next.prev=el.prev),el.prev&&(el.prev.next=el.next)}),toMatrix=(R._tofront=function(el,paper){paper.top!==el&&(tear(el,paper),el.next=null,el.prev=paper.top,paper.top.next=el,paper.top=el)},R._toback=function(el,paper){paper.bottom!==el&&(tear(el,paper),el.next=paper.bottom,el.prev=null,paper.bottom.prev=el,paper.bottom=el)},R._insertafter=function(el,el2,paper){tear(el,paper),el2==paper.top&&(paper.top=el),el2.next&&(el2.next.prev=el),el.next=el2.next,el.prev=el2,el2.next=el},R._insertbefore=function(el,el2,paper){tear(el,paper),el2==paper.bottom&&(paper.bottom=el),el2.prev&&(el2.prev.next=el),el.prev=el2.prev,el2.prev=el,el.next=el2},R.toMatrix=function(path,transform){var bb=pathDimensions(path),el={_:{transform:E},getBBox:function(){return bb}};return extractTransform(el,transform),el.matrix}),extractTransform=(R.transformPath=function(path,transform){return mapPath(path,toMatrix(path,transform))},R._extractTransform=function(el,tstr){if(null==tstr)return el._.transform;tstr=Str(tstr).replace(/\.{3}|\u2026/g,el._.transform||E);var tdata=R.parseTransformString(tstr),deg=0,dx=0,dy=0,sx=1,sy=1,_=el._,m=new Matrix;if(_.transform=tdata||[],tdata)for(var i=0,ii=tdata.length;i<ii;i++){var x1,y1,x2,y2,bb,t=tdata[i],tlen=t.length,command=Str(t[0]).toLowerCase(),absolute=t[0]!=command,inver=absolute?m.invert():0;"t"==command&&3==tlen?absolute?(x1=inver.x(0,0),y1=inver.y(0,0),x2=inver.x(t[1],t[2]),y2=inver.y(t[1],t[2]),m.translate(x2-x1,y2-y1)):m.translate(t[1],t[2]):"r"==command?2==tlen?(bb=bb||el.getBBox(1),m.rotate(t[1],bb.x+bb.width/2,bb.y+bb.height/2),deg+=t[1]):4==tlen&&(absolute?(x2=inver.x(t[2],t[3]),y2=inver.y(t[2],t[3]),m.rotate(t[1],x2,y2)):m.rotate(t[1],t[2],t[3]),deg+=t[1]):"s"==command?2==tlen||3==tlen?(bb=bb||el.getBBox(1),m.scale(t[1],t[tlen-1],bb.x+bb.width/2,bb.y+bb.height/2),sx*=t[1],sy*=t[tlen-1]):5==tlen&&(absolute?(x2=inver.x(t[3],t[4]),y2=inver.y(t[3],t[4]),m.scale(t[1],t[2],x2,y2)):m.scale(t[1],t[2],t[3],t[4]),sx*=t[1],sy*=t[2]):"m"==command&&7==tlen&&m.add(t[1],t[2],t[3],t[4],t[5],t[6]),_.dirtyT=1,el.matrix=m}el.matrix=m,_.sx=sx,_.sy=sy,_.deg=deg,_.dx=dx=m.e,_.dy=dy=m.f,1==sx&&1==sy&&!deg&&_.bbox?(_.bbox.x+=+dx,_.bbox.y+=+dy):_.dirtyT=1}),getEmpty=function(item){var l=item[0];switch(l.toLowerCase()){case"t":return[l,0,0];case"m":return[l,1,0,0,1,0,0];case"r":return 4==item.length?[l,0,item[2],item[3]]:[l,0];case"s":return 5==item.length?[l,1,1,item[3],item[4]]:3==item.length?[l,1,1]:[l,1]}},equaliseTransform=R._equaliseTransform=function(t1,t2){t2=Str(t2).replace(/\.{3}|\u2026/g,t1),t1=R.parseTransformString(t1)||[],t2=R.parseTransformString(t2)||[];for(var j,jj,tt1,tt2,maxlength=mmax(t1.length,t2.length),from=[],to=[],i=0;i<maxlength;i++){if(tt1=t1[i]||getEmpty(t2[i]),tt2=t2[i]||getEmpty(tt1),tt1[0]!=tt2[0]||"r"==tt1[0].toLowerCase()&&(tt1[2]!=tt2[2]||tt1[3]!=tt2[3])||"s"==tt1[0].toLowerCase()&&(tt1[3]!=tt2[3]||tt1[4]!=tt2[4]))return;for(from[i]=[],to[i]=[],j=0,jj=mmax(tt1.length,tt2.length);j<jj;j++)j in tt1&&(from[i][j]=tt1[j]),j in tt2&&(to[i][j]=tt2[j])}return{from:from,to:to}};R._getContainer=function(x,y,w,h){var container;if(container=null!=h||R.is(x,"object")?x:g.doc.getElementById(x),null!=container)return container.tagName?null==y?{container:container,width:container.style.pixelWidth||container.offsetWidth,height:container.style.pixelHeight||container.offsetHeight}:{container:container,width:y,height:w}:{container:1,x:x,y:y,width:w,height:h}},R.pathToRelative=pathToRelative,R._engine={},R.path2curve=path2curve,R.matrix=function(a,b,c,d,e,f){return new Matrix(a,b,c,d,e,f)},function(matrixproto){function norm(a){return a[0]*a[0]+a[1]*a[1]}function normalize(a){var mag=math.sqrt(norm(a));a[0]&&(a[0]/=mag),a[1]&&(a[1]/=mag)}matrixproto.add=function(a,b,c,d,e,f){var x,y,z,res,out=[[],[],[]],m=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],matrix=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof Matrix&&(matrix=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),x=0;x<3;x++)for(y=0;y<3;y++){for(res=0,z=0;z<3;z++)res+=m[x][z]*matrix[z][y];out[x][y]=res}this.a=out[0][0],this.b=out[1][0],this.c=out[0][1],this.d=out[1][1],this.e=out[0][2],this.f=out[1][2]},matrixproto.invert=function(){var me=this,x=me.a*me.d-me.b*me.c;return new Matrix(me.d/x,-me.b/x,-me.c/x,me.a/x,(me.c*me.f-me.d*me.e)/x,(me.b*me.e-me.a*me.f)/x)},matrixproto.clone=function(){return new Matrix(this.a,this.b,this.c,this.d,this.e,this.f)},matrixproto.translate=function(x,y){this.add(1,0,0,1,x,y)},matrixproto.scale=function(x,y,cx,cy){null==y&&(y=x),(cx||cy)&&this.add(1,0,0,1,cx,cy),this.add(x,0,0,y,0,0),(cx||cy)&&this.add(1,0,0,1,-cx,-cy)},matrixproto.rotate=function(a,x,y){a=R.rad(a),x=x||0,y=y||0;var cos=+math.cos(a).toFixed(9),sin=+math.sin(a).toFixed(9);this.add(cos,sin,-sin,cos,x,y),this.add(1,0,0,1,-x,-y)},matrixproto.x=function(x,y){return x*this.a+y*this.c+this.e},matrixproto.y=function(x,y){return x*this.b+y*this.d+this.f},matrixproto.get=function(i){return+this[Str.fromCharCode(97+i)].toFixed(4)},matrixproto.toString=function(){return R.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},matrixproto.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},matrixproto.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},matrixproto.split=function(){var out={};out.dx=this.e,out.dy=this.f;var row=[[this.a,this.c],[this.b,this.d]];out.scalex=math.sqrt(norm(row[0])),normalize(row[0]),out.shear=row[0][0]*row[1][0]+row[0][1]*row[1][1],row[1]=[row[1][0]-row[0][0]*out.shear,row[1][1]-row[0][1]*out.shear],out.scaley=math.sqrt(norm(row[1])),normalize(row[1]),out.shear/=out.scaley;var sin=-row[0][1],cos=row[1][1];return cos<0?(out.rotate=R.deg(math.acos(cos)),sin<0&&(out.rotate=360-out.rotate)):out.rotate=R.deg(math.asin(sin)),out.isSimple=!(+out.shear.toFixed(9)||out.scalex.toFixed(9)!=out.scaley.toFixed(9)&&out.rotate),out.isSuperSimple=!+out.shear.toFixed(9)&&out.scalex.toFixed(9)==out.scaley.toFixed(9)&&!out.rotate,out.noRotation=!+out.shear.toFixed(9)&&!out.rotate,out},matrixproto.toTransformString=function(shorter){var s=shorter||this[split]();return s.isSimple?(s.scalex=+s.scalex.toFixed(4),s.scaley=+s.scaley.toFixed(4),s.rotate=+s.rotate.toFixed(4),(s.dx||s.dy?"t"+[s.dx,s.dy]:E)+(1!=s.scalex||1!=s.scaley?"s"+[s.scalex,s.scaley,0,0]:E)+(s.rotate?"r"+[s.rotate,0,0]:E)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(Matrix.prototype);var version=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);"Apple Computer, Inc."==navigator.vendor&&(version&&version[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&version&&version[1]<8?paperproto.safari=function(){var rect=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){rect.remove()})}:paperproto.safari=fun;for(var preventDefault=function(){this.returnValue=!1},preventTouch=function(){return this.originalEvent.preventDefault()},stopPropagation=function(){this.cancelBubble=!0},stopTouch=function(){return this.originalEvent.stopPropagation()},getEventPosition=function(e){var scrollY=g.doc.documentElement.scrollTop||g.doc.body.scrollTop,scrollX=g.doc.documentElement.scrollLeft||g.doc.body.scrollLeft;return{x:e.clientX+scrollX,y:e.clientY+scrollY}},addEvent=function(){return g.doc.addEventListener?function(obj,type,fn,element){var f=function(e){var pos=getEventPosition(e);return fn.call(element,e,pos.x,pos.y)};if(obj.addEventListener(type,f,!1),supportsTouch&&touchMap[type]){var _f=function(e){for(var pos=getEventPosition(e),olde=e,i=0,ii=e.targetTouches&&e.targetTouches.length;i<ii;i++)if(e.targetTouches[i].target==obj){e=e.targetTouches[i],e.originalEvent=olde,e.preventDefault=preventTouch,e.stopPropagation=stopTouch;break}return fn.call(element,e,pos.x,pos.y)};obj.addEventListener(touchMap[type],_f,!1)}return function(){return obj.removeEventListener(type,f,!1),supportsTouch&&touchMap[type]&&obj.removeEventListener(touchMap[type],f,!1),!0}}:g.doc.attachEvent?function(obj,type,fn,element){var f=function(e){e=e||g.win.event;var scrollY=g.doc.documentElement.scrollTop||g.doc.body.scrollTop,scrollX=g.doc.documentElement.scrollLeft||g.doc.body.scrollLeft,x=e.clientX+scrollX,y=e.clientY+scrollY;return e.preventDefault=e.preventDefault||preventDefault,e.stopPropagation=e.stopPropagation||stopPropagation,fn.call(element,e,x,y)};obj.attachEvent("on"+type,f);var detacher=function(){return obj.detachEvent("on"+type,f),!0};return detacher}:void 0}(),drag=[],dragMove=function(e){for(var dragi,x=e.clientX,y=e.clientY,scrollY=g.doc.documentElement.scrollTop||g.doc.body.scrollTop,scrollX=g.doc.documentElement.scrollLeft||g.doc.body.scrollLeft,j=drag.length;j--;){if(dragi=drag[j],supportsTouch&&e.touches){for(var touch,i=e.touches.length;i--;)if(touch=e.touches[i],touch.identifier==dragi.el._drag.id){x=touch.clientX,y=touch.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var o,node=dragi.el.node,next=node.nextSibling,parent=node.parentNode,display=node.style.display;g.win.opera&&parent.removeChild(node),node.style.display="none",o=dragi.el.paper.getElementByPoint(x,y),node.style.display=display,g.win.opera&&(next?parent.insertBefore(node,next):parent.appendChild(node)),o&&eve("raphael.drag.over."+dragi.el.id,dragi.el,o),x+=scrollX,y+=scrollY,eve("raphael.drag.move."+dragi.el.id,dragi.move_scope||dragi.el,x-dragi.el._drag.x,y-dragi.el._drag.y,x,y,e)}},dragUp=function(e){R.unmousemove(dragMove).unmouseup(dragUp);for(var dragi,i=drag.length;i--;)dragi=drag[i],dragi.el._drag={},eve("raphael.drag.end."+dragi.el.id,dragi.end_scope||dragi.start_scope||dragi.move_scope||dragi.el,e);drag=[]},elproto=R.el={},i=events.length;i--;)!function(eventName){R[eventName]=elproto[eventName]=function(fn,scope){return R.is(fn,"function")&&(this.events=this.events||[],this.events.push({name:eventName,f:fn,unbind:addEvent(this.shape||this.node||g.doc,eventName,fn,scope||this)})),this},R["un"+eventName]=elproto["un"+eventName]=function(fn){for(var events=this.events||[],l=events.length;l--;)events[l].name!=eventName||!R.is(fn,"undefined")&&events[l].f!=fn||(events[l].unbind(),events.splice(l,1),!events.length&&delete this.events);return this}}(events[i]);elproto.data=function(key,value){var data=eldata[this.id]=eldata[this.id]||{};if(0==arguments.length)return data;if(1==arguments.length){if(R.is(key,"object")){for(var i in key)key[has](i)&&this.data(i,key[i]);return this}return eve("raphael.data.get."+this.id,this,data[key],key),data[key]}return data[key]=value,eve("raphael.data.set."+this.id,this,value,key),this},elproto.removeData=function(key){return null==key?eldata[this.id]={}:eldata[this.id]&&delete eldata[this.id][key],this},elproto.getData=function(){return clone(eldata[this.id]||{})},elproto.hover=function(f_in,f_out,scope_in,scope_out){return this.mouseover(f_in,scope_in).mouseout(f_out,scope_out||scope_in)},elproto.unhover=function(f_in,f_out){return this.unmouseover(f_in).unmouseout(f_out)};var draggable=[];elproto.drag=function(onmove,onstart,onend,move_scope,start_scope,end_scope){function start(e){(e.originalEvent||e).preventDefault();var x=e.clientX,y=e.clientY,scrollY=g.doc.documentElement.scrollTop||g.doc.body.scrollTop,scrollX=g.doc.documentElement.scrollLeft||g.doc.body.scrollLeft;if(this._drag.id=e.identifier,supportsTouch&&e.touches)for(var touch,i=e.touches.length;i--;)if(touch=e.touches[i],this._drag.id=touch.identifier,touch.identifier==this._drag.id){x=touch.clientX,y=touch.clientY;break}this._drag.x=x+scrollX,this._drag.y=y+scrollY,!drag.length&&R.mousemove(dragMove).mouseup(dragUp),drag.push({el:this,move_scope:move_scope,start_scope:start_scope,end_scope:end_scope}),onstart&&eve.on("raphael.drag.start."+this.id,onstart),onmove&&eve.on("raphael.drag.move."+this.id,onmove),onend&&eve.on("raphael.drag.end."+this.id,onend),eve("raphael.drag.start."+this.id,start_scope||move_scope||this,e.clientX+scrollX,e.clientY+scrollY,e)}return this._drag={},draggable.push({el:this,start:start}),this.mousedown(start),this},elproto.onDragOver=function(f){f?eve.on("raphael.drag.over."+this.id,f):eve.unbind("raphael.drag.over."+this.id)},elproto.undrag=function(){for(var i=draggable.length;i--;)draggable[i].el==this&&(this.unmousedown(draggable[i].start),draggable.splice(i,1),eve.unbind("raphael.drag.*."+this.id));!draggable.length&&R.unmousemove(dragMove).unmouseup(dragUp),drag=[]},paperproto.circle=function(x,y,r){var out=R._engine.circle(this,x||0,y||0,r||0);return this.__set__&&this.__set__.push(out),out},paperproto.rect=function(x,y,w,h,r){var out=R._engine.rect(this,x||0,y||0,w||0,h||0,r||0);return this.__set__&&this.__set__.push(out),out},paperproto.ellipse=function(x,y,rx,ry){var out=R._engine.ellipse(this,x||0,y||0,rx||0,ry||0);return this.__set__&&this.__set__.push(out),out},paperproto.path=function(pathString){pathString&&!R.is(pathString,string)&&!R.is(pathString[0],array)&&(pathString+=E);var out=R._engine.path(R.format[apply](R,arguments),this);return this.__set__&&this.__set__.push(out),out},paperproto.image=function(src,x,y,w,h){var out=R._engine.image(this,src||"about:blank",x||0,y||0,w||0,h||0);return this.__set__&&this.__set__.push(out),out},paperproto.text=function(x,y,text){var out=R._engine.text(this,x||0,y||0,Str(text));return this.__set__&&this.__set__.push(out),out},paperproto.set=function(itemsArray){!R.is(itemsArray,"array")&&(itemsArray=Array.prototype.splice.call(arguments,0,arguments.length));var out=new Set(itemsArray);return this.__set__&&this.__set__.push(out),out.paper=this,out.type="set",out},paperproto.setStart=function(set){this.__set__=set||this.set()},paperproto.setFinish=function(set){var out=this.__set__;return delete this.__set__,out},paperproto.setSize=function(width,height){return R._engine.setSize.call(this,width,height)},paperproto.setViewBox=function(x,y,w,h,fit){return R._engine.setViewBox.call(this,x,y,w,h,fit)},paperproto.top=paperproto.bottom=null,paperproto.raphael=R;var getOffset=function(elem){var box=elem.getBoundingClientRect(),doc=elem.ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(g.win.pageYOffset||docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(g.win.pageXOffset||docElem.scrollLeft||body.scrollLeft)-clientLeft;return{y:top,x:left}};paperproto.getElementByPoint=function(x,y){var paper=this,svg=paper.canvas,target=g.doc.elementFromPoint(x,y);if(g.win.opera&&"svg"==target.tagName){var so=getOffset(svg),sr=svg.createSVGRect();sr.x=x-so.x,sr.y=y-so.y,sr.width=sr.height=1;var hits=svg.getIntersectionList(sr,null);hits.length&&(target=hits[hits.length-1])}if(!target)return null;for(;target.parentNode&&target!=svg.parentNode&&!target.raphael;)target=target.parentNode;return target==paper.canvas.parentNode&&(target=svg),target=target&&target.raphael?paper.getById(target.raphaelid):null},paperproto.getElementsByBBox=function(bbox){var set=this.set();return this.forEach(function(el){R.isBBoxIntersect(el.getBBox(),bbox)&&set.push(el)}),set},paperproto.getById=function(id){for(var bot=this.bottom;bot;){if(bot.id==id)return bot;bot=bot.next}return null},paperproto.forEach=function(callback,thisArg){for(var bot=this.bottom;bot;){if(callback.call(thisArg,bot)===!1)return this;bot=bot.next}return this},paperproto.getElementsByPoint=function(x,y){var set=this.set();return this.forEach(function(el){el.isPointInside(x,y)&&set.push(el)}),set},elproto.isPointInside=function(x,y){var rp=this.realPath=getPath[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(rp=R.transformPath(rp,this.attr("transform"))),R.isPointInsidePath(rp,x,y)},elproto.getBBox=function(isWithoutTransform){if(this.removed)return{};var _=this._;return isWithoutTransform?(!_.dirty&&_.bboxwt||(this.realPath=getPath[this.type](this),_.bboxwt=pathDimensions(this.realPath),_.bboxwt.toString=x_y_w_h,_.dirty=0),_.bboxwt):((_.dirty||_.dirtyT||!_.bbox)&&(!_.dirty&&this.realPath||(_.bboxwt=0,this.realPath=getPath[this.type](this)),_.bbox=pathDimensions(mapPath(this.realPath,this.matrix)),_.bbox.toString=x_y_w_h,_.dirty=_.dirtyT=0),_.bbox)},elproto.clone=function(){if(this.removed)return null;var out=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(out),out},elproto.glow=function(glow){if("text"==this.type)return null;glow=glow||{};var s={width:(glow.width||10)+(+this.attr("stroke-width")||1),fill:glow.fill||!1,opacity:glow.opacity||.5,offsetx:glow.offsetx||0,offsety:glow.offsety||0,color:glow.color||"#000"},c=s.width/2,r=this.paper,out=r.set(),path=this.realPath||getPath[this.type](this);path=this.matrix?mapPath(path,this.matrix):path;for(var i=1;i<c+1;i++)out.push(r.path(path).attr({stroke:s.color,fill:s.fill?s.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(s.width/c*i).toFixed(3),opacity:+(s.opacity/c).toFixed(3)}));return out.insertBefore(this).translate(s.offsetx,s.offsety)};var getPointAtSegmentLength=function(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y,length){return null==length?bezlen(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y):R.findDotsAtSegment(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y,getTatLen(p1x,p1y,c1x,c1y,c2x,c2y,p2x,p2y,length))},getLengthFactory=function(istotal,subpath){return function(path,length,onlystart){path=path2curve(path);for(var x,y,p,l,point,sp="",subpaths={},len=0,i=0,ii=path.length;i<ii;i++){if(p=path[i],"M"==p[0])x=+p[1],y=+p[2];else{if(l=getPointAtSegmentLength(x,y,p[1],p[2],p[3],p[4],p[5],p[6]),len+l>length){if(subpath&&!subpaths.start){if(point=getPointAtSegmentLength(x,y,p[1],p[2],p[3],p[4],p[5],p[6],length-len),sp+=["C"+point.start.x,point.start.y,point.m.x,point.m.y,point.x,point.y],onlystart)return sp;subpaths.start=sp,sp=["M"+point.x,point.y+"C"+point.n.x,point.n.y,point.end.x,point.end.y,p[5],p[6]].join(),len+=l,x=+p[5],y=+p[6];continue}if(!istotal&&!subpath)return point=getPointAtSegmentLength(x,y,p[1],p[2],p[3],p[4],p[5],p[6],length-len),{x:point.x,y:point.y,alpha:point.alpha}}len+=l,x=+p[5],y=+p[6]}sp+=p.shift()+p}return subpaths.end=sp,point=istotal?len:subpath?subpaths:R.findDotsAtSegment(x,y,p[0],p[1],p[2],p[3],p[4],p[5],1),point.alpha&&(point={x:point.x,y:point.y,alpha:point.alpha}),point}},getTotalLength=getLengthFactory(1),getPointAtLength=getLengthFactory(),getSubpathsAtLength=getLengthFactory(0,1);R.getTotalLength=getTotalLength,R.getPointAtLength=getPointAtLength,R.getSubpath=function(path,from,to){if(this.getTotalLength(path)-to<1e-6)return getSubpathsAtLength(path,from).end;var a=getSubpathsAtLength(path,to,1);return from?getSubpathsAtLength(a,from).end:a},elproto.getTotalLength=function(){var path=this.getPath();if(path)return this.node.getTotalLength?this.node.getTotalLength():getTotalLength(path)},elproto.getPointAtLength=function(length){var path=this.getPath();if(path)return getPointAtLength(path,length)},elproto.getPath=function(){var path,getPath=R._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return getPath&&(path=getPath(this)),path},elproto.getSubpath=function(from,to){var path=this.getPath();if(path)return R.getSubpath(path,from,to)};var ef=R.easing_formulas={linear:function(n){return n},"<":function(n){return pow(n,1.7)},">":function(n){return pow(n,.48)},"<>":function(n){var q=.48-n/1.04,Q=math.sqrt(.1734+q*q),x=Q-q,X=pow(abs(x),1/3)*(x<0?-1:1),y=-Q-q,Y=pow(abs(y),1/3)*(y<0?-1:1),t=X+Y+.5;return 3*(1-t)*t*t+t*t*t},backIn:function(n){var s=1.70158;return n*n*((s+1)*n-s)},backOut:function(n){n-=1;var s=1.70158;return n*n*((s+1)*n+s)+1},elastic:function(n){return n==!!n?n:pow(2,-10*n)*math.sin((n-.075)*(2*PI)/.3)+1},bounce:function(n){var l,s=7.5625,p=2.75;return n<1/p?l=s*n*n:n<2/p?(n-=1.5/p,l=s*n*n+.75):n<2.5/p?(n-=2.25/p,l=s*n*n+.9375):(n-=2.625/p,l=s*n*n+.984375),l}};ef.easeIn=ef["ease-in"]=ef["<"],ef.easeOut=ef["ease-out"]=ef[">"],ef.easeInOut=ef["ease-in-out"]=ef["<>"],ef["back-in"]=ef.backIn,ef["back-out"]=ef.backOut;var animationElements=[],requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){setTimeout(callback,16)},animation=function(){for(var Now=+new Date,l=0;l<animationElements.length;l++){var e=animationElements[l];if(!e.el.removed&&!e.paused){var now,key,time=Now-e.start,ms=e.ms,easing=e.easing,from=e.from,diff=e.diff,to=e.to,that=(e.t,e.el),set={},init={};if(e.initstatus?(time=(e.initstatus*e.anim.top-e.prev)/(e.percent-e.prev)*ms,e.status=e.initstatus,delete e.initstatus,e.stop&&animationElements.splice(l--,1)):e.status=(e.prev+(e.percent-e.prev)*(time/ms))/e.anim.top,!(time<0))if(time<ms){var pos=easing(time/ms);for(var attr in from)if(from[has](attr)){switch(availableAnimAttrs[attr]){case nu:now=+from[attr]+pos*ms*diff[attr];break;case"colour":now="rgb("+[upto255(round(from[attr].r+pos*ms*diff[attr].r)),upto255(round(from[attr].g+pos*ms*diff[attr].g)),upto255(round(from[attr].b+pos*ms*diff[attr].b))].join(",")+")";break;case"path":now=[];for(var i=0,ii=from[attr].length;i<ii;i++){now[i]=[from[attr][i][0]];for(var j=1,jj=from[attr][i].length;j<jj;j++)now[i][j]=+from[attr][i][j]+pos*ms*diff[attr][i][j];now[i]=now[i].join(S)}now=now.join(S);break;case"transform":if(diff[attr].real)for(now=[],i=0,ii=from[attr].length;i<ii;i++)for(now[i]=[from[attr][i][0]],j=1,jj=from[attr][i].length;j<jj;j++)now[i][j]=from[attr][i][j]+pos*ms*diff[attr][i][j];else{var get=function(i){return+from[attr][i]+pos*ms*diff[attr][i]};now=[["m",get(0),get(1),get(2),get(3),get(4),get(5)]]}break;case"csv":if("clip-rect"==attr)for(now=[],i=4;i--;)now[i]=+from[attr][i]+pos*ms*diff[attr][i];break;default:var from2=[][concat](from[attr]);for(now=[],i=that.paper.customAttributes[attr].length;i--;)now[i]=+from2[i]+pos*ms*diff[attr][i]}set[attr]=now}that.attr(set),function(id,that,anim){setTimeout(function(){eve("raphael.anim.frame."+id,that,anim)})}(that.id,that,e.anim)}else{if(function(f,el,a){setTimeout(function(){eve("raphael.anim.frame."+el.id,el,a),eve("raphael.anim.finish."+el.id,el,a),R.is(f,"function")&&f.call(el)})}(e.callback,that,e.anim),that.attr(to),animationElements.splice(l--,1),e.repeat>1&&!e.next){for(key in to)to[has](key)&&(init[key]=e.totalOrigin[key]);e.el.attr(init),runAnimation(e.anim,e.el,e.anim.percents[0],null,e.totalOrigin,e.repeat-1)}e.next&&!e.stop&&runAnimation(e.anim,e.el,e.next,null,e.totalOrigin,e.repeat)}}}R.svg&&that&&that.paper&&that.paper.safari(),animationElements.length&&requestAnimFrame(animation)},upto255=function(color){return color>255?255:color<0?0:color};elproto.animateWith=function(el,anim,params,ms,easing,callback){var element=this;if(element.removed)return callback&&callback.call(element),element;var a=params instanceof Animation?params:R.animation(params,ms,easing,callback);runAnimation(a,element,a.percents[0],null,element.attr());for(var i=0,ii=animationElements.length;i<ii;i++)if(animationElements[i].anim==anim&&animationElements[i].el==el){animationElements[ii-1].start=animationElements[i].start;break}return element},elproto.onAnimation=function(f){return f?eve.on("raphael.anim.frame."+this.id,f):eve.unbind("raphael.anim.frame."+this.id),this},Animation.prototype.delay=function(delay){var a=new Animation(this.anim,this.ms);return a.times=this.times,a.del=+delay||0,a},Animation.prototype.repeat=function(times){var a=new Animation(this.anim,this.ms);return a.del=this.del,a.times=math.floor(mmax(times,0))||1,a},R.animation=function(params,ms,easing,callback){if(params instanceof Animation)return params;
+!R.is(easing,"function")&&easing||(callback=callback||easing||null,easing=null),params=Object(params),ms=+ms||0;var json,attr,p={};for(attr in params)params[has](attr)&&toFloat(attr)!=attr&&toFloat(attr)+"%"!=attr&&(json=!0,p[attr]=params[attr]);return json?(easing&&(p.easing=easing),callback&&(p.callback=callback),new Animation({100:p},ms)):new Animation(params,ms)},elproto.animate=function(params,ms,easing,callback){var element=this;if(element.removed)return callback&&callback.call(element),element;var anim=params instanceof Animation?params:R.animation(params,ms,easing,callback);return runAnimation(anim,element,anim.percents[0],null,element.attr()),element},elproto.setTime=function(anim,value){return anim&&null!=value&&this.status(anim,mmin(value,anim.ms)/anim.ms),this},elproto.status=function(anim,value){var len,e,out=[],i=0;if(null!=value)return runAnimation(anim,this,-1,mmin(value,1)),this;for(len=animationElements.length;i<len;i++)if(e=animationElements[i],e.el.id==this.id&&(!anim||e.anim==anim)){if(anim)return e.status;out.push({anim:e.anim,status:e.status})}return anim?0:out},elproto.pause=function(anim){for(var i=0;i<animationElements.length;i++)animationElements[i].el.id!=this.id||anim&&animationElements[i].anim!=anim||eve("raphael.anim.pause."+this.id,this,animationElements[i].anim)!==!1&&(animationElements[i].paused=!0);return this},elproto.resume=function(anim){for(var i=0;i<animationElements.length;i++)if(animationElements[i].el.id==this.id&&(!anim||animationElements[i].anim==anim)){var e=animationElements[i];eve("raphael.anim.resume."+this.id,this,e.anim)!==!1&&(delete e.paused,this.status(e.anim,e.status))}return this},elproto.stop=function(anim){for(var i=0;i<animationElements.length;i++)animationElements[i].el.id!=this.id||anim&&animationElements[i].anim!=anim||eve("raphael.anim.stop."+this.id,this,animationElements[i].anim)!==!1&&animationElements.splice(i--,1);return this},eve.on("raphael.remove",stopAnimation),eve.on("raphael.clear",stopAnimation),elproto.toString=function(){return"Raphaël’s object"};var Set=function(items){if(this.items=[],this.length=0,this.type="set",items)for(var i=0,ii=items.length;i<ii;i++)!items[i]||items[i].constructor!=elproto.constructor&&items[i].constructor!=Set||(this[this.items.length]=this.items[this.items.length]=items[i],this.length++)},setproto=Set.prototype;setproto.push=function(){for(var item,len,i=0,ii=arguments.length;i<ii;i++)item=arguments[i],!item||item.constructor!=elproto.constructor&&item.constructor!=Set||(len=this.items.length,this[len]=this.items[len]=item,this.length++);return this},setproto.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},setproto.forEach=function(callback,thisArg){for(var i=0,ii=this.items.length;i<ii;i++)if(callback.call(thisArg,this.items[i],i)===!1)return this;return this};for(var method in elproto)elproto[has](method)&&(setproto[method]=function(methodname){return function(){var arg=arguments;return this.forEach(function(el){el[methodname][apply](el,arg)})}}(method));return setproto.attr=function(name,value){if(name&&R.is(name,array)&&R.is(name[0],"object"))for(var j=0,jj=name.length;j<jj;j++)this.items[j].attr(name[j]);else for(var i=0,ii=this.items.length;i<ii;i++)this.items[i].attr(name,value);return this},setproto.clear=function(){for(;this.length;)this.pop()},setproto.splice=function(index,count,insertion){index=index<0?mmax(this.length+index,0):index,count=mmax(0,mmin(this.length-index,count));var i,tail=[],todel=[],args=[];for(i=2;i<arguments.length;i++)args.push(arguments[i]);for(i=0;i<count;i++)todel.push(this[index+i]);for(;i<this.length-index;i++)tail.push(this[index+i]);var arglen=args.length;for(i=0;i<arglen+tail.length;i++)this.items[index+i]=this[index+i]=i<arglen?args[i]:tail[i-arglen];for(i=this.items.length=this.length-=count-arglen;this[i];)delete this[i++];return new Set(todel)},setproto.exclude=function(el){for(var i=0,ii=this.length;i<ii;i++)if(this[i]==el)return this.splice(i,1),!0},setproto.animate=function(params,ms,easing,callback){(R.is(easing,"function")||!easing)&&(callback=easing||null);var item,collector,len=this.items.length,i=len,set=this;if(!len)return this;callback&&(collector=function(){!--len&&callback.call(set)}),easing=R.is(easing,string)?easing:collector;var anim=R.animation(params,ms,easing,collector);for(item=this.items[--i].animate(anim);i--;)this.items[i]&&!this.items[i].removed&&this.items[i].animateWith(item,anim,anim),this.items[i]&&!this.items[i].removed||len--;return this},setproto.insertAfter=function(el){for(var i=this.items.length;i--;)this.items[i].insertAfter(el);return this},setproto.getBBox=function(){for(var x=[],y=[],x2=[],y2=[],i=this.items.length;i--;)if(!this.items[i].removed){var box=this.items[i].getBBox();x.push(box.x),y.push(box.y),x2.push(box.x+box.width),y2.push(box.y+box.height)}return x=mmin[apply](0,x),y=mmin[apply](0,y),x2=mmax[apply](0,x2),y2=mmax[apply](0,y2),{x:x,y:y,x2:x2,y2:y2,width:x2-x,height:y2-y}},setproto.clone=function(s){s=this.paper.set();for(var i=0,ii=this.items.length;i<ii;i++)s.push(this.items[i].clone());return s},setproto.toString=function(){return"Raphaël‘s set"},setproto.glow=function(glowConfig){var ret=this.paper.set();return this.forEach(function(shape,index){var g=shape.glow(glowConfig);null!=g&&g.forEach(function(shape2,index2){ret.push(shape2)})}),ret},setproto.isPointInside=function(x,y){var isPointInside=!1;return this.forEach(function(el){if(el.isPointInside(x,y))return console.log("runned"),isPointInside=!0,!1}),isPointInside},R.registerFont=function(font){if(!font.face)return font;this.fonts=this.fonts||{};var fontcopy={w:font.w,face:{},glyphs:{}},family=font.face["font-family"];for(var prop in font.face)font.face[has](prop)&&(fontcopy.face[prop]=font.face[prop]);if(this.fonts[family]?this.fonts[family].push(fontcopy):this.fonts[family]=[fontcopy],!font.svg){fontcopy.face["units-per-em"]=toInt(font.face["units-per-em"],10);for(var glyph in font.glyphs)if(font.glyphs[has](glyph)){var path=font.glyphs[glyph];if(fontcopy.glyphs[glyph]={w:path.w,k:{},d:path.d&&"M"+path.d.replace(/[mlcxtrv]/g,function(command){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[command]||"M"})+"z"},path.k)for(var k in path.k)path[has](k)&&(fontcopy.glyphs[glyph].k[k]=path.k[k])}}return font},paperproto.getFont=function(family,weight,style,stretch){if(stretch=stretch||"normal",style=style||"normal",weight=+weight||{normal:400,bold:700,lighter:300,bolder:800}[weight]||400,R.fonts){var font=R.fonts[family];if(!font){var name=new RegExp("(^|\\s)"+family.replace(/[^\w\d\s+!~.:_-]/g,E)+"(\\s|$)","i");for(var fontName in R.fonts)if(R.fonts[has](fontName)&&name.test(fontName)){font=R.fonts[fontName];break}}var thefont;if(font)for(var i=0,ii=font.length;i<ii&&(thefont=font[i],thefont.face["font-weight"]!=weight||thefont.face["font-style"]!=style&&thefont.face["font-style"]||thefont.face["font-stretch"]!=stretch);i++);return thefont}},paperproto.print=function(x,y,string,font,size,origin,letter_spacing,line_spacing){origin=origin||"middle",letter_spacing=mmax(mmin(letter_spacing||0,1),-1),line_spacing=mmax(mmin(line_spacing||1,3),1);var scale,letters=Str(string)[split](E),shift=0,notfirst=0,path=E;if(R.is(font,"string")&&(font=this.getFont(font)),font){scale=(size||16)/font.face["units-per-em"];for(var bb=font.face.bbox[split](separator),top=+bb[0],lineHeight=bb[3]-bb[1],shifty=0,height=+bb[1]+("baseline"==origin?lineHeight+ +font.face.descent:lineHeight/2),i=0,ii=letters.length;i<ii;i++){if("\n"==letters[i])shift=0,curr=0,notfirst=0,shifty+=lineHeight*line_spacing;else{var prev=notfirst&&font.glyphs[letters[i-1]]||{},curr=font.glyphs[letters[i]];shift+=notfirst?(prev.w||font.w)+(prev.k&&prev.k[letters[i]]||0)+font.w*letter_spacing:0,notfirst=1}curr&&curr.d&&(path+=R.transformPath(curr.d,["t",shift*scale,shifty*scale,"s",scale,scale,top,height,"t",(x-top)/scale,(y-height)/scale]))}}return this.path(path).attr({fill:"#000",stroke:"none"})},paperproto.add=function(json){if(R.is(json,"array"))for(var j,res=this.set(),i=0,ii=json.length;i<ii;i++)j=json[i]||{},elements[has](j.type)&&res.push(this[j.type]().attr(j));return res},R.format=function(token,params){var args=R.is(params,array)?[0][concat](params):arguments;return token&&R.is(token,string)&&args.length-1&&(token=token.replace(formatrg,function(str,i){return null==args[++i]?E:args[i]})),token||E},R.fullfill=function(){var tokenRegex=/\{([^\}]+)\}/g,objNotationRegex=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,replacer=function(all,key,obj){var res=obj;return key.replace(objNotationRegex,function(all,name,quote,quotedName,isFunc){name=name||quotedName,res&&(name in res&&(res=res[name]),"function"==typeof res&&isFunc&&(res=res()))}),res=(null==res||res==obj?all:res)+""};return function(str,obj){return String(str).replace(tokenRegex,function(all,key){return replacer(all,key,obj)})}}(),R.st=setproto,function(doc,loaded,f){function isLoaded(){/in/.test(doc.readyState)?setTimeout(isLoaded,9):R.eve("raphael.DOMload")}null==doc.readyState&&doc.addEventListener&&(doc.addEventListener(loaded,f=function(){doc.removeEventListener(loaded,f,!1),doc.readyState="complete"},!1),doc.readyState="loading"),isLoaded()}(document,"DOMContentLoaded"),eve.on("raphael.DOMload",function(){loaded=!0}),function(){if(R.svg){var has="hasOwnProperty",Str=String,toFloat=parseFloat,toInt=parseInt,math=Math,mmax=math.max,abs=math.abs,pow=math.pow,separator=/[, ]+/,eve=R.eve,E="",S=" ",xlink="http://www.w3.org/1999/xlink",markers={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},markerCounter={};R.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var $=function(el,attr){if(attr){"string"==typeof el&&(el=$(el));for(var key in attr)attr[has](key)&&("xlink:"==key.substring(0,6)?el.setAttributeNS(xlink,key.substring(6),Str(attr[key])):el.setAttribute(key,Str(attr[key])))}else el=R._g.doc.createElementNS("http://www.w3.org/2000/svg",el),el.style&&(el.style.webkitTapHighlightColor="rgba(0,0,0,0)");return el},addGradientFill=function(element,gradient){var type="linear",id=element.id+gradient,fx=.5,fy=.5,o=element.node,SVG=element.paper,s=o.style,el=R._g.doc.getElementById(id);if(!el){if(gradient=Str(gradient).replace(R._radial_gradient,function(all,_fx,_fy){if(type="radial",_fx&&_fy){fx=toFloat(_fx),fy=toFloat(_fy);var dir=2*(fy>.5)-1;pow(fx-.5,2)+pow(fy-.5,2)>.25&&(fy=math.sqrt(.25-pow(fx-.5,2))*dir+.5)&&.5!=fy&&(fy=fy.toFixed(5)-1e-5*dir)}return E}),gradient=gradient.split(/\s*\-\s*/),"linear"==type){var angle=gradient.shift();if(angle=-toFloat(angle),isNaN(angle))return null;var vector=[0,0,math.cos(R.rad(angle)),math.sin(R.rad(angle))],max=1/(mmax(abs(vector[2]),abs(vector[3]))||1);vector[2]*=max,vector[3]*=max,vector[2]<0&&(vector[0]=-vector[2],vector[2]=0),vector[3]<0&&(vector[1]=-vector[3],vector[3]=0)}var dots=R._parseDots(gradient);if(!dots)return null;if(id=id.replace(/[\(\)\s,\xb0#]/g,"_"),element.gradient&&id!=element.gradient.id&&(SVG.defs.removeChild(element.gradient),delete element.gradient),!element.gradient){el=$(type+"Gradient",{id:id}),element.gradient=el,$(el,"radial"==type?{fx:fx,fy:fy}:{x1:vector[0],y1:vector[1],x2:vector[2],y2:vector[3],gradientTransform:element.matrix.invert()}),SVG.defs.appendChild(el);for(var i=0,ii=dots.length;i<ii;i++)el.appendChild($("stop",{offset:dots[i].offset?dots[i].offset:i?"100%":"0%","stop-color":dots[i].color||"#fff"}))}}return $(o,{fill:"url(#"+id+")",opacity:1,"fill-opacity":1}),s.fill=E,s.opacity=1,s.fillOpacity=1,1},updatePosition=function(o){var bbox=o.getBBox(1);$(o.pattern,{patternTransform:o.matrix.invert()+" translate("+bbox.x+","+bbox.y+")"})},addArrow=function(o,value,isEnd){if("path"==o.type){for(var from,to,dx,refX,attr,values=Str(value).toLowerCase().split("-"),p=o.paper,se=isEnd?"end":"start",node=o.node,attrs=o.attrs,stroke=attrs["stroke-width"],i=values.length,type="classic",w=3,h=3,t=5;i--;)switch(values[i]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":type=values[i];break;case"wide":h=5;break;case"narrow":h=2;break;case"long":w=5;break;case"short":w=2}if("open"==type?(w+=2,h+=2,t+=2,dx=1,refX=isEnd?4:1,attr={fill:"none",stroke:attrs.stroke}):(refX=dx=w/2,attr={fill:attrs.stroke,stroke:"none"}),o._.arrows?isEnd?(o._.arrows.endPath&&markerCounter[o._.arrows.endPath]--,o._.arrows.endMarker&&markerCounter[o._.arrows.endMarker]--):(o._.arrows.startPath&&markerCounter[o._.arrows.startPath]--,o._.arrows.startMarker&&markerCounter[o._.arrows.startMarker]--):o._.arrows={},"none"!=type){var pathId="raphael-marker-"+type,markerId="raphael-marker-"+se+type+w+h;R._g.doc.getElementById(pathId)?markerCounter[pathId]++:(p.defs.appendChild($($("path"),{"stroke-linecap":"round",d:markers[type],id:pathId})),markerCounter[pathId]=1);var use,marker=R._g.doc.getElementById(markerId);marker?(markerCounter[markerId]++,use=marker.getElementsByTagName("use")[0]):(marker=$($("marker"),{id:markerId,markerHeight:h,markerWidth:w,orient:"auto",refX:refX,refY:h/2}),use=$($("use"),{"xlink:href":"#"+pathId,transform:(isEnd?"rotate(180 "+w/2+" "+h/2+") ":E)+"scale("+w/t+","+h/t+")","stroke-width":(1/((w/t+h/t)/2)).toFixed(4)}),marker.appendChild(use),p.defs.appendChild(marker),markerCounter[markerId]=1),$(use,attr);var delta=dx*("diamond"!=type&&"oval"!=type);isEnd?(from=o._.arrows.startdx*stroke||0,to=R.getTotalLength(attrs.path)-delta*stroke):(from=delta*stroke,to=R.getTotalLength(attrs.path)-(o._.arrows.enddx*stroke||0)),attr={},attr["marker-"+se]="url(#"+markerId+")",(to||from)&&(attr.d=R.getSubpath(attrs.path,from,to)),$(node,attr),o._.arrows[se+"Path"]=pathId,o._.arrows[se+"Marker"]=markerId,o._.arrows[se+"dx"]=delta,o._.arrows[se+"Type"]=type,o._.arrows[se+"String"]=value}else isEnd?(from=o._.arrows.startdx*stroke||0,to=R.getTotalLength(attrs.path)-from):(from=0,to=R.getTotalLength(attrs.path)-(o._.arrows.enddx*stroke||0)),o._.arrows[se+"Path"]&&$(node,{d:R.getSubpath(attrs.path,from,to)}),delete o._.arrows[se+"Path"],delete o._.arrows[se+"Marker"],delete o._.arrows[se+"dx"],delete o._.arrows[se+"Type"],delete o._.arrows[se+"String"];for(attr in markerCounter)if(markerCounter[has](attr)&&!markerCounter[attr]){var item=R._g.doc.getElementById(attr);item&&item.parentNode.removeChild(item)}}},dasharray={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},addDashes=function(o,value,params){if(value=dasharray[Str(value).toLowerCase()]){for(var width=o.attrs["stroke-width"]||"1",butt={round:width,square:width,butt:0}[o.attrs["stroke-linecap"]||params["stroke-linecap"]]||0,dashes=[],i=value.length;i--;)dashes[i]=value[i]*width+(i%2?1:-1)*butt;$(o.node,{"stroke-dasharray":dashes.join(",")})}},setFillAndStroke=function(o,params){var node=o.node,attrs=o.attrs,vis=node.style.visibility;node.style.visibility="hidden";for(var att in params)if(params[has](att)){if(!R._availableAttrs[has](att))continue;var value=params[att];switch(attrs[att]=value,att){case"blur":o.blur(value);break;case"href":case"title":var hl=$("title"),val=R._g.doc.createTextNode(value);hl.appendChild(val),node.appendChild(hl);break;case"target":var pn=node.parentNode;if("a"!=pn.tagName.toLowerCase()){var hl=$("a");pn.insertBefore(hl,node),hl.appendChild(node),pn=hl}"target"==att?pn.setAttributeNS(xlink,"show","blank"==value?"new":value):pn.setAttributeNS(xlink,att,value);break;case"cursor":node.style.cursor=value;break;case"transform":o.transform(value);break;case"arrow-start":addArrow(o,value);break;case"arrow-end":addArrow(o,value,1);break;case"clip-rect":var rect=Str(value).split(separator);if(4==rect.length){o.clip&&o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);var el=$("clipPath"),rc=$("rect");el.id=R.createUUID(),$(rc,{x:rect[0],y:rect[1],width:rect[2],height:rect[3]}),el.appendChild(rc),o.paper.defs.appendChild(el),$(node,{"clip-path":"url(#"+el.id+")"}),o.clip=rc}if(!value){var path=node.getAttribute("clip-path");if(path){var clip=R._g.doc.getElementById(path.replace(/(^url\(#|\)$)/g,E));clip&&clip.parentNode.removeChild(clip),$(node,{"clip-path":E}),delete o.clip}}break;case"path":"path"==o.type&&($(node,{d:value?attrs.path=R._pathToAbsolute(value):"M0,0"}),o._.dirty=1,o._.arrows&&("startString"in o._.arrows&&addArrow(o,o._.arrows.startString),"endString"in o._.arrows&&addArrow(o,o._.arrows.endString,1)));break;case"width":if(node.setAttribute(att,value),o._.dirty=1,!attrs.fx)break;att="x",value=attrs.x;case"x":attrs.fx&&(value=-attrs.x-(attrs.width||0));case"rx":if("rx"==att&&"rect"==o.type)break;case"cx":node.setAttribute(att,value),o.pattern&&updatePosition(o),o._.dirty=1;break;case"height":if(node.setAttribute(att,value),o._.dirty=1,!attrs.fy)break;att="y",value=attrs.y;case"y":attrs.fy&&(value=-attrs.y-(attrs.height||0));case"ry":if("ry"==att&&"rect"==o.type)break;case"cy":node.setAttribute(att,value),o.pattern&&updatePosition(o),o._.dirty=1;break;case"r":"rect"==o.type?$(node,{rx:value,ry:value}):node.setAttribute(att,value),o._.dirty=1;break;case"src":"image"==o.type&&node.setAttributeNS(xlink,"href",value);break;case"stroke-width":1==o._.sx&&1==o._.sy||(value/=mmax(abs(o._.sx),abs(o._.sy))||1),o.paper._vbSize&&(value*=o.paper._vbSize),node.setAttribute(att,value),attrs["stroke-dasharray"]&&addDashes(o,attrs["stroke-dasharray"],params),o._.arrows&&("startString"in o._.arrows&&addArrow(o,o._.arrows.startString),"endString"in o._.arrows&&addArrow(o,o._.arrows.endString,1));break;case"stroke-dasharray":addDashes(o,value,params);break;case"fill":var isURL=Str(value).match(R._ISURL);if(isURL){el=$("pattern");var ig=$("image");el.id=R.createUUID(),$(el,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),$(ig,{x:0,y:0,"xlink:href":isURL[1]}),el.appendChild(ig),function(el){R._preload(isURL[1],function(){var w=this.offsetWidth,h=this.offsetHeight;$(el,{width:w,height:h}),$(ig,{width:w,height:h}),o.paper.safari()})}(el),o.paper.defs.appendChild(el),$(node,{fill:"url(#"+el.id+")"}),o.pattern=el,o.pattern&&updatePosition(o);break}var clr=R.getRGB(value);if(clr.error){if(("circle"==o.type||"ellipse"==o.type||"r"!=Str(value).charAt())&&addGradientFill(o,value)){if("opacity"in attrs||"fill-opacity"in attrs){var gradient=R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g,E));if(gradient){var stops=gradient.getElementsByTagName("stop");$(stops[stops.length-1],{"stop-opacity":("opacity"in attrs?attrs.opacity:1)*("fill-opacity"in attrs?attrs["fill-opacity"]:1)})}}attrs.gradient=value,attrs.fill="none";break}}else delete params.gradient,delete attrs.gradient,!R.is(attrs.opacity,"undefined")&&R.is(params.opacity,"undefined")&&$(node,{opacity:attrs.opacity}),!R.is(attrs["fill-opacity"],"undefined")&&R.is(params["fill-opacity"],"undefined")&&$(node,{"fill-opacity":attrs["fill-opacity"]});clr[has]("opacity")&&$(node,{"fill-opacity":clr.opacity>1?clr.opacity/100:clr.opacity});case"stroke":clr=R.getRGB(value),node.setAttribute(att,clr.hex),"stroke"==att&&clr[has]("opacity")&&$(node,{"stroke-opacity":clr.opacity>1?clr.opacity/100:clr.opacity}),"stroke"==att&&o._.arrows&&("startString"in o._.arrows&&addArrow(o,o._.arrows.startString),"endString"in o._.arrows&&addArrow(o,o._.arrows.endString,1));break;case"gradient":("circle"==o.type||"ellipse"==o.type||"r"!=Str(value).charAt())&&addGradientFill(o,value);break;case"opacity":attrs.gradient&&!attrs[has]("stroke-opacity")&&$(node,{"stroke-opacity":value>1?value/100:value});case"fill-opacity":if(attrs.gradient){gradient=R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g,E)),gradient&&(stops=gradient.getElementsByTagName("stop"),$(stops[stops.length-1],{"stop-opacity":value}));break}default:"font-size"==att&&(value=toInt(value,10)+"px");var cssrule=att.replace(/(\-.)/g,function(w){return w.substring(1).toUpperCase()});node.style[cssrule]=value,o._.dirty=1,node.setAttribute(att,value)}}tuneText(o,params),node.style.visibility=vis},leading=1.2,tuneText=function(el,params){if("text"==el.type&&(params[has]("text")||params[has]("font")||params[has]("font-size")||params[has]("x")||params[has]("y"))){var a=el.attrs,node=el.node,fontSize=node.firstChild?toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild,E).getPropertyValue("font-size"),10):10;if(params[has]("text")){for(a.text=params.text;node.firstChild;)node.removeChild(node.firstChild);for(var tspan,texts=Str(params.text).split("\n"),tspans=[],i=0,ii=texts.length;i<ii;i++)tspan=$("tspan"),i&&$(tspan,{dy:fontSize*leading,x:a.x}),tspan.appendChild(R._g.doc.createTextNode(texts[i])),node.appendChild(tspan),tspans[i]=tspan}else for(tspans=node.getElementsByTagName("tspan"),i=0,ii=tspans.length;i<ii;i++)i?$(tspans[i],{dy:fontSize*leading,x:a.x}):$(tspans[0],{dy:0});$(node,{x:a.x,y:a.y}),el._.dirty=1;var bb=el._getBBox(),dif=a.y-(bb.y+bb.height/2);dif&&R.is(dif,"finite")&&$(tspans[0],{dy:dif})}},Element=function(node,svg){this[0]=this.node=node,node.raphael=!0,this.id=R._oid++,node.raphaelid=this.id,this.matrix=R.matrix(),this.realPath=null,this.paper=svg,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!svg.bottom&&(svg.bottom=this),this.prev=svg.top,svg.top&&(svg.top.next=this),svg.top=this,this.next=null},elproto=R.el;Element.prototype=elproto,elproto.constructor=Element,R._engine.path=function(pathString,SVG){var el=$("path");SVG.canvas&&SVG.canvas.appendChild(el);var p=new Element(el,SVG);return p.type="path",setFillAndStroke(p,{fill:"none",stroke:"#000",path:pathString}),p},elproto.rotate=function(deg,cx,cy){if(this.removed)return this;if(deg=Str(deg).split(separator),deg.length-1&&(cx=toFloat(deg[1]),cy=toFloat(deg[2])),deg=toFloat(deg[0]),null==cy&&(cx=cy),null==cx||null==cy){var bbox=this.getBBox(1);cx=bbox.x+bbox.width/2,cy=bbox.y+bbox.height/2}return this.transform(this._.transform.concat([["r",deg,cx,cy]])),this},elproto.scale=function(sx,sy,cx,cy){if(this.removed)return this;if(sx=Str(sx).split(separator),sx.length-1&&(sy=toFloat(sx[1]),cx=toFloat(sx[2]),cy=toFloat(sx[3])),sx=toFloat(sx[0]),null==sy&&(sy=sx),null==cy&&(cx=cy),null==cx||null==cy)var bbox=this.getBBox(1);return cx=null==cx?bbox.x+bbox.width/2:cx,cy=null==cy?bbox.y+bbox.height/2:cy,this.transform(this._.transform.concat([["s",sx,sy,cx,cy]])),this},elproto.translate=function(dx,dy){return this.removed?this:(dx=Str(dx).split(separator),dx.length-1&&(dy=toFloat(dx[1])),dx=toFloat(dx[0])||0,dy=+dy||0,this.transform(this._.transform.concat([["t",dx,dy]])),this)},elproto.transform=function(tstr){var _=this._;if(null==tstr)return _.transform;if(R._extractTransform(this,tstr),this.clip&&$(this.clip,{transform:this.matrix.invert()}),this.pattern&&updatePosition(this),this.node&&$(this.node,{transform:this.matrix}),1!=_.sx||1!=_.sy){var sw=this.attrs[has]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":sw})}return this},elproto.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},elproto.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},elproto.remove=function(){if(!this.removed&&this.node.parentNode){var paper=this.paper;paper.__set__&&paper.__set__.exclude(this),eve.unbind("raphael.*.*."+this.id),this.gradient&&paper.defs.removeChild(this.gradient),R._tear(this,paper),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var i in this)this[i]="function"==typeof this[i]?R._removedFactory(i):null;this.removed=!0}},elproto._getBBox=function(){if("none"==this.node.style.display){this.show();var hide=!0}var bbox={};try{bbox=this.node.getBBox()}catch(e){}finally{bbox=bbox||{}}return hide&&this.hide(),bbox},elproto.attr=function(name,value){if(this.removed)return this;if(null==name){var res={};for(var a in this.attrs)this.attrs[has](a)&&(res[a]=this.attrs[a]);return res.gradient&&"none"==res.fill&&(res.fill=res.gradient)&&delete res.gradient,res.transform=this._.transform,res}if(null==value&&R.is(name,"string")){if("fill"==name&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==name)return this._.transform;for(var names=name.split(separator),out={},i=0,ii=names.length;i<ii;i++)name=names[i],name in this.attrs?out[name]=this.attrs[name]:R.is(this.paper.customAttributes[name],"function")?out[name]=this.paper.customAttributes[name].def:out[name]=R._availableAttrs[name];return ii-1?out:out[names[0]]}if(null==value&&R.is(name,"array")){for(out={},i=0,ii=name.length;i<ii;i++)out[name[i]]=this.attr(name[i]);return out}if(null!=value){var params={};params[name]=value}else null!=name&&R.is(name,"object")&&(params=name);for(var key in params)eve("raphael.attr."+key+"."+this.id,this,params[key]);for(key in this.paper.customAttributes)if(this.paper.customAttributes[has](key)&&params[has](key)&&R.is(this.paper.customAttributes[key],"function")){var par=this.paper.customAttributes[key].apply(this,[].concat(params[key]));this.attrs[key]=params[key];for(var subkey in par)par[has](subkey)&&(params[subkey]=par[subkey])}return setFillAndStroke(this,params),this},elproto.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var svg=this.paper;return svg.top!=this&&R._tofront(this,svg),this},elproto.toBack=function(){if(this.removed)return this;var parent=this.node.parentNode;"a"==parent.tagName.toLowerCase()?parent.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):parent.firstChild!=this.node&&parent.insertBefore(this.node,this.node.parentNode.firstChild),R._toback(this,this.paper);this.paper;return this},elproto.insertAfter=function(element){if(this.removed)return this;var node=element.node||element[element.length-1].node;return node.nextSibling?node.parentNode.insertBefore(this.node,node.nextSibling):node.parentNode.appendChild(this.node),R._insertafter(this,element,this.paper),this},elproto.insertBefore=function(element){if(this.removed)return this;var node=element.node||element[0].node;return node.parentNode.insertBefore(this.node,node),R._insertbefore(this,element,this.paper),this},elproto.blur=function(size){var t=this;if(0!==+size){var fltr=$("filter"),blur=$("feGaussianBlur");t.attrs.blur=size,fltr.id=R.createUUID(),$(blur,{stdDeviation:+size||1.5}),fltr.appendChild(blur),t.paper.defs.appendChild(fltr),t._blur=fltr,$(t.node,{filter:"url(#"+fltr.id+")"})}else t._blur&&(t._blur.parentNode.removeChild(t._blur),delete t._blur,delete t.attrs.blur),t.node.removeAttribute("filter");return t},R._engine.circle=function(svg,x,y,r){var el=$("circle");svg.canvas&&svg.canvas.appendChild(el);var res=new Element(el,svg);return res.attrs={cx:x,cy:y,r:r,fill:"none",stroke:"#000"},res.type="circle",$(el,res.attrs),res},R._engine.rect=function(svg,x,y,w,h,r){var el=$("rect");svg.canvas&&svg.canvas.appendChild(el);var res=new Element(el,svg);return res.attrs={x:x,y:y,width:w,height:h,r:r||0,rx:r||0,ry:r||0,fill:"none",stroke:"#000"},res.type="rect",$(el,res.attrs),res},R._engine.ellipse=function(svg,x,y,rx,ry){var el=$("ellipse");svg.canvas&&svg.canvas.appendChild(el);var res=new Element(el,svg);return res.attrs={cx:x,cy:y,rx:rx,ry:ry,fill:"none",stroke:"#000"},res.type="ellipse",$(el,res.attrs),res},R._engine.image=function(svg,src,x,y,w,h){var el=$("image");$(el,{x:x,y:y,width:w,height:h,preserveAspectRatio:"none"}),el.setAttributeNS(xlink,"href",src),svg.canvas&&svg.canvas.appendChild(el);var res=new Element(el,svg);return res.attrs={x:x,y:y,width:w,height:h,src:src},res.type="image",res},R._engine.text=function(svg,x,y,text){var el=$("text");svg.canvas&&svg.canvas.appendChild(el);var res=new Element(el,svg);return res.attrs={x:x,y:y,"text-anchor":"middle",text:text,font:R._availableAttrs.font,stroke:"none",fill:"#000"},res.type="text",setFillAndStroke(res,res.attrs),res},R._engine.setSize=function(width,height){return this.width=width||this.width,this.height=height||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},R._engine.create=function(){var con=R._getContainer.apply(0,arguments),container=con&&con.container,x=con.x,y=con.y,width=con.width,height=con.height;if(!container)throw new Error("SVG container not found.");var isFloating,cnvs=$("svg"),css="overflow:hidden;";return x=x||0,y=y||0,width=width||512,height=height||342,$(cnvs,{height:height,version:1.1,width:width,xmlns:"http://www.w3.org/2000/svg"}),1==container?(cnvs.style.cssText=css+"position:absolute;left:"+x+"px;top:"+y+"px",R._g.doc.body.appendChild(cnvs),isFloating=1):(cnvs.style.cssText=css+"position:relative",container.firstChild?container.insertBefore(cnvs,container.firstChild):container.appendChild(cnvs)),container=new R._Paper,container.width=width,container.height=height,container.canvas=cnvs,container.clear(),container._left=container._top=0,isFloating&&(container.renderfix=function(){}),container.renderfix(),container},R._engine.setViewBox=function(x,y,w,h,fit){eve("raphael.setViewBox",this,this._viewBox,[x,y,w,h,fit]);var vb,sw,size=mmax(w/this.width,h/this.height),top=this.top,aspectRatio=fit?"meet":"xMinYMin";for(null==x?(this._vbSize&&(size=1),delete this._vbSize,vb="0 0 "+this.width+S+this.height):(this._vbSize=size,vb=x+S+y+S+w+S+h),$(this.canvas,{viewBox:vb,preserveAspectRatio:aspectRatio});size&&top;)sw="stroke-width"in top.attrs?top.attrs["stroke-width"]:1,top.attr({"stroke-width":sw}),top._.dirty=1,top._.dirtyT=1,top=top.prev;return this._viewBox=[x,y,w,h,!!fit],this},R.prototype.renderfix=function(){var pos,cnvs=this.canvas,s=cnvs.style;try{pos=cnvs.getScreenCTM()||cnvs.createSVGMatrix()}catch(e){pos=cnvs.createSVGMatrix()}var left=-pos.e%1,top=-pos.f%1;(left||top)&&(left&&(this._left=(this._left+left)%1,s.left=this._left+"px"),top&&(this._top=(this._top+top)%1,s.top=this._top+"px"))},R.prototype.clear=function(){R.eve("raphael.clear",this);for(var c=this.canvas;c.firstChild;)c.removeChild(c.firstChild);this.bottom=this.top=null,(this.desc=$("desc")).appendChild(R._g.doc.createTextNode("Created with Raphaël "+R.version)),c.appendChild(this.desc),c.appendChild(this.defs=$("defs"))},R.prototype.remove=function(){eve("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var i in this)this[i]="function"==typeof this[i]?R._removedFactory(i):null};var setproto=R.st;for(var method in elproto)elproto[has](method)&&!setproto[has](method)&&(setproto[method]=function(methodname){return function(){var arg=arguments;return this.forEach(function(el){el[methodname].apply(el,arg)})}}(method))}}(),function(){if(R.vml){var has="hasOwnProperty",Str=String,toFloat=parseFloat,math=Math,round=math.round,mmax=math.max,mmin=math.min,abs=math.abs,fillString="fill",separator=/[, ]+/,eve=R.eve,ms=" progid:DXImageTransform.Microsoft",S=" ",E="",map={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bites=/([clmz]),?([^clmz]*)/gi,blurregexp=/ progid:\S+Blur\([^\)]+\)/g,val=/-?[^,\s-]+/g,cssDot="position:absolute;left:0;top:0;width:1px;height:1px",zoom=21600,pathTypes={path:1,rect:1,image:1},ovalTypes={circle:1,ellipse:1},path2vml=function(path){var total=/[ahqstv]/gi,command=R._pathToAbsolute;if(Str(path).match(total)&&(command=R._path2curve),total=/[clmz]/g,command==R._pathToAbsolute&&!Str(path).match(total)){var res=Str(path).replace(bites,function(all,command,args){var vals=[],isMove="m"==command.toLowerCase(),res=map[command];return args.replace(val,function(value){isMove&&2==vals.length&&(res+=vals+map["m"==command?"l":"L"],vals=[]),vals.push(round(value*zoom))}),res+vals});return res}var p,r,pa=command(path);res=[];
+for(var i=0,ii=pa.length;i<ii;i++){p=pa[i],r=pa[i][0].toLowerCase(),"z"==r&&(r="x");for(var j=1,jj=p.length;j<jj;j++)r+=round(p[j]*zoom)+(j!=jj-1?",":E);res.push(r)}return res.join(S)},compensation=function(deg,dx,dy){var m=R.matrix();return m.rotate(-deg,.5,.5),{dx:m.x(dx,dy),dy:m.y(dx,dy)}},setCoords=function(p,sx,sy,dx,dy,deg){var _=p._,m=p.matrix,fillpos=_.fillpos,o=p.node,s=o.style,y=1,flip="",kx=zoom/sx,ky=zoom/sy;if(s.visibility="hidden",sx&&sy){if(o.coordsize=abs(kx)+S+abs(ky),s.rotation=deg*(sx*sy<0?-1:1),deg){var c=compensation(deg,dx,dy);dx=c.dx,dy=c.dy}if(sx<0&&(flip+="x"),sy<0&&(flip+=" y")&&(y=-1),s.flip=flip,o.coordorigin=dx*-kx+S+dy*-ky,fillpos||_.fillsize){var fill=o.getElementsByTagName(fillString);fill=fill&&fill[0],o.removeChild(fill),fillpos&&(c=compensation(deg,m.x(fillpos[0],fillpos[1]),m.y(fillpos[0],fillpos[1])),fill.position=c.dx*y+S+c.dy*y),_.fillsize&&(fill.size=_.fillsize[0]*abs(sx)+S+_.fillsize[1]*abs(sy)),o.appendChild(fill)}s.visibility="visible"}};R.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var addArrow=function(o,value,isEnd){for(var values=Str(value).toLowerCase().split("-"),se=isEnd?"end":"start",i=values.length,type="classic",w="medium",h="medium";i--;)switch(values[i]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":type=values[i];break;case"wide":case"narrow":h=values[i];break;case"long":case"short":w=values[i]}var stroke=o.node.getElementsByTagName("stroke")[0];stroke[se+"arrow"]=type,stroke[se+"arrowlength"]=w,stroke[se+"arrowwidth"]=h},setFillAndStroke=function(o,params){o.attrs=o.attrs||{};var node=o.node,a=o.attrs,s=node.style,newpath=pathTypes[o.type]&&(params.x!=a.x||params.y!=a.y||params.width!=a.width||params.height!=a.height||params.cx!=a.cx||params.cy!=a.cy||params.rx!=a.rx||params.ry!=a.ry||params.r!=a.r),isOval=ovalTypes[o.type]&&(a.cx!=params.cx||a.cy!=params.cy||a.r!=params.r||a.rx!=params.rx||a.ry!=params.ry),res=o;for(var par in params)params[has](par)&&(a[par]=params[par]);if(newpath&&(a.path=R._getPath[o.type](o),o._.dirty=1),params.href&&(node.href=params.href),params.title&&(node.title=params.title),params.target&&(node.target=params.target),params.cursor&&(s.cursor=params.cursor),"blur"in params&&o.blur(params.blur),(params.path&&"path"==o.type||newpath)&&(node.path=path2vml(~Str(a.path).toLowerCase().indexOf("r")?R._pathToAbsolute(a.path):a.path),"image"==o.type&&(o._.fillpos=[a.x,a.y],o._.fillsize=[a.width,a.height],setCoords(o,1,1,0,0,0))),"transform"in params&&o.transform(params.transform),isOval){var cx=+a.cx,cy=+a.cy,rx=+a.rx||+a.r||0,ry=+a.ry||+a.r||0;node.path=R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",round((cx-rx)*zoom),round((cy-ry)*zoom),round((cx+rx)*zoom),round((cy+ry)*zoom),round(cx*zoom)),o._.dirty=1}if("clip-rect"in params){var rect=Str(params["clip-rect"]).split(separator);if(4==rect.length){rect[2]=+rect[2]+ +rect[0],rect[3]=+rect[3]+ +rect[1];var div=node.clipRect||R._g.doc.createElement("div"),dstyle=div.style;dstyle.clip=R.format("rect({1}px {2}px {3}px {0}px)",rect),node.clipRect||(dstyle.position="absolute",dstyle.top=0,dstyle.left=0,dstyle.width=o.paper.width+"px",dstyle.height=o.paper.height+"px",node.parentNode.insertBefore(div,node),div.appendChild(node),node.clipRect=div)}params["clip-rect"]||node.clipRect&&(node.clipRect.style.clip="auto")}if(o.textpath){var textpathStyle=o.textpath.style;params.font&&(textpathStyle.font=params.font),params["font-family"]&&(textpathStyle.fontFamily='"'+params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,E)+'"'),params["font-size"]&&(textpathStyle.fontSize=params["font-size"]),params["font-weight"]&&(textpathStyle.fontWeight=params["font-weight"]),params["font-style"]&&(textpathStyle.fontStyle=params["font-style"])}if("arrow-start"in params&&addArrow(res,params["arrow-start"]),"arrow-end"in params&&addArrow(res,params["arrow-end"],1),null!=params.opacity||null!=params["stroke-width"]||null!=params.fill||null!=params.src||null!=params.stroke||null!=params["stroke-width"]||null!=params["stroke-opacity"]||null!=params["fill-opacity"]||null!=params["stroke-dasharray"]||null!=params["stroke-miterlimit"]||null!=params["stroke-linejoin"]||null!=params["stroke-linecap"]){var fill=node.getElementsByTagName(fillString),newfill=!1;if(fill=fill&&fill[0],!fill&&(newfill=fill=createNode(fillString)),"image"==o.type&&params.src&&(fill.src=params.src),params.fill&&(fill.on=!0),null!=fill.on&&"none"!=params.fill&&null!==params.fill||(fill.on=!1),fill.on&&params.fill){var isURL=Str(params.fill).match(R._ISURL);if(isURL){fill.parentNode==node&&node.removeChild(fill),fill.rotate=!0,fill.src=isURL[1],fill.type="tile";var bbox=o.getBBox(1);fill.position=bbox.x+S+bbox.y,o._.fillpos=[bbox.x,bbox.y],R._preload(isURL[1],function(){o._.fillsize=[this.offsetWidth,this.offsetHeight]})}else fill.color=R.getRGB(params.fill).hex,fill.src=E,fill.type="solid",R.getRGB(params.fill).error&&(res.type in{circle:1,ellipse:1}||"r"!=Str(params.fill).charAt())&&addGradientFill(res,params.fill,fill)&&(a.fill="none",a.gradient=params.fill,fill.rotate=!1)}if("fill-opacity"in params||"opacity"in params){var opacity=((+a["fill-opacity"]+1||2)-1)*((+a.opacity+1||2)-1)*((+R.getRGB(params.fill).o+1||2)-1);opacity=mmin(mmax(opacity,0),1),fill.opacity=opacity,fill.src&&(fill.color="none")}node.appendChild(fill);var stroke=node.getElementsByTagName("stroke")&&node.getElementsByTagName("stroke")[0],newstroke=!1;!stroke&&(newstroke=stroke=createNode("stroke")),(params.stroke&&"none"!=params.stroke||params["stroke-width"]||null!=params["stroke-opacity"]||params["stroke-dasharray"]||params["stroke-miterlimit"]||params["stroke-linejoin"]||params["stroke-linecap"])&&(stroke.on=!0),("none"==params.stroke||null===params.stroke||null==stroke.on||0==params.stroke||0==params["stroke-width"])&&(stroke.on=!1);var strokeColor=R.getRGB(params.stroke);stroke.on&&params.stroke&&(stroke.color=strokeColor.hex),opacity=((+a["stroke-opacity"]+1||2)-1)*((+a.opacity+1||2)-1)*((+strokeColor.o+1||2)-1);var width=.75*(toFloat(params["stroke-width"])||1);if(opacity=mmin(mmax(opacity,0),1),null==params["stroke-width"]&&(width=a["stroke-width"]),params["stroke-width"]&&(stroke.weight=width),width&&width<1&&(opacity*=width)&&(stroke.weight=1),stroke.opacity=opacity,params["stroke-linejoin"]&&(stroke.joinstyle=params["stroke-linejoin"]||"miter"),stroke.miterlimit=params["stroke-miterlimit"]||8,params["stroke-linecap"]&&(stroke.endcap="butt"==params["stroke-linecap"]?"flat":"square"==params["stroke-linecap"]?"square":"round"),params["stroke-dasharray"]){var dasharray={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};stroke.dashstyle=dasharray[has](params["stroke-dasharray"])?dasharray[params["stroke-dasharray"]]:E}newstroke&&node.appendChild(stroke)}if("text"==res.type){res.paper.canvas.style.display=E;var span=res.paper.span,m=100,fontSize=a.font&&a.font.match(/\d+(?:\.\d*)?(?=px)/);s=span.style,a.font&&(s.font=a.font),a["font-family"]&&(s.fontFamily=a["font-family"]),a["font-weight"]&&(s.fontWeight=a["font-weight"]),a["font-style"]&&(s.fontStyle=a["font-style"]),fontSize=toFloat(a["font-size"]||fontSize&&fontSize[0])||10,s.fontSize=fontSize*m+"px",res.textpath.string&&(span.innerHTML=Str(res.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var brect=span.getBoundingClientRect();res.W=a.w=(brect.right-brect.left)/m,res.H=a.h=(brect.bottom-brect.top)/m,res.X=a.x,res.Y=a.y+res.H/2,("x"in params||"y"in params)&&(res.path.v=R.format("m{0},{1}l{2},{1}",round(a.x*zoom),round(a.y*zoom),round(a.x*zoom)+1));for(var dirtyattrs=["x","y","text","font","font-family","font-weight","font-style","font-size"],d=0,dd=dirtyattrs.length;d<dd;d++)if(dirtyattrs[d]in params){res._.dirty=1;break}switch(a["text-anchor"]){case"start":res.textpath.style["v-text-align"]="left",res.bbx=res.W/2;break;case"end":res.textpath.style["v-text-align"]="right",res.bbx=-res.W/2;break;default:res.textpath.style["v-text-align"]="center",res.bbx=0}res.textpath.style["v-text-kern"]=!0}},addGradientFill=function(o,gradient,fill){o.attrs=o.attrs||{};var pow=(o.attrs,Math.pow),type="linear",fxfy=".5 .5";if(o.attrs.gradient=gradient,gradient=Str(gradient).replace(R._radial_gradient,function(all,fx,fy){return type="radial",fx&&fy&&(fx=toFloat(fx),fy=toFloat(fy),pow(fx-.5,2)+pow(fy-.5,2)>.25&&(fy=math.sqrt(.25-pow(fx-.5,2))*(2*(fy>.5)-1)+.5),fxfy=fx+S+fy),E}),gradient=gradient.split(/\s*\-\s*/),"linear"==type){var angle=gradient.shift();if(angle=-toFloat(angle),isNaN(angle))return null}var dots=R._parseDots(gradient);if(!dots)return null;if(o=o.shape||o.node,dots.length){o.removeChild(fill),fill.on=!0,fill.method="none",fill.color=dots[0].color,fill.color2=dots[dots.length-1].color;for(var clrs=[],i=0,ii=dots.length;i<ii;i++)dots[i].offset&&clrs.push(dots[i].offset+S+dots[i].color);fill.colors=clrs.length?clrs.join():"0% "+fill.color,"radial"==type?(fill.type="gradientTitle",fill.focus="100%",fill.focussize="0 0",fill.focusposition=fxfy,fill.angle=0):(fill.type="gradient",fill.angle=(270-angle)%360),o.appendChild(fill)}return 1},Element=function(node,vml){this[0]=this.node=node,node.raphael=!0,this.id=R._oid++,node.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=vml,this.matrix=R.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!vml.bottom&&(vml.bottom=this),this.prev=vml.top,vml.top&&(vml.top.next=this),vml.top=this,this.next=null},elproto=R.el;Element.prototype=elproto,elproto.constructor=Element,elproto.transform=function(tstr){if(null==tstr)return this._.transform;var oldt,vbs=this.paper._viewBoxShift,vbt=vbs?"s"+[vbs.scale,vbs.scale]+"-1-1t"+[vbs.dx,vbs.dy]:E;vbs&&(oldt=tstr=Str(tstr).replace(/\.{3}|\u2026/g,this._.transform||E)),R._extractTransform(this,vbt+tstr);var split,matrix=this.matrix.clone(),skew=this.skew,o=this.node,isGrad=~Str(this.attrs.fill).indexOf("-"),isPatt=!Str(this.attrs.fill).indexOf("url(");if(matrix.translate(1,1),isPatt||isGrad||"image"==this.type)if(skew.matrix="1 0 0 1",skew.offset="0 0",split=matrix.split(),isGrad&&split.noRotation||!split.isSimple){o.style.filter=matrix.toFilter();var bb=this.getBBox(),bbt=this.getBBox(1),dx=bb.x-bbt.x,dy=bb.y-bbt.y;o.coordorigin=dx*-zoom+S+dy*-zoom,setCoords(this,1,1,dx,dy,0)}else o.style.filter=E,setCoords(this,split.scalex,split.scaley,split.dx,split.dy,split.rotate);else o.style.filter=E,skew.matrix=Str(matrix),skew.offset=matrix.offset();return oldt&&(this._.transform=oldt),this},elproto.rotate=function(deg,cx,cy){if(this.removed)return this;if(null!=deg){if(deg=Str(deg).split(separator),deg.length-1&&(cx=toFloat(deg[1]),cy=toFloat(deg[2])),deg=toFloat(deg[0]),null==cy&&(cx=cy),null==cx||null==cy){var bbox=this.getBBox(1);cx=bbox.x+bbox.width/2,cy=bbox.y+bbox.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",deg,cx,cy]])),this}},elproto.translate=function(dx,dy){return this.removed?this:(dx=Str(dx).split(separator),dx.length-1&&(dy=toFloat(dx[1])),dx=toFloat(dx[0])||0,dy=+dy||0,this._.bbox&&(this._.bbox.x+=dx,this._.bbox.y+=dy),this.transform(this._.transform.concat([["t",dx,dy]])),this)},elproto.scale=function(sx,sy,cx,cy){if(this.removed)return this;if(sx=Str(sx).split(separator),sx.length-1&&(sy=toFloat(sx[1]),cx=toFloat(sx[2]),cy=toFloat(sx[3]),isNaN(cx)&&(cx=null),isNaN(cy)&&(cy=null)),sx=toFloat(sx[0]),null==sy&&(sy=sx),null==cy&&(cx=cy),null==cx||null==cy)var bbox=this.getBBox(1);return cx=null==cx?bbox.x+bbox.width/2:cx,cy=null==cy?bbox.y+bbox.height/2:cy,this.transform(this._.transform.concat([["s",sx,sy,cx,cy]])),this._.dirtyT=1,this},elproto.hide=function(){return!this.removed&&(this.node.style.display="none"),this},elproto.show=function(){return!this.removed&&(this.node.style.display=E),this},elproto._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},elproto.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),R.eve.unbind("raphael.*.*."+this.id),R._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var i in this)this[i]="function"==typeof this[i]?R._removedFactory(i):null;this.removed=!0}},elproto.attr=function(name,value){if(this.removed)return this;if(null==name){var res={};for(var a in this.attrs)this.attrs[has](a)&&(res[a]=this.attrs[a]);return res.gradient&&"none"==res.fill&&(res.fill=res.gradient)&&delete res.gradient,res.transform=this._.transform,res}if(null==value&&R.is(name,"string")){if(name==fillString&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var names=name.split(separator),out={},i=0,ii=names.length;i<ii;i++)name=names[i],name in this.attrs?out[name]=this.attrs[name]:R.is(this.paper.customAttributes[name],"function")?out[name]=this.paper.customAttributes[name].def:out[name]=R._availableAttrs[name];return ii-1?out:out[names[0]]}if(this.attrs&&null==value&&R.is(name,"array")){for(out={},i=0,ii=name.length;i<ii;i++)out[name[i]]=this.attr(name[i]);return out}var params;null!=value&&(params={},params[name]=value),null==value&&R.is(name,"object")&&(params=name);for(var key in params)eve("raphael.attr."+key+"."+this.id,this,params[key]);if(params){for(key in this.paper.customAttributes)if(this.paper.customAttributes[has](key)&&params[has](key)&&R.is(this.paper.customAttributes[key],"function")){var par=this.paper.customAttributes[key].apply(this,[].concat(params[key]));this.attrs[key]=params[key];for(var subkey in par)par[has](subkey)&&(params[subkey]=par[subkey])}params.text&&"text"==this.type&&(this.textpath.string=params.text),setFillAndStroke(this,params)}return this},elproto.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&R._tofront(this,this.paper),this},elproto.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),R._toback(this,this.paper)),this)},elproto.insertAfter=function(element){return this.removed?this:(element.constructor==R.st.constructor&&(element=element[element.length-1]),element.node.nextSibling?element.node.parentNode.insertBefore(this.node,element.node.nextSibling):element.node.parentNode.appendChild(this.node),R._insertafter(this,element,this.paper),this)},elproto.insertBefore=function(element){return this.removed?this:(element.constructor==R.st.constructor&&(element=element[0]),element.node.parentNode.insertBefore(this.node,element.node),R._insertbefore(this,element,this.paper),this)},elproto.blur=function(size){var s=this.node.runtimeStyle,f=s.filter;return f=f.replace(blurregexp,E),0!==+size?(this.attrs.blur=size,s.filter=f+S+ms+".Blur(pixelradius="+(+size||1.5)+")",s.margin=R.format("-{0}px 0 0 -{0}px",round(+size||1.5))):(s.filter=f,s.margin=0,delete this.attrs.blur),this},R._engine.path=function(pathString,vml){var el=createNode("shape");el.style.cssText=cssDot,el.coordsize=zoom+S+zoom,el.coordorigin=vml.coordorigin;var p=new Element(el,vml),attr={fill:"none",stroke:"#000"};pathString&&(attr.path=pathString),p.type="path",p.path=[],p.Path=E,setFillAndStroke(p,attr),vml.canvas.appendChild(el);var skew=createNode("skew");return skew.on=!0,el.appendChild(skew),p.skew=skew,p.transform(E),p},R._engine.rect=function(vml,x,y,w,h,r){var path=R._rectPath(x,y,w,h,r),res=vml.path(path),a=res.attrs;return res.X=a.x=x,res.Y=a.y=y,res.W=a.width=w,res.H=a.height=h,a.r=r,a.path=path,res.type="rect",res},R._engine.ellipse=function(vml,x,y,rx,ry){var res=vml.path();res.attrs;return res.X=x-rx,res.Y=y-ry,res.W=2*rx,res.H=2*ry,res.type="ellipse",setFillAndStroke(res,{cx:x,cy:y,rx:rx,ry:ry}),res},R._engine.circle=function(vml,x,y,r){var res=vml.path();res.attrs;return res.X=x-r,res.Y=y-r,res.W=res.H=2*r,res.type="circle",setFillAndStroke(res,{cx:x,cy:y,r:r}),res},R._engine.image=function(vml,src,x,y,w,h){var path=R._rectPath(x,y,w,h),res=vml.path(path).attr({stroke:"none"}),a=res.attrs,node=res.node,fill=node.getElementsByTagName(fillString)[0];return a.src=src,res.X=a.x=x,res.Y=a.y=y,res.W=a.width=w,res.H=a.height=h,a.path=path,res.type="image",fill.parentNode==node&&node.removeChild(fill),fill.rotate=!0,fill.src=src,fill.type="tile",res._.fillpos=[x,y],res._.fillsize=[w,h],node.appendChild(fill),setCoords(res,1,1,0,0,0),res},R._engine.text=function(vml,x,y,text){var el=createNode("shape"),path=createNode("path"),o=createNode("textpath");x=x||0,y=y||0,text=text||"",path.v=R.format("m{0},{1}l{2},{1}",round(x*zoom),round(y*zoom),round(x*zoom)+1),path.textpathok=!0,o.string=Str(text),o.on=!0,el.style.cssText=cssDot,el.coordsize=zoom+S+zoom,el.coordorigin="0 0";var p=new Element(el,vml),attr={fill:"#000",stroke:"none",font:R._availableAttrs.font,text:text};p.shape=el,p.path=path,p.textpath=o,p.type="text",p.attrs.text=Str(text),p.attrs.x=x,p.attrs.y=y,p.attrs.w=1,p.attrs.h=1,setFillAndStroke(p,attr),el.appendChild(o),el.appendChild(path),vml.canvas.appendChild(el);var skew=createNode("skew");return skew.on=!0,el.appendChild(skew),p.skew=skew,p.transform(E),p},R._engine.setSize=function(width,height){var cs=this.canvas.style;return this.width=width,this.height=height,width==+width&&(width+="px"),height==+height&&(height+="px"),cs.width=width,cs.height=height,cs.clip="rect(0 "+width+" "+height+" 0)",this._viewBox&&R._engine.setViewBox.apply(this,this._viewBox),this},R._engine.setViewBox=function(x,y,w,h,fit){R.eve("raphael.setViewBox",this,this._viewBox,[x,y,w,h,fit]);var H,W,width=this.width,height=this.height,size=1/mmax(w/width,h/height);return fit&&(H=height/h,W=width/w,w*H<width&&(x-=(width-w*H)/2/H),h*W<height&&(y-=(height-h*W)/2/W)),this._viewBox=[x,y,w,h,!!fit],this._viewBoxShift={dx:-x,dy:-y,scale:size},this.forEach(function(el){el.transform("...")}),this};var createNode;R._engine.initWin=function(win){var doc=win.document;doc.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!doc.namespaces.rvml&&doc.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),createNode=function(tagName){return doc.createElement("<rvml:"+tagName+' class="rvml">')}}catch(e){createNode=function(tagName){return doc.createElement("<"+tagName+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},R._engine.initWin(R._g.win),R._engine.create=function(){var con=R._getContainer.apply(0,arguments),container=con.container,height=con.height,width=con.width,x=con.x,y=con.y;if(!container)throw new Error("VML container not found.");var res=new R._Paper,c=res.canvas=R._g.doc.createElement("div"),cs=c.style;return x=x||0,y=y||0,width=width||512,height=height||342,res.width=width,res.height=height,width==+width&&(width+="px"),height==+height&&(height+="px"),res.coordsize=1e3*zoom+S+1e3*zoom,res.coordorigin="0 0",res.span=R._g.doc.createElement("span"),res.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",c.appendChild(res.span),cs.cssText=R.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",width,height),1==container?(R._g.doc.body.appendChild(c),cs.left=x+"px",cs.top=y+"px",cs.position="absolute"):container.firstChild?container.insertBefore(c,container.firstChild):container.appendChild(c),res.renderfix=function(){},res},R.prototype.clear=function(){R.eve("raphael.clear",this),this.canvas.innerHTML=E,this.span=R._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},R.prototype.remove=function(){R.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var i in this)this[i]="function"==typeof this[i]?R._removedFactory(i):null;return!0};var setproto=R.st;for(var method in elproto)elproto[has](method)&&!setproto[has](method)&&(setproto[method]=function(methodname){return function(){var arg=arguments;return this.forEach(function(el){el[methodname].apply(el,arg)})}}(method))}}(),oldRaphael.was?g.win.Raphael=R:Raphael=R,R}),window.ABCJS||(window.ABCJS={}),function(){"use strict";function hasClass(element,cls){var elClass=element.getAttribute("class"),rclass=/[\t\r\n\f]/g,className=" "+cls+" ";return 1===element.nodeType&&(" "+elClass+" ").replace(rclass," ").indexOf(className)>=0}function getAllElementsByClasses(startingEl,class1,class2){for(var els=startingEl.getElementsByClassName(class1),ret=[],i=0;i<els.length;i++)hasClass(els[i],class2)&&ret.push(els[i]);return ret}function getCssRule(selector){for(var rule,i=0;i<document.styleSheets.length&&void 0===rule;i++){var css=document.styleSheets[i],rules=css.rules;if(rules)for(var j=0;j<rules.length&&void 0===rule;j++)rules[j].selectorText&&rules[j].selectorText===selector&&(rule=rules[j])}return rule?rule:(document.styleSheets[0].insertRule(selector+" { }",1),getCssRule(selector))}function getBeatsPerMinute(tune,options){var bpm;return bpm=options.bpm?options.bpm:tune&&tune.metaText&&tune.metaText.tempo&&tune.metaText.tempo.bpm?tune.metaText.tempo.bpm:120}function setMargin(margin){cssRule.style.marginTop=-margin+"px",currentMargin=margin}var scrollTimer,animateTimer,cssRule,currentMargin,animationTarget,shouldResetOverflow,cursor,stopNextTime=!1;ABCJS.startAnimation=function(paper,tune,options){function scrolling(){var currentPosition=paper.style.marginLeft;currentPosition=""===currentPosition?0:parseInt(currentPosition),currentPosition-=distance,paper.style.marginLeft=currentPosition+"px",currentPosition>outer.offsetWidth-paper.scrollWidth&&(scrollTimer=setTimeout(scrolling,interval))}function processMeasureHider(lineNum,measureNum){var els=getAllElementsByClasses(paper,"l"+lineNum,"m"+measureNum);if(els.length>0)for(var i=0;i<els.length;i++){var el=els[i];hasClass(el,"bar")||(el.style.display="none")}}function addVerticalInfo(timingEvents){for(var lastBarTop,lastBarBottom,lastEventTop,lastEventBottom,e=timingEvents.length-1;e>=0;e--){var ev=timingEvents[e];"bar"===ev.type?(ev.top=lastEventTop,ev.nextTop=lastBarTop,lastBarTop=lastEventTop,ev.bottom=lastEventBottom,ev.nextBottom=lastBarBottom,lastBarBottom=lastEventBottom):"event"===ev.type&&(lastEventTop=ev.top,lastEventBottom=ev.top+ev.height)}}function makeSortedArray(hash){var arr=[];for(var k in hash)hash.hasOwnProperty(k)&&arr.push(hash[k]);return arr=arr.sort(function(a,b){var diff=a.time-b.time;return 0!==diff?diff:"bar"===a.type?-1:1})}function setupEvents(engraver){for(var eventHash={},time=0,isTiedState=!1,line=0;line<engraver.staffgroups.length;line++){var group=engraver.staffgroups[line],voices=group.voices,firstStaff=group.staffs[0],middleC=firstStaff.absoluteY,top=middleC-firstStaff.top*ABCJS.write.spacing.STEP,lastStaff=group.staffs[group.staffs.length-1];middleC=lastStaff.absoluteY;for(var bottom=middleC-lastStaff.bottom*ABCJS.write.spacing.STEP,height=bottom-top,maxVoiceTime=0,v=0;v<voices.length;v++){for(var voiceTime=time,elements=voices[v].children,elem=0;elem<elements.length;elem++){var element=elements[elem];if(element.hint)break;if(element.duration>0){var isTiedToNext=element.startTie;isTiedState?isTiedToNext||(isTiedState=!1):(eventHash["event"+voiceTime]?eventHash["event"+voiceTime].left=Math.min(eventHash["event"+voiceTime].left,element.x):eventHash["event"+voiceTime]={type:"event",time:voiceTime,top:top,height:height,left:element.x,width:element.w},isTiedToNext&&(isTiedState=!0)),voiceTime+=element.duration}if("bar"===element.type&&(0===timingEvents.length||"bar"!==timingEvents[timingEvents.length-1])&&element.elemset&&element.elemset.length>0&&element.elemset[0].attrs){for(var lineNum,measureNum,klass=element.elemset[0].attrs.class,arr=klass.split(" "),i=0;i<arr.length;i++){var match=/m(\d+)/.exec(arr[i]);match&&(measureNum=match[1]),match=/l(\d+)/.exec(arr[i]),match&&(lineNum=match[1])}eventHash["bar"+voiceTime]={type:"bar",time:voiceTime,lineNum:lineNum,measureNum:measureNum}}}maxVoiceTime=Math.max(maxVoiceTime,voiceTime)}time=maxVoiceTime}timingEvents=makeSortedArray(eventHash),totalBeats=timingEvents[timingEvents.length-1].time/beatLength,options.scrollVertical&&addVerticalInfo(timingEvents)}function isEndOfLine(currentNote){return currentNote.top!==currentNote.nextTop&&void 0!==currentNote.nextTop}function shouldScroll(outer,scrollPos,currentNote){var height=parseInt(outer.clientHeight,10),isVisible=currentNote.nextBottom-scrollPos<height;return!isVisible}function processShowCursor(){var currentNote=timingEvents.shift();return currentNote?"bar"===currentNote.type?(options.scrollVertical&&isEndOfLine(currentNote)&&shouldScroll(outer,currentMargin,currentNote)&&setTimeout(function(){setMargin(currentNote.nextTop)},millisecondsPerHalfMeasure),options.hideFinishedMeasures&&processMeasureHider(currentNote.lineNum,currentNote.measureNum),timingEvents.length>0?timingEvents[0].time/beatLength:0):(options.scrollHint&&lastTop!==currentNote.top&&(lastTop=currentNote.top,setMargin(lastTop)),options.showCursor&&cursor.css({left:currentNote.left+"px",top:currentNote.top+"px",width:currentNote.width+"px",height:currentNote.height+"px"}),timingEvents.length>0?timingEvents[0].time/beatLength:(stopNextTime=!0,0)):(stopNextTime=!0,0)}function processNext(){if(stopNextTime)return void ABCJS.stopAnimation();var currentTime=(new Date).getTime();if(isPaused)return void(pausedDifference=currentTime-pausedTime);var nextTimeInBeats=processShowCursor(),nextTimeInMilliseconds=nextTimeInBeats/beatsPerMillisecond,interval=startTime+nextTimeInMilliseconds-currentTime;interval<=0?processNext():animateTimer=setTimeout(processNext,interval)}if(void 0===paper.getElementsByClassName)return void console.error("ABCJS.startAnimation: The first parameter must be a regular DOM element. (Did you pass a jQuery object or an ID?)");if(void 0===tune.getBeatLength)return void console.error("ABCJS.startAnimation: The second parameter must be a single tune. (Did you pass the entire array of tunes?)");if((options.scrollHorizontal||options.scrollVertical||options.scrollHint)&&(hasClass(paper,"abcjs-inner")||(paper.scrollTop=0,paper.style.overflow="hidden",paper=paper.children[0]),!hasClass(paper,"abcjs-inner")))return void console.error("ABCJS.startAnimation: When using scrollHorizontal/scrollVertical/scrollHint, the music must have been rendered using viewportHorizontal/viewportVertical.");ABCJS.stopAnimation(),animationTarget=paper,shouldResetOverflow=options.scrollVertical||options.scrollHint,options.showCursor&&(cursor=$('<div class="cursor" style="position: absolute;"></div>'),$(paper).append(cursor),$(paper).css({position:"relative"})),stopNextTime=!1;var millisecondsPerHalfMeasure,beatsPerMinute=getBeatsPerMinute(tune,options),beatsPerMillisecond=beatsPerMinute/6e4,beatLength=tune.getBeatLength(),totalBeats=0;if(options.scrollVertical){var millisecondsPerBeat=1/beatsPerMillisecond,beatsPerMeasure=1/beatLength,millisecondsPerMeasure=millisecondsPerBeat*beatsPerMeasure;millisecondsPerHalfMeasure=millisecondsPerMeasure/2,cssRule=getCssRule(".abcjs-inner")}var startTime,pausedTime,pausedDifference,isPaused=!1,initialWait=2700,interval=11,distance=1,outer=paper.parentNode;options.scrollHorizontal&&(paper.style.marginLeft="0px",scrollTimer=setTimeout(scrolling,initialWait));var timingEvents=[];setupEvents(tune.engraver);var lastTop=-1;$(outer).find(".abcjs-inner");currentMargin=0,options.scrollVertical&&setMargin(0),startTime=new Date,startTime=startTime.getTime(),isPaused=!1,processNext(),ABCJS.pauseAnimation=function(pause){if(pause&&!isPaused)isPaused=!0,pausedTime=(new Date).getTime();else if(!pause&&isPaused){var nowTime=(new Date).getTime(),elapsedTimeWhenPaused=nowTime-pausedTime;startTime+=elapsedTimeWhenPaused,pausedTime=void 0,isPaused=!1,animateTimer=setTimeout(processNext,pausedDifference),pausedDifference=void 0}}},ABCJS.stopAnimation=function(){clearTimeout(animateTimer),clearTimeout(scrollTimer),cursor&&(cursor.remove(),cursor=null),shouldResetOverflow&&(animationTarget&&animationTarget.parentNode&&(animationTarget.parentNode.style.overflowY="auto"),setMargin(0))}}(),window.ABCJS||(window.ABCJS={}),function(){"use strict";function renderEngine(callback,output,abc,parserParams,renderParams){var ret=[],isArray=function(testObject){return testObject&&!testObject.propertyIsEnumerable("length")&&"object"==typeof testObject&&"number"==typeof testObject.length};if(void 0!==output&&void 0!==abc){isArray(output)||(output=[output]),void 0===parserParams&&(parserParams={}),void 0===renderParams&&(renderParams={});for(var currentTune=renderParams.startingTune?renderParams.startingTune:0,book=new ABCJS.TuneBook(abc),abcParser=new window.ABCJS.parse.Parse,i=0;i<output.length;i++){var div=output[i];if("string"==typeof div&&(div=document.getElementById(div)),div&&(div.innerHTML="",currentTune<book.tunes.length)){abcParser.parse(book.tunes[currentTune].abc,parserParams);var tune=abcParser.getTune();ret.push(tune),callback(div,tune,i)}currentTune++}return ret}}function resizeOuter(){var width=window.innerWidth;for(var id in resizeDivs)if(resizeDivs.hasOwnProperty(id)){var outer=resizeDivs[id],ofs=outer.offsetLeft;width-=2*ofs,outer.style.width=width+"px"}}function renderOne(div,tune,renderParams,engraverParams){var width=renderParams.width?renderParams.width:800;renderParams.viewportHorizontal?(div.innerHTML='<div class="abcjs-inner"></div>',renderParams.scrollHorizontal?(div.style.overflowX="auto",div.style.overflowY="hidden"):div.style.overflow="hidden",resizeDivs[div.id]=div,div=div.children[0]):renderParams.viewportVertical&&(div.innerHTML='<div class="abcjs-inner scroll-amount"></div>',div.style.overflowX="hidden",div.style.overflowY="auto",div=div.children[0]);var paper=Raphael(div,width,400);void 0===engraverParams&&(engraverParams={});var engraver_controller=new ABCJS.write.EngraverController(paper,engraverParams);if(engraver_controller.engraveABC(tune),tune.engraver=engraver_controller,renderParams.viewportVertical||renderParams.viewportHorizontal){var parent=div.parentNode;parent.style.width=div.style.width}}function renderEachLineSeparately(div,tune,renderParams,engraverParams){function initializeTuneLine(tune){return{formatting:tune.formatting,media:tune.media,version:tune.version,metaText:{},lines:[]}}for(var tuneLine,tunes=[],i=0;i<tune.lines.length;i++){var line=tune.lines[i];tuneLine||(tuneLine=initializeTuneLine(tune)),0===i&&(tuneLine.metaText.tempo=tune.metaText.tempo,tuneLine.metaText.title=tune.metaText.title,tuneLine.metaText.header=tune.metaText.header,tuneLine.metaText.rhythm=tune.metaText.rhythm,tuneLine.metaText.origin=tune.metaText.origin,tuneLine.metaText.composer=tune.metaText.composer,tuneLine.metaText.author=tune.metaText.author,tuneLine.metaText.partOrder=tune.metaText.partOrder),tuneLine.lines.push(line),line.staff&&(tunes.push(tuneLine),tuneLine=void 0)}if(tuneLine)for(var lastLine=tunes[tunes.length-1],j=0;j<tuneLine.lines.length;j++)lastLine.lines.push(tuneLine.lines[j]);tuneLine=tunes[tunes.length-1],tuneLine.metaText.unalignedWords=tune.metaText.unalignedWords,tuneLine.metaText.book=tune.metaText.book,tuneLine.metaText.source=tune.metaText.source,tuneLine.metaText.discography=tune.metaText.discography,tuneLine.metaText.notes=tune.metaText.notes,tuneLine.metaText.transcription=tune.metaText.transcription,tuneLine.metaText.history=tune.metaText.history,tuneLine.metaText["abc-copyright"]=tune.metaText["abc-copyright"],tuneLine.metaText["abc-creator"]=tune.metaText["abc-creator"],tuneLine.metaText["abc-edited-by"]=tune.metaText["abc-edited-by"],tuneLine.metaText.footer=tune.metaText.footer;var eParamsFirst=JSON.parse(JSON.stringify(engraverParams)),eParamsMid=JSON.parse(JSON.stringify(engraverParams)),eParamsLast=JSON.parse(JSON.stringify(engraverParams));
+eParamsFirst.paddingbottom=-20,eParamsMid.paddingbottom=-20,eParamsMid.paddingtop=10,eParamsLast.paddingtop=10;for(var k=0;k<tunes.length;k++){var lineEl=document.createElement("div");div.appendChild(lineEl);var ep=0===k?eParamsFirst:k===tunes.length-1?eParamsLast:eParamsMid;renderOne(lineEl,tunes[k],renderParams,ep)}}ABCJS.numberOfTunes=function(abc){var tunes=abc.split("\nX:"),num=tunes.length;return 0===num&&(num=1),num},ABCJS.TuneBook=function(book){var This=this,directives="";book=window.ABCJS.parse.strip(book);for(var tunes=book.split("\nX:"),i=1;i<tunes.length;i++)tunes[i]="X:"+tunes[i];var pos=0;if(This.tunes=[],window.ABCJS.parse.each(tunes,function(tune){This.tunes.push({abc:tune,startPos:pos}),pos+=tune.length}),This.tunes.length>1&&!window.ABCJS.parse.startsWith(This.tunes[0].abc,"X:")){var dir=This.tunes.shift(),arrDir=dir.abc.split("\n");window.ABCJS.parse.each(arrDir,function(line){window.ABCJS.parse.startsWith(line,"%%")&&(directives+=line+"\n")})}This.header=directives,window.ABCJS.parse.each(This.tunes,function(tune){var end=tune.abc.indexOf("\n\n");end>0&&(tune.abc=tune.abc.substring(0,end)),tune.pure=tune.abc,tune.abc=directives+tune.abc;var title=tune.pure.split("T:");title.length>1?(title=title[1].split("\n"),tune.title=title[0].replace(/^\s+|\s+$/g,"")):tune.title="";var id=tune.pure.substring(2,tune.pure.indexOf("\n"));tune.id=id.replace(/^\s+|\s+$/g,"")})},ABCJS.TuneBook.prototype.getTuneById=function(id){for(var i=0;i<this.tunes.length;i++)if(this.tunes[i].id===id)return this.tunes[i];return null},ABCJS.TuneBook.prototype.getTuneByTitle=function(title){for(var i=0;i<this.tunes.length;i++)if(this.tunes[i].title===title)return this.tunes[i];return null};var resizeDivs={};window.addEventListener("resize",resizeOuter),window.addEventListener("orientationChange",resizeOuter),ABCJS.renderAbc=function(output,abc,parserParams,engraverParams,renderParams){function callback(div,tune){!renderParams.oneSvgPerLine||tune.lines.length<2?renderOne(div,tune,renderParams,engraverParams):renderEachLineSeparately(div,tune,renderParams,engraverParams)}return void 0===renderParams&&(renderParams={}),renderEngine(callback,output,abc,parserParams,renderParams)},ABCJS.renderMidi=function(output,abc,parserParams,midiParams,renderParams){function callback(div,tune,index){var html="",midi=window.ABCJS.midi.create(tune,midiParams);if(midiParams.generateInline){var inlineMidi=midi.inline?midi.inline:midi;html+=window.ABCJS.midi.generateMidiControls(tune,midiParams,inlineMidi,index)}if(midiParams.generateDownload){var downloadMidi=midi.download?midi.download:midi;html+=window.ABCJS.midi.generateMidiDownloadLink(tune,midiParams,downloadMidi,index)}div.innerHTML=html;var find=function(element,cls){var els=element.getElementsByClassName(cls);return 0===els.length?null:els[0]};if(midiParams.generateInline&&(midiParams.animate||midiParams.listener)){var parent=find(div,"abcjs-inline-midi");if(parent.abcjsTune=tune,parent.abcjsListener=midiParams.listener,parent.abcjsQpm=midiParams.qpm,midiParams.animate){var drumIntro=midiParams.drumIntro?midiParams.drumIntro:0;parent.abcjsAnimate=midiParams.animate.listener,parent.abcjsTune=midiParams.animate.target,parent.abcjsTune.setTiming(midiParams.qpm,drumIntro)}}if(midiParams.generateInline&&midiParams.inlineControls&&midiParams.inlineControls.startPlaying){var startButton=find(div,"abcjs-midi-start");window.ABCJS.midi.startPlaying(startButton)}}return void 0===midiParams&&(midiParams={}),void 0===midiParams.generateInline&&(midiParams.generateInline=!0),midiParams.inlineControls&&(midiParams.inlineControls.selectionToggle=!1),renderEngine(callback,output,abc,parserParams,renderParams)}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.data||(window.ABCJS.data={}),window.ABCJS.data.Tune=function(){function addVerticalInfo(timingEvents){for(var lastBarTop,lastBarBottom,lastEventTop,lastEventBottom,e=timingEvents.length-1;e>=0;e--){var ev=timingEvents[e];"bar"===ev.type?(ev.top=lastEventTop,ev.nextTop=lastBarTop,lastBarTop=lastEventTop,ev.bottom=lastEventBottom,ev.nextBottom=lastBarBottom,lastBarBottom=lastEventBottom):"event"===ev.type&&(lastEventTop=ev.top,lastEventBottom=ev.top+ev.height)}}function makeSortedArray(hash){var arr=[];for(var k in hash)hash.hasOwnProperty(k)&&arr.push(hash[k]);return arr=arr.sort(function(a,b){var diff=a.seconds-b.seconds;return 0!==diff?diff:"bar"===a.type?-1:1})}this.getBeatLength=function(){for(var i=0;i<this.lines.length;i++)if(this.lines[i].staff)for(var j=0;j<this.lines[i].staff.length;j++)if(this.lines[i].staff[j].meter){var meter=this.lines[i].staff[j].meter;if("specified"===meter.type){if(meter.value.length>0){var num=parseInt(meter.value[0].num,10),den=parseInt(meter.value[0].den,10);return 6===num&&8===den?3/8:9===num&&8===den?3/8:12===num&&8===den?3/8:1/den}return null}return"cut_time"===meter.type?.5:.25}return null},this.reset=function(){this.version="1.0.1",this.media="screen",this.metaText={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0},this.cleanUp=function(defWidth,defLength,barsperstaff,staffnonote,currSlur){function cleanUpSlursInLine(line){for(var x,addEndSlur=function(obj,num,chordPos){if(void 0===currSlur[chordPos]){for(x=0;x<currSlur.length;x++)if(void 0!==currSlur[x]){chordPos=x;break}if(void 0===currSlur[chordPos]){var offNum=100*chordPos+1;window.ABCJS.parse.each(obj.endSlur,function(x){offNum===x&&--offNum}),currSlur[chordPos]=[offNum]}}for(var slurNum,i=0;i<num;i++)slurNum=currSlur[chordPos].pop(),obj.endSlur.push(slurNum);return 0===currSlur[chordPos].length&&delete currSlur[chordPos],slurNum},addStartSlur=function(obj,num,chordPos,usedNums){obj.startSlur=[],void 0===currSlur[chordPos]&&(currSlur[chordPos]=[]);for(var nextNum=100*chordPos+1,i=0;i<num;i++)usedNums&&(window.ABCJS.parse.each(usedNums,function(x){nextNum===x&&++nextNum}),window.ABCJS.parse.each(usedNums,function(x){nextNum===x&&++nextNum}),window.ABCJS.parse.each(usedNums,function(x){nextNum===x&&++nextNum})),window.ABCJS.parse.each(currSlur[chordPos],function(x){nextNum===x&&++nextNum}),window.ABCJS.parse.each(currSlur[chordPos],function(x){nextNum===x&&++nextNum}),currSlur[chordPos].push(nextNum),obj.startSlur.push({label:nextNum}),nextNum++},i=0;i<line.length;i++){var el=line[i];if("note"===el.el_type){if(el.gracenotes)for(var g=0;g<el.gracenotes.length;g++){if(el.gracenotes[g].endSlur){var gg=el.gracenotes[g].endSlur;el.gracenotes[g].endSlur=[];for(var ggg=0;ggg<gg;ggg++)addEndSlur(el.gracenotes[g],1,20)}el.gracenotes[g].startSlur&&(x=el.gracenotes[g].startSlur,addStartSlur(el.gracenotes[g],x,20))}if(el.endSlur&&(x=el.endSlur,el.endSlur=[],addEndSlur(el,x,0)),el.startSlur&&(x=el.startSlur,addStartSlur(el,x,0)),el.pitches){for(var usedNums=[],p=0;p<el.pitches.length;p++)if(el.pitches[p].endSlur){var k=el.pitches[p].endSlur;el.pitches[p].endSlur=[];for(var j=0;j<k;j++){var slurNum=addEndSlur(el.pitches[p],1,p+1);usedNums.push(slurNum)}}for(p=0;p<el.pitches.length;p++)el.pitches[p].startSlur&&(x=el.pitches[p].startSlur,addStartSlur(el.pitches[p],x,p+1,usedNums));el.gracenotes&&el.pitches[0].endSlur&&100===el.pitches[0].endSlur[0]&&el.pitches[0].startSlur&&(el.gracenotes[0].endSlur?el.gracenotes[0].endSlur.push(el.pitches[0].startSlur[0].label):el.gracenotes[0].endSlur=[el.pitches[0].startSlur[0].label],1===el.pitches[0].endSlur.length?delete el.pitches[0].endSlur:100===el.pitches[0].endSlur[0]?el.pitches[0].endSlur.shift():100===el.pitches[0].endSlur[el.pitches[0].endSlur.length-1]&&el.pitches[0].endSlur.pop(),1===currSlur[1].length?delete currSlur[1]:currSlur[1].pop())}}}}function fixClefPlacement(el){window.ABCJS.parse.parseKeyVoice.fixClef(el)}function getNextMusicLine(lines,currentLine){for(currentLine++;lines.length>currentLine;){if(lines[currentLine].staff)return lines[currentLine];currentLine++}return null}this.closeLine();var i,s,v,anyDeleted=!1;for(i=0;i<this.lines.length;i++)if(void 0!==this.lines[i].staff){var hasAny=!1;for(s=0;s<this.lines[i].staff.length;s++)if(void 0===this.lines[i].staff[s])anyDeleted=!0,this.lines[i].staff[s]=null;else for(v=0;v<this.lines[i].staff[s].voices.length;v++)void 0===this.lines[i].staff[s].voices[v]?this.lines[i].staff[s].voices[v]=[]:this.containsNotes(this.lines[i].staff[s].voices[v])&&(hasAny=!0);hasAny||(this.lines[i]=null,anyDeleted=!0)}if(anyDeleted&&(this.lines=window.ABCJS.parse.compact(this.lines),window.ABCJS.parse.each(this.lines,function(line){line.staff&&(line.staff=window.ABCJS.parse.compact(line.staff))})),barsperstaff)for(i=0;i<this.lines.length;i++)if(void 0!==this.lines[i].staff)for(s=0;s<this.lines[i].staff.length;s++)for(v=0;v<this.lines[i].staff[s].voices.length;v++)for(var barNumThisLine=0,n=0;n<this.lines[i].staff[s].voices[v].length;n++)if("bar"===this.lines[i].staff[s].voices[v][n].el_type&&(barNumThisLine++,barNumThisLine>=barsperstaff&&n<this.lines[i].staff[s].voices[v].length-1)){if(i===this.lines.length-1){var cp=JSON.parse(JSON.stringify(this.lines[i]));this.lines.push(window.ABCJS.parse.clone(cp));for(var ss=0;ss<this.lines[i+1].staff.length;ss++)for(var vv=0;vv<this.lines[i+1].staff[ss].voices.length;vv++)this.lines[i+1].staff[ss].voices[vv]=[]}var startElement=n+1,section=this.lines[i].staff[s].voices[v].slice(startElement);this.lines[i].staff[s].voices[v]=this.lines[i].staff[s].voices[v].slice(0,startElement),this.lines[i+1].staff[s].voices[v]=section.concat(this.lines[i+1].staff[s].voices[v])}if(barsperstaff){for(anyDeleted=!1,i=0;i<this.lines.length;i++)if(void 0!==this.lines[i].staff)for(s=0;s<this.lines[i].staff.length;s++){var keepThis=!1;for(v=0;v<this.lines[i].staff[s].voices.length;v++)this.containsNotesStrict(this.lines[i].staff[s].voices[v])&&(keepThis=!0);keepThis||(anyDeleted=!0,this.lines[i].staff[s]=null)}anyDeleted&&window.ABCJS.parse.each(this.lines,function(line){line.staff&&(line.staff=window.ABCJS.parse.compact(line.staff))})}for(i=0;i<this.lines.length;i++)if(this.lines[i].staff)for(s=0;s<this.lines[i].staff.length;s++)delete this.lines[i].staff[s].workingClef;for(this.lineNum=0;this.lineNum<this.lines.length;this.lineNum++){var staff=this.lines[this.lineNum].staff;if(staff)for(this.staffNum=0;this.staffNum<staff.length;this.staffNum++)for(staff[this.staffNum].clef&&fixClefPlacement(staff[this.staffNum].clef),this.voiceNum=0;this.voiceNum<staff[this.staffNum].voices.length;this.voiceNum++){var voice=staff[this.staffNum].voices[this.voiceNum];cleanUpSlursInLine(voice);for(var j=0;j<voice.length;j++)"clef"===voice[j].el_type&&fixClefPlacement(voice[j]);if(voice.length>0&&voice[voice.length-1].barNumber){var nextLine=getNextMusicLine(this.lines,this.lineNum);nextLine&&(nextLine.staff[0].barNumber=voice[voice.length-1].barNumber),delete voice[voice.length-1].barNumber}}}return this.formatting.pagewidth||(this.formatting.pagewidth=defWidth),this.formatting.pageheight||(this.formatting.pageheight=defLength),delete this.staffNum,delete this.voiceNum,delete this.lineNum,delete this.potentialStartBeam,delete this.potentialEndBeam,delete this.vskipPending,currSlur},this.reset(),this.getLastNote=function(){if(this.lines[this.lineNum]&&this.lines[this.lineNum].staff&&this.lines[this.lineNum].staff[this.staffNum]&&this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum])for(var i=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum].length-1;i>=0;i--){var el=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum][i];if("note"===el.el_type)return el}return null},this.addTieToLastNote=function(){var el=this.getLastNote();return!!(el&&el.pitches&&el.pitches.length>0)&&(el.pitches[0].startTie={},!0)},this.getDuration=function(el){return el.duration?el.duration:0},this.closeLine=function(){this.potentialStartBeam&&this.potentialEndBeam&&(this.potentialStartBeam.startBeam=!0,this.potentialEndBeam.endBeam=!0),delete this.potentialStartBeam,delete this.potentialEndBeam},this.appendElement=function(type,startChar,endChar,hashParams){var This=this,pushNote=function(hp){if(void 0!==hp.pitches){var mid=This.lines[This.lineNum].staff[This.staffNum].workingClef.verticalPos;window.ABCJS.parse.each(hp.pitches,function(p){p.verticalPos=p.pitch-mid})}if(void 0!==hp.gracenotes){var mid2=This.lines[This.lineNum].staff[This.staffNum].workingClef.verticalPos;window.ABCJS.parse.each(hp.gracenotes,function(p){p.verticalPos=p.pitch-mid2})}This.lines[This.lineNum].staff[This.staffNum].voices[This.voiceNum].push(hp)};hashParams.el_type=type,null!==startChar&&(hashParams.startChar=startChar),null!==endChar&&(hashParams.endChar=endChar);var endBeamHere=function(){This.potentialStartBeam.startBeam=!0,hashParams.endBeam=!0,delete This.potentialStartBeam,delete This.potentialEndBeam},endBeamLast=function(){void 0!==This.potentialStartBeam&&void 0!==This.potentialEndBeam&&(This.potentialStartBeam.startBeam=!0,This.potentialEndBeam.endBeam=!0),delete This.potentialStartBeam,delete This.potentialEndBeam};if("note"===type){var dur=This.getDuration(hashParams);dur>=.25?endBeamLast():hashParams.force_end_beam_last&&void 0!==This.potentialStartBeam?endBeamLast():hashParams.end_beam&&void 0!==This.potentialStartBeam?void 0===hashParams.rest?endBeamHere():endBeamLast():void 0===hashParams.rest&&(void 0===This.potentialStartBeam?hashParams.end_beam||(This.potentialStartBeam=hashParams,delete This.potentialEndBeam):This.potentialEndBeam=hashParams)}else endBeamLast();delete hashParams.end_beam,delete hashParams.force_end_beam_last,pushNote(hashParams)},this.appendStartingElement=function(type,startChar,endChar,hashParams2){this.closeLine();var impliedNaturals;"key"===type&&(impliedNaturals=hashParams2.impliedNaturals,delete hashParams2.impliedNaturals);var hashParams=window.ABCJS.parse.clone(hashParams2);if(this.lines[this.lineNum].staff){"clef"===type&&(this.lines[this.lineNum].staff[this.staffNum].workingClef=hashParams),this.lines[this.lineNum].staff.length<=this.staffNum&&(this.lines[this.lineNum].staff[this.staffNum]={},this.lines[this.lineNum].staff[this.staffNum].clef=window.ABCJS.parse.clone(this.lines[this.lineNum].staff[0].clef),this.lines[this.lineNum].staff[this.staffNum].key=window.ABCJS.parse.clone(this.lines[this.lineNum].staff[0].key),this.lines[this.lineNum].staff[this.staffNum].meter=window.ABCJS.parse.clone(this.lines[this.lineNum].staff[0].meter),this.lines[this.lineNum].staff[this.staffNum].workingClef=window.ABCJS.parse.clone(this.lines[this.lineNum].staff[0].workingClef),this.lines[this.lineNum].staff[this.staffNum].voices=[[]]);for(var voice=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum],i=0;i<voice.length;i++){if("note"===voice[i].el_type||"bar"===voice[i].el_type)return hashParams.el_type=type,hashParams.startChar=startChar,hashParams.endChar=endChar,impliedNaturals&&(hashParams.accidentals=impliedNaturals.concat(hashParams.accidentals)),void voice.push(hashParams);if(voice[i].el_type===type)return hashParams.el_type=type,hashParams.startChar=startChar,hashParams.endChar=endChar,impliedNaturals&&(hashParams.accidentals=impliedNaturals.concat(hashParams.accidentals)),void(voice[i]=hashParams)}this.lines[this.lineNum].staff[this.staffNum][type]=hashParams2}},this.getNumLines=function(){return this.lines.length},this.pushLine=function(hash){this.vskipPending&&(hash.vskip=this.vskipPending,delete this.vskipPending),this.lines.push(hash)},this.addSubtitle=function(str){this.pushLine({subtitle:str})},this.addSpacing=function(num){this.vskipPending=num},this.addNewPage=function(num){this.pushLine({newpage:num})},this.addSeparator=function(spaceAbove,spaceBelow,lineLength){this.pushLine({separator:{spaceAbove:spaceAbove,spaceBelow:spaceBelow,lineLength:lineLength}})},this.addText=function(str){this.pushLine({text:str})},this.addCentered=function(str){this.pushLine({text:[{text:str,center:!0}]})},this.containsNotes=function(voice){for(var i=0;i<voice.length;i++)if("note"===voice[i].el_type||"bar"===voice[i].el_type)return!0;return!1},this.containsNotesStrict=function(voice){for(var i=0;i<voice.length;i++)if("note"===voice[i].el_type&&void 0===voice[i].rest)return!0;return!1},this.startNewLine=function(params){var This=this;this.closeLine();var createVoice=function(params){if(This.lines[This.lineNum].staff[This.staffNum].voices[This.voiceNum]=[],This.isFirstLine(This.lineNum)?params.name&&(This.lines[This.lineNum].staff[This.staffNum].title||(This.lines[This.lineNum].staff[This.staffNum].title=[]),This.lines[This.lineNum].staff[This.staffNum].title[This.voiceNum]=params.name):params.subname&&(This.lines[This.lineNum].staff[This.staffNum].title||(This.lines[This.lineNum].staff[This.staffNum].title=[]),This.lines[This.lineNum].staff[This.staffNum].title[This.voiceNum]=params.subname),params.style&&This.appendElement("style",null,null,{head:params.style}),params.stem)This.appendElement("stem",null,null,{direction:params.stem});else if(This.voiceNum>0){if(void 0!==This.lines[This.lineNum].staff[This.staffNum].voices[0]){for(var found=!1,i=0;i<This.lines[This.lineNum].staff[This.staffNum].voices[0].length;i++)"stem"===This.lines[This.lineNum].staff[This.staffNum].voices[0].el_type&&(found=!0);if(!found){var stem={el_type:"stem",direction:"up"};This.lines[This.lineNum].staff[This.staffNum].voices[0].splice(0,0,stem)}}This.appendElement("stem",null,null,{direction:"down"})}params.scale&&This.appendElement("scale",null,null,{size:params.scale})},createStaff=function(params){This.lines[This.lineNum].staff[This.staffNum]={voices:[],clef:params.clef,key:params.key,workingClef:params.clef},params.vocalfont&&(This.lines[This.lineNum].staff[This.staffNum].vocalfont=params.vocalfont),params.bracket&&(This.lines[This.lineNum].staff[This.staffNum].bracket=params.bracket),params.brace&&(This.lines[This.lineNum].staff[This.staffNum].brace=params.brace),params.connectBarLines&&(This.lines[This.lineNum].staff[This.staffNum].connectBarLines=params.connectBarLines),params.barNumber&&(This.lines[This.lineNum].staff[This.staffNum].barNumber=params.barNumber),createVoice(params),params.part&&This.appendElement("part",params.startChar,params.endChar,{title:params.part}),void 0!==params.meter&&(This.lines[This.lineNum].staff[This.staffNum].meter=params.meter)},createLine=function(params){This.lines[This.lineNum]={staff:[]},createStaff(params)};if(void 0===this.lines[this.lineNum])createLine(params);else if(void 0===this.lines[this.lineNum].staff)this.lineNum++,this.startNewLine(params);else if(void 0===this.lines[this.lineNum].staff[this.staffNum])createStaff(params);else if(void 0===this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum])createVoice(params);else{if(!this.containsNotes(this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]))return;this.lineNum++,this.startNewLine(params)}},this.hasBeginMusic=function(){for(var i=0;i<this.lines.length;i++)if(this.lines[i].staff)return!0;return!1},this.isFirstLine=function(index){for(var i=index-1;i>=0;i--)if(void 0!==this.lines[i].staff)return!1;return!0},this.getMeter=function(){for(var i=0;i<this.lines.length;i++){var line=this.lines[i];if(line.staff)for(var j=0;j<line.staff.length;j++){var meter=line.staff[j].meter;if(meter)return meter}}return{type:"common_time"}},this.getCurrentVoice=function(){return void 0!==this.lines[this.lineNum]&&void 0!==this.lines[this.lineNum].staff[this.staffNum]&&void 0!==this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]?this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]:null},this.setCurrentVoice=function(staffNum,voiceNum){this.staffNum=staffNum,this.voiceNum=voiceNum;for(var i=0;i<this.lines.length;i++)if(this.lines[i].staff&&(void 0===this.lines[i].staff[staffNum]||void 0===this.lines[i].staff[staffNum].voices[voiceNum]||!this.containsNotes(this.lines[i].staff[staffNum].voices[voiceNum])))return void(this.lineNum=i);this.lineNum=i},this.addMetaText=function(key,value){void 0===this.metaText[key]?this.metaText[key]=value:this.metaText[key]+="\n"+value},this.addMetaTextArray=function(key,value){void 0===this.metaText[key]?this.metaText[key]=[value]:this.metaText[key].push(value)},this.addMetaTextObj=function(key,value){this.metaText[key]=value},this.setupEvents=function(startingDelay,timeDivider){for(var timingEvents=[],eventHash={},time=startingDelay,isTiedState=!1,line=0;line<this.engraver.staffgroups.length;line++){var group=this.engraver.staffgroups[line],voices=group.voices,firstStaff=group.staffs[0],middleC=firstStaff.absoluteY,top=middleC-firstStaff.top*ABCJS.write.spacing.STEP,lastStaff=group.staffs[group.staffs.length-1];middleC=lastStaff.absoluteY;for(var bottom=middleC-lastStaff.bottom*ABCJS.write.spacing.STEP,height=bottom-top,maxVoiceTime=0,v=0;v<voices.length;v++){for(var voiceTime=time,elements=voices[v].children,elem=0;elem<elements.length;elem++){var element=elements[elem];if(element.hint)break;if(element.duration>0){var isTiedToNext=element.startTie;isTiedState?isTiedToNext||(isTiedState=!1):(eventHash["event"+voiceTime]?(eventHash["event"+voiceTime].left=Math.min(eventHash["event"+voiceTime].left,element.x),eventHash["event"+voiceTime].elements.push(element.elemset)):eventHash["event"+voiceTime]={type:"event",seconds:voiceTime,top:top,height:height,left:element.x,width:element.w,elements:[element.elemset]},isTiedToNext&&(isTiedState=!0)),voiceTime+=element.duration/timeDivider}}maxVoiceTime=Math.max(maxVoiceTime,voiceTime)}time=maxVoiceTime}return timingEvents=makeSortedArray(eventHash),addVerticalInfo(timingEvents),timingEvents},this.setTiming=function(bpm,measuresOfDelay){var meter=this.getMeter();this.barTimings=[];var measureLength,beatLength=this.getBeatLength(),beatsPerSecond=bpm/60;switch(meter.type){case"common_time":measureLength=1,this.meter={num:4,den:4};break;case"cut_time":measureLength=1,this.meter={num:2,den:2};break;default:measureLength=meter.value[0].num/meter.value[0].den,this.meter={num:meter.value[0].num,den:meter.value[0].den}}var startingDelay=measureLength/beatLength*measuresOfDelay/beatsPerSecond,timeDivider=beatLength*beatsPerSecond;this.noteTimings=this.setupEvents(startingDelay,timeDivider)}},window.ABCJS||(window.ABCJS={}),window.ABCJS.midi||(window.ABCJS.midi={}),function(){"use strict";function isFunction(functionToCheck){var getType={};return functionToCheck&&"[object Function]"===getType.toString.call(functionToCheck)}function preprocessLabel(label,title){return label.replace(/%T/g,title)}function hasClass(element,cls){return!!element&&(" "+element.className+" ").indexOf(" "+cls+" ")>-1}function addClass(element,cls){element&&(hasClass(element,cls)||(element.className=element.className+" "+cls))}function removeClass(element,cls){element&&(element.className=element.className.replace(cls,"").trim().replace(" "," "))}function toggleClass(element,cls){element&&(hasClass(element,cls)?removeClass(element,cls):addClass(element,cls))}function closest(element,cls){if(!element)return null;for(;element!==document.body;){if(hasClass(element,cls))return element;element=element.parentNode}return null}function find(element,cls){if(!element)return null;var els=element.getElementsByClassName(cls);return 0===els.length?null:els[0]}function addLoadEvent(func){var oldOnLoad=window.onload;"function"!=typeof window.onload?window.onload=func:window.onload=function(){oldOnLoad&&oldOnLoad(),func()}}function afterSetup(timeWarp,data,onSuccess){MIDI.player.currentTime=0,MIDI.player.warp=timeWarp,MIDI.player.load({events:data}),onSuccess()}function setCurrentMidiTune(timeWarp,data,onSuccess){midiJsInitialized?afterSetup(timeWarp,data,onSuccess):MIDI.setup({debug:!0,soundfontUrl:window.ABCJS.midi.soundfontUrl}).then(function(){midiJsInitialized=!0,afterSetup(timeWarp,data,onSuccess)})}function startCurrentlySelectedTune(){MIDI.player.start(MIDI.player.currentTime)}function stopCurrentlyPlayingTune(){MIDI.player.stop()}function pauseCurrentlyPlayingTune(){MIDI.player.pause()}function setMidiCallback(midiJsListener){MIDI.player.setAnimation(midiJsListener)}function jumpToMidiPosition(play,offset,width){var ratio=offset/width,endTime=MIDI.player.duration;play&&pauseCurrentlyPlayingTune(),MIDI.player.currentTime=endTime*ratio,play&&startCurrentlySelectedTune()}function setTimeWarp(percent){MIDI.player.warp=percent>0?100/percent:1}function loadMidi(target,onSuccess){var dataEl=find(target,"abcjs-data"),data=JSON.parse(dataEl.innerHTML),timeWarp=1,tempoEl=find(target,"abcjs-midi-tempo");if(tempoEl){var percent=parseInt(tempoEl.value,10);percent>0&&(timeWarp=100/percent)}setCurrentMidiTune(timeWarp,data,onSuccess)}function deselectMidiControl(){var otherMidi=find(document,"abcjs-midi-current");if(otherMidi){stopCurrentlyPlayingTune(),removeClass(otherMidi,"abcjs-midi-current");var otherMidiStart=find(otherMidi,"abcjs-midi-start");removeClass(otherMidiStart,"abcjs-pushed")}}function findElements(visualItems,currentTime,epsilon){for(var currentIndex,currentElement,minIndex=0,maxIndex=visualItems.length-1;minIndex<=maxIndex;)if(currentIndex=(minIndex+maxIndex)/2|0,currentElement=visualItems[currentIndex],currentElement.seconds-epsilon<currentTime)minIndex=currentIndex+1;else{if(!(currentElement.seconds-epsilon>currentTime))return currentIndex;maxIndex=currentIndex-1}for(;visualItems[currentIndex].seconds-epsilon>=currentTime&&currentIndex>0;)currentIndex--;return 0===currentIndex&&visualItems[currentIndex].seconds-epsilon>=currentTime?-1:currentIndex}function midiJsListener(position){var midiControl;if(position.duration>0&&lastNow!==position.progress&&(lastNow=position.progress,midiControl=find(document,"abcjs-midi-current"))){var startButton=find(midiControl,"abcjs-midi-start");if(hasClass(startButton,"abcjs-pushed")){var progressBackground=find(midiControl,"abcjs-midi-progress-background"),totalWidth=progressBackground.offsetWidth,progressIndicator=find(midiControl,"abcjs-midi-progress-indicator"),scaled=totalWidth*lastNow;progressIndicator.style.left=scaled+"px";var clock=find(midiControl,"abcjs-midi-clock");if(clock){var seconds=Math.floor(position.currentTime),minutes=Math.floor(seconds/60);seconds%=60,seconds<10&&(seconds="0"+seconds),minutes<10&&(minutes=" "+minutes),clock.innerHTML=minutes+":"+seconds}var beatsPerSecond=parseInt(midiControl.abcjsQpm,10)/60,currentTime=position.currentTime;if(midiControl.abcjsListener){var thisBeat=Math.floor(currentTime/beatsPerSecond);position.newBeat=thisBeat!==midiControl.abcjsLastBeat,midiControl.abcjsLastBeat=thisBeat,midiControl.abcjsListener(midiControl,position)}if(midiControl.abcjsAnimate){var epsilon=beatsPerSecond/64,index=findElements(midiControl.abcjsTune.noteTimings,currentTime,epsilon);if(index!==midiControl.abcjsLastIndex){var last=midiControl.abcjsLastIndex>=0?midiControl.abcjsTune.noteTimings[midiControl.abcjsLastIndex]:null;midiControl.abcjsAnimate(last,midiControl.abcjsTune.noteTimings[index]),midiControl.abcjsLastIndex=index}}}}if(1===position.progress){midiControl=find(document,"abcjs-midi-current");var loopControl=find(midiControl,"abcjs-midi-loop"),finishedResetting=function(){loopControl&&hasClass(loopControl,"abcjs-pushed")&&onStart(find(midiControl,"abcjs-midi-start"))};setTimeout(function(){doReset(midiControl,finishedResetting),midiControl.abcjsAnimate&&midiControl.abcjsAnimate(midiControl.abcjsTune.noteTimings[midiControl.abcjsLastIndex],null)},1)}}function onStart(target){var parent=closest(target,"abcjs-inline-midi");if(hasClass(target,"abcjs-pushed"))pauseCurrentlyPlayingTune(),removeClass(target,"abcjs-pushed");else{if(hasClass(parent,"abcjs-midi-current"))startCurrentlySelectedTune();else{deselectMidiControl();var onSuccess=function(){startCurrentlySelectedTune(),addClass(parent,"abcjs-midi-current")};loadMidi(parent,onSuccess)}addClass(target,"abcjs-pushed")}parent.abcjsLastBeat=-1,parent.abcjsLastIndex=-1,setMidiCallback(midiJsListener)}function onSelection(target){toggleClass(target,"abcjs-pushed")}function onLoop(target){toggleClass(target,"abcjs-pushed")}function doReset(target,callback){function onSuccess(){addClass(parent,"abcjs-midi-current");var progressIndicator=find(parent,"abcjs-midi-progress-indicator");progressIndicator.style.left="0px";var clock=find(parent,"abcjs-midi-clock");clock.innerHTML=" 0:00",callback&&callback()}var parent=closest(target,"abcjs-inline-midi");deselectMidiControl(),parent&&loadMidi(parent,onSuccess)}function onReset(target){function keepPlaying(){play&&(startCurrentlySelectedTune(),addClass(playEl,"abcjs-pushed"))}var parent=closest(target,"abcjs-inline-midi"),playEl=find(parent,"abcjs-midi-start"),play=hasClass(playEl,"abcjs-pushed");hasClass(parent,"abcjs-midi-current")&&doReset(target,keepPlaying)}function relMouseX(target,event){var totalOffsetX=0;do totalOffsetX+=target.offsetLeft-target.scrollLeft,target=target.offsetParent;while(target);return event.pageX-totalOffsetX}function onProgress(target,event){var parent=closest(target,"abcjs-inline-midi");if(hasClass(parent,"abcjs-midi-current")){var play=find(parent,"abcjs-midi-start");play=hasClass(play,"abcjs-pushed");var width=target.offsetWidth,offset=relMouseX(target,event);jumpToMidiPosition(play,offset,width)}}function onTempo(el){for(var percent=parseInt(el.value,10),startTempo=parseInt(el.getAttribute("data-start-tempo"),10);el&&!hasClass(el,"abcjs-midi-current-tempo");)el=el.nextSibling;el.innerHTML=Math.floor(percent*startTempo/100),setTimeWarp(percent)}function addDelegates(){if(document.body.addEventListener("click",function(event){event=event||window.event;for(var target=event.target||event.srcElement;target&&target!==document.body;){if(hasClass(target,"abcjs-midi-start"))return void onStart(target,event);if(hasClass(target,"abcjs-midi-selection"))return void onSelection(target,event);if(hasClass(target,"abcjs-midi-loop"))return void onLoop(target,event);if(hasClass(target,"abcjs-midi-reset"))return void onReset(target,event);if(hasClass(target,"abcjs-midi-progress-background"))return void onProgress(target,event);target=target.parentNode}}),document.body.addEventListener("change",function(event){event=event||window.event;for(var target=event.target||event.srcElement;target!==document.body;)hasClass(target,"abcjs-midi-tempo")&&onTempo(target,event),target=target.parentNode}),void 0===window.MIDI){window.ABCJS.midi.midiInlineInitialized="not loaded";for(var els=document.getElementsByClassName("abcjs-inline-midi"),i=0;i<els.length;i++)els[i].innerHTML="MIDI NOT PRESENT"}}window.ABCJS.midi.generateMidiDownloadLink=function(tune,midiParams,midi,index){var html='<div class="download-midi midi-'+index+'">';midiParams.preTextDownload&&(html+=midiParams.preTextDownload);var label,title=tune.metaText&&tune.metaText.title?tune.metaText.title:"Untitled";return label=midiParams.downloadLabel&&isFunction(midiParams.downloadLabel)?midiParams.downloadLabel(tune,index):midiParams.downloadLabel?midiParams.downloadLabel.replace(/%T/,title):'Download MIDI for "'+title+'"',title=title.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"),html+='<a download="'+title+'.midi" href="'+midi+'">'+label+"</a>",midiParams.postTextDownload&&(html+=midiParams.postTextDownload),html+"</div>"},window.ABCJS.midi.generateMidiControls=function(tune,midiParams,midi,index){if("failed"===window.ABCJS.midiInlineInitialized)return'<div class="abcjs-inline-midi abcjs-midi-'+index+'">ERROR</div>';if("not loaded"===window.ABCJS.midiInlineInitialized)return'<div class="abcjs-inline-midi abcjs-midi-'+index+'">MIDI NOT PRESENT</div>';var title=tune.metaText&&tune.metaText.title?tune.metaText.title:"Untitled",options=midiParams.inlineControls||{};void 0===options.standard&&(options.standard=!0),void 0===options.tooltipSelection&&(options.tooltipSelection="Click to toggle play selection/play all."),void 0===options.tooltipLoop&&(options.tooltipLoop="Click to toggle play once/repeat."),void 0===options.tooltipReset&&(options.tooltipReset="Click to go to beginning."),void 0===options.tooltipPlay&&(options.tooltipPlay="Click to play/pause."),void 0===options.tooltipProgress&&(options.tooltipProgress="Click to change the playback position."),
+void 0===options.tooltipTempo&&(options.tooltipTempo="Change the playback speed.");var style="";options.hide&&(style='style="display:none;"');var html='<div class="abcjs-inline-midi abcjs-midi-'+index+'" '+style+">";if(html+='<span class="abcjs-data" style="display:none;">'+JSON.stringify(midi)+"</span>",midiParams.preTextInline&&(html+='<span class="abcjs-midi-pre">'+preprocessLabel(midiParams.preTextInline,title)+"</span>"),options.selectionToggle&&(html+='<button class="abcjs-midi-selection abcjs-btn" title="'+options.tooltipSelection+'"></button>'),options.loopToggle&&(html+='<button class="abcjs-midi-loop abcjs-btn" title="'+options.tooltipLoop+'"></button>'),options.standard&&(html+='<button class="abcjs-midi-reset abcjs-btn" title="'+options.tooltipReset+'"></button><button class="abcjs-midi-start abcjs-btn" title="'+options.tooltipPlay+'"></button><button class="abcjs-midi-progress-background" title="'+options.tooltipProgress+'"><span class="abcjs-midi-progress-indicator"></span></button><span class="abcjs-midi-clock"> 0:00</span>'),options.tempo){var startTempo=tune&&tune.metaText&&tune.metaText.tempo?tune.metaText.tempo.bpm:180;html+='<span class="abcjs-tempo-wrapper"><input class="abcjs-midi-tempo" value="100" type="number" min="1" max="300" data-start-tempo="'+startTempo+'" title="'+options.tooltipTempo+'" />% (<span class="abcjs-midi-current-tempo">'+startTempo+"</span> BPM)</span>"}return midiParams.postTextInline&&(html+='<span class="abcjs-midi-post">'+preprocessLabel(midiParams.postTextInline,title)+"</span>"),html+"</div>"},window.ABCJS.midi.soundfontUrl="/soundfont/";var lastNow,midiJsInitialized=!1;window.ABCJS.midi.startPlaying=function(target){onStart(target)},window.ABCJS.midi.stopPlaying=function(){stopCurrentlyPlayingTune()},addLoadEvent(addDelegates)}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.midi||(window.ABCJS.midi={}),function(){"use strict";function convertPitch(pitch){return 60+pitch}var baseDuration=1920;window.ABCJS.midi.create=function(abcTune,options){void 0===options&&(options={});var sequence=window.ABCJS.midi.sequence(abcTune,options),commands=window.ABCJS.midi.flatten(sequence,options),midi=window.ABCJS.midi.rendererFactory(),midiJs=new window.ABCJS.midi.Preparer,title=abcTune.metaText?abcTune.metaText.title:void 0;title&&title.length>128&&(title=title.substring(0,124)+"..."),midi.setGlobalInfo(commands.tempo,title),midiJs.setGlobalInfo(commands.tempo,title),void 0!==commands.instrument&&(midi.setInstrument(commands.instrument),midiJs.setInstrument(commands.instrument)),void 0!==commands.channel&&(midi.setChannel(commands.channel),midiJs.setChannel(commands.channel));for(var i=0;i<commands.tracks.length;i++){midi.startTrack(),midiJs.startTrack();for(var j=0;j<commands.tracks[i].length;j++){var event=commands.tracks[i][j];switch(event.cmd){case"instrument":midi.setInstrument(event.instrument),midiJs.setInstrument(event.instrument);break;case"channel":midi.setChannel(event.channel),midiJs.setChannel(event.channel);break;case"start":midi.startNote(convertPitch(event.pitch),event.volume),midiJs.startNote(convertPitch(event.pitch),event.volume);break;case"stop":midi.endNote(convertPitch(event.pitch),0),midiJs.endNote(convertPitch(event.pitch));break;case"move":midi.addRest(event.duration*baseDuration),midiJs.addRest(event.duration*baseDuration);break;default:console.log("MIDI create Unknown: "+event.cmd)}}midi.endTrack(),midiJs.endTrack()}var midiFile=midi.getData(),midiInline=midiJs.getData();return void 0===options.generateInline&&(options.generateInline=!0),options.generateInline&&options.generateDownload?{download:midiFile,inline:midiInline}:options.generateInline?midiInline:midiFile}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.midi||(window.ABCJS.midi={}),function(){"use strict";function findChord(elem){if(chordTrackFinished||!elem.chord||0===elem.chord.length)return null;for(var i=0;i<elem.chord.length;i++){var ch=elem.chord[i];if("default"===ch.position)return ch.name;if(breakSynonyms.indexOf(ch.name.toLowerCase())>=0)return"break"}return null}function timeFromStart(){for(var distance=0,ct=0;ct<currentTrack.length;ct++)"move"===currentTrack[ct].cmd&&(distance+=currentTrack[ct].duration);return distance}function writeNote(elem,voiceOff){var velocity=voiceOff?0:64,chord=findChord(elem);if(chord){var c=interpretChord(chord);if(c){if(0===chordTrack.length){chordTrack.push({cmd:"instrument",instrument:0});var distance=timeFromStart();distance>0&&chordTrack.push({cmd:"move",duration:distance*tempoChangeFactor})}lastChord=c,currentChords.push({chord:lastChord,beat:barBeat})}}elem.startTriplet&&(multiplier=2===elem.startTriplet?1.5:(elem.startTriplet-1)/elem.startTriplet);var duration=elem.duration*multiplier;barBeat+=duration;var graces;if(elem.gracenotes){var stealFromCurrent=bagpipes||lastNoteDurationPosition<0||0===currentTrack.length,stealFromDuration=stealFromCurrent?duration:currentTrack[lastNoteDurationPosition].duration;graces=processGraceNotes(elem.gracenotes,stealFromDuration),bagpipes||(duration=writeGraceNotes(graces,stealFromCurrent,duration,null,velocity))}if(elem.pitches){graces&&bagpipes&&(duration=writeGraceNotes(graces,!0,duration,null,velocity));for(var pitches=[],i=0;i<elem.pitches.length;i++){var note=elem.pitches[i],actualPitch=adjustPitch(note);pitches.push({pitch:actualPitch,startTie:note.startTie}),pitchesTied[""+actualPitch]||currentTrack.push({cmd:"start",pitch:actualPitch,volume:velocity}),note.startTie?pitchesTied[""+actualPitch]=!0:note.endTie&&(pitchesTied[""+actualPitch]=!1)}currentTrack.push({cmd:"move",duration:(duration-normalBreakBetweenNotes)*tempoChangeFactor}),lastNoteDurationPosition=currentTrack.length-1;for(var ii=0;ii<pitches.length;ii++)pitchesTied[""+pitches[ii].pitch]||currentTrack.push({cmd:"stop",pitch:pitches[ii].pitch});currentTrack.push({cmd:"move",duration:normalBreakBetweenNotes*tempoChangeFactor})}else elem.rest&&currentTrack.push({cmd:"move",duration:duration*tempoChangeFactor});elem.endTriplet&&(multiplier=1)}function adjustPitch(note){var pitch=note.pitch;if(note.accidental)switch(note.accidental){case"sharp":barAccidentals[pitch]=1;break;case"flat":barAccidentals[pitch]=-1;break;case"natural":barAccidentals[pitch]=0;break;case"dblsharp":barAccidentals[pitch]=2;break;case"dblflat":barAccidentals[pitch]=-2}var actualPitch=12*extractOctave(pitch)+scale[extractNote(pitch)];return actualPitch+=void 0!==barAccidentals[pitch]?barAccidentals[pitch]:accidentals[extractNote(pitch)],actualPitch+=transpose}function setKeySignature(elem){var accidentals=[0,0,0,0,0,0,0];if(!elem.accidentals)return accidentals;for(var i=0;i<elem.accidentals.length;i++){var acc=elem.accidentals[i],d="sharp"===acc.acc?1:"natural"===acc.acc?0:-1,lowercase=acc.note.toLowerCase(),note=extractNote(lowercase.charCodeAt(0)-"c".charCodeAt(0));accidentals[note]+=d}return accidentals}function processGraceNotes(graces,companionDuration){for(var grace,graceDuration=0,ret=[],g=0;g<graces.length;g++)grace=graces[g],graceDuration+=grace.duration;graceDuration/=graceDivider;var multiplier=2*graceDuration>companionDuration?companionDuration/(2*graceDuration):1;for(g=0;g<graces.length;g++)grace=graces[g],ret.push({pitch:grace.pitch,duration:grace.duration/graceDivider*multiplier});return ret}function writeGraceNotes(graces,stealFromCurrent,duration,skipNote,velocity){for(var g=0;g<graces.length;g++){var gp=adjustPitch(graces[g]);gp!==skipNote&&currentTrack.push({cmd:"start",pitch:gp,volume:velocity}),currentTrack.push({cmd:"move",duration:graces[g].duration*tempoChangeFactor}),gp!==skipNote&&currentTrack.push({cmd:"stop",pitch:gp}),stealFromCurrent||(currentTrack[lastNoteDurationPosition].duration-=graces[g].duration),duration-=graces[g].duration}return duration}function extractOctave(pitch){return Math.floor(pitch/7)}function extractNote(pitch){return pitch%=7,pitch<0&&(pitch+=7),pitch}function interpretChord(name){if(0!==name.length){if("break"===name)return{chick:[]};var root=name.substring(0,1);if("("===root){if(name=name.substring(1,name.length-2),0===name.length)return;root=name.substring(0,1)}var bass=basses[root];if(bass){bass+=transpose;var chick,bass2=bass-5;1===name.length&&(chick=chordNotes(bass,""));var remaining=name.substring(1),acc=remaining.substring(0,1);"b"===acc||"♭"===acc?(bass--,bass2--,remaining=remaining.substring(1)):"#"!==acc&&"♯"!==acc||(bass++,bass2++,remaining=remaining.substring(1));var arr=remaining.split("/");if(chick=chordNotes(bass,arr[0]),2===arr.length){var explicitBass=basses[arr[1]];explicitBass&&(bass=basses[arr[1]]+transpose,bass2=bass)}return{boom:bass,boom2:bass2,chick:chick}}}}function chordNotes(bass,modifier){var intervals=chordIntervals[modifier];intervals||(intervals=chordIntervals.M),bass+=12;for(var notes=[],i=0;i<intervals.length;i++)notes.push(bass+intervals[i]);return notes}function writeBoom(boom,beatLength){void 0!==boom&&chordTrack.push({cmd:"start",pitch:boom,volume:64}),chordTrack.push({cmd:"move",duration:beatLength/2*tempoChangeFactor}),void 0!==boom&&chordTrack.push({cmd:"stop",pitch:boom}),chordTrack.push({cmd:"move",duration:beatLength/2*tempoChangeFactor})}function writeChick(chick,beatLength){for(var c=0;c<chick.length;c++)chordTrack.push({cmd:"start",pitch:chick[c],volume:48});for(chordTrack.push({cmd:"move",duration:beatLength/2*tempoChangeFactor}),c=0;c<chick.length;c++)chordTrack.push({cmd:"stop",pitch:chick[c]});chordTrack.push({cmd:"move",duration:beatLength/2*tempoChangeFactor})}function resolveChords(){var num=meter.num,den=meter.den,beatLength=1/den,pattern=rhythmPatterns[num+"/"+den],thisMeasureLength=parseInt(num,10)/parseInt(den,10),portionOfAMeasure=Math.abs(thisMeasureLength-barBeat);if(!pattern||portionOfAMeasure>.0078125){pattern=[];for(var beatsPresent=barBeat/beatLength,p=0;p<beatsPresent;p++)pattern.push("chick")}if(0===currentChords.length&&currentChords.push({beat:0,chord:lastChord}),0!==currentChords[0].beat&&lastChord&&currentChords.unshift({beat:0,chord:lastChord}),1!==currentChords.length){for(var beats={},i=0;i<currentChords.length;i++){var cc=currentChords[i],beat=Math.floor(cc.beat/beatLength);beats[""+beat]=cc}for(var m2=0;m2<pattern.length;m2++){var thisChord;switch(beats[""+m2]&&(thisChord=beats[""+m2]),pattern[m2]){case"boom":beats[""+(m2+1)]?writeChick(thisChord.chord.chick,beatLength):writeBoom(thisChord.chord.boom,beatLength);break;case"boom2":beats[""+(m2+1)]?writeChick(thisChord.chord.chick,beatLength):writeBoom(thisChord.chord.boom2,beatLength);break;case"chick":writeChick(thisChord.chord.chick,beatLength);break;case"":beats[""+m2]?writeChick(thisChord.chord.chick,beatLength):chordTrack.push({cmd:"move",duration:beatLength*tempoChangeFactor})}}}else for(var m=0;m<pattern.length;m++)switch(pattern[m]){case"boom":writeBoom(currentChords[0].chord.boom,beatLength);break;case"boom2":writeBoom(currentChords[0].chord.boom2,beatLength);break;case"chick":writeChick(currentChords[0].chord.chick,beatLength);break;case"":chordTrack.push({cmd:"move",duration:beatLength*tempoChangeFactor})}}function normalizeDrumDefinition(params){if(0===params.pattern.length||params.on===!1)return{on:!1};for(var str=params.pattern[0],events=[],event="",totalPlay=0,i=0;i<str.length;i++)if("d"===str[i]&&totalPlay++,"d"===str[i]||"z"===str[i])0!==event.length?(events.push(event),event=str[i]):event+=str[i];else{if(0===event.length)return{on:!1};event+=str[i]}if(0!==event.length&&events.push(event),params.pattern.length!==2*totalPlay+1)return{on:!1};for(var ret={on:!0,bars:params.bars,pattern:[]},beatLength=1/meter.den,playCount=0,j=0;j<events.length;j++){event=events[j];for(var len=1,div=!1,num=0,k=1;k<event.length;k++)switch(event[k]){case"/":0!==num&&(len*=num),num=0,div=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":num=10*num+event[k];break;default:return{on:!1}}div?(0===num&&(num=2),len/=num):num&&(len*=num),"d"===event[0]?(ret.pattern.push({len:len*beatLength,pitch:params.pattern[1+playCount],velocity:params.pattern[1+playCount+totalPlay]}),playCount++):ret.pattern.push({len:len*beatLength,pitch:null})}for(var totalTime=0,measuresPerBeat=meter.num/meter.den,ii=0;ii<ret.pattern.length;ii++)totalTime+=ret.pattern[ii].len;var numBars=params.bars?params.bars:1,factor=totalTime/numBars/measuresPerBeat;for(ii=0;ii<ret.pattern.length;ii++)ret.pattern[ii].len=ret.pattern[ii].len/factor;return ret}function drumBeat(pitch,soundLength,volume){drumTrack.push({cmd:"start",pitch:pitch-60,volume:volume}),drumTrack.push({cmd:"move",duration:soundLength}),drumTrack.push({cmd:"stop",pitch:pitch-60})}function writeDrum(){if(0!==drumTrack.length||drumDefinition.on){var measureLen=meter.num/meter.den;if(0===drumTrack.length){drumTrack.push({cmd:"channel",channel:10}),drumTrack.push({cmd:"instrument",instrument:10});var distance=timeFromStart();if(distance>0&&distance<measureLen-.01)return void drumTrack.push({cmd:"move",duration:distance*tempoChangeFactor})}if(!drumDefinition.on)return void drumTrack.push({cmd:"move",duration:measureLen*tempoChangeFactor});for(var i=0;i<drumDefinition.pattern.length;i++){var len=drumDefinition.pattern[i].len*tempoChangeFactor;drumDefinition.pattern[i].pitch?drumBeat(drumDefinition.pattern[i].pitch,len,drumDefinition.pattern[i].velocity):drumTrack.push({cmd:"move",duration:len})}}}var barAccidentals,accidentals,transpose,bagpipes,multiplier,tracks,startingTempo,startingMeter,instrument,channel,currentTrack,pitchesTied,lastNoteDurationPosition,chordTrack,chordTrackFinished,currentChords,lastChord,barBeat,drumTrack,drumTrackFinished,tempoChangeFactor=1,meter={num:4,den:4},drumDefinition={},normalBreakBetweenNotes=1/128;window.ABCJS.midi.flatten=function(voices,options){options||(options={}),barAccidentals=[],accidentals=[0,0,0,0,0,0,0],bagpipes=!1,multiplier=1,tracks=[],startingTempo=void 0,startingMeter=void 0,tempoChangeFactor=1,instrument=void 0,channel=void 0,currentTrack=void 0,pitchesTied={},meter={num:4,den:4},chordTrack=[],chordTrackFinished=!1,currentChords=[],lastChord=void 0,barBeat=0,drumTrack=[],drumTrackFinished=!1,drumDefinition={};for(var i=0;i<voices.length;i++){transpose=0,lastNoteDurationPosition=-1;var voice=voices[i];currentTrack=[],pitchesTied={};for(var j=0;j<voice.length;j++){var element=voice[j];switch(element.el_type){case"note":writeNote(element,options.voicesOff);break;case"key":accidentals=setKeySignature(element);break;case"meter":startingMeter||(startingMeter=element),meter=element;break;case"tempo":startingTempo?tempoChangeFactor=element.qpm?startingTempo/element.qpm:1:startingTempo=element.qpm;break;case"transpose":transpose=element.transpose;break;case"bar":chordTrack.length>0&&(resolveChords(),currentChords=[]),barBeat=0,barAccidentals=[],0===i&&writeDrum();break;case"bagpipes":bagpipes=!0;break;case"instrument":instrument=element.program;break;case"channel":channel=element.channel;break;case"drum":drumDefinition=normalizeDrumDefinition(element.params);break;default:console.log("MIDI creation. Unknown el_type: "+element.el_type+"\n")}}tracks.push(currentTrack),chordTrack.length>0&&(chordTrackFinished=!0),drumTrack.length>0&&(drumTrackFinished=!0)}chordTrack.length>0&&tracks.push(chordTrack),drumTrack.length>0&&tracks.push(drumTrack);var num=parseInt(startingMeter.num,10),den=parseInt(startingMeter.den,10);return 2===den?startingTempo*=2:8===den?parseInt(num,10)%3===0?startingTempo*=1.5:startingTempo/=2:16===den&&(num%3===0?startingTempo*=.75:startingTempo/=4),{tempo:startingTempo,instrument:instrument,channel:channel,tracks:tracks}};var breakSynonyms=["break","(break)","no chord","n.c.","tacet"],scale=[0,2,4,5,7,9,11],graceDivider=8,basses={A:-27,B:-25,C:-24,D:-22,E:-20,F:-19,G:-17},chordIntervals={M:[0,4,7],6:[0,4,7,9],7:[0,4,7,10],"+7":[0,4,8,10],aug7:[0,4,8,10],maj7:[0,4,7,11],"∆7":[0,4,7,11],9:[0,4,7,10,14],11:[0,4,7,10,14,16],13:[0,4,7,10,14,18],"+":[0,4,8],"7#5":[0,4,8,10],"7+5":[0,4,8,10],"7b9":[0,4,7,10,13],"7b5":[0,4,6,10],"9#5":[0,4,8,10,14],"9+5":[0,4,8,10,14],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],dim:[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"ø7":[0,3,6,9],"7sus4":[0,5,7,10],m7sus4:[0,5,7,10],sus4:[0,5,7]},rhythmPatterns={"2/2":["boom","chick"],"2/4":["boom","chick"],"3/4":["boom","chick","chick"],"4/4":["boom","chick","boom2","chick"],"6/8":["boom","","chick","boom2","","chick"]}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.midi||(window.ABCJS.midi={}),function(){"use strict";function addAbsoluteTime(tracks){for(var i=0;i<tracks.length;i++)for(var absTime=0,j=0;j<tracks[i].length;j++)absTime+=tracks[i][j][1],tracks[i][j].absTime=absTime}function combineTracks(tracks){for(var output=[],i=0;i<tracks.length;i++)for(var j=0;j<tracks[i].length;j++)output.push(tracks[i][j]);return output}function sortTracks(output){return output.sort(function(a,b){return a.absTime>b.absTime?1:-1})}function adjustTime(output){for(var lastTime=0,i=0;i<output.length;i++){var thisTime=output[i].absTime;output[i][1]=thisTime-lastTime,lastTime=thisTime}}function weaveTracks(tracks){addAbsoluteTime(tracks);var output=combineTracks(tracks);return output=sortTracks(output),adjustTime(output),output}window.ABCJS.midi.Preparer=function(){this.tempo=0,this.timeFactor=0,this.output=[],this.currentChannel=0,this.currentInstrument=0,this.track=0,this.nextDuration=0,this.tracks=[[]]};var Preparer=window.ABCJS.midi.Preparer;Preparer.prototype.setInstrument=function(instrument){var ev=[{ticksToEvent:0,track:this.track,event:{channel:this.currentChannel,deltaTime:0,programNumber:this.currentInstrument,subtype:"programChange",type:"channel"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(ev)},Preparer.prototype.setChannel=function(channel){},Preparer.prototype.startTrack=function(){this.track++,this.tracks[this.track]=[],this.nextDuration=0},Preparer.prototype.setGlobalInfo=function(tempo,title){this.tempo=tempo;var mspb=Math.round(1/tempo*6e7);this.timeFactor=mspb/48e4;var ev=[{ticksToEvent:0,track:this.track,event:{deltaTime:0,microsecondsPerBeat:mspb,subtype:"setTempo",type:"meta"}},this.nextDuration*this.timeFactor];ev=[{ticksToEvent:0,track:this.track,event:{deltaTime:0,subtype:"trackName",text:title,type:"meta"}},this.nextDuration*this.timeFactor],ev=[{ticksToEvent:0,track:this.track,event:{deltaTime:0,subtype:"endOfTrack",type:"meta"}},this.nextDuration*this.timeFactor]},Preparer.prototype.startNote=function(pitch,volume){var deltaTime=5*Math.floor(this.nextDuration/5),ev=[{ticksToEvent:deltaTime,track:this.track,event:{deltaTime:deltaTime,channel:this.currentChannel,type:"channel",noteNumber:pitch,velocity:volume,subtype:"noteOn"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(ev),this.nextDuration=0},Preparer.prototype.endNote=function(pitch){var deltaTime=5*Math.floor(this.nextDuration/5),ev=[{ticksToEvent:deltaTime,track:this.track,event:{deltaTime:deltaTime,channel:this.currentChannel,type:"channel",noteNumber:pitch,velocity:0,subtype:"noteOff"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(ev),this.nextDuration=0},Preparer.prototype.addRest=function(duration){this.nextDuration+=duration},Preparer.prototype.endTrack=function(){[{ticksToEvent:0,track:this.track,event:{deltaTime:0,type:"meta",subtype:"endOfTrack"}},0]},Preparer.prototype.getData=function(){return weaveTracks(this.tracks)}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.midi||(window.ABCJS.midi={}),function(){"use strict";function setAttributes(elm,attrs){for(var attr in attrs)attrs.hasOwnProperty(attr)&&elm.setAttribute(attr,attrs[attr]);return elm}function Midi(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90"}function encodeHex(s){for(var ret="",i=0;i<s.length;i+=2)ret+="%",ret+=s.substr(i,2);return ret}function toHex(n,padding){for(var s=n.toString(16);s.length<padding;)s="0"+s;return encodeHex(s)}function toDurationHex(n){for(var res=0,a=[];0!==n;)a.push(127&n),n>>=7;for(var i=a.length-1;i>=0;i--){res<<=8;var bits=a[i];0!==i&&(bits|=128),res|=bits}var padding=res.toString(16).length;return padding+=padding%2,toHex(res,padding)}Midi.prototype.setTempo=function(qpm){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+toHex(Math.round(6e7/qpm),6),this.endTrack())},Midi.prototype.setGlobalInfo=function(qpm,name){if(0===this.trackcount){if(this.startTrack(),this.track+="%00%FF%51%03"+toHex(Math.round(6e7/qpm),6),name){this.track+="%00%FF%03"+toHex(name.length,2);for(var i=0;i<name.length;i++)this.track+=toHex(name.charCodeAt(i),2)}this.endTrack()}},Midi.prototype.startTrack=function(){this.track="",this.silencelength=0,this.trackcount++,this.first=!0,this.instrument&&this.setInstrument(this.instrument)},Midi.prototype.endTrack=function(){var tracklength=toHex(this.track.length/3+4,8);this.track="MTrk"+tracklength+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},Midi.prototype.setInstrument=function(number){this.track?this.track="%00%C0"+toHex(number,2)+this.track:this.track="%00%C0"+toHex(number,2),this.instrument=number},Midi.prototype.setChannel=function(number){this.channel=number-1,this.noteOnAndChannel="%9"+this.channel.toString(16)},Midi.prototype.startNote=function(pitch,loudness){this.track+=toDurationHex(this.silencelength),this.silencelength=0,this.first&&(this.first=!1,this.track+=this.noteOnAndChannel),this.track+="%"+pitch.toString(16)+toHex(loudness,2)},Midi.prototype.endNote=function(pitch,length){this.track+=toDurationHex(this.silencelength+length),this.silencelength=0,this.track+="%"+pitch.toString(16)+"%00"},Midi.prototype.addRest=function(length){this.silencelength+=length},Midi.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+toHex(this.trackcount,4)+"%01%e0"+this.trackstrings},Midi.prototype.embed=function(parent,noplayer){var data=this.getData(),link=setAttributes(document.createElement("a"),{href:data});if(link.innerHTML="download midi",parent.insertBefore(link,parent.firstChild),!noplayer){var embed=setAttributes(document.createElement("embed"),{src:data,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});parent.insertBefore(embed,parent.firstChild)}},window.ABCJS.midi.rendererFactory=function(){return new Midi}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.midi||(window.ABCJS.midi={}),function(){"use strict";function interpretTempo(element){var duration=.25;element.duration&&(duration=element.duration[0]);var bpm=60;return element.bpm&&(bpm=element.bpm),bpm*duration*4}function interpretMeter(element){var meter;switch(element.type){case"common_time":meter={el_type:"meter",num:4,den:4};break;case"cut_time":meter={el_type:"meter",num:2,den:2};break;case"specified":meter={el_type:"meter",num:element.value[0].num,den:element.value[0].den};break;default:meter={el_type:"meter"}}return measureLength=meter.num/meter.den,meter}var measureLength;window.ABCJS.midi.sequence=function(abctune,options){options=options||{};var qpm=180,program=options.program||0,transpose=options.transpose||0,channel=options.channel||0,drumPattern=options.drum||"",drumBars=options.drumBars||1,drumIntro=options.drumIntro||0,drumOn=""!==drumPattern;program=parseInt(program,10),transpose=parseInt(transpose,10),channel=parseInt(channel,10),drumPattern=drumPattern.split(" "),drumBars=parseInt(drumBars,10),drumIntro=parseInt(drumIntro,10);var bagpipes=abctune.formatting.bagpipes;if(bagpipes&&(program=71),abctune.formatting.midi){var globals=abctune.formatting.midi;globals.program&&(program=globals.program[0],globals.program.length>1&&(channel=globals.program[1])),globals.transpose&&(transpose=globals.transpose[0]),globals.channel&&(channel=globals.channel[0]),globals.drum&&(drumPattern=globals.drum),globals.drumbars&&(drumBars=globals.drumbars[0]),globals.drumon&&(drumOn=!0)}abctune.metaText.tempo&&(qpm=interpretTempo(abctune.metaText.tempo)),options.qpm&&(qpm=parseInt(options.qpm,10));var startVoice=[];bagpipes&&startVoice.push({el_type:"bagpipes"}),startVoice.push({el_type:"instrument",program:program}),channel&&startVoice.push({el_type:"channel",channel:channel}),transpose&&startVoice.push({el_type:"transpose",transpose:transpose}),startVoice.push({el_type:"tempo",qpm:qpm});for(var voices=[],startRepeatPlaceholder=[],skipEndingPlaceholder=[],startingDrumSet=!1,i=0;i<abctune.lines.length;i++){var line=abctune.lines[i];if(line.staff)for(var staves=line.staff,voiceNumber=0,j=0;j<staves.length;j++)for(var staff=staves[j],k=0;k<staff.voices.length;k++){var voice=staff.voices[k];voices[voiceNumber]||(voices[voiceNumber]=[].concat(startVoice)),staff.key&&("HP"===staff.key.root?voices[voiceNumber].push({el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}):voices[voiceNumber].push({el_type:"key",accidentals:staff.key.accidentals})),staff.meter&&voices[voiceNumber].push(interpretMeter(staff.meter)),!startingDrumSet&&drumOn&&(voices[voiceNumber].push({el_type:"drum",params:{pattern:drumPattern,bars:drumBars,on:drumOn,intro:drumIntro}}),startingDrumSet=!0),staff.clef&&staff.clef.transpose&&(staff.clef.el_type="clef",voices[voiceNumber].push({el_type:"transpose",transpose:staff.clef.transpose})),abctune.formatting.midi&&abctune.formatting.midi.drumoff&&(voices[voiceNumber].push({el_type:"bar"}),voices[voiceNumber].push({el_type:"drum",params:{pattern:"",on:!1}}));for(var noteEventsInBar=0,v=0;v<voice.length;v++){var elem=voice[v];switch(elem.el_type){case"note":elem.rest&&"spacer"===elem.rest.type||(voices[voiceNumber].push(elem),noteEventsInBar++);break;case"key":"HP"===elem.root?voices[voiceNumber].push({el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}):voices[voiceNumber].push({el_type:"key",accidentals:elem.accidentals});break;case"meter":voices[voiceNumber].push(interpretMeter(elem));break;case"clef":elem.transpose&&voices[voiceNumber].push({el_type:"transpose",transpose:elem.transpose});break;case"tempo":qpm=interpretTempo(elem),voices[voiceNumber].push({el_type:"tempo",qpm:qpm});break;case"bar":noteEventsInBar>0&&voices[voiceNumber].push({el_type:"bar"}),noteEventsInBar=0;var endRepeat="bar_right_repeat"===elem.type||"bar_dbl_repeat"===elem.type,startEnding="1"===elem.startEnding,startRepeat="bar_left_repeat"===elem.type||"bar_dbl_repeat"===elem.type||"bar_thick_thin"===elem.type||"bar_thin_thick"===elem.type||"bar_thin_thin"===elem.type||"bar_right_repeat"===elem.type;if(endRepeat){var s=startRepeatPlaceholder[voiceNumber];s||(s=0);var e=skipEndingPlaceholder[voiceNumber];e||(e=voices[voiceNumber].length),voices[voiceNumber]=voices[voiceNumber].concat(voices[voiceNumber].slice(s,e)),skipEndingPlaceholder[voiceNumber]=void 0,startRepeatPlaceholder[voiceNumber]=void 0}startEnding&&(skipEndingPlaceholder[voiceNumber]=voices[voiceNumber].length),startRepeat&&(startRepeatPlaceholder[voiceNumber]=voices[voiceNumber].length);break;case"style":break;case"part":break;case"stem":case"scale":break;case"midi":var drumChange=!1;switch(elem.cmd){case"drumon":drumOn=!0,drumChange=!0;break;case"drumoff":drumOn=!1,drumChange=!0;break;case"drum":drumPattern=elem.params,drumChange=!0;break;case"drumbars":drumBars=elem.params[0],drumChange=!0}drumChange&&(voices[0].push({el_type:"drum",params:{pattern:drumPattern,bars:drumBars,intro:drumIntro,on:drumOn}}),startingDrumSet=!0);break;default:console.log("MIDI: element type "+elem.el_type+" not handled.")}}voiceNumber++}}if(drumIntro)for(var vv=0;vv<voices.length;vv++){for(var insertPoint=0;"note"!==voices[vv][insertPoint].el_type&&voices[vv].length>insertPoint;)insertPoint++;if(voices[vv].length>insertPoint)for(var w=0;w<drumIntro;w++)voices[vv].splice(insertPoint,0,{el_type:"note",rest:{type:"rest"},duration:measureLength},{el_type:"bar"})}return voices}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.parse||(window.ABCJS.parse={}),window.ABCJS.parse.clone=function(source){var destination={};for(var property in source)source.hasOwnProperty(property)&&(destination[property]=source[property]);return destination},window.ABCJS.parse.cloneArray=function(source){for(var destination=[],i=0;i<source.length;i++)destination.push(ABCJS.parse.clone(source[i]));return destination},window.ABCJS.parse.cloneHashOfHash=function(source){var destination={};for(var property in source)source.hasOwnProperty(property)&&(destination[property]=ABCJS.parse.clone(source[property]));return destination},window.ABCJS.parse.cloneHashOfArrayOfHash=function(source){var destination={};for(var property in source)source.hasOwnProperty(property)&&(destination[property]=ABCJS.parse.cloneArray(source[property]));return destination},window.ABCJS.parse.gsub=function(source,pattern,replacement){return source.split(pattern).join(replacement)},window.ABCJS.parse.strip=function(str){return str.replace(/^\s+/,"").replace(/\s+$/,"")},window.ABCJS.parse.startsWith=function(str,pattern){return 0===str.indexOf(pattern)},window.ABCJS.parse.endsWith=function(str,pattern){var d=str.length-pattern.length;return d>=0&&str.lastIndexOf(pattern)===d},window.ABCJS.parse.each=function(arr,iterator,context){for(var i=0,length=arr.length;i<length;i++)iterator.apply(context,[arr[i],i])},window.ABCJS.parse.last=function(arr){return 0===arr.length?null:arr[arr.length-1]},window.ABCJS.parse.compact=function(arr){for(var output=[],i=0;i<arr.length;i++)arr[i]&&output.push(arr[i]);return output},window.ABCJS.parse.detect=function(arr,iterator){for(var i=0;i<arr.length;i++)if(iterator(arr[i]))return!0;return!1},window.ABCJS||(window.ABCJS={}),window.ABCJS.parse||(window.ABCJS.parse={}),window.ABCJS.parse.Parse=function(){"use strict";function addPositioning(el,type,value){el.positioning||(el.positioning={}),el.positioning[type]=value}function addFont(el,type,value){el.fonts||(el.fonts={}),el.fonts[type]=value}function startNewLine(){var params={startChar:-1,endChar:-1};if(multilineVars.partForNextLine.length&&(params.part=multilineVars.partForNextLine),params.clef=multilineVars.currentVoice&&void 0!==multilineVars.staves[multilineVars.currentVoice.staffNum].clef?window.ABCJS.parse.clone(multilineVars.staves[multilineVars.currentVoice.staffNum].clef):window.ABCJS.parse.clone(multilineVars.clef),params.key=window.ABCJS.parse.parseKeyVoice.deepCopyKey(multilineVars.key),window.ABCJS.parse.parseKeyVoice.addPosToKey(params.clef,params.key),null!==multilineVars.meter?(multilineVars.currentVoice?(window.ABCJS.parse.each(multilineVars.staves,function(st){st.meter=multilineVars.meter}),params.meter=multilineVars.staves[multilineVars.currentVoice.staffNum].meter,multilineVars.staves[multilineVars.currentVoice.staffNum].meter=null):params.meter=multilineVars.meter,multilineVars.meter=null):multilineVars.currentVoice&&multilineVars.staves[multilineVars.currentVoice.staffNum].meter&&(params.meter=multilineVars.staves[multilineVars.currentVoice.staffNum].meter,multilineVars.staves[multilineVars.currentVoice.staffNum].meter=null),multilineVars.currentVoice&&multilineVars.currentVoice.name&&(params.name=multilineVars.currentVoice.name),multilineVars.vocalfont&&(params.vocalfont=multilineVars.vocalfont),multilineVars.style&&(params.style=multilineVars.style),multilineVars.currentVoice){var staff=multilineVars.staves[multilineVars.currentVoice.staffNum];staff.brace&&(params.brace=staff.brace),staff.bracket&&(params.bracket=staff.bracket),staff.connectBarLines&&(params.connectBarLines=staff.connectBarLines),staff.name&&(params.name=staff.name[multilineVars.currentVoice.index]),staff.subname&&(params.subname=staff.subname[multilineVars.currentVoice.index]),multilineVars.currentVoice.stem&&(params.stem=multilineVars.currentVoice.stem),multilineVars.currentVoice.scale&&(params.scale=multilineVars.currentVoice.scale),multilineVars.currentVoice.style&&(params.style=multilineVars.currentVoice.style),multilineVars.currentVoice.transpose&&(params.clef.transpose=multilineVars.currentVoice.transpose)}var isFirstVoice=void 0===multilineVars.currentVoice||0===multilineVars.currentVoice.staffNum&&0===multilineVars.currentVoice.index;
+0===multilineVars.barNumbers&&isFirstVoice&&1!==multilineVars.currBarNumber&&(params.barNumber=multilineVars.currBarNumber),tune.startNewLine(params),multilineVars.partForNextLine=""}function durationOfMeasure(multilineVars){var meter=multilineVars.origMeter;return meter&&"specified"===meter.type&&meter.value&&0!==meter.value.length?parseInt(meter.value[0].num,10)/parseInt(meter.value[0].den,10):1}function appendLastMeasure(voice,nextVoice){voice.push({el_type:"hint"});for(var i=0;i<nextVoice.length;i++){var element=nextVoice[i],hint=window.ABCJS.parse.clone(element);if(voice.push(hint),"bar"===element.el_type)return}}function addHintMeasure(staff,nextStaff){for(var i=0;i<staff.length;i++){var stave=staff[i],nextStave=nextStaff[i];if(nextStave)for(var j=0;j<nextStave.voices.length;j++){var nextVoice=nextStave.voices[j],voice=stave.voices[j];voice&&appendLastMeasure(voice,nextVoice)}}}function addHintMeasures(){for(var i=0;i<tune.lines.length;i++){var line=tune.lines[i].staff;if(line){for(var j=i+1;j<tune.lines.length&&void 0===tune.lines[j].staff;)j++;if(j<tune.lines.length){var nextLine=tune.lines[j].staff;addHintMeasure(line,nextLine)}}}}var tune=new window.ABCJS.data.Tune,tokenizer=new window.ABCJS.parse.tokenizer;this.getTune=function(){return tune};var multilineVars={reset:function(){for(var property in this)this.hasOwnProperty(property)&&"function"!=typeof this[property]&&delete this[property];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter={type:"specified",value:[{num:"4",den:"4"}]},this.origMeter={type:"specified",value:[{num:"4",den:"4"}]},this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.is_in_history=!1,this.partForNextLine="",this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.inTextBlock=!1,this.inPsBlock=!1,this.ignoredDecorations=[],this.textBlock="",this.score_is_present=!1,this.inEnding=!1,this.inTie=!1,this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[]},differentFont:function(type,defaultFonts){return this[type].decoration!==defaultFonts[type].decoration||(this[type].face!==defaultFonts[type].face||(this[type].size!==defaultFonts[type].size||(this[type].style!==defaultFonts[type].style||this[type].weight!==defaultFonts[type].weight)))},addFormattingOptions:function(el,defaultFonts,elType){"note"===elType?("auto"!==this.vocalPosition&&addPositioning(el,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&addPositioning(el,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&addPositioning(el,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&addPositioning(el,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&addPositioning(el,"volumePosition",this.volumePosition),this.differentFont("annotationfont",defaultFonts)&&addFont(el,"annotationfont",this.annotationfont),this.differentFont("gchordfont",defaultFonts)&&addFont(el,"gchordfont",this.gchordfont),this.differentFont("vocalfont",defaultFonts)&&addFont(el,"vocalfont",this.vocalfont)):"bar"===elType&&("auto"!==this.dynamicPosition&&addPositioning(el,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&addPositioning(el,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&addPositioning(el,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&addPositioning(el,"volumePosition",this.volumePosition),this.differentFont("measurefont",defaultFonts)&&addFont(el,"measurefont",this.measurefont),this.differentFont("repeatfont",defaultFonts)&&addFont(el,"repeatfont",this.repeatfont))}},addWarning=function(str){multilineVars.warnings||(multilineVars.warnings=[]),multilineVars.warnings.push(str)},encode=function(str){var ret=window.ABCJS.parse.gsub(str,""," ");return ret=window.ABCJS.parse.gsub(ret,"&","&amp;"),ret=window.ABCJS.parse.gsub(ret,"<","&lt;"),window.ABCJS.parse.gsub(ret,">","&gt;")},warn=function(str,line,col_num){line||(line=" ");var bad_char=line.charAt(col_num);" "===bad_char&&(bad_char="SPACE");var clean_line=encode(line.substring(0,col_num))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+bad_char+"</span>"+encode(line.substring(col_num+1));addWarning("Music Line:"+tune.getNumLines()+":"+(col_num+1)+": "+str+": "+clean_line)},header=new window.ABCJS.parse.ParseHeader(tokenizer,warn,multilineVars,tune);this.getWarnings=function(){return multilineVars.warnings};var letter_to_chord=function(line,i){if('"'===line.charAt(i)){var chord=tokenizer.getBrackettedSubstring(line,i,5);if(chord[2]||warn("Missing the closing quote while parsing the chord symbol",line,i),chord[0]>0&&chord[1].length>0&&"^"===chord[1].charAt(0))chord[1]=chord[1].substring(1),chord[2]="above";else if(chord[0]>0&&chord[1].length>0&&"_"===chord[1].charAt(0))chord[1]=chord[1].substring(1),chord[2]="below";else if(chord[0]>0&&chord[1].length>0&&"<"===chord[1].charAt(0))chord[1]=chord[1].substring(1),chord[2]="left";else if(chord[0]>0&&chord[1].length>0&&">"===chord[1].charAt(0))chord[1]=chord[1].substring(1),chord[2]="right";else if(chord[0]>0&&chord[1].length>0&&"@"===chord[1].charAt(0)){chord[1]=chord[1].substring(1);var x=tokenizer.getFloat(chord[1]);0===x.digits&&warn("Missing first position in absolutely positioned annotation.",line,i),chord[1]=chord[1].substring(x.digits),","!==chord[1][0]&&warn("Missing comma absolutely positioned annotation.",line,i),chord[1]=chord[1].substring(1);var y=tokenizer.getFloat(chord[1]);0===y.digits&&warn("Missing second position in absolutely positioned annotation.",line,i),chord[1]=chord[1].substring(y.digits);var ws=tokenizer.skipWhiteSpace(chord[1]);chord[1]=chord[1].substring(ws),chord[2]=null,chord[3]={x:x.value,y:y.value}}else chord[1]=chord[1].replace(/([ABCDEFG])b/g,"$1♭"),chord[1]=chord[1].replace(/([ABCDEFG])#/g,"$1♯"),chord[2]="default";return chord}return[0,""]},legalAccents=["trill","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","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"],volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)"],accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],letter_to_accent=function(line,i){var macro=multilineVars.macros[line.charAt(i)];if(void 0!==macro)return"!"!==macro.charAt(0)&&"+"!==macro.charAt(0)||(macro=macro.substring(1)),"!"!==macro.charAt(macro.length-1)&&"+"!==macro.charAt(macro.length-1)||(macro=macro.substring(0,macro.length-1)),window.ABCJS.parse.detect(legalAccents,function(acc){return macro===acc})?[1,macro]:window.ABCJS.parse.detect(volumeDecorations,function(acc){return macro===acc})?("hidden"===multilineVars.volumePosition&&(macro=""),[1,macro]):window.ABCJS.parse.detect(dynamicDecorations,function(acc){return"hidden"===multilineVars.dynamicPosition&&(macro=""),macro===acc})?[1,macro]:(window.ABCJS.parse.detect(multilineVars.ignoredDecorations,function(dec){return macro===dec})||warn("Unknown macro: "+macro,line,i),[1,""]);switch(line.charAt(i)){case".":return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var ret=tokenizer.getBrackettedSubstring(line,i,5);return ret[1].length>0&&("^"===ret[1].charAt(0)||"_"===ret[1].charAt(0))&&(ret[1]=ret[1].substring(1)),window.ABCJS.parse.detect(legalAccents,function(acc){return ret[1]===acc})?ret:window.ABCJS.parse.detect(volumeDecorations,function(acc){return ret[1]===acc})?("hidden"===multilineVars.volumePosition&&(ret[1]=""),ret):window.ABCJS.parse.detect(dynamicDecorations,function(acc){return ret[1]===acc})?("hidden"===multilineVars.dynamicPosition&&(ret[1]=""),ret):window.ABCJS.parse.detect(accentPseudonyms,function(acc){return ret[1]===acc[0]&&(ret[1]=acc[1],!0)})?ret:window.ABCJS.parse.detect(accentDynamicPseudonyms,function(acc){return ret[1]===acc[0]&&(ret[1]=acc[1],!0)})?("hidden"===multilineVars.dynamicPosition&&(ret[1]=""),ret):"!"!==line.charAt(i)||1!==ret[0]&&"!"===line.charAt(i+ret[0]-1)?(warn("Unknown decoration: "+ret[1],line,i),ret[1]="",ret):[1,null];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"]}return[0,0]},letter_to_spacer=function(line,i){for(var start=i;tokenizer.isWhiteSpace(line.charAt(i));)i++;return[i-start]},letter_to_bar=function(line,curr_pos){var ret=tokenizer.getBarLine(line,curr_pos);if(0===ret.len)return[0,""];if(ret.warn)return warn(ret.warn,line,curr_pos),[ret.len,""];for(var ws=0;ws<line.length&&" "===line.charAt(curr_pos+ret.len+ws);ws++);var orig_bar_len=ret.len;if("["===line.charAt(curr_pos+ret.len+ws)&&(ret.len+=ws+1),'"'===line.charAt(curr_pos+ret.len)&&"["===line.charAt(curr_pos+ret.len-1)){var ending=tokenizer.getBrackettedSubstring(line,curr_pos+ret.len,5);return[ret.len+ending[0],ret.token,ending[1]]}var retRep=tokenizer.getTokenOf(line.substring(curr_pos+ret.len),"1234567890-,");return 0===retRep.len||"-"===retRep.token[0]?[orig_bar_len,ret.token]:[ret.len+retRep.len,ret.token,retRep.token]},letter_to_open_slurs_and_triplets=function(line,i){for(var ret={},start=i;"("===line.charAt(i)||tokenizer.isWhiteSpace(line.charAt(i));)"("===line.charAt(i)&&(i+1<line.length&&line.charAt(i+1)>="2"&&line.charAt(i+1)<="9"?(void 0!==ret.triplet?warn("Can't nest triplets",line,i):(ret.triplet=line.charAt(i+1)-"0",i+2<line.length&&":"===line.charAt(i+2)&&(i+3<line.length&&":"===line.charAt(i+3)?i+4<line.length&&line.charAt(i+4)>="1"&&line.charAt(i+4)<="9"?(ret.num_notes=line.charAt(i+4)-"0",i+=3):warn("expected number after the two colons after the triplet to mark the duration",line,i):i+3<line.length&&line.charAt(i+3)>="1"&&line.charAt(i+3)<="9"?i+4<line.length&&":"===line.charAt(i+4)?i+5<line.length&&line.charAt(i+5)>="1"&&line.charAt(i+5)<="9"&&(ret.num_notes=line.charAt(i+5)-"0",i+=4):(ret.num_notes=ret.triplet,i+=3):warn("expected number after the triplet to mark the duration",line,i))),i++):void 0===ret.startSlur?ret.startSlur=1:ret.startSlur++),i++;return ret.consumed=i-start,ret},addWords=function(line,words){if(!line)return void warn("Can't add words before the first line of music",line,0);words=window.ABCJS.parse.strip(words),"-"!==words.charAt(words.length-1)&&(words+=" ");for(var word_list=[],last_divider=0,replace=!1,addWord=function(i){var word=window.ABCJS.parse.strip(words.substring(last_divider,i));if(last_divider=i+1,word.length>0){replace&&(word=window.ABCJS.parse.gsub(word,"~"," "));var div=words.charAt(i);return"_"!==div&&"-"!==div&&(div=" "),word_list.push({syllable:tokenizer.translateString(word),divider:div}),replace=!1,!0}return!1},i=0;i<words.length;i++)switch(words.charAt(i)){case" ":case"":addWord(i);break;case"-":!addWord(i)&&word_list.length>0&&(window.ABCJS.parse.last(word_list).divider="-",word_list.push({skip:!0,to:"next"}));break;case"_":addWord(i),word_list.push({skip:!0,to:"slur"});break;case"*":addWord(i),word_list.push({skip:!0,to:"next"});break;case"|":addWord(i),word_list.push({skip:!0,to:"bar"});break;case"~":replace=!0}var inSlur=!1;window.ABCJS.parse.each(line,function(el){if(0!==word_list.length)if(word_list[0].skip)switch(word_list[0].to){case"next":"note"!==el.el_type||null===el.pitches||inSlur||word_list.shift();break;case"slur":"note"===el.el_type&&null!==el.pitches&&word_list.shift();break;case"bar":"bar"===el.el_type&&word_list.shift()}else if("note"===el.el_type&&void 0===el.rest&&!inSlur){var lyric=word_list.shift();void 0===el.lyric?el.lyric=[lyric]:el.lyric.push(lyric)}})},addSymbols=function(line,words){if(!line)return void warn("Can't add symbols before the first line of music",line,0);words=window.ABCJS.parse.strip(words),"-"!==words.charAt(words.length-1)&&(words+=" ");for(var word_list=[],last_divider=0,replace=!1,addWord=function(i){var word=window.ABCJS.parse.strip(words.substring(last_divider,i));if(last_divider=i+1,word.length>0){replace&&(word=window.ABCJS.parse.gsub(word,"~"," "));var div=words.charAt(i);return"_"!==div&&"-"!==div&&(div=" "),word_list.push({syllable:tokenizer.translateString(word),divider:div}),replace=!1,!0}return!1},i=0;i<words.length;i++)switch(words.charAt(i)){case" ":case"":addWord(i);break;case"-":!addWord(i)&&word_list.length>0&&(window.ABCJS.parse.last(word_list).divider="-",word_list.push({skip:!0,to:"next"}));break;case"_":addWord(i),word_list.push({skip:!0,to:"slur"});break;case"*":addWord(i),word_list.push({skip:!0,to:"next"});break;case"|":addWord(i),word_list.push({skip:!0,to:"bar"});break;case"~":replace=!0}var inSlur=!1;window.ABCJS.parse.each(line,function(el){if(0!==word_list.length)if(word_list[0].skip)switch(word_list[0].to){case"next":"note"!==el.el_type||null===el.pitches||inSlur||word_list.shift();break;case"slur":"note"===el.el_type&&null!==el.pitches&&word_list.shift();break;case"bar":"bar"===el.el_type&&word_list.shift()}else if("note"===el.el_type&&void 0===el.rest&&!inSlur){var lyric=word_list.shift();void 0===el.lyric?el.lyric=[lyric]:el.lyric.push(lyric)}})},getBrokenRhythm=function(line,index){switch(line.charAt(index)){case">":return index<line.length-1&&">"===line.charAt(index+1)?[2,1.75,.25]:[1,1.5,.5];case"<":return index<line.length-1&&"<"===line.charAt(index+1)?[2,.25,1.75]:[1,.5,1.5]}return null},addEndBeam=function(el){return void 0!==el.duration&&el.duration<.25&&(el.end_beam=!0),el},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},rests={x:"invisible",y:"spacer",z:"rest",Z:"multimeasure"},getCoreNote=function(line,index,el,canHaveBrokenRhythm){for(var isComplete=function(state){return"octave"===state||"duration"===state||"Zduration"===state||"broken_rhythm"===state||"end_slur"===state},state="startSlur",durationSetByPreviousNote=!1;;){switch(line.charAt(index)){case"(":if("startSlur"!==state)return isComplete(state)?(el.endChar=index,el):null;void 0===el.startSlur?el.startSlur=1:el.startSlur++;break;case")":if(!isComplete(state))return null;void 0===el.endSlur?el.endSlur=1:el.endSlur++;break;case"^":if("startSlur"===state)el.accidental="sharp",state="sharp2";else{if("sharp2"!==state)return isComplete(state)?(el.endChar=index,el):null;el.accidental="dblsharp",state="pitch"}break;case"_":if("startSlur"===state)el.accidental="flat",state="flat2";else{if("flat2"!==state)return isComplete(state)?(el.endChar=index,el):null;el.accidental="dblflat",state="pitch"}break;case"=":if("startSlur"!==state)return isComplete(state)?(el.endChar=index,el):null;el.accidental="natural",state="pitch";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("startSlur"!==state&&"sharp2"!==state&&"flat2"!==state&&"pitch"!==state)return isComplete(state)?(el.endChar=index,el):null;el.pitch=pitches[line.charAt(index)],state="octave",canHaveBrokenRhythm&&0!==multilineVars.next_note_duration?(el.duration=multilineVars.default_length*multilineVars.next_note_duration,multilineVars.next_note_duration=0,durationSetByPreviousNote=!0):el.duration=multilineVars.default_length;break;case",":if("octave"!==state)return isComplete(state)?(el.endChar=index,el):null;el.pitch-=7;break;case"'":if("octave"!==state)return isComplete(state)?(el.endChar=index,el):null;el.pitch+=7;break;case"x":case"y":case"z":case"Z":if("startSlur"!==state)return isComplete(state)?(el.endChar=index,el):null;el.rest={type:rests[line.charAt(index)]},delete el.accidental,delete el.startSlur,delete el.startTie,delete el.endSlur,delete el.endTie,delete el.end_beam,delete el.grace_notes,"multimeasure"===el.rest.type?(el.duration=1,state="Zduration"):(canHaveBrokenRhythm&&0!==multilineVars.next_note_duration?(el.duration=multilineVars.default_length*multilineVars.next_note_duration,multilineVars.next_note_duration=0,durationSetByPreviousNote=!0):el.duration=multilineVars.default_length,state="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===state||"duration"===state){var fraction=tokenizer.getFraction(line,index);for(el.duration=el.duration*fraction.value,el.endChar=fraction.index;fraction.index<line.length&&(tokenizer.isWhiteSpace(line.charAt(fraction.index))||"-"===line.charAt(fraction.index));)"-"===line.charAt(fraction.index)?el.startTie={}:el=addEndBeam(el),fraction.index++;index=fraction.index-1,state="broken_rhythm"}else if("sharp2"===state)el.accidental="quartersharp",state="pitch";else{if("flat2"!==state){if("Zduration"===state){var num=tokenizer.getNumber(line,index);return el.duration=num.num,el.endChar=num.index,el}return null}el.accidental="quarterflat",state="pitch"}break;case"-":if("startSlur"===state)tune.addTieToLastNote(),el.endTie=!0;else{if("octave"!==state&&"duration"!==state&&"end_slur"!==state)return"broken_rhythm"===state?(el.endChar=index,el):null;if(el.startTie={},durationSetByPreviousNote||!canHaveBrokenRhythm)return tokenizer.isWhiteSpace(line.charAt(index+1))&&addEndBeam(el),el.endChar=index+1,el;state="broken_rhythm"}break;case" ":case"\t":if(!isComplete(state))return null;el.end_beam=!0;do"-"===line.charAt(index)&&(el.startTie={}),index++;while(index<line.length&&(tokenizer.isWhiteSpace(line.charAt(index))||"-"===line.charAt(index)));if(el.endChar=index,durationSetByPreviousNote||!canHaveBrokenRhythm||"<"!==line.charAt(index)&&">"!==line.charAt(index))return el;index--,state="broken_rhythm";break;case">":case"<":if(!isComplete(state))return null;if(!canHaveBrokenRhythm)return el.endChar=index,el;var br2=getBrokenRhythm(line,index);index+=br2[0]-1,multilineVars.next_note_duration=br2[2],el.duration=br2[1]*el.duration,state="end_slur";break;default:return isComplete(state)?(el.endChar=index,el):null}if(index++,index===line.length)return isComplete(state)?(el.endChar=index,el):null}return null},letter_to_grace=function(line,i){if("{"===line.charAt(i)){var gra=tokenizer.getBrackettedSubstring(line,i,1,"}");gra[2]||warn("Missing the closing '}' while parsing grace note",line,i),")"===line[i+gra[0]]&&(gra[0]++,gra[1]+=")");for(var gracenotes=[],ii=0,inTie=!1;ii<gra[1].length;){var acciaccatura=!1;"/"===gra[1].charAt(ii)&&(acciaccatura=!0,ii++);var note=getCoreNote(gra[1],ii,{},!1);null!==note?(note.duration=note.duration/(8*multilineVars.default_length),acciaccatura&&(note.acciaccatura=!0),gracenotes.push(note),inTie&&(note.endTie=!0,inTie=!1),note.startTie&&(inTie=!0),ii=note.endChar,delete note.endChar):(" "===gra[1].charAt(ii)?gracenotes.length>0&&(gracenotes[gracenotes.length-1].end_beam=!0):warn("Unknown character '"+gra[1].charAt(ii)+"' while parsing grace note",line,i),ii++)}if(gracenotes.length)return[gra[0],gracenotes]}return[0]},nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",parseRegularMusicLine=function(line){header.resolveTempo(),multilineVars.is_in_header=!1;for(var i=0,startOfLine=multilineVars.iChar;tokenizer.isWhiteSpace(line.charAt(i))&&i<line.length;)i++;if(i!==line.length&&"%"!==line.charAt(i)){var delayStartNewLine=multilineVars.start_new_line;void 0===multilineVars.continueall?multilineVars.start_new_line=!0:multilineVars.start_new_line=!1;var tripletNotesLeft=0,retHeader=header.letter_to_body_header(line,i);retHeader[0]>0&&(i+=retHeader[0]);for(var el={};i<line.length;){var startI=i;if("%"===line.charAt(i))break;var retInlineHeader=header.letter_to_inline_header(line,i);if(retInlineHeader[0]>0)i+=retInlineHeader[0];else{delayStartNewLine&&(startNewLine(),delayStartNewLine=!1);for(var ret;;)if(ret=tokenizer.eatWhiteSpace(line,i),ret>0&&(i+=ret),i>0&&""===line.charAt(i-1)&&(ret=header.letter_to_body_header(line,i),ret[0]>0&&(i=ret[0],multilineVars.start_new_line=!1)),ret=letter_to_spacer(line,i),ret[0]>0&&(i+=ret[0]),ret=letter_to_chord(line,i),ret[0]>0){el.chord||(el.chord=[]);var chordName=tokenizer.translateString(ret[1]);chordName=chordName.replace(/;/g,"\n");for(var addedChord=!1,ci=0;ci<el.chord.length;ci++)el.chord[ci].position===ret[2]&&(addedChord=!0,el.chord[ci].name+="\n"+chordName);addedChord===!1&&(null===ret[2]&&ret[3]?el.chord.push({name:chordName,rel_position:ret[3]}):el.chord.push({name:chordName,position:ret[2]})),i+=ret[0];var ii=tokenizer.skipWhiteSpace(line.substring(i));ii>0&&(el.force_end_beam_last=!0),i+=ii}else if(ret=nonDecorations.indexOf(line.charAt(i))===-1?letter_to_accent(line,i):[0],ret[0]>0)null===ret[1]?i+1<line.length&&startNewLine():ret[1].length>0&&(0===ret[1].indexOf("style=")?el.style=ret[1].substr(6):(void 0===el.decoration&&(el.decoration=[]),el.decoration.push(ret[1]))),i+=ret[0];else{if(ret=letter_to_grace(line,i),!(ret[0]>0))break;el.gracenotes=ret[1],i+=ret[0]}if(ret=letter_to_bar(line,i),ret[0]>0){void 0!==el.gracenotes&&(el.rest={type:"spacer"},el.duration=.125,multilineVars.addFormattingOptions(el,tune.formatting,"note"),tune.appendElement("note",startOfLine+i,startOfLine+i+ret[0],el),multilineVars.measureNotEmpty=!0,el={});var bar={type:ret[1]};if(0===bar.type.length)warn("Unknown bar type",line,i);else{if(multilineVars.inEnding&&"bar_thin"!==bar.type&&(bar.endEnding=!0,multilineVars.inEnding=!1),ret[2]&&(bar.startEnding=ret[2],multilineVars.inEnding&&(bar.endEnding=!0),multilineVars.inEnding=!0),void 0!==el.decoration&&(bar.decoration=el.decoration),void 0!==el.chord&&(bar.chord=el.chord),bar.startEnding&&void 0===multilineVars.barFirstEndingNum?multilineVars.barFirstEndingNum=multilineVars.currBarNumber:bar.startEnding&&bar.endEnding&&multilineVars.barFirstEndingNum?multilineVars.currBarNumber=multilineVars.barFirstEndingNum:bar.endEnding&&(multilineVars.barFirstEndingNum=void 0),"bar_invisible"!==bar.type&&multilineVars.measureNotEmpty){var isFirstVoice=void 0===multilineVars.currentVoice||0===multilineVars.currentVoice.staffNum&&0===multilineVars.currentVoice.index;isFirstVoice&&(multilineVars.currBarNumber++,multilineVars.barNumbers&&multilineVars.currBarNumber%multilineVars.barNumbers===0&&(bar.barNumber=multilineVars.currBarNumber))}multilineVars.addFormattingOptions(el,tune.formatting,"bar"),tune.appendElement("bar",startOfLine+i,startOfLine+i+ret[0],bar),multilineVars.measureNotEmpty=!1,el={}}i+=ret[0]}else if("&"===line[i])warn("Overlay not yet supported",line,i),i++;else{if(ret=letter_to_open_slurs_and_triplets(line,i),ret.consumed>0&&(void 0!==ret.startSlur&&(el.startSlur=ret.startSlur),void 0!==ret.triplet&&(tripletNotesLeft>0?warn("Can't nest triplets",line,i):(el.startTriplet=ret.triplet,tripletNotesLeft=void 0===ret.num_notes?ret.triplet:ret.num_notes)),i+=ret.consumed),"["===line.charAt(i)){var chordStartChar=i;i++;for(var chordDuration=null,done=!1;!done;){var chordNote=getCoreNote(line,i,{},!1);if(null!==chordNote)chordNote.end_beam&&(el.end_beam=!0,delete chordNote.end_beam),void 0===el.pitches?(el.duration=chordNote.duration,el.pitches=[chordNote]):el.pitches.push(chordNote),delete chordNote.duration,multilineVars.inTieChord[el.pitches.length]&&(chordNote.endTie=!0,multilineVars.inTieChord[el.pitches.length]=void 0),chordNote.startTie&&(multilineVars.inTieChord[el.pitches.length]=!0),i=chordNote.endChar,delete chordNote.endChar;else if(" "===line.charAt(i))warn("Spaces are not allowed in chords",line,i),i++;else{if(i<line.length&&"]"===line.charAt(i)){i++,0!==multilineVars.next_note_duration&&(el.duration=el.duration*multilineVars.next_note_duration,multilineVars.next_note_duration=0),multilineVars.inTie&&(window.ABCJS.parse.each(el.pitches,function(pitch){pitch.endTie=!0}),multilineVars.inTie=!1),tripletNotesLeft>0&&(tripletNotesLeft--,0===tripletNotesLeft&&(el.endTriplet=!0));for(var postChordDone=!1;i<line.length&&!postChordDone;){switch(line.charAt(i)){case" ":case"\t":addEndBeam(el);break;case")":void 0===el.endSlur?el.endSlur=1:el.endSlur++;break;case"-":window.ABCJS.parse.each(el.pitches,function(pitch){pitch.startTie={}}),multilineVars.inTie=!0;break;case">":case"<":var br2=getBrokenRhythm(line,i);i+=br2[0]-1,multilineVars.next_note_duration=br2[2],chordDuration?chordDuration*=br2[1]:chordDuration=br2[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var fraction=tokenizer.getFraction(line,i);chordDuration=fraction.value,i=fraction.index,"-"===line.charAt(i)||")"===line.charAt(i)||" "===line.charAt(i)||"<"===line.charAt(i)||">"===line.charAt(i)?i--:postChordDone=!0;break;default:postChordDone=!0}postChordDone||i++}}else warn("Expected ']' to end the chords",line,i);void 0!==el.pitches&&(null!==chordDuration&&(el.duration=el.duration*chordDuration),multilineVars.addFormattingOptions(el,tune.formatting,"note"),tune.appendElement("note",startOfLine+chordStartChar,startOfLine+i,el),multilineVars.measureNotEmpty=!0,el={}),done=!0}}}else{var el2={},core=getCoreNote(line,i,el2,!0);void 0!==el2.endTie&&(multilineVars.inTie=!0),null!==core&&(void 0!==core.pitch?(el.pitches=[{}],void 0!==core.accidental&&(el.pitches[0].accidental=core.accidental),el.pitches[0].pitch=core.pitch,void 0!==core.endSlur&&(el.pitches[0].endSlur=core.endSlur),void 0!==core.endTie&&(el.pitches[0].endTie=core.endTie),void 0!==core.startSlur&&(el.pitches[0].startSlur=core.startSlur),void 0!==el.startSlur&&(el.pitches[0].startSlur=el.startSlur),void 0!==core.startTie&&(el.pitches[0].startTie=core.startTie),void 0!==el.startTie&&(el.pitches[0].startTie=el.startTie)):(el.rest=core.rest,void 0!==core.endSlur&&(el.endSlur=core.endSlur),void 0!==core.endTie&&(el.rest.endTie=core.endTie),void 0!==core.startSlur&&(el.startSlur=core.startSlur),void 0!==core.startTie&&(el.rest.startTie=core.startTie),void 0!==el.startTie&&(el.rest.startTie=el.startTie)),void 0!==core.chord&&(el.chord=core.chord),void 0!==core.duration&&(el.duration=core.duration),void 0!==core.decoration&&(el.decoration=core.decoration),void 0!==core.graceNotes&&(el.graceNotes=core.graceNotes),delete el.startSlur,multilineVars.inTie&&(void 0!==el.pitches?(el.pitches[0].endTie=!0,multilineVars.inTie=!1):"spacer"!==el.rest.type&&(el.rest.endTie=!0,multilineVars.inTie=!1)),(core.startTie||el.startTie)&&(multilineVars.inTie=!0),i=core.endChar,tripletNotesLeft>0&&(tripletNotesLeft--,0===tripletNotesLeft&&(el.endTriplet=!0)),core.end_beam&&addEndBeam(el),el.rest&&"rest"===el.rest.type&&1===el.duration&&(el.rest.type="whole",el.duration=durationOfMeasure(multilineVars)),multilineVars.addFormattingOptions(el,tune.formatting,"note"),tune.appendElement("note",startOfLine+startI,startOfLine+i,el),multilineVars.measureNotEmpty=!0,el={})}i===startI&&(" "!==line.charAt(i)&&"`"!==line.charAt(i)&&warn("Unknown character ignored",line,i),i++)}}}}},parseLine=function(line){var ret=header.parseHeader(line);ret.regular&&parseRegularMusicLine(ret.str),ret.newline&&void 0===multilineVars.continueall&&startNewLine(),ret.words&&addWords(tune.getCurrentVoice(),line.substring(2)),ret.symbols&&addSymbols(tune.getCurrentVoice(),line.substring(2)),ret.recurse&&parseLine(ret.str)};this.parse=function(strTune,switches){switches||(switches={}),tune.reset(),switches.print&&(tune.media="print"),multilineVars.reset(),header.reset(tokenizer,warn,multilineVars,tune),strTune=window.ABCJS.parse.gsub(strTune,"\r\n","\n"),strTune=window.ABCJS.parse.gsub(strTune,"\r","\n"),strTune+="\n",strTune=strTune.replace(/\n\\.*\n/g,"\n");var continuationReplacement=function(all,backslash,comment){var spaces=" ",padding=comment?spaces.substring(0,comment.length):"";return backslash+" "+padding};strTune=strTune.replace(/\\([ \t]*)(%.*)*\n/g,continuationReplacement);var lines=strTune.split("\n");0===window.ABCJS.parse.last(lines).length&&lines.pop();try{switches.format&&window.ABCJS.parse.parseDirective.globalFormatting(switches.format),window.ABCJS.parse.each(lines,function(line){if(switches.header_only&&multilineVars.is_in_header===!1)throw"normal_abort";if(switches.stop_on_warning&&multilineVars.warnings)throw"normal_abort";multilineVars.is_in_history?":"===line.charAt(1)?(multilineVars.is_in_history=!1,parseLine(line)):tune.addMetaText("history",tokenizer.translateString(tokenizer.stripComment(line))):multilineVars.inTextBlock?window.ABCJS.parse.startsWith(line,"%%endtext")?(tune.addText(multilineVars.textBlock),multilineVars.inTextBlock=!1):window.ABCJS.parse.startsWith(line,"%%")?multilineVars.textBlock+=" "+line.substring(2):multilineVars.textBlock+=" "+line:multilineVars.inPsBlock?window.ABCJS.parse.startsWith(line,"%%endps")?multilineVars.inPsBlock=!1:multilineVars.textBlock+=" "+line:parseLine(line),multilineVars.iChar+=line.length+1});var ph=792,pl=612;switch(multilineVars.papersize){case"legal":ph=1008,pl=612;break;case"A4":ph=842.4,pl=597.6}if(multilineVars.landscape){var x=ph;ph=pl,pl=x}multilineVars.openSlurs=tune.cleanUp(pl,ph,multilineVars.barsperstaff,multilineVars.staffnonote,multilineVars.openSlurs)}catch(err){if("normal_abort"!==err)throw err}switches.hint_measures&&addHintMeasures()}},window.ABCJS||(window.ABCJS={}),window.ABCJS.parse||(window.ABCJS.parse={}),window.ABCJS.parse.parseDirective={},function(){"use strict";function initializeFonts(){multilineVars.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},multilineVars.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},multilineVars.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},multilineVars.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},multilineVars.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},multilineVars.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},multilineVars.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},multilineVars.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},multilineVars.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},multilineVars.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},tune.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},tune.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},tune.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},tune.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},tune.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},tune.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},tune.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},tune.formatting.annotationfont=multilineVars.annotationfont,tune.formatting.gchordfont=multilineVars.gchordfont,tune.formatting.historyfont=multilineVars.historyfont,tune.formatting.infofont=multilineVars.infofont,
+tune.formatting.measurefont=multilineVars.measurefont,tune.formatting.partsfont=multilineVars.partsfont,tune.formatting.repeatfont=multilineVars.repeatfont,tune.formatting.textfont=multilineVars.textfont,tune.formatting.vocalfont=multilineVars.vocalfont,tune.formatting.wordsfont=multilineVars.wordsfont}var tokenizer,warn,multilineVars,tune;window.ABCJS.parse.parseDirective.initialize=function(tokenizer_,warn_,multilineVars_,tune_){tokenizer=tokenizer_,warn=warn_,multilineVars=multilineVars_,tune=tune_,initializeFonts()};var fontTypeCanHaveBox={gchordfont:!0,measurefont:!0,partsfont:!0},fontTranslation=function(fontFace){switch(fontFace){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}},getFontParameter=function(tokens,currentSetting,str,position,cmd){function processNumberOnly(){var size=parseInt(tokens[0].token);return tokens.shift(),currentSetting?0===tokens.length?{face:currentSetting.face,weight:currentSetting.weight,style:currentSetting.style,decoration:currentSetting.decoration,size:size}:1===tokens.length&&"box"===tokens[0].token&&fontTypeCanHaveBox[cmd]?{face:currentSetting.face,weight:currentSetting.weight,style:currentSetting.style,decoration:currentSetting.decoration,size:size,box:!0}:(warn("Extra parameters in font definition.",str,position),{face:currentSetting.face,weight:currentSetting.weight,style:currentSetting.style,decoration:currentSetting.decoration,size:size}):(warn("Can't set just the size of the font since there is no default value.",str,position),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:size})}if("*"===tokens[0].token){if(tokens.shift(),"number"===tokens[0].type)return processNumberOnly();warn("Expected font size number after *.",str,position)}if("number"===tokens[0].type)return processNumberOnly();for(var size,face=[],weight="normal",style="normal",decoration="none",box=!1,state="face",hyphenLast=!1;tokens.length;){var currToken=tokens.shift(),word=currToken.token.toLowerCase();switch(state){case"face":hyphenLast||"utf"!==word&&"number"!==currToken.type&&"bold"!==word&&"italic"!==word&&"underline"!==word&&"box"!==word?face.length>0&&"-"===currToken.token?(hyphenLast=!0,face[face.length-1]=face[face.length-1]+currToken.token):hyphenLast?(hyphenLast=!1,face[face.length-1]=face[face.length-1]+currToken.token):face.push(currToken.token):"number"===currToken.type?(size?warn("Font size specified twice in font definition.",str,position):size=currToken.token,state="modifier"):"bold"===word?weight="bold":"italic"===word?style="italic":"underline"===word?decoration="underline":"box"===word?(fontTypeCanHaveBox[cmd]?box=!0:warn('This font style doesn\'t support "box"',str,position),state="finished"):"utf"===word?(currToken=tokens.shift(),state="size"):warn("Unknown parameter "+currToken.token+" in font definition.",str,position);break;case"size":"number"===currToken.type?size?warn("Font size specified twice in font definition.",str,position):size=currToken.token:warn("Expected font size in font definition.",str,position),state="modifier";break;case"modifier":"bold"===word?weight="bold":"italic"===word?style="italic":"underline"===word?decoration="underline":"box"===word?(fontTypeCanHaveBox[cmd]?box=!0:warn('This font style doesn\'t support "box"',str,position),state="finished"):warn("Unknown parameter "+currToken.token+" in font definition.",str,position);break;case"finished":warn('Extra characters found after "box" in font definition.',str,position)}}void 0===size?currentSetting?size=currentSetting.size:(warn("Must specify the size of the font since there is no default value.",str,position),size=12):size=parseFloat(size),face=face.join(" ");var psFont=fontTranslation(face),font={};return psFont?(font.face=psFont.face,font.weight=psFont.weight,font.style=psFont.style,font.decoration=psFont.decoration,font.size=size,box&&(font.box=!0),font):(font.face=face,font.weight=weight,font.style=style,font.decoration=decoration,font.size=size,box&&(font.box=!0),font)},getChangingFont=function(cmd,tokens,str){return 0===tokens.length?'Directive "'+cmd+'" requires a font as a parameter.':(multilineVars[cmd]=getFontParameter(tokens,multilineVars[cmd],str,0,cmd),multilineVars.is_in_header&&(tune.formatting[cmd]=multilineVars[cmd]),null)},getGlobalFont=function(cmd,tokens,str){return 0===tokens.length?'Directive "'+cmd+'" requires a font as a parameter.':(tune.formatting[cmd]=getFontParameter(tokens,tune.formatting[cmd],str,0,cmd),null)},setScale=function(cmd,tokens){var scratch="";window.ABCJS.parse.each(tokens,function(tok){scratch+=tok.token});var num=parseFloat(scratch);return isNaN(num)||0===num?'Directive "'+cmd+'" requires a number as a parameter.':void(tune.formatting.scale=num)},getRequiredMeasurement=function(cmd,tokens){var points=tokenizer.getMeasurement(tokens);return 0===points.used||0!==tokens.length?{error:'Directive "'+cmd+'" requires a measurement as a parameter.'}:points.value},oneParameterMeasurement=function(cmd,tokens){var points=tokenizer.getMeasurement(tokens);return 0===points.used||0!==tokens.length?'Directive "'+cmd+'" requires a measurement as a parameter.':(tune.formatting[cmd]=points.value,null)},addMultilineVar=function(key,cmd,tokens,min,max){if(1!==tokens.length||"number"!==tokens[0].type)return'Directive "'+cmd+'" requires a number as a parameter.';var i=tokens[0].intt;return void 0!==min&&i<min?'Directive "'+cmd+'" requires a number greater than or equal to '+min+" as a parameter.":void 0!==max&&i>max?'Directive "'+cmd+'" requires a number less than or equal to '+max+" as a parameter.":(multilineVars[key]=i,null)},addMultilineVarBool=function(key,cmd,tokens){var str=addMultilineVar(key,cmd,tokens,0,1);return null!==str?str:(multilineVars[key]=1===multilineVars[key],null)},addMultilineVarOneParamChoice=function(key,cmd,tokens,choices){if(1!==tokens.length)return'Directive "'+cmd+'" requires one of [ '+choices.join(", ")+" ] as a parameter.";for(var choice=tokens[0].token,found=!1,i=0;!found&&i<choices.length;i++)choices[i]===choice&&(found=!0);return found?(multilineVars[key]=choice,null):'Directive "'+cmd+'" requires one of [ '+choices.join(", ")+" ] as a parameter."},midiCmdParam0=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],midiCmdParam1String=["gchord","ptstress","beatstring"],midiCmdParam1Integer=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","volinc"],midiCmdParam1Integer1OptionalInteger=["program"],midiCmdParam2Integer=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],midiCmdParam4Integer=["beat"],midiCmdParam5Integer=["drone"],midiCmdParam1String1Integer=["drummap","portamento"],midiCmdParamFraction=["expand","grace","trim"],midiCmdParam1StringVariableIntegers=["drum","chordname"],parseMidiCommand=function(midi,tune,restOfString){var midi_cmd=midi.shift().token,midi_params=[];if(midiCmdParam0.indexOf(midi_cmd)>=0)0!==midi.length&&warn("Unexpected parameter in MIDI "+midi_cmd,restOfString,0);else if(midiCmdParam1String.indexOf(midi_cmd)>=0)1!==midi.length?warn("Expected one parameter in MIDI "+midi_cmd,restOfString,0):midi_params.push(midi[0].token);else if(midiCmdParam1Integer.indexOf(midi_cmd)>=0)1!==midi.length?warn("Expected one parameter in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type?warn("Expected one integer parameter in MIDI "+midi_cmd,restOfString,0):midi_params.push(midi[0].intt);else if(midiCmdParam1Integer1OptionalInteger.indexOf(midi_cmd)>=0)1!==midi.length&&2!==midi.length?warn("Expected one or two parameters in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type?warn("Expected integer parameter in MIDI "+midi_cmd,restOfString,0):2===midi.length&&"number"!==midi[1].type?warn("Expected integer parameter in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].intt),2===midi.length&&midi_params.push(midi[1].intt));else if(midiCmdParam2Integer.indexOf(midi_cmd)>=0)2!==midi.length?warn("Expected two parameters in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type||"number"!==midi[1].type?warn("Expected two integer parameters in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].intt),midi_params.push(midi[1].intt));else if(midiCmdParam1String1Integer.indexOf(midi_cmd)>=0)2!==midi.length?warn("Expected two parameters in MIDI "+midi_cmd,restOfString,0):"alpha"!==midi[0].type||"number"!==midi[1].type?warn("Expected one string and one integer parameters in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].token),midi_params.push(midi[1].intt));else if(midiCmdParamFraction.indexOf(midi_cmd)>=0)3!==midi.length?warn("Expected fraction parameter in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type||"/"!==midi[1].token||"number"!==midi[2].type?warn("Expected fraction parameter in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].intt),midi_params.push(midi[2].intt));else if(midiCmdParam4Integer.indexOf(midi_cmd)>=0)4!==midi.length?warn("Expected four parameters in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type||"number"!==midi[1].type||"number"!==midi[2].type||"number"!==midi[3].type?warn("Expected four integer parameters in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].intt),midi_params.push(midi[1].intt),midi_params.push(midi[2].intt),midi_params.push(midi[3].intt));else if(midiCmdParam5Integer.indexOf(midi_cmd)>=0)5!==midi.length?warn("Expected five parameters in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type||"number"!==midi[1].type||"number"!==midi[2].type||"number"!==midi[3].type||"number"!==midi[4].type?warn("Expected five integer parameters in MIDI "+midi_cmd,restOfString,0):(midi_params.push(midi[0].intt),midi_params.push(midi[1].intt),midi_params.push(midi[2].intt),midi_params.push(midi[3].intt),midi_params.push(midi[4].intt));else if(midiCmdParam1Integer1OptionalInteger.indexOf(midi_cmd)>=0)1!==midi.length||4!==midi.length?warn("Expected one or two parameters in MIDI "+midi_cmd,restOfString,0):"number"!==midi[0].type?warn("Expected integer parameter in MIDI "+midi_cmd,restOfString,0):4===midi.length?("octave"!==midi[1].token&&warn("Expected octave parameter in MIDI "+midi_cmd,restOfString,0),"="!==midi[2].token&&warn("Expected octave parameter in MIDI "+midi_cmd,restOfString,0),"number"!==midi[3].type&&warn("Expected integer parameter for octave in MIDI "+midi_cmd,restOfString,0)):(midi_params.push(midi[0].intt),4===midi.length&&midi_params.push(midi[3].intt));else if(midiCmdParam1StringVariableIntegers.indexOf(midi_cmd)>=0)if(midi.length<2)warn("Expected string parameter and at least one integer parameter in MIDI "+midi_cmd,restOfString,0);else if("alpha"!==midi[0].type)warn("Expected string parameter and at least one integer parameter in MIDI "+midi_cmd,restOfString,0);else{var p=midi.shift();for(midi_params.push(p.token);midi.length>0;)p=midi.shift(),"number"!==p.type&&warn("Expected integer parameter in MIDI "+midi_cmd,restOfString,0),midi_params.push(p.intt)}tune.hasBeginMusic()?tune.appendElement("midi",-1,-1,{cmd:midi_cmd,params:midi_params}):(void 0===tune.formatting.midi&&(tune.formatting.midi={}),tune.formatting.midi[midi_cmd]=midi_params)};window.ABCJS.parse.parseDirective.parseFontChangeLine=function(textstr){var textParts=textstr.split("$");if(textParts.length>1&&multilineVars.setfont){for(var textarr=[{text:textParts[0]}],i=1;i<textParts.length;i++)"0"===textParts[i].charAt(0)?textarr.push({text:textParts[i].substring(1)}):"1"===textParts[i].charAt(0)&&multilineVars.setfont[1]?textarr.push({font:multilineVars.setfont[1],text:textParts[i].substring(1)}):"2"===textParts[i].charAt(0)&&multilineVars.setfont[2]?textarr.push({font:multilineVars.setfont[2],text:textParts[i].substring(1)}):"3"===textParts[i].charAt(0)&&multilineVars.setfont[3]?textarr.push({font:multilineVars.setfont[3],text:textParts[i].substring(1)}):"4"===textParts[i].charAt(0)&&multilineVars.setfont[4]?textarr.push({font:multilineVars.setfont[4],text:textParts[i].substring(1)}):textarr[textarr.length-1].text+="$"+textParts[i];if(textarr.length>1)return textarr}return textstr};var positionChoices=["auto","above","below","hidden"];window.ABCJS.parse.parseDirective.addDirective=function(str){var tokens=tokenizer.tokenize(str,0,str.length);if(0===tokens.length||"alpha"!==tokens[0].type)return null;var restOfString=str.substring(str.indexOf(tokens[0].token)+tokens[0].token.length);restOfString=tokenizer.stripComment(restOfString);var cmd=tokens.shift().token.toLowerCase(),scratch="";switch(cmd){case"bagpipes":tune.formatting.bagpipes=!0;break;case"landscape":multilineVars.landscape=!0;break;case"papersize":multilineVars.papersize=restOfString;break;case"slurgraces":tune.formatting.slurgraces=!0;break;case"stretchlast":tune.formatting.stretchlast=!0;break;case"titlecaps":multilineVars.titlecaps=!0;break;case"titleleft":tune.formatting.titleleft=!0;break;case"measurebox":tune.formatting.measurebox=!0;break;case"vocal":return addMultilineVarOneParamChoice("vocalPosition",cmd,tokens,positionChoices);case"dynamic":return addMultilineVarOneParamChoice("dynamicPosition",cmd,tokens,positionChoices);case"gchord":return addMultilineVarOneParamChoice("chordPosition",cmd,tokens,positionChoices);case"ornament":return addMultilineVarOneParamChoice("ornamentPosition",cmd,tokens,positionChoices);case"volume":return addMultilineVarOneParamChoice("volumePosition",cmd,tokens,positionChoices);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return oneParameterMeasurement(cmd,tokens);case"vskip":var vskip=getRequiredMeasurement(cmd,tokens);return vskip.error?vskip.error:(tune.addSpacing(vskip),null);case"scale":setScale(cmd,tokens);break;case"sep":if(0===tokens.length)tune.addSeparator();else{var points=tokenizer.getMeasurement(tokens);if(0===points.used)return'Directive "'+cmd+'" requires 3 numbers: space above, space below, length of line';var spaceAbove=points.value;if(points=tokenizer.getMeasurement(tokens),0===points.used)return'Directive "'+cmd+'" requires 3 numbers: space above, space below, length of line';var spaceBelow=points.value;if(points=tokenizer.getMeasurement(tokens),0===points.used||0!==tokens.length)return'Directive "'+cmd+'" requires 3 numbers: space above, space below, length of line';var lenLine=points.value;tune.addSeparator(spaceAbove,spaceBelow,lenLine)}break;case"barsperstaff":if(scratch=addMultilineVar("barsperstaff",cmd,tokens),null!==scratch)return scratch;break;case"staffnonote":if(scratch=addMultilineVarBool("staffnonote",cmd,tokens),null!==scratch)return scratch;break;case"printtempo":if(scratch=addMultilineVarBool("printTempo",cmd,tokens),null!==scratch)return scratch;break;case"partsbox":if(scratch=addMultilineVarBool("partsBox",cmd,tokens),null!==scratch)return scratch;break;case"measurenb":case"barnumbers":if(scratch=addMultilineVar("barNumbers",cmd,tokens),null!==scratch)return scratch;break;case"begintext":multilineVars.inTextBlock=!0;break;case"continueall":multilineVars.continueall=!0;break;case"beginps":multilineVars.inPsBlock=!0,warn("Postscript ignored",str,0);break;case"deco":restOfString.length>0&&multilineVars.ignoredDecorations.push(restOfString.substring(0,restOfString.indexOf(" "))),warn("Decoration redefinition ignored",str,0);break;case"text":var textstr=tokenizer.translateString(restOfString);tune.addText(window.ABCJS.parse.parseDirective.parseFontChangeLine(textstr));break;case"center":var centerstr=tokenizer.translateString(restOfString);tune.addCentered(window.ABCJS.parse.parseDirective.parseFontChangeLine(centerstr));break;case"font":break;case"setfont":var sfTokens=tokenizer.tokenize(restOfString,0,restOfString.length);if(sfTokens.length>=4&&"-"===sfTokens[0].token&&"number"===sfTokens[1].type){var sfNum=parseInt(sfTokens[1].token);sfNum>=1&&sfNum<=4&&(multilineVars.setfont||(multilineVars.setfont=[]),sfTokens.shift(),sfTokens.shift(),multilineVars.setfont[sfNum]=getFontParameter(sfTokens,multilineVars.setfont[sfNum],str,0,"setfont"))}break;case"gchordfont":case"partsfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return getChangingFont(cmd,tokens,str);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return getGlobalFont(cmd,tokens,str);case"barlabelfont":case"barnumberfont":case"barnumfont":return getChangingFont("measurefont",tokens,str);case"staves":case"score":multilineVars.score_is_present=!0;for(var lastVoice,addVoice=function(id,newStaff,bracket,brace,continueBar){(newStaff||0===multilineVars.staves.length)&&multilineVars.staves.push({index:multilineVars.staves.length,numVoices:0});var staff=window.ABCJS.parse.last(multilineVars.staves);void 0!==bracket&&(staff.bracket=bracket),void 0!==brace&&(staff.brace=brace),continueBar&&(staff.connectBarLines="end"),void 0===multilineVars.voices[id]&&(multilineVars.voices[id]={staffNum:staff.index,index:staff.numVoices},staff.numVoices++)},openParen=!1,openBracket=!1,openBrace=!1,justOpenParen=!1,justOpenBracket=!1,justOpenBrace=!1,continueBar=!1,addContinueBar=function(){if(continueBar=!0,lastVoice){var ty="start";lastVoice.staffNum>0&&("start"!==multilineVars.staves[lastVoice.staffNum-1].connectBarLines&&"continue"!==multilineVars.staves[lastVoice.staffNum-1].connectBarLines||(ty="continue")),multilineVars.staves[lastVoice.staffNum].connectBarLines=ty}};tokens.length;){var t=tokens.shift();switch(t.token){case"(":openParen?warn("Can't nest parenthesis in %%score",str,t.start):(openParen=!0,justOpenParen=!0);break;case")":!openParen||justOpenParen?warn("Unexpected close parenthesis in %%score",str,t.start):openParen=!1;break;case"[":openBracket?warn("Can't nest brackets in %%score",str,t.start):(openBracket=!0,justOpenBracket=!0);break;case"]":!openBracket||justOpenBracket?warn("Unexpected close bracket in %%score",str,t.start):(openBracket=!1,multilineVars.staves[lastVoice.staffNum].bracket="end");break;case"{":openBrace?warn("Can't nest braces in %%score",str,t.start):(openBrace=!0,justOpenBrace=!0);break;case"}":!openBrace||justOpenBrace?warn("Unexpected close brace in %%score",str,t.start):(openBrace=!1,multilineVars.staves[lastVoice.staffNum].brace="end");break;case"|":addContinueBar();break;default:for(var vc="";("alpha"===t.type||"number"===t.type)&&(vc+=t.token,t.continueId);)t=tokens.shift();var newStaff=!openParen||justOpenParen,bracket=justOpenBracket?"start":openBracket?"continue":void 0,brace=justOpenBrace?"start":openBrace?"continue":void 0;addVoice(vc,newStaff,bracket,brace,continueBar),justOpenParen=!1,justOpenBracket=!1,justOpenBrace=!1,continueBar=!1,lastVoice=multilineVars.voices[vc],"staves"===cmd&&addContinueBar()}}break;case"newpage":var pgNum=tokenizer.getInt(restOfString);tune.addNewPage(0===pgNum.digits?-1:pgNum.value);break;case"abc":var arr=restOfString.split(" ");switch(arr[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var subCmd=arr.shift();tune.addMetaText(cmd+subCmd,arr.join(" "));break;default:return"Unknown directive: "+cmd+arr[0]}break;case"header":case"footer":var footerStr=tokenizer.getMeat(restOfString,0,restOfString.length);footerStr=restOfString.substring(footerStr.start,footerStr.end),'"'===footerStr.charAt(0)&&'"'===footerStr.charAt(footerStr.length-1)&&(footerStr=footerStr.substring(1,footerStr.length-1));var footerArr=footerStr.split("\t"),footer={};footer=1===footerArr.length?{left:"",center:footerArr[0],right:""}:2===footerArr.length?{left:footerArr[0],center:footerArr[1],right:""}:{left:footerArr[0],center:footerArr[1],right:footerArr[2]},footerArr.length>3&&warn("Too many tabs in "+cmd+": "+footerArr.length+" found.",restOfString,0),tune.addMetaTextObj(cmd,footer);break;case"midi":var midi=tokenizer.tokenize(restOfString,0,restOfString.length,!0);midi.length>0&&"="===midi[0].token&&midi.shift(),0===midi.length?warn("Expected midi command",restOfString,0):parseMidiCommand(midi,tune,restOfString);break;case"playtempo":case"auquality":case"continuous":case"nobarcheck":tune.formatting[cmd]=restOfString;break;default:return"Unknown directive: "+cmd}return null},window.ABCJS.parse.parseDirective.globalFormatting=function(formatHash){for(var cmd in formatHash)if(formatHash.hasOwnProperty(cmd)){var scratch,value=""+formatHash[cmd],tokens=tokenizer.tokenize(value,0,value.length);switch(cmd){case"titlefont":case"gchordfont":getChangingFont(cmd,tokens,value);break;case"scale":setScale(cmd,tokens);break;case"partsbox":scratch=addMultilineVarBool("partsBox",cmd,tokens),null!==scratch&&warn(scratch);break;default:warn("Formatting directive unrecognized: ",cmd,0)}}}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.parse||(window.ABCJS.parse={}),window.ABCJS.parse.ParseHeader=function(tokenizer,warn,multilineVars,tune){this.reset=function(tokenizer,warn,multilineVars,tune){window.ABCJS.parse.parseKeyVoice.initialize(tokenizer,warn,multilineVars,tune),window.ABCJS.parse.parseDirective.initialize(tokenizer,warn,multilineVars,tune)},this.reset(tokenizer,warn,multilineVars,tune),this.setTitle=function(title){if(multilineVars.hasMainTitle)tune.addSubtitle(tokenizer.translateString(tokenizer.stripComment(title)));else{var titleStr=tokenizer.translateString(tokenizer.theReverser(tokenizer.stripComment(title)));multilineVars.titlecaps&&(titleStr=titleStr.toUpperCase()),tune.addMetaText("title",titleStr),multilineVars.hasMainTitle=!0}},this.setMeter=function(line){if(line=tokenizer.stripComment(line),"C"===line)return multilineVars.havent_set_length===!0&&(multilineVars.default_length=.125),{type:"common_time"};if("C|"===line)return multilineVars.havent_set_length===!0&&(multilineVars.default_length=.125),{type:"cut_time"};if("o"===line)return multilineVars.havent_set_length===!0&&(multilineVars.default_length=.125),{type:"tempus_perfectum"};if("c"===line)return multilineVars.havent_set_length===!0&&(multilineVars.default_length=.125),{type:"tempus_imperfectum"};if("o."===line)return multilineVars.havent_set_length===!0&&(multilineVars.default_length=.125),{type:"tempus_perfectum_prolatio"};if("c."===line)return multilineVars.havent_set_length===!0&&(multilineVars.default_length=.125),{type:"tempus_imperfectum_prolatio"};if(0===line.length||"none"===line.toLowerCase())return multilineVars.havent_set_length===!0&&(multilineVars.default_length=.125),null;var tokens=tokenizer.tokenize(line,0,line.length);try{var parseNum=function(){var ret={value:0,num:""},tok=tokens.shift();for("("===tok.token&&(tok=tokens.shift());;){if("number"!==tok.type)throw"Expected top number of meter";if(ret.value+=parseInt(tok.token),ret.num+=tok.token,0===tokens.length||"/"===tokens[0].token)return ret;if(tok=tokens.shift(),")"===tok.token){if(0===tokens.length||"/"===tokens[0].token)return ret;throw"Unexpected paren in meter"}if("."!==tok.token&&"+"!==tok.token)throw"Expected top number of meter";if(ret.num+=tok.token,0===tokens.length)throw"Expected top number of meter";tok=tokens.shift()}return ret},parseFraction=function(){var ret=parseNum();if(0===tokens.length)return ret;var tok=tokens.shift();if("/"!==tok.token)throw"Expected slash in meter";if(tok=tokens.shift(),"number"!==tok.type)throw"Expected bottom number of meter";return ret.den=tok.token,ret.value=ret.value/parseInt(ret.den),ret};if(0===tokens.length)throw"Expected meter definition in M: line";for(var meter={type:"specified",value:[]},totalLength=0;;){var ret=parseFraction();totalLength+=ret.value;var mv={num:ret.num};if(void 0!==ret.den&&(mv.den=ret.den),meter.value.push(mv),0===tokens.length)break}return multilineVars.havent_set_length===!0&&(multilineVars.default_length=totalLength<.75?.0625:.125),meter}catch(e){warn(e,line,0)}return null},this.calcTempo=function(relTempo){var dur=.25;multilineVars.meter&&"specified"===multilineVars.meter.type?dur=1/parseInt(multilineVars.meter.value[0].den):multilineVars.origMeter&&"specified"===multilineVars.origMeter.type&&(dur=1/parseInt(multilineVars.origMeter.value[0].den));for(var i=0;i<relTempo.duration;i++)relTempo.duration[i]=dur*relTempo.duration[i];return relTempo},this.resolveTempo=function(){multilineVars.tempo&&(this.calcTempo(multilineVars.tempo),tune.metaText.tempo=multilineVars.tempo,delete multilineVars.tempo)},this.addUserDefinition=function(line,start,end){var equals=line.indexOf("=",start);if(equals===-1)return void warn("Need an = in a macro definition",line,start);var before=window.ABCJS.parse.strip(line.substring(start,equals)),after=window.ABCJS.parse.strip(line.substring(equals+1));if(1!==before.length)return void warn("Macro definitions can only be one character",line,start);var legalChars="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~";return legalChars.indexOf(before)===-1?void warn("Macro definitions must be H-Y, h-w, or tilde",line,start):0===after.length?void warn("Missing macro definition",line,start):(void 0===multilineVars.macros&&(multilineVars.macros={}),void(multilineVars.macros[before]=after))},this.setDefaultLength=function(line,start,end){var len=window.ABCJS.parse.gsub(line.substring(start,end)," ",""),len_arr=len.split("/");if(2===len_arr.length){var n=parseInt(len_arr[0]),d=parseInt(len_arr[1]);d>0&&(multilineVars.default_length=n/d,multilineVars.havent_set_length=!1)}},this.setTempo=function(line,start,end){try{var tokens=tokenizer.tokenize(line,start,end);if(0===tokens.length)throw"Missing parameter in Q: field";var tempo={},delaySet=!0,token=tokens.shift();if("quote"===token.type&&(tempo.preString=token.token,token=tokens.shift(),0===tokens.length))return{type:"immediate",tempo:tempo};if("alpha"===token.type&&"C"===token.token){if(0===tokens.length)throw"Missing tempo after C in Q: field";if(token=tokens.shift(),"punct"===token.type&&"="===token.token){if(0===tokens.length)throw"Missing tempo after = in Q: field";if(token=tokens.shift(),"number"!==token.type)throw"Expected number after = in Q: field";tempo.duration=[1],tempo.bpm=parseInt(token.token)}else{if("number"!==token.type)throw"Expected number or equal after C in Q: field";if(tempo.duration=[parseInt(token.token)],0===tokens.length)throw"Missing = after duration in Q: field";if(token=tokens.shift(),"punct"!==token.type||"="!==token.token)throw"Expected = after duration in Q: field";if(0===tokens.length)throw"Missing tempo after = in Q: field";if(token=tokens.shift(),"number"!==token.type)throw"Expected number after = in Q: field";tempo.bpm=parseInt(token.token)}}else{if("number"!==token.type)throw"Unknown value in Q: field";var num=parseInt(token.token);if(0===tokens.length||"quote"===tokens[0].type)tempo.duration=[1],tempo.bpm=num;else{if(delaySet=!1,token=tokens.shift(),"punct"!==token.type&&"/"!==token.token)throw"Expected fraction in Q: field";if(token=tokens.shift(),"number"!==token.type)throw"Expected fraction in Q: field";var den=parseInt(token.token);for(tempo.duration=[num/den];tokens.length>0&&"="!==tokens[0].token&&"quote"!==tokens[0].type;){if(token=tokens.shift(),"number"!==token.type)throw"Expected fraction in Q: field";if(num=parseInt(token.token),token=tokens.shift(),"punct"!==token.type&&"/"!==token.token)throw"Expected fraction in Q: field";if(token=tokens.shift(),"number"!==token.type)throw"Expected fraction in Q: field";den=parseInt(token.token),tempo.duration.push(num/den)}if(token=tokens.shift(),"punct"!==token.type&&"="!==token.token)throw"Expected = in Q: field";if(token=tokens.shift(),"number"!==token.type)throw"Expected tempo in Q: field";tempo.bpm=parseInt(token.token)}}if(0!==tokens.length&&(token=tokens.shift(),"quote"===token.type&&(tempo.postString=token.token,token=tokens.shift()),0!==tokens.length))throw"Unexpected string at end of Q: field";return multilineVars.printTempo===!1&&(tempo.suppress=!0),{type:delaySet?"delaySet":"immediate",tempo:tempo}}catch(msg){return warn(msg,line,start),{type:"none"}}},this.letter_to_inline_header=function(line,i){var ws=tokenizer.eatWhiteSpace(line,i);
+if(i+=ws,line.length>=i+5&&"["===line.charAt(i)&&":"===line.charAt(i+2)){var e=line.indexOf("]",i);switch(line.substring(i,i+3)){case"[I:":var err=window.ABCJS.parse.parseDirective.addDirective(line.substring(i+3,e));return err&&warn(err,line,i),[e-i+1+ws];case"[M:":var meter=this.setMeter(line.substring(i+3,e));return tune.hasBeginMusic()&&meter?tune.appendStartingElement("meter",-1,-1,meter):multilineVars.meter=meter,[e-i+1+ws];case"[K:":var result=window.ABCJS.parse.parseKeyVoice.parseKey(line.substring(i+3,e));return result.foundClef&&tune.hasBeginMusic()&&tune.appendStartingElement("clef",-1,-1,multilineVars.clef),result.foundKey&&tune.hasBeginMusic()&&tune.appendStartingElement("key",-1,-1,window.ABCJS.parse.parseKeyVoice.fixKey(multilineVars.clef,multilineVars.key)),[e-i+1+ws];case"[P:":return tune.lines.length<=tune.lineNum?multilineVars.partForNextLine=line.substring(i+3,e):tune.appendElement("part",-1,-1,{title:line.substring(i+3,e)}),[e-i+1+ws];case"[L:":return this.setDefaultLength(line,i+3,e),[e-i+1+ws];case"[Q:":if(e>0){var tempo=this.setTempo(line,i+3,e);return"delaySet"===tempo.type?tune.appendElement("tempo",-1,-1,this.calcTempo(tempo.tempo)):"immediate"===tempo.type&&tune.appendElement("tempo",-1,-1,tempo.tempo),[e-i+1+ws,line.charAt(i+1),line.substring(i+3,e)]}break;case"[V:":if(e>0)return window.ABCJS.parse.parseKeyVoice.parseVoice(line,i+3,e),[e-i+1+ws,line.charAt(i+1),line.substring(i+3,e)]}}return[0]},this.letter_to_body_header=function(line,i){if(line.length>=i+3)switch(line.substring(i,i+2)){case"I:":var err=window.ABCJS.parse.parseDirective.addDirective(line.substring(i+2));return err&&warn(err,line,i),[line.length];case"M:":var meter=this.setMeter(line.substring(i+2));return tune.hasBeginMusic()&&meter&&tune.appendStartingElement("meter",-1,-1,meter),[line.length];case"K:":var result=window.ABCJS.parse.parseKeyVoice.parseKey(line.substring(i+2));return result.foundClef&&tune.hasBeginMusic()&&tune.appendStartingElement("clef",-1,-1,multilineVars.clef),result.foundKey&&tune.hasBeginMusic()&&tune.appendStartingElement("key",-1,-1,window.ABCJS.parse.parseKeyVoice.fixKey(multilineVars.clef,multilineVars.key)),[line.length];case"P:":return tune.hasBeginMusic()&&tune.appendElement("part",-1,-1,{title:line.substring(i+2)}),[line.length];case"L:":return this.setDefaultLength(line,i+2,line.length),[line.length];case"Q:":var e=line.indexOf("",i+2);e===-1&&(e=line.length);var tempo=this.setTempo(line,i+2,e);return"delaySet"===tempo.type?tune.appendElement("tempo",-1,-1,this.calcTempo(tempo.tempo)):"immediate"===tempo.type&&tune.appendElement("tempo",-1,-1,tempo.tempo),[e,line.charAt(i),window.ABCJS.parse.strip(line.substring(i+2))];case"V:":return window.ABCJS.parse.parseKeyVoice.parseVoice(line,2,line.length),[line.length,line.charAt(i),window.ABCJS.parse(line.substring(i+2))]}return[0]};var metaTextHeaders={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(line){if(window.ABCJS.parse.startsWith(line,"%%")){var err=window.ABCJS.parse.parseDirective.addDirective(line.substring(2));return err&&warn(err,line,2),{}}var i=line.indexOf("%");if(i>=0&&(line=line.substring(0,i)),line=line.replace(/\s+$/,""),0===line.length)return{};if(line.length>=2&&":"===line.charAt(1)){var nextLine="";line.indexOf("")>=0&&"w"!==line.charAt(0)&&(nextLine=line.substring(line.indexOf("")+1),line=line.substring(0,line.indexOf("")));var field=metaTextHeaders[line.charAt(0)];if(void 0!==field)return"unalignedWords"===field?tune.addMetaTextArray(field,window.ABCJS.parse.parseDirective.parseFontChangeLine(tokenizer.translateString(tokenizer.stripComment(line.substring(2))))):tune.addMetaText(field,tokenizer.translateString(tokenizer.stripComment(line.substring(2)))),{};switch(line.charAt(0)){case"H":tune.addMetaText("history",tokenizer.translateString(tokenizer.stripComment(line.substring(2)))),multilineVars.is_in_history=!0;break;case"K":this.resolveTempo();var result=window.ABCJS.parse.parseKeyVoice.parseKey(line.substring(2));!multilineVars.is_in_header&&tune.hasBeginMusic()&&(result.foundClef&&tune.appendStartingElement("clef",-1,-1,multilineVars.clef),result.foundKey&&tune.appendStartingElement("key",-1,-1,window.ABCJS.parse.parseKeyVoice.fixKey(multilineVars.clef,multilineVars.key))),multilineVars.is_in_header=!1;break;case"L":this.setDefaultLength(line,2,line.length);break;case"M":multilineVars.origMeter=multilineVars.meter=this.setMeter(line.substring(2));break;case"P":multilineVars.is_in_header?tune.addMetaText("partOrder",tokenizer.translateString(tokenizer.stripComment(line.substring(2)))):multilineVars.partForNextLine=tokenizer.translateString(tokenizer.stripComment(line.substring(2)));break;case"Q":var tempo=this.setTempo(line,2,line.length);"delaySet"===tempo.type?multilineVars.tempo=tempo.tempo:"immediate"===tempo.type&&(tune.metaText.tempo=tempo.tempo);break;case"T":this.setTitle(line.substring(2));break;case"U":this.addUserDefinition(line,2,line.length);break;case"V":if(window.ABCJS.parse.parseKeyVoice.parseVoice(line,2,line.length),!multilineVars.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":warn("Ignored header",line,0);break;default:return nextLine.length&&(nextLine=""+nextLine),{regular:!0,str:line+nextLine}}return nextLine.length>0?{recurse:!0,str:nextLine}:{}}return{regular:!0,str:line}}},window.ABCJS||(window.ABCJS={}),window.ABCJS.parse||(window.ABCJS.parse={}),window.ABCJS.parse.parseKeyVoice={},function(){var tokenizer,warn,multilineVars,tune;window.ABCJS.parse.parseKeyVoice.initialize=function(tokenizer_,warn_,multilineVars_,tune_){tokenizer=tokenizer_,warn=warn_,multilineVars=multilineVars_,tune=tune_},window.ABCJS.parse.parseKeyVoice.standardKey=function(keyName){var key1sharp={acc:"sharp",note:"f"},key2sharp={acc:"sharp",note:"c"},key3sharp={acc:"sharp",note:"g"},key4sharp={acc:"sharp",note:"d"},key5sharp={acc:"sharp",note:"A"},key6sharp={acc:"sharp",note:"e"},key7sharp={acc:"sharp",note:"B"},key1flat={acc:"flat",note:"B"},key2flat={acc:"flat",note:"e"},key3flat={acc:"flat",note:"A"},key4flat={acc:"flat",note:"d"},key5flat={acc:"flat",note:"G"},key6flat={acc:"flat",note:"c"},key7flat={acc:"flat",note:"F"},keys={"C#":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"A#m":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"G#Mix":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"D#Dor":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"E#Phr":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"F#Lyd":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"B#Loc":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp],"F#":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],"D#m":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],"C#Mix":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],"G#Dor":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],"A#Phr":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],BLyd:[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],"E#Loc":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp],B:[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],"G#m":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],"F#Mix":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],"C#Dor":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],"D#Phr":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],ELyd:[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],"A#Loc":[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp],E:[key1sharp,key2sharp,key3sharp,key4sharp],"C#m":[key1sharp,key2sharp,key3sharp,key4sharp],BMix:[key1sharp,key2sharp,key3sharp,key4sharp],"F#Dor":[key1sharp,key2sharp,key3sharp,key4sharp],"G#Phr":[key1sharp,key2sharp,key3sharp,key4sharp],ALyd:[key1sharp,key2sharp,key3sharp,key4sharp],"D#Loc":[key1sharp,key2sharp,key3sharp,key4sharp],A:[key1sharp,key2sharp,key3sharp],"F#m":[key1sharp,key2sharp,key3sharp],EMix:[key1sharp,key2sharp,key3sharp],BDor:[key1sharp,key2sharp,key3sharp],"C#Phr":[key1sharp,key2sharp,key3sharp],DLyd:[key1sharp,key2sharp,key3sharp],"G#Loc":[key1sharp,key2sharp,key3sharp],D:[key1sharp,key2sharp],Bm:[key1sharp,key2sharp],AMix:[key1sharp,key2sharp],EDor:[key1sharp,key2sharp],"F#Phr":[key1sharp,key2sharp],GLyd:[key1sharp,key2sharp],"C#Loc":[key1sharp,key2sharp],G:[key1sharp],Em:[key1sharp],DMix:[key1sharp],ADor:[key1sharp],BPhr:[key1sharp],CLyd:[key1sharp],"F#Loc":[key1sharp],C:[],Am:[],GMix:[],DDor:[],EPhr:[],FLyd:[],BLoc:[],F:[key1flat],Dm:[key1flat],CMix:[key1flat],GDor:[key1flat],APhr:[key1flat],BbLyd:[key1flat],ELoc:[key1flat],Bb:[key1flat,key2flat],Gm:[key1flat,key2flat],FMix:[key1flat,key2flat],CDor:[key1flat,key2flat],DPhr:[key1flat,key2flat],EbLyd:[key1flat,key2flat],ALoc:[key1flat,key2flat],Eb:[key1flat,key2flat,key3flat],Cm:[key1flat,key2flat,key3flat],BbMix:[key1flat,key2flat,key3flat],FDor:[key1flat,key2flat,key3flat],GPhr:[key1flat,key2flat,key3flat],AbLyd:[key1flat,key2flat,key3flat],DLoc:[key1flat,key2flat,key3flat],Ab:[key1flat,key2flat,key3flat,key4flat],Fm:[key1flat,key2flat,key3flat,key4flat],EbMix:[key1flat,key2flat,key3flat,key4flat],BbDor:[key1flat,key2flat,key3flat,key4flat],CPhr:[key1flat,key2flat,key3flat,key4flat],DbLyd:[key1flat,key2flat,key3flat,key4flat],GLoc:[key1flat,key2flat,key3flat,key4flat],Db:[key1flat,key2flat,key3flat,key4flat,key5flat],Bbm:[key1flat,key2flat,key3flat,key4flat,key5flat],AbMix:[key1flat,key2flat,key3flat,key4flat,key5flat],EbDor:[key1flat,key2flat,key3flat,key4flat,key5flat],FPhr:[key1flat,key2flat,key3flat,key4flat,key5flat],GbLyd:[key1flat,key2flat,key3flat,key4flat,key5flat],CLoc:[key1flat,key2flat,key3flat,key4flat,key5flat],Gb:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],Ebm:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],DbMix:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],AbDor:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],BbPhr:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],CbLyd:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],FLoc:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat],Cb:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],Abm:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],GbMix:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],DbDor:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],EbPhr:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],FbLyd:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],BbLoc:[key1flat,key2flat,key3flat,key4flat,key5flat,key6flat,key7flat],"A#":[key1flat,key2flat],"B#":[],"D#":[key1flat,key2flat,key3flat],"E#":[key1flat],"G#":[key1flat,key2flat,key3flat,key4flat],Gbm:[key1sharp,key2sharp,key3sharp,key4sharp,key5sharp,key6sharp,key7sharp]};return keys[keyName]};var clefLines={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},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+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}},calcMiddle=function(clef,oct){var value=clefLines[clef],mid=value?value.mid:0;return mid+oct};window.ABCJS.parse.parseKeyVoice.fixClef=function(clef){var value=clefLines[clef.type];value&&(clef.clefPos=value.pitch,clef.type=value.clef)},window.ABCJS.parse.parseKeyVoice.deepCopyKey=function(key){var ret={accidentals:[],root:key.root,acc:key.acc,mode:key.mode};return window.ABCJS.parse.each(key.accidentals,function(k){ret.accidentals.push(window.ABCJS.parse.clone(k))}),ret};var 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};window.ABCJS.parse.parseKeyVoice.addPosToKey=function(clef,key){var mid=clef.verticalPos;window.ABCJS.parse.each(key.accidentals,function(acc){var pitch=pitches[acc.note];pitch-=mid,acc.verticalPos=pitch}),key.impliedNaturals&&window.ABCJS.parse.each(key.impliedNaturals,function(acc){var pitch=pitches[acc.note];pitch-=mid,acc.verticalPos=pitch}),mid<-10?(window.ABCJS.parse.each(key.accidentals,function(acc){acc.verticalPos-=7,(acc.verticalPos>=11||10===acc.verticalPos&&"flat"===acc.acc)&&(acc.verticalPos-=7),"A"===acc.note&&"sharp"===acc.acc&&(acc.verticalPos-=7),"G"!==acc.note&&"F"!==acc.note||"flat"!==acc.acc||(acc.verticalPos-=7)}),key.impliedNaturals&&window.ABCJS.parse.each(key.impliedNaturals,function(acc){acc.verticalPos-=7,(acc.verticalPos>=11||10===acc.verticalPos&&"flat"===acc.acc)&&(acc.verticalPos-=7),"A"===acc.note&&"sharp"===acc.acc&&(acc.verticalPos-=7),"G"!==acc.note&&"F"!==acc.note||"flat"!==acc.acc||(acc.verticalPos-=7)})):mid<-4?(window.ABCJS.parse.each(key.accidentals,function(acc){acc.verticalPos-=7,mid!==-8||"f"!==acc.note&&"g"!==acc.note||"sharp"!==acc.acc||(acc.verticalPos-=7)}),key.impliedNaturals&&window.ABCJS.parse.each(key.impliedNaturals,function(acc){acc.verticalPos-=7,mid!==-8||"f"!==acc.note&&"g"!==acc.note||"sharp"!==acc.acc||(acc.verticalPos-=7)})):mid>=7&&(window.ABCJS.parse.each(key.accidentals,function(acc){acc.verticalPos+=7}),key.impliedNaturals&&window.ABCJS.parse.each(key.impliedNaturals,function(acc){acc.verticalPos+=7}))},window.ABCJS.parse.parseKeyVoice.fixKey=function(clef,key){var fixedKey=window.ABCJS.parse.clone(key);return window.ABCJS.parse.parseKeyVoice.addPosToKey(clef,fixedKey),fixedKey};var parseMiddle=function(str){for(var mid=pitches[str.charAt(0)],i=1;i<str.length;i++)if(","===str.charAt(i))mid-=7;else{if(","!==str.charAt(i))break;mid+=7}return{mid:mid-6,str:str.substring(i)}},normalizeAccidentals=function(accs){for(var i=0;i<accs.length;i++)"b"===accs[i].note?accs[i].note="B":"a"===accs[i].note?accs[i].note="A":"F"===accs[i].note?accs[i].note="f":"E"===accs[i].note?accs[i].note="e":"D"===accs[i].note?accs[i].note="d":"C"===accs[i].note?accs[i].note="c":"G"===accs[i].note&&"sharp"===accs[i].acc?accs[i].note="g":"g"===accs[i].note&&"flat"===accs[i].acc&&(accs[i].note="G")};window.ABCJS.parse.parseKeyVoice.parseKey=function(str){0===str.length&&(str="none");var tokens=tokenizer.tokenize(str,0,str.length),ret={};switch(tokens[0].token){case"HP":window.ABCJS.parse.parseDirective.addDirective("bagpipes"),multilineVars.key={root:"HP",accidentals:[],acc:"",mode:""},ret.foundKey=!0,tokens.shift();break;case"Hp":window.ABCJS.parse.parseDirective.addDirective("bagpipes"),multilineVars.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},ret.foundKey=!0,tokens.shift();break;case"none":multilineVars.key={root:"none",accidentals:[],acc:"",mode:""},ret.foundKey=!0,tokens.shift();break;default:var retPitch=tokenizer.getKeyPitch(tokens[0].token);if(retPitch.len>0){ret.foundKey=!0;var acc="",mode="";tokens[0].token.length>1?tokens[0].token=tokens[0].token.substring(1):tokens.shift();var key=retPitch.token;if(tokens.length>0){var retAcc=tokenizer.getSharpFlat(tokens[0].token);if(retAcc.len>0&&(tokens[0].token.length>1?tokens[0].token=tokens[0].token.substring(1):tokens.shift(),key+=retAcc.token,acc=retAcc.token),tokens.length>0){var retMode=tokenizer.getMode(tokens[0].token);retMode.len>0&&(tokens.shift(),key+=retMode.token,mode=retMode.token)}if(void 0===window.ABCJS.parse.parseKeyVoice.standardKey(key))return warn("Unsupported key signature: "+key,str,0),ret}var oldKey=window.ABCJS.parse.parseKeyVoice.deepCopyKey(multilineVars.key);if(multilineVars.key=window.ABCJS.parse.parseKeyVoice.deepCopyKey({accidentals:window.ABCJS.parse.parseKeyVoice.standardKey(key)}),multilineVars.key.root=retPitch.token,multilineVars.key.acc=acc,multilineVars.key.mode=mode,oldKey){for(var kk,k=0;k<multilineVars.key.accidentals.length;k++)for(kk=0;kk<oldKey.accidentals.length;kk++)oldKey.accidentals[kk].note&&multilineVars.key.accidentals[k].note.toLowerCase()===oldKey.accidentals[kk].note.toLowerCase()&&(oldKey.accidentals[kk].note=null);for(kk=0;kk<oldKey.accidentals.length;kk++)oldKey.accidentals[kk].note&&(multilineVars.key.impliedNaturals||(multilineVars.key.impliedNaturals=[]),multilineVars.key.impliedNaturals.push({acc:"natural",note:oldKey.accidentals[kk].note}))}}}if(0===tokens.length)return ret;if("exp"===tokens[0].token&&tokens.shift(),0===tokens.length)return ret;if("oct"===tokens[0].token&&tokens.shift(),0===tokens.length)return ret;var accs=tokenizer.getKeyAccidentals2(tokens);if(accs.warn&&warn(accs.warn,str,0),accs.accs){ret.foundKey||(ret.foundKey=!0,multilineVars.key={root:"none",acc:"",mode:"",accidentals:[]}),normalizeAccidentals(accs.accs);for(var i=0;i<accs.accs.length;i++){for(var found=!1,j=0;j<multilineVars.key.accidentals.length&&!found;j++)multilineVars.key.accidentals[j].note===accs.accs[i].note&&(found=!0,multilineVars.key.accidentals[j].acc=accs.accs[i].acc);if(!found&&(multilineVars.key.accidentals.push(accs.accs[i]),multilineVars.key.impliedNaturals))for(var kkk=0;kkk<multilineVars.key.impliedNaturals.length;kkk++)multilineVars.key.impliedNaturals[kkk].note===accs.accs[i].note&&multilineVars.key.impliedNaturals.splice(kkk,1)}}for(var token;tokens.length>0;)switch(tokens[0].token){case"m":case"middle":if(tokens.shift(),0===tokens.length)return warn("Expected = after middle",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after middle",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after middle=",str,0),ret;var pitch=tokenizer.getPitchFromTokens(tokens);pitch.warn&&warn(pitch.warn,str,0),pitch.position&&(multilineVars.clef.verticalPos=pitch.position-6);break;case"transpose":if(tokens.shift(),0===tokens.length)return warn("Expected = after transpose",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after transpose",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after transpose=",str,0),ret;if("number"!==tokens[0].type){warn("Expected number after transpose",str,tokens[0].start);break}multilineVars.clef.transpose=tokens[0].intt,tokens.shift();break;case"stafflines":if(tokens.shift(),0===tokens.length)return warn("Expected = after stafflines",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after stafflines",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after stafflines=",str,0),ret;if("number"!==tokens[0].type){warn("Expected number after stafflines",str,tokens[0].start);break}multilineVars.clef.stafflines=tokens[0].intt,tokens.shift();break;case"staffscale":if(tokens.shift(),0===tokens.length)return warn("Expected = after staffscale",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after staffscale",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after staffscale=",str,0),ret;if("number"!==tokens[0].type){warn("Expected number after staffscale",str,tokens[0].start);break}multilineVars.clef.staffscale=tokens[0].floatt,tokens.shift();break;case"style":if(tokens.shift(),0===tokens.length)return warn("Expected = after style",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after style",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after style=",str,0),ret;switch(tokens[0].token){case"normal":case"harmonic":case"rhythm":case"x":multilineVars.style=tokens[0].token,tokens.shift();break;default:warn("error parsing style element: "+tokens[0].token,str,tokens[0].start)}break;case"clef":if(tokens.shift(),0===tokens.length)return warn("Expected = after clef",str,0),ret;if(token=tokens.shift(),"="!==token.token){warn("Expected = after clef",str,token.start);break}if(0===tokens.length)return warn("Expected parameter after clef=",str,0),ret;case"treble":case"bass":case"alto":case"tenor":case"perc":var clef=tokens.shift();switch(clef.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":clef.token="alto";break;case"F":clef.token="bass";break;case"G":clef.token="treble";break;case"c":clef.token="alto";break;case"f":clef.token="bass";break;case"g":clef.token="treble";break;default:warn("Expected clef name. Found "+clef.token,str,clef.start)}tokens.length>0&&"number"===tokens[0].type&&(clef.token+=tokens[0].token,tokens.shift()),tokens.length>1&&("-"===tokens[0].token||"+"===tokens[0].token)&&"8"===tokens[1].token&&(clef.token+=tokens[0].token+tokens[1].token,tokens.shift(),tokens.shift()),multilineVars.clef={type:clef.token,verticalPos:calcMiddle(clef.token,0)},multilineVars.currentVoice&&void 0!==multilineVars.currentVoice.transpose&&(multilineVars.clef.transpose=multilineVars.currentVoice.transpose),ret.foundClef=!0;break;default:warn("Unknown parameter: "+tokens[0].token,str,tokens[0].start),tokens.shift()}return ret};var setCurrentVoice=function(id){multilineVars.currentVoice=multilineVars.voices[id],tune.setCurrentVoice(multilineVars.currentVoice.staffNum,multilineVars.currentVoice.index)};window.ABCJS.parse.parseKeyVoice.parseVoice=function(line,i,e){var ret=tokenizer.getMeat(line,i,e),start=ret.start,end=ret.end,id=tokenizer.getToken(line,start,end);if(0===id.length)return void warn("Expected a voice id",line,start);var isNew=!1;void 0===multilineVars.voices[id]&&(multilineVars.voices[id]={},isNew=!0,multilineVars.score_is_present&&warn("Can't have an unknown V: id when the %score directive is present",line,start)),start+=id.length,start+=tokenizer.eatWhiteSpace(line,start);for(var staffInfo={startStaff:isNew},addNextTokenToStaffInfo=function(name){var attr=tokenizer.getVoiceToken(line,start,end);void 0!==attr.warn?warn("Expected value for "+name+" in voice: "+attr.warn,line,start):0===attr.token.length&&'"'!==line.charAt(start)?warn("Expected value for "+name+" in voice",line,start):staffInfo[name]=attr.token,start+=attr.len},addNextTokenToVoiceInfo=function(id,name,type){var attr=tokenizer.getVoiceToken(line,start,end);void 0!==attr.warn?warn("Expected value for "+name+" in voice: "+attr.warn,line,start):0===attr.token.length&&'"'!==line.charAt(start)?warn("Expected value for "+name+" in voice",line,start):("number"===type&&(attr.token=parseFloat(attr.token)),multilineVars.voices[id][name]=attr.token),start+=attr.len};start<end;){var token=tokenizer.getVoiceToken(line,start,end);if(start+=token.len,token.warn)warn("Error parsing voice: "+token.warn,line,start);else{var attr=null;switch(token.token){case"clef":case"cl":addNextTokenToStaffInfo("clef");var oct=0;void 0!==staffInfo.clef&&(staffInfo.clef=staffInfo.clef.replace(/[',]/g,""),staffInfo.clef.indexOf("+16")!==-1&&(oct+=14,staffInfo.clef=staffInfo.clef.replace("+16","")),staffInfo.verticalPos=calcMiddle(staffInfo.clef,oct));break;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,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":var oct2=0;staffInfo.clef=token.token.replace(/[',]/g,""),staffInfo.verticalPos=calcMiddle(staffInfo.clef,oct2);break;case"staves":case"stave":case"stv":addNextTokenToStaffInfo("staves");break;case"brace":case"brc":addNextTokenToStaffInfo("brace");break;case"bracket":case"brk":addNextTokenToStaffInfo("bracket");break;case"name":case"nm":addNextTokenToStaffInfo("name");break;case"subname":case"sname":case"snm":addNextTokenToStaffInfo("subname");break;case"merge":staffInfo.startStaff=!1;break;case"stems":attr=tokenizer.getVoiceToken(line,start,end),void 0!==attr.warn?warn("Expected value for stems in voice: "+attr.warn,line,start):"up"===attr.token||"down"===attr.token?multilineVars.voices[id].stem=attr.token:warn("Expected up or down for voice stem",line,start),start+=attr.len;break;case"up":case"down":multilineVars.voices[id].stem=token.token;break;case"middle":case"m":addNextTokenToStaffInfo("verticalPos"),staffInfo.verticalPos=parseMiddle(staffInfo.verticalPos).mid;break;case"gchords":case"gch":multilineVars.voices[id].suppressChords=!0;break;case"space":case"spc":addNextTokenToStaffInfo("spacing");break;case"scale":addNextTokenToVoiceInfo(id,"scale","number");break;case"transpose":addNextTokenToVoiceInfo(id,"transpose","number")}}start+=tokenizer.eatWhiteSpace(line,start)}if((staffInfo.startStaff||0===multilineVars.staves.length)&&(multilineVars.staves.push({index:multilineVars.staves.length,meter:multilineVars.origMeter}),multilineVars.score_is_present||(multilineVars.staves[multilineVars.staves.length-1].numVoices=0)),void 0===multilineVars.voices[id].staffNum){multilineVars.voices[id].staffNum=multilineVars.staves.length-1;var vi=0;for(var v in multilineVars.voices)multilineVars.voices.hasOwnProperty(v)&&multilineVars.voices[v].staffNum===multilineVars.voices[id].staffNum&&vi++;multilineVars.voices[id].index=vi-1}var s=multilineVars.staves[multilineVars.voices[id].staffNum];multilineVars.score_is_present||s.numVoices++,staffInfo.clef&&(s.clef={type:staffInfo.clef,verticalPos:staffInfo.verticalPos}),staffInfo.spacing&&(s.spacing_below_offset=staffInfo.spacing),staffInfo.verticalPos&&(s.verticalPos=staffInfo.verticalPos),staffInfo.name&&(s.name?s.name.push(staffInfo.name):s.name=[staffInfo.name]),staffInfo.subname&&(s.subname?s.subname.push(staffInfo.subname):s.subname=[staffInfo.subname]),setCurrentVoice(id)}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.parse||(window.ABCJS.parse={}),window.ABCJS.parse.tokenizer=function(){this.skipWhiteSpace=function(str){for(var i=0;i<str.length;i++)if(!this.isWhiteSpace(str.charAt(i)))return i;return str.length};var finished=function(str,i){return i>=str.length};this.eatWhiteSpace=function(line,index){for(var i=index;i<line.length;i++)if(!this.isWhiteSpace(line.charAt(i)))return i-index;return i-index},this.getKeyPitch=function(str){var i=this.skipWhiteSpace(str);if(finished(str,i))return{len:0};switch(str.charAt(i)){case"A":return{len:i+1,token:"A"};case"B":return{len:i+1,token:"B"};case"C":return{len:i+1,token:"C"};case"D":return{len:i+1,token:"D"};case"E":return{len:i+1,token:"E"};case"F":return{len:i+1,token:"F"};case"G":return{len:i+1,token:"G"}}return{len:0}},this.getSharpFlat=function(str){if("bass"===str)return{len:0};switch(str.charAt(0)){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(str){var skipAlpha=function(str,start){for(;start<str.length&&(str.charAt(start)>="a"&&str.charAt(start)<="z"||str.charAt(start)>="A"&&str.charAt(start)<="Z");)start++;return start},i=this.skipWhiteSpace(str);if(finished(str,i))return{len:0};var firstThree=str.substring(i,i+3).toLowerCase();switch((firstThree.length>1&&" "===firstThree.charAt(1)||"^"===firstThree.charAt(1)||"_"===firstThree.charAt(1)||"="===firstThree.charAt(1))&&(firstThree=firstThree.charAt(0)),firstThree){case"mix":return{len:skipAlpha(str,i),token:"Mix"};case"dor":return{len:skipAlpha(str,i),token:"Dor"};case"phr":return{len:skipAlpha(str,i),token:"Phr"};case"lyd":return{len:skipAlpha(str,i),token:"Lyd"};case"loc":return{len:skipAlpha(str,i),token:"Loc"};case"aeo":return{len:skipAlpha(str,i),token:"m"};case"maj":return{len:skipAlpha(str,i),token:""};case"ion":return{len:skipAlpha(str,i),token:""};case"min":return{len:skipAlpha(str,i),token:"m"};case"m":return{len:skipAlpha(str,i),token:"m"}}return{len:0}},this.getClef=function(str,bExplicitOnly){var strOrig=str,i=this.skipWhiteSpace(str);if(finished(str,i))return{len:0};var needsClef=!1,strClef=str.substring(i);if(window.ABCJS.parse.startsWith(strClef,"clef=")&&(needsClef=!0,strClef=strClef.substring(5),i+=5),0===strClef.length&&needsClef)return{len:i+5,warn:"No clef specified: "+strOrig};var j=this.skipWhiteSpace(strClef);if(finished(strClef,j))return{len:0};j>0&&(i+=j,strClef=strClef.substring(j));var name=null;if(window.ABCJS.parse.startsWith(strClef,"treble"))name="treble";else if(window.ABCJS.parse.startsWith(strClef,"bass3"))name="bass3";else if(window.ABCJS.parse.startsWith(strClef,"bass"))name="bass";else if(window.ABCJS.parse.startsWith(strClef,"tenor"))name="tenor";else if(window.ABCJS.parse.startsWith(strClef,"alto2"))name="alto2";else if(window.ABCJS.parse.startsWith(strClef,"alto1"))name="alto1";else if(window.ABCJS.parse.startsWith(strClef,"alto"))name="alto";else if(!bExplicitOnly&&needsClef&&window.ABCJS.parse.startsWith(strClef,"none"))name="none";else if(window.ABCJS.parse.startsWith(strClef,"perc"))name="perc";else if(!bExplicitOnly&&needsClef&&window.ABCJS.parse.startsWith(strClef,"C"))name="tenor";else if(!bExplicitOnly&&needsClef&&window.ABCJS.parse.startsWith(strClef,"F"))name="bass";else{if(bExplicitOnly||!needsClef||!window.ABCJS.parse.startsWith(strClef,"G"))return{len:i+5,warn:"Unknown clef specified: "+strOrig};name="treble"}return strClef=strClef.substring(name.length),j=this.isMatch(strClef,"+8"),j>0?name+="+8":(j=this.isMatch(strClef,"-8"),j>0&&(name+="-8")),{len:i+name.length,token:name,explicit:needsClef}},this.getBarLine=function(line,i){switch(line.charAt(i)){case"]":switch(++i,line.charAt(i)){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++i,line.charAt(i)>="1"&&line.charAt(i)<="9"||'"'===line.charAt(i)?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(++i,line.charAt(i)){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++i,line.charAt(i)){case"]":switch(++i,line.charAt(i)){case"|":return++i,":"===line.charAt(i)?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}break;case"|":return++i,":"===line.charAt(i)?{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(++i,"|"!==line.charAt(i))return line.charAt(i)>="1"&&line.charAt(i)<="9"||'"'===line.charAt(i)?{len:1,token:"bar_invisible"}:{len:0};switch(++i,line.charAt(i)){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(++i,line.charAt(i)){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++i,":"===line.charAt(i)?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var colons=0;":"===line.charAt(i+colons);)colons++;return{len:1+colons,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(str,legalChars){for(var i=0;i<str.length;i++)if(legalChars.indexOf(str.charAt(i))<0)return{len:i,token:str.substring(0,i)};return{len:i,token:str}},this.getToken=function(str,start,end){for(var i=start;i<end&&!this.isWhiteSpace(str.charAt(i));)i++;return str.substring(start,i)},this.isMatch=function(str,match){var i=this.skipWhiteSpace(str);return finished(str,i)?0:window.ABCJS.parse.startsWith(str.substring(i),match)?i+match.length:0;
+},this.getPitchFromTokens=function(tokens){var ret={},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};if(ret.position=pitches[tokens[0].token],void 0===ret.position)return{warn:"Pitch expected. Found: "+tokens[0].token};for(tokens.shift();tokens.length;)switch(tokens[0].token){case",":ret.position-=7,tokens.shift();break;case"'":ret.position+=7,tokens.shift();break;default:return ret}return ret},this.getKeyAccidentals2=function(tokens){for(var accs;tokens.length>0;){var acc;if("^"===tokens[0].token){if(acc="sharp",tokens.shift(),0===tokens.length)return{accs:accs,warn:"Expected note name after "+acc};switch(tokens[0].token){case"^":acc="dblsharp",tokens.shift();break;case"/":acc="quartersharp",tokens.shift()}}else if("="===tokens[0].token)acc="natural",tokens.shift();else{if("_"!==tokens[0].token)return{accs:accs};if(acc="flat",tokens.shift(),0===tokens.length)return{accs:accs,warn:"Expected note name after "+acc};switch(tokens[0].token){case"_":acc="dblflat",tokens.shift();break;case"/":acc="quarterflat",tokens.shift()}}if(0===tokens.length)return{accs:accs,warn:"Expected note name after "+acc};switch(tokens[0].token.charAt(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":void 0===accs&&(accs=[]),accs.push({acc:acc,note:tokens[0].token.charAt(0)}),1===tokens[0].token.length?tokens.shift():tokens[0].token=tokens[0].token.substring(1);break;default:return{accs:accs,warn:"Expected note name after "+acc+" Found: "+tokens[0].token}}}return{accs:accs}},this.getKeyAccidental=function(str){var accTranslation={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},i=this.skipWhiteSpace(str);if(finished(str,i))return{len:0};var acc=null;switch(str.charAt(i)){case"^":case"_":case"=":acc=str.charAt(i);break;default:return{len:0}}if(i++,finished(str,i))return{len:1,warn:"Expected note name after accidental"};switch(str.charAt(i)){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:i+1,token:{acc:accTranslation[acc],note:str.charAt(i)}};case"^":case"_":case"/":if(acc+=str.charAt(i),i++,finished(str,i))return{len:2,warn:"Expected note name after accidental"};switch(str.charAt(i)){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:i+1,token:{acc:accTranslation[acc],note:str.charAt(i)}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(ch){return" "===ch||"\t"===ch||""===ch},this.getMeat=function(line,start,end){var comment=line.indexOf("%",start);for(comment>=0&&comment<end&&(end=comment);start<end&&(" "===line.charAt(start)||"\t"===line.charAt(start)||""===line.charAt(start));)start++;for(;start<end&&(" "===line.charAt(end-1)||"\t"===line.charAt(end-1)||""===line.charAt(end-1));)end--;return{start:start,end:end}};var isLetter=function(ch){return ch>="A"&&ch<="Z"||ch>="a"&&ch<="z"},isNumber=function(ch){return ch>="0"&&ch<="9"};this.tokenize=function(line,start,end,alphaUntilWhiteSpace){var ret=this.getMeat(line,start,end);start=ret.start,end=ret.end;for(var i,tokens=[];start<end;){if('"'===line.charAt(start)){for(i=start+1;i<end&&'"'!==line.charAt(i);)i++;tokens.push({type:"quote",token:line.substring(start+1,i),start:start+1,end:i}),i++}else if(isLetter(line.charAt(start))){if(i=start+1,alphaUntilWhiteSpace)for(;i<end&&!this.isWhiteSpace(line.charAt(i));)i++;else for(;i<end&&isLetter(line.charAt(i));)i++;tokens.push({type:"alpha",token:line.substring(start,i),continueId:isNumber(line.charAt(i)),start:start,end:i}),start=i+1}else if("."===line.charAt(start)&&isNumber(line.charAt(i+1))){i=start+1;for(var int2=null,float2=null;i<end&&isNumber(line.charAt(i));)i++;float2=parseFloat(line.substring(start,i)),tokens.push({type:"number",token:line.substring(start,i),intt:int2,floatt:float2,continueId:isLetter(line.charAt(i)),start:start,end:i}),start=i+1}else if(isNumber(line.charAt(start))||"-"===line.charAt(start)&&isNumber(line.charAt(i+1))){i=start+1;for(var intt=null,floatt=null;i<end&&isNumber(line.charAt(i));)i++;if("."===line.charAt(i)&&isNumber(line.charAt(i+1)))for(i++;i<end&&isNumber(line.charAt(i));)i++;else intt=parseInt(line.substring(start,i));floatt=parseFloat(line.substring(start,i)),tokens.push({type:"number",token:line.substring(start,i),intt:intt,floatt:floatt,continueId:isLetter(line.charAt(i)),start:start,end:i}),start=i+1}else" "===line.charAt(start)||"\t"===line.charAt(start)?i=start+1:(tokens.push({type:"punct",token:line.charAt(start),start:start,end:start+1}),i=start+1);start=i}return tokens},this.getVoiceToken=function(line,start,end){for(var i=start;i<end&&this.isWhiteSpace(line.charAt(i))||"="===line.charAt(i);)i++;if('"'===line.charAt(i)){var close=line.indexOf('"',i+1);return close===-1||close>=end?{len:1,err:"Missing close quote"}:{len:close-start+1,token:this.translateString(line.substring(i+1,close))}}for(var ii=i;ii<end&&!this.isWhiteSpace(line.charAt(ii))&&"="!==line.charAt(ii);)ii++;return{len:ii-start+1,token:line.substring(i,ii)}};var charMap={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~n":"ñ","=s":"š",vs:"š",vz:"ž"},charMap1={"#":"♯",b:"♭","=":"♮"},charMap2={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:" ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};this.translateString=function(str){var arr=str.split("\\");if(1===arr.length)return str;var out=null;return window.ABCJS.parse.each(arr,function(s){if(null===out)out=s;else{var c=charMap[s.substring(0,2)];void 0!==c?out+=c+s.substring(2):(c=charMap2[s.substring(0,3)],void 0!==c?out+=c+s.substring(3):(c=charMap1[s.substring(0,1)],out+=void 0!==c?c+s.substring(1):"\\"+s))}}),out},this.getNumber=function(line,index){for(var num=0;index<line.length;)switch(line.charAt(index)){case"0":num*=10,index++;break;case"1":num=10*num+1,index++;break;case"2":num=10*num+2,index++;break;case"3":num=10*num+3,index++;break;case"4":num=10*num+4,index++;break;case"5":num=10*num+5,index++;break;case"6":num=10*num+6,index++;break;case"7":num=10*num+7,index++;break;case"8":num=10*num+8,index++;break;case"9":num=10*num+9,index++;break;default:return{num:num,index:index}}return{num:num,index:index}},this.getFraction=function(line,index){var num=1,den=1;if("/"!==line.charAt(index)){var ret=this.getNumber(line,index);num=ret.num,index=ret.index}if("/"===line.charAt(index)){if(index++,"/"===line.charAt(index)){for(var div=.5;"/"===line.charAt(index++);)div/=2;return{value:num*div,index:index-1}}var iSave=index,ret2=this.getNumber(line,index);0===ret2.num&&iSave===index&&(ret2.num=2),0!==ret2.num&&(den=ret2.num),index=ret2.index}return{value:num/den,index:index}},this.theReverser=function(str){return window.ABCJS.parse.endsWith(str,", The")?"The "+str.substring(0,str.length-5):window.ABCJS.parse.endsWith(str,", A")?"A "+str.substring(0,str.length-3):str},this.stripComment=function(str){var i=str.indexOf("%");return i>=0?window.ABCJS.parse.strip(str.substring(0,i)):window.ABCJS.parse.strip(str)},this.getInt=function(str){var x=parseInt(str);if(isNaN(x))return{digits:0};var s=""+x,i=str.indexOf(s);return{value:x,digits:i+s.length}},this.getFloat=function(str){var x=parseFloat(str);if(isNaN(x))return{digits:0};var s=""+x,i=str.indexOf(s);return{value:x,digits:i+s.length}},this.getMeasurement=function(tokens){if(0===tokens.length)return{used:0};var used=1,num="";if("-"===tokens[0].token)tokens.shift(),num="-",used++;else if("number"!==tokens[0].type)return{used:0};if(num+=tokens.shift().token,0===tokens.length)return{used:1,value:parseInt(num)};var x=tokens.shift();if("."===x.token){if(used++,0===tokens.length)return{used:used,value:parseInt(num)};if("number"===tokens[0].type&&(x=tokens.shift(),num=num+"."+x.token,used++,0===tokens.length))return{used:used,value:parseFloat(num)};x=tokens.shift()}switch(x.token){case"pt":return{used:used+1,value:parseFloat(num)};case"cm":return{used:used+1,value:parseFloat(num)/2.54*72};case"in":return{used:used+1,value:72*parseFloat(num)};default:return tokens.unshift(x),{used:used,value:parseFloat(num)}}return{used:0}};var substInChord=function(str){for(;str.indexOf("\\n")!==-1;)str=str.replace("\\n","\n");return str};this.getBrackettedSubstring=function(line,i,maxErrorChars,_matchChar){for(var matchChar=_matchChar||line.charAt(i),pos=i+1;pos<line.length&&line.charAt(pos)!==matchChar;)++pos;return line.charAt(pos)===matchChar?[pos-i+1,substInChord(line.substring(i+1,pos)),!0]:(pos=i+maxErrorChars,pos>line.length-1&&(pos=line.length-1),[pos-i+1,substInChord(line.substring(i+1,pos)),!1])}},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.AbsoluteElement=function(abcelem,duration,minspacing,type,tuneNumber){this.tuneNumber=tuneNumber,this.abcelem=abcelem,this.duration=duration,this.minspacing=minspacing||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=type,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},ABCJS.write.AbsoluteElement.prototype.setUpperAndLowerElements=function(specialYResolved){for(var i=0;i<this.children.length;i++){var child=this.children[i];for(var key in this.specialY)this.specialY.hasOwnProperty(key)&&child[key]&&(child.pitch=specialYResolved[key])}},ABCJS.write.AbsoluteElement.prototype.getMinWidth=function(){return this.w},ABCJS.write.AbsoluteElement.prototype.getExtraWidth=function(){return-this.extraw},ABCJS.write.AbsoluteElement.prototype.addExtra=function(extra){extra.dx<this.extraw&&(this.extraw=extra.dx),this.extra[this.extra.length]=extra,this.addChild(extra)},ABCJS.write.AbsoluteElement.prototype.addHead=function(head){head.dx<this.extraw&&(this.extraw=head.dx),this.heads[this.heads.length]=head,this.addRight(head)},ABCJS.write.AbsoluteElement.prototype.addRight=function(right){right.dx+right.w>this.w&&(this.w=right.dx+right.w),this.right[this.right.length]=right,this.addChild(right)},ABCJS.write.AbsoluteElement.prototype.addCentered=function(elem){var half=elem.w/2;-half<this.extraw&&(this.extraw=-half),this.extra[this.extra.length]=elem,elem.dx+half>this.w&&(this.w=elem.dx+half),this.right[this.right.length]=elem,this.addChild(elem)},ABCJS.write.AbsoluteElement.prototype.setLimit=function(member,child){child[member]&&(this.specialY[member]?this.specialY[member]=Math.max(this.specialY[member],child[member]):this.specialY[member]=child[member])},ABCJS.write.AbsoluteElement.prototype.addChild=function(child){child.parent=this,this.children[this.children.length]=child,this.pushTop(child.top),this.pushBottom(child.bottom),this.setLimit("tempoHeightAbove",child),this.setLimit("partHeightAbove",child),this.setLimit("volumeHeightAbove",child),this.setLimit("dynamicHeightAbove",child),this.setLimit("endingHeightAbove",child),this.setLimit("chordHeightAbove",child),this.setLimit("lyricHeightAbove",child),this.setLimit("lyricHeightBelow",child),this.setLimit("chordHeightBelow",child),this.setLimit("volumeHeightBelow",child),this.setLimit("dynamicHeightBelow",child)},ABCJS.write.AbsoluteElement.prototype.pushTop=function(top){void 0!==top&&(void 0===this.top?this.top=top:this.top=Math.max(top,this.top))},ABCJS.write.AbsoluteElement.prototype.pushBottom=function(bottom){void 0!==bottom&&(void 0===this.bottom?this.bottom=bottom:this.bottom=Math.min(bottom,this.bottom))},ABCJS.write.AbsoluteElement.prototype.setX=function(x){this.x=x;for(var i=0;i<this.children.length;i++)this.children[i].setX(x)},ABCJS.write.AbsoluteElement.prototype.setHint=function(){this.hint=!0},ABCJS.write.AbsoluteElement.prototype.draw=function(renderer,bartop){if(this.elemset=renderer.paper.set(),!this.invisible){renderer.beginGroup();for(var i=0;i<this.children.length;i++)ABCJS.write.debugPlacement&&"ornament"===this.children[i].klass&&renderer.printShadedBox(this.x,renderer.calcY(this.children[i].top),this.w,renderer.calcY(this.children[i].bottom)-renderer.calcY(this.children[i].top),"rgba(0,0,200,0.3)"),this.elemset.push(this.children[i].draw(renderer,bartop));this.elemset.push(renderer.endGroup(this.type)),this.klass&&this.setClass("mark","","#00ff00"),this.hint&&this.setClass("abcjs-hint","",null);var color=ABCJS.write.debugPlacement?"rgba(0,0,0,0.3)":"rgba(0,0,0,0)",target=renderer.printShadedBox(this.x,renderer.calcY(this.top),this.w,renderer.calcY(this.bottom)-renderer.calcY(this.top),color),self=this,controller=renderer.controller;target.mouseup(function(){controller.notifySelect(self,self.tuneNumber)}),this.abcelem.abselem=this;var spacing=ABCJS.write.spacing.STEP,start=function(){this.dy=0},move=function(dx,dy){dy=Math.round(dy/spacing)*spacing,this.translate(0,-this.dy),this.dy=dy,this.translate(0,this.dy)},up=function(){if(self.abcelem.pitches){var delta=-Math.round(this.dy/spacing);self.abcelem.pitches[0].pitch+=delta,self.abcelem.pitches[0].verticalPos+=delta,controller.notifyChange()}};"note"===this.abcelem.el_type&&controller.editable&&this.elemset.drag(move,start,up)}},ABCJS.write.AbsoluteElement.prototype.isIE=!1,ABCJS.write.AbsoluteElement.prototype.setClass=function(addClass,removeClass,color){if(null!==color&&this.elemset.attr({fill:color}),!this.isIE)for(var i=0;i<this.elemset.length;i++)if(this.elemset[i][0].setAttribute){var kls=this.elemset[i][0].getAttribute("class");kls||(kls=""),kls=kls.replace(removeClass,""),kls=kls.replace(addClass,""),addClass.length>0&&(kls.length>0&&" "!==kls.charAt(kls.length-1)&&(kls+=" "),kls+=addClass),this.elemset[i][0].setAttribute("class",kls)}},ABCJS.write.AbsoluteElement.prototype.highlight=function(klass,color){void 0===klass&&(klass="note_selected"),void 0===color&&(color="#ff0000"),this.setClass(klass,"",color)},ABCJS.write.AbsoluteElement.prototype.unhighlight=function(klass,color){void 0===klass&&(klass="note_selected"),void 0===color&&(color="#000000"),this.setClass("",klass,color)},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),function(){"use strict";ABCJS.write.getDuration=function(elem){var d=0;return elem.duration&&(d=elem.duration),d},ABCJS.write.getDurlog=function(duration){return void 0===duration?0:Math.floor(Math.log(duration)/Math.log(2))},ABCJS.write.AbstractEngraver=function(bagpipes,renderer,tuneNumber){this.decoration=new ABCJS.write.Decoration,this.renderer=renderer,this.tuneNumber=tuneNumber,this.isBagpipes=bagpipes,this.chartable={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"},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"},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"}},this.reset()},ABCJS.write.AbstractEngraver.prototype.reset=function(){this.slurs={},this.ties=[],this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.s=0,this.v=0,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.pos=void 0,this.roomtaken=void 0,this.roomtakenright=void 0,this.staffgroup=void 0,this.startlimitelem=void 0,this.stemdir=void 0,this.voice=void 0},ABCJS.write.AbstractEngraver.prototype.setStemHeight=function(heightInPixels){this.stemHeight=heightInPixels/ABCJS.write.spacing.STEP},ABCJS.write.AbstractEngraver.prototype.getCurrentVoiceId=function(){return"s"+this.s+"v"+this.v},ABCJS.write.AbstractEngraver.prototype.pushCrossLineElems=function(){this.slursbyvoice[this.getCurrentVoiceId()]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId()]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId()]=this.partstartelem},ABCJS.write.AbstractEngraver.prototype.popCrossLineElems=function(){this.slurs=this.slursbyvoice[this.getCurrentVoiceId()]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId()]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId()]},ABCJS.write.AbstractEngraver.prototype.getElem=function(){return this.abcline.length<=this.pos?null:this.abcline[this.pos]},ABCJS.write.AbstractEngraver.prototype.getNextElem=function(){return this.abcline.length<=this.pos+1?null:this.abcline[this.pos+1]},ABCJS.write.AbstractEngraver.prototype.containsLyrics=function(staves){for(var i=0;i<staves.length;i++)for(var j=0;j<staves[i].voices.length;j++)for(var k=0;k<staves[i].voices[j].length;k++){var el=staves[i].voices[j][k];if(el.lyric)return void(el.positioning&&"below"!==el.positioning.vocalPosition||(this.hasVocals=!0))}},ABCJS.write.AbstractEngraver.prototype.createABCLine=function(staffs,tempo){for(this.minY=2,this.containsLyrics(staffs),this.staffgroup=new ABCJS.write.StaffGroupElement,this.tempoSet=!1,this.s=0;this.s<staffs.length;this.s++)ABCJS.write.hint&&this.restoreState(),ABCJS.write.hint=!1,this.createABCStaff(staffs[this.s],tempo);return this.staffgroup},ABCJS.write.AbstractEngraver.prototype.createABCStaff=function(abcstaff,tempo){for(this.v=0;this.v<abcstaff.voices.length;this.v++){this.voice=new ABCJS.write.VoiceElement(this.v,abcstaff.voices.length),0===this.v?(this.voice.barfrom="start"===abcstaff.connectBarLines||"continue"===abcstaff.connectBarLines,this.voice.barto="continue"===abcstaff.connectBarLines||"end"===abcstaff.connectBarLines):this.voice.duplicate=!0,abcstaff.title&&abcstaff.title[this.v]&&(this.voice.header=abcstaff.title[this.v]);var clef=ABCJS.write.createClef(abcstaff.clef,this.tuneNumber);clef&&(0===this.v&&abcstaff.barNumber&&this.addMeasureNumber(abcstaff.barNumber,clef),this.voice.addChild(clef));var keySig=ABCJS.write.createKeySignature(abcstaff.key,this.tuneNumber);if(keySig&&(this.voice.addChild(keySig),this.startlimitelem=keySig),abcstaff.meter){var ts=ABCJS.write.createTimeSignature(abcstaff.meter,this.tuneNumber);this.voice.addChild(ts),this.startlimitelem=ts}this.voice.duplicate&&(this.voice.children=[]);var staffLines=abcstaff.clef.stafflines||0===abcstaff.clef.stafflines?abcstaff.clef.stafflines:5;this.staffgroup.addVoice(this.voice,this.s,staffLines),this.createABCVoice(abcstaff.voices[this.v],tempo),this.staffgroup.setStaffLimits(this.voice),"start"===abcstaff.brace?this.staffgroup.brace=new ABCJS.write.BraceElem(1,!0):"end"===abcstaff.brace&&this.staffgroup.brace?this.staffgroup.brace.increaseStavesIncluded():"continue"===abcstaff.brace&&this.staffgroup.brace&&this.staffgroup.brace.increaseStavesIncluded()}},ABCJS.write.AbstractEngraver.prototype.createABCVoice=function(abcline,tempo){this.popCrossLineElems(),this.stemdir=this.isBagpipes?"down":null,this.abcline=abcline,this.partstartelem&&(this.partstartelem=new ABCJS.write.EndingElem("",null,null),this.voice.addOther(this.partstartelem));for(var slur in this.slurs)this.slurs.hasOwnProperty(slur)&&(this.slurs[slur]=new ABCJS.write.TieElem(null,null,this.slurs[slur].above,this.slurs[slur].force,!1),ABCJS.write.hint&&this.slurs[slur].setHint(),this.voice.addOther(this.slurs[slur]));for(var i=0;i<this.ties.length;i++)this.ties[i]=new ABCJS.write.TieElem(null,null,this.ties[i].above,this.ties[i].force,!0),ABCJS.write.hint&&this.ties[i].setHint(),this.voice.addOther(this.ties[i]);for(this.pos=0;this.pos<this.abcline.length;this.pos++){var abselems=this.createABCElement();if(abselems)for(i=0;i<abselems.length;i++)this.tempoSet||!tempo||tempo.suppress||(this.tempoSet=!0,abselems[i].addChild(new ABCJS.write.TempoElement(tempo,this.tuneNumber))),this.voice.addChild(abselems[i])}this.pushCrossLineElems()},ABCJS.write.AbstractEngraver.prototype.saveState=function(){this.tiesSave=ABCJS.parse.cloneArray(this.ties),this.slursSave=ABCJS.parse.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=ABCJS.parse.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=ABCJS.parse.cloneHashOfArrayOfHash(this.tiesbyvoice)},ABCJS.write.AbstractEngraver.prototype.restoreState=function(){this.ties=ABCJS.parse.cloneArray(this.tiesSave),this.slurs=ABCJS.parse.cloneHashOfHash(this.slursSave),this.slursbyvoice=ABCJS.parse.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=ABCJS.parse.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},ABCJS.write.AbstractEngraver.prototype.createABCElement=function(){var elemset=[],elem=this.getElem();switch(elem.el_type){case"note":elemset=this.createBeam();break;case"bar":elemset[0]=this.createBarLine(elem),this.voice.duplicate&&(elemset[0].invisible=!0);break;case"meter":elemset[0]=ABCJS.write.createTimeSignature(elem,this.tuneNumber),this.startlimitelem=elemset[0],this.voice.duplicate&&(elemset[0].invisible=!0);break;case"clef":if(elemset[0]=ABCJS.write.createClef(elem,this.tuneNumber),!elemset[0])return null;this.voice.duplicate&&(elemset[0].invisible=!0);break;case"key":var absKey=ABCJS.write.createKeySignature(elem,this.tuneNumber);absKey&&(elemset[0]=absKey,this.startlimitelem=elemset[0]),this.voice.duplicate&&(elemset[0].invisible=!0);break;case"stem":this.stemdir=elem.direction;break;case"part":var abselem=new ABCJS.write.AbsoluteElement(elem,0,0,"part",this.tuneNumber),dim=this.renderer.getTextSize(elem.title,"partsfont","part");abselem.addChild(new ABCJS.write.RelativeElement(elem.title,0,0,void 0,{type:"part",height:dim.height/ABCJS.write.spacing.STEP})),elemset[0]=abselem;break;case"tempo":var abselem3=new ABCJS.write.AbsoluteElement(elem,0,0,"tempo",this.tuneNumber);abselem3.addChild(new ABCJS.write.TempoElement(elem,this.tuneNumber)),elemset[0]=abselem3;break;case"style":"normal"===elem.head?delete this.style:this.style=elem.head;break;case"hint":ABCJS.write.hint=!0,this.saveState();break;case"midi":break;default:var abselem2=new ABCJS.write.AbsoluteElement(elem,0,0,"unsupported",this.tuneNumber);abselem2.addChild(new ABCJS.write.RelativeElement("element type "+elem.el_type,0,0,void 0,{type:"debug"})),elemset[0]=abselem2}return elemset},ABCJS.write.AbstractEngraver.prototype.calcBeamDir=function(){if(this.stemdir)return this.stemdir;for(var abselem,beamelem=new ABCJS.write.BeamElem(this.stemHeight,this.stemdir),oldPos=this.pos;this.getElem()&&(abselem=this.createNote(this.getElem(),!0,!0),beamelem.add(abselem),!this.getElem().endBeam);)this.pos++;var dir=beamelem.calcDir();return this.pos=oldPos,dir?"up":"down"},ABCJS.write.AbstractEngraver.prototype.createBeam=function(){var abselemset=[];if(this.getElem().startBeam&&!this.getElem().endBeam){var dir=this.calcBeamDir(),beamelem=new ABCJS.write.BeamElem(this.stemHeight,dir);ABCJS.write.hint&&beamelem.setHint();var oldDir=this.stemdir;for(this.stemdir=dir;this.getElem();){var abselem=this.createNote(this.getElem(),!0);if(abselemset.push(abselem),beamelem.add(abselem),this.triplet&&this.triplet.isClosed()&&(this.voice.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1),this.getElem().endBeam)break;this.pos++}this.stemdir=oldDir,this.voice.addBeam(beamelem)}else abselemset[0]=this.createNote(this.getElem()),this.triplet&&this.triplet.isClosed()&&(this.voice.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);return abselemset},ABCJS.write.sortPitch=function(elem){var sorted;do{sorted=!0;for(var p=0;p<elem.pitches.length-1;p++)if(elem.pitches[p].pitch>elem.pitches[p+1].pitch){sorted=!1;var tmp=elem.pitches[p];elem.pitches[p]=elem.pitches[p+1],elem.pitches[p+1]=tmp}}while(!sorted)},ABCJS.write.ledgerLines=function(abselem,minPitch,maxPitch,isRest,c,additionalLedgers,dir,dx,scale){for(var i=maxPitch;i>11;i--)i%2!==0||isRest||abselem.addChild(new ABCJS.write.RelativeElement(null,dx,(ABCJS.write.glyphs.getSymbolWidth(c)+4)*scale,i,{type:"ledger"}));for(i=minPitch;i<1;i++)i%2!==0||isRest||abselem.addChild(new ABCJS.write.RelativeElement(null,dx,(ABCJS.write.glyphs.getSymbolWidth(c)+4)*scale,i,{type:"ledger"}));for(i=0;i<additionalLedgers.length;i++){var ofs=ABCJS.write.glyphs.getSymbolWidth(c);"down"===dir&&(ofs=-ofs),abselem.addChild(new ABCJS.write.RelativeElement(null,ofs+dx,(ABCJS.write.glyphs.getSymbolWidth(c)+4)*scale,additionalLedgers[i],{type:"ledger"}))}},ABCJS.write.AbstractEngraver.prototype.createNote=function(elem,nostem,dontDraw){var notehead=null,grace=null;this.roomtaken=0,this.roomtakenright=0;var p,i,pp,width,p1,p2,dx,dotshiftx=0,c="",flag=null,additionalLedgers=[],duration=ABCJS.write.getDuration(elem),zeroDuration=!1;0===duration&&(zeroDuration=!0,duration=.25,nostem=!0);for(var durlog=Math.floor(Math.log(duration)/Math.log(2)),dot=0,tot=Math.pow(2,durlog),inc=tot/2;tot<duration;dot++,tot+=inc,inc/=2);elem.startTriplet&&(2===elem.startTriplet?this.tripletmultiplier=1.5:this.tripletmultiplier=(elem.startTriplet-1)/elem.startTriplet);var abselem=new ABCJS.write.AbsoluteElement(elem,duration*this.tripletmultiplier,1,"note",this.tuneNumber);if(ABCJS.write.hint&&abselem.setHint(),elem.rest){var restpitch=7;"down"===this.stemdir&&(restpitch=3),"up"===this.stemdir&&(restpitch=11);var numLines=this.staffgroup.staffs[this.staffgroup.staffs.length-1].lines;switch(1===numLines&&(restpitch=duration<.5?7:duration<1?6.8:4.8),elem.rest.type){case"whole":c=this.chartable.rest[0],elem.averagepitch=restpitch,elem.minpitch=restpitch,elem.maxpitch=restpitch,dot=0;break;case"rest":c=this.chartable.rest[-durlog],elem.averagepitch=restpitch,elem.minpitch=restpitch,elem.maxpitch=restpitch;break;case"invisible":case"spacer":c="",elem.averagepitch=restpitch,elem.minpitch=restpitch,elem.maxpitch=restpitch}dontDraw||(notehead=this.createNoteHead(abselem,c,{verticalPos:restpitch},null,0,-this.roomtaken,null,dot,0,1)),notehead&&abselem.addHead(notehead),this.roomtaken+=this.accidentalshiftx,this.roomtakenright=Math.max(this.roomtakenright,this.dotshiftx)}else{ABCJS.write.sortPitch(elem);var sum=0;for(p=0,pp=elem.pitches.length;p<pp;p++)sum+=elem.pitches[p].verticalPos;elem.averagepitch=sum/elem.pitches.length,elem.minpitch=elem.pitches[0].verticalPos,this.minY=Math.min(elem.minpitch,this.minY),elem.maxpitch=elem.pitches[elem.pitches.length-1].verticalPos;var dir=elem.averagepitch>=6?"down":"up";this.stemdir&&(dir=this.stemdir);var style=elem.style?elem.style:this.style;style&&"normal"!==style||(style="note");var noteSymbol;for(noteSymbol=zeroDuration?this.chartable[style].nostem:this.chartable[style][-durlog],noteSymbol||console.log("noteSymbol:",style,durlog,zeroDuration),p="down"===dir?elem.pitches.length-2:1;"down"===dir?p>=0:p<elem.pitches.length;p="down"===dir?p-1:p+1){var prev=elem.pitches["down"===dir?p+1:p-1],curr=elem.pitches[p],delta="down"===dir?prev.pitch-curr.pitch:curr.pitch-prev.pitch;delta<=1&&!prev.printer_shift&&(curr.printer_shift=delta?"different":"same",(curr.verticalPos>11||curr.verticalPos<1)&&additionalLedgers.push(curr.verticalPos-curr.verticalPos%2),"down"===dir?this.roomtaken=ABCJS.write.glyphs.getSymbolWidth(noteSymbol)+2:dotshiftx=ABCJS.write.glyphs.getSymbolWidth(noteSymbol)+2)}for(this.accidentalSlot=[],p=0;p<elem.pitches.length;p++){nostem||(flag="down"===dir&&0!==p||"up"===dir&&p!==pp-1?null:this.chartable["down"===dir?"dflags":"uflags"][-durlog]),c=noteSymbol,elem.pitches[p].highestVert=elem.pitches[p].verticalPos;var isTopWhenStemIsDown=("up"===this.stemdir||"up"===dir)&&0===p,isBottomWhenStemIsUp=("down"===this.stemdir||"down"===dir)&&p===pp-1;if(!dontDraw&&(isTopWhenStemIsDown||isBottomWhenStemIsUp)){if((elem.startSlur||1===pp)&&(elem.pitches[p].highestVert=elem.pitches[pp-1].verticalPos,"up"!==this.stemdir&&"up"!==dir||(elem.pitches[p].highestVert+=6)),elem.startSlur)for(elem.pitches[p].startSlur||(elem.pitches[p].startSlur=[]),i=0;i<elem.startSlur.length;i++)elem.pitches[p].startSlur.push(elem.startSlur[i]);if(!dontDraw&&elem.endSlur)for(elem.pitches[p].highestVert=elem.pitches[pp-1].verticalPos,"up"!==this.stemdir&&"up"!==dir||(elem.pitches[p].highestVert+=6),elem.pitches[p].endSlur||(elem.pitches[p].endSlur=[]),i=0;i<elem.endSlur.length;i++)elem.pitches[p].endSlur.push(elem.endSlur[i])}var hasStem=!nostem&&durlog<=-1;dontDraw||(notehead=this.createNoteHead(abselem,c,elem.pitches[p],hasStem?dir:null,0,-this.roomtaken,flag,dot,dotshiftx,1)),notehead&&abselem.addHead(notehead),this.roomtaken+=this.accidentalshiftx,this.roomtakenright=Math.max(this.roomtakenright,this.dotshiftx)}hasStem&&(p1="down"===dir?elem.minpitch-7:elem.minpitch+1/3,p1>6&&!this.stemdir&&(p1=6),p2="down"===dir?elem.maxpitch-1/3:elem.maxpitch+7,p2<6&&!this.stemdir&&(p2=6),dx="down"===dir||0===abselem.heads.length?0:abselem.heads[0].w,width="down"===dir?1:-1,"noteheads.slash.quarter"===notehead.c&&("down"===dir?p2-=1:p1+=1),abselem.addExtra(new ABCJS.write.RelativeElement(null,dx,0,p1,{type:"stem",pitch2:p2,linewidth:width})),this.minY=Math.min(p1,this.minY),this.minY=Math.min(p2,this.minY))}if(void 0!==elem.lyric){var lyricStr="";window.ABCJS.parse.each(elem.lyric,function(ly){lyricStr+=ly.syllable+ly.divider+"\n"});var lyricDim=this.renderer.getTextSize(lyricStr,"vocalfont","abc-lyric"),position=elem.positioning?elem.positioning.vocalPosition:"below";abselem.addCentered(new ABCJS.write.RelativeElement(lyricStr,0,lyricDim.width,void 0,{type:"lyric",position:position,height:lyricDim.height/ABCJS.write.spacing.STEP}))}if(!dontDraw&&void 0!==elem.gracenotes){var gracescale=.6,graceScaleStem=.7,gracebeam=null;elem.gracenotes.length>1&&(gracebeam=new ABCJS.write.BeamElem(this.stemHeight*graceScaleStem,"grace",this.isBagpipes),
+ABCJS.write.hint&&gracebeam.setHint(),gracebeam.mainNote=abselem);var graceoffsets=[];for(i=elem.gracenotes.length-1;i>=0;i--)this.roomtaken+=10,graceoffsets[i]=this.roomtaken,elem.gracenotes[i].accidental&&(this.roomtaken+=7);for(i=0;i<elem.gracenotes.length;i++){var gracepitch=elem.gracenotes[i].verticalPos;if(flag=gracebeam?null:this.chartable.uflags[this.isBagpipes?5:3],grace=this.createNoteHead(abselem,"noteheads.quarter",elem.gracenotes[i],"up",-graceoffsets[i],-graceoffsets[i],flag,0,0,gracescale),abselem.addExtra(grace),elem.gracenotes[i].acciaccatura){var pos=elem.gracenotes[i].verticalPos+7*gracescale,dAcciaccatura=gracebeam?5:6;abselem.addRight(new ABCJS.write.RelativeElement("flags.ugrace",-graceoffsets[i]+dAcciaccatura,0,pos,{scalex:gracescale,scaley:gracescale}))}if(gracebeam){var graceDuration=elem.gracenotes[i].duration/2;this.isBagpipes&&(graceDuration/=2);var pseudoabselem={heads:[grace],abcelem:{averagepitch:gracepitch,minpitch:gracepitch,maxpitch:gracepitch,duration:graceDuration}};gracebeam.add(pseudoabselem)}else p1=gracepitch+1/3*gracescale,p2=gracepitch+7*gracescale,dx=grace.dx+grace.w,width=-.6,abselem.addExtra(new ABCJS.write.RelativeElement(null,dx,0,p1,{type:"stem",pitch2:p2,linewidth:width}));ABCJS.write.ledgerLines(abselem,gracepitch,gracepitch,!1,"noteheads.quarter",[],!0,grace.dx-1,.6),0!==i||this.isBagpipes||elem.rest&&("spacer"===elem.rest.type||"invisible"===elem.rest.type)||this.voice.addOther(new ABCJS.write.TieElem(grace,notehead,!1,!0,!1))}gracebeam&&this.voice.addBeam(gracebeam)}!dontDraw&&elem.decoration&&this.decoration.createDecoration(this.voice,elem.decoration,abselem.top,notehead?notehead.w:0,abselem,this.roomtaken,dir,abselem.bottom,elem.positioning,this.hasVocals),elem.barNumber&&abselem.addChild(new ABCJS.write.RelativeElement(elem.barNumber,-10,0,0,{type:"barNumber"})),ABCJS.write.ledgerLines(abselem,elem.minpitch,elem.maxpitch,elem.rest,c,additionalLedgers,dir,-2,1);var chordMargin=8;if(void 0!==elem.chord)for(i=0;i<elem.chord.length;i++){var y,x=0,dim=this.renderer.getTextSize(elem.chord[i].name,"annotationfont","annotation"),chordWidth=dim.width,chordHeight=dim.height/ABCJS.write.spacing.STEP;switch(elem.chord[i].position){case"left":this.roomtaken+=chordWidth+7,x=-this.roomtaken,y=elem.averagepitch,abselem.addExtra(new ABCJS.write.RelativeElement(elem.chord[i].name,x,chordWidth+4,y,{type:"text",height:chordHeight}));break;case"right":this.roomtakenright+=4,x=this.roomtakenright,y=elem.averagepitch,abselem.addRight(new ABCJS.write.RelativeElement(elem.chord[i].name,x,chordWidth+4,y,{type:"text",height:chordHeight}));break;case"below":for(var eachLine=elem.chord[i].name.split("\n"),ii=0;ii<eachLine.length;ii++)abselem.addRight(new ABCJS.write.RelativeElement(eachLine[ii],x,chordWidth+chordMargin,void 0,{type:"text",position:"below",height:chordHeight}));break;case"above":abselem.addRight(new ABCJS.write.RelativeElement(elem.chord[i].name,0,chordWidth+chordMargin,void 0,{type:"text",height:chordHeight}));break;default:if(elem.chord[i].rel_position){var relPositionY=elem.chord[i].rel_position.y+3*ABCJS.write.spacing.STEP;abselem.addChild(new ABCJS.write.RelativeElement(elem.chord[i].name,x+elem.chord[i].rel_position.x,0,elem.minpitch+relPositionY/ABCJS.write.spacing.STEP,{type:"text",height:chordHeight}))}else{var pos2="above";elem.positioning&&elem.positioning.chordPosition&&(pos2=elem.positioning.chordPosition),dim=this.renderer.getTextSize(elem.chord[i].name,"gchordfont","chord"),chordHeight=dim.height/ABCJS.write.spacing.STEP,chordWidth=dim.width,abselem.addCentered(new ABCJS.write.RelativeElement(elem.chord[i].name,x,chordWidth,void 0,{type:"chord",position:pos2,height:chordHeight}))}}}return elem.startTriplet&&!dontDraw&&(this.triplet=new ABCJS.write.TripletElem(elem.startTriplet,notehead)),elem.endTriplet&&this.triplet&&!dontDraw&&this.triplet.setCloseAnchor(notehead),abselem},ABCJS.write.AbstractEngraver.prototype.createNoteHead=function(abselem,c,pitchelem,dir,headx,extrax,flag,dot,dotshiftx,scale){var notehead,i,pitch=pitchelem.verticalPos;if(this.accidentalshiftx=0,this.dotshiftx=0,void 0===c)abselem.addChild(new ABCJS.write.RelativeElement("pitch is undefined",0,0,0,{type:"debug"}));else if(""===c)notehead=new ABCJS.write.RelativeElement(null,0,0,pitch);else{var shiftheadx=headx;if(pitchelem.printer_shift){var adjust="same"===pitchelem.printer_shift?1:0;shiftheadx="down"===dir?-ABCJS.write.glyphs.getSymbolWidth(c)*scale+adjust:ABCJS.write.glyphs.getSymbolWidth(c)*scale-adjust}var opts={scalex:scale,scaley:scale,thickness:ABCJS.write.glyphs.symbolHeightInPitches(c)*scale};if(notehead=new ABCJS.write.RelativeElement(c,shiftheadx,ABCJS.write.glyphs.getSymbolWidth(c)*scale,pitch,opts),flag){var pos=pitch+("down"===dir?-7:7)*scale;(1===scale&&"down"===dir?pos>6:pos<6)&&(pos=6);var xdelta="down"===dir?headx:headx+notehead.w-.6;abselem.addRight(new ABCJS.write.RelativeElement(flag,xdelta,ABCJS.write.glyphs.getSymbolWidth(flag)*scale,pos,{scalex:scale,scaley:scale}))}for(this.dotshiftx=notehead.w+dotshiftx-2+5*dot;dot>0;dot--){var dotadjusty=1-Math.abs(pitch)%2;abselem.addRight(new ABCJS.write.RelativeElement("dots.dot",notehead.w+dotshiftx-2+5*dot,ABCJS.write.glyphs.getSymbolWidth("dots.dot"),pitch+dotadjusty))}}if(notehead&&(notehead.highestVert=pitchelem.highestVert),pitchelem.accidental){var symb;switch(pitchelem.accidental){case"quartersharp":symb="accidentals.halfsharp";break;case"dblsharp":symb="accidentals.dblsharp";break;case"sharp":symb="accidentals.sharp";break;case"quarterflat":symb="accidentals.halfflat";break;case"flat":symb="accidentals.flat";break;case"dblflat":symb="accidentals.dblflat";break;case"natural":symb="accidentals.nat"}for(var accSlotFound=!1,accPlace=extrax,j=0;j<this.accidentalSlot.length;j++)if(pitch-this.accidentalSlot[j][0]>=6){this.accidentalSlot[j][0]=pitch,accPlace=this.accidentalSlot[j][1],accSlotFound=!0;break}accSlotFound===!1&&(accPlace-=ABCJS.write.glyphs.getSymbolWidth(symb)*scale+2,this.accidentalSlot.push([pitch,accPlace]),this.accidentalshiftx=ABCJS.write.glyphs.getSymbolWidth(symb)*scale+2),abselem.addExtra(new ABCJS.write.RelativeElement(symb,accPlace,ABCJS.write.glyphs.getSymbolWidth(symb),pitch,{scalex:scale,scaley:scale}))}if(pitchelem.endTie&&this.ties[0]&&(this.ties[0].setEndAnchor(notehead),this.ties=this.ties.slice(1,this.ties.length)),pitchelem.startTie){var tie=new ABCJS.write.TieElem(notehead,null,("down"===this.stemdir||"down"===dir)&&"up"!==this.stemdir,"down"===this.stemdir||"up"===this.stemdir,!0);ABCJS.write.hint&&tie.setHint(),this.ties[this.ties.length]=tie,this.voice.addOther(tie),abselem.startTie=!0}if(pitchelem.endSlur)for(i=0;i<pitchelem.endSlur.length;i++){var slur,slurid=pitchelem.endSlur[i];this.slurs[slurid]?(slur=this.slurs[slurid],slur.setEndAnchor(notehead),delete this.slurs[slurid]):(slur=new ABCJS.write.TieElem(null,notehead,"down"===dir,("up"===this.stemdir||"down"===dir)&&"down"!==this.stemdir,!1),ABCJS.write.hint&&slur.setHint(),this.voice.addOther(slur)),this.startlimitelem&&slur.setStartX(this.startlimitelem)}if(pitchelem.startSlur)for(i=0;i<pitchelem.startSlur.length;i++){var slurid=pitchelem.startSlur[i].label,slur=new ABCJS.write.TieElem(notehead,null,("down"===this.stemdir||"down"===dir)&&"up"!==this.stemdir,!1,!1);ABCJS.write.hint&&slur.setHint(),this.slurs[slurid]=slur,this.voice.addOther(slur)}return notehead},ABCJS.write.AbstractEngraver.prototype.addMeasureNumber=function(number,abselem){var measureNumHeight=this.renderer.getTextSize(number,"measurefont","bar-number");abselem.addChild(new ABCJS.write.RelativeElement(number,0,0,11+measureNumHeight.height/ABCJS.write.spacing.STEP,{type:"barNumber"}))},ABCJS.write.AbstractEngraver.prototype.createBarLine=function(elem){var abselem=new ABCJS.write.AbsoluteElement(elem,0,10,"bar",this.tuneNumber),anchor=null,dx=0;elem.barNumber&&this.addMeasureNumber(elem.barNumber,abselem);var firstdots="bar_right_repeat"===elem.type||"bar_dbl_repeat"===elem.type,firstthin="bar_left_repeat"!==elem.type&&"bar_thick_thin"!==elem.type&&"bar_invisible"!==elem.type,thick="bar_right_repeat"===elem.type||"bar_dbl_repeat"===elem.type||"bar_left_repeat"===elem.type||"bar_thin_thick"===elem.type||"bar_thick_thin"===elem.type,secondthin="bar_left_repeat"===elem.type||"bar_thick_thin"===elem.type||"bar_thin_thin"===elem.type||"bar_dbl_repeat"===elem.type,seconddots="bar_left_repeat"===elem.type||"bar_dbl_repeat"===elem.type;if(firstdots||seconddots){for(var slur in this.slurs)this.slurs.hasOwnProperty(slur)&&this.slurs[slur].setEndX(abselem);this.startlimitelem=abselem}if(firstdots&&(abselem.addRight(new ABCJS.write.RelativeElement("dots.dot",dx,1,7)),abselem.addRight(new ABCJS.write.RelativeElement("dots.dot",dx,1,5)),dx+=6),firstthin&&(anchor=new ABCJS.write.RelativeElement(null,dx,1,2,{type:"bar",pitch2:10,linewidth:.6}),abselem.addRight(anchor)),"bar_invisible"===elem.type&&(anchor=new ABCJS.write.RelativeElement(null,dx,1,2,{type:"none",pitch2:10,linewidth:.6}),abselem.addRight(anchor)),elem.decoration&&this.decoration.createDecoration(this.voice,elem.decoration,12,thick?3:1,abselem,0,"down",2,elem.positioning,this.hasVocals),thick&&(dx+=4,anchor=new ABCJS.write.RelativeElement(null,dx,4,2,{type:"bar",pitch2:10,linewidth:4}),abselem.addRight(anchor),dx+=5),this.partstartelem&&elem.endEnding&&(this.partstartelem.anchor2=anchor,this.partstartelem=null),secondthin&&(dx+=3,anchor=new ABCJS.write.RelativeElement(null,dx,1,2,{type:"bar",pitch2:10,linewidth:.6}),abselem.addRight(anchor)),seconddots&&(dx+=3,abselem.addRight(new ABCJS.write.RelativeElement("dots.dot",dx,1,7)),abselem.addRight(new ABCJS.write.RelativeElement("dots.dot",dx,1,5))),elem.startEnding){var textWidth=this.renderer.getTextSize(elem.startEnding,"repeatfont","").width;abselem.minspacing+=textWidth+10,this.partstartelem=new ABCJS.write.EndingElem(elem.startEnding,anchor,null),this.voice.addOther(this.partstartelem)}return abselem}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),function(){"use strict";function minStem(element,stemsUp,referencePitch,minStemHeight){if(!element.children)return minStemHeight;for(var i=0;i<element.children.length;i++){var elem=element.children[i];stemsUp&&void 0!==elem.top&&"flags.ugrace"===elem.c?minStemHeight=Math.max(minStemHeight,elem.top-referencePitch):stemsUp||void 0===elem.bottom||"flags.ugrace"!==elem.c||(minStemHeight=Math.max(minStemHeight,referencePitch-elem.bottom+7))}return minStemHeight}function calcSlant(leftAveragePitch,rightAveragePitch,numStems,isFlat){if(isFlat)return 0;var slant=leftAveragePitch-rightAveragePitch,maxSlant=numStems/2;return slant>maxSlant&&(slant=maxSlant),slant<-maxSlant&&(slant=-maxSlant),slant}function calcAverage(total,numElements){return numElements?total/numElements:0}function getBarYAt(startx,starty,endx,endy,x){return starty+(endy-starty)/(endx-startx)*(x-startx)}function calcDy(asc,isGrace){var dy=asc?ABCJS.write.spacing.STEP:-ABCJS.write.spacing.STEP;return isGrace&&(dy*=.4),dy}function drawBeam(renderer,startX,startY,endX,endY,dy,isHint){var klass="beam-elem";isHint&&(klass+=" abcjs-hint"),startY=renderer.calcY(startY),endY=renderer.calcY(endY);var pathString="M"+startX+" "+startY+" L"+endX+" "+endY+"L"+endX+" "+(endY+dy)+" L"+startX+" "+(startY+dy)+"z";renderer.printPath({path:pathString,stroke:"none",fill:"#000000",class:renderer.addClasses(klass)})}function calcXPos(asc,firstElement,lastElement){var starthead=firstElement.heads[asc?0:firstElement.heads.length-1],endhead=lastElement.heads[asc?0:lastElement.heads.length-1],startX=starthead.x;asc&&(startX+=starthead.w-.6);var endX=endhead.x;return asc&&(endX+=endhead.w),[startX,endX]}function calcYPos(total,numElements,stemHeight,asc,firstAveragePitch,lastAveragePitch,isFlat,minPitch,maxPitch,isGrace){var average=calcAverage(total,numElements),barpos=stemHeight-2,barminpos=stemHeight-2,pos=Math.round(asc?Math.max(average+barpos,maxPitch+barminpos):Math.min(average-barpos,minPitch-barminpos)),slant=calcSlant(firstAveragePitch,lastAveragePitch,numElements,isFlat),startY=pos+Math.floor(slant/2),endY=pos+Math.floor(-slant/2);return isGrace||(asc&&pos<6?(startY=6,endY=6):!asc&&pos>6&&(startY=6,endY=6)),[startY,endY]}function createStems(elems,asc,beam,dy,mainNote){for(var i=0;i<elems.length;i++){var elem=elems[i];if(!elem.abcelem.rest){var isGrace=!elem.addExtra,parent=isGrace?mainNote:elem,furthestHead=elem.heads[asc?0:elem.heads.length-1],ovalDelta=.2,pitch=furthestHead.pitch+(asc?ovalDelta:-ovalDelta),dx=asc?furthestHead.w:0,x=furthestHead.x+dx,bary=getBarYAt(beam.startX,beam.startY,beam.endX,beam.endY,x),lineWidth=asc?-.6:.6;asc||(bary-=dy/2/ABCJS.write.spacing.STEP),isGrace&&(dx+=elem.heads[0].dx),"noteheads.slash.quarter"===furthestHead.c&&(asc?pitch+=1:pitch-=1);var stem=new ABCJS.write.RelativeElement(null,dx,0,pitch,{type:"stem",pitch2:bary,linewidth:lineWidth});stem.setX(parent.x),parent.addExtra(stem)}}}function createAdditionalBeams(elems,asc,beam,isGrace,dy){for(var beams=[],auxBeams=[],i=0;i<elems.length;i++){var elem=elems[i];if(!elem.abcelem.rest){var furthestHead=elem.heads[asc?0:elem.heads.length-1],x=furthestHead.x+(asc?furthestHead.w:0),bary=getBarYAt(beam.startX,beam.startY,beam.endX,beam.endY,x),sy=asc?-1.5:1.5;isGrace&&(sy=2*sy/3);var duration=elem.abcelem.duration;0===duration&&(duration=.25);for(var durlog=ABCJS.write.getDurlog(duration);durlog<-3;durlog++)auxBeams[-4-durlog]?auxBeams[-4-durlog].single=!1:auxBeams[-4-durlog]={x:x+(asc?-.6:0),y:bary+sy*(-4-durlog+1),durlog:durlog,single:!0};for(var j=auxBeams.length-1;j>=0;j--)if(i===elems.length-1||ABCJS.write.getDurlog(elems[i+1].abcelem.duration)>-j-4){var auxBeamEndX=x,auxBeamEndY=bary+sy*(j+1);auxBeams[j].single&&(auxBeamEndX=0===i?x+5:x-5,auxBeamEndY=getBarYAt(beam.startX,beam.startY,beam.endX,beam.endY,auxBeamEndX)+sy*(j+1)),beams.push({startX:auxBeams[j].x,endX:auxBeamEndX,startY:auxBeams[j].y,endY:auxBeamEndY,dy:dy}),auxBeams=auxBeams.slice(0,j)}}}return beams}ABCJS.write.BeamElem=function(stemHeight,type,flat){this.isflat=flat,this.isgrace=type&&"grace"===type,this.forceup=this.isgrace||type&&"up"===type,this.forcedown=type&&"down"===type,this.elems=[],this.total=0,this.allrests=!0,this.stemHeight=stemHeight,this.beams=[]},ABCJS.write.BeamElem.prototype.setHint=function(){this.hint=!0},ABCJS.write.BeamElem.prototype.add=function(abselem){var pitch=abselem.abcelem.averagepitch;void 0!==pitch&&(this.allrests=this.allrests&&abselem.abcelem.rest,abselem.beam=this,this.elems.push(abselem),this.total+=pitch,(!this.min||abselem.abcelem.minpitch<this.min)&&(this.min=abselem.abcelem.minpitch),(!this.max||abselem.abcelem.maxpitch>this.max)&&(this.max=abselem.abcelem.maxpitch))};var middleLine=6;ABCJS.write.BeamElem.prototype.calcDir=function(){if(this.forceup)return!0;if(this.forcedown)return!1;var average=calcAverage(this.total,this.elems.length);return average<middleLine},ABCJS.write.BeamElem.prototype.layout=function(){if(0!==this.elems.length&&!this.allrests){this.stemsUp=this.calcDir();var dy=calcDy(this.stemsUp,this.isgrace),firstElement=this.elems[0],lastElement=this.elems[this.elems.length-1],minStemHeight=0,referencePitch=this.stemsUp?firstElement.abcelem.maxpitch:firstElement.abcelem.minpitch;minStemHeight=minStem(firstElement,this.stemsUp,referencePitch,minStemHeight),minStemHeight=minStem(lastElement,this.stemsUp,referencePitch,minStemHeight),minStemHeight=Math.max(this.stemHeight,minStemHeight+3);var yPos=calcYPos(this.total,this.elems.length,minStemHeight,this.stemsUp,firstElement.abcelem.averagepitch,lastElement.abcelem.averagepitch,this.isflat,this.min,this.max,this.isgrace),xPos=calcXPos(this.stemsUp,firstElement,lastElement);this.beams.push({startX:xPos[0],endX:xPos[1],startY:yPos[0],endY:yPos[1],dy:dy});for(var beams=createAdditionalBeams(this.elems,this.stemsUp,this.beams[0],this.isgrace,dy),i=0;i<beams.length;i++)this.beams.push(beams[i]);createStems(this.elems,this.stemsUp,this.beams[0],dy,this.mainNote)}},ABCJS.write.BeamElem.prototype.isAbove=function(){return this.stemsUp},ABCJS.write.BeamElem.prototype.heightAtMidpoint=function(startX,endX){if(0===this.beams.length)return 0;var beam=this.beams[0],midPoint=startX+(endX-startX)/2;return getBarYAt(beam.startX,beam.startY,beam.endX,beam.endY,midPoint)},ABCJS.write.BeamElem.prototype.yAtNote=function(element){var beam=this.beams[0];return getBarYAt(beam.startX,beam.startY,beam.endX,beam.endY,element.x)},ABCJS.write.BeamElem.prototype.xAtMidpoint=function(startX,endX){return startX+(endX-startX)/2},ABCJS.write.BeamElem.prototype.draw=function(renderer){if(0!==this.beams.length){renderer.beginGroup();for(var i=0;i<this.beams.length;i++){var beam=this.beams[i];drawBeam(renderer,beam.startX,beam.startY,beam.endX,beam.endY,beam.dy,this.hint)}renderer.endGroup("beam-elem")}}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.BraceElem=function(){this.length=1},ABCJS.write.BraceElem.prototype.increaseStavesIncluded=function(){this.length++},ABCJS.write.BraceElem.prototype.setLocation=function(x){this.x=x},ABCJS.write.BraceElem.prototype.getWidth=function(){return 10},ABCJS.write.BraceElem.prototype.layout=function(renderer,top,bottom){this.startY=top,this.endY=bottom},ABCJS.write.BraceElem.prototype.draw=function(renderer,top,bottom){this.layout(renderer,top,bottom),renderer.drawBrace(this.x,this.startY,this.endY)},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),function(){"use strict";ABCJS.write.createClef=function(elem,tuneNumber){var clef,octave=0,abselem=new ABCJS.write.AbsoluteElement(elem,0,10,"staff-extra",tuneNumber);switch(elem.type){case"treble":clef="clefs.G";break;case"tenor":clef="clefs.C";break;case"alto":clef="clefs.C";break;case"bass":clef="clefs.F";break;case"treble+8":clef="clefs.G",octave=1;break;case"tenor+8":clef="clefs.C",octave=1;break;case"bass+8":clef="clefs.F",octave=1;break;case"alto+8":clef="clefs.C",octave=1;break;case"treble-8":clef="clefs.G",octave=-1;break;case"tenor-8":clef="clefs.C",octave=-1;break;case"bass-8":clef="clefs.F",octave=-1;break;case"alto-8":clef="clefs.C",octave=-1;break;case"none":return null;case"perc":clef="clefs.perc";break;default:abselem.addChild(new ABCJS.write.RelativeElement("clef="+elem.type,0,0,void 0,{type:"debug"}))}var dx=5;if(clef&&(abselem.addRight(new ABCJS.write.RelativeElement(clef,dx,ABCJS.write.glyphs.getSymbolWidth(clef),elem.clefPos)),"clefs.G"===clef?(abselem.top=13,abselem.bottom=-1):(abselem.top=10,abselem.bottom=2),0!==octave)){var scale=2/3,adjustspacing=(ABCJS.write.glyphs.getSymbolWidth(clef)-ABCJS.write.glyphs.getSymbolWidth("8")*scale)/2;abselem.addRight(new ABCJS.write.RelativeElement("8",dx+adjustspacing,ABCJS.write.glyphs.getSymbolWidth("8")*scale,octave>0?abselem.top+3:abselem.bottom-1,{scalex:scale,scaley:scale})),abselem.top+=2}return abselem}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),function(){"use strict";ABCJS.write.createKeySignature=function(elem,tuneNumber){if(!elem.accidentals||0===elem.accidentals.length)return null;var abselem=new ABCJS.write.AbsoluteElement(elem,0,10,"staff-extra",tuneNumber),dx=0;return window.ABCJS.parse.each(elem.accidentals,function(acc){var symbol="sharp"===acc.acc?"accidentals.sharp":"natural"===acc.acc?"accidentals.nat":"accidentals.flat";abselem.addRight(new ABCJS.write.RelativeElement(symbol,dx,ABCJS.write.glyphs.getSymbolWidth(symbol),acc.verticalPos,{thickness:ABCJS.write.glyphs.symbolHeightInPitches(symbol)})),dx+=ABCJS.write.glyphs.getSymbolWidth(symbol)+2},this),abselem}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),function(){"use strict";ABCJS.write.createTimeSignature=function(elem,tuneNumber){var abselem=new ABCJS.write.AbsoluteElement(elem,0,10,"staff-extra",tuneNumber);if("specified"===elem.type)for(var i=0;i<elem.value.length;i++)0!==i&&abselem.addRight(new ABCJS.write.RelativeElement("+",20*i-9,ABCJS.write.glyphs.getSymbolWidth("+"),6,{thickness:ABCJS.write.glyphs.symbolHeightInPitches("+")})),elem.value[i].den?(abselem.addRight(new ABCJS.write.RelativeElement(elem.value[i].num,20*i,ABCJS.write.glyphs.getSymbolWidth(elem.value[i].num.charAt(0))*elem.value[i].num.length,8,{thickness:ABCJS.write.glyphs.symbolHeightInPitches(elem.value[i].num.charAt(0))})),abselem.addRight(new ABCJS.write.RelativeElement(elem.value[i].den,20*i,ABCJS.write.glyphs.getSymbolWidth(elem.value[i].den.charAt(0))*elem.value[i].den.length,4,{thickness:ABCJS.write.glyphs.symbolHeightInPitches(elem.value[i].den.charAt(0))}))):abselem.addRight(new ABCJS.write.RelativeElement(elem.value[i].num,20*i,ABCJS.write.glyphs.getSymbolWidth(elem.value[i].num.charAt(0))*elem.value[i].num.length,6,{thickness:ABCJS.write.glyphs.symbolHeightInPitches(elem.value[i].num.charAt(0))}));else"common_time"===elem.type?abselem.addRight(new ABCJS.write.RelativeElement("timesig.common",0,ABCJS.write.glyphs.getSymbolWidth("timesig.common"),6,{thickness:ABCJS.write.glyphs.symbolHeightInPitches("timesig.common")})):"cut_time"===elem.type&&abselem.addRight(new ABCJS.write.RelativeElement("timesig.cut",0,ABCJS.write.glyphs.getSymbolWidth("timesig.cut"),6,{thickness:ABCJS.write.glyphs.symbolHeightInPitches("timesig.cut")}));return abselem}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.CrescendoElem=function(anchor1,anchor2,dir,positioning){this.anchor1=anchor1,this.anchor2=anchor2,this.dir=dir,"above"===positioning?this.dynamicHeightAbove=4:this.dynamicHeightBelow=4,this.pitch=void 0},ABCJS.write.CrescendoElem.prototype.setUpperAndLowerElements=function(positionY){this.dynamicHeightAbove?this.pitch=positionY.dynamicHeightAbove:this.pitch=positionY.dynamicHeightBelow},ABCJS.write.CrescendoElem.prototype.draw=function(renderer){void 0===this.pitch&&window.console.error("Crescendo Element y-coordinate not set.");var y=renderer.calcY(this.pitch)+4,height=8;"<"===this.dir?(this.drawLine(renderer,y+height/2,y),this.drawLine(renderer,y+height/2,y+height)):(this.drawLine(renderer,y,y+height/2),this.drawLine(renderer,y+height,y+height/2))},ABCJS.write.CrescendoElem.prototype.drawLine=function(renderer,y1,y2){var left=this.anchor1?this.anchor1.x:0,right=this.anchor2?this.anchor2.x:800,pathString=ABCJS.write.sprintf("M %f %f L %f %f",left,y1,right,y2);renderer.printPath({path:pathString,stroke:"#000000",class:renderer.addClasses("decoration")})},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),function(){"use strict";ABCJS.write.Decoration=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0};var closeDecoration=function(voice,decoration,pitch,width,abselem,roomtaken,dir,minPitch){for(var yPos,i=0;i<decoration.length;i++){if("staccato"===decoration[i]||"tenuto"===decoration[i]||"accent"===decoration[i]){var symbol="scripts."+decoration[i];if("accent"===decoration[i]&&(symbol="scripts.sforzato"),yPos=void 0===yPos?"down"===dir?pitch+2:minPitch-2:"down"===dir?yPos+2:yPos-2,"accent"===decoration[i])"up"===dir?yPos--:yPos++;else switch(yPos){case 2:case 4:case 6:case 8:case 10:"up"===dir?yPos--:yPos++}pitch>9&&yPos++;var deltaX=width/2;"center"!==ABCJS.write.glyphs.getSymbolAlign(symbol)&&(deltaX-=ABCJS.write.glyphs.getSymbolWidth(symbol)/2),abselem.addChild(new ABCJS.write.RelativeElement(symbol,deltaX,ABCJS.write.glyphs.getSymbolWidth(symbol),yPos))}if("slide"===decoration[i]&&abselem.heads[0]){var yPos2=abselem.heads[0].pitch;yPos2-=2;var blank1=new ABCJS.write.RelativeElement("",-roomtaken-15,0,yPos2-1),blank2=new ABCJS.write.RelativeElement("",-roomtaken-5,0,yPos2+1);abselem.addChild(blank1),abselem.addChild(blank2),voice.addOther(new ABCJS.write.TieElem(blank1,blank2,!1,!1,!1))}}return void 0===yPos&&(yPos=pitch),{above:yPos,below:abselem.bottom}},volumeDecoration=function(voice,decoration,abselem,positioning){for(var i=0;i<decoration.length;i++)switch(decoration[i]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var elem=new ABCJS.write.DynamicDecoration(abselem,decoration[i],positioning);voice.addOther(elem)}},compoundDecoration=function(decoration,pitch,width,abselem,dir){function highestPitch(){if(0===abselem.heads.length)return 10;for(var pitch=abselem.heads[0].pitch,i=1;i<abselem.heads.length;i++)pitch=Math.max(pitch,abselem.heads[i].pitch);return pitch}function lowestPitch(){if(0===abselem.heads.length)return 2;for(var pitch=abselem.heads[0].pitch,i=1;i<abselem.heads.length;i++)pitch=Math.min(pitch,abselem.heads[i].pitch);return pitch}function compoundDecoration(symbol,count){var placement="down"===dir?lowestPitch()+1:highestPitch()+9;"down"!==dir&&1===count&&placement--;var deltaX=width/2;deltaX+="down"===dir?-5:3;for(var i=0;i<count;i++)placement-=1,abselem.addChild(new ABCJS.write.RelativeElement(symbol,deltaX,ABCJS.write.glyphs.getSymbolWidth(symbol),placement))}for(var i=0;i<decoration.length;i++)switch(decoration[i]){case"/":compoundDecoration("flags.ugrace",1);break;case"//":compoundDecoration("flags.ugrace",2);break;case"///":compoundDecoration("flags.ugrace",3);break;case"////":compoundDecoration("flags.ugrace",4)}},stackedDecoration=function(decoration,width,abselem,yPos,positioning,minTop,minBottom){function incrementPlacement(placement,height){"above"===placement?yPos.above+=height:yPos.below-=height}function getPlacement(placement){var y;return"above"===placement?(y=yPos.above,y<minTop&&(y=minTop)):(y=yPos.below,y>minBottom&&(y=minBottom)),y}function textDecoration(text,placement){var y=getPlacement(placement),textFudge=2,textHeight=5;abselem.addChild(new ABCJS.write.RelativeElement(text,width/2,0,y+textFudge,{type:"decoration",klass:"ornament",thickness:3})),incrementPlacement(placement,textHeight)}function symbolDecoration(symbol,placement){var deltaX=width/2;"center"!==ABCJS.write.glyphs.getSymbolAlign(symbol)&&(deltaX-=ABCJS.write.glyphs.getSymbolWidth(symbol)/2);var height=ABCJS.write.glyphs.symbolHeightInPitches(symbol)+1,y=getPlacement(placement);y="above"===placement?y+height/2:y-height/2,abselem.addChild(new ABCJS.write.RelativeElement(symbol,deltaX,ABCJS.write.glyphs.getSymbolWidth(symbol),y,{klass:"ornament",thickness:ABCJS.write.glyphs.symbolHeightInPitches(symbol)})),incrementPlacement(placement,height)}for(var symbolList={"+":"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",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"},hasOne=!1,i=0;i<decoration.length;i++)switch(decoration[i]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":textDecoration(decoration[i],positioning),hasOne=!0;break;case"fine":textDecoration("FINE",positioning),hasOne=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":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":symbolDecoration(symbolList[decoration[i]],positioning),hasOne=!0;break;case"invertedfermata":symbolDecoration(symbolList[decoration[i]],"below"),hasOne=!0;break;case"mark":abselem.klass="mark"}return hasOne};ABCJS.write.Decoration.prototype.dynamicDecoration=function(voice,decoration,abselem,positioning){for(var diminuendo,crescendo,i=0;i<decoration.length;i++)switch(decoration[i]){case"diminuendo(":this.startDiminuendoX=abselem,diminuendo=void 0;break;case"diminuendo)":diminuendo={start:this.startDiminuendoX,stop:abselem},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=abselem,crescendo=void 0;break;case"crescendo)":crescendo={start:this.startCrescendoX,stop:abselem},this.startCrescendoX=void 0}diminuendo&&voice.addOther(new ABCJS.write.CrescendoElem(diminuendo.start,diminuendo.stop,">",positioning)),crescendo&&voice.addOther(new ABCJS.write.CrescendoElem(crescendo.start,crescendo.stop,"<",positioning))},ABCJS.write.Decoration.prototype.createDecoration=function(voice,decoration,pitch,width,abselem,roomtaken,dir,minPitch,positioning,hasVocals){positioning||(positioning={ornamentPosition:"above",volumePosition:hasVocals?"above":"below",dynamicPosition:hasVocals?"above":"below"}),volumeDecoration(voice,decoration,abselem,positioning.volumePosition),this.dynamicDecoration(voice,decoration,abselem,positioning.dynamicPosition),compoundDecoration(decoration,pitch,width,abselem,dir);var yPos=closeDecoration(voice,decoration,pitch,width,abselem,roomtaken,dir,minPitch);yPos.above=Math.max(yPos.above,this.minTop);stackedDecoration(decoration,width,abselem,yPos,positioning.ornamentPosition,this.minTop,this.minBottom)}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.DynamicDecoration=function(anchor,dec,position){this.anchor=anchor,this.dec=dec,"below"===position?this.volumeHeightBelow=5:this.volumeHeightAbove=5,this.pitch=void 0},ABCJS.write.DynamicDecoration.prototype.setUpperAndLowerElements=function(positionY){this.volumeHeightAbove?this.pitch=positionY.volumeHeightAbove:this.pitch=positionY.volumeHeightBelow},ABCJS.write.DynamicDecoration.prototype.draw=function(renderer,linestartx,lineendx){void 0===this.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var scalex=1,scaley=1;renderer.printSymbol(this.anchor.x,this.pitch,this.dec,scalex,scaley,renderer.addClasses("decoration"))},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.EndingElem=function(text,anchor1,anchor2){this.text=text,this.anchor1=anchor1,this.anchor2=anchor2,this.endingHeightAbove=5,this.pitch=void 0},ABCJS.write.EndingElem.prototype.setUpperAndLowerElements=function(positionY){this.pitch=positionY.endingHeightAbove},ABCJS.write.EndingElem.prototype.draw=function(renderer,linestartx,lineendx){void 0===this.pitch&&window.console.error("Ending Element y-coordinate not set.");var pathString,y=renderer.calcY(this.pitch),height=20;this.anchor1&&(linestartx=this.anchor1.x+this.anchor1.w,pathString=ABCJS.write.sprintf("M %f %f L %f %f",linestartx,y,linestartx,y+height),renderer.printPath({path:pathString,stroke:"#000000",fill:"#000000",class:renderer.addClasses("ending")}),renderer.renderText(linestartx+5,renderer.calcY(this.pitch-.5),this.text,"repeatfont","ending","start")),this.anchor2&&(lineendx=this.anchor2.x,pathString=ABCJS.write.sprintf("M %f %f L %f %f",lineendx,y,lineendx,y+height),renderer.printPath({path:pathString,stroke:"#000000",fill:"#000000",class:renderer.addClasses("ending")})),pathString=ABCJS.write.sprintf("M %f %f L %f %f",linestartx,y,lineendx,y),renderer.printPath({path:pathString,stroke:"#000000",fill:"#000000",class:renderer.addClasses("ending")})},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.spacing=function(){},ABCJS.write.spacing.FONTEM=360,ABCJS.write.spacing.FONTSIZE=30,ABCJS.write.spacing.STEP=93*ABCJS.write.spacing.FONTSIZE/720,ABCJS.write.spacing.SPACE=10,ABCJS.write.spacing.TOPNOTE=15,ABCJS.write.spacing.STAVEHEIGHT=100,ABCJS.write.spacing.INDENT=50,ABCJS.write.debugPlacement=!1,ABCJS.write.EngraverController=function(paper,params){params=params||{},this.space=3*ABCJS.write.spacing.SPACE,this.scale=params.scale||void 0,params.staffwidth?(this.staffwidthScreen=params.staffwidth,this.staffwidthPrint=params.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),
+this.editable=params.editable||!1,this.listeners=[],params.listener&&this.addSelectListener(params.listener),this.usingSvg=!(!window.SVGAngle&&!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")),this.usingSvg&&params.add_classes&&(Raphael._availableAttrs.class=""),Raphael._availableAttrs["text-decoration"]="",Raphael._availableAttrs["data-vertical"]="",this.renderer=new ABCJS.write.Renderer(paper,params.regression),this.renderer.setPaddingOverride(params),this.renderer.controller=this,this.reset()},ABCJS.write.EngraverController.prototype.reset=function(){this.selected=[],this.ingroup=!1,this.staffgroups=[],this.lastStaffGroupIndex=-1,this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset()},ABCJS.write.EngraverController.prototype.engraveABC=function(abctunes){void 0===abctunes[0]&&(abctunes=[abctunes]),this.reset();for(var i=0;i<abctunes.length;i++)this.engraveTune(abctunes[i],i);if(this.renderer.doRegression)return this.renderer.regressionLines.join("\n")},ABCJS.write.EngraverController.prototype.adjustNonScaledItems=function(scale){this.width/=scale,this.renderer.adjustNonScaledItems(scale)},ABCJS.write.EngraverController.prototype.engraveTune=function(abctune,tuneNumber){this.renderer.lineNumber=null,abctune.formatting.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},this.renderer.abctune=abctune,this.renderer.setVerticalSpace(abctune.formatting),this.renderer.measureNumber=null,this.renderer.setPrintMode("print"===abctune.media);var scale=abctune.formatting.scale?abctune.formatting.scale:this.scale;void 0===scale&&(scale=this.renderer.isPrint?.75:1),this.renderer.setPadding(abctune),this.engraver=new ABCJS.write.AbstractEngraver(abctune.formatting.bagpipes,this.renderer,tuneNumber),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.renderer.engraver=this.engraver,abctune.formatting.staffwidth?this.width=1.33*abctune.formatting.staffwidth:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen,this.adjustNonScaledItems(scale);var i,abcLine,hasPrintedTempo=!1;for(i=0;i<abctune.lines.length;i++)abcLine=abctune.lines[i],abcLine.staff&&(abcLine.staffGroup=this.engraver.createABCLine(abcLine.staff,hasPrintedTempo?null:abctune.metaText.tempo),hasPrintedTempo=!0);var maxWidth=this.width;for(i=0;i<abctune.lines.length;i++)abcLine=abctune.lines[i],abcLine.staff&&(this.setXSpacing(abcLine.staffGroup,abctune.formatting,i===abctune.lines.length-1),abcLine.staffGroup.w>maxWidth&&(maxWidth=abcLine.staffGroup.w));for(i=0;i<abctune.lines.length;i++)if(abcLine=abctune.lines[i],abcLine.staffGroup&&abcLine.staffGroup.voices){for(var j=0;j<abcLine.staffGroup.voices.length;j++)abcLine.staffGroup.voices[j].layoutBeams();abcLine.staffGroup.setUpperAndLowerElements(this.renderer)}for(i=0;i<abctune.lines.length;i++)abcLine=abctune.lines[i],abcLine.staffGroup&&(abcLine.staffGroup.height=abcLine.staffGroup.calcHeight());this.renderer.topMargin(abctune),this.renderer.engraveTopText(this.width,abctune),this.renderer.addMusicPadding(),this.staffgroups=[],this.lastStaffGroupIndex=-1;for(var line=0;line<abctune.lines.length;line++)this.renderer.lineNumber=line,abcLine=abctune.lines[line],abcLine.staff?this.engraveStaffLine(abcLine.staffGroup):abcLine.subtitle&&0!==line?this.renderer.outputSubtitle(this.width,abcLine.subtitle):void 0!==abcLine.text&&this.renderer.outputFreeText(abcLine.text);this.renderer.moveY(24),this.renderer.engraveExtraText(this.width,abctune),this.renderer.setPaperSize(maxWidth,scale)},ABCJS.write.EngraverController.prototype.setXSpacing=function(staffGroup,formatting,isLastLine){for(var newspace=this.space,it=0;it<3;it++){staffGroup.layout(newspace,this.renderer,!1);var stretchLast=!!formatting.stretchlast&&formatting.stretchlast;if(newspace=calcHorizontalSpacing(isLastLine,stretchLast,this.width+this.renderer.padding.left,staffGroup.w,newspace,staffGroup.spacingunits,staffGroup.minspace),null===newspace)break}centerWholeRests(staffGroup.voices)},ABCJS.write.EngraverController.prototype.engraveStaffLine=function(staffGroup){this.lastStaffGroupIndex>-1&&this.renderer.addStaffPadding(this.staffgroups[this.lastStaffGroupIndex],staffGroup),this.renderer.voiceNumber=null,staffGroup.draw(this.renderer);var height=staffGroup.height*ABCJS.write.spacing.STEP;this.staffgroups[this.staffgroups.length]=staffGroup,this.lastStaffGroupIndex=this.staffgroups.length-1,this.renderer.y+=height},ABCJS.write.EngraverController.prototype.notifySelect=function(abselem,tuneNumber){this.clearSelection(),abselem.highlight&&(this.selected=[abselem],abselem.highlight());for(var abcelem=abselem.abcelem||{},i=0;i<this.listeners.length;i++)this.listeners[i].highlight&&this.listeners[i].highlight(abcelem,tuneNumber)},ABCJS.write.EngraverController.prototype.notifyChange=function(){for(var i=0;i<this.listeners.length;i++)this.listeners[i].modelChanged&&this.listeners[i].modelChanged()},ABCJS.write.EngraverController.prototype.clearSelection=function(){for(var i=0;i<this.selected.length;i++)this.selected[i].unhighlight();this.selected=[]},ABCJS.write.EngraverController.prototype.addSelectListener=function(listener){this.listeners[this.listeners.length]=listener},ABCJS.write.EngraverController.prototype.rangeHighlight=function(start,end){this.clearSelection();for(var line=0;line<this.staffgroups.length;line++)for(var voices=this.staffgroups[line].voices,voice=0;voice<voices.length;voice++)for(var elems=voices[voice].children,elem=0;elem<elems.length;elem++){var elStart=elems[elem].abcelem.startChar,elEnd=elems[elem].abcelem.endChar;(end>elStart&&start<elEnd||end===start&&end===elEnd)&&(this.selected[this.selected.length]=elems[elem],elems[elem].highlight())}},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.Glyphs=function(){"use strict";var glyphs={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.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,.33,-.03,4.89],["c",-.06,2.67,-.09,5.01,-.09,5.22],["l",0,.36],["l",.15,-.15],["c",.36,-.3,.75,-.51,1.2,-.63],["c",.33,-.09,.96,-.09,1.26,-.03],["c",.27,.09,.63,.27,.87,.45],["l",.21,.15],["l",0,-.27],["c",0,-.15,-.03,-2.43,-.09,-5.1],["c",-.09,-4.56,-.09,-4.86,-.03,-4.89],["c",.15,-.12,.39,-.15,.72,-.15],["c",.3,0,.54,.03,.69,.15],["c",.06,.03,.06,.33,-.03,4.95],["c",-.06,2.7,-.09,5.04,-.09,5.22],["l",.03,.3],["l",.21,-.15],["c",.69,-.48,1.44,-.69,2.28,-.69],["c",.51,0,.78,.03,1.2,.21],["c",1.32,.63,2.01,2.28,1.53,3.69],["c",-.21,.57,-.51,1.02,-1.05,1.56],["c",-.42,.42,-.81,.72,-1.92,1.5],["c",-1.26,.87,-1.5,1.08,-1.86,1.5],["c",-.39,.45,-.54,.54,-.81,.51],["c",-.18,0,-.21,0,-.33,-.06],["l",-.21,-.21],["l",-.06,-.12],["l",-.03,-.99],["c",-.03,-.54,-.03,-1.29,-.06,-1.68],["l",0,-.69],["l",-.21,.24],["c",-.36,.42,-.75,.75,-1.8,1.62],["c",-1.02,.84,-1.2,.99,-1.44,1.38],["c",-.36,.51,-.54,.6,-.9,.51],["c",-.15,-.03,-.39,-.27,-.42,-.42],["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",2.52,10.98],["c",-.18,-.09,-.48,-.12,-.66,-.06],["c",-.39,.15,-.69,.54,-.84,1.14],["c",-.06,.24,-.06,.39,-.09,1.74],["c",-.03,1.44,0,2.73,.06,3.18],["l",.03,.15],["l",.27,-.27],["c",.93,-.96,1.5,-1.95,1.74,-3.06],["c",.06,-.27,.06,-.39,.06,-.96],["c",0,-.54,0,-.69,-.06,-.93],["c",-.09,-.51,-.27,-.81,-.51,-.93],["z"],["m",5.43,0],["c",-.18,-.09,-.51,-.12,-.72,-.06],["c",-.54,.12,-.96,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.9],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.36,-.3],["c",.42,-.36,1.02,-.96,1.29,-1.29],["c",.36,-.45,.66,-.99,.81,-1.41],["c",.42,-1.23,.15,-2.76,-.6,-3.12],["z"]],w:11.613,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.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:9.99,h:14.97},"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},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.32,-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}};glyphs["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},glyphs["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},glyphs["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},this.printSymbol=function(x,y,symb,paper,klass){if(!glyphs[symb])return null;var pathArray=this.pathClone(glyphs[symb].d);return pathArray[0][1]+=x,pathArray[0][2]+=y,paper.path().attr({path:pathArray,stroke:"none",fill:"#000000",class:klass})},this.getPathForSymbol=function(x,y,symb,scalex,scaley){if(scalex=scalex||1,scaley=scaley||1,!glyphs[symb])return null;var pathArray=this.pathClone(glyphs[symb].d);return 1===scalex&&1===scaley||this.pathScale(pathArray,scalex,scaley),pathArray[0][1]+=x,pathArray[0][2]+=y,pathArray},this.getSymbolWidth=function(symbol){return glyphs[symbol]?glyphs[symbol].w:0},this.getSymbolHeight=function(symbol){return glyphs[symbol]?glyphs[symbol].h:0},this.symbolHeightInPitches=function(symbol){return this.getSymbolHeight(symbol)/ABCJS.write.spacing.STEP},this.getSymbolAlign=function(symbol){return"scripts"===symbol.substring(0,7)&&"scripts.roll"!==symbol?"center":"left"},this.pathClone=function(pathArray){for(var res=[],i=0,ii=pathArray.length;i<ii;i++){res[i]=[];for(var j=0,jj=pathArray[i].length;j<jj;j++)res[i][j]=pathArray[i][j]}return res},this.pathScale=function(pathArray,kx,ky){for(var i=0,ii=pathArray.length;i<ii;i++){var j,jj,p=pathArray[i];for(j=1,jj=p.length;j<jj;j++)p[j]*=j%2?kx:ky}},this.getYCorr=function(symbol){switch(symbol){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}}},ABCJS.write.glyphs=new ABCJS.write.Glyphs,window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.RelativeElement=function(c,dx,w,pitch,opt){opt=opt||{},this.x=0,this.c=c,this.dx=dx,this.w=w,this.pitch=pitch,this.scalex=opt.scalex||1,this.scaley=opt.scaley||1,this.type=opt.type||"symbol",this.pitch2=opt.pitch2,this.linewidth=opt.linewidth,this.klass=opt.klass,this.top=pitch,void 0!==this.pitch2&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=pitch,void 0!==this.pitch2&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),
+opt.thickness&&(this.top+=opt.thickness/2,this.bottom-=opt.thickness/2),opt.stemHeight&&(opt.stemHeight>0?this.top+=opt.stemHeight:this.bottom+=opt.stemHeight);var height=opt.height?opt.height:4;switch(this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=height;break;case"lyric":opt.position&&"below"===opt.position?this.lyricHeightBelow=height:this.lyricHeightAbove=height;break;case"chord":opt.position&&"below"===opt.position?this.chordHeightBelow=height:this.chordHeightAbove=height;break;case"text":void 0===this.pitch?opt.position&&"below"===opt.position?this.chordHeightBelow=height:this.chordHeightAbove=height:this.centerVertically=!0;break;case"part":this.partHeightAbove=height}},ABCJS.write.RelativeElement.prototype.setX=function(x){this.x=x+this.dx},ABCJS.write.RelativeElement.prototype.draw=function(renderer,bartop){void 0===this.pitch&&window.console.error(this.type+" Relative Element y-coordinate not set.");var y=renderer.calcY(this.pitch);switch(this.type){case"symbol":if(null===this.c)return null;var klass="symbol";this.klass&&(klass+=" "+this.klass),this.graphelem=renderer.printSymbol(this.x,this.pitch,this.c,this.scalex,this.scaley,renderer.addClasses(klass));break;case"debug":this.graphelem=renderer.renderText(this.x,renderer.calcY(15),""+this.c,"debugfont","debug-msg","start");break;case"barNumber":this.graphelem=renderer.renderText(this.x,y,""+this.c,"measurefont","bar-number","middle");break;case"lyric":this.graphelem=renderer.renderText(this.x,y,this.c,"vocalfont","abc-lyric","middle");break;case"chord":this.graphelem=renderer.renderText(this.x,y,this.c,"gchordfont","chord","middle");break;case"decoration":this.graphelem=renderer.renderText(this.x,y,this.c,"annotationfont","annotation","middle",!0);break;case"text":this.graphelem=renderer.renderText(this.x,y,this.c,"annotationfont","annotation","start",this.centerVertically);break;case"part":this.graphelem=renderer.renderText(this.x,y,this.c,"partsfont","part","start");break;case"bar":this.graphelem=renderer.printStem(this.x,this.linewidth,y,bartop?bartop:renderer.calcY(this.pitch2));break;case"stem":this.graphelem=renderer.printStem(this.x,this.linewidth,y,renderer.calcY(this.pitch2));break;case"ledger":this.graphelem=renderer.printStaveLine(this.x,this.x+this.w,this.pitch)}return 1!==this.scalex&&this.graphelem&&this.graphelem.scale(this.scalex,this.scaley,this.x,y),this.graphelem},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.Renderer=function(paper,doRegression){this.paper=paper,this.controller=null,this.space=3*ABCJS.write.spacing.SPACE,this.padding={},this.doRegression=doRegression,this.doRegression&&(this.regressionLines=[]),this.reset()},ABCJS.write.Renderer.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.lastM=null,this.ingroup=!1,this.path=null,this.isPrint=!1,this.initVerticalSpace(),this.doRegression&&(this.regressionLines=[])},ABCJS.write.Renderer.prototype.setPrintMode=function(isPrint){this.isPrint=isPrint},ABCJS.write.Renderer.prototype.setPaperSize=function(maxwidth,scale){var w=(maxwidth+this.padding.right)*scale,h=(this.y+this.padding.bottom)*scale;this.isPrint&&(h=Math.max(h,1056)),this.doRegression&&this.regressionLines.push("PAPER SIZE: ("+w+","+h+")"),this.paper.setSize(w/scale,h/scale);var isIE=!1;isIE?(this.paper.canvas.parentNode.style.width=w+"px",this.paper.canvas.parentNode.style.height=""+h+"px"):this.paper.canvas.parentNode.setAttribute("style","width:"+w+"px"),1!==scale?(this.paper.canvas.style.transform="scale("+scale+","+scale+")",this.paper.canvas.style["-ms-transform"]="scale("+scale+","+scale+")",this.paper.canvas.style["-webkit-transform"]="scale("+scale+","+scale+")",this.paper.canvas.style["transform-origin"]="0 0",this.paper.canvas.style["-ms-transform-origin-x"]="0",this.paper.canvas.style["-ms-transform-origin-y"]="0",this.paper.canvas.style["-webkit-transform-origin-x"]="0",this.paper.canvas.style["-webkit-transform-origin-y"]="0"):(this.paper.canvas.style.transform="",this.paper.canvas.style["-ms-transform"]="",this.paper.canvas.style["-webkit-transform"]=""),this.paper.canvas.parentNode.style.overflow="hidden",this.paper.canvas.parentNode.style.height=""+h+"px"},ABCJS.write.Renderer.prototype.setPaddingOverride=function(params){this.paddingOverride={top:params.paddingtop,bottom:params.paddingbottom,right:params.paddingright,left:params.paddingleft}},ABCJS.write.Renderer.prototype.setPadding=function(abctune){function setPaddingVariable(self,paddingKey,formattingKey,printDefault,screenDefault){void 0!==abctune.formatting[formattingKey]?self.padding[paddingKey]=abctune.formatting[formattingKey]:void 0!==self.paddingOverride[paddingKey]?self.padding[paddingKey]=self.paddingOverride[paddingKey]:self.isPrint?self.padding[paddingKey]=printDefault:self.padding[paddingKey]=screenDefault}setPaddingVariable(this,"top","topmargin",38,15),setPaddingVariable(this,"bottom","botmargin",38,15),setPaddingVariable(this,"left","leftmargin",68,15),setPaddingVariable(this,"right","rightmargin",68,15)},ABCJS.write.Renderer.prototype.adjustNonScaledItems=function(scale){this.padding.top/=scale,this.padding.bottom/=scale,this.padding.left/=scale,this.padding.right/=scale,this.abctune.formatting.headerfont.size/=scale,this.abctune.formatting.footerfont.size/=scale},ABCJS.write.Renderer.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,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:30.67,words:0}},ABCJS.write.Renderer.prototype.setVerticalSpace=function(formatting){void 0!==formatting.staffsep&&(this.spacing.staffSeparation=4*formatting.staffsep/3),void 0!==formatting.composerspace&&(this.spacing.composer=4*formatting.composerspace/3),void 0!==formatting.partsspace&&(this.spacing.parts=4*formatting.partsspace/3),void 0!==formatting.textspace&&(this.spacing.text=4*formatting.textspace/3),void 0!==formatting.musicspace&&(this.spacing.music=4*formatting.musicspace/3),void 0!==formatting.titlespace&&(this.spacing.title=4*formatting.titlespace/3),void 0!==formatting.sysstaffsep&&(this.spacing.systemStaffSeparation=4*formatting.sysstaffsep/3),void 0!==formatting.subtitlespace&&(this.spacing.subtitle=4*formatting.subtitlespace/3),void 0!==formatting.topspace&&(this.spacing.top=4*formatting.topspace/3),void 0!==formatting.vocalspace&&(this.spacing.vocal=4*formatting.vocalspace/3),void 0!==formatting.wordsspace&&(this.spacing.words=4*formatting.wordsspace/3)},ABCJS.write.Renderer.prototype.topMargin=function(abctune){this.moveY(this.padding.top)},ABCJS.write.Renderer.prototype.addMusicPadding=function(){this.moveY(this.spacing.music)},ABCJS.write.Renderer.prototype.addStaffPadding=function(lastStaffGroup,thisStaffGroup){var lastStaff=lastStaffGroup.staffs[lastStaffGroup.staffs.length-1],lastBottomLine=-(lastStaff.bottom-2),nextTopLine=thisStaffGroup.staffs[0].top-10,naturalSeparation=nextTopLine+lastBottomLine,separationInPixels=naturalSeparation*ABCJS.write.spacing.STEP;separationInPixels<this.spacing.staffSeparation&&this.moveY(this.spacing.staffSeparation-separationInPixels)},ABCJS.write.Renderer.prototype.engraveTopText=function(width,abctune){if(abctune.metaText.header&&this.isPrint){var headerTextHeight=this.getTextSize("XXXX","headerfont","header meta-top").height;this.y-=headerTextHeight,this.outputTextIf(this.padding.left,abctune.metaText.header.left,"headerfont","header meta-top",0,null,"start"),this.outputTextIf(this.padding.left+width/2,abctune.metaText.header.center,"headerfont","header meta-top",0,null,"middle"),this.outputTextIf(this.padding.left+width,abctune.metaText.header.right,"headerfont","header meta-top",0,null,"end"),this.y+=headerTextHeight}if(this.isPrint&&this.moveY(this.spacing.top),this.outputTextIf(this.padding.left+width/2,abctune.metaText.title,"titlefont","title meta-top",this.spacing.title,0,"middle"),abctune.lines[0]&&this.outputTextIf(this.padding.left+width/2,abctune.lines[0].subtitle,"subtitlefont","text meta-top",this.spacing.subtitle,0,"middle"),abctune.metaText.rhythm||abctune.metaText.origin||abctune.metaText.composer){this.moveY(this.spacing.composer);var rSpace=this.outputTextIf(this.padding.left,abctune.metaText.rhythm,"infofont","meta-top",0,null,"start"),composerLine="";if(abctune.metaText.composer&&(composerLine+=abctune.metaText.composer),abctune.metaText.origin&&(composerLine+=" ("+abctune.metaText.origin+")"),composerLine.length>0){var space=this.outputTextIf(this.padding.left+width,composerLine,"composerfont","meta-top",0,null,"end");this.moveY(space[1])}else this.moveY(rSpace[1]);this.moveY(-6)}this.outputTextIf(this.padding.left+width,abctune.metaText.author,"composerfont","meta-top",0,0,"end"),this.outputTextIf(this.padding.left,abctune.metaText.partOrder,"partsfont","meta-bottom",0,0,"start")},ABCJS.write.Renderer.prototype.engraveExtraText=function(width,abctune){this.lineNumber=null,this.measureNumber=null,this.voiceNumber=null;var extraText;if(abctune.metaText.unalignedWords){extraText="";for(var j=0;j<abctune.metaText.unalignedWords.length;j++)if("string"==typeof abctune.metaText.unalignedWords[j])extraText+=abctune.metaText.unalignedWords[j]+"\n";else{for(var k=0;k<abctune.metaText.unalignedWords[j].length;k++)extraText+=" FONT "+abctune.metaText.unalignedWords[j][k].text;extraText+="\n"}this.outputTextIf(this.padding.left+ABCJS.write.spacing.INDENT,extraText,"wordsfont","meta-bottom",this.spacing.words,2,"start")}extraText="",abctune.metaText.book&&(extraText+="Book: "+abctune.metaText.book+"\n"),abctune.metaText.source&&(extraText+="Source: "+abctune.metaText.source+"\n"),abctune.metaText.discography&&(extraText+="Discography: "+abctune.metaText.discography+"\n"),abctune.metaText.notes&&(extraText+="Notes: "+abctune.metaText.notes+"\n"),abctune.metaText.transcription&&(extraText+="Transcription: "+abctune.metaText.transcription+"\n"),abctune.metaText.history&&(extraText+="History: "+abctune.metaText.history+"\n"),abctune.metaText["abc-copyright"]&&(extraText+="Copyright: "+abctune.metaText["abc-copyright"]+"\n"),abctune.metaText["abc-creator"]&&(extraText+="Creator: "+abctune.metaText["abc-creator"]+"\n"),abctune.metaText["abc-edited-by"]&&(extraText+="Edited By: "+abctune.metaText["abc-edited-by"]+"\n"),this.outputTextIf(this.padding.left,extraText,"historyfont","meta-bottom",this.spacing.info,0,"start"),abctune.metaText.footer&&this.isPrint&&(this.outputTextIf(this.padding.left,abctune.metaText.footer.left,"footerfont","header meta-bottom",0,null,"start"),this.outputTextIf(this.padding.left+width/2,abctune.metaText.footer.center,"footerfont","header meta-bottom",0,null,"middle"),this.outputTextIf(this.padding.left+width,abctune.metaText.footer.right,"footerfont","header meta-bottom",0,null,"end"))},ABCJS.write.Renderer.prototype.outputFreeText=function(text){if(""===text){var hash=this.getFontAndAttr("textfont","defined-text");this.moveY(2*hash.attr["font-size"])}else if("string"==typeof text)this.outputTextIf(this.padding.left,text,"textfont","defined-text",0,1,"start");else{for(var str="",isCentered=!1,i=0;i<text.length;i++)text[i].font&&(str+="FONT("+text[i].font+")"),str+=text[i].text,text[i].center&&(isCentered=!0);var alignment=isCentered?"middle":"start",x=isCentered?this.controller.width/2:this.padding.left;this.outputTextIf(x,str,"textfont","defined-text",0,1,alignment)}},ABCJS.write.Renderer.prototype.outputSubtitle=function(width,subtitle){this.outputTextIf(this.padding.left+width/2,subtitle,"subtitlefont","text meta-top",this.spacing.subtitle,0,"middle")},ABCJS.write.Renderer.prototype.beginGroup=function(){this.path=[],this.lastM=[0,0],this.ingroup=!0},ABCJS.write.Renderer.prototype.addPath=function(path){if(path=path||[],0!==path.length){path[0][0]="m",path[0][1]-=this.lastM[0],path[0][2]-=this.lastM[1],this.lastM[0]+=path[0][1],this.lastM[1]+=path[0][2],this.path.push(path[0]);for(var i=1,ii=path.length;i<ii;i++)"m"===path[i][0]&&(this.lastM[0]+=path[i][1],this.lastM[1]+=path[i][2]),this.path.push(path[i])}},ABCJS.write.Renderer.prototype.endGroup=function(klass){if(this.ingroup=!1,0===this.path.length)return null;var ret=this.paper.path().attr({path:this.path,stroke:"none",fill:"#000000",class:this.addClasses(klass)});return this.path=[],this.doRegression&&this.addToRegression(ret),ret},ABCJS.write.Renderer.prototype.printStaveLine=function(x1,x2,pitch,klass){var extraClass="staff";void 0!==klass&&(extraClass+=" "+klass);var isIE=!1,dy=.35,fill="#000000";isIE&&(dy=1,fill="#666666");var y=this.calcY(pitch),pathString=ABCJS.write.sprintf("M %f %f L %f %f L %f %f L %f %f z",x1,y-dy,x2,y-dy,x2,y+dy,x1,y+dy),ret=this.paper.path().attr({path:pathString,stroke:"none",fill:fill,class:this.addClasses(extraClass)}).toBack();return this.doRegression&&this.addToRegression(ret),ret},ABCJS.write.Renderer.prototype.printStem=function(x,dx,y1,y2){if(dx<0){var tmp=y2;y2=y1,y1=tmp}var isIE=!1,fill="#000000";isIE&&dx<1&&(dx=1,fill="#666666"),~~x===x&&(x+=.05);var pathArray=[["M",x,y1],["L",x,y2],["L",x+dx,y2],["L",x+dx,y1],["z"]];if(isIE||!this.ingroup){var ret=this.paper.path().attr({path:pathArray,stroke:"none",fill:fill,class:this.addClasses("stem")}).toBack();return this.doRegression&&this.addToRegression(ret),ret}this.addPath(pathArray)},ABCJS.write.Renderer.prototype.printSymbol=function(x,offset,symbol,scalex,scaley,klass){var el,ycorr;if(!symbol)return null;if(symbol.length>0&&symbol.indexOf(".")<0){for(var elemset=this.paper.set(),dx=0,i=0;i<symbol.length;i++){var s=symbol.charAt(i);ycorr=ABCJS.write.glyphs.getYCorr(s),el=ABCJS.write.glyphs.printSymbol(x+dx,this.calcY(offset+ycorr),s,this.paper,klass),el?(this.doRegression&&this.addToRegression(el),elemset.push(el),i<symbol.length-1&&(dx+=kernSymbols(s,symbol.charAt(i+1),ABCJS.write.glyphs.getSymbolWidth(s)))):this.renderText(x,this.y,"no symbol:"+symbol,"debugfont","debug-msg","start")}return elemset}if(ycorr=ABCJS.write.glyphs.getYCorr(symbol),this.ingroup)this.addPath(ABCJS.write.glyphs.getPathForSymbol(x,this.calcY(offset+ycorr),symbol,scalex,scaley));else{if(el=ABCJS.write.glyphs.printSymbol(x,this.calcY(offset+ycorr),symbol,this.paper,klass))return this.doRegression&&this.addToRegression(el),el;this.renderText(x,this.y,"no symbol:"+symbol,"debugfont","debug-msg","start")}return null},ABCJS.write.Renderer.prototype.printPath=function(attrs){var ret=this.paper.path().attr(attrs);return this.doRegression&&this.addToRegression(ret),ret},ABCJS.write.Renderer.prototype.drawBrace=function(xLeft,yTop,yBottom){var yHeight=yBottom-yTop,xCurve=[7.5,-8,21,0,18.5,-10.5,7.5],yCurve=[0,yHeight/5.5,yHeight/3.14,yHeight/2,yHeight/2.93,yHeight/4.88,0],pathString=ABCJS.write.sprintf("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",xLeft+xCurve[0],yTop+yCurve[0],xLeft+xCurve[1],yTop+yCurve[1],xLeft+xCurve[2],yTop+yCurve[2],xLeft+xCurve[3],yTop+yCurve[3],xLeft+xCurve[4],yTop+yCurve[4],xLeft+xCurve[5],yTop+yCurve[5],xLeft+xCurve[6],yTop+yCurve[6]),ret1=this.paper.path().attr({path:pathString,stroke:"#000000",fill:"#000000",class:this.addClasses("brace")});xCurve=[0,17.5,-7.5,6.6,-5,20,0],yCurve=[yHeight/2,yHeight/1.46,yHeight/1.22,yHeight,yHeight/1.19,yHeight/1.42,yHeight/2],pathString=ABCJS.write.sprintf("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",xLeft+xCurve[0],yTop+yCurve[0],xLeft+xCurve[1],yTop+yCurve[1],xLeft+xCurve[2],yTop+yCurve[2],xLeft+xCurve[3],yTop+yCurve[3],xLeft+xCurve[4],yTop+yCurve[4],xLeft+xCurve[5],yTop+yCurve[5],xLeft+xCurve[6],yTop+yCurve[6]);var ret2=this.paper.path().attr({path:pathString,stroke:"#000000",fill:"#000000",class:this.addClasses("brace")});return this.doRegression&&(this.addToRegression(ret1),this.addToRegression(ret2)),ret1+ret2},ABCJS.write.Renderer.prototype.drawArc=function(x1,x2,pitch1,pitch2,above,klass,isTie){var spacing=isTie?1.2:1.5;x1+=6,x2+=4,pitch1+=above?spacing:-spacing,pitch2+=above?spacing:-spacing;var y1=this.calcY(pitch1),y2=this.calcY(pitch2),dx=x2-x1,dy=y2-y1,norm=Math.sqrt(dx*dx+dy*dy),ux=dx/norm,uy=dy/norm,flatten=norm/3.5,maxFlatten=isTie?1.5:25,curve=(above?-1:1)*Math.min(maxFlatten,Math.max(4,flatten)),controlx1=x1+flatten*ux-curve*uy,controly1=y1+flatten*uy+curve*ux,controlx2=x2-flatten*ux-curve*uy,controly2=y2-flatten*uy+curve*ux,thickness=2,pathString=ABCJS.write.sprintf("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",x1,y1,controlx1,controly1,controlx2,controly2,x2,y2,controlx2-thickness*uy,controly2+thickness*ux,controlx1-thickness*uy,controly1+thickness*ux,x1,y1);klass?klass+=" slur":klass="slur";var ret=this.paper.path().attr({path:pathString,stroke:"none",fill:"#000000",class:this.addClasses(klass)});return this.doRegression&&this.addToRegression(ret),ret},ABCJS.write.Renderer.prototype.calcY=function(ofs){return this.y-ofs*ABCJS.write.spacing.STEP},ABCJS.write.Renderer.prototype.printStave=function(startx,endx,numLines){var klass="top-line";if(1===numLines)return void this.printStaveLine(startx,endx,6,klass);for(var i=numLines-1;i>=0;i--)this.printStaveLine(startx,endx,2*(i+1),klass),klass=void 0},ABCJS.write.Renderer.prototype.addClasses=function(c){var ret=[];return c.length>0&&ret.push(c),null!==this.lineNumber&&ret.push("l"+this.lineNumber),null!==this.measureNumber&&ret.push("m"+this.measureNumber),null!==this.voiceNumber&&ret.push("v"+this.voiceNumber),ret.join(" ")},ABCJS.write.Renderer.prototype.getFontAndAttr=function(type,klass){var font=this.abctune.formatting[type];font=font?{face:font.face,size:4*font.size/3,decoration:font.decoration,style:font.style,weight:font.weight,box:font.box}:{face:"Arial",size:16,decoration:"underline",style:"normal",weight:"normal"};var attr={"font-size":font.size,"font-style":font.style,"font-family":font.face,"font-weight":font.weight,"text-decoration":font.decoration,class:this.addClasses(klass)};return attr.font="",{font:font,attr:attr}},ABCJS.write.Renderer.prototype.getTextSize=function(text,type,klass){var hash=this.getFontAndAttr(type,klass),el=this.paper.text(0,0,text).attr(hash.attr),size=el.getBBox();return isNaN(size.height)&&(size={width:0,height:0}),el.remove(),size},ABCJS.write.Renderer.prototype.renderText=function(x,y,text,type,klass,anchor,centerVertically){var hash=this.getFontAndAttr(type,klass);anchor&&(hash.attr["text-anchor"]=anchor),text=text.replace(/\n\n/g,"\n \n");var el=this.paper.text(x,y,text).attr(hash.attr);if(!centerVertically){var size=el.getBBox();isNaN(size.height)?el.attr({y:y}):(el.attr({y:y+size.height/2}),hash.font.box&&this.paper.rect(size.x-1,size.y+size.height/2-1,size.width+2,size.height+2).attr({stroke:"#888888"}))}return"debugfont"===type&&(console.log("Debug msg: "+text),el.attr({stroke:"#ff0000"})),this.doRegression&&this.addToRegression(el),el},ABCJS.write.Renderer.prototype.moveY=function(em,numLines){void 0===numLines&&(numLines=1),this.y+=em*numLines},ABCJS.write.Renderer.prototype.skipSpaceY=function(){this.y+=this.space},ABCJS.write.Renderer.prototype.outputTextIf=function(x,str,kind,klass,marginTop,marginBottom,alignment){if(str){marginTop&&this.moveY(marginTop);var el=this.renderText(x,this.y,str,kind,klass,alignment),bb=el.getBBox(),width=isNaN(bb.width)?0:bb.width,height=isNaN(bb.height)?0:bb.height;if(null!==marginBottom){var numLines=str.split("\n").length;isNaN(bb.height)||this.moveY(height/numLines,numLines+marginBottom)}return[width,height]}return[0,0]},ABCJS.write.Renderer.prototype.addInvisibleMarker=function(className){var dy=.35,fill="rgba(0,0,0,0)",y=this.y;y=Math.round(y);var x1=0,x2=100,pathString=ABCJS.write.sprintf("M %f %f L %f %f L %f %f L %f %f z",x1,y-dy,x1+x2,y-dy,x2,y+dy,x1,y+dy);this.paper.path().attr({path:pathString,stroke:"none",fill:fill,class:this.addClasses(className),"data-vertical":y}).toBack()},ABCJS.write.Renderer.prototype.printHorizontalLine=function(width,vertical,comment){var dy=.35,fill="rgba(0,0,255,.4)",y=this.y;vertical&&(y=vertical),y=Math.round(y),this.paper.text(10,y,""+Math.round(y)).attr({"text-anchor":"start","font-size":"18px",fill:fill,stroke:fill});var x1=50,x2=width,pathString=ABCJS.write.sprintf("M %f %f L %f %f L %f %f L %f %f z",x1,y-dy,x1+x2,y-dy,x2,y+dy,x1,y+dy);this.paper.path().attr({path:pathString,stroke:"none",fill:fill,class:this.addClasses("staff")}).toBack();for(var i=1;i<width/100;i++)pathString=ABCJS.write.sprintf("M %f %f L %f %f L %f %f L %f %f z",100*i-dy,y-5,100*i-dy,y+5,100*i+dy,y-5,100*i+dy,y+5),this.paper.path().attr({path:pathString,stroke:"none",fill:fill,class:this.addClasses("staff")}).toBack();comment&&this.paper.text(width+70,y,comment).attr({"text-anchor":"start","font-size":"18px",fill:fill,stroke:fill})},ABCJS.write.Renderer.prototype.printShadedBox=function(x,y,width,height,color,comment){var box=this.paper.rect(x,y,width,height).attr({fill:color,stroke:color});return comment&&this.paper.text(0,y+7,comment).attr({"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),box},ABCJS.write.Renderer.prototype.printVerticalLine=function(x,y1,y2){var dy=.35,fill="#00aaaa",pathString=ABCJS.write.sprintf("M %f %f L %f %f L %f %f L %f %f z",x-dy,y1,x-dy,y2,x+dy,y1,x+dy,y2);this.paper.path().attr({path:pathString,stroke:"none",fill:fill,class:this.addClasses("staff")}).toBack(),pathString=ABCJS.write.sprintf("M %f %f L %f %f L %f %f L %f %f z",x-20,y1,x-20,y1+3,x,y1,x,y1+3),this.paper.path().attr({path:pathString,stroke:"none",fill:fill,class:this.addClasses("staff")}).toBack(),pathString=ABCJS.write.sprintf("M %f %f L %f %f L %f %f L %f %f z",x+20,y2,x+20,y2+3,x,y2,x,y2+3),this.paper.path().attr({path:pathString,stroke:"none",fill:fill,class:this.addClasses("staff")}).toBack()},ABCJS.write.Renderer.prototype.addToRegression=function(el){var box=el.getBBox(),str=el.type+" "+box.toString()+" ",attrs=[];for(var key in el.attrs)el.attrs.hasOwnProperty(key)&&("class"===key?str=el.attrs[key]+" "+str:attrs.push(key+": "+el.attrs[key]));attrs.sort(),str+="{ "+attrs.join(" ")+" }",this.regressionLines.push(str)},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.StaffGroupElement=function(){this.voices=[],this.staffs=[],this.brace=void 0},ABCJS.write.StaffGroupElement.prototype.setLimit=function(member,voice){voice.specialY[member]&&(voice.staff.specialY[member]?voice.staff.specialY[member]=Math.max(voice.staff.specialY[member],voice.specialY[member]):voice.staff.specialY[member]=voice.specialY[member])},ABCJS.write.StaffGroupElement.prototype.addVoice=function(voice,staffnumber,stafflines){var voiceNum=this.voices.length;this.voices[voiceNum]=voice,this.staffs[staffnumber]?this.staffs[staffnumber].voices.push(voiceNum):this.staffs[this.staffs.length]={top:10,bottom:2,lines:stafflines,voices:[voiceNum],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},voice.staff=this.staffs[staffnumber]},ABCJS.write.StaffGroupElement.prototype.setStaffLimits=function(voice){voice.staff.top=Math.max(voice.staff.top,voice.top),voice.staff.bottom=Math.min(voice.staff.bottom,voice.bottom),this.setLimit("tempoHeightAbove",voice),this.setLimit("partHeightAbove",voice),this.setLimit("volumeHeightAbove",voice),this.setLimit("dynamicHeightAbove",voice),this.setLimit("endingHeightAbove",voice),this.setLimit("chordHeightAbove",voice),this.setLimit("lyricHeightAbove",voice),this.setLimit("lyricHeightBelow",voice),this.setLimit("chordHeightBelow",voice),this.setLimit("volumeHeightBelow",voice),this.setLimit("dynamicHeightBelow",voice)};ABCJS.write.StaffGroupElement.prototype.setUpperAndLowerElements=function(renderer){for(var lastStaffBottom,i=0;i<this.staffs.length;i++){var staff=this.staffs[i],positionY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};ABCJS.write.debugPlacement&&(staff.originalTop=staff.top,staff.originalBottom=staff.bottom),staff.specialY.lyricHeightAbove&&(staff.top+=staff.specialY.lyricHeightAbove,positionY.lyricHeightAbove=staff.top),staff.specialY.chordHeightAbove&&(staff.top+=staff.specialY.chordHeightAbove,positionY.chordHeightAbove=staff.top),staff.specialY.endingHeightAbove&&(staff.specialY.chordHeightAbove?staff.top+=2:staff.top+=staff.specialY.endingHeightAbove,positionY.endingHeightAbove=staff.top),staff.specialY.dynamicHeightAbove&&staff.specialY.volumeHeightAbove?(staff.top+=Math.max(staff.specialY.dynamicHeightAbove,staff.specialY.volumeHeightAbove),positionY.dynamicHeightAbove=staff.top,positionY.volumeHeightAbove=staff.top):staff.specialY.dynamicHeightAbove?(staff.top+=staff.specialY.dynamicHeightAbove,positionY.dynamicHeightAbove=staff.top):staff.specialY.volumeHeightAbove&&(staff.top+=staff.specialY.volumeHeightAbove,positionY.volumeHeightAbove=staff.top),staff.specialY.partHeightAbove&&(staff.top+=staff.specialY.partHeightAbove,positionY.partHeightAbove=staff.top),staff.specialY.tempoHeightAbove&&(staff.top+=staff.specialY.tempoHeightAbove,positionY.tempoHeightAbove=staff.top),staff.specialY.lyricHeightBelow&&(positionY.lyricHeightBelow=staff.bottom,staff.bottom-=staff.specialY.lyricHeightBelow),staff.specialY.chordHeightBelow&&(positionY.chordHeightBelow=staff.bottom,staff.bottom-=staff.specialY.chordHeightBelow),staff.specialY.volumeHeightBelow&&staff.specialY.dynamicHeightBelow?(positionY.volumeHeightBelow=staff.bottom,positionY.dynamicHeightBelow=staff.bottom,staff.bottom-=Math.max(staff.specialY.volumeHeightBelow,staff.specialY.dynamicHeightBelow)):staff.specialY.volumeHeightBelow?(positionY.volumeHeightBelow=staff.bottom,staff.bottom-=staff.specialY.volumeHeightBelow):staff.specialY.dynamicHeightBelow&&(positionY.dynamicHeightBelow=staff.bottom,staff.bottom-=staff.specialY.dynamicHeightBelow),ABCJS.write.debugPlacement&&(staff.positionY=positionY);for(var j=0;j<staff.voices.length;j++){var voice=this.voices[staff.voices[j]];voice.setUpperAndLowerElements(positionY)}if(void 0!==lastStaffBottom){var thisStaffTop=staff.top-10,forcedSpacingBetween=lastStaffBottom+thisStaffTop,minSpacingInPitches=renderer.spacing.systemStaffSeparation/ABCJS.write.spacing.STEP,addedSpace=minSpacingInPitches-forcedSpacingBetween;addedSpace>0&&(staff.top+=addedSpace)}lastStaffBottom=2-staff.bottom}};ABCJS.write.StaffGroupElement.prototype.finished=function(){for(var i=0;i<this.voices.length;i++)if(!this.voices[i].layoutEnded())return!1;return!0},ABCJS.write.StaffGroupElement.prototype.layout=function(spacing,renderer,debug){var epsilon=1e-7;this.spacingunits=0,this.minspace=1e3;for(var x=renderer.padding.left,voiceheaderw=0,i=0;i<this.voices.length;i++)if(this.voices[i].header){var size=renderer.getTextSize(this.voices[i].header,"voicefont","");voiceheaderw=Math.max(voiceheaderw,size.width)}x+=1.1*voiceheaderw,this.startx=x,this.brace&&(this.brace.setLocation(this.startx),x+=this.brace.getWidth(),this.startx=x);var currentduration=0;for(debug&&console.log("init layout"),i=0;i<this.voices.length;i++)this.voices[i].beginLayout(x);for(var spacingunit=0;!this.finished();){for(currentduration=null,i=0;i<this.voices.length;i++)this.voices[i].layoutEnded()||currentduration&&!(this.voices[i].getDurationIndex()<currentduration)||(currentduration=this.voices[i].getDurationIndex());debug&&console.log("currentduration: ",currentduration);var currentvoices=[],othervoices=[];for(i=0;i<this.voices.length;i++){var durationIndex=this.voices[i].getDurationIndex();durationIndex-currentduration>epsilon?othervoices.push(this.voices[i]):(currentvoices.push(this.voices[i]),debug&&console.log("in: voice ",i))}spacingunit=0;var spacingduration=0;for(i=0;i<currentvoices.length;i++)currentvoices[i].getNextX()>x&&(x=currentvoices[i].getNextX(),spacingunit=currentvoices[i].getSpacingUnits(),spacingduration=currentvoices[i].spacingduration);for(this.spacingunits+=spacingunit,this.minspace=Math.min(this.minspace,spacingunit),i=0;i<currentvoices.length;i++){var voicechildx=currentvoices[i].layoutOneItem(x,spacing),dx=voicechildx-x;if(dx>0){x=voicechildx;for(var j=0;j<i;j++)currentvoices[j].shiftRight(dx)}}for(i=0;i<othervoices.length;i++)othervoices[i].spacingduration-=spacingduration,othervoices[i].updateNextX(x,spacing);for(i=0;i<currentvoices.length;i++){var voice=currentvoices[i];voice.updateIndices()}}for(i=0;i<this.voices.length;i++)this.voices[i].getNextX()>x&&(x=this.voices[i].getNextX(),spacingunit=this.voices[i].getSpacingUnits());for(this.spacingunits+=spacingunit,this.w=x,i=0;i<this.voices.length;i++)this.voices[i].w=this.w},ABCJS.write.StaffGroupElement.prototype.calcHeight=function(){for(var height=0,i=0;i<this.voices.length;i++){var staff=this.voices[i].staff;this.voices[i].duplicate||(height+=staff.top,staff.bottom<0&&(height+=-staff.bottom))}return height},ABCJS.write.StaffGroupElement.prototype.draw=function(renderer){var debugPrint,colorIndex;if(ABCJS.write.debugPlacement){var colors=["rgba(207,27,36,0.4)","rgba(168,214,80,0.4)","rgba(110,161,224,0.4)","rgba(191,119,218,0.4)","rgba(195,30,151,0.4)","rgba(31,170,177,0.4)","rgba(220,166,142,0.4)"];debugPrint=function(staff,key){if(staff.positionY[key]){var height=staff.specialY[key]*ABCJS.write.spacing.STEP;renderer.printShadedBox(renderer.padding.left,renderer.calcY(staff.positionY[key]),renderer.controller.width,height,colors[colorIndex],key.substr(0,4)),colorIndex+=1,colorIndex>6&&(colorIndex=0)}}}renderer.addInvisibleMarker("abcjs-top-of-system");for(var startY=renderer.y,j=0;j<this.staffs.length;j++){var staff1=this.staffs[j];renderer.moveY(ABCJS.write.spacing.STEP,staff1.top),staff1.absoluteY=renderer.y,ABCJS.write.debugPlacement&&(colorIndex=0,renderer.printShadedBox(renderer.padding.left,renderer.calcY(staff1.originalTop),renderer.controller.width,renderer.calcY(staff1.originalBottom)-renderer.calcY(staff1.originalTop),"rgba(0,0,0,0.1)"),debugPrint(staff1,"chordHeightAbove"),debugPrint(staff1,"chordHeightBelow"),debugPrint(staff1,"dynamicHeightAbove"),debugPrint(staff1,"dynamicHeightBelow"),debugPrint(staff1,"endingHeightAbove"),debugPrint(staff1,"lyricHeightAbove"),debugPrint(staff1,"lyricHeightBelow"),debugPrint(staff1,"partHeightAbove"),debugPrint(staff1,"tempoHeightAbove"),debugPrint(staff1,"volumeHeightAbove"),debugPrint(staff1,"volumeHeightBelow")),staff1.bottom<0&&renderer.moveY(ABCJS.write.spacing.STEP,-staff1.bottom)}var topLine,bottomLine,bartop=0;renderer.measureNumber=null;for(var i=0;i<this.voices.length;i++){var staff=this.voices[i].staff;renderer.y=staff.absoluteY,renderer.voiceNumber=i,this.voices[i].duplicate||(topLine||(topLine=renderer.calcY(10)),bottomLine=renderer.calcY(2),0!==staff.lines&&renderer.printStave(this.startx,this.w,staff.lines)),this.voices[i].draw(renderer,bartop),this.voices[i].duplicate||(bartop=renderer.calcY(2)),this.brace&&i===this.brace.length-1&&this.brace&&this.brace.draw(renderer,topLine,bottomLine)}renderer.measureNumber=null,this.staffs.length>1&&renderer.printStem(this.startx,.6,topLine,bottomLine),renderer.y=startY},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),function(){"use strict";var totalHeightInPitches=5;ABCJS.write.TempoElement=function(tempo,tuneNumber){this.tempo=tempo,this.tuneNumber=tuneNumber,this.tempoHeightAbove=totalHeightInPitches,this.pitch=void 0},ABCJS.write.TempoElement.prototype.setUpperAndLowerElements=function(positionY){this.pitch=positionY.tempoHeightAbove},ABCJS.write.TempoElement.prototype.setX=function(x){this.x=x},ABCJS.write.TempoElement.prototype.draw=function(renderer){var x=this.x;void 0===this.pitch&&window.console.error("Tempo Element y-coordinate not set.");var text,y=renderer.calcY(this.pitch);if(this.tempo.preString){text=renderer.renderText(x,y,this.tempo.preString,"tempofont","tempo","start");var preWidth=text.getBBox().width,charWidth=preWidth/this.tempo.preString.length;
+x+=preWidth+charWidth}if(this.tempo.duration){var dot,flag,note,temposcale=.75,tempopitch=this.pitch-totalHeightInPitches+1,duration=this.tempo.duration[0],abselem=new ABCJS.write.AbsoluteElement(this.tempo,duration,1,"tempo",this.tuneNumber);duration<=1/32?(note="noteheads.quarter",flag="flags.u32nd",dot=0):duration<=1/16?(note="noteheads.quarter",flag="flags.u16th",dot=0):duration<=3/32?(note="noteheads.quarter",flag="flags.u16nd",dot=1):duration<=1/8?(note="noteheads.quarter",flag="flags.u8th",dot=0):duration<=3/16?(note="noteheads.quarter",flag="flags.u8th",dot=1):duration<=.25?(note="noteheads.quarter",dot=0):duration<=3/8?(note="noteheads.quarter",dot=1):duration<=.5?(note="noteheads.half",dot=0):duration<=.75?(note="noteheads.half",dot=1):duration<=1?(note="noteheads.whole",dot=0):duration<=1.5?(note="noteheads.whole",dot=1):duration<=2?(note="noteheads.dbl",dot=0):(note="noteheads.dbl",dot=1);var temponote=renderer.engraver.createNoteHead(abselem,note,{verticalPos:tempopitch},"up",0,0,flag,dot,0,temposcale);abselem.addHead(temponote);var stem;if("noteheads.whole"!==note&&"noteheads.dbl"!==note){var p1=tempopitch+1/3*temposcale,p2=tempopitch+7*temposcale,dx=temponote.dx+temponote.w,width=-.6;stem=new ABCJS.write.RelativeElement(null,dx,0,p1,{type:"stem",pitch2:p2,linewidth:width}),stem.setX(x),abselem.addExtra(stem)}abselem.setX(x);for(var i=0;i<abselem.children.length;i++)abselem.children[i].draw(renderer,x);x+=abselem.w+5;var str="= "+this.tempo.bpm;text=renderer.renderText(x,y,str,"tempofont","tempo","start");var postWidth=text.getBBox().width,charWidth2=postWidth/str.length;x+=postWidth+charWidth2}this.tempo.postString&&renderer.renderText(x,y,this.tempo.postString,"tempofont","tempo","start")}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.TieElem=function(anchor1,anchor2,above,forceandshift,isTie){this.anchor1=anchor1,this.anchor2=anchor2,this.above=above,this.force=forceandshift,this.isTie=isTie},ABCJS.write.TieElem.prototype.setEndAnchor=function(anchor2){this.anchor2=anchor2,this.isTie&&(this.anchor1&&(this.anchor1.isTie=!0),this.anchor2&&(this.anchor2.isTie=!0))},ABCJS.write.TieElem.prototype.setStartX=function(startLimitElem){this.startLimitX=startLimitElem},ABCJS.write.TieElem.prototype.setEndX=function(endLimitElem){this.endLimitX=endLimitElem},ABCJS.write.TieElem.prototype.setHint=function(){this.hint=!0},ABCJS.write.TieElem.prototype.setUpperAndLowerElements=function(positionY){},ABCJS.write.TieElem.prototype.layout=function(lineStartX,lineEndX){function getPitch(anchor,isAbove,isTie){return isTie?anchor.pitch:isAbove&&void 0!==anchor.highestVert?anchor.highestVert:anchor.pitch}!this.force&&this.anchor2&&this.anchor2.pitch===this.anchor2.highestVert&&(this.above=!0),this.isTie?(this.anchor1&&(this.anchor1.tieAbove=this.above),this.anchor2&&(this.anchor2.tieAbove=this.above)):this.anchor2&&this.anchor2.isTie?this.above=this.anchor2.tieAbove:this.anchor1&&this.anchor1.isTie&&(this.above=this.anchor1.tieAbove),this.anchor1?this.startX=this.anchor1.x:this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.startX=lineStartX,this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=lineEndX,this.anchor1&&this.anchor2?(this.startY=getPitch(this.anchor1,this.above,this.isTie),this.endY=getPitch(this.anchor2,this.above,this.isTie)):this.anchor1?(this.startY=getPitch(this.anchor1,this.above,this.isTie),this.endY=getPitch(this.anchor1,this.above,this.isTie)):this.anchor2?(this.startY=getPitch(this.anchor2,this.above,this.isTie),this.endY=getPitch(this.anchor2,this.above,this.isTie)):(this.startY=this.above?14:0,this.endY=this.above?14:0)},ABCJS.write.TieElem.prototype.draw=function(renderer,linestartx,lineendx){this.layout(linestartx,lineendx);var klass;this.hint&&(klass="abcjs-hint"),renderer.drawArc(this.startX,this.endX,this.startY,this.endY,this.above,klass,this.isTie)},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),function(){"use strict";function drawLine(renderer,l,t,r,b){var pathString=ABCJS.write.sprintf("M %f %f L %f %f",l,t,r,b);renderer.printPath({path:pathString,stroke:"#000000",class:renderer.addClasses("triplet")})}function drawBracket(renderer,x1,y1,x2,y2){y1=renderer.calcY(y1),y2=renderer.calcY(y2);var bracketHeight=5;drawLine(renderer,x1,y1,x1,y1+bracketHeight),drawLine(renderer,x2,y2,x2,y2+bracketHeight);var midX=x1+(x2-x1)/2,gapWidth=8,slope=(y2-y1)/(x2-x1),leftEndX=midX-gapWidth,leftEndY=y1+(leftEndX-x1)*slope;drawLine(renderer,x1,y1,leftEndX,leftEndY);var rightStartX=midX+gapWidth,rightStartY=y1+(rightStartX-x1)*slope;drawLine(renderer,rightStartX,rightStartY,x2,y2)}ABCJS.write.TripletElem=function(number,anchor1){this.anchor1=anchor1,this.number=number},ABCJS.write.TripletElem.prototype.isClosed=function(){return this.anchor2},ABCJS.write.TripletElem.prototype.setCloseAnchor=function(anchor2){this.anchor2=anchor2,this.anchor1.parent.beam&&(this.endingHeightAbove=4)},ABCJS.write.TripletElem.prototype.setUpperAndLowerElements=function(){},ABCJS.write.TripletElem.prototype.layout=function(){if(this.anchor1&&this.anchor2)if(this.hasBeam=this.anchor1.parent.beam&&this.anchor1.parent.beam===this.anchor2.parent.beam,this.hasBeam){var beam=this.anchor1.parent.beam,left=beam.isAbove()?this.anchor1.x+this.anchor1.w:this.anchor1.x;this.yTextPos=beam.heightAtMidpoint(left,this.anchor2.x),this.yTextPos+=beam.isAbove()?4:-4,beam.isAbove()&&(this.endingHeightAbove=4)}else this.startNote=Math.max(this.anchor1.parent.top,9)+4,this.endNote=Math.max(this.anchor2.parent.top,9)+4,this.yTextPos=this.startNote+(this.endNote-this.startNote)/2},ABCJS.write.TripletElem.prototype.draw=function(renderer){var xTextPos;if(this.hasBeam){var left=this.anchor1.parent.beam.isAbove()?this.anchor1.x+this.anchor1.w:this.anchor1.x;xTextPos=this.anchor1.parent.beam.xAtMidpoint(left,this.anchor2.x)}else xTextPos=this.anchor1.x+(this.anchor2.x+this.anchor2.w-this.anchor1.x)/2,drawBracket(renderer,this.anchor1.x,this.startNote,this.anchor2.x+this.anchor2.w,this.endNote);renderer.renderText(xTextPos,renderer.calcY(this.yTextPos),""+this.number,"tripletfont","triplet","middle",!0)}}(),window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.VoiceElement=function(voicenumber,voicetotal){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=voicenumber,this.voicetotal=voicetotal,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}},ABCJS.write.VoiceElement.prototype.addChild=function(child){if("bar"===child.type){for(var firstItem=!0,i=0;firstItem&&i<this.children.length;i++)"staff-extra"!==this.children[i].type&&(firstItem=!1);firstItem||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=child,this.setRange(child)},ABCJS.write.VoiceElement.prototype.setLimit=function(member,child){var specialY=child.specialY;specialY||(specialY=child),specialY[member]&&(this.specialY[member]?this.specialY[member]=Math.max(this.specialY[member],specialY[member]):this.specialY[member]=specialY[member])},ABCJS.write.VoiceElement.prototype.moveDecorations=function(beam){for(var padding=1.5,ch=0;ch<beam.elems.length;ch++){var child=beam.elems[ch];if(child.top)for(var top=beam.yAtNote(child),i=0;i<child.children.length;i++){var el=child.children[i];if("ornament"===el.klass&&el.bottom-padding<top){var distance=top-el.bottom+padding;el.bottom+=distance,el.top+=distance,el.pitch+=distance,top=child.top=el.top}}}},ABCJS.write.VoiceElement.prototype.adjustRange=function(child){void 0!==child.bottom&&(this.bottom=Math.min(this.bottom,child.bottom)),void 0!==child.top&&(this.top=Math.max(this.top,child.top))},ABCJS.write.VoiceElement.prototype.setRange=function(child){this.adjustRange(child),this.setLimit("tempoHeightAbove",child),this.setLimit("partHeightAbove",child),this.setLimit("volumeHeightAbove",child),this.setLimit("dynamicHeightAbove",child),this.setLimit("endingHeightAbove",child),this.setLimit("chordHeightAbove",child),this.setLimit("lyricHeightAbove",child),this.setLimit("lyricHeightBelow",child),this.setLimit("chordHeightBelow",child),this.setLimit("volumeHeightBelow",child),this.setLimit("dynamicHeightBelow",child)},ABCJS.write.VoiceElement.prototype.setUpperAndLowerElements=function(positionY){var i;for(i=0;i<this.children.length;i++){var abselem=this.children[i];abselem.setUpperAndLowerElements(positionY)}for(i=0;i<this.otherchildren.length;i++){var abselem=this.otherchildren[i];"string"!=typeof abselem&&abselem.setUpperAndLowerElements(positionY)}},ABCJS.write.VoiceElement.prototype.addOther=function(child){this.otherchildren.push(child),this.setRange(child)},ABCJS.write.VoiceElement.prototype.addBeam=function(child){this.beams.push(child)},ABCJS.write.VoiceElement.prototype.updateIndices=function(){this.layoutEnded()||(this.durationindex+=this.children[this.i].duration,0===this.children[this.i].duration&&(this.durationindex=Math.round(64*this.durationindex)/64),this.i++)},ABCJS.write.VoiceElement.prototype.layoutEnded=function(){return this.i>=this.children.length},ABCJS.write.VoiceElement.prototype.getDurationIndex=function(){return this.durationindex-(this.children[this.i]&&this.children[this.i].duration>0?0:5e-7)},ABCJS.write.VoiceElement.prototype.getSpacingUnits=function(){return Math.sqrt(8*this.spacingduration)},ABCJS.write.VoiceElement.prototype.getNextX=function(){return Math.max(this.minx,this.nextx)},ABCJS.write.VoiceElement.prototype.beginLayout=function(startx){this.i=0,this.durationindex=0,this.startx=startx,this.minx=startx,this.nextx=startx,this.spacingduration=0},ABCJS.write.VoiceElement.prototype.layoutOneItem=function(x,spacing){var child=this.children[this.i];if(!child)return 0;var er=x-this.minx;return er<child.getExtraWidth()&&(x+=child.getExtraWidth()-er),child.setX(x),this.spacingduration=child.duration,this.minx=x+child.getMinWidth(),this.i!==this.children.length-1&&(this.minx+=child.minspacing),this.updateNextX(x,spacing),x},ABCJS.write.VoiceElement.prototype.updateNextX=function(x,spacing){this.nextx=x+spacing*Math.sqrt(8*this.spacingduration)},ABCJS.write.VoiceElement.prototype.shiftRight=function(dx){var child=this.children[this.i];child&&(child.setX(child.x+dx),this.minx+=dx,this.nextx+=dx)},ABCJS.write.VoiceElement.prototype.draw=function(renderer,bartop){var width=this.w-1;if(renderer.staffbottom=this.staff.bottom,renderer.measureNumber=null,this.header){var textpitch=14-(this.voicenumber+1)*(12/(this.voicetotal+1));renderer.renderText(renderer.padding.left,renderer.calcY(textpitch),this.header,"voicefont","staff-extra voice-name","start")}for(var i=0,ii=this.children.length;i<ii;i++){var child=this.children[i],justInitializedMeasureNumber=!1;"staff-extra"!==child.type&&null===renderer.measureNumber&&(renderer.measureNumber=0,justInitializedMeasureNumber=!0),child.draw(renderer,this.barto||i===ii-1?bartop:0),"bar"!==child.type||justInitializedMeasureNumber||renderer.measureNumber++}renderer.measureNumber=0,window.ABCJS.parse.each(this.beams,function(beam){"bar"===beam?renderer.measureNumber++:beam.draw(renderer)}),renderer.measureNumber=0;var self=this;window.ABCJS.parse.each(this.otherchildren,function(child){"bar"===child?renderer.measureNumber++:child.draw(renderer,self.startx+10,width)})},ABCJS.write.VoiceElement.prototype.layoutBeams=function(){for(var i=0;i<this.beams.length;i++)if(this.beams[i].layout){this.beams[i].layout(),this.moveDecorations(this.beams[i]);for(var j=0;j<this.beams[i].elems.length;j++)this.adjustRange(this.beams[i].elems[j])}for(i=0;i<this.otherchildren.length;i++){var child=this.otherchildren[i];child.layout&&child.layout()}this.staff.top=Math.max(this.staff.top,this.top),this.staff.bottom=Math.min(this.staff.bottom,this.bottom)},window.ABCJS||(window.ABCJS={}),window.ABCJS.write||(window.ABCJS.write={}),ABCJS.write.sprintf=function(){for(var a,m,p,c,x,i=0,f=arguments[i++],o=[];f;){if(m=/^[^\x25]+/.exec(f))o.push(m[0]);else if(m=/^\x25{2}/.exec(f))o.push("%");else{if(!(m=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(f)))throw"Huh ?!";if(null==(a=arguments[m[1]||i++])||void 0==a)throw"Too few arguments.";if(/[^s]/.test(m[7])&&"number"!=typeof a)throw"Expecting number but found "+typeof a;switch(m[7]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a);break;case"e":a=m[6]?a.toExponential(m[6]):a.toExponential();break;case"f":a=m[6]?parseFloat(a).toFixed(m[6]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&m[6]?a.substring(0,m[6]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(m[7])&&m[2]&&a>0?"+"+a:a,c=m[3]?"0"==m[3]?"0":m[3].charAt(1):" ",x=m[5]-String(a).length,p=m[5]?str_repeat(c,x):"",o.push(m[4]?a+p:p+a)}f=f.substring(m[0].length)}return o.join("")}; \ No newline at end of file
diff --git a/webpackBaseConfig.js b/webpackBaseConfig.js
index f37eae59..393aa98b 100644
--- a/webpackBaseConfig.js
+++ b/webpackBaseConfig.js
@@ -202,6 +202,7 @@ module.exports = {
'script!ot',
'flowchart.js',
'js-sequence-diagrams',
+ 'script!abcjs',
'expose?RevealMarkdown!reveal-markdown',
path.join(__dirname, 'public/js/google-drive-upload.js'),
path.join(__dirname, 'public/js/google-drive-picker.js'),
@@ -258,6 +259,7 @@ module.exports = {
'flowchart.js',
'js-sequence-diagrams',
'expose?Viz!viz.js',
+ 'script!abcjs',
'expose?io!socket.io-client',
'expose?RevealMarkdown!reveal-markdown',
path.join(__dirname, 'public/js/google-drive-upload.js'),
@@ -269,6 +271,7 @@ module.exports = {
'expose?filterXSS!xss',
'flowchart.js',
'js-sequence-diagrams',
+ 'script!abcjs',
'expose?RevealMarkdown!reveal-markdown',
path.join(__dirname, 'public/js/pretty.js')
],
@@ -297,6 +300,7 @@ module.exports = {
'flowchart.js',
'js-sequence-diagrams',
'expose?Viz!viz.js',
+ 'script!abcjs',
'expose?RevealMarkdown!reveal-markdown',
path.join(__dirname, 'public/js/pretty.js')
],
@@ -306,6 +310,7 @@ module.exports = {
'expose?filterXSS!xss',
'flowchart.js',
'js-sequence-diagrams',
+ 'script!abcjs',
'expose?RevealMarkdown!reveal-markdown',
path.join(__dirname, 'public/js/slide.js')
],
@@ -337,6 +342,7 @@ module.exports = {
'flowchart.js',
'js-sequence-diagrams',
'expose?Viz!viz.js',
+ 'script!abcjs',
'headjs',
'expose?Reveal!reveal.js',
'expose?RevealMarkdown!reveal-markdown',
@@ -370,7 +376,8 @@ module.exports = {
'gist-embed': path.join(__dirname, 'node_modules/gist-embed/gist-embed.min.js'),
'bootstrap-tooltip': path.join(__dirname, 'public/vendor/bootstrap/tooltip.min.js'),
'headjs': path.join(__dirname, 'node_modules/reveal.js/lib/js/head.min.js'),
- 'reveal-markdown': path.join(__dirname, 'public/js/reveal-markdown.js')
+ 'reveal-markdown': path.join(__dirname, 'public/js/reveal-markdown.js'),
+ abcjs: path.join(__dirname, 'public/vendor/abcjs_basic_3.1.1-min.js')
}
},