text: /*! abcjs_midi v4.0.0 Copyright © 2009-2018 Paul Rosen and Gregory Dyke (http://abcjs.net) */
  /*! midi.js Copyright © Michael Deal (http://mudcu.be) */
  /*! For license information please see abcjs_midi_4.0.0-min.js.LICENSE */
  !function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=16)}([function(t,e,i){"use strict";var r={clone:function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},cloneArray:function(t){for(var e=[],i=0;i<t.length;i++)e.push(r.clone(t[i]));return e},cloneHashOfHash:function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=r.clone(t[i]));return e},cloneHashOfArrayOfHash:function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=r.cloneArray(t[i]));return e},gsub:function(t,e,i){return t.split(e).join(i)},strip:function(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")},startsWith:function(t,e){return 0===t.indexOf(e)},endsWith:function(t,e){var i=t.length-e.length;return i>=0&&t.lastIndexOf(e)===i},each:function(t,e,i){for(var r=0,n=t.length;r<n;r++)e.apply(i,[t[r],r])},last:function(t){return 0===t.length?null:t[t.length-1]},compact:function(t){for(var e=[],i=0;i<t.length;i++)t[i]&&e.push(t[i]);return e},detect:function(t,e){for(var i=0;i<t.length;i++)if(e(t[i]))return!0;return!1}};[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}),t.exports=r},function(t,e,i){"use strict";var r={FONTEM:360,FONTSIZE:30};r.STEP=93*r.FONTSIZE/720,r.SPACE=10,r.TOPNOTE=15,r.STAVEHEIGHT=100,r.INDENT=50,t.exports=r},function(t,e,i){"use strict";i(3);var r=function(t,e,i,r,n){n=n||{},this.x=0,this.c=t,this.dx=e,this.w=i,this.pitch=r,this.scalex=n.scalex||1,this.scaley=n.scaley||1,this.type=n.type||"symbol",this.pitch2=n.pitch2,this.linewidth=n.linewidth,this.klass=n.klass,this.top=r,void 0!==this.pitch2&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=r,void 0!==this.pitch2&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),n.thickness&&(this.top+=n.thickness/2,this.bottom-=n.thickness/2),n.stemHeight&&(n.stemHeight>0?this.top+=n.stemHeight:this.bottom+=n.stemHeight);var a=n.height?n.height:4;switch(this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=a;break;case"lyric":n.position&&"below"===n.position?this.lyricHeightBelow=a:this.lyricHeightAbove=a;break;case"chord":n.position&&"below"===n.position?this.chordHeightBelow=a:this.chordHeightAbove=a;break;case"text":void 0===this.pitch?n.position&&"below"===n.position?this.chordHeightBelow=a:this.chordHeightAbove=a:this.centerVertically=!0;break;case"part":this.partHeightAbove=a}};r.prototype.setX=function(t){this.x=t+this.dx},r.prototype.draw=function(t,e){void 0===this.pitch&&window.console.error(this.type+" Relative Element y-coordinate not set.");var i=t.calcY(this.pitch);switch(this.type){case"symbol":if(null===this.c)return null;var r="symbol";this.klass&&(r+=" "+this.klass),this.graphelem=t.printSymbol(this.x,this.pitch,this.c,this.scalex,this.scaley,t.addClasses(r));break;case"debug":this.graphelem=t.renderText(this.x,t.calcY(15),""+this.c,"debugfont","debug-msg","start");break;case"barNumber":this.graphelem=t.renderText(this.x,i,""+this.c,"measurefont","bar-number","middle");break;case"lyric":this.graphelem=t.renderText(this.x,i,this.c,"vocalfont","lyric","middle");break;case"chord":this.graphelem=t.renderText(this.x,i,this.c,"gchordfont","chord","middle");break;case"decoration":this.graphelem=t.renderText(this.x,i,this.c,"annotationfont","annotation","middle",!0);break;case"text":this.graphelem=t.renderText(this.x,i,this.c,"annotationfont","annotation","start",this.centerVertically);break;case"multimeasure-text":this.graphelem=t.renderText(this.x+this.w/2,i,this.c,"tempofont","rest","middle",!1);break;case"part":this.graphelem=t.renderText(this.x,i,this.c,"partsfont","part","start");break;case"bar":this.graphelem=t.printStem(this.x,this.linewidth,i,e||t.calcY(this.pitch2));break;case"stem":this.graphelem=t.printStem(this.x,this.linewidth,i,t.calcY(this.pitch2));break;case"ledger":this.graphelem=t.printStaveLine(this.x,this.x+this.w,this.pitch)}return 1!==this.scalex&&this.graphelem&&this.graphelem.scale(this.scalex,this.scaley,this.x,i),this.graphelem},t.exports=r},function(t,e,i){"use strict";var r=i(1);t.exports=new function(){var t={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.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},"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},"noteheads.slash.quarter":{d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},"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(e,i,r,n,a){if(!t[r])return null;var s=this.pathClone(t[r].d);return s[0][1]+=e,s[0][2]+=i,n.path().attr({path:s,stroke:"none",fill:"#000000",class:a})},this.getPathForSymbol=function(e,i,r,n,a){if(n=n||1,a=a||1,!t[r])return null;var s=this.pathClone(t[r].d);return 1===n&&1===a||this.pathScale(s,n,a),s[0][1]+=e,s[0][2]+=i,s},this.getSymbolWidth=function(e){return t[e]?t[e].w:0},this.getSymbolHeight=function(e){return t[e]?t[e].h:0},this.symbolHeightInPitches=function(t){return this.getSymbolHeight(t)/r.STEP},this.getSymbolAlign=function(t){return"scripts"===t.substring(0,7)&&"scripts.roll"!==t?"center":"left"},this.pathClone=function(t){for(var e=[],i=0,r=t.length;i<r;i++){e[i]=[];for(var n=0,a=t[i].length;n<a;n++)e[i][n]=t[i][n]}return e},this.pathScale=function(t,e,i){for(var r=0,n=t.length;r<n;r++){var a,s,o=t[r];for(a=1,s=o.length;a<s;a++)o[a]*=a%2?e:i}},this.getYCorr=function(t){switch(t){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":case"rests.8th":case"rests.quarter":case"rests.16th":case"rests.32nd":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}}}},function(t,e,i){"use strict";var r=i(1),n=function(t,e,i,r,n,a){a||(a={}),this.tuneNumber=n,this.abcelem=t,this.duration=e,this.durationClass=a.durationClassOveride?a.durationClassOveride:this.duration,this.minspacing=i||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=r,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};n.prototype.setUpperAndLowerElements=function(t){for(var e=0;e<this.children.length;e++){var i=this.children[e];for(var r in this.specialY)this.specialY.hasOwnProperty(r)&&i[r]&&(i.pitch=t[r])}},n.prototype.getMinWidth=function(){return this.w},n.prototype.getExtraWidth=function(){return-this.extraw},n.prototype.addExtra=function(t){t.dx<this.extraw&&(this.extraw=t.dx),this.extra[this.extra.length]=t,this.addChild(t)},n.prototype.addHead=function(t){t.dx<this.extraw&&(this.extraw=t.dx),this.heads[this.heads.length]=t,this.addRight(t)},n.prototype.addRight=function(t){t.dx+t.w>this.w&&(this.w=t.dx+t.w),this.right[this.right.length]=t,this.addChild(t)},n.prototype.addCentered=function(t){var e=t.w/2;-e<this.extraw&&(this.extraw=-e),this.extra[this.extra.length]=t,t.dx+e>this.w&&(this.w=t.dx+e),this.right[this.right.length]=t,this.addChild(t)},n.prototype.setLimit=function(t,e){e[t]&&(this.specialY[t]?this.specialY[t]=Math.max(this.specialY[t],e[t]):this.specialY[t]=e[t])},n.prototype.addChild=function(t){t.parent=this,this.children[this.children.length]=t,this.pushTop(t.top),this.pushBottom(t.bottom),this.setLimit("tempoHeightAbove",t),this.setLimit("partHeightAbove",t),this.setLimit("volumeHeightAbove",t),this.setLimit("dynamicHeightAbove",t),this.setLimit("endingHeightAbove",t),this.setLimit("chordHeightAbove",t),this.setLimit("lyricHeightAbove",t),this.setLimit("lyricHeightBelow",t),this.setLimit("chordHeightBelow",t),this.setLimit("volumeHeightBelow",t),this.setLimit("dynamicHeightBelow",t)},n.prototype.pushTop=function(t){void 0!==t&&(void 0===this.top?this.top=t:this.top=Math.max(t,this.top))},n.prototype.pushBottom=function(t){void 0!==t&&(void 0===this.bottom?this.bottom=t:this.bottom=Math.min(t,this.bottom))},n.prototype.setX=function(t){this.x=t;for(var e=0;e<this.children.length;e++)this.children[e].setX(t)},n.prototype.setHint=function(){this.hint=!0},n.prototype.draw=function(t,e){if(this.elemset=t.paper.set(),!this.invisible){t.beginGroup();for(var i=0;i<this.children.length;i++)this.elemset.push(this.children[i].draw(t,e));var n=this.type;if(("note"===this.type||"rest"===this.type)&&(n=(n+=" d"+this.durationClass).replace(/\./g,"-"),this.abcelem.pitches))for(var a=0;a<this.abcelem.pitches.length;a++)n+=" p"+this.abcelem.pitches[a].pitch;this.elemset.push(t.endGroup(n)),this.klass&&this.setClass("mark","","#00ff00"),this.hint&&this.setClass("abcjs-hint","",null);var s=t.printShadedBox(this.x,t.calcY(this.top),this.w,t.calcY(this.bottom)-t.calcY(this.top),"rgba(0,0,0,0)"),o=this,c=t.controller;s.mouseup(function(){var t=[];if(o.elemset)for(var e=0;e<o.elemset.length;e++){var i=o.elemset[e];i.attrs&&i.attrs.class&&t.push(i.attrs.class)}c.notifySelect(o,o.tuneNumber,t)}),this.abcelem.abselem=this;r.STEP}},n.prototype.isIE=!1,n.prototype.setClass=function(t,e,i){if(null!==i&&this.elemset.attr({fill:i}),!this.isIE)for(var r=0;r<this.elemset.length;r++)if(this.elemset[r][0].setAttribute){var n=this.elemset[r][0].getAttribute("class");n||(n=""),n=(n=n.replace(e,"")).replace(t,""),t.length>0&&(n.length>0&&" "!==n.charAt(n.length-1)&&(n+=" "),n+=t),this.elemset[r][0].setAttribute("class",n)}},n.prototype.highlight=function(t,e){void 0===t&&(t="abcjs-note_selected"),void 0===e&&(e="#ff0000"),this.setClass(t,"",e)},n.prototype.unhighlight=function(t,e){void 0===t&&(t="abcjs-note_selected"),void 0===e&&(e="#000000"),this.setClass("",t,e)},t.exports=n},function(t,e,i){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=i(0),a=i(11),s={};!function(){s.numberOfTunes=function(t){var e=t.split("\nX:").length;return 0===e&&(e=1),e};var t=s.TuneBook=function(t){for(var e=this,i="",r=(t=n.strip(t)).split("\nX:"),a=1;a<r.length;a++)r[a]="X:"+r[a];var s=0;if(e.tunes=[],n.each(r,function(t){e.tunes.push({abc:t,startPos:s}),s+=t.length}),e.tunes.length>1&&!n.startsWith(e.tunes[0].abc,"X:")){var o=e.tunes.shift().abc.split("\n");n.each(o,function(t){n.startsWith(t,"%%")&&(i+=t+"\n")})}e.header=i,n.each(e.tunes,function(t){var e=t.abc.indexOf("\n\n");e>0&&(t.abc=t.abc.substring(0,e)),t.pure=t.abc,t.abc=i+t.abc;var r=t.pure.split("T:");r.length>1?(r=r[1].split("\n"),t.title=r[0].replace(/^\s+|\s+$/g,"")):t.title="";var n=t.pure.substring(2,t.pure.indexOf("\n"));t.id=n.replace(/^\s+|\s+$/g,"")})};t.prototype.getTuneById=function(t){for(var e=0;e<this.tunes.length;e++)if(this.tunes[e].id===t)return this.tunes[e];return null},t.prototype.getTuneByTitle=function(t){for(var e=0;e<this.tunes.length;e++)if(this.tunes[e].title===t)return this.tunes[e];return null},s.renderEngine=function(e,i,n,s){var o=[];if(void 0!==i&&void 0!==n){var c;(!(c=i)||c.propertyIsEnumerable("length")||"object"!==(void 0===c?"undefined":r(c))||"number"!=typeof c.length)&&(i=[i]),void 0===s&&(s={});for(var l=s.startingTune?parseInt(s.startingTune,10):0,h=new t(n),u=new a,f=0;f<i.length;f++){var d=i[f];if("string"==typeof d&&(d=document.getElementById(d)),d&&(d.innerHTML="",l>=0&&l<h.tunes.length)){u.parse(h.tunes[l].abc,s);var p=u.getTune();o.push(p),e(d,p,f)}l++}return o}}}(),t.exports=s},function(t,e,i){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(){for(var t,e,i,n,a,s=0,o=arguments[s++],c=[];o;){if(e=/^[^\x25]+/.exec(o))c.push(e[0]);else if(e=/^\x25{2}/.exec(o))c.push("%");else{if(!(e=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(t=arguments[e[1]||s++])||void 0==t)throw"Too few arguments.";if(/[^s]/.test(e[7])&&"number"!=typeof t)throw"Expecting number but found "+(void 0===t?"undefined":r(t));switch(e[7]){case"b":t=t.toString(2);break;case"c":t=String.fromCharCode(t);break;case"d":t=parseInt(t);break;case"e":t=e[6]?t.toExponential(e[6]):t.toExponential();break;case"f":t=e[6]?parseFloat(t).toFixed(e[6]):parseFloat(t);break;case"o":t=t.toString(8);break;case"s":t=(t=String(t))&&e[6]?t.substring(0,e[6]):t;break;case"u":t=Math.abs(t);break;case"x":t=t.toString(16);break;case"X":t=t.toString(16).toUpperCase()}t=/[def]/.test(e[7])&&e[2]&&t>0?"+"+t:t,n=e[3]?"0"==e[3]?"0":e[3].charAt(1):" ",a=e[5]-String(t).length,i=e[5]?str_repeat(n,a):"",c.push(e[4]?t+i:i+t)}o=o.substring(e[0].length)}return c.join("")}},function(t,e,i){"use strict";var r=i(0),n={};!function(){var t,e,i,a;n.initialize=function(r,n,s,o){t=r,e=n,a=o,(i=s).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},i.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},i.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},i.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},i.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},i.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},a.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},a.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},a.formatting.annotationfont=i.annotationfont,a.formatting.gchordfont=i.gchordfont,a.formatting.historyfont=i.historyfont,a.formatting.infofont=i.infofont,a.formatting.measurefont=i.measurefont,a.formatting.partsfont=i.partsfont,a.formatting.repeatfont=i.repeatfont,a.formatting.textfont=i.textfont,a.formatting.vocalfont=i.vocalfont,a.formatting.wordsfont=i.wordsfont};var s={gchordfont:!0,measurefont:!0,partsfont:!0},o=function(t,i,r,n,a){function o(){var o=parseInt(t[0].token);return t.shift(),i?0===t.length?{face:i.face,weight:i.weight,style:i.style,decoration:i.decoration,size:o}:1===t.length&&"box"===t[0].token&&s[a]?{face:i.face,weight:i.weight,style:i.style,decoration:i.decoration,size:o,box:!0}:(e("Extra parameters in font definition.",r,n),{face:i.face,weight:i.weight,style:i.style,decoration:i.decoration,size:o}):(e("Can't set just the size of the font since there is no default value.",r,n),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:o})}if("*"===t[0].token){if(t.shift(),"number"===t[0].type)return o();e("Expected font size number after *.",r,n)}if("number"===t[0].type)return o();for(var c,l=[],h="normal",u="normal",f="none",d=!1,p="face",m=!1;t.length;){var g=t.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?e("Font size specified twice in font definition.",r,n):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?f="underline":"box"===v?(s[a]?d=!0:e('This font style doesn\'t support "box"',r,n),p="finished"):"utf"===v?(g=t.shift(),p="size"):e("Unknown parameter "+g.token+" in font definition.",r,n);break;case"size":"number"===g.type?c?e("Font size specified twice in font definition.",r,n):c=g.token:e("Expected font size in font definition.",r,n),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?f="underline":"box"===v?(s[a]?d=!0:e('This font style doesn\'t support "box"',r,n),p="finished"):e("Unknown parameter "+g.token+" in font definition.",r,n);break;case"finished":e('Extra characters found after "box" in font definition.',r,n)}}void 0===c?i?c=i.size:(e("Must specify the size of the font since there is no default value.",r,n),c=12):c=parseFloat(c);var b=function(t){switch(t){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}}(l=l.join(" ")),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,d&&(y.box=!0),y):(y.face=l,y.weight=h,y.style=u,y.decoration=f,y.size=c,d&&(y.box=!0),y)},c=function(t,e,r){return 0===e.length?'Directive "'+t+'" requires a font as a parameter.':(i[t]=o(e,i[t],r,0,t),i.is_in_header&&(a.formatting[t]=i[t]),null)},l=function(t,e){var i="";r.each(e,function(t){i+=t.token});var n=parseFloat(i);if(isNaN(n)||0===n)return'Directive "'+t+'" requires a number as a parameter.';a.formatting.scale=n},h=function(t,e,r,n,a){if(1!==r.length||"number"!==r[0].type)return'Directive "'+e+'" requires a number as a parameter.';var s=r[0].intt;return void 0!==n&&s<n?'Directive "'+e+'" requires a number greater than or equal to '+n+" as a parameter.":void 0!==a&&s>a?'Directive "'+e+'" requires a number less than or equal to '+a+" as a parameter.":(i[t]=s,null)},u=function(t,e,r){var n=h(t,e,r,0,1);return null!==n?n:(i[t]=1===i[t],null)},f=function(t,e,r,n){if(1!==r.length)return'Directive "'+e+'" requires one of [ '+n.join(", ")+" ] as a parameter.";for(var a=r[0].token,s=!1,o=0;!s&&o<n.length;o++)n[o]===a&&(s=!0);return s?(i[t]=a,null):'Directive "'+e+'" requires one of [ '+n.join(", ")+" ] as a parameter."},d=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],p=["gchord","ptstress","beatstring"],m=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","volinc"],g=["program"],v=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],b=["beat"],y=["drone"],x=["portamento"],w=["expand","grace","trim"],k=["drum","chordname"];n.parseFontChangeLine=function(t){var e=t.split("$");if(e.length>1&&i.setfont){for(var r=[{text:e[0]}],n=1;n<e.length;n++)"0"===e[n].charAt(0)?r.push({text:e[n].substring(1)}):"1"===e[n].charAt(0)&&i.setfont[1]?r.push({font:i.setfont[1],text:e[n].substring(1)}):"2"===e[n].charAt(0)&&i.setfont[2]?r.push({font:i.setfont[2],text:e[n].substring(1)}):"3"===e[n].charAt(0)&&i.setfont[3]?r.push({font:i.setfont[3],text:e[n].substring(1)}):"4"===e[n].charAt(0)&&i.setfont[4]?r.push({font:i.setfont[4],text:e[n].substring(1)}):r[r.length-1].text+="$"+e[n];if(r.length>1)return r}return t};var A=["auto","above","below","hidden"];n.addDirective=function(s){var _=t.tokenize(s,0,s.length);if(0===_.length||"alpha"!==_[0].type)return null;var S=s.substring(s.indexOf(_[0].token)+_[0].token.length);S=t.stripComment(S);var T=_.shift().token.toLowerCase(),C="";switch(T){case"bagpipes":a.formatting.bagpipes=!0;break;case"landscape":i.landscape=!0;break;case"papersize":i.papersize=S;break;case"slurgraces":a.formatting.slurgraces=!0;break;case"stretchlast":a.formatting.stretchlast=!0;break;case"titlecaps":i.titlecaps=!0;break;case"titleleft":a.formatting.titleleft=!0;break;case"measurebox":a.formatting.measurebox=!0;break;case"vocal":return f("vocalPosition",T,_,A);case"dynamic":return f("dynamicPosition",T,_,A);case"gchord":return f("chordPosition",T,_,A);case"ornament":return f("ornamentPosition",T,_,A);case"volume":return f("volumePosition",T,_,A);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 function(e,i){var r=t.getMeasurement(i);return 0===r.used||0!==i.length?'Directive "'+e+'" requires a measurement as a parameter.':(a.formatting[e]=r.value,null)}(T,_);case"vskip":var N=function(e,i){var r=t.getMeasurement(i);return 0===r.used||0!==i.length?{error:'Directive "'+e+'" requires a measurement as a parameter.'}:r.value}(T,_);return N.error?N.error:(a.addSpacing(N),null);case"scale":l(T,_);break;case"sep":if(0===_.length)a.addSeparator();else{var M=t.getMeasurement(_);if(0===M.used)return'Directive "'+T+'" requires 3 numbers: space above, space below, length of line';var I=M.value;if(0===(M=t.getMeasurement(_)).used)return'Directive "'+T+'" requires 3 numbers: space above, space below, length of line';var B=M.value;if(0===(M=t.getMeasurement(_)).used||0!==_.length)return'Directive "'+T+'" requires 3 numbers: space above, space below, length of line';var E=M.value;a.addSeparator(I,B,E)}break;case"barsperstaff":if(null!==(C=h("barsperstaff",T,_)))return C;break;case"staffnonote":if(null!==(C=u("staffnonote",T,_)))return C;break;case"printtempo":if(null!==(C=u("printTempo",T,_)))return C;break;case"partsbox":if(null!==(C=u("partsBox",T,_)))return C;i.partsfont.box=i.partsBox;break;case"measurenb":case"barnumbers":if(null!==(C=h("barNumbers",T,_)))return C;break;case"begintext":i.inTextBlock=!0;break;case"continueall":i.continueall=!0;break;case"beginps":i.inPsBlock=!0,e("Postscript ignored",s,0);break;case"deco":S.length>0&&i.ignoredDecorations.push(S.substring(0,S.indexOf(" "))),e("Decoration redefinition ignored",s,0);break;case"text":var P=t.translateString(S);a.addText(n.parseFontChangeLine(P));break;case"center":var L=t.translateString(S);a.addCentered(n.parseFontChangeLine(L));break;case"font":break;case"setfont":var D=t.tokenize(S,0,S.length);if(D.length>=4&&"-"===D[0].token&&"number"===D[1].type){var H=parseInt(D[1].token);H>=1&&H<=4&&(i.setfont||(i.setfont=[]),D.shift(),D.shift(),i.setfont[H]=o(D,i.setfont[H],s,0,"setfont"))}break;case"gchordfont":case"partsfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return c(T,_,s);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(t,e,i){return 0===e.length?'Directive "'+t+'" requires a font as a parameter.':(a.formatting[t]=o(e,a.formatting[t],i,0,t),null)}(T,_,s);case"barlabelfont":case"barnumberfont":case"barnumfont":return c("measurefont",_,s);case"staves":case"score":i.score_is_present=!0;for(var z,V=function(t,e,n,a,s){(e||0===i.staves.length)&&i.staves.push({index:i.staves.length,numVoices:0});var o=r.last(i.staves);void 0!==n&&(o.bracket=n),void 0!==a&&(o.brace=a),s&&(o.connectBarLines="end"),void 0===i.voices[t]&&(i.voices[t]={staffNum:o.index,index:o.numVoices},o.numVoices++)},F=!1,O=!1,q=!1,j=!1,R=!1,U=!1,Y=!1,W=function(){if(Y=!0,z){var t="start";z.staffNum>0&&("start"!==i.staves[z.staffNum-1].connectBarLines&&"continue"!==i.staves[z.staffNum-1].connectBarLines||(t="continue")),i.staves[z.staffNum].connectBarLines=t}};_.length;){var G=_.shift();switch(G.token){case"(":F?e("Can't nest parenthesis in %%score",s,G.start):(F=!0,j=!0);break;case")":!F||j?e("Unexpected close parenthesis in %%score",s,G.start):F=!1;break;case"[":O?e("Can't nest brackets in %%score",s,G.start):(O=!0,R=!0);break;case"]":!O||R?e("Unexpected close bracket in %%score",s,G.start):(O=!1,i.staves[z.staffNum].bracket="end");break;case"{":q?e("Can't nest braces in %%score",s,G.start):(q=!0,U=!0);break;case"}":!q||U?e("Unexpected close brace in %%score",s,G.start):(q=!1,i.staves[z.staffNum].brace="end");break;case"|":W();break;default:for(var X="";("alpha"===G.type||"number"===G.type)&&(X+=G.token,G.continueId);)G=_.shift();V(X,!F||j,R?"start":O?"continue":void 0,U?"start":q?"continue":void 0,Y),j=!1,R=!1,U=!1,Y=!1,z=i.voices[X],"staves"===T&&W()}}break;case"newpage":var K=t.getInt(S);a.addNewPage(0===K.digits?-1:K.value);break;case"abc":var Z=S.split(" ");switch(Z[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var Q=Z.shift();a.addMetaText(T+Q,Z.join(" "));break;default:return"Unknown directive: "+T+Z[0]}break;case"header":case"footer":var J=t.getMeat(S,0,S.length);'"'===(J=S.substring(J.start,J.end)).charAt(0)&&'"'===J.charAt(J.length-1)&&(J=J.substring(1,J.length-1));var $=J.split("\t"),tt={};tt=1===$.length?{left:"",center:$[0],right:""}:2===$.length?{left:$[0],center:$[1],right:""}:{left:$[0],center:$[1],right:$[2]},$.length>3&&e("Too many tabs in "+T+": "+$.length+" found.",S,0),a.addMetaTextObj(T,tt);break;case"midi":var et=t.tokenize(S,0,S.length,!0);et.length>0&&"="===et[0].token&&et.shift(),0===et.length?e("Expected midi command",S,0):function(t,i,r){var n=t.shift().token,a=[];if(d.indexOf(n)>=0)0!==t.length&&e("Unexpected parameter in MIDI "+n,r,0);else if(p.indexOf(n)>=0)1!==t.length?e("Expected one parameter in MIDI "+n,r,0):a.push(t[0].token);else if(m.indexOf(n)>=0)1!==t.length?e("Expected one parameter in MIDI "+n,r,0):"number"!==t[0].type?e("Expected one integer parameter in MIDI "+n,r,0):a.push(t[0].intt);else if(g.indexOf(n)>=0)1!==t.length&&2!==t.length?e("Expected one or two parameters in MIDI "+n,r,0):"number"!==t[0].type?e("Expected integer parameter in MIDI "+n,r,0):2===t.length&&"number"!==t[1].type?e("Expected integer parameter in MIDI "+n,r,0):(a.push(t[0].intt),2===t.length&&a.push(t[1].intt));else if(v.indexOf(n)>=0)2!==t.length?e("Expected two parameters in MIDI "+n,r,0):"number"!==t[0].type||"number"!==t[1].type?e("Expected two integer parameters in MIDI "+n,r,0):(a.push(t[0].intt),a.push(t[1].intt));else if(x.indexOf(n)>=0)2!==t.length?e("Expected two parameters in MIDI "+n,r,0):"alpha"!==t[0].type||"number"!==t[1].type?e("Expected one string and one integer parameters in MIDI "+n,r,0):(a.push(t[0].token),a.push(t[1].intt));else if("drummap"===n)2===t.length&&"alpha"===t[0].type&&"number"===t[1].type?(i.formatting||(i.formatting={}),i.formatting.midi||(i.formatting.midi={}),i.formatting.midi.drummap||(i.formatting.midi.drummap={}),i.formatting.midi.drummap[t[0].token]=t[1].intt,a=i.formatting.midi.drummap):3===t.length&&"punct"===t[0].type&&"alpha"===t[1].type&&"number"===t[2].type?(i.formatting||(i.formatting={}),i.formatting.midi||(i.formatting.midi={}),i.formatting.midi.drummap||(i.formatting.midi.drummap={}),i.formatting.midi.drummap[t[0].token+t[1].token]=t[2].intt,a=i.formatting.midi.drummap):e("Expected one note name and one integer parameter in MIDI "+n,r,0);else if(w.indexOf(n)>=0)3!==t.length?e("Expected fraction parameter in MIDI "+n,r,0):"number"!==t[0].type||"/"!==t[1].token||"number"!==t[2].type?e("Expected fraction parameter in MIDI "+n,r,0):(a.push(t[0].intt),a.push(t[2].intt));else if(b.indexOf(n)>=0)4!==t.length?e("Expected four parameters in MIDI "+n,r,0):"number"!==t[0].type||"number"!==t[1].type||"number"!==t[2].type||"number"!==t[3].type?e("Expected four integer parameters in MIDI "+n,r,0):(a.push(t[0].intt),a.push(t[1].intt),a.push(t[2].intt),a.push(t[3].intt));else if(y.indexOf(n)>=0)5!==t.length?e("Expected five parameters in MIDI "+n,r,0):"number"!==t[0].type||"number"!==t[1].type||"number"!==t[2].type||"number"!==t[3].type||"number"!==t[4].type?e("Expected five integer parameters in MIDI "+n,r,0):(a.push(t[0].intt),a.push(t[1].intt),a.push(t[2].intt),a.push(t[3].intt),a.push(t[4].intt));else if(g.indexOf(n)>=0)1!==t.length||4!==t.length?e("Expected one or two parameters in MIDI "+n,r,0):"number"!==t[0].type?e("Expected integer parameter in MIDI "+n,r,0):4===t.length?("octave"!==t[1].token&&e("Expected octave parameter in MIDI "+n,r,0),"="!==t[2].token&&e("Expected octave parameter in MIDI "+n,r,0),"number"!==t[3].type&&e("Expected integer parameter for octave in MIDI "+n,r,0)):(a.push(t[0].intt),4===t.length&&a.push(t[3].intt));else if(k.indexOf(n)>=0)if(t.length<2)e("Expected string parameter and at least one integer parameter in MIDI "+n,r,0);else if("alpha"!==t[0].type)e("Expected string parameter and at least one integer parameter in MIDI "+n,r,0);else{var s=t.shift();for(a.push(s.token);t.length>0;)"number"!==(s=t.shift()).type&&e("Expected integer parameter in MIDI "+n,r,0),a.push(s.intt)}i.hasBeginMusic()?i.appendElement("midi",-1,-1,{cmd:n,params:a}):(void 0===i.formatting.midi&&(i.formatting.midi={}),i.formatting.midi[n]=a)}(et,a,S);break;case"map":case"percmap":case"playtempo":case"auquality":case"continuous":case"nobarcheck":a.formatting[T]=S;break;default:return"Unknown directive: "+T}return null},n.globalFormatting=function(r){for(var n in r)if(r.hasOwnProperty(n)){var a,s=""+r[n],o=t.tokenize(s,0,s.length);switch(n){case"titlefont":case"gchordfont":c(n,o,s);break;case"scale":l(n,o);break;case"partsbox":null!==(a=u("partsBox",n,o))&&e(a),i.partsfont.box=i.partsBox;break;default:e("Formatting directive unrecognized: ",n,0)}}}}(),t.exports=n},function(t,e,i){"use strict";var r=i(0),n=i(7),a=i(12),s={};!function(){var t,e,i,o;s.initialize=function(r,n,a,s){t=r,e=n,i=a,o=s},s.standardKey=function(t,e,r){var n={acc:"sharp",note:"f"},s={acc:"sharp",note:"c"},o={acc:"sharp",note:"g"},c={acc:"sharp",note:"d"},l={acc:"sharp",note:"A"},h={acc:"sharp",note:"e"},u={acc:"sharp",note:"B"},f={acc:"flat",note:"B"},d={acc:"flat",note:"e"},p={acc:"flat",note:"A"},m={acc:"flat",note:"d"},g={acc:"flat",note:"G"},v={acc:"flat",note:"c"},b={acc:"flat",note:"F"},y={"C#":[n,s,o,c,l,h,u],"A#m":[n,s,o,c,l,h,u],"G#Mix":[n,s,o,c,l,h,u],"D#Dor":[n,s,o,c,l,h,u],"E#Phr":[n,s,o,c,l,h,u],"F#Lyd":[n,s,o,c,l,h,u],"B#Loc":[n,s,o,c,l,h,u],"F#":[n,s,o,c,l,h],"D#m":[n,s,o,c,l,h],"C#Mix":[n,s,o,c,l,h],"G#Dor":[n,s,o,c,l,h],"A#Phr":[n,s,o,c,l,h],BLyd:[n,s,o,c,l,h],"E#Loc":[n,s,o,c,l,h],B:[n,s,o,c,l],"G#m":[n,s,o,c,l],"F#Mix":[n,s,o,c,l],"C#Dor":[n,s,o,c,l],"D#Phr":[n,s,o,c,l],ELyd:[n,s,o,c,l],"A#Loc":[n,s,o,c,l],E:[n,s,o,c],"C#m":[n,s,o,c],BMix:[n,s,o,c],"F#Dor":[n,s,o,c],"G#Phr":[n,s,o,c],ALyd:[n,s,o,c],"D#Loc":[n,s,o,c],A:[n,s,o],"F#m":[n,s,o],EMix:[n,s,o],BDor:[n,s,o],"C#Phr":[n,s,o],DLyd:[n,s,o],"G#Loc":[n,s,o],D:[n,s],Bm:[n,s],AMix:[n,s],EDor:[n,s],"F#Phr":[n,s],GLyd:[n,s],"C#Loc":[n,s],G:[n],Em:[n],DMix:[n],ADor:[n],BPhr:[n],CLyd:[n],"F#Loc":[n],C:[],Am:[],GMix:[],DDor:[],EPhr:[],FLyd:[],BLoc:[],F:[f],Dm:[f],CMix:[f],GDor:[f],APhr:[f],BbLyd:[f],ELoc:[f],Bb:[f,d],Gm:[f,d],FMix:[f,d],CDor:[f,d],DPhr:[f,d],EbLyd:[f,d],ALoc:[f,d],Eb:[f,d,p],Cm:[f,d,p],BbMix:[f,d,p],FDor:[f,d,p],GPhr:[f,d,p],AbLyd:[f,d,p],DLoc:[f,d,p],Ab:[f,d,p,m],Fm:[f,d,p,m],EbMix:[f,d,p,m],BbDor:[f,d,p,m],CPhr:[f,d,p,m],DbLyd:[f,d,p,m],GLoc:[f,d,p,m],Db:[f,d,p,m,g],Bbm:[f,d,p,m,g],AbMix:[f,d,p,m,g],EbDor:[f,d,p,m,g],FPhr:[f,d,p,m,g],GbLyd:[f,d,p,m,g],CLoc:[f,d,p,m,g],Gb:[f,d,p,m,g,v],Ebm:[f,d,p,m,g,v],DbMix:[f,d,p,m,g,v],AbDor:[f,d,p,m,g,v],BbPhr:[f,d,p,m,g,v],CbLyd:[f,d,p,m,g,v],FLoc:[f,d,p,m,g,v],Cb:[f,d,p,m,g,v,b],Abm:[f,d,p,m,g,v,b],GbMix:[f,d,p,m,g,v,b],DbDor:[f,d,p,m,g,v,b],EbPhr:[f,d,p,m,g,v,b],FbLyd:[f,d,p,m,g,v,b],BbLoc:[f,d,p,m,g,v,b],"A#":[f,d],"B#":[],"D#":[f,d,p],"E#":[f],"G#":[f,d,p,m],Gbm:[n,s,o,c,l,h,u]};return a.keySignature(i,y,t,e,r)};var c={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}},l=function(t,e){var i=c[t];return(i?i.mid:0)+e};s.fixClef=function(t){var e=c[t.type];e&&(t.clefPos=e.pitch,t.type=e.clef)},s.deepCopyKey=function(t){var e={accidentals:[],root:t.root,acc:t.acc,mode:t.mode};return r.each(t.accidentals,function(t){e.accidentals.push(r.clone(t))}),e};var h={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};s.addPosToKey=function(t,e){var i=t.verticalPos;r.each(e.accidentals,function(t){var e=h[t.note];e-=i,t.verticalPos=e}),e.impliedNaturals&&r.each(e.impliedNaturals,function(t){var e=h[t.note];e-=i,t.verticalPos=e}),i<-10?(r.each(e.accidentals,function(t){t.verticalPos-=7,(t.verticalPos>=11||10===t.verticalPos&&"flat"===t.acc)&&(t.verticalPos-=7),"A"===t.note&&"sharp"===t.acc&&(t.verticalPos-=7),"G"!==t.note&&"F"!==t.note||"flat"!==t.acc||(t.verticalPos-=7)}),e.impliedNaturals&&r.each(e.impliedNaturals,function(t){t.verticalPos-=7,(t.verticalPos>=11||10===t.verticalPos&&"flat"===t.acc)&&(t.verticalPos-=7),"A"===t.note&&"sharp"===t.acc&&(t.verticalPos-=7),"G"!==t.note&&"F"!==t.note||"flat"!==t.acc||(t.verticalPos-=7)})):i<-4?(r.each(e.accidentals,function(t){t.verticalPos-=7,-8!==i||"f"!==t.note&&"g"!==t.note||"sharp"!==t.acc||(t.verticalPos-=7)}),e.impliedNaturals&&r.each(e.impliedNaturals,function(t){t.verticalPos-=7,-8!==i||"f"!==t.note&&"g"!==t.note||"sharp"!==t.acc||(t.verticalPos-=7)})):i>=7&&(r.each(e.accidentals,function(t){t.verticalPos+=7}),e.impliedNaturals&&r.each(e.impliedNaturals,function(t){t.verticalPos+=7}))},s.fixKey=function(t,e){var i=r.clone(e);return s.addPosToKey(t,i),i};var u=function(t){var e=0,i=t.charAt(e++);"^"!==i&&"_"!==i||(i=t.charAt(e++));var r=h[i];for(void 0===r&&(r=6);e<t.length;e++)if(","===t.charAt(e))r-=7;else{if("'"!==t.charAt(e))break;r+=7}return{mid:r-6,str:t.substring(e)}};s.parseKey=function(r){0===r.length&&(r="none");var a=t.tokenize(r,0,r.length),o={};switch(a[0].token){case"HP":n.addDirective("bagpipes"),i.key={root:"HP",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"Hp":n.addDirective("bagpipes"),i.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"none":i.key={root:"none",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;default:var c=t.getKeyPitch(a[0].token);if(c.len>0){o.foundKey=!0;var h="",u="";a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift();var f=c.token;if(a.length>0){var d=t.getSharpFlat(a[0].token);if(d.len>0&&(a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift(),f+=d.token,h=d.token),a.length>0){var p=t.getMode(a[0].token);p.len>0&&(a.shift(),f+=p.token,u=p.token)}if(void 0===s.standardKey(f,c.token,h))return e("Unsupported key signature: "+f,r,0),o}var m=s.deepCopyKey(i.key);if(i.key=s.deepCopyKey(s.standardKey(f,c.token,h)),i.key.mode=u,m){for(var g,v=0;v<i.key.accidentals.length;v++)for(g=0;g<m.accidentals.length;g++)m.accidentals[g].note&&i.key.accidentals[v].note.toLowerCase()===m.accidentals[g].note.toLowerCase()&&(m.accidentals[g].note=null);for(g=0;g<m.accidentals.length;g++)m.accidentals[g].note&&(i.key.impliedNaturals||(i.key.impliedNaturals=[]),i.key.impliedNaturals.push({acc:"natural",note:m.accidentals[g].note}))}}}if(0===a.length)return o;if("exp"===a[0].token&&a.shift(),0===a.length)return o;if("oct"===a[0].token&&a.shift(),0===a.length)return o;var b,y=t.getKeyAccidentals2(a);if(y.warn&&e(y.warn,r,0),y.accs){o.foundKey||(o.foundKey=!0,i.key={root:"none",acc:"",mode:"",accidentals:[]}),function(t){for(var e=0;e<t.length;e++)"b"===t[e].note?t[e].note="B":"a"===t[e].note?t[e].note="A":"F"===t[e].note?t[e].note="f":"E"===t[e].note?t[e].note="e":"D"===t[e].note?t[e].note="d":"C"===t[e].note?t[e].note="c":"G"===t[e].note&&"sharp"===t[e].acc?t[e].note="g":"g"===t[e].note&&"flat"===t[e].acc&&(t[e].note="G")}(y.accs);for(var x=0;x<y.accs.length;x++){for(var w=!1,k=0;k<i.key.accidentals.length&&!w;k++)i.key.accidentals[k].note===y.accs[x].note&&(w=!0,i.key.accidentals[k].acc=y.accs[x].acc);if(!w&&(i.key.accidentals.push(y.accs[x]),i.key.impliedNaturals))for(var A=0;A<i.key.impliedNaturals.length;A++)i.key.impliedNaturals[A].note===y.accs[x].note&&i.key.impliedNaturals.splice(A,1)}}for(;a.length>0;)switch(a[0].token){case"m":case"middle":if(a.shift(),0===a.length)return e("Expected = after middle",r,0),o;if("="!==(b=a.shift()).token){e("Expected = after middle",r,b.start);break}if(0===a.length)return e("Expected parameter after middle=",r,0),o;var _=t.getPitchFromTokens(a);_.warn&&e(_.warn,r,0),_.position&&(i.clef.verticalPos=_.position-6);break;case"transpose":if(a.shift(),0===a.length)return e("Expected = after transpose",r,0),o;if("="!==(b=a.shift()).token){e("Expected = after transpose",r,b.start);break}if(0===a.length)return e("Expected parameter after transpose=",r,0),o;if("number"!==a[0].type){e("Expected number after transpose",r,a[0].start);break}i.clef.transpose=a[0].intt,a.shift();break;case"stafflines":if(a.shift(),0===a.length)return e("Expected = after stafflines",r,0),o;if("="!==(b=a.shift()).token){e("Expected = after stafflines",r,b.start);break}if(0===a.length)return e("Expected parameter after stafflines=",r,0),o;if("number"!==a[0].type){e("Expected number after stafflines",r,a[0].start);break}i.clef.stafflines=a[0].intt,a.shift();break;case"staffscale":if(a.shift(),0===a.length)return e("Expected = after staffscale",r,0),o;if("="!==(b=a.shift()).token){e("Expected = after staffscale",r,b.start);break}if(0===a.length)return e("Expected parameter after staffscale=",r,0),o;if("number"!==a[0].type){e("Expected number after staffscale",r,a[0].start);break}i.clef.staffscale=a[0].floatt,a.shift();break;case"style":if(a.shift(),0===a.length)return e("Expected = after style",r,0),o;if("="!==(b=a.shift()).token){e("Expected = after style",r,b.start);break}if(0===a.length)return e("Expected parameter after style=",r,0),o;switch(a[0].token){case"normal":case"harmonic":case"rhythm":case"x":i.style=a[0].token,a.shift();break;default:e("error parsing style element: "+a[0].token,r,a[0].start)}break;case"clef":if(a.shift(),0===a.length)return e("Expected = after clef",r,0),o;if("="!==(b=a.shift()).token){e("Expected = after clef",r,b.start);break}if(0===a.length)return e("Expected parameter after clef=",r,0),o;case"treble":case"bass":case"alto":case"tenor":case"perc":var S=a.shift();switch(S.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":S.token="alto";break;case"F":S.token="bass";break;case"G":S.token="treble";break;case"c":S.token="alto";break;case"f":S.token="bass";break;case"g":S.token="treble";break;default:e("Expected clef name. Found "+S.token,r,S.start)}a.length>0&&"number"===a[0].type&&(S.token+=a[0].token,a.shift()),a.length>1&&("-"===a[0].token||"+"===a[0].token)&&"8"===a[1].token&&(S.token+=a[0].token+a[1].token,a.shift(),a.shift()),i.clef={type:S.token,verticalPos:l(S.token,0)},i.currentVoice&&void 0!==i.currentVoice.transpose&&(i.clef.transpose=i.currentVoice.transpose),o.foundClef=!0;break;default:e("Unknown parameter: "+a[0].token,r,a[0].start),a.shift()}return o};s.parseVoice=function(r,n,a){var s=t.getMeat(r,n,a),c=s.start,h=s.end,f=t.getToken(r,c,h);if(0!==f.length){var d=!1;void 0===i.voices[f]&&(i.voices[f]={},d=!0,i.score_is_present&&e("Can't have an unknown V: id when the %score directive is present",r,c)),c+=f.length,c+=t.eatWhiteSpace(r,c);for(var p={startStaff:d},m=function(i){var n=t.getVoiceToken(r,c,h);void 0!==n.warn?e("Expected value for "+i+" in voice: "+n.warn,r,c):0===n.token.length&&'"'!==r.charAt(c)?e("Expected value for "+i+" in voice",r,c):p[i]=n.token,c+=n.len},g=function(n,a,s){var o=t.getVoiceToken(r,c,h);void 0!==o.warn?e("Expected value for "+a+" in voice: "+o.warn,r,c):0===o.token.length&&'"'!==r.charAt(c)?e("Expected value for "+a+" in voice",r,c):("number"===s&&(o.token=parseFloat(o.token)),i.voices[n][a]=o.token),c+=o.len};c<h;){var v=t.getVoiceToken(r,c,h);if(c+=v.len,v.warn)e("Error parsing voice: "+v.warn,r,c);else{var b=null;switch(v.token){case"clef":case"cl":m("clef");var y=0;void 0!==p.clef&&(p.clef=p.clef.replace(/[',]/g,""),-1!==p.clef.indexOf("+16")&&(y+=14,p.clef=p.clef.replace("+16","")),p.verticalPos=l(p.clef,y));break;case"treble":case"bass":case"tenor":case"alto":case"perc":case"none":case"treble'":case"bass'":case"tenor'":case"alto'":case"none'":case"treble''":case"bass''":case"tenor''":case"alto''":case"none''":case"treble,":case"bass,":case"tenor,":case"alto,":case"none,":case"treble,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":p.clef=v.token.replace(/[',]/g,""),p.verticalPos=l(p.clef,0);break;case"staves":case"stave":case"stv":m("staves");break;case"brace":case"brc":m("brace");break;case"bracket":case"brk":m("bracket");break;case"name":case"nm":m("name");break;case"subname":case"sname":case"snm":m("subname");break;case"merge":p.startStaff=!1;break;case"stem":case"stems":void 0!==(b=t.getVoiceToken(r,c,h)).warn?e("Expected value for stems in voice: "+b.warn,r,c):"up"===b.token||"down"===b.token?i.voices[f].stem=b.token:e("Expected up or down for voice stem",r,c),c+=b.len;break;case"up":case"down":i.voices[f].stem=v.token;break;case"middle":case"m":m("verticalPos"),p.verticalPos=u(p.verticalPos).mid;break;case"gchords":case"gch":i.voices[f].suppressChords=!0,"0"===(b=t.getVoiceToken(r,c,h)).token&&(c+=b.len);break;case"space":case"spc":m("spacing");break;case"scale":g(f,"scale","number");break;case"transpose":g(f,"transpose","number");break;case"stafflines":g(f,"stafflines","number");break;case"staffscale":g(f,"staffscale","number");break;case"octave":g(f,"octave","number");break;case"volume":g(f,"volume","number")}}c+=t.eatWhiteSpace(r,c)}if((p.startStaff||0===i.staves.length)&&(i.staves.push({index:i.staves.length,meter:i.origMeter}),i.score_is_present||(i.staves[i.staves.length-1].numVoices=0)),void 0===i.voices[f].staffNum){i.voices[f].staffNum=i.staves.length-1;var x=0;for(var w in i.voices)i.voices.hasOwnProperty(w)&&i.voices[w].staffNum===i.voices[f].staffNum&&x++;i.voices[f].index=x-1}var k=i.staves[i.voices[f].staffNum];i.score_is_present||k.numVoices++,p.clef&&(k.clef={type:p.clef,verticalPos:p.verticalPos}),p.spacing&&(k.spacing_below_offset=p.spacing),p.verticalPos&&(k.verticalPos=p.verticalPos),p.name&&(k.name?k.name.push(p.name):k.name=[p.name]),p.subname&&(k.subname?k.subname.push(p.subname):k.subname=[p.subname]),function(t){i.currentVoice=i.voices[t],o.setCurrentVoice(i.currentVoice.staffNum,i.currentVoice.index)}(f)}else e("Expected a voice id",r,c)}}(),t.exports=s},function(t,e,i){var r;r=function(){return function(t){function e(r){if(i[r])return i[r].exports;var n=i[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){var r,n;r=[i(1),i(3),i(4)],void 0===(n=function(t){return t}.apply(e,r))||(t.exports=n)},function(t,e,i){var r,n;r=[i(2)],void 0===(n=function(t){function e(i){if(e.is(i,"function"))return v?i():t.on("raphael.DOMload",i);if(e.is(i,U))return e._engine.create[T](e,i.splice(0,3+e.is(i[0],j))).add(i);var r=Array.prototype.slice.call(arguments,0);if(e.is(r[r.length-1],"function")){var n=r.pop();return v?n.call(e._engine.create[T](e,r)):t.on("raphael.DOMload",function(){n.call(e._engine.create[T](e,r))})}return e._engine.create[T](e,arguments)}function i(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var r in t)t[k](r)&&(e[r]=i(t[r]));return e}function r(t,e,i){return function r(){var n=Array.prototype.slice.call(arguments,0),a=n.join("␀"),s=r.cache=r.cache||{},o=r.count=r.count||[];return s[k](a)?(function(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return t.push(t.splice(i,1)[0])}(o,a),i?i(s[a]):s[a]):(o.length>=1e3&&delete s[o.shift()],o.push(a),s[a]=t[T](e,n),i?i(s[a]):s[a])}}function n(){return this.hex}function a(t,e){for(var i=[],r=0,n=t.length;n-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?n-4==r?a[3]={x:+t[0],y:+t[1]}:n-2==r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[n-2],y:+t[n-1]}:n-4==r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),i.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return i}function s(t,e,i,r,n){return t*(t*(-3*e+9*i-9*r+3*n)+6*e-12*i+6*r)-3*e+3*i}function o(t,e,i,r,n,a,o,c,l){null==l&&(l=1);for(var h=(l=l>1?1:l<0?0:l)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,p=0;p<12;p++){var m=h*u[p]+h,g=s(m,t,i,n,o),v=s(m,e,r,a,c),b=g*g+v*v;d+=f[p]*H.sqrt(b)}return h*d}function c(t,e,i,r,n,a,s,o){if(!(z(t,i)<V(n,s)||V(t,i)>z(n,s)||z(e,r)<V(a,o)||V(e,r)>z(a,o))){var c=(t-i)*(a-o)-(e-r)*(n-s);if(c){var l=((t*r-e*i)*(n-s)-(t-i)*(n*o-a*s))/c,h=((t*r-e*i)*(a-o)-(e-r)*(n*o-a*s))/c,u=+l.toFixed(2),f=+h.toFixed(2);if(!(u<+V(t,i).toFixed(2)||u>+z(t,i).toFixed(2)||u<+V(n,s).toFixed(2)||u>+z(n,s).toFixed(2)||f<+V(e,r).toFixed(2)||f>+z(e,r).toFixed(2)||f<+V(a,o).toFixed(2)||f>+z(a,o).toFixed(2)))return{x:l,y:h}}}}function l(t,i,r){var n=e.bezierBBox(t),a=e.bezierBBox(i);if(!e.isBBoxIntersect(n,a))return r?0:[];for(var s=o.apply(0,t),l=o.apply(0,i),h=z(~~(s/5),1),u=z(~~(l/5),1),f=[],d=[],p={},m=r?0:[],g=0;g<h+1;g++){var v=e.findDotsAtSegment.apply(e,t.concat(g/h));f.push({x:v.x,y:v.y,t:g/h})}for(g=0;g<u+1;g++)v=e.findDotsAtSegment.apply(e,i.concat(g/u)),d.push({x:v.x,y:v.y,t:g/u});for(g=0;g<h;g++)for(var b=0;b<u;b++){var y=f[g],x=f[g+1],w=d[b],k=d[b+1],A=F(x.x-y.x)<.001?"y":"x",_=F(k.x-w.x)<.001?"y":"x",S=c(y.x,y.y,x.x,x.y,w.x,w.y,k.x,k.y);if(S){if(p[S.x.toFixed(4)]==S.y.toFixed(4))continue;p[S.x.toFixed(4)]=S.y.toFixed(4);var T=y.t+F((S[A]-y[A])/(x[A]-y[A]))*(x.t-y.t),C=w.t+F((S[_]-w[_])/(k[_]-w[_]))*(k.t-w.t);T>=0&&T<=1.001&&C>=0&&C<=1.001&&(r?m++:m.push({x:S.x,y:S.y,t1:V(T,1),t2:V(C,1)}))}}return m}function h(t,i,r){t=e._path2curve(t),i=e._path2curve(i);for(var n,a,s,o,c,h,u,f,d,p,m=r?0:[],g=0,v=t.length;g<v;g++){var b=t[g];if("M"==b[0])n=c=b[1],a=h=b[2];else{"C"==b[0]?(n=(d=[n,a].concat(b.slice(1)))[6],a=d[7]):(d=[n,a,n,a,c,h,c,h],n=c,a=h);for(var y=0,x=i.length;y<x;y++){var w=i[y];if("M"==w[0])s=u=w[1],o=f=w[2];else{"C"==w[0]?(s=(p=[s,o].concat(w.slice(1)))[6],o=p[7]):(p=[s,o,s,o,u,f,u,f],s=u,o=f);var k=l(d,p,r);if(r)m+=k;else{for(var A=0,_=k.length;A<_;A++)k[A].segment1=g,k[A].segment2=y,k[A].bez1=d,k[A].bez2=p;m=m.concat(k)}}}}}return m}function u(t,e,i,r,n,a){null!=t?(this.a=+t,this.b=+e,this.c=+i,this.d=+r,this.e=+n,this.f=+a):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function f(){return this.x+I+this.y+I+this.width+" × "+this.height}function d(t,e,i,r,n,a){function s(t){return((l*t+c)*t+o)*t}var o=3*e,c=3*(r-e)-o,l=1-o-c,h=3*i,u=3*(n-i)-h,f=1-h-u;return function(t,e){var i=function(t,e){var i,r,n,a,h,u;for(n=t,u=0;u<8;u++){if(a=s(n)-t,F(a)<e)return n;if(F(h=(3*l*n+2*c)*n+o)<1e-6)break;n-=a/h}if(r=1,(n=t)<(i=0))return i;if(n>r)return r;for(;i<r;){if(a=s(n),F(a-t)<e)return n;t>a?i=n:r=n,n=(r-i)/2+i}return n}(t,e);return((f*i+u)*i+h)*i}(t,1/(200*a))}function p(t,e){var i=[],r={};if(this.ms=e,this.times=1,t){for(var n in t)t[k](n)&&(r[Z(n)]=t[n],i.push(Z(n)));i.sort(ct)}this.anim=r,this.top=i[i.length-1],this.percents=i}function m(i,r,n,a,s,o){n=Z(n);var c,l,h,f,p,m,g=i.ms,v={},b={},x={};if(a)for(A=0,_=ie.length;A<_;A++){var w=ie[A];if(w.el.id==r.id&&w.anim==i){w.percent!=n?(ie.splice(A,1),h=1):l=w,r.attr(w.totalOrigin);break}}else a=+b;for(var A=0,_=i.percents.length;A<_;A++){if(i.percents[A]==n||i.percents[A]>a*i.top){n=i.percents[A],p=i.percents[A-1]||0,g=g/i.top*(n-p),f=i.percents[A+1],c=i.anim[n];break}a&&r.attr(i.anim[i.percents[A]])}if(c){if(l)l.initstatus=a,l.start=new Date-l.ms*a;else{for(var S in c)if(c[k](S)&&(tt[k](S)||r.paper.customAttributes[k](S)))switch(v[S]=r.attr(S),null==v[S]&&(v[S]=$[S]),b[S]=c[S],tt[S]){case j:x[S]=(b[S]-v[S])/g;break;case"colour":v[S]=e.getRGB(v[S]);var T=e.getRGB(b[S]);x[S]={r:(T.r-v[S].r)/g,g:(T.g-v[S].g)/g,b:(T.b-v[S].b)/g};break;case"path":var N=Et(v[S],b[S]),M=N[1];for(v[S]=N[0],x[S]=[],A=0,_=v[S].length;A<_;A++){x[S][A]=[0];for(var I=1,P=v[S][A].length;I<P;I++)x[S][A][I]=(M[A][I]-v[S][A][I])/g}break;case"transform":var L=r._,D=zt(L[S],b[S]);if(D)for(v[S]=D.from,b[S]=D.to,x[S]=[],x[S].real=!0,A=0,_=v[S].length;A<_;A++)for(x[S][A]=[v[S][A][0]],I=1,P=v[S][A].length;I<P;I++)x[S][A][I]=(b[S][A][I]-v[S][A][I])/g;else{var H=r.matrix||new u,z={_:{transform:L.transform},getBBox:function(){return r.getBBox(1)}};v[S]=[H.a,H.b,H.c,H.d,H.e,H.f],Dt(z,b[S]),b[S]=z._.transform,x[S]=[(z.matrix.a-H.a)/g,(z.matrix.b-H.b)/g,(z.matrix.c-H.c)/g,(z.matrix.d-H.d)/g,(z.matrix.e-H.e)/g,(z.matrix.f-H.f)/g]}break;case"csv":var V=B(c[S])[E](y),F=B(v[S])[E](y);if("clip-rect"==S)for(v[S]=F,x[S]=[],A=F.length;A--;)x[S][A]=(V[A]-v[S][A])/g;b[S]=V;break;default:for(V=[][C](c[S]),F=[][C](v[S]),x[S]=[],A=r.paper.customAttributes[S].length;A--;)x[S][A]=((V[A]||0)-(F[A]||0))/g}var O=c.easing,q=e.easing_formulas[O];if(!q)if((q=B(O).match(X))&&5==q.length){var R=q;q=function(t){return d(t,+R[1],+R[2],+R[3],+R[4],g)}}else q=lt;if(w={anim:i,percent:n,timestamp:m=c.start||i.start||+new Date,start:m+(i.del||0),status:0,initstatus:a||0,stop:!1,ms:g,easing:q,from:v,diff:x,to:b,el:r,callback:c.callback,prev:p,next:f,repeat:o||i.times,origin:r.attr(),totalOrigin:s},ie.push(w),a&&!l&&!h&&(w.stop=!0,w.start=new Date-g*a,1==ie.length))return ne();h&&(w.start=new Date-w.ms*a),1==ie.length&&re(ne)}t("raphael.anim.start."+r.id,r,i)}}function g(t){for(var e=0;e<ie.length;e++)ie[e].el.paper==t&&ie.splice(e--,1)}e.version="2.2.0",e.eve=t;var v,b,y=/[, ]+/,x={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},w=/\{(\d+)\}/g,k="hasOwnProperty",A={doc:document,win:window},_={was:Object.prototype[k].call(A.win,"Raphael"),is:A.win.Raphael},S=function(){this.ca=this.customAttributes={}},T="apply",C="concat",N="ontouchstart"in A.win||A.win.DocumentTouch&&A.doc instanceof DocumentTouch,M="",I=" ",B=String,E="split",P="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[E](I),L={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},D=B.prototype.toLowerCase,H=Math,z=H.max,V=H.min,F=H.abs,O=H.pow,q=H.PI,j="number",R="string",U="array",Y=Object.prototype.toString,W=(e._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),G={NaN:1,Infinity:1,"-Infinity":1},X=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,K=H.round,Z=parseFloat,Q=parseInt,J=B.prototype.toUpperCase,$=e._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,class:""},tt=e._availableAnimAttrs={blur:j,"clip-rect":"csv",cx:j,cy:j,fill:"colour","fill-opacity":j,"font-size":j,height:j,opacity:j,path:"path",r:j,rx:j,ry:j,stroke:"colour","stroke-opacity":j,"stroke-width":j,transform:"transform",width:j,x:j,y:j},et=/[\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]*/,it={hs:1,rg:1},rt=/,?([achlmqrstvxz]),?/gi,nt=/([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,at=/([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,st=/(-?\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,ot=(e._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]*([^\)]+?)\))?/,{}),ct=function(t,e){return Z(t)-Z(e)},lt=function(t){return t},ht=e._rectPath=function(t,e,i,r,n){return n?[["M",t+n,e],["l",i-2*n,0],["a",n,n,0,0,1,n,n],["l",0,r-2*n],["a",n,n,0,0,1,-n,n],["l",2*n-i,0],["a",n,n,0,0,1,-n,-n],["l",0,2*n-r],["a",n,n,0,0,1,n,-n],["z"]]:[["M",t,e],["l",i,0],["l",0,r],["l",-i,0],["z"]]},ut=function(t,e,i,r){return null==r&&(r=i),[["M",t,e],["m",0,-r],["a",i,r,0,1,1,0,2*r],["a",i,r,0,1,1,0,-2*r],["z"]]},ft=e._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return ut(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return ut(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return ht(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return ht(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return ht(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return ht(e.x,e.y,e.width,e.height)}},dt=e.mapPath=function(t,e){if(!e)return t;var i,r,n,a,s,o,c;for(n=0,s=(t=Et(t)).length;n<s;n++)for(a=1,o=(c=t[n]).length;a<o;a+=2)i=e.x(c[a],c[a+1]),r=e.y(c[a],c[a+1]),c[a]=i,c[a+1]=r;return t};if(e._g=A,e.type=A.win.SVGAngle||A.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==e.type){var pt,mt=A.doc.createElement("div");if(mt.innerHTML='<v:shape adj="1"/>',(pt=mt.firstChild).style.behavior="url(#default#VML)",!pt||"object"!=typeof pt.adj)return e.type=M;mt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=S,e.fn=b=S.prototype=e.prototype,e._id=0,e.is=function(t,e){return"finite"==(e=D.call(e))?!G[k](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||Y.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,i,r,n,a,s){if(null==a){var o=t-r,c=i-n;return o||c?(180+180*H.atan2(-c,-o)/q+360)%360:0}return e.angle(t,i,a,s)-e.angle(r,n,a,s)},e.rad=function(t){return t%360*q/180},e.deg=function(t){return Math.round(180*t/q%360*1e3)/1e3},e.snapTo=function(t,i,r){if(r=e.is(r,"finite")?r:10,e.is(t,U)){for(var n=t.length;n--;)if(F(t[n]-i)<=r)return t[n]}else{var a=i%(t=+t);if(a<r)return i-a;if(a>t-r)return i-a+t}return i};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*H.random()|0;return("x"==t?e:3&e|8).toString(16)});e.setWindow=function(i){t("raphael.setWindow",e,A.win,i),A.win=i,A.doc=A.win.document,e._engine.initWin&&e._engine.initWin(A.win)};var gt=function(t){if(e.vml){var i,n=/^\s+|\s+$/g;try{var a=new ActiveXObject("htmlfile");a.write("<body>"),a.close(),i=a.body}catch(t){i=createPopup().document.body}var s=i.createTextRange();gt=r(function(t){try{i.style.color=B(t).replace(n,M);var e=s.queryCommandValue("ForeColor");return"#"+("000000"+(e=(255&e)<<16|65280&e|(16711680&e)>>>16).toString(16)).slice(-6)}catch(t){return"none"}})}else{var o=A.doc.createElement("i");o.title="Raphaël Colour Picker",o.style.display="none",A.doc.body.appendChild(o),gt=r(function(t){return o.style.color=t,A.doc.defaultView.getComputedStyle(o,M).getPropertyValue("color")})}return gt(t)},vt=function(){return"hsb("+[this.h,this.s,this.b]+")"},bt=function(){return"hsl("+[this.h,this.s,this.l]+")"},yt=function(){return this.hex},xt=function(t,i,r){if(null==i&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(r=t.b,i=t.g,t=t.r),null==i&&e.is(t,R)){var n=e.getRGB(t);t=n.r,i=n.g,r=n.b}return(t>1||i>1||r>1)&&(t/=255,i/=255,r/=255),[t,i,r]},wt=function(t,i,r,n){var a={r:t*=255,g:i*=255,b:r*=255,hex:e.rgb(t,i,r),toString:yt};return e.is(n,"finite")&&(a.opacity=n),a};e.color=function(t){var i;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(i=e.hsb2rgb(t),t.r=i.r,t.g=i.g,t.b=i.b,t.hex=i.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(i=e.hsl2rgb(t),t.r=i.r,t.g=i.g,t.b=i.b,t.hex=i.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(i=e.rgb2hsl(t),t.h=i.h,t.s=i.s,t.l=i.l,i=e.rgb2hsb(t),t.v=i.b):(t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1),t.toString=yt,t},e.hsb2rgb=function(t,e,i,r){var n,a,s,o,c;return this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(i=t.b,e=t.s,r=t.o,t=t.h),o=(c=i*e)*(1-F((t=(t*=360)%360/60)%2-1)),n=a=s=i-c,wt(n+=[c,o,0,0,o,c][t=~~t],a+=[o,c,c,o,0,0][t],s+=[0,0,o,c,c,o][t],r)},e.hsl2rgb=function(t,e,i,r){var n,a,s,o,c;return this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(i=t.l,e=t.s,t=t.h),(t>1||e>1||i>1)&&(t/=360,e/=100,i/=100),t=(t*=360)%360/60,o=(c=2*e*(i<.5?i:1-i))*(1-F(t%2-1)),n=a=s=i-c/2,wt(n+=[c,o,0,0,o,c][t=~~t],a+=[o,c,c,o,0,0][t],s+=[0,0,o,c,c,o][t],r)},e.rgb2hsb=function(t,e,i){var r,n;return t=(i=xt(t,e,i))[0],e=i[1],i=i[2],{h:((0==(n=(r=z(t,e,i))-V(t,e,i))?null:r==t?(e-i)/n:r==e?(i-t)/n+2:(t-e)/n+4)+360)%6*60/360,s:0==n?0:n/r,b:r,toString:vt}},e.rgb2hsl=function(t,e,i){var r,n,a,s;return t=(i=xt(t,e,i))[0],e=i[1],i=i[2],r=((n=z(t,e,i))+(a=V(t,e,i)))/2,{h:((0==(s=n-a)?null:n==t?(e-i)/s:n==e?(i-t)/s+2:(t-e)/s+4)+360)%6*60/360,s:0==s?0:r<.5?s/(2*r):s/(2-2*r),l:r,toString:bt}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var i=A.doc.createElement("img");i.style.cssText="position:absolute;left:-9999em;top:-9999em",i.onload=function(){e.call(this),this.onload=null,A.doc.body.removeChild(this)},i.onerror=function(){A.doc.body.removeChild(this)},A.doc.body.appendChild(i),i.src=t};e.getRGB=r(function(t){if(!t||(t=B(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:n};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:n};!it[k](t.toLowerCase().substring(0,2))&&"#"!=t.charAt()&&(t=gt(t));var i,r,a,s,o,c,l=t.match(W);return l?(l[2]&&(a=Q(l[2].substring(5),16),r=Q(l[2].substring(3,5),16),i=Q(l[2].substring(1,3),16)),l[3]&&(a=Q((o=l[3].charAt(3))+o,16),r=Q((o=l[3].charAt(2))+o,16),i=Q((o=l[3].charAt(1))+o,16)),l[4]&&(c=l[4][E](et),i=Z(c[0]),"%"==c[0].slice(-1)&&(i*=2.55),r=Z(c[1]),"%"==c[1].slice(-1)&&(r*=2.55),a=Z(c[2]),"%"==c[2].slice(-1)&&(a*=2.55),"rgba"==l[1].toLowerCase().slice(0,4)&&(s=Z(c[3])),c[3]&&"%"==c[3].slice(-1)&&(s/=100)),l[5]?(c=l[5][E](et),i=Z(c[0]),"%"==c[0].slice(-1)&&(i*=2.55),r=Z(c[1]),"%"==c[1].slice(-1)&&(r*=2.55),a=Z(c[2]),"%"==c[2].slice(-1)&&(a*=2.55),("deg"==c[0].slice(-3)||"°"==c[0].slice(-1))&&(i/=360),"hsba"==l[1].toLowerCase().slice(0,4)&&(s=Z(c[3])),c[3]&&"%"==c[3].slice(-1)&&(s/=100),e.hsb2rgb(i,r,a,s)):l[6]?(c=l[6][E](et),i=Z(c[0]),"%"==c[0].slice(-1)&&(i*=2.55),r=Z(c[1]),"%"==c[1].slice(-1)&&(r*=2.55),a=Z(c[2]),"%"==c[2].slice(-1)&&(a*=2.55),("deg"==c[0].slice(-3)||"°"==c[0].slice(-1))&&(i/=360),"hsla"==l[1].toLowerCase().slice(0,4)&&(s=Z(c[3])),c[3]&&"%"==c[3].slice(-1)&&(s/=100),e.hsl2rgb(i,r,a,s)):((l={r:i,g:r,b:a,toString:n}).hex="#"+(16777216|a|r<<8|i<<16).toString(16).slice(1),e.is(s,"finite")&&(l.opacity=s),l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:n}},e),e.hsb=r(function(t,i,r){return e.hsb2rgb(t,i,r).hex}),e.hsl=r(function(t,i,r){return e.hsl2rgb(t,i,r).hex}),e.rgb=r(function(t,e,i){function r(t){return t+.5|0}return"#"+(16777216|r(i)|r(e)<<8|r(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},i=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),i.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var i=kt(t);if(i.arr)return _t(i.arr);var r={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},n=[];return e.is(t,U)&&e.is(t[0],U)&&(n=_t(t)),n.length||B(t).replace(nt,function(t,e,i){var a=[],s=e.toLowerCase();if(i.replace(st,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(n.push([e][C](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)n.push([e][C](a));else for(;a.length>=r[s]&&(n.push([e][C](a.splice(0,r[s]))),r[s]););}),n.toString=e._path2string,i.arr=_t(n),n},e.parseTransformString=r(function(t){if(!t)return null;var i=[];return e.is(t,U)&&e.is(t[0],U)&&(i=_t(t)),i.length||B(t).replace(at,function(t,e,r){var n=[];D.call(e);r.replace(st,function(t,e){e&&n.push(+e)}),i.push([e][C](n))}),i.toString=e._path2string,i});var kt=function(t){var e=kt.ps=kt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var i in e)e[k](i)&&i!=t&&(e[i].sleep--,!e[i].sleep&&delete e[i])}),e[t]};e.findDotsAtSegment=function(t,e,i,r,n,a,s,o,c){var l=1-c,h=O(l,3),u=O(l,2),f=c*c,d=f*c,p=h*t+3*u*c*i+3*l*c*c*n+d*s,m=h*e+3*u*c*r+3*l*c*c*a+d*o,g=t+2*c*(i-t)+f*(n-2*i+t),v=e+2*c*(r-e)+f*(a-2*r+e),b=i+2*c*(n-i)+f*(s-2*n+i),y=r+2*c*(a-r)+f*(o-2*a+r),x=l*t+c*i,w=l*e+c*r,k=l*n+c*s,A=l*a+c*o,_=90-180*H.atan2(g-b,v-y)/q;return(g>b||v<y)&&(_+=180),{x:p,y:m,m:{x:g,y:v},n:{x:b,y:y},start:{x:x,y:w},end:{x:k,y:A},alpha:_}},e.bezierBBox=function(t,i,r,n,a,s,o,c){e.is(t,"array")||(t=[t,i,r,n,a,s,o,c]);var l=Bt.apply(null,t);return{x:l.min.x,y:l.min.y,x2:l.max.x,y2:l.max.y,width:l.max.x-l.min.x,height:l.max.y-l.min.y}},e.isPointInsideBBox=function(t,e,i){return e>=t.x&&e<=t.x2&&i>=t.y&&i<=t.y2},e.isBBoxIntersect=function(t,i){var r=e.isPointInsideBBox;return r(i,t.x,t.y)||r(i,t.x2,t.y)||r(i,t.x,t.y2)||r(i,t.x2,t.y2)||r(t,i.x,i.y)||r(t,i.x2,i.y)||r(t,i.x,i.y2)||r(t,i.x2,i.y2)||(t.x<i.x2&&t.x>i.x||i.x<t.x2&&i.x>t.x)&&(t.y<i.y2&&t.y>i.y||i.y<t.y2&&i.y>t.y)},e.pathIntersection=function(t,e){return h(t,e)},e.pathIntersectionNumber=function(t,e){return h(t,e,1)},e.isPointInsidePath=function(t,i,r){var n=e.pathBBox(t);return e.isPointInsideBBox(n,i,r)&&h(t,[["M",i,r],["H",n.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var At=e.pathBBox=function(t){var e=kt(t);if(e.bbox)return i(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var r,n=0,a=0,s=[],o=[],c=0,l=(t=Et(t)).length;c<l;c++)if("M"==(r=t[c])[0])n=r[1],a=r[2],s.push(n),o.push(a);else{var h=Bt(n,a,r[1],r[2],r[3],r[4],r[5],r[6]);s=s[C](h.min.x,h.max.x),o=o[C](h.min.y,h.max.y),n=r[5],a=r[6]}var u=V[T](0,s),f=V[T](0,o),d=z[T](0,s),p=z[T](0,o),m=d-u,g=p-f,v={x:u,y:f,x2:d,y2:p,width:m,height:g,cx:u+m/2,cy:f+g/2};return e.bbox=i(v),v},_t=function(t){var r=i(t);return r.toString=e._path2string,r},St=e._pathToRelative=function(t){var i=kt(t);if(i.rel)return _t(i.rel);e.is(t,U)&&e.is(t&&t[0],U)||(t=e.parsePathString(t));var r=[],n=0,a=0,s=0,o=0,c=0;"M"==t[0][0]&&(s=n=t[0][1],o=a=t[0][2],c++,r.push(["M",n,a]));for(var l=c,h=t.length;l<h;l++){var u=r[l]=[],f=t[l];if(f[0]!=D.call(f[0]))switch(u[0]=D.call(f[0]),u[0]){case"a":u[1]=f[1],u[2]=f[2],u[3]=f[3],u[4]=f[4],u[5]=f[5],u[6]=+(f[6]-n).toFixed(3),u[7]=+(f[7]-a).toFixed(3);break;case"v":u[1]=+(f[1]-a).toFixed(3);break;case"m":s=f[1],o=f[2];default:for(var d=1,p=f.length;d<p;d++)u[d]=+(f[d]-(d%2?n:a)).toFixed(3)}else{u=r[l]=[],"m"==f[0]&&(s=f[1]+n,o=f[2]+a);for(var m=0,g=f.length;m<g;m++)r[l][m]=f[m]}var v=r[l].length;switch(r[l][0]){case"z":n=s,a=o;break;case"h":n+=+r[l][v-1];break;case"v":a+=+r[l][v-1];break;default:n+=+r[l][v-2],a+=+r[l][v-1]}}return r.toString=e._path2string,i.rel=_t(r),r},Tt=e._pathToAbsolute=function(t){var i=kt(t);if(i.abs)return _t(i.abs);if(e.is(t,U)&&e.is(t&&t[0],U)||(t=e.parsePathString(t)),!t||!t.length)return[["M",0,0]];var r=[],n=0,s=0,o=0,c=0,l=0;"M"==t[0][0]&&(o=n=+t[0][1],c=s=+t[0][2],l++,r[0]=["M",n,s]);for(var h,u,f=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),d=l,p=t.length;d<p;d++){if(r.push(h=[]),(u=t[d])[0]!=J.call(u[0]))switch(h[0]=J.call(u[0]),h[0]){case"A":h[1]=u[1],h[2]=u[2],h[3]=u[3],h[4]=u[4],h[5]=u[5],h[6]=+(u[6]+n),h[7]=+(u[7]+s);break;case"V":h[1]=+u[1]+s;break;case"H":h[1]=+u[1]+n;break;case"R":for(var m=[n,s][C](u.slice(1)),g=2,v=m.length;g<v;g++)m[g]=+m[g]+n,m[++g]=+m[g]+s;r.pop(),r=r[C](a(m,f));break;case"M":o=+u[1]+n,c=+u[2]+s;default:for(g=1,v=u.length;g<v;g++)h[g]=+u[g]+(g%2?n:s)}else if("R"==u[0])m=[n,s][C](u.slice(1)),r.pop(),r=r[C](a(m,f)),h=["R"][C](u.slice(-2));else for(var b=0,y=u.length;b<y;b++)h[b]=u[b];switch(h[0]){case"Z":n=o,s=c;break;case"H":n=h[1];break;case"V":s=h[1];break;case"M":o=h[h.length-2],c=h[h.length-1];default:n=h[h.length-2],s=h[h.length-1]}}return r.toString=e._path2string,i.abs=_t(r),r},Ct=function(t,e,i,r){return[t,e,i,r,i,r]},Nt=function(t,e,i,r,n,a){var s=1/3,o=2/3;return[s*t+o*i,s*e+o*r,s*n+o*i,s*a+o*r,n,a]},Mt=function(t,e,i,n,a,s,o,c,l,h){var u,f=120*q/180,d=q/180*(+a||0),p=[],m=r(function(t,e,i){return{x:t*H.cos(i)-e*H.sin(i),y:t*H.sin(i)+e*H.cos(i)}});if(h)_=h[0],S=h[1],k=h[2],A=h[3];else{t=(u=m(t,e,-d)).x,e=u.y,c=(u=m(c,l,-d)).x,l=u.y;H.cos(q/180*a),H.sin(q/180*a);var g=(t-c)/2,v=(e-l)/2,b=g*g/(i*i)+v*v/(n*n);b>1&&(i*=b=H.sqrt(b),n*=b);var y=i*i,x=n*n,w=(s==o?-1:1)*H.sqrt(F((y*x-y*v*v-x*g*g)/(y*v*v+x*g*g))),k=w*i*v/n+(t+c)/2,A=w*-n*g/i+(e+l)/2,_=H.asin(((e-A)/n).toFixed(9)),S=H.asin(((l-A)/n).toFixed(9));_=t<k?q-_:_,S=c<k?q-S:S,_<0&&(_=2*q+_),S<0&&(S=2*q+S),o&&_>S&&(_-=2*q),!o&&S>_&&(S-=2*q)}var T=S-_;if(F(T)>f){var N=S,M=c,I=l;S=_+f*(o&&S>_?1:-1),c=k+i*H.cos(S),l=A+n*H.sin(S),p=Mt(c,l,i,n,a,0,o,M,I,[S,N,k,A])}T=S-_;var B=H.cos(_),P=H.sin(_),L=H.cos(S),D=H.sin(S),z=H.tan(T/4),V=4/3*i*z,O=4/3*n*z,j=[t,e],R=[t+V*P,e-O*B],U=[c+V*D,l-O*L],Y=[c,l];if(R[0]=2*j[0]-R[0],R[1]=2*j[1]-R[1],h)return[R,U,Y][C](p);for(var W=[],G=0,X=(p=[R,U,Y][C](p).join()[E](",")).length;G<X;G++)W[G]=G%2?m(p[G-1],p[G],d).y:m(p[G],p[G+1],d).x;return W},It=function(t,e,i,r,n,a,s,o,c){var l=1-c;return{x:O(l,3)*t+3*O(l,2)*c*i+3*l*c*c*n+O(c,3)*s,y:O(l,3)*e+3*O(l,2)*c*r+3*l*c*c*a+O(c,3)*o}},Bt=r(function(t,e,i,r,n,a,s,o){var c,l=n-2*i+t-(s-2*n+i),h=2*(i-t)-2*(n-i),u=t-i,f=(-h+H.sqrt(h*h-4*l*u))/2/l,d=(-h-H.sqrt(h*h-4*l*u))/2/l,p=[e,o],m=[t,s];return F(f)>"1e12"&&(f=.5),F(d)>"1e12"&&(d=.5),f>0&&f<1&&(c=It(t,e,i,r,n,a,s,o,f),m.push(c.x),p.push(c.y)),d>0&&d<1&&(c=It(t,e,i,r,n,a,s,o,d),m.push(c.x),p.push(c.y)),l=a-2*r+e-(o-2*a+r),u=e-r,f=(-(h=2*(r-e)-2*(a-r))+H.sqrt(h*h-4*l*u))/2/l,d=(-h-H.sqrt(h*h-4*l*u))/2/l,F(f)>"1e12"&&(f=.5),F(d)>"1e12"&&(d=.5),f>0&&f<1&&(c=It(t,e,i,r,n,a,s,o,f),m.push(c.x),p.push(c.y)),d>0&&d<1&&(c=It(t,e,i,r,n,a,s,o,d),m.push(c.x),p.push(c.y)),{min:{x:V[T](0,m),y:V[T](0,p)},max:{x:z[T](0,m),y:z[T](0,p)}}}),Et=e._path2curve=r(function(t,e){var i=!e&&kt(t);if(!e&&i.curve)return _t(i.curve);for(var r=Tt(t),n=e&&Tt(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=function(t,e,i){var r,n;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][C](Mt[T](0,[e.x,e.y][C](t.slice(1))));break;case"S":"C"==i||"S"==i?(r=2*e.x-e.bx,n=2*e.y-e.by):(r=e.x,n=e.y),t=["C",r,n][C](t.slice(1));break;case"T":"Q"==i||"T"==i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][C](Nt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][C](Nt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][C](Ct(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][C](Ct(e.x,e.y,t[1],e.y));break;case"V":t=["C"][C](Ct(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][C](Ct(e.x,e.y,e.X,e.Y))}return t},c=function(t,e){if(t[e].length>7){t[e].shift();for(var i=t[e];i.length;)h[e]="A",n&&(u[e]="A"),t.splice(e++,0,["C"][C](i.splice(0,6)));t.splice(e,1),m=z(r.length,n&&n.length||0)}},l=function(t,e,i,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),i.bx=0,i.by=0,i.x=t[s][1],i.y=t[s][2],m=z(r.length,n&&n.length||0))},h=[],u=[],f="",d="",p=0,m=z(r.length,n&&n.length||0);p<m;p++){r[p]&&(f=r[p][0]),"C"!=f&&(h[p]=f,p&&(d=h[p-1])),r[p]=o(r[p],a,d),"A"!=h[p]&&"C"==f&&(h[p]="C"),c(r,p),n&&(n[p]&&(f=n[p][0]),"C"!=f&&(u[p]=f,p&&(d=u[p-1])),n[p]=o(n[p],s,d),"A"!=u[p]&&"C"==f&&(u[p]="C"),c(n,p)),l(r,n,a,s,p),l(n,r,s,a,p);var g=r[p],v=n&&n[p],b=g.length,y=n&&v.length;a.x=g[b-2],a.y=g[b-1],a.bx=Z(g[b-4])||a.x,a.by=Z(g[b-3])||a.y,s.bx=n&&(Z(v[y-4])||s.x),s.by=n&&(Z(v[y-3])||s.y),s.x=n&&v[y-2],s.y=n&&v[y-1]}return n||(i.curve=_t(r)),n?[r,n]:r},null,_t),Pt=(e._parseDots=r(function(t){for(var i=[],r=0,n=t.length;r<n;r++){var a={},s=t[r].match(/^([^:]*):?([\d\.]*)/);if(a.color=e.getRGB(s[1]),a.color.error)return null;a.opacity=a.color.opacity,a.color=a.color.hex,s[2]&&(a.offset=s[2]+"%"),i.push(a)}for(r=1,n=i.length-1;r<n;r++)if(!i[r].offset){for(var o=Z(i[r-1].offset||0),c=0,l=r+1;l<n;l++)if(i[l].offset){c=i[l].offset;break}c||(c=100,l=n);for(var h=((c=Z(c))-o)/(l-r+1);r<l;r++)o+=h,i[r].offset=o+"%"}return i}),e._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),Lt=(e._tofront=function(t,e){e.top!==t&&(Pt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},e._toback=function(t,e){e.bottom!==t&&(Pt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},e._insertafter=function(t,e,i){Pt(t,i),e==i.top&&(i.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},e._insertbefore=function(t,e,i){Pt(t,i),e==i.bottom&&(i.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},e.toMatrix=function(t,e){var i=At(t),r={_:{transform:M},getBBox:function(){return i}};return Dt(r,e),r.matrix}),Dt=(e.transformPath=function(t,e){return dt(t,Lt(t,e))},e._extractTransform=function(t,i){if(null==i)return t._.transform;i=B(i).replace(/\.{3}|\u2026/g,t._.transform||M);var r,n,a=e.parseTransformString(i),s=0,o=1,c=1,l=t._,h=new u;if(l.transform=a||[],a)for(var f=0,d=a.length;f<d;f++){var p,m,g,v,b,y=a[f],x=y.length,w=B(y[0]).toLowerCase(),k=y[0]!=w,A=k?h.invert():0;"t"==w&&3==x?k?(p=A.x(0,0),m=A.y(0,0),g=A.x(y[1],y[2]),v=A.y(y[1],y[2]),h.translate(g-p,v-m)):h.translate(y[1],y[2]):"r"==w?2==x?(b=b||t.getBBox(1),h.rotate(y[1],b.x+b.width/2,b.y+b.height/2),s+=y[1]):4==x&&(k?(g=A.x(y[2],y[3]),v=A.y(y[2],y[3]),h.rotate(y[1],g,v)):h.rotate(y[1],y[2],y[3]),s+=y[1]):"s"==w?2==x||3==x?(b=b||t.getBBox(1),h.scale(y[1],y[x-1],b.x+b.width/2,b.y+b.height/2),o*=y[1],c*=y[x-1]):5==x&&(k?(g=A.x(y[3],y[4]),v=A.y(y[3],y[4]),h.scale(y[1],y[2],g,v)):h.scale(y[1],y[2],y[3],y[4]),o*=y[1],c*=y[2]):"m"==w&&7==x&&h.add(y[1],y[2],y[3],y[4],y[5],y[6]),l.dirtyT=1,t.matrix=h}t.matrix=h,l.sx=o,l.sy=c,l.deg=s,l.dx=r=h.e,l.dy=n=h.f,1==o&&1==c&&!s&&l.bbox?(l.bbox.x+=+r,l.bbox.y+=+n):l.dirtyT=1}),Ht=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},zt=e._equaliseTransform=function(t,i){i=B(i).replace(/\.{3}|\u2026/g,t),t=e.parseTransformString(t)||[],i=e.parseTransformString(i)||[];for(var r,n,a,s,o=z(t.length,i.length),c=[],l=[],h=0;h<o;h++){if(a=t[h]||Ht(i[h]),s=i[h]||Ht(a),a[0]!=s[0]||"r"==a[0].toLowerCase()&&(a[2]!=s[2]||a[3]!=s[3])||"s"==a[0].toLowerCase()&&(a[3]!=s[3]||a[4]!=s[4]))return;for(c[h]=[],l[h]=[],r=0,n=z(a.length,s.length);r<n;r++)r in a&&(c[h][r]=a[r]),r in s&&(l[h][r]=s[r])}return{from:c,to:l}};e._getContainer=function(t,i,r,n){var a;if(null!=(a=null!=n||e.is(t,"object")?t:A.doc.getElementById(t)))return a.tagName?null==i?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:i,height:r}:{container:1,x:t,y:i,width:r,height:n}},e.pathToRelative=St,e._engine={},e.path2curve=Et,e.matrix=function(t,e,i,r,n,a){return new u(t,e,i,r,n,a)},function(t){function i(t){return t[0]*t[0]+t[1]*t[1]}function r(t){var e=H.sqrt(i(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}t.add=function(t,e,i,r,n,a){var s,o,c,l,h=[[],[],[]],f=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],d=[[t,i,n],[e,r,a],[0,0,1]];for(t&&t instanceof u&&(d=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;s<3;s++)for(o=0;o<3;o++){for(l=0,c=0;c<3;c++)l+=f[s][c]*d[c][o];h[s][o]=l}this.a=h[0][0],this.b=h[1][0],this.c=h[0][1],this.d=h[1][1],this.e=h[0][2],this.f=h[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new u(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new u(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,i,r){null==e&&(e=t),(i||r)&&this.add(1,0,0,1,i,r),this.add(t,0,0,e,0,0),(i||r)&&this.add(1,0,0,1,-i,-r)},t.rotate=function(t,i,r){t=e.rad(t),i=i||0,r=r||0;var n=+H.cos(t).toFixed(9),a=+H.sin(t).toFixed(9);this.add(n,a,-a,n,i,r),this.add(1,0,0,1,-i,-r)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[B.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return e.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()},t.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')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var n=[[this.a,this.c],[this.b,this.d]];t.scalex=H.sqrt(i(n[0])),r(n[0]),t.shear=n[0][0]*n[1][0]+n[0][1]*n[1][1],n[1]=[n[1][0]-n[0][0]*t.shear,n[1][1]-n[0][1]*t.shear],t.scaley=H.sqrt(i(n[1])),r(n[1]),t.shear/=t.scaley;var a=-n[0][1],s=n[1][1];return s<0?(t.rotate=e.deg(H.acos(s)),a<0&&(t.rotate=360-t.rotate)):t.rotate=e.deg(H.asin(a)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[E]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:M)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:M)+(e.rotate?"r"+[e.rotate,0,0]:M)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(u.prototype);for(var Vt=function(){this.returnValue=!1},Ft=function(){return this.originalEvent.preventDefault()},Ot=function(){this.cancelBubble=!0},qt=function(){return this.originalEvent.stopPropagation()},jt=function(t){var e=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,i=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft;return{x:t.clientX+i,y:t.clientY+e}},Rt=A.doc.addEventListener?function(t,e,i,r){var n=function(t){var e=jt(t);return i.call(r,t,e.x,e.y)};if(t.addEventListener(e,n,!1),N&&L[e]){var a=function(e){for(var n=jt(e),a=e,s=0,o=e.targetTouches&&e.targetTouches.length;s<o;s++)if(e.targetTouches[s].target==t){(e=e.targetTouches[s]).originalEvent=a,e.preventDefault=Ft,e.stopPropagation=qt;break}return i.call(r,e,n.x,n.y)};t.addEventListener(L[e],a,!1)}return function(){return t.removeEventListener(e,n,!1),N&&L[e]&&t.removeEventListener(L[e],a,!1),!0}}:A.doc.attachEvent?function(t,e,i,r){var n=function(t){t=t||A.win.event;var e=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,n=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft,a=t.clientX+n,s=t.clientY+e;return t.preventDefault=t.preventDefault||Vt,t.stopPropagation=t.stopPropagation||Ot,i.call(r,t,a,s)};return t.attachEvent("on"+e,n),function(){return t.detachEvent("on"+e,n),!0}}:void 0,Ut=[],Yt=function(e){for(var i,r=e.clientX,n=e.clientY,a=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,s=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft,o=Ut.length;o--;){if(i=Ut[o],N&&e.touches){for(var c,l=e.touches.length;l--;)if((c=e.touches[l]).identifier==i.el._drag.id){r=c.clientX,n=c.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var h,u=i.el.node,f=u.nextSibling,d=u.parentNode,p=u.style.display;A.win.opera&&d.removeChild(u),u.style.display="none",h=i.el.paper.getElementByPoint(r,n),u.style.display=p,A.win.opera&&(f?d.insertBefore(u,f):d.appendChild(u)),h&&t("raphael.drag.over."+i.el.id,i.el,h),r+=s,n+=a,t("raphael.drag.move."+i.el.id,i.move_scope||i.el,r-i.el._drag.x,n-i.el._drag.y,r,n,e)}},Wt=function(i){e.unmousemove(Yt).unmouseup(Wt);for(var r,n=Ut.length;n--;)(r=Ut[n]).el._drag={},t("raphael.drag.end."+r.el.id,r.end_scope||r.start_scope||r.move_scope||r.el,i);Ut=[]},Gt=e.el={},Xt=P.length;Xt--;)!function(t){e[t]=Gt[t]=function(i,r){return e.is(i,"function")&&(this.events=this.events||[],this.events.push({name:t,f:i,unbind:Rt(this.shape||this.node||A.doc,t,i,r||this)})),this},e["un"+t]=Gt["un"+t]=function(i){for(var r=this.events||[],n=r.length;n--;)r[n].name!=t||!e.is(i,"undefined")&&r[n].f!=i||(r[n].unbind(),r.splice(n,1),!r.length&&delete this.events);return this}}(P[Xt]);Gt.data=function(i,r){var n=ot[this.id]=ot[this.id]||{};if(0==arguments.length)return n;if(1==arguments.length){if(e.is(i,"object")){for(var a in i)i[k](a)&&this.data(a,i[a]);return this}return t("raphael.data.get."+this.id,this,n[i],i),n[i]}return n[i]=r,t("raphael.data.set."+this.id,this,r,i),this},Gt.removeData=function(t){return null==t?ot[this.id]={}:ot[this.id]&&delete ot[this.id][t],this},Gt.getData=function(){return i(ot[this.id]||{})},Gt.hover=function(t,e,i,r){return this.mouseover(t,i).mouseout(e,r||i)},Gt.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var Kt=[];Gt.drag=function(i,r,n,a,s,o){function c(c){(c.originalEvent||c).preventDefault();var l=c.clientX,h=c.clientY,u=A.doc.documentElement.scrollTop||A.doc.body.scrollTop,f=A.doc.documentElement.scrollLeft||A.doc.body.scrollLeft;if(this._drag.id=c.identifier,N&&c.touches)for(var d,p=c.touches.length;p--;)if(d=c.touches[p],this._drag.id=d.identifier,d.identifier==this._drag.id){l=d.clientX,h=d.clientY;break}this._drag.x=l+f,this._drag.y=h+u,!Ut.length&&e.mousemove(Yt).mouseup(Wt),Ut.push({el:this,move_scope:a,start_scope:s,end_scope:o}),r&&t.on("raphael.drag.start."+this.id,r),i&&t.on("raphael.drag.move."+this.id,i),n&&t.on("raphael.drag.end."+this.id,n),t("raphael.drag.start."+this.id,s||a||this,c.clientX+f,c.clientY+u,c)}return this._drag={},Kt.push({el:this,start:c}),this.mousedown(c),this},Gt.onDragOver=function(e){e?t.on("raphael.drag.over."+this.id,e):t.unbind("raphael.drag.over."+this.id)},Gt.undrag=function(){for(var i=Kt.length;i--;)Kt[i].el==this&&(this.unmousedown(Kt[i].start),Kt.splice(i,1),t.unbind("raphael.drag.*."+this.id));!Kt.length&&e.unmousemove(Yt).unmouseup(Wt),Ut=[]},b.circle=function(t,i,r){var n=e._engine.circle(this,t||0,i||0,r||0);return this.__set__&&this.__set__.push(n),n},b.rect=function(t,i,r,n,a){var s=e._engine.rect(this,t||0,i||0,r||0,n||0,a||0);return this.__set__&&this.__set__.push(s),s},b.ellipse=function(t,i,r,n){var a=e._engine.ellipse(this,t||0,i||0,r||0,n||0);return this.__set__&&this.__set__.push(a),a},b.path=function(t){t&&!e.is(t,R)&&!e.is(t[0],U)&&(t+=M);var i=e._engine.path(e.format[T](e,arguments),this);return this.__set__&&this.__set__.push(i),i},b.image=function(t,i,r,n,a){var s=e._engine.image(this,t||"about:blank",i||0,r||0,n||0,a||0);return this.__set__&&this.__set__.push(s),s},b.text=function(t,i,r){var n=e._engine.text(this,t||0,i||0,B(r));return this.__set__&&this.__set__.push(n),n},b.set=function(t){!e.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var i=new se(t);return this.__set__&&this.__set__.push(i),i.paper=this,i.type="set",i},b.setStart=function(t){this.__set__=t||this.set()},b.setFinish=function(t){var e=this.__set__;return delete this.__set__,e},b.getSize=function(){var t=this.canvas.parentNode;return{width:t.offsetWidth,height:t.offsetHeight}},b.setSize=function(t,i){return e._engine.setSize.call(this,t,i)},b.setViewBox=function(t,i,r,n,a){return e._engine.setViewBox.call(this,t,i,r,n,a)},b.top=b.bottom=null,b.raphael=e;b.getElementByPoint=function(t,e){var i=this,r=i.canvas,n=A.doc.elementFromPoint(t,e);if(A.win.opera&&"svg"==n.tagName){var a=function(t){var e=t.getBoundingClientRect(),i=t.ownerDocument,r=i.body,n=i.documentElement,a=n.clientTop||r.clientTop||0,s=n.clientLeft||r.clientLeft||0;return{y:e.top+(A.win.pageYOffset||n.scrollTop||r.scrollTop)-a,x:e.left+(A.win.pageXOffset||n.scrollLeft||r.scrollLeft)-s}}(r),s=r.createSVGRect();s.x=t-a.x,s.y=e-a.y,s.width=s.height=1;var o=r.getIntersectionList(s,null);o.length&&(n=o[o.length-1])}if(!n)return null;for(;n.parentNode&&n!=r.parentNode&&!n.raphael;)n=n.parentNode;return n==i.canvas.parentNode&&(n=r),n&&n.raphael?i.getById(n.raphaelid):null},b.getElementsByBBox=function(t){var i=this.set();return this.forEach(function(r){e.isBBoxIntersect(r.getBBox(),t)&&i.push(r)}),i},b.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},b.forEach=function(t,e){for(var i=this.bottom;i;){if(!1===t.call(e,i))return this;i=i.next}return this},b.getElementsByPoint=function(t,e){var i=this.set();return this.forEach(function(r){r.isPointInside(t,e)&&i.push(r)}),i},Gt.isPointInside=function(t,i){var r=this.realPath=ft[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(r=e.transformPath(r,this.attr("transform"))),e.isPointInsidePath(r,t,i)},Gt.getBBox=function(t){if(this.removed)return{};var e=this._;return t?(!e.dirty&&e.bboxwt||(this.realPath=ft[this.type](this),e.bboxwt=At(this.realPath),e.bboxwt.toString=f,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&(!e.dirty&&this.realPath||(e.bboxwt=0,this.realPath=ft[this.type](this)),e.bbox=At(dt(this.realPath,this.matrix)),e.bbox.toString=f,e.dirty=e.dirtyT=0),e.bbox)},Gt.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Gt.glow=function(t){if("text"==this.type)return null;var e={width:((t=t||{}).width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:null==t.opacity?.5:t.opacity,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},i=e.width/2,r=this.paper,n=r.set(),a=this.realPath||ft[this.type](this);a=this.matrix?dt(a,this.matrix):a;for(var s=1;s<i+1;s++)n.push(r.path(a).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/i*s).toFixed(3),opacity:+(e.opacity/i).toFixed(3)}));return n.insertBefore(this).translate(e.offsetx,e.offsety)};var Zt=function(t,i,r,n,a,s,c,l,h){return null==h?o(t,i,r,n,a,s,c,l):e.findDotsAtSegment(t,i,r,n,a,s,c,l,function(t,e,i,r,n,a,s,c,l){if(!(l<0||o(t,e,i,r,n,a,s,c)<l)){var h,u=.5,f=1-u;for(h=o(t,e,i,r,n,a,s,c,f);F(h-l)>.01;)u/=2,h=o(t,e,i,r,n,a,s,c,f+=(h<l?1:-1)*u);return f}}(t,i,r,n,a,s,c,l,h))},Qt=function(t,i){return function(r,n,a){for(var s,o,c,l,h,u="",f={},d=0,p=0,m=(r=Et(r)).length;p<m;p++){if("M"==(c=r[p])[0])s=+c[1],o=+c[2];else{if(d+(l=Zt(s,o,c[1],c[2],c[3],c[4],c[5],c[6]))>n){if(i&&!f.start){if(u+=["C"+(h=Zt(s,o,c[1],c[2],c[3],c[4],c[5],c[6],n-d)).start.x,h.start.y,h.m.x,h.m.y,h.x,h.y],a)return u;f.start=u,u=["M"+h.x,h.y+"C"+h.n.x,h.n.y,h.end.x,h.end.y,c[5],c[6]].join(),d+=l,s=+c[5],o=+c[6];continue}if(!t&&!i)return{x:(h=Zt(s,o,c[1],c[2],c[3],c[4],c[5],c[6],n-d)).x,y:h.y,alpha:h.alpha}}d+=l,s=+c[5],o=+c[6]}u+=c.shift()+c}return f.end=u,(h=t?d:i?f:e.findDotsAtSegment(s,o,c[0],c[1],c[2],c[3],c[4],c[5],1)).alpha&&(h={x:h.x,y:h.y,alpha:h.alpha}),h}},Jt=Qt(1),$t=Qt(),te=Qt(0,1);e.getTotalLength=Jt,e.getPointAtLength=$t,e.getSubpath=function(t,e,i){if(this.getTotalLength(t)-i<1e-6)return te(t,e).end;var r=te(t,i,1);return e?te(r,e).end:r},Gt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():Jt(t)},Gt.getPointAtLength=function(t){var e=this.getPath();if(e)return $t(e,t)},Gt.getPath=function(){var t,i=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return i&&(t=i(this)),t},Gt.getSubpath=function(t,i){var r=this.getPath();if(r)return e.getSubpath(r,t,i)};var ee=e.easing_formulas={linear:function(t){return t},"<":function(t){return O(t,1.7)},">":function(t){return O(t,.48)},"<>":function(t){var e=.48-t/1.04,i=H.sqrt(.1734+e*e),r=i-e,n=-i-e,a=O(F(r),1/3)*(r<0?-1:1)+O(F(n),1/3)*(n<0?-1:1)+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:O(2,-10*t)*H.sin(2*q*(t-.075)/.3)+1},bounce:function(t){var e,i=7.5625,r=2.75;return t<1/r?e=i*t*t:t<2/r?e=i*(t-=1.5/r)*t+.75:t<2.5/r?e=i*(t-=2.25/r)*t+.9375:e=i*(t-=2.625/r)*t+.984375,e}};ee.easeIn=ee["ease-in"]=ee["<"],ee.easeOut=ee["ease-out"]=ee[">"],ee.easeInOut=ee["ease-in-out"]=ee["<>"],ee["back-in"]=ee.backIn,ee["back-out"]=ee.backOut;var ie=[],re=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ne=function(){for(var i=+new Date,r=0;r<ie.length;r++){var n=ie[r];if(!n.el.removed&&!n.paused){var a,s,o=i-n.start,c=n.ms,l=n.easing,h=n.from,u=n.diff,f=n.to,d=(n.t,n.el),p={},g={};if(n.initstatus?(o=(n.initstatus*n.anim.top-n.prev)/(n.percent-n.prev)*c,n.status=n.initstatus,delete n.initstatus,n.stop&&ie.splice(r--,1)):n.status=(n.prev+(n.percent-n.prev)*(o/c))/n.anim.top,!(o<0))if(o<c){var v=l(o/c);for(var b in h)if(h[k](b)){switch(tt[b]){case j:a=+h[b]+v*c*u[b];break;case"colour":a="rgb("+[ae(K(h[b].r+v*c*u[b].r)),ae(K(h[b].g+v*c*u[b].g)),ae(K(h[b].b+v*c*u[b].b))].join(",")+")";break;case"path":a=[];for(var y=0,x=h[b].length;y<x;y++){a[y]=[h[b][y][0]];for(var w=1,A=h[b][y].length;w<A;w++)a[y][w]=+h[b][y][w]+v*c*u[b][y][w];a[y]=a[y].join(I)}a=a.join(I);break;case"transform":if(u[b].real)for(a=[],y=0,x=h[b].length;y<x;y++)for(a[y]=[h[b][y][0]],w=1,A=h[b][y].length;w<A;w++)a[y][w]=h[b][y][w]+v*c*u[b][y][w];else{var _=function(t){return+h[b][t]+v*c*u[b][t]};a=[["m",_(0),_(1),_(2),_(3),_(4),_(5)]]}break;case"csv":if("clip-rect"==b)for(a=[],y=4;y--;)a[y]=+h[b][y]+v*c*u[b][y];break;default:var S=[][C](h[b]);for(a=[],y=d.paper.customAttributes[b].length;y--;)a[y]=+S[y]+v*c*u[b][y]}p[b]=a}d.attr(p),function(e,i,r){setTimeout(function(){t("raphael.anim.frame."+e,i,r)})}(d.id,d,n.anim)}else{if(function(i,r,n){setTimeout(function(){t("raphael.anim.frame."+r.id,r,n),t("raphael.anim.finish."+r.id,r,n),e.is(i,"function")&&i.call(r)})}(n.callback,d,n.anim),d.attr(f),ie.splice(r--,1),n.repeat>1&&!n.next){for(s in f)f[k](s)&&(g[s]=n.totalOrigin[s]);n.el.attr(g),m(n.anim,n.el,n.anim.percents[0],null,n.totalOrigin,n.repeat-1)}n.next&&!n.stop&&m(n.anim,n.el,n.next,null,n.totalOrigin,n.repeat)}}}ie.length&&re(ne)},ae=function(t){return t>255?255:t<0?0:t};Gt.animateWith=function(t,i,r,n,a,s){var o=this;if(o.removed)return s&&s.call(o),o;var c=r instanceof p?r:e.animation(r,n,a,s);m(c,o,c.percents[0],null,o.attr());for(var l=0,h=ie.length;l<h;l++)if(ie[l].anim==i&&ie[l].el==t){ie[h-1].start=ie[l].start;break}return o},Gt.onAnimation=function(e){return e?t.on("raphael.anim.frame."+this.id,e):t.unbind("raphael.anim.frame."+this.id),this},p.prototype.delay=function(t){var e=new p(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},p.prototype.repeat=function(t){var e=new p(this.anim,this.ms);return e.del=this.del,e.times=H.floor(z(t,0))||1,e},e.animation=function(t,i,r,n){if(t instanceof p)return t;!e.is(r,"function")&&r||(n=n||r||null,r=null),t=Object(t),i=+i||0;var a,s,o={};for(s in t)t[k](s)&&Z(s)!=s&&Z(s)+"%"!=s&&(a=!0,o[s]=t[s]);if(a)return r&&(o.easing=r),n&&(o.callback=n),new p({100:o},i);if(n){var c=0;for(var l in t){var h=Q(l);t[k](l)&&h>c&&(c=h)}!t[c+="%"].callback&&(t[c].callback=n)}return new p(t,i)},Gt.animate=function(t,i,r,n){var a=this;if(a.removed)return n&&n.call(a),a;var s=t instanceof p?t:e.animation(t,i,r,n);return m(s,a,s.percents[0],null,a.attr()),a},Gt.setTime=function(t,e){return t&&null!=e&&this.status(t,V(e,t.ms)/t.ms),this},Gt.status=function(t,e){var i,r,n=[],a=0;if(null!=e)return m(t,this,-1,V(e,1)),this;for(i=ie.length;a<i;a++)if((r=ie[a]).el.id==this.id&&(!t||r.anim==t)){if(t)return r.status;n.push({anim:r.anim,status:r.status})}return t?0:n},Gt.pause=function(e){for(var i=0;i<ie.length;i++)ie[i].el.id!=this.id||e&&ie[i].anim!=e||!1!==t("raphael.anim.pause."+this.id,this,ie[i].anim)&&(ie[i].paused=!0);return this},Gt.resume=function(e){for(var i=0;i<ie.length;i++)if(ie[i].el.id==this.id&&(!e||ie[i].anim==e)){var r=ie[i];!1!==t("raphael.anim.resume."+this.id,this,r.anim)&&(delete r.paused,this.status(r.anim,r.status))}return this},Gt.stop=function(e){for(var i=0;i<ie.length;i++)ie[i].el.id!=this.id||e&&ie[i].anim!=e||!1!==t("raphael.anim.stop."+this.id,this,ie[i].anim)&&ie.splice(i--,1);return this},t.on("raphael.remove",g),t.on("raphael.clear",g),Gt.toString=function(){return"Raphaël’s object"};var se=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,i=t.length;e<i;e++)!t[e]||t[e].constructor!=Gt.constructor&&t[e].constructor!=se||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},oe=se.prototype;for(var ce in oe.push=function(){for(var t,e,i=0,r=arguments.length;i<r;i++)!(t=arguments[i])||t.constructor!=Gt.constructor&&t.constructor!=se||(this[e=this.items.length]=this.items[e]=t,this.length++);return this},oe.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},oe.forEach=function(t,e){for(var i=0,r=this.items.length;i<r;i++)if(!1===t.call(e,this.items[i],i))return this;return this},Gt)Gt[k](ce)&&(oe[ce]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t][T](i,e)})}}(ce));return oe.attr=function(t,i){if(t&&e.is(t,U)&&e.is(t[0],"object"))for(var r=0,n=t.length;r<n;r++)this.items[r].attr(t[r]);else for(var a=0,s=this.items.length;a<s;a++)this.items[a].attr(t,i);return this},oe.clear=function(){for(;this.length;)this.pop()},oe.splice=function(t,e,i){t=t<0?z(this.length+t,0):t,e=z(0,V(this.length-t,e));var r,n=[],a=[],s=[];for(r=2;r<arguments.length;r++)s.push(arguments[r]);for(r=0;r<e;r++)a.push(this[t+r]);for(;r<this.length-t;r++)n.push(this[t+r]);var o=s.length;for(r=0;r<o+n.length;r++)this.items[t+r]=this[t+r]=r<o?s[r]:n[r-o];for(r=this.items.length=this.length-=e-o;this[r];)delete this[r++];return new se(a)},oe.exclude=function(t){for(var e=0,i=this.length;e<i;e++)if(this[e]==t)return this.splice(e,1),!0},oe.animate=function(t,i,r,n){(e.is(r,"function")||!r)&&(n=r||null);var a,s,o=this.items.length,c=o,l=this;if(!o)return this;n&&(s=function(){!--o&&n.call(l)}),r=e.is(r,R)?r:s;var h=e.animation(t,i,r,s);for(a=this.items[--c].animate(h);c--;)this.items[c]&&!this.items[c].removed&&this.items[c].animateWith(a,h,h),this.items[c]&&!this.items[c].removed||o--;return this},oe.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},oe.getBBox=function(){for(var t=[],e=[],i=[],r=[],n=this.items.length;n--;)if(!this.items[n].removed){var a=this.items[n].getBBox();t.push(a.x),e.push(a.y),i.push(a.x+a.width),r.push(a.y+a.height)}return{x:t=V[T](0,t),y:e=V[T](0,e),x2:i=z[T](0,i),y2:r=z[T](0,r),width:i-t,height:r-e}},oe.clone=function(t){t=this.paper.set();for(var e=0,i=this.items.length;e<i;e++)t.push(this.items[e].clone());return t},oe.toString=function(){return"Raphaël‘s set"},oe.glow=function(t){var e=this.paper.set();return this.forEach(function(i,r){var n=i.glow(t);null!=n&&n.forEach(function(t,i){e.push(t)})}),e},oe.isPointInside=function(t,e){var i=!1;return this.forEach(function(r){if(r.isPointInside(t,e))return i=!0,!1}),i},e.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},i=t.face["font-family"];for(var r in t.face)t.face[k](r)&&(e.face[r]=t.face[r]);if(this.fonts[i]?this.fonts[i].push(e):this.fonts[i]=[e],!t.svg)for(var n in e.face["units-per-em"]=Q(t.face["units-per-em"],10),t.glyphs)if(t.glyphs[k](n)){var a=t.glyphs[n];if(e.glyphs[n]={w:a.w,k:{},d:a.d&&"M"+a.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},a.k)for(var s in a.k)a[k](s)&&(e.glyphs[n].k[s]=a.k[s])}return t},b.getFont=function(t,i,r,n){if(n=n||"normal",r=r||"normal",i=+i||{normal:400,bold:700,lighter:300,bolder:800}[i]||400,e.fonts){var a,s=e.fonts[t];if(!s){var o=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,M)+"(\\s|$)","i");for(var c in e.fonts)if(e.fonts[k](c)&&o.test(c)){s=e.fonts[c];break}}if(s)for(var l=0,h=s.length;l<h&&((a=s[l]).face["font-weight"]!=i||a.face["font-style"]!=r&&a.face["font-style"]||a.face["font-stretch"]!=n);l++);return a}},b.print=function(t,i,r,n,a,s,o,c){s=s||"middle",o=z(V(o||0,1),-1),c=z(V(c||1,3),1);var l,h=B(r)[E](M),u=0,f=0,d=M;if(e.is(n,"string")&&(n=this.getFont(n)),n){l=(a||16)/n.face["units-per-em"];for(var p=n.face.bbox[E](y),m=+p[0],g=p[3]-p[1],v=0,b=+p[1]+("baseline"==s?g+ +n.face.descent:g/2),x=0,w=h.length;x<w;x++){if("\n"==h[x])u=0,A=0,f=0,v+=g*c;else{var k=f&&n.glyphs[h[x-1]]||{},A=n.glyphs[h[x]];u+=f?(k.w||n.w)+(k.k&&k.k[h[x]]||0)+n.w*o:0,f=1}A&&A.d&&(d+=e.transformPath(A.d,["t",u*l,v*l,"s",l,l,m,b,"t",(t-m)/l,(i-b)/l]))}}return this.path(d).attr({fill:"#000",stroke:"none"})},b.add=function(t){if(e.is(t,"array"))for(var i,r=this.set(),n=0,a=t.length;n<a;n++)i=t[n]||{},x[k](i.type)&&r.push(this[i.type]().attr(i));return r},e.format=function(t,i){var r=e.is(i,U)?[0][C](i):arguments;return t&&e.is(t,R)&&r.length-1&&(t=t.replace(w,function(t,e){return null==r[++e]?M:r[e]})),t||M},e.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,i=function(t,i,r){var n=r;return i.replace(e,function(t,e,i,r,a){e=e||r,n&&(e in n&&(n=n[e]),"function"==typeof n&&a&&(n=n()))}),n=(null==n||n==r?t:n)+""};return function(e,r){return String(e).replace(t,function(t,e){return i(t,e,r)})}}(),e.ninja=function(){if(_.was)A.win.Raphael=_.is;else{window.Raphael=void 0;try{delete window.Raphael}catch(t){}}return e},e.st=oe,t.on("raphael.DOMload",function(){v=!0}),function(t,i,r){null==t.readyState&&t.addEventListener&&(t.addEventListener(i,r=function(){t.removeEventListener(i,r,!1),t.readyState="complete"},!1),t.readyState="loading"),function i(){/in/.test(t.readyState)?setTimeout(i,9):e.eve("raphael.DOMload")}()}(document,"DOMContentLoaded"),e}.apply(e,r))||(t.exports=n)},function(t,e,i){var r,n,a,s,o,c,l,h,u,f,d,p,m,g;s="0.5.0",o="hasOwnProperty",c=/[\.\/]/,l=/\s*,\s*/,h=function(t,e){return t-e},u={n:{}},f=function(){for(var t=0,e=this.length;t<e;t++)if(void 0!==this[t])return this[t]},d=function(){for(var t=this.length;--t;)if(void 0!==this[t])return this[t]},p=Object.prototype.toString,m=String,g=Array.isArray||function(t){return t instanceof Array||"[object Array]"==p.call(t)},eve=function(t,e){var i,r=a,s=Array.prototype.slice.call(arguments,2),o=eve.listeners(t),c=0,l=[],u={},p=[],m=n;p.firstDefined=f,p.lastDefined=d,n=t,a=0;for(var g=0,v=o.length;g<v;g++)"zIndex"in o[g]&&(l.push(o[g].zIndex),o[g].zIndex<0&&(u[o[g].zIndex]=o[g]));for(l.sort(h);l[c]<0;)if(i=u[l[c++]],p.push(i.apply(e,s)),a)return a=r,p;for(g=0;g<v;g++)if("zIndex"in(i=o[g]))if(i.zIndex==l[c]){if(p.push(i.apply(e,s)),a)break;do{if((i=u[l[++c]])&&p.push(i.apply(e,s)),a)break}while(i)}else u[i.zIndex]=i;else if(p.push(i.apply(e,s)),a)break;return a=r,n=m,p},eve._events=u,eve.listeners=function(t){var e,i,r,n,a,s,o,l,h=g(t)?t:t.split(c),f=u,d=[f],p=[];for(n=0,a=h.length;n<a;n++){for(l=[],s=0,o=d.length;s<o;s++)for(i=[(f=d[s].n)[h[n]],f["*"]],r=2;r--;)(e=i[r])&&(l.push(e),p=p.concat(e.f||[]));d=l}return p},eve.separator=function(t){t?(t="["+(t=m(t).replace(/(?=[\.\^\]\[\-])/g,"\\"))+"]",c=new RegExp(t)):c=/[\.\/]/},eve.on=function(t,e){if("function"!=typeof e)return function(){};for(var i=g(t)?g(t[0])?t:[t]:m(t).split(l),r=0,n=i.length;r<n;r++)!function(t){for(var i,r=g(t)?t:m(t).split(c),n=u,a=0,s=r.length;a<s;a++)n=(n=n.n).hasOwnProperty(r[a])&&n[r[a]]||(n[r[a]]={n:{}});for(n.f=n.f||[],a=0,s=n.f.length;a<s;a++)if(n.f[a]==e){i=!0;break}!i&&n.f.push(e)}(i[r]);return function(t){+t==+t&&(e.zIndex=+t)}},eve.f=function(t){var e=[].slice.call(arguments,1);return function(){eve.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},eve.stop=function(){a=1},eve.nt=function(t){var e=g(n)?n.join("."):n;return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},eve.nts=function(){return g(n)?n:n.split(c)},eve.off=eve.unbind=function(t,e){if(t){var i=g(t)?g(t[0])?t:[t]:m(t).split(l);if(i.length>1)for(var r=0,n=i.length;r<n;r++)eve.off(i[r],e);else{i=g(t)?t:m(t).split(c);var a,s,h,f,d,p=[u];for(r=0,n=i.length;r<n;r++)for(f=0;f<p.length;f+=h.length-2){if(h=[f,1],a=p[f].n,"*"!=i[r])a[i[r]]&&h.push(a[i[r]]);else for(s in a)a[o](s)&&h.push(a[s]);p.splice.apply(p,h)}for(r=0,n=p.length;r<n;r++)for(a=p[r];a.n;){if(e){if(a.f){for(f=0,d=a.f.length;f<d;f++)if(a.f[f]==e){a.f.splice(f,1);break}!a.f.length&&delete a.f}for(s in a.n)if(a.n[o](s)&&a.n[s].f){var v=a.n[s].f;for(f=0,d=v.length;f<d;f++)if(v[f]==e){v.splice(f,1);break}!v.length&&delete a.n[s].f}}else for(s in delete a.f,a.n)a.n[o](s)&&a.n[s].f&&delete a.n[s].f;a=a.n}}}else eve._events=u={n:{}}},eve.once=function(t,e){var i=function(){return eve.off(t,i),e.apply(this,arguments)};return eve.on(t,i)},eve.version=s,eve.toString=function(){return"You are running Eve "+s},void 0!==t&&t.exports?t.exports=eve:void 0===(r=function(){return eve}.apply(e,[]))||(t.exports=r)},function(t,e,i){var r,n;r=[i(1)],void 0===(n=function(t){if(!t||t.svg){var e="hasOwnProperty",i=String,r=parseFloat,n=parseInt,a=Math,s=a.max,o=a.abs,c=a.pow,l=/[, ]+/,h=t.eve,u="",f=" ",d="http://www.w3.org/1999/xlink",p={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"},m={};t.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var g=function(r,n){if(n)for(var a in"string"==typeof r&&(r=g(r)),n)n[e](a)&&("xlink:"==a.substring(0,6)?r.setAttributeNS(d,a.substring(6),i(n[a])):r.setAttribute(a,i(n[a])));else(r=t._g.doc.createElementNS("http://www.w3.org/2000/svg",r)).style&&(r.style.webkitTapHighlightColor="rgba(0,0,0,0)");return r},v=function(e,n){var l="linear",h=e.id+n,f=.5,d=.5,p=e.node,m=e.paper,v=p.style,y=t._g.doc.getElementById(h);if(!y){if(n=(n=i(n).replace(t._radial_gradient,function(t,e,i){if(l="radial",e&&i){f=r(e);var n=2*((d=r(i))>.5)-1;c(f-.5,2)+c(d-.5,2)>.25&&(d=a.sqrt(.25-c(f-.5,2))*n+.5)&&.5!=d&&(d=d.toFixed(5)-1e-5*n)}return u})).split(/\s*\-\s*/),"linear"==l){var x=n.shift();if(x=-r(x),isNaN(x))return null;var w=[0,0,a.cos(t.rad(x)),a.sin(t.rad(x))],k=1/(s(o(w[2]),o(w[3]))||1);w[2]*=k,w[3]*=k,w[2]<0&&(w[0]=-w[2],w[2]=0),w[3]<0&&(w[1]=-w[3],w[3]=0)}var A=t._parseDots(n);if(!A)return null;if(h=h.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&h!=e.gradient.id&&(m.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){y=g(l+"Gradient",{id:h}),e.gradient=y,g(y,"radial"==l?{fx:f,fy:d}:{x1:w[0],y1:w[1],x2:w[2],y2:w[3],gradientTransform:e.matrix.invert()}),m.defs.appendChild(y);for(var _=0,S=A.length;_<S;_++)y.appendChild(g("stop",{offset:A[_].offset?A[_].offset:_?"100%":"0%","stop-color":A[_].color||"#fff","stop-opacity":isFinite(A[_].opacity)?A[_].opacity:1}))}}return g(p,{fill:b(h),opacity:1,"fill-opacity":1}),v.fill=u,v.opacity=1,v.fillOpacity=1,1},b=function(t){if(function(){var t=document.documentMode;return t&&(9===t||10===t)}())return"url('#"+t+"')";var e=document.location;return"url('"+(e.protocol+"//"+e.host+e.pathname+e.search)+"#"+t+"')"},y=function(t){var e=t.getBBox(1);g(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},x=function(r,n,a){if("path"==r.type){for(var s,o,c,l,h,f=i(n).toLowerCase().split("-"),d=r.paper,v=a?"end":"start",b=r.node,y=r.attrs,x=y["stroke-width"],w=f.length,k="classic",A=3,_=3,S=5;w--;)switch(f[w]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":k=f[w];break;case"wide":_=5;break;case"narrow":_=2;break;case"long":A=5;break;case"short":A=2}if("open"==k?(A+=2,_+=2,S+=2,c=1,l=a?4:1,h={fill:"none",stroke:y.stroke}):(l=c=A/2,h={fill:y.stroke,stroke:"none"}),r._.arrows?a?(r._.arrows.endPath&&m[r._.arrows.endPath]--,r._.arrows.endMarker&&m[r._.arrows.endMarker]--):(r._.arrows.startPath&&m[r._.arrows.startPath]--,r._.arrows.startMarker&&m[r._.arrows.startMarker]--):r._.arrows={},"none"!=k){var T="raphael-marker-"+k,C="raphael-marker-"+v+k+A+_+"-obj"+r.id;t._g.doc.getElementById(T)?m[T]++:(d.defs.appendChild(g(g("path"),{"stroke-linecap":"round",d:p[k],id:T})),m[T]=1);var N,M=t._g.doc.getElementById(C);M?(m[C]++,N=M.getElementsByTagName("use")[0]):(M=g(g("marker"),{id:C,markerHeight:_,markerWidth:A,orient:"auto",refX:l,refY:_/2}),N=g(g("use"),{"xlink:href":"#"+T,transform:(a?"rotate(180 "+A/2+" "+_/2+") ":u)+"scale("+A/S+","+_/S+")","stroke-width":(1/((A/S+_/S)/2)).toFixed(4)}),M.appendChild(N),d.defs.appendChild(M),m[C]=1),g(N,h);var I=c*("diamond"!=k&&"oval"!=k);a?(s=r._.arrows.startdx*x||0,o=t.getTotalLength(y.path)-I*x):(s=I*x,o=t.getTotalLength(y.path)-(r._.arrows.enddx*x||0)),(h={})["marker-"+v]="url(#"+C+")",(o||s)&&(h.d=t.getSubpath(y.path,s,o)),g(b,h),r._.arrows[v+"Path"]=T,r._.arrows[v+"Marker"]=C,r._.arrows[v+"dx"]=I,r._.arrows[v+"Type"]=k,r._.arrows[v+"String"]=n}else a?(s=r._.arrows.startdx*x||0,o=t.getTotalLength(y.path)-s):(s=0,o=t.getTotalLength(y.path)-(r._.arrows.enddx*x||0)),r._.arrows[v+"Path"]&&g(b,{d:t.getSubpath(y.path,s,o)}),delete r._.arrows[v+"Path"],delete r._.arrows[v+"Marker"],delete r._.arrows[v+"dx"],delete r._.arrows[v+"Type"],delete r._.arrows[v+"String"];for(h in m)if(m[e](h)&&!m[h]){var B=t._g.doc.getElementById(h);B&&B.parentNode.removeChild(B)}}},w={"-":[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]},k=function(t,e,r){if(e=w[i(e).toLowerCase()]){for(var n=t.attrs["stroke-width"]||"1",a={round:n,square:n,butt:0}[t.attrs["stroke-linecap"]||r["stroke-linecap"]]||0,s=[],o=e.length;o--;)s[o]=e[o]*n+(o%2?1:-1)*a;g(t.node,{"stroke-dasharray":s.join(",")})}else g(t.node,{"stroke-dasharray":"none"})},A=function(r,a){var c=r.node,h=r.attrs,f=c.style.visibility;for(var p in c.style.visibility="hidden",a)if(a[e](p)){if(!t._availableAttrs[e](p))continue;var m=a[p];switch(h[p]=m,p){case"blur":r.blur(m);break;case"title":var b=c.getElementsByTagName("title");if(b.length&&(b=b[0]))b.firstChild.nodeValue=m;else{b=g("title");var w=t._g.doc.createTextNode(m);b.appendChild(w),c.appendChild(b)}break;case"href":case"target":var A=c.parentNode;if("a"!=A.tagName.toLowerCase()){var S=g("a");A.insertBefore(S,c),S.appendChild(c),A=S}"target"==p?A.setAttributeNS(d,"show","blank"==m?"new":m):A.setAttributeNS(d,p,m);break;case"cursor":c.style.cursor=m;break;case"transform":r.transform(m);break;case"arrow-start":x(r,m);break;case"arrow-end":x(r,m,1);break;case"clip-rect":var T=i(m).split(l);if(4==T.length){r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode);var C=g("clipPath"),N=g("rect");C.id=t.createUUID(),g(N,{x:T[0],y:T[1],width:T[2],height:T[3]}),C.appendChild(N),r.paper.defs.appendChild(C),g(c,{"clip-path":"url(#"+C.id+")"}),r.clip=N}if(!m){var M=c.getAttribute("clip-path");if(M){var I=t._g.doc.getElementById(M.replace(/(^url\(#|\)$)/g,u));I&&I.parentNode.removeChild(I),g(c,{"clip-path":u}),delete r.clip}}break;case"path":"path"==r.type&&(g(c,{d:m?h.path=t._pathToAbsolute(m):"M0,0"}),r._.dirty=1,r._.arrows&&("startString"in r._.arrows&&x(r,r._.arrows.startString),"endString"in r._.arrows&&x(r,r._.arrows.endString,1)));break;case"width":if(c.setAttribute(p,m),r._.dirty=1,!h.fx)break;p="x",m=h.x;case"x":h.fx&&(m=-h.x-(h.width||0));case"rx":if("rx"==p&&"rect"==r.type)break;case"cx":c.setAttribute(p,m),r.pattern&&y(r),r._.dirty=1;break;case"height":if(c.setAttribute(p,m),r._.dirty=1,!h.fy)break;p="y",m=h.y;case"y":h.fy&&(m=-h.y-(h.height||0));case"ry":if("ry"==p&&"rect"==r.type)break;case"cy":c.setAttribute(p,m),r.pattern&&y(r),r._.dirty=1;break;case"r":"rect"==r.type?g(c,{rx:m,ry:m}):c.setAttribute(p,m),r._.dirty=1;break;case"src":"image"==r.type&&c.setAttributeNS(d,"href",m);break;case"stroke-width":1==r._.sx&&1==r._.sy||(m/=s(o(r._.sx),o(r._.sy))||1),c.setAttribute(p,m),h["stroke-dasharray"]&&k(r,h["stroke-dasharray"],a),r._.arrows&&("startString"in r._.arrows&&x(r,r._.arrows.startString),"endString"in r._.arrows&&x(r,r._.arrows.endString,1));break;case"stroke-dasharray":k(r,m,a);break;case"fill":var B=i(m).match(t._ISURL);if(B){C=g("pattern");var E=g("image");C.id=t.createUUID(),g(C,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),g(E,{x:0,y:0,"xlink:href":B[1]}),C.appendChild(E),function(e){t._preload(B[1],function(){var t=this.offsetWidth,i=this.offsetHeight;g(e,{width:t,height:i}),g(E,{width:t,height:i})})}(C),r.paper.defs.appendChild(C),g(c,{fill:"url(#"+C.id+")"}),r.pattern=C,r.pattern&&y(r);break}var P=t.getRGB(m);if(P.error){if(("circle"==r.type||"ellipse"==r.type||"r"!=i(m).charAt())&&v(r,m)){if("opacity"in h||"fill-opacity"in h){var L=t._g.doc.getElementById(c.getAttribute("fill").replace(/^url\(#|\)$/g,u));if(L){var D=L.getElementsByTagName("stop");g(D[D.length-1],{"stop-opacity":("opacity"in h?h.opacity:1)*("fill-opacity"in h?h["fill-opacity"]:1)})}}h.gradient=m,h.fill="none";break}}else delete a.gradient,delete h.gradient,!t.is(h.opacity,"undefined")&&t.is(a.opacity,"undefined")&&g(c,{opacity:h.opacity}),!t.is(h["fill-opacity"],"undefined")&&t.is(a["fill-opacity"],"undefined")&&g(c,{"fill-opacity":h["fill-opacity"]});P[e]("opacity")&&g(c,{"fill-opacity":P.opacity>1?P.opacity/100:P.opacity});case"stroke":P=t.getRGB(m),c.setAttribute(p,P.hex),"stroke"==p&&P[e]("opacity")&&g(c,{"stroke-opacity":P.opacity>1?P.opacity/100:P.opacity}),"stroke"==p&&r._.arrows&&("startString"in r._.arrows&&x(r,r._.arrows.startString),"endString"in r._.arrows&&x(r,r._.arrows.endString,1));break;case"gradient":("circle"==r.type||"ellipse"==r.type||"r"!=i(m).charAt())&&v(r,m);break;case"opacity":h.gradient&&!h[e]("stroke-opacity")&&g(c,{"stroke-opacity":m>1?m/100:m});case"fill-opacity":if(h.gradient){(L=t._g.doc.getElementById(c.getAttribute("fill").replace(/^url\(#|\)$/g,u)))&&(D=L.getElementsByTagName("stop"),g(D[D.length-1],{"stop-opacity":m}));break}default:"font-size"==p&&(m=n(m,10)+"px");var H=p.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});c.style[H]=m,r._.dirty=1,c.setAttribute(p,m)}}_(r,a),c.style.visibility=f},_=function(r,a){if("text"==r.type&&(a[e]("text")||a[e]("font")||a[e]("font-size")||a[e]("x")||a[e]("y"))){var s=r.attrs,o=r.node,c=o.firstChild?n(t._g.doc.defaultView.getComputedStyle(o.firstChild,u).getPropertyValue("font-size"),10):10;if(a[e]("text")){for(s.text=a.text;o.firstChild;)o.removeChild(o.firstChild);for(var l,h=i(a.text).split("\n"),f=[],d=0,p=h.length;d<p;d++)l=g("tspan"),d&&g(l,{dy:1.2*c,x:s.x}),l.appendChild(t._g.doc.createTextNode(h[d])),o.appendChild(l),f[d]=l}else for(d=0,p=(f=o.getElementsByTagName("tspan")).length;d<p;d++)d?g(f[d],{dy:1.2*c,x:s.x}):g(f[0],{dy:0});g(o,{x:s.x,y:s.y}),r._.dirty=1;var m=r._getBBox(),v=s.y-(m.y+m.height/2);v&&t.is(v,"finite")&&g(f[0],{dy:v})}},S=function(t){return t.parentNode&&"a"===t.parentNode.tagName.toLowerCase()?t.parentNode:t},T=function(e,i){this[0]=this.node=e,e.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),e.raphaelid=this.id,this.matrix=t.matrix(),this.realPath=null,this.paper=i,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!i.bottom&&(i.bottom=this),this.prev=i.top,i.top&&(i.top.next=this),i.top=this,this.next=null},C=t.el;T.prototype=C,C.constructor=T,t._engine.path=function(t,e){var i=g("path");e.canvas&&e.canvas.appendChild(i);var r=new T(i,e);return r.type="path",A(r,{fill:"none",stroke:"#000",path:t}),r},C.rotate=function(t,e,n){if(this.removed)return this;if((t=i(t).split(l)).length-1&&(e=r(t[1]),n=r(t[2])),t=r(t[0]),null==n&&(e=n),null==e||null==n){var a=this.getBBox(1);e=a.x+a.width/2,n=a.y+a.height/2}return this.transform(this._.transform.concat([["r",t,e,n]])),this},C.scale=function(t,e,n,a){if(this.removed)return this;if((t=i(t).split(l)).length-1&&(e=r(t[1]),n=r(t[2]),a=r(t[3])),t=r(t[0]),null==e&&(e=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,n,a]])),this},C.translate=function(t,e){return this.removed?this:((t=i(t).split(l)).length-1&&(e=r(t[1])),t=r(t[0])||0,e=+e||0,this.transform(this._.transform.concat([["t",t,e]])),this)},C.transform=function(i){var r=this._;if(null==i)return r.transform;if(t._extractTransform(this,i),this.clip&&g(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&g(this.node,{transform:this.matrix}),1!=r.sx||1!=r.sy){var n=this.attrs[e]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":n})}return this},C.hide=function(){return this.removed||(this.node.style.display="none"),this},C.show=function(){return this.removed||(this.node.style.display=""),this},C.remove=function(){var e=S(this.node);if(!this.removed&&e.parentNode){var i=this.paper;for(var r in i.__set__&&i.__set__.exclude(this),h.unbind("raphael.*.*."+this.id),this.gradient&&i.defs.removeChild(this.gradient),t._tear(this,i),e.parentNode.removeChild(e),this.removeData(),this)this[r]="function"==typeof this[r]?t._removedFactory(r):null;this.removed=!0}},C._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e,i=!1;this.paper.canvas.parentElement?e=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(e=this.paper.canvas.parentNode.style),e&&"none"==e.display&&(i=!0,e.display="");var r={};try{r=this.node.getBBox()}catch(t){r={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{r=r||{},i&&(e.display="none")}return t&&this.hide(),r},C.attr=function(i,r){if(this.removed)return this;if(null==i){var n={};for(var a in this.attrs)this.attrs[e](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==r&&t.is(i,"string")){if("fill"==i&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==i)return this._.transform;for(var s=i.split(l),o={},c=0,u=s.length;c<u;c++)(i=s[c])in this.attrs?o[i]=this.attrs[i]:t.is(this.paper.customAttributes[i],"function")?o[i]=this.paper.customAttributes[i].def:o[i]=t._availableAttrs[i];return u-1?o:o[s[0]]}if(null==r&&t.is(i,"array")){for(o={},c=0,u=i.length;c<u;c++)o[i[c]]=this.attr(i[c]);return o}if(null!=r){var f={};f[i]=r}else null!=i&&t.is(i,"object")&&(f=i);for(var d in f)h("raphael.attr."+d+"."+this.id,this,f[d]);for(d in this.paper.customAttributes)if(this.paper.customAttributes[e](d)&&f[e](d)&&t.is(this.paper.customAttributes[d],"function")){var p=this.paper.customAttributes[d].apply(this,[].concat(f[d]));for(var m in this.attrs[d]=f[d],p)p[e](m)&&(f[m]=p[m])}return A(this,f),this},C.toFront=function(){if(this.removed)return this;var e=S(this.node);e.parentNode.appendChild(e);var i=this.paper;return i.top!=this&&t._tofront(this,i),this},C.toBack=function(){if(this.removed)return this;var e=S(this.node),i=e.parentNode;i.insertBefore(e,i.firstChild),t._toback(this,this.paper);this.paper;return this},C.insertAfter=function(e){if(this.removed||!e)return this;var i=S(this.node),r=S(e.node||e[e.length-1].node);return r.nextSibling?r.parentNode.insertBefore(i,r.nextSibling):r.parentNode.appendChild(i),t._insertafter(this,e,this.paper),this},C.insertBefore=function(e){if(this.removed||!e)return this;var i=S(this.node),r=S(e.node||e[0].node);return r.parentNode.insertBefore(i,r),t._insertbefore(this,e,this.paper),this},C.blur=function(e){var i=this;if(0!=+e){var r=g("filter"),n=g("feGaussianBlur");i.attrs.blur=e,r.id=t.createUUID(),g(n,{stdDeviation:+e||1.5}),r.appendChild(n),i.paper.defs.appendChild(r),i._blur=r,g(i.node,{filter:"url(#"+r.id+")"})}else i._blur&&(i._blur.parentNode.removeChild(i._blur),delete i._blur,delete i.attrs.blur),i.node.removeAttribute("filter");return i},t._engine.circle=function(t,e,i,r){var n=g("circle");t.canvas&&t.canvas.appendChild(n);var a=new T(n,t);return a.attrs={cx:e,cy:i,r:r,fill:"none",stroke:"#000"},a.type="circle",g(n,a.attrs),a},t._engine.rect=function(t,e,i,r,n,a){var s=g("rect");t.canvas&&t.canvas.appendChild(s);var o=new T(s,t);return o.attrs={x:e,y:i,width:r,height:n,rx:a||0,ry:a||0,fill:"none",stroke:"#000"},o.type="rect",g(s,o.attrs),o},t._engine.ellipse=function(t,e,i,r,n){var a=g("ellipse");t.canvas&&t.canvas.appendChild(a);var s=new T(a,t);return s.attrs={cx:e,cy:i,rx:r,ry:n,fill:"none",stroke:"#000"},s.type="ellipse",g(a,s.attrs),s},t._engine.image=function(t,e,i,r,n,a){var s=g("image");g(s,{x:i,y:r,width:n,height:a,preserveAspectRatio:"none"}),s.setAttributeNS(d,"href",e),t.canvas&&t.canvas.appendChild(s);var o=new T(s,t);return o.attrs={x:i,y:r,width:n,height:a,src:e},o.type="image",o},t._engine.text=function(e,i,r,n){var a=g("text");e.canvas&&e.canvas.appendChild(a);var s=new T(a,e);return s.attrs={x:i,y:r,"text-anchor":"middle",text:n,"font-family":t._availableAttrs["font-family"],"font-size":t._availableAttrs["font-size"],stroke:"none",fill:"#000"},s.type="text",A(s,s.attrs),s},t._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},t._engine.create=function(){var e=t._getContainer.apply(0,arguments),i=e&&e.container,r=e.x,n=e.y,a=e.width,s=e.height;if(!i)throw new Error("SVG container not found.");var o,c=g("svg"),l="overflow:hidden;";return r=r||0,n=n||0,a=a||512,g(c,{height:s=s||342,version:1.1,width:a,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),1==i?(c.style.cssText=l+"position:absolute;left:"+r+"px;top:"+n+"px",t._g.doc.body.appendChild(c),o=1):(c.style.cssText=l+"position:relative",i.firstChild?i.insertBefore(c,i.firstChild):i.appendChild(c)),(i=new t._Paper).width=a,i.height=s,i.canvas=c,i.clear(),i._left=i._top=0,o&&(i.renderfix=function(){}),i.renderfix(),i},t._engine.setViewBox=function(t,e,i,r,n){h("raphael.setViewBox",this,this._viewBox,[t,e,i,r,n]);var a,o,c=this.getSize(),l=s(i/c.width,r/c.height),u=this.top,d=n?"xMidYMid meet":"xMinYMin";for(null==t?(this._vbSize&&(l=1),delete this._vbSize,a="0 0 "+this.width+f+this.height):(this._vbSize=l,a=t+f+e+f+i+f+r),g(this.canvas,{viewBox:a,preserveAspectRatio:d});l&&u;)o="stroke-width"in u.attrs?u.attrs["stroke-width"]:1,u.attr({"stroke-width":o}),u._.dirty=1,u._.dirtyT=1,u=u.prev;return this._viewBox=[t,e,i,r,!!n],this},t.prototype.renderfix=function(){var t,e=this.canvas,i=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(i){t=e.createSVGMatrix()}var r=-t.e%1,n=-t.f%1;(r||n)&&(r&&(this._left=(this._left+r)%1,i.left=this._left+"px"),n&&(this._top=(this._top+n)%1,i.top=this._top+"px"))},t.prototype.clear=function(){t.eve("raphael.clear",this);for(var e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null,(this.desc=g("desc")).appendChild(t._g.doc.createTextNode("Created with Raphaël "+t.version)),e.appendChild(this.desc),e.appendChild(this.defs=g("defs"))},t.prototype.remove=function(){for(var e in h("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null};var N=t.st;for(var M in C)C[e](M)&&!N[e](M)&&(N[M]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t].apply(i,e)})}}(M))}}.apply(e,r))||(t.exports=n)},function(t,e,i){var r,n;r=[i(1)],void 0===(n=function(t){if(!t||t.vml){var e="hasOwnProperty",i=String,r=parseFloat,n=Math,a=n.round,s=n.max,o=n.min,c=n.abs,l="fill",h=/[, ]+/,u=t.eve,f=" ",d="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},m=/([clmz]),?([^clmz]*)/gi,g=/ progid:\S+Blur\([^\)]+\)/g,v=/-?[^,\s-]+/g,b="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",y=21600,x={path:1,rect:1,image:1},w={circle:1,ellipse:1},k=function(e){var r=/[ahqstv]/gi,n=t._pathToAbsolute;if(i(e).match(r)&&(n=t._path2curve),r=/[clmz]/g,n==t._pathToAbsolute&&!i(e).match(r)){var s=i(e).replace(m,function(t,e,i){var r=[],n="m"==e.toLowerCase(),s=p[e];return i.replace(v,function(t){n&&2==r.length&&(s+=r+p["m"==e?"l":"L"],r=[]),r.push(a(t*y))}),s+r});return s}var o,c,l=n(e);s=[];for(var h=0,u=l.length;h<u;h++){o=l[h],"z"==(c=l[h][0].toLowerCase())&&(c="x");for(var g=1,b=o.length;g<b;g++)c+=a(o[g]*y)+(g!=b-1?",":d);s.push(c)}return s.join(f)},A=function(e,i,r){var n=t.matrix();return n.rotate(-e,.5,.5),{dx:n.x(i,r),dy:n.y(i,r)}},_=function(t,e,i,r,n,a){var s=t._,o=t.matrix,h=s.fillpos,u=t.node,d=u.style,p=1,m="",g=y/e,v=y/i;if(d.visibility="hidden",e&&i){if(u.coordsize=c(g)+f+c(v),d.rotation=a*(e*i<0?-1:1),a){var b=A(a,r,n);r=b.dx,n=b.dy}if(e<0&&(m+="x"),i<0&&(m+=" y")&&(p=-1),d.flip=m,u.coordorigin=r*-g+f+n*-v,h||s.fillsize){var x=u.getElementsByTagName(l);x=x&&x[0],u.removeChild(x),h&&(b=A(a,o.x(h[0],h[1]),o.y(h[0],h[1])),x.position=b.dx*p+f+b.dy*p),s.fillsize&&(x.size=s.fillsize[0]*c(e)+f+s.fillsize[1]*c(i)),u.appendChild(x)}d.visibility="visible"}};t.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var S,T=function(t,e,r){for(var n=i(e).toLowerCase().split("-"),a=r?"end":"start",s=n.length,o="classic",c="medium",l="medium";s--;)switch(n[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":o=n[s];break;case"wide":case"narrow":l=n[s];break;case"long":case"short":c=n[s]}var h=t.node.getElementsByTagName("stroke")[0];h[a+"arrow"]=o,h[a+"arrowlength"]=c,h[a+"arrowwidth"]=l},C=function(n,c){n.attrs=n.attrs||{};var u=n.node,p=n.attrs,m=u.style,g=x[n.type]&&(c.x!=p.x||c.y!=p.y||c.width!=p.width||c.height!=p.height||c.cx!=p.cx||c.cy!=p.cy||c.rx!=p.rx||c.ry!=p.ry||c.r!=p.r),v=w[n.type]&&(p.cx!=c.cx||p.cy!=c.cy||p.r!=c.r||p.rx!=c.rx||p.ry!=c.ry),b=n;for(var A in c)c[e](A)&&(p[A]=c[A]);if(g&&(p.path=t._getPath[n.type](n),n._.dirty=1),c.href&&(u.href=c.href),c.title&&(u.title=c.title),c.target&&(u.target=c.target),c.cursor&&(m.cursor=c.cursor),"blur"in c&&n.blur(c.blur),(c.path&&"path"==n.type||g)&&(u.path=k(~i(p.path).toLowerCase().indexOf("r")?t._pathToAbsolute(p.path):p.path),n._.dirty=1,"image"==n.type&&(n._.fillpos=[p.x,p.y],n._.fillsize=[p.width,p.height],_(n,1,1,0,0,0))),"transform"in c&&n.transform(c.transform),v){var C=+p.cx,M=+p.cy,I=+p.rx||+p.r||0,B=+p.ry||+p.r||0;u.path=t.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",a((C-I)*y),a((M-B)*y),a((C+I)*y),a((M+B)*y),a(C*y)),n._.dirty=1}if("clip-rect"in c){var E=i(c["clip-rect"]).split(h);if(4==E.length){E[2]=+E[2]+ +E[0],E[3]=+E[3]+ +E[1];var P=u.clipRect||t._g.doc.createElement("div"),L=P.style;L.clip=t.format("rect({1}px {2}px {3}px {0}px)",E),u.clipRect||(L.position="absolute",L.top=0,L.left=0,L.width=n.paper.width+"px",L.height=n.paper.height+"px",u.parentNode.insertBefore(P,u),P.appendChild(u),u.clipRect=P)}c["clip-rect"]||u.clipRect&&(u.clipRect.style.clip="auto")}if(n.textpath){var D=n.textpath.style;c.font&&(D.font=c.font),c["font-family"]&&(D.fontFamily='"'+c["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,d)+'"'),c["font-size"]&&(D.fontSize=c["font-size"]),c["font-weight"]&&(D.fontWeight=c["font-weight"]),c["font-style"]&&(D.fontStyle=c["font-style"])}if("arrow-start"in c&&T(b,c["arrow-start"]),"arrow-end"in c&&T(b,c["arrow-end"],1),null!=c.opacity||null!=c.fill||null!=c.src||null!=c.stroke||null!=c["stroke-width"]||null!=c["stroke-opacity"]||null!=c["fill-opacity"]||null!=c["stroke-dasharray"]||null!=c["stroke-miterlimit"]||null!=c["stroke-linejoin"]||null!=c["stroke-linecap"]){var H=u.getElementsByTagName(l);if(!(H=H&&H[0])&&(H=S(l)),"image"==n.type&&c.src&&(H.src=c.src),c.fill&&(H.on=!0),null!=H.on&&"none"!=c.fill&&null!==c.fill||(H.on=!1),H.on&&c.fill){var z=i(c.fill).match(t._ISURL);if(z){H.parentNode==u&&u.removeChild(H),H.rotate=!0,H.src=z[1],H.type="tile";var V=n.getBBox(1);H.position=V.x+f+V.y,n._.fillpos=[V.x,V.y],t._preload(z[1],function(){n._.fillsize=[this.offsetWidth,this.offsetHeight]})}else H.color=t.getRGB(c.fill).hex,H.src=d,H.type="solid",t.getRGB(c.fill).error&&(b.type in{circle:1,ellipse:1}||"r"!=i(c.fill).charAt())&&N(b,c.fill,H)&&(p.fill="none",p.gradient=c.fill,H.rotate=!1)}if("fill-opacity"in c||"opacity"in c){var F=((+p["fill-opacity"]+1||2)-1)*((+p.opacity+1||2)-1)*((+t.getRGB(c.fill).o+1||2)-1);F=o(s(F,0),1),H.opacity=F,H.src&&(H.color="none")}u.appendChild(H);var O=u.getElementsByTagName("stroke")&&u.getElementsByTagName("stroke")[0],q=!1;!O&&(q=O=S("stroke")),(c.stroke&&"none"!=c.stroke||c["stroke-width"]||null!=c["stroke-opacity"]||c["stroke-dasharray"]||c["stroke-miterlimit"]||c["stroke-linejoin"]||c["stroke-linecap"])&&(O.on=!0),("none"==c.stroke||null===c.stroke||null==O.on||0==c.stroke||0==c["stroke-width"])&&(O.on=!1);var j=t.getRGB(c.stroke);O.on&&c.stroke&&(O.color=j.hex),F=((+p["stroke-opacity"]+1||2)-1)*((+p.opacity+1||2)-1)*((+j.o+1||2)-1);var R=.75*(r(c["stroke-width"])||1);if(F=o(s(F,0),1),null==c["stroke-width"]&&(R=p["stroke-width"]),c["stroke-width"]&&(O.weight=R),R&&R<1&&(F*=R)&&(O.weight=1),O.opacity=F,c["stroke-linejoin"]&&(O.joinstyle=c["stroke-linejoin"]||"miter"),O.miterlimit=c["stroke-miterlimit"]||8,c["stroke-linecap"]&&(O.endcap="butt"==c["stroke-linecap"]?"flat":"square"==c["stroke-linecap"]?"square":"round"),"stroke-dasharray"in c){var U={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};O.dashstyle=U[e](c["stroke-dasharray"])?U[c["stroke-dasharray"]]:d}q&&u.appendChild(O)}if("text"==b.type){b.paper.canvas.style.display=d;var Y=b.paper.span,W=p.font&&p.font.match(/\d+(?:\.\d*)?(?=px)/);m=Y.style,p.font&&(m.font=p.font),p["font-family"]&&(m.fontFamily=p["font-family"]),p["font-weight"]&&(m.fontWeight=p["font-weight"]),p["font-style"]&&(m.fontStyle=p["font-style"]),W=r(p["font-size"]||W&&W[0])||10,m.fontSize=100*W+"px",b.textpath.string&&(Y.innerHTML=i(b.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var G=Y.getBoundingClientRect();b.W=p.w=(G.right-G.left)/100,b.H=p.h=(G.bottom-G.top)/100,b.X=p.x,b.Y=p.y+b.H/2,("x"in c||"y"in c)&&(b.path.v=t.format("m{0},{1}l{2},{1}",a(p.x*y),a(p.y*y),a(p.x*y)+1));for(var X=["x","y","text","font","font-family","font-weight","font-style","font-size"],K=0,Z=X.length;K<Z;K++)if(X[K]in c){b._.dirty=1;break}switch(p["text-anchor"]){case"start":b.textpath.style["v-text-align"]="left",b.bbx=b.W/2;break;case"end":b.textpath.style["v-text-align"]="right",b.bbx=-b.W/2;break;default:b.textpath.style["v-text-align"]="center",b.bbx=0}b.textpath.style["v-text-kern"]=!0}},N=function(e,a,s){e.attrs=e.attrs||{};e.attrs;var o=Math.pow,c="linear",l=".5 .5";if(e.attrs.gradient=a,a=(a=i(a).replace(t._radial_gradient,function(t,e,i){return c="radial",e&&i&&(e=r(e),i=r(i),o(e-.5,2)+o(i-.5,2)>.25&&(i=n.sqrt(.25-o(e-.5,2))*(2*(i>.5)-1)+.5),l=e+f+i),d})).split(/\s*\-\s*/),"linear"==c){var h=a.shift();if(h=-r(h),isNaN(h))return null}var u=t._parseDots(a);if(!u)return null;if(e=e.shape||e.node,u.length){e.removeChild(s),s.on=!0,s.method="none",s.color=u[0].color,s.color2=u[u.length-1].color;for(var p=[],m=0,g=u.length;m<g;m++)u[m].offset&&p.push(u[m].offset+f+u[m].color);s.colors=p.length?p.join():"0% "+s.color,"radial"==c?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=l,s.angle=0):(s.type="gradient",s.angle=(270-h)%360),e.appendChild(s)}return 1},M=function(e,i){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=i,this.matrix=t.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!i.bottom&&(i.bottom=this),this.prev=i.top,i.top&&(i.top.next=this),i.top=this,this.next=null},I=t.el;M.prototype=I,I.constructor=M,I.transform=function(e){if(null==e)return this._.transform;var r,n=this.paper._viewBoxShift,a=n?"s"+[n.scale,n.scale]+"-1-1t"+[n.dx,n.dy]:d;n&&(r=e=i(e).replace(/\.{3}|\u2026/g,this._.transform||d)),t._extractTransform(this,a+e);var s,o=this.matrix.clone(),c=this.skew,l=this.node,h=~i(this.attrs.fill).indexOf("-"),u=!i(this.attrs.fill).indexOf("url(");if(o.translate(1,1),u||h||"image"==this.type)if(c.matrix="1 0 0 1",c.offset="0 0",s=o.split(),h&&s.noRotation||!s.isSimple){l.style.filter=o.toFilter();var p=this.getBBox(),m=this.getBBox(1),g=p.x-m.x,v=p.y-m.y;l.coordorigin=g*-y+f+v*-y,_(this,1,1,g,v,0)}else l.style.filter=d,_(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else l.style.filter=d,c.matrix=i(o),c.offset=o.offset();return null!==r&&(this._.transform=r,t._extractTransform(this,r)),this},I.rotate=function(t,e,n){if(this.removed)return this;if(null!=t){if((t=i(t).split(h)).length-1&&(e=r(t[1]),n=r(t[2])),t=r(t[0]),null==n&&(e=n),null==e||null==n){var a=this.getBBox(1);e=a.x+a.width/2,n=a.y+a.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,e,n]])),this}},I.translate=function(t,e){return this.removed?this:((t=i(t).split(h)).length-1&&(e=r(t[1])),t=r(t[0])||0,e=+e||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=e),this.transform(this._.transform.concat([["t",t,e]])),this)},I.scale=function(t,e,n,a){if(this.removed)return this;if((t=i(t).split(h)).length-1&&(e=r(t[1]),n=r(t[2]),a=r(t[3]),isNaN(n)&&(n=null),isNaN(a)&&(a=null)),t=r(t[0]),null==e&&(e=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,n,a]])),this._.dirtyT=1,this},I.hide=function(){return!this.removed&&(this.node.style.display="none"),this},I.show=function(){return!this.removed&&(this.node.style.display=d),this},I.auxGetBBox=t.el.getBBox,I.getBBox=function(){var t=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var e={},i=1/this.paper._viewBoxShift.scale;return e.x=t.x-this.paper._viewBoxShift.dx,e.x*=i,e.y=t.y-this.paper._viewBoxShift.dy,e.y*=i,e.width=t.width*i,e.height=t.height*i,e.x2=e.x+e.width,e.y2=e.y+e.height,e}return t},I._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}},I.remove=function(){if(!this.removed&&this.node.parentNode){for(var e in this.paper.__set__&&this.paper.__set__.exclude(this),t.eve.unbind("raphael.*.*."+this.id),t._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;this.removed=!0}},I.attr=function(i,r){if(this.removed)return this;if(null==i){var n={};for(var a in this.attrs)this.attrs[e](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==r&&t.is(i,"string")){if(i==l&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=i.split(h),o={},c=0,f=s.length;c<f;c++)(i=s[c])in this.attrs?o[i]=this.attrs[i]:t.is(this.paper.customAttributes[i],"function")?o[i]=this.paper.customAttributes[i].def:o[i]=t._availableAttrs[i];return f-1?o:o[s[0]]}if(this.attrs&&null==r&&t.is(i,"array")){for(o={},c=0,f=i.length;c<f;c++)o[i[c]]=this.attr(i[c]);return o}var d;for(var p in null!=r&&((d={})[i]=r),null==r&&t.is(i,"object")&&(d=i),d)u("raphael.attr."+p+"."+this.id,this,d[p]);if(d){for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&d[e](p)&&t.is(this.paper.customAttributes[p],"function")){var m=this.paper.customAttributes[p].apply(this,[].concat(d[p]));for(var g in this.attrs[p]=d[p],m)m[e](g)&&(d[g]=m[g])}d.text&&"text"==this.type&&(this.textpath.string=d.text),C(this,d)}return this},I.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&t._tofront(this,this.paper),this},I.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper)),this)},I.insertAfter=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[e.length-1]),e.node.nextSibling?e.node.parentNode.insertBefore(this.node,e.node.nextSibling):e.node.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this)},I.insertBefore=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[0]),e.node.parentNode.insertBefore(this.node,e.node),t._insertbefore(this,e,this.paper),this)},I.blur=function(e){var i=this.node.runtimeStyle,r=i.filter;return r=r.replace(g,d),0!=+e?(this.attrs.blur=e,i.filter=r+f+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+e||1.5)+")",i.margin=t.format("-{0}px 0 0 -{0}px",a(+e||1.5))):(i.filter=r,i.margin=0,delete this.attrs.blur),this},t._engine.path=function(t,e){var i=S("shape");i.style.cssText=b,i.coordsize=y+f+y,i.coordorigin=e.coordorigin;var r=new M(i,e),n={fill:"none",stroke:"#000"};t&&(n.path=t),r.type="path",r.path=[],r.Path=d,C(r,n),e.canvas&&e.canvas.appendChild(i);var a=S("skew");return a.on=!0,i.appendChild(a),r.skew=a,r.transform(d),r},t._engine.rect=function(e,i,r,n,a,s){var o=t._rectPath(i,r,n,a,s),c=e.path(o),l=c.attrs;return c.X=l.x=i,c.Y=l.y=r,c.W=l.width=n,c.H=l.height=a,l.r=s,l.path=o,c.type="rect",c},t._engine.ellipse=function(t,e,i,r,n){var a=t.path();a.attrs;return a.X=e-r,a.Y=i-n,a.W=2*r,a.H=2*n,a.type="ellipse",C(a,{cx:e,cy:i,rx:r,ry:n}),a},t._engine.circle=function(t,e,i,r){var n=t.path();n.attrs;return n.X=e-r,n.Y=i-r,n.W=n.H=2*r,n.type="circle",C(n,{cx:e,cy:i,r:r}),n},t._engine.image=function(e,i,r,n,a,s){var o=t._rectPath(r,n,a,s),c=e.path(o).attr({stroke:"none"}),h=c.attrs,u=c.node,f=u.getElementsByTagName(l)[0];return h.src=i,c.X=h.x=r,c.Y=h.y=n,c.W=h.width=a,c.H=h.height=s,h.path=o,c.type="image",f.parentNode==u&&u.removeChild(f),f.rotate=!0,f.src=i,f.type="tile",c._.fillpos=[r,n],c._.fillsize=[a,s],u.appendChild(f),_(c,1,1,0,0,0),c},t._engine.text=function(e,r,n,s){var o=S("shape"),c=S("path"),l=S("textpath");r=r||0,n=n||0,s=s||"",c.v=t.format("m{0},{1}l{2},{1}",a(r*y),a(n*y),a(r*y)+1),c.textpathok=!0,l.string=i(s),l.on=!0,o.style.cssText=b,o.coordsize=y+f+y,o.coordorigin="0 0";var h=new M(o,e),u={fill:"#000",stroke:"none",font:t._availableAttrs.font,text:s};h.shape=o,h.path=c,h.textpath=l,h.type="text",h.attrs.text=i(s),h.attrs.x=r,h.attrs.y=n,h.attrs.w=1,h.attrs.h=1,C(h,u),o.appendChild(l),o.appendChild(c),e.canvas.appendChild(o);var p=S("skew");return p.on=!0,o.appendChild(p),h.skew=p,h.transform(d),h},t._engine.setSize=function(e,i){var r=this.canvas.style;return this.width=e,this.height=i,e==+e&&(e+="px"),i==+i&&(i+="px"),r.width=e,r.height=i,r.clip="rect(0 "+e+" "+i+" 0)",this._viewBox&&t._engine.setViewBox.apply(this,this._viewBox),this},t._engine.setViewBox=function(e,i,r,n,a){t.eve("raphael.setViewBox",this,this._viewBox,[e,i,r,n,a]);var s,o,c=this.getSize(),l=c.width,h=c.height;return a&&(o=l/r,r*(s=h/n)<l&&(e-=(l-r*s)/2/s),n*o<h&&(i-=(h-n*o)/2/o)),this._viewBox=[e,i,r,n,!!a],this._viewBoxShift={dx:-e,dy:-i,scale:c},this.forEach(function(t){t.transform("...")}),this},t._engine.initWin=function(t){var e=t.document;e.styleSheets.length<31?e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):e.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),S=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(t){S=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),i=e.container,r=e.height,n=e.width,a=e.x,s=e.y;if(!i)throw new Error("VML container not found.");var o=new t._Paper,c=o.canvas=t._g.doc.createElement("div"),l=c.style;return a=a||0,s=s||0,n=n||512,r=r||342,o.width=n,o.height=r,n==+n&&(n+="px"),r==+r&&(r+="px"),o.coordsize=216e5+f+216e5,o.coordorigin="0 0",o.span=t._g.doc.createElement("span"),o.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",c.appendChild(o.span),l.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",n,r),1==i?(t._g.doc.body.appendChild(c),l.left=a+"px",l.top=s+"px",l.position="absolute"):i.firstChild?i.insertBefore(c,i.firstChild):i.appendChild(c),o.renderfix=function(){},o},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._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},t.prototype.remove=function(){for(var e in t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var B=t.st;for(var E in I)I[e](E)&&!B[e](E)&&(B[E]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t].apply(i,e)})}}(E))}}.apply(e,r))||(t.exports=n)}])},t.exports=r()},function(t,e,i){"use strict";"performance"in window&&("galactic"in window||(window.galactic={}),window.galactic.loc={isLocalUrl:function(){return!1}},i(40),i(41)(window.galactic),i(42),i(43),i(44),i(45),i(46),i(47),i(48),i(49),i(50),i(51));var r={};!function(){function t(t,e){return t.replace(/%T/g,e)}r.generateMidiDownloadLink=function(t,e,i,r){var n=["abcjs-download-midi","abcjs-midi-"+r];e.downloadClass&&n.push(e.downloadClass);var a='<div class="'+n.join(" ")+'">';e.preTextDownload&&(a+=e.preTextDownload);var s,o,c=t.metaText&&t.metaText.title?t.metaText.title:"Untitled";return s=e.downloadLabel&&((o=e.downloadLabel)&&"[object Function]"==={}.toString.call(o))?e.downloadLabel(t,r):e.downloadLabel?e.downloadLabel.replace(/%T/,c):'Download MIDI for "'+c+'"',a+='<a download="'+(c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"))+'.midi" href="'+i+'">'+s+"</a>",e.postTextDownload&&(a+=e.postTextDownload),a+"</div>"},r.generateMidiControls=function(e,i,r,n){if(!("performance"in window))return'<div class="abcjs-inline-midi abcjs-midi-'+n+"\">ERROR: this browser doesn't support window.performance</div>";if("not loaded"===r.midiInlineInitialized)return'<div class="abcjs-inline-midi abcjs-midi-'+n+'">MIDI NOT PRESENT</div>';var a=e.metaText&&e.metaText.title?e.metaText.title:"Untitled",s=i.inlineControls||{};void 0===s.standard&&(s.standard=!0),void 0===s.tooltipSelection&&(s.tooltipSelection="Click to toggle play selection/play all."),void 0===s.tooltipLoop&&(s.tooltipLoop="Click to toggle play once/repeat."),void 0===s.tooltipReset&&(s.tooltipReset="Click to go to beginning."),void 0===s.tooltipPlay&&(s.tooltipPlay="Click to play/pause."),void 0===s.tooltipProgress&&(s.tooltipProgress="Click to change the playback position."),void 0===s.tooltipTempo&&(s.tooltipTempo="Change the playback speed.");var o="";s.hide&&(o='style="display:none;"');var c='<div class="abcjs-inline-midi abcjs-midi-'+n+'" '+o+">";if(c+='<span class="abcjs-data" style="display:none;">'+JSON.stringify(r)+"</span>",i.preTextInline&&(c+='<span class="abcjs-midi-pre">'+t(i.preTextInline,a)+"</span>"),s.selectionToggle&&(c+='<button type="button" class="abcjs-midi-selection abcjs-btn" title="'+s.tooltipSelection+'"></button>'),s.loopToggle&&(c+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+s.tooltipLoop+'"></button>'),s.standard&&(c+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+s.tooltipReset+'"></button><button type="button" class="abcjs-midi-start abcjs-btn" title="'+s.tooltipPlay+'"></button><button type="button" class="abcjs-midi-progress-background" title="'+s.tooltipProgress+'"><span class="abcjs-midi-progress-indicator"></span></button><span class="abcjs-midi-clock"> 0:00</span>'),s.tempo){var l=e&&e.metaText&&e.metaText.tempo&&e.metaText.tempo.bpm?e.metaText.tempo.bpm:180;c+='<span class="abcjs-tempo-wrapper"><input class="abcjs-midi-tempo" value="100" type="number" min="1" max="300" data-start-tempo="'+l+'" title="'+s.tooltipTempo+'" />% (<span class="abcjs-midi-current-tempo">'+l+"</span> BPM)</span>"}return i.postTextInline&&(c+='<span class="abcjs-midi-post">'+t(i.postTextInline,a)+"</span>"),c+"</div>"};var e="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/";function i(t,e){return!!t&&(" "+t.className+" ").indexOf(" "+e+" ")>-1}function n(t,e){t&&(i(t,e)||(t.className=t.className+" "+e))}function a(t,e){t&&(t.className=t.className.replace(e,"").trim().replace("  "," "))}function s(t,e){t&&(i(t,e)?a(t,e):n(t,e))}function o(t,e){if(!t)return null;for(;t!==document.body;){if(i(t,e))return t;t=t.parentNode}return null}function c(t,e){if(!t)return null;var i=t.getElementsByClassName(e);return 0===i.length?null:i[0]}r.setSoundFont=function(t){e=t};var l,h,u=!1;function f(t,e,i){MIDI.player.currentTime=0,MIDI.player.warp=t,MIDI.player.load({events:e}),i()}function d(){MIDI.player.start(MIDI.player.currentTime)}function p(){MIDI.player.stop()}function m(){MIDI.player.pause()}function g(t,i){var r=c(t,"abcjs-data"),n=JSON.parse(r.innerHTML),a=1,s=c(t,"abcjs-midi-tempo");if(s){var o=parseInt(s.value,10);o>0&&(a=100/o)}!function(t,i,r){u?f(t,i,r):MIDI.setup({debug:!1,soundfontUrl:e,instruments:function(t){for(var e=[],i=0;i<t.length;i++)t[i][0]&&t[i][0].event&&t[i][0].event.programNumber&&e.push(t[i][0].event.programNumber);return e}(i)}).then(function(){u=!0,f(t,i,r)})}(a,n,i)}function v(){var t=c(document,"abcjs-midi-current");t&&(p(),a(t,"abcjs-midi-current"),a(c(t,"abcjs-midi-start"),"abcjs-pushed"))}function b(t){var e;if(t.duration>0&&l!==t.progress&&(l=t.progress,(e=c(document,"abcjs-midi-current"))&&i(c(e,"abcjs-midi-start"),"abcjs-pushed"))){var r=c(e,"abcjs-midi-progress-background").offsetWidth,n=c(e,"abcjs-midi-progress-indicator"),a=r*l;n.style.left=a+"px";var s=c(e,"abcjs-midi-clock");if(s){var o=Math.floor(t.currentTime),h=Math.floor(o/60);(o%=60)<10&&(o="0"+o),h<10&&(h=" "+h),s.innerHTML=h+":"+o}var u=e.abcjsQpm;!u&&e.abcjsTune&&e.abcjsTune.metaText&&e.abcjsTune.metaText.tempo&&(u=e.abcjsTune.metaText.tempo.bpm),u||(u=180);var f=parseInt(u,10)/60,d=t.currentTime;if(e.abcjsListener){var p=Math.floor(d/f);t.newBeat=p!==e.abcjsLastBeat,e.abcjsLastBeat=p,e.abcjsListener(e,t,e.abcjsContext)}if(e.abcjsAnimate){var m=f/64,g=function(t,e,i){for(var r,n,a=0,s=t.length-1;a<=s;)if((n=t[r=Math.floor((a+s)/2)]).milliseconds/1e3-i<e)a=r+1;else{if(!(n.milliseconds/1e3-i>e))return r;s=r-1}for(;t[r].milliseconds/1e3-i>=e&&r>0;)r--;return 0===r&&t[r].milliseconds/1e3-i>=e?-1:r}(e.abcjsTune.noteTimings,d,m);if(g!==e.abcjsLastIndex){var v=e.abcjsLastIndex>=0?e.abcjsTune.noteTimings[e.abcjsLastIndex]:null;e.abcjsAnimate(v,e.abcjsTune.noteTimings[g],e.abcjsContext),e.abcjsLastIndex=g}}}if(1===t.progress){var b=c(e=c(document,"abcjs-midi-current"),"abcjs-midi-loop"),x=function(){b&&i(b,"abcjs-pushed")&&y(c(e,"abcjs-midi-start"))};setTimeout(function(){k(e,x),e&&e.abcjsAnimate&&e.abcjsAnimate(e.abcjsTune.noteTimings[e.abcjsLastIndex],null,e.abcjsContext)},1)}}function y(t){var e=o(t,"abcjs-inline-midi");if(i(t,"abcjs-pushed"))m(),a(t,"abcjs-pushed");else{if(i(e,"abcjs-midi-current"))d();else{v();g(e,function(){d(),n(e,"abcjs-midi-current")})}n(t,"abcjs-pushed")}e.abcjsLastBeat=-1,e.abcjsLastIndex=-1,function(t){MIDI.player.setAnimation(t)}(b)}function x(t){s(t,"abcjs-pushed")}function w(t){s(t,"abcjs-pushed")}function k(t,e){var i=o(t,"abcjs-inline-midi");v(),i&&g(i,function(){n(i,"abcjs-midi-current"),c(i,"abcjs-midi-progress-indicator").style.left="0px",c(i,"abcjs-midi-clock").innerHTML=" 0:00",e&&e()})}function A(t){var e=o(t,"abcjs-inline-midi"),r=c(e,"abcjs-midi-start"),a=i(r,"abcjs-pushed");i(e,"abcjs-midi-current")&&k(t,function(){a&&(d(),n(r,"abcjs-pushed"))})}function _(t,e){var r=o(t,"abcjs-inline-midi");if(i(r,"abcjs-midi-current")){var n=c(r,"abcjs-midi-start");n=i(n,"abcjs-pushed");var a=t.offsetWidth;!function(t,e,i){var r=e/i,n=MIDI.player.duration;t&&m(),MIDI.player.currentTime=n*r,t&&d()}(n,function(t,e){var i=0;do{i+=t.offsetLeft-t.scrollLeft,t=t.offsetParent}while(t);return e.pageX-i}(t,e),a)}}function S(t){for(var e=parseInt(t.value,10),r=parseInt(t.getAttribute("data-start-tempo"),10);t&&!i(t,"abcjs-midi-current-tempo");)t=t.nextSibling;t.innerHTML=Math.floor(e*r/100),function(t){MIDI.player.warp=t>0?100/t:1}(e)}r.startPlaying=function(t){var e=t;i(t,"abcjs-inline-midi")&&(e=t.querySelector(".abcjs-midi-start")),y(e)},r.stopPlaying=function(){p()},h=function(){if(document.body.addEventListener("click",function(t){for(var e=(t=t||window.event).target||t.srcElement;e&&e!==document.body;){if(i(e,"abcjs-midi-start"))return void y(e);if(i(e,"abcjs-midi-selection"))return void x(e);if(i(e,"abcjs-midi-loop"))return void w(e);if(i(e,"abcjs-midi-reset"))return void A(e);if(i(e,"abcjs-midi-progress-background"))return void _(e,t);e=e.parentNode}}),document.body.addEventListener("change",function(t){for(var e=(t=t||window.event).target||t.srcElement;e!==document.body;)i(e,"abcjs-midi-tempo")&&S(e),e=e.parentNode}),void 0===window.MIDI){r.midiInlineInitialized="not loaded";for(var t=document.getElementsByClassName("abcjs-inline-midi"),e=0;e<t.length;e++)t[e].innerHTML="MIDI NOT PRESENT"}},"loading"===window.document.readyState?window.addEventListener("load",h):h()}(),t.exports=r},function(t,e,i){"use strict";var r=i(0),n=i(7),a=i(20),s=i(8),o=i(21),c=i(12),l=i(22);t.exports=function(){var t=new l,e=new o;function i(t,e,i){t.positioning||(t.positioning={}),t.positioning[e]=i}function h(t,e,i){t.fonts||(t.fonts={}),t.fonts[e]=i}this.getTune=function(){return t};var u={reset:function(){for(var t in this)this.hasOwnProperty(t)&&"function"!=typeof this[t]&&delete this[t];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.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(t,e){return this[t].decoration!==e[t].decoration||this[t].face!==e[t].face||this[t].size!==e[t].size||this[t].style!==e[t].style||this[t].weight!==e[t].weight},addFormattingOptions:function(t,e,r){"note"===r?("auto"!==this.vocalPosition&&i(t,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&i(t,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&i(t,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&i(t,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&i(t,"volumePosition",this.volumePosition),this.differentFont("annotationfont",e)&&h(t,"annotationfont",this.annotationfont),this.differentFont("gchordfont",e)&&h(t,"gchordfont",this.gchordfont),this.differentFont("vocalfont",e)&&h(t,"vocalfont",this.vocalfont)):"bar"===r&&("auto"!==this.dynamicPosition&&i(t,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&i(t,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&i(t,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&i(t,"volumePosition",this.volumePosition),this.differentFont("measurefont",e)&&h(t,"measurefont",this.measurefont),this.differentFont("repeatfont",e)&&h(t,"repeatfont",this.repeatfont))}},f=function(t){var e=r.gsub(t,""," ");return e=r.gsub(e,"&","&amp;"),e=r.gsub(e,"<","&lt;"),r.gsub(e,">","&gt;")},d=function(e,i,r){i||(i=" ");var n=i.charAt(r);" "===n&&(n="SPACE");var a,s=f(i.substring(0,r))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+n+"</span>"+f(i.substring(r+1));!function(t){u.warnings||(u.warnings=[]),u.warnings.push(t)}("Music Line:"+t.getNumLines()+":"+(r+1)+": "+e+":  "+s),a={message:e,line:i,startChar:u.iChar+r,column:r},u.warningObjects||(u.warningObjects=[]),u.warningObjects.push(a)},p=new a(e,d,u,t);this.getWarnings=function(){return u.warnings},this.getWarningObjects=function(){return u.warningObjects};var m=function(t,i){if('"'===t.charAt(i)){var r=e.getBrackettedSubstring(t,i,5);if(r[2]||d("Missing the closing quote while parsing the chord symbol",t,i),r[0]>0&&r[1].length>0&&"^"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1].charAt(0)){r[1]=r[1].substring(1);var n=e.getFloat(r[1]);0===n.digits&&d("Missing first position in absolutely positioned annotation.",t,i),r[1]=r[1].substring(n.digits),","!==r[1][0]&&d("Missing comma absolutely positioned annotation.",t,i),r[1]=r[1].substring(1);var a=e.getFloat(r[1]);0===a.digits&&d("Missing second position in absolutely positioned annotation.",t,i),r[1]=r[1].substring(a.digits);var s=e.skipWhiteSpace(r[1]);r[1]=r[1].substring(s),r[2]=null,r[3]={x:n.value,y:a.value}}else r[1]=r[1].replace(/([ABCDEFG])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG])#/g,"$1♯"),r[2]="default",r[1]=c.chordName(u,r[1]);return r}return[0,""]},g=["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"],v=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],b=["crescendo(","crescendo)","diminuendo(","diminuendo)"],y=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],x=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],w=function(t,i){var n=u.macros[t.charAt(i)];if(void 0!==n)return"!"!==n.charAt(0)&&"+"!==n.charAt(0)||(n=n.substring(1)),"!"!==n.charAt(n.length-1)&&"+"!==n.charAt(n.length-1)||(n=n.substring(0,n.length-1)),r.detect(g,function(t){return n===t})?[1,n]:r.detect(v,function(t){return n===t})?("hidden"===u.volumePosition&&(n=""),[1,n]):r.detect(b,function(t){return"hidden"===u.dynamicPosition&&(n=""),n===t})?[1,n]:(r.detect(u.ignoredDecorations,function(t){return n===t})||d("Unknown macro: "+n,t,i),[1,""]);switch(t.charAt(i)){case".":return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var a=e.getBrackettedSubstring(t,i,5);return a[1].length>0&&("^"===a[1].charAt(0)||"_"===a[1].charAt(0))&&(a[1]=a[1].substring(1)),r.detect(g,function(t){return a[1]===t})?a:r.detect(v,function(t){return a[1]===t})?("hidden"===u.volumePosition&&(a[1]=""),a):r.detect(b,function(t){return a[1]===t})?("hidden"===u.dynamicPosition&&(a[1]=""),a):r.detect(y,function(t){return a[1]===t[0]&&(a[1]=t[1],!0)})?a:r.detect(x,function(t){return a[1]===t[0]&&(a[1]=t[1],!0)})?("hidden"===u.dynamicPosition&&(a[1]=""),a):"!"!==t.charAt(i)||1!==a[0]&&"!"===t.charAt(i+a[0]-1)?(d("Unknown decoration: "+a[1],t,i),a[1]="",a):[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]},k=function(t,i){for(var r=i;e.isWhiteSpace(t.charAt(i));)i++;return[i-r]},A=function(t,i){var r=e.getBarLine(t,i);if(0===r.len)return[0,""];if(r.warn)return d(r.warn,t,i),[r.len,""];for(var n=0;n<t.length&&" "===t.charAt(i+r.len+n);n++);var a=r.len;if("["===t.charAt(i+r.len+n)&&(r.len+=n+1),'"'===t.charAt(i+r.len)&&"["===t.charAt(i+r.len-1)){var s=e.getBrackettedSubstring(t,i+r.len,5);return[r.len+s[0],r.token,s[1]]}var o=e.getTokenOf(t.substring(i+r.len),"1234567890-,");return 0===o.len||"-"===o.token[0]?[a,r.token]:[r.len+o.len,r.token,o.token]},_=function(t,i){for(var r={},n=i;"("===t.charAt(i)||e.isWhiteSpace(t.charAt(i));)"("===t.charAt(i)&&(i+1<t.length&&t.charAt(i+1)>="2"&&t.charAt(i+1)<="9"?(void 0!==r.triplet?d("Can't nest triplets",t,i):(r.triplet=t.charAt(i+1)-"0",i+2<t.length&&":"===t.charAt(i+2)&&(i+3<t.length&&":"===t.charAt(i+3)?i+4<t.length&&t.charAt(i+4)>="1"&&t.charAt(i+4)<="9"?(r.num_notes=t.charAt(i+4)-"0",i+=3):d("expected number after the two colons after the triplet to mark the duration",t,i):i+3<t.length&&t.charAt(i+3)>="1"&&t.charAt(i+3)<="9"?i+4<t.length&&":"===t.charAt(i+4)?i+5<t.length&&t.charAt(i+5)>="1"&&t.charAt(i+5)<="9"&&(r.num_notes=t.charAt(i+5)-"0",i+=4):(r.num_notes=r.triplet,i+=3):d("expected number after the triplet to mark the duration",t,i))),i++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),i++;return r.consumed=i-n,r},S=function(t,e){switch(t.charAt(e)){case">":return e<t.length-1&&">"===t.charAt(e+1)?[2,1.75,.25]:[1,1.5,.5];case"<":return e<t.length-1&&"<"===t.charAt(e+1)?[2,.25,1.75]:[1,.5,1.5]}return null},T=function(t){return void 0!==t.duration&&t.duration<.25&&(t.end_beam=!0),t},C={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},N={x:"invisible",y:"spacer",z:"rest",Z:"multimeasure"},M=function(i,r,n,a){for(var s=function(t){return"octave"===t||"duration"===t||"Zduration"===t||"broken_rhythm"===t||"end_slur"===t},o="startSlur",l=!1;;){switch(i.charAt(r)){case"(":if("startSlur"!==o)return s(o)?(n.endChar=r,n):null;void 0===n.startSlur?n.startSlur=1:n.startSlur++;break;case")":if(!s(o))return null;void 0===n.endSlur?n.endSlur=1:n.endSlur++;break;case"^":if("startSlur"===o)n.accidental="sharp",o="sharp2";else{if("sharp2"!==o)return s(o)?(n.endChar=r,n):null;n.accidental="dblsharp",o="pitch"}break;case"_":if("startSlur"===o)n.accidental="flat",o="flat2";else{if("flat2"!==o)return s(o)?(n.endChar=r,n):null;n.accidental="dblflat",o="pitch"}break;case"=":if("startSlur"!==o)return s(o)?(n.endChar=r,n):null;n.accidental="natural",o="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"!==o&&"sharp2"!==o&&"flat2"!==o&&"pitch"!==o)return s(o)?(n.endChar=r,n):null;if(n.pitch=C[i.charAt(r)],c.note(u,n),o="octave",a&&0!==u.next_note_duration?(n.duration=u.default_length*u.next_note_duration,u.next_note_duration=0,l=!0):n.duration=u.default_length,u.clef&&"perc"===u.clef.type){var h=i.charAt(r);n.accidental&&(h={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^"}[n.accidental]+h),t.formatting&&t.formatting.midi&&t.formatting.midi.drummap&&(n.midipitch=t.formatting.midi.drummap[h])}break;case",":if("octave"!==o)return s(o)?(n.endChar=r,n):null;n.pitch-=7;break;case"'":if("octave"!==o)return s(o)?(n.endChar=r,n):null;n.pitch+=7;break;case"x":case"y":case"z":case"Z":if("startSlur"!==o)return s(o)?(n.endChar=r,n):null;n.rest={type:N[i.charAt(r)]},delete n.accidental,delete n.startSlur,delete n.startTie,delete n.endSlur,delete n.endTie,delete n.end_beam,delete n.grace_notes,"multimeasure"===n.rest.type?(n.duration=1,o="Zduration"):(a&&0!==u.next_note_duration?(n.duration=u.default_length*u.next_note_duration,u.next_note_duration=0,l=!0):n.duration=u.default_length,o="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"===o||"duration"===o){var f=e.getFraction(i,r);for(n.duration=n.duration*f.value,n.endChar=f.index;f.index<i.length&&(e.isWhiteSpace(i.charAt(f.index))||"-"===i.charAt(f.index));)"-"===i.charAt(f.index)?n.startTie={}:n=T(n),f.index++;r=f.index-1,o="broken_rhythm"}else if("sharp2"===o)n.accidental="quartersharp",o="pitch";else{if("flat2"!==o){if("Zduration"===o){var d=e.getNumber(i,r);return n.duration=d.num,n.endChar=d.index,n}return null}n.accidental="quarterflat",o="pitch"}break;case"-":if("startSlur"===o)t.addTieToLastNote(),n.endTie=!0;else{if("octave"!==o&&"duration"!==o&&"end_slur"!==o)return"broken_rhythm"===o?(n.endChar=r,n):null;if(n.startTie={},l||!a)return e.isWhiteSpace(i.charAt(r+1))&&T(n),n.endChar=r+1,n;o="broken_rhythm"}break;case" ":case"\t":if(!s(o))return null;n.end_beam=!0;do{"-"===i.charAt(r)&&(n.startTie={}),r++}while(r<i.length&&(e.isWhiteSpace(i.charAt(r))||"-"===i.charAt(r)));if(n.endChar=r,l||!a||"<"!==i.charAt(r)&&">"!==i.charAt(r))return n;r--,o="broken_rhythm";break;case">":case"<":if(!s(o))return null;if(!a)return n.endChar=r,n;var p=S(i,r);r+=p[0]-1,u.next_note_duration=p[2],n.duration=p[1]*n.duration,o="end_slur";break;default:return s(o)?(n.endChar=r,n):null}if(++r===i.length)return s(o)?(n.endChar=r,n):null}return null};function I(){var e={startChar:-1,endChar:-1};if(u.partForNextLine.length&&(e.part=u.partForNextLine),e.clef=u.currentVoice&&void 0!==u.staves[u.currentVoice.staffNum].clef?r.clone(u.staves[u.currentVoice.staffNum].clef):r.clone(u.clef),e.key=s.deepCopyKey(u.key),s.addPosToKey(e.clef,e.key),null!==u.meter?(u.currentVoice?(r.each(u.staves,function(t){t.meter=u.meter}),e.meter=u.staves[u.currentVoice.staffNum].meter,u.staves[u.currentVoice.staffNum].meter=null):e.meter=u.meter,u.meter=null):u.currentVoice&&u.staves[u.currentVoice.staffNum].meter&&(e.meter=u.staves[u.currentVoice.staffNum].meter,u.staves[u.currentVoice.staffNum].meter=null),u.currentVoice&&u.currentVoice.name&&(e.name=u.currentVoice.name),u.vocalfont&&(e.vocalfont=u.vocalfont),u.style&&(e.style=u.style),u.currentVoice){var i=u.staves[u.currentVoice.staffNum];i.brace&&(e.brace=i.brace),i.bracket&&(e.bracket=i.bracket),i.connectBarLines&&(e.connectBarLines=i.connectBarLines),i.name&&(e.name=i.name[u.currentVoice.index]),i.subname&&(e.subname=i.subname[u.currentVoice.index]),u.currentVoice.stem&&(e.stem=u.currentVoice.stem),u.currentVoice.stafflines&&(e.stafflines=u.currentVoice.stafflines),u.currentVoice.staffscale&&(e.staffscale=u.currentVoice.staffscale),u.currentVoice.scale&&(e.scale=u.currentVoice.scale),u.currentVoice.style&&(e.style=u.currentVoice.style),u.currentVoice.transpose&&(e.clef.transpose=u.currentVoice.transpose)}var n=void 0===u.currentVoice||0===u.currentVoice.staffNum&&0===u.currentVoice.index;0===u.barNumbers&&n&&1!==u.currBarNumber&&(e.barNumber=u.currBarNumber),t.startNewLine(e),u.partForNextLine=""}var B=function(t,i){if("{"===t.charAt(i)){var r=e.getBrackettedSubstring(t,i,1,"}");r[2]||d("Missing the closing '}' while parsing grace note",t,i),")"===t[i+r[0]]&&(r[0]++,r[1]+=")");for(var n=[],a=0,s=!1;a<r[1].length;){var o=!1;"/"===r[1].charAt(a)&&(o=!0,a++);var c=M(r[1],a,{},!1);null!==c?(c.duration=c.duration/(8*u.default_length),o&&(c.acciaccatura=!0),n.push(c),s&&(c.endTie=!0,s=!1),c.startTie&&(s=!0),a=c.endChar,delete c.endChar):(" "===r[1].charAt(a)?n.length>0&&(n[n.length-1].end_beam=!0):d("Unknown character '"+r[1].charAt(a)+"' while parsing grace note",t,i),a++)}if(n.length)return[r[0],n]}return[0]};function E(t,e){if("&"===t.charAt(e)){for(var i=e;t.charAt(e)&&":"!==t.charAt(e)&&"|"!==t.charAt(e);)e++;return[e-i,t.substring(i+1,e)]}return[0]}function P(t){var e=t.origMeter;return e&&"specified"===e.type&&e.value&&0!==e.value.length?parseInt(e.value[0].num,10)/parseInt(e.value[0].den,10):1}var L=function i(n){var a=p.parseHeader(n);a.regular&&function(i){p.resolveTempo(),u.is_in_header=!1;for(var n=0,a=u.iChar;e.isWhiteSpace(i.charAt(n))&&n<i.length;)n++;if(n!==i.length&&"%"!==i.charAt(n)){var s=u.start_new_line;void 0===u.continueall?u.start_new_line=!0:u.start_new_line=!1;var o=0,c=p.letter_to_body_header(i,n);c[0]>0&&(n+=c[0],"V"===c[1]&&(s=!0));for(var l={};n<i.length;){var h=n;if("%"===i.charAt(n))break;var f=p.letter_to_inline_header(i,n);if(f[0]>0)n+=f[0],"V"===f[1]&&(s=!0);else{var g;for(s&&(I(),s=!1);;)if((g=e.eatWhiteSpace(i,n))>0&&(n+=g),n>0&&""===i.charAt(n-1)&&(g=p.letter_to_body_header(i,n))[0]>0&&("V"===g[1]&&I(),n=g[0],u.start_new_line=!1),(g=k(i,n))[0]>0&&(n+=g[0]),(g=E(i,n))[0]>0&&(t.appendElement("overlay",a,a+1,{}),n+=1),(g=m(i,n))[0]>0){l.chord||(l.chord=[]);var v=e.translateString(g[1]);v=v.replace(/;/g,"\n");for(var b=!1,y=0;y<l.chord.length;y++)l.chord[y].position===g[2]&&(b=!0,l.chord[y].name+="\n"+v);!1===b&&(null===g[2]&&g[3]?l.chord.push({name:v,rel_position:g[3]}):l.chord.push({name:v,position:g[2]})),n+=g[0];var x=e.skipWhiteSpace(i.substring(n));x>0&&(l.force_end_beam_last=!0),n+=x}else if((g=-1==="ABCDEFGabcdefgxyzZ[]|^_{".indexOf(i.charAt(n))?w(i,n):[0])[0]>0)null===g[1]?n+1<i.length&&I():g[1].length>0&&(0===g[1].indexOf("style=")?l.style=g[1].substr(6):(void 0===l.decoration&&(l.decoration=[]),l.decoration.push(g[1]))),n+=g[0];else{if(!((g=B(i,n))[0]>0))break;l.gracenotes=g[1],n+=g[0]}if((g=A(i,n))[0]>0){void 0!==l.gracenotes&&(l.rest={type:"spacer"},l.duration=.125,u.addFormattingOptions(l,t.formatting,"note"),t.appendElement("note",a+n,a+n+g[0],l),u.measureNotEmpty=!0,l={});var C={type:g[1]};0===C.type.length?d("Unknown bar type",i,n):(u.inEnding&&"bar_thin"!==C.type&&(C.endEnding=!0,u.inEnding=!1),g[2]&&(C.startEnding=g[2],u.inEnding&&(C.endEnding=!0),u.inEnding=!0),void 0!==l.decoration&&(C.decoration=l.decoration),void 0!==l.chord&&(C.chord=l.chord),C.startEnding&&void 0===u.barFirstEndingNum?u.barFirstEndingNum=u.currBarNumber:C.startEnding&&C.endEnding&&u.barFirstEndingNum?u.currBarNumber=u.barFirstEndingNum:C.endEnding&&(u.barFirstEndingNum=void 0),"bar_invisible"!==C.type&&u.measureNotEmpty&&(void 0===u.currentVoice||0===u.currentVoice.staffNum&&0===u.currentVoice.index)&&(u.currBarNumber++,u.barNumbers&&u.currBarNumber%u.barNumbers==0&&(C.barNumber=u.currBarNumber)),u.addFormattingOptions(l,t.formatting,"bar"),t.appendElement("bar",a+n,a+n+g[0],C),u.measureNotEmpty=!1,l={}),n+=g[0]}else if("&"===i[n])d("Overlay not yet supported",i,n),n++;else{if((g=_(i,n)).consumed>0&&(void 0!==g.startSlur&&(l.startSlur=g.startSlur),void 0!==g.triplet&&(o>0?d("Can't nest triplets",i,n):(l.startTriplet=g.triplet,o=void 0===g.num_notes?g.triplet:g.num_notes)),n+=g.consumed),"["===i.charAt(n)){var N=n;n++;for(var L=null,D=!1,H=!1;!H;){var z=w(i,n);z[0]>0&&(n+=z[0]);var V=M(i,n,{},!1);if(null!==V)z[0]>0&&0!==z[1].indexOf("style=")&&(void 0===l.decoration&&(l.decoration=[]),l.decoration.push(z[1])),V.end_beam&&(l.end_beam=!0,delete V.end_beam),void 0===l.pitches?(l.duration=V.duration,l.pitches=[V]):l.pitches.push(V),delete V.duration,z[0]>0&&0===z[1].indexOf("style=")&&(l.pitches[l.pitches.length-1].style=z[1].substr(6)),u.inTieChord[l.pitches.length]&&(V.endTie=!0,u.inTieChord[l.pitches.length]=void 0),V.startTie&&(u.inTieChord[l.pitches.length]=!0),n=V.endChar,delete V.endChar;else if(" "===i.charAt(n))d("Spaces are not allowed in chords",i,n),n++;else{if(n<i.length&&"]"===i.charAt(n)){n++,0!==u.next_note_duration&&(l.duration=l.duration*u.next_note_duration,u.next_note_duration=0),u.inTie&&(r.each(l.pitches,function(t){t.endTie=!0}),u.inTie=!1),o>0&&0==--o&&(l.endTriplet=!0);for(var F=!1;n<i.length&&!F;){switch(i.charAt(n)){case" ":case"\t":T(l);break;case")":void 0===l.endSlur?l.endSlur=1:l.endSlur++;break;case"-":r.each(l.pitches,function(t){t.startTie={}}),u.inTie=!0;break;case">":case"<":var O=S(i,n);n+=O[0]-1,u.next_note_duration=O[2],L?L*=O[1]:L=O[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var q=e.getFraction(i,n);L=q.value,n=q.index," "===i.charAt(n)&&(D=!0),"-"===i.charAt(n)||")"===i.charAt(n)||" "===i.charAt(n)||"<"===i.charAt(n)||">"===i.charAt(n)?n--:F=!0;break;default:F=!0}F||n++}}else d("Expected ']' to end the chords",i,n);void 0!==l.pitches&&(null!==L&&(l.duration=l.duration*L,D&&T(l)),u.addFormattingOptions(l,t.formatting,"note"),t.appendElement("note",a+N,a+n,l),u.measureNotEmpty=!0,l={}),H=!0}}}else{var j={},R=M(i,n,j,!0);void 0!==j.endTie&&(u.inTie=!0),null!==R&&(void 0!==R.pitch?(l.pitches=[{}],void 0!==R.accidental&&(l.pitches[0].accidental=R.accidental),l.pitches[0].pitch=R.pitch,R.midipitch&&(l.pitches[0].midipitch=R.midipitch),void 0!==R.endSlur&&(l.pitches[0].endSlur=R.endSlur),void 0!==R.endTie&&(l.pitches[0].endTie=R.endTie),void 0!==R.startSlur&&(l.pitches[0].startSlur=R.startSlur),void 0!==l.startSlur&&(l.pitches[0].startSlur=l.startSlur),void 0!==R.startTie&&(l.pitches[0].startTie=R.startTie),void 0!==l.startTie&&(l.pitches[0].startTie=l.startTie)):(l.rest=R.rest,void 0!==R.endSlur&&(l.endSlur=R.endSlur),void 0!==R.endTie&&(l.rest.endTie=R.endTie),void 0!==R.startSlur&&(l.startSlur=R.startSlur),void 0!==R.startTie&&(l.rest.startTie=R.startTie),void 0!==l.startTie&&(l.rest.startTie=l.startTie)),void 0!==R.chord&&(l.chord=R.chord),void 0!==R.duration&&(l.duration=R.duration),void 0!==R.decoration&&(l.decoration=R.decoration),void 0!==R.graceNotes&&(l.graceNotes=R.graceNotes),delete l.startSlur,u.inTie&&(void 0!==l.pitches?(l.pitches[0].endTie=!0,u.inTie=!1):"spacer"!==l.rest.type&&(l.rest.endTie=!0,u.inTie=!1)),(R.startTie||l.startTie)&&(u.inTie=!0),n=R.endChar,o>0&&0==--o&&(l.endTriplet=!0),R.end_beam&&T(l),l.rest&&"rest"===l.rest.type&&1===l.duration&&(l.rest.type="whole",l.duration=P(u)),u.addFormattingOptions(l,t.formatting,"note"),t.appendElement("note",a+h,a+n,l),u.measureNotEmpty=!0,l={})}n===h&&(" "!==i.charAt(n)&&"`"!==i.charAt(n)&&d("Unknown character ignored",i,n),n++)}}}}}(a.str),a.newline&&void 0===u.continueall&&I(),a.words&&function(t,i){if(t){"-"!==(i=r.strip(i)).charAt(i.length-1)&&(i+=" ");for(var n=[],a=0,s=!1,o=function(t){var o=r.strip(i.substring(a,t));if(a=t+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=i.charAt(t);return"_"!==c&&"-"!==c&&(c=" "),n.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<i.length;c++)switch(i.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&n.length>0&&(r.last(n).divider="-",n.push({skip:!0,to:"next"}));break;case"_":o(c),n.push({skip:!0,to:"slur"});break;case"*":o(c),n.push({skip:!0,to:"next"});break;case"|":o(c),n.push({skip:!0,to:"bar"});break;case"~":s=!0}r.each(t,function(t){if(0!==n.length)if(n[0].skip){switch(n[0].to){case"next":case"slur":"note"===t.el_type&&null!==t.pitches&&n.shift();break;case"bar":"bar"===t.el_type&&n.shift()}"bar"!==t.el_type&&(void 0===t.lyric?t.lyric=[{syllable:"",divider:" "}]:t.lyric.push({syllable:"",divider:" "}))}else if("note"===t.el_type&&void 0===t.rest){var e=n.shift();e.syllable&&(e.syllable=e.syllable.replace(/ +/g," ")),void 0===t.lyric?t.lyric=[e]:t.lyric.push(e)}})}else d("Can't add words before the first line of music",t,0)}(t.getCurrentVoice(),n.substring(2)),a.symbols&&function(t,i){if(t){"-"!==(i=r.strip(i)).charAt(i.length-1)&&(i+=" ");for(var n=[],a=0,s=!1,o=function(t){var o=r.strip(i.substring(a,t));if(a=t+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=i.charAt(t);return"_"!==c&&"-"!==c&&(c=" "),n.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<i.length;c++)switch(i.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&n.length>0&&(r.last(n).divider="-",n.push({skip:!0,to:"next"}));break;case"_":o(c),n.push({skip:!0,to:"slur"});break;case"*":o(c),n.push({skip:!0,to:"next"});break;case"|":o(c),n.push({skip:!0,to:"bar"});break;case"~":s=!0}r.each(t,function(t){if(0!==n.length)if(n[0].skip)switch(n[0].to){case"next":case"slur":"note"===t.el_type&&null!==t.pitches&&n.shift();break;case"bar":"bar"===t.el_type&&n.shift()}else if("note"===t.el_type&&void 0===t.rest){var e=n.shift();void 0===t.lyric?t.lyric=[e]:t.lyric.push(e)}})}else d("Can't add symbols before the first line of music",t,0)}(t.getCurrentVoice(),n.substring(2)),a.recurse&&i(a.str)};function D(t,e){t.push({el_type:"hint"});for(var i=0;i<e.length;i++){var n=e[i],a=r.clone(n);if(t.push(a),"bar"===n.el_type)return}}function H(t,e){for(var i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var a=0;a<n.voices.length;a++){var s=n.voices[a],o=r.voices[a];o&&D(o,s)}}}this.parse=function(i,a){a||(a={}),t.reset(),a.print&&(t.media="print"),u.reset(),a.visualTranspose?(u.globalTranspose=parseInt(a.visualTranspose),0===u.globalTranspose&&(u.globalTranspose=void 0)):u.globalTranspose=void 0,p.reset(e,d,u,t),i=r.gsub(i,"\r\n","\n"),i=r.gsub(i,"\r","\n");var s=(i=(i=(i+="\n").replace(/\n\\.*\n/g,"\n")).replace(/\\([ \t]*)(%.*)*\n/g,function(t,e,i){return e+" "+(i?"                                                                                                                                                                                                     ".substring(0,i.length):"")})).split("\n");0===r.last(s).length&&s.pop();try{a.format&&n.globalFormatting(a.format),r.each(s,function(i){if(a.header_only&&!1===u.is_in_header)throw"normal_abort";if(a.stop_on_warning&&u.warnings)throw"normal_abort";u.is_in_history?":"===i.charAt(1)?(u.is_in_history=!1,L(i)):t.addMetaText("history",e.translateString(e.stripComment(i))):u.inTextBlock?r.startsWith(i,"%%endtext")?(t.addText(u.textBlock),u.inTextBlock=!1):r.startsWith(i,"%%")?u.textBlock+=" "+i.substring(2):u.textBlock+=" "+i:u.inPsBlock?r.startsWith(i,"%%endps")?u.inPsBlock=!1:u.textBlock+=" "+i:L(i),u.iChar+=i.length+1});var o=792,c=612;switch(u.papersize){case"legal":o=1008,c=612;break;case"A4":o=842.4,c=597.6}if(u.landscape){var l=o;o=c,c=l}u.openSlurs=t.cleanUp(c,o,u.barsperstaff,u.staffnonote,u.openSlurs)}catch(t){if("normal_abort"!==t)throw t}a.hint_measures&&function(){for(var e=0;e<t.lines.length;e++){var i=t.lines[e].staff;if(i){for(var r=e+1;r<t.lines.length&&void 0===t.lines[r].staff;)r++;r<t.lines.length&&H(i,t.lines[r].staff)}}}()}}},function(t,e,i){"use strict";var r={},n={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},a=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],s=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];r.keySignature=function(t,e,i,r,o){var c=e[i];if(!c)return c;if(!t.globalTranspose)return{accidentals:c,root:r,acc:o};if(t.globalTransposeOrigKeySig=c,t.globalTranspose%12==0)return t.globalTransposeVerticalMovement=t.globalTranspose/12*7,{accidentals:c,root:r,acc:o};var l=i[0];"b"===i[1]||"#"===i[1]?(l+=i[1],i=i.substr(2)):i=i.substr(1);for(var h=n[l]+t.globalTranspose;h<0;)h+=12;h>11&&(h%=12);var u="m"===i[0]?s[h]:a[h],f=u+i,d=e[f];d.length>0&&"flat"===d[0].acc&&(t.globalTransposePreferFlats=!0);var p=f.charCodeAt(0)-l.charCodeAt(0);return t.globalTranspose>0?p<0?p+=7:0===p&&("#"!==l[1]&&"b"!==f[1]||(p+=7)):t.globalTranspose<0&&(p>0?p-=7:0===p&&("b"!==l[1]&&"#"!==f[1]||(p-=7))),t.globalTranspose>0?t.globalTransposeVerticalMovement=p+7*Math.floor(t.globalTranspose/12):t.globalTransposeVerticalMovement=p+7*Math.ceil(t.globalTranspose/12),{accidentals:d,root:u[0],acc:u.length>1?u[1]:""}};var o=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],c=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"];r.chordName=function(t,e){if(t.globalTranspose&&t.globalTranspose%12!=0){for(var i=t.globalTranspose;i<0;)i+=12;i>11&&(i%=12);for(var r=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/C♭/g,"`~11`")).replace(/D♭/g,"`~1`")).replace(/E♭/g,"`~3`")).replace(/F♭/g,"`~4`")).replace(/G♭/g,"`~6`")).replace(/A♭/g,"`~8`")).replace(/B♭/g,"`~10`")).replace(/C♯/g,"`~1`")).replace(/D♯/g,"`~3`")).replace(/E♯/g,"`~5`")).replace(/F♯/g,"`~6`")).replace(/G♯/g,"`~8`")).replace(/A♯/g,"`~10`")).replace(/B♯/g,"`~0`")).replace(/C/g,"`~0`")).replace(/D/g,"`~2`")).replace(/E/g,"`~4`")).replace(/F/g,"`~5`")).replace(/G/g,"`~7`")).replace(/A/g,"`~9`")).replace(/B/g,"`~11`")).split("`"),n=0;n<r.length;n++)if("~"===r[n][0]){var a=parseInt(r[n].substr(1),10);(a+=i)>11&&(a-=12),r[n]=t.globalTransposePreferFlats?c[a]:o[a]}e=r.join("")}return e};var l=["c","d","e","f","g","a","b"];var h={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},u={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"};r.note=function(t,e){if(t.globalTranspose){var i=e.pitch;if(e.pitch=e.pitch+t.globalTransposeVerticalMovement,e.accidental){var r=function(t,e,i,r,n){for(var a=l[(t+49)%7],s=0,o=0;o<r.length;o++)r[o].note.toLowerCase()===a&&(s=h[r[o].acc]);for(var c=h[i]-s,u=l[(e+49)%7],f=0,d=0;d<n.accidentals.length;d++)n.accidentals[d].note.toLowerCase()===u&&(f=h[n.accidentals[d].acc]);var p=c+f;return p<-2&&(e--,p+="c"===u||"f"===u?1:2),p>2&&(e++,p-="b"===u||"e"===u?1:2),[e,p]}(i,e.pitch,e.accidental,t.globalTransposeOrigKeySig,t.key);e.pitch=r[0],e.accidental=u[r[1]]}}},t.exports=r},function(t,e,i){"use strict";var r=i(1),n=i(24),a=i(38),s=i(9),o=function(t,e){e=e||{},t||(t=s(e.elementId,e.staffwidth,e.staffheight)),this.responsive=e.responsive,this.space=3*r.SPACE,this.scale=e.scale||void 0,e.staffwidth?(this.staffwidthScreen=e.staffwidth,this.staffwidthPrint=e.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.editable=e.editable||!1,this.listeners=[],e.clickListener&&this.addSelectListener(e.clickListener),this.usingSvg=!(!window.SVGAngle&&!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")),this.usingSvg&&e.add_classes&&(s._availableAttrs.class=""),s._availableAttrs["text-decoration"]="",s._availableAttrs["data-vertical"]="",this.renderer=new a(t,e.regression,e.add_classes),this.renderer.setPaddingOverride(e),this.renderer.controller=this,this.reset()};function c(t,e,i,r,n,a,s){return t&&r/i<.66&&!e?null:Math.abs(i-r)<2?null:a>0?((n=(i-(r-a*n))/a)*s>50&&(n=50/s),n):null}o.prototype.reset=function(){this.selected=[],this.ingroup=!1,this.staffgroups=[],this.lastStaffGroupIndex=-1,this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset()},o.prototype.engraveABC=function(t,e){void 0===t[0]&&(t=[t]),this.reset();for(var i=0;i<t.length;i++)void 0===e&&(e=i),this.engraveTune(t[i],e);if(this.renderer.doRegression)return this.renderer.regressionLines.join("\n")},o.prototype.adjustNonScaledItems=function(t){this.width/=t,this.renderer.adjustNonScaledItems(t)},o.prototype.engraveTune=function(t,e){this.renderer.lineNumber=null,t.formatting.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},this.renderer.abctune=t,this.renderer.setVerticalSpace(t.formatting),this.renderer.measureNumber=null,this.renderer.noteNumber=null,this.renderer.setPrintMode("print"===t.media);var i,r,a=t.formatting.scale?t.formatting.scale:this.scale;"resize"===this.responsive&&(a=void 0),void 0===a&&(a=this.renderer.isPrint?.75:1),this.renderer.setPadding(t),this.engraver=new n(t.formatting.bagpipes,this.renderer,e),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.renderer.engraver=this.engraver,t.formatting.staffwidth?this.width=1.33*t.formatting.staffwidth:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen,this.adjustNonScaledItems(a);var s=!1;for(i=0;i<t.lines.length;i++)(r=t.lines[i]).staff&&(r.staffGroup=this.engraver.createABCLine(r.staff,s?null:t.metaText.tempo),s=!0);var o=this.width;for(i=0;i<t.lines.length;i++)(r=t.lines[i]).staff&&(this.setXSpacing(r.staffGroup,t.formatting,i===t.lines.length-1),r.staffGroup.w>o&&(o=r.staffGroup.w));for(i=0;i<t.lines.length;i++)if((r=t.lines[i]).staffGroup&&r.staffGroup.voices){for(var c=0;c<r.staffGroup.voices.length;c++)r.staffGroup.voices[c].layoutBeams();r.staffGroup.setUpperAndLowerElements(this.renderer)}for(i=0;i<t.lines.length;i++)(r=t.lines[i]).staffGroup&&(r.staffGroup.height=r.staffGroup.calcHeight());this.renderer.topMargin(t),this.renderer.engraveTopText(this.width,t),this.renderer.addMusicPadding(),this.staffgroups=[],this.lastStaffGroupIndex=-1;for(var l=0;l<t.lines.length;l++)this.renderer.lineNumber=l,(r=t.lines[l]).staff?this.engraveStaffLine(r.staffGroup):r.subtitle&&0!==l?this.renderer.outputSubtitle(this.width,r.subtitle):void 0!==r.text&&this.renderer.outputFreeText(r.text);this.renderer.moveY(24),this.renderer.engraveExtraText(this.width,t),this.renderer.setPaperSize(o,a,this.responsive)},o.prototype.setXSpacing=function(t,e,i){for(var r=this.space,n=0;n<3;n++){if(t.layout(r,this.renderer,!1),null===(r=c(i,!!e.stretchlast&&e.stretchlast,this.width+this.renderer.padding.left,t.w,r,t.spacingunits,t.minspace)))break}!function(t){for(var e=0;e<t.length;e++)for(var i=t[e],r=1;r<i.children.length-1;r++){var n=i.children[r];if(n.abcelem.rest&&("whole"===n.abcelem.rest.type||"multimeasure"===n.abcelem.rest.type)){var a=i.children[r-1],s=i.children[r+1],o=(s.x-a.x)/2+a.x;n.x=o-n.w/2;for(var c=0;c<n.children.length;c++)n.children[c].x=n.x}}}(t.voices)},o.prototype.engraveStaffLine=function(t){this.lastStaffGroupIndex>-1&&this.renderer.addStaffPadding(this.staffgroups[this.lastStaffGroupIndex],t),this.renderer.voiceNumber=null,t.draw(this.renderer);var e=t.height*r.STEP;this.staffgroups[this.staffgroups.length]=t,this.lastStaffGroupIndex=this.staffgroups.length-1,this.renderer.y+=e},o.prototype.notifySelect=function(t,e,i){this.clearSelection(),t.highlight&&(this.selected=[t],t.highlight());for(var r=t.abcelem||{},n=0;n<this.listeners.length;n++)this.listeners[n](r,e,i)},o.prototype.clearSelection=function(){for(var t=0;t<this.selected.length;t++)this.selected[t].unhighlight();this.selected=[]},o.prototype.addSelectListener=function(t){this.listeners[this.listeners.length]=t},o.prototype.rangeHighlight=function(t,e){this.clearSelection();for(var i=0;i<this.staffgroups.length;i++)for(var r=this.staffgroups[i].voices,n=0;n<r.length;n++)for(var a=r[n].children,s=0;s<a.length;s++){var o=a[s].abcelem.startChar,c=a[s].abcelem.endChar;(e>o&&t<c||e===t&&e===c)&&(this.selected[this.selected.length]=a[s],a[s].highlight())}},t.exports=o},function(t,e,i){"use strict";var r=function(t,e,i,r,n){this.anchor1=t,this.anchor2=e,this.above=i,this.force=r,this.isTie=n};r.prototype.setEndAnchor=function(t){this.anchor2=t,this.isTie&&(this.anchor1&&(this.anchor1.isTie=!0),this.anchor2&&(this.anchor2.isTie=!0))},r.prototype.setStartX=function(t){this.startLimitX=t},r.prototype.setEndX=function(t){this.endLimitX=t},r.prototype.setHint=function(){this.hint=!0},r.prototype.setUpperAndLowerElements=function(t){},r.prototype.layout=function(t,e){function i(t,e,i){return i?t.pitch:e&&void 0!==t.highestVert?t.highestVert:t.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.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.startX=t,this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=e,this.anchor1&&this.anchor2?(this.startY=i(this.anchor1,this.above,this.isTie),this.endY=i(this.anchor2,this.above,this.isTie)):this.anchor1?(this.startY=i(this.anchor1,this.above,this.isTie),this.endY=i(this.anchor1,this.above,this.isTie)):this.anchor2?(this.startY=i(this.anchor2,this.above,this.isTie),this.endY=i(this.anchor2,this.above,this.isTie)):(this.startY=this.above?14:0,this.endY=this.above?14:0)},r.prototype.draw=function(t,e,i){var r;this.layout(e,i),this.hint&&(r="abcjs-hint"),t.drawArc(this.startX,this.endX,this.startY,this.endY,this.above,r,this.isTie)},t.exports=r},function(t,e,i){"use strict";var r,n=i(52),a=i(53),s=i(54),o=i(55);!function(){function t(t){return 60+t}r=function(e,i){void 0===i&&(i={});var r=o(e,i),c=n(r,i),l=s(),h=new a,u=e.metaText?e.metaText.title:void 0;u&&u.length>128&&(u=u.substring(0,124)+"..."),l.setGlobalInfo(c.tempo,u),h.setGlobalInfo(c.tempo,u);for(var f=0;f<c.tracks.length;f++){l.startTrack(),h.startTrack();for(var d=0;d<c.tracks[f].length;d++){var p=c.tracks[f][d];switch(p.cmd){case"program":l.setChannel(p.channel),l.setInstrument(p.instrument),h.setChannel(p.channel),h.setInstrument(p.instrument);break;case"start":l.startNote(t(p.pitch),p.volume),h.startNote(t(p.pitch),p.volume);break;case"stop":l.endNote(t(p.pitch),0),h.endNote(t(p.pitch));break;case"move":l.addRest(1920*p.duration),h.addRest(1920*p.duration);break;default:console.log("MIDI create Unknown: "+p.cmd)}}l.endTrack(),h.endTrack()}var m=l.getData(),g=h.getData();return void 0===i.generateInline&&(i.generateInline=!0),i.generateInline&&i.generateDownload?{download:m,inline:g}:i.generateInline?g:m}}(),t.exports=r},function(t,e,i){"use strict";i(17);var r=i(18);window.ABCJS=r},function(t,e,i){"use strict"},function(t,e,i){"use strict";var r=i(19),n=i(5),a={signature:"abcjs-midi v4.0.0"};Object.keys(r).forEach(function(t){a[t]=r[t]}),Object.keys(n).forEach(function(t){a[t]=n[t]}),a.renderAbc=i(23),a.renderMidi=i(39);var s=i(56);a.Editor=s,i(58);var o=i(10);a.midi={setSoundFont:o.setSoundFont,startPlaying:o.startPlaying,stopPlaying:o.stopPlaying},t.exports=a},function(t,e,i){"use strict";var r=i(1),n={};!function(){function t(t,e){var i=t.getAttribute("class"),r=" "+e+" ";return 1===t.nodeType&&(" "+i+" ").replace(/[\t\r\n\f]/g," ").indexOf(r)>=0}function e(e,i,r){for(var n=e.getElementsByClassName(i),a=[],s=0;s<n.length;s++)t(n[s],r)&&a.push(n[s]);return a}var i,a,s,o,c,l,h,u,f,d,p,m,g=!1;function v(t){s.style.marginTop=-t+"px",o=t}n.startAnimation=function(b,y,x){if(void 0!==b.getElementsByClassName)if(void 0!==y.getBeatLength)if(!(x.scrollHorizontal||x.scrollVertical||x.scrollHint)||(t(b,"abcjs-inner")||(b.scrollTop=0,b.style.overflow="hidden",b=b.children[0]),t(b,"abcjs-inner"))){n.stopAnimation(),c=b,l=x.scrollVertical||x.scrollHint,x.showCursor&&((h=document.createElement("DIV")).className="abcjs-cursor cursor",h.style.position="absolute",b.appendChild(h),b.style.position="relative"),g=!1;var w,k=function(t,e){return e.bpm?e.bpm:t&&t.metaText&&t.metaText.tempo&&t.metaText.tempo.bpm?t.metaText.tempo.bpm:120}(y,x)/6e4,A=y.getBeatLength();if(x.scrollVertical)w=1/k*(1/A)/2,s=function t(e){for(var i,r=0;r<document.styleSheets.length&&void 0===i;r++){var n=document.styleSheets[r].rules;if(n)for(var a=0;a<n.length&&void 0===i;a++)n[a].selectorText&&n[a].selectorText===e&&(i=n[a])}return i||(document.styleSheets[0].insertRule(e+" { }",1),t(e))}(".abcjs-inner");f=!1;var _=11,S=1,T=b.parentNode;x.scrollHorizontal&&(b.style.marginLeft="0px",i=setTimeout(function t(){var e=b.style.marginLeft;e=""===e?0:parseInt(e),e-=S,b.style.marginLeft=e+"px",e>T.offsetWidth-b.scrollWidth&&(i=setTimeout(t,_))},2700));var C=[];!function(t){for(var e={},i=0,n=!1,a=0;a<t.staffgroups.length;a++){for(var s=t.staffgroups[a],o=s.voices,c=s.staffs[0],l=c.absoluteY,h=l-c.top*r.STEP,u=s.staffs[s.staffs.length-1],f=(l=u.absoluteY)-u.bottom*r.STEP-h,d=0,p=0;p<o.length;p++){for(var m=i,g=o[p].children,v=0;v<g.length;v++){var b=g[v];if(b.hint)break;if(b.duration>0){var y=b.startTie;n?y||(n=!1):(e["event"+m]?e["event"+m].left=Math.min(e["event"+m].left,b.x):e["event"+m]={type:"event",time:m,top:h,height:f,left:b.x,width:b.w},y&&(n=!0)),m+=b.durationClass?b.durationClass:b.duration}if("bar"===b.type&&(0===C.length||"bar"!==C[C.length-1])&&b.elemset&&b.elemset.length>0&&b.elemset[0].attrs){for(var w,k,_=b.elemset[0].attrs.class.split(" "),S=0;S<_.length;S++){var T=/m(\d+)/.exec(_[S]);T&&(k=T[1]),(T=/l(\d+)/.exec(_[S]))&&(w=T[1])}e["bar"+m]={type:"bar",time:m,lineNum:w,measureNum:k}}}d=Math.max(d,m)}i=d}C=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e=e.sort(function(t,e){var i=t.time-e.time;return 0!==i?i:"bar"===t.type?-1:1})}(e),C[C.length-1].time/A,x.scrollVertical&&function(t){for(var e,i,r,n,a=t.length-1;a>=0;a--){var s=t[a];"bar"===s.type?(s.top=r,s.nextTop=e,e=r,s.bottom=n,s.nextBottom=i,i=n):"event"===s.type&&(r=s.top,n=s.top+s.height)}}(C)}(y.engraver);var N=-1;if(o=0,x.scrollVertical&&v(0),m=function(){if(g)n.stopAnimation();else{var t=(new Date).getTime();if(f)p=t-d;else{var e=E(),i=u+e/k-t;i<=0?m():a=setTimeout(m,i)}}},u=(u=new Date).getTime(),f=!1,x.hideCurrentMeasure){var M=I(0,-1);M&&B(M[0],M[1])}m()}else console.error("ABCJS.startAnimation: When using scrollHorizontal/scrollVertical/scrollHint, the music must have been rendered using viewportHorizontal/viewportVertical.");else console.error("ABCJS.startAnimation: The second parameter must be a single tune. (Did you pass the entire array of tunes?)");else console.error("ABCJS.startAnimation: The first parameter must be a regular DOM element. (Did you pass a jQuery object or an ID?)");function I(t,i){t=parseInt(t,10),i=parseInt(i,10);var r=e(b,"l"+t,"m"+ ++i);return r.length>0?[t,i]:(r=e(b,"l"+ ++t,"m"+(i=0))).length>0?[t,i]:null}function B(i,r){var n=e(b,"l"+i,"m"+r);if(n.length>0)for(var a=0;a<n.length;a++){var s=n[a];t(s,"bar")||(s.style.display="none")}}function E(){var t=C.shift();if(!t)return g=!0,0;if("bar"===t.type){if(x.scrollVertical&&function(t){return t.top!==t.nextTop&&void 0!==t.nextTop}(t)&&function(t,e,i){var r=parseInt(t.clientHeight,10);return!(i.nextBottom-e<r)}(T,o,t)&&setTimeout(function(){v(t.nextTop)},w),x.hideCurrentMeasure){var e=I(t.lineNum,t.measureNum);e&&B(e[0],e[1])}else x.hideFinishedMeasures&&B(t.lineNum,t.measureNum);return C.length>0?C[0].time/A:0}return x.scrollHint&&N!==t.top&&v(N=t.top),x.showCursor&&h&&h.style&&(h.style.left=t.left+"px",h.style.top=t.top+"px",h.style.width=t.width+"px",h.style.height=t.height+"px"),C.length>0?C[0].time/A:(g=!0,0)}},n.pauseAnimation=function(t){if(m){if(t&&!f)f=!0,d=(new Date).getTime();else if(!t&&f){var e=(new Date).getTime();u+=e-d,d=void 0,f=!1,a=setTimeout(m,p),p=void 0}}else console.warn("Cannot call pauseAnimation before calling startAnimation")},n.stopAnimation=function(){clearTimeout(a),clearTimeout(i),h&&(h.remove(),h=null),l&&(c&&c.parentNode&&(c.parentNode.style.overflowY="auto"),v(0))}}(),t.exports=n},function(t,e,i){"use strict";var r=i(0),n=i(7),a=i(8);t.exports=function(t,e,i,s){this.reset=function(t,e,i,r){a.initialize(t,e,i,r),n.initialize(t,e,i,r)},this.reset(t,e,i,s),this.setTitle=function(e){if(i.hasMainTitle)s.addSubtitle(t.translateString(t.stripComment(e)));else{var r=t.translateString(t.theReverser(t.stripComment(e)));i.titlecaps&&(r=r.toUpperCase()),s.addMetaText("title",r),i.hasMainTitle=!0}},this.setMeter=function(r){if("C"===(r=t.stripComment(r)))return!0===i.havent_set_length&&(i.default_length=.125,i.havent_set_length=!1),{type:"common_time"};if("C|"===r)return!0===i.havent_set_length&&(i.default_length=.125,i.havent_set_length=!1),{type:"cut_time"};if("o"===r)return!0===i.havent_set_length&&(i.default_length=.125,i.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===r)return!0===i.havent_set_length&&(i.default_length=.125,i.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===r)return!0===i.havent_set_length&&(i.default_length=.125,i.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===r)return!0===i.havent_set_length&&(i.default_length=.125,i.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===r.length||"none"===r.toLowerCase())return!0===i.havent_set_length&&(i.default_length=.125,i.havent_set_length=!1),null;var n=t.tokenize(r,0,r.length);try{var a=function(){var t=function(){var t={value:0,num:""},e=n.shift();for("("===e.token&&(e=n.shift());;){if("number"!==e.type)throw"Expected top number of meter";if(t.value+=parseInt(e.token),t.num+=e.token,0===n.length||"/"===n[0].token)return t;if(")"===(e=n.shift()).token){if(0===n.length||"/"===n[0].token)return t;throw"Unexpected paren in meter"}if("."!==e.token&&"+"!==e.token)throw"Expected top number of meter";if(t.num+=e.token,0===n.length)throw"Expected top number of meter";e=n.shift()}return t}();if(0===n.length)return t;var e=n.shift();if("/"!==e.token)throw"Expected slash in meter";if("number"!==(e=n.shift()).type)throw"Expected bottom number of meter";return t.den=e.token,t.value=t.value/parseInt(t.den),t};if(0===n.length)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},o=0;;){var c=a();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),s.value.push(l),0===n.length)break}return!0===i.havent_set_length&&(i.default_length=o<.75?.0625:.125,i.havent_set_length=!1),s}catch(t){e(t,r,0)}return null},this.calcTempo=function(t){var e=.25;i.meter&&"specified"===i.meter.type?e=1/parseInt(i.meter.value[0].den):i.origMeter&&"specified"===i.origMeter.type&&(e=1/parseInt(i.origMeter.value[0].den));for(var r=0;r<t.duration;r++)t.duration[r]=e*t.duration[r];return t},this.resolveTempo=function(){i.tempo&&(this.calcTempo(i.tempo),s.metaText.tempo=i.tempo,delete i.tempo)},this.addUserDefinition=function(t,n,a){var s=t.indexOf("=",n);if(-1!==s){var o=r.strip(t.substring(n,s)),c=r.strip(t.substring(s+1));1===o.length?-1!=="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~".indexOf(o)?0!==c.length?(void 0===i.macros&&(i.macros={}),i.macros[o]=c):e("Missing macro definition",t,n):e("Macro definitions must be H-Y, h-w, or tilde",t,n):e("Macro definitions can only be one character",t,n)}else e("Need an = in a macro definition",t,n)},this.setDefaultLength=function(t,e,n){var a=r.gsub(t.substring(e,n)," ","").split("/");if(2===a.length){var s=parseInt(a[0]),o=parseInt(a[1]);o>0&&(i.default_length=s/o,i.havent_set_length=!1)}else 1===a.length&&"1"===a[0]&&(i.default_length=1,i.havent_set_length=!1)};var o={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(r,n,a){try{var s=t.tokenize(r,n,a);if(0===s.length)throw"Missing parameter in Q: field";var c={},l=!0,h=s.shift();if("quote"===h.type&&(c.preString=h.token,h=s.shift(),0===s.length))return o[c.preString.toLowerCase()]&&(c.bpm=o[c.preString.toLowerCase()],c.suppressBpm=!0),{type:"immediate",tempo:c};if("alpha"===h.type&&"C"===h.token){if(0===s.length)throw"Missing tempo after C in Q: field";if("punct"===(h=s.shift()).type&&"="===h.token){if(0===s.length)throw"Missing tempo after = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected number after = in Q: field";c.duration=[1],c.bpm=parseInt(h.token)}else{if("number"!==h.type)throw"Expected number or equal after C in Q: field";if(c.duration=[parseInt(h.token)],0===s.length)throw"Missing = after duration in Q: field";if("punct"!==(h=s.shift()).type||"="!==h.token)throw"Expected = after duration in Q: field";if(0===s.length)throw"Missing tempo after = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected number after = in Q: field";c.bpm=parseInt(h.token)}}else{if("number"!==h.type)throw"Unknown value in Q: field";var u=parseInt(h.token);if(0===s.length||"quote"===s[0].type)c.duration=[1],c.bpm=u;else{if(l=!1,"punct"!==(h=s.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";var f=parseInt(h.token);for(c.duration=[u/f];s.length>0&&"="!==s[0].token&&"quote"!==s[0].type;){if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";if(u=parseInt(h.token),"punct"!==(h=s.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";f=parseInt(h.token),c.duration.push(u/f)}if("punct"!==(h=s.shift()).type&&"="!==h.token)throw"Expected = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected tempo in Q: field";c.bpm=parseInt(h.token)}}if(0!==s.length&&("quote"===(h=s.shift()).type&&(c.postString=h.token,h=s.shift()),0!==s.length))throw"Unexpected string at end of Q: field";return!1===i.printTempo&&(c.suppress=!0),{type:l?"delaySet":"immediate",tempo:c}}catch(t){return e(t,r,n),{type:"none"}}},this.letter_to_inline_header=function(r,o){var c=t.eatWhiteSpace(r,o);if(o+=c,r.length>=o+5&&"["===r.charAt(o)&&":"===r.charAt(o+2)){var l=r.indexOf("]",o);switch(r.substring(o,o+3)){case"[I:":var h=n.addDirective(r.substring(o+3,l));return h&&e(h,r,o),[l-o+1+c];case"[M:":var u=this.setMeter(r.substring(o+3,l));return s.hasBeginMusic()&&u?s.appendStartingElement("meter",-1,-1,u):i.meter=u,[l-o+1+c];case"[K:":var f=a.parseKey(r.substring(o+3,l));return f.foundClef&&s.hasBeginMusic()&&s.appendStartingElement("clef",-1,-1,i.clef),f.foundKey&&s.hasBeginMusic()&&s.appendStartingElement("key",-1,-1,a.fixKey(i.clef,i.key)),[l-o+1+c];case"[P:":return s.lines.length<=s.lineNum?i.partForNextLine=r.substring(o+3,l):s.appendElement("part",-1,-1,{title:r.substring(o+3,l)}),[l-o+1+c];case"[L:":return this.setDefaultLength(r,o+3,l),[l-o+1+c];case"[Q:":if(l>0){var d=this.setTempo(r,o+3,l);return"delaySet"===d.type?s.appendElement("tempo",-1,-1,this.calcTempo(d.tempo)):"immediate"===d.type&&s.appendElement("tempo",-1,-1,d.tempo),[l-o+1+c,r.charAt(o+1),r.substring(o+3,l)]}break;case"[V:":if(l>0)return a.parseVoice(r,o+3,l),[l-o+1+c,r.charAt(o+1),r.substring(o+3,l)]}}return[0]},this.letter_to_body_header=function(t,o){if(t.length>=o+3)switch(t.substring(o,o+2)){case"I:":var c=n.addDirective(t.substring(o+2));return c&&e(c,t,o),[t.length];case"M:":var l=this.setMeter(t.substring(o+2));return s.hasBeginMusic()&&l&&s.appendStartingElement("meter",-1,-1,l),[t.length];case"K:":var h=a.parseKey(t.substring(o+2));return h.foundClef&&s.hasBeginMusic()&&s.appendStartingElement("clef",-1,-1,i.clef),h.foundKey&&s.hasBeginMusic()&&s.appendStartingElement("key",-1,-1,a.fixKey(i.clef,i.key)),[t.length];case"P:":return s.hasBeginMusic()&&s.appendElement("part",-1,-1,{title:t.substring(o+2)}),[t.length];case"L:":return this.setDefaultLength(t,o+2,t.length),[t.length];case"Q:":var u=t.indexOf("",o+2);-1===u&&(u=t.length);var f=this.setTempo(t,o+2,u);return"delaySet"===f.type?s.appendElement("tempo",-1,-1,this.calcTempo(f.tempo)):"immediate"===f.type&&s.appendElement("tempo",-1,-1,f.tempo),[u,t.charAt(o),r.strip(t.substring(o+2))];case"V:":return a.parseVoice(t,o+2,t.length),[t.length,t.charAt(o),r.strip(t.substring(o+2))]}return[0]};var c={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(o){if(r.startsWith(o,"%%")){var l=n.addDirective(o.substring(2));return l&&e(l,o,2),{}}var h=o.indexOf("%");if(h>=0&&(o=o.substring(0,h)),0===(o=o.replace(/\s+$/,"")).length)return{};if(o.length>=2&&":"===o.charAt(1)){var u="";o.indexOf("")>=0&&"w"!==o.charAt(0)&&(u=o.substring(o.indexOf("")+1),o=o.substring(0,o.indexOf("")));var f=c[o.charAt(0)];if(void 0!==f)return"unalignedWords"===f?s.addMetaTextArray(f,n.parseFontChangeLine(t.translateString(t.stripComment(o.substring(2))))):s.addMetaText(f,t.translateString(t.stripComment(o.substring(2)))),{};switch(o.charAt(0)){case"H":s.addMetaText("history",t.translateString(t.stripComment(o.substring(2)))),i.is_in_history=!0;break;case"K":this.resolveTempo();var d=a.parseKey(o.substring(2));!i.is_in_header&&s.hasBeginMusic()&&(d.foundClef&&s.appendStartingElement("clef",-1,-1,i.clef),d.foundKey&&s.appendStartingElement("key",-1,-1,a.fixKey(i.clef,i.key))),i.is_in_header=!1;break;case"L":this.setDefaultLength(o,2,o.length);break;case"M":i.origMeter=i.meter=this.setMeter(o.substring(2));break;case"P":i.is_in_header?s.addMetaText("partOrder",t.translateString(t.stripComment(o.substring(2)))):i.partForNextLine=t.translateString(t.stripComment(o.substring(2)));break;case"Q":var p=this.setTempo(o,2,o.length);"delaySet"===p.type?i.tempo=p.tempo:"immediate"===p.type&&(s.metaText.tempo=p.tempo);break;case"T":this.setTitle(o.substring(2));break;case"U":this.addUserDefinition(o,2,o.length);break;case"V":if(a.parseVoice(o,2,o.length),!i.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":e("Ignored header",o,0);break;default:return u.length&&(u=""+u),{regular:!0,str:o+u}}return u.length>0?{recurse:!0,str:u}:{}}return{regular:!0,str:o}}}},function(t,e,i){"use strict";var r=i(0);t.exports=function(){this.skipWhiteSpace=function(t){for(var e=0;e<t.length;e++)if(!this.isWhiteSpace(t.charAt(e)))return e;return t.length};var t=function(t,e){return e>=t.length};this.eatWhiteSpace=function(t,e){for(var i=e;i<t.length;i++)if(!this.isWhiteSpace(t.charAt(i)))return i-e;return i-e},this.getKeyPitch=function(e){var i=this.skipWhiteSpace(e);if(t(e,i))return{len:0};switch(e.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(t){if("bass"===t)return{len:0};switch(t.charAt(0)){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(e){var i=function(t,e){for(;e<t.length&&(t.charAt(e)>="a"&&t.charAt(e)<="z"||t.charAt(e)>="A"&&t.charAt(e)<="Z");)e++;return e},r=this.skipWhiteSpace(e);if(t(e,r))return{len:0};var n=e.substring(r,r+3).toLowerCase();switch((n.length>1&&" "===n.charAt(1)||"^"===n.charAt(1)||"_"===n.charAt(1)||"="===n.charAt(1))&&(n=n.charAt(0)),n){case"mix":return{len:i(e,r),token:"Mix"};case"dor":return{len:i(e,r),token:"Dor"};case"phr":return{len:i(e,r),token:"Phr"};case"lyd":return{len:i(e,r),token:"Lyd"};case"loc":return{len:i(e,r),token:"Loc"};case"aeo":return{len:i(e,r),token:"m"};case"maj":case"ion":return{len:i(e,r),token:""};case"min":case"m":return{len:i(e,r),token:"m"}}return{len:0}},this.getClef=function(e,i){var n=e,a=this.skipWhiteSpace(e);if(t(e,a))return{len:0};var s=!1,o=e.substring(a);if(r.startsWith(o,"clef=")&&(s=!0,o=o.substring(5),a+=5),0===o.length&&s)return{len:a+5,warn:"No clef specified: "+n};var c=this.skipWhiteSpace(o);if(t(o,c))return{len:0};c>0&&(a+=c,o=o.substring(c));var l=null;if(r.startsWith(o,"treble"))l="treble";else if(r.startsWith(o,"bass3"))l="bass3";else if(r.startsWith(o,"bass"))l="bass";else if(r.startsWith(o,"tenor"))l="tenor";else if(r.startsWith(o,"alto2"))l="alto2";else if(r.startsWith(o,"alto1"))l="alto1";else if(r.startsWith(o,"alto"))l="alto";else if(!i&&s&&r.startsWith(o,"none"))l="none";else if(r.startsWith(o,"perc"))l="perc";else if(!i&&s&&r.startsWith(o,"C"))l="tenor";else if(!i&&s&&r.startsWith(o,"F"))l="bass";else{if(i||!s||!r.startsWith(o,"G"))return{len:a+5,warn:"Unknown clef specified: "+n};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:a+l.length,token:l,explicit:s}},this.getBarLine=function(t,e){switch(t.charAt(e)){case"]":switch(++e,t.charAt(e)){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++e,t.charAt(e)>="1"&&t.charAt(e)<="9"||'"'===t.charAt(e)?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(++e,t.charAt(e)){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++e,t.charAt(e)){case"]":switch(++e,t.charAt(e)){case"|":return++e,":"===t.charAt(e)?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}break;case"|":return++e,":"===t.charAt(e)?{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(++e,"|"!==t.charAt(e))return t.charAt(e)>="1"&&t.charAt(e)<="9"||'"'===t.charAt(e)?{len:1,token:"bar_invisible"}:{len:0};switch(++e,t.charAt(e)){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(++e,t.charAt(e)){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++e,":"===t.charAt(e)?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var i=0;":"===t.charAt(e+i);)i++;return{len:1+i,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(t,e){for(var i=0;i<t.length;i++)if(e.indexOf(t.charAt(i))<0)return{len:i,token:t.substring(0,i)};return{len:i,token:t}},this.getToken=function(t,e,i){for(var r=e;r<i&&!this.isWhiteSpace(t.charAt(r));)r++;return t.substring(e,r)},this.isMatch=function(e,i){var n=this.skipWhiteSpace(e);return t(e,n)?0:r.startsWith(e.substring(n),i)?n+i.length:0},this.getPitchFromTokens=function(t){var e={};if(e.position={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}[t[0].token],void 0===e.position)return{warn:"Pitch expected. Found: "+t[0].token};for(t.shift();t.length;)switch(t[0].token){case",":e.position-=7,t.shift();break;case"'":e.position+=7,t.shift();break;default:return e}return e},this.getKeyAccidentals2=function(t){for(var e;t.length>0;){var i;if("^"===t[0].token){if(i="sharp",t.shift(),0===t.length)return{accs:e,warn:"Expected note name after "+i};switch(t[0].token){case"^":i="dblsharp",t.shift();break;case"/":i="quartersharp",t.shift()}}else if("="===t[0].token)i="natural",t.shift();else{if("_"!==t[0].token)return{accs:e};if(i="flat",t.shift(),0===t.length)return{accs:e,warn:"Expected note name after "+i};switch(t[0].token){case"_":i="dblflat",t.shift();break;case"/":i="quarterflat",t.shift()}}if(0===t.length)return{accs:e,warn:"Expected note name after "+i};switch(t[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===e&&(e=[]),e.push({acc:i,note:t[0].token.charAt(0)}),1===t[0].token.length?t.shift():t[0].token=t[0].token.substring(1);break;default:return{accs:e,warn:"Expected note name after "+i+" Found: "+t[0].token}}}return{accs:e}},this.getKeyAccidental=function(e){var i={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},r=this.skipWhiteSpace(e);if(t(e,r))return{len:0};var n=null;switch(e.charAt(r)){case"^":case"_":case"=":n=e.charAt(r);break;default:return{len:0}}if(t(e,++r))return{len:1,warn:"Expected note name after accidental"};switch(e.charAt(r)){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:r+1,token:{acc:i[n],note:e.charAt(r)}};case"^":case"_":case"/":if(n+=e.charAt(r),t(e,++r))return{len:2,warn:"Expected note name after accidental"};switch(e.charAt(r)){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:r+1,token:{acc:i[n],note:e.charAt(r)}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(t){return" "===t||"\t"===t||""===t},this.getMeat=function(t,e,i){var r=t.indexOf("%",e);for(r>=0&&r<i&&(i=r);e<i&&(" "===t.charAt(e)||"\t"===t.charAt(e)||""===t.charAt(e));)e++;for(;e<i&&(" "===t.charAt(i-1)||"\t"===t.charAt(i-1)||""===t.charAt(i-1));)i--;return{start:e,end:i}};var e=function(t){return t>="A"&&t<="Z"||t>="a"&&t<="z"},i=function(t){return t>="0"&&t<="9"};this.tokenize=function(t,r,n,a){var s=this.getMeat(t,r,n);r=s.start,n=s.end;for(var o,c=[];r<n;){if('"'===t.charAt(r)){for(o=r+1;o<n&&'"'!==t.charAt(o);)o++;c.push({type:"quote",token:t.substring(r+1,o),start:r+1,end:o}),o++}else if(e(t.charAt(r))){if(o=r+1,a)for(;o<n&&!this.isWhiteSpace(t.charAt(o));)o++;else for(;o<n&&e(t.charAt(o));)o++;c.push({type:"alpha",token:t.substring(r,o),continueId:i(t.charAt(o)),start:r,end:o}),r=o+1}else if("."===t.charAt(r)&&i(t.charAt(o+1))){o=r+1;for(var l;o<n&&i(t.charAt(o));)o++;l=parseFloat(t.substring(r,o)),c.push({type:"number",token:t.substring(r,o),intt:null,floatt:l,continueId:e(t.charAt(o)),start:r,end:o}),r=o+1}else if(i(t.charAt(r))||"-"===t.charAt(r)&&i(t.charAt(o+1))){o=r+1;for(var h,u=null;o<n&&i(t.charAt(o));)o++;if("."===t.charAt(o)&&i(t.charAt(o+1)))for(o++;o<n&&i(t.charAt(o));)o++;else u=parseInt(t.substring(r,o));h=parseFloat(t.substring(r,o)),c.push({type:"number",token:t.substring(r,o),intt:u,floatt:h,continueId:e(t.charAt(o)),start:r,end:o}),r=o+1}else" "===t.charAt(r)||"\t"===t.charAt(r)?o=r+1:(c.push({type:"punct",token:t.charAt(r),start:r,end:r+1}),o=r+1);r=o}return c},this.getVoiceToken=function(t,e,i){for(var r=e;r<i&&this.isWhiteSpace(t.charAt(r))||"="===t.charAt(r);)r++;if('"'===t.charAt(r)){var n=t.indexOf('"',r+1);return-1===n||n>=i?{len:1,err:"Missing close quote"}:{len:n-e+1,token:this.translateString(t.substring(r+1,n))}}for(var a=r;a<i&&!this.isWhiteSpace(t.charAt(a))&&"="!==t.charAt(a);)a++;return{len:a-e+1,token:t.substring(r,a)}};var n={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å",aa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å",AA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~N":"Ñ","~n":"ñ","=s":"š",vs:"š",DH:"Ð",dh:"ð",HO:"Ő",Ho:"ő",HU:"Ű",Hu:"ű","'Y":"Ý","'y":"ý","^Y":"Ŷ","^y":"ŷ",'"Y':"Ÿ",'"y':"ÿ",vS:"Š",vZ:"Ž",vz:"ž"},a={"#":"♯",b:"♭","=":"♮"},s={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:"  ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};this.translateString=function(t){var e=t.split("\\");if(1===e.length)return t;var i=null;return r.each(e,function(t){if(null===i)i=t;else{var e=n[t.substring(0,2)];void 0!==e?i+=e+t.substring(2):void 0!==(e=s[t.substring(0,3)])?i+=e+t.substring(3):(e=a[t.substring(0,1)],i+=void 0!==e?e+t.substring(1):"\\"+t)}}),i},this.getNumber=function(t,e){for(var i=0;e<t.length;)switch(t.charAt(e)){case"0":i*=10,e++;break;case"1":i=10*i+1,e++;break;case"2":i=10*i+2,e++;break;case"3":i=10*i+3,e++;break;case"4":i=10*i+4,e++;break;case"5":i=10*i+5,e++;break;case"6":i=10*i+6,e++;break;case"7":i=10*i+7,e++;break;case"8":i=10*i+8,e++;break;case"9":i=10*i+9,e++;break;default:return{num:i,index:e}}return{num:i,index:e}},this.getFraction=function(t,e){var i=1,r=1;if("/"!==t.charAt(e)){var n=this.getNumber(t,e);i=n.num,e=n.index}if("/"===t.charAt(e)){if(e++,"/"===t.charAt(e)){for(var a=.5;"/"===t.charAt(e++);)a/=2;return{value:i*a,index:e-1}}var s=e,o=this.getNumber(t,e);0===o.num&&s===e&&(o.num=2),0!==o.num&&(r=o.num),e=o.index}return{value:i/r,index:e}},this.theReverser=function(t){return r.endsWith(t,", The")?"The "+t.substring(0,t.length-5):r.endsWith(t,", A")?"A "+t.substring(0,t.length-3):t},this.stripComment=function(t){var e=t.indexOf("%");return e>=0?r.strip(t.substring(0,e)):r.strip(t)},this.getInt=function(t){var e=parseInt(t);if(isNaN(e))return{digits:0};var i=""+e;return{value:e,digits:t.indexOf(i)+i.length}},this.getFloat=function(t){var e=parseFloat(t);if(isNaN(e))return{digits:0};var i=""+e;return{value:e,digits:t.indexOf(i)+i.length}},this.getMeasurement=function(t){if(0===t.length)return{used:0};var e=1,i="";if("-"===t[0].token)t.shift(),i="-",e++;else if("number"!==t[0].type)return{used:0};if(i+=t.shift().token,0===t.length)return{used:1,value:parseInt(i)};var r=t.shift();if("."===r.token){if(e++,0===t.length)return{used:e,value:parseInt(i)};if("number"===t[0].type&&(i=i+"."+(r=t.shift()).token,e++,0===t.length))return{used:e,value:parseFloat(i)};r=t.shift()}switch(r.token){case"pt":return{used:e+1,value:parseFloat(i)};case"cm":return{used:e+1,value:parseFloat(i)/2.54*72};case"in":return{used:e+1,value:72*parseFloat(i)};default:return t.unshift(r),{used:e,value:parseFloat(i)}}return{used:0}};var o=function(t){for(;-1!==t.indexOf("\\n");)t=t.replace("\\n","\n");return t};this.getBrackettedSubstring=function(t,e,i,r){for(var n=r||t.charAt(e),a=e+1;a<t.length&&t.charAt(a)!==n;)++a;return t.charAt(a)===n?[a-e+1,o(t.substring(e+1,a)),!0]:((a=e+i)>t.length-1&&(a=t.length-1),[a-e+1,o(t.substring(e+1,a)),!1])}}},function(t,e,i){"use strict";var r=i(0),n=i(8),a=i(1);t.exports=function(){this.getBeatLength=function(){for(var t=0;t<this.lines.length;t++)if(this.lines[t].staff)for(var e=0;e<this.lines[t].staff.length;e++)if(this.lines[t].staff[e].meter){var i=this.lines[t].staff[e].meter;if("specified"===i.type){if(i.value.length>0){var r=parseInt(i.value[0].num,10),n=parseInt(i.value[0].den,10);return 6===r&&8===n?3/8:9===r&&8===n?3/8:12===r&&8===n?3/8:1/n}return.25}return"cut_time"===i.type?.5:.25}return.25},this.getPickupLength=function(){for(var t=0,e=0;e<this.lines.length;e++)if(this.lines[e].staff)for(var i=0;i<this.lines[e].staff.length;i++)for(v=0;v<this.lines[e].staff[i].voices.length;v++)for(var r=this.lines[e].staff[i].voices[v],n=0;n<r.length;n++)if(r[n].duration&&(t+=r[n].duration),t>=this.getBarLength()&&(t-=this.getBarLength()),"bar"===r[n].el_type)return t;return t},this.getBarLength=function(){var t,e=this.getMeter();switch(e.type){case"common_time":t=1,this.meter={num:4,den:4};break;case"cut_time":t=1,this.meter={num:2,den:2};break;default:t=e.value[0].num/e.value[0].den,this.meter={num:parseInt(e.value[0].num,10),den:parseInt(e.value[0].den,10)}}return t},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.resolveOverlays=function(){for(var t=0;t<this.lines.length;t++){var e=this.lines[t];if(e.staff)for(var i=0;i<e.staff.length;i++){for(var r=e.staff[i],n=[],a=0;a<r.voices.length;a++){var s=r.voices[a];n.push({hasOverlay:!1,voice:[],snip:[]});for(var o=0,c=!1,l=-1,h=0;h<s.length;h++){var u=s[h];"overlay"===u.el_type?(c=!0,l=h,n[a].hasOverlay=!0):"bar"===u.el_type?(c?(c=!1,n[a].snip.push({start:l,len:h-l})):(n[a].voice.push({el_type:"note",duration:o,rest:{type:"invisible"},startChar:u.startChar,endChar:u.endChar}),n[a].voice.push(u)),o=0):"note"===u.el_type?c?n[a].voice.push(u):o+=u.duration:"scale"!==u.el_type&&"stem"!==u.el_type&&"style"!==u.el_type&&"transpose"!==u.el_type||n[a].voice.push(u)}}for(a=0;a<n.length;a++){var f=n[a];if(f.hasOverlay){r.voices.push(f.voice);for(var d=f.snip.length-1;d>=0;d--){var p=f.snip[d];r.voices[a].splice(p.start,p.len)}}}}}},this.cleanUp=function(t,e,i,a,s){this.closeLine(),this.metaText.tempo&&this.metaText.tempo.bpm&&!this.metaText.tempo.duration&&(this.metaText.tempo.duration=[this.getBeatLength()]);var o,c,l,h=!1;for(o=0;o<this.lines.length;o++)if(void 0!==this.lines[o].staff){var u=!1;for(c=0;c<this.lines[o].staff.length;c++)if(void 0===this.lines[o].staff[c])h=!0,this.lines[o].staff[c]=null;else for(l=0;l<this.lines[o].staff[c].voices.length;l++)void 0===this.lines[o].staff[c].voices[l]?this.lines[o].staff[c].voices[l]=[]:this.containsNotes(this.lines[o].staff[c].voices[l])&&(u=!0);u||(this.lines[o]=null,h=!0)}if(h&&(this.lines=r.compact(this.lines),r.each(this.lines,function(t){t.staff&&(t.staff=r.compact(t.staff))})),i)for(o=0;o<this.lines.length;o++)if(void 0!==this.lines[o].staff)for(c=0;c<this.lines[o].staff.length;c++){var f=[];for(l=0;l<this.lines[o].staff[c].voices.length;l++)for(var d=this.lines[o].staff[c].voices[l],p=0,m=0;m<d.length;m++)if("bar"===d[m].el_type){if(++p>=i&&m<d.length-1){if(o===this.lines.length-1){var g=JSON.parse(JSON.stringify(this.lines[o]));this.lines.push(r.clone(g));for(var v=0;v<this.lines[o+1].staff.length;v++)for(var b=0;b<this.lines[o+1].staff[v].voices.length;b++)this.lines[o+1].staff[v].voices[b]=[]}var y=m+1,x=this.lines[o].staff[c].voices[l].slice(y);this.lines[o].staff[c].voices[l]=this.lines[o].staff[c].voices[l].slice(0,y),this.lines[o+1].staff[c].voices[l]=f.concat(x.concat(this.lines[o+1].staff[c].voices[l]))}}else d[m].duration||f.push(d[m])}if(i){for(h=!1,o=0;o<this.lines.length;o++)if(void 0!==this.lines[o].staff)for(c=0;c<this.lines[o].staff.length;c++){var w=!1;for(l=0;l<this.lines[o].staff[c].voices.length;l++)this.containsNotesStrict(this.lines[o].staff[c].voices[l])&&(w=!0);w||(h=!0,this.lines[o].staff[c]=null)}h&&r.each(this.lines,function(t){t.staff&&(t.staff=r.compact(t.staff))})}for(o=0;o<this.lines.length;o++)if(this.lines[o].staff)for(c=0;c<this.lines[o].staff.length;c++)delete this.lines[o].staff[c].workingClef;function k(t){for(var e,i=function(t,i,n){if(void 0===s[n]){for(e=0;e<s.length;e++)if(void 0!==s[e]){n=e;break}if(void 0===s[n]){var a=100*n+1;r.each(t.endSlur,function(t){a===t&&--a}),s[n]=[a]}}for(var o,c=0;c<i;c++)o=s[n].pop(),t.endSlur.push(o);return 0===s[n].length&&delete s[n],o},n=function(t,e,i,n){t.startSlur=[],void 0===s[i]&&(s[i]=[]);for(var a=100*i+1,o=0;o<e;o++)n&&(r.each(n,function(t){a===t&&++a}),r.each(n,function(t){a===t&&++a}),r.each(n,function(t){a===t&&++a})),r.each(s[i],function(t){a===t&&++a}),r.each(s[i],function(t){a===t&&++a}),s[i].push(a),t.startSlur.push({label:a}),a++},a=0;a<t.length;a++){var o=t[a];if("note"===o.el_type){if(o.gracenotes)for(var c=0;c<o.gracenotes.length;c++){if(o.gracenotes[c].endSlur){var l=o.gracenotes[c].endSlur;o.gracenotes[c].endSlur=[];for(var h=0;h<l;h++)i(o.gracenotes[c],1,20)}o.gracenotes[c].startSlur&&(e=o.gracenotes[c].startSlur,n(o.gracenotes[c],e,20))}if(o.endSlur&&(e=o.endSlur,o.endSlur=[],i(o,e,0)),o.startSlur&&n(o,e=o.startSlur,0),o.pitches){for(var u=[],f=0;f<o.pitches.length;f++)if(o.pitches[f].endSlur){var d=o.pitches[f].endSlur;o.pitches[f].endSlur=[];for(var p=0;p<d;p++){var m=i(o.pitches[f],1,f+1);u.push(m)}}for(f=0;f<o.pitches.length;f++)o.pitches[f].startSlur&&(e=o.pitches[f].startSlur,n(o.pitches[f],e,f+1,u));o.gracenotes&&o.pitches[0].endSlur&&100===o.pitches[0].endSlur[0]&&o.pitches[0].startSlur&&(o.gracenotes[0].endSlur?o.gracenotes[0].endSlur.push(o.pitches[0].startSlur[0].label):o.gracenotes[0].endSlur=[o.pitches[0].startSlur[0].label],1===o.pitches[0].endSlur.length?delete o.pitches[0].endSlur:100===o.pitches[0].endSlur[0]?o.pitches[0].endSlur.shift():100===o.pitches[0].endSlur[o.pitches[0].endSlur.length-1]&&o.pitches[0].endSlur.pop(),1===s[1].length?delete s[1]:s[1].pop())}}}}function A(t){n.fixClef(t)}function _(t,e){for(e++;t.length>e;){if(t[e].staff)return t[e];e++}return null}for(this.resolveOverlays(),this.lineNum=0;this.lineNum<this.lines.length;this.lineNum++){var S=this.lines[this.lineNum].staff;if(S)for(this.staffNum=0;this.staffNum<S.length;this.staffNum++)for(S[this.staffNum].clef&&A(S[this.staffNum].clef),this.voiceNum=0;this.voiceNum<S[this.staffNum].voices.length;this.voiceNum++){k(d=S[this.staffNum].voices[this.voiceNum]);for(var T=0;T<d.length;T++)"clef"===d[T].el_type&&A(d[T]);if(d.length>0&&d[d.length-1].barNumber){var C=_(this.lines,this.lineNum);C&&(C.staff[0].barNumber=d[d.length-1].barNumber),delete d[d.length-1].barNumber}}}return this.formatting.pagewidth||(this.formatting.pagewidth=t),this.formatting.pageheight||(this.formatting.pageheight=e),delete this.staffNum,delete this.voiceNum,delete this.lineNum,delete this.potentialStartBeam,delete this.potentialEndBeam,delete this.vskipPending,s},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 t=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum].length-1;t>=0;t--){var e=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum][t];if("note"===e.el_type)return e}return null},this.addTieToLastNote=function(){var t=this.getLastNote();return!!(t&&t.pitches&&t.pitches.length>0)&&(t.pitches[0].startTie={},!0)},this.getDuration=function(t){return t.duration?t.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(t,e,i,n){var a=this;n.el_type=t,null!==e&&(n.startChar=e),null!==i&&(n.endChar=i);var s=function(){void 0!==a.potentialStartBeam&&void 0!==a.potentialEndBeam&&(a.potentialStartBeam.startBeam=!0,a.potentialEndBeam.endBeam=!0),delete a.potentialStartBeam,delete a.potentialEndBeam};"note"===t?a.getDuration(n)>=.25?s():n.force_end_beam_last&&void 0!==a.potentialStartBeam?s():n.end_beam&&void 0!==a.potentialStartBeam?void 0===n.rest?(a.potentialStartBeam.startBeam=!0,n.endBeam=!0,delete a.potentialStartBeam,delete a.potentialEndBeam):s():void 0===n.rest&&(void 0===a.potentialStartBeam?n.end_beam||(a.potentialStartBeam=n,delete a.potentialEndBeam):a.potentialEndBeam=n):s(),delete n.end_beam,delete n.force_end_beam_last,function(t){if(void 0!==t.pitches){var e=a.lines[a.lineNum].staff[a.staffNum].workingClef.verticalPos;r.each(t.pitches,function(t){t.verticalPos=t.pitch-e})}if(void 0!==t.gracenotes){var i=a.lines[a.lineNum].staff[a.staffNum].workingClef.verticalPos;r.each(t.gracenotes,function(t){t.verticalPos=t.pitch-i})}a.lines[a.lineNum].staff[a.staffNum].voices[a.voiceNum].push(t)}(n)},this.appendStartingElement=function(t,e,i,n){var a;this.closeLine(),"key"===t&&(a=n.impliedNaturals,delete n.impliedNaturals);var s=r.clone(n);if(this.lines[this.lineNum].staff){"clef"===t&&(this.lines[this.lineNum].staff[this.staffNum].workingClef=s),this.lines[this.lineNum].staff.length<=this.staffNum&&(this.lines[this.lineNum].staff[this.staffNum]={},this.lines[this.lineNum].staff[this.staffNum].clef=r.clone(this.lines[this.lineNum].staff[0].clef),this.lines[this.lineNum].staff[this.staffNum].key=r.clone(this.lines[this.lineNum].staff[0].key),this.lines[this.lineNum].staff[0].meter&&(this.lines[this.lineNum].staff[this.staffNum].meter=r.clone(this.lines[this.lineNum].staff[0].meter)),this.lines[this.lineNum].staff[this.staffNum].workingClef=r.clone(this.lines[this.lineNum].staff[0].workingClef),this.lines[this.lineNum].staff[this.staffNum].voices=[[]]);for(var o=this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum],c=0;c<o.length;c++){if("note"===o[c].el_type||"bar"===o[c].el_type)return s.el_type=t,s.startChar=e,s.endChar=i,a&&(s.accidentals=a.concat(s.accidentals)),void o.push(s);if(o[c].el_type===t)return s.el_type=t,s.startChar=e,s.endChar=i,a&&(s.accidentals=a.concat(s.accidentals)),void(o[c]=s)}this.lines[this.lineNum].staff[this.staffNum][t]=n}},this.getNumLines=function(){return this.lines.length},this.pushLine=function(t){this.vskipPending&&(t.vskip=this.vskipPending,delete this.vskipPending),this.lines.push(t)},this.addSubtitle=function(t){this.pushLine({subtitle:t})},this.addSpacing=function(t){this.vskipPending=t},this.addNewPage=function(t){this.pushLine({newpage:t})},this.addSeparator=function(t,e,i){this.pushLine({separator:{spaceAbove:t,spaceBelow:e,lineLength:i}})},this.addText=function(t){this.pushLine({text:t})},this.addCentered=function(t){this.pushLine({text:[{text:t,center:!0}]})},this.containsNotes=function(t){for(var e=0;e<t.length;e++)if("note"===t[e].el_type||"bar"===t[e].el_type)return!0;return!1},this.containsNotesStrict=function(t){for(var e=0;e<t.length;e++)if("note"===t[e].el_type&&void 0===t[e].rest)return!0;return!1},this.startNewLine=function(t){var e=this;this.closeLine();var i=function(t){if(e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum]=[],e.isFirstLine(e.lineNum)?t.name&&(e.lines[e.lineNum].staff[e.staffNum].title||(e.lines[e.lineNum].staff[e.staffNum].title=[]),e.lines[e.lineNum].staff[e.staffNum].title[e.voiceNum]=t.name):t.subname&&(e.lines[e.lineNum].staff[e.staffNum].title||(e.lines[e.lineNum].staff[e.staffNum].title=[]),e.lines[e.lineNum].staff[e.staffNum].title[e.voiceNum]=t.subname),t.style&&e.appendElement("style",null,null,{head:t.style}),t.stem)e.appendElement("stem",null,null,{direction:t.stem});else if(e.voiceNum>0){if(void 0!==e.lines[e.lineNum].staff[e.staffNum].voices[0]){for(var i=!1,r=0;r<e.lines[e.lineNum].staff[e.staffNum].voices[0].length;r++)"stem"===e.lines[e.lineNum].staff[e.staffNum].voices[0].el_type&&(i=!0);i||e.lines[e.lineNum].staff[e.staffNum].voices[0].splice(0,0,{el_type:"stem",direction:"up"})}e.appendElement("stem",null,null,{direction:"down"})}t.scale&&e.appendElement("scale",null,null,{size:t.scale})},r=function(t){e.lines[e.lineNum].staff[e.staffNum]={voices:[],clef:t.clef,key:t.key,workingClef:t.clef},void 0!==t.stafflines&&(e.lines[e.lineNum].staff[e.staffNum].clef.stafflines=t.stafflines,e.lines[e.lineNum].staff[e.staffNum].workingClef.stafflines=t.stafflines),t.staffscale&&(e.lines[e.lineNum].staff[e.staffNum].staffscale=t.staffscale),t.vocalfont&&(e.lines[e.lineNum].staff[e.staffNum].vocalfont=t.vocalfont),t.bracket&&(e.lines[e.lineNum].staff[e.staffNum].bracket=t.bracket),t.brace&&(e.lines[e.lineNum].staff[e.staffNum].brace=t.brace),t.connectBarLines&&(e.lines[e.lineNum].staff[e.staffNum].connectBarLines=t.connectBarLines),t.barNumber&&(e.lines[e.lineNum].staff[e.staffNum].barNumber=t.barNumber),i(t),t.part&&e.appendElement("part",t.startChar,t.endChar,{title:t.part}),void 0!==t.meter&&(e.lines[e.lineNum].staff[e.staffNum].meter=t.meter)};if(void 0===this.lines[this.lineNum])!function(t){e.lines[e.lineNum]={staff:[]},r(t)}(t);else if(void 0===this.lines[this.lineNum].staff)this.lineNum++,this.startNewLine(t);else if(void 0===this.lines[this.lineNum].staff[this.staffNum])r(t);else if(void 0===this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum])i(t);else{if(!this.containsNotes(this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]))return;this.lineNum++,this.startNewLine(t)}},this.hasBeginMusic=function(){for(var t=0;t<this.lines.length;t++)if(this.lines[t].staff)return!0;return!1},this.isFirstLine=function(t){for(var e=t-1;e>=0;e--)if(void 0!==this.lines[e].staff)return!1;return!0},this.getMeter=function(){for(var t=0;t<this.lines.length;t++){var e=this.lines[t];if(e.staff)for(var i=0;i<e.staff.length;i++){var r=e.staff[i].meter;if(r)return r}}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(t,e){this.staffNum=t,this.voiceNum=e;for(var i=0;i<this.lines.length;i++)if(this.lines[i].staff&&(void 0===this.lines[i].staff[t]||void 0===this.lines[i].staff[t].voices[e]||!this.containsNotes(this.lines[i].staff[t].voices[e])))return void(this.lineNum=i);this.lineNum=i},this.addMetaText=function(t,e){void 0===this.metaText[t]?this.metaText[t]=e:this.metaText[t]+="\n"+e},this.addMetaTextArray=function(t,e){void 0===this.metaText[t]?this.metaText[t]=[e]:this.metaText[t].push(e)},this.addMetaTextObj=function(t,e){this.metaText[t]=e},this.addElementToEvents=function(t,e,i,r,n,a,s){if(e.hint)return{isTiedState:void 0,duration:0};var o=e.durationClass?e.durationClass:e.duration;if(o>0){var c=e.startTie;void 0!==s?(t["event"+s].elements.push(e.elemset),c||(s=void 0)):(t["event"+i]?(t["event"+i].left=Math.min(t["event"+i].left,e.x),t["event"+i].elements.push(e.elemset)):t["event"+i]={type:"event",milliseconds:i,top:r,height:n,left:e.x,width:e.w,elements:[e.elemset],startChar:e.abcelem.startChar,endChar:e.abcelem.endChar},c&&(s=i))}return{isTiedState:s,duration:o/a}},this.makeVoicesArray=function(){for(var t=[],e=0;e<this.engraver.staffgroups.length;e++)for(var i=this.engraver.staffgroups[e],r=i.staffs[0],n=r.absoluteY,s=n-r.top*a.STEP,o=i.staffs[i.staffs.length-1],c=(n=o.absoluteY)-o.bottom*a.STEP-s,l=i.voices,h=0;h<l.length;h++){t[h]||(t[h]=[]);for(var u=l[h].children,f=0;f<u.length;f++)t[h].push({top:s,height:c,elem:u[f]})}return t},this.setupEvents=function(t,e){for(var i,r,n={},a=t,s=this.makeVoicesArray(),o=0;o<s.length;o++)for(var c,l=a,h=Math.round(1e3*l),u=0,f=s[o],d=0;d<f.length;d++){var p=f[d].elem,m=this.addElementToEvents(n,p,h,f[d].top,f[d].height,e,r);if(r=m.isTiedState,l+=m.duration,h=Math.round(1e3*l),"bar"===p.type){var g=p.abcelem.type,v="bar_right_repeat"===g||"bar_dbl_repeat"===g,b="1"===p.abcelem.startEnding,y="bar_left_repeat"===g||"bar_dbl_repeat"===g||"bar_thick_thin"===g||"bar_thin_thick"===g||"bar_thin_thin"===g||"bar_right_repeat"===g;if(v)for(var x=u;x<c;x++)p=f[x].elem,r=(m=this.addElementToEvents(n,p,h,f[d].top,f[d].height,e,r)).isTiedState,l+=m.duration,h=Math.round(1e3*l);b&&(c=d),y&&(u=d)}}return function(t){for(var e,i,r,n,a=t.length-1;a>=0;a--){var s=t[a];"bar"===s.type?(s.top=r,s.nextTop=e,e=r,s.bottom=n,s.nextBottom=i,i=n):"event"===s.type&&(r=s.top,n=s.top+s.height)}}(i=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e=e.sort(function(t,e){var i=t.milliseconds-e.milliseconds;return 0!==i?i:"bar"===t.type?-1:1})}(n)),i},this.setTiming=function(t,e){var i=this.getBeatLength();!t&&this.metaText&&this.metaText.tempo&&(t=(t=this.metaText.tempo.bpm)*(this.metaText.tempo.duration&&this.metaText.tempo.duration.length>0?this.metaText.tempo.duration[0]:i)/i),t||(t=180);var r=t/60,n=this.getBarLength()/i*e/r;n&&(n-=this.getPickupLength()/i/r);var a=i*r;this.noteTimings=this.setupEvents(n,a)}}},function(t,e,i){"use strict";var r=i(9),n=i(5),a=i(13),s={};function o(){var t=window.innerWidth;for(var e in s)if(s.hasOwnProperty(e)){var i=s[e];t-=2*i.offsetLeft,i.style.width=t+"px"}}function c(t,e,i,n){var o=i.width?i.width:800;i.viewportHorizontal?(t.innerHTML='<div class="abcjs-inner"></div>',i.scrollHorizontal?(t.style.overflowX="auto",t.style.overflowY="hidden"):t.style.overflow="hidden",s[t.id]=t,t=t.children[0]):i.viewportVertical&&(t.innerHTML='<div class="abcjs-inner scroll-amount"></div>',t.style.overflowX="hidden",t.style.overflowY="auto",t=t.children[0]);var c=r(t,o,400),l=new a(c,i);(l.engraveABC(e,n),e.engraver=l,i.viewportVertical||i.viewportHorizontal)&&(t.parentNode.style.width=t.style.width)}window.addEventListener("resize",o),window.addEventListener("orientationChange",o);t.exports=function(t,e,i,r,a){var s,o={};if(i)for(s in i)i.hasOwnProperty(s)&&(o[s]=i[s]);if(r)for(s in r)r.hasOwnProperty(s)&&("listener"===s?r[s].highlight&&(o.clickListener=r[s].highlight):o[s]=r[s]);if(a)for(s in a)a.hasOwnProperty(s)&&(o[s]=a[s]);return n.renderEngine(function(t,e,i){!o.oneSvgPerLine||e.lines.length<2?c(t,e,o,i):function(t,e,i,r){function n(t){return{formatting:t.formatting,media:t.media,version:t.version,metaText:{},lines:[]}}for(var a,s=[],o=0;o<e.lines.length;o++){var l=e.lines[o];a||(a=n(e)),0===o&&(a.metaText.tempo=e.metaText.tempo,a.metaText.title=e.metaText.title,a.metaText.header=e.metaText.header,a.metaText.rhythm=e.metaText.rhythm,a.metaText.origin=e.metaText.origin,a.metaText.composer=e.metaText.composer,a.metaText.author=e.metaText.author,a.metaText.partOrder=e.metaText.partOrder),a.lines.push(l),l.staff&&(s.push(a),a=void 0)}if(a)for(var h=s[s.length-1],u=0;u<a.lines.length;u++)h.lines.push(a.lines[u]);(a=s[s.length-1]).metaText.unalignedWords=e.metaText.unalignedWords,a.metaText.book=e.metaText.book,a.metaText.source=e.metaText.source,a.metaText.discography=e.metaText.discography,a.metaText.notes=e.metaText.notes,a.metaText.transcription=e.metaText.transcription,a.metaText.history=e.metaText.history,a.metaText["abc-copyright"]=e.metaText["abc-copyright"],a.metaText["abc-creator"]=e.metaText["abc-creator"],a.metaText["abc-edited-by"]=e.metaText["abc-edited-by"],a.metaText.footer=e.metaText.footer;var f={};for(var d in i)i.hasOwnProperty(d)&&(f[d]=i[d]);for(var p=f.paddingtop,m=f.paddingbottom,g=0;g<s.length;g++){var v=document.createElement("div");t.appendChild(v),0===g?(f.paddingtop=p,f.paddingbottom=-20):g===s.length-1?(f.paddingtop=10,f.paddingbottom=m):(f.paddingtop=10,f.paddingbottom=-20),c(v,s[g],f,r)}}(t,e,o,i)},t,e,o)}},function(t,e,i){"use strict";var r,n=i(4),a=i(25),s=i(26),o=i(27),c=i(28),l=i(29),h=i(30),u=i(33),f=i(3),d=i(2),p=i(1),m=i(34),g=i(35),v=i(14),b=i(36),y=i(37),x=i(0);!function(){var t=!1;(r=function(t,e,i){this.decoration=new h,this.renderer=e,this.tuneNumber=i,this.isBagpipes=t,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",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},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()}).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},r.prototype.setStemHeight=function(t){this.stemHeight=t/p.STEP},r.prototype.getCurrentVoiceId=function(){return"s"+this.s+"v"+this.v},r.prototype.pushCrossLineElems=function(){this.slursbyvoice[this.getCurrentVoiceId()]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId()]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId()]=this.partstartelem},r.prototype.popCrossLineElems=function(){this.slurs=this.slursbyvoice[this.getCurrentVoiceId()]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId()]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId()]},r.prototype.getElem=function(){return this.abcline.length<=this.pos?null:this.abcline[this.pos]},r.prototype.getNextElem=function(){return this.abcline.length<=this.pos+1?null:this.abcline[this.pos+1]},r.prototype.containsLyrics=function(t){for(var e=0;e<t.length;e++)for(var i=0;i<t[e].voices.length;i++)for(var r=0;r<t[e].voices[i].length;r++){var n=t[e].voices[i][r];if(n.lyric)return void(n.positioning&&"below"!==n.positioning.vocalPosition||(this.hasVocals=!0))}},r.prototype.createABCLine=function(e,i){for(this.minY=2,this.containsLyrics(e),this.staffgroup=new m,this.tempoSet=!1,this.s=0;this.s<e.length;this.s++)t&&this.restoreState(),t=!1,this.createABCStaff(e[this.s],i);return this.staffgroup},r.prototype.createABCStaff=function(t,e){for(this.v=0;this.v<t.voices.length;this.v++){this.voice=new y(this.v,t.voices.length),0===this.v?(this.voice.barfrom="start"===t.connectBarLines||"continue"===t.connectBarLines,this.voice.barto="continue"===t.connectBarLines||"end"===t.connectBarLines):this.voice.duplicate=!0,t.title&&t.title[this.v]&&(this.voice.header=t.title[this.v]);var i=o(t.clef,this.tuneNumber);i&&(0===this.v&&t.barNumber&&this.addMeasureNumber(t.barNumber,i),this.voice.addChild(i));var r=c(t.key,this.tuneNumber);if(r&&(this.voice.addChild(r),this.startlimitelem=r),t.meter){var n=l(t.meter,this.tuneNumber);this.voice.addChild(n),this.startlimitelem=n}this.voice.duplicate&&(this.voice.children=[]);var a=t.clef.stafflines||0===t.clef.stafflines?t.clef.stafflines:5;this.staffgroup.addVoice(this.voice,this.s,a),this.createABCVoice(t.voices[this.v],e),this.staffgroup.setStaffLimits(this.voice),"start"===t.brace?this.staffgroup.brace=new s(1,!0):"end"===t.brace&&this.staffgroup.brace?this.staffgroup.brace.increaseStavesIncluded():"continue"===t.brace&&this.staffgroup.brace&&this.staffgroup.brace.increaseStavesIncluded()}},r.prototype.createABCVoice=function(e,i){for(var r in this.popCrossLineElems(),this.stemdir=this.isBagpipes?"down":null,this.abcline=e,this.partstartelem&&(this.partstartelem=new u("",null,null),this.voice.addOther(this.partstartelem)),this.slurs)this.slurs.hasOwnProperty(r)&&(this.slurs[r]=new v(null,null,this.slurs[r].above,this.slurs[r].force,!1),t&&this.slurs[r].setHint(),this.voice.addOther(this.slurs[r]));for(var n=0;n<this.ties.length;n++)this.ties[n]=new v(null,null,this.ties[n].above,this.ties[n].force,!0),t&&this.ties[n].setHint(),this.voice.addOther(this.ties[n]);for(this.pos=0;this.pos<this.abcline.length;this.pos++){var a=this.createABCElement();if(a)for(n=0;n<a.length;n++)this.tempoSet||!i||i.suppress||(this.tempoSet=!0,a[n].addChild(new g(i,this.tuneNumber))),this.voice.addChild(a[n])}this.pushCrossLineElems()},r.prototype.saveState=function(){this.tiesSave=x.cloneArray(this.ties),this.slursSave=x.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=x.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=x.cloneHashOfArrayOfHash(this.tiesbyvoice)},r.prototype.restoreState=function(){this.ties=x.cloneArray(this.tiesSave),this.slurs=x.cloneHashOfHash(this.slursSave),this.slursbyvoice=x.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=x.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},r.prototype.createABCElement=function(){var e=[],i=this.getElem();switch(i.el_type){case"note":e=this.createBeam();break;case"bar":e[0]=this.createBarLine(i),this.voice.duplicate&&e.length>0&&(e[0].invisible=!0);break;case"meter":e[0]=l(i,this.tuneNumber),this.startlimitelem=e[0],this.voice.duplicate&&e.length>0&&(e[0].invisible=!0);break;case"clef":if(e[0]=o(i,this.tuneNumber),!e[0])return null;this.voice.duplicate&&e.length>0&&(e[0].invisible=!0);break;case"key":var r=c(i,this.tuneNumber);r&&(e[0]=r,this.startlimitelem=e[0]),this.voice.duplicate&&e.length>0&&(e[0].invisible=!0);break;case"stem":this.stemdir=i.direction;break;case"part":var a=new n(i,0,0,"part",this.tuneNumber),s=this.renderer.getTextSize(i.title,"partsfont","part");a.addChild(new d(i.title,0,0,void 0,{type:"part",height:s.height/p.STEP})),e[0]=a;break;case"tempo":var h=new n(i,0,0,"tempo",this.tuneNumber);h.addChild(new g(i,this.tuneNumber)),e[0]=h;break;case"style":"normal"===i.head?delete this.style:this.style=i.head;break;case"hint":t=!0,this.saveState();break;case"midi":break;default:var u=new n(i,0,0,"unsupported",this.tuneNumber);u.addChild(new d("element type "+i.el_type,0,0,void 0,{type:"debug"})),e[0]=u}return e},r.prototype.calcBeamDir=function(){if(this.stemdir)return this.stemdir;for(var t,e=new a(this.stemHeight,this.stemdir),i=this.pos;this.getElem()&&(t=this.createNote(this.getElem(),!0,!0),e.add(t),!this.getElem().endBeam);)this.pos++;var r=e.calcDir();return this.pos=i,r?"up":"down"},r.prototype.createBeam=function(){var e=[];if(this.getElem().startBeam&&!this.getElem().endBeam){var i=this.calcBeamDir(),r=new a(this.stemHeight,i);t&&r.setHint();var n=this.stemdir;for(this.stemdir=i;this.getElem();){var s=this.createNote(this.getElem(),!0);if(e.push(s),r.add(s),this.triplet&&this.triplet.isClosed()&&(this.voice.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1),this.getElem().endBeam)break;this.pos++}this.stemdir=n,this.voice.addBeam(r)}else e[0]=this.createNote(this.getElem()),this.triplet&&this.triplet.isClosed()&&(this.voice.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);return e};var e=function(t,e,i,r,n,a,s,o,c){for(var l=i;l>11;l--)l%2!=0||r||t.addChild(new d(null,o,(f.getSymbolWidth(n)+4)*c,l,{type:"ledger"}));for(l=e;l<1;l++)l%2!=0||r||t.addChild(new d(null,o,(f.getSymbolWidth(n)+4)*c,l,{type:"ledger"}));for(l=0;l<a.length;l++){var h=f.getSymbolWidth(n);"down"===s&&(h=-h),t.addChild(new d(null,h+o,(f.getSymbolWidth(n)+4)*c,a[l],{type:"ledger"}))}};r.prototype.createNote=function(i,r,s){var o=null,c=null;this.roomtaken=0,this.roomtakenright=0;var l,h,u,m,g,y,w,k=0,A="",_=null,S=[],T=function(t){var e=0;return t.duration&&(e=t.duration),e}(i),C=!1;0===T&&(C=!0,T=.25,r=!0);for(var N=Math.floor(Math.log(T)/Math.log(2)),M=0,I=Math.pow(2,N),B=I/2;I<T;M++,I+=B,B/=2);i.startTriplet&&(2===i.startTriplet?this.tripletmultiplier=1.5:this.tripletmultiplier=(i.startTriplet-1)/i.startTriplet);var E=T*this.tripletmultiplier;i.rest&&"multimeasure"===i.rest.type&&(E=1);var P=i.rest?"rest":"note",L=new n(i,E,1,P,this.tuneNumber,{durationClassOveride:i.duration*this.tripletmultiplier});if(t&&L.setHint(),i.rest){var D=7;switch(this.voice.voicetotal>1&&("down"===this.stemdir&&(D=3),"up"===this.stemdir&&(D=11)),1===this.staffgroup.staffs[this.staffgroup.staffs.length-1].lines&&(D=T<.5?7:T<1?6.8:4.8),i.rest.type){case"whole":A=this.chartable.rest[0],i.averagepitch=D,i.minpitch=D,i.maxpitch=D,M=0;break;case"rest":A=this.chartable.rest[-N],i.averagepitch=D,i.minpitch=D,i.maxpitch=D;break;case"invisible":case"spacer":A="",i.averagepitch=D,i.minpitch=D,i.maxpitch=D;break;case"multimeasure":A=this.chartable.rest.multi,i.averagepitch=D,i.minpitch=D,i.maxpitch=D,M=0;var H=f.getSymbolWidth(A);L.addHead(new d(A,-H,2*H,7));var z=new d(""+i.duration,0,H,16,{type:"multimeasure-text"});L.addExtra(z)}s||"multimeasure"===i.rest.type||(o=this.createNoteHead(L,A,{verticalPos:D},null,0,-this.roomtaken,null,M,0,1)),o&&L.addHead(o),this.roomtaken+=this.accidentalshiftx,this.roomtakenright=Math.max(this.roomtakenright,this.dotshiftx)}else{!function(t){var e;do{e=!0;for(var i=0;i<t.pitches.length-1;i++)if(t.pitches[i].pitch>t.pitches[i+1].pitch){e=!1;var r=t.pitches[i];t.pitches[i]=t.pitches[i+1],t.pitches[i+1]=r}}while(!e)}(i);var V=0;for(l=0,u=i.pitches.length;l<u;l++)V+=i.pitches[l].verticalPos;i.averagepitch=V/i.pitches.length,i.minpitch=i.pitches[0].verticalPos,this.minY=Math.min(i.minpitch,this.minY),i.maxpitch=i.pitches[i.pitches.length-1].verticalPos;var F=i.averagepitch>=6?"down":"up";this.stemdir&&(F=this.stemdir);var O,q=i.style?i.style:this.style;for(q&&"normal"!==q||(q="note"),(O=C?this.chartable[q].nostem:this.chartable[q][-N])||console.log("noteSymbol:",q,N,C),l="down"===F?i.pitches.length-2:1;"down"===F?l>=0:l<i.pitches.length;l="down"===F?l-1:l+1){var j=i.pitches["down"===F?l+1:l-1],R=i.pitches[l],U="down"===F?j.pitch-R.pitch:R.pitch-j.pitch;U<=1&&!j.printer_shift&&(R.printer_shift=U?"different":"same",(R.verticalPos>11||R.verticalPos<1)&&S.push(R.verticalPos-R.verticalPos%2),"down"===F?this.roomtaken=f.getSymbolWidth(O)+2:k=f.getSymbolWidth(O)+2)}for(this.accidentalSlot=[],l=0;l<i.pitches.length;l++){r||(_="down"===F&&0!==l||"up"===F&&l!==u-1?null:this.chartable["down"===F?"dflags":"uflags"][-N]),A=i.pitches[l].style?this.chartable[i.pitches[l].style][-N]:O,i.pitches[l].highestVert=i.pitches[l].verticalPos;var Y=("up"===this.stemdir||"up"===F)&&0===l,W=("down"===this.stemdir||"down"===F)&&l===u-1;if(!s&&(Y||W)){if((i.startSlur||1===u)&&(i.pitches[l].highestVert=i.pitches[u-1].verticalPos,"up"!==this.stemdir&&"up"!==F||(i.pitches[l].highestVert+=6)),i.startSlur)for(i.pitches[l].startSlur||(i.pitches[l].startSlur=[]),h=0;h<i.startSlur.length;h++)i.pitches[l].startSlur.push(i.startSlur[h]);if(!s&&i.endSlur)for(i.pitches[l].highestVert=i.pitches[u-1].verticalPos,"up"!==this.stemdir&&"up"!==F||(i.pitches[l].highestVert+=6),i.pitches[l].endSlur||(i.pitches[l].endSlur=[]),h=0;h<i.endSlur.length;h++)i.pitches[l].endSlur.push(i.endSlur[h])}var G=!r&&N<=-1;s||(o=this.createNoteHead(L,A,i.pitches[l],G?F:null,0,-this.roomtaken,_,M,k,1)),o&&(i.gracenotes&&i.gracenotes.length>0&&(o.bottom=o.bottom-1),L.addHead(o)),this.roomtaken+=this.accidentalshiftx,this.roomtakenright=Math.max(this.roomtakenright,this.dotshiftx)}G&&((g="down"===F?i.minpitch-7:i.minpitch+1/3)>6&&!this.stemdir&&(g=6),(y="down"===F?i.maxpitch-1/3:i.maxpitch+7)<6&&!this.stemdir&&(y=6),w="down"===F||0===L.heads.length?0:L.heads[0].w,m="down"===F?1:-1,"noteheads.slash.quarter"===o.c&&("down"===F?y-=1:g+=1),L.addExtra(new d(null,w,0,g,{type:"stem",pitch2:y,linewidth:m})),this.minY=Math.min(g,this.minY),this.minY=Math.min(y,this.minY))}if(void 0!==i.lyric){var X="";x.each(i.lyric,function(t){var e=" "===t.divider?"":t.divider;X+=t.syllable+e+"\n"});var K=this.renderer.getTextSize(X,"vocalfont","lyric"),Z=i.positioning?i.positioning.vocalPosition:"below";L.addCentered(new d(X,0,K.width,void 0,{type:"lyric",position:Z,height:K.height/p.STEP}))}if(!s&&void 0!==i.gracenotes){var Q=null;i.gracenotes.length>1&&(Q=new a(.7*this.stemHeight,"grace",this.isBagpipes),t&&Q.setHint(),Q.mainNote=L);var J=[];for(h=i.gracenotes.length-1;h>=0;h--)this.roomtaken+=10,J[h]=this.roomtaken,i.gracenotes[h].accidental&&(this.roomtaken+=7);for(h=0;h<i.gracenotes.length;h++){var $=i.gracenotes[h].verticalPos;if(_=Q?null:this.chartable.uflags[this.isBagpipes?5:3],c=this.createNoteHead(L,"noteheads.quarter",i.gracenotes[h],"up",-J[h],-J[h],_,0,0,.6),L.addExtra(c),i.gracenotes[h].acciaccatura){var tt=i.gracenotes[h].verticalPos+4.2,et=Q?5:6;L.addRight(new d("flags.ugrace",-J[h]+et,0,tt,{scalex:.6,scaley:.6}))}if(Q){var it=i.gracenotes[h].duration/2;this.isBagpipes&&(it/=2);var rt={heads:[c],abcelem:{averagepitch:$,minpitch:$,maxpitch:$,duration:it}};Q.add(rt)}else g=$+1/3*.6,y=$+4.2,w=c.dx+c.w,m=-.6,L.addExtra(new d(null,w,0,g,{type:"stem",pitch2:y,linewidth:m}));if(e(L,$,$,!1,"noteheads.quarter",[],!0,c.dx-1,.6),0===h&&!this.isBagpipes&&(!i.rest||"spacer"!==i.rest.type&&"invisible"!==i.rest.type)){var nt=1===i.gracenotes.length&&c.pitch===o.pitch;this.voice.addOther(new v(c,o,!1,!0,nt))}}Q&&this.voice.addBeam(Q)}!s&&i.decoration&&this.decoration.createDecoration(this.voice,i.decoration,L.top,o?o.w:0,L,this.roomtaken,F,L.bottom,i.positioning,this.hasVocals),i.barNumber&&L.addChild(new d(i.barNumber,-10,0,0,{type:"barNumber"})),e(L,i.minpitch,i.maxpitch,i.rest,A,S,F,-2,1);if(void 0!==i.chord)for(h=0;h<i.chord.length;h++){var at,st=0,ot=this.renderer.getTextSize(i.chord[h].name,"annotationfont","annotation"),ct=ot.width,lt=ot.height/p.STEP;switch(i.chord[h].position){case"left":this.roomtaken+=ct+7,st=-this.roomtaken,at=i.averagepitch,L.addExtra(new d(i.chord[h].name,st,ct+4,at,{type:"text",height:lt}));break;case"right":this.roomtakenright+=4,st=this.roomtakenright,at=i.averagepitch,L.addRight(new d(i.chord[h].name,st,ct+4,at,{type:"text",height:lt}));break;case"below":L.addRight(new d(i.chord[h].name,0,ct+8,void 0,{type:"text",position:"below",height:lt}));break;case"above":L.addRight(new d(i.chord[h].name,0,ct+8,void 0,{type:"text",height:lt}));break;default:if(i.chord[h].rel_position){var ht=i.chord[h].rel_position.y+3*p.STEP;L.addChild(new d(i.chord[h].name,st+i.chord[h].rel_position.x,0,i.minpitch+ht/p.STEP,{type:"text",height:lt}))}else{var ut="above";i.positioning&&i.positioning.chordPosition&&(ut=i.positioning.chordPosition),lt=(ot=this.renderer.getTextSize(i.chord[h].name,"gchordfont","chord")).height/p.STEP,ct=ot.width,L.addCentered(new d(i.chord[h].name,st,ct,void 0,{type:"chord",position:ut,height:lt}))}}}return i.startTriplet&&!s&&(this.triplet=new b(i.startTriplet,o)),i.endTriplet&&this.triplet&&!s&&this.triplet.setCloseAnchor(o),L},r.prototype.createNoteHead=function(e,i,r,n,a,s,o,c,l,h){var u,p,m=r.verticalPos;if(this.accidentalshiftx=0,this.dotshiftx=0,void 0===i)e.addChild(new d("pitch is undefined",0,0,0,{type:"debug"}));else if(""===i)u=new d(null,0,0,m);else{var g=a;if(r.printer_shift){var b="same"===r.printer_shift?1:0;g="down"===n?-f.getSymbolWidth(i)*h+b:f.getSymbolWidth(i)*h-b}var y={scalex:h,scaley:h,thickness:f.symbolHeightInPitches(i)*h};if(u=new d(i,g,f.getSymbolWidth(i)*h,m,y),o){var x=m+("down"===n?-7:7)*h;(1===h&&"down"===n?x>6:x<6)&&(x=6);var w="down"===n?a:a+u.w-.6;e.addRight(new d(o,w,f.getSymbolWidth(o)*h,x,{scalex:h,scaley:h}))}for(this.dotshiftx=u.w+l-2+5*c;c>0;c--){var k=1-Math.abs(m)%2;e.addRight(new d("dots.dot",u.w+l-2+5*c,f.getSymbolWidth("dots.dot"),m+k))}}if(u&&(u.highestVert=r.highestVert),r.accidental){var A;switch(r.accidental){case"quartersharp":A="accidentals.halfsharp";break;case"dblsharp":A="accidentals.dblsharp";break;case"sharp":A="accidentals.sharp";break;case"quarterflat":A="accidentals.halfflat";break;case"flat":A="accidentals.flat";break;case"dblflat":A="accidentals.dblflat";break;case"natural":A="accidentals.nat"}for(var _=!1,S=s,T=0;T<this.accidentalSlot.length;T++)if(m-this.accidentalSlot[T][0]>=6){this.accidentalSlot[T][0]=m,S=this.accidentalSlot[T][1],_=!0;break}!1===_&&(S-=f.getSymbolWidth(A)*h+2,this.accidentalSlot.push([m,S]),this.accidentalshiftx=f.getSymbolWidth(A)*h+2),e.addExtra(new d(A,S,f.getSymbolWidth(A),m,{scalex:h,scaley:h}))}if(r.endTie&&this.ties[0]&&(this.ties[0].setEndAnchor(u),this.ties=this.ties.slice(1,this.ties.length)),r.startTie){var C=new v(u,null,("down"===this.stemdir||"down"===n)&&"up"!==this.stemdir,"down"===this.stemdir||"up"===this.stemdir,!0);t&&C.setHint(),this.ties[this.ties.length]=C,this.voice.addOther(C),e.startTie=!0}if(r.endSlur)for(p=0;p<r.endSlur.length;p++){var N=r.endSlur[p];this.slurs[N]?((M=this.slurs[N]).setEndAnchor(u),delete this.slurs[N]):(M=new v(null,u,"down"===n,("up"===this.stemdir||"down"===n)&&"down"!==this.stemdir,!1),t&&M.setHint(),this.voice.addOther(M)),this.startlimitelem&&M.setStartX(this.startlimitelem)}if(r.startSlur)for(p=0;p<r.startSlur.length;p++){N=r.startSlur[p].label;var M=new v(u,null,("down"===this.stemdir||"down"===n)&&"up"!==this.stemdir,!1,!1);t&&M.setHint(),this.slurs[N]=M,this.voice.addOther(M)}return u},r.prototype.addMeasureNumber=function(t,e){var i=this.renderer.getTextSize(t,"measurefont","bar-number");e.addChild(new d(t,0,0,11+i.height/p.STEP,{type:"barNumber"}))},r.prototype.createBarLine=function(t){var e=new n(t,0,10,"bar",this.tuneNumber),i=null,r=0;t.barNumber&&this.addMeasureNumber(t.barNumber,e);var a="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,s="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type||"bar_left_repeat"===t.type||"bar_thin_thick"===t.type||"bar_thick_thin"===t.type,c="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,l="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(a||l){for(var h in this.slurs)this.slurs.hasOwnProperty(h)&&this.slurs[h].setEndX(e);this.startlimitelem=e}if(a&&(e.addRight(new d("dots.dot",r,1,7)),e.addRight(new d("dots.dot",r,1,5)),r+=6),s&&(i=new d(null,r,1,2,{type:"bar",pitch2:10,linewidth:.6}),e.addRight(i)),"bar_invisible"===t.type&&(i=new d(null,r,1,2,{type:"none",pitch2:10,linewidth:.6}),e.addRight(i)),t.decoration&&this.decoration.createDecoration(this.voice,t.decoration,12,o?3:1,e,0,"down",2,t.positioning,this.hasVocals),o&&(i=new d(null,r+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),e.addRight(i),r+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=i,this.partstartelem=null),c&&(i=new d(null,r+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),e.addRight(i)),l&&(r+=3,e.addRight(new d("dots.dot",r,1,7)),e.addRight(new d("dots.dot",r,1,5))),t.startEnding&&0===this.s){var f=this.renderer.getTextSize(t.startEnding,"repeatfont","").width;e.minspacing+=f+10,this.partstartelem=new u(t.startEnding,i,null),this.voice.addOther(this.partstartelem)}return e}}(),t.exports=r},function(t,e,i){"use strict";i(4);var r,n=i(2),a=i(1),s=function(t){return void 0===t?0:Math.floor(Math.log(t)/Math.log(2))};!function(){(r=function(t,e,i){this.isflat=i,this.isgrace=e&&"grace"===e,this.forceup=this.isgrace||e&&"up"===e,this.forcedown=e&&"down"===e,this.elems=[],this.total=0,this.allrests=!0,this.stemHeight=t,this.beams=[]}).prototype.setHint=function(){this.hint=!0},r.prototype.add=function(t){var e=t.abcelem.averagepitch;void 0!==e&&(this.allrests=this.allrests&&t.abcelem.rest,t.beam=this,this.elems.push(t),this.total+=e,(!this.min||t.abcelem.minpitch<this.min)&&(this.min=t.abcelem.minpitch),(!this.max||t.abcelem.maxpitch>this.max)&&(this.max=t.abcelem.maxpitch))};function t(t,e,i,r){if(!t.children)return r;for(var n=0;n<t.children.length;n++){var a=t.children[n];e&&void 0!==a.top&&"flags.ugrace"===a.c?r=Math.max(r,a.top-i):e||void 0===a.bottom||"flags.ugrace"!==a.c||(r=Math.max(r,i-a.bottom+7))}return r}function e(t,e){return e?t/e:0}function i(t,e,i,r,n){return e+(r-e)/(i-t)*(n-t)}function o(t,e,i,r,n,a,s){var o="beam-elem";s&&(o+=" abcjs-hint");var c="M"+e+" "+(i=t.calcY(i))+" L"+r+" "+(n=t.calcY(n))+"L"+r+" "+(n+a)+" L"+e+" "+(i+a)+"z";t.printPath({path:c,stroke:"none",fill:"#000000",class:t.addClasses(o)})}r.prototype.calcDir=function(){return!!this.forceup||!this.forcedown&&e(this.total,this.elems.length)<6},r.prototype.layout=function(){if(0!==this.elems.length&&!this.allrests){this.stemsUp=this.calcDir();var r=function(t,e){var i=t?a.STEP:-a.STEP;e&&(i*=.4);return i}(this.stemsUp,this.isgrace),o=this.elems[0],c=this.elems[this.elems.length-1],l=0,h=this.stemsUp?o.abcelem.maxpitch:o.abcelem.minpitch;l=t(o,this.stemsUp,h,l),l=t(c,this.stemsUp,h,l),l=Math.max(this.stemHeight,l+3);var u=function(t,i,r,n,a,s,o,c,l,h){var u=e(t,i),f=r-2,d=r-2,p=Math.round(n?Math.max(u+f,l+d):Math.min(u-f,c-d)),m=function(t,e,i,r){if(r)return 0;var n=t-e,a=i/2;n>a&&(n=a);n<-a&&(n=-a);return n}(a,s,i,o),g=p+Math.floor(m/2),v=p+Math.floor(-m/2);h||(n&&p<6?(g=6,v=6):!n&&p>6&&(g=6,v=6));return[g,v]}(this.total,this.elems.length,l,this.stemsUp,o.abcelem.averagepitch,c.abcelem.averagepitch,this.isflat,this.min,this.max,this.isgrace),f=function(t,e,i){var r=e.heads[t?0:e.heads.length-1],n=i.heads[t?0:i.heads.length-1],a=r.x;t&&(a+=r.w-.6);var s=n.x;t&&(s+=n.w);return[a,s]}(this.stemsUp,o,c);this.beams.push({startX:f[0],endX:f[1],startY:u[0],endY:u[1],dy:r});for(var d=function(t,e,r,n,a){for(var o=[],c=[],l=0;l<t.length;l++){var h=t[l];if(!h.abcelem.rest){var u=h.heads[e?0:h.heads.length-1],f=u.x+(e?u.w:0),d=i(r.startX,r.startY,r.endX,r.endY,f),p=e?-1.5:1.5;n&&(p=2*p/3);var m=h.abcelem.duration;0===m&&(m=.25);for(var g=s(m);g<-3;g++)c[-4-g]?c[-4-g].single=!1:c[-4-g]={x:f+(e?-.6:0),y:d+p*(-4-g+1),durlog:g,single:!0};for(var v=c.length-1;v>=0;v--)if(l===t.length-1||s(t[l+1].abcelem.duration)>-v-4){var b=f,y=d+p*(v+1);c[v].single&&(b=0===l?f+5:f-5,y=i(r.startX,r.startY,r.endX,r.endY,b)+p*(v+1)),o.push({startX:c[v].x,endX:b,startY:c[v].y,endY:y,dy:a}),c=c.slice(0,v)}}}return o}(this.elems,this.stemsUp,this.beams[0],this.isgrace,r),p=0;p<d.length;p++)this.beams.push(d[p]);!function(t,e,r,s,o){for(var c=0;c<t.length;c++){var l=t[c];if(!l.abcelem.rest){var h=!l.addExtra,u=h?o:l,f=l.heads[e?0:l.heads.length-1],d=f.pitch+(e?.2:-.2),p=e?f.w:0,m=f.x+p,g=i(r.startX,r.startY,r.endX,r.endY,m),v=e?-.6:.6;e||(g-=s/2/a.STEP),h&&(p+=l.heads[0].dx),"noteheads.slash.quarter"===f.c&&(e?d+=1:d-=1);var b=new n(null,p,0,d,{type:"stem",pitch2:g,linewidth:v});b.setX(u.x),u.addExtra(b)}}}(this.elems,this.stemsUp,this.beams[0],r,this.mainNote)}},r.prototype.isAbove=function(){return this.stemsUp},r.prototype.heightAtMidpoint=function(t,e){if(0===this.beams.length)return 0;var r=this.beams[0],n=t+(e-t)/2;return i(r.startX,r.startY,r.endX,r.endY,n)},r.prototype.yAtNote=function(t){var e=this.beams[0];return i(e.startX,e.startY,e.endX,e.endY,t.x)},r.prototype.xAtMidpoint=function(t,e){return t+(e-t)/2},r.prototype.draw=function(t){if(0!==this.beams.length){t.beginGroup();for(var e=0;e<this.beams.length;e++){var i=this.beams[e];o(t,i.startX,i.startY,i.endX,i.endY,i.dy,this.hint)}t.endGroup("beam-elem")}}}(),t.exports=r},function(t,e,i){"use strict";var r=function(){this.length=1};r.prototype.increaseStavesIncluded=function(){this.length++},r.prototype.setLocation=function(t){this.x=t},r.prototype.getWidth=function(){return 10},r.prototype.layout=function(t,e,i){this.startY=e,this.endY=i},r.prototype.draw=function(t,e,i){this.layout(t,e,i),t.drawBrace(this.x,this.startY,this.endY)},t.exports=r},function(t,e,i){"use strict";var r,n=i(4),a=i(3),s=i(2);r=function(t,e){var i,r=0,o=new n(t,0,10,"staff-extra",e);switch(t.type){case"treble":i="clefs.G";break;case"tenor":case"alto":i="clefs.C";break;case"bass":i="clefs.F";break;case"treble+8":i="clefs.G",r=1;break;case"tenor+8":i="clefs.C",r=1;break;case"bass+8":i="clefs.F",r=1;break;case"alto+8":i="clefs.C",r=1;break;case"treble-8":i="clefs.G",r=-1;break;case"tenor-8":i="clefs.C",r=-1;break;case"bass-8":i="clefs.F",r=-1;break;case"alto-8":i="clefs.C",r=-1;break;case"none":return null;case"perc":i="clefs.perc";break;default:o.addChild(new s("clef="+t.type,0,0,void 0,{type:"debug"}))}if(i&&(o.addRight(new s(i,5,a.getSymbolWidth(i),t.clefPos)),"clefs.G"===i?(o.top=13,o.bottom=-1):(o.top=10,o.bottom=2),0!==r)){var c=(a.getSymbolWidth(i)-a.getSymbolWidth("8")*(2/3))/2;o.addRight(new s("8",5+c,a.getSymbolWidth("8")*(2/3),r>0?o.top+3:o.bottom-1,{scalex:2/3,scaley:2/3})),o.top+=2}return o},t.exports=r},function(t,e,i){"use strict";var r,n=i(4),a=i(3),s=i(2),o=i(0);r=function(t,e){if(!t.accidentals||0===t.accidentals.length)return null;var i=new n(t,0,10,"staff-extra",e),r=0;return o.each(t.accidentals,function(t){var e="sharp"===t.acc?"accidentals.sharp":"natural"===t.acc?"accidentals.nat":"accidentals.flat";i.addRight(new s(e,r,a.getSymbolWidth(e),t.verticalPos,{thickness:a.symbolHeightInPitches(e)})),r+=a.getSymbolWidth(e)+2},this),i},t.exports=r},function(t,e,i){"use strict";var r,n=i(4),a=i(3),s=i(2);r=function(t,e){var i=new n(t,0,10,"staff-extra",e);if("specified"===t.type)for(var r=0;r<t.value.length;r++)0!==r&&i.addRight(new s("+",20*r-9,a.getSymbolWidth("+"),6,{thickness:a.symbolHeightInPitches("+")})),t.value[r].den?(i.addRight(new s(t.value[r].num,20*r,a.getSymbolWidth(t.value[r].num.charAt(0))*t.value[r].num.length,8,{thickness:a.symbolHeightInPitches(t.value[r].num.charAt(0))})),i.addRight(new s(t.value[r].den,20*r,a.getSymbolWidth(t.value[r].den.charAt(0))*t.value[r].den.length,4,{thickness:a.symbolHeightInPitches(t.value[r].den.charAt(0))}))):i.addRight(new s(t.value[r].num,20*r,a.getSymbolWidth(t.value[r].num.charAt(0))*t.value[r].num.length,6,{thickness:a.symbolHeightInPitches(t.value[r].num.charAt(0))}));else"common_time"===t.type?i.addRight(new s("timesig.common",0,a.getSymbolWidth("timesig.common"),6,{thickness:a.symbolHeightInPitches("timesig.common")})):"cut_time"===t.type&&i.addRight(new s("timesig.cut",0,a.getSymbolWidth("timesig.cut"),6,{thickness:a.symbolHeightInPitches("timesig.cut")}));return i},t.exports=r},function(t,e,i){"use strict";var r,n,a=i(31),s=i(32),o=i(3),c=i(2),l=i(14);n=function(t,e,i,r,n){function a(t,e){var a="down"===n?function(){if(0===r.heads.length)return 2;for(var t=r.heads[0].pitch,e=1;e<r.heads.length;e++)t=Math.min(t,r.heads[e].pitch);return t}()+1:function(){if(0===r.heads.length)return 10;for(var t=r.heads[0].pitch,e=1;e<r.heads.length;e++)t=Math.max(t,r.heads[e].pitch);return t}()+9;"down"!==n&&1===e&&a--;var s=i/2;s+="down"===n?-5:3;for(var l=0;l<e;l++)a-=1,r.addChild(new c(t,s,o.getSymbolWidth(t),a))}for(var s=0;s<t.length;s++)switch(t[s]){case"/":a("flags.ugrace",1);break;case"//":a("flags.ugrace",2);break;case"///":a("flags.ugrace",3);break;case"////":a("flags.ugrace",4)}},(r=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0}).prototype.dynamicDecoration=function(t,e,i,r){for(var n,a,o=0;o<e.length;o++)switch(e[o]){case"diminuendo(":this.startDiminuendoX=i,n=void 0;break;case"diminuendo)":n={start:this.startDiminuendoX,stop:i},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=i,a=void 0;break;case"crescendo)":a={start:this.startCrescendoX,stop:i},this.startCrescendoX=void 0}n&&t.addOther(new s(n.start,n.stop,">",r)),a&&t.addOther(new s(a.start,a.stop,"<",r))},r.prototype.createDecoration=function(t,e,i,r,s,h,u,f,d,p){d||(d={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(t,e,i,r){for(var n=0;n<e.length;n++)switch(e[n]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var s=new a(i,e[n],r);t.addOther(s)}}(t,e,s,d.volumePosition),this.dynamicDecoration(t,e,s,d.dynamicPosition),n(e,0,r,s,u);var m=function(t,e,i,r,n,a,s,h){for(var u,f=0;f<e.length;f++){if("staccato"===e[f]||"tenuto"===e[f]||"accent"===e[f]){var d="scripts."+e[f];if("accent"===e[f]&&(d="scripts.sforzato"),u=void 0===u?"down"===s?i+2:h-2:"down"===s?u+2:u-2,"accent"===e[f])"up"===s?u--:u++;else switch(u){case 2:case 4:case 6:case 8:case 10:"up"===s?u--:u++}i>9&&u++;var p=r/2;"center"!==o.getSymbolAlign(d)&&(p-=o.getSymbolWidth(d)/2),n.addChild(new c(d,p,o.getSymbolWidth(d),u))}if("slide"===e[f]&&n.heads[0]){var m=n.heads[0].pitch,g=new c("",-a-15,0,(m-=2)-1),v=new c("",-a-5,0,m+1);n.addChild(g),n.addChild(v),t.addOther(new l(g,v,!1,!1,!1))}}return void 0===u&&(u=i),{above:u,below:n.bottom}}(t,e,i,r,s,h,u,f);m.above=Math.max(m.above,this.minTop),function(t,e,i,r,n,a,s){function l(t,e){"above"===t?r.above+=e:r.below-=e}function h(t){var e;return"above"===t?(e=r.above)<a&&(e=a):(e=r.below)>s&&(e=s),e}function u(t,r){var n=h(r);i.addChild(new c(t,e/2,0,n+2,{type:"decoration",klass:"ornament",thickness:3})),l(r,5)}function f(t,r){var n=e/2;"center"!==o.getSymbolAlign(t)&&(n-=o.getSymbolWidth(t)/2);var a=o.symbolHeightInPitches(t)+1,s=h(r);s="above"===r?s+a/2:s-a/2,i.addChild(new c(t,n,o.getSymbolWidth(t),s,{klass:"ornament",thickness:o.symbolHeightInPitches(t)})),l(r,a)}for(var d={"+":"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"},p=0;p<t.length;p++)switch(t[p]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":u(t[p],n),!0;break;case"fine":u("FINE",n),!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":f(d[t[p]],n),!0;break;case"invertedfermata":f(d[t[p]],"below"),!0;break;case"mark":i.klass="mark"}}(e,r,s,m,d.ornamentPosition,this.minTop,this.minBottom)},t.exports=r},function(t,e,i){"use strict";i(1);var r=function(t,e,i){this.anchor=t,this.dec=e,"below"===i?this.volumeHeightBelow=5:this.volumeHeightAbove=5,this.pitch=void 0};r.prototype.setUpperAndLowerElements=function(t){this.volumeHeightAbove?this.pitch=t.volumeHeightAbove:this.pitch=t.volumeHeightBelow},r.prototype.draw=function(t,e,i){void 0===this.pitch&&window.console.error("Dynamic Element y-coordinate not set.");t.printSymbol(this.anchor.x,this.pitch,this.dec,1,1,t.addClasses("decoration"))},t.exports=r},function(t,e,i){"use strict";var r=i(6),n=function(t,e,i,r){this.anchor1=t,this.anchor2=e,this.dir=i,"above"===r?this.dynamicHeightAbove=4:this.dynamicHeightBelow=4,this.pitch=void 0};n.prototype.setUpperAndLowerElements=function(t){this.dynamicHeightAbove?this.pitch=t.dynamicHeightAbove:this.pitch=t.dynamicHeightBelow},n.prototype.draw=function(t){void 0===this.pitch&&window.console.error("Crescendo Element y-coordinate not set.");var e=t.calcY(this.pitch)+4;"<"===this.dir?(this.drawLine(t,e+4,e),this.drawLine(t,e+4,e+8)):(this.drawLine(t,e,e+4),this.drawLine(t,e+8,e+4))},n.prototype.drawLine=function(t,e,i){var n=this.anchor1?this.anchor1.x:0,a=this.anchor2?this.anchor2.x:800,s=r("M %f %f L %f %f",n,e,a,i);t.printPath({path:s,stroke:"#000000",class:t.addClasses("decoration")})},t.exports=n},function(t,e,i){"use strict";var r=i(6),n=function(t,e,i){this.text=t,this.anchor1=e,this.anchor2=i,this.endingHeightAbove=5,this.pitch=void 0};n.prototype.setUpperAndLowerElements=function(t){this.pitch=t.endingHeightAbove-2},n.prototype.draw=function(t,e,i){void 0===this.pitch&&window.console.error("Ending Element y-coordinate not set.");var n,a=t.calcY(this.pitch);this.anchor1&&(e=this.anchor1.x+this.anchor1.w,n=r("M %f %f L %f %f",e,a,e,a+20),t.printPath({path:n,stroke:"#000000",fill:"#000000",class:t.addClasses("ending")}),t.renderText(e+5,t.calcY(this.pitch-.5),this.text,"repeatfont","ending","start")),this.anchor2&&(i=this.anchor2.x,n=r("M %f %f L %f %f",i,a,i,a+20),t.printPath({path:n,stroke:"#000000",fill:"#000000",class:t.addClasses("ending")})),n=r("M %f %f L %f %f",e,a,i,a),t.printPath({path:n,stroke:"#000000",fill:"#000000",class:t.addClasses("ending")})},t.exports=n},function(t,e,i){"use strict";var r=i(1),n=function(){this.voices=[],this.staffs=[],this.brace=void 0};n.prototype.setLimit=function(t,e){e.specialY[t]&&(e.staff.specialY[t]?e.staff.specialY[t]=Math.max(e.staff.specialY[t],e.specialY[t]):e.staff.specialY[t]=e.specialY[t])},n.prototype.addVoice=function(t,e,i){var r=this.voices.length;this.voices[r]=t,this.staffs[e]?this.staffs[e].voices.push(r):this.staffs[this.staffs.length]={top:10,bottom:2,lines:i,voices:[r],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},t.staff=this.staffs[e]},n.prototype.setStaffLimits=function(t){t.staff.top=Math.max(t.staff.top,t.top),t.staff.bottom=Math.min(t.staff.bottom,t.bottom),this.setLimit("tempoHeightAbove",t),this.setLimit("partHeightAbove",t),this.setLimit("volumeHeightAbove",t),this.setLimit("dynamicHeightAbove",t),this.setLimit("endingHeightAbove",t),this.setLimit("chordHeightAbove",t),this.setLimit("lyricHeightAbove",t),this.setLimit("lyricHeightBelow",t),this.setLimit("chordHeightBelow",t),this.setLimit("volumeHeightBelow",t),this.setLimit("dynamicHeightBelow",t)},n.prototype.setUpperAndLowerElements=function(t){for(var e,i=0;i<this.staffs.length;i++){var n=this.staffs[i],a={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};0,n.specialY.lyricHeightAbove&&(n.top+=n.specialY.lyricHeightAbove,a.lyricHeightAbove=n.top),n.specialY.chordHeightAbove&&(n.top+=n.specialY.chordHeightAbove,a.chordHeightAbove=n.top),n.specialY.endingHeightAbove&&(n.specialY.chordHeightAbove?n.top+=2:n.top+=n.specialY.endingHeightAbove,a.endingHeightAbove=n.top),n.specialY.dynamicHeightAbove&&n.specialY.volumeHeightAbove?(n.top+=Math.max(n.specialY.dynamicHeightAbove,n.specialY.volumeHeightAbove),a.dynamicHeightAbove=n.top,a.volumeHeightAbove=n.top):n.specialY.dynamicHeightAbove?(n.top+=n.specialY.dynamicHeightAbove,a.dynamicHeightAbove=n.top):n.specialY.volumeHeightAbove&&(n.top+=n.specialY.volumeHeightAbove,a.volumeHeightAbove=n.top),n.specialY.partHeightAbove&&(n.top+=n.specialY.partHeightAbove,a.partHeightAbove=n.top),n.specialY.tempoHeightAbove&&(n.top+=n.specialY.tempoHeightAbove,a.tempoHeightAbove=n.top),n.specialY.lyricHeightBelow&&(a.lyricHeightBelow=n.bottom,n.bottom-=n.specialY.lyricHeightBelow),n.specialY.chordHeightBelow&&(a.chordHeightBelow=n.bottom,n.bottom-=n.specialY.chordHeightBelow),n.specialY.volumeHeightBelow&&n.specialY.dynamicHeightBelow?(a.volumeHeightBelow=n.bottom,a.dynamicHeightBelow=n.bottom,n.bottom-=Math.max(n.specialY.volumeHeightBelow,n.specialY.dynamicHeightBelow)):n.specialY.volumeHeightBelow?(a.volumeHeightBelow=n.bottom,n.bottom-=n.specialY.volumeHeightBelow):n.specialY.dynamicHeightBelow&&(a.dynamicHeightBelow=n.bottom,n.bottom-=n.specialY.dynamicHeightBelow);for(var s=0;s<n.voices.length;s++){this.voices[n.voices[s]].setUpperAndLowerElements(a)}if(void 0!==e){var o=e+(n.top-10),c=t.spacing.systemStaffSeparation/r.STEP-o;c>0&&(n.top+=c)}e=2-n.bottom}},n.prototype.finished=function(){for(var t=0;t<this.voices.length;t++)if(!this.voices[t].layoutEnded())return!1;return!0},n.prototype.layout=function(t,e,i){this.spacingunits=0,this.minspace=1e3;for(var r=e.padding.left,n=0,a=0;a<this.voices.length;a++)if(this.voices[a].header){var s=e.getTextSize(this.voices[a].header,"voicefont","");n=Math.max(n,s.width)}n&&(r=r+n+e.getTextSize("A","voicefont","").width);this.startx=r,this.brace&&(this.brace.setLocation(this.startx),r+=this.brace.getWidth(),this.startx=r);var o=0;for(i&&console.log("init layout"),a=0;a<this.voices.length;a++)this.voices[a].beginLayout(r);for(var c=0;!this.finished();){for(o=null,a=0;a<this.voices.length;a++)this.voices[a].layoutEnded()||o&&!(this.voices[a].getDurationIndex()<o)||(o=this.voices[a].getDurationIndex());i&&console.log("currentduration: ",o);var l=[],h=[];for(a=0;a<this.voices.length;a++){this.voices[a].getDurationIndex()-o>1e-7?h.push(this.voices[a]):(l.push(this.voices[a]),i&&console.log("in: voice ",a))}c=0;var u=0;for(a=0;a<l.length;a++)l[a].getNextX()>r&&(r=l[a].getNextX(),c=l[a].getSpacingUnits(),u=l[a].spacingduration);for(this.spacingunits+=c,this.minspace=Math.min(this.minspace,c),a=0;a<l.length;a++){var f=l[a].layoutOneItem(r,t),d=f-r;if(d>0){r=f;for(var p=0;p<a;p++)l[p].shiftRight(d)}}for(a=0;a<h.length;a++)h[a].spacingduration-=u,h[a].updateNextX(r,t);for(a=0;a<l.length;a++){l[a].updateIndices()}}for(a=0;a<this.voices.length;a++)this.voices[a].getNextX()>r&&(r=this.voices[a].getNextX(),c=this.voices[a].getSpacingUnits());for(this.spacingunits+=c,this.w=r,a=0;a<this.voices.length;a++)this.voices[a].w=this.w},n.prototype.calcHeight=function(){for(var t=0,e=0;e<this.voices.length;e++){var i=this.voices[e].staff;this.voices[e].duplicate||(t+=i.top,i.bottom<0&&(t+=-i.bottom))}return t},n.prototype.draw=function(t){t.addInvisibleMarker("abcjs-top-of-system");for(var e,i,n=t.y,a=0;a<this.staffs.length;a++){var s=this.staffs[a];t.moveY(r.STEP,s.top),s.absoluteY=t.y,s.bottom<0&&t.moveY(r.STEP,-s.bottom)}var o=0;t.measureNumber=null,t.noteNumber=null;for(var c=0;c<this.voices.length;c++){var l=this.voices[c].staff;t.y=l.absoluteY,t.voiceNumber=c,this.voices[c].duplicate||(e||(e=t.calcY(10)),i=t.calcY(2),0!==l.lines&&(t.measureNumber=null,t.noteNumber=null,t.printStave(this.startx,this.w,l.lines))),this.voices[c].draw(t,o),t.measureNumber=null,t.noteNumber=null,this.voices[c].duplicate||(o=t.calcY(2)),this.brace&&c===this.brace.length-1&&this.brace&&this.brace.draw(t,e,i)}t.measureNumber=null,t.noteNumber=null,this.staffs.length>1&&t.printStem(this.startx,.6,e,i),t.y=n},t.exports=n},function(t,e,i){"use strict";var r,n=i(4),a=i(2);(r=function(t,e){this.tempo=t,this.tuneNumber=e,this.tempoHeightAbove=5,this.pitch=void 0}).prototype.setUpperAndLowerElements=function(t){this.pitch=t.tempoHeightAbove},r.prototype.setX=function(t){this.x=t},r.prototype.draw=function(t){var e=this.x;void 0===this.pitch&&window.console.error("Tempo Element y-coordinate not set.");var i=t.calcY(this.pitch);if(this.tempo.preString){var r=t.renderText(e,i,this.tempo.preString,"tempofont","tempo","start").getBBox().width;e+=r+r/this.tempo.preString.length}if(this.tempo.duration&&!this.tempo.suppressBpm){var s,o,c,l=this.pitch-5+1,h=this.tempo.duration[0],u=new n(this.tempo,h,1,"tempo",this.tuneNumber);h<=1/32?(c="noteheads.quarter",o="flags.u32nd",s=0):h<=1/16?(c="noteheads.quarter",o="flags.u16th",s=0):h<=3/32?(c="noteheads.quarter",o="flags.u16nd",s=1):h<=1/8?(c="noteheads.quarter",o="flags.u8th",s=0):h<=3/16?(c="noteheads.quarter",o="flags.u8th",s=1):h<=.25?(c="noteheads.quarter",s=0):h<=3/8?(c="noteheads.quarter",s=1):h<=.5?(c="noteheads.half",s=0):h<=.75?(c="noteheads.half",s=1):h<=1?(c="noteheads.whole",s=0):h<=1.5?(c="noteheads.whole",s=1):h<=2?(c="noteheads.dbl",s=0):(c="noteheads.dbl",s=1);var f,d=t.engraver.createNoteHead(u,c,{verticalPos:l},"up",0,0,o,s,0,.75);if(u.addHead(d),"noteheads.whole"!==c&&"noteheads.dbl"!==c){var p=l+.25,m=l+5.25,g=d.dx+d.w;(f=new a(null,g,0,p,{type:"stem",pitch2:m,linewidth:-.6})).setX(e),u.addExtra(f)}u.setX(e);for(var v=0;v<u.children.length;v++)u.children[v].draw(t,e);e+=u.w+5;var b="= "+this.tempo.bpm,y=t.renderText(e,i,b,"tempofont","tempo","start").getBBox().width;e+=y+y/b.length}this.tempo.postString&&t.renderText(e,i,this.tempo.postString,"tempofont","tempo","start")},t.exports=r},function(t,e,i){"use strict";var r,n=i(6);!function(){function t(t,e,i,r,a){var s=n("M %f %f L %f %f",e,i,r,a);t.printPath({path:s,stroke:"#000000",class:t.addClasses("triplet")})}(r=function(t,e){this.anchor1=e,this.number=t}).prototype.isClosed=function(){return this.anchor2},r.prototype.setCloseAnchor=function(t){this.anchor2=t,this.anchor1.parent.beam&&(this.endingHeightAbove=4)},r.prototype.setUpperAndLowerElements=function(){},r.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 t=this.anchor1.parent.beam,e=t.isAbove()?this.anchor1.x+this.anchor1.w:this.anchor1.x;this.yTextPos=t.heightAtMidpoint(e,this.anchor2.x),this.yTextPos+=t.isAbove()?4:-4,t.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},r.prototype.draw=function(e){var i;if(this.hasBeam){var r=this.anchor1.parent.beam.isAbove()?this.anchor1.x+this.anchor1.w:this.anchor1.x;i=this.anchor1.parent.beam.xAtMidpoint(r,this.anchor2.x)}else i=this.anchor1.x+(this.anchor2.x+this.anchor2.w-this.anchor1.x)/2,function(e,i,r,n,a){r=e.calcY(r),a=e.calcY(a);t(e,i,r,i,r+5),t(e,n,a,n,a+5);var s=i+(n-i)/2,o=(a-r)/(n-i),c=s-8;t(e,i,r,c,r+(c-i)*o);var l=s+8;t(e,l,r+(l-i)*o,n,a)}(e,this.anchor1.x,this.startNote,this.anchor2.x+this.anchor2.w,this.endNote);e.renderText(i,e.calcY(this.yTextPos),""+this.number,"tripletfont","triplet","middle",!0)}}(),t.exports=r},function(t,e,i){"use strict";var r=i(0),n=function(t,e){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=t,this.voicetotal=e,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}};n.prototype.addChild=function(t){if("bar"===t.type){for(var e=!0,i=0;e&&i<this.children.length;i++)"staff-extra"!==this.children[i].type&&(e=!1);e||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=t,this.setRange(t)},n.prototype.setLimit=function(t,e){var i=e.specialY;i||(i=e),i[t]&&(this.specialY[t]?this.specialY[t]=Math.max(this.specialY[t],i[t]):this.specialY[t]=i[t])},n.prototype.moveDecorations=function(t){for(var e=0;e<t.elems.length;e++){var i=t.elems[e];if(i.top)for(var r=t.yAtNote(i),n=0;n<i.children.length;n++){var a=i.children[n];if("ornament"===a.klass&&a.bottom-1.5<r){var s=r-a.bottom+1.5;a.bottom+=s,a.top+=s,a.pitch+=s,r=i.top=a.top}}}},n.prototype.adjustRange=function(t){void 0!==t.bottom&&(this.bottom=Math.min(this.bottom,t.bottom)),void 0!==t.top&&(this.top=Math.max(this.top,t.top))},n.prototype.setRange=function(t){this.adjustRange(t),this.setLimit("tempoHeightAbove",t),this.setLimit("partHeightAbove",t),this.setLimit("volumeHeightAbove",t),this.setLimit("dynamicHeightAbove",t),this.setLimit("endingHeightAbove",t),this.setLimit("chordHeightAbove",t),this.setLimit("lyricHeightAbove",t),this.setLimit("lyricHeightBelow",t),this.setLimit("chordHeightBelow",t),this.setLimit("volumeHeightBelow",t),this.setLimit("dynamicHeightBelow",t)},n.prototype.setUpperAndLowerElements=function(t){var e;for(e=0;e<this.children.length;e++){(i=this.children[e]).setUpperAndLowerElements(t)}for(e=0;e<this.otherchildren.length;e++){var i;"string"!=typeof(i=this.otherchildren[e])&&i.setUpperAndLowerElements(t)}},n.prototype.addOther=function(t){this.otherchildren.push(t),this.setRange(t)},n.prototype.addBeam=function(t){this.beams.push(t)},n.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++)},n.prototype.layoutEnded=function(){return this.i>=this.children.length},n.prototype.getDurationIndex=function(){return this.durationindex-(this.children[this.i]&&this.children[this.i].duration>0?0:5e-7)},n.prototype.getSpacingUnits=function(){return Math.sqrt(8*this.spacingduration)},n.prototype.getNextX=function(){return Math.max(this.minx,this.nextx)},n.prototype.beginLayout=function(t){this.i=0,this.durationindex=0,this.startx=t,this.minx=t,this.nextx=t,this.spacingduration=0},n.prototype.layoutOneItem=function(t,e){var i=this.children[this.i];if(!i)return 0;var r=t-this.minx;return r<i.getExtraWidth()&&(t+=i.getExtraWidth()-r),i.setX(t),this.spacingduration=i.duration,this.minx=t+i.getMinWidth(),this.i!==this.children.length-1&&(this.minx+=i.minspacing),this.updateNextX(t,e),t},n.prototype.updateNextX=function(t,e){this.nextx=t+e*Math.sqrt(8*this.spacingduration)},n.prototype.shiftRight=function(t){var e=this.children[this.i];e&&(e.setX(e.x+t),this.minx+=t,this.nextx+=t)},n.prototype.draw=function(t,e){var i=this.w-1;if(t.staffbottom=this.staff.bottom,t.measureNumber=null,t.noteNumber=null,this.header){var n=14-(this.voicenumber+1)*(12/(this.voicetotal+1));t.renderText(t.padding.left,t.calcY(n),this.header,"voicefont","staff-extra voice-name","start")}for(var a=0,s=this.children.length;a<s;a++){var o=this.children[a],c=!1;"staff-extra"!==o.type&&null===t.measureNumber&&(t.measureNumber=0,t.noteNumber=0,c=!0),o.draw(t,this.barto||a===s-1?e:0),"note"===o.type&&t.noteNumber++,"bar"!==o.type||c||(t.measureNumber++,t.noteNumber=0)}t.measureNumber=0,t.noteNumber=0,r.each(this.beams,function(e){"bar"===e?(t.measureNumber++,t.noteNumber=0):e.draw(t)}),t.measureNumber=0,t.noteNumber=0;var l=this;r.each(this.otherchildren,function(e){"bar"===e?(t.measureNumber++,t.noteNumber=0):e.draw(t,l.startx+10,i)})},n.prototype.layoutBeams=function(){for(var t=0;t<this.beams.length;t++)if(this.beams[t].layout){this.beams[t].layout(),this.moveDecorations(this.beams[t]);for(var e=0;e<this.beams[t].elems.length;e++)this.adjustRange(this.beams[t].elems[e])}for(t=0;t<this.otherchildren.length;t++){var i=this.otherchildren[t];i.layout&&i.layout()}this.staff.top=Math.max(this.staff.top,this.top),this.staff.bottom=Math.min(this.staff.bottom,this.bottom)},t.exports=n},function(t,e,i){"use strict";var r=i(3),n=i(1),a=i(6),s=function(t,e,i){this.paper=t,this.controller=null,this.space=3*n.SPACE,this.padding={},this.doRegression=e,this.shouldAddClasses=i,this.doRegression&&(this.regressionLines=[]),this.reset()};s.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=[])},s.prototype.setPrintMode=function(t){this.isPrint=t},s.prototype.setPaperSize=function(t,e,i){var r=(t+this.padding.right)*e,n=(this.y+this.padding.bottom)*e;this.isPrint&&(n=Math.max(n,1056)),this.doRegression&&this.regressionLines.push("PAPER SIZE: ("+r+","+n+")"),this.paper.canvas.setAttribute("role","img");var a=document.createElement("title"),s="Sheet Music";this.abctune&&this.abctune.metaText&&this.abctune.metaText.title&&(s+=' for "'+this.abctune.metaText.title+'"');var o=document.createTextNode(s);if(a.appendChild(o),this.paper.canvas.insertBefore(a,this.paper.canvas.firstChild),"resize"===i){this.paper.canvas.parentNode.classList.add("abcjs-container"),this.paper.canvas.setAttribute("viewBox","0 0 "+r+" "+n),this.paper.canvas.setAttribute("preserveAspectRatio","xMinYMin meet"),this.paper.canvas.removeAttribute("height"),this.paper.canvas.removeAttribute("width"),this.paper.canvas.style.display="inline-block",this.paper.canvas.style.position="absolute",this.paper.canvas.style.top="0",this.paper.canvas.style.left="0",this.paper.canvas.parentNode.style.display="inline-block",this.paper.canvas.parentNode.style.position="relative",this.paper.canvas.parentNode.style.width="100%";var c=n/r*100;this.paper.canvas.parentNode.style["padding-bottom"]=c+"%",this.paper.canvas.parentNode.style["vertical-align"]="middle",this.paper.canvas.parentNode.style.overflow="hidden"}else{this.paper.setSize(r/e,n/e);this.paper.canvas.parentNode.setAttribute("style","width:"+r+"px")}1!==e?(this.paper.canvas.style.transform="scale("+e+","+e+")",this.paper.canvas.style["-ms-transform"]="scale("+e+","+e+")",this.paper.canvas.style["-webkit-transform"]="scale("+e+","+e+")",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","resize"!==i&&(this.paper.canvas.parentNode.style.height=n+"px")},s.prototype.setPaddingOverride=function(t){this.paddingOverride={top:t.paddingtop,bottom:t.paddingbottom,right:t.paddingright,left:t.paddingleft}},s.prototype.setPadding=function(t){function e(e,i,r,n,a){void 0!==t.formatting[r]?e.padding[i]=t.formatting[r]:void 0!==e.paddingOverride[i]?e.padding[i]=e.paddingOverride[i]:e.isPrint?e.padding[i]=n:e.padding[i]=a}e(this,"top","topmargin",38,15),e(this,"bottom","botmargin",38,15),e(this,"left","leftmargin",68,15),e(this,"right","rightmargin",68,15)},s.prototype.adjustNonScaledItems=function(t){this.padding.top/=t,this.padding.bottom/=t,this.padding.left/=t,this.padding.right/=t,this.abctune.formatting.headerfont.size/=t,this.abctune.formatting.footerfont.size/=t},s.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}},s.prototype.setVerticalSpace=function(t){void 0!==t.staffsep&&(this.spacing.staffSeparation=4*t.staffsep/3),void 0!==t.composerspace&&(this.spacing.composer=4*t.composerspace/3),void 0!==t.partsspace&&(this.spacing.parts=4*t.partsspace/3),void 0!==t.textspace&&(this.spacing.text=4*t.textspace/3),void 0!==t.musicspace&&(this.spacing.music=4*t.musicspace/3),void 0!==t.titlespace&&(this.spacing.title=4*t.titlespace/3),void 0!==t.sysstaffsep&&(this.spacing.systemStaffSeparation=4*t.sysstaffsep/3),void 0!==t.subtitlespace&&(this.spacing.subtitle=4*t.subtitlespace/3),void 0!==t.topspace&&(this.spacing.top=4*t.topspace/3),void 0!==t.vocalspace&&(this.spacing.vocal=4*t.vocalspace/3),void 0!==t.wordsspace&&(this.spacing.words=4*t.wordsspace/3)},s.prototype.topMargin=function(t){this.moveY(this.padding.top)},s.prototype.addMusicPadding=function(){this.moveY(this.spacing.music)},s.prototype.addStaffPadding=function(t,e){var i=-(t.staffs[t.staffs.length-1].bottom-2),r=(e.staffs[0].top-10+i)*n.STEP;r<this.spacing.staffSeparation&&this.moveY(this.spacing.staffSeparation-r)},s.prototype.engraveTopText=function(t,e){if(e.metaText.header&&this.isPrint){var i=this.getTextSize("XXXX","headerfont","abcjs-header abcjs-meta-top").height;this.y-=i,this.outputTextIf(this.padding.left,e.metaText.header.left,"headerfont","header meta-top",0,null,"start"),this.outputTextIf(this.padding.left+t/2,e.metaText.header.center,"headerfont","header meta-top",0,null,"middle"),this.outputTextIf(this.padding.left+t,e.metaText.header.right,"headerfont","header meta-top",0,null,"end"),this.y+=i}if(this.isPrint&&this.moveY(this.spacing.top),this.outputTextIf(this.padding.left+t/2,e.metaText.title,"titlefont","title meta-top",this.spacing.title,0,"middle"),e.lines[0]&&this.outputTextIf(this.padding.left+t/2,e.lines[0].subtitle,"subtitlefont","text meta-top",this.spacing.subtitle,0,"middle"),e.metaText.rhythm||e.metaText.origin||e.metaText.composer){this.moveY(this.spacing.composer);var r=this.outputTextIf(this.padding.left,e.metaText.rhythm,"infofont","meta-top",0,null,"start"),n="";if(e.metaText.composer&&(n+=e.metaText.composer),e.metaText.origin&&(n+=" ("+e.metaText.origin+")"),n.length>0){var a=this.outputTextIf(this.padding.left+t,n,"composerfont","meta-top",0,null,"end");this.moveY(a[1])}else this.moveY(r[1]);this.moveY(-6)}this.outputTextIf(this.padding.left+t,e.metaText.author,"composerfont","meta-top",0,0,"end"),this.outputTextIf(this.padding.left,e.metaText.partOrder,"partsfont","meta-bottom",0,0,"start")},s.prototype.engraveExtraText=function(t,e){var i;if(this.lineNumber=null,this.measureNumber=null,this.noteNumber=null,this.voiceNumber=null,e.metaText.unalignedWords){i="";for(var r=0;r<e.metaText.unalignedWords.length;r++)if("string"==typeof e.metaText.unalignedWords[r])i+=e.metaText.unalignedWords[r]+"\n";else{for(var a=0;a<e.metaText.unalignedWords[r].length;a++)i+=" FONT "+e.metaText.unalignedWords[r][a].text;i+="\n"}this.outputTextIf(this.padding.left+n.INDENT,i,"wordsfont","meta-bottom",this.spacing.words,2,"start")}i="",e.metaText.book&&(i+="Book: "+e.metaText.book+"\n"),e.metaText.source&&(i+="Source: "+e.metaText.source+"\n"),e.metaText.discography&&(i+="Discography: "+e.metaText.discography+"\n"),e.metaText.notes&&(i+="Notes: "+e.metaText.notes+"\n"),e.metaText.transcription&&(i+="Transcription: "+e.metaText.transcription+"\n"),e.metaText.history&&(i+="History: "+e.metaText.history+"\n"),e.metaText["abc-copyright"]&&(i+="Copyright: "+e.metaText["abc-copyright"]+"\n"),e.metaText["abc-creator"]&&(i+="Creator: "+e.metaText["abc-creator"]+"\n"),e.metaText["abc-edited-by"]&&(i+="Edited By: "+e.metaText["abc-edited-by"]+"\n"),this.outputTextIf(this.padding.left,i,"historyfont","meta-bottom",this.spacing.info,0,"start"),e.metaText.footer&&this.isPrint&&(this.outputTextIf(this.padding.left,e.metaText.footer.left,"footerfont","header meta-bottom",0,null,"start"),this.outputTextIf(this.padding.left+t/2,e.metaText.footer.center,"footerfont","header meta-bottom",0,null,"middle"),this.outputTextIf(this.padding.left+t,e.metaText.footer.right,"footerfont","header meta-bottom",0,null,"end"))},s.prototype.outputFreeText=function(t){if(""===t){var e=this.getFontAndAttr("textfont","defined-text");this.moveY(2*e.attr["font-size"])}else if("string"==typeof t)this.outputTextIf(this.padding.left,t,"textfont","defined-text",0,1,"start");else{for(var i="",r=!1,n=0;n<t.length;n++)t[n].font&&(i+="FONT("+t[n].font+")"),i+=t[n].text,t[n].center&&(r=!0);var a=r?"middle":"start",s=r?this.controller.width/2:this.padding.left;this.outputTextIf(s,i,"textfont","defined-text",0,1,a)}},s.prototype.outputSubtitle=function(t,e){this.outputTextIf(this.padding.left+t/2,e,"subtitlefont","text meta-top",this.spacing.subtitle,0,"middle")},s.prototype.beginGroup=function(){this.path=[],this.lastM=[0,0],this.ingroup=!0},s.prototype.addPath=function(t){if(0!==(t=t||[]).length){t[0][0]="m",t[0][1]-=this.lastM[0],t[0][2]-=this.lastM[1],this.lastM[0]+=t[0][1],this.lastM[1]+=t[0][2],this.path.push(t[0]);for(var e=1,i=t.length;e<i;e++)"m"===t[e][0]&&(this.lastM[0]+=t[e][1],this.lastM[1]+=t[e][2]),this.path.push(t[e])}},s.prototype.endGroup=function(t){if(this.ingroup=!1,0===this.path.length)return null;var e=this.paper.path().attr({path:this.path,stroke:"none",fill:"#000000",class:this.addClasses(t)});return this.path=[],this.doRegression&&this.addToRegression(e),e},s.prototype.printStaveLine=function(t,e,i,r){var n="staff";void 0!==r&&(n+=" "+r);var s=.35,o="#000000";var c=this.calcY(i),l=a("M %f %f L %f %f L %f %f L %f %f z",t,c-s,e,c-s,e,c+s,t,c+s),h=this.paper.path().attr({path:l,stroke:"none",fill:o,class:this.addClasses(n)}).toBack();return this.doRegression&&this.addToRegression(h),h},s.prototype.printStem=function(t,e,i,r){if(e<0){var n=r;r=i,i=n}var a="#000000";~~t===t&&(t+=.05);var s=[["M",t,i],["L",t,r],["L",t+e,r],["L",t+e,i],["z"]];if(!this.ingroup){var o=this.paper.path().attr({path:s,stroke:"none",fill:a,class:this.addClasses("stem")}).toBack();return this.doRegression&&this.addToRegression(o),o}this.addPath(s)},s.prototype.printSymbol=function(t,e,i,n,a,s){var o,c,l,h,u,f;if(!i)return null;if(i.length>0&&i.indexOf(".")<0){for(var d=this.paper.set(),p=0,m=0;m<i.length;m++){var g=i.charAt(m);c=r.getYCorr(g),(o=r.printSymbol(t+p,this.calcY(e+c),g,this.paper,s))?(this.doRegression&&this.addToRegression(o),d.push(o),m<i.length-1&&(p+=(l=g,h=i.charAt(m+1),u=r.getSymbolWidth(g),f=void 0,f=u,"f"===l&&"f"===h&&(f=2*f/3),"p"===l&&"p"===h&&(f=5*f/6),"f"===l&&"z"===h&&(f=5*f/8),f))):this.renderText(t,this.y,"no symbol:"+i,"debugfont","debug-msg","start")}return d}if(c=r.getYCorr(i),this.ingroup)this.addPath(r.getPathForSymbol(t,this.calcY(e+c),i,n,a));else{if(o=r.printSymbol(t,this.calcY(e+c),i,this.paper,s))return this.doRegression&&this.addToRegression(o),o;this.renderText(t,this.y,"no symbol:"+i,"debugfont","debug-msg","start")}return null},s.prototype.printPath=function(t){var e=this.paper.path().attr(t);return this.doRegression&&this.addToRegression(e),e},s.prototype.drawBrace=function(t,e,i){var r=i-e,n=[7.5,-8,21,0,18.5,-10.5,7.5],s=[0,r/5.5,r/3.14,r/2,r/2.93,r/4.88,0],o=a("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t+n[0],e+s[0],t+n[1],e+s[1],t+n[2],e+s[2],t+n[3],e+s[3],t+n[4],e+s[4],t+n[5],e+s[5],t+n[6],e+s[6]),c=this.paper.path().attr({path:o,stroke:"#000000",fill:"#000000",class:this.addClasses("brace")});o=a("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t+(n=[0,17.5,-7.5,6.6,-5,20,0])[0],e+(s=[r/2,r/1.46,r/1.22,r,r/1.19,r/1.42,r/2])[0],t+n[1],e+s[1],t+n[2],e+s[2],t+n[3],e+s[3],t+n[4],e+s[4],t+n[5],e+s[5],t+n[6],e+s[6]);var l=this.paper.path().attr({path:o,stroke:"#000000",fill:"#000000",class:this.addClasses("brace")});return this.doRegression&&(this.addToRegression(c),this.addToRegression(l)),c+l},s.prototype.drawArc=function(t,e,i,r,n,s,o){var c=o?1.2:1.5;t+=6,e+=4,i+=n?c:-c,r+=n?c:-c;var l=this.calcY(i),h=this.calcY(r),u=e-t,f=h-l,d=Math.sqrt(u*u+f*f),p=u/d,m=f/d,g=d/3.5,v=o?10:25,b=(n?-1:1)*Math.min(v,Math.max(4,g)),y=t+g*p-b*m,x=l+g*m+b*p,w=e-g*p-b*m,k=h-g*m+b*p,A=a("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t,l,y,x,w,k,e,h,w-2*m,k+2*p,y-2*m,x+2*p,t,l);s?s+=" slur":s="slur";var _=this.paper.path().attr({path:A,stroke:"none",fill:"#000000",class:this.addClasses(s)});return this.doRegression&&this.addToRegression(_),_},s.prototype.calcY=function(t){return this.y-t*n.STEP},s.prototype.printStave=function(t,e,i){var r="top-line";if(1!==i)for(var n=i-1;n>=0;n--)this.printStaveLine(t,e,2*(n+1),r),r=void 0;else this.printStaveLine(t,e,6,r)},s.prototype.addClasses=function(t,e){if(!this.shouldAddClasses)return"";var i=[];if(t.length>0&&i.push(t),null!==this.lineNumber&&void 0!==this.lineNumber&&i.push("l"+this.lineNumber),null!==this.measureNumber&&void 0!==this.measureNumber&&i.push("m"+this.measureNumber),null!==this.voiceNumber&&void 0!==this.voiceNumber&&i.push("v"+this.voiceNumber),t.indexOf("note")>=0&&null!==this.noteNumber&&void 0!==this.noteNumber&&i.push("n"+this.noteNumber),i.length>0){i=(i=i.join(" ")).split(" ");for(var r=0;r<i.length;r++)0!==i[r].indexOf("abcjs-")&&i[r].length>0&&(i[r]="abcjs-"+i[r])}return i.join(" ")},s.prototype.getFontAndAttr=function(t,e){var i=this.abctune.formatting[t],r={"font-size":(i=i?{face:i.face,size:4*i.size/3,decoration:i.decoration,style:i.style,weight:i.weight,box:i.box}:{face:"Arial",size:16,decoration:"underline",style:"normal",weight:"normal"}).size,"font-style":i.style,"font-family":i.face,"font-weight":i.weight,"text-decoration":i.decoration,class:this.addClasses(e),font:""};return{font:i,attr:r}},s.prototype.getTextSize=function(t,e,i){var r=this.getFontAndAttr(e,i),n=this.paper.text(0,0,t).attr(r.attr),a=n.getBBox();return isNaN(a.height)&&(a={width:0,height:0}),n.remove(),r.font.box&&(a.height+=8),a},s.prototype.renderText=function(t,e,i,r,n,a,s){var o=this.getFontAndAttr(r,n);a&&(o.attr["text-anchor"]=a),i=(i=i.replace(/\n\n/g,"\n \n")).replace(/^\n/," \n");var c=this.paper.text(t,e,i).attr(o.attr);if(!s){var l=c.getBBox();if(isNaN(l.height))c.attr({y:e});else{if(o.font.box){this.paper.rect(l.x-2,l.y+l.height/2+2,l.width+4,l.height+4-2).attr({stroke:"#888888"}),l.height+=8}c.attr({y:e+l.height/2})}}return"debugfont"===r&&(console.log("Debug msg: "+i),c.attr({stroke:"#ff0000"})),this.doRegression&&this.addToRegression(c),c},s.prototype.moveY=function(t,e){void 0===e&&(e=1),this.y+=t*e},s.prototype.skipSpaceY=function(){this.y+=this.space},s.prototype.outputTextIf=function(t,e,i,r,n,a,s){if(e){n&&this.moveY(n);var o=this.renderText(t,this.y,e,i,r,s).getBBox(),c=isNaN(o.width)?0:o.width,l=isNaN(o.height)?0:o.height;if(null!==a){var h=e.split("\n").length;isNaN(o.height)||this.moveY(l/h,h+a)}return[c,l]}return[0,0]},s.prototype.addInvisibleMarker=function(t){var e=this.y;e=Math.round(e);var i=a("M %f %f L %f %f L %f %f L %f %f z",0,e-.35,100,e-.35,100,e+.35,0,e+.35);this.paper.path().attr({path:i,stroke:"none",fill:"rgba(0,0,0,0)",class:this.addClasses(t),"data-vertical":e}).toBack()},s.prototype.printHorizontalLine=function(t,e,i){var r=.35,n="rgba(0,0,255,.4)",s=this.y;e&&(s=e),s=Math.round(s),this.paper.text(10,s,""+Math.round(s)).attr({"text-anchor":"start","font-size":"18px",fill:n,stroke:n});var o=a("M %f %f L %f %f L %f %f L %f %f z",50,s-r,50+t,s-r,t,s+r,50,s+r);this.paper.path().attr({path:o,stroke:"none",fill:n,class:this.addClasses("staff")}).toBack();for(var c=1;c<t/100;c++)o=a("M %f %f L %f %f L %f %f L %f %f z",100*c-r,s-5,100*c-r,s+5,100*c+r,s-5,100*c+r,s+5),this.paper.path().attr({path:o,stroke:"none",fill:n,class:this.addClasses("staff")}).toBack();i&&this.paper.text(t+70,s,i).attr({"text-anchor":"start","font-size":"18px",fill:n,stroke:n})},s.prototype.printShadedBox=function(t,e,i,r,n,a){var s=this.paper.rect(t,e,i,r).attr({fill:n,stroke:n});return a&&this.paper.text(0,e+7,a).attr({"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),s},s.prototype.printVerticalLine=function(t,e,i){var r=a("M %f %f L %f %f L %f %f L %f %f z",t-.35,e,t-.35,i,t+.35,e,t+.35,i);this.paper.path().attr({path:r,stroke:"none",fill:"#00aaaa",class:this.addClasses("staff")}).toBack(),r=a("M %f %f L %f %f L %f %f L %f %f z",t-20,e,t-20,e+3,t,e,t,e+3),this.paper.path().attr({path:r,stroke:"none",fill:"#00aaaa",class:this.addClasses("staff")}).toBack(),r=a("M %f %f L %f %f L %f %f L %f %f z",t+20,i,t+20,i+3,t,i,t,i+3),this.paper.path().attr({path:r,stroke:"none",fill:"#00aaaa",class:this.addClasses("staff")}).toBack()},s.prototype.addToRegression=function(t){var e=t.getBBox(),i=t.type+" "+e.toString()+" ",r=[];for(var n in t.attrs)t.attrs.hasOwnProperty(n)&&("class"===n?i=t.attrs[n]+" "+i:r.push(n+": "+t.attrs[n]));r.sort(),i+="{ "+r.join(" ")+" }",this.regressionLines.push(i)},t.exports=s},function(t,e,i){"use strict";var r=i(5),n=i(10),a=i(15);t.exports=function(t,e,i,s,o){var c,l={};if(i)for(c in i)i.hasOwnProperty(c)&&(l[c]=i[c]);if(s)for(c in s)s.hasOwnProperty(c)&&("listener"===c?l.midiListener=s[c]:"transpose"===c?l.midiTranspose=s[c]:l[c]=s[c]);if(o)for(c in o)o.hasOwnProperty(c)&&(l[c]=o[c]);return void 0===l.generateInline&&(l.generateInline=!0),l.inlineControls&&(l.inlineControls.selectionToggle=!1),r.renderEngine(function(t,e,i){var r="",s=a(e,l);if(l.generateInline){var o=s.inline?s.inline:s;r+=n.generateMidiControls(e,l,o,i)}if(l.generateDownload){var c=s.download?s.download:s;r+=n.generateMidiDownloadLink(e,l,c,i)}t.innerHTML=r;var h=function(t,e){var i=t.getElementsByClassName(e);return 0===i.length?null:i[0]};if(l.generateInline&&(l.animate||l.midiListener)){var u=h(t,"abcjs-inline-midi");if(u.abcjsTune=e,u.abcjsListener=l.midiListener,u.abcjsQpm=l.qpm,u.abcjsContext=l.context,l.animate){var f=l.drumIntro?l.drumIntro:0;u.abcjsAnimate=l.animate.listener,u.abcjsTune=l.animate.target,u.abcjsTune.setTiming(l.qpm,f)}}if(l.generateInline&&l.inlineControls&&l.inlineControls.startPlaying){var d=h(t,"abcjs-midi-start");n.startPlaying(d)}},t,e,l)}},function(t,e){"undefined"==typeof galactic&&(galactic={}),function(e){"use strict";e.request=function(t,i,r,n){"string"==typeof t&&(t={url:t});var a=t.data,s=t.url,o=t.method||(t.data?"POST":"GET"),c=t.format,l=t.headers,h=t.mimeType,u=t.responseType,f=t.withCredentials||!1;n=n||t.onprogress,i=i||t.onsuccess,r=r||t.onerror;if("undefined"==typeof NodeFS||!e.loc.isLocalUrl(s)){var d=new XMLHttpRequest;if(d.open(o,s,!0),l)for(var p in l)d.setRequestHeader(p,l[p]);else a&&d.setRequestHeader("Content-type","application/x-www-form-urlencoded");return h&&d.overrideMimeType(h),u&&(d.responseType=u),f&&(d.withCredentials=!0),r&&"onerror"in d&&(d.onerror=r),n&&d.upload&&"onprogress"in d.upload&&(a?d.upload.onprogress=function(t){n.call(d,t,event.loaded/event.total)}:d.addEventListener("progress",function(t){var e=0;if(t.lengthComputable)e=t.total;else if(d.totalBytes)e=d.totalBytes;else{var i=parseInt(d.getResponseHeader("Content-Length-Raw"));if(!isFinite(i))return;d.totalBytes=e=i}n.call(d,t,t.loaded/e)},!1)),d.onreadystatechange=function(t){if(4===d.readyState)if(200===d.status||304===d.status||308===d.status||0===d.status&&window.top.cordova){if(i){var e;if("json"===c)try{e=JSON.parse(t.target.response)}catch(e){r&&r.call(d,t)}else e="xml"===c?t.target.responseXML:"text"===c?t.target.responseText:t.target.response;i.call(d,t,e)}}else r&&r.call(d,t)},d.send(a),d}NodeFS.readFile(s,"utf8",function(t,e){t?r&&r(t):i&&i({responseText:e},e)})},"object"==typeof t&&t.exports&&(t.exports=e.request)}(galactic)},function(t,e){"undefined"==typeof galactic&&(galactic={}),function(e){"use strict";e.module=e.module||{},e.module.DOMMisc=function(t){var e,i,r,n=t.util||(t.util={});n.inherits=function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t},n.errorHandler=function(t){return function(){console.warn(t,arguments)}},n.requestKioskMode=function(){t.client.nodewebkit&&win.enterKioskMode()},n.diff=function(t,e,i){if(t!==e){var r=new t.constructor,a=new e.constructor,s=!0;for(var o in t)if(i&&-1!==i.indexOf(o))r[o]=t[o],a[o]=e[o];else if(o in e){if(t[o]!==e[o])if("object"==typeof t[o]&&"object"==typeof e[o]){var c=n.diff(t[o],e[o],i);void 0!==c&&(s=!1,r[o]=c.from,a[o]=c.to)}else s=!1,r[o]=t[o],a[o]=e[o]}else s=!1,r[o]=t[o],a[o]=e[o];for(var o in e)o in t||(s=!1,r[o]=t[o],a[o]=e[o]);return s?void 0:{from:r,to:a}}},n.sort=function(t){var e,i=n.sort[t.fn]||t.fn,r=t.data||t,a=t.param;return Array.isArray(r)?e=a?r.sort(function(t,e){return i(t[a],e[a])}):r.sort(i):(e={},Object.keys(r).sort(i).forEach(function(t){e[t]=r[t]})),e},n.sort.numeric=function(t,e){return t-e},n.sort.natural=function(t,e){var i=/(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,r=/(^[ ]*|[ ]*$)/g,n=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,a=/^0x[0-9a-f]+$/i,s=/^0/,o=t.toString().replace(r,"")||"",c=e.toString().replace(r,"")||"",l=o.replace(i,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=c.replace(i,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),u=parseInt(o.match(a))||1!=l.length&&o.match(n)&&Date.parse(o),f=parseInt(c.match(a))||u&&c.match(n)&&Date.parse(c)||null;if(f){if(u<f)return-1;if(u>f)return 1}for(var d=0,p=Math.max(l.length,h.length);d<p;d++){var m=!(l[d]||"").match(s)&&parseFloat(l[d])||l[d]||0,g=!(h[d]||"").match(s)&&parseFloat(h[d])||h[d]||0;if(isNaN(m)!==isNaN(g))return isNaN(m)?1:-1;if(typeof m!=typeof g&&(m+="",g+=""),m<g)return-1;if(m>g)return 1}return 0},n.getItems=function(t,e){var i=t.length,r={};n.each(t,function(t){n.getItem(t,function(n){r[t]=n,--i||e(r)})})},n.getItem=function(e,i){i=i||function(t){console.log(t)};var r=function(t){if(t)try{t=JSON.parse(t)}catch(t){}i(t)};if(n.exists("chrome.storage.local"))chrome.storage.local.get(e,function(t){r(t[e])});else{var a=(t.feature&&t.feature.prefix||"")+"/"+e,s=localStorage.getItem(a)||"";r(s)}},n.setItem=function(e,i){if(n.exists("chrome.storage.local")){var r={};r[e]=i,chrome.storage.local.set(r)}else{var a=(t.feature&&t.feature.prefix||"")+"/"+e;localStorage.setItem(a,i)}},n.Canvas=function(e,i,r){if("undefined"==typeof document){if(void 0===Canvas)return{ctx:{}};var n=new Canvas}else{n=document.createElement("canvas");"function"==typeof FlashCanvas&&(n.onload=t.client.fn.detect)}return n.ctx=n.getContext(r||"2d"),isFinite(e)&&(n.width=e||1),isFinite(i)&&(n.height=i||1),n},n.Canvas.resize=function(t,e,i){e&&i?(t.width=e,t.height=i):t.width=t.width},n.Canvas.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},n.Context3d=function(t,e){return n.Canvas(t,e,"webgl").ctx},n.Context2d=function(t,e){return n.Canvas(t,e,"2d").ctx},n.json={},n.json.pretty=function(t){return JSON.stringify(t,null,"\t")},n.json.stringify=function(t){return JSON.stringify(t,function(t,e){if("object"==typeof e){if(null===e)return;if(e.nodeName)return;if(e.tagName)return}return e})},n.timestamp=function(){if("object"==typeof window){var t=window.performance;if(t&&t.now)return t.now.bind(t)}return Date.now}(),n.perf=function(t,e,i){if(!e||!t){var r=n.timestamp();return function(t,e){var i=n.timestamp(),a=Math.round(i-r);return t&&console.log(a+"ms",t),e&&(r=i),a}}for(var a=n.perf(),s=0;s<e;s++)t();console.log(a()+"ms",i||"")},n.exists=function(t,e){try{for(var i=t.split("."),r=e||window,n=0,a=i.length;n<a;n++){var s=i[n];if(null==r[s])return!1;r=r[s]}return!0}catch(t){return!1}},n.copy=(e="function"==typeof CanvasPattern,i=function(t){if(!t||"object"!=typeof t)return t;if(!(t.nodeType||e&&t instanceof CanvasPattern)){if(t.clone&&"function"==typeof t.clone)return t.clone();if(t.constructor){var r=new t.constructor;for(var n in t){var a=t[n];r[n]=a&&"object"==typeof a?i(a):a}return r}}}),n.copyInto=r=function(t,e,i){if(i=i||{},t&&"object"==typeof t)for(var n in t){var a=e[n],s=t[n],o=i.filter;if(!o||!o(s,a)){var c=typeof s;if(s&&"object"===c)if(s.nodeType){if(!i.referenceNodes)continue;e[n]=s}else e[n]=r(s,typeof a===c?a:new s.constructor,i);else e[n]=s}}return e},n.count=function(t,e,i){if(!t)return 0;if(isFinite(t.length))return t.length;if("object"==typeof t){var r=0,n=void 0!==e;if(n&&void 0!==i)for(var a in t)t[a]&&t[a][e]===i&&++r;else if(n)for(var a in t)void 0!==t[a]&&++r;else for(var a in t)++r;return r}},n.isEmpty=function(t){if(null==t)return!0;if(t.length>=0)return!t.length;for(var e in t)return!1;return!0},n.isNotEmpty=function(t){return!n.isEmpty(t)},n.clamp=function(t,e,i){return i<t?t:i>e?e:i},n.clampFinite=function(t){var e=n.INFINITY;return t>+e&&(t=+e),t<-e&&(t=-e),t},n.arrayEmpty=function(t){t.splice(0,t.length)},n.arrayIntersects=function(t,e){return e.some(function(e){return-1!==t.indexOf(e)})},n.inArray=function(t,e){return-1!==t.indexOf(e)},n.isArray=function(t){return Array.isArray(t)||t instanceof NodeList},n.each=function(t,e){if(n.isArray(t))for(var i=0;i<t.length;i++)e(t[i],i);else for(var r in t)e(t[r],r)},n.equals=function(t,e){return"object"==typeof t?"object"==typeof e&&n.json.stringify(t)===n.json.stringify(e):t===e},n.objectToArray=function(t){var e=[];for(var i in t)e.push(t[i]);return e},n.arrayToObject=function(t){for(var e={},i=0,r=t.length;i<r;i++)e[t[i]]=!0;return e},n.addFileInput=function(e,i){t.uploader.addFileInput({target:e,onchange:function(e){e.fileInput.value="",e.addMedia({openAsNew:i,self:t.uploader})}})},n.bytesToSize=function(t,e){if(t){e=e||1;var i=Math.floor(Math.log(Math.abs(t))/Math.log(1024));return(t/Math.pow(1024,i)).toFixed(e)+["Bytes","kb","mb","gb","tb"][i]}return"0Bytes"},n.getTimeFormat=function(t,e){var i=(t/=1e3)/3600>>0,r=(t-3600*i)/60>>0,n=t-3600*i-60*r>>0;return e?(i<10&&(i="0"+i),r<10&&(r="0"+r),n<10&&(n="0"+n),i+":"+r+":"+n):{hours:i,minutes:r,seconds:n}},n.require=function(t){"string"==typeof t&&(t={url:t});var e=t.url,i=t.type||(-1!==e.indexOf(".css")?"css":"js"),r=t.async||!1,n=t.onsuccess;if("css"===i)r?setTimeout(o,0):o();else{var a=document.createElement("script");if(a.src=e,a.async=r,n){var s=!1;a.onload=a.onreadystatechange=function(){if(!1===s){var t=a.readyState;t&&!/loaded|complete/.test(t)||(s=!0,n(),a.onload=a.onreadystatechange=null)}}}document.head.appendChild(a)}function o(){var t=document.createElement("link");t.href=e,t.setAttribute("type","text/css"),t.setAttribute("rel","stylesheet"),document.head.appendChild(t)}},n.isEditingText=function(){var t=document.activeElement;if(!t)return!1;var e=t.nodeName;return("INPUT"===e||"TEXTAREA"===e||"true"===t.contentEditable)&&!t.classList.contains("sk-canvas-dummy")},n.pending=function(t,e){var i=t;return{add:function(t){i+=t||1},next:function(){--i||e()}}}},void 0!==t&&t.exports?t.exports=e.module.DOMMisc:e.module.DOMMisc(galactic)}(galactic)},function(t,e){!function(){"use strict";var t,e={},i={};function r(i){return new Promise(function(r,o){var c=i.format,l=i.codec,h=i.base64,u="audio/"+c+'; codecs="'+l+'"',f="data:"+u+";base64,"+h,d=new Audio;function p(i){function a(t,i,r,n){!e[i]&&(e[i]=n),!e[r]&&(e[r]=n),!t[i]&&(t[i]=n),t[r]=n}a(e.audio,c,l,i),e.audioapi?function(e){return new Promise(function(i,r){(t=t||new n).decodeAudioData(s(e),i,r).then(function(t){}).catch(function(t){}),setTimeout(r,250)})}(f).then(function(){a(e.audioapi,c,l,!0),r()},function(t){a(e.audioapi,c,l,!1),r()}):r()}d.canPlayType(u).replace(/no/i,"")?(d.id="audio",d.controls=!1,d.setAttribute("autobuffer",!0),d.setAttribute("preload","auto"),d.addEventListener("error",function t(e){var i;a&&!d.testedBlobURL?(d.testedBlobURL=!0,d.src=a((i=f,new Blob([s(i)],{type:function(t){return(t=t.split(","))[0].split(":")[1].split(";")[0]}(i)})))):(d.removeEventListener("error",t),p(!1))}),d.addEventListener("canplaythrough",function t(){d.removeEventListener("canplaythrough",t),p(!0)}),d.src=f,d.load()):p(!1)})}var n=self.AudioContext||self.mozAudioContext||self.webkitAudioContext,a=(self.URL||self.webkitURL||{}).createObjectURL;function s(t){t=t.split(",");for(var e=atob(t[1]),i=new ArrayBuffer(e.length),r=new Uint8Array(i),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return i}function o(t,e,r){i[t+"_"+e]={format:t,codec:e,base64:r}}o("mpeg","mp3","//MUxAAB6AXgAAAAAPP+c6nf//yi/6f3//MUxAMAAAIAAAjEcH//0fTX6C9Lf//0//MUxA4BeAIAAAAAAKX2/6zv//+IlR4f//MUxBMCMAH8AAAAABYWalVMQU1FMy45//MUxBUB0AH0AAAAADkuM1VVVVVVVVVV//MUxBgBUATowAAAAFVVVVVVVVVVVVVV"),o("ogg","opus","T2dnUwACAAAAAAAAAAAAAAAAAAAAAEVP7KoBE09wdXNIZWFkAQEAD0SsAAAAAABPZ2dTAAAAAAAAAAAAAAAAAAABAAAAVewFUgEYT3B1c1RhZ3MIAAAAUmVjb3JkZXIAAAAAT2dnUwAEwAMAAAAAAAAAAAAAAgAAAHSiY8oBA/j//g=="),o("ogg","vorbis","T2dnUwACAAAAAAAAAAD/QwAAAAAAAM2LVKsBHgF2b3JiaXMAAAAAAUSsAAAAAAAAgLsAAAAAAAC4AU9nZ1MAAAAAAAAAAAAA/0MAAAEAAADmvOe6Dy3/////////////////MgN2b3JiaXMdAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAwNzA2MjIAAAAAAQV2b3JiaXMfQkNWAQAAAQAYY1QpRplS0kqJGXOUMUaZYpJKiaWEFkJInXMUU6k515xrrLm1IIQQGlNQKQWZUo5SaRljkCkFmVIQS0kldBI6J51jEFtJwdaYa4tBthyEDZpSTCnElFKKQggZU4wpxZRSSkIHJXQOOuYcU45KKEG4nHOrtZaWY4updJJK5yRkTEJIKYWSSgelU05CSDWW1lIpHXNSUmpB6CCEEEK2IIQNgtCQVQAAAQDAQBAasgoAUAAAEIqhGIoChIasAgAyAAAEoCiO4iiOIzmSY0kWEBqyCgAAAgAQAADAcBRJkRTJsSRL0ixL00RRVX3VNlVV9nVd13Vd13UgNGQVAAABAEBIp5mlGiDCDGQYCA1ZBQAgAAAARijCEANCQ1YBAAABAABiKDmIJrTmfHOOg2Y5aCrF5nRwItXmSW4q5uacc845J5tzxjjnnHOKcmYxaCa05pxzEoNmKWgmtOacc57E5kFrqrTmnHPGOaeDcUYY55xzmrTmQWo21uaccxa0pjlqLsXmnHMi5eZJbS7V5pxzzjnnnHPOOeecc6oXp3NwTjjnnHOi9uZabkIX55xzPhmne3NCOOecc84555xzzjnnnHOC0JBVAAAQAABBGDaGcacgSJ+jgRhFiGnIpAfdo8MkaAxyCqlHo6ORUuoglFTGSSmdIDRkFQAACAAAIYQUUkghhRRSSCGFFFKIIYYYYsgpp5yCCiqppKKKMsoss8wyyyyzzDLrsLPOOuwwxBBDDK20EktNtdVYY62555xrDtJaaa211koppZRSSikIDVkFAIAAABAIGWSQQUYhhRRSiCGmnHLKKaigAkJDVgEAgAAAAgAAADzJc0RHdERHdERHdERHdETHczxHlERJlERJtEzL1ExPFVXVlV1b1mXd9m1hF3bd93Xf93Xj14VhWZZlWZZlWZZlWZZlWZZlWYLQkFUAAAgAAIAQQgghhRRSSCGlGGPMMeegk1BCIDRkFQAACAAgAAAAwFEcxXEkR3IkyZIsSZM0S7M8zdM8TfREURRN01RFV3RF3bRF2ZRN13RN2XRVWbVdWbZt2dZtX5Zt3/d93/d93/d93/d93/d1HQgNWQUASAAA6EiOpEiKpEiO4ziSJAGhIasAABkAAAEAKIqjOI7jSJIkSZakSZ7lWaJmaqZneqqoAqEhqwAAQAAAAQAAAAAAKJriKabiKaLiOaIjSqJlWqKmaq4om7Lruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7rui4QGrIKAJAAANCRHMmRHEmRFEmRHMkBQkNWAQAyAAACAHAMx5AUybEsS9M8zdM8TfRET/RMTxVd0QVCQ1YBAIAAAAIAAAAAADAkw1IsR3M0SZRUS7VUTbVUSxVVT1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTVN0zRNIDRkJQAABADAYo3B5SAhJSXl3hDCEJOeMSYhtV4hBJGS3jEGFYOeMqIMct5C4xCDHggNWREARAEAAMYgxxBzyDlHqZMSOeeodJQa5xyljlJnKcWYYs0oldhSrI1zjlJHraOUYiwtdpRSjanGAgAAAhwAAAIshEJDVgQAUQAAhDFIKaQUYow5p5xDjCnnmHOGMeYcc44556B0UirnnHROSsQYc445p5xzUjonlXNOSiehAACAAAcAgAALodCQFQFAnACAQZI8T/I0UZQ0TxRFU3RdUTRd1/I81fRMU1U90VRVU1Vt2VRVWZY8zzQ901RVzzRV1VRVWTZVVZZFVdVt03V123RV3ZZt2/ddWxZ2UVVt3VRd2zdV1/Zd2fZ9WdZ1Y/I8VfVM03U903Rl1XVtW3VdXfdMU5ZN15Vl03Vt25VlXXdl2fc103Rd01Vl2XRd2XZlV7ddWfZ903WF35VlX1dlWRh2XfeFW9eV5XRd3VdlVzdWWfZ9W9eF4dZ1YZk8T1U903RdzzRdV3VdX1dd19Y105Rl03Vt2VRdWXZl2fddV9Z1zzRl2XRd2zZdV5ZdWfZ9V5Z13XRdX1dlWfhVV/Z1WdeV4dZt4Tdd1/dVWfaFV5Z14dZ1Ybl1XRg+VfV9U3aF4XRl39eF31luXTiW0XV9YZVt4VhlWTl+4ViW3feVZXRdX1ht2RhWWRaGX/id5fZ943h1XRlu3efMuu8Mx++k+8rT1W1jmX3dWWZfd47hGDq/8OOpqq+brisMpywLv+3rxrP7vrKMruv7qiwLvyrbwrHrvvP8vrAso+z6wmrLwrDatjHcvm4sv3Acy2vryjHrvlG2dXxfeArD83R1XXlmXcf2dXTjRzh+ygAAgAEHAIAAE8pAoSErAoA4AQCPJImiZFmiKFmWKIqm6LqiaLqupGmmqWmeaVqaZ5qmaaqyKZquLGmaaVqeZpqap5mmaJqua5qmrIqmKcumasqyaZqy7LqybbuubNuiacqyaZqybJqmLLuyq9uu7Oq6pFmmqXmeaWqeZ5qmasqyaZquq3meanqeaKqeKKqqaqqqraqqLFueZ5qa6KmmJ4qqaqqmrZqqKsumqtqyaaq2bKqqbbuq7Pqybeu6aaqybaqmLZuqatuu7OqyLNu6L2maaWqeZ5qa55mmaZqybJqqK1uep5qeKKqq5ommaqqqLJumqsqW55mqJ4qq6omea5qqKsumatqqaZq2bKqqLZumKsuubfu+68qybqqqbJuqauumasqybMu+78qq7oqmKcumqtqyaaqyLduy78uyrPuiacqyaaqybaqqLsuybRuzbPu6aJqybaqmLZuqKtuyLfu6LNu678qub6uqrOuyLfu67vqucOu6MLyybPuqrPq6K9u6b+sy2/Z9RNOUZVM1bdtUVVl2Zdn2Zdv2fdE0bVtVVVs2TdW2ZVn2fVm2bWE0Tdk2VVXWTdW0bVmWbWG2ZeF2Zdm3ZVv2ddeVdV/XfePXZd3murLty7Kt+6qr+rbu+8Jw667wCgAAGHAAAAgwoQwUGrISAIgCAACMYYwxCI1SzjkHoVHKOecgZM5BCCGVzDkIIZSSOQehlJQy5yCUklIIoZSUWgshlJRSawUAABQ4AAAE2KApsThAoSErAYBUAACD41iW55miatqyY0meJ4qqqaq27UiW54miaaqqbVueJ4qmqaqu6+ua54miaaqq6+q6aJqmqaqu67q6Lpqiqaqq67qyrpumqqquK7uy7Oumqqqq68quLPvCqrquK8uybevCsKqu68qybNu2b9y6ruu+7/vCka3rui78wjEMRwEA4AkOAEAFNqyOcFI0FlhoyEoAIAMAgDAGIYMQQgYhhJBSSiGllBIAADDgAAAQYEIZKDRkRQAQJwAAGEMppJRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkgppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkqppJRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoplVJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSCgCQinAAkHowoQwUGrISAEgFAACMUUopxpyDEDHmGGPQSSgpYsw5xhyUklLlHIQQUmktt8o5CCGk1FJtmXNSWosx5hgz56SkFFvNOYdSUoux5ppr7qS0VmuuNedaWqs115xzzbm0FmuuOdecc8sx15xzzjnnGHPOOeecc84FAOA0OACAHtiwOsJJ0VhgoSErAYBUAAACGaUYc8456BBSjDnnHIQQIoUYc845CCFUjDnnHHQQQqgYc8w5CCGEkDnnHIQQQgghcw466CCEEEIHHYQQQgihlM5BCCGEEEooIYQQQgghhBA6CCGEEEIIIYQQQgghhFJKCCGEEEIJoZRQAABggQMAQIANqyOcFI0FFhqyEgAAAgCAHJagUs6EQY5Bjw1BylEzDUJMOdGZYk5qMxVTkDkQnXQSGWpB2V4yCwAAgCAAIMAEEBggKPhCCIgxAABBiMwQCYVVsMCgDBoc5gHAA0SERACQmKBIu7iALgNc0MVdB0IIQhCCWBxAAQk4OOGGJ97whBucoFNU6iAAAAAAAAwA4AEA4KAAIiKaq7C4wMjQ2ODo8AgAAAAAABYA+AAAOD6AiIjmKiwuMDI0Njg6PAIAAAAAAAAAAICAgAAAAAAAQAAAAICAT2dnUwAE7AwAAAAAAAD/QwAAAgAAADuydfsFAQEBAQEACg4ODg=="),self.AudioSupports=function(){return e.audio=!!self.Audio&&{},function(){if(navigator.requestMIDIAccess){var t=Function.prototype.toString,i=-1!==t.call(navigator.requestMIDIAccess).indexOf("[native code]");if(i)return e.midiapi={};for(var r=0;navigator.plugins.length>r;r++){var n=navigator.plugins[r];if(n.name.indexOf("Jazz-Plugin")>=0)return e.midiapi={}}}e.midiapi=!1}(),e.audioapi=!!n&&{},new Promise(function(t,n){if(!e.audio)return t();setTimeout(t,5e3),Promise.all([r(i.mpeg_mp3),r(i.ogg_opus),r(i.ogg_vorbis)]).then(t)}).then(function(){return e})},self.AudioSupports.register=o}()},function(t,e){"undefined"==typeof galactic&&(galactic={}),function(t){"use strict";t.EventEmitter=function(t){var e=1;function i(t,i){if("function"==typeof i)return t+"."+(i.uniqueId||(i.uniqueId=e++));console.warn(t,"listener does not exist")}function r(e){return t.on[e]?t.on[e]:t.on[e]=function(e){var r={};function n(){var e=!1;for(var i in r)r[i].apply(t,arguments)&&(e=!0);return e}return n.add=function(t){var n=i(e,t);if(void 0===r[n]&&t)return r[n]=t,{add:function(){r[n]=t},remove:function(){delete r[n]}}},n.remove=function(t){var n=i(e,t);void 0!==r[n]&&t&&delete r[n]},n.stack=r,n}(e)}t.on=function(t,e){return r(t).add(e)},t.off=function(e,i){i?r(e).remove(i):delete t.on[e]},t.emit=function(e){var i=t.on[e];if(i){var r=Array.prototype.slice.call(arguments).slice(1);return i.apply(t,r)}}}}(galactic)},function(t,e){"undefined"==typeof MIDI&&(MIDI={}),function(t){"use strict";t.DEBUG=!1,t.USE_XHR=!0,t.PATH="./soundfont/",t.DEBUG&&console&&console.log&&console.log("%c♥ MIDI.js 0.4.2 ♥","color: red;");var e={midiapi:0,audioapi:1,audio:2},i={ogg:0,mp3:1};t.setup=function(r){return new Promise(function(n,a){"function"==typeof(r=r||{})&&(r={onsuccess:r}),isFinite(r.debug)&&(t.DEBUG=!!r.debug),r.soundfontUrl&&(t.PATH=r.soundfontUrl),AudioSupports().then(function(s){function o(i){i=i.toLowerCase();var c=t.adaptor.format;function l(t){var r=parseInt(e[i])+1,n=Object.keys(e)[r];n?o(n):a&&a({message:"All plugins failed."})}s[i][c]?(r.tech=i,t.loadProgram(r).then(function(){n()}).catch(function(e){t.DEBUG&&console.error(i,e),l(e)})):l()}!function(){for(var e in t.adaptor)delete t.adaptor[e];for(var r in i)if(s[r])return t.adaptor.format=r,!0}()?a({message:"MIDIJS: Browser does not have necessary audio support."}):s[location.hash.substr(1)]?o(location.hash.substr(1)):s.midi_api?o("midiapi"):window.AudioContext?o("audioapi"):window.Audio&&o("Audio")},a)})},t.loadProgram=function(e){return e||(e={}),"object"==typeof e||(e={instrument:e}),e.instruments=function(){var i=e.instruments||e.instrument||t.channels[0].program;"object"==typeof i?Array.isArray(i)||(i=Object.keys(i)):i=void 0===i?[]:[i];for(var r=0;r<i.length;r++){var n=i[r];if(n>=0){var a=t.getProgram(n);a&&(i[r]=a.nameId)}}0===i.length&&(i=["acoustic_grand_piano"]);return i}(),e.tech=e.tech||t.adaptor.id,t.adaptors._load(e)}}(MIDI)},function(t,e){"undefined"==typeof MIDI&&(MIDI={}),function(t){"use strict";var e=t.adaptor={},i=t.adaptors={},r=i._requests={};i._load=function(a){return n(),"midiapi"===a.tech?i.midiapi.connect(a):function(n){return new Promise(function(t,s){for(var o=e.format.split("_").shift(),c=n.instruments,l=n.onprogress,h=n.tech,u=c.length,f=u,d=0;d<u;d++){var p=c[d],m=r[p]||(r[p]={});m.loaded?v():m.loading?m.queue.push(t):(m.queue=[t],m.loading=!0,a(p,o,function(t,e){var i=e/u,r=(u-f)/u;g(i+r,p)}).then(function(){v()}).catch(s))}function g(t,e){g.progress!==t&&(g.progress=t,l&&l("load",t,e))}function v(){--f||(g(1),i[h].connect(n).then(function(){c.forEach(function(t){for(var e,i=r[t];e=i.queue.pop();)e()})}).catch(s))}});function a(e,i,r){return new Promise(function(n,a){var s=t.PATH+e+"-"+i+".js";t.USE_XHR?galactic.request({url:s,format:"text",onerror:a,onprogress:r,onsuccess:function(t,e){var i=document.createElement("script");i.language="javascript",i.type="text/javascript",i.text=e,document.body.appendChild(i),n()}}):dom.loadScript.add({url:s,verify:'MIDI.Soundfont["'+e+'"]',onerror:a,onsuccess:n})})}}(a)};function n(){var i;function r(e,i,r){t.adaptor.id&&(t.player.playing?t.loadProgram(i).then(t.player.start):t.loadProgram(i))}function n(t,e){return{configurable:!0,get:function(){return e},set:function(i){e=i,a(t)}}}function a(i){t.DEBUG&&console.warn("The "+e.id+' adaptor does not support "'+i+'".')}function s(t){return function(){a(t)}}i=performance.now(),Object.defineProperties(t,{currentTime:{configurable:!0,get:function(){return performance.now()-i}}}),t.set=function(e,i,r){if(r)return setTimeout(function(){t[e]=i},1e3*r);t[e]=i},t.messageHandler={},t.programChange=function(e,i,n){var a=t.getProgram(i);if(a&&Number.isFinite(i=a.id)){var s=t.channels[e];if(s&&s.program!==i){n?setTimeout(function(){s.program=i},n):s.program=i;var o=t.messageHandler.program||r;o&&o(e,i,n)}}},Object.defineProperties(t,{context:n(null),detune:n("detune",0),fx:n("fx",null),mute:n("mute",!1),volume:n("volume",1)}),t.send=s("send"),t.noteOn=s("noteOn"),t.noteOff=s("noteOff"),t.cancelNotes=s("cancelNotes"),t.setController=s("setController"),t.setEffects=s("setEffects"),t.setPitchBend=s("setPitchBend"),t.setProperty=s("setProperty"),t.setVolume=s("setVolume"),t.iOSUnlock=s("iOSUnlock")}n()}(MIDI)},function(t,e){window.Audio&&function(){"use strict";var t=[],e=-1,i=[],r={};function n(n,a,s){var o=MIDI.channels[n];if(o){var c=o.program,l=MIDI.getProgram(c).nameId,h=l+""+a,u=(e+1)%t.length,f=MIDI.Soundfont[l];if(f){var d=t[u];d.src=f[a],d._channel=o,d._volume=s,d._id=h,r.volume(d),d.play(),e=u,i[u]=d}else MIDI.DEBUG&&console.log("404",l)}}function a(r,n){var a=MIDI.channels[r];if(a)for(var s=a.program,o=MIDI.getProgram(s).nameId+""+n,c=0,l=t.length;c<l;c++){var h=(c+e+1)%l,u=i[h];if(u&&u._id===o)return t[h].pause(),void(i[h]=null)}}(MIDI.adaptors.audio={}).connect=function(e){MIDI.adaptor.id="audio";for(var s=0;s<12;s++)t[s]||(t[s]=new Audio);return function(){function t(t,e,i){return{configurable:!0,get:function(){return e},set:function(r){typeof r===t&&(e=r,i&&i())}}}function e(t){return function(){for(var e in i)r[t](i[e])}}Object.defineProperties(MIDI,{mute:t("boolean",!1,e("volume")),volume:t("number",1,e("volume"))})}(),r.volume=function(t){var e=t._channel;if(MIDI.mute||e.mute)t.volume=0;else{var i=MIDI.volume*e.volume*t._volume;t.volume=Math.min(1,Math.max(-1,2*i))}},MIDI.noteOn=function(t,e,i,r){switch(typeof e){case"number":return function(t,e,i,r){var a,s=MIDI.getNoteName(e);r?a=setTimeout(function(){n(t,s,i)},1e3*r):n(t,s,i);return{cancel:function(){clearTimeout(a)}}}.apply(null,arguments);case"string":break;case"object":return function(t,e,i,r){for(var a=0;a<e.length;a++){var s=e[a],o=MIDI.getNoteName(s);if(o){if(r)return setTimeout(function(){n(t,o,i)},1e3*r);n(t,o,i)}}}.apply(null,arguments)}},MIDI.noteOff=function(t,e,i){switch(typeof e){case"number":return function(t,e,i){return{cancel:function(){clearTimeout(void 0)}}}.apply(null,arguments);case"string":break;case"object":return function(t,e,i){for(var r=0;r<e.length;r++){var n=e[r],s=MIDI.getNoteName(n);if(s){if(i)return setTimeout(function(){a(t,s)},1e3*i);a(t,s)}}}.apply(null,arguments)}},MIDI.stopAllNotes=function(e){if(isFinite(e));else for(var i=0,r=t.length;i<r;i++)t[i].pause()},new Promise(function(t,e){var i=MIDI.adaptors._requests,r=MIDI.Soundfont;for(var n in r){var a=i[n]||(i[n]={});a.loaded=!0,a.loading=!1}t()})}}()},function(t,e){window.AudioContext&&function(){"use strict";var t=MIDI.adaptors,e=t.audioapi={},i=((i=new(window.AudioContext||window.webkitAudioContext)).hasDetune=function(){i.createBuffer(1,1,44100);var t=i.createBufferSource();try{return t.detune.value=1200,!0}catch(t){return!1}}(),i),r={},n=t._requests,a={},s={};function o(t,e){var i=s[t];for(var r in i)for(var n=i[r],a=0;a<n.length;a++)e(n,n[a])}e.connect=function(t){return MIDI.adaptor.id="audioapi",function(){function t(t,e,i){return{configurable:!0,get:function(){return e},set:function(r){typeof r===t&&(e=r,i&&i())}}}function e(t){return function(){MIDI.setProperty(t)}}Object.defineProperties(MIDI,{context:{configurable:!0,get:function(){return i},set:function(t){i=t}},detune:t("number",0,e("detune")),fx:t("object",null,e("fx")),mute:t("boolean",!1,e("volume")),volume:t("number",1,e("volume"))}),MIDI.setProperty=function(t,e){if(a[t])if(isFinite(e))"fx"===t&&n(MIDI.channels[e]),r();else for(var e in"fx"===t&&n(MIDI),s)r();function r(){o(e,function(e,i){a[t](i)})}function n(t){var e=t.fxNodes||(t.fxNodes={});for(var r in e)e[r].disconnect(i.destination),delete e[r];if(i.tunajs)for(var n=t.fx,a=0;a<n.length;a++){var s=n[a],o=s.type,c=new i.tunajs[o](s);c.connect(i.destination),e[o]=c}else MIDI.DEBUG&&console.error("fx not installed.",arguments)}}}(),a.volume=function(t){var e=t.gainNode.gain,r=t._channel;if(MIDI.mute||r.mute)e.value=0;else{var n=MIDI.volume*r.volume*t._volume;e.value=Math.min(2,Math.max(0,n))}e._fadeout&&(e.cancelScheduledValues(i.currentTime),e.linearRampToValueAtTime(e.value,e._startAt),e.linearRampToValueAtTime(0,e._startAt+.3))},a.detune=function(t){if(i.hasDetune){var e=t._channel,r=MIDI.detune+e.detune;r&&(t.detune.value=r)}},a.fx=function(t){var e=t._channel,i=t.gainNode;function r(t){if(t)for(var e in t){var r=t[e];i.connect(r.input),i=r}}t.disconnect(0),t.connect(i),r(MIDI.fxNodes),r(e.fxNodes)},MIDI.noteOn=function(t,e,n,o){switch(typeof e){case"number":return function(t,e,n,o){var c;if(o=o||0,MIDI.volume){var l=MIDI.channels[t],h=l.program,u=h+"x"+e,f=r[u];f?((c=i.createBufferSource()).buffer=f,c.gainNode=i.createGain(),c.gainNode.connect(i.destination),c._channel=l,c._volume=n,a.volume(c),a.detune(c),a.fx(c),c.start(o+i.currentTime),s[t]=s[t]||{},s[t][e]=s[t][e]||[],s[t][e].push(c),s[t][e].active=c):MIDI.DEBUG&&console.error(["no buffer",arguments])}return{cancel:function(){c&&c.disconnect(0)}}}.apply(null,arguments);case"string":break;case"object":return function(t,e,i,r){for(var n,a={},s=0,o=e.length;s<o;s++)a[n=e[s]]=MIDI.noteOn(t,n,i,r);return a}.apply(null,arguments)}},MIDI.noteOff=function(t,i,r){switch(typeof i){case"number":return function(t,i,r){r=r||0;var n=s[t];if(n){var a=n[i];if(a){var o=a.active;o&&e(a,o,r)}}return{cancel:function(){o&&o.disconnect(0)}}}.apply(null,arguments);case"string":break;case"object":return function(t,e,i){for(var r,n={},a=0,s=e.length;a<s;a++)n[r=e[a]]=MIDI.noteOff(t,r,i);return n}.apply(null,arguments)}},MIDI.cancelNotes=function(t){if(isFinite(t))i(t);else for(var t in s)i(t);function i(t){o(t,function(t,i){e(t,i)})}},MIDI.iOSUnlock=function(){if(!0!==i.unlocked){i.unlocked=!0;var t=i.createBuffer(1,1,44100),e=i.createBufferSource();e.buffer=t,e.connect(i.destination),e.start(0)}},new Promise(function(t,e){window.Tuna&&(i.tunajs instanceof Tuna||(i.tunajs=new Tuna(i)));var a=MIDI.Soundfont,s=Object.keys(a);for(var o in a){var c=MIDI.getProgram(o);if(c){var l=n[o]||(n[o]={});if(l.loaded)continue;if(l.decoding)l.queue.push(t);else{l.decoding=!0,l.queue.push(t),l.pending=0;var h=a[o];for(var u in h)d(o,c.id,u)}}}function f(){for(var t=0;t<s.length;t++){var e=s[t];if((r=n[e]).pending)return}for(t=0;t<s.length;t++){e=s[t];for(var i,r=n[e];i=r.queue.pop();)i()}}function d(t,e,s){var o=n[t],c=a[t][s];c&&(o.pending++,function(t){return new Promise(function(e,r){if(0===t.indexOf("data:audio"))a(function(t){t=t.split(",");for(var e=atob(t[1]),i=(t[0].split(":")[1].split(";")[0],new ArrayBuffer(e.length)),r=new Uint8Array(i),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return i}(t));else{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){a(n.response)},n.send()}function a(t){i.decodeAudioData(t,e,r)}})}(c).then(function(i){i.id=s;var n=MIDI.getNoteNumber(s);r[e+"x"+n]=i,--o.pending||(o.decoding=!1,o.loading=!1,o.loaded=!0,MIDI.DEBUG&&console.log("loaded: ",t),f())}).catch(function(t){MIDI.DEBUG&&console.error("audio could not load",arguments)}))}setTimeout(f,0)});function e(t,e,r){var n=(r||0)+i.currentTime,a=e.gainNode.gain;a._fadeout=!0,a._startAt=n,a.linearRampToValueAtTime(a.value,n),a.linearRampToValueAtTime(0,n+.3),e.stop(n+.5),setTimeout(function(){t.shift()},1e3*r)}}}()},function(t,e){!function(){"use strict";var t,e={},i={};function r(e,i,r,n){t.send([e,i,r],1e3*(n||0))}function n(e,i,r){t.send([224+e,i],1e3*(r||0))}function a(e,i,r){t.send([176+e,7,i],1e3*(r||0))}(MIDI.adaptors.midiapi={}).connect=function(s){return MIDI.adaptor.id="midiapi",function(){function r(t,e,i){return{configurable:!0,get:function(){return e},set:function(r){typeof r===t&&(e=r,i&&i())}}}function n(t){return function(){for(var r in e)i[t](e[r])}}Object.defineProperties(MIDI,{context:{configurable:!0,set:function(e){t=e},get:function(){return t}},detune:r("number",0,n("detune")),mute:r("boolean",!1,n("volume")),volume:r("number",1,n("volume"))})}(),i.volume=function(t){var e=t._channel;if(MIDI.mute||e.mute)a(e.id,0);else{var i=MIDI.volume*e.volume*t._volume;a(e.id,Math.min(1,Math.max(-1,2*i)))}},i.detune=function(t){var e=t._channel,i=MIDI.detune+e.detune;i&&n(e.id,i)},MIDI.setController=r,MIDI.setPitchBend=n,MIDI.setVolume=a,MIDI.messageHandler.program=function(e,i,r){t.send([192+e,i],1e3*(r||0))},MIDI.send=function(e,i){t.send(e,1e3*(i||0))},MIDI.noteOn=function(i,r,n,a){switch(typeof r){case"number":return function(i,r,n,a){return t.send([144+i,r,127*n>>0],1e3*(a||0)),e[i+"x"+r]={_channel:MIDI.channels[i],_volume:n},{cancel:function(){}}}.apply(null,arguments);case"string":break;case"object":return function(e,i,r,n){for(var a=0;a<i.length;a++)t.send([144+e,i[a],r],1e3*(n||0))}.apply(null,arguments)}},MIDI.noteOff=function(i,r,n){switch(typeof r){case"number":return function(i,r,n){return t.send([128+i,r,0],1e3*(n||0)),delete e[i+"x"+r],{cancel:function(){}}}.apply(null,arguments);case"string":break;case"object":return function(e,i,r){for(var n=0;n<i.length;n++)t.send([128+e,i[n],0],1e3*(r||0))}.apply(null,arguments)}},MIDI.cancelNotes=function(e){if(isFinite(e))t.send([176+e,123,0]);else{t.cancel();for(e=0;e<16;e++)t.send([176+e,123,0])}},new Promise(function(e,i){function r(t){i&&i(t)}navigator.requestMIDIAccess().then(function(i){var n=i.outputs;n.size&&n.forEach(function(e){"connected"===e.state&&"input"===e.type&&(t=e)}),null==t?r({message:"No available outputs."}):e()},r)})}}()},function(t,e){"undefined"==typeof MIDI&&(MIDI={}),function(t){"use strict";t.channels=function(e){for(var i=0;i<=15;i++)r(i);return e;function r(r){var n=e[r]={};function a(e,i,n){return{configurable:!0,enumerable:!0,get:function(){return n},set:function(a){typeof a===e&&(n=a,t.setProperty(i,r))}}}n.noteOn=function(e,i,n){return t.noteOn(r,e,i,n)},n.noteOff=function(e,i){return t.noteOff(r,e,i)},n.cancelNotes=function(){return t.cancelNotes(r)},n.set=function(){},Object.defineProperties(n,{id:{value:i,enumerable:!0,writable:!0},program:{value:i,enumerable:!0,writable:!0},volume:a("number","volume",1),mute:a("boolean","volume",!1),mono:a("boolean","*",!1),omni:a("boolean","*",!1),solo:a("boolean","*",!1),detune:a("number","detune",0),fx:a("object","fx",null)})}}({})}(MIDI)},function(t,e){"undefined"==typeof MIDI&&(MIDI={}),function(t){"use strict";function e(t){return t.replace(/[^a-z0-9_ ]/gi,"").replace(/[ ]/g,"_").toLowerCase()}t.getProgram=function(i){return"string"==typeof i?t.getProgram.byName[e(i)]:t.getProgram.byId[i]},function(i){var r=t.GM={},n=t.getProgram.byId={},a=t.getProgram.byName={};for(var s in i)for(var o=i[s],c=0,l=o.length;c<l;c++){var h=o[c];if(h){var u=parseInt(h.substr(0,h.indexOf(" ")),10),f=h.replace(u+" ",""),d=e(f),p=e(s),m={id:--u,name:f,nameId:d,category:s};n[u]=m,a[d]=m,r[p]=r[p]||[],r[p].push(m)}}}({Piano:["1 Acoustic Grand Piano","2 Bright Acoustic Piano","3 Electric Grand Piano","4 Honky-tonk Piano","5 Electric Piano 1","6 Electric Piano 2","7 Harpsichord","8 Clavinet"],"Chromatic Percussion":["9 Celesta","10 Glockenspiel","11 Music Box","12 Vibraphone","13 Marimba","14 Xylophone","15 Tubular Bells","16 Dulcimer"],Organ:["17 Drawbar Organ","18 Percussive Organ","19 Rock Organ","20 Church Organ","21 Reed Organ","22 Accordion","23 Harmonica","24 Tango Accordion"],Guitar:["25 Acoustic Guitar (nylon)","26 Acoustic Guitar (steel)","27 Electric Guitar (jazz)","28 Electric Guitar (clean)","29 Electric Guitar (muted)","30 Overdriven Guitar","31 Distortion Guitar","32 Guitar Harmonics"],Bass:["33 Acoustic Bass","34 Electric Bass (finger)","35 Electric Bass (pick)","36 Fretless Bass","37 Slap Bass 1","38 Slap Bass 2","39 Synth Bass 1","40 Synth Bass 2"],Strings:["41 Violin","42 Viola","43 Cello","44 Contrabass","45 Tremolo Strings","46 Pizzicato Strings","47 Orchestral Harp","48 Timpani"],Ensemble:["49 String Ensemble 1","50 String Ensemble 2","51 Synth Strings 1","52 Synth Strings 2","53 Choir Aahs","54 Voice Oohs","55 Synth Choir","56 Orchestra Hit"],Brass:["57 Trumpet","58 Trombone","59 Tuba","60 Muted Trumpet","61 French Horn","62 Brass Section","63 Synth Brass 1","64 Synth Brass 2"],Reed:["65 Soprano Sax","66 Alto Sax","67 Tenor Sax","68 Baritone Sax","69 Oboe","70 English Horn","71 Bassoon","72 Clarinet"],Pipe:["73 Piccolo","74 Flute","75 Recorder","76 Pan Flute","77 Blown Bottle","78 Shakuhachi","79 Whistle","80 Ocarina"],"Synth Lead":["81 Lead 1 (square)","82 Lead 2 (sawtooth)","83 Lead 3 (calliope)","84 Lead 4 (chiff)","85 Lead 5 (charang)","86 Lead 6 (voice)","87 Lead 7 (fifths)","88 Lead 8 (bass + lead)"],"Synth Pad":["89 Pad 1 (new age)","90 Pad 2 (warm)","91 Pad 3 (polysynth)","92 Pad 4 (choir)","93 Pad 5 (bowed)","94 Pad 6 (metallic)","95 Pad 7 (halo)","96 Pad 8 (sweep)"],"Synth Effects":["97 FX 1 (rain)","98 FX 2 (soundtrack)","99 FX 3 (crystal)","100 FX 4 (atmosphere)","101 FX 5 (brightness)","102 FX 6 (goblins)","103 FX 7 (echoes)","104 FX 8 (sci-fi)"],Ethnic:["105 Sitar","106 Banjo","107 Shamisen","108 Koto","109 Kalimba","110 Bagpipe","111 Fiddle","112 Shanai"],Percussive:["113 Tinkle Bell","114 Agogo","115 Steel Drums","116 Woodblock","117 Taiko Drum","118 Melodic Tom","119 Synth Drum","129 Percussion"],"Sound effects":["120 Reverse Cymbal","121 Guitar Fret Noise","122 Breath Noise","123 Seashore","124 Bird Tweet","125 Telephone Ring","126 Helicopter","127 Applause","128 Gunshot"]}),function(){for(var e=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],i={},r={},n=21;n<=108;n++){var a=e[n%12]+((n-12)/12>>0);i[a]=n,r[n]=a}t.getNoteName=function(t){return t in i?t:t in r?r[t]:void 0},t.getNoteNumber=function(t){return t in r?t:t in i?i[t]:void 0}}()}(MIDI)},function(t,e){"undefined"==typeof MIDI&&(MIDI={}),MIDI.player=new function(){"use strict";var t=this;galactic.EventEmitter(t);var e,i,r,n=20,a=100,s={},o=[],c={};function l(r,f){if(!(r>t.duration)){if(f){t.playing?h():t.playing=!0;var p=(y=function(t){for(var e=0,i=c.length,r=0;r<i;r++){var n=c[r],a=n[1];if(!(e+a<t))break;e+=a}return{idx:r,time:e}}(r)).idx,m=i=y.time}else p=e,m=i;for(var g=r-t.currentTime,v=0,b=c.length;p<b&&v<=n;){var y=c[p];e=++p,i+=y[1],r=i-m;var x=y[0].event,w=x.type,k=x.subtype;if(d[k])switch(w){case"channel":_();break;case"meta":A()}}}function A(){k}function _(){var e=x.channel,n=MIDI.channels[e],a=Math.max(0,(r+g)/1e3);switch(k){case"controller":MIDI.setController(e,x.controllerType,x.value,a);break;case"programChange":var s=x.programNumber;(function(e){var i=MIDI.getProgram(e);return i&&t.instruments[i.nameId]})(s)&&MIDI.programChange(e,s,a);break;case"pitchBend":var c=x.value;MIDI.setPitchBend(e,c,a);break;case"noteOn":var l=T(x.noteNumber);o.push({promise:n.noteOn(l,x.velocity/127,a),timeout:S(x,l,i,a)}),v++;break;case"noteOff":l=T(x.noteNumber);o.push({promise:n.noteOff(l,a),timeout:S(x,l,i,a)}),v++}}function S(e,r,n,c){return setTimeout(function(){var n=galactic.util.copy(e);n.noteNumber=r,t.emit("event",n),o.shift();var c=n.channel+"x"+n.noteNumber;switch(n.subtype){case"noteOn":s[c]=n;break;case"noteOff":delete s[c]}o.length<=a&&l(i)},1e3*c)}function T(e){return u(0,127,e+t.transpose)}}function h(){if(t.playing){for(t.playing=!1;o.length;){var e=o.pop();e&&(e.promise&&e.promise.cancel(),clearTimeout(e.timeout))}for(var i in s){var r=s[i];t.emit("event",{channel:r.channel,noteNumber:r.noteNumber,status:r.status-16,subtype:"noteOff",type:"channel"})}}}function u(t,e,i){return i<t?t:i>e?e:i}function f(){r&&(c=Replayer(MidiFile(r),t.bpm)),t.duration=function(){for(var t=c.length,e=0,i=0;i<t;i++)e+=c[i][1];return e}()}!function(){var e=0,i=!1,n=0;function a(e,i){return{get:function(){return e},set:function(n){Number.isFinite(n)&&(e=n,i&&r&&(t.stop(),f(),l(0,!0)))}}}function s(i){n=performance.now(),e=u(0,t.duration,i)}Object.defineProperties(t,{bpm:a(null,!0),warp:a(1,!0),transpose:a(0,!0),currentTime:{get:function(){return t.playing?e+(performance.now()-n):e},set:function(t){Number.isFinite(t)&&s(t)}},duration:a(0,!1),playing:{get:function(){return i},set:function(e){s(t.currentTime),i=e}}})}(),t.start=function(e){h(),t.currentTime=e,l(t.currentTime,!0)},t.stop=function(){h(),t.currentTime=0},t.pause=function(){h()},t.setAnimation=function(e){var i=0,r=0,n=0;t.clearAnimation(),requestAnimationFrame(function a(){if(t.frameId=requestAnimationFrame(a),t.duration){t.playing?(i=n===t.currentTime?r-Date.now():0,i=0===t.currentTime?0:t.currentTime-i,n!==t.currentTime&&(r=Date.now(),n=t.currentTime)):i=t.currentTime;var s=t.duration,o=i/1e3,c=o/60,l=60*c+(o-60*c),h=s/1e3;if(h-l<-1)return;var u=Math.min(1,l/h);u!==e.progress&&(e.progress=u,e({progress:u,currentTime:l,duration:h}))}})},t.clearAnimation=function(){t.frameId&&cancelAnimationFrame(t.frameId)};var d={controller:!0,noteOff:!0,noteOn:!0,pitchBend:!0,setTempo:!0,programChange:!0};t.handleEvent=function(t,e){d[t]=e},t.load=function(e){return new Promise(function(i,n){"string"==typeof e&&(e={src:e});var a=e.src,s=e.onprogress;function o(){try{f(),t.instruments=function(){for(var t={},e={},i=0;i<c.length;i++){var r=c[i][0].event;if("channel"===r.type){var n=r.channel;switch(r.subtype){case"programChange":e[n]=r.programNumber;break;case"noteOn":var a=e[n];if(Number.isFinite(a)){if(d.programChange)var s=MIDI.getProgram(a);else var n=MIDI.channels[n],s=MIDI.getProgram(n.program);t[s.nameId]=!0}}}}return t}(),MIDI.setup({instruments:t.instruments,onprogress:s}).then(function(t){i(t)}).catch(function(t){n(t)})}catch(t){n&&n(t)}}t.stop(),e.events?(c=e.events,r=void 0,o()):-1!==a.indexOf("base64,")?(r=atob(a.split(",")[1]),o()):galactic.request({url:a,mimeType:"text/plain; charset=x-user-defined",onerror:function(){n&&n("Unable to load MIDI file: "+a)},onsuccess:function(t,e){r=function(t){for(var e=[],i=String.fromCharCode,r=0,n=t.length;r<n;r++)e[r]=i(255&t.charCodeAt(r));return e.join("")}(e),o()}})})}}},function(t,e,i){"use strict";var r;!function(){var t,e,i,n,a,s,o,c,l,h,u,f,d,p,m,g,v,b,y,x=1,w={num:4,den:4},k=0,A=128,_={},S=1/128;r=function(r,k){k||(k={}),t=[],e=[0,0,0,0,0,0,0],n=!1,a=1,s=[],o=void 0,c=void 0,x=1,l=void 0,h=void 0,u={},w={num:4,den:4},d=[],m=r.length,p=!1,g=[],v=void 0,b=0,y=[],!1,_={};for(var A=0;A<r.length;A++){i=0,f=-1;var S=r[A];h=[{cmd:"program",channel:A,instrument:l||0}],u={};for(var T=0;T<S.length;T++){var C=S[T];switch(C.el_type){case"note":N(C,k.voicesOff);break;case"key":e=B(C);break;case"meter":c||(c=C),w=C;break;case"tempo":o?x=C.qpm?o/C.qpm:1:o=C.qpm;break;case"transpose":i=C.transpose;break;case"bar":d.length>0&&0===A&&(q(),g=[]),b=0,t=[],0===A&&R(r.length+1);break;case"bagpipes":n=!0;break;case"instrument":void 0===l&&(l=C.program),h[0].instrument=C.program;break;case"channel":break;case"drum":_=j(C.params);break;default:console.log("MIDI creation. Unknown el_type: "+C.el_type+"\n")}}s.push(h),d.length>0&&(p=!0),y.length>0&&!0}return d.length>0&&s.push(d),y.length>0&&s.push(y),{tempo:o,instrument:l,tracks:s}};var T=["break","(break)","no chord","n.c.","tacet"];function C(){for(var t=0,e=0;e<h.length;e++)"move"===h[e].cmd&&(t+=h[e].duration);return t}function N(t,e){var r=e?0:64,s=function(t){if(p||!t.chord||0===t.chord.length)return null;for(var e=0;e<t.chord.length;e++){var i=t.chord[e];if("default"===i.position)return i.name;if(T.indexOf(i.name.toLowerCase())>=0)return"break"}return null}(t);if(s){var o=function(t){if(0===t.length)return;if("break"===t)return{chick:[]};var e=t.substring(0,1);if("("===e){if(0===(t=t.substring(1,t.length-2)).length)return;e=t.substring(0,1)}var r=D[e];if(!r)return;var n,a=(r+=i)-5;1===t.length&&(n=z(r,""));var s=t.substring(1),o=s.substring(0,1);"b"===o||"♭"===o?(r--,a--,s=s.substring(1)):"#"!==o&&"♯"!==o||(r++,a++,s=s.substring(1));var c=s.split("/");if(n=z(r,c[0]),2===c.length){var l=D[c[1]];l&&(r=D[c[1]]+i,a=r)}return{boom:r,boom2:a,chick:n}}(s);if(o){if(0===d.length){d.push({cmd:"program",channel:m,instrument:k});var c=C();c>0&&d.push({cmd:"move",duration:c*x})}v=o,g.push({chord:v,beat:b})}}t.startTriplet&&(a=2===t.startTriplet?1.5:(t.startTriplet-1)/t.startTriplet);var l,y=(t.durationClass?t.durationClass:t.duration)*a;if(b+=y,t.gracenotes){var w=n||f<0||0===h.length,A=w?y:h[f].duration;l=function(t,e){for(var i,r=0,n=[],a=0;a<t.length;a++)i=t[a],r+=i.duration;var s=2*(r/=E)>e?e/(2*r):1;for(a=0;a<t.length;a++){var o=(i=t[a]).midipitch?i.midipitch-60:i.pitch;n.push({pitch:o,duration:i.duration/E*s})}return n}(t.gracenotes,A),n||(y=P(l,w,y,null,r))}if(t.pitches){l&&n&&(y=P(l,!0,y,null,r));for(var _=[],N=0;N<t.pitches.length;N++){var M=t.pitches[N],B=I(M);_.push({pitch:B,startTie:M.startTie}),u[""+B]||h.push({cmd:"start",pitch:B,volume:r}),M.startTie?u[""+B]=!0:M.endTie&&(u[""+B]=!1)}var L=S,H=y-S;H<0&&(H=0,L=0),h.push({cmd:"move",duration:H*x}),f=h.length-1;for(var V=0;V<_.length;V++)u[""+_[V].pitch]||h.push({cmd:"stop",pitch:_[V].pitch});h.push({cmd:"move",duration:L*x})}else t.rest&&h.push({cmd:"move",duration:y*x});t.endTriplet&&(a=1)}var M=[0,2,4,5,7,9,11];function I(r){if(r.midipitch)return r.midipitch-60;var n=r.pitch;if(r.accidental)switch(r.accidental){case"sharp":t[n]=1;break;case"flat":t[n]=-1;break;case"natural":t[n]=0;break;case"dblsharp":t[n]=2;break;case"dblflat":t[n]=-2}var a=12*function(t){return Math.floor(t/7)}(n)+M[L(n)];return void 0!==t[n]?a+=t[n]:a+=e[L(n)],a+=i}function B(t){var e=[0,0,0,0,0,0,0];if(!t.accidentals)return e;for(var i=0;i<t.accidentals.length;i++){var r=t.accidentals[i],n="sharp"===r.acc?1:"natural"===r.acc?0:-1;e[L(r.note.toLowerCase().charCodeAt(0)-"c".charCodeAt(0))]+=n}return e}var E=8;function P(t,e,i,r,n){for(var a=0;a<t.length;a++){var s=I(t[a]);s!==r&&h.push({cmd:"start",pitch:s,volume:n}),h.push({cmd:"move",duration:t[a].duration*x}),s!==r&&h.push({cmd:"stop",pitch:s}),e||(h[f].duration-=t[a].duration),i-=t[a].duration}return i}function L(t){return(t%=7)<0&&(t+=7),t}var D={A:-27,B:-25,C:-24,D:-22,E:-20,F:-19,G:-17};var H={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,10],"7sus4":[0,5,7,10],m7sus4:[0,5,7,10],sus4:[0,5,7]};function z(t,e){var i=H[e];i||(i=H.M),t+=12;for(var r=[],n=0;n<i.length;n++)r.push(t+i[n]);return r}function V(t,e){void 0!==t&&d.push({cmd:"start",pitch:t,volume:64}),d.push({cmd:"move",duration:e/2*x}),void 0!==t&&d.push({cmd:"stop",pitch:t}),d.push({cmd:"move",duration:e/2*x})}function F(t,e){for(var i=0;i<t.length;i++)d.push({cmd:"start",pitch:t[i],volume:48});for(d.push({cmd:"move",duration:e/2*x}),i=0;i<t.length;i++)d.push({cmd:"stop",pitch:t[i]});d.push({cmd:"move",duration:e/2*x})}var O={"2/2":["boom","chick"],"2/4":["boom","chick"],"3/4":["boom","chick","chick"],"4/4":["boom","chick","boom2","chick"],"5/4":["boom","chick","chick","boom2","chick"],"6/8":["boom","","chick","boom2","","chick"],"9/8":["boom","","chick","boom2","","chick","boom2","","chick"],"12/8":["boom","","chick","boom2","","chick","boom2","","chick","boom2","","chick"]};function q(){var t=w.num,e=w.den,i=1/e,r=O[t+"/"+e],n=parseInt(t,10)/parseInt(e,10),a=Math.abs(n-b);if(!r||a>.0078125){r=[];for(var s=b/i,o=0;o<s;o++)r.push("chick")}if(0===g.length&&g.push({beat:0,chord:v}),0!==g[0].beat&&v&&g.unshift({beat:0,chord:v}),1!==g.length){for(var c={},l=0;l<g.length;l++){var h=g[l];c[""+Math.floor(h.beat/i)]=h}for(var u=0;u<r.length;u++){var f;switch(c[""+u]&&(f=c[""+u]),r[u]){case"boom":c[""+(u+1)]?F(f.chord.chick,i):V(f.chord.boom,i);break;case"boom2":c[""+(u+1)]?F(f.chord.chick,i):V(f.chord.boom2,i);break;case"chick":F(f.chord.chick,i);break;case"":c[""+u]?F(f.chord.chick,i):d.push({cmd:"move",duration:i*x})}}}else for(var p=0;p<r.length;p++)switch(r[p]){case"boom":V(g[0].chord.boom,i);break;case"boom2":V(g[0].chord.boom2,i);break;case"chick":F(g[0].chord.chick,i);break;case"":d.push({cmd:"move",duration:i*x})}}function j(t){if(0===t.pattern.length||!1===t.on)return{on:!1};for(var e=t.pattern[0],i=[],r="",n=0,a=0;a<e.length;a++)if("d"===e[a]&&n++,"d"===e[a]||"z"===e[a])0!==r.length?(i.push(r),r=e[a]):r+=e[a];else{if(0===r.length)return{on:!1};r+=e[a]}if(0!==r.length&&i.push(r),t.pattern.length!==2*n+1)return{on:!1};for(var s={on:!0,bars:t.bars,pattern:[]},o=1/w.den,c=0,l=0;l<i.length;l++){r=i[l];for(var h=1,u=!1,f=0,d=1;d<r.length;d++)switch(r[d]){case"/":0!==f&&(h*=f),f=0,u=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":f=10*f+r[d];break;default:return{on:!1}}u?(0===f&&(f=2),h/=f):f&&(h*=f),"d"===r[0]?(s.pattern.push({len:h*o,pitch:t.pattern[1+c],velocity:t.pattern[1+c+n]}),c++):s.pattern.push({len:h*o,pitch:null})}for(var p=0,m=w.num/w.den,g=0;g<s.pattern.length;g++)p+=s.pattern[g].len;var v=p/(t.bars?t.bars:1)/m;for(g=0;g<s.pattern.length;g++)s.pattern[g].len=s.pattern[g].len/v;return s}function R(t){if(0!==y.length||_.on){var e,i,r,n=w.num/w.den;if(0===y.length){y.push({cmd:"program",channel:t,instrument:A});var a=C();if(a>0&&a<n-.01)return void y.push({cmd:"move",duration:a*x})}if(_.on)for(var s=0;s<_.pattern.length;s++){var o=_.pattern[s].len*x;_.pattern[s].pitch?(e=_.pattern[s].pitch,i=o,r=_.pattern[s].velocity,y.push({cmd:"start",pitch:e-60,volume:r}),y.push({cmd:"move",duration:i}),y.push({cmd:"stop",pitch:e-60})):y.push({cmd:"move",duration:o})}else y.push({cmd:"move",duration:n*x})}}}(),t.exports=r},function(t,e,i){"use strict";var r;!function(){(r=function(){this.tempo=0,this.timeFactor=0,this.output=[],this.currentChannel=0,this.currentInstrument=0,this.track=0,this.nextDuration=0,this.tracks=[[]]}).prototype.setInstrument=function(t){this.currentInstrument=t;var e=[{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(e)},r.prototype.setChannel=function(t){this.currentChannel=t},r.prototype.startTrack=function(){this.track++,this.tracks[this.track]=[],this.nextDuration=0},r.prototype.setGlobalInfo=function(t,e){this.tempo=t;var i=Math.round(1/t*6e7);this.timeFactor=i/48e4;this.track,this.nextDuration,this.timeFactor;this.track,this.nextDuration,this.timeFactor,this.track,this.nextDuration,this.timeFactor},r.prototype.startNote=function(t,e){var i=5*Math.floor(this.nextDuration/5),r=[{ticksToEvent:i,track:this.track,event:{deltaTime:i,channel:this.currentChannel,type:"channel",noteNumber:t,velocity:e,subtype:"noteOn"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(r),this.nextDuration=0},r.prototype.endNote=function(t){var e=5*Math.floor(this.nextDuration/5),i=[{ticksToEvent:e,track:this.track,event:{deltaTime:e,channel:this.currentChannel,type:"channel",noteNumber:t,velocity:0,subtype:"noteOff"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(i),this.nextDuration=0},r.prototype.addRest=function(t){this.nextDuration+=t},r.prototype.endTrack=function(){this.track},r.prototype.getData=function(){return function(t){!function(t){for(var e=0;e<t.length;e++)for(var i=0,r=0;r<t[e].length;r++)i+=t[e][r][1],t[e][r].absTime=i}(t);var e=function(t){for(var e=[],i=0;i<t.length;i++)for(var r=0;r<t[i].length;r++)e.push(t[i][r]);return e}(t);return function(t){for(var e=0,i=0;i<t.length;i++){var r=t[i].absTime;t[i][1]=r-e,e=r}}(e=function(t){return t.sort(function(t,e){return t.absTime>e.absTime?1:-1})}(e)),e}(this.tracks)}}(),t.exports=r},function(t,e,i){"use strict";var r;!function(){function t(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i]);return t}function e(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90"}function i(t,e){for(var i=t.toString(16);i.length<e;)i="0"+i;return function(t){for(var e="",i=0;i<t.length;i+=2)e+="%",e+=t.substr(i,2);return e}(i)}function n(t){for(var e=0,r=[];0!==t;)r.push(127&t),t>>=7;for(var n=r.length-1;n>=0;n--){e<<=8;var a=r[n];0!==n&&(a|=128),e|=a}var s=e.toString(16).length;return i(e,s+=s%2)}e.prototype.setTempo=function(t){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+i(Math.round(6e7/t),6),this.endTrack())},e.prototype.setGlobalInfo=function(t,e){if(0===this.trackcount){if(this.startTrack(),this.track+="%00%FF%51%03"+i(Math.round(6e7/t),6),e){this.track+="%00%FF%03"+i(e.length,2);for(var r=0;r<e.length;r++)this.track+=i(e.charCodeAt(r),2)}this.endTrack()}},e.prototype.startTrack=function(){this.track="",this.silencelength=0,this.trackcount++,this.first=!0,this.instrument&&this.setInstrument(this.instrument)},e.prototype.endTrack=function(){var t=i(this.track.length/3+4,8);this.track="MTrk"+t+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},e.prototype.setInstrument=function(t){this.track?this.track="%00%C0"+i(t,2)+this.track:this.track="%00%C0"+i(t,2),this.instrument=t},e.prototype.setChannel=function(t){this.channel=t,this.noteOnAndChannel="%9"+this.channel.toString(16)},e.prototype.startNote=function(t,e){this.track+=n(this.silencelength),this.silencelength=0,this.first&&(this.first=!1,this.track+=this.noteOnAndChannel),this.track+="%"+t.toString(16)+i(e,2)},e.prototype.endNote=function(t,e){this.track+=n(this.silencelength+e),this.silencelength=0,this.track+="%"+t.toString(16)+"%00"},e.prototype.addRest=function(t){this.silencelength+=t},e.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+i(this.trackcount,4)+"%01%e0"+this.trackstrings},e.prototype.embed=function(e,i){var r=this.getData(),n=t(document.createElement("a"),{href:r});if(n.innerHTML="download midi",e.insertBefore(n,e.firstChild),!i){var a=t(document.createElement("embed"),{src:r,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});e.insertBefore(a,e.firstChild)}},r=function(){return new e}}(),t.exports=r},function(t,e,i){"use strict";var r;!function(){var t;function e(t){var e=.25;t.duration&&(e=t.duration[0]);var i=60;return t.bpm&&(i=t.bpm),e*i/.25}function i(e){var i;switch(e.type){case"common_time":i={el_type:"meter",num:4,den:4};break;case"cut_time":i={el_type:"meter",num:2,den:2};break;case"specified":i={el_type:"meter",num:e.value[0].num,den:e.value[0].den};break;default:i={el_type:"meter"}}return t=i.num/i.den,i}r=function(r,n){var a=180,s=(n=n||{}).program||0,o=n.midiTranspose||0,c=n.channel||0,l=n.drum||"",h=n.drumBars||1,u=n.drumIntro||0,f=""!==l;s=parseInt(s,10),o=parseInt(o,10),10===(c=parseInt(c,10))&&(s=128),l=l.split(" "),h=parseInt(h,10),u=parseInt(u,10);var d=r.formatting.bagpipes;if(d&&(s=71),r.formatting.midi){var p=r.formatting.midi;p.program&&(s=p.program[0],p.program.length>1&&(c=p.program[1])),p.transpose&&(o=p.transpose[0]),p.channel&&(c=p.channel[0]),p.drum&&(l=p.drum),p.drumbars&&(h=p.drumbars[0]),p.drumon&&(f=!0),10===c&&(s=128)}r.metaText.tempo&&(a=e(r.metaText.tempo)),n.qpm&&(a=parseInt(n.qpm,10));var m=[];d&&m.push({el_type:"bagpipes"}),m.push({el_type:"instrument",program:s}),c&&m.push({el_type:"channel",channel:c}),o&&m.push({el_type:"transpose",transpose:o}),m.push({el_type:"tempo",qpm:a});for(var g=[],v=[],b=[],y=!1,x=0;x<r.lines.length;x++){var w=r.lines[x];if(w.staff)for(var k=w.staff,A=0,_=0;_<k.length;_++)for(var S=k[_],T=0;T<S.voices.length;T++){var C=S.voices[T];if(g[A]||(g[A]=[].concat(JSON.parse(JSON.stringify(m)))),S.clef&&"perc"===S.clef.type)for(var N=0;N<g[A].length;N++)"instrument"===g[A][N].el_type&&(g[A][N].program=128);else S.key&&("HP"===S.key.root?g[A].push({el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}):g[A].push({el_type:"key",accidentals:S.key.accidentals}));S.meter&&g[A].push(i(S.meter)),!y&&f&&(g[A].push({el_type:"drum",params:{pattern:l,bars:h,on:f,intro:u}}),y=!0),S.clef&&S.clef.transpose&&(S.clef.el_type="clef",g[A].push({el_type:"transpose",transpose:S.clef.transpose})),r.formatting.midi&&r.formatting.midi.drumoff&&(g[A].push({el_type:"bar"}),g[A].push({el_type:"drum",params:{pattern:"",on:!1}}));for(var M=0,I=0;I<C.length;I++){var B=C[I];switch(B.el_type){case"note":B.rest&&"spacer"===B.rest.type||(g[A].push(B),M++);break;case"key":"HP"===B.root?g[A].push({el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}):g[A].push({el_type:"key",accidentals:B.accidentals});break;case"meter":g[A].push(i(B));break;case"clef":B.transpose&&g[A].push({el_type:"transpose",transpose:B.transpose});break;case"tempo":a=e(B),g[A].push({el_type:"tempo",qpm:a});break;case"bar":M>0&&g[A].push({el_type:"bar"}),M=0;var E="bar_right_repeat"===B.type||"bar_dbl_repeat"===B.type,P="1"===B.startEnding,L="bar_left_repeat"===B.type||"bar_dbl_repeat"===B.type||"bar_thick_thin"===B.type||"bar_thin_thick"===B.type||"bar_thin_thin"===B.type||"bar_right_repeat"===B.type;if(E){var D=v[A];D||(D=0);var H=b[A];H||(H=g[A].length),g[A]=g[A].concat(g[A].slice(D,H)),b[A]=void 0,v[A]=void 0}P&&(b[A]=g[A].length),L&&(v[A]=g[A].length);break;case"style":case"part":break;case"stem":case"scale":break;case"midi":var z=!1;switch(B.cmd){case"drumon":f=!0,z=!0;break;case"drumoff":f=!1,z=!0;break;case"drum":l=B.params,z=!0;break;case"drumbars":h=B.params[0],z=!0;break;case"drummap":break;case"program":g[A].push({el_type:"instrument",program:B.params[0]});break;case"transpose":g[A].push({el_type:"transpose",transpose:B.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",B.cmd,B)}z&&(g[0].push({el_type:"drum",params:{pattern:l,bars:h,intro:u,on:f}}),y=!0);break;default:console.log("MIDI: element type "+B.el_type+" not handled.")}}A++}}if(u)for(var V=r.getPickupLength(),F=0;F<g.length;F++){for(var O=0;"note"!==g[F][O].el_type&&g[F].length>O;)O++;if(g[F].length>O)for(var q=0;q<u;q++)0===V||q<u-1?g[F].splice(O,0,{el_type:"note",rest:{type:"rest"},duration:t},{el_type:"bar"}):g[F].splice(O,0,{el_type:"note",rest:{type:"rest"},duration:t-V})}return g}}(),t.exports=r},function(t,e,i){"use strict";var r=i(9),n=i(5).TuneBook,a=i(0),s=i(11),o=i(57),c=i(13);if("function"!=typeof window.CustomEvent){var l=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i};l.prototype=window.Event.prototype,window.CustomEvent=l}var h=function(t){this.textarea=document.getElementById(t),this.initialText=this.textarea.value,this.isDragging=!1};h.prototype.addSelectionListener=function(t){this.textarea.onmousemove=function(e){this.isDragging&&t.fireSelectionChanged()}},h.prototype.addChangeListener=function(t){this.changelistener=t,this.textarea.onkeyup=function(){t.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,t.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,t.fireChanged()},this.textarea.onchange=function(){t.fireChanged()}},h.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},h.prototype.setSelection=function(t,e){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(t,e);else if(this.textarea.createTextRange){var i=this.textarea.createTextRange();i.collapse(!0),i.moveEnd("character",e),i.moveStart("character",t),i.select()}this.textarea.focus()},h.prototype.getString=function(){return this.textarea.value},h.prototype.setString=function(t){this.textarea.value=t,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},h.prototype.getElem=function(){return this.textarea};var u=function(t,e){var i;if(this.abcjsParams={},e.abcjsParams)for(i in e.abcjsParams)e.abcjsParams.hasOwnProperty(i)&&(this.abcjsParams[i]=e.abcjsParams[i]);if(e.midi_options)for(i in e.midi_options)e.midi_options.hasOwnProperty(i)&&(this.abcjsParams[i]=e.midi_options[i]);if(e.parser_options)for(i in e.parser_options)e.parser_options.hasOwnProperty(i)&&(this.abcjsParams[i]=e.parser_options[i]);if(e.render_options)for(i in e.render_options)e.render_options.hasOwnProperty(i)&&(this.abcjsParams[i]=e.render_options[i]);e.indicate_changed&&(this.indicate_changed=!0),this.editarea="string"==typeof t?new h(t):t,this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),e.canvas_id?this.div=document.getElementById(e.canvas_id):e.paper_id?this.div=document.getElementById(e.paper_id):(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),e.generate_midi&&(this.generate_midi=e.generate_midi,this.abcjsParams.generateDownload&&("string"==typeof e.midi_download_id?this.downloadMidi=document.getElementById(e.midi_download_id):e.midi_download_id&&(this.downloadMidi=e.midi_download_id)),!1!==this.abcjsParams.generateInline&&("string"==typeof e.midi_id?this.inlineMidi=document.getElementById(e.midi_id):e.midi_id&&(this.inlineMidi=e.midi_id))),(e.generate_warnings||e.warnings_id)&&(e.warnings_id?this.warningsdiv=document.getElementById(e.warnings_id):this.warningsdiv=this.div),this.onchangeCallback=e.onchange,e.gui&&(this.target=document.getElementById(t),this.abcjsParams.editable=!0),this.oldt="",this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(t,e){return function(t,e){var i=t.className;return i.length>0&&(i===e||new RegExp("(^|\\s)"+e+"(\\s|$)").test(i))}(t,e)||(t.className+=(t.className?" ":"")+e),t},this.removeClassName=function(t,e){return t.className=a.strip(t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ")),t},this.setReadOnly=function(t){var e=this.editarea.getElem();t?(e.setAttribute("readonly","yes"),this.addClassName(e,"abc_textarea_readonly")):(e.removeAttribute("readonly"),this.removeClassName(e,"abc_textarea_readonly"))}};u.prototype.renderTune=function(t,e,i){var a=new n(t),o=s();o.parse(a.tunes[0].abc,e);var l=o.getTune(),h=r(i,800,400);new c(h,this.abcjsParams).engraveABC(l)},u.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var t=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(t)}},u.prototype.modelChanged=function(){if(void 0===this.tunes)return void 0!==this.downloadMidi&&(this.downloadMidi.innerHTML=""),void 0!==this.inlineMidi&&(this.inlineMidi.innerHTML=""),void(this.div.innerHTML="");if(!this.bReentry){this.bReentry=!0,this.timerId=null,this.div.innerHTML="";var t=r(this.div,800,400);if(this.engraver_controller=new c(t,this.abcjsParams),this.engraver_controller.engraveABC(this.tunes),this.tunes[0].engraver=this.engraver_controller,this.redrawMidi(),this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.target)new o(this.target,!0).printABC(this.tunes[0]);this.engraver_controller.addSelectListener(this),this.updateSelection(),this.bReentry=!1}},u.prototype.paramChanged=function(t){if(t)for(key in t)t.hasOwnProperty(key)&&(this.abcjsParams[key]=t[key]);this.oldt="",this.fireChanged()},u.prototype.parseABC=function(){var t=this.editarea.getString();if(t===this.oldt)return this.updateSelection(),!1;if(this.oldt=t,""===t)return this.tunes=void 0,this.warnings="",!0;var e=new n(t);this.tunes=[],this.startPos=[],this.warnings=[];for(var i=0;i<e.tunes.length;i++){var r=new s;r.parse(e.tunes[i].abc,this.abcjsParams),this.tunes[i]=r.getTune(),this.startPos[i]=e.tunes[i].startPos;for(var a=r.getWarnings()||[],o=0;o<a.length;o++)this.warnings.push(a[o])}return!0},u.prototype.updateSelection=function(){var t=this.editarea.getSelection();try{this.engraver_controller.rangeHighlight(t.start,t.end)}catch(t){}},u.prototype.fireSelectionChanged=function(){this.updateSelection()},u.prototype.setDirtyStyle=function(t){if(void 0!==this.indicate_changed){var e,i,r=this.editarea.getElem();t?function(t,e){var i=t.className;return i.length>0&&(i===e||new RegExp("(^|\\s)"+e+"(\\s|$)").test(i))}(e=r,i="abc_textarea_dirty")||(e.className+=(e.className?" ":"")+i):function(t,e){t.className=a.strip(t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," "))}(r,"abc_textarea_dirty")}},u.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var t=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){t.modelChanged()},300);var e=this.isDirty();this.wasDirty!==e&&(this.wasDirty=e,this.setDirtyStyle(e)),this.onchangeCallback&&this.onchangeCallback(this)}},u.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},u.prototype.isDirty=function(){return void 0!==this.indicate_changed&&this.editarea.initialText!==this.editarea.getString()},u.prototype.highlight=function(t,e){var i=void 0!==e?this.startPos[e]+e:0;this.editarea.setSelection(i+t.startChar,i+t.endChar)},u.prototype.pause=function(t){this.bIsPaused=t,t||this.fireChanged()},u.prototype.pauseMidi=function(t){this.midiPause=t,t||this.redrawMidi()},t.exports=u},function(t,e,i){"use strict";var r=function(t,e){this.elem=t,this.text="",this.l=1/8,this.reposition=e||!1};r.prototype.printString=function(t,e){this.reposition&&e&&(e.startChar=this.text.length),this.text+=t,this.reposition&&e&&(e.endChar=this.text.length)},r.prototype.printNewLine=function(){this.text+="\n"},r.prototype.printSpace=function(){this.text[this.text.length-1].match(/\s/)||(this.text+=" ")},r.prototype.printABC=function(t){this.text="",this.abctune=t,this.printHeader(),this.printBody(),this.elem.value=this.text},r.prototype.printHeader=function(){this.printHeaderLine("x","X","1"),this.printHeaderLine("title","T"),this.printHeaderLine("composer","C"),this.printHeaderLine("history","H"),this.printHeaderLine("author","A"),this.printHeaderLine("book","B"),this.printHeaderLine("discography","D"),this.printHeaderLine("url","F"),this.printHeaderLine("group","G"),this.printHeaderLine("instruction","I"),this.printHeaderLine("notes","N"),this.printHeaderLine("origin","O"),this.printHeaderLine("rhythm","R"),this.printHeaderLine("source","S"),this.printHeaderLine("unalignedwords","W"),this.printHeaderLine("transcription","Z"),this.printHeaderLine("NULL","L","1/8"),this.printHeaderLine("NULL","M",this.getMeterString(this.abctune.lines[0].staff[0].meter)),this.printHeaderLine("NULL","K",this.getKeyString(this.abctune.lines[0].staff[0].key))},r.prototype.getKeyString=function(t){return t.root+t.acc+t.mode},r.prototype.getMeterString=function(t){switch(t.type){case"cut_time":return"C|";case"common_time":return"C";case"specified":return t.value[0].den?t.value[0].num+"/"+t.value[0].den:t.value[0].num}return""},r.prototype.printHeaderLine=function(t,e,i){var r=this.abctune.metaText[t]||i;if(void 0!==r)for(var n=r.split("\n"),a=0;a<n.length;a++)this.printString(e+": "+n[a]),this.printNewLine()},r.prototype.getElem=function(){return this.abcline.length<=this.pos?null:this.abcline[this.pos]},r.prototype.getNextElem=function(){return this.abcline.length<=this.pos+1?null:this.abcline[this.pos+1]},r.prototype.printBody=function(){for(var t=0;t<this.abctune.lines.length;t++){var e=this.abctune.lines[t];e.staff?this.printABCLine(e.staff):e.subtitle&&0!==t||e.text}},r.prototype.printABCLine=function(t){for(this.s=0;this.s<t.length;this.s++)this.printABCStaff(t[this.s])},r.prototype.printABCStaff=function(t){for(this.v=0;this.v<t.voices.length;this.v++)this.printABCVoice(t.voices[this.v])},r.prototype.printABCVoice=function(t){for(this.abcline=t,this.pos=0;this.pos<this.abcline.length;this.pos++)this.printABCElement();this.printNewLine()},r.prototype.printABCElement=function(){var t=this.getElem();switch(t.el_type){case"note":this.printBeam();break;case"bar":this.printBarLine(t)}},r.prototype.printBeam=function(){if(this.printSpace(),this.getElem().startBeam&&!this.getElem().endBeam)for(;this.getElem()&&(this.printNote(this.getElem()),!this.getElem().endBeam);)this.pos++;else this.printNote(this.getElem());this.printSpace()},r.prototype.printNote=function(t){var e,i="";if(void 0!==t.chord)for(e=0;e<t.chord.length;e++)i+='"'+t.chord[e].name+'"';var r={staccato:".",upbow:"u",downbow:"v",roll:"~",fermata:"H",slide:"J",accent:"L",mordent:"M",pralltriller:"P",trill:"T",lower:"."};if(void 0!==t.decoration)for(e=0;e<t.decoration.length;e++){var n=t.decoration[e];r[n]?i+=r[n]:(i+="!",i+=n,i+="!")}if(void 0!==t.gracenotes){for(i+="{",e=0;e<t.gracenotes.length;e++)i+=this.getNoteString(t.gracenotes[e]);i+="}"}var a=!1;if(1===t.pitches.length&&t.pitches[0].startSlur&&(a=!0,i+=this.multiplyString("(",t.pitches[0].startSlur.length)),t.startSlur&&(i+=this.multiplyString("(",t.startSlur.length)),(1===t.pitches.length&&t.pitches[0].endSlur||t.endSlur)&&(a=!0),t.startTriplet&&(i+="(3"),t.pitches){for(t.pitches.length>1&&(i+="["),e=0;e<t.pitches.length;e++)t.pitches[e].duration=t.duration,i+=this.getNoteString(t.pitches[e],a);t.pitches.length>1&&(i+="]")}1===t.pitches.length&&t.pitches[0].endSlur&&(i+=this.multiplyString(")",t.pitches[0].endSlur.length)),t.endSlur&&(i+=this.multiplyString(")",t.endSlur.length)),this.printString(i,t)},r.prototype.getNoteString=function(t,e){var i="";!e&&t.startSlur&&(i+="(");var r="";switch(t.accidental){case"quartersharp":r="^/";break;case"dblsharp":r="^^";break;case"sharp":r="^";break;case"quarterflat":r="_/";break;case"flat":r="_";break;case"dblflat":r="__";break;case"natural":r="="}i+=r;var n=["C","D","E","F","G","A","B"][this.extractNote(t.pitch)],a=this.extractOctave(t.pitch);if(a>0)for(n=n.toLowerCase(),a--;a>0;)n+="'",a--;else for(;a<0;)n+=",",a++;return i+=n,t.duration&&(i+=this.getDurationString(t.duration)),!e&&t.endSlur&&(i+=")"),t.startTie&&(i+="-"),i},r.prototype.getDurationString=function(t){if(t/this.l>1)return t/this.l;var e="";return this.l/t>1&&(e+="/",this.l/t>2&&(e+=this.l/t)),e},r.prototype.extractNote=function(t){var e=t%7;return e<0&&(e+=7),e},r.prototype.extractOctave=function(t){return Math.floor(t/7)},r.prototype.printBarLine=function(t){var e="";switch(t.type){case"bar_thin":e+="|";break;case"bar_thin_thick":e+="|]";break;case"bar_thin_thin":e+="||";break;case"bar_thick_thin":e+="[|";break;case"bar_dbl_repeat":e+=":||:";break;case"bar_left_repeat":e+="|:";break;case"bar_right_repeat":e+=":|";break;case"bar_invisible":e+=""}this.printString(e,t)},r.prototype.multiplyString=function(t,e){for(var i="";e>0;e--)i+=t;return i},t.exports=r},function(t,e,i){"use strict";var r,n=i(10),a=i(15);r=function(t,e,i,r,s){for(var o="",c="",l=0;l<t.length;l++){var h=a(t[l],e);e.generateInline&&e.generateDownload?(o+=n.generateMidiDownloadLink(t[l],e,h.download,l),c+=n.generateMidiControls(t[l],e,h.inline,l)):e.generateInline?c+=n.generateMidiControls(t[l],e,h,l):o+=n.generateMidiDownloadLink(t[l],e,h,l)}var u,f,d;if(e.generateDownload&&(i?i.innerHTML=o:s.innerHTML+=o),e.generateInline&&(r?(r.innerHTML=c,u=r):(s.innerHTML+=c,u=s),e.animate||e.midiListener))for(l=0;l<t.length;l++){var p=(f="abcjs-midi-"+l,0===(d=u.getElementsByClassName(f)).length?null:d[0]);if(p.abcjsTune=t[l],p.abcjsListener=e.midiListener,p.abcjsQpm=e.qpm,p.abcjsContext=e.context,e.animate){var m=e.drumIntro?e.drumIntro:0;p.abcjsAnimate=e.animate.listener,p.abcjsTune.setTiming(e.qpm,m)}}},window.addEventListener("generateMidi",function(t){var e=t.detail;r(e.tunes,e.abcjsParams,e.downloadMidiEl,e.inlineMidiEl,e.engravingEl)}),t.exports=r}]);