Home
last modified time | relevance | path

Searched refs:dy (Results 176 – 200 of 210) sorted by relevance

123456789

/plugin/diagramsnet/lib/resources/
H A Ddia_fr.txt221 dy=Dy
H A Ddia_gl.txt221 dy=Dy
H A Ddia_ro.txt221 dy=Dy
H A Ddia_tr.txt221 dy=Dy
H A Ddia_hu.txt221 dy=Dy
H A Ddia_pt-br.txt221 dy=Dy
H A Ddia_cs.txt221 dy=Dy
H A Ddia_vi.txt221 dy=Dy
/plugin/codemirror/dist/
H A Dscripts.min.js.map1dy","wheelDeltaY","detail","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","delt…
/plugin/sequencediagram/bower_components/js-sequence-diagrams/dist/
H A Dsequence-diagram-min.js.map1 …oStack","element","_stack","finishGroup","g","group","invoke","selectAll","dy","arrowhead","rect",…
/plugin/ditaa/ditaa/
H A Dditaa.jarMETA-INF/ META-INF/MANIFEST.MF net/ net/htmlparser/ net/ ...
/plugin/diagramsnet/lib/js/
H A Dextensions.min.js1040 ….y;g=g*D.scale-B.x+D.dx+(c||y?0:F.shiftX);a=(b?0:B.height)-a*D.scale+B.y-D.dy-(c||y?0:F.shiftY);re…
1066 …,b=d.height*k.scale,a=d.width*k.scale;f=(f-d.x+k.dx)*k.scale;m=b+(-m+d.y-k.dy)*k.scale;this.geoSec…
1067 …m;var e=this.xmGeo,q=this.state;f=(f-e.x+q.dx)*q.scale;m=(e.height-m+e.y-q.dy)*q.scale;var k=e.hei…
1068 …m;var e=this.xmGeo,q=this.state;f=(f-e.x+q.dx)*q.scale;m=(e.height-m+e.y-q.dy)*q.scale;var k=e.hei…
1069 …cale;f=(f-d.x+k.dx)*k.scale;m=(d.height-m+d.y-k.dy)*k.scale;e=(e-d.x+k.dx)*k.scale;q=(d.height-q+d…
1070 …m=(a.height-m+a.y-b.dy)*b.scale;e=(e-a.x+b.dx)*b.scale;q=(a.height-q+a.y-b.dy)*b.scale;k=(k-a.x+b.…
1076 n=this.xmGeo;f=(f-n.x+k.dx)*k.scale;m=(n.height-m+n.y-k.dy)*k.scale;this.shape.appendChild(this.cre…
1086 …n(fa),m-=R*Math.cos(fa)):c=-M/2}f=(f-n.x+g.dx)*g.scale;m=(n.height-m+n.y-g.dy)*g.scale;this.shape.…
1087 …as2D.prototype.rotate=function(f,m,e,q,k){0!=f&&(m=this.state,q+=m.dx,k+=m.dy,q*=m.scale,k*=m.scal…
1574 …ltParent()),q=0;q<this.edges.length;q++)for(var c=this.edges[q],g=c.edges,n=c.parent,w=c.dx,x=c.dy,
[all …]
/plugin/diagramsnet/lib/math/config/
H A DTeX-MML-AM_SVG-full.js68dy=-B}}else{if(!z){var o=this.getValues("displaystyle","texprimestyle");L=a.TeX[(o.displaystyle?"s…
/plugin/bpmnio/vendor/dmn-js/dist/
H A Ddmn-viewer.production.min.js2dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),_r(t,n)})),{x:n.e,y:n.…
/plugin/yuriigantt/3rd/dhtmlxgantt/
H A Ddhtmlxgantt.js.map1dy","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","ru…
/plugin/achart/assets/
H A Dapexcharts.min.js6dy:function(t){return this.attr("dy",t)},newLine:function(){var t=this.parent(a.Text);return this.…
10 …ull!=e&&this.attr("flood-opacity",e)},offset:function(t,e){this.attr({dx:t,dy:e})},image:function(…
14dy:this.parameters.y,event:t}),SVG.on(window,"touchmove.resize",(function(t){e.update(t||window.ev…
/plugin/abc2/abc-libraries/abcjs/
H A Dabcjs_plugin-midi_6.0.0-beta.25-min.js3 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=27)}([function(e,t){var n={clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},cloneArray:function(e){for(var t=[],r=0;r<e.length;r++)t.push(n.clone(e[r]));return t},cloneHashOfHash:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=n.clone(e[r]));return t},cloneHashOfArrayOfHash:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=n.cloneArray(e[r]));return t},gsub:function(e,t,n){return e.split(t).join(n)},strip:function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")},startsWith:function(e,t){return 0===e.indexOf(t)},endsWith:function(e,t){var n=e.length-t.length;return n>=0&&e.lastIndexOf(t)===n},each:function(e,t,n){for(var r=0,i=e.length;r<i;r++)t.apply(n,[e[r],r])},last:function(e){return 0===e.length?null:e[e.length-1]},compact:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},detect:function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}};try{[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}))}catch(e){}e.exports=n},function(e,t){var n={FONTEM:360,FONTSIZE:30};n.STEP=93*n.FONTSIZE/720,n.SPACE=10,n.TOPNOTE=15,n.STAVEHEIGHT=100,n.INDENT=50,e.exports=n},function(e,t){var n=function(e,t,n,r,i){switch(i=i||{},this.x=0,this.c=e,this.dx=t,this.w=n,this.pitch=r,this.scalex=i.scalex||1,this.scaley=i.scaley||1,this.type=i.type||"symbol",this.pitch2=i.pitch2,this.linewidth=i.linewidth,this.klass=i.klass,this.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),i.thickness&&(this.top+=i.thickness/2,this.bottom-=i.thickness/2),i.stemHeight&&(i.stemHeight>0?this.top+=i.stemHeight:this.bottom+=i.stemHeight),i.dim&&(this.dim=i.dim),i.position&&(this.position=i.position),this.height=i.height?i.height:4,i.top&&(this.top=i.top),i.bottom&&(this.bottom=i.bottom),i.realWidth?this.realWidth=i.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":i.position&&"below"===i.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};n.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e=this.dim.font.size/4;1===this.c.length&&(e/=2);var t="chord"===this.type?this.realWidth/2:0,n=this.x-t-e;return{left:n,right:n+this.realWidth+e}},n.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},n.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},n.prototype.getLane=function(){return void 0===this.lane?0:this.lane},n.prototype.setX=function(e){this.x=e+this.dx},e.exports=n},function(e,t){e.exports=function(e){return parseFloat(e.toFixed(2))}},function(e,t,n){var r=n(3);e.exports=function(e,t){var n,i=t.y;if(t.lane){var a=.25*t.dim.font.size;i+=(t.dim.font.size+a)*t.lane}t.dim?(n=t.dim).attr.class=t.klass:n=e.controller.getFontAndAttr.calc(t.type,t.klass),t.anchor&&(n.attr["text-anchor"]=t.anchor),n.attr.x=t.x,n.attr.y=i,t.centerVertically||(n.attr.y+=n.font.size),"debugfont"===t.type&&(console.log("Debug msg: "+t.text),n.attr.stroke="#ff0000");var s=t.text.replace(/\n\n/g,"\n \n");s=s.replace(/^\n/," \n"),n.font.box&&(e.paper.openGroup({klass:n.attr.class,fill:"#000000"}),"end"===n.attr["text-anchor"]?n.attr.x-=n.font.padding:"start"===n.attr["text-anchor"]&&(n.attr.x+=n.font.padding),n.attr.y+=n.font.padding,delete n.attr.class),t.noClass&&delete n.attr.class,n.attr.x=r(n.attr.x),n.attr.y=r(n.attr.y);var o=e.paper.text(s,n.attr);if(n.font.box){var c=o.getBBox(),l=0;"middle"===n.attr["text-anchor"]?l=c.width/2+n.font.padding:"end"===n.attr["text-anchor"]&&(l=c.width+2*n.font.padding);var h=0;t.centerVertically&&(h=c.height-n.font.padding),e.paper.rect({x:Math.round(t.x-l),y:Math.round(i-h),width:Math.round(c.width+2*n.font.padding),height:Math.round(c.height+2*n.font.padding)}),o=e.paper.closeGroup()}return o}},function(e,t,n){var r=n(1),i={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.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}},a=function(e){for(var t=[],n=0,r=e.length;n<r;n++){t[n]=[];for(var i=0,a=e[n].length;i<a;i++)t[n][i]=e[n][i]}return t},s={printSymbol:function(e,t,n,r,s,o,c){if(!i[n])return null;var l=a(i[n].d);l[0][1]+=e,l[0][2]+=t;for(var h="",u=0;u<l.length;u++)h+=l[u].join(" ");return r.path({path:h,stroke:o,fill:c,class:s})},getPathForSymbol:function(e,t,n,r,s){if(r=r||1,s=s||1,!i[n])return null;var o=a(i[n].d);return 1===r&&1===s||function(e,t,n){for(var r=0,i=e.length;r<i;r++){var a,s,o=e[r];for(a=1,s=o.length;a<s;a++)o[a]*=a%2?t:n}}(o,r,s),o[0][1]+=e,o[0][2]+=t,o},getSymbolWidth:function(e){return i[e]?i[e].w:0},symbolHeightInPitches:function(e){return(i[e]?i[e].h:0)/r.STEP},getSymbolAlign:function(e){return"scripts"===e.substring(0,7)&&"scripts.roll"!==e?"center":"left"},getYCorr:function(e){switch(e){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":return-2;case"timesig.common":case"timesig.cut":return 0;case"flags.d32nd":return-1;case"flags.d64th":return-2;case"flags.u32nd":return 1;case"flags.u64th":return 3;case"rests.whole":return 1;case"rests.half":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}},setSymbol:function(e,t){i[e]=t}};e.exports=s},function(e,t,n){var r=n(8),i=function(e,t,n,r,i,a){a||(a={}),this.tuneNumber=i,this.abcelem=e,this.duration=t,this.durationClass=a.durationClassOveride?a.durationClassOveride:this.duration,this.minspacing=n||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=r,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};i.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},i.prototype.addExtra=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top),void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom),e.dx<this.extraw&&(this.extraw=e.dx),this.extra[this.extra.length]=e,this._addChild(e)},i.prototype.addHead=function(e){e.dx<this.extraw&&(this.extraw=e.dx),this.heads[this.heads.length]=e,this.addRight(e)},i.prototype.addRight=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0!==e.top&&(void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top)),void 0!==e.bottom&&(void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom)),isNaN(this.fixed.t)||isNaN(this.fixed.b),e.dx+e.w>this.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},i.prototype.addFixed=function(e){this._addChild(e)},i.prototype.addFixedX=function(e){this._addChild(e)},i.prototype.addCentered=function(e){var t=e.w/2;-t<this.extraw&&(this.extraw=-t),this.extra[this.extra.length]=e,e.dx+t>this.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},i.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},i.prototype._addChild=function(e){e.parent=this,this.children[this.children.length]=e,this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},i.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},i.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},i.prototype.setX=function(e){this.x=e;for(var t=0;t<this.children.length;t++)this.children[t].setX(e)},i.prototype.center=function(e,t){var n=(t.x-e.x)/2+e.x;this.x=n-this.w/2;for(var r=0;r<this.children.length;r++)this.children[r].setX(this.x)},i.prototype.setHint=function(){this.hint=!0},i.prototype.isIE=!1,i.prototype.highlight=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#ff0000"),r(this.elemset,e,"",t)},i.prototype.unhighlight=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#000000"),r(this.elemset,"",e,t)},e.exports=i},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){for(var e,t,r,i,a,s=0,o=arguments[s++],c=[];o;){if(t=/^[^\x25]+/.exec(o))c.push(t[0]);else if(t=/^\x25{2}/.exec(o))c.push("%");else{if(!(t=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(e=arguments[t[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(t[7])&&"number"!=typeof e)throw"Expecting number but found "+n(e);switch(t[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=t[6]?e.toExponential(t[6]):e.toExponential();break;case"f":e=t[6]?parseFloat(e).toFixed(t[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&t[6]?e.substring(0,t[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(t[7])&&t[2]&&e>0?"+"+e:e,i=t[3]?"0"==t[3]?"0":t[3].charAt(1):" ",a=t[5]-String(e).length,r=t[5]?str_repeat(i,a):"",c.push(t[4]?e+r:r+e)}o=o.substring(t[0].length)}return c.join("")}},function(e,t){e.exports=function(e,t,n,r){if(e)for(var i=0;i<e.length;i++){var a=e[i],s=a.getAttribute("highlight");s||(s="fill"),a.setAttribute(s,r);var o=a.getAttribute("class");o||(o=""),o=(o=o.replace(n,"")).replace(t,""),t.length>0&&(o.length>0&&" "!==o.charAt(o.length-1)&&(o+=" "),o+=t),a.setAttribute("class",o)}}},function(e,t){e.exports=function(e,t,n){return e.paper.path(t)}},function(e,t,n){var r=n(0),i={};!function(){"use strict";var e,t,n,a,s;i.initialize=function(r,i,o,c,l){e=r,t=i,a=c,s=l,(n=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},n.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},n.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},n.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},n.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},n.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},n.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=n.annotationfont,a.formatting.gchordfont=n.gchordfont,a.formatting.historyfont=n.historyfont,a.formatting.infofont=n.infofont,a.formatting.measurefont=n.measurefont,a.formatting.partsfont=n.partsfont,a.formatting.repeatfont=n.repeatfont,a.formatting.textfont=n.textfont,a.formatting.tripletfont=n.tripletfont,a.formatting.vocalfont=n.vocalfont,a.formatting.wordsfont=n.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,n,r,i,a){function s(){var s=parseInt(e[0].token);return e.shift(),n?0===e.length?{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[a]?{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",r,i),{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s}):(t("Can't set just the size of the font since there is no default value.",r,i),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:s})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return s();t("Expected font size number after *.",r,i)}if("number"===e[0].type)return s();for(var c,l=[],h="normal",u="normal",d="none",f=!1,p="face",m=!1;e.length;){var g=e.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?t("Font size specified twice in font definition.",r,i):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[a]?f=!0:t('This font style doesn\'t support "box"',r,i),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",r,i);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",r,i):c=g.token:t("Expected font size in font definition.",r,i),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[a]?f=!0:t('This font style doesn\'t support "box"',r,i),p="finished"):t("Unknown parameter "+g.token+" in font definition.",r,i);break;case"finished":t('Extra characters found after "box" in font definition.',r,i)}}void 0===c?n?c=n.size:(t("Must specify the size of the font since there is no default value.",r,i),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(n?l=n.face:(t("Must specify the name of the font since there is no default value.",r,i),l="sans-serif"));var b=function(e){switch(e){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),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=h,y.style=u,y.decoration=d,y.size=c,f&&(y.box=!0),y)},l=function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(n[e]=c(t,n[e],r,0,e),n.is_in_header&&(a.formatting[e]=n[e]),null)},h=function(e,t){var n="";r.each(t,(function(e){n+=e.token}));var i=parseFloat(n);if(isNaN(i)||0===i)return'Directive "'+e+'" requires a number as a parameter.';a.formatting.scale=i},u=function(e,t,r,i,a){if(1!==r.length||"number"!==r[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=r[0].intt;return void 0!==i&&s<i?'Directive "'+t+'" requires a number greater than or equal to '+i+" as a parameter.":void 0!==a&&s>a?'Directive "'+t+'" requires a number less than or equal to '+a+" as a parameter.":(n[e]=s,null)},d=function(e,t,r){if(1===r.length&&("true"===r[0].token||"false"===r[0].token))return n[e]="true"===r[0].token,null;var i=u(e,t,r,0,1);return null!==i?i:(n[e]=1===n[e],null)},f=function(e,t,r,i){if(1!==r.length)return'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter.";for(var a=r[0].token,s=!1,o=0;!s&&o<i.length;o++)i[o]===a&&(s=!0);return s?(n[e]=a,null):'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter."},p=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],m=["gchord","ptstress","beatstring"],g=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc"],v=["program"],b=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],y=["beat"],w=["drone"],x=["portamento"],k=["expand","grace","trim"],A=["drum","chordname"];i.parseFontChangeLine=function(e){var t=e.split("$");if(t.length>1&&n.setfont){for(var r=[{text:t[0]}],i=1;i<t.length;i++)"0"===t[i].charAt(0)?r.push({text:t[i].substring(1)}):"1"===t[i].charAt(0)&&n.setfont[1]?r.push({font:n.setfont[1],text:t[i].substring(1)}):"2"===t[i].charAt(0)&&n.setfont[2]?r.push({font:n.setfont[2],text:t[i].substring(1)}):"3"===t[i].charAt(0)&&n.setfont[3]?r.push({font:n.setfont[3],text:t[i].substring(1)}):"4"===t[i].charAt(0)&&n.setfont[4]?r.push({font:n.setfont[4],text:t[i].substring(1)}):r[r.length-1].text+="$"+t[i];if(r.length>1)return r}return e};var T=["auto","above","below","hidden"];i.addDirective=function(o){var S=e.tokenize(o,0,o.length);if(0===S.length||"alpha"!==S[0].type)return null;var M=o.substring(o.indexOf(S[0].token)+S[0].token.length);M=e.stripComment(M);var N=S.shift().token.toLowerCase(),C="";switch(N){case"bagpipes":a.formatting.bagpipes=!0;break;case"flatbeams":a.formatting.flatbeams=!0;break;case"landscape":n.landscape=!0;break;case"papersize":n.papersize=M;break;case"graceslurs":if(1!==S.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===S[0].token||"false"===S[0].token)a.formatting.graceSlurs=!1;else{if("1"!==S[0].token&&"true"!==S[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+S[0].token+")";a.formatting.graceSlurs=!0}break;case"stretchlast":a.formatting.stretchlast=!0;break;case"titlecaps":n.titlecaps=!0;break;case"titleleft":a.formatting.titleleft=!0;break;case"measurebox":a.formatting.measurebox=!0;break;case"vocal":return f("vocalPosition",N,S,T);case"dynamic":return f("dynamicPosition",N,S,T);case"gchord":return f("chordPosition",N,S,T);case"ornament":return f("ornamentPosition",N,S,T);case"volume":return f("volumePosition",N,S,T);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(t,n){var r=e.getMeasurement(n);return 0===r.used||0!==n.length?'Directive "'+t+'" requires a measurement as a parameter.':(a.formatting[t]=r.value,null)}(N,S);case"voicescale":if(1!==S.length||"number"!==S[0].type)return"voicescale requires one float as a parameter";var E=S.shift();return n.currentVoice&&(n.currentVoice.scale=E.floatt,s.changeVoiceScale(n.currentVoice.scale)),null;case"vskip":var I=Math.round(function(t,n){var r=e.getMeasurement(n);return 0===r.used||0!==n.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:r.value}(N,S));return I.error?I.error:(s.addSpacing(I),null);case"scale":h(N,S);break;case"sep":if(0===S.length)s.addSeparator(14,14,85);else{var _=e.getMeasurement(S);if(0===_.used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var B=_.value;if(0===(_=e.getMeasurement(S)).used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var P=_.value;if(0===(_=e.getMeasurement(S)).used||0!==S.length)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var D=_.value;s.addSeparator(B,P,D)}break;case"barsperstaff":if(null!==(C=u("barsperstaff",N,S)))return C;break;case"staffnonote":if(1!==S.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===S[0].token)n.staffnonote=!0;else{if("1"!==S[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+S[0].token+")";n.staffnonote=!1}break;case"printtempo":if(null!==(C=d("printTempo",N,S)))return C;break;case"partsbox":if(null!==(C=d("partsBox",N,S)))return C;n.partsfont.box=n.partsBox;break;case"freegchord":if(null!==(C=d("freegchord",N,S)))return C;break;case"measurenb":case"barnumbers":if(null!==(C=u("barNumbers",N,S)))return C;break;case"setbarnb":if(1!==S.length||"number"!==S[0].type)return"Directive setbarnb requires a number as a parameter.";n.currBarNumber=s.setBarNumberImmediate(S[0].intt);break;case"begintext":n.inTextBlock=!0;break;case"continueall":n.continueall=!0;break;case"beginps":n.inPsBlock=!0,t("Postscript ignored",o,0);break;case"deco":M.length>0&&n.ignoredDecorations.push(M.substring(0,M.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var L=e.translateString(M);s.addText(i.parseFontChangeLine(L));break;case"center":var O=e.translateString(M);s.addCentered(i.parseFontChangeLine(O));break;case"font":break;case"setfont":var H=e.tokenize(M,0,M.length);if(H.length>=4&&"-"===H[0].token&&"number"===H[1].type){var V=parseInt(H[1].token);V>=1&&V<=4&&(n.setfont||(n.setfont=[]),H.shift(),H.shift(),n.setfont[V]=c(H,n.setfont[V],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(N,S,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(a.formatting[e]=c(t,a.formatting[e],n,0,e),null)}(N,S,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",S,o);case"staves":case"score":n.score_is_present=!0;for(var F,z=function(e,t,i,a,s){(t||0===n.staves.length)&&n.staves.push({index:n.staves.length,numVoices:0});var o=r.last(n.staves);void 0!==i&&void 0===o.bracket&&(o.bracket=i),void 0!==a&&void 0===o.brace&&(o.brace=a),s&&(o.connectBarLines="end"),void 0===n.voices[e]&&(n.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},j=!1,q=!1,Y=!1,W=!1,R=!1,G=!1,U=!1,X=function(){if(U=!0,F){var e="start";F.staffNum>0&&("start"!==n.staves[F.staffNum-1].connectBarLines&&"continue"!==n.staves[F.staffNum-1].connectBarLines||(e="continue")),n.staves[F.staffNum].connectBarLines=e}};S.length;){var K=S.shift();switch(K.token){case"(":j?t("Can't nest parenthesis in %%score",o,K.start):(j=!0,W=!0);break;case")":!j||W?t("Unexpected close parenthesis in %%score",o,K.start):j=!1;break;case"[":q?t("Can't nest brackets in %%score",o,K.start):(q=!0,R=!0);break;case"]":!q||R?t("Unexpected close bracket in %%score",o,K.start):(q=!1,n.staves[F.staffNum].bracket="end");break;case"{":Y?t("Can't nest braces in %%score",o,K.start):(Y=!0,G=!0);break;case"}":!Y||G?t("Unexpected close brace in %%score",o,K.start):(Y=!1,n.staves[F.staffNum].brace="end");break;case"|":X();break;default:for(var Z="";("alpha"===K.type||"number"===K.type)&&(Z+=K.token,K.continueId);)K=S.shift();z(Z,!j||W,R?"start":q?"continue":void 0,G?"start":Y?"continue":void 0,U),W=!1,R=!1,G=!1,U=!1,F=n.voices[Z],"staves"===N&&X()}}break;case"newpage":var Q=e.getInt(M);s.addNewPage(0===Q.digits?-1:Q.value);break;case"abc":var J=M.split(" ");switch(J[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var $=J.shift();s.addMetaText(N+$,J.join(" "));break;default:return"Unknown directive: "+N+J[0]}break;case"header":case"footer":var ee=e.getMeat(M,0,M.length);'"'===(ee=M.substring(ee.start,ee.end)).charAt(0)&&'"'===ee.charAt(ee.length-1)&&(ee=ee.substring(1,ee.length-1));var te=ee.split("\t"),ne={};ne=1===te.length?{left:"",center:te[0],right:""}:2===te.length?{left:te[0],center:te[1],right:""}:{left:te[0],center:te[1],right:te[2]},te.length>3&&t("Too many tabs in "+N+": "+te.length+" found.",M,0),s.addMetaTextObj(N,ne);break;case"midi":var re=e.tokenize(M,0,M.length,!0);re.length>0&&"="===re[0].token&&re.shift(),0===re.length?t("Expected midi command",M,0):function(e,n,r){var i=e.shift().token,a=[];if(p.indexOf(i)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+i,r,0);else if(m.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,r,0):a.push(e[0].token);else if(g.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,r,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+i,r,0):a.push(e[0].intt);else if(v.indexOf(i)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+i,r,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+i,r,0):(a.push(e[0].intt),2===e.length&&a.push(e[1].intt));else if(b.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,r,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[1].intt));else if(x.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,r,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+i,r,0):(a.push(e[0].token),a.push(e[1].intt));else if("drummap"===i)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(n.formatting||(n.formatting={}),n.formatting.midi||(n.formatting.midi={}),n.formatting.midi.drummap||(n.formatting.midi.drummap={}),n.formatting.midi.drummap[e[0].token]=e[1].intt,a=n.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(n.formatting||(n.formatting={}),n.formatting.midi||(n.formatting.midi={}),n.formatting.midi.drummap||(n.formatting.midi.drummap={}),n.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,a=n.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+i,r,0);else if(k.indexOf(i)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[2].intt));else if(y.indexOf(i)>=0)4!==e.length?t("Expected four parameters in MIDI "+i,r,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?t("Expected four integer parameters in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[1].intt),a.push(e[2].intt),a.push(e[3].intt));else if(w.indexOf(i)>=0)5!==e.length?t("Expected five parameters in MIDI "+i,r,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?t("Expected five integer parameters in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[1].intt),a.push(e[2].intt),a.push(e[3].intt),a.push(e[4].intt));else if(v.indexOf(i)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+i,r,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+i,r,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+i,r,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+i,r,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+i,r,0)):(a.push(e[0].intt),4===e.length&&a.push(e[3].intt));else if(A.indexOf(i)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+i,r,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+i,r,0);else{var o=e.shift();for(a.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+i,r,0),a.push(o.intt)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:i,params:a}):(void 0===n.formatting.midi&&(n.formatting.midi={}),n.formatting.midi[i]=a)}(re,a,M);break;case"map":case"percmap":case"playtempo":case"auquality":case"continuous":case"nobarcheck":a.formatting[N]=M;break;default:return"Unknown directive: "+N}return null},i.globalFormatting=function(r){for(var i in r)if(r.hasOwnProperty(i)){var s,o=""+r[i],c=e.tokenize(o,0,o.length);switch(i){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":l(i,c,o);break;case"scale":h(i,c);break;case"partsbox":null!==(s=d("partsBox",i,c))&&t(s),n.partsfont.box=n.partsBox;break;case"freegchord":null!==(s=d("freegchord",i,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+i+'" requires a number as a parameter.'),a.formatting.fontboxpadding=c[0].floatt;break;case"stretchlast":a.formatting.stretchlast="true"===o||!0===o;break;default:t("Formatting directive unrecognized: ",i,0)}}}}(),e.exports=i},function(e,t,n){var r=n(0),i=n(10),a=n(16),s={};!function(){var e,t,n,o;s.initialize=function(r,i,a,s,c){e=r,t=i,n=a,s,o=c},s.standardKey=function(e,t,r,i){var s={acc:"sharp",note:"f"},o={acc:"sharp",note:"c"},c={acc:"sharp",note:"g"},l={acc:"sharp",note:"d"},h={acc:"sharp",note:"A"},u={acc:"sharp",note:"e"},d={acc:"sharp",note:"B"},f={acc:"flat",note:"B"},p={acc:"flat",note:"e"},m={acc:"flat",note:"A"},g={acc:"flat",note:"d"},v={acc:"flat",note:"G"},b={acc:"flat",note:"c"},y={acc:"flat",note:"F"},w={"C#":[s,o,c,l,h,u,d],"A#m":[s,o,c,l,h,u,d],"G#Mix":[s,o,c,l,h,u,d],"D#Dor":[s,o,c,l,h,u,d],"E#Phr":[s,o,c,l,h,u,d],"F#Lyd":[s,o,c,l,h,u,d],"B#Loc":[s,o,c,l,h,u,d],"F#":[s,o,c,l,h,u],"D#m":[s,o,c,l,h,u],"C#Mix":[s,o,c,l,h,u],"G#Dor":[s,o,c,l,h,u],"A#Phr":[s,o,c,l,h,u],BLyd:[s,o,c,l,h,u],"E#Loc":[s,o,c,l,h,u],B:[s,o,c,l,h],"G#m":[s,o,c,l,h],"F#Mix":[s,o,c,l,h],"C#Dor":[s,o,c,l,h],"D#Phr":[s,o,c,l,h],ELyd:[s,o,c,l,h],"A#Loc":[s,o,c,l,h],E:[s,o,c,l],"C#m":[s,o,c,l],BMix:[s,o,c,l],"F#Dor":[s,o,c,l],"G#Phr":[s,o,c,l],ALyd:[s,o,c,l],"D#Loc":[s,o,c,l],A:[s,o,c],"F#m":[s,o,c],EMix:[s,o,c],BDor:[s,o,c],"C#Phr":[s,o,c],DLyd:[s,o,c],"G#Loc":[s,o,c],D:[s,o],Bm:[s,o],AMix:[s,o],EDor:[s,o],"F#Phr":[s,o],GLyd:[s,o],"C#Loc":[s,o],G:[s],Em:[s],DMix:[s],ADor:[s],BPhr:[s],CLyd:[s],"F#Loc":[s],C:[],Am:[],GMix:[],DDor:[],EPhr:[],FLyd:[],BLoc:[],F:[f],Dm:[f],CMix:[f],GDor:[f],APhr:[f],BbLyd:[f],ELoc:[f],Bb:[f,p],Gm:[f,p],FMix:[f,p],CDor:[f,p],DPhr:[f,p],EbLyd:[f,p],ALoc:[f,p],Eb:[f,p,m],Cm:[f,p,m],BbMix:[f,p,m],FDor:[f,p,m],GPhr:[f,p,m],AbLyd:[f,p,m],DLoc:[f,p,m],Ab:[f,p,m,g],Fm:[f,p,m,g],EbMix:[f,p,m,g],BbDor:[f,p,m,g],CPhr:[f,p,m,g],DbLyd:[f,p,m,g],GLoc:[f,p,m,g],Db:[f,p,m,g,v],Bbm:[f,p,m,g,v],AbMix:[f,p,m,g,v],EbDor:[f,p,m,g,v],FPhr:[f,p,m,g,v],GbLyd:[f,p,m,g,v],CLoc:[f,p,m,g,v],Gb:[f,p,m,g,v,b],Ebm:[f,p,m,g,v,b],DbMix:[f,p,m,g,v,b],AbDor:[f,p,m,g,v,b],BbPhr:[f,p,m,g,v,b],CbLyd:[f,p,m,g,v,b],FLoc:[f,p,m,g,v,b],Cb:[f,p,m,g,v,b,y],Abm:[f,p,m,g,v,b,y],GbMix:[f,p,m,g,v,b,y],DbDor:[f,p,m,g,v,b,y],EbPhr:[f,p,m,g,v,b,y],FbLyd:[f,p,m,g,v,b,y],BbLoc:[f,p,m,g,v,b,y],"A#":[f,p],"B#":[],"D#":[f,p,m],"E#":[f],"G#":[f,p,m,g],Gbm:[s,o,c,l,h,u,d],none:[]};return a.keySignature(n,w,e,t,r,i)};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},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},l=function(e,t){var n=c[e];return(n?n.mid:0)+t};s.fixClef=function(e){var t=c[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},s.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return r.each(e.accidentals,(function(e){t.accidentals.push(r.clone(e))})),t};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(e,t){var n=e.verticalPos;r.each(t.accidentals,(function(e){var t=h[e.note];t-=n,e.verticalPos=t})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){var t=h[e.note];t-=n,e.verticalPos=t})),n<-10?(r.each(t.accidentals,(function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):n<-4?(r.each(t.accidentals,(function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):n>=7&&(r.each(t.accidentals,(function(e){e.verticalPos+=7})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){e.verticalPos+=7})))},s.fixKey=function(e,t){var n=r.clone(t);return s.addPosToKey(e,n),n};var u=function(e){var t=0,n=e.charAt(t++);"^"!==n&&"_"!==n||(n=e.charAt(t++));var r=h[n];for(void 0===r&&(r=6);t<e.length;t++)if(","===e.charAt(t))r-=7;else{if("'"!==e.charAt(t))break;r+=7}return{mid:r-6,str:e.substring(t)}};s.parseKey=function(r){0===r.length&&(r="none");var a=e.tokenize(r,0,r.length),o={};switch(a[0].token){case"HP":i.addDirective("bagpipes"),n.key={root:"HP",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"Hp":i.addDirective("bagpipes"),n.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":n.key={root:"none",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;default:var c=e.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 d=c.token;if(a.length>0){var f=e.getSharpFlat(a[0].token);if(f.len>0&&(a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift(),d+=f.token,h=f.token),a.length>0){var p=e.getMode(a[0].token);p.len>0&&(a.shift(),d+=p.token,u=p.token)}if(void 0===s.standardKey(d,c.token,h,0))return t("Unsupported key signature: "+d,r,0),o}var m=s.deepCopyKey(n.key),g=n.globalTranspose?-n.globalTranspose:0;if(n.key=s.deepCopyKey(s.standardKey(d,c.token,h,g)),n.key.mode=u,m){for(var v,b=0;b<n.key.accidentals.length;b++)for(v=0;v<m.accidentals.length;v++)m.accidentals[v].note&&n.key.accidentals[b].note.toLowerCase()===m.accidentals[v].note.toLowerCase()&&(m.accidentals[v].note=null);for(v=0;v<m.accidentals.length;v++)m.accidentals[v].note&&(n.key.impliedNaturals||(n.key.impliedNaturals=[]),n.key.impliedNaturals.push({acc:"natural",note:m.accidentals[v].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 y,w=e.getKeyAccidentals2(a);if(w.warn&&t(w.warn,r,0),w.accs){o.foundKey||(o.foundKey=!0,n.key={root:"none",acc:"",mode:"",accidentals:[]}),function(e){for(var t=0;t<e.length;t++)"b"===e[t].note?e[t].note="B":"a"===e[t].note?e[t].note="A":"F"===e[t].note?e[t].note="f":"E"===e[t].note?e[t].note="e":"D"===e[t].note?e[t].note="d":"C"===e[t].note?e[t].note="c":"G"===e[t].note&&"sharp"===e[t].acc?e[t].note="g":"g"===e[t].note&&"flat"===e[t].acc&&(e[t].note="G")}(w.accs);for(var x=0;x<w.accs.length;x++){for(var k=!1,A=0;A<n.key.accidentals.length&&!k;A++)n.key.accidentals[A].note===w.accs[x].note&&(k=!0,n.key.accidentals[A].acc!==w.accs[x].acc&&(n.key.accidentals[A].acc=w.accs[x].acc,n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(w.accs[x])));if(!k&&(n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(w.accs[x]),n.key.accidentals.push(w.accs[x]),n.key.impliedNaturals))for(var T=0;T<n.key.impliedNaturals.length;T++)n.key.impliedNaturals[T].note===w.accs[x].note&&n.key.impliedNaturals.splice(T,1)}}for(;a.length>0;)switch(a[0].token){case"m":case"middle":if(a.shift(),0===a.length)return t("Expected = after middle",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after middle",r,y.start);break}if(0===a.length)return t("Expected parameter after middle=",r,0),o;var S=e.getPitchFromTokens(a);S.warn&&t(S.warn,r,0),S.position&&(n.clef.verticalPos=S.position-6);break;case"transpose":if(a.shift(),0===a.length)return t("Expected = after transpose",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after transpose",r,y.start);break}if(0===a.length)return t("Expected parameter after transpose=",r,0),o;if("number"!==a[0].type){t("Expected number after transpose",r,a[0].start);break}n.clef.transpose=a[0].intt,a.shift();break;case"stafflines":if(a.shift(),0===a.length)return t("Expected = after stafflines",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after stafflines",r,y.start);break}if(0===a.length)return t("Expected parameter after stafflines=",r,0),o;if("number"!==a[0].type){t("Expected number after stafflines",r,a[0].start);break}n.clef.stafflines=a[0].intt,a.shift();break;case"staffscale":if(a.shift(),0===a.length)return t("Expected = after staffscale",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after staffscale",r,y.start);break}if(0===a.length)return t("Expected parameter after staffscale=",r,0),o;if("number"!==a[0].type){t("Expected number after staffscale",r,a[0].start);break}n.clef.staffscale=a[0].floatt,a.shift();break;case"style":if(a.shift(),0===a.length)return t("Expected = after style",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after style",r,y.start);break}if(0===a.length)return t("Expected parameter after style=",r,0),o;switch(a[0].token){case"normal":case"harmonic":case"rhythm":case"x":n.style=a[0].token,a.shift();break;default:t("error parsing style element: "+a[0].token,r,a[0].start)}break;case"clef":if(a.shift(),0===a.length)return t("Expected = after clef",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after clef",r,y.start);break}if(0===a.length)return t("Expected parameter after clef=",r,0),o;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var M=a.shift();switch(M.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":M.token="alto";break;case"F":M.token="bass";break;case"G":M.token="treble";break;case"c":M.token="alto";break;case"f":M.token="bass";break;case"g":M.token="treble";break;default:t("Expected clef name. Found "+M.token,r,M.start)}a.length>0&&"number"===a[0].type&&(M.token+=a[0].token,a.shift()),a.length>1&&("-"===a[0].token||"+"===a[0].token||"^"===a[0].token||"_"===a[0].token)&&"8"===a[1].token&&(M.token+=a[0].token+a[1].token,a.shift(),a.shift()),n.clef={type:M.token,verticalPos:l(M.token,0)},n.currentVoice&&void 0!==n.currentVoice.transpose&&(n.clef.transpose=n.currentVoice.transpose),o.foundClef=!0;break;default:t("Unknown parameter: "+a[0].token,r,a[0].start),a.shift()}return o};s.parseVoice=function(r,i,a){var s=e.getMeat(r,i,a),c=s.start,h=s.end,d=e.getToken(r,c,h);if(0!==d.length){var f=!1;void 0===n.voices[d]&&(n.voices[d]={},f=!0,n.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",r,c)),c+=d.length,c+=e.eatWhiteSpace(r,c);for(var p={startStaff:f},m=function(n){var i=e.getVoiceToken(r,c,h);void 0!==i.warn?t("Expected value for "+n+" in voice: "+i.warn,r,c):void 0!==i.err?t("Expected value for "+n+" in voice: "+i.err,r,c):0===i.token.length&&'"'!==r.charAt(c)?t("Expected value for "+n+" in voice",r,c):p[n]=i.token,c+=i.len},g=function(i,a,s){var o=e.getVoiceToken(r,c,h);void 0!==o.warn?t("Expected value for "+a+" in voice: "+o.warn,r,c):void 0!==o.err?t("Expected value for "+a+" in voice: "+o.err,r,c):0===o.token.length&&'"'!==r.charAt(c)?t("Expected value for "+a+" in voice",r,c):("number"===s&&(o.token=parseFloat(o.token)),n.voices[i][a]=o.token),c+=o.len},v=function(n,i){var a=e.getVoiceToken(r,c,h);if(void 0!==a.warn)t("Expected value for "+n+" in voice: "+a.warn,r,c);else if(void 0!==a.err)t("Expected value for "+n+" in voice: "+a.err,r,c);else{if(0!==a.token.length||'"'===r.charAt(c))return"number"===i&&(a.token=parseFloat(a.token)),a.token;t("Expected value for "+n+" in voice",r,c)}c+=a.len},b=function(i,a){var s=e.getVoiceToken(r,c,h);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+a+" in voice: "+s.warn,r,c);else if(0===s.token.length&&'"'!==r.charAt(c))t("Expected one of (_B, _E, _b, _e) for "+a+" in voice",r,c);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?n.voices[i][a]=o:t("Expected one of (_B, _E, _b, _e) for "+a+" in voice",r,c)}c+=s.len};c<h;){var y=e.getVoiceToken(r,c,h);if(c+=y.len,y.warn)t("Error parsing voice: "+y.warn,r,c);else{var w=null;switch(y.token){case"clef":case"cl":m("clef");var x=0;void 0!==p.clef&&(p.clef=p.clef.replace(/[',]/g,""),-1!==p.clef.indexOf("+16")&&(x+=14,p.clef=p.clef.replace("+16","")),p.verticalPos=l(p.clef,x));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=y.token.replace(/[',]/g,""),p.verticalPos=l(p.clef,0),n.voices[d].clef=y.token;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!==(w=e.getVoiceToken(r,c,h)).warn?t("Expected value for stems in voice: "+w.warn,r,c):void 0!==w.err?t("Expected value for stems in voice: "+w.err,r,c):"up"===w.token||"down"===w.token?n.voices[d].stem=w.token:t("Expected up or down for voice stem",r,c),c+=w.len;break;case"up":case"down":n.voices[d].stem=y.token;break;case"middle":case"m":m("verticalPos"),p.verticalPos=u(p.verticalPos).mid;break;case"gchords":case"gch":n.voices[d].suppressChords=!0,"0"===(w=e.getVoiceToken(r,c,h)).token&&(c+=w.len);break;case"space":case"spc":m("spacing");break;case"scale":g(d,"scale","number");break;case"score":b(d,"scoreTranspose");break;case"transpose":g(d,"transpose","number");break;case"stafflines":g(d,"stafflines","number");break;case"staffscale":g(d,"staffscale","number");break;case"octave":g(d,"octave","number");break;case"volume":g(d,"volume","number");break;case"cue":var k=v("cue","string");n.voices[d].scale="on"===k?.6:1;break;case"style":void 0!==(w=e.getVoiceToken(r,c,h)).warn?t("Expected value for style in voice: "+w.warn,r,c):void 0!==w.err?t("Expected value for style in voice: "+w.err,r,c):"normal"===w.token||"harmonic"===w.token||"rhythm"===w.token||"x"===w.token?n.voices[d].style=w.token:t("Expected one of [normal, harmonic, rhythm, x] for voice style",r,c),c+=w.len}}c+=e.eatWhiteSpace(r,c)}if((p.startStaff||0===n.staves.length)&&(n.staves.push({index:n.staves.length,meter:n.origMeter}),n.score_is_present||(n.staves[n.staves.length-1].numVoices=0)),void 0===n.voices[d].staffNum){n.voices[d].staffNum=n.staves.length-1;var A=0;for(var T in n.voices)n.voices.hasOwnProperty(T)&&n.voices[T].staffNum===n.voices[d].staffNum&&A++;n.voices[d].index=A-1}var S=n.staves[n.voices[d].staffNum];n.score_is_present||S.numVoices++,p.clef&&(S.clef={type:p.clef,verticalPos:p.verticalPos}),p.spacing&&(S.spacing_below_offset=p.spacing),p.verticalPos&&(S.verticalPos=p.verticalPos),p.name&&(S.name?S.name.push(p.name):S.name=[p.name]),p.subname&&(S.subname?S.subname.push(p.subname):S.subname=[p.subname]),function(e){n.currentVoice=n.voices[e],o.setCurrentVoice(n.currentVoice.staffNum,n.currentVoice.index)}(d)}else t("Expected a voice id",r,c)}}(),e.exports=s},function(e,t){e.exports=function(e,t,n,r,i){return t+(r-t)/(n-e)*(i-e)}},function(e,t,n){var r,i=n(3);!function(){"use strict";function e(){this.ingroup=!1}e.prototype.beginGroup=function(e,t){this.paper=e,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0},e.prototype.isInGroup=function(){return this.ingroup},e.prototype.addPath=function(e){if(0!==(e=e||[]).length){e[0][0]="m",e[0][1]=i(e[0][1]-this.lastM[0]),e[0][2]=i(e[0][2]-this.lastM[1]),this.lastM[0]+=e[0][1],this.lastM[1]+=e[0][2],this.path.push(e[0]);for(var t=1,n=e.length;t<n;t++)"m"===e[t][0]&&(this.lastM[0]+=e[t][1],this.lastM[1]+=e[t][2]),this.path.push(e[t])}},e.prototype.endGroup=function(e){if(this.ingroup=!1,0===this.path.length)return null;for(var t="",n=0;n<this.path.length;n++)t+=this.path[n].join(" ");var r=this.paper.path({path:t,stroke:"none",fill:"#000000",class:this.controller.classes.generate(e)});return this.path=[],r},r=new e}(),e.exports=r},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=n(15),a=n(36),s={};!function(){"use strict";s.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var e=s.TuneBook=function(e){var t=a(e);this.header=t.header,this.tunes=t.tunes};e.prototype.getTuneById=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].id===""+e)return this.tunes[t];return null},e.prototype.getTuneByTitle=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].title===e)return this.tunes[t];return null},s.parseOnly=function(e,t){for(var n=s.numberOfTunes(e),r=[],i=0;i<n;i++)r.push(1);return s.renderEngine((function(){}),r,e,t)},s.renderEngine=function(t,n,a,s){var o=[];if(void 0!==n&&void 0!==a){var c;(!(c=n)||c.propertyIsEnumerable("length")||"object"!==r(c)||"number"!=typeof c.length)&&(n=[n]),void 0===s&&(s={});for(var l=s.startingTune?parseInt(s.startingTune,10):0,h=new e(a),u=new i,d=0;d<n.length;d++){var f=n[d];if("*"===f||"string"==typeof f&&(f=document.getElementById(f)),f)if(l>=0&&l<h.tunes.length){u.parse(h.tunes[l].abc,s,h.tunes[l].startPos-h.header.length);var p=u.getTune(),m=u.getWarnings();m&&(p.warnings=m);var g=t(f,p,d,h.tunes[l].abc);o.push(g||p)}else f.innerHTML&&(f.innerHTML="");l++}return o}},s.extractMeasures=function(t){for(var n=[],r=new e(t),i=0;i<r.tunes.length;i++){for(var a=r.tunes[i],o=a.abc.split("K:"),c=o[1].split("\n"),l=o[0]+"K:"+c[0]+"\n",h=null,u=null,d=null,f=[],p=!1,m=s.parseOnly(a.abc)[0],g=m.getPickupLength()>0,v=0;v<m.lines.length;v++){var b=m.lines[v];if(b.staff)for(var y=0;y<1;y++)for(var w=b.staff[y],x=0;x<1;x++)for(var k=w.voices[x],A=0;A<k.length;A++){var T=k[A];if(null===d&&T.startChar>=0&&(d=T.startChar,u=void 0===T.chord?h:null),T.chord&&(h=T),"bar"===T.el_type){if(p){var S={abc:a.abc.substring(d,T.endChar)};(h=u&&u.chord&&u.chord.length>0?u.chord[0].name:null)&&(S.lastChord=h),T.startEnding&&(S.startEnding=T.startEnding),T.endEnding&&(S.endEnding=T.endEnding),f.push(S),d=null,p=!1}}else"note"===T.el_type&&(p=!0)}}n.push({header:l,measures:f,hasPickup:g})}return n}}(),e.exports=s},function(e,t,n){var r=n(0),i=n(10),a=n(31),s=n(11),o=n(32),c=n(16),l=n(17),h=n(18),u=n(35);e.exports=function(){"use strict";var e=new h,t=new u(e),n=new o;function d(e,t,n){e.positioning||(e.positioning={}),e.positioning[t]=n}function f(e,t,n){e.fonts||(e.fonts={}),e.fonts[t]=n}this.getTune=function(){var t={formatting:e.formatting,lines:e.lines,media:e.media,metaText:e.metaText,version:e.version,addElementToEvents:e.addElementToEvents,addUsefulCallbackInfo:e.addUsefulCallbackInfo,getBarLength:e.getBarLength,getBeatLength:e.getBeatLength,getBeatsPerMeasure:e.getBeatsPerMeasure,getBpm:e.getBpm,getMeter:e.getMeter,getMeterFraction:e.getMeterFraction,getPickupLength:e.getPickupLength,getKeySignature:e.getKeySignature,getElementFromChar:e.getElementFromChar,makeVoicesArray:e.makeVoicesArray,millisecondsPerMeasure:e.millisecondsPerMeasure,setupEvents:e.setupEvents,setTiming:e.setTiming,setUpAudio:e.setUpAudio};return e.visualTranspose&&(t.visualTranspose=e.visualTranspose),t};var p={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];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.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.inTextBlock=!1,this.inPsBlock=!1,this.ignoredDecorations=[],this.textBlock="",this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||(this[e].face!==t[e].face||(this[e].size!==t[e].size||(this[e].style!==t[e].style||this[e].weight!==t[e].weight)))},addFormattingOptions:function(e,t,n){"note"===n?("auto"!==this.vocalPosition&&d(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&d(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&d(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&d(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&d(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&f(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&f(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&f(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&f(e,"tripletfont",this.tripletfont)):"bar"===n&&("auto"!==this.dynamicPosition&&d(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&d(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&d(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&d(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&f(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&f(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e<this.inTie.length;e++){this.endingHoldOver.inTie.push([]);for(var t=0;t<this.inTie[e].length;t++)this.endingHoldOver.inTie[e].push(this.inTie[e][t])}for(var n in this.inTieChord)this.inTieChord.hasOwnProperty(n)&&(this.endingHoldOver.inTieChord[n]=this.inTieChord[n])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var e=0;e<this.endingHoldOver.inTie.length;e++){this.inTie.push([]);for(var t=0;t<this.endingHoldOver.inTie[e].length;t++)this.inTie[e].push(this.endingHoldOver.inTie[e][t])}for(var n in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(n)&&(this.inTieChord[n]=this.endingHoldOver.inTieChord[n])}}},m=function(e){var t=r.gsub(e,""," ");return t=r.gsub(t,"&","&amp;"),t=r.gsub(t,"<","&lt;"),r.gsub(t,">","&gt;")},g=function(e,n,r){n||(n=" ");var i=n.charAt(r);" "===i&&(i="SPACE");var a,s=m(n.substring(0,r))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+i+"</span>"+m(n.substring(r+1));!function(e){p.warnings||(p.warnings=[]),p.warnings.push(e)}("Music Line:"+t.getNumLines()+":"+(r+1)+": "+e+": "+s),a={message:e,line:n,startChar:p.iChar+r,column:r},p.warningObjects||(p.warningObjects=[]),p.warningObjects.push(a)},v=new a(n,g,p,e,t);this.getWarnings=function(){return p.warnings},this.getWarningObjects=function(){return p.warningObjects};var b=function(e,t){if('"'===e.charAt(t)){var r=n.getBrackettedSubstring(e,t,5);if(r[2]||g("Missing the closing quote while parsing the chord symbol",e,t),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 i=n.getFloat(r[1]);0===i.digits&&g("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(i.digits),","!==r[1][0]&&g("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].substring(1);var a=n.getFloat(r[1]);0===a.digits&&g("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(a.digits);var s=n.skipWhiteSpace(r[1]);r[1]=r[1].substring(s),r[2]=null,r[3]={x:i.value,y:a.value}}else!0!==p.freegchord&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),r[2]="default",r[1]=c.chordName(p,r[1]);return r}return[0,""]},y=["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","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x"],w=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],x=["crescendo(","crescendo)","diminuendo(","diminuendo)"],k=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],A=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],T=function(e,t){var i=p.macros[e.charAt(t)];if(void 0!==i)return"!"!==i.charAt(0)&&"+"!==i.charAt(0)||(i=i.substring(1)),"!"!==i.charAt(i.length-1)&&"+"!==i.charAt(i.length-1)||(i=i.substring(0,i.length-1)),r.detect(y,(function(e){return i===e}))?[1,i]:r.detect(w,(function(e){return i===e}))?("hidden"===p.volumePosition&&(i=""),[1,i]):r.detect(x,(function(e){return"hidden"===p.dynamicPosition&&(i=""),i===e}))?[1,i]:(r.detect(p.ignoredDecorations,(function(e){return i===e}))||g("Unknown macro: "+i,e,t),[1,""]);switch(e.charAt(t)){case".":if("("===e[t+1]||"-"===e[t+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var a=n.getBrackettedSubstring(e,t,5);return a[1].length>1&&("^"===a[1].charAt(0)||"_"===a[1].charAt(0))&&(a[1]=a[1].substring(1)),r.detect(y,(function(e){return a[1]===e}))?a:r.detect(w,(function(e){return a[1]===e}))?("hidden"===p.volumePosition&&(a[1]=""),a):r.detect(x,(function(e){return a[1]===e}))?("hidden"===p.dynamicPosition&&(a[1]=""),a):r.detect(k,(function(e){return a[1]===e[0]&&(a[1]=e[1],!0)}))?a:r.detect(A,(function(e){return a[1]===e[0]&&(a[1]=e[1],!0)}))?("hidden"===p.dynamicPosition&&(a[1]=""),a):"!"!==e.charAt(t)||1!==a[0]&&"!"===e.charAt(t+a[0]-1)?(g("Unknown decoration: "+a[1],e,t),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]},S=function(e,t){for(var r=t;n.isWhiteSpace(e.charAt(t));)t++;return[t-r]},M=function(e,t){var r=n.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return g(r.warn,e,t),[r.len,""];for(var i=0;i<e.length&&" "===e.charAt(t+r.len+i);i++);var a=r.len;if("["===e.charAt(t+r.len+i)&&(r.len+=i+1),'"'===e.charAt(t+r.len)&&"["===e.charAt(t+r.len-1)){var s=n.getBrackettedSubstring(e,t+r.len,5);return[r.len+s[0],r.token,s[1]]}var o=n.getTokenOf(e.substring(t+r.len),"1234567890-,");return 0===o.len||"-"===o.token[0]?[a,r.token]:[r.len+o.len,r.token,o.token]},N={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2},C=function(e,t){var r={},i=t;for("."===e[t]&&"("===e[t+1]&&(r.dottedSlur=!0,t++);"("===e.charAt(t)||n.isWhiteSpace(e.charAt(t));)"("===e.charAt(t)&&(t+1<e.length&&e.charAt(t+1)>="2"&&e.charAt(t+1)<="9"?(void 0!==r.triplet?g("Can't nest triplets",e,t):(r.triplet=e.charAt(t+1)-"0",r.tripletQ=N[r.triplet],r.num_notes=r.triplet,t+2<e.length&&":"===e.charAt(t+2)&&(t+3<e.length&&":"===e.charAt(t+3)?t+4<e.length&&e.charAt(t+4)>="1"&&e.charAt(t+4)<="9"?(r.num_notes=e.charAt(t+4)-"0",t+=3):g("expected number after the two colons after the triplet to mark the duration",e,t):t+3<e.length&&e.charAt(t+3)>="1"&&e.charAt(t+3)<="9"?(r.tripletQ=e.charAt(t+3)-"0",t+4<e.length&&":"===e.charAt(t+4)?t+5<e.length&&e.charAt(t+5)>="1"&&e.charAt(t+5)<="9"&&(r.num_notes=e.charAt(t+5)-"0",t+=4):t+=2):g("expected number after the triplet to mark the duration",e,t))),t++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-i,r},E=function(e,t){switch(e.charAt(t)){case">":return t<e.length-1&&">"===e.charAt(t+1)?[2,1.75,.25]:[1,1.5,.5];case"<":return t<e.length-1&&"<"===e.charAt(t+1)?[2,.25,1.75]:[1,.5,1.5]}return null},I=function(e){return void 0!==e.duration&&e.duration<.25&&(e.end_beam=!0),e},_={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},B={x:"invisible",y:"spacer",z:"rest",Z:"multimeasure"},P=function(r,i,a,s){var o,l=function(e){return"octave"===e||"duration"===e||"Zduration"===e||"broken_rhythm"===e||"end_slur"===e};"."===r[i]&&"-"===r[i+1]&&(o=!0,i++);for(var h="startSlur",u=!1;;){switch(r.charAt(i)){case"(":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;void 0===a.startSlur?a.startSlur=1:a.startSlur++;break;case")":if(!l(h))return null;void 0===a.endSlur?a.endSlur=1:a.endSlur++;break;case"^":if("startSlur"===h)a.accidental="sharp",h="sharp2";else{if("sharp2"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="dblsharp",h="pitch"}break;case"_":if("startSlur"===h)a.accidental="flat",h="flat2";else{if("flat2"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="dblflat",h="pitch"}break;case"=":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="natural",h="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"!==h&&"sharp2"!==h&&"flat2"!==h&&"pitch"!==h)return l(h)?(a.endChar=i,a):null;if(a.pitch=_[r.charAt(i)],c.note(p,a),h="octave",s&&0!==p.next_note_duration?(a.duration=p.default_length*p.next_note_duration,p.next_note_duration=0,u=!0):a.duration=p.default_length,p.clef&&"perc"===p.clef.type||p.currentVoice&&"perc"===p.currentVoice.clef){var d=r.charAt(i);if(a.accidental){d={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^"}[a.accidental]+d}e.formatting&&e.formatting.midi&&e.formatting.midi.drummap&&(a.midipitch=e.formatting.midi.drummap[d])}else p.clef&&p.clef.type.indexOf("-")>=0?a.soundPitch=a.pitch-7:p.clef&&p.clef.type.indexOf("+")>=0&&(a.soundPitch=a.pitch+7);break;case",":if("octave"!==h)return l(h)?(a.endChar=i,a):null;a.pitch-=7,void 0!==a.soundPitch&&(a.soundPitch-=7);break;case"'":if("octave"!==h)return l(h)?(a.endChar=i,a):null;a.pitch+=7,void 0!==a.soundPitch&&(a.soundPitch+=7);break;case"x":case"y":case"z":case"Z":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;a.rest={type:B[r.charAt(i)]},delete a.accidental,delete a.startSlur,delete a.startTie,delete a.endSlur,delete a.endTie,delete a.end_beam,delete a.grace_notes,"multimeasure"===a.rest.type?(a.duration=e.getBarLength(),a.rest.text=1,h="Zduration"):(s&&0!==p.next_note_duration?(a.duration=p.default_length*p.next_note_duration,p.next_note_duration=0,u=!0):a.duration=p.default_length,h="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"===h||"duration"===h){var f=n.getFraction(r,i);for(a.duration=a.duration*f.value,a.endChar=f.index;f.index<r.length&&(n.isWhiteSpace(r.charAt(f.index))||"-"===r.charAt(f.index));)"-"===r.charAt(f.index)?a.startTie={}:a=I(a),f.index++;i=f.index-1,h="broken_rhythm"}else if("sharp2"===h)a.accidental="quartersharp",h="pitch";else{if("flat2"!==h){if("Zduration"===h){var m=n.getNumber(r,i);return a.duration=m.num*e.getBarLength(),a.rest.text=m.num,a.endChar=m.index,a}return null}a.accidental="quarterflat",h="pitch"}break;case"-":if("startSlur"===h)t.addTieToLastNote(o),a.endTie=!0;else{if("octave"!==h&&"duration"!==h&&"end_slur"!==h)return"broken_rhythm"===h?(a.endChar=i,a):null;if(a.startTie={},u||!s)return n.isWhiteSpace(r.charAt(i+1))&&I(a),a.endChar=i+1,a;h="broken_rhythm"}break;case" ":case"\t":if(!l(h))return null;a.end_beam=!0,o=!1;do{"."===r.charAt(i)&&"-"===r.charAt(i+1)&&(o=!0,i++),"-"===r.charAt(i)&&(a.startTie={},o&&(a.startTie.style="dotted")),i++}while(i<r.length&&(n.isWhiteSpace(r.charAt(i))||"-"===r.charAt(i))||"."===r.charAt(i)&&"-"===r.charAt(i+1));if(a.endChar=i,u||!s||"<"!==r.charAt(i)&&">"!==r.charAt(i))return a;i--,h="broken_rhythm";break;case">":case"<":if(!l(h))return null;if(!s)return a.endChar=i,a;var g=E(r,i);i+=g[0]-1,p.next_note_duration=g[2],a.duration=g[1]*a.duration,h="end_slur";break;default:return l(h)?(a.endChar=i,a):null}if(++i===r.length)return l(h)?(a.endChar=i,a):null}return null};function D(){var e={startChar:-1,endChar:-1};p.partForNextLine.title&&(e.part=p.partForNextLine),e.clef=p.currentVoice&&void 0!==p.staves[p.currentVoice.staffNum].clef?r.clone(p.staves[p.currentVoice.staffNum].clef):r.clone(p.clef);var n=p.currentVoice?p.currentVoice.scoreTranspose:0;if(e.key=s.standardKey(p.key.root+p.key.acc+p.key.mode,p.key.root,p.key.acc,n),e.key.mode=p.key.mode,p.key.impliedNaturals&&(e.key.impliedNaturals=p.key.impliedNaturals),p.key.explicitAccidentals)for(var i=0;i<p.key.explicitAccidentals.length;i++){for(var a=!1,o=0;o<e.key.accidentals.length;o++)e.key.accidentals[o].note===p.key.explicitAccidentals[i].note&&(e.key.accidentals[o].acc=p.key.explicitAccidentals[i].acc,a=!0);a||e.key.accidentals.push(p.key.explicitAccidentals[i])}if(p.targetKey=e.key,e.key.explicitAccidentals&&delete e.key.explicitAccidentals,s.addPosToKey(e.clef,e.key),null!==p.meter?(p.currentVoice?(r.each(p.staves,(function(e){e.meter=p.meter})),e.meter=p.staves[p.currentVoice.staffNum].meter,p.staves[p.currentVoice.staffNum].meter=null):e.meter=p.meter,p.meter=null):p.currentVoice&&p.staves[p.currentVoice.staffNum].meter&&(e.meter=p.staves[p.currentVoice.staffNum].meter,p.staves[p.currentVoice.staffNum].meter=null),p.currentVoice&&p.currentVoice.name&&(e.name=p.currentVoice.name),p.vocalfont&&(e.vocalfont=p.vocalfont),p.tripletfont&&(e.tripletfont=p.tripletfont),p.gchordfont&&(e.gchordfont=p.gchordfont),p.style&&(e.style=p.style),p.currentVoice){var c=p.staves[p.currentVoice.staffNum];c.brace&&(e.brace=c.brace),c.bracket&&(e.bracket=c.bracket),c.connectBarLines&&(e.connectBarLines=c.connectBarLines),c.name&&(e.name=c.name[p.currentVoice.index]),c.subname&&(e.subname=c.subname[p.currentVoice.index]),p.currentVoice.stem&&(e.stem=p.currentVoice.stem),p.currentVoice.stafflines&&(e.stafflines=p.currentVoice.stafflines),p.currentVoice.staffscale&&(e.staffscale=p.currentVoice.staffscale),p.currentVoice.scale&&(e.scale=p.currentVoice.scale),p.currentVoice.style&&(e.style=p.currentVoice.style),p.currentVoice.transpose&&(e.clef.transpose=p.currentVoice.transpose)}var l=void 0===p.currentVoice||0===p.currentVoice.staffNum&&0===p.currentVoice.index;0===p.barNumbers&&l&&1!==p.currBarNumber&&(e.barNumber=p.currBarNumber),t.startNewLine(e),p.key.impliedNaturals&&delete p.key.impliedNaturals,p.partForNextLine={},4===p.tempoForNextLine.length&&t.appendElement(p.tempoForNextLine[0],p.tempoForNextLine[1],p.tempoForNextLine[2],p.tempoForNextLine[3]),p.tempoForNextLine=[]}var L=function(e,t){if("{"===e.charAt(t)){var r=n.getBrackettedSubstring(e,t,1,"}");r[2]||g("Missing the closing '}' while parsing grace note",e,t),")"===e[t+r[0]]&&(r[0]++,r[1]+=")");for(var i=[],a=0,s=!1;a<r[1].length;){var o=!1;"/"===r[1].charAt(a)&&(o=!0,a++);var c=P(r[1],a,{},!1);null!==c?(c.duration=c.duration/(8*p.default_length),o&&(c.acciaccatura=!0),i.push(c),s&&(c.endTie=!0,s=!1),c.startTie&&(s=!0),a=c.endChar,delete c.endChar):(" "===r[1].charAt(a)?i.length>0&&(i[i.length-1].end_beam=!0):g("Unknown character '"+r[1].charAt(a)+"' while parsing grace note",e,t),a++)}if(i.length)return[r[0],i]}return[0]};function O(e,t){if("&"===e.charAt(t)){for(var n=t;e.charAt(t)&&":"!==e.charAt(t)&&"|"!==e.charAt(t);)t++;return[t-n,e.substring(n+1,t)]}return[0]}function H(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var V=function(e,t,n){if(void 0===e.inTie[t])return!1;var r=e.currentVoice?e.currentVoice.index:0;return!(!e.inTie[t][r]||void 0===n.pitches&&"spacer"===n.rest.type)},F=function(e,t,n){var r=e.currentVoice?e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][r]=n},z=function i(a){var s=v.parseHeader(a);s.regular&&function(i){v.resolveTempo(),p.is_in_header=!1;for(var a=0,s=p.iChar;n.isWhiteSpace(i.charAt(a))&&a<i.length;)a++;if(a!==i.length&&"%"!==i.charAt(a)){var o=p.start_new_line;void 0===p.continueall?p.start_new_line=!0:p.start_new_line=!1;var c=0,l=v.letter_to_body_header(i,a);l[0]>0&&(a+=l[0],"V"===l[1]&&(o=!0));for(var h={},u=0;a<i.length;){var d=a;if("%"===i.charAt(a))break;var f=v.letter_to_inline_header(i,a);if(f[0]>0)a+=f[0],"V"===f[1]&&(o=!0);else{var m;for(o&&(D(),o=!1);;)if((m=n.eatWhiteSpace(i,a))>0&&(a+=m),a>0&&""===i.charAt(a-1)&&(m=v.letter_to_body_header(i,a))[0]>0&&("V"===m[1]&&D(),a=m[0],p.start_new_line=!1),(m=S(i,a))[0]>0&&(a+=m[0]),(m=b(i,a))[0]>0){h.chord||(h.chord=[]);var y=n.translateString(m[1]);y=y.replace(/;/g,"\n");for(var w=!1,x=0;x<h.chord.length;x++)h.chord[x].position===m[2]&&(w=!0,h.chord[x].name+="\n"+y);!1===w&&(null===m[2]&&m[3]?h.chord.push({name:y,rel_position:m[3]}):h.chord.push({name:y,position:m[2]})),a+=m[0];var k=n.skipWhiteSpace(i.substring(a));k>0&&(h.force_end_beam_last=!0),a+=k}else if((m=-1==="ABCDEFGabcdefgxyzZ[]|^_{".indexOf(i.charAt(a))?T(i,a):[0])[0]>0)null===m[1]?a+1<i.length&&D():m[1].length>0&&(0===m[1].indexOf("style=")?h.style=m[1].substr(6):(void 0===h.decoration&&(h.decoration=[]),"beambr1"===m[1]?h.beambr=1:"beambr2"===m[1]?h.beambr=2:h.decoration.push(m[1]))),a+=m[0];else{if(!((m=L(i,a))[0]>0))break;h.gracenotes=m[1],a+=m[0]}if((m=M(i,a))[0]>0){u=0,void 0!==h.gracenotes&&(h.rest={type:"spacer"},h.duration=.125,p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+a,s+a+m[0],h),p.measureNotEmpty=!0,h={});var A={type:m[1]};if(0===A.type.length)g("Unknown bar type",i,a);else{if(p.inEnding&&"bar_thin"!==A.type&&(A.endEnding=!0,p.inEnding=!1),m[2]&&(A.startEnding=m[2],p.inEnding&&(A.endEnding=!0),p.inEnding=!0,"bar_right_repeat"===m[1]?p.restoreStartEndingHoldOvers():p.duplicateStartEndingHoldOvers()),void 0!==h.decoration&&(A.decoration=h.decoration),void 0!==h.chord&&(A.chord=h.chord),A.startEnding&&void 0===p.barFirstEndingNum?p.barFirstEndingNum=p.currBarNumber:A.startEnding&&A.endEnding&&p.barFirstEndingNum?p.currBarNumber=p.barFirstEndingNum:A.endEnding&&(p.barFirstEndingNum=void 0),"bar_invisible"!==A.type&&p.measureNotEmpty)(void 0===p.currentVoice||0===p.currentVoice.staffNum&&0===p.currentVoice.index)&&(p.currBarNumber++,p.barNumbers&&p.currBarNumber%p.barNumbers==0&&(A.barNumber=p.currBarNumber));p.addFormattingOptions(h,e.formatting,"bar"),t.appendElement("bar",s+a,s+a+m[0],A),p.measureNotEmpty=!1,h={}}a+=m[0]}else if("&"===i[a])(m=O(i,a))[0]>0&&(t.appendElement("overlay",s,s+1,{}),a+=1,u++);else{if((m=C(i,a)).consumed>0&&(void 0!==m.startSlur&&(h.startSlur=m.startSlur),m.dottedSlur&&(h.dottedSlur=!0),void 0!==m.triplet&&(c>0?g("Can't nest triplets",i,a):(h.startTriplet=m.triplet,h.tripletMultiplier=m.tripletQ/m.triplet,c=void 0===m.num_notes?m.triplet:m.num_notes)),a+=m.consumed),"["===i.charAt(a)){var N=a;a++;for(var _=null,B=!1,z=!1;!z;){var j=T(i,a);j[0]>0&&(a+=j[0]);var q=P(i,a,{},!1);if(null!==q&&void 0!==q.pitch)j[0]>0&&0!==j[1].indexOf("style=")&&(void 0===h.decoration&&(h.decoration=[]),h.decoration.push(j[1])),q.end_beam&&(h.end_beam=!0,delete q.end_beam),void 0===h.pitches?(h.duration=q.duration,h.pitches=[q]):h.pitches.push(q),delete q.duration,j[0]>0&&0===j[1].indexOf("style=")&&(h.pitches[h.pitches.length-1].style=j[1].substr(6)),p.inTieChord[h.pitches.length]&&(q.endTie=!0,p.inTieChord[h.pitches.length]=void 0),q.startTie&&(p.inTieChord[h.pitches.length]=!0),a=q.endChar,delete q.endChar;else if(" "===i.charAt(a))g("Spaces are not allowed in chords",i,a),a++;else{if(a<i.length&&"]"===i.charAt(a)){a++,0!==p.next_note_duration&&(h.duration=h.duration*p.next_note_duration,p.next_note_duration=0),V(p,u,h)&&(r.each(h.pitches,(function(e){e.endTie=!0})),F(p,u,!1)),c>0&&(!h.rest||"spacer"!==h.rest.type)&&0===--c&&(h.endTriplet=!0);for(var Y=!1;a<i.length&&!Y;){switch(i.charAt(a)){case" ":case"\t":I(h);break;case")":void 0===h.endSlur?h.endSlur=1:h.endSlur++;break;case"-":r.each(h.pitches,(function(e){e.startTie={}})),F(p,u,!0);break;case">":case"<":var W=E(i,a);a+=W[0]-1,p.next_note_duration=W[2],_?_*=W[1]:_=W[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var R=n.getFraction(i,a);_=R.value,a=R.index," "===i.charAt(a)&&(B=!0),"-"===i.charAt(a)||")"===i.charAt(a)||" "===i.charAt(a)||"<"===i.charAt(a)||">"===i.charAt(a)?a--:Y=!0;break;default:Y=!0}Y||a++}}else g("Expected ']' to end the chords",i,a);void 0!==h.pitches&&(null!==_&&(h.duration=h.duration*_,B&&I(h)),p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+N,s+a,h),p.measureNotEmpty=!0,h={}),z=!0}}}else{var G={},U=P(i,a,G,!0);void 0!==G.endTie&&F(p,u,!0),null!==U&&(void 0!==U.pitch?(h.pitches=[{}],void 0!==U.accidental&&(h.pitches[0].accidental=U.accidental),h.pitches[0].pitch=U.pitch,(U.soundPitch||0===U.soundPitch)&&(h.pitches[0].soundPitch=U.soundPitch),(U.midipitch||0===U.midipitch)&&(h.pitches[0].midipitch=U.midipitch),void 0!==U.endSlur&&(h.pitches[0].endSlur=U.endSlur),void 0!==U.endTie&&(h.pitches[0].endTie=U.endTie),void 0!==U.startSlur&&(h.pitches[0].startSlur=U.startSlur),void 0!==h.startSlur&&(h.pitches[0].startSlur=h.startSlur),void 0!==h.dottedSlur&&(h.pitches[0].dottedSlur=!0),void 0!==U.startTie&&(h.pitches[0].startTie=U.startTie),void 0!==h.startTie&&(h.pitches[0].startTie=h.startTie)):(h.rest=U.rest,void 0!==U.endSlur&&(h.endSlur=U.endSlur),void 0!==U.endTie&&(h.rest.endTie=U.endTie),void 0!==U.startSlur&&(h.startSlur=U.startSlur),void 0!==U.startTie&&(h.rest.startTie=U.startTie),void 0!==h.startTie&&(h.rest.startTie=h.startTie)),void 0!==U.chord&&(h.chord=U.chord),void 0!==U.duration&&(h.duration=U.duration),void 0!==U.decoration&&(h.decoration=U.decoration),void 0!==U.graceNotes&&(h.graceNotes=U.graceNotes),delete h.startSlur,delete h.dottedSlur,V(p,u,h)&&(void 0!==h.pitches?h.pitches[0].endTie=!0:"spacer"!==h.rest.type&&(h.rest.endTie=!0),F(p,u,!1)),(U.startTie||h.startTie)&&F(p,u,!0),a=U.endChar,c>0&&(!U.rest||"spacer"!==U.rest.type)&&0===--c&&(h.endTriplet=!0),U.end_beam&&I(h),h.rest&&"rest"===h.rest.type&&1===h.duration&&H(p)<=1&&(h.rest.type="whole",h.duration=H(p)),p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+d,s+a,h),p.measureNotEmpty=!0,h={})}a===d&&(" "!==i.charAt(a)&&"`"!==i.charAt(a)&&g("Unknown character ignored",i,a),a++)}}}}}(s.str),s.newline&&D(),s.words&&function(e,t){if(e){"-"!==(t=r.strip(t)).charAt(t.length-1)&&(t+=" ");for(var i=[],a=0,s=!1,o=function(e){var o=r.strip(t.substring(a,e));if(a=e+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=t.charAt(e);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:n.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<t.length;c++)switch(t.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&i.length>0&&(r.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":o(c),i.push({skip:!0,to:"slur"});break;case"*":o(c),i.push({skip:!0,to:"next"});break;case"|":o(c),i.push({skip:!0,to:"bar"});break;case"~":s=!0}r.each(e,(function(e){if(0!==i.length)if(i[0].skip){switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else g("Can't add words before the first line of music",e,0)}(t.getCurrentVoice(),a.substring(2)),s.symbols&&function(e,t){if(e){"-"!==(t=r.strip(t)).charAt(t.length-1)&&(t+=" ");for(var i=[],a=0,s=!1,o=function(e){var o=r.strip(t.substring(a,e));if(a=e+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=t.charAt(e);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:n.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<t.length;c++)switch(t.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&i.length>0&&(r.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":o(c),i.push({skip:!0,to:"slur"});break;case"*":o(c),i.push({skip:!0,to:"next"});break;case"|":o(c),i.push({skip:!0,to:"bar"});break;case"~":s=!0}r.each(e,(function(e){if(0!==i.length)if(i[0].skip)switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else g("Can't add symbols before the first line of music",e,0)}(t.getCurrentVoice(),a.substring(2)),s.recurse&&i(s.str)};function j(e,t){e.push({el_type:"hint"});for(var n=0;n<t.length;n++){var i=t[n],a=r.clone(i);if(e.push(a),"bar"===i.el_type)return}}function q(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(i)for(var a=0;a<i.voices.length;a++){var s=i.voices[a],o=r.voices[a];o&&j(o,s)}}}this.parse=function(a,s,o){if(s||(s={}),o||(o=0),t.reset(),s.print&&(e.media="print"),p.reset(),p.iChar=o,s.visualTranspose?(p.globalTranspose=parseInt(s.visualTranspose),0===p.globalTranspose?p.globalTranspose=void 0:t.setVisualTranspose(s.visualTranspose)):p.globalTranspose=void 0,s.lineBreaks){p.lineBreaks={};for(var c=0;c<s.lineBreaks.length;c++)p.lineBreaks[""+(s.lineBreaks[c]+1)]=!0}v.reset(n,g,p,e),a=r.gsub(a,"\r\n","\n"),a=r.gsub(a,"\r","\n");var h=(a+="\n").split("\n\\");if(h.length>1){for(var u=1;u<h.length;u++)for(;h[u].length>0&&"\n"!==h[u][0];)h[u]=h[u].substr(1),h[u-1]+=" ";a=h.join(" ")}var d=(a=a.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,n){return t+" "+(n?" ".substring(0,n.length):"")}))).split("\n");0===r.last(d).length&&d.pop();try{s.format&&i.globalFormatting(s.format),r.each(d,(function(e){if(s.header_only&&!1===p.is_in_header)throw"normal_abort";if(s.stop_on_warning&&p.warnings)throw"normal_abort";if(p.is_in_history)":"===e.charAt(1)?(p.is_in_history=!1,z(e)):t.addMetaText("history",n.translateString(n.stripComment(e)));else if(p.inTextBlock)r.startsWith(e,"%%endtext")?(t.addText(p.textBlock),p.inTextBlock=!1):r.startsWith(e,"%%")?p.textBlock+=e.substring(2)+"\n":p.textBlock+=e+"\n";else if(p.inPsBlock)r.startsWith(e,"%%endps")?p.inPsBlock=!1:p.textBlock+=" "+e;else{var i=p.is_in_header;z(e),i&&!p.is_in_header&&(t.setRunningFont("annotationfont",p.annotationfont),t.setRunningFont("gchordfont",p.gchordfont),t.setRunningFont("tripletfont",p.tripletfont),t.setRunningFont("vocalfont",p.vocalfont))}p.iChar+=e.length+1}));var f=792,m=612;switch(p.papersize){case"legal":f=1008,m=612;break;case"A4":f=842.4,m=597.6}if(p.landscape){var b=f;f=m,m=b}p.openSlurs=t.cleanUp(m,f,p.barsperstaff,p.staffnonote,p.openSlurs)}catch(e){if("normal_abort"!==e)throw e}s.hint_measures&&function(){for(var t=0;t<e.lines.length;t++){var n=e.lines[t].staff;if(n){for(var r=t+1;r<e.lines.length&&void 0===e.lines[r].staff;)r++;if(r<e.lines.length)q(n,e.lines[r].staff)}}}(),l.wrapLines(e,p.lineBreaks)}}},function(e,t){var n={},r={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},i=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],a=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];n.keySignature=function(e,t,n,s,o,c){if("perc"===e.clef.type)return{accidentals:t[n],root:s,acc:o};c||(c=0),e.localTransposeVerticalMovement=0,e.localTransposePreferFlats=!1;var l=t[n];if(!l)return e.key;if(e.localTranspose=(e.globalTranspose?e.globalTranspose:0)+c,!e.localTranspose)return{accidentals:l,root:s,acc:o};if(e.globalTransposeOrigKeySig=l,e.localTranspose%12==0)return e.localTransposeVerticalMovement=e.localTranspose/12*7,{accidentals:l,root:s,acc:o};var h=n[0];"b"===n[1]||"#"===n[1]?(h+=n[1],n=n.substr(2)):n=n.substr(1);for(var u=r[h]+e.localTranspose;u<0;)u+=12;u>11&&(u%=12);var d="m"===n[0]?a[u]:i[u],f=d+n,p=t[f];p.length>0&&"flat"===p[0].acc&&(e.localTransposePreferFlats=!0);var m=f.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?m<0?m+=7:0===m&&("#"!==h[1]&&"b"!==f[1]||(m+=7)):e.localTranspose<0&&(m>0?m-=7:0===m&&("b"!==h[1]&&"#"!==f[1]||(m-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=m+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=m+7*Math.ceil(e.localTranspose/12),{accidentals:p,root:d[0],acc:d.length>1?d[1]:""}};var s=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],o=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],c=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],l=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];n.chordName=function(e,t){if(e.localTranspose&&e.localTranspose%12!=0){for(var n=e.localTranspose;n<0;)n+=12;n>11&&(n%=12);for(var r=(t=(t=(t=(t=(t=(t=(t=(t=e.freegchord?(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/Cb/g,"`~11`")).replace(/Db/g,"`~1`")).replace(/Eb/g,"`~3`")).replace(/Fb/g,"`~4`")).replace(/Gb/g,"`~6`")).replace(/Ab/g,"`~8`")).replace(/Bb/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`"):(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.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("`"),i=0;i<r.length;i++)if("~"===r[i][0]){var a=parseInt(r[i].substr(1),10);(a+=n)>11&&(a-=12),e.freegchord?r[i]=e.localTransposePreferFlats?l[a]:c[a]:r[i]=e.localTransposePreferFlats?o[a]:s[a]}t=r.join("")}return t};var h=["c","d","e","f","g","a","b"];var u={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},d={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"};n.note=function(e,t){if(e.localTranspose&&"perc"!==e.clef.type){var n=t.pitch;if(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.accidental){var r=function(e,t,n,r,i){for(var a=h[(e+49)%7],s=0,o=0;o<r.length;o++)r[o].note.toLowerCase()===a&&(s=u[r[o].acc]);for(var c=u[n]-s,l=h[(t+49)%7],d=0,f=0;f<i.accidentals.length;f++)i.accidentals[f].note.toLowerCase()===l&&(d=u[i.accidentals[f].acc]);var p=c+d;return p<-2&&(t--,p+="c"===l||"f"===l?1:2),p>2&&(t++,p-="b"===l||"e"===l?1:2),[t,p]}(n,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=r[0],t.accidental=d[r[1]]}}},e.exports=n},function(e,t){function n(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function r(e,t,r,i,a,s,o,c,l,h,u){for(var d=h;d<e.length;d++){var f=e[d];r+=f,i+=f;var p=Math.abs(r-t[c]);if(Math.abs(p-s)<t[0]/10)if(p<s){var m=n(a),g=n(l);g.push(d-1),m.push(i-f),u.push({accumulator:r,lineAccumulator:f,lineWidths:m,lastVariance:Math.abs(r-t[c+1]),highestVariance:Math.max(o,s),currLine:c+1,lineBreaks:g,startIndex:d+1})}else p>s&&d<e.length-1&&(m=n(a),g=n(l),u.push({accumulator:r,lineAccumulator:i,lineWidths:m,lastVariance:p,highestVariance:Math.max(o,p),currLine:c,lineBreaks:g,startIndex:d+1}));p>s?(l.push(d-1),c++,o=Math.max(o,s),s=Math.abs(r-t[c]),a.push(i-f),i=f):s=p}a.push(i)}function i(e,t,n,r,i){var a=new i,s={lineBreaks:e,staffwidth:t};for(var o in r)r.hasOwnProperty(o)&&"wrap"!==o&&"staffwidth"!==o&&(s[o]=r[o]);return a.parse(n,s),{tune:a.getTune(),revisedParams:s}}e.exports={wrapLines:function(e,t){if(t&&0!==e.lines.length){for(var n=[],r=[],i=[],a=[],s=[],o="",c={},l=0,h=0;h<e.lines.length;h++){var u=e.lines[h];if(u.staff){for(var d=u.staff,f=0;f<d.length;f++){void 0===r[f]&&(r[f]=[],i[f]=[],a[f]=[],s[f]=[]);for(var p=d[f],m=p.voices,g=0;g<m.length;g++){void 0===r[f][g]&&(r[f][g]=!0,i[f][g]=0,a[f][g]=0,s[f][g]=0),l>0&&(i[f][g]+=l);for(var v=m[g],b=0;b<v.length;b++){if(r[f][g]){if(n[i[f][g]]||(n[i[f][g]]={staff:[]}),!n[i[f][g]].staff[f])for(var y in n[i[f][g]].staff[f]={voices:[]},p)p.hasOwnProperty(y)&&("meter"===y?0!==i[f][g]&&o===JSON.stringify(p[y])||(o=JSON.stringify(p[y]),n[i[f][g]].staff[f][y]=p[y]):"voices"!==y&&(n[i[f][g]].staff[f][y]=p[y]));s[f][g]&&(n[i[f][g]].staff[f].barNumber=s[f][g]),r[f][g]=!1}var w=v[b];if(!n[i[f][g]].staff[f].voices[g])for(var x in n[i[f][g]].staff[f].voices[g]=[],c)c.hasOwnProperty(x)&&n[i[f][g]].staff[f].voices[g].push(c[x]);n[i[f][g]].staff[f].voices[g].push(w),"stem"===w.el_type&&(c[w.el_type]=w),"bar"===w.el_type&&(a[f][g]++,t[a[f][g]]&&(r[f][g]=!0,i[f][g]++,s[f][g]=w.barNumber,delete w.barNumber))}}}l=0}else n.push(u),l++}e.lines=n}},calcLineWraps:function(e,t,n,a,s,o){if(a.staffwidth<t.left)return{explanation:"Staffwidth is narrower than the margin",tune:e,revisedParams:a};var c=a.scale?Math.max(a.scale,.1):1,l=a.wrap.minSpacing?Math.max(parseFloat(a.wrap.minSpacing),1):1,h=a.wrap.minSpacingLimit?Math.max(parseFloat(a.wrap.minSpacingLimit),1):l-.1,u=a.wrap.maxSpacing?Math.max(parseFloat(a.wrap.maxSpacing),1):void 0;a.wrap.lastLineLimit&&!u&&(u=Math.max(parseFloat(a.wrap.lastLineLimit),1));var d=a.wrap.preferredMeasuresPerLine?Math.max(parseInt(a.wrap.preferredMeasuresPerLine,10),1):void 0,f=(a.staffwidth-t.left)/l/c,p=(a.staffwidth-t.left)/u/c,m=(a.staffwidth-t.left)/h/c,g={widths:t,lineBreakPoint:f,minLineSize:p,attempts:[],staffWidth:a.staffwidth,minWidth:Math.round(m)},v=null;if(d){var b=function(e,t,n){for(var r=[],i=[],a=0,s=!1,o=0;o<e.length;o++)(a+=e[o])>t&&(s=!0),o%n==n-1&&(o!==e.length-1&&r.push(o),i.push(Math.round(a)),a=0);return{failed:s,totals:i,lineBreaks:r}}(t.measureWidths,f,d);g.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:d,lineBreaks:b.lineBreaks,failed:b.failed,totals:b.totals}),b.failed||(v=b.lineBreaks)}if(!v){var y=function(e,t){for(var n=[],r=[],i=0,a=0;a<e.length;a++){var s=e[a],o=i+s;if(o<t)i=o;else t-i<o-t&&i>0?(n.push(a-1),r.push(Math.round(i-s)),i=s):a<e.length-1&&(n.push(a),r.push(Math.round(i)),i=0)}return r.push(Math.round(i)),{lineBreaks:n,totals:r}}(t.measureWidths,f);g.attempts.push({type:"Free Form",lineBreaks:y.lineBreaks,totals:y.totals}),v=y.lineBreaks,y=function(e,t,n,i){for(var a=Math.ceil(e.total/t)+1,s=Math.floor(e.total/a),o=[],c=0;c<a;c++)o.push(s*(c+1));var l=[];l.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var h=0;h<l.length;)r(e.measureWidths,o,l[h].accumulator,l[h].lineAccumulator,l[h].lineWidths,l[h].lastVariance,l[h].highestVariance,l[h].currLine,l[h].lineBreaks,l[h].startIndex,l),h++;for(c=0;c<l.length;c++){var u=l[c];u.variances=[],u.aveVariance=0;for(var d=0;d<u.lineWidths.length;d++){var f=u.lineWidths[d];u.variances.push(f-o[0]),u.aveVariance+=Math.abs(f-o[0])}u.aveVariance=u.aveVariance/u.lineWidths.length,i.attempts.push({type:"optimizeLineWidths",lineBreaks:u.lineBreaks,variances:u.variances,aveVariance:u.aveVariance,widths:e.measureWidths})}var p=9999999,m=-1;for(c=0;c<l.length;c++)(u=l[c]).aveVariance<p&&(p=u.aveVariance,m=c);return{failed:!1,lineBreaks:l[m].lineBreaks,variance:l[m].highestVariance}}(t,f,0,g),g.attempts.push({type:"Optimize",failed:y.failed,reason:y.reason,lineBreaks:y.lineBreaks,totals:y.totals}),y.failed||(v=y.lineBreaks)}var w=a.staffwidth,x=i(v,w,n,a,s),k=o.getMeasureWidths(x.tune),A=!0;return g.attempts.push({type:"heightCheck",height:k.height}),0===v.length&&p>t.total&&(w=t.total*u*c+t.left,g.attempts.push({type:"too sparse",newWidth:Math.round(w)}),A=!1),A||(x=i(v,w,n,a,s)),x.explanation=g,x}}},function(e,t,n){var r=n(0),i=n(1),a=n(33),s=n(34);e.exports=function(){function e(e,t){for(;t<e.length&&null===e[t].left;)t++;return e[t]}this.getBeatLength=function(){var e=this.getMeterFraction(),t=1;return(6===e.num||9===e.num||12===e.num||3===e.num&&8===e.den)&&(t=3),t/e.den},this.getPickupLength=function(){var e=this.getBarLength(),t=function(e,t){for(var n=0,r=0;r<e.length;r++)if(e[r].staff)for(var i=0;i<e[r].staff.length;i++)for(var a=0;a<e[r].staff[i].voices.length;a++)for(var s=e[r].staff[i].voices[a],o=1,c=0;c<s.length;c++){var l=s[c].rest&&"spacer"===s[c].rest.type;if(s[c].startTriplet&&(o=s[c].tripletMultiplier),s[c].duration&&!l&&"tempo"!==s[c].el_type&&(n+=s[c].duration*o),s[c].endTriplet&&(o=1),n>=t&&(n-=t),"bar"===s[c].el_type)return n}return n}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var n=this.metaText?this.metaText.tempo:null;t=this.getBpm(n)}return t<=0&&(t=1),6e4*(this.getBeatsPerMeasure()/t)},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++){var r=t.staff[n].meter;if(r)return r}}return{type:"common_time"}},this.getMeterFraction=function(){var e=this.getMeter(),t=4,n=4;return e&&("specified"===e.type?(t=parseInt(e.value[0].num,10),n=parseInt(e.value[0].den,10)):"cut_time"===e.type?(t=2,n=2):"common_time"===e.type&&(t=4,n=4)),this.meter={num:t,den:n},this.meter},this.getKeySignature=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++)if(t.staff[n].key)return t.staff[n].key}return{}},this.getElementFromChar=function(e){for(var t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.staff)for(var r=0;r<n.staff.length;r++)for(var i=n.staff[r],a=0;a<i.voices.length;a++)for(var s=i.voices[a],o=0;o<s.length;o++){var c=s[o];if(c.startChar&&c.endChar&&c.startChar<=e&&c.endChar>e)return c}}return null},this.addElementToEvents=function(e,t,n,i,a,s,o,c,l,h){if(t.hint)return{isTiedState:void 0,duration:0};var u=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&"spacer"===t.abcelem.rest.type&&(u=0),u>0){for(var d=[],f=0;f<t.elemset.length;f++)null!==t.elemset[f]&&d.push(t.elemset[f]);var p=t.startTie;if(void 0!==l)e["event"+l].elements.push(d),h&&(e["event"+n]||(e["event"+n]={type:"event",milliseconds:n,line:s,measureNumber:o,top:i,height:a,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),e["event"+n].measureStart=!0,h=!1),p||(l=void 0);else{if(e["event"+n]){if(e["event"+n].left?e["event"+n].left=Math.min(e["event"+n].left,t.x):e["event"+n].left=t.x,e["event"+n].elements.push(d),e["event"+n].startCharArray.push(t.abcelem.startChar),e["event"+n].endCharArray.push(t.abcelem.endChar),null===e["event"+n].startChar&&(e["event"+n].startChar=t.abcelem.startChar),null===e["event"+n].endChar&&(e["event"+n].endChar=t.abcelem.endChar),t.abcelem.midiPitches&&t.abcelem.midiPitches.length){e["event"+n].midiPitches||(e["event"+n].midiPitches=[]);for(f=0;f<t.abcelem.midiPitches.length;f++)e["event"+n].midiPitches.push(t.abcelem.midiPitches[f])}if(t.abcelem.midiGraceNotePitches&&t.abcelem.midiGraceNotePitches.length){e["event"+n].midiGraceNotePitches||(e["event"+n].midiGraceNotePitches=[]);for(var m=0;m<t.abcelem.midiGraceNotePitches.length;m++)e["event"+n].midiGraceNotePitches.push(t.abcelem.midiGraceNotePitches[m])}}else e["event"+n]={type:"event",milliseconds:n,line:s,measureNumber:o,top:i,height:a,left:t.x,width:t.w,elements:[d],startChar:t.abcelem.startChar,endChar:t.abcelem.endChar,startCharArray:[t.abcelem.startChar],endCharArray:[t.abcelem.endChar],midiPitches:t.abcelem.midiPitches?r.cloneArray(t.abcelem.midiPitches):[]},t.abcelem.midiGraceNotePitches&&(e["event"+n].midiGraceNotePitches=r.cloneArray(t.abcelem.midiGraceNotePitches));h&&(e["event"+n].measureStart=!0,h=!1),p&&(l=n)}}return{isTiedState:l,duration:u/c,nextIsBar:h||"bar"===t.type}},this.makeVoicesArray=function(){for(var e=[],t=[],n={},r=0;r<this.engraver.staffgroups.length;r++)for(var a=this.engraver.staffgroups[r],s=a.staffs[0],o=s.absoluteY,c=o-s.top*i.STEP,l=a.staffs[a.staffs.length-1],h=(o=l.absoluteY)-l.bottom*i.STEP-c,u=a.voices,d=0;d<u.length;d++){var f=!1;e[d]||(e[d]=[]),void 0===t[d]&&(t[d]=0);for(var p=u[d].children,m=0;m<p.length;m++)"tempo"===p[m].type&&(n[t[d]]=this.getBpm(p[m].abcelem)),e[d].push({top:c,height:h,line:a.line,measureNumber:t[d],elem:p[m]}),"bar"===p[m].type&&f&&t[d]++,"note"!==p[m].type&&"rest"!==p[m].type||(f=!0)}return this.tempoLocations=n,e},this.setupEvents=function(t,n,r){for(var i,a=[],s={},o=t,c=!0,l=this.makeVoicesArray(),h=0;h<l.length;h++){var u=o,d=Math.round(1e3*u),f=0,p=-1,m=l[h],g=r;n=this.getBeatLength()*g/60;for(var v=-1,b=0;b<m.length;b++){var y=m[b].measureNumber;v!==y&&this.tempoLocations[y]&&(g=this.tempoLocations[y],n=this.getBeatLength()*g/60,v=y);var w,x=m[b].elem,k=this.addElementToEvents(s,x,d,m[b].top,m[b].height,m[b].line,m[b].measureNumber,n,i,c);if(i=k.isTiedState,c=k.nextIsBar,u+=k.duration,x.duration>0&&(w="event"+d),d=Math.round(1e3*u),"bar"===x.type){var A=x.abcelem.type,T="bar_right_repeat"===A||"bar_dbl_repeat"===A,S="1"===x.abcelem.startEnding,M="bar_left_repeat"===A||"bar_dbl_repeat"===A||"bar_right_repeat"===A;if(T){b>0&&(s[w].endX=x.x),-1===p&&(p=b);var N=0;v=-1;for(var C=f;C<p;C++){v!==(y=m[C].measureNumber)&&this.tempoLocations[y]&&(g=this.tempoLocations[y],n=this.getBeatLength()*g/60,v=y);var E=m[C].elem;i=(k=this.addElementToEvents(s,E,d,m[C].top,m[C].height,m[C].line,m[C].measureNumber,n,i,c)).isTiedState,c=k.nextIsBar,u+=k.duration,N=d,d=Math.round(1e3*u)}s["event"+N]&&(s["event"+N].endX=m[p].elem.x),c=!0,p=-1}S&&(p=b),M&&(f=b)}}}return function(e){for(var t,n,r,i,a=e.length-1;a>=0;a--){var s=e[a];"bar"===s.type?(s.top=r,s.nextTop=t,t=r,s.bottom=i,s.nextBottom=n,n=i):"event"===s.type&&(r=s.top,i=s.top+s.height)}}(a=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t=t.sort((function(e,t){var n=e.milliseconds-t.milliseconds;return 0!==n?n:"bar"===e.type?-1:1}))}(s)),function(t,n){if(n.length<1)return;for(var r=0;r<n.length-1;r++){var i=n[r],a=e(n,r+1);if(null!==i.left){var s=a&&i.top===a.top?a.left:t[i.line].staffGroup.w;void 0!==i.endX?s>i.left&&(i.endX=Math.min(i.endX,s)):i.endX=s}}var o=n[n.length-1];o.endX=t[o.line].staffGroup.w}(this.lines,a),a.push({type:"end",milliseconds:d}),this.addUsefulCallbackInfo(a,g),a},this.addUsefulCallbackInfo=function(e,t){for(var n=this.millisecondsPerMeasure(t),r=0;r<e.length;r++){e[r].millisecondsPerMeasure=n}},this.getBpm=function(e){var t;if(e){t=e.bpm;var n=this.getBeatLength();t=t*(e.duration&&e.duration.length>0?e.duration[0]:n)/n}if(!t){t=180;var r=this.getMeterFraction();r&&3!==r.num&&r.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),void(this.noteTimings=[]);if(!e){var n=this.metaText?this.metaText.tempo:null;e=this.getBpm(n)}var r=this.getBeatLength(),i=e/60,a=this.getBarLength()/r*t/i;a&&(a-=this.getPickupLength()/r/i);var s=r*i;return this.noteTimings=this.setupEvents(a,s,e),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=a(this,e);return s(t,e)}}},function(e,t){var n=function(e){this.type="TieElem",this.anchor1=e.anchor1,this.anchor2=e.anchor2,e.isGrace&&(this.isGrace=!0),e.fixedY&&(this.fixedY=!0),e.stemDir&&(this.stemDir=e.stemDir),void 0!==e.voiceNumber&&(this.voiceNumber=e.voiceNumber),void 0!==e.style&&(this.dotted=!0),this.internalNotes=[]};n.prototype.addInternalNote=function(e){this.internalNotes.push(e)},n.prototype.setEndAnchor=function(e){this.anchor2=e},n.prototype.setStartX=function(e){this.startLimitX=e},n.prototype.setEndX=function(e){this.endLimitX=e},n.prototype.setHint=function(){this.hint=!0},n.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},n.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;t<this.internalNotes.length;t++){"down"===this.internalNotes[t].stemDir&&(e=!0)}this.above=e}},n.prototype.calcX=function(e,t){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.startX=e,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=t},n.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0},n.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&"up"===this.anchor1.stemDir&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var e=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,t=(this.anchor2.highestVert+this.anchor2.pitch)/2;this.above&&"up"===this.anchor2.stemDir&&!this.fixedY&&!e&&t<this.startY?(this.endY=t,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&e?this.anchor2.highestVert:this.anchor2.pitch}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},n.prototype.avoidCollisionAbove=function(){if(this.above){for(var e=-50,t=0;t<this.internalNotes.length;t++)this.internalNotes[t].highestVert>e&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},e.exports=n},function(e,t){e.exports=function(e){for(var t=0,n=0;n<e.voices.length;n++){var r=e.voices[n].staff;e.voices[n].duplicate||(t+=r.top,r.bottom<0&&(t+=-r.bottom))}return t}},function(e,t,n){var r=n(8);e.exports=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#ff0000"),r(this.elemset,e,"",t)}},function(e,t,n){var r=n(8);e.exports=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#000000"),r(this.elemset,"",e,t)}},function(e,t,n){var r=n(4),i=n(5),a=n(13);function s(e,t,n){var r=n;return"f"===e&&"f"===t&&(r=2*r/3),"p"===e&&"p"===t&&(r=5*r/6),"f"===e&&"z"===t&&(r=5*r/8),r}e.exports=function(e,t,n,o,c,l,h){var u,d;if(!o)return null;if(o.length>1&&o.indexOf(".")<0){e.paper.openGroup({klass:h});for(var f=0,p=0;p<o.length;p++){var m=o.charAt(p);d=i.getYCorr(m),(u=i.printSymbol(t+f,e.calcY(n+d),m,e.paper,"","",""))?p<o.length-1&&(f+=s(m,o.charAt(p+1),i.getSymbolWidth(m))):r(e,{x:t,y:e.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"})}return e.paper.closeGroup()}if(d=i.getYCorr(o),a.isInGroup())a.addPath(i.getPathForSymbol(t,e.calcY(n+d),o,c,l));else{if(u=i.printSymbol(t,e.calcY(n+d),o,e.paper,h,"none","#000000"))return u;r(e,{x:t,y:e.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"})}return null}},function(e,t,n){var r=n(4),i=n(25),a=n(26),s=n(23);e.exports=function(e,t,n,o){void 0===t.pitch&&window.console.error(t.type+" Relative Element y-coordinate not set.");var c=e.calcY(t.pitch);switch(t.type){case"symbol":if(null===t.c)return null;var l="symbol";t.klass&&(l+=" "+t.klass),t.graphelem=s(e,t.x,t.pitch,t.c,t.scalex,t.scaley,e.controller.classes.generate(l),"none","#000000");break;case"debug":t.graphelem=r(e,{x:t.x,y:e.calcY(15),text:""+t.c,type:"debugfont",klass:e.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:t.dim});break;case"barNumber":t.graphelem=r(e,{x:t.x,y:c,text:""+t.c,type:"measurefont",klass:e.controller.classes.generate("bar-number"),anchor:"middle",dim:t.dim});break;case"lyric":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"vocalfont",klass:e.controller.classes.generate("lyric"),anchor:"middle",dim:t.dim});break;case"chord":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"gchordfont",klass:e.controller.classes.generate("chord"),anchor:"middle",dim:t.dim,lane:t.getLane()});break;case"decoration":t.graphelem=r(e,{x:t.x,y:c+6,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"middle",centerVertically:!0,dim:t.dim});break;case"text":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"start",centerVertically:t.centerVertically,dim:t.dim,lane:t.getLane()});break;case"multimeasure-text":t.graphelem=r(e,{x:t.x+t.w/2,y:c,text:t.c,type:"tempofont",klass:e.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:t.dim});break;case"part":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"partsfont",klass:e.controller.classes.generate("part"),anchor:"start",dim:t.dim});break;case"bar":t.graphelem=i(e,t.x,t.linewidth,c,n||e.calcY(t.pitch2));break;case"stem":t.graphelem=i(e,t.x,t.linewidth,c,e.calcY(t.pitch2));break;case"ledger":t.graphelem=a(e,t.x,t.x+t.w,t.pitch,e.controller.classes.generate("ledger"))}return 1!==t.scalex&&t.graphelem&&function(e,t,n,r,i,a){e.setAttributeOnElement(t,{style:"transform:scale("+n+","+r+");transform-origin:"+i+"px "+a+"px;"})}(e.paper,t.graphelem,t.scalex,t.scaley,t.x,c),t.graphelem}},function(e,t,n){var r=n(13),i=n(3);e.exports=function(e,t,n,a,s){if(n<0||a<s){var o=i(s);s=i(a),a=o}else a=i(a),s=i(s);t=i(t);var c=i(t+n),l=[["M",t,a],["L",t,s],["L",c,s],["L",c,a],["z"]];if(!r.isInGroup()){for(var h="",u=0;u<l.length;u++)h+=l[u].join(" ");return e.paper.pathToBack({path:h,stroke:"none",fill:"#000000",class:e.controller.classes.generate("stem")})}r.addPath(l)}},function(e,t,n){var r=n(7),i=n(3);e.exports=function(e,t,n,a,s){var o=.35,c="#000000",l=e.calcY(a);t=i(t),n=i(n);var h=i(l-o),u=i(l+o),d={path:r("M %f %f L %f %f L %f %f L %f %f z",t,h,n,h,n,u,t,u),stroke:"none",fill:c};return s&&(d.class=s),e.paper.pathToBack(d)}},function(e,t,n){n(28);var r={plugin:n(29)};e.exports=r},function(e,t){},function(e,t,n){var r=n(30),i=n(91),a=new function(){"use strict";try{abcjs_is_user_script}catch(e){}this.show_midi=!0,this.hide_abc=!1,this.render_before=!1,this.midi_options={},this.render_options={},this.render_classname="abcrendered",this.text_classname="abctext",this.auto_render_threshold=20,this.show_text="show score",this.debug=!1};a.start=function(){var e=window.document.body;this.errors="";var t=this.getABCContainingElements(e);if(0!==t.length){if(this.debug)for(var n=0;n<t.length;n++){var r="Possible ABC found ("+(n+1)+" of "+t.length+"):\n\n"+t[n].innerText;alert(r)}var i=t.map(this.convertToDivs,this).reduce((function(e,t){return e.concat(t)}));this.auto_render=i.length<=this.auto_render_threshold,i.forEach((function(e){this.render(e,e.abctext_)}),this)}},a.getABCContainingElements=function(e){for(var t,n=[],r=!1,i=0,a=e.childNodes.length;i<a;++i)3!==(t=e.childNodes[i]).nodeType||r?1===t.nodeType&&"TEXTAREA"!==t.tagName&&(n=n.concat(this.getABCContainingElements(t))):t.nodeValue.match(/^\s*X:/m)&&"TEXTAREA"!==t.parentNode.tagName&&(n.push(e),r=!0);return n},a.convertToDivs=function(e){for(var t,n="",r=null,i=!1,a=[],s=Array.prototype.slice.call(e.childNodes),o=0,c=s.length;o<c;++o)if(3!==(t=s[o]).nodeType||t.nodeValue.match(/^\s*$/))i&&"BR"===t.tagName?(n+="\n",r.appendChild(t)):i&&1===t.nodeType?(n+="\n",r.appendChild(t)):i&&(i=!1,0,n=n.replace(/\n+/,"\n"),r.abctext_=n,a.push(r));else{0;var l=t.nodeValue;l.match(/^\s*X:/m)&&(i=!0,n="",(r=document.createElement("DIV")).className=this.text_classname,t.parentElement.insertBefore(r,t),this.hide_abc&&(r.style.display="none")),i&&(n+=l.replace(/^\n+/,""),r.appendChild(t))}return i&&(n=n.replace(/\n+$/,"\n").replace(/^\n+/,"\n"),r.abctext_=n,a.push(r)),a},a.render=function(e,t){var n=document.createElement("DIV");this.render_before?e.parentElement.insertBefore(n,e):e.nextSibling?e.parentElement.insertBefore(n,e.nextSibling):e.parentElement.appendChild(n);var a=this;try{this.debug&&alert("About to render:\n\n"+t);var s=function(){var e=document.createElement("DIV");if(e.className=a.render_classname,n.appendChild(e),r(e,t,a.render_options),a.show_midi){var s=document.createElement("DIV");n.appendChild(s),i(s,t,a.render_options)}};if(this.auto_render)s();else{var o=document.createElement("A");o.className="abcshow",o.href="#",o.innerHTML=this.show_text,o.onclick=function(){return s(),o.remove(),!1},abcdiv.parentElement.insertBefore(o,abcdiv)}}catch(e){this.errors+=e}};var s=!0;"undefined"!=typeof abcjs_plugin_autostart&&(s=abcjs_plugin_autostart),s&&"undefined"!=typeof window&&void 0!==window.document&&("loading"!==window.document.readyState?a.start():document.addEventListener("DOMContentLoaded",(function(){a.start()}))),e.exports=a},function(e,t,n){var r=n(14),i=n(18),a=n(37),s=n(15),o=n(17),c=n(0),l={};function h(){var e=window.innerWidth;for(var t in l)if(l.hasOwnProperty(t)){var n=l[t];e-=2*n.offsetLeft,n.style.width=e+"px"}}try{window.addEventListener("resize",h),window.addEventListener("orientationChange",h)}catch(e){}function u(e,t,n,r){n.viewportHorizontal?(e.innerHTML='<div class="abcjs-inner"></div>',n.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",l[e.id]=e,e=e.children[0]):n.viewportVertical?(e.innerHTML='<div class="abcjs-inner scroll-amount"></div>',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var i=new a(e,n);(i.engraveABC(t,r),t.engraver=i,n.viewportVertical||n.viewportHorizontal)&&(e.parentNode.style.width=e.style.width)}function d(e,t,n,r){function a(e){var t=new i;return t.formatting=e.formatting,t.media=e.media,t.version=e.version,t.metaText={},t.lines=[],t}for(var s,o=[],l=0;l<t.lines.length;l++){var h=t.lines[l];s||(s=a(t)),0===l&&(s.metaText.tempo=t.metaText.tempo,s.metaText.title=t.metaText.title,s.metaText.header=t.metaText.header,s.metaText.rhythm=t.metaText.rhythm,s.metaText.origin=t.metaText.origin,s.metaText.composer=t.metaText.composer,s.metaText.author=t.metaText.author,s.metaText.partOrder=t.metaText.partOrder),s.lines.push(h),h.staff&&(o.push(s),s=void 0)}if(s)for(var d=o[o.length-1],f=0;f<s.lines.length;f++)d.lines.push(s.lines[f]);(s=o[o.length-1]).metaText.unalignedWords=t.metaText.unalignedWords,s.metaText.book=t.metaText.book,s.metaText.source=t.metaText.source,s.metaText.discography=t.metaText.discography,s.metaText.notes=t.metaText.notes,s.metaText.transcription=t.metaText.transcription,s.metaText.history=t.metaText.history,s.metaText["abc-copyright"]=t.metaText["abc-copyright"],s.metaText["abc-creator"]=t.metaText["abc-creator"],s.metaText["abc-edited-by"]=t.metaText["abc-edited-by"],s.metaText.footer=t.metaText.footer;var p={};for(var m in n)n.hasOwnProperty(m)&&(p[m]=n[m]);var g=p.paddingtop,v=p.paddingbottom;e.innerHTML="";for(var b=0;b<o.length;b++){var y=document.createElement("div");e.appendChild(y),0===b?(p.paddingtop=g,p.paddingbottom=-20):b===o.length-1?(p.paddingtop=10,p.paddingbottom=v):(p.paddingtop=10,p.paddingbottom=-20),b<o.length-1&&(o[b].formatting=c.clone(o[b].formatting),o[b].formatting.stretchlast=!0),u(y,o[b],p,r),0===b?t.engraver=o[b].engraver:t.engraver.staffgroups?o[b].engraver.staffgroups.length>0&&t.engraver.staffgroups.push(o[b].engraver.staffgroups[0]):t.engraver.staffgroups=o[b].engraver.staffgroups}}e.exports=function(e,t,n,i,c){var l,h={};if(n)for(l in n)n.hasOwnProperty(l)&&(h[l]=n[l]);if(i)for(l in i)i.hasOwnProperty(l)&&("listener"===l?i[l].highlight&&(h.clickListener=i[l].highlight):h[l]=i[l]);if(c)for(l in c)c.hasOwnProperty(l)&&(h[l]=c[l]);return r.renderEngine((function(e,t,n,r){var i=!1;return"*"===e&&(i=!0,(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e)),h.afterParsing&&h.afterParsing(t,n,r),!i&&h.wrap&&h.staffwidth?t=function(e,t,n,r,i){var c=new a(e,i),l=c.getMeasureWidths(t),h=o.calcLineWraps(t,l,r,i,s,c);!i.oneSvgPerLine||h.tune.lines.length<2?u(e,h.tune,h.revisedParams,n):d(e,h.tune,h.revisedParams,n);return h.tune.explanation=h.explanation,h.tune}(e,t,n,r,h):(i||!h.oneSvgPerLine||t.lines.length<2?u(e,t,h,n):d(e,t,h,n),i&&e.parentNode.removeChild(e),null)}),e,t,h)}},function(e,t,n){var r=n(0),i=n(10),a=n(11);e.exports=function(e,t,n,s,o){this.reset=function(e,t,n,r){a.initialize(e,t,n,r,o),i.initialize(e,t,n,r,o)},this.reset(e,t,n,s),this.setTitle=function(t){if(n.hasMainTitle)o.addSubtitle(e.translateString(e.stripComment(t)));else{var r=e.translateString(e.theReverser(e.stripComment(t)));n.titlecaps&&(r=r.toUpperCase()),o.addMetaText("title",r),n.hasMainTitle=!0}},this.setMeter=function(r){if("C"===(r=e.stripComment(r)))return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"common_time"};if("C|"===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"cut_time"};if("o"===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===r.length||"none"===r.toLowerCase())return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),null;var i=e.tokenize(r,0,r.length);try{var a=function(){var e=function(){var e={value:0,num:""},t=i.shift();for("("===t.token&&(t=i.shift());;){if("number"!==t.type)throw"Expected top number of meter";if(e.value+=parseInt(t.token),e.num+=t.token,0===i.length||"/"===i[0].token)return e;if(")"===(t=i.shift()).token){if(0===i.length||"/"===i[0].token)return e;throw"Unexpected paren in meter"}if("."!==t.token&&"+"!==t.token)throw"Expected top number of meter";if(e.num+=t.token,0===i.length)throw"Expected top number of meter";t=i.shift()}return e}();if(0===i.length)return e;var t=i.shift();if("/"!==t.token)throw"Expected slash in meter";if("number"!==(t=i.shift()).type)throw"Expected bottom number of meter";return e.den=t.token,e.value=e.value/parseInt(e.den),e};if(0===i.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===i.length)break}return!0===n.havent_set_length&&(n.default_length=o<.75?.0625:.125,n.havent_set_length=!1),s}catch(e){t(e,r,0)}return null},this.calcTempo=function(e){var t=1/4;n.meter&&"specified"===n.meter.type?t=1/parseInt(n.meter.value[0].den):n.origMeter&&"specified"===n.origMeter.type&&(t=1/parseInt(n.origMeter.value[0].den));for(var r=0;r<e.duration;r++)e.duration[r]=t*e.duration[r];return e},this.resolveTempo=function(){n.tempo&&(this.calcTempo(n.tempo),s.metaText.tempo=n.tempo,delete n.tempo)},this.addUserDefinition=function(e,i,a){var s=e.indexOf("=",i);if(-1!==s){var o=r.strip(e.substring(i,s)),c=r.strip(e.substring(s+1));if(1===o.length){-1!=="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~".indexOf(o)?0!==c.length?(void 0===n.macros&&(n.macros={}),n.macros[o]=c):t("Missing macro definition",e,i):t("Macro definitions must be H-Y, h-w, or tilde",e,i)}else t("Macro definitions can only be one character",e,i)}else t("Need an = in a macro definition",e,i)},this.setDefaultLength=function(e,t,i){var a=r.gsub(e.substring(t,i)," ","").split("/");if(2===a.length){var s=parseInt(a[0]),o=parseInt(a[1]);o>0&&(n.default_length=s/o,n.havent_set_length=!1)}else 1===a.length&&"1"===a[0]&&(n.default_length=1,n.havent_set_length=!1)};var c={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,i,a){try{var s=e.tokenize(r,i,a);if(0===s.length)throw"Missing parameter in Q: field";var o={},l=!0,h=s.shift();if("quote"===h.type&&(o.preString=h.token,h=s.shift(),0===s.length))return c[o.preString.toLowerCase()]&&(o.bpm=c[o.preString.toLowerCase()],o.suppressBpm=!0),{type:"immediate",tempo:o};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";o.duration=[1],o.bpm=parseInt(h.token)}else{if("number"!==h.type)throw"Expected number or equal after C in Q: field";if(o.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";o.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)o.duration=[1],o.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 d=parseInt(h.token);for(o.duration=[u/d];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";d=parseInt(h.token),o.duration.push(u/d)}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";o.bpm=parseInt(h.token)}}if(0!==s.length&&("quote"===(h=s.shift()).type&&(o.postString=h.token,h=s.shift()),0!==s.length))throw"Unexpected string at end of Q: field";return!1===n.printTempo&&(o.suppress=!0),{type:l?"delaySet":"immediate",tempo:o}}catch(e){return t(e,r,i),{type:"none"}}},this.letter_to_inline_header=function(r,c){var l=e.eatWhiteSpace(r,c);if(c+=l,r.length>=c+5&&"["===r.charAt(c)&&":"===r.charAt(c+2)){var h=r.indexOf("]",c),u=n.iChar+c,d=n.iChar+h+1;switch(r.substring(c,c+3)){case"[I:":var f=i.addDirective(r.substring(c+3,h));return f&&t(f,r,c),[h-c+1+l];case"[M:":var p=this.setMeter(r.substring(c+3,h));return o.hasBeginMusic()&&p?o.appendStartingElement("meter",u,d,p):n.meter=p,[h-c+1+l];case"[K:":var m=a.parseKey(r.substring(c+3,h));return m.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",u,d,n.clef),m.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",u,d,a.fixKey(n.clef,n.key)),[h-c+1+l];case"[P:":return s.lines.length<=s.lineNum?n.partForNextLine={title:r.substring(c+3,h),startChar:u,endChar:d}:o.appendElement("part",u,d,{title:r.substring(c+3,h)}),[h-c+1+l];case"[L:":return this.setDefaultLength(r,c+3,h),[h-c+1+l];case"[Q:":if(h>0){var g=this.setTempo(r,c+3,h);return"delaySet"===g.type?o.hasBeginMusic()?o.appendElement("tempo",u,d,this.calcTempo(g.tempo)):n.tempoForNextLine=["tempo",u,d,this.calcTempo(g.tempo)]:"immediate"===g.type&&(o.hasBeginMusic()?o.appendElement("tempo",u,d,g.tempo):n.tempoForNextLine=["tempo",u,d,g.tempo]),[h-c+1+l,r.charAt(c+1),r.substring(c+3,h)]}break;case"[V:":if(h>0)return a.parseVoice(r,c+3,h),[h-c+1+l,r.charAt(c+1),r.substring(c+3,h)]}}return[0]},this.letter_to_body_header=function(e,s){if(e.length>=s+3)switch(e.substring(s,s+2)){case"I:":var c=i.addDirective(e.substring(s+2));return c&&t(c,e,s),[e.length];case"M:":var l=this.setMeter(e.substring(s+2));return o.hasBeginMusic()&&l&&o.appendStartingElement("meter",n.iChar+s,n.iChar+e.length,l),[e.length];case"K:":var h=a.parseKey(e.substring(s+2));return h.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",n.iChar+s,n.iChar+e.length,n.clef),h.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",n.iChar+s,n.iChar+e.length,a.fixKey(n.clef,n.key)),[e.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",n.iChar+s,n.iChar+e.length,{title:e.substring(s+2)}),[e.length];case"L:":return this.setDefaultLength(e,s+2,e.length),[e.length];case"Q:":var u=e.indexOf("",s+2);-1===u&&(u=e.length);var d=this.setTempo(e,s+2,u);return"delaySet"===d.type?o.appendElement("tempo",n.iChar+s,n.iChar+e.length,this.calcTempo(d.tempo)):"immediate"===d.type&&o.appendElement("tempo",n.iChar+s,n.iChar+e.length,d.tempo),[u,e.charAt(s),r.strip(e.substring(s+2))];case"V:":return a.parseVoice(e,s+2,e.length),[e.length,e.charAt(s),r.strip(e.substring(s+2))]}return[0]};var l={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(c){if(r.startsWith(c,"%%")){var h=i.addDirective(c.substring(2));return h&&t(h,c,2),{}}var u=c.indexOf("%");if(u>=0&&(c=c.substring(0,u)),0===(c=c.replace(/\s+$/,"")).length)return{};if(c.length>=2&&":"===c.charAt(1)){var d="";c.indexOf("")>=0&&"w"!==c.charAt(0)&&(d=c.substring(c.indexOf("")+1),c=c.substring(0,c.indexOf("")));var f=l[c.charAt(0)];if(void 0!==f)return"unalignedWords"===f?o.addMetaTextArray(f,i.parseFontChangeLine(e.translateString(e.stripComment(c.substring(2))))):o.addMetaText(f,e.translateString(e.stripComment(c.substring(2)))),{};var p=n.iChar,m=p+c.length;switch(c.charAt(0)){case"H":o.addMetaText("history",e.translateString(e.stripComment(c.substring(2)))),n.is_in_history=!0;break;case"K":this.resolveTempo();var g=a.parseKey(c.substring(2));!n.is_in_header&&o.hasBeginMusic()&&(g.foundClef&&o.appendStartingElement("clef",p,m,n.clef),g.foundKey&&o.appendStartingElement("key",p,m,a.fixKey(n.clef,n.key))),n.is_in_header=!1;break;case"L":this.setDefaultLength(c,2,c.length);break;case"M":n.origMeter=n.meter=this.setMeter(c.substring(2));break;case"P":n.is_in_header?o.addMetaText("partOrder",e.translateString(e.stripComment(c.substring(2)))):n.partForNextLine={title:e.translateString(e.stripComment(c.substring(2))),startChar:p,endChar:m};break;case"Q":var v=this.setTempo(c,2,c.length);"delaySet"===v.type?n.tempo=v.tempo:"immediate"===v.type&&(s.metaText.tempo=v.tempo);break;case"T":this.setTitle(c.substring(2));break;case"U":this.addUserDefinition(c,2,c.length);break;case"V":if(a.parseVoice(c,2,c.length),!n.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",c,0);break;default:return d.length&&(d=""+d),{regular:!0,str:c+d}}return d.length>0?{recurse:!0,str:d}:{}}return{regular:!0,str:c}}}},function(e,t,n){var r=n(0);e.exports=function(){this.skipWhiteSpace=function(e){for(var t=0;t<e.length;t++)if(!this.isWhiteSpace(e.charAt(t)))return t;return e.length};var e=function(e,t){return t>=e.length};this.eatWhiteSpace=function(e,t){for(var n=t;n<e.length;n++)if(!this.isWhiteSpace(e.charAt(n)))return n-t;return n-t},this.getKeyPitch=function(t){var n=this.skipWhiteSpace(t);if(e(t,n))return{len:0};switch(t.charAt(n)){case"A":return{len:n+1,token:"A"};case"B":return{len:n+1,token:"B"};case"C":return{len:n+1,token:"C"};case"D":return{len:n+1,token:"D"};case"E":return{len:n+1,token:"E"};case"F":return{len:n+1,token:"F"};case"G":return{len:n+1,token:"G"}}return{len:0}},this.getSharpFlat=function(e){if("bass"===e)return{len:0};switch(e.charAt(0)){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(t){var n=function(e,t){for(;t<e.length&&(e.charAt(t)>="a"&&e.charAt(t)<="z"||e.charAt(t)>="A"&&e.charAt(t)<="Z");)t++;return t},r=this.skipWhiteSpace(t);if(e(t,r))return{len:0};var i=t.substring(r,r+3).toLowerCase();switch((i.length>1&&" "===i.charAt(1)||"^"===i.charAt(1)||"_"===i.charAt(1)||"="===i.charAt(1))&&(i=i.charAt(0)),i){case"mix":return{len:n(t,r),token:"Mix"};case"dor":return{len:n(t,r),token:"Dor"};case"phr":return{len:n(t,r),token:"Phr"};case"lyd":return{len:n(t,r),token:"Lyd"};case"loc":return{len:n(t,r),token:"Loc"};case"aeo":return{len:n(t,r),token:"m"};case"maj":case"ion":return{len:n(t,r),token:""};case"min":case"m":return{len:n(t,r),token:"m"}}return{len:0}},this.getClef=function(t,n){var i=t,a=this.skipWhiteSpace(t);if(e(t,a))return{len:0};var s=!1,o=t.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: "+i};var c=this.skipWhiteSpace(o);if(e(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(!n&&s&&r.startsWith(o,"none"))l="none";else if(r.startsWith(o,"perc"))l="perc";else if(!n&&s&&r.startsWith(o,"C"))l="tenor";else if(!n&&s&&r.startsWith(o,"F"))l="bass";else{if(n||!s||!r.startsWith(o,"G"))return{len:a+5,warn:"Unknown clef specified: "+i};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(e,t){switch(e.charAt(t)){case"]":switch(++t,e.charAt(t)){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++t,e.charAt(t)>="1"&&e.charAt(t)<="9"||'"'===e.charAt(t)?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(++t,e.charAt(t)){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++t,e.charAt(t)){case"]":switch(++t,e.charAt(t)){case"|":return++t,":"===e.charAt(t)?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}break;case"|":return++t,":"===e.charAt(t)?{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(++t,"|"!==e.charAt(t))return e.charAt(t)>="1"&&e.charAt(t)<="9"||'"'===e.charAt(t)?{len:1,token:"bar_invisible"}:{len:0};switch(++t,e.charAt(t)){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(++t,e.charAt(t)){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++t,":"===e.charAt(t)?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var n=0;":"===e.charAt(t+n);)n++;return{len:1+n,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var n=0;n<e.length;n++)if(t.indexOf(e.charAt(n))<0)return{len:n,token:e.substring(0,n)};return{len:n,token:e}},this.getToken=function(e,t,n){for(var r=t;r<n&&!this.isWhiteSpace(e.charAt(r));)r++;return e.substring(t,r)},this.isMatch=function(t,n){var i=this.skipWhiteSpace(t);return e(t,i)?0:r.startsWith(t.substring(i),n)?i+n.length:0},this.getPitchFromTokens=function(e){var t={};if(t.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}[e[0].token],void 0===t.position)return{warn:"Pitch expected. Found: "+e[0].token};for(e.shift();e.length;)switch(e[0].token){case",":t.position-=7,e.shift();break;case"'":t.position+=7,e.shift();break;default:return t}return t},this.getKeyAccidentals2=function(e){for(var t;e.length>0;){var n;if("^"===e[0].token){if(n="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token){case"^":n="dblsharp",e.shift();break;case"/":n="quartersharp",e.shift()}}else if("="===e[0].token)n="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(n="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token){case"_":n="dblflat",e.shift();break;case"/":n="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[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===t&&(t=[]),t.push({acc:n,note:e[0].token.charAt(0)}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+n+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(t){var n={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},r=this.skipWhiteSpace(t);if(e(t,r))return{len:0};var i=null;switch(t.charAt(r)){case"^":case"_":case"=":i=t.charAt(r);break;default:return{len:0}}if(r++,e(t,r))return{len:1,warn:"Expected note name after accidental"};switch(t.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:n[i],note:t.charAt(r)}};case"^":case"_":case"/":if(i+=t.charAt(r),r++,e(t,r))return{len:2,warn:"Expected note name after accidental"};switch(t.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:n[i],note:t.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(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,n){var r=e.indexOf("%",t);for(r>=0&&r<n&&(n=r);t<n&&(" "===e.charAt(t)||"\t"===e.charAt(t)||""===e.charAt(t));)t++;for(;t<n&&(" "===e.charAt(n-1)||"\t"===e.charAt(n-1)||""===e.charAt(n-1));)n--;return{start:t,end:n}};var t=function(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"},n=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,r,i,a){var s=this.getMeat(e,r,i);r=s.start,i=s.end;for(var o,c=[];r<i;){if('"'===e.charAt(r)){for(o=r+1;o<i&&'"'!==e.charAt(o);)o++;c.push({type:"quote",token:e.substring(r+1,o),start:r+1,end:o}),o++}else if(t(e.charAt(r))){if(o=r+1,a)for(;o<i&&!this.isWhiteSpace(e.charAt(o));)o++;else for(;o<i&&t(e.charAt(o));)o++;c.push({type:"alpha",token:e.substring(r,o),continueId:n(e.charAt(o)),start:r,end:o}),r=o+1}else if("."===e.charAt(r)&&n(e.charAt(o+1))){o=r+1;for(var l;o<i&&n(e.charAt(o));)o++;l=parseFloat(e.substring(r,o)),c.push({type:"number",token:e.substring(r,o),intt:null,floatt:l,continueId:t(e.charAt(o)),start:r,end:o}),r=o+1}else if(n(e.charAt(r))||"-"===e.charAt(r)&&n(e.charAt(o+1))){o=r+1;for(var h,u=null;o<i&&n(e.charAt(o));)o++;if("."===e.charAt(o)&&n(e.charAt(o+1)))for(o++;o<i&&n(e.charAt(o));)o++;else u=parseInt(e.substring(r,o));h=parseFloat(e.substring(r,o)),c.push({type:"number",token:e.substring(r,o),intt:u,floatt:h,continueId:t(e.charAt(o)),start:r,end:o}),r=o+1}else" "===e.charAt(r)||"\t"===e.charAt(r)||c.push({type:"punct",token:e.charAt(r),start:r,end:r+1}),o=r+1;r=o}return c},this.getVoiceToken=function(e,t,n){for(var r=t;r<n&&this.isWhiteSpace(e.charAt(r))||"="===e.charAt(r);)r++;if('"'===e.charAt(r)){var i=e.indexOf('"',r+1);return-1===i||i>=n?{len:1,err:"Missing close quote"}:{len:i-t+1,token:this.translateString(e.substring(r+1,i))}}for(var a=r;a<n&&!this.isWhiteSpace(e.charAt(a))&&"="!==e.charAt(a);)a++;return{len:a-t+1,token:e.substring(r,a)}};var i={"`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(e){var t=e.split("\\");if(1===t.length)return e;var n=null;return r.each(t,(function(e){if(null===n)n=e;else{var t=i[e.substring(0,2)];void 0!==t?n+=t+e.substring(2):void 0!==(t=s[e.substring(0,3)])?n+=t+e.substring(3):(t=a[e.substring(0,1)],n+=void 0!==t?t+e.substring(1):"\\"+e)}})),n},this.getNumber=function(e,t){for(var n=0;t<e.length;)switch(e.charAt(t)){case"0":n*=10,t++;break;case"1":n=10*n+1,t++;break;case"2":n=10*n+2,t++;break;case"3":n=10*n+3,t++;break;case"4":n=10*n+4,t++;break;case"5":n=10*n+5,t++;break;case"6":n=10*n+6,t++;break;case"7":n=10*n+7,t++;break;case"8":n=10*n+8,t++;break;case"9":n=10*n+9,t++;break;default:return{num:n,index:t}}return{num:n,index:t}},this.getFraction=function(e,t){var n=1,r=1;if("/"!==e.charAt(t)){var i=this.getNumber(e,t);n=i.num,t=i.index}if("/"===e.charAt(t)){if(t++,"/"===e.charAt(t)){for(var a=.5;"/"===e.charAt(t++);)a/=2;return{value:n*a,index:t-1}}var s=t,o=this.getNumber(e,t);0===o.num&&s===t&&(o.num=2),0!==o.num&&(r=o.num),t=o.index}return{value:n/r,index:t}},this.theReverser=function(e){return r.endsWith(e,", The")?"The "+e.substring(0,e.length-5):r.endsWith(e,", A")?"A "+e.substring(0,e.length-3):e},this.stripComment=function(e){var t=e.indexOf("%");return t>=0?r.strip(e.substring(0,t)):r.strip(e)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var n=""+t;return{value:t,digits:e.indexOf(n)+n.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var n=""+t;return{value:t,digits:e.indexOf(n)+n.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,n="";if("-"===e[0].token)e.shift(),n="-",t++;else if("number"!==e[0].type)return{used:0};if(n+=e.shift().token,0===e.length)return{used:1,value:parseInt(n)};var r=e.shift();if("."===r.token){if(t++,0===e.length)return{used:t,value:parseInt(n)};if("number"===e[0].type&&(n=n+"."+(r=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(n)};r=e.shift()}switch(r.token){case"pt":return{used:t+1,value:parseFloat(n)};case"cm":return{used:t+1,value:parseFloat(n)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(n)};default:return e.unshift(r),{used:t,value:parseFloat(n)}}return{used:0}};var o=function(e){for(;-1!==e.indexOf("\\n");)e=e.replace("\\n","\n");return e};this.getBrackettedSubstring=function(e,t,n,r){for(var i=r||e.charAt(t),a=t+1;a<e.length&&e.charAt(a)!==i;)++a;return e.charAt(a)===i?[a-t+1,o(e.substring(t+1,a)),!0]:((a=t+n)>e.length-1&&(a=e.length-1),[a-t+1,o(e.substring(t+1,a)),!1])}}},function(e,t,n){var r,i=n(0);!function(){"use strict";var e;function t(e,t,n){for(var r=0,i=t+1;i<e.length;i++)if("note"===e[i].el_type&&r++,e[i].decoration&&e[i].decoration.indexOf(n)>=0)return r;return r}function n(e,t,n){for(var r=Math.min(e.length,t+3),i=t;i<r;i++)if("note"===e[i].el_type&&e[i].decoration)for(var a=0;a<e[i].decoration.length;a++)if(n.indexOf(e[i].decoration[a])>=0)return e[i].decoration[a];return null}function a(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=n.length-1;r>=0&&"bar"!==n[r].el_type;)n[r].noChordVoice=!0,r--}function s(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function o(e,t){var n=1/4;e.duration&&(n=e.duration[0]);var r=60;return e.bpm&&(r=e.bpm),n*r/t}function c(t){var n;switch(t.type){case"common_time":n={el_type:"meter",num:4,den:4};break;case"cut_time":n={el_type:"meter",num:2,den:2};break;case"specified":n={el_type:"meter",num:t.value[0].num,den:t.value[0].den};break;default:n={el_type:"meter"}}return e=n.num/n.den,n}r=function(r,l){var h,u=(l=l||{}).program||0,d=l.midiTranspose||0;r.visualTranspose&&(d-=r.visualTranspose);var f=l.channel||0,p=!1,m=l.drum||"",g=l.drumBars||1,v=l.drumIntro||0,b=""!==m,y=[];u=parseInt(u,10),d=parseInt(d,10),10===(f=parseInt(f,10))&&(u=128),m=m.split(" "),g=parseInt(g,10),v=parseInt(v,10);var w=r.formatting.bagpipes;w&&(u=71);var x=[];if(r.formatting.midi){var k=r.formatting.midi;k.program&&k.program.length>0&&(u=k.program[0],k.program.length>1&&(u=k.program[1],f=k.program[0]),p=!0),k.transpose&&(d=k.transpose[0]),k.channel&&(f=k.channel[0],p=!0),k.drum&&(m=k.drum),k.drumbars&&(g=k.drumbars[0]),k.drumon&&(b=!0),10===f&&(u=128),k.beat&&x.push({el_type:"beat",beats:k.beat}),k.nobeataccents&&x.push({el_type:"beataccents",value:!1})}h=l.qpm?parseInt(l.qpm,10):r.metaText.tempo?o(r.metaText.tempo,r.getBeatLength()):l.defaultQpm?l.defaultQpm:180;var A=[];w&&A.push({el_type:"bagpipes"}),A.push({el_type:"instrument",program:u}),f&&A.push({el_type:"channel",channel:f}),d&&A.push({el_type:"transpose",transpose:d}),A.push({el_type:"tempo",qpm:h});for(var T=0;T<x.length;T++)A.push(x[T]);for(var S,M=[],N=[],C=[],E=[0],I={},_=[],B=[],P=!1,D=0;D<r.lines.length;D++){var L=r.lines[D];if(L.staff)for(var O=function(e){var r,i={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]};if(e.decoration)if(e.decoration.indexOf("pppp")>=0?r="pppp":e.decoration.indexOf("ppp")>=0?r="ppp":e.decoration.indexOf("pp")>=0?r="pp":e.decoration.indexOf("p")>=0?r="p":e.decoration.indexOf("mp")>=0?r="mp":e.decoration.indexOf("mf")>=0?r="mf":e.decoration.indexOf("f")>=0?r="f":e.decoration.indexOf("ff")>=0?r="ff":e.decoration.indexOf("fff")>=0?r="fff":e.decoration.indexOf("ffff")>=0&&(r="ffff"),r&&(S=i[r].slice(0),M[V].push({el_type:"beat",beats:S.slice(0)}),N[j]=!1,C[j]=!1),e.decoration.indexOf("crescendo(")>=0){var a=t(q,K,"crescendo)"),s=Math.min(127,S[0]+50),o=n(q,K+a+1,Object.keys(i));o&&(s=i[o][0]),N[j]=a>0&&Math.floor((s-S[0])/a),C[j]=!1}else if(e.decoration.indexOf("crescendo)")>=0)N[j]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var c=t(q,K,"diminuendo)"),l=Math.max(15,S[0]-50),h=n(q,K+c+1,Object.keys(i));h&&(l=i[h][0]),N[j]=!1,C[j]=c>0&&Math.floor((l-S[0])/c)}else e.decoration.indexOf("diminuendo)")>=0&&(C[j]=!1)},H=L.staff,V=0,F=0;F<H.length;F++)for(var z=H[F],j=0;j<z.voices.length;j++){var q=z.voices[j];if(!M[V]){M[V]=[].concat(JSON.parse(JSON.stringify(A)));var Y=s(L.staff,V);Y&&M[V].unshift({el_type:"name",trackName:Y})}if(d&&"perc"===z.clef.type&&M[V].push({el_type:"transpose",transpose:0}),z.clef&&"perc"===z.clef.type&&!p)for(var W=0;W<M[V].length;W++)"instrument"===M[V][W].el_type&&(M[V][W].program=128);else z.key&&("HP"===z.key.root?M[V].push({el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}):M[V].push({el_type:"key",accidentals:z.key.accidentals}));z.meter&&M[V].push(c(z.meter)),!P&&b&&(M[V].push({el_type:"drum",params:{pattern:m,bars:g,on:b,intro:v}}),P=!0),z.clef&&"perc"!==z.clef.type&&z.clef.transpose&&(z.clef.el_type="clef",M[V].push({el_type:"transpose",transpose:z.clef.transpose})),z.clef&&z.clef.type&&(z.clef.type.indexOf("-8")>=0?M[V].push({el_type:"transpose",transpose:-12}):z.clef.type.indexOf("+8")>=0&&M[V].push({el_type:"transpose",transpose:12})),r.formatting.midi&&r.formatting.midi.drumoff&&(M[V].push({el_type:"bar"}),M[V].push({el_type:"drum",params:{pattern:"",on:!1}}));var R=0,G=0,U=0,X=0;S=[105,95,85,1];for(var K=0;K<q.length;K++){var Z=q[K];switch(Z.el_type){case"note":if(N[j]&&(S[0]+=N[j],S[1]+=N[j],S[2]+=N[j],M[V].push({el_type:"beat",beats:S.slice(0)})),C[j]&&(S[0]+=C[j],S[1]+=C[j],S[2]+=C[j],M[V].push({el_type:"beat",beats:S.slice(0)})),O(Z),!Z.rest||"spacer"!==Z.rest.type){var Q={elem:Z,el_type:"note",timing:E[V]};Z.style?Q.style=Z.style:y[V]&&(Q.style=y[V]),Q.duration=0===Z.duration?.25:Z.duration,Z.startTriplet?(G=Z.tripletMultiplier,U=Z.startTriplet*G*Z.duration,Q.duration=Q.duration*G,Q.duration=Math.round(1e6*Q.duration)/1e6,X=Q.duration):G&&(Z.endTriplet?(G=0,Q.duration=Math.round(1e6*(U-X))/1e6):(Q.duration=Q.duration*G,Q.duration=Math.round(1e6*Q.duration)/1e6,X+=Q.duration)),Z.rest&&(Q.rest=Z.rest),Z.decoration&&(Q.decoration=Z.decoration.slice(0)),Z.pitches&&(Q.pitches=i.cloneArray(Z.pitches)),Z.gracenotes&&(Q.gracenotes=i.cloneArray(Z.gracenotes)),Z.chord&&(Q.chord=i.cloneArray(Z.chord)),M[V].push(Q),"rhythm"===Z.style&&(!0,a(M)),R++,E[V]+=Q.duration}break;case"key":"HP"===Z.root?M[V].push({el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}):M[V].push({el_type:"key",accidentals:Z.accidentals});break;case"meter":M[V].push(c(Z));break;case"clef":Z.transpose&&M[V].push({el_type:"transpose",transpose:Z.transpose}),Z.type&&(Z.type.indexOf("-8")>=0?M[V].push({el_type:"transpose",transpose:-12}):Z.type.indexOf("+8")>=0&&M[V].push({el_type:"transpose",transpose:12}));break;case"tempo":h=o(Z,r.getBeatLength()),M[V].push({el_type:"tempo",qpm:h,timing:E[V]}),I[""+E[V]]={el_type:"tempo",qpm:h,timing:E[V]};break;case"bar":R>0&&M[V].push({el_type:"bar"}),O(Z),R=0;var J="bar_right_repeat"===Z.type||"bar_dbl_repeat"===Z.type,$="1"===Z.startEnding,ee="bar_left_repeat"===Z.type||"bar_dbl_repeat"===Z.type||"bar_right_repeat"===Z.type;if(J){var te=_[V];te||(te=0);var ne=B[V];ne||(ne=M[V].length);for(var re=te;re<ne;re++){var ie=i.clone(M[V][re]);ie.pitches&&(ie.pitches=i.cloneArray(ie.pitches)),M[V].push(ie)}B[V]=void 0,_[V]=void 0}$&&(B[V]=M[V].length),ee&&(_[V]=M[V].length),!1;break;case"style":y[V]=Z.head;break;case"timeSignature":M[V].push(c(Z));break;case"part":break;case"stem":case"scale":break;case"midi":var ae=!1;switch(Z.cmd){case"drumon":b=!0,ae=!0;break;case"drumoff":b=!1,ae=!0;break;case"drum":m=Z.params,ae=!0;break;case"drumbars":g=Z.params[0],ae=!0;break;case"drummap":break;case"channel":10===Z.params[0]&&M[V].push({el_type:"instrument",program:128});break;case"program":M[V].push({el_type:"instrument",program:Z.params[0]}),p=!0;break;case"transpose":M[V].push({el_type:"transpose",transpose:Z.params[0]});break;case"gchordoff":M[V].push({el_type:"gchord",tacet:!0});break;case"gchordon":M[V].push({el_type:"gchord",tacet:!1});break;case"beat":M[V].push({el_type:"beat",beats:Z.params});break;case"nobeataccents":M[V].push({el_type:"beataccents",value:!1});break;case"beataccents":M[V].push({el_type:"beataccents",value:!0});break;case"vol":M[V].push({el_type:"vol",volume:Z.params[0]});break;case"volinc":M[V].push({el_type:"volinc",volume:Z.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",Z.cmd,Z)}ae&&(M[0].push({el_type:"drum",params:{pattern:m,bars:g,intro:v,on:b}}),P=!0);break;default:console.log("MIDI: element type "+Z.el_type+" not handled.")}}E[++V]||(E[V]=0)}}if(function(e,t){for(var n=Object.keys(t),r=0;r<e.length;r++)for(var i=e[r],a=0;a<i.length;a++){var s=i[a];n.indexOf(""+s.timing)>=0&&("tempo"===s.el_type?(s.qpm=t[""+s.timing].qpm,a++):(e[r].splice(a,0,{el_type:"tempo",qpm:t[""+s.timing].qpm,timing:s.timing}),a+=2))}}(M,I),v)for(var se=r.getPickupLength(),oe=0;oe<M.length;oe++){for(var ce=0;"note"!==M[oe][ce].el_type&&M[oe].length>ce;)ce++;if(M[oe].length>ce)for(var le=0;le<v;le++)0===se||le<v-1?M[oe].splice(ce,0,{el_type:"note",rest:{type:"rest"},duration:e},{el_type:"bar"}):M[oe].splice(ce,0,{el_type:"note",rest:{type:"rest"},duration:e-se})}return M.length>0&&M[0].length>0&&(M[0][0].pickupLength=r.getPickupLength()),M}}(),e.exports=r},function(e,t,n){var r,i=n(0);!function(){"use strict";var e,t,n,a,s,o,c,l,h,u,d,f,p,m,g,v,b,y,w,x,k,A,T=1,S={num:4,den:4},M=64,N=48,C=!1,E=!1,I=!0,_=105,B=95,P=85,D=.25,L=0,O={},H=0;function V(e){for(var t=h.length-1;t>=0;t--)if("program"===h[t].cmd)return void(h[t].channel=e)}function F(e){return e/1e6}function z(e){return Math.round(e*T*1e6)/1e6}function j(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return.375;case 16:return.125}return.25}r=function(r,i){i||(i={}),e=[],t=[0,0,0,0,0,0,0],!1,a=[],s=void 0,o=void 0,T=1,c=void 0,l=void 0,h=void 0,u=void 0,d=0,S={num:4,den:4},f=[],p=!1,g=r.length,m=!1,v=[],M=64,N=48,b=void 0,y=void 0,C=!!i.chordsOff,E=!1,I=!0,_=105,B=95,P=85,D=.25,x=void 0,k=void 0,L=0,A=[],!1,O={},r.length>0&&r[0].length>0&&(H=r[0][0].pickupLength),function(e){for(var t=0;t<e.length;t++){for(var n=e[t],r={},i=0,a=0,s=1,o=0;o<n.length;o++){var c=n[o];if("tempo"!==c.el_type){c.time=a;var l=c.duration?c.duration:0;if(a+=Math.round(l*s*1e6),c.pitches){for(var h=0;h<c.pitches.length;h++){var u=c.pitches[h];if(u)if(u.duration=c.duration,u.startTie)void 0===r[u.pitch]?r[u.pitch]={el:o,pitch:h}:(n[r[u.pitch].el].pitches[r[u.pitch].pitch].duration+=u.duration,c.pitches[h]=null);else if(u.endTie){var d=r[u.pitch];if(d){var f=u.duration;delete n[d.el].pitches[d.pitch].startTie,n[d.el].pitches[d.pitch].duration+=f,c.pitches[h]=null,delete r[u.pitch]}else delete u.endTie}}delete c.duration}}else i?s=c.qpm?i/c.qpm:1:i=c.qpm}for(var p in r)if(r.hasOwnProperty(p)){var m=r[p];delete n[m.el].pitches[m.pitch].startTie}}}(r);for(var z=0;z<r.length;z++){n=0,-1;var q=r[z];h=[{cmd:"program",channel:z,instrument:c}],u=void 0,w=0;var Y=!1;(!0===i.voicesOff||i.voicesOff&&i.voicesOff.length&&i.voicesOff.indexOf(z)>=0)&&(Y=!0);for(var W=0;W<q.length;W++){var R=q[W];switch(R.el_type){case"name":u={cmd:"text",type:"name",text:R.trackName};break;case"note":G(R,Y)&&(p=z);break;case"key":t=K(R);break;case"meter":o||(o=R),D=j(S=R);break;case"tempo":s?T=R.qpm?s/R.qpm:1:s=R.qpm;break;case"transpose":n=R.transpose;break;case"bar":f.length>0&&(!1===p||z===p)&&(re(w,F(R.time)),v=[]),e=[],0===z&&ae(r.length+1),E=!1,y=b,w=F(R.time);break;case"bagpipes":!0;break;case"instrument":if(void 0===c&&(c=R.program),l=R.program,h.length>0&&"program"===h[h.length-1].cmd)h[h.length-1].instrument=R.program;else{var U;for(U=h.length-1;U>=0&&"program"!==h[U].cmd;U--);(U<0||h[U].instrument!==R.program)&&h.push({cmd:"program",channel:0,instrument:R.program})}break;case"channel":V(R.channel);break;case"drum":O=ie(R.params);break;case"gchord":i.chordsOff||(C=R.tacet);break;case"beat":_=R.beats[0],B=R.beats[1],P=R.beats[2];break;case"vol":x=R.volume;break;case"volinc":k=R.volume;break;case"beataccents":I=R.value;break;default:console.log("MIDI creation. Unknown el_type: "+R.el_type+"\n")}}void 0===h[0].instrument&&(h[0].instrument=c||0),u&&h.unshift(u),a.push(h),f.length>0&&(m=!0),A.length>0&&!0}return f.length>0&&a.push(f),A.length>0&&a.push(A),{tempo:s,instrument:c,tracks:a,totalDuration:d}};var q=["break","(break)","no chord","n.c.","tacet"];function Y(e,t,n){return(n-e)/t}function W(e){var t=!1,r=function(e){if(C)return"break";if(m||!e.chord||0===e.chord.length)return null;for(var t=0;t<e.chord.length;t++){var n=e.chord[t];if("default"===n.position)return n.name;if(q.indexOf(n.name.toLowerCase())>=0)return"break"}return null}(e);if(r){var i=function(e){if(0===e.length)return;if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-2)).length)return;t=e.substring(0,1)}var r=Q[t];if(!r)return;var i=n;for(;i<-8;)i+=12;for(;i>8;)i-=12;var a,s=(r+=i)-5;1===e.length&&(a=$(r,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(r--,s--,o=o.substring(1)):"#"!==c&&"♯"!==c||(r++,s++,o=o.substring(1));var l=o.split("/");if((a=$(r,l[0])).length>=3){var h=a[2]-a[0];s=s+h-7}if(2===l.length){if(Q[l[1].substring(0,1)]){var u={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;r=Q[l[1].substring(0,1)]+u+i,s=r}}return{boom:r,boom2:s,chick:a}}(r);if(i){0===f.length&&(t=!0,f.push({cmd:"program",channel:g,instrument:0})),b=i;var a=Y(w,j(S),F(e.time));v.push({chord:b,beat:a,start:F(e.time)})}}return t}function R(e,t){var n=t.start,r=t.duration,i=z(1/32);switch(e){case"trill":for(var a=1;r>0;)h.push({cmd:"note",pitch:t.pitch+a,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),a=1===a?0:1,r-=i,n+=i;break;case"mordent":h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,h.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:r,gap:0,instrument:l});break;case"lowermordent":h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,h.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:r,gap:0,instrument:l});break;case"turn":i=t.duration/5,h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),h.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:n+i,duration:i,gap:0,instrument:l,style:"decoration"}),h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n+2*i,duration:i,gap:0,instrument:l,style:"decoration"}),h.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:n+3*i,duration:i,gap:0,instrument:l,style:"decoration"}),h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n+4*i,duration:i,gap:0,instrument:l});break;case"roll":for(;r>0;)h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=2*i,n+=2*i}}function G(e,t){h.length;var n,r=function(e,t){if(t)return 0;var n;if(x)n=x,x=void 0;else if(I)if(H>e)n=P;else{S.num,S.den;var r=Y(w,j(S),e);n=0===r?_:parseInt(r,10)===r?B:P}else n=B;return k&&(n+=k,k=void 0),n<0&&(n=0),n>127&&(n=127),t?0:n}(F(e.time),t),a=W(e);if(e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(n=function(e,t){for(var n,r=0,i=[],a=0;a<e.length;a++)n=e[a],r+=n.duration;var s=t/2/r;for(a=0;a<e.length;a++){var o=X(n=e[a]);i.push({pitch:o,duration:n.duration*s})}return i}(e.gracenotes,e.pitches[0].duration),e.elem&&(e.elem.midiGraceNotePitches=function(e,t,n,r){var i=[];n=Math.round(n);for(var a=0;a<e.length;a++){var s=e[a];h.push({cmd:"note",pitch:s.pitch,volume:n,start:t,duration:s.duration,gap:0,instrument:r,style:"grace"}),i.push({pitch:s.pitch,durationInMeasures:s.duration,volume:n,instrument:r}),t+=s.duration}return i}(n,F(e.time),2*r/3,l))),e.elem){var o=F(e.time)/D/s*60*1e3;void 0===e.elem.currentTrackMilliseconds?e.elem.currentTrackMilliseconds=o:void 0===e.elem.currentTrackMilliseconds.length?e.elem.currentTrackMilliseconds=[e.elem.currentTrackMilliseconds,o]:e.elem.currentTrackMilliseconds.push(o)}if(e.pitches){var c="",u=function(e,t){var n={};if(e.decoration)for(var r=0;r<e.decoration.length;r++)"staccato"===e.decoration[r]?n.thisBreakBetweenNotes="staccato":"tenuto"===e.decoration[r]?n.thisBreakBetweenNotes="tenuto":"accent"===e.decoration[r]?n.velocity=Math.min(127,1.5*t):"trill"===e.decoration[r]?n.noteModification="trill":"lowermordent"===e.decoration[r]?n.noteModification="lowermordent":"uppermordent"===e.decoration[r]||"mordent"===e.decoration[r]?n.noteModification="mordent":"turn"===e.decoration[r]?n.noteModification="turn":"roll"===e.decoration[r]&&(n.noteModification="roll");return n}(e,r);u.thisBreakBetweenNotes&&(c=u.thisBreakBetweenNotes),u.velocity&&(r=u.velocity);var f=e.pitches;if("rhythm"===e.style&&(E=!0,b&&b.chick)){f=[];for(var p=0;p<b.chick.length;p++){var m=i.clone(e.pitches[0]);m.actualPitch=b.chick[p],f.push(m)}}e.elem&&(e.elem.midiPitches=[]);for(var g=0;g<f.length;g++){var v=f[g];if(v){v.startSlur&&(L+=v.startSlur.length),v.endSlur&&(L-=v.endSlur.length);var y={cmd:"note",pitch:v.actualPitch?v.actualPitch:X(v),volume:r,start:F(e.time),duration:z(v.duration),instrument:l};if(e.gracenotes&&(y.duration=y.duration/2,y.start=y.start+y.duration),e.elem&&e.elem.midiPitches.push(y),u.noteModification)R(u.noteModification,y);else{switch(L>0?y.endType="tenuto":c&&(y.endType=c),y.endType){case"tenuto":y.gap=-.001;break;case"staccato":var A=.4*y.duration;y.gap=s/60*A;break;default:y.gap=0}h.push(y)}}}h.length-1}var T=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);return d=Math.max(d,F(e.time)+z(T)),a}var U=[0,2,4,5,7,9,11];function X(r){if(void 0!==r.midipitch)return r.midipitch;var i=r.soundPitch||0===r.soundPitch?r.soundPitch:r.pitch;if(r.accidental)switch(r.accidental){case"sharp":e[i]=1;break;case"flat":e[i]=-1;break;case"natural":e[i]=0;break;case"dblsharp":e[i]=2;break;case"dblflat":e[i]=-2}var a=12*function(e){return Math.floor(e/7)}(i)+U[Z(i)]+60;if(void 0!==e[i]){var s=t[Z(i)],o=e[i],c=0;-1===s?c=o+1:0===s?c=o:1===s&&(c=o-1),a+=s+c}else a+=t[Z(i)];return a+=n}function K(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var n=0;n<e.accidentals.length;n++){var r=e.accidentals[n],i="sharp"===r.acc?1:"natural"===r.acc?0:-1;t[Z(r.note.toLowerCase().charCodeAt(0)-"c".charCodeAt(0))]+=i}return t}function Z(e){return(e%=7)<0&&(e+=7),e}var Q={A:33,B:35,C:36,D:38,E:40,F:41,G:43};var J={dim:[0,3,6],"°":[0,3,6],"˚":[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"˚7":[0,3,6,9],"ø7":[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7♭5":[0,3,6,10],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"7b5":[0,4,6,10],"7(b5)":[0,4,6,10],"7♭5":[0,4,6,10],"7(b9,b5)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7(#9,b5)":[0,4,6,10,15],"7#9b5":[0,4,6,10,15],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],m:[0,3,7],"-":[0,3,7],m6:[0,3,7,9],"-6":[0,3,7,9],m7:[0,3,7,10],"-7":[0,3,7,10],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"-6/9":[0,3,7,9,14],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-maj7":[0,3,7,11],"-9+7":[0,3,7,11,13],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-maj9":[0,3,7,11,14],"-∆9":[0,3,7,11,14],mM9:[0,3,7,11,14],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],"6add9":[0,4,7,9,14],69:[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,7,10,14,17],13:[0,4,7,10,14,21],"7b9":[0,4,7,10,13],"7♭9":[0,4,7,10,13],"7(b9)":[0,4,7,10,13],"7(#9)":[0,4,7,10,15],"7#9":[0,4,7,10,15],"(13)":[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7(#9,b13)":[0,4,7,10,15,20],"7(#11)":[0,4,7,10,14,18],"7#11":[0,4,7,10,14,18],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"9(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"13(#11)":[0,4,7,10,18,21],"13#11":[0,4,7,10,18,21],maj7:[0,4,7,11],"∆7":[0,4,7,11],"Δ7":[0,4,7,11],maj9:[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7(11)":[0,4,7,11,17],"maj7(#11)":[0,4,7,11,18],"maj7(13)":[0,4,7,14,21],"maj7(9,13)":[0,4,7,11,14,21],"7sus4":[0,5,7,10],m7sus4:[0,3,7,10,17],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,10,14],"13sus4":[0,5,7,10,14,21],aug7:[0,4,8,10],"+7":[0,4,8,10],"+":[0,4,8],"7#5":[0,4,8,10],"7♯5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9♯5":[0,4,8,10,14],"9+5":[0,4,8,10,14],"-7(#5)":[0,3,8,10],"-7#5":[0,3,8,10],"7(#5)":[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"maj7(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5,#11)":[0,4,8,11,18],"maj7#5#11":[0,4,8,11,18],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,21],"13#5":[0,4,8,10,14,21]};function $(e,t){var n=J[t];n||(n="ma"===t.slice(0,2).toLowerCase()||"M"===t.charAt(0)?J.M:"m"===t.charAt(0)||"-"===t.charAt(0)?J.m:J.M),e+=12;for(var r=[],i=0;i<n.length;i++)r.push(e+n[i]);return r}function ee(e,t,n,r,i){void 0!==e&&f.push({cmd:"note",pitch:e,volume:n,start:w+r*z(t),duration:z(i),gap:0,instrument:0})}function te(e,t,n,r,i){for(var a=0;a<e.length;a++)f.push({cmd:"note",pitch:e[a],volume:n,start:w+r*z(t),duration:z(i),gap:0,instrument:0})}var ne={"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","boom","","chick","boom2","","chick"]};function re(e,t){var n=S.num,r=S.den,i=1/r,a=i/2,s=ne[n+"/"+r],o=parseInt(n,10)/parseInt(r,10)-(t-e)/T;if(Math.abs(o)<1e-5&&(o=!1),!s||o){s=[];for(var c=(t-e)/T/i,l=0;l<c;l++)s.push("chick")}if(0===v.length&&v.push({beat:0,chord:b}),0!==v[0].beat&&b&&y&&v.unshift({beat:0,chord:y}),1!==v.length){for(var h=.125===i?3:1,u={},d=0;d<v.length;d++){var f=v[d];u[""+Math.round(f.beat*h)]=f}for(var p=0;p<s.length;p++){var m,g;if(u[""+p]&&(m=u[""+p]),!E&&m)switch(s[p]){case"boom":u[""+(p+1)]?te(m.chord.chick,i,N,p,a):(ee(m.chord.boom,i,M,p,a),g=m.chord.boom);break;case"boom2":u[""+(p+1)]?te(m.chord.chick,i,N,p,a):g===m.chord.boom?(ee(m.chord.boom2,i,M,p,a),g=void 0):(ee(m.chord.boom,i,M,p,a),g=m.chord.boom);break;case"chick":te(m.chord.chick,i,N,p,a);break;case"":u[""+p]&&te(m.chord.chick,i,N,p,a)}}}else for(var w=v[0].beat;w<s.length;w++)if(!E)switch(s[w]){case"boom":ee(v[0].chord.boom,i,M,w,a);break;case"boom2":ee(v[0].chord.boom2,i,M,w,a);break;case"chick":te(v[0].chord.chick,i,N,w,a)}}function ie(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],n=[],r="",i=0,a=0;a<t.length;a++)if("d"===t[a]&&i++,"d"===t[a]||"z"===t[a])0!==r.length?(n.push(r),r=t[a]):r+=t[a];else{if(0===r.length)return{on:!1};r+=t[a]}if(0!==r.length&&n.push(r),e.pattern.length!==2*i+1)return{on:!1};for(var s={on:!0,bars:e.bars,pattern:[]},o=j(S),c=0,l=0;l<n.length;l++){r=n[l];for(var h=1,u=!1,d=0,f=1;f<r.length;f++)switch(r[f]){case"/":0!==d&&(h*=d),d=0,u=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d=10*d+r[f];break;default:return{on:!1}}u?(0===d&&(d=2),h/=d):d&&(h*=d),"d"===r[0]?(s.pattern.push({len:h*o,pitch:e.pattern[1+c],velocity:e.pattern[1+c+i]}),c++):s.pattern.push({len:h*o,pitch:null})}for(var p=0,m=S.num/S.den,g=0;g<s.pattern.length;g++)p+=s.pattern[g].len;var v=p/(e.bars?e.bars:1)/m;for(g=0;g<s.pattern.length;g++)s.pattern[g].len=s.pattern[g].len/v;return s}function ae(e){if(0!==A.length||O.on){var t=S.num/S.den;if(0===A.length){if(d<t)return;A.push({cmd:"program",channel:e,instrument:128})}if(O.on)for(var n=w,r=0;r<O.pattern.length;r++){var i=z(O.pattern[r].len);O.pattern[r].pitch&&A.push({cmd:"note",pitch:O.pattern[r].pitch,volume:O.pattern[r].velocity,start:n,duration:i,gap:0,instrument:128}),n+=i}}}}(),e.exports=r},function(e,t,n){var r=n(11),i=n(0);e.exports=function(e){var t=this;this.reset=function(){e.version="1.1.0",e.media="screen",e.metaText={},e.formatting={},e.lines=[],e.staffNum=0,e.voiceNum=0,e.lineNum=0,e.runningFonts={},delete e.visualTranspose},this.setVisualTranspose=function(t){t&&(e.visualTranspose=t)},this.resolveOverlays=function(){for(var t=!1,n=[],r=0;r<e.lines.length;r++){var a=e.lines[r];if(a.staff)for(var s=0;s<a.staff.length;s++){for(var o=a.staff[s],c=[],l=0;l<o.voices.length;l++){var h=o.voices[l];c.push({hasOverlay:!1,voice:[],snip:[]}),n[r]=0;for(var u=0,d=!1,f=0,p=-1,m=0;m<h.length;m++){var g=h[m];if("overlay"!==g.el_type||d)"bar"===g.el_type?(d?(d=!1,c[l].snip.push({start:p,len:m-p}),c[l].voice.push(g)):(u>0&&c[l].voice.push({el_type:"note",duration:u,rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}),c[l].voice.push(g)),u=0):"note"===g.el_type?d?c[l].voice.push(g):(u+=g.duration,n[r]+=g.duration):"scale"!==g.el_type&&"stem"!==g.el_type&&"overlay"!==g.el_type&&"style"!==g.el_type&&"transpose"!==g.el_type||c[l].voice.push(g);else{t=!0,d=!0,p=m,c[l].hasOverlay=!0,0===f&&(f=n[r]);for(var v=0;v<r;v++)n[v]&&e.lines[v].staff&&o.voices.length>=e.lines[v].staff[0].voices.length&&e.lines[v].staff[0].voices.push([{el_type:"note",duration:n[v],rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}])}}c[l].hasOverlay&&0===c[l].snip.length&&c[l].snip.push({start:p,len:h.length-p})}for(l=0;l<c.length;l++){var b=c[l];if(b.hasOverlay){o.voices.push(b.voice);for(var y=b.snip.length-1;y>=0;y--){var w=b.snip[y];o.voices[l].splice(w.start,w.len)}for(y=0;y<o.voices[o.voices.length-1].length;y++){o.voices[o.voices.length-1][y]=i.clone(o.voices[o.voices.length-1][y]);var x=o.voices[o.voices.length-1][y];"bar"===x.el_type&&x.startEnding&&delete x.startEnding,"bar"===x.el_type&&x.endEnding&&delete x.endEnding}}}}}return t},this.cleanUp=function(t,n,a,s,o){this.closeLine(),delete e.runningFonts,e.metaText.tempo&&e.metaText.tempo.bpm&&!e.metaText.tempo.duration&&(e.metaText.tempo.duration=[e.getBeatLength()]);var c,l,h,u=!1;for(c=0;c<e.lines.length;c++)if(void 0!==e.lines[c].staff){var d=!1;for(l=0;l<e.lines[c].staff.length;l++)if(void 0===e.lines[c].staff[l])u=!0,e.lines[c].staff[l]=null;else for(h=0;h<e.lines[c].staff[l].voices.length;h++)void 0===e.lines[c].staff[l].voices[h]?e.lines[c].staff[l].voices[h]=[]:this.containsNotes(e.lines[c].staff[l].voices[h])&&(d=!0);d||(e.lines[c]=null,u=!0)}if(u&&(e.lines=i.compact(e.lines),i.each(e.lines,(function(e){e.staff&&(e.staff=i.compact(e.staff))}))),a)for(;g(e.lines,a););if(s){for(u=!1,c=0;c<e.lines.length;c++)if(void 0!==e.lines[c].staff)for(l=0;l<e.lines[c].staff.length;l++){var f=!1;for(h=0;h<e.lines[c].staff[l].voices.length;h++)this.containsNotesStrict(e.lines[c].staff[l].voices[h])&&(f=!0);f||(u=!0,e.lines[c].staff[l]=null)}u&&i.each(e.lines,(function(e){e.staff&&(e.staff=i.compact(e.staff))}))}for(function(e){for(var t=!0,n=0;n<e.length;n++){var r=e[n];if(r.staff){for(var i=0;i<r.staff.length;i++){var a=r.staff[i];if(a.title){for(var s=!1,o=0;o<a.title.length;o++)a.title[o]?(a.title[o]=t?a.title[o].name:a.title[o].subname,a.title[o]?s=!0:a.title[o]=""):a.title[o]="";s||delete a.title}}t=!1}}}(e.lines),c=0;c<e.lines.length;c++)if(e.lines[c].staff)for(l=0;l<e.lines[c].staff.length;l++)delete e.lines[c].staff[l].workingClef;for(;this.resolveOverlays(););function p(e){for(var t,n=function(e,n,r){if(void 0===o[r]){for(t=0;t<o.length;t++)if(void 0!==o[t]){r=t;break}if(void 0===o[r]){var a=100*r+1;i.each(e.endSlur,(function(e){a===e&&--a})),o[r]=[a]}}for(var s,c=0;c<n;c++)s=o[r].pop(),e.endSlur.push(s);return 0===o[r].length&&delete o[r],s},r=function(e,t,n,r){e.startSlur=[],void 0===o[n]&&(o[n]=[]);for(var a=100*n+1,s=0;s<t;s++)r&&(i.each(r,(function(e){a===e&&++a})),i.each(r,(function(e){a===e&&++a})),i.each(r,(function(e){a===e&&++a}))),i.each(o[n],(function(e){a===e&&++a})),i.each(o[n],(function(e){a===e&&++a})),o[n].push(a),e.startSlur.push({label:a}),e.dottedSlur&&(e.startSlur[e.startSlur.length-1].style="dotted",delete e.dottedSlur),a++},a=0;a<e.length;a++){var s=e[a];if("note"===s.el_type){if(s.gracenotes)for(var c=0;c<s.gracenotes.length;c++){if(s.gracenotes[c].endSlur){var l=s.gracenotes[c].endSlur;s.gracenotes[c].endSlur=[];for(var h=0;h<l;h++)n(s.gracenotes[c],1,20)}s.gracenotes[c].startSlur&&(t=s.gracenotes[c].startSlur,r(s.gracenotes[c],t,20))}if(s.endSlur&&(t=s.endSlur,s.endSlur=[],n(s,t,0)),s.startSlur&&r(s,t=s.startSlur,0),s.pitches){for(var u=[],d=0;d<s.pitches.length;d++)if(s.pitches[d].endSlur){var f=s.pitches[d].endSlur;s.pitches[d].endSlur=[];for(var p=0;p<f;p++){var m=n(s.pitches[d],1,d+1);u.push(m)}}for(d=0;d<s.pitches.length;d++)s.pitches[d].startSlur&&(t=s.pitches[d].startSlur,r(s.pitches[d],t,d+1,u));s.gracenotes&&s.pitches[0].endSlur&&100===s.pitches[0].endSlur[0]&&s.pitches[0].startSlur&&(s.gracenotes[0].endSlur?s.gracenotes[0].endSlur.push(s.pitches[0].startSlur[0].label):s.gracenotes[0].endSlur=[s.pitches[0].startSlur[0].label],1===s.pitches[0].endSlur.length?delete s.pitches[0].endSlur:100===s.pitches[0].endSlur[0]?s.pitches[0].endSlur.shift():100===s.pitches[0].endSlur[s.pitches[0].endSlur.length-1]&&s.pitches[0].endSlur.pop(),1===o[1].length?delete o[1]:o[1].pop())}}}}function m(e){r.fixClef(e)}function g(e,t){for(c=0;c<e.length;c++)if(void 0!==e[c].staff)for(l=0;l<e[c].staff.length;l++){var n=[];for(h=0;h<e[c].staff[l].voices.length;h++)for(var r=e[c].staff[l].voices[h],a=0,s=0;s<r.length;s++)if("bar"===r[s].el_type){if(++a>=t&&s<r.length-1){var o=v(e,c);if(!o){var u=JSON.parse(JSON.stringify(e[c]));e.push(i.clone(u)),o=e[e.length-1];for(var d=0;d<o.staff.length;d++)for(var f=0;f<o.staff[d].voices.length;f++)o.staff[d].voices[f]=[]}var p=s+1,m=e[c].staff[l].voices[h].slice(p);return e[c].staff[l].voices[h]=e[c].staff[l].voices[h].slice(0,p),o.staff[l].voices[h]=n.concat(m.concat(o.staff[l].voices[h])),!0}}else r[s].duration||n.push(r[s])}return!1}function v(e,t){for(t++;e.length>t;){if(e[t].staff)return e[t];t++}return null}for(e.lineNum=0;e.lineNum<e.lines.length;e.lineNum++){var b=e.lines[e.lineNum].staff;if(b)for(e.staffNum=0;e.staffNum<b.length;e.staffNum++)for(b[e.staffNum].clef&&m(b[e.staffNum].clef),e.voiceNum=0;e.voiceNum<b[e.staffNum].voices.length;e.voiceNum++){var y=b[e.staffNum].voices[e.voiceNum];p(y);for(var w=0;w<y.length;w++)"clef"===y[w].el_type&&m(y[w]);if(y.length>0&&y[y.length-1].barNumber){var x=v(e.lines,e.lineNum);x&&(x.staff[0].barNumber=y[y.length-1].barNumber),delete y[y.length-1].barNumber}}}return e.formatting.pagewidth||(e.formatting.pagewidth=t),e.formatting.pageheight||(e.formatting.pageheight=n),delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,o},this.reset(),this.getLastNote=function(){if(e.lines[e.lineNum]&&e.lines[e.lineNum].staff&&e.lines[e.lineNum].staff[e.staffNum]&&e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum])for(var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum].length-1;t>=0;t--){var n=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum][t];if("note"===n.el_type)return n}return null},this.addTieToLastNote=function(e){var t=this.getLastNote();return!!(t&&t.pitches&&t.pitches.length>0)&&(t.pitches[0].startTie={},e&&(t.pitches[0].startTie.style="dotted"),!0)},this.getDuration=function(e){return e.duration?e.duration:0},this.closeLine=function(){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam},this.appendElement=function(n,r,a,s){var o=e;s.el_type=n,null!==r&&(s.startChar=r),null!==a&&(s.endChar=a);var c=function(){void 0!==o.potentialStartBeam&&void 0!==o.potentialEndBeam&&(o.potentialStartBeam.startBeam=!0,o.potentialEndBeam.endBeam=!0),delete o.potentialStartBeam,delete o.potentialEndBeam};"note"===n?t.getDuration(s)>=.25||s.force_end_beam_last&&void 0!==o.potentialStartBeam?c():s.end_beam&&void 0!==o.potentialStartBeam?void 0===s.rest?(o.potentialStartBeam.startBeam=!0,s.endBeam=!0,delete o.potentialStartBeam,delete o.potentialEndBeam):c():void 0===s.rest&&(void 0===o.potentialStartBeam?s.end_beam||(o.potentialStartBeam=s,delete o.potentialEndBeam):o.potentialEndBeam=s):c();delete s.end_beam,delete s.force_end_beam_last,function(e){var t=o.lines[o.lineNum].staff[o.staffNum];if(t){if(void 0!==e.pitches){var n=t.workingClef.verticalPos;i.each(e.pitches,(function(e){e.verticalPos=e.pitch-n}))}if(void 0!==e.gracenotes){var r=t.workingClef.verticalPos;i.each(e.gracenotes,(function(e){e.verticalPos=e.pitch-r}))}t.voices[o.voiceNum].push(e)}}(s)},this.appendStartingElement=function(t,n,r,a){var s;this.closeLine(),"key"===t&&(s=a.impliedNaturals,delete a.impliedNaturals,delete a.explicitAccidentals);var o=i.clone(a);if(e.lines[e.lineNum].staff){e.lines[e.lineNum].staff.length<=e.staffNum&&(e.lines[e.lineNum].staff[e.staffNum]={},e.lines[e.lineNum].staff[e.staffNum].clef=i.clone(e.lines[e.lineNum].staff[0].clef),e.lines[e.lineNum].staff[e.staffNum].key=i.clone(e.lines[e.lineNum].staff[0].key),e.lines[e.lineNum].staff[0].meter&&(e.lines[e.lineNum].staff[e.staffNum].meter=i.clone(e.lines[e.lineNum].staff[0].meter)),e.lines[e.lineNum].staff[e.staffNum].workingClef=i.clone(e.lines[e.lineNum].staff[0].workingClef),e.lines[e.lineNum].staff[e.staffNum].voices=[[]]),"clef"===t&&(e.lines[e.lineNum].staff[e.staffNum].workingClef=o);for(var c=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum],l=0;l<c.length;l++){if("note"===c[l].el_type||"bar"===c[l].el_type)return o.el_type=t,o.startChar=n,o.endChar=r,s&&(o.accidentals=s.concat(o.accidentals)),void c.push(o);if(c[l].el_type===t)return o.el_type=t,o.startChar=n,o.endChar=r,s&&(o.accidentals=s.concat(o.accidentals)),void(c[l]=o)}e.lines[e.lineNum].staff[e.staffNum][t]=a}},this.getNumLines=function(){return e.lines.length},this.pushLine=function(t){e.vskipPending&&(t.vskip=e.vskipPending,delete e.vskipPending),e.lines.push(t)},this.addSubtitle=function(e){this.pushLine({subtitle:e})},this.addSpacing=function(t){e.vskipPending=t},this.addNewPage=function(e){this.pushLine({newpage:e})},this.addSeparator=function(e,t,n){this.pushLine({separator:{spaceAbove:Math.round(e),spaceBelow:Math.round(t),lineLength:Math.round(n)}})},this.addText=function(e){this.pushLine({text:e})},this.addCentered=function(e){this.pushLine({text:[{text:e,center:!0}]})},this.containsNotes=function(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type||"bar"===e[t].el_type)return!0;return!1},this.containsNotesStrict=function(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type&&void 0===e[t].rest)return!0;return!1},this.changeVoiceScale=function(e){t.appendElement("scale",null,null,{size:e})},this.startNewLine=function(n){var r=e;this.closeLine();var i=function(e){var n=r.lines[r.lineNum].staff[r.staffNum];if(n.voices[r.voiceNum]=[],n.title||(n.title=[]),n.title[r.voiceNum]={name:e.name,subname:e.subname},e.style&&t.appendElement("style",null,null,{head:e.style}),e.stem)t.appendElement("stem",null,null,{direction:e.stem});else if(r.voiceNum>0){if(void 0!==n.voices[0]){for(var i=!1,a=0;a<n.voices[0].length;a++)"stem"===n.voices[0].el_type&&(i=!0);if(!i){n.voices[0].splice(0,0,{el_type:"stem",direction:"up"})}}t.appendElement("stem",null,null,{direction:"down"})}e.scale&&t.appendElement("scale",null,null,{size:e.scale})},a=function(e){e.key&&e.key.impliedNaturals&&(e.key.accidentals=e.key.accidentals.concat(e.key.impliedNaturals),delete e.key.impliedNaturals),r.lines[r.lineNum].staff[r.staffNum]={voices:[],clef:e.clef,key:e.key,workingClef:e.clef},void 0!==e.stafflines&&(r.lines[r.lineNum].staff[r.staffNum].clef.stafflines=e.stafflines,r.lines[r.lineNum].staff[r.staffNum].workingClef.stafflines=e.stafflines),e.staffscale&&(r.lines[r.lineNum].staff[r.staffNum].staffscale=e.staffscale),e.annotationfont&&t.setLineFont("annotationfont",e.annotationfont),e.gchordfont&&t.setLineFont("gchordfont",e.gchordfont),e.tripletfont&&t.setLineFont("tripletfont",e.tripletfont),e.vocalfont&&t.setLineFont("vocalfont",e.vocalfont),e.bracket&&(r.lines[r.lineNum].staff[r.staffNum].bracket=e.bracket),e.brace&&(r.lines[r.lineNum].staff[r.staffNum].brace=e.brace),e.connectBarLines&&(r.lines[r.lineNum].staff[r.staffNum].connectBarLines=e.connectBarLines),e.barNumber&&(r.lines[r.lineNum].staff[r.staffNum].barNumber=e.barNumber),i(e),e.part&&t.appendElement("part",e.part.startChar,e.part.endChar,{title:e.part.title}),void 0!==e.meter&&(r.lines[r.lineNum].staff[r.staffNum].meter=e.meter),r.vskipPending&&(r.lines[r.lineNum].vskip=r.vskipPending,delete r.vskipPending)};if(void 0===e.lines[e.lineNum])!function(e){r.lines[r.lineNum]={staff:[]},a(e)}(n);else if(void 0===e.lines[e.lineNum].staff)e.lineNum++,this.startNewLine(n);else if(void 0===e.lines[e.lineNum].staff[e.staffNum])a(n);else if(void 0===e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum])i(n);else{if(!this.containsNotes(e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum]))return;e.lineNum++,this.startNewLine(n)}},this.setRunningFont=function(t,n){e.runningFonts[t]=n},this.setLineFont=function(t,n){if(e.runningFonts[t]){for(var r=!1,i=Object.keys(n),a=0;a<i.length;a++)e.runningFonts[t][i[a]]!==n[i[a]]&&(r=!0);r&&(e.lines[e.lineNum].staff[e.staffNum][t]=n)}e.runningFonts[t]=n},this.setBarNumberImmediate=function(e){var t=this.getCurrentVoice();if(t&&t.length>0){var n=t[t.length-1];if("bar"!==n.el_type)return e-1;void 0!==n.barNumber&&(n.barNumber=e)}return e},this.hasBeginMusic=function(){for(var t=0;t<e.lines.length;t++)if(e.lines[t].staff)return!0;return!1},this.isFirstLine=function(t){for(var n=t-1;n>=0;n--)if(void 0!==e.lines[n].staff)return!1;return!0},this.getCurrentVoice=function(){var t=e.lines[e.lineNum];if(!t)return null;var n=t.staff[e.staffNum];return n&&void 0!==n.voices[e.voiceNum]?n.voices[e.voiceNum]:null},this.setCurrentVoice=function(t,n){e.staffNum=t,e.voiceNum=n;for(var r=0;r<e.lines.length;r++)if(e.lines[r].staff&&(void 0===e.lines[r].staff[t]||void 0===e.lines[r].staff[t].voices[n]||!this.containsNotes(e.lines[r].staff[t].voices[n])))return void(e.lineNum=r);e.lineNum=r},this.addMetaText=function(t,n){void 0===e.metaText[t]?e.metaText[t]=n:e.metaText[t]+="\n"+n},this.addMetaTextArray=function(t,n){void 0===e.metaText[t]?e.metaText[t]=[n]:e.metaText[t].push(n)},this.addMetaTextObj=function(t,n){e.metaText[t]=n}}},function(e,t,n){var r=n(0);e.exports=function(e){"use strict";for(var t="",n=(e=r.strip(e)).split("\nX:"),i=1;i<n.length;i++)n[i]="X:"+n[i];var a=0,s=[];if(r.each(n,(function(e){s.push({abc:e,startPos:a}),a+=e.length+1})),s.length>1&&!r.startsWith(s[0].abc,"X:")){var o=s.shift().abc.split("\n");r.each(o,(function(e){r.startsWith(e,"%%")&&(t+=e+"\n")}))}var c=t;return r.each(s,(function(e){var n=e.abc.indexOf("\n\n");n>0&&(e.abc=e.abc.substring(0,n)),e.pure=e.abc,e.abc=t+e.abc,e.title="";var i=e.pure.split("T:");i.length>1&&(i=i[1].split("\n"),e.title=r.strip(i[0]));var a=e.pure.substring(2,e.pure.indexOf("\n"));e.id=r.strip(a)})),{header:c,tunes:s}}},function(e,t,n){var r=n(1),i=n(38),a=n(54),s=n(56),o=n(57),c=n(58),l=n(59),h=n(60),u=n(61),d=n(62),f=n(70),p=n(71),m=n(72),g=n(73),v=n(20),b=function(e,t){t=t||{},this.selectionColor=t.selectionColor,this.dragColor=t.dragColor?t.dragColor:t.selectionColor,this.dragging=!!t.dragging,this.selectTypes=t.selectTypes,this.responsive=t.responsive,this.space=3*r.SPACE,this.scale=t.scale?parseFloat(t.scale):0,this.classes=new f({shouldAddClasses:t.add_classes}),this.scale>.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new a(e,t.regression),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),this.renderer.controller=this,this.reset()};b.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0},b.prototype.engraveABC=function(e,t){void 0===e[0]&&(e=[e]),this.reset();for(var n=0;n<e.length;n++)void 0===t&&(t=n),this.getFontAndAttr=new p(e[n].formatting,this.classes),this.getTextSize=new m(this.getFontAndAttr,this.renderer.paper),this.engraveTune(e[n],t)},b.prototype.adjustNonScaledItems=function(e){this.width/=e,this.renderer.adjustNonScaledItems(e)},b.prototype.getMeasureWidths=function(e){this.reset(),this.getFontAndAttr=new p(e.formatting,this.classes),this.getTextSize=new m(this.getFontAndAttr,this.renderer.paper),this.setupTune(e,0),this.constructTuneElements(e);d(this.renderer,e,0,this.space);var t={left:0,measureWidths:[],height:0,total:0};t.height=this.renderer.padding.top+this.renderer.spacing.music+this.renderer.padding.bottom+24;for(var n=0;n<e.lines.length;n++){var i=e.lines[n];if(i.staff){if(i.staffGroup.voices.length>0)for(var a=i.staffGroup.voices[0],s=!1,o=0,c=0;c<a.children.length;c++){var l=a.children[c];s||l.isClef||l.isKeySig||(s=!0,t.left=l.x,o=l.x),"bar"===l.type&&(t.measureWidths.push(l.x-o),t.total+=l.x-o,o=l.x)}t.height+=v(i.staffGroup)*r.STEP}}return t},b.prototype.setupTune=function(e,t){this.classes.reset(),this.renderer.newTune(e),this.engraver=new i(this.getTextSize,t,{bagpipes:e.formatting.bagpipes,flatbeams:e.formatting.flatbeams,graceSlurs:!1!==e.formatting.graceSlurs}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=e.getMeterFraction().num/e.getMeterFraction().den,e.formatting.staffwidth?this.width=1.33*e.formatting.staffwidth:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var n=e.formatting.scale?e.formatting.scale:this.scale;return"resize"===this.responsive&&(n=void 0),void 0===n&&(n=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(n),n},b.prototype.constructTuneElements=function(e){var t,n;e.topText=new l(e.metaText,e.formatting,e.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.getTextSize);var r=!1,i=!1;for(t=0;t<e.lines.length;t++)if((n=e.lines[t]).staff)i=!0,n.staffGroup=this.engraver.createABCLine(n.staff,r?null:e.metaText.tempo,this.getTextSize),r=!0;else if(n.subtitle){if(i){var a=this.width/2+this.renderer.padding.left;n.nonMusic=new c(this.renderer.spacing.subtitle,e.formatting,n.subtitle,a,this.renderer.padding.left,this.getTextSize)}}else void 0!==n.text?(i=!0,n.nonMusic=new s(n.text,n.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):void 0!==n.separator&&n.separator.lineLength&&(i=!0,n.nonMusic=new o(n.separator.spaceAbove,n.separator.lineLength,n.separator.spaceBelow));e.bottomText=new h(e.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.getTextSize)},b.prototype.engraveTune=function(e,t){var n=this.setupTune(e,t);this.constructTuneElements(e);var r=d(this.renderer,e,this.width,this.space),i=g(this.renderer,this.classes,e,this.width,r,this.responsive,n,this.selectTypes,t);this.staffgroups=i.staffgroups,this.selectables=i.selectables,u(this)},b.prototype.getDim=function(e){if(!e.dim){var t=e.svgEl.getBBox();e.dim={left:Math.round(t.x),top:Math.round(t.y),right:Math.round(t.x+t.width),bottom:Math.round(t.y+t.height)}}return e.dim},b.prototype.addSelectListener=function(e){this.listeners[this.listeners.length]=e},e.exports=b},function(e,t,n){var r,i=n(6),a=n(39),s=n(40),o=n(41),c=n(42),l=n(43),h=n(44),u=n(45),d=n(48),f=n(5),p=n(2),m=n(1),g=n(49),v=n(50),b=n(19),y=n(51),w=n(52),x=n(53),k=n(0);!function(){"use strict";var e=function(e){var t=0;return e.duration&&(t=e.duration),t},t=!1,n={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"}};function A(e,t){var n=e[t];if("note"!==n.el_type||!n.startBeam||n.endBeam)return{count:1,elem:n};for(var r=[];t<e.length&&"note"===e[t].el_type&&(r.push(e[t]),!e[t].endBeam);)t++;return{count:r.length,elem:r}}function T(e){if(e.pitches){S(e);for(var t=0,n=0;n<e.pitches.length;n++)t+=e.pitches[n].verticalPos;e.averagepitch=t/e.pitches.length,e.minpitch=e.pitches[0].verticalPos,e.maxpitch=e.pitches[e.pitches.length-1].verticalPos}}(r=function(e,t,n){this.decoration=new u,this.getTextSize=e,this.tuneNumber=t,this.isBagpipes=n.bagpipes,this.flatBeams=n.flatbeams,this.graceSlurs=n.graceSlurs,this.reset()}).prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},r.prototype.setStemHeight=function(e){this.stemHeight=Math.round(10*e/m.STEP)/10},r.prototype.getCurrentVoiceId=function(e,t){return"s"+e+"v"+t},r.prototype.pushCrossLineElems=function(e,t){this.slursbyvoice[this.getCurrentVoiceId(e,t)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(e,t)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(e,t)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(e,t)]=this.voiceScale},r.prototype.popCrossLineElems=function(e,t){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(e,t)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(e,t)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(e,t)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(e,t)],void 0===this.voiceScale&&(this.voiceScale=1)},r.prototype.containsLyrics=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e[t].voices.length;n++)for(var r=0;r<e[t].voices[n].length;r++){var i=e[t].voices[n][r];if(i.lyric)return void(i.positioning&&"below"!==i.positioning.vocalPosition||(this.hasVocals=!0))}},r.prototype.createABCLine=function(e,n,r){this.minY=2,this.containsLyrics(e);var i=new g(this.getTextSize);this.tempoSet=!1;for(var a=0;a<e.length;a++)t&&this.restoreState(),t=!1,this.createABCStaff(i,e[a],n,a);return i},r.prototype.createABCStaff=function(e,t,n,r){e.getTextSize.updateFonts(t);for(var i=0;i<t.voices.length;i++){var a=new w(i,t.voices.length);0===i?(a.barfrom="start"===t.connectBarLines||"continue"===t.connectBarLines,a.barto="continue"===t.connectBarLines||"end"===t.connectBarLines):a.duplicate=!0,t.title&&t.title[i]&&(a.header=t.title[i].replace(/\\n/g,"\n"),a.headerPosition=6+e.getTextSize.baselineToCenter(a.header,"voicefont","staff-extra voice-name",i,t.voices.length)/m.STEP);var l=o(t.clef,this.tuneNumber);l&&(0===i&&t.barNumber&&this.addMeasureNumber(t.barNumber,l),a.addChild(l),this.startlimitelem=l);var u=c(t.key,this.tuneNumber);if(u&&(a.addChild(u),this.startlimitelem=u),t.meter){"specified"===t.meter.type?this.measureLength=t.meter.value[0].num/t.meter.value[0].den:this.measureLength=1;var d=h(t.meter,this.tuneNumber);a.addChild(d),this.startlimitelem=d}a.duplicate&&(a.children=[]);var f=t.clef.stafflines||0===t.clef.stafflines?t.clef.stafflines:5;e.addVoice(a,r,f);var p=1===f;this.createABCVoice(t.voices[i],n,r,i,p,a),e.setStaffLimits(a),0===i&&("start"===t.brace||!e.brace&&t.brace?(e.brace||(e.brace=[]),e.brace.push(new s(a,"brace"))):"end"===t.brace&&e.brace?e.brace[e.brace.length-1].setBottomStaff(a):"continue"===t.brace&&e.brace&&e.brace[e.brace.length-1].continuing(a),"start"===t.bracket||!e.bracket&&t.bracket?(e.bracket||(e.bracket=[]),e.bracket.push(new s(a,"bracket"))):"end"===t.bracket&&e.bracket?e.bracket[e.bracket.length-1].setBottomStaff(a):"continue"===t.bracket&&e.bracket&&e.bracket[e.bracket.length-1].continuing(a))}},r.prototype.createABCVoice=function(e,n,r,a,s,o){this.popCrossLineElems(r,a),this.stemdir=this.isBagpipes?"down":null,this.abcline=e,this.partstartelem&&(this.partstartelem=new d("",null,null),o.addOther(this.partstartelem));var c=o.voicetotal<2?-1:o.voicenumber;for(var h in this.slurs)this.slurs.hasOwnProperty(h)&&(this.slurs[h]=new b({force:this.slurs[h].force,voiceNumber:c,stemDir:this.slurs[h].stemDir,style:this.slurs[h].dotted}),t&&this.slurs[h].setHint(),o.addOther(this.slurs[h]));for(var u=0;u<this.ties.length;u++)this.ties[u]=new b({force:this.ties[u].force,stemDir:this.ties[u].stemDir,voiceNumber:c,style:this.ties[u].dotted}),t&&this.ties[u].setHint(),o.addOther(this.ties[u]);for(var f=0;f<this.abcline.length;f++)T(this.abcline[f]),this.minY=Math.min(this.abcline[f].minpitch,this.minY);for(var p=0===r,m=0;m<this.abcline.length;){var g=A(this.abcline,m),y=this.createABCElement(p,s,o,g.elem);if(y)for(u=0;u<y.length;u++){if(!this.tempoSet&&n&&!n.suppress){this.tempoSet=!0;var w=new i(n,0,0,"tempo",this.tuneNumber,{});w.addFixedX(new v(n,this.tuneNumber,l)),o.addChild(w)}o.addChild(y[u])}m+=g.count}this.pushCrossLineElems(r,a)},r.prototype.saveState=function(){this.tiesSave=k.cloneArray(this.ties),this.slursSave=k.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=k.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=k.cloneHashOfArrayOfHash(this.tiesbyvoice)},r.prototype.restoreState=function(){this.ties=k.cloneArray(this.tiesSave),this.slurs=k.cloneHashOfHash(this.slursSave),this.slursbyvoice=k.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=k.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},r.prototype.createABCElement=function(e,n,r,a){var s=[];switch(a.el_type){case void 0:s=this.createBeam(n,r,a);break;case"note":s[0]=this.createNote(a,!1,n,r),this.triplet&&this.triplet.isClosed()&&(r.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":s[0]=this.createBarLine(r,a,e),r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"meter":s[0]=h(a,this.tuneNumber),this.startlimitelem=s[0],r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"clef":if(s[0]=o(a,this.tuneNumber),!s[0])return null;r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"key":var u=c(a,this.tuneNumber);u&&(s[0]=u,this.startlimitelem=s[0]),r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"stem":this.stemdir=a.direction;break;case"part":var d=new i(a,0,0,"part",this.tuneNumber),f=this.getTextSize.calc(a.title,"partsfont","part");d.addFixedX(new p(a.title,0,0,void 0,{type:"part",height:f.height/m.STEP})),s[0]=d;break;case"tempo":var g=new i(a,0,0,"tempo",this.tuneNumber);g.addFixedX(new v(a,this.tuneNumber,l)),s[0]=g;break;case"style":"normal"===a.head?delete this.style:this.style=a.head;break;case"hint":t=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=a.size;break;default:var b=new i(a,0,0,"unsupported",this.tuneNumber);b.addFixed(new p("element type "+a.el_type,0,0,void 0,{type:"debug"})),s[0]=b}return s},r.prototype.createBeam=function(e,n,r){var i=[],s=new a(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);t&&s.setHint();for(var o=0;o<r.length;o++){var c=r[o],l=this.createNote(c,!0,e,n);i.push(l),s.add(l),this.triplet&&this.triplet.isClosed()&&(n.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return s.calcDir(),n.addBeam(s),i};var S=function(e){var t;do{t=!0;for(var n=0;n<e.pitches.length-1;n++)if(e.pitches[n].pitch>e.pitches[n+1].pitch){t=!1;var r=e.pitches[n];e.pitches[n]=e.pitches[n+1],e.pitches[n+1]=r}}while(!t)},M=function(e,t,n,r,i,a,s,o,c){for(var l=n;l>11;l--)l%2!=0||r||e.addFixed(new p(null,o,(i+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||r||e.addFixed(new p(null,o,(i+4)*c,l,{type:"ledger"}));for(l=0;l<a.length;l++){var h=i;"down"===s&&(h=-h),e.addFixed(new p(null,h+o,(i+4)*c,a[l],{type:"ledger"}))}};function N(e,t){for(var n=0;n<e.length;n++)if(JSON.stringify(e[n])===JSON.stringify(t))return;e.push(t)}r.prototype.addGraceNotes=function(e,r,i,s,o,c,h){o=Math.round(.7*o);var u,d,m=null;e.gracenotes.length>1&&(m=new a(o,"grace",c),t&&m.setHint(),m.mainNote=i);var g=[];for(d=e.gracenotes.length-1;d>=0;d--)h+=10,g[d]=h,e.gracenotes[d].accidental&&(h+=7);for(d=0;d<e.gracenotes.length;d++){var v=e.gracenotes[d].verticalPos;u=m?null:n.uflags[c?5:3];var y=l(i,"noteheads.quarter",e.gracenotes[d],"up",-g[d],-g[d],u,0,0,.6*this.voiceScale,[],!1);y.notehead.highestVert=y.notehead.pitch+o;var w=y.notehead;if(this.addSlursAndTies(i,e.gracenotes[d],w,r,"up",!0),i.addExtra(w),e.gracenotes[d].acciaccatura){var x=e.gracenotes[d].verticalPos+4.2,k=m?5:6;i.addRight(new p("flags.ugrace",-g[d]+k,0,x,{scalex:.6,scaley:.6}))}if(m){var A=e.gracenotes[d].duration/2;c&&(A/=2);var T={heads:[w],abcelem:{averagepitch:v,minpitch:v,maxpitch:v,duration:A}};m.add(T)}else{var S=v+1/3*.6,N=v+4.2,C=w.dx+w.w;i.addExtra(new p(null,C,0,S,{type:"stem",pitch2:N,linewidth:-.6}))}M(i,v,v,!1,f.getSymbolWidth("noteheads.quarter"),[],!0,w.dx-1,.6);var E=e.rest&&("spacer"===e.rest.type||"invisible"===e.rest.type);0!==d||c||!this.graceSlurs||E||r.addOther(new b({anchor1:w,anchor2:s,isGrace:!0}))}return m&&(m.calcDir(),r.addBeam(m)),h},r.prototype.addNoteToAbcElement=function(t,r,i,a,s,o,c,h,u){var d,m,g,v,b,y=0,w=0,x=0,k=[],A=[],T=0,S=r.averagepitch>=6?"down":"up";for(a&&(S=a),(s=r.style?r.style:s)&&"normal"!==s||(s="note"),(v=o?n[s].nostem:n[s][-c])||console.log("noteSymbol:",s,c,o),b="down"===S?r.pitches.length-2:1;"down"===S?b>=0:b<r.pitches.length;b="down"===S?b-1:b+1){var M=r.pitches["down"===S?b+1:b-1],C=r.pitches[b],E="down"===S?M.pitch-C.pitch:C.pitch-M.pitch;E<=1&&!M.printer_shift&&(C.printer_shift=E?"different":"same",(C.verticalPos>11||C.verticalPos<1)&&k.push(C.verticalPos-C.verticalPos%2),"down"===S?w=f.getSymbolWidth(v)+2:y=f.getSymbolWidth(v)+2)}var I=r.pitches.length;for(b=0;b<r.pitches.length;b++){var _,B;if(!h)_="down"===S&&0!==b||"up"===S&&b!==I-1?null:n["down"===S?"dflags":"uflags"][-c];if(B=r.pitches[b].style?n[r.pitches[b].style][-c]:v,r.pitches[b].highestVert=r.pitches[b].verticalPos,("up"===a||"up"===S)&&0===b||("down"===a||"down"===S)&&b===I-1){if((r.startSlur||1===I)&&(r.pitches[b].highestVert=r.pitches[I-1].verticalPos,e(r)<1&&("up"===a||"up"===S)&&(r.pitches[b].highestVert+=6)),r.startSlur)for(r.pitches[b].startSlur||(r.pitches[b].startSlur=[]),g=0;g<r.startSlur.length;g++)N(r.pitches[b].startSlur,r.startSlur[g]);if(r.endSlur)for(r.pitches[b].highestVert=r.pitches[I-1].verticalPos,e(r)<1&&("up"===a||"up"===S)&&(r.pitches[b].highestVert+=6),r.pitches[b].endSlur||(r.pitches[b].endSlur=[]),g=0;g<r.endSlur.length;g++)N(r.pitches[b].endSlur,r.endSlur[g])}var P=!h&&c<=-1,D=l(t,B,r.pitches[b],S,0,-w,_,i,y,this.voiceScale,A,!a);T=Math.max(f.getSymbolWidth(B),T),t.extraw-=D.extraLeft,(d=D.notehead)&&(this.addSlursAndTies(t,r.pitches[b],d,u,P?S:null,!1),r.gracenotes&&r.gracenotes.length>0&&(d.bottom=d.bottom-1),t.addHead(d)),w+=D.accidentalshiftx,x=Math.max(x,D.dotshiftx)}if(P){var L=Math.round(70*this.voiceScale)/10,O="down"===S?r.minpitch-L:r.minpitch+1/3;O>6&&!a&&(O=6);var H="down"===S?r.maxpitch-1/3:r.maxpitch+L;H<6&&!a&&(H=6);var V="down"===S||0===t.heads.length?0:t.heads[0].w,F="down"===S?1:-1;"noteheads.slash.quarter"===d.c&&("down"===S?H-=1:O+=1),t.addRight(new p(null,V,0,O,{type:"stem",pitch2:H,linewidth:F})),m=Math.min(O,H)}return{noteHead:d,roomTaken:w,roomTakenRight:x,min:m,additionalLedgers:k,dir:S,symbolWidth:T}},r.prototype.addLyric=function(e,t){var n="";k.each(t.lyric,(function(e){var t=" "===e.divider?"":e.divider;n+=e.syllable+t+"\n"}));var r=this.getTextSize.calc(n,"vocalfont","lyric"),i=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new p(n,0,r.width,void 0,{type:"lyric",position:i,height:r.height/m.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},r.prototype.createNote=function(r,a,s,o){var c,h=null,u=0,d=0,m=0,g=[],v=e(r),b=!1;0===v&&(b=!0,v=.25,a=!0);for(var w=Math.floor(Math.log(v)/Math.log(2)),k=0,A=Math.pow(2,w),T=A/2;A<v;k++,A+=T,T/=2);r.startTriplet&&(this.tripletmultiplier=r.tripletMultiplier);var S=v*this.tripletmultiplier;r.rest&&"multimeasure"===r.rest.type&&(S=v);var N=r.rest?"rest":"note",C=new i(r,S,1,N,this.tuneNumber,{durationClassOveride:r.duration*this.tripletmultiplier});if(t&&C.setHint(),r.rest){this.measureLength===v&&"invisible"!==r.rest.type&&"spacer"!==r.rest.type&&"multimeasure"!==r.rest.type&&(r.rest.type="whole");var E=function(e,t,r,i,a,s,o,c,h){var u,d,m,g,v=7;switch(a&&("down"===s&&(v=3),"up"===s&&(v=11)),o&&(v=r<.5||r<1?7:5),t.rest.type){case"whole":u=n.rest[0],t.averagepitch=v,t.minpitch=v,t.maxpitch=v,i=0;break;case"rest":u="rhythm"===t.style?n.rhythm[-c]:n.rest[-c],t.averagepitch=v,t.minpitch=v,t.maxpitch=v;break;case"invisible":case"spacer":u="",t.averagepitch=v,t.minpitch=v,t.maxpitch=v;break;case"multimeasure":u=n.rest.multi,t.averagepitch=v,t.minpitch=v,t.maxpitch=v,i=0;var b=f.getSymbolWidth(u);e.addHead(new p(u,-b,2*b,7));var y=new p(""+t.rest.text,0,b,16,{type:"multimeasure-text"});e.addExtra(y)}if("multimeasure"!==t.rest.type){var w=l(e,u,{verticalPos:v},null,0,0,null,i,0,h,[],!1);(d=w.notehead)&&(e.addHead(d),m=w.accidentalshiftx,g=w.dotshiftx)}return{noteHead:d,roomTaken:m,roomTakenRight:g}}(C,r,v,k,o.voicetotal>1,this.stemdir,s,w,this.voiceScale);h=E.noteHead,u=E.roomTaken,d=E.roomTakenRight}else{var I=this.addNoteToAbcElement(C,r,k,this.stemdir,this.style,b,w,a,o);void 0!==I.min&&(this.minY=Math.min(I.min,this.minY)),h=I.noteHead,u=I.roomTaken,d=I.roomTakenRight,g=I.additionalLedgers,c=I.dir,m=I.symbolWidth}if(void 0!==r.lyric&&this.addLyric(C,r),void 0!==r.gracenotes&&(u+=this.addGraceNotes(r,o,C,h,this.stemHeight*this.voiceScale,this.isBagpipes,u)),r.decoration&&this.decoration.createDecoration(o,r.decoration,C.top,h?h.w:0,C,u,c,C.bottom,r.positioning,this.hasVocals),r.barNumber&&C.addFixed(new p(r.barNumber,-10,0,0,{type:"barNumber"})),M(C,r.minpitch,r.maxpitch,r.rest,m,g,c,-2,1),void 0!==r.chord){var _=x(this.getTextSize,C,r,u,d,m);u=_.roomTaken,d=_.roomTakenRight}return r.startTriplet&&(this.triplet=new y(r.startTriplet,h,{flatBeams:this.flatBeams})),r.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(h),!this.triplet||r.startTriplet||r.endTriplet||r.rest&&"spacer"===r.rest.type||this.triplet.middleNote(h),C},r.prototype.addSlursAndTies=function(e,n,r,i,a,s){if(n.endTie&&this.ties.length>0){for(var o=!1,c=0;c<this.ties.length;c++)if(this.ties[c].anchor1&&this.ties[c].anchor1.pitch===r.pitch){this.ties[c].setEndAnchor(r),this.ties.splice(c,1),o=!0;break}o||(this.ties[0].setEndAnchor(r),this.ties.splice(0,1))}var l,h,u=i.voicetotal<2?-1:i.voicenumber;if(n.startTie){var d=new b({anchor1:r,force:"down"===this.stemdir||"up"===this.stemdir,stemDir:this.stemdir,isGrace:s,voiceNumber:u,style:n.startTie.style});t&&d.setHint(),this.ties[this.ties.length]=d,i.addOther(d),e.startTie=!0}if(n.endSlur)for(var f=0;f<n.endSlur.length;f++)h=n.endSlur[f],this.slurs[h]?((l=this.slurs[h]).setEndAnchor(r),delete this.slurs[h]):(l=new b({anchor2:r,stemDir:this.stemdir,voiceNumber:u}),t&&l.setHint(),i.addOther(l)),this.startlimitelem&&l.setStartX(this.startlimitelem);else if(!s)for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].addInternalNote(r);if(n.startSlur)for(f=0;f<n.startSlur.length;f++)h=n.startSlur[f].label,l=new b({anchor1:r,stemDir:this.stemdir,voiceNumber:u,style:n.startSlur[f].style}),t&&l.setHint(),this.slurs[h]=l,i.addOther(l)},r.prototype.addMeasureNumber=function(e,t){var n=this.getTextSize.calc(e,"measurefont","bar-number"),r=n.width>18&&"treble"===t.abcelem.type?-7:0;t.addFixed(new p(e,r,n.width,11+n.height/m.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},r.prototype.createBarLine=function(e,t,n){var r=new i(t,0,10,"bar",this.tuneNumber),a=null,s=0;t.barNumber&&this.addMeasureNumber(t.barNumber,r);var o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,c="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,l="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,h="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,u="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(o||u){for(var f in this.slurs)this.slurs.hasOwnProperty(f)&&this.slurs[f].setEndX(r);this.startlimitelem=r}if(o&&(r.addRight(new p("dots.dot",s,1,7)),r.addRight(new p("dots.dot",s,1,5)),s+=6),c&&(a=new p(null,s,1,2,{type:"bar",pitch2:10,linewidth:.6}),r.addRight(a)),"bar_invisible"===t.type&&(a=new p(null,s,1,2,{type:"none",pitch2:10,linewidth:.6}),r.addRight(a)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,l?3:1,r,0,"down",2,t.positioning,this.hasVocals),l&&(a=new p(null,s+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),r.addRight(a),s+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=a,this.partstartelem=null),h&&(a=new p(null,s+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),r.addRight(a)),u&&(s+=3,r.addRight(new p("dots.dot",s,1,7)),r.addRight(new p("dots.dot",s,1,5))),t.startEnding&&n){var m=this.getTextSize.calc(t.startEnding,"repeatfont","").width;r.minspacing+=m+10,this.partstartelem=new d(t.startEnding,a,null),e.addOther(this.partstartelem)}return r.extraw-=5,r}}(),e.exports=r},function(e,t){var n;!function(){"use strict";(n=function(e,t,n,r){this.type="BeamElem",this.isflat=!!n,this.isgrace=!(!t||"grace"!==t),this.forceup=!!(this.isgrace||t&&"up"===t),this.forcedown=!(!t||"down"!==t),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=e,this.beams=[],r&&r.duration?(this.duration=r.duration,r.startTriplet&&(this.duration*=r.tripletMultiplier),this.duration=Math.round(1e3*this.duration)/1e3):this.duration=0}).prototype.setHint=function(){this.hint=!0},n.prototype.add=function(e){var t=e.abcelem.averagepitch;void 0!==t&&(e.abcelem.rest||(this.allrests=!1),e.beam=this,this.elems.push(e),this.total=Math.round(this.total+t),(void 0===this.min||e.abcelem.minpitch<this.min)&&(this.min=e.abcelem.minpitch),(void 0===this.max||e.abcelem.maxpitch>this.max)&&(this.max=e.abcelem.maxpitch))},n.prototype.addBeam=function(e){this.beams.push(e)},n.prototype.calcDir=function(){var e,t;if(this.average=(e=this.total,(t=this.elems.length)?e/t:0),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{this.stemsUp=this.average<6}for(var n=this.stemsUp?"up":"down",r=0;r<this.elems.length;r++)for(var i=0;i<this.elems[r].heads.length;i++)this.elems[r].heads[i].stemDir=n}}(),e.exports=n},function(e,t){var n=function(e,t){this.startVoice=e,this.type=t};n.prototype.setBottomStaff=function(e){this.endVoice=e,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},n.prototype.continuing=function(e){this.lastContinuedVoice=e},n.prototype.getWidth=function(){return 10},n.prototype.isStartVoice=function(e){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===e)},e.exports=n},function(e,t,n){var r,i=n(6),a=n(5),s=n(2);!function(){"use strict";r=function(e,t){var n,r=0;e.el_type="clef";var o=new i(e,0,10,"staff-extra clef",t);switch(o.isClef=!0,e.type){case"treble":n="clefs.G";break;case"tenor":case"alto":n="clefs.C";break;case"bass":n="clefs.F";break;case"treble+8":n="clefs.G",r=1;break;case"tenor+8":n="clefs.C",r=1;break;case"bass+8":n="clefs.F",r=1;break;case"alto+8":n="clefs.C",r=1;break;case"treble-8":n="clefs.G",r=-1;break;case"tenor-8":n="clefs.C",r=-1;break;case"bass-8":n="clefs.F",r=-1;break;case"alto-8":n="clefs.C",r=-1;break;case"none":return null;case"perc":n="clefs.perc";break;default:o.addFixed(new s("clef="+e.type,0,0,void 0,{type:"debug"}))}if(n){var c=a.symbolHeightInPitches(n),l=function(e){switch(e){case"clefs.G":return-5;case"clefs.C":case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}(n);if(o.addRight(new s(n,5,a.getSymbolWidth(n),e.clefPos,{top:c+e.clefPos+l,bottom:e.clefPos+l})),0!==r){var h=(a.getSymbolWidth(n)-a.getSymbolWidth("8")*(2/3))/2,u=r>0?o.top+3:o.bottom-1,d=r>0?o.top+3:o.bottom-3,f=d-2;"bass-8"===e.type&&(u=3,h=0),o.addRight(new s("8",5+h,a.getSymbolWidth("8")*(2/3),u,{scalex:2/3,scaley:2/3,top:d,bottom:f}))}}return o}}(),e.exports=r},function(e,t,n){var r,i=n(6),a=n(5),s=n(2),o=n(0);!function(){"use strict";r=function(e,t){if(!e.accidentals||0===e.accidentals.length)return null;e.el_type="keySignature";var n=new i(e,0,10,"staff-extra key-signature",t);n.isKeySig=!0;var r=0;return o.each(e.accidentals,(function(e){var t,i=0;switch(e.acc){case"sharp":t="accidentals.sharp",i=-3;break;case"natural":t="accidentals.nat";break;case"flat":t="accidentals.flat",i=-1.2;break;case"quartersharp":t="accidentals.halfsharp",i=-2.5;break;case"quarterflat":t="accidentals.halfflat",i=-1.2;break;default:t="accidentals.flat"}n.addRight(new s(t,r,a.getSymbolWidth(t),e.verticalPos,{thickness:a.symbolHeightInPitches(t),top:e.verticalPos+a.symbolHeightInPitches(t)+i,bottom:e.verticalPos+i})),r+=a.getSymbolWidth(t)+2}),this),n}}(),e.exports=r},function(e,t,n){var r,i=n(5),a=n(2);r=function(e,t,n,r,s,o,c,l,h,u,d,f){var p,m=n.verticalPos,g=0,v=0,b=0;if(void 0===t)e.addFixed(new a("pitch is undefined",0,0,0,{type:"debug"}));else if(""===t)p=new a(null,0,0,m);else{var y=s;if(n.printer_shift){var w="same"===n.printer_shift?1:0;y="down"===r?-i.getSymbolWidth(t)*u+w:i.getSymbolWidth(t)*u-w}var x={scalex:u,scaley:u,thickness:i.symbolHeightInPitches(t)*u};if((p=new a(t,y,i.getSymbolWidth(t)*u,m,x)).stemDir=r,c){var k=m+("down"===r?-7:7)*u;f&&("down"===r&&k>6&&(k=6),"up"===r&&k<6&&(k=6));var A="down"===r?s:s+p.w-.6;e.addRight(new a(c,A,i.getSymbolWidth(c)*u,k,{scalex:u,scaley:u}))}for(v=p.w+h-2+5*l;l>0;l--){var T=1-Math.abs(m)%2;e.addRight(new a("dots.dot",p.w+h-2+5*l,i.getSymbolWidth("dots.dot"),m+T))}}if(p&&(p.highestVert=n.highestVert),n.accidental){var S;switch(n.accidental){case"quartersharp":S="accidentals.halfsharp";break;case"dblsharp":S="accidentals.dblsharp";break;case"sharp":S="accidentals.sharp";break;case"quarterflat":S="accidentals.halfflat";break;case"flat":S="accidentals.flat";break;case"dblflat":S="accidentals.dblflat";break;case"natural":S="accidentals.nat"}for(var M=!1,N=o,C=0;C<d.length;C++)if(m-d[C][0]>=6){d[C][0]=m,N=d[C][1],M=!0;break}!1===M&&(N-=i.getSymbolWidth(S)*u+2,d.push([m,N]),g=i.getSymbolWidth(S)*u+2);var E=i.symbolHeightInPitches(S);e.addExtra(new a(S,N,i.getSymbolWidth(S),m,{scalex:u,scaley:u,top:m+E/2,bottom:m-E/2})),b=i.getSymbolWidth(S)/2}return{notehead:p,accidentalshiftx:g,dotshiftx:v,extraLeft:b}},e.exports=r},function(e,t,n){var r,i=n(6),a=n(5),s=n(2);!function(){"use strict";r=function(e,t){e.el_type="timeSignature";var n=new i(e,0,10,"staff-extra time-signature",t);if("specified"===e.type)for(var r=0,o=0;o<e.value.length;o++)if(0!==o&&(n.addRight(new s("+",r+1,a.getSymbolWidth("+"),6,{thickness:a.symbolHeightInPitches("+")})),r+=a.getSymbolWidth("+")+2),e.value[o].den){for(var c=0,l=0;l<e.value[o].num.length;l++)c+=a.getSymbolWidth(e.value[o].num.charAt(l));var h=0;for(l=0;l<e.value[o].num.length;l++)h+=a.getSymbolWidth(e.value[o].den.charAt(l));var u=Math.max(c,h);n.addRight(new s(e.value[o].num,r+(u-c)/2,c,8,{thickness:a.symbolHeightInPitches(e.value[o].num.charAt(0))})),n.addRight(new s(e.value[o].den,r+(u-h)/2,h,4,{thickness:a.symbolHeightInPitches(e.value[o].den.charAt(0))})),r+=u}else{for(var d=0,f=0;f<e.value[o].num.length;f++)d+=a.getSymbolWidth(e.value[o].num.charAt(f));n.addRight(new s(e.value[o].num,r,d,6,{thickness:a.symbolHeightInPitches(e.value[o].num.charAt(0))})),r+=d}else"common_time"===e.type?n.addRight(new s("timesig.common",0,a.getSymbolWidth("timesig.common"),6,{thickness:a.symbolHeightInPitches("timesig.common")})):"cut_time"===e.type?n.addRight(new s("timesig.cut",0,a.getSymbolWidth("timesig.cut"),6,{thickness:a.symbolHeightInPitches("timesig.cut")})):"tempus_imperfectum"===e.type?n.addRight(new s("timesig.imperfectum",0,a.getSymbolWidth("timesig.imperfectum"),6,{thickness:a.symbolHeightInPitches("timesig.imperfectum")})):"tempus_imperfectum_prolatio"===e.type?n.addRight(new s("timesig.imperfectum2",0,a.getSymbolWidth("timesig.imperfectum2"),6,{thickness:a.symbolHeightInPitches("timesig.imperfectum2")})):"tempus_perfectum"===e.type?n.addRight(new s("timesig.perfectum",0,a.getSymbolWidth("timesig.perfectum"),6,{thickness:a.symbolHeightInPitches("timesig.perfectum")})):"tempus_perfectum_prolatio"===e.type?n.addRight(new s("timesig.perfectum2",0,a.getSymbolWidth("timesig.perfectum2"),6,{thickness:a.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",e);return n}}(),e.exports=r},function(e,t,n){var r,i=n(46),a=n(47),s=n(5),o=n(2),c=n(19);!function(){"use strict";var e=function(e,t,n,r,i){function a(e,t){var a="down"===i?function(){if(0===r.heads.length)return 2;for(var e=r.heads[0].pitch,t=1;t<r.heads.length;t++)e=Math.min(e,r.heads[t].pitch);return e}()+1:function(){if(0===r.heads.length)return 10;for(var e=r.heads[0].pitch,t=1;t<r.heads.length;t++)e=Math.max(e,r.heads[t].pitch);return e}()+9;"down"!==i&&1===t&&a--;var c=n/2;c+="down"===i?-5:3;for(var l=0;l<t;l++)a-=1,r.addFixedX(new o(e,c,s.getSymbolWidth(e),a))}for(var c=0;c<e.length;c++)switch(e[c]){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(e,t,n,r){for(var i,s,o=0;o<t.length;o++)switch(t[o]){case"diminuendo(":this.startDiminuendoX=n,i=void 0;break;case"diminuendo)":i={start:this.startDiminuendoX,stop:n},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=n,s=void 0;break;case"crescendo)":s={start:this.startCrescendoX,stop:n},this.startCrescendoX=void 0}i&&e.addOther(new a(i.start,i.stop,">",r)),s&&e.addOther(new a(s.start,s.stop,"<",r))},r.prototype.createDecoration=function(t,n,r,a,l,h,u,d,f,p){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(e,t,n,r){for(var a=0;a<t.length;a++)switch(t[a]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var s=new i(n,t[a],r);e.addOther(s)}}(t,n,l,f.volumePosition),this.dynamicDecoration(t,n,l,f.dynamicPosition),e(n,0,a,l,u);var m=function(e,t,n,r,i,a,l,h){for(var u,d=0;d<t.length;d++){if("staccato"===t[d]||"tenuto"===t[d]||"accent"===t[d]){var f="scripts."+t[d];if("accent"===t[d]&&(f="scripts.sforzato"),u=void 0===u?"down"===l?n+2:h-2:"down"===l?u+2:u-2,"accent"===t[d])"up"===l?u--:u++;else switch(u){case 2:case 4:case 6:case 8:case 10:"up"===l?u--:u++}n>9&&u++;var p=r/2;"center"!==s.getSymbolAlign(f)&&(p-=s.getSymbolWidth(f)/2),i.addFixedX(new o(f,p,s.getSymbolWidth(f),u))}if("slide"===t[d]&&i.heads[0]){var m=i.heads[0].pitch,g=new o("",-a-15,0,(m-=2)-1),v=new o("",-a-5,0,m+1);i.addFixedX(g),i.addFixedX(v),e.addOther(new c({anchor1:g,anchor2:v,fixedY:!0}))}}return void 0===u&&(u=n),{above:u,below:i.bottom}}(t,n,r,a,l,h,u,d);m.above=Math.max(m.above,this.minTop);!function(e,t,n,r,i,a,c){function l(e,t){"above"===e?r.above+=t:r.below-=t}function h(e){var t;return"above"===e?(t=r.above)<a&&(t=a):(t=r.below)>c&&(t=c),t}function u(e,r){var i=h(r);n.addFixedX(new o(e,t/2,0,i+2,{type:"decoration",klass:"ornament",thickness:3})),l(r,5)}function d(e,r){var i=t/2;"center"!==s.getSymbolAlign(e)&&(i-=s.getSymbolWidth(e)/2);var a=s.symbolHeightInPitches(e)+1,c=h(r);c="above"===r?c+a/2:c-a/2,n.addFixedX(new o(e,i,s.getSymbolWidth(e),c,{klass:"ornament",thickness:s.symbolHeightInPitches(e)})),l(r,a)}for(var f={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",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=!1,m=0;m<e.length;m++)switch(e[m]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":u(e[m],i),p=!0;break;case"fine":u("FINE",i),p=!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":d(f[e[m]],i),p=!0;break;case"invertedfermata":d(f[e[m]],"below"),p=!0;break;case"mark":n.klass="mark"}}(n,a,l,m,f.ornamentPosition,this.minTop,this.minBottom);!function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r]){case"arpeggio":for(var i=t.abcelem.minpitch-1;i<=t.abcelem.maxpitch;i+=2)t.addExtra(new o("scripts.arpeggio",2*-s.getSymbolWidth("scripts.arpeggio")-n,0,i+2,{klass:"ornament",thickness:s.symbolHeightInPitches("scripts.arpeggio")}))}}(n,l,h)}}(),e.exports=r},function(e,t){e.exports=function(e,t,n){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===n?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}},function(e,t){e.exports=function(e,t,n,r){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=n,"above"===r?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}},function(e,t){e.exports=function(e,t,n){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=n,this.endingHeightAbove=5,this.pitch=void 0}},function(e,t,n){var r=n(20),i=function(e){this.getTextSize=e,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};i.prototype.setLimit=function(e,t){t.specialY[e]&&(t.staff.specialY[e]?t.staff.specialY[e]=Math.max(t.staff.specialY[e],t.specialY[e]):t.staff.specialY[e]=t.specialY[e])},i.prototype.addVoice=function(e,t,n){var r=this.voices.length;this.voices[r]=e,this.staffs[t]?this.staffs[t].voices.push(r):this.staffs[this.staffs.length]={top:10,bottom:2,lines:n,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}},e.staff=this.staffs[t]},i.prototype.setHeight=function(){this.height=r(this)},i.prototype.setWidth=function(e){this.w=e;for(var t=0;t<this.voices.length;t++)this.voices[t].setWidth(e)},i.prototype.setStaffLimits=function(e){e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},e.exports=i},function(e,t,n){var r,i=n(6),a=n(2);!function(){"use strict";(r=function(e,t,n){this.type="TempoElement",this.tempo=e,this.tempo.type="tempo",this.tuneNumber=t,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(n,e,t))}).prototype.setX=function(e){this.x=e},r.prototype.createNote=function(e,t,n){var r,s,o,c=t.duration[0],l=new i(t,c,1,"tempo",n);c<=1/32?(o="noteheads.quarter",s="flags.u32nd",r=0):c<=1/16?(o="noteheads.quarter",s="flags.u16th",r=0):c<=3/32?(o="noteheads.quarter",s="flags.u16nd",r=1):c<=1/8?(o="noteheads.quarter",s="flags.u8th",r=0):c<=3/16?(o="noteheads.quarter",s="flags.u8th",r=1):c<=1/4?(o="noteheads.quarter",r=0):c<=3/8?(o="noteheads.quarter",r=1):c<=.5?(o="noteheads.half",r=0):c<=3/4?(o="noteheads.half",r=1):c<=1?(o="noteheads.whole",r=0):c<=1.5?(o="noteheads.whole",r=1):c<=2?(o="noteheads.dbl",r=0):(o="noteheads.dbl",r=1);var h,u=e(l,o,{verticalPos:0},"up",0,0,s,r,0,.75,[],!1).notehead;if(l.addHead(u),"noteheads.whole"!==o&&"noteheads.dbl"!==o){var d=u.dx+u.w;h=new a(null,d,0,.25,{type:"stem",pitch2:3.75,linewidth:-.6}),l.addRight(h)}return l}}(),e.exports=r},function(e,t){var n;!function(){"use strict";(n=function(e,t,n){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=n.flatBeams}).prototype.isClosed=function(){return!!this.anchor2},n.prototype.middleNote=function(e){this.middleElems.push(e)},n.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&(this.endingHeightAbove=4)}}(),e.exports=n},function(e,t){var n=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,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(e){if("bar"===e.type){for(var t=!0,n=0;t&&n<this.children.length;n++)this.children[n].type.indexOf("staff-extra")<0&&"tempo"!==this.children[n].type&&(t=!1);t||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=e,this.setRange(e)},n.prototype.setLimit=function(e,t){var n=t.specialY;n||(n=t),n[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],n[e]):this.specialY[e]=n[e])},n.prototype.adjustRange=function(e){void 0!==e.bottom&&(this.bottom=Math.min(this.bottom,e.bottom)),void 0!==e.top&&(this.top=Math.max(this.top,e.top))},n.prototype.setRange=function(e){this.adjustRange(e),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},n.prototype.addOther=function(e){this.otherchildren.push(e),this.setRange(e)},n.prototype.addBeam=function(e){this.beams.push(e)},n.prototype.setWidth=function(e){this.w=e},e.exports=n},function(e,t,n){var r,i=n(2),a=n(1);!function(){"use strict";r=function(e,t,n,r,s,o){for(var c=0;c<n.chord.length;c++)for(var l=n.chord[c].position,h=n.chord[c].rel_position,u=n.chord[c].name.split("\n"),d=u.length-1;d>=0;d--){var f,p,m,g=u[d],v=0;"left"===l||"right"===l||"below"===l||"above"===l?(p="annotationfont",m="annotation"):(p="gchordfont",m="chord");var b=e.attr(p,m),y=e.calc(g,p,m),w=y.width,x=y.height/a.STEP;switch(l){case"left":v=-(r+=w+7),f=n.averagepitch,t.addExtra(new i(g,v,w+4,f,{type:"text",height:x,dim:b,position:"left"}));break;case"right":v=s+=4,f=n.averagepitch,t.addRight(new i(g,v,w+4,f,{type:"text",height:x,dim:b,position:"right"}));break;case"below":t.addRight(new i(g,0,0,void 0,{type:"text",position:"below",height:x,dim:b,realWidth:w}));break;case"above":t.addRight(new i(g,0,0,void 0,{type:"text",position:"above",height:x,dim:b,realWidth:w}));break;default:if(h){var k=h.y+3*a.STEP;t.addRight(new i(g,v+h.x,0,n.minpitch+k/a.STEP,{position:"relative",type:"text",height:x,dim:b}))}else{var A="above";n.positioning&&n.positioning.chordPosition&&(A=n.positioning.chordPosition),"hidden"!==A&&t.addCentered(new i(g,o/2,w,void 0,{type:"chord",position:A,height:x,dim:b,realWidth:w}))}}}return{roomTaken:r,roomTakenRight:s}}}(),e.exports=r},function(e,t,n){var r=n(1),i=n(55),a=(n(6),function(e){this.paper=new i(e),this.controller=null,this.space=3*r.SPACE,this.padding={},this.reset()});a.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.initVerticalSpace()},a.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},a.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},a.prototype.setPadding=function(e){function t(t,n,r,i,a){void 0!==e.formatting[r]?t.padding[n]=e.formatting[r]:void 0!==t.paddingOverride[n]?t.padding[n]=t.paddingOverride[n]:t.isPrint?t.padding[n]=i:t.padding[n]=a}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},a.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},a.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:0,words:0}},a.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},a.prototype.calcY=function(e){return this.y-e*r.STEP},a.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},e.exports=a},function(e,t){var n="http://www.w3.org/2000/svg";function r(e){this.svg=o(),e.appendChild(this.svg)}function i(e,t,n){var r=n-e;return"M "+e+" "+t+" l "+r+" 0 l 0 1 l "+-r+" 0 z "}function a(e,t,n){var r=n-t;return"M "+e+" "+t+" l 0 "+r+" l 1 0 l 0 "+-r+" z "}r.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=o(),e&&(e.innerHTML="",e.appendChild(this.svg))}},r.prototype.setTitle=function(e){var t=document.createElement("title"),n=document.createTextNode(e);t.appendChild(n),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var n=this.svg.parentNode.getAttribute("class");n?n.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",n+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var r=t/e*100;this.svg.parentNode.style["padding-bottom"]=r+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},r.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},r.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},r.prototype.insertStyles=function(e){var t=document.createElementNS(n,"style");t.textContent=e,this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},r.prototype.rect=function(e){var t=[],n=e.x,r=e.y,s=e.x+e.width,o=e.y+e.height;return t.push(i(n,r,s)),t.push(i(n,o,s)),t.push(a(s,r,o)),t.push(a(n,o,r)),this.path({path:t.join(" "),stroke:"none"})},r.prototype.dottedLine=function(e){var t=document.createElementNS(n,"line");t.setAttribute("x1",e.x1),t.setAttribute("x2",e.x2),t.setAttribute("y1",e.y1),t.setAttribute("y2",e.y2),t.setAttribute("stroke",e.stroke),t.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.rectBeneath=function(e){var t=document.createElementNS(n,"rect");t.setAttribute("x",e.x),t.setAttribute("width",e.width),t.setAttribute("y",e.y),t.setAttribute("height",e.height),e.stroke&&t.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&t.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&t.setAttribute("fill",e.fill),e["fill-opacity"]&&t.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.text=function(e,t,r){var i=document.createElementNS(n,"text");for(var a in t)t.hasOwnProperty(a)&&i.setAttribute(a,t[a]);for(var s=(""+e).split("\n"),o=0;o<s.length;o++){var c=document.createElementNS(n,"tspan");c.textContent=s[o],c.setAttribute("x",t.x?t.x:0),0!==o&&c.setAttribute("dy","1.2em"),i.appendChild(c)}return r?r.appendChild(i):this.append(i),i},r.prototype.guessWidth=function(e,t){var n,r=this.createDummySvg(),i=this.text(e,t,r);try{n=i.getBBox(),n=isNaN(n.height)||!n.height?{width:t["font-size"]/2,height:t["font-size"]+2}:{width:n.width,height:n.height}}catch(e){n={width:t["font-size"]/2,height:t["font-size"]+2}}return r.removeChild(i),n},r.prototype.createDummySvg=function(){if(!this.dummySvg){this.dummySvg=o();this.dummySvg.setAttribute("style",["display: block !important;","height: 1px;","width: 1px;","position: absolute;"].join("")),document.querySelector("body").appendChild(this.dummySvg)}return this.dummySvg};var s={};function o(){var e=document.createElementNS(n,"svg");return e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),e.setAttribute("role","img"),e}r.prototype.getTextSize=function(e,t,n){if("number"==typeof e&&(e=""+e),!e||e.match(/^\s+$/))return{width:0,height:0};var r;if(e.length<20&&(r=e+JSON.stringify(t),s[r]))return s[r];var i,a=!n;n||(n=this.text(e,t));try{i=n.getBBox(),i=isNaN(i.height)||!i.height?this.guessWidth(e,t):{width:i.width,height:i.height}}catch(n){i=this.guessWidth(e,t)}return a&&(this.currentGroup?this.currentGroup.removeChild(n):this.svg.removeChild(n)),r&&(s[r]=i),i},r.prototype.openGroup=function(e){e=e||{};var t=document.createElementNS(n,"g");return e.klass&&t.setAttribute("class",e.klass),e.fill&&t.setAttribute("fill",e.fill),e.stroke&&t.setAttribute("stroke",e.stroke),e.prepend?this.svg.insertBefore(t,this.svg.firstChild):this.svg.appendChild(t),this.currentGroup=t,t},r.prototype.closeGroup=function(){var e=this.currentGroup;return this.currentGroup=null,e},r.prototype.path=function(e){var t=document.createElementNS(n,"path");for(var r in e)e.hasOwnProperty(r)&&("path"===r?t.setAttributeNS(null,"d",e.path):t.setAttributeNS(null,r,e[r]));return this.append(t),t},r.prototype.pathToBack=function(e){var t=document.createElementNS(n,"path");for(var r in e)e.hasOwnProperty(r)&&("path"===r?t.setAttributeNS(null,"d",e.path):t.setAttributeNS(null,r,e[r]));return this.prepend(t),t},r.prototype.append=function(e){this.currentGroup?this.currentGroup.appendChild(e):this.svg.appendChild(e)},r.prototype.prepend=function(e){this.currentGroup?this.currentGroup.appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttributeNS(null,n,t[n])},r.prototype.moveElementToChild=function(e,t){e.appendChild(t)},e.exports=r},function(e,t){e.exports=function(e,t,n,r,i,a){var s;this.rows=[],t&&this.rows.push({move:t});var o=n.calc("textfont","defined-text");if(""===e)this.rows.push({move:2*o.attr["font-size"]});else if("string"==typeof e)this.rows.push({move:o.attr["font-size"]/2}),this.rows.push({left:r,text:e,font:"textfont",klass:"defined-text",anchor:"start",absElemType:"freeText"}),s=a.calc(e,"textfont","defined-text"),this.rows.push({move:s.height});else for(var c="textfont",l=!1,h=0;h<e.length;h++){c=e[h].font?e[h].font:"textfont",e[h].center&&(l=!0);var u=l?"middle":"start",d=l?i/2:r;this.rows.push({left:d,text:e[h].text,font:c,klass:"defined-text",anchor:u,absElemType:"freeText"}),s=a.calc(e[h].text,c,"defined-text"),this.rows.push({move:s.height})}}},function(e,t){e.exports=function(e,t,n){this.rows=[],e&&this.rows.push({move:e}),this.rows.push({separator:t}),n&&this.rows.push({move:n})}},function(e,t){e.exports=function(e,t,n,r,i,a){this.rows=[],e&&this.rows.push({move:e});var s=t.titleleft?"start":"middle";t.titleleft,this.rows.push({left:r,text:n,font:"subtitlefont",klass:"text subtitle",anchor:s});var o=a.calc(n,"subtitlefont","text subtitle");this.rows.push({move:o.height})}},function(e,t){function n(e,t,n,r,i,a,s,o){if(this.rows=[],e.header&&i){var c=o.calc("XXXX","headerfont","abcjs-header abcjs-meta-top").height;this.addTextIf(a,e.header.left,"headerfont","header meta-top",-c,0,"start",o),this.addTextIf(a+r/2,e.header.center,"headerfont","header meta-top",-c,null,"middle",o),this.addTextIf(a+r,e.header.right,"headerfont","header meta-top",-c,null,"end",o)}i&&this.rows.push({move:s.top});var l=t.titleleft?"start":"middle",h=t.titleleft?a:a+r/2;if(e.title&&this.addTextIf(h,e.title,"titlefont","title meta-top",s.title,0,l,o,"title"),n[0]&&n[0].subtitle&&this.addTextIf(h,n[0].subtitle,"subtitlefont","text meta-top subtitle",s.subtitle,0,l,o,"subtitle"),e.rhythm||e.origin||e.composer){if(this.rows.push({move:s.composer}),e.rhythm&&e.rhythm.length>0){var u=!(!e.composer&&!e.origin);this.addTextIf(a,e.rhythm,"infofont","meta-top rhythm",0,null,"start",o,"rhythm",u)}var d="";e.composer&&(d+=e.composer),e.origin&&(d+=" ("+e.origin+")"),d.length>0&&this.addTextIf(a+r,d,"composerfont","meta-top composer",0,null,"end",o,"composer")}e.author&&e.author.length>0&&this.addTextIf(a+r,e.author,"composerfont","meta-top author",0,0,"end",o,"author"),e.partOrder&&e.partOrder.length>0&&this.addTextIf(a,e.partOrder,"partsfont","meta-top part-order",0,0,"start",o,"partOrder")}n.prototype.addTextIf=function(e,t,n,r,i,a,s,o,c,l){if(t&&(i&&this.rows.push({move:i}),this.rows.push({left:e,text:t,font:n,klass:r,anchor:s,absElemType:c}),!l)){var h=o.calc(t,n,r);this.rows.push({move:h.height}),a&&this.rows.push({move:a})}},e.exports=n},function(e,t){function n(e,t,n,r,i,a){this.rows=[],e.unalignedWords&&e.unalignedWords.length>0&&this.unalignedWords(e.unalignedWords,r,i,a),this.extraText(e,r,i,a),e.footer&&n&&this.footer(e.footer,r,a)}n.prototype.unalignedWords=function(e,t,n,r){var i="meta-bottom unaligned-words";this.rows.push({startGroup:"unalignedWords",klass:"abcjs-meta-bottom abcjs-unaligned-words"});var a=r.calc("i","wordsfont",i);this.rows.push({move:n.words});for(var s=0;s<e.length;s++)if(""===e[s])this.rows.push({move:a.height});else if("string"==typeof e[s])this.addTextIf(t+50,e[s],"wordsfont",i,0,0,"start",r,null,!0);else{for(var o=0,c=0,l=0;l<e[s].length;l++){var h=e[s][l],u=h.font?h.font:"wordsfont";this.rows.push({left:t+50+c,text:h.text,font:u,anchor:"start"});var d=r.calc(h.text,"wordsfont",i);o=Math.max(o,d.height),c+=d.width," "===h.text[h.text.length-1]&&(c+=a.width)}this.rows.push({move:o})}this.rows.push({move:2*a.height}),this.rows.push({endGroup:"unalignedWords",absElemType:"unalignedWords"})},n.prototype.extraText=function(e,t,n,r){var i="";e.book&&(i+="Book: "+e.book+"\n"),e.source&&(i+="Source: "+e.source+"\n"),e.discography&&(i+="Discography: "+e.discography+"\n"),e.notes&&(i+="Notes: "+e.notes+"\n"),e.transcription&&(i+="Transcription: "+e.transcription+"\n"),e.history&&(i+="History: "+e.history+"\n"),e["abc-copyright"]&&(i+="Copyright: "+e["abc-copyright"]+"\n"),e["abc-creator"]&&(i+="Creator: "+e["abc-creator"]+"\n"),e["abc-edited-by"]&&(i+="Edited By: "+e["abc-edited-by"]+"\n"),i.length>0&&this.addTextIf(t,i,"historyfont","meta-bottom extra-text",n.info,0,"start",r,"extraText")},n.prototype.footer=function(e,t,n){var r="header meta-bottom",i="footerfont";this.rows.push({startGroup:"footer",klass:r}),this.addTextIf(paddingLeft,e.left,i,r,0,0,"start",n),this.addTextIf(paddingLeft+width/2,e.center,i,r,0,0,"middle",n),this.addTextIf(paddingLeft+width,e.right,i,r,0,0,"end",n)},n.prototype.addTextIf=function(e,t,n,r,i,a,s,o,c,l){if(t){i&&this.rows.push({move:i});var h={left:e,text:t,font:n,anchor:s};c&&(h.absElemType=c),l||(h.klass=r),this.rows.push(h);var u=o.calc("A",n,r),d=t.split("\n").length;"\n"===t[t.length-1]&&d--;var f=1.1*u.height*d;this.rows.push({move:Math.round(f)}),a&&this.rows.push({move:a})}},e.exports=n},function(e,t,n){var r=n(1);function i(e){"keyboard"===this.dragMechanism&&0!==this.dragYStep&&this.dragTarget&&d.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,e),this.dragYStep=0}function a(e){switch(e.keyCode){case 38:case 40:e.preventDefault()}}function s(e){var t=!1,n=e.target.dataset.index;switch(e.keyCode){case 13:case 32:t=!0,this.dragTarget=this.selectables[n],this.dragIndex=n,this.dragMechanism="keyboard",h.bind(this)();break;case 38:t=!0,this.dragTarget=this.selectables[n],this.dragIndex=n,this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*r.STEP+")"));break;case 40:t=!0,this.dragTarget=this.selectables[n],this.dragIndex=n,this.dragMechanism="keyboard",this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*r.STEP+")"));break;case 9:0!==this.dragYStep&&h.bind(this)()}t&&e.preventDefault()}function o(e,t){var n,r,i,a=function(e,t){for(var n=0;n<e.length;n++)if(t===e[n].svgEl)return n;return-1}(e.selectables,function(e){if("svg"===e.tagName)return e;for(var t=e.getAttribute("selectable");!t;)t="svg"===(e=e.parentElement).tagName||e.getAttribute("selectable");return e}(t.target));return a>=0?(n=(i=function(e,t){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[a].svgEl.getBBox(),t))[0],r=i[1]):(i=function(e,t){var n,r,i=1,a=1;return t.viewBox.baseVal&&(0!==t.viewBox.baseVal.width&&(i=t.viewBox.baseVal.width/t.clientWidth),0!==t.viewBox.baseVal.height&&(a=t.viewBox.baseVal.height/t.clientHeight)),"svg"===e.target.tagName?(n=e.offsetX,r=e.offsetY):(n=e.layerX,r=e.layerY),[n*=i,r*=a]}(t,e.renderer.paper.svg),a=function(e,t,n){for(var r=9999999,i=-1,a=0;a<e.selectables.length&&r>0;a++){var s=e.selectables[a];if(e.getDim(s),s.dim.left<t&&s.dim.right>t&&s.dim.top<n&&s.dim.bottom>n)i=a,r=0;else if(s.dim.top<n&&s.dim.bottom>n){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));o<r&&(r=o,i=a)}else if(s.dim.left<t&&s.dim.right>t){var c=Math.min(Math.abs(s.dim.top-n),Math.abs(s.dim.bottom-n));c<r&&(r=c,i=a)}else{var l=Math.abs(t-s.dim.left)>Math.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),h=Math.abs(n-s.dim.top)>Math.abs(n-s.dim.bottom)?Math.abs(n-s.dim.bottom):Math.abs(n-s.dim.top),u=Math.sqrt(l*l+h*h);u<r&&(r=u,i=a)}}return i>=0&&r<=12?i:-1}(e,n=i[0],r=i[1])),{x:n,y:r,clickedOn:a}}function c(e){var t=o(this,e);t.clickedOn>=0&&0===e.button&&(this.dragTarget=this.selectables[t.clickedOn],this.dragIndex=t.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:t.x,y:t.y},this.dragging&&this.dragTarget.isDraggable&&(!function(e,t){if(e){var n=g(e.svg);n[t]=!0,v(e.svg,n)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function l(e){if(this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism){var t=o(this,e),n=Math.round((t.y-this.dragMouseStart.y)/r.STEP);n!==this.dragYStep&&(this.dragYStep=n,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+n*r.STEP+")"))}}function h(e){this.dragTarget&&(p.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),d.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,e),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var n=g(e.svg);delete n[t],v(e.svg,n)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function u(e){e>=0&&e<this.selectables.length&&(this.dragTarget=this.selectables[e],this.dragIndex=e,this.dragMechanism="keyboard",h.bind(this)())}function d(e,t,n,r,i){var a=[];if(e.absEl.elemset){for(var s={},o=0;o<e.absEl.elemset.length;o++){var c=e.absEl.elemset[o];if(c)for(var l=c.getAttribute("class").split(" "),h=0;h<l.length;h++)s[l[h]]=!0}for(var d=0;d<Object.keys(s).length;d++)a.push(Object.keys(s)[d])}for(var p={},m=0;m<a.length;m++)f(a[m],"abcjs-v",p,"voice"),f(a[m],"abcjs-l",p,"line"),f(a[m],"abcjs-m",p,"measure");e.staffPos&&(p.staffPos=e.staffPos);for(var g=0;g<this.listeners.length;g++)this.listeners[g](e.absEl.abcelem,e.absEl.tuneNumber,a.join(" "),p,{step:t,max:n,index:r,setSelection:u.bind(this)},i)}function f(e,t,n,r){if(0===e.indexOf(t)){var i=e.replace(t,""),a=parseInt(i,10);""+a===i&&(n[r]=a)}}function p(){for(var e=0;e<this.selected.length;e++)this.selected[e].unhighlight();this.selected=[]}function m(e,t){p.bind(this)();for(var n=0;n<this.staffgroups.length;n++)for(var r=this.staffgroups[n].voices,i=0;i<r.length;i++)for(var a=r[i].children,s=0;s<a.length;s++){var o=a[s].abcelem.startChar,c=a[s].abcelem.endChar;(t>o&&e<c||t===e&&t===c)&&(this.selected[this.selected.length]=a[s],a[s].highlight(void 0,this.selectionColor))}}function g(e){var t=e.getAttribute("class");t||(t="");for(var n=t.split(" "),r={},i=0;i<n.length;i++)r[n[i]]=!0;return r}function v(e,t){var n=[];for(var r in t)t.hasOwnProperty(r)&&n.push(r);e.setAttribute("class",n.join(" "))}e.exports=function(e){if(e.rangeHighlight=m,e.dragging)for(var t=0;t<e.selectables.length;t++){var n=e.selectables[t];n.selectable&&(n.svgEl.setAttribute("tabindex",0),n.svgEl.setAttribute("data-index",t),n.svgEl.addEventListener("keydown",a.bind(e)),n.svgEl.addEventListener("keyup",s.bind(e)),n.svgEl.addEventListener("focus",i.bind(e)))}e.renderer.paper.svg.addEventListener("mousedown",c.bind(e)),e.renderer.paper.svg.addEventListener("mousemove",l.bind(e)),e.renderer.paper.svg.addEventListener("mouseup",h.bind(e))}},function(e,t,n){var r,i=n(63),a=n(66),s=n(67),o=n(69);!function(){"use strict";r=function(t,n,r,s){var o,c,l=r;for(o=0;o<n.lines.length;o++)(c=n.lines[o]).staff&&(e(t,r,s,c.staffGroup,n.formatting,o===n.lines.length-1,!1),c.staffGroup.w>l&&(l=c.staffGroup.w));for(o=0;o<n.lines.length;o++)if((c=n.lines[o]).staffGroup&&c.staffGroup.voices){for(var h=0;h<c.staffGroup.voices.length;h++)i(c.staffGroup.voices[h]);a(t,c.staffGroup)}for(o=0;o<n.lines.length;o++)(c=n.lines[o]).staffGroup&&c.staffGroup.setHeight();return l};var e=function(e,n,r,i,a,c,l){for(var h=o(e,i.getTextSize,i.voices,i.brace,i.bracket),u=r,d=0;d<8;d++){var f=s(u,e,l,i,h);if(u=t(c,!!a.stretchlast&&a.stretchlast,n+e.padding.left,i.w,u,f.spacingUnits,f.minSpace),l&&console.log("setXSpace",d,i.w,u,i.minspace),null===u)break}!function(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=1;r<n.children.length-1;r++){var i=n.children[r];if(i.abcelem.rest&&("whole"===i.abcelem.rest.type||"multimeasure"===i.abcelem.rest.type)){var a=n.children[r-1],s=n.children[r+1];i.center(a,s)}}}(i.voices)};function t(e,t,n,r,i,a,s){return e&&r/n<.66&&!t||Math.abs(n-r)<2?null:a>0?((i=(n-(r-a*i))/a)*s>50&&(i=50/s),i):null}}(),e.exports=r},function(e,t,n){var r=n(64),i=n(12),a=n(65);function s(e){for(var t=0;t<e.elems.length;t++){var n=e.elems[t];if(n.top)for(var r=l(n,e),i=0;i<n.children.length;i++){var a=n.children[i];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=n.top=a.top}}}}function o(e,t){var n=t.getChordDim();if(n){for(var r=0;r<e.length;r++){if(e[r]<n.left)return r>0&&t.putChordInLane(r),void(e[r]=n.right)}e.push(n.right),t.putChordInLane(e.length-1)}}function c(e){for(var t=0,n=0;n<e.children.length;n++){e.children[n].chordHeightBelow&&t++}return t}function l(e,t){return t=t.beams[0],i(t.startX,t.startY,t.endX,t.endY,e.x)}e.exports=function(e){for(var t=0;t<e.beams.length;t++)if("BeamElem"===e.beams[t].type){r(e.beams[t]),s(e.beams[t]);for(var n=0;n<e.beams[t].elems.length;n++)e.adjustRange(e.beams[t].elems[n])}for(e.staff.specialY.chordLines=function(e){var t,n,r,i=[0],a=[0];for(t=0;t<e.length;t++){for(n=0;n<e[t].children.length;n++)(r=e[t].children[n]).chordHeightAbove&&o(i,r);for(n=e[t].children.length-1;n>=0;n--)(r=e[t].children[n]).chordHeightBelow&&o(a,r)}(i.length>1||a.length>1)&&function(e,t,n){for(var r=0;r<e.length;r++){c(e[r]);for(var i=0;i<e[r].children.length;i++){var a=e[r].children[i];a.chordHeightAbove&&a.invertLane(t)}}}(e,i.length);return{above:i.length,below:a.length}}(e.children),t=0;t<e.otherchildren.length;t++){var i=e.otherchildren[t];"TripletElem"===i.type&&(a(i),e.adjustRange(i))}e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom)}},function(e,t,n){var r=n(2),i=n(1),a=n(12),s=function(e){return void 0===e?0:Math.floor(Math.log(e)/Math.log(2))};function o(e,t,n,r){if(!e.children)return r;for(var i=0;i<e.children.length;i++){var a=e.children[i];t&&void 0!==a.top&&"flags.ugrace"===a.c?r=Math.max(r,a.top-n):t||void 0===a.bottom||"flags.ugrace"!==a.c||(r=Math.max(r,n-a.bottom+7))}return r}function c(e,t,n){var r=t.heads[e?0:t.heads.length-1],i=n.heads[e?0:n.heads.length-1],a=r.x;e&&(a+=r.w-.6);var s=i.x;return[a,s+=e?i.w:.6]}e.exports=function(e){if(0!==e.elems.length&&!e.allrests){var t=function(e,t){var n=e?i.STEP:-i.STEP;t&&(n*=.4);return n}(e.stemsUp,e.isgrace),n=e.elems[0],l=e.elems[e.elems.length-1],h=0,u=e.stemsUp?n.abcelem.maxpitch:n.abcelem.minpitch;h=o(n,e.stemsUp,u,h),h=o(l,e.stemsUp,u,h),h=Math.max(e.stemHeight,h+3);var d=function(e,t,n,r,i,a,s,o,c,l){var h=n-2,u=n-2,d=Math.round(r?Math.max(e+h,c+u):Math.min(e-h,o-u)),f=function(e,t,n,r){if(r)return 0;var i=e-t,a=n/2;i>a&&(i=a);i<-a&&(i=-a);return i}(i,a,t,s),p=d+Math.floor(f/2),m=d+Math.floor(-f/2);l||(r&&d<6||!r&&d>6)&&(p=6,m=6);return[p,m]}(e.average,e.elems.length,h,e.stemsUp,n.abcelem.averagepitch,l.abcelem.averagepitch,e.isflat,e.min,e.max,e.isgrace),f=c(e.stemsUp,n,l);e.addBeam({startX:f[0],endX:f[1],startY:d[0],endY:d[1],dy:t});for(var p=function(e,t,n,r,i){for(var o=[],l=[],h=0;h<e.length;h++){var u=e[h];if(!u.abcelem.rest){var d=u.heads[t?0:u.heads.length-1],f=d.x+(t?d.w:0),p=a(n.startX,n.startY,n.endX,n.endY,f),m=t?-1.5:1.5;r&&(m=2*m/3);var g=u.abcelem.duration;0===g&&(g=.25);for(var v=s(g);v<-3;v++){var b=-4-v;if(l[b]?l[b].single=!1:l[b]={x:f+(t?-.6:0),y:p+m*(b+1),durlog:v,single:!0},h>0&&u.abcelem.beambr&&u.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=c(t,e[h-1],u);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=u.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var w=l.length-1;w>=0;w--)if(h===e.length-1||s(e[h+1].abcelem.duration)>-w-4){var x=f,k=p+m*(w+1);l[w].single&&(x=0===h?f+5:f-5,k=a(n.startX,n.startY,n.endX,n.endY,x)+m*(w+1));var A={startX:l[w].x,endX:x,startY:l[w].y,endY:k,dy:i};if(void 0!==l[w].split){var T=l[w].split;A.endX<=T[T.length-1]&&(T[T.length-1]-=u.w),T.push(A.endX),A.split=l[w].split}o.push(A),l=l.slice(0,w)}}}return o}(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),m=0;m<p.length;m++)e.addBeam(p[m]);!function(e,t,n,s,o){for(var c=0;c<e.length;c++){var l=e[c];if(!l.abcelem.rest){var h=!l.addExtra,u=h?o:l,d=l.heads[t?0:l.heads.length-1],f=d.pitch+(t?.2:-.2),p=t?d.w:0,m=d.x+p,g=a(n.startX,n.startY,n.endX,n.endY,m),v=t?-.6:.6;t||(g-=s/2/i.STEP),h&&(p+=l.heads[0].dx),"noteheads.slash.quarter"===d.c&&(t?f+=1:f-=1);var b=new r(null,p,0,f,{type:"stem",pitch2:g,linewidth:v});b.setX(u.x),u.addRight(b)}}}(e.elems,e.stemsUp,e.beams[0],t,e.mainNote)}}},function(e,t,n){var r=n(12);function i(e){return e.stemsUp}e.exports=function(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(!e.hasBeam||t.elems[0]===e.anchor1.parent&&t.elems[t.elems.length-1]===e.anchor2.parent||(e.hasBeam=!1),e.hasBeam){var n=i(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=function(e,t,n){if(0===n.beams.length)return 0;n=n.beams[0];var i=e+(t-e)/2;return r(n.startX,n.startY,n.endX,n.endY,i)}(n,e.anchor2.x,t),e.yTextPos+=i(t)?3:-2,e.xTextPos=(o=n,c=e.anchor2.x,o+(c-o)/2),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,i(t)&&(e.endingHeightAbove=4)}else{e.startNote=Math.max(e.anchor1.parent.top,9)+4,e.endNote=Math.max(e.anchor2.parent.top,9)+4,"rest"===e.anchor1.parent.type&&"rest"!==e.anchor2.parent.type?e.startNote=e.endNote:"rest"===e.anchor2.parent.type&&"rest"!==e.anchor1.parent.type&&(e.endNote=e.startNote);for(var a=0,s=0;s<e.middleElems.length;s++)a=Math.max(a,e.middleElems[s].top);((a+=4)>e.startNote||a>e.endNote)&&(e.startNote=a,e.endNote=a),e.flatBeams&&(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1}}var o,c;delete e.middleElems,delete e.flatBeams}},function(e,t,n){var r=n(1),i=1;function a(e,t,n,r){if(e.specialY[n]){var a=e.specialY[n];r&&(a*=r),e.top+=a+i,t[n]=e.top}}function s(e,t,n){var r,i;for(r=0;r<t.children.length;r++)o(e,i=t.children[r],n);for(r=0;r<t.otherchildren.length;r++)switch((i=t.otherchildren[r]).type){case"CrescendoElem":c(e,i);break;case"DynamicDecoration":l(e,i);break;case"EndingElem":h(e,i)}}function o(e,t,n){for(var r=0;r<t.children.length;r++){var i=t.children[r];for(var a in t.specialY)t.specialY.hasOwnProperty(a)&&i[a]&&(i.pitch=e[a],void 0===i.top&&("TempoElement"===i.type?u(e,i):d(e,i,n),t.pushTop(i.top),t.pushBottom(i.bottom)))}}function c(e,t){t.dynamicHeightAbove?t.pitch=e.dynamicHeightAbove:t.pitch=e.dynamicHeightBelow}function l(e,t){t.volumeHeightAbove?t.pitch=e.volumeHeightAbove:t.pitch=e.volumeHeightBelow}function h(e,t){t.pitch=e.endingHeightAbove-2}function u(e,t){if(t.pitch=e.tempoHeightAbove,t.top=e.tempoHeightAbove,t.bottom=e.tempoHeightAbove,t.note){var n=t.pitch-t.totalHeightInPitches+1;t.note.top=n,t.note.bottom=n;for(var r=0;r<t.note.children.length;r++){var i=t.note.children[r];i.top+=n,i.bottom+=n,i.pitch+=n,void 0!==i.pitch2&&(i.pitch2+=n)}}}function d(e,t,n){switch(t.type){case"part":t.top=e.partHeightAbove+t.height,t.bottom=e.partHeightAbove;break;case"text":case"chord":t.chordHeightAbove?(t.top=e.chordHeightAbove,t.bottom=e.chordHeightAbove):(t.top=e.chordHeightBelow,t.bottom=e.chordHeightBelow);break;case"lyric":t.lyricHeightAbove?(t.top=e.lyricHeightAbove,t.bottom=e.lyricHeightAbove):(t.top=e.lyricHeightBelow+n.vocal/r.STEP,t.bottom=e.lyricHeightBelow+n.vocal/r.STEP,t.pitch-=n.vocal/r.STEP);break;case"debug":t.top=e.chordHeightAbove,t.bottom=e.chordHeightAbove}void 0!==t.pitch&&void 0!==t.top||console.error("RelativeElement position not set.",t.type,t.pitch,t.top,e)}e.exports=function(e,t){for(var n,o=0;o<t.staffs.length;o++){var c=t.staffs[o],l={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),a(c,l,"lyricHeightAbove"),a(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+i,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+i,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(a(c,l,"dynamicHeightAbove"),a(c,l,"volumeHeightAbove")),a(c,l,"partHeightAbove"),a(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=e.spacing.vocal/r.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+i),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var h=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(h*=c.specialY.chordLines.below),c.bottom-=h+i}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+i):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+i):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+i),e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var u=0;u<c.voices.length;u++){s(l,t.voices[c.voices[u]],e.spacing)}if(void 0!==n){var d=n+(c.top-10),f=e.spacing.systemStaffSeparation/r.STEP-d;f>0&&(c.top+=f)}n=2-c.bottom}}},function(e,t,n){var r=n(68);function i(e){for(var t=0;t<e.length;t++)if(!r.layoutEnded(e[t]))return!1;return!0}function a(e){return e.durationindex-(e.children[e.i]&&e.children[e.i].duration>0?0:5e-7)}e.exports=function(e,t,n,s,o){var c,l=0,h=1e3,u=o;s.startx=u;var d=0;for(n&&console.log("init layout",e),c=0;c<s.voices.length;c++)r.beginLayout(u,s.voices[c]);for(var f=0;!i(s.voices);){for(d=null,c=0;c<s.voices.length;c++)r.layoutEnded(s.voices[c])||d&&!(a(s.voices[c])<d)||(d=a(s.voices[c]));var p=[],m=[];for(c=0;c<s.voices.length;c++){a(s.voices[c])-d>1e-7?m.push(s.voices[c]):p.push(s.voices[c])}f=0;var g=0;for(c=0;c<p.length;c++)r.getNextX(p[c])>u&&(u=r.getNextX(p[c]),f=r.getSpacingUnits(p[c]),g=p[c].spacingduration);for(l+=f,h=Math.min(h,f),n&&console.log("currentduration: ",d,l,h),c=0;c<p.length;c++){var v=r.layoutOneItem(u,e,p[c]),b=v-u;if(b>0){u=v;for(var y=0;y<c;y++)r.shiftRight(b,p[y])}}for(c=0;c<m.length;c++)m[c].spacingduration-=g,r.updateNextX(u,e,m[c]);for(c=0;c<p.length;c++){var w=p[c];r.updateIndices(w)}}for(c=0;c<s.voices.length;c++)r.getNextX(s.voices[c])>u&&(u=r.getNextX(s.voices[c]),f=r.getSpacingUnits(s.voices[c]));return l+=f,s.setWidth(u),{spacingUnits:l,minSpace:h}}},function(e,t){var n=function(){};n.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},n.layoutEnded=function(e){return e.i>=e.children.length},n.getNextX=function(e){return Math.max(e.minx,e.nextx)},n.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},n.layoutOneItem=function(e,t,n){var r=n.children[n.i];if(!r)return 0;var i=e-n.minx,a=function(e){return-e.extraw}(r);return i<a&&(0===n.i||"bar"!==r.type||"part"!==n.children[n.i-1].type&&"tempo"!==n.children[n.i-1].type)&&(e+=a-i),r.setX(e),n.spacingduration=r.duration,n.minx=e+function(e){return e.w}(r),n.i!==n.children.length-1&&(n.minx+=r.minspacing),this.updateNextX(e,t,n),e},n.shiftRight=function(e,t){var n=t.children[t.i];n&&(n.setX(n.x+e),t.minx+=e,t.nextx+=e)},n.updateNextX=function(e,t,n){n.nextx=e+t*Math.sqrt(8*n.spacingduration)},n.updateIndices=function(e){this.layoutEnded(e)||(e.durationindex+=e.children[e.i].duration,"bar"===e.children[e.i].type&&(e.durationindex=Math.round(64*e.durationindex)/64),e.i++)},e.exports=n},function(e,t){function n(e,t,n){if(e)for(var i=0;i<e.length;i++)r(t,e[i]),n=Math.max(n,e[i].getWidth());return n}function r(e,t){t.x=e}e.exports=function(e,t,r,i,a){var s,o,c=e.padding.left,l=0;for(s=0;s<r.length;s++)r[s].header&&(o=t.calc(r[s].header,"voicefont",""),l=Math.max(l,o.width));if(i)for(s=0;s<i.length;s++)i[s].header&&(o=t.calc(i[s].header,"voicefont",""),l=Math.max(l,o.width));if(a)for(s=0;s<a.length;s++)a[s].header&&(o=t.calc(a[s].header,"voicefont",""),l=Math.max(l,o.width));l&&(l+=t.calc("A","voicefont","").width);var h=0;return h=n(i,c+=l,h),c+(h=n(a,c,h))}},function(e,t){var n=function(e){this.shouldAddClasses=e.shouldAddClasses,this.reset()};n.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null},n.prototype.incrLine=function(){null===this.lineNumber?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},n.prototype.incrVoice=function(){null===this.voiceNumber?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},n.prototype.isInMeasure=function(){return null!==this.measureNumber},n.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null},n.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},n.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},n.prototype.incrNote=function(){this.noteNumber++},n.prototype.measureTotal=function(){for(var e=0,t=0;t<this.lineNumber;t++)e+=this.measureTotalPerLine[t]?this.measureTotalPerLine[t]:0;return this.measureNumber&&(e+=this.measureNumber),e},n.prototype.getCurrent=function(e){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}},n.prototype.generate=function(e){if(!this.shouldAddClasses)return"";var t=[];if(e&&e.length>0&&t.push(e),null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var n=0;n<t.length;n++)0!==t[n].indexOf("abcjs-")&&t[n].length>0&&(t[n]="abcjs-"+t[n])}return t.join(" ")},e.exports=n},function(e,t){var n=function(e,t){this.formatting=e,this.classes=t};n.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},n.prototype.calc=function(e,t){var n;n="string"==typeof e?(n=this.formatting[e])?{face:n.face,size:Math.round(4*n.size/3),decoration:n.decoration,style:n.style,weight:n.weight,box:n.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var r=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return n.padding=n.size*r,{font:n,attr:{"font-size":n.size,"font-style":n.style,"font-family":n.face,"font-weight":n.weight,"text-decoration":n.decoration,class:this.classes.generate(t)}}},e.exports=n},function(e,t){var n=function(e,t){this.getFontAndAttr=e,this.svg=t};n.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},n.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},n.prototype.calc=function(e,t,n,r){var i;i="string"==typeof t?this.attr(t,n):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":t.face,"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(n)}};var a=this.svg.getTextSize(e,i.attr,r);return i.font.box?{height:a.height+4*i.font.padding,width:a.width+4*i.font.padding}:a},n.prototype.baselineToCenter=function(e,t,n,r,i){return.5*this.calc(e,t,n).height+(i-r-2)*this.attr(t,n).font.size},e.exports=n},function(e,t,n){var r=n(74),i=n(87),a=n(88),s=n(1),o=n(90);function c(e,t,n){r(e,t,n);var i=t.height*s.STEP;return e.y+=i,t}function l(e,t,n,r){var i=-(n.staffs[n.staffs.length-1].bottom-2),a=(r.staffs[0].top-10+i)*s.STEP;a<t&&e.moveY(t-a)}e.exports=function(e,t,n,r,s,h,u,d,f){var p=new o(e.paper,d,f);e.moveY(e.padding.top),a(e,n.topText,p),e.moveY(e.spacing.music);for(var m=[],g=0;g<n.lines.length;g++){t.incrLine();var v=n.lines[g];if(v.staff){v.vskip&&e.moveY(v.vskip),m.length>=1&&l(e,e.spacing.staffSeparation,m[m.length-1],v.staffGroup);var b=c(e,v.staffGroup,p);b.line=g,m.push(b)}else v.nonMusic&&a(e,v.nonMusic,p)}return t.reset(),e.moveY(24),a(e,n.bottomText,p),i(e,s,u,h),{staffgroups:m,selectables:p.getElements()}}},function(e,t,n){var r=n(1),i=n(75),a=n(76),s=n(85),o=n(86),c=n(25);function l(e,t,n,a,s){if(n)for(var o=0;o<n.length;o++)n[o].isStartVoice(a)&&(n[o].startY=t-10*r.STEP,n[o].elemset=i(e,n[o],s))}function h(e,t,n){for(var i=0;i<n.length;i++)for(var a=t[n[i]].children,s=0;s<a.length;s++){var c=a[s],l=c.getFixedCoords();if(!c.invisible&&void 0!==l.t&&void 0!==l.b){var h=(l.t-l.b)*r.STEP;o(e,{x:l.x,y:e.calcY(l.t),width:l.w,height:h,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var u=0;u<c.children.length;u++){var d=c.children[u],f=d.getChordDim();if(f){var p=e.calcY(d.pitch);p+=d.dim.font.size*d.getLane(),o(e,{x:f.left,y:p,width:f.right-f.left,height:d.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}e.exports=function(e,t,n){var i;!function(e,t){var n=Math.round(e.y);e.paper.pathToBack({path:"M 0 "+n+" L 0 0",stroke:"none",fill:"none","stroke-opacity":0,"fill-opacity":0,class:e.controller.classes.generate(t),"data-vertical":n})}(e,"abcjs-top-of-system");for(var u,d,f=e.y,p=0;p<t.staffs.length;p++){var m=t.staffs[p];e.moveY(r.STEP,m.top),m.absoluteY=e.y,e.showDebug&&(e.showDebug.indexOf("box")>=0&&h(e,t.voices,m.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:f,y2:f,stroke:"#0000ff"}),o(e,{x:e.padding.left,y:e.calcY(m.originalTop),width:e.controller.width,height:e.calcY(m.originalBottom)-e.calcY(m.originalTop),fill:"#000000",stroke:"#000000","fill-opacity":.1,"stroke-opacity":.1}),i=0,y(m,"chordHeightAbove"),y(m,"chordHeightBelow"),y(m,"dynamicHeightAbove"),y(m,"dynamicHeightBelow"),y(m,"endingHeightAbove"),y(m,"lyricHeightAbove"),y(m,"lyricHeightBelow"),y(m,"partHeightAbove"),y(m,"tempoHeightAbove"),y(m,"volumeHeightAbove"),y(m,"volumeHeightBelow"))),e.moveY(r.STEP,-m.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var g=0,v=0;v<t.voices.length;v++){var b=t.voices[v].staff;e.y=b.absoluteY,e.controller.classes.incrVoice(),t.voices[v].duplicate||(u||(u=e.calcY(10)),d=e.calcY(2),0!==b.lines&&(e.controller.classes.newMeasure(),s(e,t.startx,t.w,b.lines)),l(e,b.absoluteY,t.brace,v,n),l(e,b.absoluteY,t.bracket,v,n)),a(e,t.voices[v],g,n,{top:f,height:t.height*r.STEP}),e.controller.classes.newMeasure(),t.voices[v].duplicate||(g=e.calcY(2))}function y(t,n){var a=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(t.positionY[n]){var s=t.specialY[n]*r.STEP;"chordHeightAbove"===n&&t.specialY.chordLines&&t.specialY.chordLines.above&&(s*=t.specialY.chordLines.above),"chordHeightBelow"===n&&t.specialY.chordLines&&t.specialY.chordLines.below&&(s*=t.specialY.chordLines.below),o(e,{x:e.padding.left,y:e.calcY(t.positionY[n]),width:e.controller.width,height:s,fill:a[i],stroke:a[i],"fill-opacity":.4,"stroke-opacity":.4},n.substr(0,4)),(i+=1)>6&&(i=0)}}e.controller.classes.newMeasure(),t.staffs.length>1&&c(e,t.startx,.6,u,d),e.y=f}},function(e,t,n){var r=n(7),i=n(1),a=n(4);var s=function(e,t,n,s,o,c,l){var h;if(c){e.paper.openGroup({klass:e.controller.classes.generate("staff-extra voice-name")});var u=n+(s-n)/2;u-=e.controller.getTextSize.baselineToCenter(c,"voicefont","staff-extra voice-name",0,1),a(e,{x:e.padding.left,y:u,text:c,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return"brace"===o?h=function(e,t,n,i,a){var s=i-n,o=[7.5,-8,21,0,18.5,-10.5,7.5],c=[0,s/5.5,s/3.14,s/2,s/2.93,s/4.88,0],l=r("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t+o[0],n+c[0],t+o[1],n+c[1],t+o[2],n+c[2],t+o[3],n+c[3],t+o[4],n+c[4],t+o[5],n+c[5],t+o[6],n+c[6]);return l+=r("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t+(o=[0,17.5,-7.5,6.6,-5,20,0])[0],n+(c=[s/2,s/1.46,s/1.22,s,s/1.19,s/1.42,s/2])[0],t+o[1],n+c[1],t+o[2],n+c[2],t+o[3],n+c[3],t+o[4],n+c[4],t+o[5],n+c[5],t+o[6],n+c[6]),e.paper.path({path:l,stroke:"#000000",fill:"#000000",class:e.controller.classes.generate(a)})}(e,t,n,s,o):"bracket"===o&&(h=function(e,t,n,a,s){t+=i.STEP;var o=.75*i.STEP,c=.75*i.STEP,l=a-n,h=r("M %f %f l %f %f l %f %f l %f %f z",t,n-c,0,l+2*c,o,0,0,-(l+2*c)),u=2*i.STEP,d=i.STEP;return h+=r("M %f %f q %f %f %f %f q %f %f %f %f z",t+o,n-c,.6*u,.2*d,u,-d,.1*-u,.3*d,-u,d+i.STEP),h+=r("M %f %f q %f %f %f %f q %f %f %f %f z",t+o,n+c+l,.6*u,.2*-d,u,d,.1*-u,.3*-d,-u,-d-i.STEP),e.paper.path({path:h,stroke:"#000000",fill:"#000000",class:e.controller.classes.generate(s)})}(e,t,n,s,o)),c&&(h=e.paper.closeGroup()),l.wrapSvgEl({el_type:o,startChar:-1,endChar:-1},h),h};e.exports=function(e,t,n){var r=t.startVoice.staff.absoluteY-10*i.STEP;return t.endVoice&&t.endVoice.staff?t.endY=t.endVoice.staff.absoluteY-2*i.STEP:t.lastContinuedVoice&&t.lastContinuedVoice.staff?t.endY=t.lastContinuedVoice.staff.absoluteY-2*i.STEP:t.endY=t.startVoice.staff.absoluteY-2*i.STEP,s(e,t.x,r,t.endY,t.type,t.header,n)}},function(e,t,n){var r=n(77),i=n(78),a=n(79),s=n(80),o=n(81),c=n(82),l=n(4),h=n(83);function u(e){return"rest"===e.type&&!(!e.abcelem||!e.abcelem.rest||"spacer"===e.abcelem.rest.type)}e.exports=function(e,t,n,d,f){var p,m,g=t.w-1;if(e.staffbottom=t.staff.bottom,t.header){var v=l(e,{x:e.padding.left,y:e.calcY(t.headerPosition),text:t.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0});d.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:t.header},v)}for(p=0;p<t.children.length;p++){var b=!1;"staff-extra"===(m=t.children[p]).type||e.controller.classes.isInMeasure()||(e.controller.classes.startMeasure(),b=!0),m.type,h(e,m,t.barto||p===t.children.length-1?n:0,d,f),("note"===m.type||u(m))&&e.controller.classes.incrNote(),"bar"!==m.type||b||e.controller.classes.incrMeasure()}for(e.controller.classes.startMeasure(),p=0;p<t.beams.length;p++){var y=t.beams[p];"bar"===y?e.controller.classes.incrMeasure():c(e,y,d)}for(e.controller.classes.startMeasure(),p=0;p<t.otherchildren.length;p++)if("bar"===(m=t.otherchildren[p]))e.controller.classes.incrMeasure();else switch(m.type){case"CrescendoElem":m.elemset=r(e,m,d);break;case"DynamicDecoration":m.elemset=i(e,m,d);break;case"TripletElem":a(e,m,d);break;case"EndingElem":m.elemset=s(e,m,t.startx+10,g,d);break;case"TieElem":m.elemset=o(e,m,t.startx+10,g,d);break;default:console.log(m),h(e,m,t.startx+10,g,d,f)}}},function(e,t,n){n(21),n(22);var r=n(7),i=n(9),a=n(3);var s=function(e,t,n,s,o,c,l){t=a(t),n=a(n),s=a(s),o=a(o),c=a(c),l=a(l);var h=r("M %f %f L %f %f M %f %f L %f %f",c,t,l,n,c,s,l,o);return i(e,{path:h,highlight:"stroke",stroke:"#000000",class:e.controller.classes.generate("dynamics decoration")})};e.exports=function(e,t,n){void 0===t.pitch&&window.console.error("Crescendo Element y-coordinate not set.");var r,i=e.calcY(t.pitch)+4,a=t.anchor1?t.anchor1.x:0,o=t.anchor2?t.anchor2.x:800;return r="<"===t.dir?s(e,i+4,i,i+4,i+8,a,o):s(e,i,i+4,i+8,i+4,a,o),n.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},r),[r]}},function(e,t,n){var r=n(23);e.exports=function(e,t,n){void 0===t.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var i=r(e,t.anchor.x,t.pitch,t.dec,1,1,e.controller.classes.generate("decoration dynamics"));return n.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},i),[i]}},function(e,t,n){var r=n(7),i=n(4),a=n(9),s=n(3);function o(e,t,n,i){return r("M %f %f L %f %f",s(e),s(t),s(n),s(i))}e.exports=function(e,t,n){e.paper.openGroup({klass:e.controller.classes.generate("triplet "+t.durationClass)}),t.hasBeam||function(e,t,n,r,i){n=e.calcY(n),i=e.calcY(i);var s="";s+=o(t,n,t,n+5),s+=o(r,i,r,i+5);var c=t+(r-t)/2,l=(i-n)/(r-t),h=c-8;s+=o(t,n,h,n+(h-t)*l);var u=c+8;s+=o(u,n+(u-t)*l,r,i),a(e,{path:s,stroke:"#000000"})}(e,t.anchor1.x,t.startNote,t.anchor2.x+t.anchor2.w,t.endNote),i(e,{x:t.xTextPos,y:e.calcY(t.yTextPos-1),text:""+t.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0});var r=e.paper.closeGroup();return n.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},r),r}},function(e,t,n){var r=n(7),i=n(4),a=n(9),s=n(3);e.exports=function(e,t,n,o,c){void 0===t.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=s(e.calcY(t.pitch)),h="";t.anchor1&&(n=s(t.anchor1.x+t.anchor1.w),h+=r("M %f %f L %f %f ",n,l,n,s(l+20))),t.anchor2&&(o=s(t.anchor2.x),h+=r("M %f %f L %f %f ",o,l,o,s(l+20))),h+=r("M %f %f L %f %f ",n,l,o,l),e.paper.openGroup({klass:e.controller.classes.generate("ending")}),a(e,{path:h,stroke:"#000000",fill:"#000000"}),t.anchor1&&i(e,{x:s(n+5),y:s(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0});var u=e.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},u),[u]}},function(e,t,n){var r=n(7),i=n(3);var a=function(e,t,n){e.anchor1&&e.anchor2?e.anchor1.pitch===e.anchor2.pitch&&0===e.internalNotes.length?e.isTie=!0:e.isTie=!1:e.isTie=!0,e.isTie?(e.calcTieDirection(),e.calcX(t,n),e.calcTieY()):(e.calcSlurDirection(),e.calcX(t,n),e.calcSlurY()),e.avoidCollisionAbove()},s=function(e,t,n,a,s,o,c,l,h){var u=l?1.2:1.5;t=i(t+6),n=i(n+4),a+=o?u:-u,s+=o?u:-u;var d,f=i(e.calcY(a)),p=i(e.calcY(s)),m=n-t,g=p-f,v=Math.sqrt(m*m+g*g),b=m/v,y=g/v,w=v/3.5,x=l?10:25,k=(o?-1:1)*Math.min(x,Math.max(4,w)),A=i(t+w*b-k*y),T=i(f+w*y+k*b),S=i(n-w*b-k*y),M=i(p-w*y+k*b);if(c?c+=" slur":c="slur",c+=l?" tie":" legato",h){c+=" dotted";var N=r("M %f %f C %f %f %f %f %f %f",t,f,A,T,S,M,n,p);d=e.paper.path({path:N,stroke:"#000000",fill:"none","stroke-dasharray":"5 5",class:e.controller.classes.generate(c)})}else{var C=r("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t,f,A,T,S,M,n,p,i(S-2*y),i(M+2*b),i(A-2*y),i(T+2*b),t,f);d=e.paper.path({path:C,stroke:"none",fill:"#000000",class:e.controller.classes.generate(c)})}return d};e.exports=function(e,t,n,r,i){a(t,n,r);var o="";t.anchor1?o+="abcjs-start-m"+t.anchor1.parent.counters.measure+"-n"+t.anchor1.parent.counters.note:o+="abcjs-start-edge",t.anchor2?o+=" abcjs-end-m"+t.anchor2.parent.counters.measure+"-n"+t.anchor2.parent.counters.note:o+=" abcjs-end-edge",t.hint&&(o="abcjs-hint");var c=t.fixedY?1.5:0,l=s(e,t.startX,t.endX,t.startY+c,t.endY+c,t.above,o,t.isTie,t.dotted);return i.wrapSvgEl({el_type:"slur",startChar:-1,endChar:-1},l),[l]}},function(e,t,n){var r=n(9),i=n(3);function a(e,t,n,r,a,s){n=i(e.calcY(n)),a=i(e.calcY(a)),t=i(t),r=i(r);var o=i(n+s);return"M"+t+" "+n+" L"+r+" "+a+"L"+r+" "+i(a+s)+" L"+t+" "+o+"z"}function s(e,t,n,r,i){return(i-n)/(r-t)}function o(e,t,n,r){return t+(r-e)*n}e.exports=function(e,t){if(0!==t.beams.length){t.hint&&" abcjs-hint";for(var n="",i=0;i<t.beams.length;i++){var c=t.beams[i];if(c.split){for(var l=s(e,c.startX,c.startY,c.endX,c.endY),h=[],u=0;u<c.split.length;u+=2)h.push([c.split[u],c.split[u+1]]);for(u=0;u<h.length;u++){var d=o(c.startX,c.startY,l,h[u][0]),f=o(c.startX,c.startY,l,h[u][1]);n+=a(e,h[u][0],d,h[u][1],f,c.dy)}}else n+=a(e,c.startX,c.startY,c.endX,c.endY,c.dy)}var p=("abcjs-d"+t.duration).replace(/\./g,"-"),m=e.controller.classes.generate("beam-elem "+p);return[r(e,{path:n,stroke:"none",fill:"#000000",class:m})]}}},function(e,t,n){var r=n(84),i=n(24),a=n(1),s=n(8),o=n(13);e.exports=function(e,t,n,c,l){if(!t.invisible){var h=t.children.length>0&&"TempoElement"===t.children[0].type;t.elemset=[],o.beginGroup(e.paper,e.controller);for(var u=0;u<t.children.length;u++){var d,f=t.children[u];switch(f.type){case"TempoElement":(d=r(e,f,c))&&(t.elemset=t.elemset.concat(d));break;default:(d=i(e,f,n,c))&&t.elemset.push(d)}}var p=t.type;if(("note"===t.type||"rest"===t.type)&&(t.counters=e.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*t.durationClass)/1e3).replace(/\./g,"-"),t.abcelem.pitches))for(var m=0;m<t.abcelem.pitches.length;m++)p+=" p"+t.abcelem.pitches[m].pitch;var g=o.endGroup(p);g?h&&t.elemset.length>0?(e.paper.moveElementToChild(t.elemset[0],g),c.add(t,t.elemset[0],!1,l)):(t.elemset.push(g),c.add(t,g,"note"===t.type,l)):t.elemset.length>0&&c.add(t,t.elemset[0],"note"===t.type,l),t.klass&&s(t.elemset,"mark","","#00ff00"),t.hint&&s(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t;a.STEP}}},function(e,t,n){var r=n(24),i=n(4);e.exports=function(e,t,n){var a=t.x;void 0===t.pitch&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo",e.paper.openGroup({klass:e.controller.classes.generate("tempo")});var s,o=e.calcY(t.pitch)+2;if(t.tempo.preString){s=i(e,{x:a,y:o,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,"dominant-baseline":"ideographic"});var c=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",s).width;a+=c+c/t.tempo.preString.length}if(t.note){t.note.setX(a);for(var l=0;l<t.note.children.length;l++)r(e,t.note.children[l],a,n);a+=t.note.w+5;var h="= "+t.tempo.bpm;s=i(e,{x:a,y:o,text:h,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0});var u=e.controller.getTextSize.calc(h,"tempofont","tempo",s).width;a+=u+u/h.length}return t.tempo.postString&&i(e,{x:a,y:o,text:t.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0}),[e.paper.closeGroup()]}},function(e,t,n){var r=n(26);e.exports=function(e,t,n,i){var a="abcjs-top-line";if(e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")}),1===i)r(e,t,n,6,a);else for(var s=i-1;s>=0;s--)r(e,t,n,2*(s+1),a),a=void 0;e.paper.closeGroup()}},function(e,t){e.exports=function(e,t,n){var r=e.paper.rectBeneath(t);return n&&e.paper.text(n,{x:0,y:t.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),r}},function(e,t){e.exports=function(e,t,n,r){var i=(t+e.padding.right)*n,a=(e.y+e.padding.bottom)*n;e.isPrint&&(a=Math.max(a,1056));var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s),e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var o={overflow:"hidden"};"resize"===r?e.paper.setResponsiveWidth(i,a):(o.width="",o.height=a+"px",n<1?(o.width=i+"px",e.paper.setSize(i/n,a/n)):e.paper.setSize(i,a)),e.paper.setScale(n),e.paper.setParentStyles(o)}},function(e,t,n){var r=n(89),i=n(4);e.exports=function(e,t,n){for(var a=0;a<t.rows.length;a++){var s=t.rows[a];if(s.move)e.moveY(s.move);else if(s.text){var o=s.left?s.left:0,c=i(e,{x:o,y:e.y,text:s.text,type:s.font,klass:s.klass,anchor:s.anchor});s.absElemType&&n.wrapSvgEl({el_type:s.absElemType,startChar:-1,endChar:-1,text:s.text},c)}else if(s.separator)r(e,s.separator);else if(s.startGroup)e.paper.openGroup({klass:s.klass});else if(s.endGroup){var l=e.paper.closeGroup();s.absElemType&&n.wrapSvgEl({el_type:s.absElemType,startChar:-1,endChar:-1,text:""},l)}}}},function(e,t){e.exports=function(e,t){var n=Math.round(e.y),r=(e.controller.width-t)/2,i=r+t,a="M "+r+" "+n+" L "+i+" "+n+" L "+i+" "+(n+1)+" L "+r+" "+(n+1)+" L "+r+" "+n+" z";e.paper.pathToBack({path:a,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}},function(e,t,n){var r=n(21),i=n(22);function a(e,t,n){this.elements=[],this.paper=e,this.tuneNumber=n,this.selectTypes=t}a.prototype.getElements=function(){return this.elements},a.prototype.add=function(e,t,n,r){if(this.canSelect(e)){var i;i=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,i);var a={absEl:e,svgEl:t,isDraggable:n};void 0!==r&&(a.staffPos=r),this.elements.push(a)}},a.prototype.canSelect=function(e){return!1!==this.selectTypes&&(!(!e||!e.abcelem)&&(!0===this.selectTypes||(void 0===this.selectTypes?"note"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0)))},a.prototype.wrapSvgEl=function(e,t){var n={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:r,unhighlight:i};this.add(n,t,!1)},e.exports=a},function(e,t,n){var r=n(14),i=n(92),a=n(105);e.exports=function(e,t,n,s,o){var c,l={};if(n)for(c in n)n.hasOwnProperty(c)&&(l[c]=n[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(e,t,n,r){var s="",o=a(t,l);if(l.generateInline){var c=o.inline?o.inline:o,h=e.innerHTML.indexOf("abcjs-midi-current")>=0;s+=i.generateMidiControls(t,l,c,n,h)}if(l.generateDownload){var u=o.download?o.download:o;s+=i.generateMidiDownloadLink(t,l,u,n)}e.innerHTML=s,l.generateInline&&i.attachListeners(e);var d=function(e,t){var n=e.getElementsByClassName(t);return 0===n.length?null:n[0]};if(l.generateInline&&(l.animate||l.midiListener)){var f=d(e,"abcjs-inline-midi");if(f.abcjsTune=t,f.abcjsListener=l.midiListener,f.abcjsQpm=l.qpm,f.abcjsContext=l.context,l.animate){var p=l.drumIntro?l.drumIntro:0;f.abcjsAnimate=l.animate.listener,f.abcjsTune=l.animate.target,f.abcjsTune.setTiming(l.qpm,p)}}if(l.generateInline&&l.inlineControls&&l.inlineControls.startPlaying){var m=d(e,"abcjs-midi-start");i.startPlaying(m)}}),e,t,l)}},function(e,t,n){function r(){return"performance"in window&&"now"in window.performance}r()&&("galactic"in window||(window.galactic={}),window.galactic.loc={isLocalUrl:function(){return!1}},n(93),n(94)(window.galactic),n(95),n(96),n(97),n(98),n(99),n(100),n(101),n(102),n(103),n(104));var i={};!function(){"use strict";function e(e,t){return e.replace(/%T/g,t)}i.generateMidiDownloadLink=function(e,t,n,r){var i=["abcjs-download-midi","abcjs-midi-"+r];t.downloadClass&&i.push(t.downloadClass);var a='<div class="'+i.join(" ")+'">';t.preTextDownload&&(a+=t.preTextDownload);var s,o,c=e.metaText&&e.metaText.title?e.metaText.title:"Untitled";return s=t.downloadLabel&&((o=t.downloadLabel)&&"[object Function]"==={}.toString.call(o))?t.downloadLabel(e,r):t.downloadLabel?t.downloadLabel.replace(/%T/,c):'Download MIDI for "'+c+'"',a+='<a download="'+(c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"))+'.midi" href="'+n+'">'+s+"</a>",t.postTextDownload&&(a+=t.postTextDownload),a+"</div>"},i.deviceSupportsMidi=function(){return!!r()&&"not loaded"!==i.midiInlineInitialized},i.generateMidiControls=function(t,n,i,a,s){if(!r())return'<div class="abcjs-inline-midi abcjs-midi-'+a+"\">ERROR: this browser doesn't support window.performance</div>";if("not loaded"===i.midiInlineInitialized)return'<div class="abcjs-inline-midi abcjs-midi-'+a+'">MIDI NOT PRESENT</div>';s&&g();var o=t.metaText&&t.metaText.title?t.metaText.title:"Untitled",c=n.inlineControls||{};void 0===c.standard&&(c.standard=!0),void 0===c.tooltipSelection&&(c.tooltipSelection="Click to toggle play selection/play all."),void 0===c.tooltipLoop&&(c.tooltipLoop="Click to toggle play once/repeat."),void 0===c.tooltipReset&&(c.tooltipReset="Click to go to beginning."),void 0===c.tooltipPlay&&(c.tooltipPlay="Click to play/pause."),void 0===c.tooltipProgress&&(c.tooltipProgress="Click to change the playback position."),void 0===c.tooltipTempo&&(c.tooltipTempo="Change the playback speed.");var l="";c.hide&&(l='style="display:none;"');var h='<div class="abcjs-inline-midi abcjs-midi-'+a+'" '+l+">";if(h+='<span class="abcjs-data" style="display:none;">'+JSON.stringify(i)+"</span>",n.preTextInline&&(h+='<span class="abcjs-midi-pre">'+e(n.preTextInline,o)+"</span>"),c.selectionToggle&&(h+='<button type="button" class="abcjs-midi-selection abcjs-btn" title="'+c.tooltipSelection+'"></button>'),c.loopToggle&&(h+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+c.tooltipLoop+'"></button>'),c.standard&&(h+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+c.tooltipReset+'"></button><button type="button" class="abcjs-midi-start abcjs-btn" title="'+c.tooltipPlay+'"></button><button type="button" class="abcjs-midi-progress-background" title="'+c.tooltipProgress+'"><span class="abcjs-midi-progress-indicator"></span></button><span class="abcjs-midi-clock"> 0:00</span>'),c.tempo){var u=t&&t.metaText&&t.metaText.tempo&&t.metaText.tempo.bpm?t.metaText.tempo.bpm:180;h+='<span class="abcjs-tempo-wrapper"><input class="abcjs-midi-tempo" value="100" type="number" min="1" max="300" data-start-tempo="'+u+'" title="'+c.tooltipTempo+'" />% (<span class="abcjs-midi-current-tempo">'+u+"</span> BPM)</span>"}return n.postTextInline&&(h+='<span class="abcjs-midi-post">'+e(n.postTextInline,o)+"</span>"),h+"</div>"};var t="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/";i.setSoundFont=function(e){t=e};var n=!0;function a(e,t){return!!e&&(" "+e.className+" ").indexOf(" "+t+" ")>-1}function s(e,t){e&&(a(e,t)||(e.className=e.className+" "+t))}function o(e,t){e&&(e.className=e.className.replace(t,"").trim().replace(" "," "))}function c(e,t){e&&(a(e,t)?o(e,t):s(e,t))}function l(e,t){if(!e)return null;for(;e!==document.body;){if(a(e,t))return e;e=e.parentNode}return null}function h(e,t){if(!e)return null;var n=e.getElementsByClassName(t);return 0===n.length?null:n[0]}i.setInteractiveProgressBar=function(e){n=e};var u,d=!1;function f(e,t,n){MIDI.player.currentTime=0,MIDI.player.warp=e,MIDI.player.load({events:t}),n()}function p(e){for(var t=[],n=0;n<e.length;n++)e[n][0]&&e[n][0].event&&e[n][0].event.programNumber&&t.push(e[n][0].event.programNumber);return t}function m(){MIDI.player.start(MIDI.player.currentTime)}function g(){MIDI.player.stop()}function v(){MIDI.player.pause()}function b(e,t,n){var r=t/n,i=MIDI.player.duration;if(e&&v(),MIDI.player.currentTime=i*r,e)m();else if(x){var a=MIDI.player,s=a.currentTime/a.duration;x({currentTime:a.currentTime/1e3,duration:a.duration/1e3,progress:s})}}function y(e,n){var r=h(e,"abcjs-data"),i=JSON.parse(r.innerHTML),a=1,s=h(e,"abcjs-midi-tempo");if(s){var o=parseInt(s.value,10);o>0&&(a=100/o)}!function(e,n,r){d?f(e,n,r):MIDI.setup({debug:!1,soundfontUrl:t,instruments:p(n)}).then((function(){d=!0,f(e,n,r)})).catch((function(e){console.log("MIDI.setup failed:",e.message)}))}(a,i,n)}function w(){var e=h(document,"abcjs-midi-current");e&&(g(),o(e,"abcjs-midi-current"),o(h(e,"abcjs-midi-start"),"abcjs-pushed"))}function x(e){var t;if(e.duration>0&&u!==e.progress&&(u=e.progress,(t=h(document,"abcjs-midi-current"))&&a(h(t,"abcjs-midi-start"),"abcjs-loaded"))){if(!O){var n=h(t,"abcjs-midi-progress-background").offsetWidth,r=h(t,"abcjs-midi-progress-indicator"),i=n*u;r.style.left=i+"px"}var s=h(t,"abcjs-midi-clock");if(s){var o=Math.floor(e.currentTime),c=Math.floor(o/60);(o%=60)<10&&(o="0"+o),c<10&&(c=" "+c),s.innerHTML=c+":"+o}var l=t.abcjsQpm;!l&&t.abcjsTune&&t.abcjsTune.metaText&&t.abcjsTune.metaText.tempo&&(l=t.abcjsTune.metaText.tempo.bpm),l||(l=180);var d=parseInt(l,10)/60,f=e.currentTime;if(t.abcjsListener){var p=Math.floor(f*d);e.newBeat=p!==t.abcjsLastBeat,e.thisBeat=p,t.abcjsLastBeat=p,t.abcjsListener(t,e,t.abcjsContext)}if(t.abcjsAnimate){var m=d/64,g=function(e,t,n){for(var r,i,a=0,s=e.length-1;a<=s;)if((i=e[r=Math.floor((a+s)/2)]).milliseconds/1e3-n<t)a=r+1;else{if(!(i.milliseconds/1e3-n>t))return r;s=r-1}for(;e[r].milliseconds/1e3-n>=t&&r>0;)r--;return 0===r&&e[r].milliseconds/1e3-n>=t?-1:r}(t.abcjsTune.noteTimings,f,m);if(g!==t.abcjsLastIndex){var v=t.abcjsLastIndex>=0?t.abcjsTune.noteTimings[t.abcjsLastIndex]:null;t.abcjsAnimate(v,t.abcjsTune.noteTimings[g],t.abcjsContext),t.abcjsLastIndex=g}}}if(1===e.progress){t=h(document,"abcjs-midi-current");var b=h(t,"abcjs-midi-loop"),y=function(){b&&a(b,"abcjs-pushed")&&k(h(t,"abcjs-midi-start"))};setTimeout((function(){C(t,y),t&&t.abcjsAnimate&&t.abcjsAnimate(t.abcjsTune.noteTimings[t.abcjsLastIndex],null,t.abcjsContext)}),1)}}function k(e){var t=l(e,"abcjs-inline-midi");if(a(e,"abcjs-pushed"))return v(),void o(e,"abcjs-pushed");a(t,"abcjs-midi-current")?m():(w(),T(e,t,(function(){m()}))),s(e,"abcjs-pushed")}function A(e){for(var t=document.querySelectorAll(".abcjs-midi-current"),n=0;n<t.length;n++)o(t[n],"abcjs-midi-current");s(e,"abcjs-midi-current")}function T(e,t,n){s(e,"abcjs-loading"),y(t,(function(){o(e,"abcjs-loading"),A(t),s(e,"abcjs-loaded"),n&&n()})),t.abcjsLastBeat=-1,t.abcjsLastIndex=-1,function(e){e?MIDI.player.setAnimation(e):MIDI.player.clearAnimation()}(x)}function S(e){h(e,"abcjs-midi-progress-indicator").style.left="0px",h(e,"abcjs-midi-clock").innerHTML=" 0:00"}function M(e){c(e,"abcjs-pushed")}function N(e){c(e,"abcjs-pushed")}function C(e,t){var n=l(e,"abcjs-inline-midi");w(),n&&y(n,(function(){A(n),S(n),t&&t()}))}function E(e){var t=l(e,"abcjs-inline-midi"),n=h(t,"abcjs-midi-start"),r=a(n,"abcjs-pushed");a(t,"abcjs-midi-current")&&C(e,(function(){r&&(m(),s(n,"abcjs-pushed"))}))}function I(e,t){var n=0,r=e.offsetWidth;do{n+=e.offsetLeft-e.scrollLeft,e=e.offsetParent}while(e);var i=t.pageX-n;return i<0&&(i=0),i>r&&(i=r-1),i}function _(e){var t=l(e,"abcjs-inline-midi"),n=h(t,"abcjs-midi-start");return!!a(t,"abcjs-midi-current")&&a(n,"abcjs-pushed")}function B(e,t){var n=l(e,"abcjs-inline-midi"),r=h(n,"abcjs-midi-start"),i=e.offsetWidth,s=I(e,t);a(n,"abcjs-midi-current")?b(_(e),s,i):T(r,n,(function(){b(!1,s,i)}))}function P(e){for(var t=parseInt(e.value,10),n=parseInt(e.getAttribute("data-start-tempo"),10);e&&!a(e,"abcjs-midi-current-tempo");)e=e.nextSibling;e.innerHTML=Math.floor(t*n/100),function(e){MIDI.player.warp=e>0?100/e:1}(t)}i.startPlaying=function(e){var t=e;a(e,"abcjs-inline-midi")&&(t=e.querySelector(".abcjs-midi-start")),k(t)},i.stopPlaying=function(){g();var e=document.querySelector(".abcjs-midi-current");if(e){S(e);var t=h(e,"abcjs-midi-start");t&&o(t,"abcjs-pushed")}},i.restartPlaying=function(){E(document.querySelector(".abcjs-midi-current"))},i.setLoop=function(e,t){var n=e.querySelector(".abcjs-midi-loop");n&&(t?s(n,"abcjs-pushed"):o(n,"abcjs-pushed"))},i.setRandomProgress=function(e){var t=a(h(document.querySelector(".abcjs-midi-current"),"abcjs-midi-start"),"abcjs-pushed"),n=MIDI.player.duration;t&&v(),MIDI.player.currentTime=n*e,t&&m()};var D,L,O=!1,H=!1;i.attachListeners=function(e){for(var t=e.querySelectorAll(".abcjs-inline-midi"),r=0;r<t.length;r++){var s=t[r];s.addEventListener("click",(function(e){for(var t=(e=e||window.event).target||e.srcElement;t&&t!==document.body;){if(a(t,"abcjs-midi-start"))return void k(t);if(a(t,"abcjs-midi-selection"))return void M(t);if(a(t,"abcjs-midi-loop"))return void N(t);if(a(t,"abcjs-midi-reset"))return void E(t);if(a(t,"abcjs-midi-progress-background"))return void(n&&B(t,e));t=t.parentNode}})),s.addEventListener("change",(function(e){for(var t=(e=e||window.event).target||e.srcElement;t!==document.body;)a(t,"abcjs-midi-tempo")&&P(t),t=t.parentNode})),s.addEventListener("mousedown",(function(e){if(n){var t=(e=e||window.event).target||e.srcElement;a(t,"abcjs-midi-progress-indicator")&&(D=t,O=!0,L=l(t,"abcjs-midi-progress-background"))}}))}if(H||(H=!0,document.body.addEventListener("mousemove",(function(e){if(O){(e=e||window.event).preventDefault();var t=I(L,e);D.style.left=t+"px"}}),!0),document.body.addEventListener("mouseup",(function(e){if(O){(e=e||window.event).preventDefault();var t=I(L,e),n=L.offsetWidth;b(_(L),t,n),B(L,e),O=!1,D=null,L=null}}))),void 0===window.MIDI){i.midiInlineInitialized="not loaded";for(var o=document.getElementsByClassName("abcjs-inline-midi"),c=0;c<o.length;c++)o[c].innerHTML="MIDI NOT PRESENT"}}}(),e.exports=i},function(e,t,n){"undefined"==typeof galactic&&(galactic={}),function(t){"use strict";t.request=function(e,n,r,i){"string"==typeof e&&(e={url:e});var a=e.data,s=e.url,o=e.method||(e.data?"POST":"GET"),c=e.format,l=e.headers,h=e.mimeType,u=e.responseType,d=e.withCredentials||!1;i=i||e.onprogress,n=n||e.onsuccess,r=r||e.onerror;if("undefined"==typeof NodeFS||!t.loc.isLocalUrl(s)){var f=new XMLHttpRequest;if(f.open(o,s,!0),l)for(var p in l)f.setRequestHeader(p,l[p]);else a&&f.setRequestHeader("Content-type","application/x-www-form-urlencoded");return h&&f.overrideMimeType(h),u&&(f.responseType=u),d&&(f.withCredentials=!0),r&&"onerror"in f&&(f.onerror=r),i&&f.upload&&"onprogress"in f.upload&&(a?f.upload.onprogress=function(e){i.call(f,e,event.loaded/event.total)}:f.addEventListener("progress",(function(e){var t=0;if(e.lengthComputable)t=e.total;else if(f.totalBytes)t=f.totalBytes;else{var n=parseInt(f.getResponseHeader("Content-Length-Raw"));if(!isFinite(n))return;f.totalBytes=t=n}i.call(f,e,e.loaded/t)}),!1)),f.onreadystatechange=function(e){if(4===f.readyState)if(200===f.status||304===f.status||308===f.status||0===f.status&&window.top.cordova){if(n){var t;if("json"===c)try{t=JSON.parse(e.target.response)}catch(t){r&&r.call(f,e)}else t="xml"===c?e.target.responseXML:"text"===c?e.target.responseText:e.target.response;n.call(f,e,t)}}else r&&r.call(f,e)},f.send(a),f}NodeFS.readFile(s,"utf8",(function(e,t){e?r&&r(e):n&&n({responseText:t},t)}))},e.exports&&(e.exports=t.request)}(galactic)},function(e,t,n){"undefined"==typeof galactic&&(galactic={}),function(t){"use strict";t.module=t.module||{},t.module.DOMMisc=function(e){var t,n,r,i=e.util||(e.util={});i.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},i.errorHandler=function(e){return function(){console.warn(e,arguments)}},i.requestKioskMode=function(){e.client.nodewebkit&&win.enterKioskMode()},i.diff=function(e,t,n){if(e!==t){var r=new e.constructor,a=new t.constructor,s=!0;for(var o in e)if(n&&-1!==n.indexOf(o))r[o]=e[o],a[o]=t[o];else if(o in t){if(e[o]!==t[o])if("object"==typeof e[o]&&"object"==typeof t[o]){var c=i.diff(e[o],t[o],n);void 0!==c&&(s=!1,r[o]=c.from,a[o]=c.to)}else s=!1,r[o]=e[o],a[o]=t[o]}else s=!1,r[o]=e[o],a[o]=t[o];for(var o in t)o in e||(s=!1,r[o]=e[o],a[o]=t[o]);return s?void 0:{from:r,to:a}}},i.sort=function(e){var t,n=i.sort[e.fn]||e.fn,r=e.data||e,a=e.param;return Array.isArray(r)?t=a?r.sort((function(e,t){return n(e[a],t[a])})):r.sort(n):(t={},Object.keys(r).sort(n).forEach((function(e){t[e]=r[e]}))),t},i.sort.numeric=function(e,t){return e-t},i.sort.natural=function(e,t){var n=/(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,r=/(^[ ]*|[ ]*$)/g,i=/(^([\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=e.toString().replace(r,"")||"",c=t.toString().replace(r,"")||"",l=o.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),u=parseInt(o.match(a))||1!=l.length&&o.match(i)&&Date.parse(o),d=parseInt(c.match(a))||u&&c.match(i)&&Date.parse(c)||null;if(d){if(u<d)return-1;if(u>d)return 1}for(var f=0,p=Math.max(l.length,h.length);f<p;f++){var m=!(l[f]||"").match(s)&&parseFloat(l[f])||l[f]||0,g=!(h[f]||"").match(s)&&parseFloat(h[f])||h[f]||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},i.getItems=function(e,t){var n=e.length,r={};i.each(e,(function(e){i.getItem(e,(function(i){r[e]=i,--n||t(r)}))}))},i.getItem=function(t,n){n=n||function(e){console.log(e)};var r=function(e){if(e)try{e=JSON.parse(e)}catch(e){}n(e)};if(i.exists("chrome.storage.local"))chrome.storage.local.get(t,(function(e){r(e[t])}));else{var a=(e.feature&&e.feature.prefix||"")+"/"+t,s=localStorage.getItem(a)||"";r(s)}},i.setItem=function(t,n){if(i.exists("chrome.storage.local")){var r={};r[t]=n,chrome.storage.local.set(r)}else{var a=(e.feature&&e.feature.prefix||"")+"/"+t;localStorage.setItem(a,n)}},i.Canvas=function(t,n,r){if("undefined"==typeof document){if(void 0===Canvas)return{ctx:{}};var i=new Canvas}else{i=document.createElement("canvas");"function"==typeof FlashCanvas&&(i.onload=e.client.fn.detect)}return i.ctx=i.getContext(r||"2d"),isFinite(t)&&(i.width=t||1),isFinite(n)&&(i.height=n||1),i},i.Canvas.resize=function(e,t,n){t&&n?(e.width=t,e.height=n):e.width=e.width},i.Canvas.clear=function(e){e.ctx.clearRect(0,0,e.width,e.height)},i.Context3d=function(e,t){return i.Canvas(e,t,"webgl").ctx},i.Context2d=function(e,t){return i.Canvas(e,t,"2d").ctx},i.json={},i.json.pretty=function(e){return JSON.stringify(e,null,"\t")},i.json.stringify=function(e){return JSON.stringify(e,(function(e,t){if("object"==typeof t){if(null===t)return;if(t.nodeName)return;if(t.tagName)return}return t}))},i.timestamp=function(){if("object"==typeof window){var e=window.performance;if(e&&e.now)return e.now.bind(e)}return Date.now}(),i.perf=function(e,t,n){if(!t||!e){var r=i.timestamp();return function(e,t){var n=i.timestamp(),a=Math.round(n-r);return e&&console.log(a+"ms",e),t&&(r=n),a}}for(var a=i.perf(),s=0;s<t;s++)e();console.log(a()+"ms",n||"")},i.exists=function(e,t){try{for(var n=e.split("."),r=t||window,i=0,a=n.length;i<a;i++){var s=n[i];if(null==r[s])return!1;r=r[s]}return!0}catch(e){return!1}},i.copy=(t="function"==typeof CanvasPattern,n=function(e){if(!e||"object"!=typeof e)return e;if(!(e.nodeType||t&&e instanceof CanvasPattern)){if(e.clone&&"function"==typeof e.clone)return e.clone();if(e.constructor){var r=new e.constructor;for(var i in e){var a=e[i];r[i]=a&&"object"==typeof a?n(a):a}return r}}}),i.copyInto=r=function(e,t,n){if(n=n||{},e&&"object"==typeof e)for(var i in e){var a=t[i],s=e[i],o=n.filter;if(!o||!o(s,a)){var c=typeof s;if(s&&"object"===c)if(s.nodeType){if(!n.referenceNodes)continue;t[i]=s}else t[i]=r(s,typeof a===c?a:new s.constructor,n);else t[i]=s}}return t},i.count=function(e,t,n){if(!e)return 0;if(isFinite(e.length))return e.length;if("object"==typeof e){var r=0,i=void 0!==t;if(i&&void 0!==n)for(var a in e)e[a]&&e[a][t]===n&&++r;else if(i)for(var a in e)void 0!==e[a]&&++r;else for(var a in e)++r;return r}},i.isEmpty=function(e){if(null==e)return!0;if(e.length>=0)return!e.length;for(var t in e)return!1;return!0},i.isNotEmpty=function(e){return!i.isEmpty(e)},i.clamp=function(e,t,n){return n<e?e:n>t?t:n},i.clampFinite=function(e){var t=i.INFINITY;return e>+t&&(e=+t),e<-t&&(e=-t),e},i.arrayEmpty=function(e){e.splice(0,e.length)},i.arrayIntersects=function(e,t){return t.some((function(t){return-1!==e.indexOf(t)}))},i.inArray=function(e,t){return-1!==e.indexOf(t)},i.isArray=function(e){return Array.isArray(e)||e instanceof NodeList},i.each=function(e,t){if(i.isArray(e))for(var n=0;n<e.length;n++)t(e[n],n);else for(var r in e)t(e[r],r)},i.equals=function(e,t){return"object"==typeof e?"object"==typeof t&&i.json.stringify(e)===i.json.stringify(t):e===t},i.objectToArray=function(e){var t=[];for(var n in e)t.push(e[n]);return t},i.arrayToObject=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t},i.addFileInput=function(t,n){e.uploader.addFileInput({target:t,onchange:function(t){t.fileInput.value="",t.addMedia({openAsNew:n,self:e.uploader})}})},i.bytesToSize=function(e,t){if(e){t=t||1;var n=Math.floor(Math.log(Math.abs(e))/Math.log(1024));return(e/Math.pow(1024,n)).toFixed(t)+["Bytes","kb","mb","gb","tb"][n]}return"0Bytes"},i.getTimeFormat=function(e,t){var n=(e/=1e3)/3600>>0,r=(e-3600*n)/60>>0,i=e-3600*n-60*r>>0;return t?(n<10&&(n="0"+n),r<10&&(r="0"+r),i<10&&(i="0"+i),n+":"+r+":"+i):{hours:n,minutes:r,seconds:i}},i.require=function(e){"string"==typeof e&&(e={url:e});var t=e.url,n=e.type||(-1!==t.indexOf(".css")?"css":"js"),r=e.async||!1,i=e.onsuccess;if("css"===n)r?setTimeout(o,0):o();else{var a=document.createElement("script");if(a.src=t,a.async=r,i){var s=!1;a.onload=a.onreadystatechange=function(){if(!1===s){var e=a.readyState;e&&!/loaded|complete/.test(e)||(s=!0,i(),a.onload=a.onreadystatechange=null)}}}document.head.appendChild(a)}function o(){var e=document.createElement("link");e.href=t,e.setAttribute("type","text/css"),e.setAttribute("rel","stylesheet"),document.head.appendChild(e)}},i.isEditingText=function(){var e=document.activeElement;if(!e)return!1;var t=e.nodeName;return("INPUT"===t||"TEXTAREA"===t||"true"===e.contentEditable)&&!e.classList.contains("sk-canvas-dummy")},i.pending=function(e,t){var n=e;return{add:function(e){n+=e||1},next:function(){--n||t()}}}},e.exports?e.exports=t.module.DOMMisc:t.module.DOMMisc(galactic)}(galactic)},function(e,t){!function(){"use strict";var e,t={},n={};function r(n){return new Promise((function(r,c){var l=n.format,h=n.codec,u=n.base64,d="audio/"+l+'; codecs="'+h+'"',f="data:"+d+";base64,"+u,p=new Audio;function m(n){function a(e,n,r,i){!t[n]&&(t[n]=i),!t[r]&&(t[r]=i),!e[n]&&(e[n]=i),e[r]=i}a(t.audio,l,h,n),t.audioapi?function(t){return new Promise((function(n,r){(e=e||new i).decodeAudioData(o(t),n,r).then((function(e){})).catch((function(e){})),setTimeout(r,250)}))}(f).then((function(){a(t.audioapi,l,h,!0),r()}),(function(e){a(t.audioapi,l,h,!1),r()})):r()}p.canPlayType(d).replace(/no/i,"")?(p.id="audio",p.controls=!1,p.setAttribute("autobuffer",!0),p.setAttribute("preload","auto"),p.addEventListener("error",(function e(t){var n;a&&!p.testedBlobURL?(p.testedBlobURL=!0,p.src=a((n=f,new Blob([o(n)],{type:s(n)})))):(p.removeEventListener("error",e),m(!1))})),p.addEventListener("canplaythrough",(function e(){p.removeEventListener("canplaythrough",e),m(!0)})),p.src=f,p.load()):m(!1)}))}var i=self.AudioContext||self.mozAudioContext||self.webkitAudioContext,a=(self.URL||self.webkitURL||{}).createObjectURL;function s(e){return(e=e.split(","))[0].split(":")[1].split(";")[0]}function o(e){e=e.split(",");for(var t=atob(e[1]),n=new ArrayBuffer(t.length),r=new Uint8Array(n),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return n}function c(e,t,r){n[e+"_"+t]={format:e,codec:t,base64:r}}c("mpeg","mp3","//MUxAAB6AXgAAAAAPP+c6nf//yi/6f3//MUxAMAAAIAAAjEcH//0fTX6C9Lf//0//MUxA4BeAIAAAAAAKX2/6zv//+IlR4f//MUxBMCMAH8AAAAABYWalVMQU1FMy45//MUxBUB0AH0AAAAADkuM1VVVVVVVVVV//MUxBgBUATowAAAAFVVVVVVVVVVVVVV"),c("ogg","opus","T2dnUwACAAAAAAAAAAAAAAAAAAAAAEVP7KoBE09wdXNIZWFkAQEAD0SsAAAAAABPZ2dTAAAAAAAAAAAAAAAAAAABAAAAVewFUgEYT3B1c1RhZ3MIAAAAUmVjb3JkZXIAAAAAT2dnUwAEwAMAAAAAAAAAAAAAAgAAAHSiY8oBA/j//g=="),c("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 t.audio=!!self.Audio&&{},function(){if(navigator.requestMIDIAccess){if(-1!==Function.prototype.toString.call(navigator.requestMIDIAccess).indexOf("[native code]"))return t.midiapi={};for(var e=0;navigator.plugins.length>e;e++){if(navigator.plugins[e].name.indexOf("Jazz-Plugin")>=0)return t.midiapi={}}}t.midiapi=!1}(),t.audioapi=!!i&&{},new Promise((function(e,i){if(!t.audio)return e();setTimeout(e,5e3),Promise.all([r(n.mpeg_mp3),r(n.ogg_opus),r(n.ogg_vorbis)]).then(e)})).then((function(){return t}))},self.AudioSupports.register=c}()},function(e,t){"undefined"==typeof galactic&&(galactic={}),function(e){"use strict";galactic.EventEmitter=function(e){var t=1;function n(e,n){if("function"==typeof n)return e+"."+(n.uniqueId||(n.uniqueId=t++));console.warn(e,"listener does not exist")}function r(t){return e.on[t]?e.on[t]:e.on[t]=function(t){var r={};function i(){var t=!1;for(var n in r)r[n].apply(e,arguments)&&(t=!0);return t}return i.add=function(e){var i=n(t,e);if(void 0===r[i]&&e)return r[i]=e,{add:function(){r[i]=e},remove:function(){delete r[i]}}},i.remove=function(e){var i=n(t,e);void 0!==r[i]&&e&&delete r[i]},i.stack=r,i}(t)}e.on=function(e,t){return r(e).add(t)},e.off=function(t,n){n?r(t).remove(n):delete e.on[t]},e.emit=function(t){var n=e.on[t];if(n){var r=Array.prototype.slice.call(arguments).slice(1);return n.apply(e,r)}}}}()},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";e.DEBUG=!1,e.USE_XHR=!0,e.PATH="./soundfont/",e.DEBUG&&console&&console.log&&console.log("%c♥ MIDI.js 0.4.2 ♥","color: red;");var t={midiapi:0,audioapi:1,audio:2},n={ogg:0,mp3:1};e.setup=function(r){return new Promise((function(i,a){"function"==typeof(r=r||{})&&(r={onsuccess:r}),isFinite(r.debug)&&(e.DEBUG=!!r.debug),r.soundfontUrl&&(e.PATH=r.soundfontUrl),AudioSupports().then((function(s){function o(n){n=n.toLowerCase();var c=e.adaptor.format;function l(e){var r=parseInt(t[n])+1,i=Object.keys(t)[r];i?o(i):a&&a({message:"All plugins failed."})}s[n][c]?(r.tech=n,e.loadProgram(r).then((function(){i()})).catch((function(t){e.DEBUG&&console.error(n,t),l(t)}))):l()}!function(){for(var t in e.adaptor)delete e.adaptor[t];for(var r in n)if(s[r])return e.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)}))},e.loadProgram=function(t){return t||(t={}),"object"==typeof t||(t={instrument:t}),t.instruments=function(){var n=t.instruments||t.instrument||e.channels[0].program;"object"==typeof n?Array.isArray(n)||(n=Object.keys(n)):n=void 0===n?[]:[n];for(var r=0;r<n.length;r++){var i=n[r];if(i>=0){var a=e.getProgram(i);a&&(n[r]=a.nameId)}}0===n.length&&(n=["acoustic_grand_piano"]);return n}(),t.tech=t.tech||e.adaptor.id,e.adaptors._load(t)}}(MIDI)},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";var t=e.adaptor={},n=e.adaptors={},r=n._requests={};n._load=function(a){return i(),"midiapi"===a.tech?n.midiapi.connect(a):function(i){return new Promise((function(e,s){for(var o=t.format.split("_").shift(),c=i.instruments,l=i.onprogress,h=i.tech,u=c.length,d=0;d<u;d++){var f=c[d],p=r[f]||(r[f]={});p.loaded?m([f]):p.loading?p.queue.push(e):(p.queue=[e],p.loading=!0,a(f,o).then((function(e){m(e)})).catch(s))}function m(e){r[e].loading=!1;var t=!1;for(var a in r)r.hasOwnProperty(a)&&r[a].loading&&(t=!0);t||(!function e(t,n){e.progress!==t&&(e.progress=t,l&&l("load",t,n))}(1),n[h].connect(i).then((function(){c.forEach((function(e){for(var t,n=r[e];t=n.queue.pop();)t()}))})).catch(s))}}));function a(t,n,r){return new Promise((function(i,a){var s=e.PATH+t+"-"+n+".js";e.USE_XHR?galactic.request({url:s,format:"text",onerror:a,onprogress:r,onsuccess:function(e,n){var r=document.createElement("script");r.language="javascript",r.type="text/javascript",r.text=n,document.body.appendChild(r),i(t)}}):dom.loadScript.add({url:s,verify:'MIDI.Soundfont["'+t+'"]',onerror:a,onsuccess:i})}))}}(a)};function i(){var n;function r(t,n,r){e.adaptor.id&&(e.player.playing?e.loadProgram(n).then(e.player.start):e.loadProgram(n))}function i(e,t){return{configurable:!0,get:function(){return t},set:function(n){t=n,a(e)}}}function a(n){e.DEBUG&&console.warn("The "+t.id+' adaptor does not support "'+n+'".')}function s(e){return function(){a(e)}}n=performance.now(),Object.defineProperties(e,{currentTime:{configurable:!0,get:function(){return performance.now()-n}}}),e.set=function(t,n,r){if(r)return setTimeout((function(){e[t]=n}),1e3*r);e[t]=n},e.messageHandler={},e.programChange=function(t,n,i){var a=e.getProgram(n);if(a&&Number.isFinite(n=a.id)){var s=e.channels[t];if(s&&s.program!==n){i?setTimeout((function(){s.program=n}),i):s.program=n;var o=e.messageHandler.program||r;o&&o(t,n,i)}}},Object.defineProperties(e,{context:i(null),detune:i("detune",0),fx:i("fx",null),mute:i("mute",!1),volume:i("volume",1)}),e.send=s("send"),e.noteOn=s("noteOn"),e.noteOff=s("noteOff"),e.cancelNotes=s("cancelNotes"),e.setController=s("setController"),e.setEffects=s("setEffects"),e.setPitchBend=s("setPitchBend"),e.setProperty=s("setProperty"),e.setVolume=s("setVolume"),e.iOSUnlock=s("iOSUnlock")}i()}(MIDI)},function(e,t){window.Audio&&function(){"use strict";var e=MIDI.adaptors.audio={},t=[],n=-1,r=[],i={};function a(e,t,n,r){var i,a=MIDI.getNoteName(t);return r?i=setTimeout((function(){l(e,a,n)}),1e3*r):l(e,a,n),{cancel:function(){clearTimeout(i)}}}function s(e,t,n){return{cancel:function(){clearTimeout(void 0)}}}function o(e,t,n,r){for(var i=0;i<t.length;i++){var a=t[i],s=MIDI.getNoteName(a);if(s){if(r)return setTimeout((function(){l(e,s,n)}),1e3*r);l(e,s,n)}}}function c(e,t,n){for(var r=0;r<t.length;r++){var i=t[r],a=MIDI.getNoteName(i);if(a){if(n)return setTimeout((function(){h(e,a)}),1e3*n);h(e,a)}}}function l(e,a,s){var o=MIDI.channels[e];if(o){var c=o.program,l=MIDI.getProgram(c).nameId,h=l+""+a,u=(n+1)%t.length,d=MIDI.Soundfont[l];if(d){var f=t[u];f.src=d[a],f._channel=o,f._volume=s,f._id=h,i.volume(f),f.play(),n=u,r[u]=f}else MIDI.DEBUG&&console.log("404",l)}}function h(e,i){var a=MIDI.channels[e];if(a)for(var s=a.program,o=MIDI.getProgram(s).nameId+""+i,c=0,l=t.length;c<l;c++){var h=(c+n+1)%l,u=r[h];if(u&&u._id===o)return t[h].pause(),void(r[h]=null)}}e.connect=function(e){MIDI.adaptor.id="audio";for(var n=0;n<12;n++)t[n]||(t[n]=new Audio);return function(){function e(e,t,n){return{configurable:!0,get:function(){return t},set:function(r){typeof r===e&&(t=r,n&&n())}}}function t(e){return function(){for(var t in r)i[e](r[t])}}Object.defineProperties(MIDI,{mute:e("boolean",!1,t("volume")),volume:e("number",1,t("volume"))})}(),i.volume=function(e){var t=e._channel;if(MIDI.mute||t.mute)e.volume=0;else{var n=MIDI.volume*t.volume*e._volume;e.volume=Math.min(1,Math.max(-1,2*n))}},MIDI.noteOn=function(e,t,n,r){switch(typeof t){case"number":return a.apply(null,arguments);case"string":break;case"object":return o.apply(null,arguments)}},MIDI.noteOff=function(e,t,n){switch(typeof t){case"number":return s.apply(null,arguments);case"string":break;case"object":return c.apply(null,arguments)}},MIDI.stopAllNotes=function(e){if(isFinite(e));else for(var n=0,r=t.length;n<r;n++)t[n].pause()},new Promise((function(e,t){var n=MIDI.adaptors._requests,r=MIDI.Soundfont;for(var i in r){var a=n[i]||(n[i]={});a.loaded=!0,a.loading=!1}e()}))}}()},function(e,t){window.AudioContext&&function(){"use strict";var e=MIDI.adaptors,t=e.audioapi={},n=((n=new(window.AudioContext||window.webkitAudioContext)).hasDetune=function(){n.createBuffer(1,1,44100);var e=n.createBufferSource();try{return e.detune.value=1200,!0}catch(e){return!1}}(),n),r={},i=e._requests,a={},s={};function o(e,t){var n=s[e];for(var r in n)for(var i=n[r],a=0;a<i.length;a++)t(i,i[a])}t.connect=function(e){return MIDI.adaptor.id="audioapi",function(){function e(e,t,n){return{configurable:!0,get:function(){return t},set:function(r){typeof r===e&&(t=r,n&&n())}}}function t(e){return function(){MIDI.setProperty(e)}}Object.defineProperties(MIDI,{context:{configurable:!0,get:function(){return n},set:function(e){n=e}},detune:e("number",0,t("detune")),fx:e("object",null,t("fx")),mute:e("boolean",!1,t("volume")),volume:e("number",1,t("volume"))}),MIDI.setProperty=function(e,t){if(a[e])if(isFinite(t))"fx"===e&&i(MIDI.channels[t]),r();else for(var t in"fx"===e&&i(MIDI),s)r();function r(){o(t,(function(t,n){a[e](n)}))}function i(e){var t=e.fxNodes||(e.fxNodes={});for(var r in t)t[r].disconnect(n.destination),delete t[r];if(n.tunajs)for(var i=e.fx,a=0;a<i.length;a++){var s=i[a],o=s.type,c=new n.tunajs[o](s);c.connect(n.destination),t[o]=c}else MIDI.DEBUG&&console.error("fx not installed.",arguments)}}}(),a.volume=function(e){var t=e.gainNode.gain,r=e._channel;if(MIDI.mute||r.mute)t.value=0;else{var i=MIDI.volume*r.volume*e._volume;t.value=Math.min(2,Math.max(0,i))}t._fadeout&&(t.cancelScheduledValues(n.currentTime),t.linearRampToValueAtTime(t.value,t._startAt),t.linearRampToValueAtTime(0,t._startAt+.3))},a.detune=function(e){if(n.hasDetune){var t=e._channel,r=MIDI.detune+t.detune;r&&(e.detune.value=r)}},a.fx=function(e){var t=e._channel,n=e.gainNode;function r(e){if(e)for(var t in e){var r=e[t];n.connect(r.input),n=r}}e.disconnect(0),e.connect(n),r(MIDI.fxNodes),r(t.fxNodes)},MIDI.noteOn=function(e,n,r,i){switch(typeof n){case"number":return t.apply(null,arguments);case"string":break;case"object":return l.apply(null,arguments)}},MIDI.noteOff=function(e,t,n){switch(typeof t){case"number":return c.apply(null,arguments);case"string":break;case"object":return h.apply(null,arguments)}},MIDI.cancelNotes=function(e){if(isFinite(e))t(e);else for(var e in s)t(e);function t(e){o(e,(function(e,t){u(e,t)}))}},MIDI.iOSUnlock=function(){if(!0!==n.unlocked){n.unlocked=!0;var e=n.createBuffer(1,1,44100),t=n.createBufferSource();t.buffer=e,t.connect(n.destination),t.start(0)}},"suspended"===n.state&&n.resume(),new Promise((function(e,t){window.Tuna&&(n.tunajs instanceof Tuna||(n.tunajs=new Tuna(n)));var a=MIDI.Soundfont,s=Object.keys(a);for(var o in a){var c=MIDI.getProgram(o);if(c){var l=i[o]||(i[o]={});if(l.loaded)continue;if(l.decoding)l.queue.push(e);else{l.decoding=!0,l.queue.push(e),l.pending=0;var h=a[o];for(var u in h)f(o,c.id,u)}}}function d(){for(var e=0;e<s.length;e++){var t=s[e];if((r=i[t]).pending)return}for(e=0;e<s.length;e++){t=s[e];for(var n,r=i[t];n=r.queue.pop();)n()}}function f(e,t,s){var o=i[e],c=a[e][s];c&&(o.pending++,function(e){return new Promise((function(t,r){if(0===e.indexOf("data:audio"))a(function(e){e=e.split(",");for(var t=atob(e[1]),n=(e[0].split(":")[1].split(";")[0],new ArrayBuffer(t.length)),r=new Uint8Array(n),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return n}(e));else{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(){a(i.response)},i.send()}function a(e){n.decodeAudioData(e,t,r)}}))}(c).then((function(n){n.id=s;var i=MIDI.getNoteNumber(s);r[t+"x"+i]=n,--o.pending||(o.decoding=!1,o.loading=!1,o.loaded=!0,MIDI.DEBUG&&console.log("loaded: ",e),d())})).catch((function(e){MIDI.DEBUG&&console.error("audio could not load",arguments)})))}setTimeout(d,0)}));function t(e,t,i,o){var c;o=o||0;var l=MIDI.volume;if(l){var h=MIDI.channels[e],u=h.program,d=u+"x"+t,f=r[d];f?((c=n.createBufferSource()).buffer=f,c.gainNode=n.createGain(),c.gainNode.connect(n.destination),c._channel=h,c._volume=i,a.volume(c),a.detune(c),a.fx(c),c.start(o+n.currentTime),s[e]=s[e]||{},s[e][t]=s[e][t]||[],s[e][t].push(c),s[e][t].active=c):MIDI.DEBUG&&console.error(["no buffer",arguments])}return{cancel:function(){c&&c.disconnect(0)}}}function c(e,t,n){n=n||0;var r=s[e];if(r){var i=r[t];if(i){var a=i.active;a&&u(i,a,n)}}return{cancel:function(){a&&a.disconnect(0)}}}function l(e,t,n,r){for(var i,a={},s=0,o=t.length;s<o;s++)a[i=t[s]]=MIDI.noteOn(e,i,n,r);return a}function h(e,t,n){for(var r,i={},a=0,s=t.length;a<s;a++)i[r=t[a]]=MIDI.noteOff(e,r,n);return i}function u(e,t,r){var i=(r||0)+n.currentTime,a=t.gainNode.gain;a._fadeout=!0,a._startAt=i,a.linearRampToValueAtTime(a.value,i),a.linearRampToValueAtTime(0,i+.3),t.stop(i+.5),setTimeout((function(){e.shift()}),1e3*r)}}}()},function(e,t){!function(){"use strict";var e,t=MIDI.adaptors.midiapi={},n={},r={};function i(t,r,i,a){return e.send([144+t,r,127*i>>0],1e3*(a||0)),n[t+"x"+r]={_channel:MIDI.channels[t],_volume:i},{cancel:function(){}}}function a(t,r,i){return e.send([128+t,r,0],1e3*(i||0)),delete n[t+"x"+r],{cancel:function(){}}}function s(t,n,r,i){for(var a=0;a<n.length;a++)e.send([144+t,n[a],r],1e3*(i||0))}function o(t,n,r){for(var i=0;i<n.length;i++)e.send([128+t,n[i],0],1e3*(r||0))}function c(t,n,r,i){e.send([t,n,r],1e3*(i||0))}function l(t,n,r){e.send([224+t,n],1e3*(r||0))}function h(t,n,r){e.send([176+t,7,n],1e3*(r||0))}t.connect=function(t){return MIDI.adaptor.id="midiapi",function(){function t(e,t,n){return{configurable:!0,get:function(){return t},set:function(r){typeof r===e&&(t=r,n&&n())}}}function i(e){return function(){for(var t in n)r[e](n[t])}}Object.defineProperties(MIDI,{context:{configurable:!0,set:function(t){e=t},get:function(){return e}},detune:t("number",0,i("detune")),mute:t("boolean",!1,i("volume")),volume:t("number",1,i("volume"))})}(),r.volume=function(e){var t=e._channel;if(MIDI.mute||t.mute)h(t.id,0);else{var n=MIDI.volume*t.volume*e._volume;h(t.id,Math.min(1,Math.max(-1,2*n)))}},r.detune=function(e){var t=e._channel,n=MIDI.detune+t.detune;n&&l(t.id,n)},MIDI.setController=c,MIDI.setPitchBend=l,MIDI.setVolume=h,MIDI.messageHandler.program=function(t,n,r){e.send([192+t,n],1e3*(r||0))},MIDI.send=function(t,n){e.send(t,1e3*(n||0))},MIDI.noteOn=function(e,t,n,r){switch(typeof t){case"number":return i.apply(null,arguments);case"string":break;case"object":return s.apply(null,arguments)}},MIDI.noteOff=function(e,t,n){switch(typeof t){case"number":return a.apply(null,arguments);case"string":break;case"object":return o.apply(null,arguments)}},MIDI.cancelNotes=function(t){if(isFinite(t))e.send([176+t,123,0]);else{e.cancel();for(t=0;t<16;t++)e.send([176+t,123,0])}},new Promise((function(t,n){function r(e){n&&n(e)}navigator.requestMIDIAccess().then((function(n){var i=n.outputs;i.size&&i.forEach((function(t){"connected"===t.state&&"input"===t.type&&(e=t)})),null==e?r({message:"No available outputs."}):t()}),r)}))}}()},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";e.channels=function(t){for(var n=0;n<=15;n++)r(n);return t;function r(r){var i=t[r]={};function a(t,n,i){return{configurable:!0,enumerable:!0,get:function(){return i},set:function(a){typeof a===t&&(i=a,e.setProperty(n,r))}}}i.noteOn=function(t,n,i){return e.noteOn(r,t,n,i)},i.noteOff=function(t,n){return e.noteOff(r,t,n)},i.cancelNotes=function(){return e.cancelNotes(r)},i.set=function(){},Object.defineProperties(i,{id:{value:n,enumerable:!0,writable:!0},program:{value:n,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(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";function t(e){return e.replace(/[^a-z0-9_ ]/gi,"").replace(/[ ]/g,"_").toLowerCase()}e.getProgram=function(n){return"string"==typeof n?e.getProgram.byName[t(n)]:e.getProgram.byId[n]},function(n){var r=e.GM={},i=e.getProgram.byId={},a=e.getProgram.byName={};for(var s in n)for(var o=n[s],c=0,l=o.length;c<l;c++){var h=o[c];if(h){var u=parseInt(h.substr(0,h.indexOf(" ")),10),d=h.replace(u+" ",""),f=t(d),p=t(s),m={id:--u,name:d,nameId:f,category:s};i[u]=m,a[f]=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 t=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],n={},r={},i=21;i<=108;i++){var a=t[i%12]+((i-12)/12>>0);n[a]=i,r[i]=a}e.getNoteName=function(e){return e in n?e:e in r?r[e]:void 0},e.getNoteNumber=function(e){return e in r?e:e in n?n[e]:void 0}}()}(MIDI)},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),MIDI.player=new function(){"use strict";var e=this;galactic.EventEmitter(e);var t,n,r,i={},a=[],s={};function o(r,h){if(!(r>e.duration)){if(h){e.playing?c():e.playing=!0;var d=(v=function(e){for(var t=0,n=s.length,r=0;r<n;r++){var i=s[r][1];if(!(t+i<e))break;t+=i}return{idx:r,time:t}}(r)).idx,f=n=v.time}else d=t,f=n;for(var p=r-e.currentTime,m=0,g=s.length;d<g&&m<=20;){var v=s[d];t=++d,n+=v[1],r=n-f;var b=v[0].event,y=b.type,w=b.subtype;if(u[w])switch(y){case"channel":k();break;case"meta":x()}}}function x(){w}function k(){var t=b.channel,i=MIDI.channels[t],s=Math.max(0,(r+p)/1e3);switch(w){case"controller":MIDI.setController(t,b.controllerType,b.value,s);break;case"programChange":var o=b.programNumber;(function(t){var n=MIDI.getProgram(t);return n&&e.instruments[n.nameId]})(o)&&MIDI.programChange(t,o,s);break;case"pitchBend":var c=b.value;MIDI.setPitchBend(t,c,s);break;case"noteOn":var l=T(b.noteNumber);a.push({promise:i.noteOn(l,b.velocity/127,s),timeout:A(b,l,n,s)}),m++;break;case"noteOff":l=T(b.noteNumber);a.push({promise:i.noteOff(l,s),timeout:A(b,l,n,s)}),m++}}function A(t,r,s,c){return setTimeout((function(){var s=galactic.util.copy(t);s.noteNumber=r,e.emit("event",s),a.shift();var c=s.channel+"x"+s.noteNumber;switch(s.subtype){case"noteOn":i[c]=s;break;case"noteOff":delete i[c]}a.length<=100&&o(n)}),1e3*c)}function T(t){return l(0,127,t+e.transpose)}}function c(){if(e.playing){for(e.playing=!1;a.length;){var t=a.pop();t&&(t.promise&&t.promise.cancel(),clearTimeout(t.timeout))}for(var n in i){var r=i[n];e.emit("event",{channel:r.channel,noteNumber:r.noteNumber,status:r.status-16,subtype:"noteOff",type:"channel"})}}}function l(e,t,n){return n<e?e:n>t?t:n}function h(){r&&(s=Replayer(MidiFile(r),e.bpm)),e.duration=function(){for(var e=s.length,t=0,n=0;n<e;n++)t+=s[n][1];return t}()}!function(){var t=0,n=!1,i=0;function a(t,n){return{get:function(){return t},set:function(i){Number.isFinite(i)&&(t=i,n&&r&&(e.stop(),h(),o(0,!0)))}}}function s(n){i=performance.now(),t=l(0,e.duration,n)}Object.defineProperties(e,{bpm:a(null,!0),warp:a(1,!0),transpose:a(0,!0),currentTime:{get:function(){return e.playing?t+(performance.now()-i):t},set:function(e){Number.isFinite(e)&&s(e)}},duration:a(0,!1),playing:{get:function(){return n},set:function(t){s(e.currentTime),n=t}}})}(),e.start=function(t){c(),e.currentTime=t,o(e.currentTime,!0)},e.stop=function(){c(),e.currentTime=0},e.pause=function(){c()},e.setAnimation=function(t){var n=0,r=0,i=0;e.clearAnimation(),requestAnimationFrame((function a(){if(e.frameId=requestAnimationFrame(a),e.duration){e.playing?(n=i===e.currentTime?r-Date.now():0,n=0===e.currentTime?0:e.currentTime-n,i!==e.currentTime&&(r=Date.now(),i=e.currentTime)):n=e.currentTime;var s=e.duration,o=n/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!==t.progress&&(t.progress=u,t({progress:u,currentTime:l,duration:h}))}}))},e.clearAnimation=function(){e.frameId&&cancelAnimationFrame(e.frameId)};var u={controller:!0,noteOff:!0,noteOn:!0,pitchBend:!0,setTempo:!0,programChange:!0};e.handleEvent=function(e,t){u[e]=t},e.load=function(t){return new Promise((function(n,i){"string"==typeof t&&(t={src:t});var a=t.src,o=t.onprogress;function c(){try{h(),e.instruments=function(){for(var e={},t={},n=0;n<s.length;n++){var r=s[n][0].event;if("channel"===r.type){var i=r.channel;switch(r.subtype){case"programChange":t[i]=r.programNumber;break;case"noteOn":var a=t[i];if(Number.isFinite(a)){if(u.programChange)var o=MIDI.getProgram(a);else i=MIDI.channels[i],o=MIDI.getProgram(i.program);e[o.nameId]=!0}}}}return e}(),MIDI.setup({instruments:e.instruments,onprogress:o}).then((function(e){n(e)})).catch((function(e){i(e)}))}catch(e){i&&i(e)}}e.stop(),t.events?(s=t.events,r=void 0,c()):-1!==a.indexOf("base64,")?(r=atob(a.split(",")[1]),c()):galactic.request({url:a,mimeType:"text/plain; charset=x-user-defined",onerror:function(){i&&i("Unable to load MIDI file: "+a)},onsuccess:function(e,t){r=function(e){for(var t=[],n=String.fromCharCode,r=0,i=e.length;r<i;r++)t[r]=n(255&e.charCodeAt(r));return t.join("")}(t),c()}})}))}}},function(e,t,n){var r,i=n(106),a=n(107);!function(){"use strict";function e(e,t,n,r){for(var i=Object.keys(n),a=0;a<i.length;a++)i[a]=parseFloat(i[a]);i.sort((function(e,t){return e-t}));for(var s=0,o=0;o<i.length;o++){var c=n[i[o]];if(i[o]>s){var l=(i[o]-s)*r;e.addRest(l),t.addRest(l),s=i[o]}for(var h=0;h<c.length;h++){var u=c[h];u.volume?(e.startNote(u.pitch,u.volume),t.startNote(u.pitch,u.volume)):(e.endNote(u.pitch),t.endNote(u.pitch))}}}r=function(t,n){void 0===n&&(n={});var r=t.setUpAudio(n),s=a(),o=new i,c=t.metaText?t.metaText.title:void 0;c&&c.length>128&&(c=c.substring(0,124)+"...");var l=t.getKeySignature(),h=t.getMeterFraction();s.setGlobalInfo(r.tempo,c,l,h),o.setGlobalInfo(r.tempo,c);for(var u=0;u<r.tracks.length;u++){s.startTrack(),o.startTrack();for(var d={},f=0;f<r.tracks[u].length;f++){var p=r.tracks[u][f];switch(p.cmd){case"text":s.setText(p.type,p.text);break;case"program":var m=0;n.pan&&n.pan.length>u&&(m=n.pan[u]),s.setChannel(p.channel,m),s.setInstrument(p.instrument),o.setChannel(p.channel),o.setInstrument(p.instrument);break;case"note":var g=p.start,v=g+p.duration;d[g]||(d[g]=[]),d[g].push({pitch:p.pitch,volume:p.volume}),d[v]||(d[v]=[]),d[v].push({pitch:p.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+p.cmd)}}e(s,o,d,1920),s.endTrack(),o.endTrack()}var b=s.getData(),y=o.getData();return void 0===n.generateInline&&(n.generateInline=!0),n.generateInline&&n.generateDownload?{download:b,inline:y}:n.generateInline?y:b}}(),e.exports=r},function(e,t){var n;!function(){"use strict";(n=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(e){this.currentInstrument=e;var t=[{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(t)},n.prototype.setChannel=function(e){this.currentChannel=e},n.prototype.startTrack=function(){this.track++,this.tracks[this.track]=[],this.nextDuration=0},n.prototype.setGlobalInfo=function(e,t){this.tempo=e;var n=Math.round(1/e*6e7);this.timeFactor=n/48e4;this.track,this.nextDuration,this.timeFactor;this.track,this.nextDuration,this.timeFactor,this.track,this.nextDuration,this.timeFactor},n.prototype.startNote=function(e,t){var n=5*Math.floor(this.nextDuration/5),r=[{ticksToEvent:n,track:this.track,event:{deltaTime:n,channel:this.currentChannel,type:"channel",noteNumber:e,velocity:t,subtype:"noteOn"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(r),this.nextDuration=0},n.prototype.endNote=function(e){var t=5*Math.floor(this.nextDuration/5),n=[{ticksToEvent:t,track:this.track,event:{deltaTime:t,channel:this.currentChannel,type:"channel",noteNumber:e,velocity:0,subtype:"noteOff"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(n),this.nextDuration=0},n.prototype.addRest=function(e){this.nextDuration+=e},n.prototype.endTrack=function(){this.track},n.prototype.getData=function(){return function(e){!function(e){for(var t=0;t<e.length;t++)for(var n=0,r=0;r<e[t].length;r++)n+=e[t][r][1],e[t][r].absTime=n}(e);var t=function(e){for(var t=[],n=0;n<e.length;n++)for(var r=0;r<e[n].length;r++)t.push(e[n][r]);return t}(e);return function(e){for(var t=0,n=0;n<e.length;n++){var r=e[n].absTime;e[n][1]=r-t,t=r}}(t=function(e){return e.sort((function(e,t){if(e.absTime>t.absTime)return 1;if(e.absTime===t.absTime&&e.length>0&&t.length>0&&e[0].event&&t[0].event){var n=e[0].event.channel,r=t[0].event.channel;if(n>r)return 1;if(n<r)return-1;if("programChange"===t[0].event.subtype)return 1}return-1}))}(t)),t}(this.tracks)}}(),e.exports=n},function(e,t){var n;!function(){"use strict";function e(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n]);return e}function t(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}function r(e,t){for(var n="",r=0;r<e.length;r++)n+=i(e.charCodeAt(r),2);return"%00%FF"+t+i(n.length/3,2)+n}function i(e,t){for(var n=e.toString(16);n.length<t;)n="0"+n;return function(e){for(var t="",n=0;n<e.length;n+=2)t+="%",t+=e.substr(n,2);return t}(n)}function a(e){var t=0,n=[];for(e=Math.round(e);0!==e;)n.push(127&e),e>>=7;for(var r=n.length-1;r>=0;r--){t<<=8;var a=n[r];0!==r&&(a|=128),t|=a}var s=t.toString(16).length;return i(t,s+=s%2)}t.prototype.setTempo=function(e){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+i(Math.round(6e7/e),6),this.endTrack())},t.prototype.setGlobalInfo=function(e,t,n,a){if(0===this.trackcount){this.startTrack();var s=Math.round(6e7/e);this.track+="%00%FF%51%03"+i(s,6),n&&(this.track+=function(e){if(!e||!e.accidentals)return"";for(var t=0,n=256,r=0;r<e.accidentals.length;r++)"sharp"===e.accidentals[r].acc?t++:"flat"===e.accidentals[r].acc&&n--;var a=i(256!==n?n:t,2),s="m"===e.mode?"%01":"%00";return"%00%FF%59%02"+a+s}(n)),a&&(this.track+=function(e){var t,n="%00%FF%58%04"+i(e.num,2),r={1:0,2:1,4:2,8:3,16:4,32:5}[e.den];if(!r)return"";switch(n+=i(r,2),e.num+"/"+e.den){case"2/4":case"3/4":case"4/4":case"5/4":t=24;break;case"6/4":t=72;break;case"2/2":case"3/2":case"4/2":t=48;break;case"3/8":case"6/8":case"9/8":case"12/8":t=36}return t?(n+=i(t,2))+"%08":""}(a)),t&&(this.track+=r(t,"%01")),this.endTrack()}},t.prototype.startTrack=function(){this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},t.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var e=i(this.track.length/3+4,8);this.track="MTrk"+e+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},t.prototype.setText=function(e,t){switch(e){case"name":this.trackName=r(t,"%03")}},t.prototype.setInstrument=function(e){this.trackInstrument="%00%C0"+i(e,2),this.instrument=e},t.prototype.setChannel=function(e,t){this.channel=e;var n="%00%B"+this.channel.toString(16);this.track+=n+"%79%00",this.track+=n+"%40%00",this.track+=n+"%5B%30",t||(t=0),t=Math.round(64*(t+1)),this.track+=n+"%0A"+i(t,2),this.track+=n+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)},t.prototype.startNote=function(e,t){this.track+=a(this.silencelength),this.silencelength=0,this.track+=this.noteOnAndChannel,this.track+="%"+e.toString(16)+i(t,2)},t.prototype.endNote=function(e){this.track+=a(this.silencelength),this.silencelength=0,this.track+=this.noteOffAndChannel,this.track+="%"+e.toString(16)+"%00"},t.prototype.addRest=function(e){this.silencelength+=e,this.silencelength<0&&(this.silencelength=0)},t.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+i(this.trackcount,4)+"%01%e0"+this.trackstrings},t.prototype.embed=function(t,n){var r=this.getData(),i=e(document.createElement("a"),{href:r});if(i.innerHTML="download midi",t.insertBefore(i,t.firstChild),!n){var a=e(document.createElement("embed"),{src:r,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});t.insertBefore(a,t.firstChild)}},n=function(){return new t}}(),e.exports=n}])})); property in AnonymousFunctionc4f1d84110700.AnonymousFunctionc4f1d84110800.A
/plugin/dw2pdf/vendor/mpdf/mpdf/src/
H A DMpdf.php13047 $dy = $this->h - $this->page_box['outer_width_TB'] + $m;
13048 $cy = min($cy1, $dy + $l);
13055 $this->Line($this->page_box['outer_width_LR'], $cy, $this->page_box['outer_width_LR'], $dy);
13057 $this->Line($this->w - $this->page_box['outer_width_LR'], $cy, $this->w - $this->page_box['outer_width_LR'], $dy);
24930 $cba = unpack("A16dom/nbord/A1side/ns/dbw/a6ca/A10style/dx/dy/dw/dh/dmbl/dmbr/dmrt/dmrb/dmtl/dmtr/dmlt/dmlb/dcpd/dover/", $cbb);
/plugin/pdfjs/pdfjs/web/
H A Dviewer.js.map1dy","handled","ensureViewerFocused","cmd","isViewerInPresentationMode","findState","curElement","c…
/plugin/datatables/assets/pdfmake/build/
H A Dpdfmake.min.js
/plugin/dirtylittlehelper/script/
H A Dmermaid.min.js1dy=c,this._=u}function Xa(){return!ce.ctrlKey&&!ce.button}function Za(){return this.parentNode}fun… function
/plugin/diagramsnet/lib/js/mermaid/
H A Dmermaid.min.js6dy=c,this._=u}function Xa(){return!ce.ctrlKey&&!ce.button}function Za(){return this.parentNode}fun… function
/plugin/flowcharts/
H A Dmermaid.min.js1dy=u,this._=c}function Xa(){return!ue.ctrlKey&&!ue.button}function Za(){return this.parentNode}fun… function
/plugin/mermaid/
H A Dmermaid.min.js6 `)),b+=F+g[S+1]}),b}var Z0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e9(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var yOt={exports:{}};(function(i,a){(function(f,g){i.exports=g()})(Z0,function(){var f=1e3,g=6e4,w=36e5,v="millisecond",b="second",E="minute",S="hour",_="day",M="week",F="month",R="quarter",B="year",z="date",Y="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ot=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ft={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var Ot=["th","st","nd","rd"],It=V%100;return"["+V+(Ot[(It-20)%10]||Ot[It]||Ot[0])+"]"}},wt=function(V,Ot,It){var jt=String(V);return!jt||jt.length>=Ot?V:""+Array(Ot+1-jt.length).join(It)+V},mt={s:wt,z:function(V){var Ot=-V.utcOffset(),It=Math.abs(Ot),jt=Math.floor(It/60),xt=It%60;return(Ot<=0?"+":"-")+wt(jt,2,"0")+":"+wt(xt,2,"0")},m:function V(Ot,It){if(Ot.date()<It.date())return-V(It,Ot);var jt=12*(It.year()-Ot.year())+(It.month()-Ot.month()),xt=Ot.clone().add(jt,F),Ft=It-xt<0,Ct=Ot.clone().add(jt+(Ft?-1:1),F);return+(-(jt+(It-xt)/(Ft?xt-Ct:Ct-xt))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:F,y:B,w:M,d:_,D:z,h:S,m:E,s:b,ms:v,Q:R}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},ct="en",rt={};rt[ct]=ft;var it=function(V){return V instanceof K},gt=function V(Ot,It,jt){var xt;if(!Ot)return ct;if(typeof Ot=="string"){var Ft=Ot.toLowerCase();rt[Ft]&&(xt=Ft),It&&(rt[Ft]=It,xt=Ft);var Ct=Ot.split("-");if(!xt&&Ct.length>1)return V(Ct[0])}else{var kt=Ot.name;rt[kt]=Ot,xt=kt}return!jt&&xt&&(ct=xt),xt||!jt&&ct},Q=function(V,Ot){if(it(V))return V.clone();var It=typeof Ot=="object"?Ot:{};return It.date=V,It.args=arguments,new K(It)},dt=mt;dt.l=gt,dt.i=it,dt.w=function(V,Ot){return Q(V,{locale:Ot.$L,utc:Ot.$u,x:Ot.$x,$offset:Ot.$offset})};var K=function(){function V(It){this.$L=gt(It.locale,null,!0),this.parse(It)}var Ot=V.prototype;return Ot.parse=function(It){this.$d=function(jt){var xt=jt.date,Ft=jt.utc;if(xt===null)return new Date(NaN);if(dt.u(xt))return new Date;if(xt instanceof Date)return new Date(xt);if(typeof xt=="string"&&!/Z$/i.test(xt)){var Ct=xt.match(nt);if(Ct){var kt=Ct[2]-1||0,Gt=(Ct[7]||"0").substring(0,3);return Ft?new Date(Date.UTC(Ct[1],kt,Ct[3]||1,Ct[4]||0,Ct[5]||0,Ct[6]||0,Gt)):new Date(Ct[1],kt,Ct[3]||1,Ct[4]||0,Ct[5]||0,Ct[6]||0,Gt)}}return new Date(xt)}(It),this.$x=It.x||{},this.init()},Ot.init=function(){var It=this.$d;this.$y=It.getFullYear(),this.$M=It.getMonth(),this.$D=It.getDate(),this.$W=It.getDay(),this.$H=It.getHours(),this.$m=It.getMinutes(),this.$s=It.getSeconds(),this.$ms=It.getMilliseconds()},Ot.$utils=function(){return dt},Ot.isValid=function(){return this.$d.toString()!==Y},Ot.isSame=function(It,jt){var xt=Q(It);return this.startOf(jt)<=xt&&xt<=this.endOf(jt)},Ot.isAfter=function(It,jt){return Q(It)<this.startOf(jt)},Ot.isBefore=function(It,jt){return this.endOf(jt)<Q(It)},Ot.$g=function(It,jt,xt){return dt.u(It)?this[jt]:this.set(xt,It)},Ot.unix=function(){return Math.floor(this.valueOf()/1e3)},Ot.valueOf=function(){return this.$d.getTime()},Ot.startOf=function(It,jt){var xt=this,Ft=!!dt.u(jt)||jt,Ct=dt.p(It),kt=function(sn,be){var Ne=dt.w(xt.$u?Date.UTC(xt.$y,be,sn):new Date(xt.$y,be,sn),xt);return Ft?Ne:Ne.endOf(_)},Gt=function(sn,be){return dt.w(xt.toDate()[sn].apply(xt.toDate("s"),(Ft?[0,0,0,0]:[23,59,59,999]).slice(be)),xt)},Fe=this.$W,Mt=this.$M,pn=this.$D,Ae="set"+(this.$u?"UTC":"");switch(Ct){case B:return Ft?kt(1,0):kt(31,11);case F:return Ft?kt(1,Mt):kt(0,Mt+1);case M:var ye=this.$locale().weekStart||0,tn=(Fe<ye?Fe+7:Fe)-ye;return kt(Ft?pn-tn:pn+(6-tn),Mt);case _:case z:return Gt(Ae+"Hours",0);case S:return Gt(Ae+"Minutes",1);case E:return Gt(Ae+"Seconds",2);case b:return Gt(Ae+"Milliseconds",3);default:return this.clone()}},Ot.endOf=function(It){return this.startOf(It,!1)},Ot.$set=function(It,jt){var xt,Ft=dt.p(It),Ct="set"+(this.$u?"UTC":""),kt=(xt={},xt[_]=Ct+"Date",xt[z]=Ct+"Date",xt[F]=Ct+"Month",xt[B]=Ct+"FullYear",xt[S]=Ct+"Hours",xt[E]=Ct+"Minutes",xt[b]=Ct+"Seconds",xt[v]=Ct+"Milliseconds",xt)[Ft],Gt=Ft===_?this.$D+(jt-this.$W):jt;if(Ft===F||Ft===B){var Fe=this.clone().set(z,1);Fe.$d[kt](Gt),Fe.init(),this.$d=Fe.set(z,Math.min(this.$D,Fe.daysInMonth())).$d}else kt&&this.$d[kt](Gt);return this.init(),this},Ot.set=function(It,jt){return this.clone().$set(It,jt)},Ot.get=function(It){return this[dt.p(It)]()},Ot.add=function(It,jt){var xt,Ft=this;It=Number(It);var Ct=dt.p(jt),kt=function(Mt){var pn=Q(Ft);return dt.w(pn.date(pn.date()+Math.round(Mt*It)),Ft)};if(Ct===F)return this.set(F,this.$M+It);if(Ct===B)return this.set(B,this.$y+It);if(Ct===_)return kt(1);if(Ct===M)return kt(7);var Gt=(xt={},xt[E]=g,xt[S]=w,xt[b]=f,xt)[Ct]||1,Fe=this.$d.getTime()+It*Gt;return dt.w(Fe,this)},Ot.subtract=function(It,jt){return this.add(-1*It,jt)},Ot.format=function(It){var jt=this,xt=this.$locale();if(!this.isValid())return xt.invalidDate||Y;var Ft=It||"YYYY-MM-DDTHH:mm:ssZ",Ct=dt.z(this),kt=this.$H,Gt=this.$m,Fe=this.$M,Mt=xt.weekdays,pn=xt.months,Ae=function(be,Ne,Xt,_e){return be&&(be[Ne]||be(jt,Ft))||Xt[Ne].slice(0,_e)},ye=function(be){return dt.s(kt%12||12,be,"0")},tn=xt.meridiem||function(be,Ne,Xt){var _e=be<12?"AM":"PM";return Xt?_e.toLowerCase():_e},sn={YY:String(this.$y).slice(-2),YYYY:this.$y,M:Fe+1,MM:dt.s(Fe+1,2,"0"),MMM:Ae(xt.monthsShort,Fe,pn,3),MMMM:Ae(pn,Fe),D:this.$D,DD:dt.s(this.$D,2,"0"),d:String(this.$W),dd:Ae(xt.weekdaysMin,this.$W,Mt,2),ddd:Ae(xt.weekdaysShort,this.$W,Mt,3),dddd:Mt[this.$W],H:String(kt),HH:dt.s(kt,2,"0"),h:ye(1),hh:ye(2),a:tn(kt,Gt,!0),A:tn(kt,Gt,!1),m:String(Gt),mm:dt.s(Gt,2,"0"),s:String(this.$s),ss:dt.s(this.$s,2,"0"),SSS:dt.s(this.$ms,3,"0"),Z:Ct};return Ft.replace(ot,function(be,Ne){return Ne||sn[be]||Ct.replace(":","")})},Ot.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Ot.diff=function(It,jt,xt){var Ft,Ct=dt.p(jt),kt=Q(It),Gt=(kt.utcOffset()-this.utcOffset())*g,Fe=this-kt,Mt=dt.m(this,kt);return Mt=(Ft={},Ft[B]=Mt/12,Ft[F]=Mt,Ft[R]=Mt/3,Ft[M]=(Fe-Gt)/6048e5,Ft[_]=(Fe-Gt)/864e5,Ft[S]=Fe/w,Ft[E]=Fe/g,Ft[b]=Fe/f,Ft)[Ct]||Fe,xt?Mt:dt.a(Mt)},Ot.daysInMonth=function(){return this.endOf(F).$D},Ot.$locale=function(){return rt[this.$L]},Ot.locale=function(It,jt){if(!It)return this.$L;var xt=this.clone(),Ft=gt(It,jt,!0);return Ft&&(xt.$L=Ft),xt},Ot.clone=function(){return dt.w(this.$d,this)},Ot.toDate=function(){return new Date(this.valueOf())},Ot.toJSON=function(){return this.isValid()?this.toISOString():null},Ot.toISOString=function(){return this.$d.toISOString()},Ot.toString=function(){return this.$d.toUTCString()},V}(),yt=K.prototype;return Q.prototype=yt,[["$ms",v],["$s",b],["$m",E],["$H",S],["$W",_],["$M",F],["$y",B],["$D",z]].forEach(function(V){yt[V[1]]=function(Ot){return this.$g(Ot,V[0],V[1])}}),Q.extend=function(V,Ot){return V.$i||(V(Ot,K,Q),V.$i=!0),Q},Q.locale=gt,Q.isDayjs=it,Q.unix=function(V){return Q(1e3*V)},Q.en=rt[ct],Q.Ls=rt,Q.p={},Q})})(yOt);var g9e=yOt.exports;const tg=e9(g9e),yx={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Kt={trace:(...i)=>{},debug:(...i)=>{},info:(...i)=>{},warn:(...i)=>{},error:(...i)=>{},fatal:(...i)=>{}},d0t=function(i="fatal"){let a=yx.fatal;typeof i=="string"?(i=i.toLowerCase(),i in yx&&(a=yx[i])):typeof i=="number"&&(a=i),Kt.trace=()=>{},Kt.debug=()=>{},Kt.info=()=>{},Kt.warn=()=>{},Kt.error=()=>{},Kt.fatal=()=>{},a<=yx.fatal&&(Kt.fatal=console.error?console.error.bind(console,Gw("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Gw("FATAL"))),a<=yx.error&&(Kt.error=console.error?console.error.bind(console,Gw("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Gw("ERROR"))),a<=yx.warn&&(Kt.warn=console.warn?console.warn.bind(console,Gw("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Gw("WARN"))),a<=yx.info&&(Kt.info=console.info?console.info.bind(console,Gw("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Gw("INFO"))),a<=yx.debug&&(Kt.debug=console.debug?console.debug.bind(console,Gw("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Gw("DEBUG"))),a<=yx.trace&&(Kt.trace=console.debug?console.debug.bind(console,Gw("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Gw("TRACE")))},Gw=i=>`%c${tg().format("ss.SSS")} : ${i} : `;var g0t={};Object.defineProperty(g0t,"__esModule",{value:!0});var h8=g0t.sanitizeUrl=void 0,p9e=/^([^\w]*)(javascript|data|vbscript)/im,b9e=/&#(\w+)(^\w|;)?/g,w9e=/&(newline|tab);/gi,m9e=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,v9e=/^.+(:|&colon;)/gim,y9e=[".","/"];function x9e(i){return y9e.indexOf(i[0])>-1}function k9e(i){return i.replace(b9e,function(a,f){return String.fromCharCode(f)})}function E9e(i){var a=k9e(i||"").replace(w9e,"").replace(m9e,"").trim();if(!a)return"about:blank";if(x9e(a))return a;var f=a.match(v9e);if(!f)return a;var g=f[0];return p9e.test(g)?"about:blank":a}h8=g0t.sanitizeUrl=E9e;function nW(i,a){return i==null||a==null?NaN:i<a?-1:i>a?1:i>=a?0:NaN}function T9e(i,a){return i==null||a==null?NaN:a<i?-1:a>i?1:a>=i?0:NaN}function p0t(i){let a,f,g;i.length!==2?(a=nW,f=(E,S)=>nW(i(E),S),g=(E,S)=>i(E)-S):(a=i===nW||i===T9e?i:C9e,f=i,g=i);function w(E,S,_=0,M=E.length){if(_<M){if(a(S,S)!==0)return M;do{const F=_+M>>>1;f(E[F],S)<0?_=F+1:M=F}while(_<M)}return _}function v(E,S,_=0,M=E.length){if(_<M){if(a(S,S)!==0)return M;do{const F=_+M>>>1;f(E[F],S)<=0?_=F+1:M=F}while(_<M)}return _}function b(E,S,_=0,M=E.length){const F=w(E,S,_,M-1);return F>_&&g(E[F-1],S)>-g(E[F],S)?F-1:F}return{left:w,center:b,right:v}}function C9e(){return 0}function S9e(i){return i===null?NaN:+i}const _9e=p0t(nW).right;p0t(S9e).center;const A9e=_9e;class xOt extends Map{constructor(a,f=M9e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:f}}),a!=null)for(const[g,w]of a)this.set(g,w)}get(a){return super.get(kOt(this,a))}has(a){return super.has(kOt(this,a))}set(a,f){return super.set(L9e(this,a),f)}delete(a){return super.delete(D9e(this,a))}}function kOt({_intern:i,_key:a},f){const g=a(f);return i.has(g)?i.get(g):f}function L9e({_intern:i,_key:a},f){const g=a(f);return i.has(g)?i.get(g):(i.set(g,f),f)}function D9e({_intern:i,_key:a},f){const g=a(f);return i.has(g)&&(f=i.get(g),i.delete(g)),f}function M9e(i){return i!==null&&typeof i=="object"?i.valueOf():i}const I9e=Math.sqrt(50),O9e=Math.sqrt(10),N9e=Math.sqrt(2);function rW(i,a,f){const g=(a-i)/Math.max(0,f),w=Math.floor(Math.log10(g)),v=g/Math.pow(10,w),b=v>=I9e?10:v>=O9e?5:v>=N9e?2:1;let E,S,_;return w<0?(_=Math.pow(10,-w)/b,E=Math.round(i*_),S=Math.round(a*_),E/_<i&&++E,S/_>a&&--S,_=-_):(_=Math.pow(10,w)*b,E=Math.round(i/_),S=Math.round(a/_),E*_<i&&++E,S*_>a&&--S),S<E&&.5<=f&&f<2?rW(i,a,f*2):[E,S,_]}function P9e(i,a,f){if(a=+a,i=+i,f=+f,!(f>0))return[];if(i===a)return[i];const g=a<i,[w,v,b]=g?rW(a,i,f):rW(i,a,f);if(!(v>=w))return[];const E=v-w+1,S=new Array(E);if(g)if(b<0)for(let _=0;_<E;++_)S[_]=(v-_)/-b;else for(let _=0;_<E;++_)S[_]=(v-_)*b;else if(b<0)for(let _=0;_<E;++_)S[_]=(w+_)/-b;else for(let _=0;_<E;++_)S[_]=(w+_)*b;return S}function b0t(i,a,f){return a=+a,i=+i,f=+f,rW(i,a,f)[2]}function w0t(i,a,f){a=+a,i=+i,f=+f;const g=a<i,w=g?b0t(a,i,f):b0t(i,a,f);return(g?-1:1)*(w<0?1/-w:w)}function F9e(i,a){let f;if(a===void 0)for(const g of i)g!=null&&(f<g||f===void 0&&g>=g)&&(f=g);else{let g=-1;for(let w of i)(w=a(w,++g,i))!=null&&(f<w||f===void 0&&w>=w)&&(f=w)}return f}function B9e(i,a){let f;if(a===void 0)for(const g of i)g!=null&&(f>g||f===void 0&&g>=g)&&(f=g);else{let g=-1;for(let w of i)(w=a(w,++g,i))!=null&&(f>w||f===void 0&&w>=w)&&(f=w)}return f}function R9e(i,a,f){i=+i,a=+a,f=(w=arguments.length)<2?(a=i,i=0,1):w<3?1:+f;for(var g=-1,w=Math.max(0,Math.ceil((a-i)/f))|0,v=new Array(w);++g<w;)v[g]=i+g*f;return v}function j9e(i){return i}var iW=1,m0t=2,v0t=3,sW=4,EOt=1e-6;function $9e(i){return"translate("+i+",0)"}function z9e(i){return"translate(0,"+i+")"}function q9e(i){return a=>+i(a)}function H9e(i,a){return a=Math.max(0,i.bandwidth()-a*2)/2,i.round()&&(a=Math.round(a)),f=>+i(f)+a}function V9e(){return!this.__axis}function TOt(i,a){var f=[],g=null,w=null,v=6,b=6,E=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,_=i===iW||i===sW?-1:1,M=i===sW||i===m0t?"x":"y",F=i===iW||i===v0t?$9e:z9e;function R(B){var z=g??(a.ticks?a.ticks.apply(a,f):a.domain()),Y=w??(a.tickFormat?a.tickFormat.apply(a,f):j9e),nt=Math.max(v,0)+E,ot=a.range(),ft=+ot[0]+S,wt=+ot[ot.length-1]+S,mt=(a.bandwidth?H9e:q9e)(a.copy(),S),ct=B.selection?B.selection():B,rt=ct.selectAll(".domain").data([null]),it=ct.selectAll(".tick").data(z,a).order(),gt=it.exit(),Q=it.enter().append("g").attr("class","tick"),dt=it.select("line"),K=it.select("text");rt=rt.merge(rt.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),it=it.merge(Q),dt=dt.merge(Q.append("line").attr("stroke","currentColor").attr(M+"2",_*v)),K=K.merge(Q.append("text").attr("fill","currentColor").attr(M,_*nt).attr("dy",i===iW?"0em":i===v0t?"0.71em":"0.32em")),B!==ct&&(rt=rt.transition(B),it=it.transition(B),dt=dt.transition(B),K=K.transition(B),gt=gt.transition(B).attr("opacity",EOt).attr("transform",function(yt){return isFinite(yt=mt(yt))?F(yt+S):this.getAttribute("transform")}),Q.attr("opacity",EOt).attr("transform",function(yt){var V=this.parentNode.__axis;return F((V&&isFinite(V=V(yt))?V:mt(yt))+S)})),gt.remove(),rt.attr("d",i===sW||i===m0t?b?"M"+_*b+","+ft+"H"+S+"V"+wt+"H"+_*b:"M"+S+","+ft+"V"+wt:b?"M"+ft+","+_*b+"V"+S+"H"+wt+"V"+_*b:"M"+ft+","+S+"H"+wt),it.attr("opacity",1).attr("transform",function(yt){return F(mt(yt)+S)}),dt.attr(M+"2",_*v),K.attr(M,_*nt).text(Y),ct.filter(V9e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",i===m0t?"start":i===sW?"end":"middle"),ct.each(function(){this.__axis=mt})}return R.scale=function(B){return arguments.length?(a=B,R):a},R.ticks=function(){return f=Array.from(arguments),R},R.tickArguments=function(B){return arguments.length?(f=B==null?[]:Array.from(B),R):f.slice()},R.tickValues=function(B){return arguments.length?(g=B==null?null:Array.from(B),R):g&&g.slice()},R.tickFormat=function(B){return arguments.length?(w=B,R):w},R.tickSize=function(B){return arguments.length?(v=b=+B,R):v},R.tickSizeInner=function(B){return arguments.length?(v=+B,R):v},R.tickSizeOuter=function(B){return arguments.length?(b=+B,R):b},R.tickPadding=function(B){return arguments.length?(E=+B,R):E},R.offset=function(B){return arguments.length?(S=+B,R):S},R}function U9e(i){return TOt(iW,i)}function G9e(i){return TOt(v0t,i)}var K9e={value:()=>{}};function COt(){for(var i=0,a=arguments.length,f={},g;i<a;++i){if(!(g=arguments[i]+"")||g in f||/[\s.]/.test(g))throw new Error("illegal type: "+g);f[g]=[]}return new aW(f)}function aW(i){this._=i}function W9e(i,a){return i.trim().split(/^|\s+/).map(function(f){var g="",w=f.indexOf(".");if(w>=0&&(g=f.slice(w+1),f=f.slice(0,w)),f&&!a.hasOwnProperty(f))throw new Error("unknown type: "+f);return{type:f,name:g}})}aW.prototype=COt.prototype={constructor:aW,on:function(i,a){var f=this._,g=W9e(i+"",f),w,v=-1,b=g.length;if(arguments.length<2){for(;++v<b;)if((w=(i=g[v]).type)&&(w=Y9e(f[w],i.name)))return w;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++v<b;)if(w=(i=g[v]).type)f[w]=SOt(f[w],i.name,a);else if(a==null)for(w in f)f[w]=SOt(f[w],i.name,null);return this},copy:function(){var i={},a=this._;for(var f in a)i[f]=a[f].slice();return new aW(i)},call:function(i,a){if((w=arguments.length-2)>0)for(var f=new Array(w),g=0,w,v;g<w;++g)f[g]=arguments[g+2];if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(v=this._[i],g=0,w=v.length;g<w;++g)v[g].value.apply(a,f)},apply:function(i,a,f){if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(var g=this._[i],w=0,v=g.length;w<v;++w)g[w].value.apply(a,f)}};function Y9e(i,a){for(var f=0,g=i.length,w;f<g;++f)if((w=i[f]).name===a)return w.value}function SOt(i,a,f){for(var g=0,w=i.length;g<w;++g)if(i[g].name===a){i[g]=K9e,i=i.slice(0,g).concat(i.slice(g+1));break}return f!=null&&i.push({name:a,value:f}),i}var y0t="http://www.w3.org/1999/xhtml";const _Ot={svg:"http://www.w3.org/2000/svg",xhtml:y0t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function oW(i){var a=i+="",f=a.indexOf(":");return f>=0&&(a=i.slice(0,f))!=="xmlns"&&(i=i.slice(f+1)),_Ot.hasOwnProperty(a)?{space:_Ot[a],local:i}:i}function X9e(i){return function(){var a=this.ownerDocument,f=this.namespaceURI;return f===y0t&&a.documentElement.namespaceURI===y0t?a.createElement(i):a.createElementNS(f,i)}}function Q9e(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function AOt(i){var a=oW(i);return(a.local?Q9e:X9e)(a)}function J9e(){}function x0t(i){return i==null?J9e:function(){return this.querySelector(i)}}function Z9e(i){typeof i!="function"&&(i=x0t(i));for(var a=this._groups,f=a.length,g=new Array(f),w=0;w<f;++w)for(var v=a[w],b=v.length,E=g[w]=new Array(b),S,_,M=0;M<b;++M)(S=v[M])&&(_=i.call(S,S.__data__,M,v))&&("__data__"in S&&(_.__data__=S.__data__),E[M]=_);return new Gg(g,this._parents)}function LOt(i){return i==null?[]:Array.isArray(i)?i:Array.from(i)}function tCe(){return[]}function DOt(i){return i==null?tCe:function(){return this.querySelectorAll(i)}}function eCe(i){return function(){return LOt(i.apply(this,arguments))}}function nCe(i){typeof i=="function"?i=eCe(i):i=DOt(i);for(var a=this._groups,f=a.length,g=[],w=[],v=0;v<f;++v)for(var b=a[v],E=b.length,S,_=0;_<E;++_)(S=b[_])&&(g.push(i.call(S,S.__data__,_,b)),w.push(S));return new Gg(g,w)}function MOt(i){return function(){return this.matches(i)}}function IOt(i){return function(a){return a.matches(i)}}var rCe=Array.prototype.find;function iCe(i){return function(){return rCe.call(this.children,i)}}function sCe(){return this.firstElementChild}function aCe(i){return this.select(i==null?sCe:iCe(typeof i=="function"?i:IOt(i)))}var oCe=Array.prototype.filter;function cCe(){return Array.from(this.children)}function uCe(i){return function(){return oCe.call(this.children,i)}}function lCe(i){return this.selectAll(i==null?cCe:uCe(typeof i=="function"?i:IOt(i)))}function hCe(i){typeof i!="function"&&(i=MOt(i));for(var a=this._groups,f=a.length,g=new Array(f),w=0;w<f;++w)for(var v=a[w],b=v.length,E=g[w]=[],S,_=0;_<b;++_)(S=v[_])&&i.call(S,S.__data__,_,v)&&E.push(S);return new Gg(g,this._parents)}function OOt(i){return new Array(i.length)}function fCe(){return new Gg(this._enter||this._groups.map(OOt),this._parents)}function cW(i,a){this.ownerDocument=i.ownerDocument,this.namespaceURI=i.namespaceURI,this._next=null,this._parent=i,this.__data__=a}cW.prototype={constructor:cW,appendChild:function(i){return this._parent.insertBefore(i,this._next)},insertBefore:function(i,a){return this._parent.insertBefore(i,a)},querySelector:function(i){return this._parent.querySelector(i)},querySelectorAll:function(i){return this._parent.querySelectorAll(i)}};function dCe(i){return function(){return i}}function gCe(i,a,f,g,w,v){for(var b=0,E,S=a.length,_=v.length;b<_;++b)(E=a[b])?(E.__data__=v[b],g[b]=E):f[b]=new cW(i,v[b]);for(;b<S;++b)(E=a[b])&&(w[b]=E)}function pCe(i,a,f,g,w,v,b){var E,S,_=new Map,M=a.length,F=v.length,R=new Array(M),B;for(E=0;E<M;++E)(S=a[E])&&(R[E]=B=b.call(S,S.__data__,E,a)+"",_.has(B)?w[E]=S:_.set(B,S));for(E=0;E<F;++E)B=b.call(i,v[E],E,v)+"",(S=_.get(B))?(g[E]=S,S.__data__=v[E],_.delete(B)):f[E]=new cW(i,v[E]);for(E=0;E<M;++E)(S=a[E])&&_.get(R[E])===S&&(w[E]=S)}function bCe(i){return i.__data__}function wCe(i,a){if(!arguments.length)return Array.from(this,bCe);var f=a?pCe:gCe,g=this._parents,w=this._groups;typeof i!="function"&&(i=dCe(i));for(var v=w.length,b=new Array(v),E=new Array(v),S=new Array(v),_=0;_<v;++_){var M=g[_],F=w[_],R=F.length,B=mCe(i.call(M,M&&M.__data__,_,g)),z=B.length,Y=E[_]=new Array(z),nt=b[_]=new Array(z),ot=S[_]=new Array(R);f(M,F,Y,nt,ot,B,a);for(var ft=0,wt=0,mt,ct;ft<z;++ft)if(mt=Y[ft]){for(ft>=wt&&(wt=ft+1);!(ct=nt[wt])&&++wt<z;);mt._next=ct||null}}return b=new Gg(b,g),b._enter=E,b._exit=S,b}function mCe(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function vCe(){return new Gg(this._exit||this._groups.map(OOt),this._parents)}function yCe(i,a,f){var g=this.enter(),w=this,v=this.exit();return typeof i=="function"?(g=i(g),g&&(g=g.selection())):g=g.append(i+""),a!=null&&(w=a(w),w&&(w=w.selection())),f==null?v.remove():f(v),g&&w?g.merge(w).order():w}function xCe(i){for(var a=i.selection?i.selection():i,f=this._groups,g=a._groups,w=f.length,v=g.length,b=Math.min(w,v),E=new Array(w),S=0;S<b;++S)for(var _=f[S],M=g[S],F=_.length,R=E[S]=new Array(F),B,z=0;z<F;++z)(B=_[z]||M[z])&&(R[z]=B);for(;S<w;++S)E[S]=f[S];return new Gg(E,this._parents)}function kCe(){for(var i=this._groups,a=-1,f=i.length;++a<f;)for(var g=i[a],w=g.length-1,v=g[w],b;--w>=0;)(b=g[w])&&(v&&b.compareDocumentPosition(v)^4&&v.parentNode.insertBefore(b,v),v=b);return this}function ECe(i){i||(i=TCe);function a(F,R){return F&&R?i(F.__data__,R.__data__):!F-!R}for(var f=this._groups,g=f.length,w=new Array(g),v=0;v<g;++v){for(var b=f[v],E=b.length,S=w[v]=new Array(E),_,M=0;M<E;++M)(_=b[M])&&(S[M]=_);S.sort(a)}return new Gg(w,this._parents).order()}function TCe(i,a){return i<a?-1:i>a?1:i>=a?0:NaN}function CCe(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function SCe(){return Array.from(this)}function _Ce(){for(var i=this._groups,a=0,f=i.length;a<f;++a)for(var g=i[a],w=0,v=g.length;w<v;++w){var b=g[w];if(b)return b}return null}function ACe(){let i=0;for(const a of this)++i;return i}function LCe(){return!this.node()}function DCe(i){for(var a=this._groups,f=0,g=a.length;f<g;++f)for(var w=a[f],v=0,b=w.length,E;v<b;++v)(E=w[v])&&i.call(E,E.__data__,v,w);return this}function MCe(i){return function(){this.removeAttribute(i)}}function ICe(i){return function(){this.removeAttributeNS(i.space,i.local)}}function OCe(i,a){return function(){this.setAttribute(i,a)}}function NCe(i,a){return function(){this.setAttributeNS(i.space,i.local,a)}}function PCe(i,a){return function(){var f=a.apply(this,arguments);f==null?this.removeAttribute(i):this.setAttribute(i,f)}}function FCe(i,a){return function(){var f=a.apply(this,arguments);f==null?this.removeAttributeNS(i.space,i.local):this.setAttributeNS(i.space,i.local,f)}}function BCe(i,a){var f=oW(i);if(arguments.length<2){var g=this.node();return f.local?g.getAttributeNS(f.space,f.local):g.getAttribute(f)}return this.each((a==null?f.local?ICe:MCe:typeof a=="function"?f.local?FCe:PCe:f.local?NCe:OCe)(f,a))}function NOt(i){return i.ownerDocument&&i.ownerDocument.defaultView||i.document&&i||i.defaultView}function RCe(i){return function(){this.style.removeProperty(i)}}function jCe(i,a,f){return function(){this.style.setProperty(i,a,f)}}function $Ce(i,a,f){return function(){var g=a.apply(this,arguments);g==null?this.style.removeProperty(i):this.style.setProperty(i,g,f)}}function zCe(i,a,f){return arguments.length>1?this.each((a==null?RCe:typeof a=="function"?$Ce:jCe)(i,a,f??"")):RL(this.node(),i)}function RL(i,a){return i.style.getPropertyValue(a)||NOt(i).getComputedStyle(i,null).getPropertyValue(a)}function qCe(i){return function(){delete this[i]}}function HCe(i,a){return function(){this[i]=a}}function VCe(i,a){return function(){var f=a.apply(this,arguments);f==null?delete this[i]:this[i]=f}}function UCe(i,a){return arguments.length>1?this.each((a==null?qCe:typeof a=="function"?VCe:HCe)(i,a)):this.node()[i]}function POt(i){return i.trim().split(/^|\s+/)}function k0t(i){return i.classList||new FOt(i)}function FOt(i){this._node=i,this._names=POt(i.getAttribute("class")||"")}FOt.prototype={add:function(i){var a=this._names.indexOf(i);a<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var a=this._names.indexOf(i);a>=0&&(this._names.splice(a,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function BOt(i,a){for(var f=k0t(i),g=-1,w=a.length;++g<w;)f.add(a[g])}function ROt(i,a){for(var f=k0t(i),g=-1,w=a.length;++g<w;)f.remove(a[g])}function GCe(i){return function(){BOt(this,i)}}function KCe(i){return function(){ROt(this,i)}}function WCe(i,a){return function(){(a.apply(this,arguments)?BOt:ROt)(this,i)}}function YCe(i,a){var f=POt(i+"");if(arguments.length<2){for(var g=k0t(this.node()),w=-1,v=f.length;++w<v;)if(!g.contains(f[w]))return!1;return!0}return this.each((typeof a=="function"?WCe:a?GCe:KCe)(f,a))}function XCe(){this.textContent=""}function QCe(i){return function(){this.textContent=i}}function JCe(i){return function(){var a=i.apply(this,arguments);this.textContent=a??""}}function ZCe(i){return arguments.length?this.each(i==null?XCe:(typeof i=="function"?JCe:QCe)(i)):this.node().textContent}function tSe(){this.innerHTML=""}function eSe(i){return function(){this.innerHTML=i}}function nSe(i){return function(){var a=i.apply(this,arguments);this.innerHTML=a??""}}function rSe(i){return arguments.length?this.each(i==null?tSe:(typeof i=="function"?nSe:eSe)(i)):this.node().innerHTML}function iSe(){this.nextSibling&&this.parentNode.appendChild(this)}function sSe(){return this.each(iSe)}function aSe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function oSe(){return this.each(aSe)}function cSe(i){var a=typeof i=="function"?i:AOt(i);return this.select(function(){return this.appendChild(a.apply(this,arguments))})}function uSe(){return null}function lSe(i,a){var f=typeof i=="function"?i:AOt(i),g=a==null?uSe:typeof a=="function"?a:x0t(a);return this.select(function(){return this.insertBefore(f.apply(this,arguments),g.apply(this,arguments)||null)})}function hSe(){var i=this.parentNode;i&&i.removeChild(this)}function fSe(){return this.each(hSe)}function dSe(){var i=this.cloneNode(!1),a=this.parentNode;return a?a.insertBefore(i,this.nextSibling):i}function gSe(){var i=this.cloneNode(!0),a=this.parentNode;return a?a.insertBefore(i,this.nextSibling):i}function pSe(i){return this.select(i?gSe:dSe)}function bSe(i){return arguments.length?this.property("__data__",i):this.node().__data__}function wSe(i){return function(a){i.call(this,a,this.__data__)}}function mSe(i){return i.trim().split(/^|\s+/).map(function(a){var f="",g=a.indexOf(".");return g>=0&&(f=a.slice(g+1),a=a.slice(0,g)),{type:a,name:f}})}function vSe(i){return function(){var a=this.__on;if(a){for(var f=0,g=-1,w=a.length,v;f<w;++f)v=a[f],(!i.type||v.type===i.type)&&v.name===i.name?this.removeEventListener(v.type,v.listener,v.options):a[++g]=v;++g?a.length=g:delete this.__on}}}function ySe(i,a,f){return function(){var g=this.__on,w,v=wSe(a);if(g){for(var b=0,E=g.length;b<E;++b)if((w=g[b]).type===i.type&&w.name===i.name){this.removeEventListener(w.type,w.listener,w.options),this.addEventListener(w.type,w.listener=v,w.options=f),w.value=a;return}}this.addEventListener(i.type,v,f),w={type:i.type,name:i.name,value:a,listener:v,options:f},g?g.push(w):this.__on=[w]}}function xSe(i,a,f){var g=mSe(i+""),w,v=g.length,b;if(arguments.length<2){var E=this.node().__on;if(E){for(var S=0,_=E.length,M;S<_;++S)for(w=0,M=E[S];w<v;++w)if((b=g[w]).type===M.type&&b.name===M.name)return M.value}return}for(E=a?ySe:vSe,w=0;w<v;++w)this.each(E(g[w],a,f));return this}function jOt(i,a,f){var g=NOt(i),w=g.CustomEvent;typeof w=="function"?w=new w(a,f):(w=g.document.createEvent("Event"),f?(w.initEvent(a,f.bubbles,f.cancelable),w.detail=f.detail):w.initEvent(a,!1,!1)),i.dispatchEvent(w)}function kSe(i,a){return function(){return jOt(this,i,a)}}function ESe(i,a){return function(){return jOt(this,i,a.apply(this,arguments))}}function TSe(i,a){return this.each((typeof a=="function"?ESe:kSe)(i,a))}function*CSe(){for(var i=this._groups,a=0,f=i.length;a<f;++a)for(var g=i[a],w=0,v=g.length,b;w<v;++w)(b=g[w])&&(yield b)}var E0t=[null];function Gg(i,a){this._groups=i,this._parents=a}function JP(){return new Gg([[document.documentElement]],E0t)}function SSe(){return this}Gg.prototype=JP.prototype={constructor:Gg,select:Z9e,selectAll:nCe,selectChild:aCe,selectChildren:lCe,filter:hCe,data:wCe,enter:fCe,exit:vCe,join:yCe,merge:xCe,selection:SSe,order:kCe,sort:ECe,call:CCe,nodes:SCe,node:_Ce,size:ACe,empty:LCe,each:DCe,attr:BCe,style:zCe,property:UCe,classed:YCe,text:ZCe,html:rSe,raise:sSe,lower:oSe,append:cSe,insert:lSe,remove:fSe,clone:pSe,datum:bSe,on:xSe,dispatch:TSe,[Symbol.iterator]:CSe};function Tr(i){return typeof i=="string"?new Gg([[document.querySelector(i)]],[document.documentElement]):new Gg([[i]],E0t)}function $Ot(i){return typeof i=="string"?new Gg([document.querySelectorAll(i)],[document.documentElement]):new Gg([LOt(i)],E0t)}function ZP(i,a,f){i.prototype=a.prototype=f,f.constructor=i}function uW(i,a){var f=Object.create(i.prototype);for(var g in a)f[g]=a[g];return f}function n9(){}var tF=.7,lW=1/tF,jL="\\s*([+-]?\\d+)\\s*",eF="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Q3="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_Se=/^#([0-9a-f]{3,8})$/,ASe=new RegExp(`^rgb\\(${jL},${jL},${jL}\\)$`),LSe=new RegExp(`^rgb\\(${Q3},${Q3},${Q3}\\)$`),DSe=new RegExp(`^rgba\\(${jL},${jL},${jL},${eF}\\)$`),MSe=new RegExp(`^rgba\\(${Q3},${Q3},${Q3},${eF}\\)$`),ISe=new RegExp(`^hsl\\(${eF},${Q3},${Q3}\\)$`),OSe=new RegExp(`^hsla\\(${eF},${Q3},${Q3},${eF}\\)$`),zOt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ZP(n9,r9,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:qOt,formatHex:qOt,formatHex8:NSe,formatHsl:PSe,formatRgb:HOt,toString:HOt});function qOt(){return this.rgb().formatHex()}function NSe(){return this.rgb().formatHex8()}function PSe(){return YOt(this).formatHsl()}function HOt(){return this.rgb().formatRgb()}function r9(i){var a,f;return i=(i+"").trim().toLowerCase(),(a=_Se.exec(i))?(f=a[1].length,a=parseInt(a[1],16),f===6?VOt(a):f===3?new eg(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):f===8?hW(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):f===4?hW(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=ASe.exec(i))?new eg(a[1],a[2],a[3],1):(a=LSe.exec(i))?new eg(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=DSe.exec(i))?hW(a[1],a[2],a[3],a[4]):(a=MSe.exec(i))?hW(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=ISe.exec(i))?WOt(a[1],a[2]/100,a[3]/100,1):(a=OSe.exec(i))?WOt(a[1],a[2]/100,a[3]/100,a[4]):zOt.hasOwnProperty(i)?VOt(zOt[i]):i==="transparent"?new eg(NaN,NaN,NaN,0):null}function VOt(i){return new eg(i>>16&255,i>>8&255,i&255,1)}function hW(i,a,f,g){return g<=0&&(i=a=f=NaN),new eg(i,a,f,g)}function UOt(i){return i instanceof n9||(i=r9(i)),i?(i=i.rgb(),new eg(i.r,i.g,i.b,i.opacity)):new eg}function T0t(i,a,f,g){return arguments.length===1?UOt(i):new eg(i,a,f,g??1)}function eg(i,a,f,g){this.r=+i,this.g=+a,this.b=+f,this.opacity=+g}ZP(eg,T0t,uW(n9,{brighter(i){return i=i==null?lW:Math.pow(lW,i),new eg(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?tF:Math.pow(tF,i),new eg(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new eg(i9(this.r),i9(this.g),i9(this.b),fW(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:GOt,formatHex:GOt,formatHex8:FSe,formatRgb:KOt,toString:KOt}));function GOt(){return`#${s9(this.r)}${s9(this.g)}${s9(this.b)}`}function FSe(){return`#${s9(this.r)}${s9(this.g)}${s9(this.b)}${s9((isNaN(this.opacity)?1:this.opacity)*255)}`}function KOt(){const i=fW(this.opacity);return`${i===1?"rgb(":"rgba("}${i9(this.r)}, ${i9(this.g)}, ${i9(this.b)}${i===1?")":`, ${i})`}`}function fW(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function i9(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function s9(i){return i=i9(i),(i<16?"0":"")+i.toString(16)}function WOt(i,a,f,g){return g<=0?i=a=f=NaN:f<=0||f>=1?i=a=NaN:a<=0&&(i=NaN),new jv(i,a,f,g)}function YOt(i){if(i instanceof jv)return new jv(i.h,i.s,i.l,i.opacity);if(i instanceof n9||(i=r9(i)),!i)return new jv;if(i instanceof jv)return i;i=i.rgb();var a=i.r/255,f=i.g/255,g=i.b/255,w=Math.min(a,f,g),v=Math.max(a,f,g),b=NaN,E=v-w,S=(v+w)/2;return E?(a===v?b=(f-g)/E+(f<g)*6:f===v?b=(g-a)/E+2:b=(a-f)/E+4,E/=S<.5?v+w:2-v-w,b*=60):E=S>0&&S<1?0:b,new jv(b,E,S,i.opacity)}function BSe(i,a,f,g){return arguments.length===1?YOt(i):new jv(i,a,f,g??1)}function jv(i,a,f,g){this.h=+i,this.s=+a,this.l=+f,this.opacity=+g}ZP(jv,BSe,uW(n9,{brighter(i){return i=i==null?lW:Math.pow(lW,i),new jv(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?tF:Math.pow(tF,i),new jv(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,a=isNaN(i)||isNaN(this.s)?0:this.s,f=this.l,g=f+(f<.5?f:1-f)*a,w=2*f-g;return new eg(C0t(i>=240?i-240:i+120,w,g),C0t(i,w,g),C0t(i<120?i+240:i-120,w,g),this.opacity)},clamp(){return new jv(XOt(this.h),dW(this.s),dW(this.l),fW(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=fW(this.opacity);return`${i===1?"hsl(":"hsla("}${XOt(this.h)}, ${dW(this.s)*100}%, ${dW(this.l)*100}%${i===1?")":`, ${i})`}`}}));function XOt(i){return i=(i||0)%360,i<0?i+360:i}function dW(i){return Math.max(0,Math.min(1,i||0))}function C0t(i,a,f){return(i<60?a+(f-a)*i/60:i<180?f:i<240?a+(f-a)*(240-i)/60:a)*255}const RSe=Math.PI/180,jSe=180/Math.PI,gW=18,QOt=.96422,JOt=1,ZOt=.82521,tNt=4/29,$L=6/29,eNt=3*$L*$L,$Se=$L*$L*$L;function nNt(i){if(i instanceof J3)return new J3(i.l,i.a,i.b,i.opacity);if(i instanceof xx)return rNt(i);i instanceof eg||(i=UOt(i));var a=L0t(i.r),f=L0t(i.g),g=L0t(i.b),w=S0t((.2225045*a+.7168786*f+.0606169*g)/JOt),v,b;return a===f&&f===g?v=b=w:(v=S0t((.4360747*a+.3850649*f+.1430804*g)/QOt),b=S0t((.0139322*a+.0971045*f+.7141733*g)/ZOt)),new J3(116*w-16,500*(v-w),200*(w-b),i.opacity)}function zSe(i,a,f,g){return arguments.length===1?nNt(i):new J3(i,a,f,g??1)}function J3(i,a,f,g){this.l=+i,this.a=+a,this.b=+f,this.opacity=+g}ZP(J3,zSe,uW(n9,{brighter(i){return new J3(this.l+gW*(i??1),this.a,this.b,this.opacity)},darker(i){return new J3(this.l-gW*(i??1),this.a,this.b,this.opacity)},rgb(){var i=(this.l+16)/116,a=isNaN(this.a)?i:i+this.a/500,f=isNaN(this.b)?i:i-this.b/200;return a=QOt*_0t(a),i=JOt*_0t(i),f=ZOt*_0t(f),new eg(A0t(3.1338561*a-1.6168667*i-.4906146*f),A0t(-.9787684*a+1.9161415*i+.033454*f),A0t(.0719453*a-.2289914*i+1.4052427*f),this.opacity)}}));function S0t(i){return i>$Se?Math.pow(i,1/3):i/eNt+tNt}function _0t(i){return i>$L?i*i*i:eNt*(i-tNt)}function A0t(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function L0t(i){return(i/=255)<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function qSe(i){if(i instanceof xx)return new xx(i.h,i.c,i.l,i.opacity);if(i instanceof J3||(i=nNt(i)),i.a===0&&i.b===0)return new xx(NaN,0<i.l&&i.l<100?0:NaN,i.l,i.opacity);var a=Math.atan2(i.b,i.a)*jSe;return new xx(a<0?a+360:a,Math.sqrt(i.a*i.a+i.b*i.b),i.l,i.opacity)}function D0t(i,a,f,g){return arguments.length===1?qSe(i):new xx(i,a,f,g??1)}function xx(i,a,f,g){this.h=+i,this.c=+a,this.l=+f,this.opacity=+g}function rNt(i){if(isNaN(i.h))return new J3(i.l,0,0,i.opacity);var a=i.h*RSe;return new J3(i.l,Math.cos(a)*i.c,Math.sin(a)*i.c,i.opacity)}ZP(xx,D0t,uW(n9,{brighter(i){return new xx(this.h,this.c,this.l+gW*(i??1),this.opacity)},darker(i){return new xx(this.h,this.c,this.l-gW*(i??1),this.opacity)},rgb(){return rNt(this).rgb()}}));const pW=i=>()=>i;function iNt(i,a){return function(f){return i+f*a}}function HSe(i,a,f){return i=Math.pow(i,f),a=Math.pow(a,f)-i,f=1/f,function(g){return Math.pow(i+g*a,f)}}function VSe(i,a){var f=a-i;return f?iNt(i,f>180||f<-180?f-360*Math.round(f/360):f):pW(isNaN(i)?a:i)}function USe(i){return(i=+i)==1?nF:function(a,f){return f-a?HSe(a,f,i):pW(isNaN(a)?f:a)}}function nF(i,a){var f=a-i;return f?iNt(i,f):pW(isNaN(i)?a:i)}const bW=function i(a){var f=USe(a);function g(w,v){var b=f((w=T0t(w)).r,(v=T0t(v)).r),E=f(w.g,v.g),S=f(w.b,v.b),_=nF(w.opacity,v.opacity);return function(M){return w.r=b(M),w.g=E(M),w.b=S(M),w.opacity=_(M),w+""}}return g.gamma=i,g}(1);function GSe(i,a){a||(a=[]);var f=i?Math.min(a.length,i.length):0,g=a.slice(),w;return function(v){for(w=0;w<f;++w)g[w]=i[w]*(1-v)+a[w]*v;return g}}function KSe(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function WSe(i,a){var f=a?a.length:0,g=i?Math.min(f,i.length):0,w=new Array(g),v=new Array(f),b;for(b=0;b<g;++b)w[b]=O0t(i[b],a[b]);for(;b<f;++b)v[b]=a[b];return function(E){for(b=0;b<g;++b)v[b]=w[b](E);return v}}function YSe(i,a){var f=new Date;return i=+i,a=+a,function(g){return f.setTime(i*(1-g)+a*g),f}}function $v(i,a){return i=+i,a=+a,function(f){return i*(1-f)+a*f}}function XSe(i,a){var f={},g={},w;(i===null||typeof i!="object")&&(i={}),(a===null||typeof a!="object")&&(a={});for(w in a)w in i?f[w]=O0t(i[w],a[w]):g[w]=a[w];return function(v){for(w in f)g[w]=f[w](v);return g}}var M0t=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,I0t=new RegExp(M0t.source,"g");function QSe(i){return function(){return i}}function JSe(i){return function(a){return i(a)+""}}function sNt(i,a){var f=M0t.lastIndex=I0t.lastIndex=0,g,w,v,b=-1,E=[],S=[];for(i=i+"",a=a+"";(g=M0t.exec(i))&&(w=I0t.exec(a));)(v=w.index)>f&&(v=a.slice(f,v),E[b]?E[b]+=v:E[++b]=v),(g=g[0])===(w=w[0])?E[b]?E[b]+=w:E[++b]=w:(E[++b]=null,S.push({i:b,x:$v(g,w)})),f=I0t.lastIndex;return f<a.length&&(v=a.slice(f),E[b]?E[b]+=v:E[++b]=v),E.length<2?S[0]?JSe(S[0].x):QSe(a):(a=S.length,function(_){for(var M=0,F;M<a;++M)E[(F=S[M]).i]=F.x(_);return E.join("")})}function O0t(i,a){var f=typeof a,g;return a==null||f==="boolean"?pW(a):(f==="number"?$v:f==="string"?(g=r9(a))?(a=g,bW):sNt:a instanceof r9?bW:a instanceof Date?YSe:KSe(a)?GSe:Array.isArray(a)?WSe:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?XSe:$v)(i,a)}function ZSe(i,a){return i=+i,a=+a,function(f){return Math.round(i*(1-f)+a*f)}}var aNt=180/Math.PI,N0t={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function oNt(i,a,f,g,w,v){var b,E,S;return(b=Math.sqrt(i*i+a*a))&&(i/=b,a/=b),(S=i*f+a*g)&&(f-=i*S,g-=a*S),(E=Math.sqrt(f*f+g*g))&&(f/=E,g/=E,S/=E),i*g<a*f&&(i=-i,a=-a,S=-S,b=-b),{translateX:w,translateY:v,rotate:Math.atan2(a,i)*aNt,skewX:Math.atan(S)*aNt,scaleX:b,scaleY:E}}var wW;function t_e(i){const a=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(i+"");return a.isIdentity?N0t:oNt(a.a,a.b,a.c,a.d,a.e,a.f)}function e_e(i){return i==null||(wW||(wW=document.createElementNS("http://www.w3.org/2000/svg","g")),wW.setAttribute("transform",i),!(i=wW.transform.baseVal.consolidate()))?N0t:(i=i.matrix,oNt(i.a,i.b,i.c,i.d,i.e,i.f))}function cNt(i,a,f,g){function w(_){return _.length?_.pop()+" ":""}function v(_,M,F,R,B,z){if(_!==F||M!==R){var Y=B.push("translate(",null,a,null,f);z.push({i:Y-4,x:$v(_,F)},{i:Y-2,x:$v(M,R)})}else(F||R)&&B.push("translate("+F+a+R+f)}function b(_,M,F,R){_!==M?(_-M>180?M+=360:M-_>180&&(_+=360),R.push({i:F.push(w(F)+"rotate(",null,g)-2,x:$v(_,M)})):M&&F.push(w(F)+"rotate("+M+g)}function E(_,M,F,R){_!==M?R.push({i:F.push(w(F)+"skewX(",null,g)-2,x:$v(_,M)}):M&&F.push(w(F)+"skewX("+M+g)}function S(_,M,F,R,B,z){if(_!==F||M!==R){var Y=B.push(w(B)+"scale(",null,",",null,")");z.push({i:Y-4,x:$v(_,F)},{i:Y-2,x:$v(M,R)})}else(F!==1||R!==1)&&B.push(w(B)+"scale("+F+","+R+")")}return function(_,M){var F=[],R=[];return _=i(_),M=i(M),v(_.translateX,_.translateY,M.translateX,M.translateY,F,R),b(_.rotate,M.rotate,F,R),E(_.skewX,M.skewX,F,R),S(_.scaleX,_.scaleY,M.scaleX,M.scaleY,F,R),_=M=null,function(B){for(var z=-1,Y=R.length,nt;++z<Y;)F[(nt=R[z]).i]=nt.x(B);return F.join("")}}}var n_e=cNt(t_e,"px, ","px)","deg)"),r_e=cNt(e_e,", ",")",")");function i_e(i){return function(a,f){var g=i((a=D0t(a)).h,(f=D0t(f)).h),w=nF(a.c,f.c),v=nF(a.l,f.l),b=nF(a.opacity,f.opacity);return function(E){return a.h=g(E),a.c=w(E),a.l=v(E),a.opacity=b(E),a+""}}}const s_e=i_e(VSe);var zL=0,rF=0,iF=0,uNt=1e3,mW,sF,vW=0,a9=0,yW=0,aF=typeof performance=="object"&&performance.now?performance:Date,lNt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(i){setTimeout(i,17)};function P0t(){return a9||(lNt(a_e),a9=aF.now()+yW)}function a_e(){a9=0}function xW(){this._call=this._time=this._next=null}xW.prototype=hNt.prototype={constructor:xW,restart:function(i,a,f){if(typeof i!="function")throw new TypeError("callback is not a function");f=(f==null?P0t():+f)+(a==null?0:+a),!this._next&&sF!==this&&(sF?sF._next=this:mW=this,sF=this),this._call=i,this._time=f,F0t()},stop:function(){this._call&&(this._call=null,this._time=1/0,F0t())}};function hNt(i,a,f){var g=new xW;return g.restart(i,a,f),g}function o_e(){P0t(),++zL;for(var i=mW,a;i;)(a=a9-i._time)>=0&&i._call.call(void 0,a),i=i._next;--zL}function fNt(){a9=(vW=aF.now())+yW,zL=rF=0;try{o_e()}finally{zL=0,u_e(),a9=0}}function c_e(){var i=aF.now(),a=i-vW;a>uNt&&(yW-=a,vW=i)}function u_e(){for(var i,a=mW,f,g=1/0;a;)a._call?(g>a._time&&(g=a._time),i=a,a=a._next):(f=a._next,a._next=null,a=i?i._next=f:mW=f);sF=i,F0t(g)}function F0t(i){if(!zL){rF&&(rF=clearTimeout(rF));var a=i-a9;a>24?(i<1/0&&(rF=setTimeout(fNt,i-aF.now()-yW)),iF&&(iF=clearInterval(iF))):(iF||(vW=aF.now(),iF=setInterval(c_e,uNt)),zL=1,lNt(fNt))}}function dNt(i,a,f){var g=new xW;return a=a==null?0:+a,g.restart(w=>{g.stop(),i(w+a)},a,f),g}var l_e=COt("start","end","cancel","interrupt"),h_e=[],gNt=0,pNt=1,B0t=2,kW=3,bNt=4,R0t=5,EW=6;function TW(i,a,f,g,w,v){var b=i.__transition;if(!b)i.__transition={};else if(f in b)return;f_e(i,f,{name:a,index:g,group:w,on:l_e,tween:h_e,time:v.time,delay:v.delay,duration:v.duration,ease:v.ease,timer:null,state:gNt})}function j0t(i,a){var f=zv(i,a);if(f.state>gNt)throw new Error("too late; already scheduled");return f}function Z3(i,a){var f=zv(i,a);if(f.state>kW)throw new Error("too late; already running");return f}function zv(i,a){var f=i.__transition;if(!f||!(f=f[a]))throw new Error("transition not found");return f}function f_e(i,a,f){var g=i.__transition,w;g[a]=f,f.timer=hNt(v,0,f.time);function v(_){f.state=pNt,f.timer.restart(b,f.delay,f.time),f.delay<=_&&b(_-f.delay)}function b(_){var M,F,R,B;if(f.state!==pNt)return S();for(M in g)if(B=g[M],B.name===f.name){if(B.state===kW)return dNt(b);B.state===bNt?(B.state=EW,B.timer.stop(),B.on.call("interrupt",i,i.__data__,B.index,B.group),delete g[M]):+M<a&&(B.state=EW,B.timer.stop(),B.on.call("cancel",i,i.__data__,B.index,B.group),delete g[M])}if(dNt(function(){f.state===kW&&(f.state=bNt,f.timer.restart(E,f.delay,f.time),E(_))}),f.state=B0t,f.on.call("start",i,i.__data__,f.index,f.group),f.state===B0t){for(f.state=kW,w=new Array(R=f.tween.length),M=0,F=-1;M<R;++M)(B=f.tween[M].value.call(i,i.__data__,f.index,f.group))&&(w[++F]=B);w.length=F+1}}function E(_){for(var M=_<f.duration?f.ease.call(null,_/f.duration):(f.timer.restart(S),f.state=R0t,1),F=-1,R=w.length;++F<R;)w[F].call(i,M);f.state===R0t&&(f.on.call("end",i,i.__data__,f.index,f.group),S())}function S(){f.state=EW,f.timer.stop(),delete g[a];for(var _ in g)return;delete i.__transition}}function d_e(i,a){var f=i.__transition,g,w,v=!0,b;if(f){a=a==null?null:a+"";for(b in f){if((g=f[b]).name!==a){v=!1;continue}w=g.state>B0t&&g.state<R0t,g.state=EW,g.timer.stop(),g.on.call(w?"interrupt":"cancel",i,i.__data__,g.index,g.group),delete f[b]}v&&delete i.__transition}}function g_e(i){return this.each(function(){d_e(this,i)})}function p_e(i,a){var f,g;return function(){var w=Z3(this,i),v=w.tween;if(v!==f){g=f=v;for(var b=0,E=g.length;b<E;++b)if(g[b].name===a){g=g.slice(),g.splice(b,1);break}}w.tween=g}}function b_e(i,a,f){var g,w;if(typeof f!="function")throw new Error;return function(){var v=Z3(this,i),b=v.tween;if(b!==g){w=(g=b).slice();for(var E={name:a,value:f},S=0,_=w.length;S<_;++S)if(w[S].name===a){w[S]=E;break}S===_&&w.push(E)}v.tween=w}}function w_e(i,a){var f=this._id;if(i+="",arguments.length<2){for(var g=zv(this.node(),f).tween,w=0,v=g.length,b;w<v;++w)if((b=g[w]).name===i)return b.value;return null}return this.each((a==null?p_e:b_e)(f,i,a))}function $0t(i,a,f){var g=i._id;return i.each(function(){var w=Z3(this,g);(w.value||(w.value={}))[a]=f.apply(this,arguments)}),function(w){return zv(w,g).value[a]}}function wNt(i,a){var f;return(typeof a=="number"?$v:a instanceof r9?bW:(f=r9(a))?(a=f,bW):sNt)(i,a)}function m_e(i){return function(){this.removeAttribute(i)}}function v_e(i){return function(){this.removeAttributeNS(i.space,i.local)}}function y_e(i,a,f){var g,w=f+"",v;return function(){var b=this.getAttribute(i);return b===w?null:b===g?v:v=a(g=b,f)}}function x_e(i,a,f){var g,w=f+"",v;return function(){var b=this.getAttributeNS(i.space,i.local);return b===w?null:b===g?v:v=a(g=b,f)}}function k_e(i,a,f){var g,w,v;return function(){var b,E=f(this),S;return E==null?void this.removeAttribute(i):(b=this.getAttribute(i),S=E+"",b===S?null:b===g&&S===w?v:(w=S,v=a(g=b,E)))}}function E_e(i,a,f){var g,w,v;return function(){var b,E=f(this),S;return E==null?void this.removeAttributeNS(i.space,i.local):(b=this.getAttributeNS(i.space,i.local),S=E+"",b===S?null:b===g&&S===w?v:(w=S,v=a(g=b,E)))}}function T_e(i,a){var f=oW(i),g=f==="transform"?r_e:wNt;return this.attrTween(i,typeof a=="function"?(f.local?E_e:k_e)(f,g,$0t(this,"attr."+i,a)):a==null?(f.local?v_e:m_e)(f):(f.local?x_e:y_e)(f,g,a))}function C_e(i,a){return function(f){this.setAttribute(i,a.call(this,f))}}function S_e(i,a){return function(f){this.setAttributeNS(i.space,i.local,a.call(this,f))}}function __e(i,a){var f,g;function w(){var v=a.apply(this,arguments);return v!==g&&(f=(g=v)&&S_e(i,v)),f}return w._value=a,w}function A_e(i,a){var f,g;function w(){var v=a.apply(this,arguments);return v!==g&&(f=(g=v)&&C_e(i,v)),f}return w._value=a,w}function L_e(i,a){var f="attr."+i;if(arguments.length<2)return(f=this.tween(f))&&f._value;if(a==null)return this.tween(f,null);if(typeof a!="function")throw new Error;var g=oW(i);return this.tween(f,(g.local?__e:A_e)(g,a))}function D_e(i,a){return function(){j0t(this,i).delay=+a.apply(this,arguments)}}function M_e(i,a){return a=+a,function(){j0t(this,i).delay=a}}function I_e(i){var a=this._id;return arguments.length?this.each((typeof i=="function"?D_e:M_e)(a,i)):zv(this.node(),a).delay}function O_e(i,a){return function(){Z3(this,i).duration=+a.apply(this,arguments)}}function N_e(i,a){return a=+a,function(){Z3(this,i).duration=a}}function P_e(i){var a=this._id;return arguments.length?this.each((typeof i=="function"?O_e:N_e)(a,i)):zv(this.node(),a).duration}function F_e(i,a){if(typeof a!="function")throw new Error;return function(){Z3(this,i).ease=a}}function B_e(i){var a=this._id;return arguments.length?this.each(F_e(a,i)):zv(this.node(),a).ease}function R_e(i,a){return function(){var f=a.apply(this,arguments);if(typeof f!="function")throw new Error;Z3(this,i).ease=f}}function j_e(i){if(typeof i!="function")throw new Error;return this.each(R_e(this._id,i))}function $_e(i){typeof i!="function"&&(i=MOt(i));for(var a=this._groups,f=a.length,g=new Array(f),w=0;w<f;++w)for(var v=a[w],b=v.length,E=g[w]=[],S,_=0;_<b;++_)(S=v[_])&&i.call(S,S.__data__,_,v)&&E.push(S);return new kx(g,this._parents,this._name,this._id)}function z_e(i){if(i._id!==this._id)throw new Error;for(var a=this._groups,f=i._groups,g=a.length,w=f.length,v=Math.min(g,w),b=new Array(g),E=0;E<v;++E)for(var S=a[E],_=f[E],M=S.length,F=b[E]=new Array(M),R,B=0;B<M;++B)(R=S[B]||_[B])&&(F[B]=R);for(;E<g;++E)b[E]=a[E];return new kx(b,this._parents,this._name,this._id)}function q_e(i){return(i+"").trim().split(/^|\s+/).every(function(a){var f=a.indexOf(".");return f>=0&&(a=a.slice(0,f)),!a||a==="start"})}function H_e(i,a,f){var g,w,v=q_e(a)?j0t:Z3;return function(){var b=v(this,i),E=b.on;E!==g&&(w=(g=E).copy()).on(a,f),b.on=w}}function V_e(i,a){var f=this._id;return arguments.length<2?zv(this.node(),f).on.on(i):this.each(H_e(f,i,a))}function U_e(i){return function(){var a=this.parentNode;for(var f in this.__transition)if(+f!==i)return;a&&a.removeChild(this)}}function G_e(){return this.on("end.remove",U_e(this._id))}function K_e(i){var a=this._name,f=this._id;typeof i!="function"&&(i=x0t(i));for(var g=this._groups,w=g.length,v=new Array(w),b=0;b<w;++b)for(var E=g[b],S=E.length,_=v[b]=new Array(S),M,F,R=0;R<S;++R)(M=E[R])&&(F=i.call(M,M.__data__,R,E))&&("__data__"in M&&(F.__data__=M.__data__),_[R]=F,TW(_[R],a,f,R,_,zv(M,f)));return new kx(v,this._parents,a,f)}function W_e(i){var a=this._name,f=this._id;typeof i!="function"&&(i=DOt(i));for(var g=this._groups,w=g.length,v=[],b=[],E=0;E<w;++E)for(var S=g[E],_=S.length,M,F=0;F<_;++F)if(M=S[F]){for(var R=i.call(M,M.__data__,F,S),B,z=zv(M,f),Y=0,nt=R.length;Y<nt;++Y)(B=R[Y])&&TW(B,a,f,Y,R,z);v.push(R),b.push(M)}return new kx(v,b,a,f)}var Y_e=JP.prototype.constructor;function X_e(){return new Y_e(this._groups,this._parents)}function Q_e(i,a){var f,g,w;return function(){var v=RL(this,i),b=(this.style.removeProperty(i),RL(this,i));return v===b?null:v===f&&b===g?w:w=a(f=v,g=b)}}function mNt(i){return function(){this.style.removeProperty(i)}}function J_e(i,a,f){var g,w=f+"",v;return function(){var b=RL(this,i);return b===w?null:b===g?v:v=a(g=b,f)}}function Z_e(i,a,f){var g,w,v;return function(){var b=RL(this,i),E=f(this),S=E+"";return E==null&&(S=E=(this.style.removeProperty(i),RL(this,i))),b===S?null:b===g&&S===w?v:(w=S,v=a(g=b,E))}}function tAe(i,a){var f,g,w,v="style."+a,b="end."+v,E;return function(){var S=Z3(this,i),_=S.on,M=S.value[v]==null?E||(E=mNt(a)):void 0;(_!==f||w!==M)&&(g=(f=_).copy()).on(b,w=M),S.on=g}}function eAe(i,a,f){var g=(i+="")=="transform"?n_e:wNt;return a==null?this.styleTween(i,Q_e(i,g)).on("end.style."+i,mNt(i)):typeof a=="function"?this.styleTween(i,Z_e(i,g,$0t(this,"style."+i,a))).each(tAe(this._id,i)):this.styleTween(i,J_e(i,g,a),f).on("end.style."+i,null)}function nAe(i,a,f){return function(g){this.style.setProperty(i,a.call(this,g),f)}}function rAe(i,a,f){var g,w;function v(){var b=a.apply(this,arguments);return b!==w&&(g=(w=b)&&nAe(i,b,f)),g}return v._value=a,v}function iAe(i,a,f){var g="style."+(i+="");if(arguments.length<2)return(g=this.tween(g))&&g._value;if(a==null)return this.tween(g,null);if(typeof a!="function")throw new Error;return this.tween(g,rAe(i,a,f??""))}function sAe(i){return function(){this.textContent=i}}function aAe(i){return function(){var a=i(this);this.textContent=a??""}}function oAe(i){return this.tween("text",typeof i=="function"?aAe($0t(this,"text",i)):sAe(i==null?"":i+""))}function cAe(i){return function(a){this.textContent=i.call(this,a)}}function uAe(i){var a,f;function g(){var w=i.apply(this,arguments);return w!==f&&(a=(f=w)&&cAe(w)),a}return g._value=i,g}function lAe(i){var a="text";if(arguments.length<1)return(a=this.tween(a))&&a._value;if(i==null)return this.tween(a,null);if(typeof i!="function")throw new Error;return this.tween(a,uAe(i))}function hAe(){for(var i=this._name,a=this._id,f=vNt(),g=this._groups,w=g.length,v=0;v<w;++v)for(var b=g[v],E=b.length,S,_=0;_<E;++_)if(S=b[_]){var M=zv(S,a);TW(S,i,f,_,b,{time:M.time+M.delay+M.duration,delay:0,duration:M.duration,ease:M.ease})}return new kx(g,this._parents,i,f)}function fAe(){var i,a,f=this,g=f._id,w=f.size();return new Promise(function(v,b){var E={value:b},S={value:function(){--w===0&&v()}};f.each(function(){var _=Z3(this,g),M=_.on;M!==i&&(a=(i=M).copy(),a._.cancel.push(E),a._.interrupt.push(E),a._.end.push(S)),_.on=a}),w===0&&v()})}var dAe=0;function kx(i,a,f,g){this._groups=i,this._parents=a,this._name=f,this._id=g}function vNt(){return++dAe}var Ex=JP.prototype;kx.prototype={constructor:kx,select:K_e,selectAll:W_e,selectChild:Ex.selectChild,selectChildren:Ex.selectChildren,filter:$_e,merge:z_e,selection:X_e,transition:hAe,call:Ex.call,nodes:Ex.nodes,node:Ex.node,size:Ex.size,empty:Ex.empty,each:Ex.each,on:V_e,attr:T_e,attrTween:L_e,style:eAe,styleTween:iAe,text:oAe,textTween:lAe,remove:G_e,tween:w_e,delay:I_e,duration:P_e,ease:B_e,easeVarying:j_e,end:fAe,[Symbol.iterator]:Ex[Symbol.iterator]};function gAe(i){return((i*=2)<=1?i*i*i:(i-=2)*i*i+2)/2}var pAe={time:null,delay:0,duration:250,ease:gAe};function bAe(i,a){for(var f;!(f=i.__transition)||!(f=f[a]);)if(!(i=i.parentNode))throw new Error(`transition ${a} not found`);return f}function wAe(i){var a,f;i instanceof kx?(a=i._id,i=i._name):(a=vNt(),(f=pAe).time=P0t(),i=i==null?null:i+"");for(var g=this._groups,w=g.length,v=0;v<w;++v)for(var b=g[v],E=b.length,S,_=0;_<E;++_)(S=b[_])&&TW(S,i,a,_,b,f||bAe(S,a));return new kx(g,this._parents,i,a)}JP.prototype.interrupt=g_e,JP.prototype.transition=wAe;const z0t=Math.PI,q0t=2*z0t,o9=1e-6,mAe=q0t-o9;function yNt(i){this._+=i[0];for(let a=1,f=i.length;a<f;++a)this._+=arguments[a]+i[a]}function vAe(i){let a=Math.floor(i);if(!(a>=0))throw new Error(`invalid digits: ${i}`);if(a>15)return yNt;const f=10**a;return function(g){this._+=g[0];for(let w=1,v=g.length;w<v;++w)this._+=Math.round(arguments[w]*f)/f+g[w]}}let yAe=class{constructor(a){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=a==null?yNt:vAe(a)}moveTo(a,f){this._append`M${this._x0=this._x1=+a},${this._y0=this._y1=+f}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(a,f){this._append`L${this._x1=+a},${this._y1=+f}`}quadraticCurveTo(a,f,g,w){this._append`Q${+a},${+f},${this._x1=+g},${this._y1=+w}`}bezierCurveTo(a,f,g,w,v,b){this._append`C${+a},${+f},${+g},${+w},${this._x1=+v},${this._y1=+b}`}arcTo(a,f,g,w,v){if(a=+a,f=+f,g=+g,w=+w,v=+v,v<0)throw new Error(`negative radius: ${v}`);let b=this._x1,E=this._y1,S=g-a,_=w-f,M=b-a,F=E-f,R=M*M+F*F;if(this._x1===null)this._append`M${this._x1=a},${this._y1=f}`;else if(R>o9)if(!(Math.abs(F*S-_*M)>o9)||!v)this._append`L${this._x1=a},${this._y1=f}`;else{let B=g-b,z=w-E,Y=S*S+_*_,nt=B*B+z*z,ot=Math.sqrt(Y),ft=Math.sqrt(R),wt=v*Math.tan((z0t-Math.acos((Y+R-nt)/(2*ot*ft)))/2),mt=wt/ft,ct=wt/ot;Math.abs(mt-1)>o9&&this._append`L${a+mt*M},${f+mt*F}`,this._append`A${v},${v},0,0,${+(F*B>M*z)},${this._x1=a+ct*S},${this._y1=f+ct*_}`}}arc(a,f,g,w,v,b){if(a=+a,f=+f,g=+g,b=!!b,g<0)throw new Error(`negative radius: ${g}`);let E=g*Math.cos(w),S=g*Math.sin(w),_=a+E,M=f+S,F=1^b,R=b?w-v:v-w;this._x1===null?this._append`M${_},${M}`:(Math.abs(this._x1-_)>o9||Math.abs(this._y1-M)>o9)&&this._append`L${_},${M}`,g&&(R<0&&(R=R%q0t+q0t),R>mAe?this._append`A${g},${g},0,1,${F},${a-E},${f-S}A${g},${g},0,1,${F},${this._x1=_},${this._y1=M}`:R>o9&&this._append`A${g},${g},0,${+(R>=z0t)},${F},${this._x1=a+g*Math.cos(v)},${this._y1=f+g*Math.sin(v)}`)}rect(a,f,g,w){this._append`M${this._x0=this._x1=+a},${this._y0=this._y1=+f}h${g=+g}v${+w}h${-g}Z`}toString(){return this._}};function xAe(i){if(!i.ok)throw new Error(i.status+" "+i.statusText);return i.text()}function kAe(i,a){return fetch(i,a).then(xAe)}function EAe(i){return(a,f)=>kAe(a,f).then(g=>new DOMParser().parseFromString(g,i))}var TAe=EAe("image/svg+xml");function CAe(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)}function CW(i,a){if((f=(i=a?i.toExponential(a-1):i.toExponential()).indexOf("e"))<0)return null;var f,g=i.slice(0,f);return[g.length>1?g[0]+g.slice(2):g,+i.slice(f+1)]}function qL(i){return i=CW(Math.abs(i)),i?i[1]:NaN}function SAe(i,a){return function(f,g){for(var w=f.length,v=[],b=0,E=i[0],S=0;w>0&&E>0&&(S+E+1>g&&(E=Math.max(1,g-S)),v.push(f.substring(w-=E,w+E)),!((S+=E+1)>g));)E=i[b=(b+1)%i.length];return v.reverse().join(a)}}function _Ae(i){return function(a){return a.replace(/[0-9]/g,function(f){return i[+f]})}}var AAe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function SW(i){if(!(a=AAe.exec(i)))throw new Error("invalid format: "+i);var a;return new H0t({fill:a[1],align:a[2],sign:a[3],symbol:a[4],zero:a[5],width:a[6],comma:a[7],precision:a[8]&&a[8].slice(1),trim:a[9],type:a[10]})}SW.prototype=H0t.prototype;function H0t(i){this.fill=i.fill===void 0?" ":i.fill+"",this.align=i.align===void 0?">":i.align+"",this.sign=i.sign===void 0?"-":i.sign+"",this.symbol=i.symbol===void 0?"":i.symbol+"",this.zero=!!i.zero,this.width=i.width===void 0?void 0:+i.width,this.comma=!!i.comma,this.precision=i.precision===void 0?void 0:+i.precision,this.trim=!!i.trim,this.type=i.type===void 0?"":i.type+""}H0t.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function LAe(i){t:for(var a=i.length,f=1,g=-1,w;f<a;++f)switch(i[f]){case".":g=w=f;break;case"0":g===0&&(g=f),w=f;break;default:if(!+i[f])break t;g>0&&(g=0);break}return g>0?i.slice(0,g)+i.slice(w+1):i}var xNt;function DAe(i,a){var f=CW(i,a);if(!f)return i+"";var g=f[0],w=f[1],v=w-(xNt=Math.max(-8,Math.min(8,Math.floor(w/3)))*3)+1,b=g.length;return v===b?g:v>b?g+new Array(v-b+1).join("0"):v>0?g.slice(0,v)+"."+g.slice(v):"0."+new Array(1-v).join("0")+CW(i,Math.max(0,a+v-1))[0]}function kNt(i,a){var f=CW(i,a);if(!f)return i+"";var g=f[0],w=f[1];return w<0?"0."+new Array(-w).join("0")+g:g.length>w+1?g.slice(0,w+1)+"."+g.slice(w+1):g+new Array(w-g.length+2).join("0")}const ENt={"%":(i,a)=>(i*100).toFixed(a),b:i=>Math.round(i).toString(2),c:i=>i+"",d:CAe,e:(i,a)=>i.toExponential(a),f:(i,a)=>i.toFixed(a),g:(i,a)=>i.toPrecision(a),o:i=>Math.round(i).toString(8),p:(i,a)=>kNt(i*100,a),r:kNt,s:DAe,X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function TNt(i){return i}var CNt=Array.prototype.map,SNt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MAe(i){var a=i.grouping===void 0||i.thousands===void 0?TNt:SAe(CNt.call(i.grouping,Number),i.thousands+""),f=i.currency===void 0?"":i.currency[0]+"",g=i.currency===void 0?"":i.currency[1]+"",w=i.decimal===void 0?".":i.decimal+"",v=i.numerals===void 0?TNt:_Ae(CNt.call(i.numerals,String)),b=i.percent===void 0?"%":i.percent+"",E=i.minus===void 0?"−":i.minus+"",S=i.nan===void 0?"NaN":i.nan+"";function _(F){F=SW(F);var R=F.fill,B=F.align,z=F.sign,Y=F.symbol,nt=F.zero,ot=F.width,ft=F.comma,wt=F.precision,mt=F.trim,ct=F.type;ct==="n"?(ft=!0,ct="g"):ENt[ct]||(wt===void 0&&(wt=12),mt=!0,ct="g"),(nt||R==="0"&&B==="=")&&(nt=!0,R="0",B="=");var rt=Y==="$"?f:Y==="#"&&/[boxX]/.test(ct)?"0"+ct.toLowerCase():"",it=Y==="$"?g:/[%p]/.test(ct)?b:"",gt=ENt[ct],Q=/[defgprs%]/.test(ct);wt=wt===void 0?6:/[gprs]/.test(ct)?Math.max(1,Math.min(21,wt)):Math.max(0,Math.min(20,wt));function dt(K){var yt=rt,V=it,Ot,It,jt;if(ct==="c")V=gt(K)+V,K="";else{K=+K;var xt=K<0||1/K<0;if(K=isNaN(K)?S:gt(Math.abs(K),wt),mt&&(K=LAe(K)),xt&&+K==0&&z!=="+"&&(xt=!1),yt=(xt?z==="("?z:E:z==="-"||z==="("?"":z)+yt,V=(ct==="s"?SNt[8+xNt/3]:"")+V+(xt&&z==="("?")":""),Q){for(Ot=-1,It=K.length;++Ot<It;)if(jt=K.charCodeAt(Ot),48>jt||jt>57){V=(jt===46?w+K.slice(Ot+1):K.slice(Ot))+V,K=K.slice(0,Ot);break}}}ft&&!nt&&(K=a(K,1/0));var Ft=yt.length+K.length+V.length,Ct=Ft<ot?new Array(ot-Ft+1).join(R):"";switch(ft&&nt&&(K=a(Ct+K,Ct.length?ot-V.length:1/0),Ct=""),B){case"<":K=yt+K+V+Ct;break;case"=":K=yt+Ct+K+V;break;case"^":K=Ct.slice(0,Ft=Ct.length>>1)+yt+K+V+Ct.slice(Ft);break;default:K=Ct+yt+K+V;break}return v(K)}return dt.toString=function(){return F+""},dt}function M(F,R){var B=_((F=SW(F),F.type="f",F)),z=Math.max(-8,Math.min(8,Math.floor(qL(R)/3)))*3,Y=Math.pow(10,-z),nt=SNt[8+z/3];return function(ot){return B(Y*ot)+nt}}return{format:_,formatPrefix:M}}var _W,_Nt,ANt;IAe({thousands:",",grouping:[3],currency:["$",""]});function IAe(i){return _W=MAe(i),_Nt=_W.format,ANt=_W.formatPrefix,_W}function OAe(i){return Math.max(0,-qL(Math.abs(i)))}function NAe(i,a){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qL(a)/3)))*3-qL(Math.abs(i)))}function PAe(i,a){return i=Math.abs(i),a=Math.abs(a)-i,Math.max(0,qL(a)-qL(i))+1}function AW(i,a){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(a).domain(i);break}return this}const LNt=Symbol("implicit");function oF(){var i=new xOt,a=[],f=[],g=LNt;function w(v){let b=i.get(v);if(b===void 0){if(g!==LNt)return g;i.set(v,b=a.push(v)-1)}return f[b%f.length]}return w.domain=function(v){if(!arguments.length)return a.slice();a=[],i=new xOt;for(const b of v)i.has(b)||i.set(b,a.push(b)-1);return w},w.range=function(v){return arguments.length?(f=Array.from(v),w):f.slice()},w.unknown=function(v){return arguments.length?(g=v,w):g},w.copy=function(){return oF(a,f).unknown(g)},AW.apply(w,arguments),w}function V0t(){var i=oF().unknown(void 0),a=i.domain,f=i.range,g=0,w=1,v,b,E=!1,S=0,_=0,M=.5;delete i.unknown;function F(){var R=a().length,B=w<g,z=B?w:g,Y=B?g:w;v=(Y-z)/Math.max(1,R-S+_*2),E&&(v=Math.floor(v)),z+=(Y-z-v*(R-S))*M,b=v*(1-S),E&&(z=Math.round(z),b=Math.round(b));var nt=R9e(R).map(function(ot){return z+v*ot});return f(B?nt.reverse():nt)}return i.domain=function(R){return arguments.length?(a(R),F()):a()},i.range=function(R){return arguments.length?([g,w]=R,g=+g,w=+w,F()):[g,w]},i.rangeRound=function(R){return[g,w]=R,g=+g,w=+w,E=!0,F()},i.bandwidth=function(){return b},i.step=function(){return v},i.round=function(R){return arguments.length?(E=!!R,F()):E},i.padding=function(R){return arguments.length?(S=Math.min(1,_=+R),F()):S},i.paddingInner=function(R){return arguments.length?(S=Math.min(1,R),F()):S},i.paddingOuter=function(R){return arguments.length?(_=+R,F()):_},i.align=function(R){return arguments.length?(M=Math.max(0,Math.min(1,R)),F()):M},i.copy=function(){return V0t(a(),[g,w]).round(E).paddingInner(S).paddingOuter(_).align(M)},AW.apply(F(),arguments)}function FAe(i){return function(){return i}}function BAe(i){return+i}var DNt=[0,1];function HL(i){return i}function U0t(i,a){return(a-=i=+i)?function(f){return(f-i)/a}:FAe(isNaN(a)?NaN:.5)}function RAe(i,a){var f;return i>a&&(f=i,i=a,a=f),function(g){return Math.max(i,Math.min(a,g))}}function jAe(i,a,f){var g=i[0],w=i[1],v=a[0],b=a[1];return w<g?(g=U0t(w,g),v=f(b,v)):(g=U0t(g,w),v=f(v,b)),function(E){return v(g(E))}}function $Ae(i,a,f){var g=Math.min(i.length,a.length)-1,w=new Array(g),v=new Array(g),b=-1;for(i[g]<i[0]&&(i=i.slice().reverse(),a=a.slice().reverse());++b<g;)w[b]=U0t(i[b],i[b+1]),v[b]=f(a[b],a[b+1]);return function(E){var S=A9e(i,E,1,g)-1;return v[S](w[S](E))}}function MNt(i,a){return a.domain(i.domain()).range(i.range()).interpolate(i.interpolate()).clamp(i.clamp()).unknown(i.unknown())}function zAe(){var i=DNt,a=DNt,f=O0t,g,w,v,b=HL,E,S,_;function M(){var R=Math.min(i.length,a.length);return b!==HL&&(b=RAe(i[0],i[R-1])),E=R>2?$Ae:jAe,S=_=null,F}function F(R){return R==null||isNaN(R=+R)?v:(S||(S=E(i.map(g),a,f)))(g(b(R)))}return F.invert=function(R){return b(w((_||(_=E(a,i.map(g),$v)))(R)))},F.domain=function(R){return arguments.length?(i=Array.from(R,BAe),M()):i.slice()},F.range=function(R){return arguments.length?(a=Array.from(R),M()):a.slice()},F.rangeRound=function(R){return a=Array.from(R),f=ZSe,M()},F.clamp=function(R){return arguments.length?(b=R?!0:HL,M()):b!==HL},F.interpolate=function(R){return arguments.length?(f=R,M()):f},F.unknown=function(R){return arguments.length?(v=R,F):v},function(R,B){return g=R,w=B,M()}}function INt(){return zAe()(HL,HL)}function qAe(i,a,f,g){var w=w0t(i,a,f),v;switch(g=SW(g??",f"),g.type){case"s":{var b=Math.max(Math.abs(i),Math.abs(a));return g.precision==null&&!isNaN(v=NAe(w,b))&&(g.precision=v),ANt(g,b)}case"":case"e":case"g":case"p":case"r":{g.precision==null&&!isNaN(v=PAe(w,Math.max(Math.abs(i),Math.abs(a))))&&(g.precision=v-(g.type==="e"));break}case"f":case"%":{g.precision==null&&!isNaN(v=OAe(w))&&(g.precision=v-(g.type==="%")*2);break}}return _Nt(g)}function HAe(i){var a=i.domain;return i.ticks=function(f){var g=a();return P9e(g[0],g[g.length-1],f??10)},i.tickFormat=function(f,g){var w=a();return qAe(w[0],w[w.length-1],f??10,g)},i.nice=function(f){f==null&&(f=10);var g=a(),w=0,v=g.length-1,b=g[w],E=g[v],S,_,M=10;for(E<b&&(_=b,b=E,E=_,_=w,w=v,v=_);M-- >0;){if(_=b0t(b,E,f),_===S)return g[w]=b,g[v]=E,a(g);if(_>0)b=Math.floor(b/_)*_,E=Math.ceil(E/_)*_;else if(_<0)b=Math.ceil(b*_)/_,E=Math.floor(E*_)/_;else break;S=_}return i},i}function VL(){var i=INt();return i.copy=function(){return MNt(i,VL())},AW.apply(i,arguments),HAe(i)}function VAe(i,a){i=i.slice();var f=0,g=i.length-1,w=i[f],v=i[g],b;return v<w&&(b=f,f=g,g=b,b=w,w=v,v=b),i[f]=a.floor(w),i[g]=a.ceil(v),i}const G0t=new Date,K0t=new Date;function R1(i,a,f,g){function w(v){return i(v=arguments.length===0?new Date:new Date(+v)),v}return w.floor=v=>(i(v=new Date(+v)),v),w.ceil=v=>(i(v=new Date(v-1)),a(v,1),i(v),v),w.round=v=>{const b=w(v),E=w.ceil(v);return v-b<E-v?b:E},w.offset=(v,b)=>(a(v=new Date(+v),b==null?1:Math.floor(b)),v),w.range=(v,b,E)=>{const S=[];if(v=w.ceil(v),E=E==null?1:Math.floor(E),!(v<b)||!(E>0))return S;let _;do S.push(_=new Date(+v)),a(v,E),i(v);while(_<v&&v<b);return S},w.filter=v=>R1(b=>{if(b>=b)for(;i(b),!v(b);)b.setTime(b-1)},(b,E)=>{if(b>=b)if(E<0)for(;++E<=0;)for(;a(b,-1),!v(b););else for(;--E>=0;)for(;a(b,1),!v(b););}),f&&(w.count=(v,b)=>(G0t.setTime(+v),K0t.setTime(+b),i(G0t),i(K0t),Math.floor(f(G0t,K0t))),w.every=v=>(v=Math.floor(v),!isFinite(v)||!(v>0)?null:v>1?w.filter(g?b=>g(b)%v===0:b=>w.count(0,b)%v===0):w)),w}const UL=R1(()=>{},(i,a)=>{i.setTime(+i+a)},(i,a)=>a-i);UL.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?R1(a=>{a.setTime(Math.floor(a/i)*i)},(a,f)=>{a.setTime(+a+f*i)},(a,f)=>(f-a)/i):UL),UL.range;const Tx=1e3,Kw=Tx*60,Cx=Kw*60,Sx=Cx*24,W0t=Sx*7,ONt=Sx*30,Y0t=Sx*365,f8=R1(i=>{i.setTime(i-i.getMilliseconds())},(i,a)=>{i.setTime(+i+a*Tx)},(i,a)=>(a-i)/Tx,i=>i.getUTCSeconds());f8.range;const cF=R1(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*Tx)},(i,a)=>{i.setTime(+i+a*Kw)},(i,a)=>(a-i)/Kw,i=>i.getMinutes());cF.range,R1(i=>{i.setUTCSeconds(0,0)},(i,a)=>{i.setTime(+i+a*Kw)},(i,a)=>(a-i)/Kw,i=>i.getUTCMinutes()).range;const uF=R1(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*Tx-i.getMinutes()*Kw)},(i,a)=>{i.setTime(+i+a*Cx)},(i,a)=>(a-i)/Cx,i=>i.getHours());uF.range,R1(i=>{i.setUTCMinutes(0,0,0)},(i,a)=>{i.setTime(+i+a*Cx)},(i,a)=>(a-i)/Cx,i=>i.getUTCHours()).range;const c9=R1(i=>i.setHours(0,0,0,0),(i,a)=>i.setDate(i.getDate()+a),(i,a)=>(a-i-(a.getTimezoneOffset()-i.getTimezoneOffset())*Kw)/Sx,i=>i.getDate()-1);c9.range;const X0t=R1(i=>{i.setUTCHours(0,0,0,0)},(i,a)=>{i.setUTCDate(i.getUTCDate()+a)},(i,a)=>(a-i)/Sx,i=>i.getUTCDate()-1);X0t.range,R1(i=>{i.setUTCHours(0,0,0,0)},(i,a)=>{i.setUTCDate(i.getUTCDate()+a)},(i,a)=>(a-i)/Sx,i=>Math.floor(i/Sx)).range;function u9(i){return R1(a=>{a.setDate(a.getDate()-(a.getDay()+7-i)%7),a.setHours(0,0,0,0)},(a,f)=>{a.setDate(a.getDate()+f*7)},(a,f)=>(f-a-(f.getTimezoneOffset()-a.getTimezoneOffset())*Kw)/W0t)}const lF=u9(0),hF=u9(1),NNt=u9(2),PNt=u9(3),l9=u9(4),FNt=u9(5),BNt=u9(6);lF.range,hF.range,NNt.range,PNt.range,l9.range,FNt.range,BNt.range;function h9(i){return R1(a=>{a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+7-i)%7),a.setUTCHours(0,0,0,0)},(a,f)=>{a.setUTCDate(a.getUTCDate()+f*7)},(a,f)=>(f-a)/W0t)}const RNt=h9(0),LW=h9(1),UAe=h9(2),GAe=h9(3),GL=h9(4),KAe=h9(5),WAe=h9(6);RNt.range,LW.range,UAe.range,GAe.range,GL.range,KAe.range,WAe.range;const fF=R1(i=>{i.setDate(1),i.setHours(0,0,0,0)},(i,a)=>{i.setMonth(i.getMonth()+a)},(i,a)=>a.getMonth()-i.getMonth()+(a.getFullYear()-i.getFullYear())*12,i=>i.getMonth());fF.range,R1(i=>{i.setUTCDate(1),i.setUTCHours(0,0,0,0)},(i,a)=>{i.setUTCMonth(i.getUTCMonth()+a)},(i,a)=>a.getUTCMonth()-i.getUTCMonth()+(a.getUTCFullYear()-i.getUTCFullYear())*12,i=>i.getUTCMonth()).range;const _x=R1(i=>{i.setMonth(0,1),i.setHours(0,0,0,0)},(i,a)=>{i.setFullYear(i.getFullYear()+a)},(i,a)=>a.getFullYear()-i.getFullYear(),i=>i.getFullYear());_x.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:R1(a=>{a.setFullYear(Math.floor(a.getFullYear()/i)*i),a.setMonth(0,1),a.setHours(0,0,0,0)},(a,f)=>{a.setFullYear(a.getFullYear()+f*i)}),_x.range;const f9=R1(i=>{i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},(i,a)=>{i.setUTCFullYear(i.getUTCFullYear()+a)},(i,a)=>a.getUTCFullYear()-i.getUTCFullYear(),i=>i.getUTCFullYear());f9.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:R1(a=>{a.setUTCFullYear(Math.floor(a.getUTCFullYear()/i)*i),a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},(a,f)=>{a.setUTCFullYear(a.getUTCFullYear()+f*i)}),f9.range;function YAe(i,a,f,g,w,v){const b=[[f8,1,Tx],[f8,5,5*Tx],[f8,15,15*Tx],[f8,30,30*Tx],[v,1,Kw],[v,5,5*Kw],[v,15,15*Kw],[v,30,30*Kw],[w,1,Cx],[w,3,3*Cx],[w,6,6*Cx],[w,12,12*Cx],[g,1,Sx],[g,2,2*Sx],[f,1,W0t],[a,1,ONt],[a,3,3*ONt],[i,1,Y0t]];function E(_,M,F){const R=M<_;R&&([_,M]=[M,_]);const B=F&&typeof F.range=="function"?F:S(_,M,F),z=B?B.range(_,+M+1):[];return R?z.reverse():z}function S(_,M,F){const R=Math.abs(M-_)/F,B=p0t(([,,nt])=>nt).right(b,R);if(B===b.length)return i.every(w0t(_/Y0t,M/Y0t,F));if(B===0)return UL.every(Math.max(w0t(_,M,F),1));const[z,Y]=b[R/b[B-1][2]<b[B][2]/R?B-1:B];return z.every(Y)}return[E,S]}const[XAe,QAe]=YAe(_x,fF,lF,c9,uF,cF);function Q0t(i){if(0<=i.y&&i.y<100){var a=new Date(-1,i.m,i.d,i.H,i.M,i.S,i.L);return a.setFullYear(i.y),a}return new Date(i.y,i.m,i.d,i.H,i.M,i.S,i.L)}function J0t(i){if(0<=i.y&&i.y<100){var a=new Date(Date.UTC(-1,i.m,i.d,i.H,i.M,i.S,i.L));return a.setUTCFullYear(i.y),a}return new Date(Date.UTC(i.y,i.m,i.d,i.H,i.M,i.S,i.L))}function dF(i,a,f){return{y:i,m:a,d:f,H:0,M:0,S:0,L:0}}function JAe(i){var a=i.dateTime,f=i.date,g=i.time,w=i.periods,v=i.days,b=i.shortDays,E=i.months,S=i.shortMonths,_=gF(w),M=pF(w),F=gF(v),R=pF(v),B=gF(b),z=pF(b),Y=gF(E),nt=pF(E),ot=gF(S),ft=pF(S),wt={a:xt,A:Ft,b:Ct,B:kt,c:null,d:VNt,e:VNt,f:xLe,g:MLe,G:OLe,H:mLe,I:vLe,j:yLe,L:UNt,m:kLe,M:ELe,p:Gt,q:Fe,Q:QNt,s:JNt,S:TLe,u:CLe,U:SLe,V:_Le,w:ALe,W:LLe,x:null,X:null,y:DLe,Y:ILe,Z:NLe,"%":XNt},mt={a:Mt,A:pn,b:Ae,B:ye,c:null,d:KNt,e:KNt,f:RLe,g:WLe,G:XLe,H:PLe,I:FLe,j:BLe,L:WNt,m:jLe,M:$Le,p:tn,q:sn,Q:QNt,s:JNt,S:zLe,u:qLe,U:HLe,V:VLe,w:ULe,W:GLe,x:null,X:null,y:KLe,Y:YLe,Z:QLe,"%":XNt},ct={a:dt,A:K,b:yt,B:V,c:Ot,d:qNt,e:qNt,f:gLe,g:zNt,G:$Nt,H:HNt,I:HNt,j:lLe,L:dLe,m:uLe,M:hLe,p:Q,q:cLe,Q:bLe,s:wLe,S:fLe,u:rLe,U:iLe,V:sLe,w:nLe,W:aLe,x:It,X:jt,y:zNt,Y:$Nt,Z:oLe,"%":pLe};wt.x=rt(f,wt),wt.X=rt(g,wt),wt.c=rt(a,wt),mt.x=rt(f,mt),mt.X=rt(g,mt),mt.c=rt(a,mt);function rt(be,Ne){return function(Xt){var _e=[],xe=-1,Mn=0,ce=be.length,Br,we,Fi;for(Xt instanceof Date||(Xt=new Date(+Xt));++xe<ce;)be.charCodeAt(xe)===37&&(_e.push(be.slice(Mn,xe)),(we=jNt[Br=be.charAt(++xe)])!=null?Br=be.charAt(++xe):we=Br==="e"?" ":"0",(Fi=Ne[Br])&&(Br=Fi(Xt,we)),_e.push(Br),Mn=xe+1);return _e.push(be.slice(Mn,xe)),_e.join("")}}function it(be,Ne){return function(Xt){var _e=dF(1900,void 0,1),xe=gt(_e,be,Xt+="",0),Mn,ce;if(xe!=Xt.length)return null;if("Q"in _e)return new Date(_e.Q);if("s"in _e)return new Date(_e.s*1e3+("L"in _e?_e.L:0));if(Ne&&!("Z"in _e)&&(_e.Z=0),"p"in _e&&(_e.H=_e.H%12+_e.p*12),_e.m===void 0&&(_e.m="q"in _e?_e.q:0),"V"in _e){if(_e.V<1||_e.V>53)return null;"w"in _e||(_e.w=1),"Z"in _e?(Mn=J0t(dF(_e.y,0,1)),ce=Mn.getUTCDay(),Mn=ce>4||ce===0?LW.ceil(Mn):LW(Mn),Mn=X0t.offset(Mn,(_e.V-1)*7),_e.y=Mn.getUTCFullYear(),_e.m=Mn.getUTCMonth(),_e.d=Mn.getUTCDate()+(_e.w+6)%7):(Mn=Q0t(dF(_e.y,0,1)),ce=Mn.getDay(),Mn=ce>4||ce===0?hF.ceil(Mn):hF(Mn),Mn=c9.offset(Mn,(_e.V-1)*7),_e.y=Mn.getFullYear(),_e.m=Mn.getMonth(),_e.d=Mn.getDate()+(_e.w+6)%7)}else("W"in _e||"U"in _e)&&("w"in _e||(_e.w="u"in _e?_e.u%7:"W"in _e?1:0),ce="Z"in _e?J0t(dF(_e.y,0,1)).getUTCDay():Q0t(dF(_e.y,0,1)).getDay(),_e.m=0,_e.d="W"in _e?(_e.w+6)%7+_e.W*7-(ce+5)%7:_e.w+_e.U*7-(ce+6)%7);return"Z"in _e?(_e.H+=_e.Z/100|0,_e.M+=_e.Z%100,J0t(_e)):Q0t(_e)}}function gt(be,Ne,Xt,_e){for(var xe=0,Mn=Ne.length,ce=Xt.length,Br,we;xe<Mn;){if(_e>=ce)return-1;if(Br=Ne.charCodeAt(xe++),Br===37){if(Br=Ne.charAt(xe++),we=ct[Br in jNt?Ne.charAt(xe++):Br],!we||(_e=we(be,Xt,_e))<0)return-1}else if(Br!=Xt.charCodeAt(_e++))return-1}return _e}function Q(be,Ne,Xt){var _e=_.exec(Ne.slice(Xt));return _e?(be.p=M.get(_e[0].toLowerCase()),Xt+_e[0].length):-1}function dt(be,Ne,Xt){var _e=B.exec(Ne.slice(Xt));return _e?(be.w=z.get(_e[0].toLowerCase()),Xt+_e[0].length):-1}function K(be,Ne,Xt){var _e=F.exec(Ne.slice(Xt));return _e?(be.w=R.get(_e[0].toLowerCase()),Xt+_e[0].length):-1}function yt(be,Ne,Xt){var _e=ot.exec(Ne.slice(Xt));return _e?(be.m=ft.get(_e[0].toLowerCase()),Xt+_e[0].length):-1}function V(be,Ne,Xt){var _e=Y.exec(Ne.slice(Xt));return _e?(be.m=nt.get(_e[0].toLowerCase()),Xt+_e[0].length):-1}function Ot(be,Ne,Xt){return gt(be,a,Ne,Xt)}function It(be,Ne,Xt){return gt(be,f,Ne,Xt)}function jt(be,Ne,Xt){return gt(be,g,Ne,Xt)}function xt(be){return b[be.getDay()]}function Ft(be){return v[be.getDay()]}function Ct(be){return S[be.getMonth()]}function kt(be){return E[be.getMonth()]}function Gt(be){return w[+(be.getHours()>=12)]}function Fe(be){return 1+~~(be.getMonth()/3)}function Mt(be){return b[be.getUTCDay()]}function pn(be){return v[be.getUTCDay()]}function Ae(be){return S[be.getUTCMonth()]}function ye(be){return E[be.getUTCMonth()]}function tn(be){return w[+(be.getUTCHours()>=12)]}function sn(be){return 1+~~(be.getUTCMonth()/3)}return{format:function(be){var Ne=rt(be+="",wt);return Ne.toString=function(){return be},Ne},parse:function(be){var Ne=it(be+="",!1);return Ne.toString=function(){return be},Ne},utcFormat:function(be){var Ne=rt(be+="",mt);return Ne.toString=function(){return be},Ne},utcParse:function(be){var Ne=it(be+="",!0);return Ne.toString=function(){return be},Ne}}}var jNt={"-":"",_:" ",0:"0"},Ad=/^\s*\d+/,ZAe=/^%/,tLe=/[\\^$*+?|[\]().{}]/g;function Jc(i,a,f){var g=i<0?"-":"",w=(g?-i:i)+"",v=w.length;return g+(v<f?new Array(f-v+1).join(a)+w:w)}function eLe(i){return i.replace(tLe,"\\$&")}function gF(i){return new RegExp("^(?:"+i.map(eLe).join("|")+")","i")}function pF(i){return new Map(i.map((a,f)=>[a.toLowerCase(),f]))}function nLe(i,a,f){var g=Ad.exec(a.slice(f,f+1));return g?(i.w=+g[0],f+g[0].length):-1}function rLe(i,a,f){var g=Ad.exec(a.slice(f,f+1));return g?(i.u=+g[0],f+g[0].length):-1}function iLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.U=+g[0],f+g[0].length):-1}function sLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.V=+g[0],f+g[0].length):-1}function aLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.W=+g[0],f+g[0].length):-1}function $Nt(i,a,f){var g=Ad.exec(a.slice(f,f+4));return g?(i.y=+g[0],f+g[0].length):-1}function zNt(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.y=+g[0]+(+g[0]>68?1900:2e3),f+g[0].length):-1}function oLe(i,a,f){var g=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(a.slice(f,f+6));return g?(i.Z=g[1]?0:-(g[2]+(g[3]||"00")),f+g[0].length):-1}function cLe(i,a,f){var g=Ad.exec(a.slice(f,f+1));return g?(i.q=g[0]*3-3,f+g[0].length):-1}function uLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.m=g[0]-1,f+g[0].length):-1}function qNt(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.d=+g[0],f+g[0].length):-1}function lLe(i,a,f){var g=Ad.exec(a.slice(f,f+3));return g?(i.m=0,i.d=+g[0],f+g[0].length):-1}function HNt(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.H=+g[0],f+g[0].length):-1}function hLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.M=+g[0],f+g[0].length):-1}function fLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.S=+g[0],f+g[0].length):-1}function dLe(i,a,f){var g=Ad.exec(a.slice(f,f+3));return g?(i.L=+g[0],f+g[0].length):-1}function gLe(i,a,f){var g=Ad.exec(a.slice(f,f+6));return g?(i.L=Math.floor(g[0]/1e3),f+g[0].length):-1}function pLe(i,a,f){var g=ZAe.exec(a.slice(f,f+1));return g?f+g[0].length:-1}function bLe(i,a,f){var g=Ad.exec(a.slice(f));return g?(i.Q=+g[0],f+g[0].length):-1}function wLe(i,a,f){var g=Ad.exec(a.slice(f));return g?(i.s=+g[0],f+g[0].length):-1}function VNt(i,a){return Jc(i.getDate(),a,2)}function mLe(i,a){return Jc(i.getHours(),a,2)}function vLe(i,a){return Jc(i.getHours()%12||12,a,2)}function yLe(i,a){return Jc(1+c9.count(_x(i),i),a,3)}function UNt(i,a){return Jc(i.getMilliseconds(),a,3)}function xLe(i,a){return UNt(i,a)+"000"}function kLe(i,a){return Jc(i.getMonth()+1,a,2)}function ELe(i,a){return Jc(i.getMinutes(),a,2)}function TLe(i,a){return Jc(i.getSeconds(),a,2)}function CLe(i){var a=i.getDay();return a===0?7:a}function SLe(i,a){return Jc(lF.count(_x(i)-1,i),a,2)}function GNt(i){var a=i.getDay();return a>=4||a===0?l9(i):l9.ceil(i)}function _Le(i,a){return i=GNt(i),Jc(l9.count(_x(i),i)+(_x(i).getDay()===4),a,2)}function ALe(i){return i.getDay()}function LLe(i,a){return Jc(hF.count(_x(i)-1,i),a,2)}function DLe(i,a){return Jc(i.getFullYear()%100,a,2)}function MLe(i,a){return i=GNt(i),Jc(i.getFullYear()%100,a,2)}function ILe(i,a){return Jc(i.getFullYear()%1e4,a,4)}function OLe(i,a){var f=i.getDay();return i=f>=4||f===0?l9(i):l9.ceil(i),Jc(i.getFullYear()%1e4,a,4)}function NLe(i){var a=i.getTimezoneOffset();return(a>0?"-":(a*=-1,"+"))+Jc(a/60|0,"0",2)+Jc(a%60,"0",2)}function KNt(i,a){return Jc(i.getUTCDate(),a,2)}function PLe(i,a){return Jc(i.getUTCHours(),a,2)}function FLe(i,a){return Jc(i.getUTCHours()%12||12,a,2)}function BLe(i,a){return Jc(1+X0t.count(f9(i),i),a,3)}function WNt(i,a){return Jc(i.getUTCMilliseconds(),a,3)}function RLe(i,a){return WNt(i,a)+"000"}function jLe(i,a){return Jc(i.getUTCMonth()+1,a,2)}function $Le(i,a){return Jc(i.getUTCMinutes(),a,2)}function zLe(i,a){return Jc(i.getUTCSeconds(),a,2)}function qLe(i){var a=i.getUTCDay();return a===0?7:a}function HLe(i,a){return Jc(RNt.count(f9(i)-1,i),a,2)}function YNt(i){var a=i.getUTCDay();return a>=4||a===0?GL(i):GL.ceil(i)}function VLe(i,a){return i=YNt(i),Jc(GL.count(f9(i),i)+(f9(i).getUTCDay()===4),a,2)}function ULe(i){return i.getUTCDay()}function GLe(i,a){return Jc(LW.count(f9(i)-1,i),a,2)}function KLe(i,a){return Jc(i.getUTCFullYear()%100,a,2)}function WLe(i,a){return i=YNt(i),Jc(i.getUTCFullYear()%100,a,2)}function YLe(i,a){return Jc(i.getUTCFullYear()%1e4,a,4)}function XLe(i,a){var f=i.getUTCDay();return i=f>=4||f===0?GL(i):GL.ceil(i),Jc(i.getUTCFullYear()%1e4,a,4)}function QLe(){return"+0000"}function XNt(){return"%"}function QNt(i){return+i}function JNt(i){return Math.floor(+i/1e3)}var KL,DW;JLe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function JLe(i){return KL=JAe(i),DW=KL.format,KL.parse,KL.utcFormat,KL.utcParse,KL}function ZLe(i){return new Date(i)}function tDe(i){return i instanceof Date?+i:+new Date(+i)}function ZNt(i,a,f,g,w,v,b,E,S,_){var M=INt(),F=M.invert,R=M.domain,B=_(".%L"),z=_(":%S"),Y=_("%I:%M"),nt=_("%I %p"),ot=_("%a %d"),ft=_("%b %d"),wt=_("%B"),mt=_("%Y");function ct(rt){return(S(rt)<rt?B:E(rt)<rt?z:b(rt)<rt?Y:v(rt)<rt?nt:g(rt)<rt?w(rt)<rt?ot:ft:f(rt)<rt?wt:mt)(rt)}return M.invert=function(rt){return new Date(F(rt))},M.domain=function(rt){return arguments.length?R(Array.from(rt,tDe)):R().map(ZLe)},M.ticks=function(rt){var it=R();return i(it[0],it[it.length-1],rt??10)},M.tickFormat=function(rt,it){return it==null?ct:_(it)},M.nice=function(rt){var it=R();return(!rt||typeof rt.range!="function")&&(rt=a(it[0],it[it.length-1],rt??10)),rt?R(VAe(it,rt)):M},M.copy=function(){return MNt(M,ZNt(i,a,f,g,w,v,b,E,S,_))},M}function eDe(){return AW.apply(ZNt(XAe,QAe,_x,fF,lF,c9,uF,cF,f8,DW).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function nDe(i){for(var a=i.length/6|0,f=new Array(a),g=0;g<a;)f[g]="#"+i.slice(g*6,++g*6);return f}const tPt=nDe("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function kf(i){return function(){return i}}const ePt=Math.abs,ng=Math.atan2,d9=Math.cos,rDe=Math.max,Z0t=Math.min,t4=Math.sin,WL=Math.sqrt,rg=1e-12,bF=Math.PI,MW=bF/2,IW=2*bF;function iDe(i){return i>1?0:i<-1?bF:Math.acos(i)}function nPt(i){return i>=1?MW:i<=-1?-MW:Math.asin(i)}function rPt(i){let a=3;return i.digits=function(f){if(!arguments.length)return a;if(f==null)a=null;else{const g=Math.floor(f);if(!(g>=0))throw new RangeError(`invalid digits: ${f}`);a=g}return i},()=>new yAe(a)}function sDe(i){return i.innerRadius}function aDe(i){return i.outerRadius}function oDe(i){return i.startAngle}function cDe(i){return i.endAngle}function uDe(i){return i&&i.padAngle}function lDe(i,a,f,g,w,v,b,E){var S=f-i,_=g-a,M=b-w,F=E-v,R=F*S-M*_;if(!(R*R<rg))return R=(M*(a-v)-F*(i-w))/R,[i+R*S,a+R*_]}function OW(i,a,f,g,w,v,b){var E=i-f,S=a-g,_=(b?v:-v)/WL(E*E+S*S),M=_*S,F=-_*E,R=i+M,B=a+F,z=f+M,Y=g+F,nt=(R+z)/2,ot=(B+Y)/2,ft=z-R,wt=Y-B,mt=ft*ft+wt*wt,ct=w-v,rt=R*Y-z*B,it=(wt<0?-1:1)*WL(rDe(0,ct*ct*mt-rt*rt)),gt=(rt*wt-ft*it)/mt,Q=(-rt*ft-wt*it)/mt,dt=(rt*wt+ft*it)/mt,K=(-rt*ft+wt*it)/mt,yt=gt-nt,V=Q-ot,Ot=dt-nt,It=K-ot;return yt*yt+V*V>Ot*Ot+It*It&&(gt=dt,Q=K),{cx:gt,cy:Q,x01:-M,y01:-F,x11:gt*(w/ct-1),y11:Q*(w/ct-1)}}function YL(){var i=sDe,a=aDe,f=kf(0),g=null,w=oDe,v=cDe,b=uDe,E=null,S=rPt(_);function _(){var M,F,R=+i.apply(this,arguments),B=+a.apply(this,arguments),z=w.apply(this,arguments)-MW,Y=v.apply(this,arguments)-MW,nt=ePt(Y-z),ot=Y>z;if(E||(E=M=S()),B<R&&(F=B,B=R,R=F),!(B>rg))E.moveTo(0,0);else if(nt>IW-rg)E.moveTo(B*d9(z),B*t4(z)),E.arc(0,0,B,z,Y,!ot),R>rg&&(E.moveTo(R*d9(Y),R*t4(Y)),E.arc(0,0,R,Y,z,ot));else{var ft=z,wt=Y,mt=z,ct=Y,rt=nt,it=nt,gt=b.apply(this,arguments)/2,Q=gt>rg&&(g?+g.apply(this,arguments):WL(R*R+B*B)),dt=Z0t(ePt(B-R)/2,+f.apply(this,arguments)),K=dt,yt=dt,V,Ot;if(Q>rg){var It=nPt(Q/R*t4(gt)),jt=nPt(Q/B*t4(gt));(rt-=It*2)>rg?(It*=ot?1:-1,mt+=It,ct-=It):(rt=0,mt=ct=(z+Y)/2),(it-=jt*2)>rg?(jt*=ot?1:-1,ft+=jt,wt-=jt):(it=0,ft=wt=(z+Y)/2)}var xt=B*d9(ft),Ft=B*t4(ft),Ct=R*d9(ct),kt=R*t4(ct);if(dt>rg){var Gt=B*d9(wt),Fe=B*t4(wt),Mt=R*d9(mt),pn=R*t4(mt),Ae;if(nt<bF)if(Ae=lDe(xt,Ft,Mt,pn,Gt,Fe,Ct,kt)){var ye=xt-Ae[0],tn=Ft-Ae[1],sn=Gt-Ae[0],be=Fe-Ae[1],Ne=1/t4(iDe((ye*sn+tn*be)/(WL(ye*ye+tn*tn)*WL(sn*sn+be*be)))/2),Xt=WL(Ae[0]*Ae[0]+Ae[1]*Ae[1]);K=Z0t(dt,(R-Xt)/(Ne-1)),yt=Z0t(dt,(B-Xt)/(Ne+1))}else K=yt=0}it>rg?yt>rg?(V=OW(Mt,pn,xt,Ft,B,yt,ot),Ot=OW(Gt,Fe,Ct,kt,B,yt,ot),E.moveTo(V.cx+V.x01,V.cy+V.y01),yt<dt?E.arc(V.cx,V.cy,yt,ng(V.y01,V.x01),ng(Ot.y01,Ot.x01),!ot):(E.arc(V.cx,V.cy,yt,ng(V.y01,V.x01),ng(V.y11,V.x11),!ot),E.arc(0,0,B,ng(V.cy+V.y11,V.cx+V.x11),ng(Ot.cy+Ot.y11,Ot.cx+Ot.x11),!ot),E.arc(Ot.cx,Ot.cy,yt,ng(Ot.y11,Ot.x11),ng(Ot.y01,Ot.x01),!ot))):(E.moveTo(xt,Ft),E.arc(0,0,B,ft,wt,!ot)):E.moveTo(xt,Ft),!(R>rg)||!(rt>rg)?E.lineTo(Ct,kt):K>rg?(V=OW(Ct,kt,Gt,Fe,R,-K,ot),Ot=OW(xt,Ft,Mt,pn,R,-K,ot),E.lineTo(V.cx+V.x01,V.cy+V.y01),K<dt?E.arc(V.cx,V.cy,K,ng(V.y01,V.x01),ng(Ot.y01,Ot.x01),!ot):(E.arc(V.cx,V.cy,K,ng(V.y01,V.x01),ng(V.y11,V.x11),!ot),E.arc(0,0,R,ng(V.cy+V.y11,V.cx+V.x11),ng(Ot.cy+Ot.y11,Ot.cx+Ot.x11),ot),E.arc(Ot.cx,Ot.cy,K,ng(Ot.y11,Ot.x11),ng(Ot.y01,Ot.x01),!ot))):E.arc(0,0,R,ct,mt,ot)}if(E.closePath(),M)return E=null,M+""||null}return _.centroid=function(){var M=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2,F=(+w.apply(this,arguments)+ +v.apply(this,arguments))/2-bF/2;return[d9(F)*M,t4(F)*M]},_.innerRadius=function(M){return arguments.length?(i=typeof M=="function"?M:kf(+M),_):i},_.outerRadius=function(M){return arguments.length?(a=typeof M=="function"?M:kf(+M),_):a},_.cornerRadius=function(M){return arguments.length?(f=typeof M=="function"?M:kf(+M),_):f},_.padRadius=function(M){return arguments.length?(g=M==null?null:typeof M=="function"?M:kf(+M),_):g},_.startAngle=function(M){return arguments.length?(w=typeof M=="function"?M:kf(+M),_):w},_.endAngle=function(M){return arguments.length?(v=typeof M=="function"?M:kf(+M),_):v},_.padAngle=function(M){return arguments.length?(b=typeof M=="function"?M:kf(+M),_):b},_.context=function(M){return arguments.length?(E=M??null,_):E},_}function iPt(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function sPt(i){this._context=i}sPt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;default:this._context.lineTo(i,a);break}}};function Kg(i){return new sPt(i)}function hDe(i){return i[0]}function fDe(i){return i[1]}function Ax(i,a){var f=kf(!0),g=null,w=Kg,v=null,b=rPt(E);i=typeof i=="function"?i:i===void 0?hDe:kf(i),a=typeof a=="function"?a:a===void 0?fDe:kf(a);function E(S){var _,M=(S=iPt(S)).length,F,R=!1,B;for(g==null&&(v=w(B=b())),_=0;_<=M;++_)!(_<M&&f(F=S[_],_,S))===R&&((R=!R)?v.lineStart():v.lineEnd()),R&&v.point(+i(F,_,S),+a(F,_,S));if(B)return v=null,B+""||null}return E.x=function(S){return arguments.length?(i=typeof S=="function"?S:kf(+S),E):i},E.y=function(S){return arguments.length?(a=typeof S=="function"?S:kf(+S),E):a},E.defined=function(S){return arguments.length?(f=typeof S=="function"?S:kf(!!S),E):f},E.curve=function(S){return arguments.length?(w=S,g!=null&&(v=w(g)),E):w},E.context=function(S){return arguments.length?(S==null?g=v=null:v=w(g=S),E):g},E}function dDe(i,a){return a<i?-1:a>i?1:a>=i?0:NaN}function gDe(i){return i}function pDe(){var i=gDe,a=dDe,f=null,g=kf(0),w=kf(IW),v=kf(0);function b(E){var S,_=(E=iPt(E)).length,M,F,R=0,B=new Array(_),z=new Array(_),Y=+g.apply(this,arguments),nt=Math.min(IW,Math.max(-IW,w.apply(this,arguments)-Y)),ot,ft=Math.min(Math.abs(nt)/_,v.apply(this,arguments)),wt=ft*(nt<0?-1:1),mt;for(S=0;S<_;++S)(mt=z[B[S]=S]=+i(E[S],S,E))>0&&(R+=mt);for(a!=null?B.sort(function(ct,rt){return a(z[ct],z[rt])}):f!=null&&B.sort(function(ct,rt){return f(E[ct],E[rt])}),S=0,F=R?(nt-_*wt)/R:0;S<_;++S,Y=ot)M=B[S],mt=z[M],ot=Y+(mt>0?mt*F:0)+wt,z[M]={data:E[M],index:S,value:mt,startAngle:Y,endAngle:ot,padAngle:ft};return z}return b.value=function(E){return arguments.length?(i=typeof E=="function"?E:kf(+E),b):i},b.sortValues=function(E){return arguments.length?(a=E,f=null,b):a},b.sort=function(E){return arguments.length?(f=E,a=null,b):f},b.startAngle=function(E){return arguments.length?(g=typeof E=="function"?E:kf(+E),b):g},b.endAngle=function(E){return arguments.length?(w=typeof E=="function"?E:kf(+E),b):w},b.padAngle=function(E){return arguments.length?(v=typeof E=="function"?E:kf(+E),b):v},b}class aPt{constructor(a,f){this._context=a,this._x=f}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(a,f){switch(a=+a,f=+f,this._point){case 0:{this._point=1,this._line?this._context.lineTo(a,f):this._context.moveTo(a,f);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+a)/2,this._y0,this._x0,f,a,f):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+f)/2,a,this._y0,a,f);break}}this._x0=a,this._y0=f}}function bDe(i){return new aPt(i,!0)}function wDe(i){return new aPt(i,!1)}function d8(){}function NW(i,a,f){i._context.bezierCurveTo((2*i._x0+i._x1)/3,(2*i._y0+i._y1)/3,(i._x0+2*i._x1)/3,(i._y0+2*i._y1)/3,(i._x0+4*i._x1+a)/6,(i._y0+4*i._y1+f)/6)}function PW(i){this._context=i}PW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:NW(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:NW(this,i,a);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a}};function wF(i){return new PW(i)}function oPt(i){this._context=i}oPt.prototype={areaStart:d8,areaEnd:d8,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._x2=i,this._y2=a;break;case 1:this._point=2,this._x3=i,this._y3=a;break;case 2:this._point=3,this._x4=i,this._y4=a,this._context.moveTo((this._x0+4*this._x1+i)/6,(this._y0+4*this._y1+a)/6);break;default:NW(this,i,a);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a}};function mDe(i){return new oPt(i)}function cPt(i){this._context=i}cPt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var f=(this._x0+4*this._x1+i)/6,g=(this._y0+4*this._y1+a)/6;this._line?this._context.lineTo(f,g):this._context.moveTo(f,g);break;case 3:this._point=4;default:NW(this,i,a);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a}};function vDe(i){return new cPt(i)}function uPt(i,a){this._basis=new PW(i),this._beta=a}uPt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var i=this._x,a=this._y,f=i.length-1;if(f>0)for(var g=i[0],w=a[0],v=i[f]-g,b=a[f]-w,E=-1,S;++E<=f;)S=E/f,this._basis.point(this._beta*i[E]+(1-this._beta)*(g+S*v),this._beta*a[E]+(1-this._beta)*(w+S*b));this._x=this._y=null,this._basis.lineEnd()},point:function(i,a){this._x.push(+i),this._y.push(+a)}};const yDe=function i(a){function f(g){return a===1?new PW(g):new uPt(g,a)}return f.beta=function(g){return i(+g)},f}(.85);function FW(i,a,f){i._context.bezierCurveTo(i._x1+i._k*(i._x2-i._x0),i._y1+i._k*(i._y2-i._y0),i._x2+i._k*(i._x1-a),i._y2+i._k*(i._y1-f),i._x2,i._y2)}function tgt(i,a){this._context=i,this._k=(1-a)/6}tgt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:FW(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2,this._x1=i,this._y1=a;break;case 2:this._point=3;default:FW(this,i,a);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const xDe=function i(a){function f(g){return new tgt(g,a)}return f.tension=function(g){return i(+g)},f}(0);function egt(i,a){this._context=i,this._k=(1-a)/6}egt.prototype={areaStart:d8,areaEnd:d8,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._x3=i,this._y3=a;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=a);break;case 2:this._point=3,this._x5=i,this._y5=a;break;default:FW(this,i,a);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const kDe=function i(a){function f(g){return new egt(g,a)}return f.tension=function(g){return i(+g)},f}(0);function ngt(i,a){this._context=i,this._k=(1-a)/6}ngt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:FW(this,i,a);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const EDe=function i(a){function f(g){return new ngt(g,a)}return f.tension=function(g){return i(+g)},f}(0);function rgt(i,a,f){var g=i._x1,w=i._y1,v=i._x2,b=i._y2;if(i._l01_a>rg){var E=2*i._l01_2a+3*i._l01_a*i._l12_a+i._l12_2a,S=3*i._l01_a*(i._l01_a+i._l12_a);g=(g*E-i._x0*i._l12_2a+i._x2*i._l01_2a)/S,w=(w*E-i._y0*i._l12_2a+i._y2*i._l01_2a)/S}if(i._l23_a>rg){var _=2*i._l23_2a+3*i._l23_a*i._l12_a+i._l12_2a,M=3*i._l23_a*(i._l23_a+i._l12_a);v=(v*_+i._x1*i._l23_2a-a*i._l12_2a)/M,b=(b*_+i._y1*i._l23_2a-f*i._l12_2a)/M}i._context.bezierCurveTo(g,w,v,b,i._x2,i._y2)}function lPt(i,a){this._context=i,this._alpha=a}lPt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){if(i=+i,a=+a,this._point){var f=this._x2-i,g=this._y2-a;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(f*f+g*g,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;break;case 2:this._point=3;default:rgt(this,i,a);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const TDe=function i(a){function f(g){return a?new lPt(g,a):new tgt(g,0)}return f.alpha=function(g){return i(+g)},f}(.5);function hPt(i,a){this._context=i,this._alpha=a}hPt.prototype={areaStart:d8,areaEnd:d8,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(i,a){if(i=+i,a=+a,this._point){var f=this._x2-i,g=this._y2-a;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(f*f+g*g,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=i,this._y3=a;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=a);break;case 2:this._point=3,this._x5=i,this._y5=a;break;default:rgt(this,i,a);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const CDe=function i(a){function f(g){return a?new hPt(g,a):new egt(g,0)}return f.alpha=function(g){return i(+g)},f}(.5);function fPt(i,a){this._context=i,this._alpha=a}fPt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){if(i=+i,a=+a,this._point){var f=this._x2-i,g=this._y2-a;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(f*f+g*g,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rgt(this,i,a);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const SDe=function i(a){function f(g){return a?new fPt(g,a):new ngt(g,0)}return f.alpha=function(g){return i(+g)},f}(.5);function dPt(i){this._context=i}dPt.prototype={areaStart:d8,areaEnd:d8,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(i,a){i=+i,a=+a,this._point?this._context.lineTo(i,a):(this._point=1,this._context.moveTo(i,a))}};function _De(i){return new dPt(i)}function gPt(i){return i<0?-1:1}function pPt(i,a,f){var g=i._x1-i._x0,w=a-i._x1,v=(i._y1-i._y0)/(g||w<0&&-0),b=(f-i._y1)/(w||g<0&&-0),E=(v*w+b*g)/(g+w);return(gPt(v)+gPt(b))*Math.min(Math.abs(v),Math.abs(b),.5*Math.abs(E))||0}function bPt(i,a){var f=i._x1-i._x0;return f?(3*(i._y1-i._y0)/f-a)/2:a}function igt(i,a,f){var g=i._x0,w=i._y0,v=i._x1,b=i._y1,E=(v-g)/3;i._context.bezierCurveTo(g+E,w+E*a,v-E,b-E*f,v,b)}function BW(i){this._context=i}BW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:igt(this,this._t0,bPt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){var f=NaN;if(i=+i,a=+a,!(i===this._x1&&a===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;break;case 2:this._point=3,igt(this,bPt(this,f=pPt(this,i,a)),f);break;default:igt(this,this._t0,f=pPt(this,i,a));break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a,this._t0=f}}};function wPt(i){this._context=new mPt(i)}(wPt.prototype=Object.create(BW.prototype)).point=function(i,a){BW.prototype.point.call(this,a,i)};function mPt(i){this._context=i}mPt.prototype={moveTo:function(i,a){this._context.moveTo(a,i)},closePath:function(){this._context.closePath()},lineTo:function(i,a){this._context.lineTo(a,i)},bezierCurveTo:function(i,a,f,g,w,v){this._context.bezierCurveTo(a,i,g,f,v,w)}};function ADe(i){return new BW(i)}function LDe(i){return new wPt(i)}function vPt(i){this._context=i}vPt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var i=this._x,a=this._y,f=i.length;if(f)if(this._line?this._context.lineTo(i[0],a[0]):this._context.moveTo(i[0],a[0]),f===2)this._context.lineTo(i[1],a[1]);else for(var g=yPt(i),w=yPt(a),v=0,b=1;b<f;++v,++b)this._context.bezierCurveTo(g[0][v],w[0][v],g[1][v],w[1][v],i[b],a[b]);(this._line||this._line!==0&&f===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(i,a){this._x.push(+i),this._y.push(+a)}};function yPt(i){var a,f=i.length-1,g,w=new Array(f),v=new Array(f),b=new Array(f);for(w[0]=0,v[0]=2,b[0]=i[0]+2*i[1],a=1;a<f-1;++a)w[a]=1,v[a]=4,b[a]=4*i[a]+2*i[a+1];for(w[f-1]=2,v[f-1]=7,b[f-1]=8*i[f-1]+i[f],a=1;a<f;++a)g=w[a]/v[a-1],v[a]-=g,b[a]-=g*b[a-1];for(w[f-1]=b[f-1]/v[f-1],a=f-2;a>=0;--a)w[a]=(b[a]-w[a+1])/v[a];for(v[f-1]=(i[f]+w[f-1])/2,a=0;a<f-1;++a)v[a]=2*i[a+1]-w[a+1];return[w,v]}function DDe(i){return new vPt(i)}function RW(i,a){this._context=i,this._t=a}RW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,a),this._context.lineTo(i,a);else{var f=this._x*(1-this._t)+i*this._t;this._context.lineTo(f,this._y),this._context.lineTo(f,a)}break}}this._x=i,this._y=a}};function MDe(i){return new RW(i,.5)}function IDe(i){return new RW(i,0)}function ODe(i){return new RW(i,1)}function mF(i,a,f){this.k=i,this.x=a,this.y=f}mF.prototype={constructor:mF,scale:function(i){return i===1?this:new mF(this.k*i,this.x,this.y)},translate:function(i,a){return i===0&a===0?this:new mF(this.k,this.x+this.k*i,this.y+this.k*a)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},mF.prototype;/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:xPt,setPrototypeOf:kPt,isFrozen:NDe,getPrototypeOf:PDe,getOwnPropertyDescriptor:FDe}=Object;let{freeze:Wg,seal:qv,create:BDe}=Object,{apply:sgt,construct:agt}=typeof Reflect<"u"&&Reflect;sgt||(sgt=function(a,f,g){return a.apply(f,g)}),Wg||(Wg=function(a){return a}),qv||(qv=function(a){return a}),agt||(agt=function(a,f){return new a(...f)});const RDe=Ww(Array.prototype.forEach),EPt=Ww(Array.prototype.pop),vF=Ww(Array.prototype.push),jW=Ww(String.prototype.toLowerCase),ogt=Ww(String.prototype.toString),jDe=Ww(String.prototype.match),Hv=Ww(String.prototype.replace),$De=Ww(String.prototype.indexOf),zDe=Ww(String.prototype.trim),E2=Ww(RegExp.prototype.test),yF=qDe(TypeError);function Ww(i){return function(a){for(var f=arguments.length,g=new Array(f>1?f-1:0),w=1;w<f;w++)g[w-1]=arguments[w];return sgt(i,a,g)}}function qDe(i){return function(){for(var a=arguments.length,f=new Array(a),g=0;g<a;g++)f[g]=arguments[g];return agt(i,f)}}function Fo(i,a,f){var g;f=(g=f)!==null&&g!==void 0?g:jW,kPt&&kPt(i,null);let w=a.length;for(;w--;){let v=a[w];if(typeof v=="string"){const b=f(v);b!==v&&(NDe(a)||(a[w]=b),v=b)}i[v]=!0}return i}function XL(i){const a=BDe(null);for(const[f,g]of xPt(i))a[f]=g;return a}function $W(i,a){for(;i!==null;){const g=FDe(i,a);if(g){if(g.get)return Ww(g.get);if(typeof g.value=="function")return Ww(g.value)}i=PDe(i)}function f(g){return console.warn("fallback value for",g),null}return f}const TPt=Wg(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cgt=Wg(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ugt=Wg(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),HDe=Wg(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lgt=Wg(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),VDe=Wg(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),CPt=Wg(["#text"]),SPt=Wg(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),hgt=Wg(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_Pt=Wg(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zW=Wg(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),UDe=qv(/\{\{[\w\W]*|[\w\W]*\}\}/gm),GDe=qv(/<%[\w\W]*|[\w\W]*%>/gm),KDe=qv(/\${[\w\W]*}/gm),WDe=qv(/^data-[\-\w.\u00B7-\uFFFF]/),YDe=qv(/^aria-[\-\w]+$/),APt=qv(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),XDe=qv(/^(?:\w+script|data):/i),QDe=qv(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),LPt=qv(/^html$/i);var DPt=Object.freeze({__proto__:null,MUSTACHE_EXPR:UDe,ERB_EXPR:GDe,TMPLIT_EXPR:KDe,DATA_ATTR:WDe,ARIA_ATTR:YDe,IS_ALLOWED_URI:APt,IS_SCRIPT_OR_DATA:XDe,ATTR_WHITESPACE:QDe,DOCTYPE_NAME:LPt});const JDe=()=>typeof window>"u"?null:window,ZDe=function(a,f){if(typeof a!="object"||typeof a.createPolicy!="function")return null;let g=null;const w="data-tt-policy-suffix";f&&f.hasAttribute(w)&&(g=f.getAttribute(w));const v="dompurify"+(g?"#"+g:"");try{return a.createPolicy(v,{createHTML(b){return b},createScriptURL(b){return b}})}catch{return console.warn("TrustedTypes policy "+v+" could not be created."),null}};function MPt(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:JDe();const a=Gi=>MPt(Gi);if(a.version="3.0.5",a.removed=[],!i||!i.document||i.document.nodeType!==9)return a.isSupported=!1,a;const f=i.document,g=f.currentScript;let{document:w}=i;const{DocumentFragment:v,HTMLTemplateElement:b,Node:E,Element:S,NodeFilter:_,NamedNodeMap:M=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:F,DOMParser:R,trustedTypes:B}=i,z=S.prototype,Y=$W(z,"cloneNode"),nt=$W(z,"nextSibling"),ot=$W(z,"childNodes"),ft=$W(z,"parentNode");if(typeof b=="function"){const Gi=w.createElement("template");Gi.content&&Gi.content.ownerDocument&&(w=Gi.content.ownerDocument)}let wt,mt="";const{implementation:ct,createNodeIterator:rt,createDocumentFragment:it,getElementsByTagName:gt}=w,{importNode:Q}=f;let dt={};a.isSupported=typeof xPt=="function"&&typeof ft=="function"&&ct&&ct.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:yt,TMPLIT_EXPR:V,DATA_ATTR:Ot,ARIA_ATTR:It,IS_SCRIPT_OR_DATA:jt,ATTR_WHITESPACE:xt}=DPt;let{IS_ALLOWED_URI:Ft}=DPt,Ct=null;const kt=Fo({},[...TPt,...cgt,...ugt,...lgt,...CPt]);let Gt=null;const Fe=Fo({},[...SPt,...hgt,..._Pt,...zW]);let Mt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pn=null,Ae=null,ye=!0,tn=!0,sn=!1,be=!0,Ne=!1,Xt=!1,_e=!1,xe=!1,Mn=!1,ce=!1,Br=!1,we=!0,Fi=!1;const mi="user-content-";let ga=!0,Ss=!1,za={},br=null;const An=Fo({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Nn=null;const Bn=Fo({},["audio","video","img","source","image","track"]);let ke=null;const pe=Fo({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",an="http://www.w3.org/2000/svg",xn="http://www.w3.org/1999/xhtml";let qa=xn,xo=!1,ko=null;const va=Fo({},[Je,an,xn],ogt);let Ha;const ds=["application/xhtml+xml","text/html"],Fu="text/html";let Zs,d1=null;const I2=w.createElement("form"),ll=function(cn){return cn instanceof RegExp||cn instanceof Function},Ic=function(cn){if(!(d1&&d1===cn)){if((!cn||typeof cn!="object")&&(cn={}),cn=XL(cn),Ha=ds.indexOf(cn.PARSER_MEDIA_TYPE)===-1?Ha=Fu:Ha=cn.PARSER_MEDIA_TYPE,Zs=Ha==="application/xhtml+xml"?ogt:jW,Ct="ALLOWED_TAGS"in cn?Fo({},cn.ALLOWED_TAGS,Zs):kt,Gt="ALLOWED_ATTR"in cn?Fo({},cn.ALLOWED_ATTR,Zs):Fe,ko="ALLOWED_NAMESPACES"in cn?Fo({},cn.ALLOWED_NAMESPACES,ogt):va,ke="ADD_URI_SAFE_ATTR"in cn?Fo(XL(pe),cn.ADD_URI_SAFE_ATTR,Zs):pe,Nn="ADD_DATA_URI_TAGS"in cn?Fo(XL(Bn),cn.ADD_DATA_URI_TAGS,Zs):Bn,br="FORBID_CONTENTS"in cn?Fo({},cn.FORBID_CONTENTS,Zs):An,pn="FORBID_TAGS"in cn?Fo({},cn.FORBID_TAGS,Zs):{},Ae="FORBID_ATTR"in cn?Fo({},cn.FORBID_ATTR,Zs):{},za="USE_PROFILES"in cn?cn.USE_PROFILES:!1,ye=cn.ALLOW_ARIA_ATTR!==!1,tn=cn.ALLOW_DATA_ATTR!==!1,sn=cn.ALLOW_UNKNOWN_PROTOCOLS||!1,be=cn.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ne=cn.SAFE_FOR_TEMPLATES||!1,Xt=cn.WHOLE_DOCUMENT||!1,Mn=cn.RETURN_DOM||!1,ce=cn.RETURN_DOM_FRAGMENT||!1,Br=cn.RETURN_TRUSTED_TYPE||!1,xe=cn.FORCE_BODY||!1,we=cn.SANITIZE_DOM!==!1,Fi=cn.SANITIZE_NAMED_PROPS||!1,ga=cn.KEEP_CONTENT!==!1,Ss=cn.IN_PLACE||!1,Ft=cn.ALLOWED_URI_REGEXP||APt,qa=cn.NAMESPACE||xn,Mt=cn.CUSTOM_ELEMENT_HANDLING||{},cn.CUSTOM_ELEMENT_HANDLING&&ll(cn.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Mt.tagNameCheck=cn.CUSTOM_ELEMENT_HANDLING.tagNameCheck),cn.CUSTOM_ELEMENT_HANDLING&&ll(cn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Mt.attributeNameCheck=cn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),cn.CUSTOM_ELEMENT_HANDLING&&typeof cn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Mt.allowCustomizedBuiltInElements=cn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ne&&(tn=!1),ce&&(Mn=!0),za&&(Ct=Fo({},[...CPt]),Gt=[],za.html===!0&&(Fo(Ct,TPt),Fo(Gt,SPt)),za.svg===!0&&(Fo(Ct,cgt),Fo(Gt,hgt),Fo(Gt,zW)),za.svgFilters===!0&&(Fo(Ct,ugt),Fo(Gt,hgt),Fo(Gt,zW)),za.mathMl===!0&&(Fo(Ct,lgt),Fo(Gt,_Pt),Fo(Gt,zW))),cn.ADD_TAGS&&(Ct===kt&&(Ct=XL(Ct)),Fo(Ct,cn.ADD_TAGS,Zs)),cn.ADD_ATTR&&(Gt===Fe&&(Gt=XL(Gt)),Fo(Gt,cn.ADD_ATTR,Zs)),cn.ADD_URI_SAFE_ATTR&&Fo(ke,cn.ADD_URI_SAFE_ATTR,Zs),cn.FORBID_CONTENTS&&(br===An&&(br=XL(br)),Fo(br,cn.FORBID_CONTENTS,Zs)),ga&&(Ct["#text"]=!0),Xt&&Fo(Ct,["html","head","body"]),Ct.table&&(Fo(Ct,["tbody"]),delete pn.tbody),cn.TRUSTED_TYPES_POLICY){if(typeof cn.TRUSTED_TYPES_POLICY.createHTML!="function")throw yF('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof cn.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw yF('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');wt=cn.TRUSTED_TYPES_POLICY,mt=wt.createHTML("")}else wt===void 0&&(wt=ZDe(B,g)),wt!==null&&typeof mt=="string"&&(mt=wt.createHTML(""));Wg&&Wg(cn),d1=cn}},wc=Fo({},["mi","mo","mn","ms","mtext"]),Ea=Fo({},["foreignobject","desc","title","annotation-xml"]),gu=Fo({},["title","style","font","a","script"]),ta=Fo({},cgt);Fo(ta,ugt),Fo(ta,HDe);const fo=Fo({},lgt);Fo(fo,VDe);const mc=function(cn){let Nr=ft(cn);(!Nr||!Nr.tagName)&&(Nr={namespaceURI:qa,tagName:"template"});const Si=jW(cn.tagName),vc=jW(Nr.tagName);return ko[cn.namespaceURI]?cn.namespaceURI===an?Nr.namespaceURI===xn?Si==="svg":Nr.namespaceURI===Je?Si==="svg"&&(vc==="annotation-xml"||wc[vc]):!!ta[Si]:cn.namespaceURI===Je?Nr.namespaceURI===xn?Si==="math":Nr.namespaceURI===an?Si==="math"&&Ea[vc]:!!fo[Si]:cn.namespaceURI===xn?Nr.namespaceURI===an&&!Ea[vc]||Nr.namespaceURI===Je&&!wc[vc]?!1:!fo[Si]&&(gu[Si]||!ta[Si]):!!(Ha==="application/xhtml+xml"&&ko[cn.namespaceURI]):!1},ca=function(cn){vF(a.removed,{element:cn});try{cn.parentNode.removeChild(cn)}catch{cn.remove()}},ya=function(cn,Nr){try{vF(a.removed,{attribute:Nr.getAttributeNode(cn),from:Nr})}catch{vF(a.removed,{attribute:null,from:Nr})}if(Nr.removeAttribute(cn),cn==="is"&&!Gt[cn])if(Mn||ce)try{ca(Nr)}catch{}else try{Nr.setAttribute(cn,"")}catch{}},ea=function(cn){let Nr,Si;if(xe)cn="<remove></remove>"+cn;else{const Eh=jDe(cn,/^[\r\n\t ]+/);Si=Eh&&Eh[0]}Ha==="application/xhtml+xml"&&qa===xn&&(cn='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+cn+"</body></html>");const vc=wt?wt.createHTML(cn):cn;if(qa===xn)try{Nr=new R().parseFromString(vc,Ha)}catch{}if(!Nr||!Nr.documentElement){Nr=ct.createDocument(qa,"template",null);try{Nr.documentElement.innerHTML=xo?mt:vc}catch{}}const Rc=Nr.body||Nr.documentElement;return cn&&Si&&Rc.insertBefore(w.createTextNode(Si),Rc.childNodes[0]||null),qa===xn?gt.call(Nr,Xt?"html":"body")[0]:Xt?Nr.documentElement:Rc},Zl=function(cn){return rt.call(cn.ownerDocument||cn,cn,_.SHOW_ELEMENT|_.SHOW_COMMENT|_.SHOW_TEXT,null,!1)},Uc=function(cn){return cn instanceof F&&(typeof cn.nodeName!="string"||typeof cn.textContent!="string"||typeof cn.removeChild!="function"||!(cn.attributes instanceof M)||typeof cn.removeAttribute!="function"||typeof cn.setAttribute!="function"||typeof cn.namespaceURI!="string"||typeof cn.insertBefore!="function"||typeof cn.hasChildNodes!="function")},rm=function(cn){return typeof E=="object"?cn instanceof E:cn&&typeof cn=="object"&&typeof cn.nodeType=="number"&&typeof cn.nodeName=="string"},kh=function(cn,Nr,Si){dt[cn]&&RDe(dt[cn],vc=>{vc.call(a,Nr,Si,d1)})},Md=function(cn){let Nr;if(kh("beforeSanitizeElements",cn,null),Uc(cn))return ca(cn),!0;const Si=Zs(cn.nodeName);if(kh("uponSanitizeElement",cn,{tagName:Si,allowedTags:Ct}),cn.hasChildNodes()&&!rm(cn.firstElementChild)&&(!rm(cn.content)||!rm(cn.content.firstElementChild))&&E2(/<[/\w]/g,cn.innerHTML)&&E2(/<[/\w]/g,cn.textContent))return ca(cn),!0;if(!Ct[Si]||pn[Si]){if(!pn[Si]&&Id(Si)&&(Mt.tagNameCheck instanceof RegExp&&E2(Mt.tagNameCheck,Si)||Mt.tagNameCheck instanceof Function&&Mt.tagNameCheck(Si)))return!1;if(ga&&!br[Si]){const vc=ft(cn)||cn.parentNode,Rc=ot(cn)||cn.childNodes;if(Rc&&vc){const Eh=Rc.length;for(let Zc=Eh-1;Zc>=0;--Zc)vc.insertBefore(Y(Rc[Zc],!0),nt(cn))}}return ca(cn),!0}return cn instanceof S&&!mc(cn)||(Si==="noscript"||Si==="noembed"||Si==="noframes")&&E2(/<\/no(script|embed|frames)/i,cn.innerHTML)?(ca(cn),!0):(Ne&&cn.nodeType===3&&(Nr=cn.textContent,Nr=Hv(Nr,K," "),Nr=Hv(Nr,yt," "),Nr=Hv(Nr,V," "),cn.textContent!==Nr&&(vF(a.removed,{element:cn.cloneNode()}),cn.textContent=Nr)),kh("afterSanitizeElements",cn,null),!1)},w0=function(cn,Nr,Si){if(we&&(Nr==="id"||Nr==="name")&&(Si in w||Si in I2))return!1;if(!(tn&&!Ae[Nr]&&E2(Ot,Nr))){if(!(ye&&E2(It,Nr))){if(!Gt[Nr]||Ae[Nr]){if(!(Id(cn)&&(Mt.tagNameCheck instanceof RegExp&&E2(Mt.tagNameCheck,cn)||Mt.tagNameCheck instanceof Function&&Mt.tagNameCheck(cn))&&(Mt.attributeNameCheck instanceof RegExp&&E2(Mt.attributeNameCheck,Nr)||Mt.attributeNameCheck instanceof Function&&Mt.attributeNameCheck(Nr))||Nr==="is"&&Mt.allowCustomizedBuiltInElements&&(Mt.tagNameCheck instanceof RegExp&&E2(Mt.tagNameCheck,Si)||Mt.tagNameCheck instanceof Function&&Mt.tagNameCheck(Si))))return!1}else if(!ke[Nr]){if(!E2(Ft,Hv(Si,xt,""))){if(!((Nr==="src"||Nr==="xlink:href"||Nr==="href")&&cn!=="script"&&$De(Si,"data:")===0&&Nn[cn])){if(!(sn&&!E2(jt,Hv(Si,xt,"")))){if(Si)return!1}}}}}}return!0},Id=function(cn){return cn.indexOf("-")>0},m0=function(cn){let Nr,Si,vc,Rc;kh("beforeSanitizeAttributes",cn,null);const{attributes:Eh}=cn;if(!Eh)return;const Zc={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Gt};for(Rc=Eh.length;Rc--;){Nr=Eh[Rc];const{name:Qh,namespaceURI:Od}=Nr;if(Si=Qh==="value"?Nr.value:zDe(Nr.value),vc=Zs(Qh),Zc.attrName=vc,Zc.attrValue=Si,Zc.keepAttr=!0,Zc.forceKeepAttr=void 0,kh("uponSanitizeAttribute",cn,Zc),Si=Zc.attrValue,Zc.forceKeepAttr||(ya(Qh,cn),!Zc.keepAttr))continue;if(!be&&E2(/\/>/i,Si)){ya(Qh,cn);continue}Ne&&(Si=Hv(Si,K," "),Si=Hv(Si,yt," "),Si=Hv(Si,V," "));const cs=Zs(cn.nodeName);if(w0(cs,vc,Si)){if(Fi&&(vc==="id"||vc==="name")&&(ya(Qh,cn),Si=mi+Si),wt&&typeof B=="object"&&typeof B.getAttributeType=="function"&&!Od)switch(B.getAttributeType(cs,vc)){case"TrustedHTML":{Si=wt.createHTML(Si);break}case"TrustedScriptURL":{Si=wt.createScriptURL(Si);break}}try{Od?cn.setAttributeNS(Od,Qh,Si):cn.setAttribute(Qh,Si),EPt(a.removed)}catch{}}}kh("afterSanitizeAttributes",cn,null)},hg=function Gi(cn){let Nr;const Si=Zl(cn);for(kh("beforeSanitizeShadowDOM",cn,null);Nr=Si.nextNode();)kh("uponSanitizeShadowNode",Nr,null),!Md(Nr)&&(Nr.content instanceof v&&Gi(Nr.content),m0(Nr));kh("afterSanitizeShadowDOM",cn,null)};return a.sanitize=function(Gi){let cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Nr,Si,vc,Rc;if(xo=!Gi,xo&&(Gi="<!-->"),typeof Gi!="string"&&!rm(Gi))if(typeof Gi.toString=="function"){if(Gi=Gi.toString(),typeof Gi!="string")throw yF("dirty is not a string, aborting")}else throw yF("toString is not a function");if(!a.isSupported)return Gi;if(_e||Ic(cn),a.removed=[],typeof Gi=="string"&&(Ss=!1),Ss){if(Gi.nodeName){const Qh=Zs(Gi.nodeName);if(!Ct[Qh]||pn[Qh])throw yF("root node is forbidden and cannot be sanitized in-place")}}else if(Gi instanceof E)Nr=ea("<!---->"),Si=Nr.ownerDocument.importNode(Gi,!0),Si.nodeType===1&&Si.nodeName==="BODY"||Si.nodeName==="HTML"?Nr=Si:Nr.appendChild(Si);else{if(!Mn&&!Ne&&!Xt&&Gi.indexOf("<")===-1)return wt&&Br?wt.createHTML(Gi):Gi;if(Nr=ea(Gi),!Nr)return Mn?null:Br?mt:""}Nr&&xe&&ca(Nr.firstChild);const Eh=Zl(Ss?Gi:Nr);for(;vc=Eh.nextNode();)Md(vc)||(vc.content instanceof v&&hg(vc.content),m0(vc));if(Ss)return Gi;if(Mn){if(ce)for(Rc=it.call(Nr.ownerDocument);Nr.firstChild;)Rc.appendChild(Nr.firstChild);else Rc=Nr;return(Gt.shadowroot||Gt.shadowrootmode)&&(Rc=Q.call(f,Rc,!0)),Rc}let Zc=Xt?Nr.outerHTML:Nr.innerHTML;return Xt&&Ct["!doctype"]&&Nr.ownerDocument&&Nr.ownerDocument.doctype&&Nr.ownerDocument.doctype.name&&E2(LPt,Nr.ownerDocument.doctype.name)&&(Zc="<!DOCTYPE "+Nr.ownerDocument.doctype.name+`>
92 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Nn=this.next();return Nn||this.lex()},begin:function(Nn){this.conditionStack.push(Nn)},popState:function(){var Nn=this.conditionStack.length-1;return Nn>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Nn){return Nn=this.conditionStack.length-1-Math.abs(Nn||0),Nn>=0?this.conditionStack[Nn]:"INITIAL"},pushState:function(Nn){this.begin(Nn)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(Nn,Bn,ke,pe){switch(ke){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return br}();ga.lexer=Ss;function za(){this.yy={}}return za.prototype=ga,ga.Parser=za,new za}();SY.parser=SY;const xRe=SY;let Wv=[],y8=[""],ep="global",Yv="",i4=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],jF=[],Qgt="",Jgt=!1,_Y=4,AY=2;var rRt;const kRe=function(){return rRt},ERe=function(i){rRt=Ef(i,Re())},TRe=function(i,a,f,g,w,v,b,E,S){if(i==null||a===void 0||a===null||f===void 0||f===null||g===void 0||g===null)return;let _={};const M=jF.find(F=>F.from===a&&F.to===f);if(M?_=M:jF.push(_),_.type=i,_.from=a,_.to=f,_.label={text:g},w==null)_.techn={text:""};else if(typeof w=="object"){let[F,R]=Object.entries(w)[0];_[F]={text:R}}else _.techn={text:w};if(v==null)_.descr={text:""};else if(typeof v=="object"){let[F,R]=Object.entries(v)[0];_[F]={text:R}}else _.descr={text:v};if(typeof b=="object"){let[F,R]=Object.entries(b)[0];_[F]=R}else _.sprite=b;if(typeof E=="object"){let[F,R]=Object.entries(E)[0];_[F]=R}else _.tags=E;if(typeof S=="object"){let[F,R]=Object.entries(S)[0];_[F]=R}else _.link=S;_.wrap=x8()},CRe=function(i,a,f,g,w,v,b){if(a===null||f===null)return;let E={};const S=Wv.find(_=>_.alias===a);if(S&&a===S.alias?E=S:(E.alias=a,Wv.push(E)),f==null?E.label={text:""}:E.label={text:f},g==null)E.descr={text:""};else if(typeof g=="object"){let[_,M]=Object.entries(g)[0];E[_]={text:M}}else E.descr={text:g};if(typeof w=="object"){let[_,M]=Object.entries(w)[0];E[_]=M}else E.sprite=w;if(typeof v=="object"){let[_,M]=Object.entries(v)[0];E[_]=M}else E.tags=v;if(typeof b=="object"){let[_,M]=Object.entries(b)[0];E[_]=M}else E.link=b;E.typeC4Shape={text:i},E.parentBoundary=ep,E.wrap=x8()},SRe=function(i,a,f,g,w,v,b,E){if(a===null||f===null)return;let S={};const _=Wv.find(M=>M.alias===a);if(_&&a===_.alias?S=_:(S.alias=a,Wv.push(S)),f==null?S.label={text:""}:S.label={text:f},g==null)S.techn={text:""};else if(typeof g=="object"){let[M,F]=Object.entries(g)[0];S[M]={text:F}}else S.techn={text:g};if(w==null)S.descr={text:""};else if(typeof w=="object"){let[M,F]=Object.entries(w)[0];S[M]={text:F}}else S.descr={text:w};if(typeof v=="object"){let[M,F]=Object.entries(v)[0];S[M]=F}else S.sprite=v;if(typeof b=="object"){let[M,F]=Object.entries(b)[0];S[M]=F}else S.tags=b;if(typeof E=="object"){let[M,F]=Object.entries(E)[0];S[M]=F}else S.link=E;S.wrap=x8(),S.typeC4Shape={text:i},S.parentBoundary=ep},_Re=function(i,a,f,g,w,v,b,E){if(a===null||f===null)return;let S={};const _=Wv.find(M=>M.alias===a);if(_&&a===_.alias?S=_:(S.alias=a,Wv.push(S)),f==null?S.label={text:""}:S.label={text:f},g==null)S.techn={text:""};else if(typeof g=="object"){let[M,F]=Object.entries(g)[0];S[M]={text:F}}else S.techn={text:g};if(w==null)S.descr={text:""};else if(typeof w=="object"){let[M,F]=Object.entries(w)[0];S[M]={text:F}}else S.descr={text:w};if(typeof v=="object"){let[M,F]=Object.entries(v)[0];S[M]=F}else S.sprite=v;if(typeof b=="object"){let[M,F]=Object.entries(b)[0];S[M]=F}else S.tags=b;if(typeof E=="object"){let[M,F]=Object.entries(E)[0];S[M]=F}else S.link=E;S.wrap=x8(),S.typeC4Shape={text:i},S.parentBoundary=ep},ARe=function(i,a,f,g,w){if(i===null||a===null)return;let v={};const b=i4.find(E=>E.alias===i);if(b&&i===b.alias?v=b:(v.alias=i,i4.push(v)),a==null?v.label={text:""}:v.label={text:a},f==null)v.type={text:"system"};else if(typeof f=="object"){let[E,S]=Object.entries(f)[0];v[E]={text:S}}else v.type={text:f};if(typeof g=="object"){let[E,S]=Object.entries(g)[0];v[E]=S}else v.tags=g;if(typeof w=="object"){let[E,S]=Object.entries(w)[0];v[E]=S}else v.link=w;v.parentBoundary=ep,v.wrap=x8(),Yv=ep,ep=i,y8.push(Yv)},LRe=function(i,a,f,g,w){if(i===null||a===null)return;let v={};const b=i4.find(E=>E.alias===i);if(b&&i===b.alias?v=b:(v.alias=i,i4.push(v)),a==null?v.label={text:""}:v.label={text:a},f==null)v.type={text:"container"};else if(typeof f=="object"){let[E,S]=Object.entries(f)[0];v[E]={text:S}}else v.type={text:f};if(typeof g=="object"){let[E,S]=Object.entries(g)[0];v[E]=S}else v.tags=g;if(typeof w=="object"){let[E,S]=Object.entries(w)[0];v[E]=S}else v.link=w;v.parentBoundary=ep,v.wrap=x8(),Yv=ep,ep=i,y8.push(Yv)},DRe=function(i,a,f,g,w,v,b,E){if(a===null||f===null)return;let S={};const _=i4.find(M=>M.alias===a);if(_&&a===_.alias?S=_:(S.alias=a,i4.push(S)),f==null?S.label={text:""}:S.label={text:f},g==null)S.type={text:"node"};else if(typeof g=="object"){let[M,F]=Object.entries(g)[0];S[M]={text:F}}else S.type={text:g};if(w==null)S.descr={text:""};else if(typeof w=="object"){let[M,F]=Object.entries(w)[0];S[M]={text:F}}else S.descr={text:w};if(typeof b=="object"){let[M,F]=Object.entries(b)[0];S[M]=F}else S.tags=b;if(typeof E=="object"){let[M,F]=Object.entries(E)[0];S[M]=F}else S.link=E;S.nodeType=i,S.parentBoundary=ep,S.wrap=x8(),Yv=ep,ep=a,y8.push(Yv)},MRe=function(){ep=Yv,y8.pop(),Yv=y8.pop(),y8.push(Yv)},IRe=function(i,a,f,g,w,v,b,E,S,_,M){let F=Wv.find(R=>R.alias===a);if(!(F===void 0&&(F=i4.find(R=>R.alias===a),F===void 0))){if(f!=null)if(typeof f=="object"){let[R,B]=Object.entries(f)[0];F[R]=B}else F.bgColor=f;if(g!=null)if(typeof g=="object"){let[R,B]=Object.entries(g)[0];F[R]=B}else F.fontColor=g;if(w!=null)if(typeof w=="object"){let[R,B]=Object.entries(w)[0];F[R]=B}else F.borderColor=w;if(v!=null)if(typeof v=="object"){let[R,B]=Object.entries(v)[0];F[R]=B}else F.shadowing=v;if(b!=null)if(typeof b=="object"){let[R,B]=Object.entries(b)[0];F[R]=B}else F.shape=b;if(E!=null)if(typeof E=="object"){let[R,B]=Object.entries(E)[0];F[R]=B}else F.sprite=E;if(S!=null)if(typeof S=="object"){let[R,B]=Object.entries(S)[0];F[R]=B}else F.techn=S;if(_!=null)if(typeof _=="object"){let[R,B]=Object.entries(_)[0];F[R]=B}else F.legendText=_;if(M!=null)if(typeof M=="object"){let[R,B]=Object.entries(M)[0];F[R]=B}else F.legendSprite=M}},ORe=function(i,a,f,g,w,v,b){const E=jF.find(S=>S.from===a&&S.to===f);if(E!==void 0){if(g!=null)if(typeof g=="object"){let[S,_]=Object.entries(g)[0];E[S]=_}else E.textColor=g;if(w!=null)if(typeof w=="object"){let[S,_]=Object.entries(w)[0];E[S]=_}else E.lineColor=w;if(v!=null)if(typeof v=="object"){let[S,_]=Object.entries(v)[0];E[S]=parseInt(_)}else E.offsetX=parseInt(v);if(b!=null)if(typeof b=="object"){let[S,_]=Object.entries(b)[0];E[S]=parseInt(_)}else E.offsetY=parseInt(b)}},NRe=function(i,a,f){let g=_Y,w=AY;if(typeof a=="object"){const v=Object.values(a)[0];g=parseInt(v)}else g=parseInt(a);if(typeof f=="object"){const v=Object.values(f)[0];w=parseInt(v)}else w=parseInt(f);g>=1&&(_Y=g),w>=1&&(AY=w)},PRe=function(){return _Y},FRe=function(){return AY},BRe=function(){return ep},RRe=function(){return Yv},iRt=function(i){return i==null?Wv:Wv.filter(a=>a.parentBoundary===i)},jRe=function(i){return Wv.find(a=>a.alias===i)},$Re=function(i){return Object.keys(iRt(i))},zRe=function(i){return i==null?i4:i4.filter(a=>a.parentBoundary===i)},qRe=function(){return jF},HRe=function(){return Qgt},VRe=function(i){Jgt=i},x8=function(){return Jgt},Zgt={addPersonOrSystem:CRe,addPersonOrSystemBoundary:ARe,addContainer:SRe,addContainerBoundary:LRe,addComponent:_Re,addDeploymentNode:DRe,popBoundaryParseStack:MRe,addRel:TRe,updateElStyle:IRe,updateRelStyle:ORe,updateLayoutConfig:NRe,autoWrap:x8,setWrap:VRe,getC4ShapeArray:iRt,getC4Shape:jRe,getC4ShapeKeys:$Re,getBoundarys:zRe,getCurrentBoundaryParse:BRe,getParentBoundaryParse:RRe,getRels:qRe,getTitle:HRe,getC4Type:kRe,getC4ShapeInRow:PRe,getC4BoundaryInRow:FRe,setAccTitle:og,getAccTitle:Xg,getAccDescription:Jg,setAccDescription:Qg,getConfig:()=>Re().c4,clear:function(){Wv=[],i4=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Yv="",ep="global",y8=[""],jF=[],y8=[""],Qgt="",Jgt=!1,_Y=4,AY=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(i){Qgt=Ef(i,Re())},setC4Type:ERe},LY=(i,a)=>{const f=i.append("rect");if(f.attr("x",a.x),f.attr("y",a.y),f.attr("fill",a.fill),f.attr("stroke",a.stroke),f.attr("width",a.width),f.attr("height",a.height),a.rx!==void 0&&f.attr("rx",a.rx),a.ry!==void 0&&f.attr("ry",a.ry),a.attrs!==void 0)for(const g in a.attrs)f.attr(g,a.attrs[g]);return a.class!==void 0&&f.attr("class",a.class),f},sRt=(i,a)=>{const f={x:a.startx,y:a.starty,width:a.stopx-a.startx,height:a.stopy-a.starty,fill:a.fill,stroke:a.stroke,class:"rect"};LY(i,f).lower()},URe=(i,a)=>{const f=a.text.replace(xF," "),g=i.append("text");g.attr("x",a.x),g.attr("y",a.y),g.attr("class","legend"),g.style("text-anchor",a.anchor),a.class!==void 0&&g.attr("class",a.class);const w=g.append("tspan");return w.attr("x",a.x+a.textMargin*2),w.text(f),g},GRe=(i,a,f,g)=>{const w=i.append("image");w.attr("x",a),w.attr("y",f);const v=h8(g);w.attr("xlink:href",v)},KRe=(i,a,f,g)=>{const w=i.append("use");w.attr("x",a),w.attr("y",f);const v=h8(g);w.attr("xlink:href",`#${v}`)},_9=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),tpt=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),ept=function(i,a){return LY(i,a)},aRt=function(i,a,f,g,w,v){const b=i.append("image");b.attr("width",a),b.attr("height",f),b.attr("x",g),b.attr("y",w);let E=v.startsWith("data:image/png;base64")?v:h8(v);b.attr("xlink:href",E)},WRe=(i,a,f)=>{const g=i.append("g");let w=0;for(let v of a){let b=v.textColor?v.textColor:"#444444",E=v.lineColor?v.lineColor:"#444444",S=v.offsetX?parseInt(v.offsetX):0,_=v.offsetY?parseInt(v.offsetY):0,M="";if(w===0){let R=g.append("line");R.attr("x1",v.startPoint.x),R.attr("y1",v.startPoint.y),R.attr("x2",v.endPoint.x),R.attr("y2",v.endPoint.y),R.attr("stroke-width","1"),R.attr("stroke",E),R.style("fill","none"),v.type!=="rel_b"&&R.attr("marker-end","url("+M+"#arrowhead)"),(v.type==="birel"||v.type==="rel_b")&&R.attr("marker-start","url("+M+"#arrowend)"),w=-1}else{let R=g.append("path");R.attr("fill","none").attr("stroke-width","1").attr("stroke",E).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",v.startPoint.x).replaceAll("starty",v.startPoint.y).replaceAll("controlx",v.startPoint.x+(v.endPoint.x-v.startPoint.x)/2-(v.endPoint.x-v.startPoint.x)/4).replaceAll("controly",v.startPoint.y+(v.endPoint.y-v.startPoint.y)/2).replaceAll("stopx",v.endPoint.x).replaceAll("stopy",v.endPoint.y)),v.type!=="rel_b"&&R.attr("marker-end","url("+M+"#arrowhead)"),(v.type==="birel"||v.type==="rel_b")&&R.attr("marker-start","url("+M+"#arrowend)")}let F=f.messageFont();Nx(f)(v.label.text,g,Math.min(v.startPoint.x,v.endPoint.x)+Math.abs(v.endPoint.x-v.startPoint.x)/2+S,Math.min(v.startPoint.y,v.endPoint.y)+Math.abs(v.endPoint.y-v.startPoint.y)/2+_,v.label.width,v.label.height,{fill:b},F),v.techn&&v.techn.text!==""&&(F=f.messageFont(),Nx(f)("["+v.techn.text+"]",g,Math.min(v.startPoint.x,v.endPoint.x)+Math.abs(v.endPoint.x-v.startPoint.x)/2+S,Math.min(v.startPoint.y,v.endPoint.y)+Math.abs(v.endPoint.y-v.startPoint.y)/2+f.messageFontSize+5+_,Math.max(v.label.width,v.techn.width),v.techn.height,{fill:b,"font-style":"italic"},F))}},YRe=function(i,a,f){const g=i.append("g");let w=a.bgColor?a.bgColor:"none",v=a.borderColor?a.borderColor:"#444444",b=a.fontColor?a.fontColor:"black",E={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};a.nodeType&&(E={"stroke-width":1});let S={x:a.x,y:a.y,fill:w,stroke:v,width:a.width,height:a.height,rx:2.5,ry:2.5,attrs:E};ept(g,S);let _=f.boundaryFont();_.fontWeight="bold",_.fontSize=_.fontSize+2,_.fontColor=b,Nx(f)(a.label.text,g,a.x,a.y+a.label.Y,a.width,a.height,{fill:"#444444"},_),a.type&&a.type.text!==""&&(_=f.boundaryFont(),_.fontColor=b,Nx(f)(a.type.text,g,a.x,a.y+a.type.Y,a.width,a.height,{fill:"#444444"},_)),a.descr&&a.descr.text!==""&&(_=f.boundaryFont(),_.fontSize=_.fontSize-2,_.fontColor=b,Nx(f)(a.descr.text,g,a.x,a.y+a.descr.Y,a.width,a.height,{fill:"#444444"},_))},XRe=function(i,a,f){var F;let g=a.bgColor?a.bgColor:f[a.typeC4Shape.text+"_bg_color"],w=a.borderColor?a.borderColor:f[a.typeC4Shape.text+"_border_color"],v=a.fontColor?a.fontColor:"#FFFFFF",b="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(a.typeC4Shape.text){case"person":b="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":b="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const E=i.append("g");E.attr("class","person-man");const S=_9();switch(a.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":S.x=a.x,S.y=a.y,S.fill=g,S.width=a.width,S.height=a.height,S.stroke=w,S.rx=2.5,S.ry=2.5,S.attrs={"stroke-width":.5},ept(E,S);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":E.append("path").attr("fill",g).attr("stroke-width","0.5").attr("stroke",w).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",a.x).replaceAll("starty",a.y).replaceAll("half",a.width/2).replaceAll("height",a.height)),E.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",w).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",a.x).replaceAll("starty",a.y).replaceAll("half",a.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":E.append("path").attr("fill",g).attr("stroke-width","0.5").attr("stroke",w).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",a.x).replaceAll("starty",a.y).replaceAll("width",a.width).replaceAll("half",a.height/2)),E.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",w).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",a.x+a.width).replaceAll("starty",a.y).replaceAll("half",a.height/2));break}let _=sje(f,a.typeC4Shape.text);switch(E.append("text").attr("fill",v).attr("font-family",_.fontFamily).attr("font-size",_.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",a.typeC4Shape.width).attr("x",a.x+a.width/2-a.typeC4Shape.width/2).attr("y",a.y+a.typeC4Shape.Y).text("<<"+a.typeC4Shape.text+">>"),a.typeC4Shape.text){case"person":case"external_person":aRt(E,48,48,a.x+a.width/2-24,a.y+a.image.Y,b);break}let M=f[a.typeC4Shape.text+"Font"]();return M.fontWeight="bold",M.fontSize=M.fontSize+2,M.fontColor=v,Nx(f)(a.label.text,E,a.x,a.y+a.label.Y,a.width,a.height,{fill:v},M),M=f[a.typeC4Shape.text+"Font"](),M.fontColor=v,a.techn&&((F=a.techn)==null?void 0:F.text)!==""?Nx(f)(a.techn.text,E,a.x,a.y+a.techn.Y,a.width,a.height,{fill:v,"font-style":"italic"},M):a.type&&a.type.text!==""&&Nx(f)(a.type.text,E,a.x,a.y+a.type.Y,a.width,a.height,{fill:v,"font-style":"italic"},M),a.descr&&a.descr.text!==""&&(M=f.personFont(),M.fontColor=v,Nx(f)(a.descr.text,E,a.x,a.y+a.descr.Y,a.width,a.height,{fill:v},M)),a.height},QRe=function(i){i.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},JRe=function(i){i.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},ZRe=function(i){i.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},tje=function(i){i.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},eje=function(i){i.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},nje=function(i){i.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},rje=function(i){i.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},ije=function(i){const f=i.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);f.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),f.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},sje=(i,a)=>({fontFamily:i[a+"FontFamily"],fontSize:i[a+"FontSize"],fontWeight:i[a+"FontWeight"]}),Nx=function(){function i(w,v,b,E,S,_,M){const F=v.append("text").attr("x",b+S/2).attr("y",E+_/2+5).style("text-anchor","middle").text(w);g(F,M)}function a(w,v,b,E,S,_,M,F){const{fontSize:R,fontFamily:B,fontWeight:z}=F,Y=w.split(ei.lineBreakRegex);for(let nt=0;nt<Y.length;nt++){const ot=nt*R-R*(Y.length-1)/2,ft=v.append("text").attr("x",b+S/2).attr("y",E).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",R).style("font-weight",z).style("font-family",B);ft.append("tspan").attr("dy",ot).text(Y[nt]).attr("alignment-baseline","mathematical"),g(ft,M)}}function f(w,v,b,E,S,_,M,F){const R=v.append("switch"),z=R.append("foreignObject").attr("x",b).attr("y",E).attr("width",S).attr("height",_).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");z.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(w),a(w,R,b,E,S,_,M,F),g(z,M)}function g(w,v){for(const b in v)v.hasOwnProperty(b)&&w.attr(b,v[b])}return function(w){return w.textPlacement==="fo"?f:w.textPlacement==="old"?i:a}}(),s4={drawRect:ept,drawBoundary:YRe,drawC4Shape:XRe,drawRels:WRe,drawImage:aRt,insertArrowHead:tje,insertArrowEnd:eje,insertArrowFilledHead:nje,insertDynamicNumber:rje,insertArrowCrossHead:ije,insertDatabaseIcon:QRe,insertComputerIcon:JRe,insertClockIcon:ZRe};let DY=0,MY=0,oRt=4,npt=2;SY.yy=Zgt;let Cs={};class cRt{constructor(a){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,rpt(a.db.getConfig())}setData(a,f,g,w){this.nextData.startx=this.data.startx=a,this.nextData.stopx=this.data.stopx=f,this.nextData.starty=this.data.starty=g,this.nextData.stopy=this.data.stopy=w}updateVal(a,f,g,w){a[f]===void 0?a[f]=g:a[f]=w(g,a[f])}insert(a){this.nextData.cnt=this.nextData.cnt+1;let f=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+a.margin:this.nextData.stopx+a.margin*2,g=f+a.width,w=this.nextData.starty+a.margin*2,v=w+a.height;(f>=this.data.widthLimit||g>=this.data.widthLimit||this.nextData.cnt>oRt)&&(f=this.nextData.startx+a.margin+Cs.nextLinePaddingX,w=this.nextData.stopy+a.margin*2,this.nextData.stopx=g=f+a.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=v=w+a.height,this.nextData.cnt=1),a.x=f,a.y=w,this.updateVal(this.data,"startx",f,Math.min),this.updateVal(this.data,"starty",w,Math.min),this.updateVal(this.data,"stopx",g,Math.max),this.updateVal(this.data,"stopy",v,Math.max),this.updateVal(this.nextData,"startx",f,Math.min),this.updateVal(this.nextData,"starty",w,Math.min),this.updateVal(this.nextData,"stopx",g,Math.max),this.updateVal(this.nextData,"stopy",v,Math.max)}init(a){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},rpt(a.db.getConfig())}bumpLastMargin(a){this.data.stopx+=a,this.data.stopy+=a}}const rpt=function(i){Ld(Cs,i),i.fontFamily&&(Cs.personFontFamily=Cs.systemFontFamily=Cs.messageFontFamily=i.fontFamily),i.fontSize&&(Cs.personFontSize=Cs.systemFontSize=Cs.messageFontSize=i.fontSize),i.fontWeight&&(Cs.personFontWeight=Cs.systemFontWeight=Cs.messageFontWeight=i.fontWeight)},$F=(i,a)=>({fontFamily:i[a+"FontFamily"],fontSize:i[a+"FontSize"],fontWeight:i[a+"FontWeight"]}),IY=i=>({fontFamily:i.boundaryFontFamily,fontSize:i.boundaryFontSize,fontWeight:i.boundaryFontWeight}),aje=i=>({fontFamily:i.messageFontFamily,fontSize:i.messageFontSize,fontWeight:i.messageFontWeight});function Xv(i,a,f,g,w){if(!a[i].width)if(f)a[i].text=LFt(a[i].text,w,g),a[i].textLines=a[i].text.split(ei.lineBreakRegex).length,a[i].width=w,a[i].height=Tgt(a[i].text,g);else{let v=a[i].text.split(ei.lineBreakRegex);a[i].textLines=v.length;let b=0;a[i].height=0,a[i].width=0;for(const E of v)a[i].width=Math.max(n4(E,g),a[i].width),b=Tgt(E,g),a[i].height=a[i].height+b}}const uRt=function(i,a,f){a.x=f.data.startx,a.y=f.data.starty,a.width=f.data.stopx-f.data.startx,a.height=f.data.stopy-f.data.starty,a.label.y=Cs.c4ShapeMargin-35;let g=a.wrap&&Cs.wrap,w=IY(Cs);w.fontSize=w.fontSize+2,w.fontWeight="bold";let v=n4(a.label.text,w);Xv("label",a,g,w,v),s4.drawBoundary(i,a,Cs)},lRt=function(i,a,f,g){let w=0;for(const v of g){w=0;const b=f[v];let E=$F(Cs,b.typeC4Shape.text);switch(E.fontSize=E.fontSize-2,b.typeC4Shape.width=n4("«"+b.typeC4Shape.text+"»",E),b.typeC4Shape.height=E.fontSize+2,b.typeC4Shape.Y=Cs.c4ShapePadding,w=b.typeC4Shape.Y+b.typeC4Shape.height-4,b.image={width:0,height:0,Y:0},b.typeC4Shape.text){case"person":case"external_person":b.image.width=48,b.image.height=48,b.image.Y=w,w=b.image.Y+b.image.height;break}b.sprite&&(b.image.width=48,b.image.height=48,b.image.Y=w,w=b.image.Y+b.image.height);let S=b.wrap&&Cs.wrap,_=Cs.width-Cs.c4ShapePadding*2,M=$F(Cs,b.typeC4Shape.text);if(M.fontSize=M.fontSize+2,M.fontWeight="bold",Xv("label",b,S,M,_),b.label.Y=w+8,w=b.label.Y+b.label.height,b.type&&b.type.text!==""){b.type.text="["+b.type.text+"]";let B=$F(Cs,b.typeC4Shape.text);Xv("type",b,S,B,_),b.type.Y=w+5,w=b.type.Y+b.type.height}else if(b.techn&&b.techn.text!==""){b.techn.text="["+b.techn.text+"]";let B=$F(Cs,b.techn.text);Xv("techn",b,S,B,_),b.techn.Y=w+5,w=b.techn.Y+b.techn.height}let F=w,R=b.label.width;if(b.descr&&b.descr.text!==""){let B=$F(Cs,b.typeC4Shape.text);Xv("descr",b,S,B,_),b.descr.Y=w+20,w=b.descr.Y+b.descr.height,R=Math.max(b.label.width,b.descr.width),F=w-b.descr.textLines*5}R=R+Cs.c4ShapePadding,b.width=Math.max(b.width||Cs.width,R,Cs.width),b.height=Math.max(b.height||Cs.height,F,Cs.height),b.margin=b.margin||Cs.c4ShapeMargin,i.insert(b),s4.drawC4Shape(a,b,Cs)}i.bumpLastMargin(Cs.c4ShapeMargin)};let Jw=class{constructor(a,f){this.x=a,this.y=f}},hRt=function(i,a){let f=i.x,g=i.y,w=a.x,v=a.y,b=f+i.width/2,E=g+i.height/2,S=Math.abs(f-w),_=Math.abs(g-v),M=_/S,F=i.height/i.width,R=null;return g==v&&f<w?R=new Jw(f+i.width,E):g==v&&f>w?R=new Jw(f,E):f==w&&g<v?R=new Jw(b,g+i.height):f==w&&g>v&&(R=new Jw(b,g)),f>w&&g<v?F>=M?R=new Jw(f,E+M*i.width/2):R=new Jw(b-S/_*i.height/2,g+i.height):f<w&&g<v?F>=M?R=new Jw(f+i.width,E+M*i.width/2):R=new Jw(b+S/_*i.height/2,g+i.height):f<w&&g>v?F>=M?R=new Jw(f+i.width,E-M*i.width/2):R=new Jw(b+i.height/2*S/_,g):f>w&&g>v&&(F>=M?R=new Jw(f,E-i.width/2*M):R=new Jw(b-i.height/2*S/_,g)),R},oje=function(i,a){let f={x:0,y:0};f.x=a.x+a.width/2,f.y=a.y+a.height/2;let g=hRt(i,f);f.x=i.x+i.width/2,f.y=i.y+i.height/2;let w=hRt(a,f);return{startPoint:g,endPoint:w}};const cje=function(i,a,f,g){let w=0;for(let v of a){w=w+1;let b=v.wrap&&Cs.wrap,E=aje(Cs);g.db.getC4Type()==="C4Dynamic"&&(v.label.text=w+": "+v.label.text);let _=n4(v.label.text,E);Xv("label",v,b,E,_),v.techn&&v.techn.text!==""&&(_=n4(v.techn.text,E),Xv("techn",v,b,E,_)),v.descr&&v.descr.text!==""&&(_=n4(v.descr.text,E),Xv("descr",v,b,E,_));let M=f(v.from),F=f(v.to),R=oje(M,F);v.startPoint=R.startPoint,v.endPoint=R.endPoint}s4.drawRels(i,a,Cs)};function fRt(i,a,f,g,w){let v=new cRt(w);v.data.widthLimit=f.data.widthLimit/Math.min(npt,g.length);for(let[b,E]of g.entries()){let S=0;E.image={width:0,height:0,Y:0},E.sprite&&(E.image.width=48,E.image.height=48,E.image.Y=S,S=E.image.Y+E.image.height);let _=E.wrap&&Cs.wrap,M=IY(Cs);if(M.fontSize=M.fontSize+2,M.fontWeight="bold",Xv("label",E,_,M,v.data.widthLimit),E.label.Y=S+8,S=E.label.Y+E.label.height,E.type&&E.type.text!==""){E.type.text="["+E.type.text+"]";let z=IY(Cs);Xv("type",E,_,z,v.data.widthLimit),E.type.Y=S+5,S=E.type.Y+E.type.height}if(E.descr&&E.descr.text!==""){let z=IY(Cs);z.fontSize=z.fontSize-2,Xv("descr",E,_,z,v.data.widthLimit),E.descr.Y=S+20,S=E.descr.Y+E.descr.height}if(b==0||b%npt===0){let z=f.data.startx+Cs.diagramMarginX,Y=f.data.stopy+Cs.diagramMarginY+S;v.setData(z,z,Y,Y)}else{let z=v.data.stopx!==v.data.startx?v.data.stopx+Cs.diagramMarginX:v.data.startx,Y=v.data.starty;v.setData(z,z,Y,Y)}v.name=E.alias;let F=w.db.getC4ShapeArray(E.alias),R=w.db.getC4ShapeKeys(E.alias);R.length>0&&lRt(v,i,F,R),a=E.alias;let B=w.db.getBoundarys(a);B.length>0&&fRt(i,a,v,B,w),E.alias!=="global"&&uRt(i,E,v),f.data.stopy=Math.max(v.data.stopy+Cs.c4ShapeMargin,f.data.stopy),f.data.stopx=Math.max(v.data.stopx+Cs.c4ShapeMargin,f.data.stopx),DY=Math.max(DY,f.data.stopx),MY=Math.max(MY,f.data.stopy)}}const dRt={drawPersonOrSystemArray:lRt,drawBoundary:uRt,setConf:rpt,draw:function(i,a,f,g){Cs=Re().c4;const w=Re().securityLevel;let v;w==="sandbox"&&(v=Tr("#i"+a));const b=Tr(w==="sandbox"?v.nodes()[0].contentDocument.body:"body");let E=g.db;g.db.setWrap(Cs.wrap),oRt=E.getC4ShapeInRow(),npt=E.getC4BoundaryInRow(),Kt.debug(`C:${JSON.stringify(Cs,null,2)}`);const S=w==="sandbox"?b.select(`[id="${a}"]`):Tr(`[id="${a}"]`);s4.insertComputerIcon(S),s4.insertDatabaseIcon(S),s4.insertClockIcon(S);let _=new cRt(g);_.setData(Cs.diagramMarginX,Cs.diagramMarginX,Cs.diagramMarginY,Cs.diagramMarginY),_.data.widthLimit=screen.availWidth,DY=Cs.diagramMarginX,MY=Cs.diagramMarginY;const M=g.db.getTitle();let F=g.db.getBoundarys("");fRt(S,"",_,F,g),s4.insertArrowHead(S),s4.insertArrowEnd(S),s4.insertArrowCrossHead(S),s4.insertArrowFilledHead(S),cje(S,g.db.getRels(),g.db.getC4Shape,g),_.data.stopx=DY,_.data.stopy=MY;const R=_.data;let z=R.stopy-R.starty+2*Cs.diagramMarginY;const nt=R.stopx-R.startx+2*Cs.diagramMarginX;M&&S.append("text").text(M).attr("x",(R.stopx-R.startx)/2-4*Cs.diagramMarginX).attr("y",R.starty+Cs.diagramMarginY),sg(S,z,nt,Cs.useMaxWidth);const ot=M?60:0;S.attr("viewBox",R.startx-Cs.diagramMarginX+" -"+(Cs.diagramMarginY+ot)+" "+nt+" "+(z+ot)),Kt.debug("models:",R)}},uje=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:xRe,db:Zgt,renderer:dRt,styles:i=>`.person {
106 `),w=0;w<g.length;w++)f.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(g[w]);return a4(f,a.labelStyle),f}function qVe(i){for(var a="",f=!1,g,w=0;w<i.length;++w)if(g=i[w],f){switch(g){case"n":a+=`
107 `;break;default:a+=g}f=!1}else g==="\\"?f=!0:a+=g;return a}function Ipt(i,a,f){var g=a.label,w=i.append("g");a.labelType==="svg"?$Ve(w,a):typeof g!="string"||a.labelType==="html"?Mpt(w,a):zVe(w,a);var v=w.node().getBBox(),b;switch(f){case"top":b=-a.height/2;break;case"bottom":b=a.height/2-v.height;break;default:b=-v.height/2}return w.attr("transform","translate("+-v.width/2+","+b+")"),w}var Opt=function(i,a){var f=a.nodes().filter(function(v){return t$t(a,v)}),g=i.selectAll("g.cluster").data(f,function(v){return v});Jv(g.exit(),a).style("opacity",0).remove();var w=g.enter().append("g").attr("class","cluster").attr("id",function(v){var b=a.node(v);return b.id}).style("opacity",0).each(function(v){var b=a.node(v),E=Tr(this);Tr(this).append("rect");var S=E.append("g").attr("class","label");Ipt(S,b,b.clusterLabelPos)});return g=g.merge(w),g=Jv(g,a).style("opacity",1),g.selectAll("rect").each(function(v){var b=a.node(v),E=Tr(this);a4(E,b.style)}),g};function HVe(i){Opt=i}let Npt=function(i,a){var f=i.selectAll("g.edgeLabel").data(a.edges(),function(w){return e$t(w)}).classed("update",!0);f.exit().remove(),f.enter().append("g").classed("edgeLabel",!0).style("opacity",0),f=i.selectAll("g.edgeLabel"),f.each(function(w){var v=Tr(this);v.select(".label").remove();var b=a.edge(w),E=Ipt(v,a.edge(w),0).classed("label",!0),S=E.node().getBBox();b.labelId&&E.attr("id",b.labelId),lo(b,"width")||(b.width=S.width),lo(b,"height")||(b.height=S.height)});var g;return f.exit?g=f.exit():g=f.selectAll(null),Jv(g,a).style("opacity",0).remove(),f};function VVe(i){Npt=i}function r$t(i,a){return i.intersect(a)}var Ppt=function(i,a,f){var g=i.selectAll("g.edgePath").data(a.edges(),function(b){return e$t(b)}).classed("update",!0),w=YVe(g,a);XVe(g,a);var v=g.merge!==void 0?g.merge(w):g;return Jv(v,a).style("opacity",1),v.each(function(b){var E=Tr(this),S=a.edge(b);S.elem=this,S.id&&E.attr("id",S.id),n$t(E,S.class,(E.classed("update")?"update ":"")+"edgePath")}),v.selectAll("path.path").each(function(b){var E=a.edge(b);E.arrowheadId=WY("arrowhead");var S=Tr(this).attr("marker-end",function(){return"url("+GVe(location.href,E.arrowheadId)+")"}).style("fill","none");Jv(S,a).attr("d",function(_){return KVe(a,_)}),a4(S,E.style)}),v.selectAll("defs *").remove(),v.selectAll("defs").each(function(b){var E=a.edge(b),S=f[E.arrowhead];S(Tr(this),E.arrowheadId,E,"arrowhead")}),v};function UVe(i){Ppt=i}function GVe(i,a){var f=i.split("#")[0];return f+"#"+a}function KVe(i,a){var f=i.edge(a),g=i.node(a.v),w=i.node(a.w),v=f.points.slice(1,f.points.length-1);return v.unshift(r$t(g,v[0])),v.push(r$t(w,v[v.length-1])),i$t(f,v)}function i$t(i,a){var f=(Ax||TAe.line)().x(function(g){return g.x}).y(function(g){return g.y});return(f.curve||f.interpolate)(i.curve),f(a)}function WVe(i){var a=i.getBBox(),f=i.ownerSVGElement.getScreenCTM().inverse().multiply(i.getScreenCTM()).translate(a.width/2,a.height/2);return{x:f.e,y:f.f}}function YVe(i,a){var f=i.enter().append("g").attr("class","edgePath").style("opacity",0);return f.append("path").attr("class","path").attr("d",function(g){var w=a.edge(g),v=a.node(g.v).elem,b=M9(w.points.length).map(function(){return WVe(v)});return i$t(w,b)}),f.append("defs"),f}function XVe(i,a){var f=i.exit();Jv(f,a).style("opacity",0).remove()}var Fpt=function(i,a,f){var g=a.nodes().filter(function(b){return!t$t(a,b)}),w=i.selectAll("g.node").data(g,function(b){return b}).classed("update",!0);w.exit().remove(),w.enter().append("g").attr("class","node").style("opacity",0),w=i.selectAll("g.node"),w.each(function(b){var E=a.node(b),S=Tr(this);n$t(S,E.class,(S.classed("update")?"update ":"")+"node"),S.select("g.label").remove();var _=S.append("g").attr("class","label"),M=Ipt(_,E),F=f[E.shape],R=KF(M.node().getBBox(),"width","height");E.elem=this,E.id&&S.attr("id",E.id),E.labelId&&_.attr("id",E.labelId),lo(E,"width")&&(R.width=E.width),lo(E,"height")&&(R.height=E.height),R.width+=E.paddingLeft+E.paddingRight,R.height+=E.paddingTop+E.paddingBottom,_.attr("transform","translate("+(E.paddingLeft-E.paddingRight)/2+","+(E.paddingTop-E.paddingBottom)/2+")");var B=Tr(this);B.select(".label-container").remove();var z=F(B,R,E).classed("label-container",!0);a4(z,E.style);var Y=z.node().getBBox();E.width=Y.width,E.height=Y.height});var v;return w.exit?v=w.exit():v=w.selectAll(null),Jv(v,a).style("opacity",0).remove(),w};function QVe(i){Fpt=i}function JVe(i,a){var f=i.filter(function(){return!Tr(this).classed("update")});function g(w){var v=a.node(w);return"translate("+v.x+","+v.y+")"}f.attr("transform",g),Jv(i,a).style("opacity",1).attr("transform",g),Jv(f.selectAll("rect"),a).attr("width",function(w){return a.node(w).width}).attr("height",function(w){return a.node(w).height}).attr("x",function(w){var v=a.node(w);return-v.width/2}).attr("y",function(w){var v=a.node(w);return-v.height/2})}function ZVe(i,a){var f=i.filter(function(){return!Tr(this).classed("update")});function g(w){var v=a.edge(w);return lo(v,"x")?"translate("+v.x+","+v.y+")":""}f.attr("transform",g),Jv(i,a).style("opacity",1).attr("transform",g)}function tUe(i,a){var f=i.filter(function(){return!Tr(this).classed("update")});function g(w){var v=a.node(w);return"translate("+v.x+","+v.y+")"}f.attr("transform",g),Jv(i,a).style("opacity",1).attr("transform",g)}function s$t(i,a,f,g){var w=i.x,v=i.y,b=w-g.x,E=v-g.y,S=Math.sqrt(a*a*E*E+f*f*b*b),_=Math.abs(a*f*b/S);g.x<w&&(_=-_);var M=Math.abs(a*f*E/S);return g.y<v&&(M=-M),{x:w+_,y:v+M}}function eUe(i,a,f){return s$t(i,a,a,f)}function nUe(i,a,f,g){var w,v,b,E,S,_,M,F,R,B,z,Y,nt,ot,ft;if(w=a.y-i.y,b=i.x-a.x,S=a.x*i.y-i.x*a.y,R=w*f.x+b*f.y+S,B=w*g.x+b*g.y+S,!(R!==0&&B!==0&&a$t(R,B))&&(v=g.y-f.y,E=f.x-g.x,_=g.x*f.y-f.x*g.y,M=v*i.x+E*i.y+_,F=v*a.x+E*a.y+_,!(M!==0&&F!==0&&a$t(M,F))&&(z=w*E-v*b,z!==0)))return Y=Math.abs(z/2),nt=b*_-E*S,ot=nt<0?(nt-Y)/z:(nt+Y)/z,nt=v*S-w*_,ft=nt<0?(nt-Y)/z:(nt+Y)/z,{x:ot,y:ft}}function a$t(i,a){return i*a>0}function o4(i,a,f){var g=i.x,w=i.y,v=[],b=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;a.forEach(function(z){b=Math.min(b,z.x),E=Math.min(E,z.y)});for(var S=g-i.width/2-b,_=w-i.height/2-E,M=0;M<a.length;M++){var F=a[M],R=a[M<a.length-1?M+1:0],B=nUe(i,f,{x:S+F.x,y:_+F.y},{x:S+R.x,y:_+R.y});B&&v.push(B)}return v.length?(v.length>1&&v.sort(function(z,Y){var nt=z.x-f.x,ot=z.y-f.y,ft=Math.sqrt(nt*nt+ot*ot),wt=Y.x-f.x,mt=Y.y-f.y,ct=Math.sqrt(wt*wt+mt*mt);return ft<ct?-1:ft===ct?0:1}),v[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",i),i)}function Bpt(i,a){var f=i.x,g=i.y,w=a.x-f,v=a.y-g,b=i.width/2,E=i.height/2,S,_;return Math.abs(v)*b>Math.abs(w)*E?(v<0&&(E=-E),S=v===0?0:E*w/v,_=E):(w<0&&(b=-b),S=b,_=w===0?0:b*v/w),{x:f+S,y:g+_}}var Rpt={rect:iUe,ellipse:sUe,circle:aUe,diamond:oUe};function rUe(i){Rpt=i}function iUe(i,a,f){var g=i.insert("rect",":first-child").attr("rx",f.rx).attr("ry",f.ry).attr("x",-a.width/2).attr("y",-a.height/2).attr("width",a.width).attr("height",a.height);return f.intersect=function(w){return Bpt(f,w)},g}function sUe(i,a,f){var g=a.width/2,w=a.height/2,v=i.insert("ellipse",":first-child").attr("x",-a.width/2).attr("y",-a.height/2).attr("rx",g).attr("ry",w);return f.intersect=function(b){return s$t(f,g,w,b)},v}function aUe(i,a,f){var g=Math.max(a.width,a.height)/2,w=i.insert("circle",":first-child").attr("x",-a.width/2).attr("y",-a.height/2).attr("r",g);return f.intersect=function(v){return eUe(f,g,v)},w}function oUe(i,a,f){var g=a.width*Math.SQRT2/2,w=a.height*Math.SQRT2/2,v=[{x:0,y:-w},{x:-g,y:0},{x:0,y:w},{x:g,y:0}],b=i.insert("polygon",":first-child").attr("points",v.map(function(E){return E.x+","+E.y}).join(" "));return f.intersect=function(E){return o4(f,v,E)},b}function cUe(){var i=function(a,f){hUe(f);var g=JF(a,"output"),w=JF(g,"clusters"),v=JF(g,"edgePaths"),b=Npt(JF(g,"edgeLabels"),f),E=Fpt(JF(g,"nodes"),f,Rpt);kD(f),tUe(E,f),ZVe(b,f),Ppt(v,f,Dpt);var S=Opt(w,f);JVe(S,f),fUe(f)};return i.createNodes=function(a){return arguments.length?(QVe(a),i):Fpt},i.createClusters=function(a){return arguments.length?(HVe(a),i):Opt},i.createEdgeLabels=function(a){return arguments.length?(VVe(a),i):Npt},i.createEdgePaths=function(a){return arguments.length?(UVe(a),i):Ppt},i.shapes=function(a){return arguments.length?(rUe(a),i):Rpt},i.arrows=function(a){return arguments.length?(FVe(a),i):Dpt},i}var uUe={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},lUe={arrowhead:"normal",curve:Kg};function hUe(i){i.nodes().forEach(function(a){var f=i.node(a);!lo(f,"label")&&!i.children(a).length&&(f.label=a),lo(f,"paddingX")&&yD(f,{paddingLeft:f.paddingX,paddingRight:f.paddingX}),lo(f,"paddingY")&&yD(f,{paddingTop:f.paddingY,paddingBottom:f.paddingY}),lo(f,"padding")&&yD(f,{paddingLeft:f.padding,paddingRight:f.padding,paddingTop:f.padding,paddingBottom:f.padding}),yD(f,uUe),yr(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(g){f[g]=Number(f[g])}),lo(f,"width")&&(f._prevWidth=f.width),lo(f,"height")&&(f._prevHeight=f.height)}),i.edges().forEach(function(a){var f=i.edge(a);lo(f,"label")||(f.label=""),yD(f,lUe)})}function fUe(i){yr(i.nodes(),function(a){var f=i.node(a);lo(f,"_prevWidth")?f.width=f._prevWidth:delete f.width,lo(f,"_prevHeight")?f.height=f._prevHeight:delete f.height,delete f._prevWidth,delete f._prevHeight})}function JF(i,a){var f=i.select("g."+a);return f.empty()&&(f=i.append("g").attr("class",a)),f}function o$t(i,a,f){const g=a.width,w=a.height,v=(g+w)*.9,b=[{x:v/2,y:0},{x:v,y:-v/2},{x:v/2,y:-v},{x:0,y:-v/2}],E=Rx(i,v,v,b);return f.intersect=function(S){return o4(f,b,S)},E}function c$t(i,a,f){const w=a.height,v=w/4,b=a.width+2*v,E=[{x:v,y:0},{x:b-v,y:0},{x:b,y:-w/2},{x:b-v,y:-w},{x:v,y:-w},{x:0,y:-w/2}],S=Rx(i,b,w,E);return f.intersect=function(_){return o4(f,E,_)},S}function u$t(i,a,f){const g=a.width,w=a.height,v=[{x:-w/2,y:0},{x:g,y:0},{x:g,y:-w},{x:-w/2,y:-w},{x:0,y:-w/2}],b=Rx(i,g,w,v);return f.intersect=function(E){return o4(f,v,E)},b}function l$t(i,a,f){const g=a.width,w=a.height,v=[{x:-2*w/6,y:0},{x:g-w/6,y:0},{x:g+2*w/6,y:-w},{x:w/6,y:-w}],b=Rx(i,g,w,v);return f.intersect=function(E){return o4(f,v,E)},b}function h$t(i,a,f){const g=a.width,w=a.height,v=[{x:2*w/6,y:0},{x:g+w/6,y:0},{x:g-2*w/6,y:-w},{x:-w/6,y:-w}],b=Rx(i,g,w,v);return f.intersect=function(E){return o4(f,v,E)},b}function f$t(i,a,f){const g=a.width,w=a.height,v=[{x:-2*w/6,y:0},{x:g+2*w/6,y:0},{x:g-w/6,y:-w},{x:w/6,y:-w}],b=Rx(i,g,w,v);return f.intersect=function(E){return o4(f,v,E)},b}function d$t(i,a,f){const g=a.width,w=a.height,v=[{x:w/6,y:0},{x:g-w/6,y:0},{x:g+2*w/6,y:-w},{x:-2*w/6,y:-w}],b=Rx(i,g,w,v);return f.intersect=function(E){return o4(f,v,E)},b}function g$t(i,a,f){const g=a.width,w=a.height,v=[{x:0,y:0},{x:g+w/2,y:0},{x:g,y:-w/2},{x:g+w/2,y:-w},{x:0,y:-w}],b=Rx(i,g,w,v);return f.intersect=function(E){return o4(f,v,E)},b}function p$t(i,a,f){const g=a.height,w=a.width+g/4,v=i.insert("rect",":first-child").attr("rx",g/2).attr("ry",g/2).attr("x",-w/2).attr("y",-g/2).attr("width",w).attr("height",g);return f.intersect=function(b){return Bpt(f,b)},v}function b$t(i,a,f){const g=a.width,w=a.height,v=[{x:0,y:0},{x:g,y:0},{x:g,y:-w},{x:0,y:-w},{x:0,y:0},{x:-8,y:0},{x:g+8,y:0},{x:g+8,y:-w},{x:-8,y:-w},{x:-8,y:0}],b=Rx(i,g,w,v);return f.intersect=function(E){return o4(f,v,E)},b}function w$t(i,a,f){const g=a.width,w=g/2,v=w/(2.5+g/50),b=a.height+v,E="M 0,"+v+" a "+w+","+v+" 0,0,0 "+g+" 0 a "+w+","+v+" 0,0,0 "+-g+" 0 l 0,"+b+" a "+w+","+v+" 0,0,0 "+g+" 0 l 0,"+-b,S=i.attr("label-offset-y",v).insert("path",":first-child").attr("d",E).attr("transform","translate("+-g/2+","+-(b/2+v)+")");return f.intersect=function(_){const M=Bpt(f,_),F=M.x-f.x;if(w!=0&&(Math.abs(F)<f.width/2||Math.abs(F)==f.width/2&&Math.abs(M.y-f.y)>f.height/2-v)){let R=v*v*(1-F*F/(w*w));R!=0&&(R=Math.sqrt(R)),R=v-R,_.y-f.y>0&&(R=-R),M.y+=R}return M},S}function dUe(i){i.shapes().question=o$t,i.shapes().hexagon=c$t,i.shapes().stadium=p$t,i.shapes().subroutine=b$t,i.shapes().cylinder=w$t,i.shapes().rect_left_inv_arrow=u$t,i.shapes().lean_right=l$t,i.shapes().lean_left=h$t,i.shapes().trapezoid=f$t,i.shapes().inv_trapezoid=d$t,i.shapes().rect_right_inv_arrow=g$t}function gUe(i){i({question:o$t}),i({hexagon:c$t}),i({stadium:p$t}),i({subroutine:b$t}),i({cylinder:w$t}),i({rect_left_inv_arrow:u$t}),i({lean_right:l$t}),i({lean_left:h$t}),i({trapezoid:f$t}),i({inv_trapezoid:d$t}),i({rect_right_inv_arrow:g$t})}function Rx(i,a,f,g){return i.insert("polygon",":first-child").attr("points",g.map(function(w){return w.x+","+w.y}).join(" ")).attr("transform","translate("+-a/2+","+f/2+")")}const pUe={addToRender:dUe,addToRenderV2:gUe},m$t={},bUe=function(i){const a=Object.keys(i);for(const f of a)m$t[f]=i[f]},v$t=function(i,a,f,g,w,v){const b=g?g.select(`[id="${f}"]`):Tr(`[id="${f}"]`),E=w||document;Object.keys(i).forEach(function(_){const M=i[_];let F="default";M.classes.length>0&&(F=M.classes.join(" "));const R=C2(M.styles);let B=M.text!==void 0?M.text:M.id,z;if(j1(Re().flowchart.htmlLabels)){const ot={label:B.replace(/fa[blrs]?:fa-[\w-]+/g,ft=>`<i class='${ft.replace(":"," ")}'></i>`)};z=Mpt(b,ot).node(),z.parentNode.removeChild(z)}else{const ot=E.createElementNS("http://www.w3.org/2000/svg","text");ot.setAttribute("style",R.labelStyle.replace("color:","fill:"));const ft=B.split(ei.lineBreakRegex);for(const wt of ft){const mt=E.createElementNS("http://www.w3.org/2000/svg","tspan");mt.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),mt.setAttribute("dy","1em"),mt.setAttribute("x","1"),mt.textContent=wt,ot.appendChild(mt)}z=ot}let Y=0,nt="";switch(M.type){case"round":Y=5,nt="rect";break;case"square":nt="rect";break;case"diamond":nt="question";break;case"hexagon":nt="hexagon";break;case"odd":nt="rect_left_inv_arrow";break;case"lean_right":nt="lean_right";break;case"lean_left":nt="lean_left";break;case"trapezoid":nt="trapezoid";break;case"inv_trapezoid":nt="inv_trapezoid";break;case"odd_right":nt="rect_left_inv_arrow";break;case"circle":nt="circle";break;case"ellipse":nt="ellipse";break;case"stadium":nt="stadium";break;case"subroutine":nt="subroutine";break;case"cylinder":nt="cylinder";break;case"group":nt="rect";break;default:nt="rect"}Kt.warn("Adding node",M.id,M.domId),a.setNode(v.db.lookUpDomId(M.id),{labelType:"svg",labelStyle:R.labelStyle,shape:nt,label:z,rx:Y,ry:Y,class:F,style:R.style,id:v.db.lookUpDomId(M.id)})})},y$t=function(i,a,f){let g=0,w,v;if(i.defaultStyle!==void 0){const b=C2(i.defaultStyle);w=b.style,v=b.labelStyle}i.forEach(function(b){g++;const E="L-"+b.start+"-"+b.end,S="LS-"+b.start,_="LE-"+b.end,M={};b.type==="arrow_open"?M.arrowhead="none":M.arrowhead="normal";let F="",R="";if(b.style!==void 0){const B=C2(b.style);F=B.style,R=B.labelStyle}else switch(b.stroke){case"normal":F="fill:none",w!==void 0&&(F=w),v!==void 0&&(R=v);break;case"dotted":F="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":F=" stroke-width: 3.5px;fill:none";break}M.style=F,M.labelStyle=R,b.interpolate!==void 0?M.curve=Xw(b.interpolate,Kg):i.defaultInterpolate!==void 0?M.curve=Xw(i.defaultInterpolate,Kg):M.curve=Xw(m$t.curve,Kg),b.text===void 0?b.style!==void 0&&(M.arrowheadStyle="fill: #333"):(M.arrowheadStyle="fill: #333",M.labelpos="c",j1(Re().flowchart.htmlLabels)?(M.labelType="html",M.label=`<span id="L-${E}" class="edgeLabel L-${S}' L-${_}" style="${M.labelStyle}">${b.text.replace(/fa[blrs]?:fa-[\w-]+/g,B=>`<i class='${B.replace(":"," ")}'></i>`)}</span>`):(M.labelType="text",M.label=b.text.replace(ei.lineBreakRegex,`
108 `),b.style===void 0&&(M.style=M.style||"stroke: #333; stroke-width: 1.5px;fill:none"),M.labelStyle=M.labelStyle.replace("color:","fill:"))),M.id=E,M.class=S+" "+_,M.minlen=b.length||1,a.setEdge(f.db.lookUpDomId(b.start),f.db.lookUpDomId(b.end),M,g)})},wUe={setConf:bUe,addVertices:v$t,addEdges:y$t,getClasses:function(i,a){return Kt.info("Extracting classes"),a.db.getClasses()},draw:function(i,a,f,g){Kt.info("Drawing flowchart");const{securityLevel:w,flowchart:v}=Re();let b;w==="sandbox"&&(b=Tr("#i"+a));const E=Tr(w==="sandbox"?b.nodes()[0].contentDocument.body:"body"),S=w==="sandbox"?b.nodes()[0].contentDocument:document;let _=g.db.getDirection();_===void 0&&(_="TD");const M=v.nodeSpacing||50,F=v.rankSpacing||50,R=new l1({multigraph:!0,compound:!0}).setGraph({rankdir:_,nodesep:M,ranksep:F,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let B;const z=g.db.getSubGraphs();for(let rt=z.length-1;rt>=0;rt--)B=z[rt],g.db.addVertex(B.id,B.title,"group",void 0,B.classes);const Y=g.db.getVertices();Kt.warn("Get vertices",Y);const nt=g.db.getEdges();let ot=0;for(ot=z.length-1;ot>=0;ot--){B=z[ot],$Ot("cluster").append("text");for(let rt=0;rt<B.nodes.length;rt++)Kt.warn("Setting subgraph",B.nodes[rt],g.db.lookUpDomId(B.nodes[rt]),g.db.lookUpDomId(B.id)),R.setParent(g.db.lookUpDomId(B.nodes[rt]),g.db.lookUpDomId(B.id))}v$t(Y,R,a,E,S,g),y$t(nt,R,g);const ft=new cUe;pUe.addToRender(ft),ft.arrows().none=function(it,gt,Q,dt){const yt=it.append("marker").attr("id",gt).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");a4(yt,Q[dt+"Style"])},ft.arrows().normal=function(it,gt){it.append("marker").attr("id",gt).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const wt=E.select(`[id="${a}"]`),mt=E.select("#"+a+" g");for(ft(mt,R),mt.selectAll("g.node").attr("title",function(){return g.db.getTooltip(this.id)}),g.db.indexNodes("subGraph"+ot),ot=0;ot<z.length;ot++)if(B=z[ot],B.title!=="undefined"){const rt=S.querySelectorAll("#"+a+' [id="'+g.db.lookUpDomId(B.id)+'"] rect'),it=S.querySelectorAll("#"+a+' [id="'+g.db.lookUpDomId(B.id)+'"]'),gt=rt[0].x.baseVal.value,Q=rt[0].y.baseVal.value,dt=rt[0].width.baseVal.value,yt=Tr(it[0]).select(".label");yt.attr("transform",`translate(${gt+dt/2}, ${Q+14})`),yt.attr("id",a+"Text");for(let V=0;V<B.classes.length;V++)it[0].classList.add(B.classes[V])}if(!v.htmlLabels){const rt=S.querySelectorAll('[id="'+a+'"] .edgeLabel .label');for(const it of rt){const gt=it.getBBox(),Q=S.createElementNS("http://www.w3.org/2000/svg","rect");Q.setAttribute("rx",0),Q.setAttribute("ry",0),Q.setAttribute("width",gt.width),Q.setAttribute("height",gt.height),it.insertBefore(Q,it.firstChild)}}w8(R,wt,v.diagramPadding,v.useMaxWidth),Object.keys(Y).forEach(function(rt){const it=Y[rt];if(it.link){const gt=E.select("#"+a+' [id="'+g.db.lookUpDomId(rt)+'"]');if(gt){const Q=S.createElementNS("http://www.w3.org/2000/svg","a");Q.setAttributeNS("http://www.w3.org/2000/svg","class",it.classes.join(" ")),Q.setAttributeNS("http://www.w3.org/2000/svg","href",it.link),Q.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),w==="sandbox"?Q.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):it.linkTarget&&Q.setAttributeNS("http://www.w3.org/2000/svg","target",it.linkTarget);const dt=gt.insert(function(){return Q},":first-child"),K=gt.select(".label-container");K&&dt.append(function(){return K.node()});const yt=gt.select(".label");yt&&dt.append(function(){return yt.node()})}}})}};function jx(i){var a={options:{directed:i.isDirected(),multigraph:i.isMultigraph(),compound:i.isCompound()},nodes:mUe(i),edges:vUe(i)};return Tf(i.graph())||(a.value=fjt(i.graph())),a}function mUe(i){return u1(i.nodes(),function(a){var f=i.node(a),g=i.parent(a),w={v:a};return Tf(f)||(w.value=f),Tf(g)||(w.parent=g),w})}function vUe(i){return u1(i.edges(),function(a){var f=i.edge(a),g={v:a.v,w:a.w};return Tf(a.name)||(g.name=a.name),Tf(f)||(g.value=f),g})}const yUe=(i,a,f,g)=>{a.forEach(w=>{xUe[w](i,f,g)})},xUe={extension:(i,a,f)=>{Kt.trace("Making markers for ",f),i.append("defs").append("marker").attr("id",f+"_"+a+"-extensionStart").attr("class","marker extension "+a).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id",f+"_"+a+"-extensionEnd").attr("class","marker extension "+a).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-compositionStart").attr("class","marker composition "+a).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",f+"_"+a+"-compositionEnd").attr("class","marker composition "+a).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-aggregationStart").attr("class","marker aggregation "+a).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",f+"_"+a+"-aggregationEnd").attr("class","marker aggregation "+a).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-dependencyStart").attr("class","marker dependency "+a).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",f+"_"+a+"-dependencyEnd").attr("class","marker dependency "+a).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},lollipop:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-lollipopStart").attr("class","marker lollipop "+a).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),i.append("defs").append("marker").attr("id",f+"_"+a+"-lollipopEnd").attr("class","marker lollipop "+a).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},point:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-pointEnd").attr("class","marker "+a).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",f+"_"+a+"-pointStart").attr("class","marker "+a).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-circleEnd").attr("class","marker "+a).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",f+"_"+a+"-circleStart").attr("class","marker "+a).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-crossEnd").attr("class","marker cross "+a).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",f+"_"+a+"-crossStart").attr("class","marker cross "+a).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},jpt=yUe;function kUe(i,a){a&&i.attr("style",a)}function EUe(i){const a=Tr(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),f=a.append("xhtml:div"),g=i.label,w=i.isNode?"nodeLabel":"edgeLabel";return f.html('<span class="'+w+'" '+(i.labelStyle?'style="'+i.labelStyle+'"':"")+">"+g+"</span>"),kUe(f,i.labelStyle),f.style("display","inline-block"),f.style("white-space","nowrap"),f.attr("xmlns","http://www.w3.org/1999/xhtml"),a.node()}const ab=(i,a,f,g)=>{let w=i||"";if(typeof w=="object"&&(w=w[0]),j1(Re().flowchart.htmlLabels)){w=w.replace(/\\n|\n/g,"<br />"),Kt.debug("vertexText"+w);const v={isNode:g,label:IF(w).replace(/fa[blrs]?:fa-[\w-]+/g,E=>`<i class='${E.replace(":"," ")}'></i>`),labelStyle:a.replace("fill:","color:")};return EUe(v)}else{const v=document.createElementNS("http://www.w3.org/2000/svg","text");v.setAttribute("style",a.replace("color:","fill:"));let b=[];typeof w=="string"?b=w.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(w)?b=w:b=[];for(const E of b){const S=document.createElementNS("http://www.w3.org/2000/svg","tspan");S.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),S.setAttribute("dy","1em"),S.setAttribute("x","0"),f?S.setAttribute("class","title-row"):S.setAttribute("class","row"),S.textContent=E.trim(),v.appendChild(S)}return v}},TUe={};function CUe(i,a){const f=a||TUe,g=typeof f.includeImageAlt=="boolean"?f.includeImageAlt:!0,w=typeof f.includeHtml=="boolean"?f.includeHtml:!0;return x$t(i,g,w)}function x$t(i,a,f){if(SUe(i)){if("value"in i)return i.type==="html"&&!f?"":i.value;if(a&&"alt"in i&&i.alt)return i.alt;if("children"in i)return k$t(i.children,a,f)}return Array.isArray(i)?k$t(i,a,f):""}function k$t(i,a,f){const g=[];let w=-1;for(;++w<i.length;)g[w]=x$t(i[w],a,f);return g.join("")}function SUe(i){return!!(i&&typeof i=="object")}function c4(i,a,f,g){const w=i.length;let v=0,b;if(a<0?a=-a>w?0:w+a:a=a>w?w:a,f=f>0?f:0,g.length<1e4)b=Array.from(g),b.unshift(a,f),i.splice(...b);else for(f&&i.splice(a,f);v<g.length;)b=g.slice(v,v+1e4),b.unshift(a,0),i.splice(...b),v+=1e4,a+=1e4}function tm(i,a){return i.length>0?(c4(i,i.length,0,a),i):a}const E$t={}.hasOwnProperty;function _Ue(i){const a={};let f=-1;for(;++f<i.length;)AUe(a,i[f]);return a}function AUe(i,a){let f;for(f in a){const w=(E$t.call(i,f)?i[f]:void 0)||(i[f]={}),v=a[f];let b;if(v)for(b in v){E$t.call(w,b)||(w[b]=[]);const E=v[b];LUe(w[b],Array.isArray(E)?E:E?[E]:[])}}}function LUe(i,a){let f=-1;const g=[];for(;++f<a.length;)(a[f].add==="after"?i:g).push(a[f]);c4(i,0,0,g)}const DUe=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,u4=E8(/[A-Za-z]/),Zv=E8(/[\dA-Za-z]/),MUe=E8(/[#-'*+\--9=?A-Z^-~]/);function $pt(i){return i!==null&&(i<32||i===127)}const zpt=E8(/\d/),IUe=E8(/[\dA-Fa-f]/),OUe=E8(/[!-/:-@[-`{-~]/);function $a(i){return i!==null&&i<-2}function ob(i){return i!==null&&(i<0||i===32)}function du(i){return i===-2||i===-1||i===32}const NUe=E8(DUe),PUe=E8(/\s/);function E8(i){return a;function a(f){return f!==null&&i.test(String.fromCharCode(f))}}function Cl(i,a,f,g){const w=g?g-1:Number.POSITIVE_INFINITY;let v=0;return b;function b(S){return du(S)?(i.enter(f),E(S)):a(S)}function E(S){return du(S)&&v++<w?(i.consume(S),E):(i.exit(f),a(S))}}const FUe={tokenize:BUe};function BUe(i){const a=i.attempt(this.parser.constructs.contentInitial,g,w);let f;return a;function g(E){if(E===null){i.consume(E);return}return i.enter("lineEnding"),i.consume(E),i.exit("lineEnding"),Cl(i,a,"linePrefix")}function w(E){return i.enter("paragraph"),v(E)}function v(E){const S=i.enter("chunkText",{contentType:"text",previous:f});return f&&(f.next=S),f=S,b(E)}function b(E){if(E===null){i.exit("chunkText"),i.exit("paragraph"),i.consume(E);return}return $a(E)?(i.consume(E),i.exit("chunkText"),v):(i.consume(E),b)}}const RUe={tokenize:jUe},T$t={tokenize:$Ue};function jUe(i){const a=this,f=[];let g=0,w,v,b;return E;function E(wt){if(g<f.length){const mt=f[g];return a.containerState=mt[1],i.attempt(mt[0].continuation,S,_)(wt)}return _(wt)}function S(wt){if(g++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,w&&ft();const mt=a.events.length;let ct=mt,rt;for(;ct--;)if(a.events[ct][0]==="exit"&&a.events[ct][1].type==="chunkFlow"){rt=a.events[ct][1].end;break}ot(g);let it=mt;for(;it<a.events.length;)a.events[it][1].end=Object.assign({},rt),it++;return c4(a.events,ct+1,0,a.events.slice(mt)),a.events.length=it,_(wt)}return E(wt)}function _(wt){if(g===f.length){if(!w)return R(wt);if(w.currentConstruct&&w.currentConstruct.concrete)return z(wt);a.interrupt=!!(w.currentConstruct&&!w._gfmTableDynamicInterruptHack)}return a.containerState={},i.check(T$t,M,F)(wt)}function M(wt){return w&&ft(),ot(g),R(wt)}function F(wt){return a.parser.lazy[a.now().line]=g!==f.length,b=a.now().offset,z(wt)}function R(wt){return a.containerState={},i.attempt(T$t,B,z)(wt)}function B(wt){return g++,f.push([a.currentConstruct,a.containerState]),R(wt)}function z(wt){if(wt===null){w&&ft(),ot(0),i.consume(wt);return}return w=w||a.parser.flow(a.now()),i.enter("chunkFlow",{contentType:"flow",previous:v,_tokenizer:w}),Y(wt)}function Y(wt){if(wt===null){nt(i.exit("chunkFlow"),!0),ot(0),i.consume(wt);return}return $a(wt)?(i.consume(wt),nt(i.exit("chunkFlow")),g=0,a.interrupt=void 0,E):(i.consume(wt),Y)}function nt(wt,mt){const ct=a.sliceStream(wt);if(mt&&ct.push(null),wt.previous=v,v&&(v.next=wt),v=wt,w.defineSkip(wt.start),w.write(ct),a.parser.lazy[wt.start.line]){let rt=w.events.length;for(;rt--;)if(w.events[rt][1].start.offset<b&&(!w.events[rt][1].end||w.events[rt][1].end.offset>b))return;const it=a.events.length;let gt=it,Q,dt;for(;gt--;)if(a.events[gt][0]==="exit"&&a.events[gt][1].type==="chunkFlow"){if(Q){dt=a.events[gt][1].end;break}Q=!0}for(ot(g),rt=it;rt<a.events.length;)a.events[rt][1].end=Object.assign({},dt),rt++;c4(a.events,gt+1,0,a.events.slice(it)),a.events.length=rt}}function ot(wt){let mt=f.length;for(;mt-- >wt;){const ct=f[mt];a.containerState=ct[1],ct[0].exit.call(a,i)}f.length=wt}function ft(){w.write([null]),v=void 0,w=void 0,a.containerState._closeFlow=void 0}}function $Ue(i,a,f){return Cl(i,i.attempt(this.parser.constructs.document,a,f),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function C$t(i){if(i===null||ob(i)||PUe(i))return 1;if(NUe(i))return 2}function qpt(i,a,f){const g=[];let w=-1;for(;++w<i.length;){const v=i[w].resolveAll;v&&!g.includes(v)&&(a=v(a,f),g.push(v))}return a}const Hpt={name:"attention",tokenize:qUe,resolveAll:zUe};function zUe(i,a){let f=-1,g,w,v,b,E,S,_,M;for(;++f<i.length;)if(i[f][0]==="enter"&&i[f][1].type==="attentionSequence"&&i[f][1]._close){for(g=f;g--;)if(i[g][0]==="exit"&&i[g][1].type==="attentionSequence"&&i[g][1]._open&&a.sliceSerialize(i[g][1]).charCodeAt(0)===a.sliceSerialize(i[f][1]).charCodeAt(0)){if((i[g][1]._close||i[f][1]._open)&&(i[f][1].end.offset-i[f][1].start.offset)%3&&!((i[g][1].end.offset-i[g][1].start.offset+i[f][1].end.offset-i[f][1].start.offset)%3))continue;S=i[g][1].end.offset-i[g][1].start.offset>1&&i[f][1].end.offset-i[f][1].start.offset>1?2:1;const F=Object.assign({},i[g][1].end),R=Object.assign({},i[f][1].start);S$t(F,-S),S$t(R,S),b={type:S>1?"strongSequence":"emphasisSequence",start:F,end:Object.assign({},i[g][1].end)},E={type:S>1?"strongSequence":"emphasisSequence",start:Object.assign({},i[f][1].start),end:R},v={type:S>1?"strongText":"emphasisText",start:Object.assign({},i[g][1].end),end:Object.assign({},i[f][1].start)},w={type:S>1?"strong":"emphasis",start:Object.assign({},b.start),end:Object.assign({},E.end)},i[g][1].end=Object.assign({},b.start),i[f][1].start=Object.assign({},E.end),_=[],i[g][1].end.offset-i[g][1].start.offset&&(_=tm(_,[["enter",i[g][1],a],["exit",i[g][1],a]])),_=tm(_,[["enter",w,a],["enter",b,a],["exit",b,a],["enter",v,a]]),_=tm(_,qpt(a.parser.constructs.insideSpan.null,i.slice(g+1,f),a)),_=tm(_,[["exit",v,a],["enter",E,a],["exit",E,a],["exit",w,a]]),i[f][1].end.offset-i[f][1].start.offset?(M=2,_=tm(_,[["enter",i[f][1],a],["exit",i[f][1],a]])):M=0,c4(i,g-1,f-g+3,_),f=g+_.length-M-2;break}}for(f=-1;++f<i.length;)i[f][1].type==="attentionSequence"&&(i[f][1].type="data");return i}function qUe(i,a){const f=this.parser.constructs.attentionMarkers.null,g=this.previous,w=C$t(g);let v;return b;function b(S){return v=S,i.enter("attentionSequence"),E(S)}function E(S){if(S===v)return i.consume(S),E;const _=i.exit("attentionSequence"),M=C$t(S),F=!M||M===2&&w||f.includes(S),R=!w||w===2&&M||f.includes(g);return _._open=!!(v===42?F:F&&(w||!R)),_._close=!!(v===42?R:R&&(M||!F)),a(S)}}function S$t(i,a){i.column+=a,i.offset+=a,i._bufferIndex+=a}const HUe={name:"autolink",tokenize:VUe};function VUe(i,a,f){let g=0;return w;function w(B){return i.enter("autolink"),i.enter("autolinkMarker"),i.consume(B),i.exit("autolinkMarker"),i.enter("autolinkProtocol"),v}function v(B){return u4(B)?(i.consume(B),b):_(B)}function b(B){return B===43||B===45||B===46||Zv(B)?(g=1,E(B)):_(B)}function E(B){return B===58?(i.consume(B),g=0,S):(B===43||B===45||B===46||Zv(B))&&g++<32?(i.consume(B),E):(g=0,_(B))}function S(B){return B===62?(i.exit("autolinkProtocol"),i.enter("autolinkMarker"),i.consume(B),i.exit("autolinkMarker"),i.exit("autolink"),a):B===null||B===32||B===60||$pt(B)?f(B):(i.consume(B),S)}function _(B){return B===64?(i.consume(B),M):MUe(B)?(i.consume(B),_):f(B)}function M(B){return Zv(B)?F(B):f(B)}function F(B){return B===46?(i.consume(B),g=0,M):B===62?(i.exit("autolinkProtocol").type="autolinkEmail",i.enter("autolinkMarker"),i.consume(B),i.exit("autolinkMarker"),i.exit("autolink"),a):R(B)}function R(B){if((B===45||Zv(B))&&g++<63){const z=B===45?R:F;return i.consume(B),z}return f(B)}}const XY={tokenize:UUe,partial:!0};function UUe(i,a,f){return g;function g(v){return du(v)?Cl(i,w,"linePrefix")(v):w(v)}function w(v){return v===null||$a(v)?a(v):f(v)}}const _$t={name:"blockQuote",tokenize:GUe,continuation:{tokenize:KUe},exit:WUe};function GUe(i,a,f){const g=this;return w;function w(b){if(b===62){const E=g.containerState;return E.open||(i.enter("blockQuote",{_container:!0}),E.open=!0),i.enter("blockQuotePrefix"),i.enter("blockQuoteMarker"),i.consume(b),i.exit("blockQuoteMarker"),v}return f(b)}function v(b){return du(b)?(i.enter("blockQuotePrefixWhitespace"),i.consume(b),i.exit("blockQuotePrefixWhitespace"),i.exit("blockQuotePrefix"),a):(i.exit("blockQuotePrefix"),a(b))}}function KUe(i,a,f){const g=this;return w;function w(b){return du(b)?Cl(i,v,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):v(b)}function v(b){return i.attempt(_$t,a,f)(b)}}function WUe(i){i.exit("blockQuote")}const A$t={name:"characterEscape",tokenize:YUe};function YUe(i,a,f){return g;function g(v){return i.enter("characterEscape"),i.enter("escapeMarker"),i.consume(v),i.exit("escapeMarker"),w}function w(v){return OUe(v)?(i.enter("characterEscapeValue"),i.consume(v),i.exit("characterEscapeValue"),i.exit("characterEscape"),a):f(v)}}const L$t=document.createElement("i");function Vpt(i){const a="&"+i+";";L$t.innerHTML=a;const f=L$t.textContent;return f.charCodeAt(f.length-1)===59&&i!=="semi"||f===a?!1:f}const D$t={name:"characterReference",tokenize:XUe};function XUe(i,a,f){const g=this;let w=0,v,b;return E;function E(F){return i.enter("characterReference"),i.enter("characterReferenceMarker"),i.consume(F),i.exit("characterReferenceMarker"),S}function S(F){return F===35?(i.enter("characterReferenceMarkerNumeric"),i.consume(F),i.exit("characterReferenceMarkerNumeric"),_):(i.enter("characterReferenceValue"),v=31,b=Zv,M(F))}function _(F){return F===88||F===120?(i.enter("characterReferenceMarkerHexadecimal"),i.consume(F),i.exit("characterReferenceMarkerHexadecimal"),i.enter("characterReferenceValue"),v=6,b=IUe,M):(i.enter("characterReferenceValue"),v=7,b=zpt,M(F))}function M(F){if(F===59&&w){const R=i.exit("characterReferenceValue");return b===Zv&&!Vpt(g.sliceSerialize(R))?f(F):(i.enter("characterReferenceMarker"),i.consume(F),i.exit("characterReferenceMarker"),i.exit("characterReference"),a)}return b(F)&&w++<v?(i.consume(F),M):f(F)}}const M$t={tokenize:JUe,partial:!0},I$t={name:"codeFenced",tokenize:QUe,concrete:!0};function QUe(i,a,f){const g=this,w={tokenize:ct,partial:!0};let v=0,b=0,E;return S;function S(rt){return _(rt)}function _(rt){const it=g.events[g.events.length-1];return v=it&&it[1].type==="linePrefix"?it[2].sliceSerialize(it[1],!0).length:0,E=rt,i.enter("codeFenced"),i.enter("codeFencedFence"),i.enter("codeFencedFenceSequence"),M(rt)}function M(rt){return rt===E?(b++,i.consume(rt),M):b<3?f(rt):(i.exit("codeFencedFenceSequence"),du(rt)?Cl(i,F,"whitespace")(rt):F(rt))}function F(rt){return rt===null||$a(rt)?(i.exit("codeFencedFence"),g.interrupt?a(rt):i.check(M$t,Y,mt)(rt)):(i.enter("codeFencedFenceInfo"),i.enter("chunkString",{contentType:"string"}),R(rt))}function R(rt){return rt===null||$a(rt)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),F(rt)):du(rt)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),Cl(i,B,"whitespace")(rt)):rt===96&&rt===E?f(rt):(i.consume(rt),R)}function B(rt){return rt===null||$a(rt)?F(rt):(i.enter("codeFencedFenceMeta"),i.enter("chunkString",{contentType:"string"}),z(rt))}function z(rt){return rt===null||$a(rt)?(i.exit("chunkString"),i.exit("codeFencedFenceMeta"),F(rt)):rt===96&&rt===E?f(rt):(i.consume(rt),z)}function Y(rt){return i.attempt(w,mt,nt)(rt)}function nt(rt){return i.enter("lineEnding"),i.consume(rt),i.exit("lineEnding"),ot}function ot(rt){return v>0&&du(rt)?Cl(i,ft,"linePrefix",v+1)(rt):ft(rt)}function ft(rt){return rt===null||$a(rt)?i.check(M$t,Y,mt)(rt):(i.enter("codeFlowValue"),wt(rt))}function wt(rt){return rt===null||$a(rt)?(i.exit("codeFlowValue"),ft(rt)):(i.consume(rt),wt)}function mt(rt){return i.exit("codeFenced"),a(rt)}function ct(rt,it,gt){let Q=0;return dt;function dt(It){return rt.enter("lineEnding"),rt.consume(It),rt.exit("lineEnding"),K}function K(It){return rt.enter("codeFencedFence"),du(It)?Cl(rt,yt,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(It):yt(It)}function yt(It){return It===E?(rt.enter("codeFencedFenceSequence"),V(It)):gt(It)}function V(It){return It===E?(Q++,rt.consume(It),V):Q>=b?(rt.exit("codeFencedFenceSequence"),du(It)?Cl(rt,Ot,"whitespace")(It):Ot(It)):gt(It)}function Ot(It){return It===null||$a(It)?(rt.exit("codeFencedFence"),it(It)):gt(It)}}}function JUe(i,a,f){const g=this;return w;function w(b){return b===null?f(b):(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),v)}function v(b){return g.parser.lazy[g.now().line]?f(b):a(b)}}const Upt={name:"codeIndented",tokenize:tGe},ZUe={tokenize:eGe,partial:!0};function tGe(i,a,f){const g=this;return w;function w(_){return i.enter("codeIndented"),Cl(i,v,"linePrefix",4+1)(_)}function v(_){const M=g.events[g.events.length-1];return M&&M[1].type==="linePrefix"&&M[2].sliceSerialize(M[1],!0).length>=4?b(_):f(_)}function b(_){return _===null?S(_):$a(_)?i.attempt(ZUe,b,S)(_):(i.enter("codeFlowValue"),E(_))}function E(_){return _===null||$a(_)?(i.exit("codeFlowValue"),b(_)):(i.consume(_),E)}function S(_){return i.exit("codeIndented"),a(_)}}function eGe(i,a,f){const g=this;return w;function w(b){return g.parser.lazy[g.now().line]?f(b):$a(b)?(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),w):Cl(i,v,"linePrefix",4+1)(b)}function v(b){const E=g.events[g.events.length-1];return E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?a(b):$a(b)?w(b):f(b)}}const nGe={name:"codeText",tokenize:sGe,resolve:rGe,previous:iGe};function rGe(i){let a=i.length-4,f=3,g,w;if((i[f][1].type==="lineEnding"||i[f][1].type==="space")&&(i[a][1].type==="lineEnding"||i[a][1].type==="space")){for(g=f;++g<a;)if(i[g][1].type==="codeTextData"){i[f][1].type="codeTextPadding",i[a][1].type="codeTextPadding",f+=2,a-=2;break}}for(g=f-1,a++;++g<=a;)w===void 0?g!==a&&i[g][1].type!=="lineEnding"&&(w=g):(g===a||i[g][1].type==="lineEnding")&&(i[w][1].type="codeTextData",g!==w+2&&(i[w][1].end=i[g-1][1].end,i.splice(w+2,g-w-2),a-=g-w-2,g=w+2),w=void 0);return i}function iGe(i){return i!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sGe(i,a,f){let g=0,w,v;return b;function b(F){return i.enter("codeText"),i.enter("codeTextSequence"),E(F)}function E(F){return F===96?(i.consume(F),g++,E):(i.exit("codeTextSequence"),S(F))}function S(F){return F===null?f(F):F===32?(i.enter("space"),i.consume(F),i.exit("space"),S):F===96?(v=i.enter("codeTextSequence"),w=0,M(F)):$a(F)?(i.enter("lineEnding"),i.consume(F),i.exit("lineEnding"),S):(i.enter("codeTextData"),_(F))}function _(F){return F===null||F===32||F===96||$a(F)?(i.exit("codeTextData"),S(F)):(i.consume(F),_)}function M(F){return F===96?(i.consume(F),w++,M):w===g?(i.exit("codeTextSequence"),i.exit("codeText"),a(F)):(v.type="codeTextData",_(F))}}function O$t(i){const a={};let f=-1,g,w,v,b,E,S,_;for(;++f<i.length;){for(;f in a;)f=a[f];if(g=i[f],f&&g[1].type==="chunkFlow"&&i[f-1][1].type==="listItemPrefix"&&(S=g[1]._tokenizer.events,v=0,v<S.length&&S[v][1].type==="lineEndingBlank"&&(v+=2),v<S.length&&S[v][1].type==="content"))for(;++v<S.length&&S[v][1].type!=="content";)S[v][1].type==="chunkText"&&(S[v][1]._isInFirstContentOfListItem=!0,v++);if(g[0]==="enter")g[1].contentType&&(Object.assign(a,aGe(i,f)),f=a[f],_=!0);else if(g[1]._container){for(v=f,w=void 0;v--&&(b=i[v],b[1].type==="lineEnding"||b[1].type==="lineEndingBlank");)b[0]==="enter"&&(w&&(i[w][1].type="lineEndingBlank"),b[1].type="lineEnding",w=v);w&&(g[1].end=Object.assign({},i[w][1].start),E=i.slice(w,f),E.unshift(g),c4(i,w,f-w+1,E))}}return!_}function aGe(i,a){const f=i[a][1],g=i[a][2];let w=a-1;const v=[],b=f._tokenizer||g.parser[f.contentType](f.start),E=b.events,S=[],_={};let M,F,R=-1,B=f,z=0,Y=0;const nt=[Y];for(;B;){for(;i[++w][1]!==B;);v.push(w),B._tokenizer||(M=g.sliceStream(B),B.next||M.push(null),F&&b.defineSkip(B.start),B._isInFirstContentOfListItem&&(b._gfmTasklistFirstContentOfListItem=!0),b.write(M),B._isInFirstContentOfListItem&&(b._gfmTasklistFirstContentOfListItem=void 0)),F=B,B=B.next}for(B=f;++R<E.length;)E[R][0]==="exit"&&E[R-1][0]==="enter"&&E[R][1].type===E[R-1][1].type&&E[R][1].start.line!==E[R][1].end.line&&(Y=R+1,nt.push(Y),B._tokenizer=void 0,B.previous=void 0,B=B.next);for(b.events=[],B?(B._tokenizer=void 0,B.previous=void 0):nt.pop(),R=nt.length;R--;){const ot=E.slice(nt[R],nt[R+1]),ft=v.pop();S.unshift([ft,ft+ot.length-1]),c4(i,ft,2,ot)}for(R=-1;++R<S.length;)_[z+S[R][0]]=z+S[R][1],z+=S[R][1]-S[R][0]-1;return _}const oGe={tokenize:lGe,resolve:uGe},cGe={tokenize:hGe,partial:!0};function uGe(i){return O$t(i),i}function lGe(i,a){let f;return g;function g(E){return i.enter("content"),f=i.enter("chunkContent",{contentType:"content"}),w(E)}function w(E){return E===null?v(E):$a(E)?i.check(cGe,b,v)(E):(i.consume(E),w)}function v(E){return i.exit("chunkContent"),i.exit("content"),a(E)}function b(E){return i.consume(E),i.exit("chunkContent"),f.next=i.enter("chunkContent",{contentType:"content",previous:f}),f=f.next,w}}function hGe(i,a,f){const g=this;return w;function w(b){return i.exit("chunkContent"),i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),Cl(i,v,"linePrefix")}function v(b){if(b===null||$a(b))return f(b);const E=g.events[g.events.length-1];return!g.parser.constructs.disable.null.includes("codeIndented")&&E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?a(b):i.interrupt(g.parser.constructs.flow,f,a)(b)}}function N$t(i,a,f,g,w,v,b,E,S){const _=S||Number.POSITIVE_INFINITY;let M=0;return F;function F(ot){return ot===60?(i.enter(g),i.enter(w),i.enter(v),i.consume(ot),i.exit(v),R):ot===null||ot===32||ot===41||$pt(ot)?f(ot):(i.enter(g),i.enter(b),i.enter(E),i.enter("chunkString",{contentType:"string"}),Y(ot))}function R(ot){return ot===62?(i.enter(v),i.consume(ot),i.exit(v),i.exit(w),i.exit(g),a):(i.enter(E),i.enter("chunkString",{contentType:"string"}),B(ot))}function B(ot){return ot===62?(i.exit("chunkString"),i.exit(E),R(ot)):ot===null||ot===60||$a(ot)?f(ot):(i.consume(ot),ot===92?z:B)}function z(ot){return ot===60||ot===62||ot===92?(i.consume(ot),B):B(ot)}function Y(ot){return!M&&(ot===null||ot===41||ob(ot))?(i.exit("chunkString"),i.exit(E),i.exit(b),i.exit(g),a(ot)):M<_&&ot===40?(i.consume(ot),M++,Y):ot===41?(i.consume(ot),M--,Y):ot===null||ot===32||ot===40||$pt(ot)?f(ot):(i.consume(ot),ot===92?nt:Y)}function nt(ot){return ot===40||ot===41||ot===92?(i.consume(ot),Y):Y(ot)}}function P$t(i,a,f,g,w,v){const b=this;let E=0,S;return _;function _(B){return i.enter(g),i.enter(w),i.consume(B),i.exit(w),i.enter(v),M}function M(B){return E>999||B===null||B===91||B===93&&!S||B===94&&!E&&"_hiddenFootnoteSupport"in b.parser.constructs?f(B):B===93?(i.exit(v),i.enter(w),i.consume(B),i.exit(w),i.exit(g),a):$a(B)?(i.enter("lineEnding"),i.consume(B),i.exit("lineEnding"),M):(i.enter("chunkString",{contentType:"string"}),F(B))}function F(B){return B===null||B===91||B===93||$a(B)||E++>999?(i.exit("chunkString"),M(B)):(i.consume(B),S||(S=!du(B)),B===92?R:F)}function R(B){return B===91||B===92||B===93?(i.consume(B),E++,F):F(B)}}function F$t(i,a,f,g,w,v){let b;return E;function E(R){return R===34||R===39||R===40?(i.enter(g),i.enter(w),i.consume(R),i.exit(w),b=R===40?41:R,S):f(R)}function S(R){return R===b?(i.enter(w),i.consume(R),i.exit(w),i.exit(g),a):(i.enter(v),_(R))}function _(R){return R===b?(i.exit(v),S(b)):R===null?f(R):$a(R)?(i.enter("lineEnding"),i.consume(R),i.exit("lineEnding"),Cl(i,_,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),M(R))}function M(R){return R===b||R===null||$a(R)?(i.exit("chunkString"),_(R)):(i.consume(R),R===92?F:M)}function F(R){return R===b||R===92?(i.consume(R),M):M(R)}}function ZF(i,a){let f;return g;function g(w){return $a(w)?(i.enter("lineEnding"),i.consume(w),i.exit("lineEnding"),f=!0,g):du(w)?Cl(i,g,f?"linePrefix":"lineSuffix")(w):a(w)}}function ED(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fGe={name:"definition",tokenize:gGe},dGe={tokenize:pGe,partial:!0};function gGe(i,a,f){const g=this;let w;return v;function v(B){return i.enter("definition"),b(B)}function b(B){return P$t.call(g,i,E,f,"definitionLabel","definitionLabelMarker","definitionLabelString")(B)}function E(B){return w=ED(g.sliceSerialize(g.events[g.events.length-1][1]).slice(1,-1)),B===58?(i.enter("definitionMarker"),i.consume(B),i.exit("definitionMarker"),S):f(B)}function S(B){return ob(B)?ZF(i,_)(B):_(B)}function _(B){return N$t(i,M,f,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(B)}function M(B){return i.attempt(dGe,F,F)(B)}function F(B){return du(B)?Cl(i,R,"whitespace")(B):R(B)}function R(B){return B===null||$a(B)?(i.exit("definition"),g.parser.defined.push(w),a(B)):f(B)}}function pGe(i,a,f){return g;function g(E){return ob(E)?ZF(i,w)(E):f(E)}function w(E){return F$t(i,v,f,"definitionTitle","definitionTitleMarker","definitionTitleString")(E)}function v(E){return du(E)?Cl(i,b,"whitespace")(E):b(E)}function b(E){return E===null||$a(E)?a(E):f(E)}}const bGe={name:"hardBreakEscape",tokenize:wGe};function wGe(i,a,f){return g;function g(v){return i.enter("hardBreakEscape"),i.consume(v),w}function w(v){return $a(v)?(i.exit("hardBreakEscape"),a(v)):f(v)}}const mGe={name:"headingAtx",tokenize:yGe,resolve:vGe};function vGe(i,a){let f=i.length-2,g=3,w,v;return i[g][1].type==="whitespace"&&(g+=2),f-2>g&&i[f][1].type==="whitespace"&&(f-=2),i[f][1].type==="atxHeadingSequence"&&(g===f-1||f-4>g&&i[f-2][1].type==="whitespace")&&(f-=g+1===f?2:4),f>g&&(w={type:"atxHeadingText",start:i[g][1].start,end:i[f][1].end},v={type:"chunkText",start:i[g][1].start,end:i[f][1].end,contentType:"text"},c4(i,g,f-g+1,[["enter",w,a],["enter",v,a],["exit",v,a],["exit",w,a]])),i}function yGe(i,a,f){let g=0;return w;function w(M){return i.enter("atxHeading"),v(M)}function v(M){return i.enter("atxHeadingSequence"),b(M)}function b(M){return M===35&&g++<6?(i.consume(M),b):M===null||ob(M)?(i.exit("atxHeadingSequence"),E(M)):f(M)}function E(M){return M===35?(i.enter("atxHeadingSequence"),S(M)):M===null||$a(M)?(i.exit("atxHeading"),a(M)):du(M)?Cl(i,E,"whitespace")(M):(i.enter("atxHeadingText"),_(M))}function S(M){return M===35?(i.consume(M),S):(i.exit("atxHeadingSequence"),E(M))}function _(M){return M===null||M===35||ob(M)?(i.exit("atxHeadingText"),E(M)):(i.consume(M),_)}}const xGe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],B$t=["pre","script","style","textarea"],kGe={name:"htmlFlow",tokenize:SGe,resolveTo:CGe,concrete:!0},EGe={tokenize:AGe,partial:!0},TGe={tokenize:_Ge,partial:!0};function CGe(i){let a=i.length;for(;a--&&!(i[a][0]==="enter"&&i[a][1].type==="htmlFlow"););return a>1&&i[a-2][1].type==="linePrefix"&&(i[a][1].start=i[a-2][1].start,i[a+1][1].start=i[a-2][1].start,i.splice(a-2,2)),i}function SGe(i,a,f){const g=this;let w,v,b,E,S;return _;function _(Mt){return M(Mt)}function M(Mt){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(Mt),F}function F(Mt){return Mt===33?(i.consume(Mt),R):Mt===47?(i.consume(Mt),v=!0,Y):Mt===63?(i.consume(Mt),w=3,g.interrupt?a:kt):u4(Mt)?(i.consume(Mt),b=String.fromCharCode(Mt),nt):f(Mt)}function R(Mt){return Mt===45?(i.consume(Mt),w=2,B):Mt===91?(i.consume(Mt),w=5,E=0,z):u4(Mt)?(i.consume(Mt),w=4,g.interrupt?a:kt):f(Mt)}function B(Mt){return Mt===45?(i.consume(Mt),g.interrupt?a:kt):f(Mt)}function z(Mt){const pn="CDATA[";return Mt===pn.charCodeAt(E++)?(i.consume(Mt),E===pn.length?g.interrupt?a:yt:z):f(Mt)}function Y(Mt){return u4(Mt)?(i.consume(Mt),b=String.fromCharCode(Mt),nt):f(Mt)}function nt(Mt){if(Mt===null||Mt===47||Mt===62||ob(Mt)){const pn=Mt===47,Ae=b.toLowerCase();return!pn&&!v&&B$t.includes(Ae)?(w=1,g.interrupt?a(Mt):yt(Mt)):xGe.includes(b.toLowerCase())?(w=6,pn?(i.consume(Mt),ot):g.interrupt?a(Mt):yt(Mt)):(w=7,g.interrupt&&!g.parser.lazy[g.now().line]?f(Mt):v?ft(Mt):wt(Mt))}return Mt===45||Zv(Mt)?(i.consume(Mt),b+=String.fromCharCode(Mt),nt):f(Mt)}function ot(Mt){return Mt===62?(i.consume(Mt),g.interrupt?a:yt):f(Mt)}function ft(Mt){return du(Mt)?(i.consume(Mt),ft):dt(Mt)}function wt(Mt){return Mt===47?(i.consume(Mt),dt):Mt===58||Mt===95||u4(Mt)?(i.consume(Mt),mt):du(Mt)?(i.consume(Mt),wt):dt(Mt)}function mt(Mt){return Mt===45||Mt===46||Mt===58||Mt===95||Zv(Mt)?(i.consume(Mt),mt):ct(Mt)}function ct(Mt){return Mt===61?(i.consume(Mt),rt):du(Mt)?(i.consume(Mt),ct):wt(Mt)}function rt(Mt){return Mt===null||Mt===60||Mt===61||Mt===62||Mt===96?f(Mt):Mt===34||Mt===39?(i.consume(Mt),S=Mt,it):du(Mt)?(i.consume(Mt),rt):gt(Mt)}function it(Mt){return Mt===S?(i.consume(Mt),S=null,Q):Mt===null||$a(Mt)?f(Mt):(i.consume(Mt),it)}function gt(Mt){return Mt===null||Mt===34||Mt===39||Mt===47||Mt===60||Mt===61||Mt===62||Mt===96||ob(Mt)?ct(Mt):(i.consume(Mt),gt)}function Q(Mt){return Mt===47||Mt===62||du(Mt)?wt(Mt):f(Mt)}function dt(Mt){return Mt===62?(i.consume(Mt),K):f(Mt)}function K(Mt){return Mt===null||$a(Mt)?yt(Mt):du(Mt)?(i.consume(Mt),K):f(Mt)}function yt(Mt){return Mt===45&&w===2?(i.consume(Mt),jt):Mt===60&&w===1?(i.consume(Mt),xt):Mt===62&&w===4?(i.consume(Mt),Gt):Mt===63&&w===3?(i.consume(Mt),kt):Mt===93&&w===5?(i.consume(Mt),Ct):$a(Mt)&&(w===6||w===7)?(i.exit("htmlFlowData"),i.check(EGe,Fe,V)(Mt)):Mt===null||$a(Mt)?(i.exit("htmlFlowData"),V(Mt)):(i.consume(Mt),yt)}function V(Mt){return i.check(TGe,Ot,Fe)(Mt)}function Ot(Mt){return i.enter("lineEnding"),i.consume(Mt),i.exit("lineEnding"),It}function It(Mt){return Mt===null||$a(Mt)?V(Mt):(i.enter("htmlFlowData"),yt(Mt))}function jt(Mt){return Mt===45?(i.consume(Mt),kt):yt(Mt)}function xt(Mt){return Mt===47?(i.consume(Mt),b="",Ft):yt(Mt)}function Ft(Mt){if(Mt===62){const pn=b.toLowerCase();return B$t.includes(pn)?(i.consume(Mt),Gt):yt(Mt)}return u4(Mt)&&b.length<8?(i.consume(Mt),b+=String.fromCharCode(Mt),Ft):yt(Mt)}function Ct(Mt){return Mt===93?(i.consume(Mt),kt):yt(Mt)}function kt(Mt){return Mt===62?(i.consume(Mt),Gt):Mt===45&&w===2?(i.consume(Mt),kt):yt(Mt)}function Gt(Mt){return Mt===null||$a(Mt)?(i.exit("htmlFlowData"),Fe(Mt)):(i.consume(Mt),Gt)}function Fe(Mt){return i.exit("htmlFlow"),a(Mt)}}function _Ge(i,a,f){const g=this;return w;function w(b){return $a(b)?(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),v):f(b)}function v(b){return g.parser.lazy[g.now().line]?f(b):a(b)}}function AGe(i,a,f){return g;function g(w){return i.enter("lineEnding"),i.consume(w),i.exit("lineEnding"),i.attempt(XY,a,f)}}const LGe={name:"htmlText",tokenize:DGe};function DGe(i,a,f){const g=this;let w,v,b;return E;function E(kt){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(kt),S}function S(kt){return kt===33?(i.consume(kt),_):kt===47?(i.consume(kt),ct):kt===63?(i.consume(kt),wt):u4(kt)?(i.consume(kt),gt):f(kt)}function _(kt){return kt===45?(i.consume(kt),M):kt===91?(i.consume(kt),v=0,z):u4(kt)?(i.consume(kt),ft):f(kt)}function M(kt){return kt===45?(i.consume(kt),B):f(kt)}function F(kt){return kt===null?f(kt):kt===45?(i.consume(kt),R):$a(kt)?(b=F,xt(kt)):(i.consume(kt),F)}function R(kt){return kt===45?(i.consume(kt),B):F(kt)}function B(kt){return kt===62?jt(kt):kt===45?R(kt):F(kt)}function z(kt){const Gt="CDATA[";return kt===Gt.charCodeAt(v++)?(i.consume(kt),v===Gt.length?Y:z):f(kt)}function Y(kt){return kt===null?f(kt):kt===93?(i.consume(kt),nt):$a(kt)?(b=Y,xt(kt)):(i.consume(kt),Y)}function nt(kt){return kt===93?(i.consume(kt),ot):Y(kt)}function ot(kt){return kt===62?jt(kt):kt===93?(i.consume(kt),ot):Y(kt)}function ft(kt){return kt===null||kt===62?jt(kt):$a(kt)?(b=ft,xt(kt)):(i.consume(kt),ft)}function wt(kt){return kt===null?f(kt):kt===63?(i.consume(kt),mt):$a(kt)?(b=wt,xt(kt)):(i.consume(kt),wt)}function mt(kt){return kt===62?jt(kt):wt(kt)}function ct(kt){return u4(kt)?(i.consume(kt),rt):f(kt)}function rt(kt){return kt===45||Zv(kt)?(i.consume(kt),rt):it(kt)}function it(kt){return $a(kt)?(b=it,xt(kt)):du(kt)?(i.consume(kt),it):jt(kt)}function gt(kt){return kt===45||Zv(kt)?(i.consume(kt),gt):kt===47||kt===62||ob(kt)?Q(kt):f(kt)}function Q(kt){return kt===47?(i.consume(kt),jt):kt===58||kt===95||u4(kt)?(i.consume(kt),dt):$a(kt)?(b=Q,xt(kt)):du(kt)?(i.consume(kt),Q):jt(kt)}function dt(kt){return kt===45||kt===46||kt===58||kt===95||Zv(kt)?(i.consume(kt),dt):K(kt)}function K(kt){return kt===61?(i.consume(kt),yt):$a(kt)?(b=K,xt(kt)):du(kt)?(i.consume(kt),K):Q(kt)}function yt(kt){return kt===null||kt===60||kt===61||kt===62||kt===96?f(kt):kt===34||kt===39?(i.consume(kt),w=kt,V):$a(kt)?(b=yt,xt(kt)):du(kt)?(i.consume(kt),yt):(i.consume(kt),Ot)}function V(kt){return kt===w?(i.consume(kt),w=void 0,It):kt===null?f(kt):$a(kt)?(b=V,xt(kt)):(i.consume(kt),V)}function Ot(kt){return kt===null||kt===34||kt===39||kt===60||kt===61||kt===96?f(kt):kt===47||kt===62||ob(kt)?Q(kt):(i.consume(kt),Ot)}function It(kt){return kt===47||kt===62||ob(kt)?Q(kt):f(kt)}function jt(kt){return kt===62?(i.consume(kt),i.exit("htmlTextData"),i.exit("htmlText"),a):f(kt)}function xt(kt){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(kt),i.exit("lineEnding"),Ft}function Ft(kt){return du(kt)?Cl(i,Ct,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(kt):Ct(kt)}function Ct(kt){return i.enter("htmlTextData"),b(kt)}}const Gpt={name:"labelEnd",tokenize:FGe,resolveTo:PGe,resolveAll:NGe},MGe={tokenize:BGe},IGe={tokenize:RGe},OGe={tokenize:jGe};function NGe(i){let a=-1;for(;++a<i.length;){const f=i[a][1];(f.type==="labelImage"||f.type==="labelLink"||f.type==="labelEnd")&&(i.splice(a+1,f.type==="labelImage"?4:2),f.type="data",a++)}return i}function PGe(i,a){let f=i.length,g=0,w,v,b,E;for(;f--;)if(w=i[f][1],v){if(w.type==="link"||w.type==="labelLink"&&w._inactive)break;i[f][0]==="enter"&&w.type==="labelLink"&&(w._inactive=!0)}else if(b){if(i[f][0]==="enter"&&(w.type==="labelImage"||w.type==="labelLink")&&!w._balanced&&(v=f,w.type!=="labelLink")){g=2;break}}else w.type==="labelEnd"&&(b=f);const S={type:i[v][1].type==="labelLink"?"link":"image",start:Object.assign({},i[v][1].start),end:Object.assign({},i[i.length-1][1].end)},_={type:"label",start:Object.assign({},i[v][1].start),end:Object.assign({},i[b][1].end)},M={type:"labelText",start:Object.assign({},i[v+g+2][1].end),end:Object.assign({},i[b-2][1].start)};return E=[["enter",S,a],["enter",_,a]],E=tm(E,i.slice(v+1,v+g+3)),E=tm(E,[["enter",M,a]]),E=tm(E,qpt(a.parser.constructs.insideSpan.null,i.slice(v+g+4,b-3),a)),E=tm(E,[["exit",M,a],i[b-2],i[b-1],["exit",_,a]]),E=tm(E,i.slice(b+1)),E=tm(E,[["exit",S,a]]),c4(i,v,i.length,E),i}function FGe(i,a,f){const g=this;let w=g.events.length,v,b;for(;w--;)if((g.events[w][1].type==="labelImage"||g.events[w][1].type==="labelLink")&&!g.events[w][1]._balanced){v=g.events[w][1];break}return E;function E(R){return v?v._inactive?F(R):(b=g.parser.defined.includes(ED(g.sliceSerialize({start:v.end,end:g.now()}))),i.enter("labelEnd"),i.enter("labelMarker"),i.consume(R),i.exit("labelMarker"),i.exit("labelEnd"),S):f(R)}function S(R){return R===40?i.attempt(MGe,M,b?M:F)(R):R===91?i.attempt(IGe,M,b?_:F)(R):b?M(R):F(R)}function _(R){return i.attempt(OGe,M,F)(R)}function M(R){return a(R)}function F(R){return v._balanced=!0,f(R)}}function BGe(i,a,f){return g;function g(F){return i.enter("resource"),i.enter("resourceMarker"),i.consume(F),i.exit("resourceMarker"),w}function w(F){return ob(F)?ZF(i,v)(F):v(F)}function v(F){return F===41?M(F):N$t(i,b,E,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(F)}function b(F){return ob(F)?ZF(i,S)(F):M(F)}function E(F){return f(F)}function S(F){return F===34||F===39||F===40?F$t(i,_,f,"resourceTitle","resourceTitleMarker","resourceTitleString")(F):M(F)}function _(F){return ob(F)?ZF(i,M)(F):M(F)}function M(F){return F===41?(i.enter("resourceMarker"),i.consume(F),i.exit("resourceMarker"),i.exit("resource"),a):f(F)}}function RGe(i,a,f){const g=this;return w;function w(E){return P$t.call(g,i,v,b,"reference","referenceMarker","referenceString")(E)}function v(E){return g.parser.defined.includes(ED(g.sliceSerialize(g.events[g.events.length-1][1]).slice(1,-1)))?a(E):f(E)}function b(E){return f(E)}}function jGe(i,a,f){return g;function g(v){return i.enter("reference"),i.enter("referenceMarker"),i.consume(v),i.exit("referenceMarker"),w}function w(v){return v===93?(i.enter("referenceMarker"),i.consume(v),i.exit("referenceMarker"),i.exit("reference"),a):f(v)}}const $Ge={name:"labelStartImage",tokenize:zGe,resolveAll:Gpt.resolveAll};function zGe(i,a,f){const g=this;return w;function w(E){return i.enter("labelImage"),i.enter("labelImageMarker"),i.consume(E),i.exit("labelImageMarker"),v}function v(E){return E===91?(i.enter("labelMarker"),i.consume(E),i.exit("labelMarker"),i.exit("labelImage"),b):f(E)}function b(E){return E===94&&"_hiddenFootnoteSupport"in g.parser.constructs?f(E):a(E)}}const qGe={name:"labelStartLink",tokenize:HGe,resolveAll:Gpt.resolveAll};function HGe(i,a,f){const g=this;return w;function w(b){return i.enter("labelLink"),i.enter("labelMarker"),i.consume(b),i.exit("labelMarker"),i.exit("labelLink"),v}function v(b){return b===94&&"_hiddenFootnoteSupport"in g.parser.constructs?f(b):a(b)}}const Kpt={name:"lineEnding",tokenize:VGe};function VGe(i,a){return f;function f(g){return i.enter("lineEnding"),i.consume(g),i.exit("lineEnding"),Cl(i,a,"linePrefix")}}const QY={name:"thematicBreak",tokenize:UGe};function UGe(i,a,f){let g=0,w;return v;function v(_){return i.enter("thematicBreak"),b(_)}function b(_){return w=_,E(_)}function E(_){return _===w?(i.enter("thematicBreakSequence"),S(_)):g>=3&&(_===null||$a(_))?(i.exit("thematicBreak"),a(_)):f(_)}function S(_){return _===w?(i.consume(_),g++,S):(i.exit("thematicBreakSequence"),du(_)?Cl(i,E,"whitespace")(_):E(_))}}const cb={name:"list",tokenize:WGe,continuation:{tokenize:YGe},exit:QGe},GGe={tokenize:JGe,partial:!0},KGe={tokenize:XGe,partial:!0};function WGe(i,a,f){const g=this,w=g.events[g.events.length-1];let v=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,b=0;return E;function E(B){const z=g.containerState.type||(B===42||B===43||B===45?"listUnordered":"listOrdered");if(z==="listUnordered"?!g.containerState.marker||B===g.containerState.marker:zpt(B)){if(g.containerState.type||(g.containerState.type=z,i.enter(z,{_container:!0})),z==="listUnordered")return i.enter("listItemPrefix"),B===42||B===45?i.check(QY,f,_)(B):_(B);if(!g.interrupt||B===49)return i.enter("listItemPrefix"),i.enter("listItemValue"),S(B)}return f(B)}function S(B){return zpt(B)&&++b<10?(i.consume(B),S):(!g.interrupt||b<2)&&(g.containerState.marker?B===g.containerState.marker:B===41||B===46)?(i.exit("listItemValue"),_(B)):f(B)}function _(B){return i.enter("listItemMarker"),i.consume(B),i.exit("listItemMarker"),g.containerState.marker=g.containerState.marker||B,i.check(XY,g.interrupt?f:M,i.attempt(GGe,R,F))}function M(B){return g.containerState.initialBlankLine=!0,v++,R(B)}function F(B){return du(B)?(i.enter("listItemPrefixWhitespace"),i.consume(B),i.exit("listItemPrefixWhitespace"),R):f(B)}function R(B){return g.containerState.size=v+g.sliceSerialize(i.exit("listItemPrefix"),!0).length,a(B)}}function YGe(i,a,f){const g=this;return g.containerState._closeFlow=void 0,i.check(XY,w,v);function w(E){return g.containerState.furtherBlankLines=g.containerState.furtherBlankLines||g.containerState.initialBlankLine,Cl(i,a,"listItemIndent",g.containerState.size+1)(E)}function v(E){return g.containerState.furtherBlankLines||!du(E)?(g.containerState.furtherBlankLines=void 0,g.containerState.initialBlankLine=void 0,b(E)):(g.containerState.furtherBlankLines=void 0,g.containerState.initialBlankLine=void 0,i.attempt(KGe,a,b)(E))}function b(E){return g.containerState._closeFlow=!0,g.interrupt=void 0,Cl(i,i.attempt(cb,a,f),"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E)}}function XGe(i,a,f){const g=this;return Cl(i,w,"listItemIndent",g.containerState.size+1);function w(v){const b=g.events[g.events.length-1];return b&&b[1].type==="listItemIndent"&&b[2].sliceSerialize(b[1],!0).length===g.containerState.size?a(v):f(v)}}function QGe(i){i.exit(this.containerState.type)}function JGe(i,a,f){const g=this;return Cl(i,w,"listItemPrefixWhitespace",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function w(v){const b=g.events[g.events.length-1];return!du(v)&&b&&b[1].type==="listItemPrefixWhitespace"?a(v):f(v)}}const R$t={name:"setextUnderline",tokenize:tKe,resolveTo:ZGe};function ZGe(i,a){let f=i.length,g,w,v;for(;f--;)if(i[f][0]==="enter"){if(i[f][1].type==="content"){g=f;break}i[f][1].type==="paragraph"&&(w=f)}else i[f][1].type==="content"&&i.splice(f,1),!v&&i[f][1].type==="definition"&&(v=f);const b={type:"setextHeading",start:Object.assign({},i[w][1].start),end:Object.assign({},i[i.length-1][1].end)};return i[w][1].type="setextHeadingText",v?(i.splice(w,0,["enter",b,a]),i.splice(v+1,0,["exit",i[g][1],a]),i[g][1].end=Object.assign({},i[v][1].end)):i[g][1]=b,i.push(["exit",b,a]),i}function tKe(i,a,f){const g=this;let w;return v;function v(_){let M=g.events.length,F;for(;M--;)if(g.events[M][1].type!=="lineEnding"&&g.events[M][1].type!=="linePrefix"&&g.events[M][1].type!=="content"){F=g.events[M][1].type==="paragraph";break}return!g.parser.lazy[g.now().line]&&(g.interrupt||F)?(i.enter("setextHeadingLine"),w=_,b(_)):f(_)}function b(_){return i.enter("setextHeadingLineSequence"),E(_)}function E(_){return _===w?(i.consume(_),E):(i.exit("setextHeadingLineSequence"),du(_)?Cl(i,S,"lineSuffix")(_):S(_))}function S(_){return _===null||$a(_)?(i.exit("setextHeadingLine"),a(_)):f(_)}}const eKe={tokenize:nKe};function nKe(i){const a=this,f=i.attempt(XY,g,i.attempt(this.parser.constructs.flowInitial,w,Cl(i,i.attempt(this.parser.constructs.flow,w,i.attempt(oGe,w)),"linePrefix")));return f;function g(v){if(v===null){i.consume(v);return}return i.enter("lineEndingBlank"),i.consume(v),i.exit("lineEndingBlank"),a.currentConstruct=void 0,f}function w(v){if(v===null){i.consume(v);return}return i.enter("lineEnding"),i.consume(v),i.exit("lineEnding"),a.currentConstruct=void 0,f}}const rKe={resolveAll:$$t()},iKe=j$t("string"),sKe=j$t("text");function j$t(i){return{tokenize:a,resolveAll:$$t(i==="text"?aKe:void 0)};function a(f){const g=this,w=this.parser.constructs[i],v=f.attempt(w,b,E);return b;function b(M){return _(M)?v(M):E(M)}function E(M){if(M===null){f.consume(M);return}return f.enter("data"),f.consume(M),S}function S(M){return _(M)?(f.exit("data"),v(M)):(f.consume(M),S)}function _(M){if(M===null)return!0;const F=w[M];let R=-1;if(F)for(;++R<F.length;){const B=F[R];if(!B.previous||B.previous.call(g,g.previous))return!0}return!1}}}function $$t(i){return a;function a(f,g){let w=-1,v;for(;++w<=f.length;)v===void 0?f[w]&&f[w][1].type==="data"&&(v=w,w++):(!f[w]||f[w][1].type!=="data")&&(w!==v+2&&(f[v][1].end=f[w-1][1].end,f.splice(v+2,w-v-2),w=v+2),v=void 0);return i?i(f,g):f}}function aKe(i,a){let f=0;for(;++f<=i.length;)if((f===i.length||i[f][1].type==="lineEnding")&&i[f-1][1].type==="data"){const g=i[f-1][1],w=a.sliceStream(g);let v=w.length,b=-1,E=0,S;for(;v--;){const _=w[v];if(typeof _=="string"){for(b=_.length;_.charCodeAt(b-1)===32;)E++,b--;if(b)break;b=-1}else if(_===-2)S=!0,E++;else if(_!==-1){v++;break}}if(E){const _={type:f===i.length||S||E<2?"lineSuffix":"hardBreakTrailing",start:{line:g.end.line,column:g.end.column-E,offset:g.end.offset-E,_index:g.start._index+v,_bufferIndex:v?b:g.start._bufferIndex+b},end:Object.assign({},g.end)};g.end=Object.assign({},_.start),g.start.offset===g.end.offset?Object.assign(g,_):(i.splice(f,0,["enter",_,a],["exit",_,a]),f+=2)}f++}return i}function oKe(i,a,f){let g=Object.assign(f?Object.assign({},f):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const w={},v=[];let b=[],E=[];const S={consume:ft,enter:wt,exit:mt,attempt:it(ct),check:it(rt),interrupt:it(rt,{interrupt:!0})},_={previous:null,code:null,containerState:{},events:[],parser:i,sliceStream:B,sliceSerialize:R,now:z,defineSkip:Y,write:F};let M=a.tokenize.call(_,S);return a.resolveAll&&v.push(a),_;function F(K){return b=tm(b,K),nt(),b[b.length-1]!==null?[]:(gt(a,0),_.events=qpt(v,_.events,_),_.events)}function R(K,yt){return uKe(B(K),yt)}function B(K){return cKe(b,K)}function z(){const{line:K,column:yt,offset:V,_index:Ot,_bufferIndex:It}=g;return{line:K,column:yt,offset:V,_index:Ot,_bufferIndex:It}}function Y(K){w[K.line]=K.column,dt()}function nt(){let K;for(;g._index<b.length;){const yt=b[g._index];if(typeof yt=="string")for(K=g._index,g._bufferIndex<0&&(g._bufferIndex=0);g._index===K&&g._bufferIndex<yt.length;)ot(yt.charCodeAt(g._bufferIndex));else ot(yt)}}function ot(K){M=M(K)}function ft(K){$a(K)?(g.line++,g.column=1,g.offset+=K===-3?2:1,dt()):K!==-1&&(g.column++,g.offset++),g._bufferIndex<0?g._index++:(g._bufferIndex++,g._bufferIndex===b[g._index].length&&(g._bufferIndex=-1,g._index++)),_.previous=K}function wt(K,yt){const V=yt||{};return V.type=K,V.start=z(),_.events.push(["enter",V,_]),E.push(V),V}function mt(K){const yt=E.pop();return yt.end=z(),_.events.push(["exit",yt,_]),yt}function ct(K,yt){gt(K,yt.from)}function rt(K,yt){yt.restore()}function it(K,yt){return V;function V(Ot,It,jt){let xt,Ft,Ct,kt;return Array.isArray(Ot)?Fe(Ot):"tokenize"in Ot?Fe([Ot]):Gt(Ot);function Gt(ye){return tn;function tn(sn){const be=sn!==null&&ye[sn],Ne=sn!==null&&ye.null,Xt=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(Ne)?Ne:Ne?[Ne]:[]];return Fe(Xt)(sn)}}function Fe(ye){return xt=ye,Ft=0,ye.length===0?jt:Mt(ye[Ft])}function Mt(ye){return tn;function tn(sn){return kt=Q(),Ct=ye,ye.partial||(_.currentConstruct=ye),ye.name&&_.parser.constructs.disable.null.includes(ye.name)?Ae():ye.tokenize.call(yt?Object.assign(Object.create(_),yt):_,S,pn,Ae)(sn)}}function pn(ye){return K(Ct,kt),It}function Ae(ye){return kt.restore(),++Ft<xt.length?Mt(xt[Ft]):jt}}}function gt(K,yt){K.resolveAll&&!v.includes(K)&&v.push(K),K.resolve&&c4(_.events,yt,_.events.length-yt,K.resolve(_.events.slice(yt),_)),K.resolveTo&&(_.events=K.resolveTo(_.events,_))}function Q(){const K=z(),yt=_.previous,V=_.currentConstruct,Ot=_.events.length,It=Array.from(E);return{restore:jt,from:Ot};function jt(){g=K,_.previous=yt,_.currentConstruct=V,_.events.length=Ot,E=It,dt()}}function dt(){g.line in w&&g.column<2&&(g.column=w[g.line],g.offset+=w[g.line]-1)}}function cKe(i,a){const f=a.start._index,g=a.start._bufferIndex,w=a.end._index,v=a.end._bufferIndex;let b;if(f===w)b=[i[f].slice(g,v)];else{if(b=i.slice(f,w),g>-1){const E=b[0];typeof E=="string"?b[0]=E.slice(g):b.shift()}v>0&&b.push(i[w].slice(0,v))}return b}function uKe(i,a){let f=-1;const g=[];let w;for(;++f<i.length;){const v=i[f];let b;if(typeof v=="string")b=v;else switch(v){case-5:{b="\r";break}case-4:{b=`
114 <span class="${S} ${g}" `+(a.labelStyle?'style="'+a.labelStyle+'"':"")+">"+E+"</span>"),CKe(b,a.labelStyle),b.style("display","table-cell"),b.style("white-space","nowrap"),b.style("max-width",f+"px"),b.attr("xmlns","http://www.w3.org/1999/xhtml"),w&&b.attr("class","labelBkg");let _=b.node().getBoundingClientRect();return _.width===f&&(b.style("display","table"),b.style("white-space","break-spaces"),b.style("width",f+"px"),_=b.node().getBoundingClientRect()),v.style("width",_.width),v.style("height",_.height),v.node()}function Xpt(i,a,f){return i.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",a*f-.1+"em").attr("dy",f+"em")}function _Ke(i,a,f){const g=i.append("text"),w=Xpt(g,1,a);Qpt(w,f);const v=w.node().getComputedTextLength();return g.remove(),v}function AKe(i,a,f){var b;const g=i.append("text"),w=Xpt(g,1,a);Qpt(w,[{content:f,type:"normal"}]);const v=(b=w.node())==null?void 0:b.getBoundingClientRect();return v&&g.remove(),v}function LKe(i,a,f,g=!1){const v=a.append("g"),b=v.insert("rect").attr("class","background"),E=v.append("text").attr("y","-10.1");let S=0;for(const _ of f){const M=R=>_Ke(v,1.1,R)<=i,F=M(_)?[_]:TKe(_,M);for(const R of F){const B=Xpt(E,S,1.1);Qpt(B,R),S++}}if(g){const _=E.node().getBBox(),M=2;return b.attr("x",-M).attr("y",-M).attr("width",_.width+2*M).attr("height",_.height+2*M),v.node()}else return E.node()}function Qpt(i,a){i.text(""),a.forEach((f,g)=>{const w=i.append("tspan").attr("font-style",f.type==="emphasis"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",f.type==="strong"?"bold":"normal");g===0?w.text(f.content):w.text(" "+f.content)})}const ZY=(i,a="",{style:f="",isTitle:g=!1,classes:w="",useHtmlLabels:v=!0,isNode:b=!0,width:E=200,addSvgBackground:S=!1}={})=>{if(Kt.info("createText",a,f,g,w,v,b,S),v){const _=xKe(a),M={isNode:b,label:IF(_).replace(/fa[blrs]?:fa-[\w-]+/g,R=>`<i class='${R.replace(":"," ")}'></i>`),labelStyle:f.replace("fill:","color:")};return SKe(i,M,E,w,S)}else{const _=yKe(a);return LKe(E,i,_,S)}},$1=async(i,a,f,g)=>{let w;const v=a.useHtmlLabels||j1(Re().flowchart.htmlLabels);f?w=f:w="node default";const b=i.insert("g").attr("class",w).attr("id",a.domId||a.id),E=b.insert("g").attr("class","label").attr("style",a.labelStyle);let S;a.labelText===void 0?S="":S=typeof a.labelText=="string"?a.labelText:a.labelText[0];const _=E.node();let M;a.labelType==="markdown"?M=ZY(E,Ef(IF(S),Re()),{useHtmlLabels:v,width:a.width||Re().flowchart.wrappingWidth,classes:"markdown-node-label"}):M=_.appendChild(ab(Ef(IF(S),Re()),a.labelStyle,!1,g));let F=M.getBBox();const R=a.padding/2;if(j1(Re().flowchart.htmlLabels)){const B=M.children[0],z=Tr(M),Y=B.getElementsByTagName("img");if(Y){const nt=S.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...Y].map(ot=>new Promise(ft=>{function wt(){if(ot.style.display="flex",ot.style.flexDirection="column",nt){const mt=Re().fontSize?Re().fontSize:window.getComputedStyle(document.body).fontSize,ct=5,rt=parseInt(mt,10)*ct+"px";ot.style.minWidth=rt,ot.style.maxWidth=rt}else ot.style.width="100%";ft(ot)}setTimeout(()=>{ot.complete&&wt()}),ot.addEventListener("error",wt),ot.addEventListener("load",wt)})))}F=B.getBoundingClientRect(),z.attr("width",F.width),z.attr("height",F.height)}return v?E.attr("transform","translate("+-F.width/2+", "+-F.height/2+")"):E.attr("transform","translate(0, "+-F.height/2+")"),a.centerLabel&&E.attr("transform","translate("+-F.width/2+", "+-F.height/2+")"),E.insert("rect",":first-child"),{shapeSvg:b,bbox:F,halfPadding:R,label:E}},xh=(i,a)=>{const f=a.node().getBBox();i.width=f.width,i.height=f.height};function l4(i,a,f,g){return i.insert("polygon",":first-child").attr("points",g.map(function(w){return w.x+","+w.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-a/2+","+f/2+")")}let ho={},ty={},X$t={};const DKe=()=>{ty={},X$t={},ho={}},tX=(i,a)=>(Kt.trace("In isDecendant",a," ",i," = ",ty[a].includes(i)),!!ty[a].includes(i)),MKe=(i,a)=>(Kt.info("Decendants of ",a," is ",ty[a]),Kt.info("Edge is ",i),i.v===a||i.w===a?!1:ty[a]?ty[a].includes(i.v)||tX(i.v,a)||tX(i.w,a)||ty[a].includes(i.w):(Kt.debug("Tilt, ",a,",not in decendants"),!1)),Q$t=(i,a,f,g)=>{Kt.warn("Copying children of ",i,"root",g,"data",a.node(i),g);const w=a.children(i)||[];i!==g&&w.push(i),Kt.warn("Copying (nodes) clusterId",i,"nodes",w),w.forEach(v=>{if(a.children(v).length>0)Q$t(v,a,f,g);else{const b=a.node(v);Kt.info("cp ",v," to ",g," with parent ",i),f.setNode(v,b),g!==a.parent(v)&&(Kt.warn("Setting parent",v,a.parent(v)),f.setParent(v,a.parent(v))),i!==g&&v!==i?(Kt.debug("Setting parent",v,i),f.setParent(v,i)):(Kt.info("In copy ",i,"root",g,"data",a.node(i),g),Kt.debug("Not Setting parent for node=",v,"cluster!==rootId",i!==g,"node!==clusterId",v!==i));const E=a.edges(v);Kt.debug("Copying Edges",E),E.forEach(S=>{Kt.info("Edge",S);const _=a.edge(S.v,S.w,S.name);Kt.info("Edge data",_,g);try{MKe(S,g)?(Kt.info("Copying as ",S.v,S.w,_,S.name),f.setEdge(S.v,S.w,_,S.name),Kt.info("newGraph edges ",f.edges(),f.edge(f.edges()[0]))):Kt.info("Skipping copy of edge ",S.v,"-->",S.w," rootId: ",g," clusterId:",i)}catch(M){Kt.error(M)}})}Kt.debug("Removing node",v),a.removeNode(v)})},J$t=(i,a)=>{const f=a.children(i);let g=[...f];for(const w of f)X$t[w]=i,g=[...g,...J$t(w,a)];return g},tB=(i,a)=>{Kt.trace("Searching",i);const f=a.children(i);if(Kt.trace("Searching children of id ",i,f),f.length<1)return Kt.trace("This is a valid node",i),i;for(const g of f){const w=tB(g,a);if(w)return Kt.trace("Found replacement for",i," => ",w),w}},eX=i=>!ho[i]||!ho[i].externalConnections?i:ho[i]?ho[i].id:i,IKe=(i,a)=>{if(!i||a>10){Kt.debug("Opting out, no graph ");return}else Kt.debug("Opting in, graph ");i.nodes().forEach(function(f){i.children(f).length>0&&(Kt.warn("Cluster identified",f," Replacement id in edges: ",tB(f,i)),ty[f]=J$t(f,i),ho[f]={id:tB(f,i),clusterData:i.node(f)})}),i.nodes().forEach(function(f){const g=i.children(f),w=i.edges();g.length>0?(Kt.debug("Cluster identified",f,ty),w.forEach(v=>{if(v.v!==f&&v.w!==f){const b=tX(v.v,f),E=tX(v.w,f);b^E&&(Kt.warn("Edge: ",v," leaves cluster ",f),Kt.warn("Decendants of XXX ",f,": ",ty[f]),ho[f].externalConnections=!0)}})):Kt.debug("Not a cluster ",f,ty)});for(let f of Object.keys(ho)){const g=ho[f].id,w=i.parent(g);w!==f&&ho[w]&&!ho[w].externalConnections&&(ho[f].id=w)}i.edges().forEach(function(f){const g=i.edge(f);Kt.warn("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f)),Kt.warn("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(i.edge(f)));let w=f.v,v=f.w;if(Kt.warn("Fix XXX",ho,"ids:",f.v,f.w,"Translating: ",ho[f.v]," --- ",ho[f.w]),ho[f.v]&&ho[f.w]&&ho[f.v]===ho[f.w]){Kt.warn("Fixing and trixing link to self - removing XXX",f.v,f.w,f.name),Kt.warn("Fixing and trixing - removing XXX",f.v,f.w,f.name),w=eX(f.v),v=eX(f.w),i.removeEdge(f.v,f.w,f.name);const b=f.w+"---"+f.v;i.setNode(b,{domId:b,id:b,labelStyle:"",labelText:g.label,padding:0,shape:"labelRect",style:""});const E=structuredClone(g),S=structuredClone(g);E.label="",E.arrowTypeEnd="none",S.label="",E.fromCluster=f.v,S.toCluster=f.v,i.setEdge(w,b,E,f.name+"-cyclic-special"),i.setEdge(b,v,S,f.name+"-cyclic-special")}else if(ho[f.v]||ho[f.w]){if(Kt.warn("Fixing and trixing - removing XXX",f.v,f.w,f.name),w=eX(f.v),v=eX(f.w),i.removeEdge(f.v,f.w,f.name),w!==f.v){const b=i.parent(w);ho[b].externalConnections=!0,g.fromCluster=f.v}if(v!==f.w){const b=i.parent(v);ho[b].externalConnections=!0,g.toCluster=f.w}Kt.warn("Fix Replacing with XXX",w,v,f.name),i.setEdge(w,v,g,f.name)}}),Kt.warn("Adjusted Graph",jx(i)),Z$t(i,0),Kt.trace(ho)},Z$t=(i,a)=>{if(Kt.warn("extractor - ",a,jx(i),i.children("D")),a>10){Kt.error("Bailing out");return}let f=i.nodes(),g=!1;for(const w of f){const v=i.children(w);g=g||v.length>0}if(!g){Kt.debug("Done, no node has children",i.nodes());return}Kt.debug("Nodes = ",f,a);for(const w of f)if(Kt.debug("Extracting node",w,ho,ho[w]&&!ho[w].externalConnections,!i.parent(w),i.node(w),i.children("D")," Depth ",a),!ho[w])Kt.debug("Not a cluster",w,a);else if(!ho[w].externalConnections&&i.children(w)&&i.children(w).length>0){Kt.warn("Cluster without external connections, without a parent and with children",w,a);let b=i.graph().rankdir==="TB"?"LR":"TB";ho[w]&&ho[w].clusterData&&ho[w].clusterData.dir&&(b=ho[w].clusterData.dir,Kt.warn("Fixing dir",ho[w].clusterData.dir,b));const E=new l1({multigraph:!0,compound:!0}).setGraph({rankdir:b,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Kt.warn("Old graph before copy",jx(i)),Q$t(w,i,E,w),i.setNode(w,{clusterNode:!0,id:w,clusterData:ho[w].clusterData,labelText:ho[w].labelText,graph:E}),Kt.warn("New graph after copy node: (",w,")",jx(E)),Kt.debug("Old graph after copy",jx(i))}else Kt.warn("Cluster ** ",w," **not meeting the criteria !externalConnections:",!ho[w].externalConnections," no parent: ",!i.parent(w)," children ",i.children(w)&&i.children(w).length>0,i.children("D"),a),Kt.debug(ho);f=i.nodes(),Kt.warn("New list of nodes",f);for(const w of f){const v=i.node(w);Kt.warn(" Now next level",w,v),v.clusterNode&&Z$t(v.graph,a+1)}},tzt=(i,a)=>{if(a.length===0)return[];let f=Object.assign(a);return a.forEach(g=>{const w=i.children(g),v=tzt(i,w);f=[...f,...v]}),f},OKe=i=>tzt(i,i.children());function NKe(i,a){return i.intersect(a)}function ezt(i,a,f,g){var w=i.x,v=i.y,b=w-g.x,E=v-g.y,S=Math.sqrt(a*a*E*E+f*f*b*b),_=Math.abs(a*f*b/S);g.x<w&&(_=-_);var M=Math.abs(a*f*E/S);return g.y<v&&(M=-M),{x:w+_,y:v+M}}function PKe(i,a,f){return ezt(i,a,a,f)}function FKe(i,a,f,g){var w,v,b,E,S,_,M,F,R,B,z,Y,nt,ot,ft;if(w=a.y-i.y,b=i.x-a.x,S=a.x*i.y-i.x*a.y,R=w*f.x+b*f.y+S,B=w*g.x+b*g.y+S,!(R!==0&&B!==0&&nzt(R,B))&&(v=g.y-f.y,E=f.x-g.x,_=g.x*f.y-f.x*g.y,M=v*i.x+E*i.y+_,F=v*a.x+E*a.y+_,!(M!==0&&F!==0&&nzt(M,F))&&(z=w*E-v*b,z!==0)))return Y=Math.abs(z/2),nt=b*_-E*S,ot=nt<0?(nt-Y)/z:(nt+Y)/z,nt=v*S-w*_,ft=nt<0?(nt-Y)/z:(nt+Y)/z,{x:ot,y:ft}}function nzt(i,a){return i*a>0}function BKe(i,a,f){var g=i.x,w=i.y,v=[],b=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;typeof a.forEach=="function"?a.forEach(function(z){b=Math.min(b,z.x),E=Math.min(E,z.y)}):(b=Math.min(b,a.x),E=Math.min(E,a.y));for(var S=g-i.width/2-b,_=w-i.height/2-E,M=0;M<a.length;M++){var F=a[M],R=a[M<a.length-1?M+1:0],B=FKe(i,f,{x:S+F.x,y:_+F.y},{x:S+R.x,y:_+R.y});B&&v.push(B)}return v.length?(v.length>1&&v.sort(function(z,Y){var nt=z.x-f.x,ot=z.y-f.y,ft=Math.sqrt(nt*nt+ot*ot),wt=Y.x-f.x,mt=Y.y-f.y,ct=Math.sqrt(wt*wt+mt*mt);return ft<ct?-1:ft===ct?0:1}),v[0]):i}const eB=(i,a)=>{var f=i.x,g=i.y,w=a.x-f,v=a.y-g,b=i.width/2,E=i.height/2,S,_;return Math.abs(v)*b>Math.abs(w)*E?(v<0&&(E=-E),S=v===0?0:E*w/v,_=E):(w<0&&(b=-b),S=b,_=w===0?0:b*v/w),{x:f+S,y:g+_}},Ql={node:NKe,circle:PKe,ellipse:ezt,polygon:BKe,rect:eB},RKe=async(i,a)=>{a.useHtmlLabels||Re().flowchart.htmlLabels||(a.centerLabel=!0);const{shapeSvg:g,bbox:w,halfPadding:v}=await $1(i,a,"node "+a.classes,!0);Kt.info("Classes = ",a.classes);const b=g.insert("rect",":first-child");return b.attr("rx",a.rx).attr("ry",a.ry).attr("x",-w.width/2-v).attr("y",-w.height/2-v).attr("width",w.width+a.padding).attr("height",w.height+a.padding),xh(a,b),a.intersect=function(E){return Ql.rect(a,E)},g},jKe=i=>{const a=new Set;for(const f of i)switch(f){case"x":a.add("right"),a.add("left");break;case"y":a.add("up"),a.add("down");break;default:a.add(f);break}return a},$Ke=(i,a,f)=>{const g=jKe(i),w=2,v=a.height+2*f.padding,b=v/w,E=a.width+2*b+f.padding,S=f.padding/2;return g.has("right")&&g.has("left")&&g.has("up")&&g.has("down")?[{x:0,y:0},{x:b,y:0},{x:E/2,y:2*S},{x:E-b,y:0},{x:E,y:0},{x:E,y:-v/3},{x:E+2*S,y:-v/2},{x:E,y:-2*v/3},{x:E,y:-v},{x:E-b,y:-v},{x:E/2,y:-v-2*S},{x:b,y:-v},{x:0,y:-v},{x:0,y:-2*v/3},{x:-2*S,y:-v/2},{x:0,y:-v/3}]:g.has("right")&&g.has("left")&&g.has("up")?[{x:b,y:0},{x:E-b,y:0},{x:E,y:-v/2},{x:E-b,y:-v},{x:b,y:-v},{x:0,y:-v/2}]:g.has("right")&&g.has("left")&&g.has("down")?[{x:0,y:0},{x:b,y:-v},{x:E-b,y:-v},{x:E,y:0}]:g.has("right")&&g.has("up")&&g.has("down")?[{x:0,y:0},{x:E,y:-b},{x:E,y:-v+b},{x:0,y:-v}]:g.has("left")&&g.has("up")&&g.has("down")?[{x:E,y:0},{x:0,y:-b},{x:0,y:-v+b},{x:E,y:-v}]:g.has("right")&&g.has("left")?[{x:b,y:0},{x:b,y:-S},{x:E-b,y:-S},{x:E-b,y:0},{x:E,y:-v/2},{x:E-b,y:-v},{x:E-b,y:-v+S},{x:b,y:-v+S},{x:b,y:-v},{x:0,y:-v/2}]:g.has("up")&&g.has("down")?[{x:E/2,y:0},{x:0,y:-S},{x:b,y:-S},{x:b,y:-v+S},{x:0,y:-v+S},{x:E/2,y:-v},{x:E,y:-v+S},{x:E-b,y:-v+S},{x:E-b,y:-S},{x:E,y:-S}]:g.has("right")&&g.has("up")?[{x:0,y:0},{x:E,y:-b},{x:0,y:-v}]:g.has("right")&&g.has("down")?[{x:0,y:0},{x:E,y:0},{x:0,y:-v}]:g.has("left")&&g.has("up")?[{x:E,y:0},{x:0,y:-b},{x:E,y:-v}]:g.has("left")&&g.has("down")?[{x:E,y:0},{x:0,y:0},{x:E,y:-v}]:g.has("right")?[{x:b,y:-S},{x:b,y:-S},{x:E-b,y:-S},{x:E-b,y:0},{x:E,y:-v/2},{x:E-b,y:-v},{x:E-b,y:-v+S},{x:b,y:-v+S},{x:b,y:-v+S}]:g.has("left")?[{x:b,y:0},{x:b,y:-S},{x:E-b,y:-S},{x:E-b,y:-v+S},{x:b,y:-v+S},{x:b,y:-v},{x:0,y:-v/2}]:g.has("up")?[{x:b,y:-S},{x:b,y:-v+S},{x:0,y:-v+S},{x:E/2,y:-v},{x:E,y:-v+S},{x:E-b,y:-v+S},{x:E-b,y:-S}]:g.has("down")?[{x:E/2,y:0},{x:0,y:-S},{x:b,y:-S},{x:b,y:-v+S},{x:E-b,y:-v+S},{x:E-b,y:-S},{x:E,y:-S}]:[{x:0,y:0}]},rzt=i=>i?" "+i:"",L2=(i,a)=>`${a||"node default"}${rzt(i.classes)} ${rzt(i.class)}`,izt=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a,void 0),!0),w=g.width+a.padding,v=g.height+a.padding,b=w+v,E=[{x:b/2,y:0},{x:b,y:-b/2},{x:b/2,y:-b},{x:0,y:-b/2}];Kt.info("Question main (Circle)");const S=l4(f,b,b,E);return S.attr("style",a.style),xh(a,S),a.intersect=function(_){return Kt.warn("Intersect called"),Ql.polygon(a,E,_)},f},zKe=(i,a)=>{const f=i.insert("g").attr("class","node default").attr("id",a.domId||a.id),g=28,w=[{x:0,y:g/2},{x:g/2,y:0},{x:0,y:-g/2},{x:-g/2,y:0}];return f.insert("polygon",":first-child").attr("points",w.map(function(b){return b.x+","+b.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),a.width=28,a.height=28,a.intersect=function(b){return Ql.circle(a,14,b)},f},qKe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a,void 0),!0),w=4,v=g.height+a.padding,b=v/w,E=g.width+2*b+a.padding,S=[{x:b,y:0},{x:E-b,y:0},{x:E,y:-v/2},{x:E-b,y:-v},{x:b,y:-v},{x:0,y:-v/2}],_=l4(f,E,v,S);return _.attr("style",a.style),xh(a,_),a.intersect=function(M){return Ql.polygon(a,S,M)},f},HKe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,void 0,!0),w=2,v=g.height+2*a.padding,b=v/w,E=g.width+2*b+a.padding,S=$Ke(a.directions,g,a),_=l4(f,E,v,S);return _.attr("style",a.style),xh(a,_),a.intersect=function(M){return Ql.polygon(a,S,M)},f},VKe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a,void 0),!0),w=g.width+a.padding,v=g.height+a.padding,b=[{x:-v/2,y:0},{x:w,y:0},{x:w,y:-v},{x:-v/2,y:-v},{x:0,y:-v/2}];return l4(f,w,v,b).attr("style",a.style),a.width=w+v,a.height=v,a.intersect=function(S){return Ql.polygon(a,b,S)},f},UKe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a),!0),w=g.width+a.padding,v=g.height+a.padding,b=[{x:-2*v/6,y:0},{x:w-v/6,y:0},{x:w+2*v/6,y:-v},{x:v/6,y:-v}],E=l4(f,w,v,b);return E.attr("style",a.style),xh(a,E),a.intersect=function(S){return Ql.polygon(a,b,S)},f},GKe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a,void 0),!0),w=g.width+a.padding,v=g.height+a.padding,b=[{x:2*v/6,y:0},{x:w+v/6,y:0},{x:w-2*v/6,y:-v},{x:-v/6,y:-v}],E=l4(f,w,v,b);return E.attr("style",a.style),xh(a,E),a.intersect=function(S){return Ql.polygon(a,b,S)},f},KKe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a,void 0),!0),w=g.width+a.padding,v=g.height+a.padding,b=[{x:-2*v/6,y:0},{x:w+2*v/6,y:0},{x:w-v/6,y:-v},{x:v/6,y:-v}],E=l4(f,w,v,b);return E.attr("style",a.style),xh(a,E),a.intersect=function(S){return Ql.polygon(a,b,S)},f},WKe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a,void 0),!0),w=g.width+a.padding,v=g.height+a.padding,b=[{x:v/6,y:0},{x:w-v/6,y:0},{x:w+2*v/6,y:-v},{x:-2*v/6,y:-v}],E=l4(f,w,v,b);return E.attr("style",a.style),xh(a,E),a.intersect=function(S){return Ql.polygon(a,b,S)},f},YKe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a,void 0),!0),w=g.width+a.padding,v=g.height+a.padding,b=[{x:0,y:0},{x:w+v/2,y:0},{x:w,y:-v/2},{x:w+v/2,y:-v},{x:0,y:-v}],E=l4(f,w,v,b);return E.attr("style",a.style),xh(a,E),a.intersect=function(S){return Ql.polygon(a,b,S)},f},XKe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a,void 0),!0),w=g.width+a.padding,v=w/2,b=v/(2.5+w/50),E=g.height+b+a.padding,S="M 0,"+b+" a "+v+","+b+" 0,0,0 "+w+" 0 a "+v+","+b+" 0,0,0 "+-w+" 0 l 0,"+E+" a "+v+","+b+" 0,0,0 "+w+" 0 l 0,"+-E,_=f.attr("label-offset-y",b).insert("path",":first-child").attr("style",a.style).attr("d",S).attr("transform","translate("+-w/2+","+-(E/2+b)+")");return xh(a,_),a.intersect=function(M){const F=Ql.rect(a,M),R=F.x-a.x;if(v!=0&&(Math.abs(R)<a.width/2||Math.abs(R)==a.width/2&&Math.abs(F.y-a.y)>a.height/2-b)){let B=b*b*(1-R*R/(v*v));B!=0&&(B=Math.sqrt(B)),B=b-B,M.y-a.y>0&&(B=-B),F.y+=B}return F},f},QKe=async(i,a)=>{const{shapeSvg:f,bbox:g,halfPadding:w}=await $1(i,a,"node "+a.classes+" "+a.class,!0),v=f.insert("rect",":first-child"),b=a.positioned?a.width:g.width+a.padding,E=a.positioned?a.height:g.height+a.padding,S=a.positioned?-b/2:-g.width/2-w,_=a.positioned?-E/2:-g.height/2-w;if(v.attr("class","basic label-container").attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("x",S).attr("y",_).attr("width",b).attr("height",E),a.props){const M=new Set(Object.keys(a.props));a.props.borders&&(Jpt(v,a.props.borders,b,E),M.delete("borders")),M.forEach(F=>{Kt.warn(`Unknown node property ${F}`)})}return xh(a,v),a.intersect=function(M){return Ql.rect(a,M)},f},JKe=async(i,a)=>{const{shapeSvg:f,bbox:g,halfPadding:w}=await $1(i,a,"node "+a.classes,!0),v=f.insert("rect",":first-child"),b=a.positioned?a.width:g.width+a.padding,E=a.positioned?a.height:g.height+a.padding,S=a.positioned?-b/2:-g.width/2-w,_=a.positioned?-E/2:-g.height/2-w;if(v.attr("class","basic cluster composite label-container").attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("x",S).attr("y",_).attr("width",b).attr("height",E),a.props){const M=new Set(Object.keys(a.props));a.props.borders&&(Jpt(v,a.props.borders,b,E),M.delete("borders")),M.forEach(F=>{Kt.warn(`Unknown node property ${F}`)})}return xh(a,v),a.intersect=function(M){return Ql.rect(a,M)},f},ZKe=async(i,a)=>{const{shapeSvg:f}=await $1(i,a,"label",!0);Kt.trace("Classes = ",a.class);const g=f.insert("rect",":first-child"),w=0,v=0;if(g.attr("width",w).attr("height",v),f.attr("class","label edgeLabel"),a.props){const b=new Set(Object.keys(a.props));a.props.borders&&(Jpt(g,a.props.borders,w,v),b.delete("borders")),b.forEach(E=>{Kt.warn(`Unknown node property ${E}`)})}return xh(a,g),a.intersect=function(b){return Ql.rect(a,b)},f};function Jpt(i,a,f,g){const w=[],v=E=>{w.push(E,0)},b=E=>{w.push(0,E)};a.includes("t")?(Kt.debug("add top border"),v(f)):b(f),a.includes("r")?(Kt.debug("add right border"),v(g)):b(g),a.includes("b")?(Kt.debug("add bottom border"),v(f)):b(f),a.includes("l")?(Kt.debug("add left border"),v(g)):b(g),i.attr("stroke-dasharray",w.join(" "))}const tWe=(i,a)=>{let f;a.classes?f="node "+a.classes:f="node default";const g=i.insert("g").attr("class",f).attr("id",a.domId||a.id),w=g.insert("rect",":first-child"),v=g.insert("line"),b=g.insert("g").attr("class","label"),E=a.labelText.flat?a.labelText.flat():a.labelText;let S="";typeof E=="object"?S=E[0]:S=E,Kt.info("Label text abc79",S,E,typeof E=="object");const _=b.node().appendChild(ab(S,a.labelStyle,!0,!0));let M={width:0,height:0};if(j1(Re().flowchart.htmlLabels)){const Y=_.children[0],nt=Tr(_);M=Y.getBoundingClientRect(),nt.attr("width",M.width),nt.attr("height",M.height)}Kt.info("Text 2",E);const F=E.slice(1,E.length);let R=_.getBBox();const B=b.node().appendChild(ab(F.join?F.join("<br/>"):F,a.labelStyle,!0,!0));if(j1(Re().flowchart.htmlLabels)){const Y=B.children[0],nt=Tr(B);M=Y.getBoundingClientRect(),nt.attr("width",M.width),nt.attr("height",M.height)}const z=a.padding/2;return Tr(B).attr("transform","translate( "+(M.width>R.width?0:(R.width-M.width)/2)+", "+(R.height+z+5)+")"),Tr(_).attr("transform","translate( "+(M.width<R.width?0:-(R.width-M.width)/2)+", 0)"),M=b.node().getBBox(),b.attr("transform","translate("+-M.width/2+", "+(-M.height/2-z+3)+")"),w.attr("class","outer title-state").attr("x",-M.width/2-z).attr("y",-M.height/2-z).attr("width",M.width+a.padding).attr("height",M.height+a.padding),v.attr("class","divider").attr("x1",-M.width/2-z).attr("x2",M.width/2+z).attr("y1",-M.height/2-z+R.height+z).attr("y2",-M.height/2-z+R.height+z),xh(a,w),a.intersect=function(Y){return Ql.rect(a,Y)},g},eWe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a,void 0),!0),w=g.height+a.padding,v=g.width+w/4+a.padding,b=f.insert("rect",":first-child").attr("style",a.style).attr("rx",w/2).attr("ry",w/2).attr("x",-v/2).attr("y",-w/2).attr("width",v).attr("height",w);return xh(a,b),a.intersect=function(E){return Ql.rect(a,E)},f},nWe=async(i,a)=>{const{shapeSvg:f,bbox:g,halfPadding:w}=await $1(i,a,L2(a,void 0),!0),v=f.insert("circle",":first-child");return v.attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("r",g.width/2+w).attr("width",g.width+a.padding).attr("height",g.height+a.padding),Kt.info("Circle main"),xh(a,v),a.intersect=function(b){return Kt.info("Circle intersect",a,g.width/2+w,b),Ql.circle(a,g.width/2+w,b)},f},rWe=async(i,a)=>{const{shapeSvg:f,bbox:g,halfPadding:w}=await $1(i,a,L2(a,void 0),!0),v=5,b=f.insert("g",":first-child"),E=b.insert("circle"),S=b.insert("circle");return b.attr("class",a.class),E.attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("r",g.width/2+w+v).attr("width",g.width+a.padding+v*2).attr("height",g.height+a.padding+v*2),S.attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("r",g.width/2+w).attr("width",g.width+a.padding).attr("height",g.height+a.padding),Kt.info("DoubleCircle main"),xh(a,E),a.intersect=function(_){return Kt.info("DoubleCircle intersect",a,g.width/2+w+v,_),Ql.circle(a,g.width/2+w+v,_)},f},iWe=async(i,a)=>{const{shapeSvg:f,bbox:g}=await $1(i,a,L2(a,void 0),!0),w=g.width+a.padding,v=g.height+a.padding,b=[{x:0,y:0},{x:w,y:0},{x:w,y:-v},{x:0,y:-v},{x:0,y:0},{x:-8,y:0},{x:w+8,y:0},{x:w+8,y:-v},{x:-8,y:-v},{x:-8,y:0}],E=l4(f,w,v,b);return E.attr("style",a.style),xh(a,E),a.intersect=function(S){return Ql.polygon(a,b,S)},f},sWe=(i,a)=>{const f=i.insert("g").attr("class","node default").attr("id",a.domId||a.id),g=f.insert("circle",":first-child");return g.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),xh(a,g),a.intersect=function(w){return Ql.circle(a,7,w)},f},szt=(i,a,f)=>{const g=i.insert("g").attr("class","node default").attr("id",a.domId||a.id);let w=70,v=10;f==="LR"&&(w=10,v=70);const b=g.append("rect").attr("x",-1*w/2).attr("y",-1*v/2).attr("width",w).attr("height",v).attr("class","fork-join");return xh(a,b),a.height=a.height+a.padding/2,a.width=a.width+a.padding/2,a.intersect=function(E){return Ql.rect(a,E)},g},azt={rhombus:izt,composite:JKe,question:izt,rect:QKe,labelRect:ZKe,rectWithTitle:tWe,choice:zKe,circle:nWe,doublecircle:rWe,stadium:eWe,hexagon:qKe,block_arrow:HKe,rect_left_inv_arrow:VKe,lean_right:UKe,lean_left:GKe,trapezoid:KKe,inv_trapezoid:WKe,rect_right_inv_arrow:YKe,cylinder:XKe,start:sWe,end:(i,a)=>{const f=i.insert("g").attr("class","node default").attr("id",a.domId||a.id),g=f.insert("circle",":first-child"),w=f.insert("circle",":first-child");return w.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),g.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),xh(a,w),a.intersect=function(v){return Ql.circle(a,7,v)},f},note:RKe,subroutine:iWe,fork:szt,join:szt,class_box:(i,a)=>{const f=a.padding/2,g=4,w=8;let v;a.classes?v="node "+a.classes:v="node default";const b=i.insert("g").attr("class",v).attr("id",a.domId||a.id),E=b.insert("rect",":first-child"),S=b.insert("line"),_=b.insert("line");let M=0,F=g;const R=b.insert("g").attr("class","label");let B=0;const z=a.classData.annotations&&a.classData.annotations[0],Y=a.classData.annotations[0]?"«"+a.classData.annotations[0]+"»":"",nt=R.node().appendChild(ab(Y,a.labelStyle,!0,!0));let ot=nt.getBBox();if(j1(Re().flowchart.htmlLabels)){const gt=nt.children[0],Q=Tr(nt);ot=gt.getBoundingClientRect(),Q.attr("width",ot.width),Q.attr("height",ot.height)}a.classData.annotations[0]&&(F+=ot.height+g,M+=ot.width);let ft=a.classData.label;a.classData.type!==void 0&&a.classData.type!==""&&(Re().flowchart.htmlLabels?ft+="&lt;"+a.classData.type+"&gt;":ft+="<"+a.classData.type+">");const wt=R.node().appendChild(ab(ft,a.labelStyle,!0,!0));Tr(wt).attr("class","classTitle");let mt=wt.getBBox();if(j1(Re().flowchart.htmlLabels)){const gt=wt.children[0],Q=Tr(wt);mt=gt.getBoundingClientRect(),Q.attr("width",mt.width),Q.attr("height",mt.height)}F+=mt.height+g,mt.width>M&&(M=mt.width);const ct=[];a.classData.members.forEach(gt=>{const Q=gt.getDisplayDetails();let dt=Q.displayText;Re().flowchart.htmlLabels&&(dt=dt.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const K=R.node().appendChild(ab(dt,Q.cssStyle?Q.cssStyle:a.labelStyle,!0,!0));let yt=K.getBBox();if(j1(Re().flowchart.htmlLabels)){const V=K.children[0],Ot=Tr(K);yt=V.getBoundingClientRect(),Ot.attr("width",yt.width),Ot.attr("height",yt.height)}yt.width>M&&(M=yt.width),F+=yt.height+g,ct.push(K)}),F+=w;const rt=[];if(a.classData.methods.forEach(gt=>{const Q=gt.getDisplayDetails();let dt=Q.displayText;Re().flowchart.htmlLabels&&(dt=dt.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const K=R.node().appendChild(ab(dt,Q.cssStyle?Q.cssStyle:a.labelStyle,!0,!0));let yt=K.getBBox();if(j1(Re().flowchart.htmlLabels)){const V=K.children[0],Ot=Tr(K);yt=V.getBoundingClientRect(),Ot.attr("width",yt.width),Ot.attr("height",yt.height)}yt.width>M&&(M=yt.width),F+=yt.height+g,rt.push(K)}),F+=w,z){let gt=(M-ot.width)/2;Tr(nt).attr("transform","translate( "+(-1*M/2+gt)+", "+-1*F/2+")"),B=ot.height+g}let it=(M-mt.width)/2;return Tr(wt).attr("transform","translate( "+(-1*M/2+it)+", "+(-1*F/2+B)+")"),B+=mt.height+g,S.attr("class","divider").attr("x1",-M/2-f).attr("x2",M/2+f).attr("y1",-F/2-f+w+B).attr("y2",-F/2-f+w+B),B+=w,ct.forEach(gt=>{Tr(gt).attr("transform","translate( "+-M/2+", "+(-1*F/2+B+w/2)+")");const Q=gt==null?void 0:gt.getBBox();B+=((Q==null?void 0:Q.height)??0)+g}),B+=w,_.attr("class","divider").attr("x1",-M/2-f).attr("x2",M/2+f).attr("y1",-F/2-f+w+B).attr("y2",-F/2-f+w+B),B+=w,rt.forEach(gt=>{Tr(gt).attr("transform","translate( "+-M/2+", "+(-1*F/2+B)+")");const Q=gt==null?void 0:gt.getBBox();B+=((Q==null?void 0:Q.height)??0)+g}),E.attr("style",a.style).attr("class","outer title-state").attr("x",-M/2-f).attr("y",-(F/2)-f).attr("width",M+a.padding).attr("height",F+a.padding),xh(a,E),a.intersect=function(gt){return Ql.rect(a,gt)},b}};let TD={};const nX=async(i,a,f)=>{let g,w;if(a.link){let v;Re().securityLevel==="sandbox"?v="_top":a.linkTarget&&(v=a.linkTarget||"_blank"),g=i.insert("svg:a").attr("xlink:href",a.link).attr("target",v),w=await azt[a.shape](g,a,f)}else w=await azt[a.shape](i,a,f),g=w;return a.tooltip&&w.attr("title",a.tooltip),a.class&&w.attr("class","node default "+a.class),g.attr("data-node","true"),g.attr("data-id",a.id),TD[a.id]=g,a.haveCallback&&TD[a.id].attr("class",TD[a.id].attr("class")+" clickable"),g},aWe=(i,a)=>{TD[a.id]=i},oWe=()=>{TD={}},Zpt=i=>{const a=TD[i.id];Kt.trace("Transforming node",i.diff,i,"translate("+(i.x-i.width/2-5)+", "+i.width/2+")");const f=8,g=i.diff||0;return i.clusterNode?a.attr("transform","translate("+(i.x+g-i.width/2)+", "+(i.y-i.height/2-f)+")"):a.attr("transform","translate("+i.x+", "+i.y+")"),g},rX=({flowchart:i})=>{var w,v;const a=((w=i==null?void 0:i.subGraphTitleMargin)==null?void 0:w.top)??0,f=((v=i==null?void 0:i.subGraphTitleMargin)==null?void 0:v.bottom)??0,g=a+f;return{subGraphTitleTopMargin:a,subGraphTitleBottomMargin:f,subGraphTitleTotalMargin:g}},cWe={rect:(i,a)=>{Kt.info("Creating subgraph rect for ",a.id,a);const f=Re(),g=i.insert("g").attr("class","cluster"+(a.class?" "+a.class:"")).attr("id",a.id),w=g.insert("rect",":first-child"),v=j1(f.flowchart.htmlLabels),b=g.insert("g").attr("class","cluster-label"),E=a.labelType==="markdown"?ZY(b,a.labelText,{style:a.labelStyle,useHtmlLabels:v}):b.node().appendChild(ab(a.labelText,a.labelStyle,void 0,!0));let S=E.getBBox();if(j1(f.flowchart.htmlLabels)){const z=E.children[0],Y=Tr(E);S=z.getBoundingClientRect(),Y.attr("width",S.width),Y.attr("height",S.height)}const _=0*a.padding,M=_/2,F=a.width<=S.width+_?S.width+_:a.width;a.width<=S.width+_?a.diff=(S.width-a.width)/2-a.padding/2:a.diff=-a.padding/2,Kt.trace("Data ",a,JSON.stringify(a)),w.attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("x",a.x-F/2).attr("y",a.y-a.height/2-M).attr("width",F).attr("height",a.height+_);const{subGraphTitleTopMargin:R}=rX(f);v?b.attr("transform",`translate(${a.x-S.width/2}, ${a.y-a.height/2+R})`):b.attr("transform",`translate(${a.x}, ${a.y-a.height/2+R})`);const B=w.node().getBBox();return a.width=B.width,a.height=B.height,a.intersect=function(z){return eB(a,z)},g},roundedWithTitle:(i,a)=>{const f=Re(),g=i.insert("g").attr("class",a.classes).attr("id",a.id),w=g.insert("rect",":first-child"),v=g.insert("g").attr("class","cluster-label"),b=g.append("rect"),E=v.node().appendChild(ab(a.labelText,a.labelStyle,void 0,!0));let S=E.getBBox();if(j1(f.flowchart.htmlLabels)){const z=E.children[0],Y=Tr(E);S=z.getBoundingClientRect(),Y.attr("width",S.width),Y.attr("height",S.height)}S=E.getBBox();const _=0*a.padding,M=_/2,F=a.width<=S.width+a.padding?S.width+a.padding:a.width;a.width<=S.width+a.padding?a.diff=(S.width+a.padding*0-a.width)/2:a.diff=-a.padding/2,w.attr("class","outer").attr("x",a.x-F/2-M).attr("y",a.y-a.height/2-M).attr("width",F+_).attr("height",a.height+_),b.attr("class","inner").attr("x",a.x-F/2-M).attr("y",a.y-a.height/2-M+S.height-1).attr("width",F+_).attr("height",a.height+_-S.height-3);const{subGraphTitleTopMargin:R}=rX(f);v.attr("transform",`translate(${a.x-S.width/2}, ${a.y-a.height/2-a.padding/3+(j1(f.flowchart.htmlLabels)?5:3)+R})`);const B=w.node().getBBox();return a.height=B.height,a.intersect=function(z){return eB(a,z)},g},noteGroup:(i,a)=>{const f=i.insert("g").attr("class","note-cluster").attr("id",a.id),g=f.insert("rect",":first-child"),w=0*a.padding,v=w/2;g.attr("rx",a.rx).attr("ry",a.ry).attr("x",a.x-a.width/2-v).attr("y",a.y-a.height/2-v).attr("width",a.width+w).attr("height",a.height+w).attr("fill","none");const b=g.node().getBBox();return a.width=b.width,a.height=b.height,a.intersect=function(E){return eB(a,E)},f},divider:(i,a)=>{const f=i.insert("g").attr("class",a.classes).attr("id",a.id),g=f.insert("rect",":first-child"),w=0*a.padding,v=w/2;g.attr("class","divider").attr("x",a.x-a.width/2-v).attr("y",a.y-a.height/2).attr("width",a.width+w).attr("height",a.height+w);const b=g.node().getBBox();return a.width=b.width,a.height=b.height,a.diff=-a.padding/2,a.intersect=function(E){return eB(a,E)},f}};let ozt={};const uWe=(i,a)=>{Kt.trace("Inserting cluster");const f=a.shape||"rect";ozt[a.id]=cWe[f](i,a)},lWe=()=>{ozt={}},C8={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function iX(i,a){if(i===void 0||a===void 0)return{angle:0,deltaX:0,deltaY:0};i=sX(i),a=sX(a);const[f,g]=[i.x,i.y],[w,v]=[a.x,a.y],b=w-f,E=v-g;return{angle:Math.atan(E/b),deltaX:b,deltaY:E}}const sX=i=>Array.isArray(i)?{x:i[0],y:i[1]}:i,czt=i=>({x:function(a,f,g){let w=0;if(f===0&&Object.hasOwn(C8,i.arrowTypeStart)){const{angle:v,deltaX:b}=iX(g[0],g[1]);w=C8[i.arrowTypeStart]*Math.cos(v)*(b>=0?1:-1)}else if(f===g.length-1&&Object.hasOwn(C8,i.arrowTypeEnd)){const{angle:v,deltaX:b}=iX(g[g.length-1],g[g.length-2]);w=C8[i.arrowTypeEnd]*Math.cos(v)*(b>=0?1:-1)}return sX(a).x+w},y:function(a,f,g){let w=0;if(f===0&&Object.hasOwn(C8,i.arrowTypeStart)){const{angle:v,deltaY:b}=iX(g[0],g[1]);w=C8[i.arrowTypeStart]*Math.abs(Math.sin(v))*(b>=0?1:-1)}else if(f===g.length-1&&Object.hasOwn(C8,i.arrowTypeEnd)){const{angle:v,deltaY:b}=iX(g[g.length-1],g[g.length-2]);w=C8[i.arrowTypeEnd]*Math.abs(Math.sin(v))*(b>=0?1:-1)}return sX(a).y+w}}),uzt=(i,a,f,g,w)=>{a.arrowTypeStart&&lzt(i,"start",a.arrowTypeStart,f,g,w),a.arrowTypeEnd&&lzt(i,"end",a.arrowTypeEnd,f,g,w)},hWe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},lzt=(i,a,f,g,w,v)=>{const b=hWe[f];if(!b){Kt.warn(`Unknown arrow type: ${f}`);return}const E=a==="start"?"Start":"End";i.attr(`marker-${a}`,`url(${g}#${w}_${v}-${b}${E})`)};let aX={},p0={};const fWe=()=>{aX={},p0={}},tbt=(i,a)=>{const f=j1(Re().flowchart.htmlLabels),g=a.labelType==="markdown"?ZY(i,a.label,{style:a.labelStyle,useHtmlLabels:f,addSvgBackground:!0}):ab(a.label,a.labelStyle),w=i.insert("g").attr("class","edgeLabel"),v=w.insert("g").attr("class","label");v.node().appendChild(g);let b=g.getBBox();if(f){const S=g.children[0],_=Tr(g);b=S.getBoundingClientRect(),_.attr("width",b.width),_.attr("height",b.height)}v.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),aX[a.id]=w,a.width=b.width,a.height=b.height;let E;if(a.startLabelLeft){const S=ab(a.startLabelLeft,a.labelStyle),_=i.insert("g").attr("class","edgeTerminals"),M=_.insert("g").attr("class","inner");E=M.node().appendChild(S);const F=S.getBBox();M.attr("transform","translate("+-F.width/2+", "+-F.height/2+")"),p0[a.id]||(p0[a.id]={}),p0[a.id].startLeft=_,oX(E,a.startLabelLeft)}if(a.startLabelRight){const S=ab(a.startLabelRight,a.labelStyle),_=i.insert("g").attr("class","edgeTerminals"),M=_.insert("g").attr("class","inner");E=_.node().appendChild(S),M.node().appendChild(S);const F=S.getBBox();M.attr("transform","translate("+-F.width/2+", "+-F.height/2+")"),p0[a.id]||(p0[a.id]={}),p0[a.id].startRight=_,oX(E,a.startLabelRight)}if(a.endLabelLeft){const S=ab(a.endLabelLeft,a.labelStyle),_=i.insert("g").attr("class","edgeTerminals"),M=_.insert("g").attr("class","inner");E=M.node().appendChild(S);const F=S.getBBox();M.attr("transform","translate("+-F.width/2+", "+-F.height/2+")"),_.node().appendChild(S),p0[a.id]||(p0[a.id]={}),p0[a.id].endLeft=_,oX(E,a.endLabelLeft)}if(a.endLabelRight){const S=ab(a.endLabelRight,a.labelStyle),_=i.insert("g").attr("class","edgeTerminals"),M=_.insert("g").attr("class","inner");E=M.node().appendChild(S);const F=S.getBBox();M.attr("transform","translate("+-F.width/2+", "+-F.height/2+")"),_.node().appendChild(S),p0[a.id]||(p0[a.id]={}),p0[a.id].endRight=_,oX(E,a.endLabelRight)}return g};function oX(i,a){Re().flowchart.htmlLabels&&i&&(i.style.width=a.length*9+"px",i.style.height="12px")}const hzt=(i,a)=>{Kt.debug("Moving label abc88 ",i.id,i.label,aX[i.id],a);let f=a.updatedPath?a.updatedPath:a.originalPath;const g=Re(),{subGraphTitleTotalMargin:w}=rX(g);if(i.label){const v=aX[i.id];let b=i.x,E=i.y;if(f){const S=uo.calcLabelPosition(f);Kt.debug("Moving label "+i.label+" from (",b,",",E,") to (",S.x,",",S.y,") abc88"),a.updatedPath&&(b=S.x,E=S.y)}v.attr("transform",`translate(${b}, ${E+w/2})`)}if(i.startLabelLeft){const v=p0[i.id].startLeft;let b=i.x,E=i.y;if(f){const S=uo.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",f);b=S.x,E=S.y}v.attr("transform",`translate(${b}, ${E})`)}if(i.startLabelRight){const v=p0[i.id].startRight;let b=i.x,E=i.y;if(f){const S=uo.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",f);b=S.x,E=S.y}v.attr("transform",`translate(${b}, ${E})`)}if(i.endLabelLeft){const v=p0[i.id].endLeft;let b=i.x,E=i.y;if(f){const S=uo.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",f);b=S.x,E=S.y}v.attr("transform",`translate(${b}, ${E})`)}if(i.endLabelRight){const v=p0[i.id].endRight;let b=i.x,E=i.y;if(f){const S=uo.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",f);b=S.x,E=S.y}v.attr("transform",`translate(${b}, ${E})`)}},dWe=(i,a)=>{const f=i.x,g=i.y,w=Math.abs(a.x-f),v=Math.abs(a.y-g),b=i.width/2,E=i.height/2;return w>=b||v>=E},gWe=(i,a,f)=>{Kt.debug(`intersection calc abc89:
117 node : x:${i.x} y:${i.y} w:${i.width} h:${i.height}`);const g=i.x,w=i.y,v=Math.abs(g-f.x),b=i.width/2;let E=f.x<a.x?b-v:b+v;const S=i.height/2,_=Math.abs(a.y-f.y),M=Math.abs(a.x-f.x);if(Math.abs(w-a.y)*b>Math.abs(g-a.x)*S){let F=f.y<a.y?a.y-S-w:w-S-a.y;E=M*F/_;const R={x:f.x<a.x?f.x+E:f.x-M+E,y:f.y<a.y?f.y+_-F:f.y-_+F};return E===0&&(R.x=a.x,R.y=a.y),M===0&&(R.x=a.x),_===0&&(R.y=a.y),Kt.debug(`abc89 topp/bott calc, Q ${_}, q ${F}, R ${M}, r ${E}`,R),R}else{f.x<a.x?E=a.x-b-g:E=g-b-a.x;let F=_*E/M,R=f.x<a.x?f.x+M-E:f.x-M+E,B=f.y<a.y?f.y+F:f.y-F;return Kt.debug(`sides calc abc89, Q ${_}, q ${F}, R ${M}, r ${E}`,{_x:R,_y:B}),E===0&&(R=a.x,B=a.y),M===0&&(R=a.x),_===0&&(B=a.y),{x:R,y:B}}},fzt=(i,a)=>{Kt.debug("abc88 cutPathAtIntersect",i,a);let f=[],g=i[0],w=!1;return i.forEach(v=>{if(!dWe(a,v)&&!w){const b=gWe(a,g,v);let E=!1;f.forEach(S=>{E=E||S.x===b.x&&S.y===b.y}),f.some(S=>S.x===b.x&&S.y===b.y)||f.push(b),w=!0}else g=v,w||f.push(v)}),f},dzt=function(i,a,f,g,w,v,b){let E=f.points;Kt.debug("abc88 InsertEdge: edge=",f,"e=",a);let S=!1;const _=v.node(a.v);var M=v.node(a.w);M!=null&&M.intersect&&(_!=null&&_.intersect)&&(E=E.slice(1,f.points.length-1),E.unshift(_.intersect(E[0])),E.push(M.intersect(E[E.length-1]))),f.toCluster&&(Kt.debug("to cluster abc88",g[f.toCluster]),E=fzt(f.points,g[f.toCluster].node),S=!0),f.fromCluster&&(Kt.debug("from cluster abc88",g[f.fromCluster]),E=fzt(E.reverse(),g[f.fromCluster].node).reverse(),S=!0);const F=E.filter(mt=>!Number.isNaN(mt.y));let R=wF;f.curve&&(w==="graph"||w==="flowchart")&&(R=f.curve);const{x:B,y:z}=czt(f),Y=Ax().x(B).y(z).curve(R);let nt;switch(f.thickness){case"normal":nt="edge-thickness-normal";break;case"thick":nt="edge-thickness-thick";break;case"invisible":nt="edge-thickness-thick";break;default:nt=""}switch(f.pattern){case"solid":nt+=" edge-pattern-solid";break;case"dotted":nt+=" edge-pattern-dotted";break;case"dashed":nt+=" edge-pattern-dashed";break}const ot=i.append("path").attr("d",Y(F)).attr("id",f.id).attr("class"," "+nt+(f.classes?" "+f.classes:"")).attr("style",f.style);let ft="";(Re().flowchart.arrowMarkerAbsolute||Re().state.arrowMarkerAbsolute)&&(ft=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,ft=ft.replace(/\(/g,"\\("),ft=ft.replace(/\)/g,"\\)")),uzt(ot,f,ft,b,w);let wt={};return S&&(wt.updatedPath=E),wt.originalPath=f.points,wt},gzt=async(i,a,f,g,w,v)=>{Kt.info("Graph in recursive render: XXX",jx(a),w);const b=a.graph().rankdir;Kt.trace("Dir in recursive render - dir:",b);const E=i.insert("g").attr("class","root");a.nodes()?Kt.info("Recursive render XXX",a.nodes()):Kt.info("No nodes found for",a),a.edges().length>0&&Kt.trace("Recursive edges",a.edge(a.edges()[0]));const S=E.insert("g").attr("class","clusters"),_=E.insert("g").attr("class","edgePaths"),M=E.insert("g").attr("class","edgeLabels"),F=E.insert("g").attr("class","nodes");await Promise.all(a.nodes().map(async function(z){const Y=a.node(z);if(w!==void 0){const nt=JSON.parse(JSON.stringify(w.clusterData));Kt.info("Setting data for cluster XXX (",z,") ",nt,w),a.setNode(w.id,nt),a.parent(z)||(Kt.trace("Setting parent",z,w.id),a.setParent(z,w.id,nt))}if(Kt.info("(Insert) Node XXX"+z+": "+JSON.stringify(a.node(z))),Y&&Y.clusterNode){Kt.info("Cluster identified",z,Y.width,a.node(z));const nt=await gzt(F,Y.graph,f,g,a.node(z),v),ot=nt.elem;xh(Y,ot),Y.diff=nt.diff||0,Kt.info("Node bounds (abc123)",z,Y,Y.width,Y.x,Y.y),aWe(ot,Y),Kt.warn("Recursive render complete ",ot,Y)}else a.children(z).length>0?(Kt.info("Cluster - the non recursive path XXX",z,Y.id,Y,a),Kt.info(tB(Y.id,a)),ho[Y.id]={id:tB(Y.id,a),node:Y}):(Kt.info("Node - the non recursive path",z,Y.id,Y),await nX(F,a.node(z),b))})),a.edges().forEach(function(z){const Y=a.edge(z.v,z.w,z.name);Kt.info("Edge "+z.v+" -> "+z.w+": "+JSON.stringify(z)),Kt.info("Edge "+z.v+" -> "+z.w+": ",z," ",JSON.stringify(a.edge(z))),Kt.info("Fix",ho,"ids:",z.v,z.w,"Translateing: ",ho[z.v],ho[z.w]),tbt(M,Y)}),a.edges().forEach(function(z){Kt.info("Edge "+z.v+" -> "+z.w+": "+JSON.stringify(z))}),Kt.info("#############################################"),Kt.info("### Layout ###"),Kt.info("#############################################"),Kt.info(a),kD(a),Kt.info("Graph after layout:",jx(a));let R=0;const{subGraphTitleTotalMargin:B}=rX(v);return OKe(a).forEach(function(z){const Y=a.node(z);Kt.info("Position "+z+": "+JSON.stringify(a.node(z))),Kt.info("Position "+z+": ("+Y.x,","+Y.y,") width: ",Y.width," height: ",Y.height),Y&&Y.clusterNode?(Y.y+=B,Zpt(Y)):a.children(z).length>0?(Y.height+=B,uWe(S,Y),ho[Y.id].node=Y):(Y.y+=B/2,Zpt(Y))}),a.edges().forEach(function(z){const Y=a.edge(z);Kt.info("Edge "+z.v+" -> "+z.w+": "+JSON.stringify(Y),Y),Y.points.forEach(ot=>ot.y+=B/2);const nt=dzt(_,z,Y,ho,f,a,g);hzt(Y,nt)}),a.nodes().forEach(function(z){const Y=a.node(z);Kt.info(z,Y.type,Y.diff),Y.type==="group"&&(R=Y.diff)}),{elem:E,diff:R}},ebt=async(i,a,f,g,w)=>{jpt(i,f,g,w),oWe(),fWe(),lWe(),DKe(),Kt.warn("Graph at first:",JSON.stringify(jx(a))),IKe(a),Kt.warn("Graph after:",JSON.stringify(jx(a)));const v=Re();await gzt(i,a,g,w,void 0,v)},pzt={},pWe=function(i){const a=Object.keys(i);for(const f of a)pzt[f]=i[f]},bzt=function(i,a,f,g,w,v){const b=g.select(`[id="${f}"]`);Object.keys(i).forEach(function(S){const _=i[S];let M="default";_.classes.length>0&&(M=_.classes.join(" ")),M=M+" flowchart-label";const F=C2(_.styles);let R=_.text!==void 0?_.text:_.id,B;if(Kt.info("vertex",_,_.labelType),_.labelType==="markdown")Kt.info("vertex",_,_.labelType);else if(j1(Re().flowchart.htmlLabels)){const nt={label:R.replace(/fa[blrs]?:fa-[\w-]+/g,ot=>`<i class='${ot.replace(":"," ")}'></i>`)};B=Mpt(b,nt).node(),B.parentNode.removeChild(B)}else{const nt=w.createElementNS("http://www.w3.org/2000/svg","text");nt.setAttribute("style",F.labelStyle.replace("color:","fill:"));const ot=R.split(ei.lineBreakRegex);for(const ft of ot){const wt=w.createElementNS("http://www.w3.org/2000/svg","tspan");wt.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),wt.setAttribute("dy","1em"),wt.setAttribute("x","1"),wt.textContent=ft,nt.appendChild(wt)}B=nt}let z=0,Y="";switch(_.type){case"round":z=5,Y="rect";break;case"square":Y="rect";break;case"diamond":Y="question";break;case"hexagon":Y="hexagon";break;case"odd":Y="rect_left_inv_arrow";break;case"lean_right":Y="lean_right";break;case"lean_left":Y="lean_left";break;case"trapezoid":Y="trapezoid";break;case"inv_trapezoid":Y="inv_trapezoid";break;case"odd_right":Y="rect_left_inv_arrow";break;case"circle":Y="circle";break;case"ellipse":Y="ellipse";break;case"stadium":Y="stadium";break;case"subroutine":Y="subroutine";break;case"cylinder":Y="cylinder";break;case"group":Y="rect";break;case"doublecircle":Y="doublecircle";break;default:Y="rect"}a.setNode(_.id,{labelStyle:F.labelStyle,shape:Y,labelText:R,labelType:_.labelType,rx:z,ry:z,class:M,style:F.style,id:_.id,link:_.link,linkTarget:_.linkTarget,tooltip:v.db.getTooltip(_.id)||"",domId:v.db.lookUpDomId(_.id),haveCallback:_.haveCallback,width:_.type==="group"?500:void 0,dir:_.dir,type:_.type,props:_.props,padding:Re().flowchart.padding}),Kt.info("setNode",{labelStyle:F.labelStyle,labelType:_.labelType,shape:Y,labelText:R,rx:z,ry:z,class:M,style:F.style,id:_.id,domId:v.db.lookUpDomId(_.id),width:_.type==="group"?500:void 0,type:_.type,dir:_.dir,props:_.props,padding:Re().flowchart.padding})})},wzt=function(i,a,f){Kt.info("abc78 edges = ",i);let g=0,w={},v,b;if(i.defaultStyle!==void 0){const E=C2(i.defaultStyle);v=E.style,b=E.labelStyle}i.forEach(function(E){g++;const S="L-"+E.start+"-"+E.end;w[S]===void 0?(w[S]=0,Kt.info("abc78 new entry",S,w[S])):(w[S]++,Kt.info("abc78 new entry",S,w[S]));let _=S+"-"+w[S];Kt.info("abc78 new link id to be used is",S,_,w[S]);const M="LS-"+E.start,F="LE-"+E.end,R={style:"",labelStyle:""};switch(R.minlen=E.length||1,E.type==="arrow_open"?R.arrowhead="none":R.arrowhead="normal",R.arrowTypeStart="arrow_open",R.arrowTypeEnd="arrow_open",E.type){case"double_arrow_cross":R.arrowTypeStart="arrow_cross";case"arrow_cross":R.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":R.arrowTypeStart="arrow_point";case"arrow_point":R.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":R.arrowTypeStart="arrow_circle";case"arrow_circle":R.arrowTypeEnd="arrow_circle";break}let B="",z="";switch(E.stroke){case"normal":B="fill:none;",v!==void 0&&(B=v),b!==void 0&&(z=b),R.thickness="normal",R.pattern="solid";break;case"dotted":R.thickness="normal",R.pattern="dotted",R.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":R.thickness="thick",R.pattern="solid",R.style="stroke-width: 3.5px;fill:none;";break;case"invisible":R.thickness="invisible",R.pattern="solid",R.style="stroke-width: 0;fill:none;";break}if(E.style!==void 0){const Y=C2(E.style);B=Y.style,z=Y.labelStyle}R.style=R.style+=B,R.labelStyle=R.labelStyle+=z,E.interpolate!==void 0?R.curve=Xw(E.interpolate,Kg):i.defaultInterpolate!==void 0?R.curve=Xw(i.defaultInterpolate,Kg):R.curve=Xw(pzt.curve,Kg),E.text===void 0?E.style!==void 0&&(R.arrowheadStyle="fill: #333"):(R.arrowheadStyle="fill: #333",R.labelpos="c"),R.labelType=E.labelType,R.label=E.text.replace(ei.lineBreakRegex,`
281 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var it=this.next();return it||this.lex()},begin:function(it){this.conditionStack.push(it)},popState:function(){var it=this.conditionStack.length-1;return it>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(it){return it=this.conditionStack.length-1-Math.abs(it||0),it>=0?this.conditionStack[it]:"INITIAL"},pushState:function(it){this.begin(it)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(it,gt,Q,dt){switch(Q){case 0:return this.begin("acc_title"),19;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),21;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 13;case 8:break;case 9:break;case 10:return 5;case 11:return 40;case 12:return 32;case 13:return 38;case 14:return 42;case 15:return 43;case 16:return 44;case 17:return 45;case 18:return 35;case 19:return 28;case 20:return 29;case 21:return 37;case 22:return 31;case 23:return 34;case 24:return 26;case 25:return 9;case 26:return 9;case 27:return 8;case 28:return"CARET";case 29:this.begin("options");break;case 30:this.popState();break;case 31:return 12;case 32:return 36;case 33:this.begin("string");break;case 34:this.popState();break;case 35:return 33;case 36:return 30;case 37:return 46;case 38:return 7}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:parent:)/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:TB\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},options:{rules:[30,31],inclusive:!1},string:{rules:[34,35],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,32,33,36,37,38,39],inclusive:!0}}};return ct}();ft.lexer=wt;function mt(){this.yy={}}return mt.prototype=ft,ft.Parser=mt,new mt}();abt.parser=abt;const UWe=abt;let cX=Re().gitGraph.mainBranchName,GWe=Re().gitGraph.mainBranchOrder,q1={},np=null,rB={};rB[cX]={name:cX,order:GWe};let h1={};h1[cX]=np;let Dd=cX,Ezt="LR",N9=0;function obt(){return AFt({length:7})}function KWe(i,a){const f=Object.create(null);return i.reduce((g,w)=>{const v=a(w);return f[v]||(f[v]=!0,g.push(w)),g},[])}const WWe=function(i){Ezt=i};let Tzt={};const YWe=function(i){Kt.debug("options str",i),i=i&&i.trim(),i=i||"{}";try{Tzt=JSON.parse(i)}catch(a){Kt.error("error while parsing gitGraph options",a.message)}},XWe=function(){return Tzt},QWe=function(i,a,f,g){Kt.debug("Entering commit:",i,a,f,g),a=ei.sanitizeText(a,Re()),i=ei.sanitizeText(i,Re()),g=ei.sanitizeText(g,Re());const w={id:a||N9+"-"+obt(),message:i,seq:N9++,type:f||CD.NORMAL,tag:g||"",parents:np==null?[]:[np.id],branch:Dd};np=w,q1[w.id]=w,h1[Dd]=w.id,Kt.debug("in pushCommit "+w.id)},JWe=function(i,a){if(i=ei.sanitizeText(i,Re()),h1[i]===void 0)h1[i]=np!=null?np.id:null,rB[i]={name:i,order:a?parseInt(a,10):null},Czt(i),Kt.debug("in createBranch");else{let f=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+i+'")');throw f.hash={text:"branch "+i,token:"branch "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+i+'"']},f}},ZWe=function(i,a,f,g){i=ei.sanitizeText(i,Re()),a=ei.sanitizeText(a,Re());const w=q1[h1[Dd]],v=q1[h1[i]];if(Dd===i){let E=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},E}else if(w===void 0||!w){let E=new Error('Incorrect usage of "merge". Current branch ('+Dd+")has no commits");throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},E}else if(h1[i]===void 0){let E=new Error('Incorrect usage of "merge". Branch to be merged ('+i+") does not exist");throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+i]},E}else if(v===void 0||!v){let E=new Error('Incorrect usage of "merge". Branch to be merged ('+i+") has no commits");throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},E}else if(w===v){let E=new Error('Incorrect usage of "merge". Both branches have same head');throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},E}else if(a&&q1[a]!==void 0){let E=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw E.hash={text:"merge "+i+a+f+g,token:"merge "+i+a+f+g,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+i+" "+a+"_UNIQUE "+f+" "+g]},E}const b={id:a||N9+"-"+obt(),message:"merged branch "+i+" into "+Dd,seq:N9++,parents:[np==null?null:np.id,h1[i]],branch:Dd,type:CD.MERGE,customType:f,customId:!!a,tag:g||""};np=b,q1[b.id]=b,h1[Dd]=b.id,Kt.debug(h1),Kt.debug("in mergeBranch")},tYe=function(i,a,f,g){if(Kt.debug("Entering cherryPick:",i,a,f),i=ei.sanitizeText(i,Re()),a=ei.sanitizeText(a,Re()),f=ei.sanitizeText(f,Re()),g=ei.sanitizeText(g,Re()),!i||q1[i]===void 0){let b=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw b.hash={text:"cherryPick "+i+" "+a,token:"cherryPick "+i+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},b}let w=q1[i],v=w.branch;if(g&&!(Array.isArray(w.parents)&&w.parents.includes(g)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");if(w.type===CD.MERGE&&!g)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||q1[a]===void 0){if(v===Dd){let S=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw S.hash={text:"cherryPick "+i+" "+a,token:"cherryPick "+i+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},S}const b=q1[h1[Dd]];if(b===void 0||!b){let S=new Error('Incorrect usage of "cherry-pick". Current branch ('+Dd+")has no commits");throw S.hash={text:"cherryPick "+i+" "+a,token:"cherryPick "+i+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},S}const E={id:N9+"-"+obt(),message:"cherry-picked "+w+" into "+Dd,seq:N9++,parents:[np==null?null:np.id,w.id],branch:Dd,type:CD.CHERRY_PICK,tag:f??`cherry-pick:${w.id}${w.type===CD.MERGE?`|parent:${g}`:""}`};np=E,q1[E.id]=E,h1[Dd]=E.id,Kt.debug(h1),Kt.debug("in cherryPick")}},Czt=function(i){if(i=ei.sanitizeText(i,Re()),h1[i]===void 0){let a=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+i+'")');throw a.hash={text:"checkout "+i,token:"checkout "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+i+'"']},a}else{Dd=i;const a=h1[Dd];np=q1[a]}};function Szt(i,a,f){const g=i.indexOf(a);g===-1?i.push(f):i.splice(g,1,f)}function _zt(i){const a=i.reduce((w,v)=>w.seq>v.seq?w:v,i[0]);let f="";i.forEach(function(w){w===a?f+=" *":f+=" |"});const g=[f,a.id,a.seq];for(let w in h1)h1[w]===a.id&&g.push(w);if(Kt.debug(g.join(" ")),a.parents&&a.parents.length==2){const w=q1[a.parents[0]];Szt(i,a,w),i.push(q1[a.parents[1]])}else{if(a.parents.length==0)return;{const w=q1[a.parents];Szt(i,a,w)}}i=KWe(i,w=>w.id),_zt(i)}const eYe=function(){Kt.debug(q1);const i=Azt()[0];_zt([i])},nYe=function(){q1={},np=null;let i=Re().gitGraph.mainBranchName,a=Re().gitGraph.mainBranchOrder;h1={},h1[i]=null,rB={},rB[i]={name:i,order:a},Dd=i,N9=0,ag()},rYe=function(){return Object.values(rB).map((a,f)=>a.order!==null?a:{...a,order:parseFloat(`0.${f}`,10)}).sort((a,f)=>a.order-f.order).map(({name:a})=>({name:a}))},iYe=function(){return h1},sYe=function(){return q1},Azt=function(){const i=Object.keys(q1).map(function(a){return q1[a]});return i.forEach(function(a){Kt.debug(a.id)}),i.sort((a,f)=>a.seq-f.seq),i},aYe=function(){return Dd},oYe=function(){return Ezt},cYe=function(){return np},CD={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},uYe={getConfig:()=>Re().gitGraph,setDirection:WWe,setOptions:YWe,getOptions:XWe,commit:QWe,branch:JWe,merge:ZWe,cherryPick:tYe,checkout:Czt,prettyPrint:eYe,clear:nYe,getBranchesAsObjArray:rYe,getBranches:iYe,getCommits:sYe,getCommitsArray:Azt,getCurrentBranch:aYe,getDirection:oYe,getHead:cYe,setAccTitle:og,getAccTitle:Xg,getAccDescription:Jg,setAccDescription:Qg,setDiagramTitle:S2,getDiagramTitle:Zg,commitType:CD};let iB={};const D2={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},P9=8;let Cf={},$x={},uX=[],sB=0,f1="LR";const lYe=()=>{Cf={},$x={},iB={},sB=0,uX=[],f1="LR"},Lzt=i=>{const a=document.createElementNS("http://www.w3.org/2000/svg","text");let f=[];typeof i=="string"?f=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?f=i:f=[];for(const g of f){const w=document.createElementNS("http://www.w3.org/2000/svg","tspan");w.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),w.setAttribute("dy","1em"),w.setAttribute("x","0"),w.setAttribute("class","row"),w.textContent=g.trim(),a.appendChild(w)}return a},hYe=i=>{let a="",f=0;return i.forEach(g=>{const w=f1==="TB"?$x[g].y:$x[g].x;w>=f&&(a=g,f=w)}),a||void 0},Dzt=(i,a,f)=>{const g=Re().gitGraph,w=i.append("g").attr("class","commit-bullets"),v=i.append("g").attr("class","commit-labels");let b=0;f1==="TB"&&(b=30);const S=Object.keys(a).sort((R,B)=>a[R].seq-a[B].seq),_=g.parallelCommits,M=10,F=40;S.forEach(R=>{const B=a[R];if(_)if(B.parents.length){const ot=hYe(B.parents);b=f1==="TB"?$x[ot].y+F:$x[ot].x+F}else b=0,f1==="TB"&&(b=30);const z=b+M,Y=f1==="TB"?z:Cf[B.branch].pos,nt=f1==="TB"?Cf[B.branch].pos:z;if(f){let ot,ft=B.customType!==void 0&&B.customType!==""?B.customType:B.type;switch(ft){case D2.NORMAL:ot="commit-normal";break;case D2.REVERSE:ot="commit-reverse";break;case D2.HIGHLIGHT:ot="commit-highlight";break;case D2.MERGE:ot="commit-merge";break;case D2.CHERRY_PICK:ot="commit-cherry-pick";break;default:ot="commit-normal"}if(ft===D2.HIGHLIGHT){const wt=w.append("rect");wt.attr("x",nt-10),wt.attr("y",Y-10),wt.attr("height",20),wt.attr("width",20),wt.attr("class",`commit ${B.id} commit-highlight${Cf[B.branch].index%P9} ${ot}-outer`),w.append("rect").attr("x",nt-6).attr("y",Y-6).attr("height",12).attr("width",12).attr("class",`commit ${B.id} commit${Cf[B.branch].index%P9} ${ot}-inner`)}else if(ft===D2.CHERRY_PICK)w.append("circle").attr("cx",nt).attr("cy",Y).attr("r",10).attr("class",`commit ${B.id} ${ot}`),w.append("circle").attr("cx",nt-3).attr("cy",Y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${B.id} ${ot}`),w.append("circle").attr("cx",nt+3).attr("cy",Y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${B.id} ${ot}`),w.append("line").attr("x1",nt+3).attr("y1",Y+1).attr("x2",nt).attr("y2",Y-5).attr("stroke","#fff").attr("class",`commit ${B.id} ${ot}`),w.append("line").attr("x1",nt-3).attr("y1",Y+1).attr("x2",nt).attr("y2",Y-5).attr("stroke","#fff").attr("class",`commit ${B.id} ${ot}`);else{const wt=w.append("circle");if(wt.attr("cx",nt),wt.attr("cy",Y),wt.attr("r",B.type===D2.MERGE?9:10),wt.attr("class",`commit ${B.id} commit${Cf[B.branch].index%P9}`),ft===D2.MERGE){const mt=w.append("circle");mt.attr("cx",nt),mt.attr("cy",Y),mt.attr("r",6),mt.attr("class",`commit ${ot} ${B.id} commit${Cf[B.branch].index%P9}`)}ft===D2.REVERSE&&w.append("path").attr("d",`M ${nt-5},${Y-5}L${nt+5},${Y+5}M${nt-5},${Y+5}L${nt+5},${Y-5}`).attr("class",`commit ${ot} ${B.id} commit${Cf[B.branch].index%P9}`)}}if(f1==="TB"?$x[B.id]={x:nt,y:z}:$x[B.id]={x:z,y:Y},f){if(B.type!==D2.CHERRY_PICK&&(B.customId&&B.type===D2.MERGE||B.type!==D2.MERGE)&&g.showCommitLabel){const wt=v.append("g"),mt=wt.insert("rect").attr("class","commit-label-bkg"),ct=wt.append("text").attr("x",b).attr("y",Y+25).attr("class","commit-label").text(B.id);let rt=ct.node().getBBox();if(mt.attr("x",z-rt.width/2-2).attr("y",Y+13.5).attr("width",rt.width+2*2).attr("height",rt.height+2*2),f1==="TB"&&(mt.attr("x",nt-(rt.width+4*4+5)).attr("y",Y-12),ct.attr("x",nt-(rt.width+4*4)).attr("y",Y+rt.height-12)),f1!=="TB"&&ct.attr("x",z-rt.width/2),g.rotateCommitLabel)if(f1==="TB")ct.attr("transform","rotate(-45, "+nt+", "+Y+")"),mt.attr("transform","rotate(-45, "+nt+", "+Y+")");else{let it=-7.5-(rt.width+10)/25*9.5,gt=10+rt.width/25*8.5;wt.attr("transform","translate("+it+", "+gt+") rotate(-45, "+b+", "+Y+")")}}if(B.tag){const wt=v.insert("polygon"),mt=v.append("circle"),ct=v.append("text").attr("y",Y-16).attr("class","tag-label").text(B.tag);let rt=ct.node().getBBox();ct.attr("x",z-rt.width/2);const it=rt.height/2,gt=Y-19.2;wt.attr("class","tag-label-bkg").attr("points",`
350 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var V=this.next();return V||this.lex()},begin:function(V){this.conditionStack.push(V)},popState:function(){var V=this.conditionStack.length-1;return V>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},pushState:function(V){this.begin(V)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(V,Ot,It,jt){switch(It){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),28;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),30;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 40;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 38;case 21:this.popState();break;case 22:return 39;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 37;case 26:return 4;case 27:return 19;case 28:return 20;case 29:return 21;case 30:return 22;case 31:return 23;case 32:return 25;case 33:return 24;case 34:return 26;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return"date";case 43:return 27;case 44:return"accDescription";case 45:return 33;case 46:return 35;case 47:return 36;case 48:return":";case 49:return 6;case 50:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],inclusive:!0}}};return K}();gt.lexer=Q;function dt(){this.yy={}}return dt.prototype=gt,gt.Parser=dt,new dt}();cbt.parser=cbt;const wYe=cbt;var Mzt={exports:{}};(function(i,a){(function(f,g){i.exports=g()})(Z0,function(){var f="day";return function(g,w,v){var b=function(_){return _.add(4-_.isoWeekday(),f)},E=w.prototype;E.isoWeekYear=function(){return b(this).year()},E.isoWeek=function(_){if(!this.$utils().u(_))return this.add(7*(_-this.isoWeek()),f);var M,F,R,B,z=b(this),Y=(M=this.isoWeekYear(),F=this.$u,R=(F?v.utc:v)().year(M).startOf("year"),B=4-R.isoWeekday(),R.isoWeekday()>4&&(B+=7),R.add(B,f));return z.diff(Y,"week")+1},E.isoWeekday=function(_){return this.$utils().u(_)?this.day()||7:this.day(this.day()%7?_:_-7)};var S=E.startOf;E.startOf=function(_,M){var F=this.$utils(),R=!!F.u(M)||M;return F.p(_)==="isoweek"?R?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(_,M)}}})})(Mzt);var mYe=Mzt.exports;const vYe=e9(mYe);var Izt={exports:{}};(function(i,a){(function(f,g){i.exports=g()})(Z0,function(){var f={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},g=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,w=/\d\d/,v=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,E={},S=function(Y){return(Y=+Y)+(Y>68?1900:2e3)},_=function(Y){return function(nt){this[Y]=+nt}},M=[/[+-]\d\d:?(\d\d)?|Z/,function(Y){(this.zone||(this.zone={})).offset=function(nt){if(!nt||nt==="Z")return 0;var ot=nt.match(/([+-]|\d\d)/g),ft=60*ot[1]+(+ot[2]||0);return ft===0?0:ot[0]==="+"?-ft:ft}(Y)}],F=function(Y){var nt=E[Y];return nt&&(nt.indexOf?nt:nt.s.concat(nt.f))},R=function(Y,nt){var ot,ft=E.meridiem;if(ft){for(var wt=1;wt<=24;wt+=1)if(Y.indexOf(ft(wt,0,nt))>-1){ot=wt>12;break}}else ot=Y===(nt?"pm":"PM");return ot},B={A:[b,function(Y){this.afternoon=R(Y,!1)}],a:[b,function(Y){this.afternoon=R(Y,!0)}],S:[/\d/,function(Y){this.milliseconds=100*+Y}],SS:[w,function(Y){this.milliseconds=10*+Y}],SSS:[/\d{3}/,function(Y){this.milliseconds=+Y}],s:[v,_("seconds")],ss:[v,_("seconds")],m:[v,_("minutes")],mm:[v,_("minutes")],H:[v,_("hours")],h:[v,_("hours")],HH:[v,_("hours")],hh:[v,_("hours")],D:[v,_("day")],DD:[w,_("day")],Do:[b,function(Y){var nt=E.ordinal,ot=Y.match(/\d+/);if(this.day=ot[0],nt)for(var ft=1;ft<=31;ft+=1)nt(ft).replace(/\[|\]/g,"")===Y&&(this.day=ft)}],M:[v,_("month")],MM:[w,_("month")],MMM:[b,function(Y){var nt=F("months"),ot=(F("monthsShort")||nt.map(function(ft){return ft.slice(0,3)})).indexOf(Y)+1;if(ot<1)throw new Error;this.month=ot%12||ot}],MMMM:[b,function(Y){var nt=F("months").indexOf(Y)+1;if(nt<1)throw new Error;this.month=nt%12||nt}],Y:[/[+-]?\d+/,_("year")],YY:[w,function(Y){this.year=S(Y)}],YYYY:[/\d{4}/,_("year")],Z:M,ZZ:M};function z(Y){var nt,ot;nt=Y,ot=E&&E.formats;for(var ft=(Y=nt.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Q,dt,K){var yt=K&&K.toUpperCase();return dt||ot[K]||f[K]||ot[yt].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,Ot,It){return Ot||It.slice(1)})})).match(g),wt=ft.length,mt=0;mt<wt;mt+=1){var ct=ft[mt],rt=B[ct],it=rt&&rt[0],gt=rt&&rt[1];ft[mt]=gt?{regex:it,parser:gt}:ct.replace(/^\[|\]$/g,"")}return function(Q){for(var dt={},K=0,yt=0;K<wt;K+=1){var V=ft[K];if(typeof V=="string")yt+=V.length;else{var Ot=V.regex,It=V.parser,jt=Q.slice(yt),xt=Ot.exec(jt)[0];It.call(dt,xt),Q=Q.replace(xt,"")}}return function(Ft){var Ct=Ft.afternoon;if(Ct!==void 0){var kt=Ft.hours;Ct?kt<12&&(Ft.hours+=12):kt===12&&(Ft.hours=0),delete Ft.afternoon}}(dt),dt}}return function(Y,nt,ot){ot.p.customParseFormat=!0,Y&&Y.parseTwoDigitYear&&(S=Y.parseTwoDigitYear);var ft=nt.prototype,wt=ft.parse;ft.parse=function(mt){var ct=mt.date,rt=mt.utc,it=mt.args;this.$u=rt;var gt=it[1];if(typeof gt=="string"){var Q=it[2]===!0,dt=it[3]===!0,K=Q||dt,yt=it[2];dt&&(yt=it[2]),E=this.$locale(),!Q&&yt&&(E=ot.Ls[yt]),this.$d=function(jt,xt,Ft){try{if(["x","X"].indexOf(xt)>-1)return new Date((xt==="X"?1e3:1)*jt);var Ct=z(xt)(jt),kt=Ct.year,Gt=Ct.month,Fe=Ct.day,Mt=Ct.hours,pn=Ct.minutes,Ae=Ct.seconds,ye=Ct.milliseconds,tn=Ct.zone,sn=new Date,be=Fe||(kt||Gt?1:sn.getDate()),Ne=kt||sn.getFullYear(),Xt=0;kt&&!Gt||(Xt=Gt>0?Gt-1:sn.getMonth());var _e=Mt||0,xe=pn||0,Mn=Ae||0,ce=ye||0;return tn?new Date(Date.UTC(Ne,Xt,be,_e,xe,Mn,ce+60*tn.offset*1e3)):Ft?new Date(Date.UTC(Ne,Xt,be,_e,xe,Mn,ce)):new Date(Ne,Xt,be,_e,xe,Mn,ce)}catch{return new Date("")}}(ct,gt,rt),this.init(),yt&&yt!==!0&&(this.$L=this.locale(yt).$L),K&&ct!=this.format(gt)&&(this.$d=new Date("")),E={}}else if(gt instanceof Array)for(var V=gt.length,Ot=1;Ot<=V;Ot+=1){it[1]=gt[Ot-1];var It=ot.apply(this,it);if(It.isValid()){this.$d=It.$d,this.$L=It.$L,this.init();break}Ot===V&&(this.$d=new Date(""))}else wt.call(this,mt)}}})})(Izt);var yYe=Izt.exports;const xYe=e9(yYe);var Ozt={exports:{}};(function(i,a){(function(f,g){i.exports=g()})(Z0,function(){return function(f,g){var w=g.prototype,v=w.format;w.format=function(b){var E=this,S=this.$locale();if(!this.isValid())return v.bind(this)(b);var _=this.$utils(),M=(b||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(F){switch(F){case"Q":return Math.ceil((E.$M+1)/3);case"Do":return S.ordinal(E.$D);case"gggg":return E.weekYear();case"GGGG":return E.isoWeekYear();case"wo":return S.ordinal(E.week(),"W");case"w":case"ww":return _.s(E.week(),F==="w"?1:2,"0");case"W":case"WW":return _.s(E.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return _.s(String(E.$H===0?24:E.$H),F==="k"?1:2,"0");case"X":return Math.floor(E.$d.getTime()/1e3);case"x":return E.$d.getTime();case"z":return"["+E.offsetName()+"]";case"zzz":return"["+E.offsetName("long")+"]";default:return F}});return v.bind(this)(M)}}})})(Ozt);var kYe=Ozt.exports;const EYe=e9(kYe);tg.extend(vYe),tg.extend(xYe),tg.extend(EYe);let h4="",ubt="",lbt,hbt="",oB=[],cB=[],fbt={},dbt=[],lX=[],SD="",gbt="";const Nzt=["active","done","crit","milestone"];let pbt=[],uB=!1,bbt=!1,wbt="sunday",mbt=0;const TYe=function(){dbt=[],lX=[],SD="",pbt=[],hX=0,ybt=void 0,fX=void 0,H1=[],h4="",ubt="",gbt="",lbt=void 0,hbt="",oB=[],cB=[],uB=!1,bbt=!1,mbt=0,fbt={},ag(),wbt="sunday"},CYe=function(i){ubt=i},SYe=function(){return ubt},_Ye=function(i){lbt=i},AYe=function(){return lbt},LYe=function(i){hbt=i},DYe=function(){return hbt},MYe=function(i){h4=i},IYe=function(){uB=!0},OYe=function(){return uB},NYe=function(){bbt=!0},PYe=function(){return bbt},FYe=function(i){gbt=i},BYe=function(){return gbt},RYe=function(){return h4},jYe=function(i){oB=i.toLowerCase().split(/[\s,]+/)},$Ye=function(){return oB},zYe=function(i){cB=i.toLowerCase().split(/[\s,]+/)},qYe=function(){return cB},HYe=function(){return fbt},VYe=function(i){SD=i,dbt.push(i)},UYe=function(){return dbt},GYe=function(){let i=$zt();const a=10;let f=0;for(;!i&&f<a;)i=$zt(),f++;return lX=H1,lX},Pzt=function(i,a,f,g){return g.includes(i.format(a.trim()))?!1:i.isoWeekday()>=6&&f.includes("weekends")||f.includes(i.format("dddd").toLowerCase())?!0:f.includes(i.format(a.trim()))},KYe=function(i){wbt=i},WYe=function(){return wbt},Fzt=function(i,a,f,g){if(!f.length||i.manualEndTime)return;let w;i.startTime instanceof Date?w=tg(i.startTime):w=tg(i.startTime,a,!0),w=w.add(1,"d");let v;i.endTime instanceof Date?v=tg(i.endTime):v=tg(i.endTime,a,!0);const[b,E]=YYe(w,v,a,f,g);i.endTime=b.toDate(),i.renderEndTime=E},YYe=function(i,a,f,g,w){let v=!1,b=null;for(;i<=a;)v||(b=a.toDate()),v=Pzt(i,f,g,w),v&&(a=a.add(1,"d")),i=i.add(1,"d");return[a,b]},vbt=function(i,a,f){f=f.trim();const w=/^after\s+([\d\w- ]+)/.exec(f.trim());if(w!==null){let b=null;if(w[1].split(" ").forEach(function(E){let S=AD(E);S!==void 0&&(b?S.endTime>b.endTime&&(b=S):b=S)}),b)return b.endTime;{const E=new Date;return E.setHours(0,0,0,0),E}}let v=tg(f,a.trim(),!0);if(v.isValid())return v.toDate();{Kt.debug("Invalid date:"+f),Kt.debug("With date format:"+a.trim());const b=new Date(f);if(b===void 0||isNaN(b.getTime())||b.getFullYear()<-1e4||b.getFullYear()>1e4)throw new Error("Invalid date:"+f);return b}},Bzt=function(i){const a=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(i.trim());return a!==null?[Number.parseFloat(a[1]),a[2]]:[NaN,"ms"]},Rzt=function(i,a,f,g=!1){f=f.trim();let w=tg(f,a.trim(),!0);if(w.isValid())return g&&(w=w.add(1,"d")),w.toDate();let v=tg(i);const[b,E]=Bzt(f);if(!Number.isNaN(b)){const S=v.add(b,E);S.isValid()&&(v=S)}return v.toDate()};let hX=0;const _D=function(i){return i===void 0?(hX=hX+1,"task"+hX):i},XYe=function(i,a){let f;a.substr(0,1)===":"?f=a.substr(1,a.length):f=a;const g=f.split(","),w={};Hzt(g,w,Nzt);for(let b=0;b<g.length;b++)g[b]=g[b].trim();let v="";switch(g.length){case 1:w.id=_D(),w.startTime=i.endTime,v=g[0];break;case 2:w.id=_D(),w.startTime=vbt(void 0,h4,g[0]),v=g[1];break;case 3:w.id=_D(g[0]),w.startTime=vbt(void 0,h4,g[1]),v=g[2];break}return v&&(w.endTime=Rzt(w.startTime,h4,v,uB),w.manualEndTime=tg(v,"YYYY-MM-DD",!0).isValid(),Fzt(w,h4,cB,oB)),w},QYe=function(i,a){let f;a.substr(0,1)===":"?f=a.substr(1,a.length):f=a;const g=f.split(","),w={};Hzt(g,w,Nzt);for(let v=0;v<g.length;v++)g[v]=g[v].trim();switch(g.length){case 1:w.id=_D(),w.startTime={type:"prevTaskEnd",id:i},w.endTime={data:g[0]};break;case 2:w.id=_D(),w.startTime={type:"getStartDate",startData:g[0]},w.endTime={data:g[1]};break;case 3:w.id=_D(g[0]),w.startTime={type:"getStartDate",startData:g[1]},w.endTime={data:g[2]};break}return w};let ybt,fX,H1=[];const jzt={},JYe=function(i,a){const f={section:SD,type:SD,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:a},task:i,classes:[]},g=QYe(fX,a);f.raw.startTime=g.startTime,f.raw.endTime=g.endTime,f.id=g.id,f.prevTaskId=fX,f.active=g.active,f.done=g.done,f.crit=g.crit,f.milestone=g.milestone,f.order=mbt,mbt++;const w=H1.push(f);fX=f.id,jzt[f.id]=w-1},AD=function(i){const a=jzt[i];return H1[a]},ZYe=function(i,a){const f={section:SD,type:SD,description:i,task:i,classes:[]},g=XYe(ybt,a);f.startTime=g.startTime,f.endTime=g.endTime,f.id=g.id,f.active=g.active,f.done=g.done,f.crit=g.crit,f.milestone=g.milestone,ybt=f,lX.push(f)},$zt=function(){const i=function(f){const g=H1[f];let w="";switch(H1[f].raw.startTime.type){case"prevTaskEnd":{const v=AD(g.prevTaskId);g.startTime=v.endTime;break}case"getStartDate":w=vbt(void 0,h4,H1[f].raw.startTime.startData),w&&(H1[f].startTime=w);break}return H1[f].startTime&&(H1[f].endTime=Rzt(H1[f].startTime,h4,H1[f].raw.endTime.data,uB),H1[f].endTime&&(H1[f].processed=!0,H1[f].manualEndTime=tg(H1[f].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Fzt(H1[f],h4,cB,oB))),H1[f].processed};let a=!0;for(const[f,g]of H1.entries())i(f),a=a&&g.processed;return a},tXe=function(i,a){let f=a;Re().securityLevel!=="loose"&&(f=h8(a)),i.split(",").forEach(function(g){AD(g)!==void 0&&(qzt(g,()=>{window.open(f,"_self")}),fbt[g]=f)}),zzt(i,"clickable")},zzt=function(i,a){i.split(",").forEach(function(f){let g=AD(f);g!==void 0&&g.classes.push(a)})},eXe=function(i,a,f){if(Re().securityLevel!=="loose"||a===void 0)return;let g=[];if(typeof f=="string"){g=f.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let v=0;v<g.length;v++){let b=g[v].trim();b.charAt(0)==='"'&&b.charAt(b.length-1)==='"'&&(b=b.substr(1,b.length-2)),g[v]=b}}g.length===0&&g.push(i),AD(i)!==void 0&&qzt(i,()=>{uo.runFunc(a,...g)})},qzt=function(i,a){pbt.push(function(){const f=document.querySelector(`[id="${i}"]`);f!==null&&f.addEventListener("click",function(){a()})},function(){const f=document.querySelector(`[id="${i}-text"]`);f!==null&&f.addEventListener("click",function(){a()})})},nXe={getConfig:()=>Re().gantt,clear:TYe,setDateFormat:MYe,getDateFormat:RYe,enableInclusiveEndDates:IYe,endDatesAreInclusive:OYe,enableTopAxis:NYe,topAxisEnabled:PYe,setAxisFormat:CYe,getAxisFormat:SYe,setTickInterval:_Ye,getTickInterval:AYe,setTodayMarker:LYe,getTodayMarker:DYe,setAccTitle:og,getAccTitle:Xg,setDiagramTitle:S2,getDiagramTitle:Zg,setDisplayMode:FYe,getDisplayMode:BYe,setAccDescription:Qg,getAccDescription:Jg,addSection:VYe,getSections:UYe,getTasks:GYe,addTask:JYe,findTaskById:AD,addTaskOrg:ZYe,setIncludes:jYe,getIncludes:$Ye,setExcludes:zYe,getExcludes:qYe,setClickEvent:function(i,a,f){i.split(",").forEach(function(g){eXe(g,a,f)}),zzt(i,"clickable")},setLink:tXe,getLinks:HYe,bindFunctions:function(i){pbt.forEach(function(a){a(i)})},parseDuration:Bzt,isInvalidDate:Pzt,setWeekday:KYe,getWeekday:WYe};function Hzt(i,a,f){let g=!0;for(;g;)g=!1,f.forEach(function(w){const v="^\\s*"+w+"\\s*$",b=new RegExp(v);i[0].match(b)&&(a[w]=!0,i.shift(1),g=!0)})}const rXe=function(){Kt.debug("Something is calling, setConf, remove the call")},Vzt={monday:hF,tuesday:NNt,wednesday:PNt,thursday:l9,friday:FNt,saturday:BNt,sunday:lF},iXe=(i,a)=>{let f=[...i].map(()=>-1/0),g=[...i].sort((v,b)=>v.startTime-b.startTime||v.order-b.order),w=0;for(const v of g)for(let b=0;b<f.length;b++)if(v.startTime>=f[b]){f[b]=v.endTime,v.order=b+a,b>w&&(w=b);break}return w};let zx;const sXe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:wYe,db:nXe,renderer:{setConf:rXe,draw:function(i,a,f,g){const w=Re().gantt,v=Re().securityLevel;let b;v==="sandbox"&&(b=Tr("#i"+a));const E=Tr(v==="sandbox"?b.nodes()[0].contentDocument.body:"body"),S=v==="sandbox"?b.nodes()[0].contentDocument:document,_=S.getElementById(a);zx=_.parentElement.offsetWidth,zx===void 0&&(zx=1200),w.useWidth!==void 0&&(zx=w.useWidth);const M=g.db.getTasks();let F=[];for(const gt of M)F.push(gt.type);F=it(F);const R={};let B=2*w.topPadding;if(g.db.getDisplayMode()==="compact"||w.displayMode==="compact"){const gt={};for(const dt of M)gt[dt.section]===void 0?gt[dt.section]=[dt]:gt[dt.section].push(dt);let Q=0;for(const dt of Object.keys(gt)){const K=iXe(gt[dt],Q)+1;Q+=K,B+=K*(w.barHeight+w.barGap),R[dt]=K}}else{B+=M.length*(w.barHeight+w.barGap);for(const gt of F)R[gt]=M.filter(Q=>Q.type===gt).length}_.setAttribute("viewBox","0 0 "+zx+" "+B);const z=E.select(`[id="${a}"]`),Y=eDe().domain([B9e(M,function(gt){return gt.startTime}),F9e(M,function(gt){return gt.endTime})]).rangeRound([0,zx-w.leftPadding-w.rightPadding]);function nt(gt,Q){const dt=gt.startTime,K=Q.startTime;let yt=0;return dt>K?yt=1:dt<K&&(yt=-1),yt}M.sort(nt),ot(M,zx,B),sg(z,B,zx,w.useMaxWidth),z.append("text").text(g.db.getDiagramTitle()).attr("x",zx/2).attr("y",w.titleTopMargin).attr("class","titleText");function ot(gt,Q,dt){const K=w.barHeight,yt=K+w.barGap,V=w.topPadding,Ot=w.leftPadding,It=VL().domain([0,F.length]).range(["#00B9FA","#F95002"]).interpolate(s_e);wt(yt,V,Ot,Q,dt,gt,g.db.getExcludes(),g.db.getIncludes()),mt(Ot,V,Q,dt),ft(gt,yt,V,Ot,K,It,Q),ct(yt,V),rt(Ot,V,Q,dt)}function ft(gt,Q,dt,K,yt,V,Ot){const jt=[...new Set(gt.map(kt=>kt.order))].map(kt=>gt.find(Gt=>Gt.order===kt));z.append("g").selectAll("rect").data(jt).enter().append("rect").attr("x",0).attr("y",function(kt,Gt){return Gt=kt.order,Gt*Q+dt-2}).attr("width",function(){return Ot-w.rightPadding/2}).attr("height",Q).attr("class",function(kt){for(const[Gt,Fe]of F.entries())if(kt.type===Fe)return"section section"+Gt%w.numberSectionStyles;return"section section0"});const xt=z.append("g").selectAll("rect").data(gt).enter(),Ft=g.db.getLinks();if(xt.append("rect").attr("id",function(kt){return kt.id}).attr("rx",3).attr("ry",3).attr("x",function(kt){return kt.milestone?Y(kt.startTime)+K+.5*(Y(kt.endTime)-Y(kt.startTime))-.5*yt:Y(kt.startTime)+K}).attr("y",function(kt,Gt){return Gt=kt.order,Gt*Q+dt}).attr("width",function(kt){return kt.milestone?yt:Y(kt.renderEndTime||kt.endTime)-Y(kt.startTime)}).attr("height",yt).attr("transform-origin",function(kt,Gt){return Gt=kt.order,(Y(kt.startTime)+K+.5*(Y(kt.endTime)-Y(kt.startTime))).toString()+"px "+(Gt*Q+dt+.5*yt).toString()+"px"}).attr("class",function(kt){const Gt="task";let Fe="";kt.classes.length>0&&(Fe=kt.classes.join(" "));let Mt=0;for(const[Ae,ye]of F.entries())kt.type===ye&&(Mt=Ae%w.numberSectionStyles);let pn="";return kt.active?kt.crit?pn+=" activeCrit":pn=" active":kt.done?kt.crit?pn=" doneCrit":pn=" done":kt.crit&&(pn+=" crit"),pn.length===0&&(pn=" task"),kt.milestone&&(pn=" milestone "+pn),pn+=Mt,pn+=" "+Fe,Gt+pn}),xt.append("text").attr("id",function(kt){return kt.id+"-text"}).text(function(kt){return kt.task}).attr("font-size",w.fontSize).attr("x",function(kt){let Gt=Y(kt.startTime),Fe=Y(kt.renderEndTime||kt.endTime);kt.milestone&&(Gt+=.5*(Y(kt.endTime)-Y(kt.startTime))-.5*yt),kt.milestone&&(Fe=Gt+yt);const Mt=this.getBBox().width;return Mt>Fe-Gt?Fe+Mt+1.5*w.leftPadding>Ot?Gt+K-5:Fe+K+5:(Fe-Gt)/2+Gt+K}).attr("y",function(kt,Gt){return Gt=kt.order,Gt*Q+w.barHeight/2+(w.fontSize/2-2)+dt}).attr("text-height",yt).attr("class",function(kt){const Gt=Y(kt.startTime);let Fe=Y(kt.endTime);kt.milestone&&(Fe=Gt+yt);const Mt=this.getBBox().width;let pn="";kt.classes.length>0&&(pn=kt.classes.join(" "));let Ae=0;for(const[tn,sn]of F.entries())kt.type===sn&&(Ae=tn%w.numberSectionStyles);let ye="";return kt.active&&(kt.crit?ye="activeCritText"+Ae:ye="activeText"+Ae),kt.done?kt.crit?ye=ye+" doneCritText"+Ae:ye=ye+" doneText"+Ae:kt.crit&&(ye=ye+" critText"+Ae),kt.milestone&&(ye+=" milestoneText"),Mt>Fe-Gt?Fe+Mt+1.5*w.leftPadding>Ot?pn+" taskTextOutsideLeft taskTextOutside"+Ae+" "+ye:pn+" taskTextOutsideRight taskTextOutside"+Ae+" "+ye+" width-"+Mt:pn+" taskText taskText"+Ae+" "+ye+" width-"+Mt}),Re().securityLevel==="sandbox"){let kt;kt=Tr("#i"+a);const Gt=kt.nodes()[0].contentDocument;xt.filter(function(Fe){return Ft[Fe.id]!==void 0}).each(function(Fe){var Mt=Gt.querySelector("#"+Fe.id),pn=Gt.querySelector("#"+Fe.id+"-text");const Ae=Mt.parentNode;var ye=Gt.createElement("a");ye.setAttribute("xlink:href",Ft[Fe.id]),ye.setAttribute("target","_top"),Ae.appendChild(ye),ye.appendChild(Mt),ye.appendChild(pn)})}}function wt(gt,Q,dt,K,yt,V,Ot,It){if(Ot.length===0&&It.length===0)return;let jt,xt;for(const{startTime:Mt,endTime:pn}of V)(jt===void 0||Mt<jt)&&(jt=Mt),(xt===void 0||pn>xt)&&(xt=pn);if(!jt||!xt)return;if(tg(xt).diff(tg(jt),"year")>5){Kt.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const Ft=g.db.getDateFormat(),Ct=[];let kt=null,Gt=tg(jt);for(;Gt.valueOf()<=xt;)g.db.isInvalidDate(Gt,Ft,Ot,It)?kt?kt.end=Gt:kt={start:Gt,end:Gt}:kt&&(Ct.push(kt),kt=null),Gt=Gt.add(1,"d");z.append("g").selectAll("rect").data(Ct).enter().append("rect").attr("id",function(Mt){return"exclude-"+Mt.start.format("YYYY-MM-DD")}).attr("x",function(Mt){return Y(Mt.start)+dt}).attr("y",w.gridLineStartPadding).attr("width",function(Mt){const pn=Mt.end.add(1,"day");return Y(pn)-Y(Mt.start)}).attr("height",yt-Q-w.gridLineStartPadding).attr("transform-origin",function(Mt,pn){return(Y(Mt.start)+dt+.5*(Y(Mt.end)-Y(Mt.start))).toString()+"px "+(pn*gt+.5*yt).toString()+"px"}).attr("class","exclude-range")}function mt(gt,Q,dt,K){let yt=G9e(Y).tickSize(-K+Q+w.gridLineStartPadding).tickFormat(DW(g.db.getAxisFormat()||w.axisFormat||"%Y-%m-%d"));const Ot=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(g.db.getTickInterval()||w.tickInterval);if(Ot!==null){const It=Ot[1],jt=Ot[2],xt=g.db.getWeekday()||w.weekday;switch(jt){case"millisecond":yt.ticks(UL.every(It));break;case"second":yt.ticks(f8.every(It));break;case"minute":yt.ticks(cF.every(It));break;case"hour":yt.ticks(uF.every(It));break;case"day":yt.ticks(c9.every(It));break;case"week":yt.ticks(Vzt[xt].every(It));break;case"month":yt.ticks(fF.every(It));break}}if(z.append("g").attr("class","grid").attr("transform","translate("+gt+", "+(K-50)+")").call(yt).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","
1327 `)}return[]}function ohn(t){var e;return e=(Qte(),D0e),e[t>>>28]|e[t>>24&15]<<4|e[t>>20&15]<<8|e[t>>16&15]<<12|e[t>>12&15]<<16|e[t>>8&15]<<20|e[t>>4&15]<<24|e[t&15]<<28}function Bi global() function
[all...]
/plugin/aichat/vendor/mehrab-wj/tiktoken-php/data/
H A Dvocab.bpe24153 Ġbud dy
45183 ĠFred dy

123456789